import { inject as zt, ref as ce, provide as Ft, readonly as zE, computed as E, reactive as Pn, Fragment as Je, isVNode as cr, Comment as VP, Text as ry, defineComponent as be, getCurrentInstance as fr, onMounted as Nt, onUpdated as Ya, onUnmounted as jo, watch as ke, unref as T, shallowRef as $e, watchEffect as It, onBeforeUnmount as qt, triggerRef as FE, createVNode as h, h as ko, Transition as Er, withDirectives as ti, resolveDirective as BE, cloneVNode as Ml, render as El, nextTick as Yt, toRef as Kt, withModifiers as ur, vShow as Oi, onBeforeMount as th, Teleport as nh, createTextVNode as Le, isRef as jP, toRefs as ys, toRaw as dr, useAttrs as LE, onBeforeUpdate as iy, getCurrentScope as WP, onScopeDispose as KP, TransitionGroup as ay, onActivated as qP, openBlock as ne, createElementBlock as xe, normalizeStyle as Bt, normalizeClass as Pt, renderSlot as Ra, createCommentVNode as rt, renderList as Ut, createBlock as ft, mergeProps as HE, withCtx as he, useSlots as VE, createElementVNode as L, resolveComponent as yn, toDisplayString as oe, resolveDynamicComponent as YP, toValue as jE } from "vue";
import { merge as Gx, isEmpty as GP } from "lodash-es";
import { defineStore as ly } from "pinia";
import UP from "lodash-es/isPlainObject";
import sy from "lodash-es/isEqual";
import Sg from "lodash-es/uniq";
import WE from "lodash-es/fromPairs";
import XP from "lodash-es/debounce";
import yo from "dayjs";
import KE from "dayjs/plugin/weekday";
import qE from "dayjs/plugin/localeData";
import YE from "dayjs/plugin/weekOfYear";
import GE from "dayjs/plugin/weekYear";
import UE from "dayjs/plugin/quarterOfYear";
import XE from "dayjs/plugin/advancedFormat";
import QE from "dayjs/plugin/customParseFormat";
import Wf from "lodash-es/cloneDeep";
import ZE from "lodash-es/find";
import JE from "lodash-es/intersection";
import eD from "lodash-es/omit";
import QP from "lodash-es/pick";
import { isNumber as tD, isString as om, isBoolean as nD } from "lodash";
const oD = {
  "common.auto": "Auto",
  "common.all": "All",
  "app.tab.dashboard": "Dashboard",
  "app.tab.scene": "Scene View",
  "app.tab.topology": "Topology",
  "app.tab.logs": "Logs",
  "app.tab.traces": "Traces",
  "app.tab.querybuilder": "Query Builder",
  "app.tab.grafana": "Grafana Data",
  "app.tab.zabbix": "Zabbix",
  "app.theme.toDark": "Switch to Dark",
  "app.theme.toLight": "Switch to Light",
  "time.last1h": "Last 1 hour",
  "time.last3h": "Last 3 hours",
  "time.last6h": "Last 6 hours",
  "time.last24h": "Last 24 hours",
  "time.last7d": "Last 7 days",
  "time.last30d": "Last 30 days",
  "panel.menu.edit": "Edit",
  "panel.menu.clone": "Clone",
  "panel.menu.fullscreen": "Fullscreen",
  "panel.menu.refresh": "Refresh",
  "panel.menu.remove": "Remove",
  "panel.remove.title": 'Remove "{title}"?',
  "panel.remove.content": "This action cannot be undone.",
  "panel.remove.ok": "Remove",
  "dashboard.edit": "Edit",
  "dashboard.save": "Save",
  "dashboard.cancel": "Cancel",
  "dashboard.cancelConfirmTitle": "Discard unsaved changes?",
  "dashboard.cancelConfirmOk": "Discard changes",
  "dashboard.cancelConfirmCancel": "Keep editing",
  "dashboard.addPanel": "Add Panel",
  "dashboard.clearPanels": "Clear Panels",
  "dashboard.clearConfirmTitle": "Clear all panels?",
  "dashboard.clearConfirmOk": "Clear all",
  "dashboard.export": "Export",
  "dashboard.import": "Import",
  "dashboard.exportSuccess": "Dashboard exported",
  "dashboard.importSuccess": "Dashboard imported",
  "dashboard.importError": "Invalid dashboard JSON",
  "config.section.general": "General",
  "config.section.value": "Stat Style",
  "config.section.style": "Style",
  "config.section.tooltip": "Tooltip",
  "config.section.format": "Formatting",
  "config.section.thresholds": "Thresholds ({n})",
  "config.section.axes": "Axes",
  "config.section.links": "Links ({n})",
  "config.section.gaugeStyle": "Gauge Style",
  "config.section.pieStyle": "Pie Style",
  "config.section.histStyle": "Histogram Style",
  "config.section.tableStyle": "Table Style",
  "config.section.overrides": "Field Overrides",
  "config.type.timeseries": "Time Series",
  "config.type.bar": "Bar Chart",
  "config.type.histogram": "Histogram",
  "config.type.stat": "Stat / Value",
  "config.type.gauge": "Gauge",
  "config.type.table": "Table",
  "config.type.pie": "Pie Chart",
  "panel.type.desc.timeseries": "Line/area chart with time axis",
  "panel.type.desc.bar": "Grouped or stacked bars",
  "panel.type.desc.histogram": "Distribution buckets",
  "panel.type.desc.stat": "Single value with sparkline",
  "panel.type.desc.gauge": "Circular gauge meter",
  "panel.type.desc.table": "Sortable data table",
  "panel.type.desc.pie": "Pie or donut chart",
  "config.field.title": "Title",
  "config.field.description": "Description",
  "config.field.panelType": "Panel Type",
  "config.field.colorScheme": "Color Scheme",
  "config.field.lineWidth": "Line Width",
  "config.field.fillOpacity": "Fill Opacity",
  "config.field.drawStyle": "Style",
  "config.field.interpolation": "Interpolation",
  "config.field.lineStyle": "Line Style",
  "config.field.showPoints": "Show Points",
  "config.field.legendPosition": "Legend Position",
  "config.field.unit": "Unit",
  "config.field.decimals": "Decimals",
  "config.field.min": "Min",
  "config.field.max": "Max",
  "config.field.reducer": "Calculation",
  "config.field.tooltipMode": "Tooltip Mode",
  "config.field.softMin": "Soft Min",
  "config.field.softMax": "Soft Max",
  "config.field.logScale": "Log Scale",
  "config.field.axisPlacement": "Placement",
  "config.field.showGridLines": "Grid Lines",
  "config.field.scaleDistribution": "Scale",
  "config.field.centeredZero": "Centered Zero",
  "config.field.stacked": "Stacked",
  "config.interp.linear": "Linear",
  "config.interp.smooth": "Smooth",
  "config.interp.step": "Step",
  "config.linestyle.solid": "Solid",
  "config.linestyle.dashed": "Dashed",
  "config.linestyle.dotted": "Dotted",
  "config.legend.bottom": "Bottom",
  "config.legend.right": "Right",
  "config.legend.hidden": "Hidden",
  "config.unit.none": "None",
  "config.unit.ms": "Milliseconds (ms)",
  "config.unit.percent": "Percent (0-100)",
  "config.unit.reqps": "Requests/sec",
  "config.threshold.label": "Label",
  "config.threshold.base": "Base",
  "config.threshold.add": "Add Threshold",
  "config.threshold.mode": "Threshold Mode",
  "config.threshold.modeAbsolute": "Absolute",
  "config.threshold.modePercentage": "Percentage",
  "dashboard.refresh": "Refresh",
  "dashboard.empty": "No panels yet",
  "dashboard.emptyHint": 'Click "Edit" then "Add Panel" to get started',
  "variable.modal.placeholder": 'Click "Add Variable" on the left to start',
  "variable.custom.title": "Custom Options",
  "variable.custom.add": "Add Option",
  "variable.custom.allValue": "All Value",
  "variable.custom.allValue.placeholder": "$_all",
  "variable.custom.col.text": "Display text",
  "variable.custom.col.value": "Value",
  "variable.custom.text.placeholder": "Display text",
  "variable.custom.value.placeholder": "Value",
  "variable.custom.addOption": "Add option",
  "variable.custom.allowCustomValue": "Allow custom values",
  "variable.custom.allowClear": "Allow clear",
  "variable.custom.multi": "Multi-value",
  "variable.custom.includeAll": "Include All option",
  "variable.general.label.placeholder": "Display label",
  "variable.general.description": "Description",
  "variable.general.description.placeholder": "Variable description",
  "variable.general.name.required": "Name is required",
  "variable.general.type.required": "Please select a type",
  "variable.general.showOn": "Show on dashboard",
  "variable.general.showOn.labelAndValue": "Label and value",
  "variable.general.showOn.value": "Value only",
  "variable.general.showOn.nothing": "Nothing",
  "variable.textbox.title": "Text box options",
  "variable.textbox.default": "Default value",
  "variable.textbox.default.placeholder": "Default value",
  "variable.textbox.width": "Input width",
  "variable.constant.title": "Constant options",
  "variable.constant.value": "Value",
  "variable.constant.value.required": "Value is required",
  "variable.constant.value.notNumber": "Please enter a valid number",
  "variable.constant.valueType": "Value type",
  "variable.constant.valueType.string": "String",
  "variable.constant.valueType.number": "Number",
  "variable.constant.hideFromList": "Hide from variable list",
  "variable.query.dsUid": "Datasource UID",
  "variable.query.dsUid.placeholder": "Enter datasource UID",
  "variable.query.queryType": "Query type",
  "variable.query.queryType.placeholder": "Select query type",
  "variable.query.queryType.group": "Host group",
  "variable.query.queryType.host": "Host",
  "variable.query.queryType.item": "Item",
  "variable.query.queryType.labelValues": "Label values",
  "variable.query.query": "Query",
  "variable.query.query.placeholder": "Query expression",
  "variable.query.regex": "Regex filter",
  "variable.query.regex.placeholder": "/regex/",
  "variable.query.sort": "Sort",
  "variable.query.sort.disabled": "Disabled",
  "variable.query.sort.alphabetical": "Alphabetical",
  "variable.query.sort.numeric": "Numerical",
  "variable.query.preview": "Preview",
  "variable.query.preview.placeholder": "(Refresh after save)",
  "config.scheme.grafana-classic": "Grafana Classic",
  "config.scheme.green-yellow-red": "Green-Yellow-Red",
  "config.scheme.red-yellow-green": "Red-Yellow-Green",
  "config.scheme.blue-yellow-red": "Blue-Yellow-Red",
  "config.scheme.blue-purple": "Blue-Purple",
  "config.scheme.yellow-blue": "Yellow-Blue",
  "config.scheme.blues": "Blues",
  "config.scheme.reds": "Reds",
  "config.scheme.GrYlRd": "GrYlRd",
  "config.scheme.purple-orange": "Purple-Orange",
  "variable.modal.title": "Variable Config",
  "variable.modal.save": "Save",
  "variable.modal.cancel": "Cancel",
  "variable.modal.delete": "Delete Variable",
  "variable.modal.add": "Add Variable",
  "variable.modal.empty": 'Click "Add Variable" on the left to start',
  "variable.nav.count": "Variables ({n})",
  "variable.nav.unnamed": "(unnamed)",
  "variable.general.title": "General",
  "variable.general.type": "Type",
  "variable.general.name": "Name",
  "variable.general.label": "Label",
  "variable.type.custom": "Custom",
  "variable.type.query": "Query",
  "variable.type.textbox": "Text box",
  "variable.type.datasource": "Data source",
  "variable.type.constant": "Constant",
  "variable.query.title": "Query options",
  "variable.query.multi": "Multi-value",
  "variable.query.includeAll": "Include All option",
  "variable.query.refresh": "Refresh",
  "variable.query.refresh.onLoad": "On dashboard load",
  "variable.query.refresh.onTimeChange": "On time range change",
  "qb.datasource": "Data Source",
  "qb.addQuery": "Add Query",
  "qb.queryOptions": "Query options",
  "qb.pattern": "Pattern",
  "qb.pattern.sine": "Sine wave",
  "qb.pattern.spike": "Spike",
  "qb.pattern.step": "Step",
  "qb.pattern.sawtooth": "Sawtooth",
  "qb.pattern.noise": "Random noise",
  "qb.pattern.trendUp": "Trend up",
  "qb.pattern.trendDown": "Trend down",
  "qb.pattern.plateau": "Plateau",
  "qb.pattern.randomWalk": "Random walk",
  "qb.pattern.live": "Live",
  "qb.seriesCount": "Series Count",
  "qb.liveAmplitude": "Amplitude",
  "qb.functions": "Functions",
  "qb.functions.add": "Add",
  "qb.options": "Options",
  "qb.queryOptions.maxDataPoints": "Max data points",
  "qb.queryOptions.minInterval": "Min interval",
  "qb.queryOptions.minIntervalPlaceholder": "No limit",
  "qb.queryOptions.interval": "Interval",
  "qb.queryOptions.intervalHint": "time range / max data points",
  "qb.queryOptions.relativeTime": "Relative time",
  "qb.queryOptions.timeShift": "Time shift",
  "config.scheme.classic": "Classic",
  "config.scheme.tableau10": "Tableau 10",
  "config.scheme.fixed": "Single Color",
  "config.scheme.thresholds": "From Thresholds",
  "config.trend.up": "Up ↑",
  "config.trend.down": "Down ↓",
  "config.trend.flat": "Flat",
  "config.field.pieType": "Pie Type",
  "config.field.pieSliceSorting": "Slice Sorting",
  "config.pieType.pie": "Pie",
  "config.pieType.donut": "Donut",
  "config.sort.desc": "Descending",
  "config.sort.asc": "Ascending",
  "config.sort.none": "None",
  "config.field.pieLabels": "Slice Labels",
  "config.pieLabel.name": "Name",
  "config.pieLabel.percent": "Percent",
  "config.pieLabel.value": "Value",
  "config.field.pieShow": "Show",
  "config.pieShow.calculate": "Calculate (Reducer)",
  "config.pieShow.all": "All Values",
  "config.field.legendMode": "Legend Mode",
  "config.legendMode.list": "List",
  "config.legendMode.table": "Table",
  "config.field.legendValues": "Legend Values",
  "config.legendValue.min": "Min",
  "config.legendValue.max": "Max",
  "config.legendValue.mean": "Mean",
  "config.legendValue.sum": "Sum",
  "config.legendValue.last": "Last",
  "config.legendValue.first": "First",
  "tooltip.pinned": "Pinned",
  "tooltip.datetimeFormat": "MMM DD HH:mm:ss",
  "config.reducer.lastNotNull": "Last *",
  "config.reducer.last": "Last",
  "config.reducer.firstNotNull": "First *",
  "config.reducer.first": "First",
  "config.reducer.min": "Min",
  "config.reducer.max": "Max",
  "config.reducer.mean": "Mean",
  "config.reducer.sum": "Total",
  "config.reducer.count": "Count",
  "config.reducer.range": "Range",
  "config.reducer.median": "Median",
  "config.reducer.stdDev": "Std Dev",
  "config.reducer.variance": "Variance",
  "config.reducer.delta": "Delta",
  "config.reducer.diff": "Difference",
  "config.reducer.diffperc": "Difference %",
  "config.reducer.step": "Step",
  "config.reducer.logmin": "Min (above zero)",
  "config.reducer.countAll": "Count all",
  "config.reducer.changeCount": "Change Count",
  "config.reducer.distinctCount": "Distinct Count",
  "config.reducer.allIsZero": "All Zeros",
  "config.reducer.allIsNull": "All Nulls",
  "config.drawStyle.lines": "Lines",
  "config.drawStyle.bars": "Bars",
  "config.drawStyle.points": "Points",
  "config.tooltip.single": "Single",
  "config.tooltip.multi": "All",
  "config.tooltip.none": "Hidden",
  "config.tooltip.sortNone": "None",
  "config.tooltip.sortAsc": "Ascending",
  "config.tooltip.sortDesc": "Descending",
  "config.axis.placement.left": "Left",
  "config.axis.placement.right": "Right",
  "config.axis.placement.hidden": "Hidden",
  "config.axis.grid.all": "All",
  "config.axis.grid.hidden": "Hidden",
  "config.axis.scale.linear": "Linear",
  "config.axis.scale.logarithmic": "Logarithmic",
  "config.gauge.fillWidth": "Active Arc Width",
  "config.gauge.trackWidth": "Track Width",
  "config.gauge.trackColor": "Track Color",
  "config.gauge.capRound": "Round Caps",
  "config.gauge.valueVisible": "Show Value",
  "config.gauge.thresholdDisplay": "Show Thresholds",
  "config.gauge.thresholdDisplayNone": "Off",
  "config.gauge.thresholdDisplayMarker": "Threshold Markers",
  "config.gauge.thresholdDisplayTrack": "Track Bands",
  "config.gauge.orientation": "Layout",
  "config.gauge.orientationAuto": "Auto Grid",
  "config.gauge.orientationHorizontal": "Horizontal",
  "config.gauge.orientationVertical": "Vertical",
  "config.gauge.valueOffsetY": "Value Y Offset",
  // Style section - gradient, nulls, points, stacking
  "config.field.gradientMode": "Gradient Mode",
  "config.gradient.none": "None",
  "config.gradient.opacity": "Opacity",
  "config.gradient.hue": "Hue",
  "config.gradient.scheme": "Scheme",
  "config.field.spanNulls": "Connect Null Values",
  "config.field.insertNulls": "Disconnect Values",
  "config.nulls.never": "Never",
  "config.nulls.always": "Always",
  "config.nulls.threshold": "Threshold",
  "config.points.auto": "Auto",
  "config.points.always": "Always",
  "config.points.never": "Never",
  "config.field.stackSeries": "Stack Series",
  "config.stack.none": "None",
  "config.stack.normal": "Normal",
  "config.stack.percent": "100%",
  // General section
  "config.field.colorSingle": "Fixed Color",
  "config.field.colorDistribution": "Color Distribution",
  "config.colorDist.sequential": "Sequential",
  "config.colorDist.distributed": "Distributed",
  "config.link.newTab": "Open in new tab",
  "config.link.add": "Add link",
  // Bar style
  "config.field.barShowValues": "Show Values",
  "config.showValues.auto": "Auto",
  "config.showValues.always": "Always",
  "config.showValues.never": "Never",
  "config.field.barGroupWidth": "Group Width",
  "config.field.barWidth": "Bar Width",
  "config.field.xTickRotation": "Rotate X Labels",
  // Stat style
  "config.field.orientation": "Orientation",
  "config.orientation.vertical": "Auto (Vertical)",
  "config.orientation.horizontal": "Horizontal",
  "config.field.textMode": "Text Mode",
  "config.textMode.valueAndName": "Value and name",
  "config.textMode.value": "Value only",
  "config.textMode.name": "Name only",
  "config.textMode.none": "None",
  "config.field.colorMode": "Color mode",
  "config.colorMode.value": "Value",
  "config.colorMode.backgroundSolid": "Background Solid",
  "config.colorMode.background": "Background Gradient",
  "config.field.percentChange": "Percent Change",
  "config.field.value": "Value",
  "config.field.unitLabel": "Unit Label",
  "config.field.trend": "Trend",
  // Histogram style
  "config.field.histBucketCount": "Bucket Count",
  "config.field.histBucketSize": "Bucket Size",
  "config.field.histBucketOffset": "Bucket Offset",
  "config.field.histCombineSeries": "Combine Series",
  "config.hist.bucketSizePlaceholder": "Auto",
  // Table style
  "config.field.tableFooterEnabled": "Footer Row",
  "config.field.tableFooterReducers": "Footer Calculation",
  "config.field.tableFooterFields": "Fields",
  "config.field.tableFooterFieldsPlaceholder": "All Numeric Fields",
  "config.section.tableColumnOverrides": "Column Overrides",
  // Axes section
  "config.field.axisName": "Name",
  "config.field.axisLabel": "Label",
  "config.field.axisWidth": "Width",
  "config.field.gridColor": "Grid Color",
  "config.field.axisLine": "Tick Labels",
  "config.field.axisLineColor": "Tick Label Color",
  "config.field.axisTickShow": "Tick Marks",
  "config.field.axisBorder": "Border",
  "config.field.axisBorderColor": "Border Color",
  "config.axis.label.placeholder": "Axis label",
  "config.axis.name.placeholder": "Axis name",
  "config.axis.grid.x": "X",
  "config.axis.grid.y": "Y",
  "config.axis.scale.symlog": "Symlog",
  // Tooltip section
  "config.field.tooltipSort": "Tooltip Sort",
  "config.field.tooltipMaxHeight": "List Max Height",
  "config.field.axisPointer": "Axis Pointer",
  // Unit options
  "config.unit.s": "Seconds (s)",
  "config.unit.bytes": "Bytes",
  "config.unit.percentunit": "Percent (0-1)",
  "config.unit.ops": "Ops/sec",
  "config.unit.bps": "Bits/sec",
  "config.unit.Bps": "Bytes/sec",
  // Gauge
  "config.gauge.arcSweep": "Arc Sweep",
  "config.gauge.paddingX": "Horizontal Padding",
  "config.gauge.paddingY": "Vertical Padding",
  "config.gauge.valueColor": "Value Color",
  "config.gauge.valueSize": "Value Size",
  "config.gauge.colorFromScheme": "Color from Scheme",
  "config.gauge.thresholdLabelDisplay": "Threshold Labels",
  "config.gauge.thresholdLabelNone": "Hidden",
  "config.gauge.thresholdLabelLabel": "Label",
  "config.gauge.thresholdLabelValue": "Value",
  "config.gauge.thresholdLabelBoth": "Label + Value",
  // Panel no data
  "panel.noData": "No data",
  // Override editor
  "config.override.addRule": "Add field override",
  "config.override.addProp": "Add override property",
  "config.override.matcher.byName": "Fields with name",
  "config.override.matcher.byType": "Fields with type",
  "config.override.matcher.byRegexp": "Fields matching regex",
  "config.override.matcher.byFrameRefID": "Fields returned by query",
  "config.override.prop.unit": "Unit",
  "config.override.prop.decimals": "Decimals",
  "config.override.prop.displayName": "Display name",
  "config.override.prop.min": "Min",
  "config.override.prop.max": "Max",
  "config.override.prop.noValue": "No value",
  "config.override.prop.filterable": "Filterable",
  "config.override.prop.thresholds": "Thresholds",
  "config.override.prop.displayMode": "Display mode",
  "config.override.prop.width": "Column width",
  "config.override.prop.align": "Alignment",
  "config.override.prop.hidden": "Hide column",
  "config.override.prop.wrapText": "Wrap text",
  "config.override.group.basic": "Standard options",
  "config.override.group.thresholds": "Thresholds",
  "config.override.group.table": "Table",
  "config.override.type.time": "Time",
  "config.override.type.number": "Number",
  "config.override.type.string": "String",
  "config.override.type.boolean": "Boolean",
  // Table column overrides
  "config.field.tableColHidden": "Hide",
  "config.field.tableColLabel": "Label",
  "config.field.tableColWidth": "Width",
  "config.field.tableColAlign": "Alignment",
  "config.field.tableColDisplayMode": "Display Mode",
  "config.field.tableColWrapText": "Wrap text",
  "config.field.tableColAddName": "Column name",
  "config.tableAlign.auto": "Auto",
  "config.tableAlign.left": "Left",
  "config.tableAlign.center": "Center",
  "config.tableAlign.right": "Right",
  "config.tableDisplayMode.auto": "Auto",
  "config.tableDisplayMode.colored-text": "Colored Text",
  "config.tableDisplayMode.colored-background": "Colored Background",
  "config.tableDisplayMode.gauge": "Gauge",
  "config.tableDisplayMode.data-links": "Data Links",
  "config.tableDisplayMode.json-view": "JSON View",
  "config.tableDisplayMode.pill": "Pill",
  // StatsPicker
  "config.reducer.group.standard": "Standard",
  "config.reducer.group.extended": "Extended",
  "config.reducer.group.boolean": "Boolean",
  "config.reducer.group.percentile": "Percentile",
  "config.reducer.choose": "Choose",
  // Pie limit
  "config.field.pieLimit": "Limit",
  // Variable datasource section
  "variable.ds.title": "Data source options",
  "variable.ds.type": "Data source type",
  "variable.ds.type.placeholder": "Select data source type",
  "variable.ds.filterRegex": "Instance filter regex",
  "variable.ds.multi": "Multi-value",
  "variable.ds.includeAll": "Include All option",
  // Editor - VizPicker
  "editor.vizPicker.title": "Visualization",
  // Editor - Overrides
  "editor.overrides.matcherValue": "Match value",
  "editor.overrides.propValue": "Property value",
  "editor.overrides.addProperty": "Add override property",
  "editor.overrides.addOverride": "Add field override",
  // Zabbix QueryEditor — query types
  "qb.queryType": "Query type",
  "qb.queryType.metrics": "Metrics",
  "qb.queryType.text": "Text",
  "qb.queryType.services": "IT Services",
  "qb.queryType.itemid": "Item ID",
  "qb.queryType.triggers": "Triggers",
  "qb.queryType.problems": "Problems",
  "qb.queryType.macros": "Macros",
  "qb.queryType.lld": "LLD",
  // Zabbix QueryEditor — host/group/item fields
  "panel.group": "Host group",
  "panel.group.placeholder": "Select host group",
  "panel.host": "Host",
  "panel.host.placeholder": "Select host",
  "panel.itemTag": "Item tag",
  "panel.itemTag.placeholder": "Filter by tag",
  "panel.items": "Items",
  "panel.items.placeholder": "Select item",
  // Zabbix QueryEditor — query fields
  "qb.textFilter": "Text filter",
  "qb.textFilter.placeholder": "Regex pattern",
  "qb.useCaptureGroups": "Use capture groups",
  "qb.itemIds": "Item IDs",
  "qb.itemIds.placeholder": "Comma-separated IDs",
  "qb.triggerFilter": "Trigger filter",
  "qb.triggerFilter.placeholder": "Trigger name",
  "qb.problemName": "Problem name",
  "qb.problemName.placeholder": "Filter by name",
  "qb.tags": "Tags",
  "qb.tags.placeholder": "tag:value",
  "qb.show": "Show",
  "qb.severity": "Severity",
  "qb.itService": "IT Service",
  "qb.itService.placeholder": "Select IT service",
  "qb.slaProperty": "SLA property",
  "qb.slaInterval": "SLA interval",
  "qb.macroFilter": "Macro filter",
  // Zabbix QueryEditor — LLD
  "qb.lld.rule": "Discovery rule",
  "qb.lld.rule.placeholder": "Select discovery rule",
  "qb.lld.itemKeys": "Item prototype keys",
  "qb.lld.itemKeys.placeholder": "Select prototype keys",
  // Zabbix QueryEditor — options
  "qb.ack.all": "All",
  "qb.ack.unack": "Unacknowledged",
  "qb.ack.ack": "Acknowledged",
  "qb.sort.default": "Default",
  "qb.sort.lastchange": "Last change",
  "qb.sort.severity": "Severity",
  "qb.trends.default": "Default",
  "qb.trends.true": "Use trends",
  "qb.trends.false": "No trends",
  "qb.options.trends": "Trends",
  "qb.options.showDisabled": "Show disabled",
  "qb.options.valueMapping": "Use value mapping",
  "qb.options.disableAlignment": "Disable alignment",
  "qb.options.acknowledged": "Acknowledged",
  "qb.options.sortBy": "Sort by",
  "qb.options.useTimeRange": "Use time range",
  "qb.options.hostsInMaintenance": "Hosts in maintenance",
  "qb.options.hostProxy": "Host proxy",
  "qb.options.limit": "Limit"
}, ZP = {
  "panel.noData": "暂无数据",
  "common.auto": "自动",
  "common.all": "全部",
  "app.tab.dashboard": "仪表盘",
  "app.tab.scene": "场景视图",
  "app.tab.topology": "拓扑",
  "app.tab.logs": "日志",
  "app.tab.traces": "链路追踪",
  "app.tab.querybuilder": "查询构建器",
  "app.tab.grafana": "Grafana 数据",
  "app.tab.zabbix": "Zabbix",
  "app.theme.toDark": "切换深色",
  "app.theme.toLight": "切换浅色",
  "time.last1h": "最近 1 小时",
  "time.last3h": "最近 3 小时",
  "time.last6h": "最近 6 小时",
  "time.last24h": "最近 24 小时",
  "time.last7d": "最近 7 天",
  "time.last30d": "最近 30 天",
  "panel.menu.edit": "编辑",
  "panel.menu.clone": "克隆",
  "panel.menu.fullscreen": "全屏",
  "panel.menu.refresh": "刷新",
  "panel.menu.remove": "删除",
  "panel.remove.title": '删除 "{title}"？',
  "panel.remove.content": "此操作不可撤销。",
  "panel.remove.ok": "删除",
  "dashboard.edit": "编辑",
  "dashboard.save": "保存",
  "dashboard.cancel": "取消",
  "dashboard.cancelConfirmTitle": "放弃未保存的更改？",
  "dashboard.cancelConfirmOk": "放弃更改",
  "dashboard.cancelConfirmCancel": "继续编辑",
  "dashboard.addPanel": "添加面板",
  "dashboard.clearPanels": "清空面板",
  "dashboard.clearConfirmTitle": "清空所有面板？",
  "dashboard.clearConfirmOk": "确认清空",
  "dashboard.export": "导出",
  "dashboard.import": "导入",
  "dashboard.exportSuccess": "仪表盘已导出",
  "dashboard.importSuccess": "仪表盘已导入",
  "dashboard.importError": "无效的仪表盘 JSON",
  "config.section.general": "基本信息",
  "config.section.value": "数据设置",
  "config.section.style": "图形样式",
  "config.section.tooltip": "悬浮提示窗",
  "config.section.format": "格式化",
  "config.section.thresholds": "阈值 ({n})",
  "config.section.axes": "坐标轴",
  "config.section.links": "链接 ({n})",
  "config.section.gaugeStyle": "图形样式",
  "config.section.pieStyle": "饼图样式",
  "config.section.histStyle": "直方图样式",
  "config.section.tableStyle": "表格样式",
  "config.section.overrides": "字段覆盖",
  "config.type.timeseries": "时序图",
  "config.type.bar": "柱状图",
  "config.type.histogram": "直方图",
  "config.type.stat": "统计值",
  "config.type.gauge": "仪表盘",
  "config.type.table": "表格",
  "config.type.pie": "饼图",
  "panel.type.desc.timeseries": "带时间轴的折线/面积图",
  "panel.type.desc.bar": "分组或堆叠柱状图",
  "panel.type.desc.histogram": "数值分布直方图",
  "panel.type.desc.stat": "单值统计 + 迷你图",
  "panel.type.desc.gauge": "圆弧仪表盘",
  "panel.type.desc.table": "可排序数据表格",
  "panel.type.desc.pie": "饼图 / 环形图",
  "config.field.title": "标题",
  "config.field.description": "描述",
  "config.field.panelType": "面板类型",
  "config.field.colorScheme": "配色方案",
  "config.field.lineWidth": "线宽",
  "config.field.fillOpacity": "填充透明度",
  "config.field.drawStyle": "图形样式",
  "config.field.interpolation": "插值方式",
  "config.field.lineStyle": "线条样式",
  "config.field.showPoints": "显示数据点",
  "config.field.legendPosition": "图例位置",
  "config.field.unit": "单位",
  "config.field.decimals": "小数位数",
  "config.field.min": "最小值",
  "config.field.max": "最大值",
  "config.field.reducer": "计算方式",
  "config.field.tooltipMode": "浮窗触发模式",
  "config.field.softMin": "软最小值",
  "config.field.softMax": "软最大值",
  "config.field.logScale": "对数刻度",
  "config.field.axisPlacement": "轴位置",
  "config.field.showGridLines": "网格线",
  "config.field.scaleDistribution": "刻度类型",
  "config.field.centeredZero": "零点居中",
  "config.field.stacked": "堆叠",
  "config.interp.linear": "线性",
  "config.interp.smooth": "平滑",
  "config.interp.step": "阶梯",
  "config.linestyle.solid": "实线",
  "config.linestyle.dashed": "虚线",
  "config.linestyle.dotted": "点线",
  "config.legend.bottom": "底部",
  "config.legend.right": "右侧",
  "config.legend.hidden": "隐藏",
  "config.unit.none": "无",
  "config.unit.ms": "毫秒 (ms)",
  "config.unit.percent": "百分比 (0-100)",
  "config.unit.reqps": "请求/秒",
  "config.threshold.label": "标签",
  "config.threshold.base": "基础色",
  "config.threshold.add": "添加阈值",
  "config.threshold.mode": "阈值模式",
  "config.threshold.modeAbsolute": "绝对值",
  "config.threshold.modePercentage": "百分比",
  "dashboard.refresh": "刷新",
  "dashboard.empty": "暂无面板",
  "dashboard.emptyHint": '点击"编辑"后选择"添加面板"开始',
  "variable.modal.placeholder": '点击左侧"新增变量"开始配置',
  "variable.custom.title": "自定义选项",
  "variable.custom.add": "添加选项",
  "variable.custom.allValue": "全部值",
  "variable.custom.allValue.placeholder": "自定义全选值",
  "variable.custom.col.text": "显示文本",
  "variable.custom.col.value": "值",
  "variable.custom.text.placeholder": "显示文本",
  "variable.custom.value.placeholder": "值",
  "variable.custom.addOption": "添加选项",
  "variable.custom.allowCustomValue": "允许输入自定义值",
  "variable.custom.allowClear": "允许清空",
  "variable.custom.multi": "多选",
  "variable.custom.includeAll": "包含全选项",
  "variable.general.label.placeholder": "显示标签",
  "variable.general.description": "描述",
  "variable.general.description.placeholder": "变量描述",
  "variable.general.name.required": "名称不能为空",
  "variable.general.type.required": "请选择类型",
  "variable.general.showOn": "显示方式",
  "variable.general.showOn.labelAndValue": "标签和值",
  "variable.general.showOn.value": "仅值",
  "variable.general.showOn.nothing": "不显示",
  "variable.textbox.title": "文本框选项",
  "variable.textbox.default": "默认值",
  "variable.textbox.default.placeholder": "默认值",
  "variable.textbox.width": "输入框宽度",
  "variable.constant.title": "常量选项",
  "variable.constant.value": "值",
  "variable.constant.value.required": "值不能为空",
  "variable.constant.value.notNumber": "请输入有效数字",
  "variable.constant.valueType": "值类型",
  "variable.constant.valueType.string": "字符串",
  "variable.constant.valueType.number": "数字",
  "variable.constant.hideFromList": "从变量列表隐藏",
  "variable.query.dsUid": "数据源 UID",
  "variable.query.dsUid.placeholder": "输入数据源 UID",
  "variable.query.queryType": "查询类型",
  "variable.query.queryType.placeholder": "选择查询类型",
  "variable.query.queryType.group": "主机组",
  "variable.query.queryType.host": "主机",
  "variable.query.queryType.item": "监控项",
  "variable.query.queryType.labelValues": "标签值",
  "variable.query.query": "查询语句",
  "variable.query.query.placeholder": "查询表达式",
  "variable.query.regex": "提取正则",
  "variable.query.regex.placeholder": "/regex/",
  "variable.query.sort": "排序",
  "variable.query.sort.disabled": "禁用",
  "variable.query.sort.alphabetical": "字母顺序",
  "variable.query.sort.numeric": "数字顺序",
  "variable.query.preview": "预览结果",
  "variable.query.preview.placeholder": "（保存后刷新预览）",
  "config.scheme.grafana-classic": "Grafana 经典",
  "config.scheme.green-yellow-red": "绿黄红",
  "config.scheme.red-yellow-green": "红黄绿",
  "config.scheme.blue-yellow-red": "蓝黄红",
  "config.scheme.blue-purple": "蓝紫",
  "config.scheme.yellow-blue": "黄蓝",
  "config.scheme.blues": "蓝色系",
  "config.scheme.reds": "红色系",
  "config.scheme.GrYlRd": "GrYlRd",
  "config.scheme.purple-orange": "紫橙",
  "variable.modal.title": "变量配置",
  "variable.modal.save": "保存",
  "variable.modal.cancel": "取消",
  "variable.modal.delete": "删除变量",
  "variable.modal.add": "新增变量",
  "variable.modal.empty": '点击左侧"新增变量"开始配置',
  "variable.nav.count": "变量 ({n})",
  "variable.nav.unnamed": "(未命名)",
  "variable.general.title": "基本信息",
  "variable.general.type": "类型",
  "variable.general.name": "名称",
  "variable.general.label": "标签",
  "variable.type.custom": "自定义",
  "variable.type.query": "查询",
  "variable.type.textbox": "文本框",
  "variable.type.datasource": "数据源",
  "variable.type.constant": "常量",
  "variable.query.title": "查询选项",
  "variable.query.multi": "多选",
  "variable.query.includeAll": "包含全选项",
  "variable.query.refresh": "刷新时机",
  "variable.query.refresh.onLoad": "仪表盘加载时",
  "variable.query.refresh.onTimeChange": "时间范围变化时",
  "qb.datasource": "数据源",
  "qb.addQuery": "添加查询",
  "qb.queryOptions": "查询选项",
  "qb.pattern": "数据模式",
  "qb.pattern.sine": "正弦波",
  "qb.pattern.spike": "尖峰",
  "qb.pattern.step": "阶梯",
  "qb.pattern.sawtooth": "锯齿波",
  "qb.pattern.noise": "随机噪声",
  "qb.pattern.trendUp": "上升趋势",
  "qb.pattern.trendDown": "下降趋势",
  "qb.pattern.plateau": "平台",
  "qb.pattern.randomWalk": "随机游走",
  "qb.pattern.live": "实时",
  "qb.seriesCount": "序列数量",
  "qb.liveAmplitude": "振幅",
  "qb.functions": "函数",
  "qb.functions.add": "添加",
  "qb.options": "选项",
  "qb.queryOptions.maxDataPoints": "最大数据点数",
  "qb.queryOptions.minInterval": "最小间隔",
  "qb.queryOptions.minIntervalPlaceholder": "不限制",
  "qb.queryOptions.interval": "间隔",
  "qb.queryOptions.intervalHint": "时间范围 / 最大数据点数",
  "qb.queryOptions.relativeTime": "相对时间",
  "qb.queryOptions.timeShift": "时间偏移",
  "config.scheme.classic": "经典配色",
  "config.scheme.tableau10": "Tableau配色",
  "config.scheme.fixed": "单色",
  "config.scheme.thresholds": "来自阈值",
  "config.trend.up": "上升 ↑",
  "config.trend.down": "下降 ↓",
  "config.trend.flat": "持平",
  "config.field.pieType": "饼图类型",
  "config.field.pieSliceSorting": "扇区排序",
  "config.pieType.pie": "实心饼",
  "config.pieType.donut": "环形图",
  "config.sort.desc": "降序",
  "config.sort.asc": "升序",
  "config.sort.none": "不排序",
  "config.field.pieLabels": "扇区标签",
  "config.pieLabel.name": "名称",
  "config.pieLabel.percent": "百分比",
  "config.pieLabel.value": "数值",
  "config.field.pieShow": "数据聚合",
  "config.pieShow.calculate": "聚合（Reducer）",
  "config.pieShow.all": "全部值",
  "config.field.legendMode": "图例模式",
  "config.legendMode.list": "列表",
  "config.legendMode.table": "表格",
  "config.field.legendValues": "图例统计值",
  "config.legendValue.min": "最小值",
  "config.legendValue.max": "最大值",
  "config.legendValue.mean": "平均值",
  "config.legendValue.sum": "求和",
  "config.legendValue.last": "最后值",
  "config.legendValue.first": "第一个值",
  "tooltip.pinned": "已固定",
  "tooltip.datetimeFormat": "YYYY-MM-DD HH:mm:ss",
  "config.reducer.lastNotNull": "最后非空值",
  "config.reducer.last": "最后值",
  "config.reducer.firstNotNull": "第一个非空值",
  "config.reducer.first": "第一个值",
  "config.reducer.min": "最小值",
  "config.reducer.max": "最大值",
  "config.reducer.mean": "平均值",
  "config.reducer.sum": "求和",
  "config.reducer.count": "计数",
  "config.reducer.range": "范围",
  "config.reducer.median": "中位数",
  "config.reducer.stdDev": "标准差",
  "config.reducer.variance": "方差",
  "config.reducer.delta": "增量",
  "config.reducer.diff": "差值",
  "config.reducer.diffperc": "差值 %",
  "config.reducer.step": "步长",
  "config.reducer.logmin": "最小正值",
  "config.reducer.countAll": "总计数",
  "config.reducer.changeCount": "变化次数",
  "config.reducer.distinctCount": "唯一值数",
  "config.reducer.allIsZero": "全为零",
  "config.reducer.allIsNull": "全为空",
  "config.drawStyle.lines": "折线",
  "config.drawStyle.bars": "柱状",
  "config.drawStyle.points": "散点",
  "config.tooltip.single": "单系列",
  "config.tooltip.multi": "全部",
  "config.tooltip.none": "隐藏",
  "config.tooltip.sortNone": "默认",
  "config.tooltip.sortAsc": "升序",
  "config.tooltip.sortDesc": "降序",
  "config.axis.placement.left": "左侧",
  "config.axis.placement.right": "右侧",
  "config.axis.placement.hidden": "隐藏",
  "config.axis.grid.all": "开启",
  "config.axis.grid.hidden": "隐藏",
  "config.axis.scale.linear": "线性",
  "config.axis.scale.logarithmic": "对数",
  "config.gauge.fillWidth": "激活弧宽度",
  "config.gauge.trackWidth": "轨道宽度",
  "config.gauge.trackColor": "轨道背景色",
  "config.gauge.capRound": "圆角",
  "config.gauge.valueVisible": "显示数值",
  "config.gauge.thresholdDisplay": "显示阈值方式",
  "config.gauge.thresholdDisplayNone": "不显示",
  "config.gauge.thresholdDisplayMarker": "阈值标记条",
  "config.gauge.thresholdDisplayTrack": "轨道阈值条",
  "config.gauge.orientation": "排列方式",
  "config.gauge.orientationAuto": "自动网格",
  "config.gauge.orientationHorizontal": "水平排列",
  "config.gauge.orientationVertical": "垂直排列",
  "config.gauge.valueOffsetY": "数值 Y 偏移",
  // Style section - gradient, nulls, points, stacking
  "config.field.gradientMode": "渐变模式",
  "config.gradient.none": "无",
  "config.gradient.opacity": "透明度",
  "config.gradient.hue": "色相",
  "config.gradient.scheme": "配色",
  "config.field.spanNulls": "连接空值",
  "config.field.insertNulls": "断开空值",
  "config.nulls.never": "从不",
  "config.nulls.always": "始终",
  "config.nulls.threshold": "阈值",
  "config.points.auto": "自动",
  "config.points.always": "始终",
  "config.points.never": "从不",
  "config.field.stackSeries": "堆叠序列",
  "config.stack.none": "无",
  "config.stack.normal": "普通",
  "config.stack.percent": "100%",
  // General section
  "config.field.colorSingle": "固定颜色",
  "config.field.colorDistribution": "颜色分布",
  "config.colorDist.sequential": "顺序",
  "config.colorDist.distributed": "分散",
  "config.link.newTab": "新标签页打开",
  "config.link.add": "添加链接",
  // Bar style
  "config.field.barShowValues": "显示数值",
  "config.showValues.auto": "自动",
  "config.showValues.always": "始终",
  "config.showValues.never": "从不",
  "config.field.barGroupWidth": "组宽度",
  "config.field.barWidth": "柱宽",
  "config.field.xTickRotation": "旋转 X 标签",
  // Stat style
  "config.field.orientation": "方向",
  "config.orientation.vertical": "自动（垂直）",
  "config.orientation.horizontal": "水平",
  "config.field.textMode": "文本模式",
  "config.textMode.valueAndName": "数值和名称",
  "config.textMode.value": "仅数值",
  "config.textMode.name": "仅名称",
  "config.textMode.none": "无",
  "config.field.colorMode": "颜色模式",
  "config.colorMode.value": "数值",
  "config.colorMode.backgroundSolid": "纯色背景",
  "config.colorMode.background": "渐变背景",
  "config.field.percentChange": "百分比变化",
  "config.field.value": "数值",
  "config.field.unitLabel": "单位标签",
  "config.field.trend": "趋势",
  // Histogram style
  "config.field.histBucketCount": "分桶数",
  "config.field.histBucketSize": "桶大小",
  "config.field.histBucketOffset": "桶偏移",
  "config.field.histCombineSeries": "合并序列",
  "config.hist.bucketSizePlaceholder": "自动",
  // Table style
  "config.field.tableFooterEnabled": "底栏行",
  "config.field.tableFooterReducers": "底栏计算",
  "config.field.tableFooterFields": "字段",
  "config.field.tableFooterFieldsPlaceholder": "所有数值字段",
  "config.section.tableColumnOverrides": "列覆盖",
  // Axes section
  "config.field.axisName": "名称",
  "config.field.axisLabel": "标签",
  "config.field.axisWidth": "宽度",
  "config.field.gridColor": "网格颜色",
  "config.field.axisLine": "刻度标签",
  "config.field.axisLineColor": "刻度标签颜色",
  "config.field.axisTickShow": "刻度线",
  "config.field.axisBorder": "边框",
  "config.field.axisBorderColor": "边框颜色",
  "config.axis.label.placeholder": "坐标轴标签",
  "config.axis.name.placeholder": "坐标轴名称",
  "config.axis.grid.x": "X",
  "config.axis.grid.y": "Y",
  "config.axis.scale.symlog": "对称对数",
  // Tooltip section
  "config.field.tooltipSort": "浮窗排序",
  "config.field.tooltipMaxHeight": "列表最大高度",
  "config.field.axisPointer": "坐标轴指针",
  // Unit options
  "config.unit.s": "秒 (s)",
  "config.unit.bytes": "字节",
  "config.unit.percentunit": "百分比 (0-1)",
  "config.unit.ops": "操作/秒",
  "config.unit.bps": "比特/秒",
  "config.unit.Bps": "字节/秒",
  // Gauge
  "config.gauge.arcSweep": "弧度",
  "config.gauge.paddingX": "水平内边距",
  "config.gauge.paddingY": "垂直内边距",
  "config.gauge.valueColor": "数值颜色",
  "config.gauge.valueSize": "数值大小",
  "config.gauge.colorFromScheme": "来自配色方案",
  "config.gauge.thresholdLabelDisplay": "阈值标签",
  "config.gauge.thresholdLabelNone": "隐藏",
  "config.gauge.thresholdLabelLabel": "标签",
  "config.gauge.thresholdLabelValue": "数值",
  "config.gauge.thresholdLabelBoth": "标签 + 数值",
  // Override editor
  "config.override.addRule": "添加字段覆盖",
  "config.override.addProp": "添加覆盖属性",
  "config.override.matcher.byName": "按名称匹配字段",
  "config.override.matcher.byType": "按类型匹配字段",
  "config.override.matcher.byRegexp": "按正则匹配字段",
  "config.override.matcher.byFrameRefID": "按查询返回匹配",
  "config.override.prop.unit": "单位",
  "config.override.prop.decimals": "小数位",
  "config.override.prop.displayName": "显示名称",
  "config.override.prop.min": "最小值",
  "config.override.prop.max": "最大值",
  "config.override.prop.noValue": "无数据文本",
  "config.override.prop.filterable": "可筛选",
  "config.override.prop.thresholds": "阈值",
  "config.override.prop.displayMode": "显示模式",
  "config.override.prop.width": "列宽",
  "config.override.prop.align": "对齐",
  "config.override.prop.hidden": "隐藏列",
  "config.override.prop.wrapText": "自动换行",
  "config.override.group.basic": "标准选项",
  "config.override.group.thresholds": "阈值",
  "config.override.group.table": "表格",
  "config.override.type.time": "时间",
  "config.override.type.number": "数值",
  "config.override.type.string": "字符串",
  "config.override.type.boolean": "布尔",
  // Table column overrides
  "config.field.tableColHidden": "隐藏",
  "config.field.tableColLabel": "标签",
  "config.field.tableColWidth": "宽度",
  "config.field.tableColAlign": "对齐",
  "config.field.tableColDisplayMode": "显示模式",
  "config.field.tableColWrapText": "自动换行",
  "config.field.tableColAddName": "列名",
  "config.tableAlign.auto": "自动",
  "config.tableAlign.left": "左对齐",
  "config.tableAlign.center": "居中",
  "config.tableAlign.right": "右对齐",
  "config.tableDisplayMode.auto": "自动",
  "config.tableDisplayMode.colored-text": "彩色文字",
  "config.tableDisplayMode.colored-background": "彩色背景",
  "config.tableDisplayMode.gauge": "仪表盘",
  "config.tableDisplayMode.data-links": "数据链接",
  "config.tableDisplayMode.json-view": "JSON 视图",
  "config.tableDisplayMode.pill": "标签",
  // StatsPicker
  "config.reducer.group.standard": "标准",
  "config.reducer.group.extended": "扩展",
  "config.reducer.group.boolean": "布尔",
  "config.reducer.group.percentile": "百分位",
  "config.reducer.choose": "选择",
  // Pie limit
  "config.field.pieLimit": "数量限制",
  // Variable datasource section
  "variable.ds.title": "数据源选项",
  "variable.ds.type": "数据源类型",
  "variable.ds.type.placeholder": "选择数据源类型",
  "variable.ds.filterRegex": "实例过滤正则",
  "variable.ds.multi": "多选",
  "variable.ds.includeAll": "包含全选项",
  // Editor - VizPicker
  "editor.vizPicker.title": "可视化类型",
  // Editor - Overrides
  "editor.overrides.matcherValue": "匹配值",
  "editor.overrides.propValue": "属性值",
  "editor.overrides.addProperty": "添加属性覆盖",
  "editor.overrides.addOverride": "添加字段覆盖",
  // Zabbix QueryEditor — query types
  "qb.queryType": "查询类型",
  "qb.queryType.metrics": "指标",
  "qb.queryType.text": "文本",
  "qb.queryType.services": "IT服务",
  "qb.queryType.itemid": "监控项ID",
  "qb.queryType.triggers": "触发器",
  "qb.queryType.problems": "告警",
  "qb.queryType.macros": "宏变量",
  "qb.queryType.lld": "自动发现",
  // Zabbix QueryEditor — host/group/item fields
  "panel.group": "主机组",
  "panel.group.placeholder": "选择主机组",
  "panel.host": "主机",
  "panel.host.placeholder": "选择主机",
  "panel.itemTag": "监控项标签",
  "panel.itemTag.placeholder": "按标签过滤",
  "panel.items": "监控项",
  "panel.items.placeholder": "选择监控项",
  // Zabbix QueryEditor — query fields
  "qb.textFilter": "文本过滤",
  "qb.textFilter.placeholder": "正则表达式",
  "qb.useCaptureGroups": "使用捕获分组",
  "qb.itemIds": "监控项 ID",
  "qb.itemIds.placeholder": "多个 ID 用逗号分隔",
  "qb.triggerFilter": "触发器过滤",
  "qb.triggerFilter.placeholder": "触发器名称",
  "qb.problemName": "告警名称",
  "qb.problemName.placeholder": "告警名称过滤",
  "qb.tags": "标签",
  "qb.tags.placeholder": "tag:value",
  "qb.show": "显示",
  "qb.severity": "严重程度",
  "qb.itService": "IT服务",
  "qb.itService.placeholder": "选择IT服务",
  "qb.slaProperty": "SLA属性",
  "qb.slaInterval": "SLA时间间隔",
  "qb.macroFilter": "宏过滤",
  // Zabbix QueryEditor — LLD
  "qb.lld.rule": "发现规则",
  "qb.lld.rule.placeholder": "选择发现规则",
  "qb.lld.itemKeys": "监控项原型键",
  "qb.lld.itemKeys.placeholder": "选择原型键",
  // Zabbix QueryEditor — options
  "qb.ack.all": "所有",
  "qb.ack.unack": "未确认",
  "qb.ack.ack": "已确认",
  "qb.sort.default": "默认",
  "qb.sort.lastchange": "最后变更",
  "qb.sort.severity": "严重程度",
  "qb.trends.default": "默认",
  "qb.trends.true": "使用趋势",
  "qb.trends.false": "不使用趋势",
  "qb.options.trends": "趋势数据",
  "qb.options.showDisabled": "显示禁用项",
  "qb.options.valueMapping": "使用 Zabbix 值映射",
  "qb.options.disableAlignment": "禁用数据对齐",
  "qb.options.acknowledged": "确认状态",
  "qb.options.sortBy": "排序",
  "qb.options.useTimeRange": "使用时间范围",
  "qb.options.hostsInMaintenance": "维护中主机",
  "qb.options.hostProxy": "Host Proxy",
  "qb.options.limit": "数量限制"
}, rD = { zh: ZP, en: oD }, JP = Symbol("lang");
function iD(e) {
  Ft(JP, e);
}
function sn() {
  const e = zt(JP, ce("zh"));
  function t(n, o) {
    let i = rD[e.value][n] ?? ZP[n] ?? n;
    if (o)
      for (const [a, l] of Object.entries(o))
        i = i.replace(`{${a}}`, String(l));
    return i;
  }
  return { t, lang: e };
}
const aD = {
  hideHeader: !1,
  canEdit: !0,
  theme: null,
  lang: null,
  isEditing: null,
  initialEditingPanelId: null,
  datasourceConfig: null
}, eO = Symbol("argusBoardConfig");
function tO(e) {
  return { config: zE(E(e)) };
}
function lD(e) {
  const t = tO(e);
  return Ft(eO, t), t;
}
function nc() {
  const e = zt(eO);
  return e || tO(() => aD);
}
async function sD(e) {
  const t = await fetch(`${e.url}/v5/metrics`, {
    method: "GET",
    headers: {
      "Content-Type": "application/json",
      ...e.token ? { Authorization: `Bearer ${e.token}` } : {}
    }
  });
  if (!t.ok)
    throw new Error(`Argus API HTTP error: ${t.status}`);
  return (await t.json()).data?.metrics ?? [];
}
async function uD(e, t) {
  const n = new URLSearchParams({ signal: t.signal });
  t.metricName && n.set("metricName", t.metricName), t.search && n.set("search", t.search);
  const o = await fetch(`${e.url}/v5/attribute_keys?${n.toString()}`, {
    method: "GET",
    headers: {
      "Content-Type": "application/json",
      ...e.token ? { Authorization: `Bearer ${e.token}` } : {}
    }
  });
  if (!o.ok)
    throw new Error(`Argus API HTTP error: ${o.status}`);
  return (await o.json()).data?.attributeKeys ?? [];
}
function cD(e, t) {
  if (e.type === "builder_formula") {
    const { name: i, expression: a, disabled: l, legend: s, limit: u, order: c } = e.spec;
    return {
      type: e.type,
      spec: {
        name: i,
        expression: a,
        disabled: l,
        ...s ? { legend: s } : {},
        ...u != null ? { limit: u } : {},
        ...c && c.length > 0 ? { order: c } : {}
      }
    };
  }
  if (e.queryType === "promql")
    return {
      type: "promql",
      spec: {
        name: e.spec.name,
        query: e.rawQuery ?? "",
        disabled: e.spec.disabled,
        ...e.rawLegend ? { legend: e.rawLegend } : {},
        stats: !1
      }
    };
  if (e.queryType === "clickhouse_sql")
    return {
      type: "clickhouse_sql",
      spec: {
        name: e.spec.name,
        query: e.rawQuery ?? "",
        disabled: e.spec.disabled,
        ...e.rawLegend ? { legend: e.rawLegend } : {}
      }
    };
  const n = e.spec, o = n.signal === "metrics", r = n.aggregations.map((i) => {
    if (o && "metricName" in i) {
      const a = t.get(i.metricName);
      return { ...Object.fromEntries(Object.entries(i).filter(([s]) => s !== "metricType")), temporality: a?.temporality ?? "" };
    }
    return i;
  });
  return {
    type: e.type,
    spec: {
      name: n.name,
      signal: n.signal,
      ...n.source !== null && n.source !== void 0 ? { source: n.source } : {},
      stepInterval: n.stepInterval,
      disabled: n.disabled,
      filter: n.filter,
      aggregations: r,
      ...n.groupBy && n.groupBy.length > 0 ? { groupBy: n.groupBy } : {},
      ...n.having?.expression ? { having: n.having } : {},
      ...n.order && n.order.length > 0 ? { order: n.order } : {},
      ...n.functions && n.functions.length > 0 ? { functions: n.functions } : {},
      ...n.limit !== null && n.limit !== void 0 ? { limit: n.limit } : {},
      ...n.legend ? { legend: n.legend } : {}
    }
  };
}
async function kfe(e, t, n, o, r) {
  const i = e.filter((f) => !f.spec.disabled);
  if (i.length === 0)
    return { data: { results: [] } };
  const a = r ?? /* @__PURE__ */ new Map(), l = t * 1e3, s = n * 1e3, u = {
    schemaVersion: "v1",
    start: l,
    end: s,
    requestType: "time_series",
    compositeQuery: {
      queries: i.map((f) => cD(f, a))
    },
    formatOptions: { formatTableResultForUI: !1, fillGaps: !1 },
    variables: {
      SIGNOZ_START_TIME: { value: l },
      SIGNOZ_END_TIME: { value: s }
    }
  }, c = await fetch(`${o.url}/v5/query_range`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      ...o.token ? { Authorization: `Bearer ${o.token}` } : {}
    },
    body: JSON.stringify(u)
  });
  if (!c.ok)
    throw new Error(`Argus API HTTP error: ${c.status}`);
  const d = await c.json();
  if (d.error)
    throw new Error(`Argus API error: ${d.error}`);
  return d;
}
//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var nO;
function mt() {
  return nO.apply(null, arguments);
}
function dD(e) {
  nO = e;
}
function ki(e) {
  return e instanceof Array || Object.prototype.toString.call(e) === "[object Array]";
}
function xs(e) {
  return e != null && Object.prototype.toString.call(e) === "[object Object]";
}
function Tn(e, t) {
  return Object.prototype.hasOwnProperty.call(e, t);
}
function uy(e) {
  if (Object.getOwnPropertyNames)
    return Object.getOwnPropertyNames(e).length === 0;
  var t;
  for (t in e)
    if (Tn(e, t))
      return !1;
  return !0;
}
function gr(e) {
  return e === void 0;
}
function za(e) {
  return typeof e == "number" || Object.prototype.toString.call(e) === "[object Number]";
}
function Pd(e) {
  return e instanceof Date || Object.prototype.toString.call(e) === "[object Date]";
}
function oO(e, t) {
  var n = [], o, r = e.length;
  for (o = 0; o < r; ++o)
    n.push(t(e[o], o));
  return n;
}
function wl(e, t) {
  for (var n in t)
    Tn(t, n) && (e[n] = t[n]);
  return Tn(t, "toString") && (e.toString = t.toString), Tn(t, "valueOf") && (e.valueOf = t.valueOf), e;
}
function ta(e, t, n, o) {
  return OO(e, t, n, o, !0).utc();
}
function fD() {
  return {
    empty: !1,
    unusedTokens: [],
    unusedInput: [],
    overflow: -2,
    charsLeftOver: 0,
    nullInput: !1,
    invalidEra: null,
    invalidMonth: null,
    invalidFormat: !1,
    userInvalidated: !1,
    iso: !1,
    parsedDateParts: [],
    era: null,
    meridiem: null,
    rfc2822: !1,
    weekdayMismatch: !1
  };
}
function nn(e) {
  return e._pf == null && (e._pf = fD()), e._pf;
}
var rm;
Array.prototype.some ? rm = Array.prototype.some : rm = function(e) {
  var t = Object(this), n = t.length >>> 0, o;
  for (o = 0; o < n; o++)
    if (o in t && e.call(this, t[o], o, t))
      return !0;
  return !1;
};
function cy(e) {
  var t = null, n = !1, o = e._d && !isNaN(e._d.getTime());
  if (o && (t = nn(e), n = rm.call(t.parsedDateParts, function(r) {
    return r != null;
  }), o = t.overflow < 0 && !t.empty && !t.invalidEra && !t.invalidMonth && !t.invalidWeekday && !t.weekdayMismatch && !t.nullInput && !t.invalidFormat && !t.userInvalidated && (!t.meridiem || t.meridiem && n), e._strict && (o = o && t.charsLeftOver === 0 && t.unusedTokens.length === 0 && t.bigHour === void 0)), Object.isFrozen == null || !Object.isFrozen(e))
    e._isValid = o;
  else
    return o;
  return e._isValid;
}
function oh(e) {
  var t = ta(NaN);
  return e != null ? wl(nn(t), e) : nn(t).userInvalidated = !0, t;
}
var Ux = mt.momentProperties = [], Cg = !1;
function dy(e, t) {
  var n, o, r, i = Ux.length;
  if (gr(t._isAMomentObject) || (e._isAMomentObject = t._isAMomentObject), gr(t._i) || (e._i = t._i), gr(t._f) || (e._f = t._f), gr(t._l) || (e._l = t._l), gr(t._strict) || (e._strict = t._strict), gr(t._tzm) || (e._tzm = t._tzm), gr(t._isUTC) || (e._isUTC = t._isUTC), gr(t._offset) || (e._offset = t._offset), gr(t._pf) || (e._pf = nn(t)), gr(t._locale) || (e._locale = t._locale), i > 0)
    for (n = 0; n < i; n++)
      o = Ux[n], r = t[o], gr(r) || (e[o] = r);
  return e;
}
function Od(e) {
  dy(this, e), this._d = new Date(e._d != null ? e._d.getTime() : NaN), this.isValid() || (this._d = /* @__PURE__ */ new Date(NaN)), Cg === !1 && (Cg = !0, mt.updateOffset(this), Cg = !1);
}
function Ii(e) {
  return e instanceof Od || e != null && e._isAMomentObject != null;
}
function rO(e) {
  mt.suppressDeprecationWarnings === !1 && typeof console < "u" && console.warn && console.warn("Deprecation warning: " + e);
}
function oi(e, t) {
  var n = !0;
  return wl(function() {
    if (mt.deprecationHandler != null && mt.deprecationHandler(null, e), n) {
      var o = [], r, i, a, l = arguments.length;
      for (i = 0; i < l; i++) {
        if (r = "", typeof arguments[i] == "object") {
          r += `
[` + i + "] ";
          for (a in arguments[0])
            Tn(arguments[0], a) && (r += a + ": " + arguments[0][a] + ", ");
          r = r.slice(0, -2);
        } else
          r = arguments[i];
        o.push(r);
      }
      rO(
        e + `
Arguments: ` + Array.prototype.slice.call(o).join("") + `
` + new Error().stack
      ), n = !1;
    }
    return t.apply(this, arguments);
  }, t);
}
var Xx = {};
function iO(e, t) {
  mt.deprecationHandler != null && mt.deprecationHandler(e, t), Xx[e] || (rO(t), Xx[e] = !0);
}
mt.suppressDeprecationWarnings = !1;
mt.deprecationHandler = null;
function na(e) {
  return typeof Function < "u" && e instanceof Function || Object.prototype.toString.call(e) === "[object Function]";
}
function pD(e) {
  var t, n;
  for (n in e)
    Tn(e, n) && (t = e[n], na(t) ? this[n] = t : this["_" + n] = t);
  this._config = e, this._dayOfMonthOrdinalParseLenient = new RegExp(
    (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source
  );
}
function im(e, t) {
  var n = wl({}, e), o;
  for (o in t)
    Tn(t, o) && (xs(e[o]) && xs(t[o]) ? (n[o] = {}, wl(n[o], e[o]), wl(n[o], t[o])) : t[o] != null ? n[o] = t[o] : delete n[o]);
  for (o in e)
    Tn(e, o) && !Tn(t, o) && xs(e[o]) && (n[o] = wl({}, n[o]));
  return n;
}
function fy(e) {
  e != null && this.set(e);
}
var am;
Object.keys ? am = Object.keys : am = function(e) {
  var t, n = [];
  for (t in e)
    Tn(e, t) && n.push(t);
  return n;
};
var hD = {
  sameDay: "[Today at] LT",
  nextDay: "[Tomorrow at] LT",
  nextWeek: "dddd [at] LT",
  lastDay: "[Yesterday at] LT",
  lastWeek: "[Last] dddd [at] LT",
  sameElse: "L"
};
function gD(e, t, n) {
  var o = this._calendar[e] || this._calendar.sameElse;
  return na(o) ? o.call(t, n) : o;
}
function Zi(e, t, n) {
  var o = "" + Math.abs(e), r = t - o.length, i = e >= 0;
  return (i ? n ? "+" : "" : "-") + Math.pow(10, Math.max(0, r)).toString().substr(1) + o;
}
var py = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, af = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, $g = {}, Cu = {};
function Ht(e, t, n, o) {
  var r = o;
  typeof o == "string" && (r = function() {
    return this[o]();
  }), e && (Cu[e] = r), t && (Cu[t[0]] = function() {
    return Zi(r.apply(this, arguments), t[1], t[2]);
  }), n && (Cu[n] = function() {
    return this.localeData().ordinal(
      r.apply(this, arguments),
      e
    );
  });
}
function vD(e) {
  return e.match(/\[[\s\S]/) ? e.replace(/^\[|\]$/g, "") : e.replace(/\\/g, "");
}
function mD(e) {
  var t = e.match(py), n, o;
  for (n = 0, o = t.length; n < o; n++)
    Cu[t[n]] ? t[n] = Cu[t[n]] : t[n] = vD(t[n]);
  return function(r) {
    var i = "", a;
    for (a = 0; a < o; a++)
      i += na(t[a]) ? t[a].call(r, e) : t[a];
    return i;
  };
}
function Kf(e, t) {
  return e.isValid() ? (t = aO(t, e.localeData()), $g[t] = $g[t] || mD(t), $g[t](e)) : e.localeData().invalidDate();
}
function aO(e, t) {
  var n = 5;
  function o(r) {
    return t.longDateFormat(r) || r;
  }
  for (af.lastIndex = 0; n >= 0 && af.test(e); )
    e = e.replace(
      af,
      o
    ), af.lastIndex = 0, n -= 1;
  return e;
}
var bD = {
  LTS: "h:mm:ss A",
  LT: "h:mm A",
  L: "MM/DD/YYYY",
  LL: "MMMM D, YYYY",
  LLL: "MMMM D, YYYY h:mm A",
  LLLL: "dddd, MMMM D, YYYY h:mm A"
};
function yD(e) {
  var t = this._longDateFormat[e], n = this._longDateFormat[e.toUpperCase()];
  return t || !n ? t : (this._longDateFormat[e] = n.match(py).map(function(o) {
    return o === "MMMM" || o === "MM" || o === "DD" || o === "dddd" ? o.slice(1) : o;
  }).join(""), this._longDateFormat[e]);
}
var xD = "Invalid date";
function wD() {
  return this._invalidDate;
}
var SD = "%d", CD = /\d{1,2}/;
function $D(e) {
  return this._ordinal.replace("%d", e);
}
var PD = {
  future: "in %s",
  past: "%s ago",
  s: "a few seconds",
  ss: "%d seconds",
  m: "a minute",
  mm: "%d minutes",
  h: "an hour",
  hh: "%d hours",
  d: "a day",
  dd: "%d days",
  w: "a week",
  ww: "%d weeks",
  M: "a month",
  MM: "%d months",
  y: "a year",
  yy: "%d years"
};
function OD(e, t, n, o) {
  var r = this._relativeTime[n];
  return na(r) ? r(e, t, n, o) : r.replace(/%d/i, e);
}
function kD(e, t) {
  var n = this._relativeTime[e > 0 ? "future" : "past"];
  return na(n) ? n(t) : n.replace(/%s/i, t);
}
var Qx = {
  D: "date",
  dates: "date",
  date: "date",
  d: "day",
  days: "day",
  day: "day",
  e: "weekday",
  weekdays: "weekday",
  weekday: "weekday",
  E: "isoWeekday",
  isoweekdays: "isoWeekday",
  isoweekday: "isoWeekday",
  DDD: "dayOfYear",
  dayofyears: "dayOfYear",
  dayofyear: "dayOfYear",
  h: "hour",
  hours: "hour",
  hour: "hour",
  ms: "millisecond",
  milliseconds: "millisecond",
  millisecond: "millisecond",
  m: "minute",
  minutes: "minute",
  minute: "minute",
  M: "month",
  months: "month",
  month: "month",
  Q: "quarter",
  quarters: "quarter",
  quarter: "quarter",
  s: "second",
  seconds: "second",
  second: "second",
  gg: "weekYear",
  weekyears: "weekYear",
  weekyear: "weekYear",
  GG: "isoWeekYear",
  isoweekyears: "isoWeekYear",
  isoweekyear: "isoWeekYear",
  w: "week",
  weeks: "week",
  week: "week",
  W: "isoWeek",
  isoweeks: "isoWeek",
  isoweek: "isoWeek",
  y: "year",
  years: "year",
  year: "year"
};
function ri(e) {
  return typeof e == "string" ? Qx[e] || Qx[e.toLowerCase()] : void 0;
}
function hy(e) {
  var t = {}, n, o;
  for (o in e)
    Tn(e, o) && (n = ri(o), n && (t[n] = e[o]));
  return t;
}
var ID = {
  date: 9,
  day: 11,
  weekday: 11,
  isoWeekday: 11,
  dayOfYear: 4,
  hour: 13,
  millisecond: 16,
  minute: 14,
  month: 8,
  quarter: 7,
  second: 15,
  weekYear: 1,
  isoWeekYear: 1,
  week: 5,
  isoWeek: 5,
  year: 1
};
function _D(e) {
  var t = [], n;
  for (n in e)
    Tn(e, n) && t.push({ unit: n, priority: ID[n] });
  return t.sort(function(o, r) {
    return o.priority - r.priority;
  }), t;
}
var lO = /\d/, Rr = /\d\d/, sO = /\d{3}/, gy = /\d{4}/, rh = /[+-]?\d{6}/, oo = /\d\d?/, uO = /\d\d\d\d?/, cO = /\d\d\d\d\d\d?/, ih = /\d{1,3}/, vy = /\d{1,4}/, ah = /[+-]?\d{1,6}/, oc = /\d+/, lh = /[+-]?\d+/, TD = /Z|[+-]\d\d:?\d\d/gi, sh = /Z|[+-]\d\d(?::?\d\d)?/gi, MD = /[+-]?\d+(\.\d{1,3})?/, kd = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, rc = /^[1-9]\d?/, my = /^([1-9]\d|\d)/, yp;
yp = {};
function $t(e, t, n) {
  yp[e] = na(t) ? t : function(o, r) {
    return o && n ? n : t;
  };
}
function ED(e, t) {
  return Tn(yp, e) ? yp[e](t._strict, t._locale) : new RegExp(DD(e));
}
function DD(e) {
  return Ma(
    e.replace("\\", "").replace(
      /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
      function(t, n, o, r, i) {
        return n || o || r || i;
      }
    )
  );
}
function Ma(e) {
  return e.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
}
function Zr(e) {
  return e < 0 ? Math.ceil(e) || 0 : Math.floor(e);
}
function mn(e) {
  var t = +e, n = 0;
  return t !== 0 && isFinite(t) && (n = Zr(t)), n;
}
var lm = {};
function Wn(e, t) {
  var n, o = t, r;
  for (typeof e == "string" && (e = [e]), za(t) && (o = function(i, a) {
    a[t] = mn(i);
  }), r = e.length, n = 0; n < r; n++)
    lm[e[n]] = o;
}
function Id(e, t) {
  Wn(e, function(n, o, r, i) {
    r._w = r._w || {}, t(n, r._w, r, i);
  });
}
function AD(e, t, n) {
  t != null && Tn(lm, e) && lm[e](t, n._a, n, e);
}
function uh(e) {
  return e % 4 === 0 && e % 100 !== 0 || e % 400 === 0;
}
var Zo = 0, ka = 1, Gi = 2, Mo = 3, wi = 4, Ia = 5, gs = 6, ND = 7, RD = 8;
Ht("Y", 0, 0, function() {
  var e = this.year();
  return e <= 9999 ? Zi(e, 4) : "+" + e;
});
Ht(0, ["YY", 2], 0, function() {
  return this.year() % 100;
});
Ht(0, ["YYYY", 4], 0, "year");
Ht(0, ["YYYYY", 5], 0, "year");
Ht(0, ["YYYYYY", 6, !0], 0, "year");
$t("Y", lh);
$t("YY", oo, Rr);
$t("YYYY", vy, gy);
$t("YYYYY", ah, rh);
$t("YYYYYY", ah, rh);
Wn(["YYYYY", "YYYYYY"], Zo);
Wn("YYYY", function(e, t) {
  t[Zo] = e.length === 2 ? mt.parseTwoDigitYear(e) : mn(e);
});
Wn("YY", function(e, t) {
  t[Zo] = mt.parseTwoDigitYear(e);
});
Wn("Y", function(e, t) {
  t[Zo] = parseInt(e, 10);
});
function qc(e) {
  return uh(e) ? 366 : 365;
}
mt.parseTwoDigitYear = function(e) {
  return mn(e) + (mn(e) > 68 ? 1900 : 2e3);
};
var dO = ic("FullYear", !0);
function zD() {
  return uh(this.year());
}
function ic(e, t) {
  return function(n) {
    return n != null ? (fO(this, e, n), mt.updateOffset(this, t), this) : ld(this, e);
  };
}
function ld(e, t) {
  if (!e.isValid())
    return NaN;
  var n = e._d, o = e._isUTC;
  switch (t) {
    case "Milliseconds":
      return o ? n.getUTCMilliseconds() : n.getMilliseconds();
    case "Seconds":
      return o ? n.getUTCSeconds() : n.getSeconds();
    case "Minutes":
      return o ? n.getUTCMinutes() : n.getMinutes();
    case "Hours":
      return o ? n.getUTCHours() : n.getHours();
    case "Date":
      return o ? n.getUTCDate() : n.getDate();
    case "Day":
      return o ? n.getUTCDay() : n.getDay();
    case "Month":
      return o ? n.getUTCMonth() : n.getMonth();
    case "FullYear":
      return o ? n.getUTCFullYear() : n.getFullYear();
    default:
      return NaN;
  }
}
function fO(e, t, n) {
  var o, r, i, a, l;
  if (!(!e.isValid() || isNaN(n))) {
    switch (o = e._d, r = e._isUTC, t) {
      case "Milliseconds":
        return void (r ? o.setUTCMilliseconds(n) : o.setMilliseconds(n));
      case "Seconds":
        return void (r ? o.setUTCSeconds(n) : o.setSeconds(n));
      case "Minutes":
        return void (r ? o.setUTCMinutes(n) : o.setMinutes(n));
      case "Hours":
        return void (r ? o.setUTCHours(n) : o.setHours(n));
      case "Date":
        return void (r ? o.setUTCDate(n) : o.setDate(n));
      // case 'Day': // Not real
      //    return void (isUTC ? d.setUTCDay(value) : d.setDay(value));
      // case 'Month': // Not used because we need to pass two variables
      //     return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));
      case "FullYear":
        break;
      // See below ...
      default:
        return;
    }
    i = n, a = e.month(), l = e.date(), l = l === 29 && a === 1 && !uh(i) ? 28 : l, r ? o.setUTCFullYear(i, a, l) : o.setFullYear(i, a, l);
  }
}
function FD(e) {
  return e = ri(e), na(this[e]) ? this[e]() : this;
}
function BD(e, t) {
  if (typeof e == "object") {
    e = hy(e);
    var n = _D(e), o, r = n.length;
    for (o = 0; o < r; o++)
      this[n[o].unit](e[n[o].unit]);
  } else if (e = ri(e), na(this[e]))
    return this[e](t);
  return this;
}
function LD(e, t) {
  return (e % t + t) % t;
}
var bo;
Array.prototype.indexOf ? bo = Array.prototype.indexOf : bo = function(e) {
  var t;
  for (t = 0; t < this.length; ++t)
    if (this[t] === e)
      return t;
  return -1;
};
function by(e, t) {
  if (isNaN(e) || isNaN(t))
    return NaN;
  var n = LD(t, 12);
  return e += (t - n) / 12, n === 1 ? uh(e) ? 29 : 28 : 31 - n % 7 % 2;
}
Ht("M", ["MM", 2], "Mo", function() {
  return this.month() + 1;
});
Ht("MMM", 0, 0, function(e) {
  return this.localeData().monthsShort(this, e);
});
Ht("MMMM", 0, 0, function(e) {
  return this.localeData().months(this, e);
});
$t("M", oo, rc);
$t("MM", oo, Rr);
$t("MMM", function(e, t) {
  return t.monthsShortRegex(e);
});
$t("MMMM", function(e, t) {
  return t.monthsRegex(e);
});
Wn(["M", "MM"], function(e, t) {
  t[ka] = mn(e) - 1;
});
Wn(["MMM", "MMMM"], function(e, t, n, o) {
  var r = n._locale.monthsParse(e, o, n._strict);
  r != null ? t[ka] = r : nn(n).invalidMonth = e;
});
var HD = "January_February_March_April_May_June_July_August_September_October_November_December".split(
  "_"
), pO = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), hO = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, VD = kd, jD = kd;
function WD(e, t) {
  return e ? ki(this._months) ? this._months[e.month()] : this._months[(this._months.isFormat || hO).test(t) ? "format" : "standalone"][e.month()] : ki(this._months) ? this._months : this._months.standalone;
}
function KD(e, t) {
  return e ? ki(this._monthsShort) ? this._monthsShort[e.month()] : this._monthsShort[hO.test(t) ? "format" : "standalone"][e.month()] : ki(this._monthsShort) ? this._monthsShort : this._monthsShort.standalone;
}
function qD(e, t, n) {
  var o, r, i, a = e.toLocaleLowerCase();
  if (!this._monthsParse)
    for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], o = 0; o < 12; ++o)
      i = ta([2e3, o]), this._shortMonthsParse[o] = this.monthsShort(
        i,
        ""
      ).toLocaleLowerCase(), this._longMonthsParse[o] = this.months(i, "").toLocaleLowerCase();
  return n ? t === "MMM" ? (r = bo.call(this._shortMonthsParse, a), r !== -1 ? r : null) : (r = bo.call(this._longMonthsParse, a), r !== -1 ? r : null) : t === "MMM" ? (r = bo.call(this._shortMonthsParse, a), r !== -1 ? r : (r = bo.call(this._longMonthsParse, a), r !== -1 ? r : null)) : (r = bo.call(this._longMonthsParse, a), r !== -1 ? r : (r = bo.call(this._shortMonthsParse, a), r !== -1 ? r : null));
}
function YD(e, t, n) {
  var o, r, i;
  if (this._monthsParseExact)
    return qD.call(this, e, t, n);
  for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), o = 0; o < 12; o++) {
    if (r = ta([2e3, o]), n && !this._longMonthsParse[o] && (this._longMonthsParse[o] = new RegExp(
      "^" + this.months(r, "").replace(".", "") + "$",
      "i"
    ), this._shortMonthsParse[o] = new RegExp(
      "^" + this.monthsShort(r, "").replace(".", "") + "$",
      "i"
    )), !n && !this._monthsParse[o] && (i = "^" + this.months(r, "") + "|^" + this.monthsShort(r, ""), this._monthsParse[o] = new RegExp(i.replace(".", ""), "i")), n && t === "MMMM" && this._longMonthsParse[o].test(e))
      return o;
    if (n && t === "MMM" && this._shortMonthsParse[o].test(e))
      return o;
    if (!n && this._monthsParse[o].test(e))
      return o;
  }
}
function gO(e, t) {
  if (!e.isValid())
    return e;
  if (typeof t == "string") {
    if (/^\d+$/.test(t))
      t = mn(t);
    else if (t = e.localeData().monthsParse(t), !za(t))
      return e;
  }
  var n = t, o = e.date();
  return o = o < 29 ? o : Math.min(o, by(e.year(), n)), e._isUTC ? e._d.setUTCMonth(n, o) : e._d.setMonth(n, o), e;
}
function vO(e) {
  return e != null ? (gO(this, e), mt.updateOffset(this, !0), this) : ld(this, "Month");
}
function GD() {
  return by(this.year(), this.month());
}
function UD(e) {
  return this._monthsParseExact ? (Tn(this, "_monthsRegex") || mO.call(this), e ? this._monthsShortStrictRegex : this._monthsShortRegex) : (Tn(this, "_monthsShortRegex") || (this._monthsShortRegex = VD), this._monthsShortStrictRegex && e ? this._monthsShortStrictRegex : this._monthsShortRegex);
}
function XD(e) {
  return this._monthsParseExact ? (Tn(this, "_monthsRegex") || mO.call(this), e ? this._monthsStrictRegex : this._monthsRegex) : (Tn(this, "_monthsRegex") || (this._monthsRegex = jD), this._monthsStrictRegex && e ? this._monthsStrictRegex : this._monthsRegex);
}
function mO() {
  function e(s, u) {
    return u.length - s.length;
  }
  var t = [], n = [], o = [], r, i, a, l;
  for (r = 0; r < 12; r++)
    i = ta([2e3, r]), a = Ma(this.monthsShort(i, "")), l = Ma(this.months(i, "")), t.push(a), n.push(l), o.push(l), o.push(a);
  t.sort(e), n.sort(e), o.sort(e), this._monthsRegex = new RegExp("^(" + o.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp(
    "^(" + n.join("|") + ")",
    "i"
  ), this._monthsShortStrictRegex = new RegExp(
    "^(" + t.join("|") + ")",
    "i"
  );
}
function QD(e, t, n, o, r, i, a) {
  var l;
  return e < 100 && e >= 0 ? (l = new Date(e + 400, t, n, o, r, i, a), isFinite(l.getFullYear()) && l.setFullYear(e)) : l = new Date(e, t, n, o, r, i, a), l;
}
function sd(e) {
  var t, n;
  return e < 100 && e >= 0 ? (n = Array.prototype.slice.call(arguments), n[0] = e + 400, t = new Date(Date.UTC.apply(null, n)), isFinite(t.getUTCFullYear()) && t.setUTCFullYear(e)) : t = new Date(Date.UTC.apply(null, arguments)), t;
}
function xp(e, t, n) {
  var o = 7 + t - n, r = (7 + sd(e, 0, o).getUTCDay() - t) % 7;
  return -r + o - 1;
}
function bO(e, t, n, o, r) {
  var i = (7 + n - o) % 7, a = xp(e, o, r), l = 1 + 7 * (t - 1) + i + a, s, u;
  return l <= 0 ? (s = e - 1, u = qc(s) + l) : l > qc(e) ? (s = e + 1, u = l - qc(e)) : (s = e, u = l), {
    year: s,
    dayOfYear: u
  };
}
function ud(e, t, n) {
  var o = xp(e.year(), t, n), r = Math.floor((e.dayOfYear() - o - 1) / 7) + 1, i, a;
  return r < 1 ? (a = e.year() - 1, i = r + Ea(a, t, n)) : r > Ea(e.year(), t, n) ? (i = r - Ea(e.year(), t, n), a = e.year() + 1) : (a = e.year(), i = r), {
    week: i,
    year: a
  };
}
function Ea(e, t, n) {
  var o = xp(e, t, n), r = xp(e + 1, t, n);
  return (qc(e) - o + r) / 7;
}
Ht("w", ["ww", 2], "wo", "week");
Ht("W", ["WW", 2], "Wo", "isoWeek");
$t("w", oo, rc);
$t("ww", oo, Rr);
$t("W", oo, rc);
$t("WW", oo, Rr);
Id(
  ["w", "ww", "W", "WW"],
  function(e, t, n, o) {
    t[o.substr(0, 1)] = mn(e);
  }
);
function ZD(e) {
  return ud(e, this._week.dow, this._week.doy).week;
}
var JD = {
  dow: 0,
  // Sunday is the first day of the week.
  doy: 6
  // The week that contains Jan 6th is the first week of the year.
};
function eA() {
  return this._week.dow;
}
function tA() {
  return this._week.doy;
}
function nA(e) {
  var t = this.localeData().week(this);
  return e == null ? t : this.add((e - t) * 7, "d");
}
function oA(e) {
  var t = ud(this, 1, 4).week;
  return e == null ? t : this.add((e - t) * 7, "d");
}
Ht("d", 0, "do", "day");
Ht("dd", 0, 0, function(e) {
  return this.localeData().weekdaysMin(this, e);
});
Ht("ddd", 0, 0, function(e) {
  return this.localeData().weekdaysShort(this, e);
});
Ht("dddd", 0, 0, function(e) {
  return this.localeData().weekdays(this, e);
});
Ht("e", 0, 0, "weekday");
Ht("E", 0, 0, "isoWeekday");
$t("d", oo);
$t("e", oo);
$t("E", oo);
$t("dd", function(e, t) {
  return t.weekdaysMinRegex(e);
});
$t("ddd", function(e, t) {
  return t.weekdaysShortRegex(e);
});
$t("dddd", function(e, t) {
  return t.weekdaysRegex(e);
});
Id(["dd", "ddd", "dddd"], function(e, t, n, o) {
  var r = n._locale.weekdaysParse(e, o, n._strict);
  r != null ? t.d = r : nn(n).invalidWeekday = e;
});
Id(["d", "e", "E"], function(e, t, n, o) {
  t[o] = mn(e);
});
function rA(e, t) {
  return typeof e != "string" ? e : isNaN(e) ? (e = t.weekdaysParse(e), typeof e == "number" ? e : null) : parseInt(e, 10);
}
function iA(e, t) {
  return typeof e == "string" ? t.weekdaysParse(e) % 7 || 7 : isNaN(e) ? null : e;
}
function yy(e, t) {
  return e.slice(t, 7).concat(e.slice(0, t));
}
var aA = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), yO = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), lA = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), sA = kd, uA = kd, cA = kd;
function dA(e, t) {
  var n = ki(this._weekdays) ? this._weekdays : this._weekdays[e && e !== !0 && this._weekdays.isFormat.test(t) ? "format" : "standalone"];
  return e === !0 ? yy(n, this._week.dow) : e ? n[e.day()] : n;
}
function fA(e) {
  return e === !0 ? yy(this._weekdaysShort, this._week.dow) : e ? this._weekdaysShort[e.day()] : this._weekdaysShort;
}
function pA(e) {
  return e === !0 ? yy(this._weekdaysMin, this._week.dow) : e ? this._weekdaysMin[e.day()] : this._weekdaysMin;
}
function hA(e, t, n) {
  var o, r, i, a = e.toLocaleLowerCase();
  if (!this._weekdaysParse)
    for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], o = 0; o < 7; ++o)
      i = ta([2e3, 1]).day(o), this._minWeekdaysParse[o] = this.weekdaysMin(
        i,
        ""
      ).toLocaleLowerCase(), this._shortWeekdaysParse[o] = this.weekdaysShort(
        i,
        ""
      ).toLocaleLowerCase(), this._weekdaysParse[o] = this.weekdays(i, "").toLocaleLowerCase();
  return n ? t === "dddd" ? (r = bo.call(this._weekdaysParse, a), r !== -1 ? r : null) : t === "ddd" ? (r = bo.call(this._shortWeekdaysParse, a), r !== -1 ? r : null) : (r = bo.call(this._minWeekdaysParse, a), r !== -1 ? r : null) : t === "dddd" ? (r = bo.call(this._weekdaysParse, a), r !== -1 || (r = bo.call(this._shortWeekdaysParse, a), r !== -1) ? r : (r = bo.call(this._minWeekdaysParse, a), r !== -1 ? r : null)) : t === "ddd" ? (r = bo.call(this._shortWeekdaysParse, a), r !== -1 || (r = bo.call(this._weekdaysParse, a), r !== -1) ? r : (r = bo.call(this._minWeekdaysParse, a), r !== -1 ? r : null)) : (r = bo.call(this._minWeekdaysParse, a), r !== -1 || (r = bo.call(this._weekdaysParse, a), r !== -1) ? r : (r = bo.call(this._shortWeekdaysParse, a), r !== -1 ? r : null));
}
function gA(e, t, n) {
  var o, r, i;
  if (this._weekdaysParseExact)
    return hA.call(this, e, t, n);
  for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), o = 0; o < 7; o++) {
    if (r = ta([2e3, 1]).day(o), n && !this._fullWeekdaysParse[o] && (this._fullWeekdaysParse[o] = new RegExp(
      "^" + this.weekdays(r, "").replace(".", "\\.?") + "$",
      "i"
    ), this._shortWeekdaysParse[o] = new RegExp(
      "^" + this.weekdaysShort(r, "").replace(".", "\\.?") + "$",
      "i"
    ), this._minWeekdaysParse[o] = new RegExp(
      "^" + this.weekdaysMin(r, "").replace(".", "\\.?") + "$",
      "i"
    )), this._weekdaysParse[o] || (i = "^" + this.weekdays(r, "") + "|^" + this.weekdaysShort(r, "") + "|^" + this.weekdaysMin(r, ""), this._weekdaysParse[o] = new RegExp(i.replace(".", ""), "i")), n && t === "dddd" && this._fullWeekdaysParse[o].test(e))
      return o;
    if (n && t === "ddd" && this._shortWeekdaysParse[o].test(e))
      return o;
    if (n && t === "dd" && this._minWeekdaysParse[o].test(e))
      return o;
    if (!n && this._weekdaysParse[o].test(e))
      return o;
  }
}
function vA(e) {
  if (!this.isValid())
    return e != null ? this : NaN;
  var t = ld(this, "Day");
  return e != null ? (e = rA(e, this.localeData()), this.add(e - t, "d")) : t;
}
function mA(e) {
  if (!this.isValid())
    return e != null ? this : NaN;
  var t = (this.day() + 7 - this.localeData()._week.dow) % 7;
  return e == null ? t : this.add(e - t, "d");
}
function bA(e) {
  if (!this.isValid())
    return e != null ? this : NaN;
  if (e != null) {
    var t = iA(e, this.localeData());
    return this.day(this.day() % 7 ? t : t - 7);
  } else
    return this.day() || 7;
}
function yA(e) {
  return this._weekdaysParseExact ? (Tn(this, "_weekdaysRegex") || xy.call(this), e ? this._weekdaysStrictRegex : this._weekdaysRegex) : (Tn(this, "_weekdaysRegex") || (this._weekdaysRegex = sA), this._weekdaysStrictRegex && e ? this._weekdaysStrictRegex : this._weekdaysRegex);
}
function xA(e) {
  return this._weekdaysParseExact ? (Tn(this, "_weekdaysRegex") || xy.call(this), e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (Tn(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = uA), this._weekdaysShortStrictRegex && e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex);
}
function wA(e) {
  return this._weekdaysParseExact ? (Tn(this, "_weekdaysRegex") || xy.call(this), e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (Tn(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = cA), this._weekdaysMinStrictRegex && e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex);
}
function xy() {
  function e(c, d) {
    return d.length - c.length;
  }
  var t = [], n = [], o = [], r = [], i, a, l, s, u;
  for (i = 0; i < 7; i++)
    a = ta([2e3, 1]).day(i), l = Ma(this.weekdaysMin(a, "")), s = Ma(this.weekdaysShort(a, "")), u = Ma(this.weekdays(a, "")), t.push(l), n.push(s), o.push(u), r.push(l), r.push(s), r.push(u);
  t.sort(e), n.sort(e), o.sort(e), r.sort(e), this._weekdaysRegex = new RegExp("^(" + r.join("|") + ")", "i"), this._weekdaysShortRegex = this._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp(
    "^(" + o.join("|") + ")",
    "i"
  ), this._weekdaysShortStrictRegex = new RegExp(
    "^(" + n.join("|") + ")",
    "i"
  ), this._weekdaysMinStrictRegex = new RegExp(
    "^(" + t.join("|") + ")",
    "i"
  );
}
function wy() {
  return this.hours() % 12 || 12;
}
function SA() {
  return this.hours() || 24;
}
Ht("H", ["HH", 2], 0, "hour");
Ht("h", ["hh", 2], 0, wy);
Ht("k", ["kk", 2], 0, SA);
Ht("hmm", 0, 0, function() {
  return "" + wy.apply(this) + Zi(this.minutes(), 2);
});
Ht("hmmss", 0, 0, function() {
  return "" + wy.apply(this) + Zi(this.minutes(), 2) + Zi(this.seconds(), 2);
});
Ht("Hmm", 0, 0, function() {
  return "" + this.hours() + Zi(this.minutes(), 2);
});
Ht("Hmmss", 0, 0, function() {
  return "" + this.hours() + Zi(this.minutes(), 2) + Zi(this.seconds(), 2);
});
function xO(e, t) {
  Ht(e, 0, 0, function() {
    return this.localeData().meridiem(
      this.hours(),
      this.minutes(),
      t
    );
  });
}
xO("a", !0);
xO("A", !1);
function wO(e, t) {
  return t._meridiemParse;
}
$t("a", wO);
$t("A", wO);
$t("H", oo, my);
$t("h", oo, rc);
$t("k", oo, rc);
$t("HH", oo, Rr);
$t("hh", oo, Rr);
$t("kk", oo, Rr);
$t("hmm", uO);
$t("hmmss", cO);
$t("Hmm", uO);
$t("Hmmss", cO);
Wn(["H", "HH"], Mo);
Wn(["k", "kk"], function(e, t, n) {
  var o = mn(e);
  t[Mo] = o === 24 ? 0 : o;
});
Wn(["a", "A"], function(e, t, n) {
  n._isPm = n._locale.isPM(e), n._meridiem = e;
});
Wn(["h", "hh"], function(e, t, n) {
  t[Mo] = mn(e), nn(n).bigHour = !0;
});
Wn("hmm", function(e, t, n) {
  var o = e.length - 2;
  t[Mo] = mn(e.substr(0, o)), t[wi] = mn(e.substr(o)), nn(n).bigHour = !0;
});
Wn("hmmss", function(e, t, n) {
  var o = e.length - 4, r = e.length - 2;
  t[Mo] = mn(e.substr(0, o)), t[wi] = mn(e.substr(o, 2)), t[Ia] = mn(e.substr(r)), nn(n).bigHour = !0;
});
Wn("Hmm", function(e, t, n) {
  var o = e.length - 2;
  t[Mo] = mn(e.substr(0, o)), t[wi] = mn(e.substr(o));
});
Wn("Hmmss", function(e, t, n) {
  var o = e.length - 4, r = e.length - 2;
  t[Mo] = mn(e.substr(0, o)), t[wi] = mn(e.substr(o, 2)), t[Ia] = mn(e.substr(r));
});
function CA(e) {
  return (e + "").toLowerCase().charAt(0) === "p";
}
var $A = /[ap]\.?m?\.?/i, PA = ic("Hours", !0);
function OA(e, t, n) {
  return e > 11 ? n ? "pm" : "PM" : n ? "am" : "AM";
}
var SO = {
  calendar: hD,
  longDateFormat: bD,
  invalidDate: xD,
  ordinal: SD,
  dayOfMonthOrdinalParse: CD,
  relativeTime: PD,
  months: HD,
  monthsShort: pO,
  week: JD,
  weekdays: aA,
  weekdaysMin: lA,
  weekdaysShort: yO,
  meridiemParse: $A
}, ao = {}, Pc = {}, cd;
function kA(e, t) {
  var n, o = Math.min(e.length, t.length);
  for (n = 0; n < o; n += 1)
    if (e[n] !== t[n])
      return n;
  return o;
}
function Zx(e) {
  return e && e.toLowerCase().replace("_", "-");
}
function IA(e) {
  for (var t = 0, n, o, r, i; t < e.length; ) {
    for (i = Zx(e[t]).split("-"), n = i.length, o = Zx(e[t + 1]), o = o ? o.split("-") : null; n > 0; ) {
      if (r = ch(i.slice(0, n).join("-")), r)
        return r;
      if (o && o.length >= n && kA(i, o) >= n - 1)
        break;
      n--;
    }
    t++;
  }
  return cd;
}
function _A(e) {
  return !!(e && e.match("^[^/\\\\]*$"));
}
function ch(e) {
  var t = null, n;
  if (ao[e] === void 0 && typeof module < "u" && module && module.exports && _A(e))
    try {
      t = cd._abbr, n = require, n("./locale/" + e), kl(t);
    } catch {
      ao[e] = null;
    }
  return ao[e];
}
function kl(e, t) {
  var n;
  return e && (gr(t) ? n = Ga(e) : n = Sy(e, t), n ? cd = n : typeof console < "u" && console.warn && console.warn(
    "Locale " + e + " not found. Did you forget to load it?"
  )), cd._abbr;
}
function Sy(e, t) {
  if (t !== null) {
    var n, o = SO;
    if (t.abbr = e, ao[e] != null)
      iO(
        "defineLocaleOverride",
        "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."
      ), o = ao[e]._config;
    else if (t.parentLocale != null)
      if (ao[t.parentLocale] != null)
        o = ao[t.parentLocale]._config;
      else if (n = ch(t.parentLocale), n != null)
        o = n._config;
      else
        return Pc[t.parentLocale] || (Pc[t.parentLocale] = []), Pc[t.parentLocale].push({
          name: e,
          config: t
        }), null;
    return ao[e] = new fy(im(o, t)), Pc[e] && Pc[e].forEach(function(r) {
      Sy(r.name, r.config);
    }), kl(e), ao[e];
  } else
    return delete ao[e], null;
}
function TA(e, t) {
  if (t != null) {
    var n, o, r = SO;
    ao[e] != null && ao[e].parentLocale != null ? ao[e].set(im(ao[e]._config, t)) : (o = ch(e), o != null && (r = o._config), t = im(r, t), o == null && (t.abbr = e), n = new fy(t), n.parentLocale = ao[e], ao[e] = n), kl(e);
  } else
    ao[e] != null && (ao[e].parentLocale != null ? (ao[e] = ao[e].parentLocale, e === kl() && kl(e)) : ao[e] != null && delete ao[e]);
  return ao[e];
}
function Ga(e) {
  var t;
  if (e && e._locale && e._locale._abbr && (e = e._locale._abbr), !e)
    return cd;
  if (!ki(e)) {
    if (t = ch(e), t)
      return t;
    e = [e];
  }
  return IA(e);
}
function MA() {
  return am(ao);
}
function Cy(e) {
  var t, n = e._a;
  return n && nn(e).overflow === -2 && (t = n[ka] < 0 || n[ka] > 11 ? ka : n[Gi] < 1 || n[Gi] > by(n[Zo], n[ka]) ? Gi : n[Mo] < 0 || n[Mo] > 24 || n[Mo] === 24 && (n[wi] !== 0 || n[Ia] !== 0 || n[gs] !== 0) ? Mo : n[wi] < 0 || n[wi] > 59 ? wi : n[Ia] < 0 || n[Ia] > 59 ? Ia : n[gs] < 0 || n[gs] > 999 ? gs : -1, nn(e)._overflowDayOfYear && (t < Zo || t > Gi) && (t = Gi), nn(e)._overflowWeeks && t === -1 && (t = ND), nn(e)._overflowWeekday && t === -1 && (t = RD), nn(e).overflow = t), e;
}
var EA = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, DA = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, AA = /Z|[+-]\d\d(?::?\d\d)?/, lf = [
  ["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/],
  ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/],
  ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/],
  ["GGGG-[W]WW", /\d{4}-W\d\d/, !1],
  ["YYYY-DDD", /\d{4}-\d{3}/],
  ["YYYY-MM", /\d{4}-\d\d/, !1],
  ["YYYYYYMMDD", /[+-]\d{10}/],
  ["YYYYMMDD", /\d{8}/],
  ["GGGG[W]WWE", /\d{4}W\d{3}/],
  ["GGGG[W]WW", /\d{4}W\d{2}/, !1],
  ["YYYYDDD", /\d{7}/],
  ["YYYYMM", /\d{6}/, !1],
  ["YYYY", /\d{4}/, !1]
], Pg = [
  ["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/],
  ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/],
  ["HH:mm:ss", /\d\d:\d\d:\d\d/],
  ["HH:mm", /\d\d:\d\d/],
  ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/],
  ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/],
  ["HHmmss", /\d\d\d\d\d\d/],
  ["HHmm", /\d\d\d\d/],
  ["HH", /\d\d/]
], NA = /^\/?Date\((-?\d+)/i, RA = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, zA = {
  UT: 0,
  GMT: 0,
  EDT: -240,
  EST: -300,
  CDT: -300,
  CST: -360,
  MDT: -360,
  MST: -420,
  PDT: -420,
  PST: -480
};
function CO(e) {
  var t, n, o = e._i, r = EA.exec(o) || DA.exec(o), i, a, l, s, u = lf.length, c = Pg.length;
  if (r) {
    for (nn(e).iso = !0, t = 0, n = u; t < n; t++)
      if (lf[t][1].exec(r[1])) {
        a = lf[t][0], i = lf[t][2] !== !1;
        break;
      }
    if (a == null) {
      e._isValid = !1;
      return;
    }
    if (r[3]) {
      for (t = 0, n = c; t < n; t++)
        if (Pg[t][1].exec(r[3])) {
          l = (r[2] || " ") + Pg[t][0];
          break;
        }
      if (l == null) {
        e._isValid = !1;
        return;
      }
    }
    if (!i && l != null) {
      e._isValid = !1;
      return;
    }
    if (r[4])
      if (AA.exec(r[4]))
        s = "Z";
      else {
        e._isValid = !1;
        return;
      }
    e._f = a + (l || "") + (s || ""), Py(e);
  } else
    e._isValid = !1;
}
function FA(e, t, n, o, r, i) {
  var a = [
    BA(e),
    pO.indexOf(t),
    parseInt(n, 10),
    parseInt(o, 10),
    parseInt(r, 10)
  ];
  return i && a.push(parseInt(i, 10)), a;
}
function BA(e) {
  var t = parseInt(e, 10);
  return t <= 49 ? 2e3 + t : t <= 999 ? 1900 + t : t;
}
function LA(e) {
  return e.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "");
}
function HA(e, t, n) {
  if (e) {
    var o = yO.indexOf(e), r = new Date(
      t[0],
      t[1],
      t[2]
    ).getDay();
    if (o !== r)
      return nn(n).weekdayMismatch = !0, n._isValid = !1, !1;
  }
  return !0;
}
function VA(e, t, n) {
  if (e)
    return zA[e];
  if (t)
    return 0;
  var o = parseInt(n, 10), r = o % 100, i = (o - r) / 100;
  return i * 60 + r;
}
function $O(e) {
  var t = RA.exec(LA(e._i)), n;
  if (t) {
    if (n = FA(
      t[4],
      t[3],
      t[2],
      t[5],
      t[6],
      t[7]
    ), !HA(t[1], n, e))
      return;
    e._a = n, e._tzm = VA(t[8], t[9], t[10]), e._d = sd.apply(null, e._a), e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), nn(e).rfc2822 = !0;
  } else
    e._isValid = !1;
}
function jA(e) {
  var t = NA.exec(e._i);
  if (t !== null) {
    e._d = /* @__PURE__ */ new Date(+t[1]);
    return;
  }
  if (CO(e), e._isValid === !1)
    delete e._isValid;
  else
    return;
  if ($O(e), e._isValid === !1)
    delete e._isValid;
  else
    return;
  e._strict ? e._isValid = !1 : mt.createFromInputFallback(e);
}
mt.createFromInputFallback = oi(
  "value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",
  function(e) {
    e._d = /* @__PURE__ */ new Date(e._i + (e._useUTC ? " UTC" : ""));
  }
);
function fu(e, t, n) {
  return e ?? t ?? n;
}
function WA(e) {
  var t = new Date(mt.now());
  return e._useUTC ? [
    t.getUTCFullYear(),
    t.getUTCMonth(),
    t.getUTCDate()
  ] : [t.getFullYear(), t.getMonth(), t.getDate()];
}
function $y(e) {
  var t, n, o = [], r, i, a;
  if (!e._d) {
    for (r = WA(e), e._w && e._a[Gi] == null && e._a[ka] == null && KA(e), e._dayOfYear != null && (a = fu(e._a[Zo], r[Zo]), (e._dayOfYear > qc(a) || e._dayOfYear === 0) && (nn(e)._overflowDayOfYear = !0), n = sd(a, 0, e._dayOfYear), e._a[ka] = n.getUTCMonth(), e._a[Gi] = n.getUTCDate()), t = 0; t < 3 && e._a[t] == null; ++t)
      e._a[t] = o[t] = r[t];
    for (; t < 7; t++)
      e._a[t] = o[t] = e._a[t] == null ? t === 2 ? 1 : 0 : e._a[t];
    e._a[Mo] === 24 && e._a[wi] === 0 && e._a[Ia] === 0 && e._a[gs] === 0 && (e._nextDay = !0, e._a[Mo] = 0), e._d = (e._useUTC ? sd : QD).apply(
      null,
      o
    ), i = e._useUTC ? e._d.getUTCDay() : e._d.getDay(), e._tzm != null && e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), e._nextDay && (e._a[Mo] = 24), e._w && typeof e._w.d < "u" && e._w.d !== i && (nn(e).weekdayMismatch = !0);
  }
}
function KA(e) {
  var t, n, o, r, i, a, l, s, u;
  t = e._w, t.GG != null || t.W != null || t.E != null ? (i = 1, a = 4, n = fu(
    t.GG,
    e._a[Zo],
    ud(no(), 1, 4).year
  ), o = fu(t.W, 1), r = fu(t.E, 1), (r < 1 || r > 7) && (s = !0)) : (i = e._locale._week.dow, a = e._locale._week.doy, u = ud(no(), i, a), n = fu(t.gg, e._a[Zo], u.year), o = fu(t.w, u.week), t.d != null ? (r = t.d, (r < 0 || r > 6) && (s = !0)) : t.e != null ? (r = t.e + i, (t.e < 0 || t.e > 6) && (s = !0)) : r = i), o < 1 || o > Ea(n, i, a) ? nn(e)._overflowWeeks = !0 : s != null ? nn(e)._overflowWeekday = !0 : (l = bO(n, o, r, i, a), e._a[Zo] = l.year, e._dayOfYear = l.dayOfYear);
}
mt.ISO_8601 = function() {
};
mt.RFC_2822 = function() {
};
function Py(e) {
  if (e._f === mt.ISO_8601) {
    CO(e);
    return;
  }
  if (e._f === mt.RFC_2822) {
    $O(e);
    return;
  }
  e._a = [], nn(e).empty = !0;
  var t = "" + e._i, n, o, r, i, a, l = t.length, s = 0, u, c;
  for (r = aO(e._f, e._locale).match(py) || [], c = r.length, n = 0; n < c; n++)
    i = r[n], o = (t.match(ED(i, e)) || [])[0], o && (a = t.substr(0, t.indexOf(o)), a.length > 0 && nn(e).unusedInput.push(a), t = t.slice(
      t.indexOf(o) + o.length
    ), s += o.length), Cu[i] ? (o ? nn(e).empty = !1 : nn(e).unusedTokens.push(i), AD(i, o, e)) : e._strict && !o && nn(e).unusedTokens.push(i);
  nn(e).charsLeftOver = l - s, t.length > 0 && nn(e).unusedInput.push(t), e._a[Mo] <= 12 && nn(e).bigHour === !0 && e._a[Mo] > 0 && (nn(e).bigHour = void 0), nn(e).parsedDateParts = e._a.slice(0), nn(e).meridiem = e._meridiem, e._a[Mo] = qA(
    e._locale,
    e._a[Mo],
    e._meridiem
  ), u = nn(e).era, u !== null && (e._a[Zo] = e._locale.erasConvertYear(u, e._a[Zo])), $y(e), Cy(e);
}
function qA(e, t, n) {
  var o;
  return n == null ? t : e.meridiemHour != null ? e.meridiemHour(t, n) : (e.isPM != null && (o = e.isPM(n), o && t < 12 && (t += 12), !o && t === 12 && (t = 0)), t);
}
function YA(e) {
  var t, n, o, r, i, a, l = !1, s = e._f.length;
  if (s === 0) {
    nn(e).invalidFormat = !0, e._d = /* @__PURE__ */ new Date(NaN);
    return;
  }
  for (r = 0; r < s; r++)
    i = 0, a = !1, t = dy({}, e), e._useUTC != null && (t._useUTC = e._useUTC), t._f = e._f[r], Py(t), cy(t) && (a = !0), i += nn(t).charsLeftOver, i += nn(t).unusedTokens.length * 10, nn(t).score = i, l ? i < o && (o = i, n = t) : (o == null || i < o || a) && (o = i, n = t, a && (l = !0));
  wl(e, n || t);
}
function GA(e) {
  if (!e._d) {
    var t = hy(e._i), n = t.day === void 0 ? t.date : t.day;
    e._a = oO(
      [t.year, t.month, n, t.hour, t.minute, t.second, t.millisecond],
      function(o) {
        return o && parseInt(o, 10);
      }
    ), $y(e);
  }
}
function UA(e) {
  var t = new Od(Cy(PO(e)));
  return t._nextDay && (t.add(1, "d"), t._nextDay = void 0), t;
}
function PO(e) {
  var t = e._i, n = e._f;
  return e._locale = e._locale || Ga(e._l), t === null || n === void 0 && t === "" ? oh({ nullInput: !0 }) : (typeof t == "string" && (e._i = t = e._locale.preparse(t)), Ii(t) ? new Od(Cy(t)) : (Pd(t) ? e._d = t : ki(n) ? YA(e) : n ? Py(e) : XA(e), cy(e) || (e._d = null), e));
}
function XA(e) {
  var t = e._i;
  gr(t) ? e._d = new Date(mt.now()) : Pd(t) ? e._d = new Date(t.valueOf()) : typeof t == "string" ? jA(e) : ki(t) ? (e._a = oO(t.slice(0), function(n) {
    return parseInt(n, 10);
  }), $y(e)) : xs(t) ? GA(e) : za(t) ? e._d = new Date(t) : mt.createFromInputFallback(e);
}
function OO(e, t, n, o, r) {
  var i = {};
  return (t === !0 || t === !1) && (o = t, t = void 0), (n === !0 || n === !1) && (o = n, n = void 0), (xs(e) && uy(e) || ki(e) && e.length === 0) && (e = void 0), i._isAMomentObject = !0, i._useUTC = i._isUTC = r, i._l = n, i._i = e, i._f = t, i._strict = o, UA(i);
}
function no(e, t, n, o) {
  return OO(e, t, n, o, !1);
}
var QA = oi(
  "moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",
  function() {
    var e = no.apply(null, arguments);
    return this.isValid() && e.isValid() ? e < this ? this : e : oh();
  }
), ZA = oi(
  "moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",
  function() {
    var e = no.apply(null, arguments);
    return this.isValid() && e.isValid() ? e > this ? this : e : oh();
  }
);
function kO(e, t) {
  var n, o;
  if (t.length === 1 && ki(t[0]) && (t = t[0]), !t.length)
    return no();
  for (n = t[0], o = 1; o < t.length; ++o)
    (!t[o].isValid() || t[o][e](n)) && (n = t[o]);
  return n;
}
function JA() {
  var e = [].slice.call(arguments, 0);
  return kO("isBefore", e);
}
function eN() {
  var e = [].slice.call(arguments, 0);
  return kO("isAfter", e);
}
var tN = function() {
  return Date.now ? Date.now() : +/* @__PURE__ */ new Date();
}, Oc = [
  "year",
  "quarter",
  "month",
  "week",
  "day",
  "hour",
  "minute",
  "second",
  "millisecond"
];
function nN(e) {
  var t, n = !1, o, r = Oc.length;
  for (t in e)
    if (Tn(e, t) && !(bo.call(Oc, t) !== -1 && (e[t] == null || !isNaN(e[t]))))
      return !1;
  for (o = 0; o < r; ++o)
    if (e[Oc[o]]) {
      if (n)
        return !1;
      parseFloat(e[Oc[o]]) !== mn(e[Oc[o]]) && (n = !0);
    }
  return !0;
}
function oN() {
  return this._isValid;
}
function rN() {
  return Mi(NaN);
}
function dh(e) {
  var t = hy(e), n = t.year || 0, o = t.quarter || 0, r = t.month || 0, i = t.week || t.isoWeek || 0, a = t.day || 0, l = t.hour || 0, s = t.minute || 0, u = t.second || 0, c = t.millisecond || 0;
  this._isValid = nN(t), this._milliseconds = +c + u * 1e3 + // 1000
  s * 6e4 + // 1000 * 60
  l * 1e3 * 60 * 60, this._days = +a + i * 7, this._months = +r + o * 3 + n * 12, this._data = {}, this._locale = Ga(), this._bubble();
}
function qf(e) {
  return e instanceof dh;
}
function sm(e) {
  return e < 0 ? Math.round(-1 * e) * -1 : Math.round(e);
}
function iN(e, t, n) {
  var o = Math.min(e.length, t.length), r = Math.abs(e.length - t.length), i = 0, a;
  for (a = 0; a < o; a++)
    mn(e[a]) !== mn(t[a]) && i++;
  return i + r;
}
function IO(e, t) {
  Ht(e, 0, 0, function() {
    var n = this.utcOffset(), o = "+";
    return n < 0 && (n = -n, o = "-"), o + Zi(~~(n / 60), 2) + t + Zi(~~n % 60, 2);
  });
}
IO("Z", ":");
IO("ZZ", "");
$t("Z", sh);
$t("ZZ", sh);
Wn(["Z", "ZZ"], function(e, t, n) {
  n._useUTC = !0, n._tzm = Oy(sh, e);
});
var aN = /([\+\-]|\d\d)/gi;
function Oy(e, t) {
  var n = (t || "").match(e), o, r, i;
  return n === null ? null : (o = n[n.length - 1] || [], r = (o + "").match(aN) || ["-", 0, 0], i = +(r[1] * 60) + mn(r[2]), i === 0 ? 0 : r[0] === "+" ? i : -i);
}
function ky(e, t) {
  var n, o;
  return t._isUTC ? (n = t.clone(), o = (Ii(e) || Pd(e) ? e.valueOf() : no(e).valueOf()) - n.valueOf(), n._d.setTime(n._d.valueOf() + o), mt.updateOffset(n, !1), n) : no(e).local();
}
function um(e) {
  return -Math.round(e._d.getTimezoneOffset());
}
mt.updateOffset = function() {
};
function lN(e, t, n) {
  var o = this._offset || 0, r;
  if (!this.isValid())
    return e != null ? this : NaN;
  if (e != null) {
    if (typeof e == "string") {
      if (e = Oy(sh, e), e === null)
        return this;
    } else Math.abs(e) < 16 && !n && (e = e * 60);
    return !this._isUTC && t && (r = um(this)), this._offset = e, this._isUTC = !0, r != null && this.add(r, "m"), o !== e && (!t || this._changeInProgress ? MO(
      this,
      Mi(e - o, "m"),
      1,
      !1
    ) : this._changeInProgress || (this._changeInProgress = !0, mt.updateOffset(this, !0), this._changeInProgress = null)), this;
  } else
    return this._isUTC ? o : um(this);
}
function sN(e, t) {
  return e != null ? (typeof e != "string" && (e = -e), this.utcOffset(e, t), this) : -this.utcOffset();
}
function uN(e) {
  return this.utcOffset(0, e);
}
function cN(e) {
  return this._isUTC && (this.utcOffset(0, e), this._isUTC = !1, e && this.subtract(um(this), "m")), this;
}
function dN() {
  if (this._tzm != null)
    this.utcOffset(this._tzm, !1, !0);
  else if (typeof this._i == "string") {
    var e = Oy(TD, this._i);
    e != null ? this.utcOffset(e) : this.utcOffset(0, !0);
  }
  return this;
}
function fN(e) {
  return this.isValid() ? (e = e ? no(e).utcOffset() : 0, (this.utcOffset() - e) % 60 === 0) : !1;
}
function pN() {
  return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();
}
function hN() {
  if (!gr(this._isDSTShifted))
    return this._isDSTShifted;
  var e = {}, t;
  return dy(e, this), e = PO(e), e._a ? (t = e._isUTC ? ta(e._a) : no(e._a), this._isDSTShifted = this.isValid() && iN(e._a, t.toArray()) > 0) : this._isDSTShifted = !1, this._isDSTShifted;
}
function gN() {
  return this.isValid() ? !this._isUTC : !1;
}
function vN() {
  return this.isValid() ? this._isUTC : !1;
}
function _O() {
  return this.isValid() ? this._isUTC && this._offset === 0 : !1;
}
var mN = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, bN = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
function Mi(e, t) {
  var n = e, o = null, r, i, a;
  return qf(e) ? n = {
    ms: e._milliseconds,
    d: e._days,
    M: e._months
  } : za(e) || !isNaN(+e) ? (n = {}, t ? n[t] = +e : n.milliseconds = +e) : (o = mN.exec(e)) ? (r = o[1] === "-" ? -1 : 1, n = {
    y: 0,
    d: mn(o[Gi]) * r,
    h: mn(o[Mo]) * r,
    m: mn(o[wi]) * r,
    s: mn(o[Ia]) * r,
    ms: mn(sm(o[gs] * 1e3)) * r
    // the millisecond decimal point is included in the match
  }) : (o = bN.exec(e)) ? (r = o[1] === "-" ? -1 : 1, n = {
    y: Xl(o[2], r),
    M: Xl(o[3], r),
    w: Xl(o[4], r),
    d: Xl(o[5], r),
    h: Xl(o[6], r),
    m: Xl(o[7], r),
    s: Xl(o[8], r)
  }) : n == null ? n = {} : typeof n == "object" && ("from" in n || "to" in n) && (a = yN(
    no(n.from),
    no(n.to)
  ), n = {}, n.ms = a.milliseconds, n.M = a.months), i = new dh(n), qf(e) && Tn(e, "_locale") && (i._locale = e._locale), qf(e) && Tn(e, "_isValid") && (i._isValid = e._isValid), i;
}
Mi.fn = dh.prototype;
Mi.invalid = rN;
function Xl(e, t) {
  var n = e && parseFloat(e.replace(",", "."));
  return (isNaN(n) ? 0 : n) * t;
}
function Jx(e, t) {
  var n = {};
  return n.months = t.month() - e.month() + (t.year() - e.year()) * 12, e.clone().add(n.months, "M").isAfter(t) && --n.months, n.milliseconds = +t - +e.clone().add(n.months, "M"), n;
}
function yN(e, t) {
  var n;
  return e.isValid() && t.isValid() ? (t = ky(t, e), e.isBefore(t) ? n = Jx(e, t) : (n = Jx(t, e), n.milliseconds = -n.milliseconds, n.months = -n.months), n) : { milliseconds: 0, months: 0 };
}
function TO(e, t) {
  return function(n, o) {
    var r, i;
    return o !== null && !isNaN(+o) && (iO(
      t,
      "moment()." + t + "(period, number) is deprecated. Please use moment()." + t + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."
    ), i = n, n = o, o = i), r = Mi(n, o), MO(this, r, e), this;
  };
}
function MO(e, t, n, o) {
  var r = t._milliseconds, i = sm(t._days), a = sm(t._months);
  e.isValid() && (o = o ?? !0, a && gO(e, ld(e, "Month") + a * n), i && fO(e, "Date", ld(e, "Date") + i * n), r && e._d.setTime(e._d.valueOf() + r * n), o && mt.updateOffset(e, i || a));
}
var xN = TO(1, "add"), wN = TO(-1, "subtract");
function EO(e) {
  return typeof e == "string" || e instanceof String;
}
function SN(e) {
  return Ii(e) || Pd(e) || EO(e) || za(e) || $N(e) || CN(e) || e === null || e === void 0;
}
function CN(e) {
  var t = xs(e) && !uy(e), n = !1, o = [
    "years",
    "year",
    "y",
    "months",
    "month",
    "M",
    "days",
    "day",
    "d",
    "dates",
    "date",
    "D",
    "hours",
    "hour",
    "h",
    "minutes",
    "minute",
    "m",
    "seconds",
    "second",
    "s",
    "milliseconds",
    "millisecond",
    "ms"
  ], r, i, a = o.length;
  for (r = 0; r < a; r += 1)
    i = o[r], n = n || Tn(e, i);
  return t && n;
}
function $N(e) {
  var t = ki(e), n = !1;
  return t && (n = e.filter(function(o) {
    return !za(o) && EO(e);
  }).length === 0), t && n;
}
function PN(e) {
  var t = xs(e) && !uy(e), n = !1, o = [
    "sameDay",
    "nextDay",
    "lastDay",
    "nextWeek",
    "lastWeek",
    "sameElse"
  ], r, i;
  for (r = 0; r < o.length; r += 1)
    i = o[r], n = n || Tn(e, i);
  return t && n;
}
function ON(e, t) {
  var n = e.diff(t, "days", !0);
  return n < -6 ? "sameElse" : n < -1 ? "lastWeek" : n < 0 ? "lastDay" : n < 1 ? "sameDay" : n < 2 ? "nextDay" : n < 7 ? "nextWeek" : "sameElse";
}
function kN(e, t) {
  arguments.length === 1 && (arguments[0] ? SN(arguments[0]) ? (e = arguments[0], t = void 0) : PN(arguments[0]) && (t = arguments[0], e = void 0) : (e = void 0, t = void 0));
  var n = e || no(), o = ky(n, this).startOf("day"), r = mt.calendarFormat(this, o) || "sameElse", i = t && (na(t[r]) ? t[r].call(this, n) : t[r]);
  return this.format(
    i || this.localeData().calendar(r, this, no(n))
  );
}
function IN() {
  return new Od(this);
}
function _N(e, t) {
  var n = Ii(e) ? e : no(e);
  return this.isValid() && n.isValid() ? (t = ri(t) || "millisecond", t === "millisecond" ? this.valueOf() > n.valueOf() : n.valueOf() < this.clone().startOf(t).valueOf()) : !1;
}
function TN(e, t) {
  var n = Ii(e) ? e : no(e);
  return this.isValid() && n.isValid() ? (t = ri(t) || "millisecond", t === "millisecond" ? this.valueOf() < n.valueOf() : this.clone().endOf(t).valueOf() < n.valueOf()) : !1;
}
function MN(e, t, n, o) {
  var r = Ii(e) ? e : no(e), i = Ii(t) ? t : no(t);
  return this.isValid() && r.isValid() && i.isValid() ? (o = o || "()", (o[0] === "(" ? this.isAfter(r, n) : !this.isBefore(r, n)) && (o[1] === ")" ? this.isBefore(i, n) : !this.isAfter(i, n))) : !1;
}
function EN(e, t) {
  var n = Ii(e) ? e : no(e), o;
  return this.isValid() && n.isValid() ? (t = ri(t) || "millisecond", t === "millisecond" ? this.valueOf() === n.valueOf() : (o = n.valueOf(), this.clone().startOf(t).valueOf() <= o && o <= this.clone().endOf(t).valueOf())) : !1;
}
function DN(e, t) {
  return this.isSame(e, t) || this.isAfter(e, t);
}
function AN(e, t) {
  return this.isSame(e, t) || this.isBefore(e, t);
}
function NN(e, t, n) {
  var o, r, i;
  if (!this.isValid())
    return NaN;
  if (o = ky(e, this), !o.isValid())
    return NaN;
  switch (r = (o.utcOffset() - this.utcOffset()) * 6e4, t = ri(t), t) {
    case "year":
      i = Yf(this, o) / 12;
      break;
    case "month":
      i = Yf(this, o);
      break;
    case "quarter":
      i = Yf(this, o) / 3;
      break;
    case "second":
      i = (this - o) / 1e3;
      break;
    // 1000
    case "minute":
      i = (this - o) / 6e4;
      break;
    // 1000 * 60
    case "hour":
      i = (this - o) / 36e5;
      break;
    // 1000 * 60 * 60
    case "day":
      i = (this - o - r) / 864e5;
      break;
    // 1000 * 60 * 60 * 24, negate dst
    case "week":
      i = (this - o - r) / 6048e5;
      break;
    // 1000 * 60 * 60 * 24 * 7, negate dst
    default:
      i = this - o;
  }
  return n ? i : Zr(i);
}
function Yf(e, t) {
  if (e.date() < t.date())
    return -Yf(t, e);
  var n = (t.year() - e.year()) * 12 + (t.month() - e.month()), o = e.clone().add(n, "months"), r, i;
  return t - o < 0 ? (r = e.clone().add(n - 1, "months"), i = (t - o) / (o - r)) : (r = e.clone().add(n + 1, "months"), i = (t - o) / (r - o)), -(n + i) || 0;
}
mt.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ";
mt.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]";
function RN() {
  return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");
}
function zN(e) {
  if (!this.isValid())
    return null;
  var t = e !== !0, n = t ? this.clone().utc() : this;
  return n.year() < 0 || n.year() > 9999 ? Kf(
    n,
    t ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"
  ) : na(Date.prototype.toISOString) ? t ? this.toDate().toISOString() : new Date(this.valueOf() + this.utcOffset() * 60 * 1e3).toISOString().replace("Z", Kf(n, "Z")) : Kf(
    n,
    t ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYY-MM-DD[T]HH:mm:ss.SSSZ"
  );
}
function FN() {
  if (!this.isValid())
    return "moment.invalid(/* " + this._i + " */)";
  var e = "moment", t = "", n, o, r, i;
  return this.isLocal() || (e = this.utcOffset() === 0 ? "moment.utc" : "moment.parseZone", t = "Z"), n = "[" + e + '("]', o = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY", r = "-MM-DD[T]HH:mm:ss.SSS", i = t + '[")]', this.format(n + o + r + i);
}
function BN(e) {
  e || (e = this.isUtc() ? mt.defaultFormatUtc : mt.defaultFormat);
  var t = Kf(this, e);
  return this.localeData().postformat(t);
}
function LN(e, t) {
  return this.isValid() && (Ii(e) && e.isValid() || no(e).isValid()) ? Mi({ to: this, from: e }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate();
}
function HN(e) {
  return this.from(no(), e);
}
function VN(e, t) {
  return this.isValid() && (Ii(e) && e.isValid() || no(e).isValid()) ? Mi({ from: this, to: e }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate();
}
function jN(e) {
  return this.to(no(), e);
}
function DO(e) {
  var t;
  return e === void 0 ? this._locale._abbr : (t = Ga(e), t != null && (this._locale = t), this);
}
var AO = oi(
  "moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",
  function(e) {
    return e === void 0 ? this.localeData() : this.locale(e);
  }
);
function NO() {
  return this._locale;
}
var wp = 1e3, $u = 60 * wp, Sp = 60 * $u, RO = (365 * 400 + 97) * 24 * Sp;
function Pu(e, t) {
  return (e % t + t) % t;
}
function zO(e, t, n) {
  return e < 100 && e >= 0 ? new Date(e + 400, t, n) - RO : new Date(e, t, n).valueOf();
}
function FO(e, t, n) {
  return e < 100 && e >= 0 ? Date.UTC(e + 400, t, n) - RO : Date.UTC(e, t, n);
}
function WN(e) {
  var t, n;
  if (e = ri(e), e === void 0 || e === "millisecond" || !this.isValid())
    return this;
  switch (n = this._isUTC ? FO : zO, e) {
    case "year":
      t = n(this.year(), 0, 1);
      break;
    case "quarter":
      t = n(
        this.year(),
        this.month() - this.month() % 3,
        1
      );
      break;
    case "month":
      t = n(this.year(), this.month(), 1);
      break;
    case "week":
      t = n(
        this.year(),
        this.month(),
        this.date() - this.weekday()
      );
      break;
    case "isoWeek":
      t = n(
        this.year(),
        this.month(),
        this.date() - (this.isoWeekday() - 1)
      );
      break;
    case "day":
    case "date":
      t = n(this.year(), this.month(), this.date());
      break;
    case "hour":
      t = this._d.valueOf(), t -= Pu(
        t + (this._isUTC ? 0 : this.utcOffset() * $u),
        Sp
      );
      break;
    case "minute":
      t = this._d.valueOf(), t -= Pu(t, $u);
      break;
    case "second":
      t = this._d.valueOf(), t -= Pu(t, wp);
      break;
  }
  return this._d.setTime(t), mt.updateOffset(this, !0), this;
}
function KN(e) {
  var t, n;
  if (e = ri(e), e === void 0 || e === "millisecond" || !this.isValid())
    return this;
  switch (n = this._isUTC ? FO : zO, e) {
    case "year":
      t = n(this.year() + 1, 0, 1) - 1;
      break;
    case "quarter":
      t = n(
        this.year(),
        this.month() - this.month() % 3 + 3,
        1
      ) - 1;
      break;
    case "month":
      t = n(this.year(), this.month() + 1, 1) - 1;
      break;
    case "week":
      t = n(
        this.year(),
        this.month(),
        this.date() - this.weekday() + 7
      ) - 1;
      break;
    case "isoWeek":
      t = n(
        this.year(),
        this.month(),
        this.date() - (this.isoWeekday() - 1) + 7
      ) - 1;
      break;
    case "day":
    case "date":
      t = n(this.year(), this.month(), this.date() + 1) - 1;
      break;
    case "hour":
      t = this._d.valueOf(), t += Sp - Pu(
        t + (this._isUTC ? 0 : this.utcOffset() * $u),
        Sp
      ) - 1;
      break;
    case "minute":
      t = this._d.valueOf(), t += $u - Pu(t, $u) - 1;
      break;
    case "second":
      t = this._d.valueOf(), t += wp - Pu(t, wp) - 1;
      break;
  }
  return this._d.setTime(t), mt.updateOffset(this, !0), this;
}
function qN() {
  return this._d.valueOf() - (this._offset || 0) * 6e4;
}
function YN() {
  return Math.floor(this.valueOf() / 1e3);
}
function GN() {
  return new Date(this.valueOf());
}
function UN() {
  var e = this;
  return [
    e.year(),
    e.month(),
    e.date(),
    e.hour(),
    e.minute(),
    e.second(),
    e.millisecond()
  ];
}
function XN() {
  var e = this;
  return {
    years: e.year(),
    months: e.month(),
    date: e.date(),
    hours: e.hours(),
    minutes: e.minutes(),
    seconds: e.seconds(),
    milliseconds: e.milliseconds()
  };
}
function QN() {
  return this.isValid() ? this.toISOString() : null;
}
function ZN() {
  return cy(this);
}
function JN() {
  return wl({}, nn(this));
}
function eR() {
  return nn(this).overflow;
}
function tR() {
  return {
    input: this._i,
    format: this._f,
    locale: this._locale,
    isUTC: this._isUTC,
    strict: this._strict
  };
}
Ht("N", 0, 0, "eraAbbr");
Ht("NN", 0, 0, "eraAbbr");
Ht("NNN", 0, 0, "eraAbbr");
Ht("NNNN", 0, 0, "eraName");
Ht("NNNNN", 0, 0, "eraNarrow");
Ht("y", ["y", 1], "yo", "eraYear");
Ht("y", ["yy", 2], 0, "eraYear");
Ht("y", ["yyy", 3], 0, "eraYear");
Ht("y", ["yyyy", 4], 0, "eraYear");
$t("N", Iy);
$t("NN", Iy);
$t("NNN", Iy);
$t("NNNN", fR);
$t("NNNNN", pR);
Wn(
  ["N", "NN", "NNN", "NNNN", "NNNNN"],
  function(e, t, n, o) {
    var r = n._locale.erasParse(e, o, n._strict);
    r ? nn(n).era = r : nn(n).invalidEra = e;
  }
);
$t("y", oc);
$t("yy", oc);
$t("yyy", oc);
$t("yyyy", oc);
$t("yo", hR);
Wn(["y", "yy", "yyy", "yyyy"], Zo);
Wn(["yo"], function(e, t, n, o) {
  var r;
  n._locale._eraYearOrdinalRegex && (r = e.match(n._locale._eraYearOrdinalRegex)), n._locale.eraYearOrdinalParse ? t[Zo] = n._locale.eraYearOrdinalParse(e, r) : t[Zo] = parseInt(e, 10);
});
function nR(e, t) {
  var n, o, r, i = this._eras || Ga("en")._eras;
  for (n = 0, o = i.length; n < o; ++n) {
    switch (typeof i[n].since) {
      case "string":
        r = mt(i[n].since).startOf("day"), i[n].since = r.valueOf();
        break;
    }
    switch (typeof i[n].until) {
      case "undefined":
        i[n].until = 1 / 0;
        break;
      case "string":
        r = mt(i[n].until).startOf("day").valueOf(), i[n].until = r.valueOf();
        break;
    }
  }
  return i;
}
function oR(e, t, n) {
  var o, r, i = this.eras(), a, l, s;
  for (e = e.toUpperCase(), o = 0, r = i.length; o < r; ++o)
    if (a = i[o].name.toUpperCase(), l = i[o].abbr.toUpperCase(), s = i[o].narrow.toUpperCase(), n)
      switch (t) {
        case "N":
        case "NN":
        case "NNN":
          if (l === e)
            return i[o];
          break;
        case "NNNN":
          if (a === e)
            return i[o];
          break;
        case "NNNNN":
          if (s === e)
            return i[o];
          break;
      }
    else if ([a, l, s].indexOf(e) >= 0)
      return i[o];
}
function rR(e, t) {
  var n = e.since <= e.until ? 1 : -1;
  return t === void 0 ? mt(e.since).year() : mt(e.since).year() + (t - e.offset) * n;
}
function iR() {
  var e, t, n, o = this.localeData().eras();
  for (e = 0, t = o.length; e < t; ++e)
    if (n = this.clone().startOf("day").valueOf(), o[e].since <= n && n <= o[e].until || o[e].until <= n && n <= o[e].since)
      return o[e].name;
  return "";
}
function aR() {
  var e, t, n, o = this.localeData().eras();
  for (e = 0, t = o.length; e < t; ++e)
    if (n = this.clone().startOf("day").valueOf(), o[e].since <= n && n <= o[e].until || o[e].until <= n && n <= o[e].since)
      return o[e].narrow;
  return "";
}
function lR() {
  var e, t, n, o = this.localeData().eras();
  for (e = 0, t = o.length; e < t; ++e)
    if (n = this.clone().startOf("day").valueOf(), o[e].since <= n && n <= o[e].until || o[e].until <= n && n <= o[e].since)
      return o[e].abbr;
  return "";
}
function sR() {
  var e, t, n, o, r = this.localeData().eras();
  for (e = 0, t = r.length; e < t; ++e)
    if (n = r[e].since <= r[e].until ? 1 : -1, o = this.clone().startOf("day").valueOf(), r[e].since <= o && o <= r[e].until || r[e].until <= o && o <= r[e].since)
      return (this.year() - mt(r[e].since).year()) * n + r[e].offset;
  return this.year();
}
function uR(e) {
  return Tn(this, "_erasNameRegex") || _y.call(this), e ? this._erasNameRegex : this._erasRegex;
}
function cR(e) {
  return Tn(this, "_erasAbbrRegex") || _y.call(this), e ? this._erasAbbrRegex : this._erasRegex;
}
function dR(e) {
  return Tn(this, "_erasNarrowRegex") || _y.call(this), e ? this._erasNarrowRegex : this._erasRegex;
}
function Iy(e, t) {
  return t.erasAbbrRegex(e);
}
function fR(e, t) {
  return t.erasNameRegex(e);
}
function pR(e, t) {
  return t.erasNarrowRegex(e);
}
function hR(e, t) {
  return t._eraYearOrdinalRegex || oc;
}
function _y() {
  var e = [], t = [], n = [], o = [], r, i, a, l, s, u = this.eras();
  for (r = 0, i = u.length; r < i; ++r)
    a = Ma(u[r].name), l = Ma(u[r].abbr), s = Ma(u[r].narrow), t.push(a), e.push(l), n.push(s), o.push(a), o.push(l), o.push(s);
  this._erasRegex = new RegExp("^(" + o.join("|") + ")", "i"), this._erasNameRegex = new RegExp("^(" + t.join("|") + ")", "i"), this._erasAbbrRegex = new RegExp("^(" + e.join("|") + ")", "i"), this._erasNarrowRegex = new RegExp(
    "^(" + n.join("|") + ")",
    "i"
  );
}
Ht(0, ["gg", 2], 0, function() {
  return this.weekYear() % 100;
});
Ht(0, ["GG", 2], 0, function() {
  return this.isoWeekYear() % 100;
});
function fh(e, t) {
  Ht(0, [e, e.length], 0, t);
}
fh("gggg", "weekYear");
fh("ggggg", "weekYear");
fh("GGGG", "isoWeekYear");
fh("GGGGG", "isoWeekYear");
$t("G", lh);
$t("g", lh);
$t("GG", oo, Rr);
$t("gg", oo, Rr);
$t("GGGG", vy, gy);
$t("gggg", vy, gy);
$t("GGGGG", ah, rh);
$t("ggggg", ah, rh);
Id(
  ["gggg", "ggggg", "GGGG", "GGGGG"],
  function(e, t, n, o) {
    t[o.substr(0, 2)] = mn(e);
  }
);
Id(["gg", "GG"], function(e, t, n, o) {
  t[o] = mt.parseTwoDigitYear(e);
});
function gR(e) {
  return BO.call(
    this,
    e,
    this.week(),
    this.weekday() + this.localeData()._week.dow,
    this.localeData()._week.dow,
    this.localeData()._week.doy
  );
}
function vR(e) {
  return BO.call(
    this,
    e,
    this.isoWeek(),
    this.isoWeekday(),
    1,
    4
  );
}
function mR() {
  return Ea(this.year(), 1, 4);
}
function bR() {
  return Ea(this.isoWeekYear(), 1, 4);
}
function yR() {
  var e = this.localeData()._week;
  return Ea(this.year(), e.dow, e.doy);
}
function xR() {
  var e = this.localeData()._week;
  return Ea(this.weekYear(), e.dow, e.doy);
}
function BO(e, t, n, o, r) {
  var i;
  return e == null ? ud(this, o, r).year : (i = Ea(e, o, r), t > i && (t = i), wR.call(this, e, t, n, o, r));
}
function wR(e, t, n, o, r) {
  var i = bO(e, t, n, o, r), a = sd(i.year, 0, i.dayOfYear);
  return this.year(a.getUTCFullYear()), this.month(a.getUTCMonth()), this.date(a.getUTCDate()), this;
}
Ht("Q", 0, "Qo", "quarter");
$t("Q", lO);
Wn("Q", function(e, t) {
  t[ka] = (mn(e) - 1) * 3;
});
function SR(e) {
  return e == null ? Math.ceil((this.month() + 1) / 3) : this.month((e - 1) * 3 + this.month() % 3);
}
Ht("D", ["DD", 2], "Do", "date");
$t("D", oo, rc);
$t("DD", oo, Rr);
$t("Do", function(e, t) {
  return e ? t._dayOfMonthOrdinalParse || t._ordinalParse : t._dayOfMonthOrdinalParseLenient;
});
Wn(["D", "DD"], Gi);
Wn("Do", function(e, t) {
  t[Gi] = mn(e.match(oo)[0]);
});
var LO = ic("Date", !0);
Ht("DDD", ["DDDD", 3], "DDDo", "dayOfYear");
$t("DDD", ih);
$t("DDDD", sO);
Wn(["DDD", "DDDD"], function(e, t, n) {
  n._dayOfYear = mn(e);
});
function CR(e) {
  var t = Math.round(
    (this.clone().startOf("day") - this.clone().startOf("year")) / 864e5
  ) + 1;
  return e == null ? t : this.add(e - t, "d");
}
Ht("m", ["mm", 2], 0, "minute");
$t("m", oo, my);
$t("mm", oo, Rr);
Wn(["m", "mm"], wi);
var $R = ic("Minutes", !1);
Ht("s", ["ss", 2], 0, "second");
$t("s", oo, my);
$t("ss", oo, Rr);
Wn(["s", "ss"], Ia);
var PR = ic("Seconds", !1);
Ht("S", 0, 0, function() {
  return ~~(this.millisecond() / 100);
});
Ht(0, ["SS", 2], 0, function() {
  return ~~(this.millisecond() / 10);
});
Ht(0, ["SSS", 3], 0, "millisecond");
Ht(0, ["SSSS", 4], 0, function() {
  return this.millisecond() * 10;
});
Ht(0, ["SSSSS", 5], 0, function() {
  return this.millisecond() * 100;
});
Ht(0, ["SSSSSS", 6], 0, function() {
  return this.millisecond() * 1e3;
});
Ht(0, ["SSSSSSS", 7], 0, function() {
  return this.millisecond() * 1e4;
});
Ht(0, ["SSSSSSSS", 8], 0, function() {
  return this.millisecond() * 1e5;
});
Ht(0, ["SSSSSSSSS", 9], 0, function() {
  return this.millisecond() * 1e6;
});
$t("S", ih, lO);
$t("SS", ih, Rr);
$t("SSS", ih, sO);
var Sl, HO;
for (Sl = "SSSS"; Sl.length <= 9; Sl += "S")
  $t(Sl, oc);
function OR(e, t) {
  t[gs] = mn(("0." + e) * 1e3);
}
for (Sl = "S"; Sl.length <= 9; Sl += "S")
  Wn(Sl, OR);
HO = ic("Milliseconds", !1);
Ht("z", 0, 0, "zoneAbbr");
Ht("zz", 0, 0, "zoneName");
function kR() {
  return this._isUTC ? "UTC" : "";
}
function IR() {
  return this._isUTC ? "Coordinated Universal Time" : "";
}
var ut = Od.prototype;
ut.add = xN;
ut.calendar = kN;
ut.clone = IN;
ut.diff = NN;
ut.endOf = KN;
ut.format = BN;
ut.from = LN;
ut.fromNow = HN;
ut.to = VN;
ut.toNow = jN;
ut.get = FD;
ut.invalidAt = eR;
ut.isAfter = _N;
ut.isBefore = TN;
ut.isBetween = MN;
ut.isSame = EN;
ut.isSameOrAfter = DN;
ut.isSameOrBefore = AN;
ut.isValid = ZN;
ut.lang = AO;
ut.locale = DO;
ut.localeData = NO;
ut.max = ZA;
ut.min = QA;
ut.parsingFlags = JN;
ut.set = BD;
ut.startOf = WN;
ut.subtract = wN;
ut.toArray = UN;
ut.toObject = XN;
ut.toDate = GN;
ut.toISOString = zN;
ut.inspect = FN;
typeof Symbol < "u" && Symbol.for != null && (ut[Symbol.for("nodejs.util.inspect.custom")] = function() {
  return "Moment<" + this.format() + ">";
});
ut.toJSON = QN;
ut.toString = RN;
ut.unix = YN;
ut.valueOf = qN;
ut.creationData = tR;
ut.eraName = iR;
ut.eraNarrow = aR;
ut.eraAbbr = lR;
ut.eraYear = sR;
ut.year = dO;
ut.isLeapYear = zD;
ut.weekYear = gR;
ut.isoWeekYear = vR;
ut.quarter = ut.quarters = SR;
ut.month = vO;
ut.daysInMonth = GD;
ut.week = ut.weeks = nA;
ut.isoWeek = ut.isoWeeks = oA;
ut.weeksInYear = yR;
ut.weeksInWeekYear = xR;
ut.isoWeeksInYear = mR;
ut.isoWeeksInISOWeekYear = bR;
ut.date = LO;
ut.day = ut.days = vA;
ut.weekday = mA;
ut.isoWeekday = bA;
ut.dayOfYear = CR;
ut.hour = ut.hours = PA;
ut.minute = ut.minutes = $R;
ut.second = ut.seconds = PR;
ut.millisecond = ut.milliseconds = HO;
ut.utcOffset = lN;
ut.utc = uN;
ut.local = cN;
ut.parseZone = dN;
ut.hasAlignedHourOffset = fN;
ut.isDST = pN;
ut.isLocal = gN;
ut.isUtcOffset = vN;
ut.isUtc = _O;
ut.isUTC = _O;
ut.zoneAbbr = kR;
ut.zoneName = IR;
ut.dates = oi(
  "dates accessor is deprecated. Use date instead.",
  LO
);
ut.months = oi(
  "months accessor is deprecated. Use month instead",
  vO
);
ut.years = oi(
  "years accessor is deprecated. Use year instead",
  dO
);
ut.zone = oi(
  "moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",
  sN
);
ut.isDSTShifted = oi(
  "isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",
  hN
);
function _R(e) {
  return no(e * 1e3);
}
function TR() {
  return no.apply(null, arguments).parseZone();
}
function VO(e) {
  return e;
}
var Mn = fy.prototype;
Mn.calendar = gD;
Mn.longDateFormat = yD;
Mn.invalidDate = wD;
Mn.ordinal = $D;
Mn.preparse = VO;
Mn.postformat = VO;
Mn.relativeTime = OD;
Mn.pastFuture = kD;
Mn.set = pD;
Mn.eras = nR;
Mn.erasParse = oR;
Mn.erasConvertYear = rR;
Mn.erasAbbrRegex = cR;
Mn.erasNameRegex = uR;
Mn.erasNarrowRegex = dR;
Mn.months = WD;
Mn.monthsShort = KD;
Mn.monthsParse = YD;
Mn.monthsRegex = XD;
Mn.monthsShortRegex = UD;
Mn.week = ZD;
Mn.firstDayOfYear = tA;
Mn.firstDayOfWeek = eA;
Mn.weekdays = dA;
Mn.weekdaysMin = pA;
Mn.weekdaysShort = fA;
Mn.weekdaysParse = gA;
Mn.weekdaysRegex = yA;
Mn.weekdaysShortRegex = xA;
Mn.weekdaysMinRegex = wA;
Mn.isPM = CA;
Mn.meridiem = OA;
function Cp(e, t, n, o) {
  var r = Ga(), i = ta().set(o, t);
  return r[n](i, e);
}
function jO(e, t, n) {
  if (za(e) && (t = e, e = void 0), e = e || "", t != null)
    return Cp(e, t, n, "month");
  var o, r = [];
  for (o = 0; o < 12; o++)
    r[o] = Cp(e, o, n, "month");
  return r;
}
function Ty(e, t, n, o) {
  typeof e == "boolean" ? (za(t) && (n = t, t = void 0), t = t || "") : (t = e, n = t, e = !1, za(t) && (n = t, t = void 0), t = t || "");
  var r = Ga(), i = e ? r._week.dow : 0, a, l = [];
  if (n != null)
    return Cp(t, (n + i) % 7, o, "day");
  for (a = 0; a < 7; a++)
    l[a] = Cp(t, (a + i) % 7, o, "day");
  return l;
}
function MR(e, t) {
  return jO(e, t, "months");
}
function ER(e, t) {
  return jO(e, t, "monthsShort");
}
function DR(e, t, n) {
  return Ty(e, t, n, "weekdays");
}
function AR(e, t, n) {
  return Ty(e, t, n, "weekdaysShort");
}
function NR(e, t, n) {
  return Ty(e, t, n, "weekdaysMin");
}
kl("en", {
  eras: [
    {
      since: "0001-01-01",
      until: 1 / 0,
      offset: 1,
      name: "Anno Domini",
      narrow: "AD",
      abbr: "AD"
    },
    {
      since: "0000-12-31",
      until: -1 / 0,
      offset: 1,
      name: "Before Christ",
      narrow: "BC",
      abbr: "BC"
    }
  ],
  dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
  ordinal: function(e) {
    var t = e % 10, n = mn(e % 100 / 10) === 1 ? "th" : t === 1 ? "st" : t === 2 ? "nd" : t === 3 ? "rd" : "th";
    return e + n;
  }
});
mt.lang = oi(
  "moment.lang is deprecated. Use moment.locale instead.",
  kl
);
mt.langData = oi(
  "moment.langData is deprecated. Use moment.localeData instead.",
  Ga
);
var ga = Math.abs;
function RR() {
  var e = this._data;
  return this._milliseconds = ga(this._milliseconds), this._days = ga(this._days), this._months = ga(this._months), e.milliseconds = ga(e.milliseconds), e.seconds = ga(e.seconds), e.minutes = ga(e.minutes), e.hours = ga(e.hours), e.months = ga(e.months), e.years = ga(e.years), this;
}
function WO(e, t, n, o) {
  var r = Mi(t, n);
  return e._milliseconds += o * r._milliseconds, e._days += o * r._days, e._months += o * r._months, e._bubble();
}
function zR(e, t) {
  return WO(this, e, t, 1);
}
function FR(e, t) {
  return WO(this, e, t, -1);
}
function ew(e) {
  return e < 0 ? Math.floor(e) : Math.ceil(e);
}
function BR() {
  var e = this._milliseconds, t = this._days, n = this._months, o = this._data, r, i, a, l, s;
  return e >= 0 && t >= 0 && n >= 0 || e <= 0 && t <= 0 && n <= 0 || (e += ew(cm(n) + t) * 864e5, t = 0, n = 0), o.milliseconds = e % 1e3, r = Zr(e / 1e3), o.seconds = r % 60, i = Zr(r / 60), o.minutes = i % 60, a = Zr(i / 60), o.hours = a % 24, t += Zr(a / 24), s = Zr(KO(t)), n += s, t -= ew(cm(s)), l = Zr(n / 12), n %= 12, o.days = t, o.months = n, o.years = l, this;
}
function KO(e) {
  return e * 4800 / 146097;
}
function cm(e) {
  return e * 146097 / 4800;
}
function LR(e) {
  if (!this.isValid())
    return NaN;
  var t, n, o = this._milliseconds;
  if (e = ri(e), e === "month" || e === "quarter" || e === "year")
    switch (t = this._days + o / 864e5, n = this._months + KO(t), e) {
      case "month":
        return n;
      case "quarter":
        return n / 3;
      case "year":
        return n / 12;
    }
  else
    switch (t = this._days + Math.round(cm(this._months)), e) {
      case "week":
        return t / 7 + o / 6048e5;
      case "day":
        return t + o / 864e5;
      case "hour":
        return t * 24 + o / 36e5;
      case "minute":
        return t * 1440 + o / 6e4;
      case "second":
        return t * 86400 + o / 1e3;
      // Math.floor prevents floating point math errors here
      case "millisecond":
        return Math.floor(t * 864e5) + o;
      default:
        throw new Error("Unknown unit " + e);
    }
}
function Ua(e) {
  return function() {
    return this.as(e);
  };
}
var qO = Ua("ms"), HR = Ua("s"), VR = Ua("m"), jR = Ua("h"), WR = Ua("d"), KR = Ua("w"), qR = Ua("M"), YR = Ua("Q"), GR = Ua("y"), UR = qO;
function XR() {
  return Mi(this);
}
function QR(e) {
  return e = ri(e), this.isValid() ? this[e + "s"]() : NaN;
}
function Rs(e) {
  return function() {
    return this.isValid() ? this._data[e] : NaN;
  };
}
var ZR = Rs("milliseconds"), JR = Rs("seconds"), ez = Rs("minutes"), tz = Rs("hours"), nz = Rs("days"), oz = Rs("months"), rz = Rs("years");
function iz() {
  return Zr(this.days() / 7);
}
var Ca = Math.round, bu = {
  ss: 44,
  // a few seconds to seconds
  s: 45,
  // seconds to minute
  m: 45,
  // minutes to hour
  h: 22,
  // hours to day
  d: 26,
  // days to month/week
  w: null,
  // weeks to month
  M: 11
  // months to year
};
function az(e, t, n, o, r) {
  return r.relativeTime(t || 1, !!n, e, o);
}
function lz(e, t, n, o) {
  var r = Mi(e).abs(), i = Ca(r.as("s")), a = Ca(r.as("m")), l = Ca(r.as("h")), s = Ca(r.as("d")), u = Ca(r.as("M")), c = Ca(r.as("w")), d = Ca(r.as("y")), f = i <= n.ss && ["s", i] || i < n.s && ["ss", i] || a <= 1 && ["m"] || a < n.m && ["mm", a] || l <= 1 && ["h"] || l < n.h && ["hh", l] || s <= 1 && ["d"] || s < n.d && ["dd", s];
  return n.w != null && (f = f || c <= 1 && ["w"] || c < n.w && ["ww", c]), f = f || u <= 1 && ["M"] || u < n.M && ["MM", u] || d <= 1 && ["y"] || ["yy", d], f[2] = t, f[3] = +e > 0, f[4] = o, az.apply(null, f);
}
function sz(e) {
  return e === void 0 ? Ca : typeof e == "function" ? (Ca = e, !0) : !1;
}
function uz(e, t) {
  return bu[e] === void 0 ? !1 : t === void 0 ? bu[e] : (bu[e] = t, e === "s" && (bu.ss = t - 1), !0);
}
function cz(e, t) {
  if (!this.isValid())
    return this.localeData().invalidDate();
  var n = !1, o = bu, r, i;
  return typeof e == "object" && (t = e, e = !1), typeof e == "boolean" && (n = e), typeof t == "object" && (o = Object.assign({}, bu, t), t.s != null && t.ss == null && (o.ss = t.s - 1)), r = this.localeData(), i = lz(this, !n, o, r), n && (i = r.pastFuture(+this, i)), r.postformat(i);
}
var Og = Math.abs;
function eu(e) {
  return (e > 0) - (e < 0) || +e;
}
function ph() {
  if (!this.isValid())
    return this.localeData().invalidDate();
  var e = Og(this._milliseconds) / 1e3, t = Og(this._days), n = Og(this._months), o, r, i, a, l = this.asSeconds(), s, u, c, d;
  return l ? (o = Zr(e / 60), r = Zr(o / 60), e %= 60, o %= 60, i = Zr(n / 12), n %= 12, a = e ? e.toFixed(3).replace(/\.?0+$/, "") : "", s = l < 0 ? "-" : "", u = eu(this._months) !== eu(l) ? "-" : "", c = eu(this._days) !== eu(l) ? "-" : "", d = eu(this._milliseconds) !== eu(l) ? "-" : "", s + "P" + (i ? u + i + "Y" : "") + (n ? u + n + "M" : "") + (t ? c + t + "D" : "") + (r || o || e ? "T" : "") + (r ? d + r + "H" : "") + (o ? d + o + "M" : "") + (e ? d + a + "S" : "")) : "P0D";
}
var On = dh.prototype;
On.isValid = oN;
On.abs = RR;
On.add = zR;
On.subtract = FR;
On.as = LR;
On.asMilliseconds = qO;
On.asSeconds = HR;
On.asMinutes = VR;
On.asHours = jR;
On.asDays = WR;
On.asWeeks = KR;
On.asMonths = qR;
On.asQuarters = YR;
On.asYears = GR;
On.valueOf = UR;
On._bubble = BR;
On.clone = XR;
On.get = QR;
On.milliseconds = ZR;
On.seconds = JR;
On.minutes = ez;
On.hours = tz;
On.days = nz;
On.weeks = iz;
On.months = oz;
On.years = rz;
On.humanize = cz;
On.toISOString = ph;
On.toString = ph;
On.toJSON = ph;
On.locale = DO;
On.localeData = NO;
On.toIsoString = oi(
  "toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",
  ph
);
On.lang = AO;
Ht("X", 0, 0, "unix");
Ht("x", 0, 0, "valueOf");
$t("x", lh);
$t("X", MD);
Wn("X", function(e, t, n) {
  n._d = new Date(parseFloat(e) * 1e3);
});
Wn("x", function(e, t, n) {
  n._d = new Date(mn(e));
});
//! moment.js
mt.version = "2.30.1";
dD(no);
mt.fn = ut;
mt.min = JA;
mt.max = eN;
mt.now = tN;
mt.utc = ta;
mt.unix = _R;
mt.months = MR;
mt.isDate = Pd;
mt.locale = kl;
mt.invalid = oh;
mt.duration = Mi;
mt.isMoment = Ii;
mt.weekdays = DR;
mt.parseZone = TR;
mt.localeData = Ga;
mt.isDuration = qf;
mt.monthsShort = ER;
mt.weekdaysMin = NR;
mt.defineLocale = Sy;
mt.updateLocale = TA;
mt.locales = MA;
mt.weekdaysShort = AR;
mt.normalizeUnits = ri;
mt.relativeTimeRounding = sz;
mt.relativeTimeThreshold = uz;
mt.calendarFormat = ON;
mt.prototype = ut;
mt.HTML5_FMT = {
  DATETIME_LOCAL: "YYYY-MM-DDTHH:mm",
  // <input type="datetime-local" />
  DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss",
  // <input type="datetime-local" step="1" />
  DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS",
  // <input type="datetime-local" step="0.001" />
  DATE: "YYYY-MM-DD",
  // <input type="date" />
  TIME: "HH:mm",
  // <input type="time" />
  TIME_SECONDS: "HH:mm:ss",
  // <input type="time" step="1" />
  TIME_MS: "HH:mm:ss.SSS",
  // <input type="time" step="0.001" />
  WEEK: "GGGG-[W]WW",
  // <input type="week" />
  MONTH: "YYYY-MM"
  // <input type="month" />
};
const Ife = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: mt
}, Symbol.toStringTag, { value: "Module" }));
mt.ISO_8601;
const dz = (e) => mt.isMoment(e), _fe = (e, t) => mt.utc(e, t), Tfe = (e, t) => mt.duration(e, t), fz = (e, t) => mt(e, t), Mfe = (e) => fz(e);
var Ln = /* @__PURE__ */ ((e) => (e.time = "time", e.number = "number", e.string = "string", e.boolean = "boolean", e.trace = "trace", e.geo = "geo", e.enum = "enum", e.other = "other", e.frame = "frame", e.nestedFrames = "nestedFrames", e))(Ln || {});
const kg = "Value", pz = "Time";
function hz(e, t = "", n) {
  return !e || Object.keys(e).length === 0 ? t : ["{", Object.keys(e).sort().map((i) => `${i}="${e[i]}"`).join(", "), "}"].join("");
}
function gz(e, t, n) {
  var o, r;
  const i = (o = e.state) == null ? void 0 : o.displayName, a = !!n;
  if (i && a === ((r = e.state) == null ? void 0 : r.multipleFrames))
    return i;
  const l = vz(e, t);
  return e.state = e.state || {}, e.state.displayName = l, e.state.multipleFrames = a, l;
}
function vz(e, t, n) {
  var o, r, i, a, l;
  const s = ((o = e.config) == null ? void 0 : o.displayName) && ((r = e.config) == null ? void 0 : r.displayName.length), u = !!((a = (i = t?.meta) == null ? void 0 : i.timeCompare) != null && a.isTimeShiftQuery);
  let c = s ? e.config.displayName : e.name;
  if (s)
    return u ? `${c} (comparison)` : c;
  if (t && ((l = e.config) != null && l.displayNameFromDS))
    return u ? `${e.config.displayNameFromDS} (comparison)` : e.config.displayNameFromDS;
  if (e.type === Ln.time && !e.labels)
    return c ?? pz;
  let d = [], f = !1, p = !1;
  if (e.name && e.name !== kg && d.push(e.name), e.labels && t) {
    let v = bz([t]);
    if (v)
      e.labels[v] && (d.push(e.labels[v]), p = !0);
    else {
      let g = hz(e.labels);
      g && (d.push(g), p = !0);
    }
  }
  return t && !f && !p && e.name === kg && t.name && t.name.length > 0 && (d.push(t.name), f = !0), d.length ? c = d.join(" ") : e.name ? c = e.name : c = kg, c === e.name && (c = mz(e, t)), u && (c = `${c} (comparison)`), c;
}
function mz(e, t) {
  let n = 0, o = !1;
  if (t)
    for (let r = 0; r < t.fields.length; r++) {
      const i = t.fields[r];
      if (e === i) {
        if (o = !0, n > 0) {
          n++;
          break;
        }
      } else if (e.name === i.name && (n++, o))
        break;
    }
  return n ? `${e.name} ${n}` : e.name;
}
function bz(e) {
  let t = null;
  for (let n = 0; n < e.length; n++) {
    const o = e[n];
    for (const r of o.fields)
      if (r.labels) {
        for (const i in r.labels)
          if (t === null)
            t = i;
          else if (i !== t)
            return null;
      }
  }
  return t;
}
const yz = /^\s*(-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?|NAN)\s*$/i;
function yu(e) {
  return e instanceof Date || dz(e) ? Ln.time : tD(e) ? Ln.number : om(e) ? yz.test(e) ? Ln.number : e === "true" || e === "TRUE" || e === "True" || e === "false" || e === "FALSE" || e === "False" ? Ln.boolean : Ln.string : nD(e) ? Ln.boolean : Ln.other;
}
function xz(e) {
  if (e.name) {
    const t = e.name.toLowerCase();
    if (t === "date" || t === "time")
      return Ln.time;
  }
  for (let t = 0; t < e.values.length; t++) {
    const n = e.values[t];
    if (n != null)
      return yu(n);
  }
}
function wz(e) {
  return Sz(e);
}
function Sz(e, t) {
  return {
    fields: (t ? e.fields.filter(t) : e.fields).map((r) => {
      let i = r.values;
      return {
        name: r.name,
        type: r.type,
        config: r.config,
        values: i,
        labels: r.labels
      };
    }),
    refId: e.refId,
    meta: e.meta,
    name: e.name
  };
}
var tw, nw;
class Cz {
  constructor() {
    this[tw] = {};
  }
  // Implement "iterator protocol"
  *iterator() {
    for (let t = 0; t < this.length; t++)
      yield this.get(t);
  }
  set(t, n) {
    throw "unsupported operation";
  }
  add(t) {
    throw "unsupported operation";
  }
  push(...t) {
    for (const n of t)
      this.add(n);
    return this.length;
  }
  // Implement "iterable protocol"
  [(nw = Symbol.iterator, tw = Symbol.unscopables, nw)]() {
    return this.iterator();
  }
  forEach(t) {
    return _g(this).forEach(t);
  }
  map(t) {
    return _g(this).map(t);
  }
  filter(t) {
    return _g(this).filter(t);
  }
  at(t) {
    return this.get(t);
  }
  toArray() {
    const t = new Array(this.length);
    for (let n = 0; n < this.length; n++)
      t[n] = this.get(n);
    return t;
  }
  join(t) {
    return this.toArray().join(t);
  }
  toJSON() {
    return this.toArray();
  }
  pop() {
    throw new Error("Method not implemented.");
  }
  concat(...t) {
    throw new Error("Method not implemented.");
  }
  reverse() {
    throw new Error("Method not implemented.");
  }
  shift() {
    throw new Error("Method not implemented.");
  }
  sort(t) {
    throw new Error("Method not implemented.");
  }
  splice(t, n, ...o) {
    throw new Error("Method not implemented.");
  }
  unshift(...t) {
    throw new Error("Method not implemented.");
  }
  fill(t, n, o) {
    throw new Error("Method not implemented.");
  }
  copyWithin(t, n, o) {
    throw new Error("Method not implemented.");
  }
  //--------------------------------------------------------------------------------
  // Delegated Array function -- these will not be efficient :grimmice:
  //--------------------------------------------------------------------------------
  slice(t, n) {
    return this.toArray().slice(t, n);
  }
  indexOf(t, n) {
    return this.toArray().indexOf(t, n);
  }
  lastIndexOf(t, n) {
    return this.toArray().lastIndexOf(t, n);
  }
  every(t, n) {
    return this.toArray().every(t, n);
  }
  some(t, n) {
    return this.toArray().some(t, n);
  }
  reduce(t, n) {
    throw new Error("Method not implemented.");
  }
  reduceRight(t, n) {
    throw new Error("Method not implemented.");
  }
  find(t, n) {
    return this.toArray().find(t, n);
  }
  findIndex(t, n) {
    return this.toArray().findIndex(t, n);
  }
  entries() {
    return this.toArray().entries();
  }
  keys() {
    return this.toArray().keys();
  }
  values() {
    return this.toArray().values();
  }
  includes(t, n) {
    return this.toArray().includes(t, n);
  }
  flatMap(t, n) {
    return this.toArray().flatMap(t, n);
  }
  flat(t) {
    throw new Error("Method not implemented.");
  }
}
const Ig = [];
function _g(e) {
  return {
    *[Symbol.iterator]() {
      for (let t = 0; t < e.length; t++)
        yield e.get(t);
    },
    forEach(t) {
      for (let n = 0; n < e.length; n++)
        t(e.get(n), n, Ig);
    },
    map(t) {
      const n = [];
      for (let o = 0; o < e.length; o++)
        n.push(t(e.get(o), o, Ig));
      return n;
    },
    /** Add a predicate where you return true if it should *keep* the value */
    filter(t) {
      const n = [];
      let o = 0;
      for (const r of this)
        t(r, o++, Ig) && n.push(r);
      return n;
    }
  };
}
function $z(e, t) {
  return t.type || (t.name === "time" || t.name === "Time" ? t.type = Ln.time : t.type = yu(e)), t.type === Ln.number ? (n) => parseFloat(n) : t.type === Ln.boolean ? (n) => !(n[0] === "F" || n[0] === "f" || n[0] === "0") : (n) => n;
}
const Tg = void 0;
class Pz extends Cz {
  constructor(t, n) {
    if (super(), this.fields = [], this.first = [], this.parsers = void 0, this.creator = n || ((o) => o ?? []), t) {
      const { name: o, refId: r, meta: i, fields: a } = t;
      if (o && (this.name = o), r && (this.refId = r), i && (this.meta = i), a)
        for (const l of a)
          this.addField(l);
    }
    Object.defineProperty(this, "length", {
      enumerable: !0,
      get: () => this.first.length
    });
  }
  // Defined for Vector interface
  get length() {
    return this.first.length;
  }
  addFieldFor(t, n) {
    return this.addField({
      name: n || "",
      // Will be filled in
      type: yu(t)
    });
  }
  addField(t, n) {
    let o;
    t.values && (o = t.values);
    let r = t.type;
    !r && (t.name === "time" || t.name === "Time") ? r = Ln.time : (!r && o && o.length && (r = yu(o[0])), r || (r = Ln.other));
    let i = t.name;
    i || (i = `Field ${this.fields.length + 1}`);
    const a = {
      ...t,
      name: i,
      type: r,
      config: t.config || {},
      values: this.creator(o)
    };
    if (r === Ln.other && (r = xz(a), r && (a.type = r)), this.fields.push(a), this.first = this.fields[0].values, n)
      for (; a.values.length < n; )
        a.values.push(Tg);
    else
      this.validate();
    return a;
  }
  validate() {
    const t = this.fields.reduce((n, o) => Math.max(n, o.values.length), 0);
    for (const n of this.fields)
      for (; n.values.length !== t; )
        n.values.push(Tg);
  }
  /**
   * @deprecated unclear if this is actually used
   */
  setParser(t, n) {
    return this.parsers || (this.parsers = /* @__PURE__ */ new Map()), this.parsers.set(t, n), n;
  }
  parseValue(t, n) {
    var o;
    let r = (o = this.parsers) == null ? void 0 : o.get(t);
    return r || (r = this.setParser(t, $z(n, t))), r(n);
  }
  /**
   * This will add each value to the corresponding column
   */
  appendRow(t) {
    for (let n = this.fields.length; n < t.length; n++)
      this.addField({
        name: `Field ${n + 1}`,
        type: yu(t[n])
      });
    if (this.length < 1)
      for (let n = 0; n < this.fields.length; n++) {
        const o = this.fields[n];
        (!o.type || o.type === Ln.other) && (o.type = yu(t[n]));
      }
    for (let n = 0; n < this.fields.length; n++) {
      const o = this.fields[n];
      let r = t[n];
      o.type !== Ln.string && om(r) && (r = this.parseValue(o, r)), o.values.push(r);
    }
  }
  /** support standard array push syntax */
  push(...t) {
    for (const n of t)
      this.add(n);
    return this.length;
  }
  reverse() {
    for (const t of this.fields)
      t.values.reverse();
    return this;
  }
  /**
   * Add values from an object to corresponding fields. Similar to appendRow but does not create new fields.
   */
  add(t) {
    const n = t;
    for (const o of this.fields) {
      let r = n[o.name];
      o.type !== Ln.string && om(r) && (r = this.parseValue(o, r)), r === void 0 && (r = Tg), o.values.push(r);
    }
  }
  set(t, n) {
    if (t > this.length)
      throw new Error("Unable to set value beyond current length");
    const o = n || {};
    for (const r of this.fields)
      r.values[t] = o[r.name];
  }
  /**
   * Get an object with a property for each field in the DataFrame
   */
  get(t) {
    const n = {};
    for (const o of this.fields)
      n[o.name] = o.values[t];
    return n;
  }
  /**
   * The simplified JSON values used in JSON.stringify()
   */
  toJSON() {
    return wz(this);
  }
}
function Oz(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
function Efe(e) {
  if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
  var t = e.default;
  if (typeof t == "function") {
    var n = function o() {
      return this instanceof o ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
    };
    n.prototype = t.prototype;
  } else n = {};
  return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(e).forEach(function(o) {
    var r = Object.getOwnPropertyDescriptor(e, o);
    Object.defineProperty(n, o, r.get ? r : {
      enumerable: !0,
      get: function() {
        return e[o];
      }
    });
  }), n;
}
function $p(e) {
  "@babel/helpers - typeof";
  return $p = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
    return typeof t;
  } : function(t) {
    return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
  }, $p(e);
}
var kz = /^\s+/, Iz = /\s+$/;
function At(e, t) {
  if (e = e || "", t = t || {}, e instanceof At)
    return e;
  if (!(this instanceof At))
    return new At(e, t);
  var n = _z(e);
  this._originalInput = e, this._r = n.r, this._g = n.g, this._b = n.b, this._a = n.a, this._roundA = Math.round(100 * this._a) / 100, this._format = t.format || n.format, this._gradientType = t.gradientType, this._r < 1 && (this._r = Math.round(this._r)), this._g < 1 && (this._g = Math.round(this._g)), this._b < 1 && (this._b = Math.round(this._b)), this._ok = n.ok;
}
At.prototype = {
  isDark: function() {
    return this.getBrightness() < 128;
  },
  isLight: function() {
    return !this.isDark();
  },
  isValid: function() {
    return this._ok;
  },
  getOriginalInput: function() {
    return this._originalInput;
  },
  getFormat: function() {
    return this._format;
  },
  getAlpha: function() {
    return this._a;
  },
  getBrightness: function() {
    var t = this.toRgb();
    return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
  },
  getLuminance: function() {
    var t = this.toRgb(), n, o, r, i, a, l;
    return n = t.r / 255, o = t.g / 255, r = t.b / 255, n <= 0.03928 ? i = n / 12.92 : i = Math.pow((n + 0.055) / 1.055, 2.4), o <= 0.03928 ? a = o / 12.92 : a = Math.pow((o + 0.055) / 1.055, 2.4), r <= 0.03928 ? l = r / 12.92 : l = Math.pow((r + 0.055) / 1.055, 2.4), 0.2126 * i + 0.7152 * a + 0.0722 * l;
  },
  setAlpha: function(t) {
    return this._a = YO(t), this._roundA = Math.round(100 * this._a) / 100, this;
  },
  toHsv: function() {
    var t = rw(this._r, this._g, this._b);
    return {
      h: t.h * 360,
      s: t.s,
      v: t.v,
      a: this._a
    };
  },
  toHsvString: function() {
    var t = rw(this._r, this._g, this._b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), r = Math.round(t.v * 100);
    return this._a == 1 ? "hsv(" + n + ", " + o + "%, " + r + "%)" : "hsva(" + n + ", " + o + "%, " + r + "%, " + this._roundA + ")";
  },
  toHsl: function() {
    var t = ow(this._r, this._g, this._b);
    return {
      h: t.h * 360,
      s: t.s,
      l: t.l,
      a: this._a
    };
  },
  toHslString: function() {
    var t = ow(this._r, this._g, this._b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), r = Math.round(t.l * 100);
    return this._a == 1 ? "hsl(" + n + ", " + o + "%, " + r + "%)" : "hsla(" + n + ", " + o + "%, " + r + "%, " + this._roundA + ")";
  },
  toHex: function(t) {
    return iw(this._r, this._g, this._b, t);
  },
  toHexString: function(t) {
    return "#" + this.toHex(t);
  },
  toHex8: function(t) {
    return Dz(this._r, this._g, this._b, this._a, t);
  },
  toHex8String: function(t) {
    return "#" + this.toHex8(t);
  },
  toRgb: function() {
    return {
      r: Math.round(this._r),
      g: Math.round(this._g),
      b: Math.round(this._b),
      a: this._a
    };
  },
  toRgbString: function() {
    return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")";
  },
  toPercentageRgb: function() {
    return {
      r: Math.round(lo(this._r, 255) * 100) + "%",
      g: Math.round(lo(this._g, 255) * 100) + "%",
      b: Math.round(lo(this._b, 255) * 100) + "%",
      a: this._a
    };
  },
  toPercentageRgbString: function() {
    return this._a == 1 ? "rgb(" + Math.round(lo(this._r, 255) * 100) + "%, " + Math.round(lo(this._g, 255) * 100) + "%, " + Math.round(lo(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(lo(this._r, 255) * 100) + "%, " + Math.round(lo(this._g, 255) * 100) + "%, " + Math.round(lo(this._b, 255) * 100) + "%, " + this._roundA + ")";
  },
  toName: function() {
    return this._a === 0 ? "transparent" : this._a < 1 ? !1 : Kz[iw(this._r, this._g, this._b, !0)] || !1;
  },
  toFilter: function(t) {
    var n = "#" + aw(this._r, this._g, this._b, this._a), o = n, r = this._gradientType ? "GradientType = 1, " : "";
    if (t) {
      var i = At(t);
      o = "#" + aw(i._r, i._g, i._b, i._a);
    }
    return "progid:DXImageTransform.Microsoft.gradient(" + r + "startColorstr=" + n + ",endColorstr=" + o + ")";
  },
  toString: function(t) {
    var n = !!t;
    t = t || this._format;
    var o = !1, r = this._a < 1 && this._a >= 0, i = !n && r && (t === "hex" || t === "hex6" || t === "hex3" || t === "hex4" || t === "hex8" || t === "name");
    return i ? t === "name" && this._a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (o = this.toRgbString()), t === "prgb" && (o = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (o = this.toHexString()), t === "hex3" && (o = this.toHexString(!0)), t === "hex4" && (o = this.toHex8String(!0)), t === "hex8" && (o = this.toHex8String()), t === "name" && (o = this.toName()), t === "hsl" && (o = this.toHslString()), t === "hsv" && (o = this.toHsvString()), o || this.toHexString());
  },
  clone: function() {
    return At(this.toString());
  },
  _applyModification: function(t, n) {
    var o = t.apply(null, [this].concat([].slice.call(n)));
    return this._r = o._r, this._g = o._g, this._b = o._b, this.setAlpha(o._a), this;
  },
  lighten: function() {
    return this._applyModification(zz, arguments);
  },
  brighten: function() {
    return this._applyModification(Fz, arguments);
  },
  darken: function() {
    return this._applyModification(Bz, arguments);
  },
  desaturate: function() {
    return this._applyModification(Az, arguments);
  },
  saturate: function() {
    return this._applyModification(Nz, arguments);
  },
  greyscale: function() {
    return this._applyModification(Rz, arguments);
  },
  spin: function() {
    return this._applyModification(Lz, arguments);
  },
  _applyCombination: function(t, n) {
    return t.apply(null, [this].concat([].slice.call(n)));
  },
  analogous: function() {
    return this._applyCombination(jz, arguments);
  },
  complement: function() {
    return this._applyCombination(Hz, arguments);
  },
  monochromatic: function() {
    return this._applyCombination(Wz, arguments);
  },
  splitcomplement: function() {
    return this._applyCombination(Vz, arguments);
  },
  // Disabled until https://github.com/bgrins/TinyColor/issues/254
  // polyad: function (number) {
  //   return this._applyCombination(polyad, [number]);
  // },
  triad: function() {
    return this._applyCombination(lw, [3]);
  },
  tetrad: function() {
    return this._applyCombination(lw, [4]);
  }
};
At.fromRatio = function(e, t) {
  if ($p(e) == "object") {
    var n = {};
    for (var o in e)
      e.hasOwnProperty(o) && (o === "a" ? n[o] = e[o] : n[o] = Rc(e[o]));
    e = n;
  }
  return At(e, t);
};
function _z(e) {
  var t = {
    r: 0,
    g: 0,
    b: 0
  }, n = 1, o = null, r = null, i = null, a = !1, l = !1;
  return typeof e == "string" && (e = Uz(e)), $p(e) == "object" && (va(e.r) && va(e.g) && va(e.b) ? (t = Tz(e.r, e.g, e.b), a = !0, l = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : va(e.h) && va(e.s) && va(e.v) ? (o = Rc(e.s), r = Rc(e.v), t = Ez(e.h, o, r), a = !0, l = "hsv") : va(e.h) && va(e.s) && va(e.l) && (o = Rc(e.s), i = Rc(e.l), t = Mz(e.h, o, i), a = !0, l = "hsl"), e.hasOwnProperty("a") && (n = e.a)), n = YO(n), {
    ok: a,
    format: e.format || l,
    r: Math.min(255, Math.max(t.r, 0)),
    g: Math.min(255, Math.max(t.g, 0)),
    b: Math.min(255, Math.max(t.b, 0)),
    a: n
  };
}
function Tz(e, t, n) {
  return {
    r: lo(e, 255) * 255,
    g: lo(t, 255) * 255,
    b: lo(n, 255) * 255
  };
}
function ow(e, t, n) {
  e = lo(e, 255), t = lo(t, 255), n = lo(n, 255);
  var o = Math.max(e, t, n), r = Math.min(e, t, n), i, a, l = (o + r) / 2;
  if (o == r)
    i = a = 0;
  else {
    var s = o - r;
    switch (a = l > 0.5 ? s / (2 - o - r) : s / (o + r), o) {
      case e:
        i = (t - n) / s + (t < n ? 6 : 0);
        break;
      case t:
        i = (n - e) / s + 2;
        break;
      case n:
        i = (e - t) / s + 4;
        break;
    }
    i /= 6;
  }
  return {
    h: i,
    s: a,
    l
  };
}
function Mz(e, t, n) {
  var o, r, i;
  e = lo(e, 360), t = lo(t, 100), n = lo(n, 100);
  function a(u, c, d) {
    return d < 0 && (d += 1), d > 1 && (d -= 1), d < 1 / 6 ? u + (c - u) * 6 * d : d < 1 / 2 ? c : d < 2 / 3 ? u + (c - u) * (2 / 3 - d) * 6 : u;
  }
  if (t === 0)
    o = r = i = n;
  else {
    var l = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - l;
    o = a(s, l, e + 1 / 3), r = a(s, l, e), i = a(s, l, e - 1 / 3);
  }
  return {
    r: o * 255,
    g: r * 255,
    b: i * 255
  };
}
function rw(e, t, n) {
  e = lo(e, 255), t = lo(t, 255), n = lo(n, 255);
  var o = Math.max(e, t, n), r = Math.min(e, t, n), i, a, l = o, s = o - r;
  if (a = o === 0 ? 0 : s / o, o == r)
    i = 0;
  else {
    switch (o) {
      case e:
        i = (t - n) / s + (t < n ? 6 : 0);
        break;
      case t:
        i = (n - e) / s + 2;
        break;
      case n:
        i = (e - t) / s + 4;
        break;
    }
    i /= 6;
  }
  return {
    h: i,
    s: a,
    v: l
  };
}
function Ez(e, t, n) {
  e = lo(e, 360) * 6, t = lo(t, 100), n = lo(n, 100);
  var o = Math.floor(e), r = e - o, i = n * (1 - t), a = n * (1 - r * t), l = n * (1 - (1 - r) * t), s = o % 6, u = [n, a, i, i, l, n][s], c = [l, n, n, a, i, i][s], d = [i, i, l, n, n, a][s];
  return {
    r: u * 255,
    g: c * 255,
    b: d * 255
  };
}
function iw(e, t, n, o) {
  var r = [Si(Math.round(e).toString(16)), Si(Math.round(t).toString(16)), Si(Math.round(n).toString(16))];
  return o && r[0].charAt(0) == r[0].charAt(1) && r[1].charAt(0) == r[1].charAt(1) && r[2].charAt(0) == r[2].charAt(1) ? r[0].charAt(0) + r[1].charAt(0) + r[2].charAt(0) : r.join("");
}
function Dz(e, t, n, o, r) {
  var i = [Si(Math.round(e).toString(16)), Si(Math.round(t).toString(16)), Si(Math.round(n).toString(16)), Si(GO(o))];
  return r && i[0].charAt(0) == i[0].charAt(1) && i[1].charAt(0) == i[1].charAt(1) && i[2].charAt(0) == i[2].charAt(1) && i[3].charAt(0) == i[3].charAt(1) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) + i[3].charAt(0) : i.join("");
}
function aw(e, t, n, o) {
  var r = [Si(GO(o)), Si(Math.round(e).toString(16)), Si(Math.round(t).toString(16)), Si(Math.round(n).toString(16))];
  return r.join("");
}
At.equals = function(e, t) {
  return !e || !t ? !1 : At(e).toRgbString() == At(t).toRgbString();
};
At.random = function() {
  return At.fromRatio({
    r: Math.random(),
    g: Math.random(),
    b: Math.random()
  });
};
function Az(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = At(e).toHsl();
  return n.s -= t / 100, n.s = hh(n.s), At(n);
}
function Nz(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = At(e).toHsl();
  return n.s += t / 100, n.s = hh(n.s), At(n);
}
function Rz(e) {
  return At(e).desaturate(100);
}
function zz(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = At(e).toHsl();
  return n.l += t / 100, n.l = hh(n.l), At(n);
}
function Fz(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = At(e).toRgb();
  return n.r = Math.max(0, Math.min(255, n.r - Math.round(255 * -(t / 100)))), n.g = Math.max(0, Math.min(255, n.g - Math.round(255 * -(t / 100)))), n.b = Math.max(0, Math.min(255, n.b - Math.round(255 * -(t / 100)))), At(n);
}
function Bz(e, t) {
  t = t === 0 ? 0 : t || 10;
  var n = At(e).toHsl();
  return n.l -= t / 100, n.l = hh(n.l), At(n);
}
function Lz(e, t) {
  var n = At(e).toHsl(), o = (n.h + t) % 360;
  return n.h = o < 0 ? 360 + o : o, At(n);
}
function Hz(e) {
  var t = At(e).toHsl();
  return t.h = (t.h + 180) % 360, At(t);
}
function lw(e, t) {
  if (isNaN(t) || t <= 0)
    throw new Error("Argument to polyad must be a positive number");
  for (var n = At(e).toHsl(), o = [At(e)], r = 360 / t, i = 1; i < t; i++)
    o.push(At({
      h: (n.h + i * r) % 360,
      s: n.s,
      l: n.l
    }));
  return o;
}
function Vz(e) {
  var t = At(e).toHsl(), n = t.h;
  return [At(e), At({
    h: (n + 72) % 360,
    s: t.s,
    l: t.l
  }), At({
    h: (n + 216) % 360,
    s: t.s,
    l: t.l
  })];
}
function jz(e, t, n) {
  t = t || 6, n = n || 30;
  var o = At(e).toHsl(), r = 360 / n, i = [At(e)];
  for (o.h = (o.h - (r * t >> 1) + 720) % 360; --t; )
    o.h = (o.h + r) % 360, i.push(At(o));
  return i;
}
function Wz(e, t) {
  t = t || 6;
  for (var n = At(e).toHsv(), o = n.h, r = n.s, i = n.v, a = [], l = 1 / t; t--; )
    a.push(At({
      h: o,
      s: r,
      v: i
    })), i = (i + l) % 1;
  return a;
}
At.mix = function(e, t, n) {
  n = n === 0 ? 0 : n || 50;
  var o = At(e).toRgb(), r = At(t).toRgb(), i = n / 100, a = {
    r: (r.r - o.r) * i + o.r,
    g: (r.g - o.g) * i + o.g,
    b: (r.b - o.b) * i + o.b,
    a: (r.a - o.a) * i + o.a
  };
  return At(a);
};
At.readability = function(e, t) {
  var n = At(e), o = At(t);
  return (Math.max(n.getLuminance(), o.getLuminance()) + 0.05) / (Math.min(n.getLuminance(), o.getLuminance()) + 0.05);
};
At.isReadable = function(e, t, n) {
  var o = At.readability(e, t), r, i;
  switch (i = !1, r = Xz(n), r.level + r.size) {
    case "AAsmall":
    case "AAAlarge":
      i = o >= 4.5;
      break;
    case "AAlarge":
      i = o >= 3;
      break;
    case "AAAsmall":
      i = o >= 7;
      break;
  }
  return i;
};
At.mostReadable = function(e, t, n) {
  var o = null, r = 0, i, a, l, s;
  n = n || {}, a = n.includeFallbackColors, l = n.level, s = n.size;
  for (var u = 0; u < t.length; u++)
    i = At.readability(e, t[u]), i > r && (r = i, o = At(t[u]));
  return At.isReadable(e, o, {
    level: l,
    size: s
  }) || !a ? o : (n.includeFallbackColors = !1, At.mostReadable(e, ["#fff", "#000"], n));
};
var dm = At.names = {
  aliceblue: "f0f8ff",
  antiquewhite: "faebd7",
  aqua: "0ff",
  aquamarine: "7fffd4",
  azure: "f0ffff",
  beige: "f5f5dc",
  bisque: "ffe4c4",
  black: "000",
  blanchedalmond: "ffebcd",
  blue: "00f",
  blueviolet: "8a2be2",
  brown: "a52a2a",
  burlywood: "deb887",
  burntsienna: "ea7e5d",
  cadetblue: "5f9ea0",
  chartreuse: "7fff00",
  chocolate: "d2691e",
  coral: "ff7f50",
  cornflowerblue: "6495ed",
  cornsilk: "fff8dc",
  crimson: "dc143c",
  cyan: "0ff",
  darkblue: "00008b",
  darkcyan: "008b8b",
  darkgoldenrod: "b8860b",
  darkgray: "a9a9a9",
  darkgreen: "006400",
  darkgrey: "a9a9a9",
  darkkhaki: "bdb76b",
  darkmagenta: "8b008b",
  darkolivegreen: "556b2f",
  darkorange: "ff8c00",
  darkorchid: "9932cc",
  darkred: "8b0000",
  darksalmon: "e9967a",
  darkseagreen: "8fbc8f",
  darkslateblue: "483d8b",
  darkslategray: "2f4f4f",
  darkslategrey: "2f4f4f",
  darkturquoise: "00ced1",
  darkviolet: "9400d3",
  deeppink: "ff1493",
  deepskyblue: "00bfff",
  dimgray: "696969",
  dimgrey: "696969",
  dodgerblue: "1e90ff",
  firebrick: "b22222",
  floralwhite: "fffaf0",
  forestgreen: "228b22",
  fuchsia: "f0f",
  gainsboro: "dcdcdc",
  ghostwhite: "f8f8ff",
  gold: "ffd700",
  goldenrod: "daa520",
  gray: "808080",
  green: "008000",
  greenyellow: "adff2f",
  grey: "808080",
  honeydew: "f0fff0",
  hotpink: "ff69b4",
  indianred: "cd5c5c",
  indigo: "4b0082",
  ivory: "fffff0",
  khaki: "f0e68c",
  lavender: "e6e6fa",
  lavenderblush: "fff0f5",
  lawngreen: "7cfc00",
  lemonchiffon: "fffacd",
  lightblue: "add8e6",
  lightcoral: "f08080",
  lightcyan: "e0ffff",
  lightgoldenrodyellow: "fafad2",
  lightgray: "d3d3d3",
  lightgreen: "90ee90",
  lightgrey: "d3d3d3",
  lightpink: "ffb6c1",
  lightsalmon: "ffa07a",
  lightseagreen: "20b2aa",
  lightskyblue: "87cefa",
  lightslategray: "789",
  lightslategrey: "789",
  lightsteelblue: "b0c4de",
  lightyellow: "ffffe0",
  lime: "0f0",
  limegreen: "32cd32",
  linen: "faf0e6",
  magenta: "f0f",
  maroon: "800000",
  mediumaquamarine: "66cdaa",
  mediumblue: "0000cd",
  mediumorchid: "ba55d3",
  mediumpurple: "9370db",
  mediumseagreen: "3cb371",
  mediumslateblue: "7b68ee",
  mediumspringgreen: "00fa9a",
  mediumturquoise: "48d1cc",
  mediumvioletred: "c71585",
  midnightblue: "191970",
  mintcream: "f5fffa",
  mistyrose: "ffe4e1",
  moccasin: "ffe4b5",
  navajowhite: "ffdead",
  navy: "000080",
  oldlace: "fdf5e6",
  olive: "808000",
  olivedrab: "6b8e23",
  orange: "ffa500",
  orangered: "ff4500",
  orchid: "da70d6",
  palegoldenrod: "eee8aa",
  palegreen: "98fb98",
  paleturquoise: "afeeee",
  palevioletred: "db7093",
  papayawhip: "ffefd5",
  peachpuff: "ffdab9",
  peru: "cd853f",
  pink: "ffc0cb",
  plum: "dda0dd",
  powderblue: "b0e0e6",
  purple: "800080",
  rebeccapurple: "663399",
  red: "f00",
  rosybrown: "bc8f8f",
  royalblue: "4169e1",
  saddlebrown: "8b4513",
  salmon: "fa8072",
  sandybrown: "f4a460",
  seagreen: "2e8b57",
  seashell: "fff5ee",
  sienna: "a0522d",
  silver: "c0c0c0",
  skyblue: "87ceeb",
  slateblue: "6a5acd",
  slategray: "708090",
  slategrey: "708090",
  snow: "fffafa",
  springgreen: "00ff7f",
  steelblue: "4682b4",
  tan: "d2b48c",
  teal: "008080",
  thistle: "d8bfd8",
  tomato: "ff6347",
  turquoise: "40e0d0",
  violet: "ee82ee",
  wheat: "f5deb3",
  white: "fff",
  whitesmoke: "f5f5f5",
  yellow: "ff0",
  yellowgreen: "9acd32"
}, Kz = At.hexNames = qz(dm);
function qz(e) {
  var t = {};
  for (var n in e)
    e.hasOwnProperty(n) && (t[e[n]] = n);
  return t;
}
function YO(e) {
  return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
}
function lo(e, t) {
  Yz(e) && (e = "100%");
  var n = Gz(e);
  return e = Math.min(t, Math.max(0, parseFloat(e))), n && (e = parseInt(e * t, 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : e % t / parseFloat(t);
}
function hh(e) {
  return Math.min(1, Math.max(0, e));
}
function $r(e) {
  return parseInt(e, 16);
}
function Yz(e) {
  return typeof e == "string" && e.indexOf(".") != -1 && parseFloat(e) === 1;
}
function Gz(e) {
  return typeof e == "string" && e.indexOf("%") != -1;
}
function Si(e) {
  return e.length == 1 ? "0" + e : "" + e;
}
function Rc(e) {
  return e <= 1 && (e = e * 100 + "%"), e;
}
function GO(e) {
  return Math.round(parseFloat(e) * 255).toString(16);
}
function sw(e) {
  return $r(e) / 255;
}
var fi = (function() {
  var e = "[-\\+]?\\d+%?", t = "[-\\+]?\\d*\\.\\d+%?", n = "(?:" + t + ")|(?:" + e + ")", o = "[\\s|\\(]+(" + n + ")[,|\\s]+(" + n + ")[,|\\s]+(" + n + ")\\s*\\)?", r = "[\\s|\\(]+(" + n + ")[,|\\s]+(" + n + ")[,|\\s]+(" + n + ")[,|\\s]+(" + n + ")\\s*\\)?";
  return {
    CSS_UNIT: new RegExp(n),
    rgb: new RegExp("rgb" + o),
    rgba: new RegExp("rgba" + r),
    hsl: new RegExp("hsl" + o),
    hsla: new RegExp("hsla" + r),
    hsv: new RegExp("hsv" + o),
    hsva: new RegExp("hsva" + r),
    hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
    hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
    hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
    hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
  };
})();
function va(e) {
  return !!fi.CSS_UNIT.exec(e);
}
function Uz(e) {
  e = e.replace(kz, "").replace(Iz, "").toLowerCase();
  var t = !1;
  if (dm[e])
    e = dm[e], t = !0;
  else if (e == "transparent")
    return {
      r: 0,
      g: 0,
      b: 0,
      a: 0,
      format: "name"
    };
  var n;
  return (n = fi.rgb.exec(e)) ? {
    r: n[1],
    g: n[2],
    b: n[3]
  } : (n = fi.rgba.exec(e)) ? {
    r: n[1],
    g: n[2],
    b: n[3],
    a: n[4]
  } : (n = fi.hsl.exec(e)) ? {
    h: n[1],
    s: n[2],
    l: n[3]
  } : (n = fi.hsla.exec(e)) ? {
    h: n[1],
    s: n[2],
    l: n[3],
    a: n[4]
  } : (n = fi.hsv.exec(e)) ? {
    h: n[1],
    s: n[2],
    v: n[3]
  } : (n = fi.hsva.exec(e)) ? {
    h: n[1],
    s: n[2],
    v: n[3],
    a: n[4]
  } : (n = fi.hex8.exec(e)) ? {
    r: $r(n[1]),
    g: $r(n[2]),
    b: $r(n[3]),
    a: sw(n[4]),
    format: t ? "name" : "hex8"
  } : (n = fi.hex6.exec(e)) ? {
    r: $r(n[1]),
    g: $r(n[2]),
    b: $r(n[3]),
    format: t ? "name" : "hex"
  } : (n = fi.hex4.exec(e)) ? {
    r: $r(n[1] + "" + n[1]),
    g: $r(n[2] + "" + n[2]),
    b: $r(n[3] + "" + n[3]),
    a: sw(n[4] + "" + n[4]),
    format: t ? "name" : "hex8"
  } : (n = fi.hex3.exec(e)) ? {
    r: $r(n[1] + "" + n[1]),
    g: $r(n[2] + "" + n[2]),
    b: $r(n[3] + "" + n[3]),
    format: t ? "name" : "hex"
  } : !1;
}
function Xz(e) {
  var t, n;
  return e = e || {
    level: "AA",
    size: "small"
  }, t = (e.level || "AA").toUpperCase(), n = (e.size || "small").toLowerCase(), t !== "AA" && t !== "AAA" && (t = "AA"), n !== "small" && n !== "large" && (n = "small"), {
    level: t,
    size: n
  };
}
function UO(e) {
  return {
    name: e.name ?? "",
    refId: e.refId ?? "",
    fields: e.fields.map((t) => ({
      name: t.name,
      type: t.type,
      values: { toArray: () => t.values },
      config: t.config ?? {},
      state: {}
    }))
  };
}
function Dfe(e, t, n) {
  return UO({
    name: t || "timeseries",
    refId: "A",
    fields: [
      {
        name: "time",
        type: Ln.time,
        values: e.timestamps.map((o) => o * 1e3)
      },
      ...e.series.map((o) => ({
        name: o.label,
        type: Ln.number,
        values: o.values,
        config: n ? { unit: n } : {}
      }))
    ]
  });
}
function Afe(e) {
  const t = e.fields.filter(
    (o) => o.type === Ln.number || o.type === Ln.time
  );
  return t.length < 2 ? [[], []] : t.map(
    (o) => o.values.toArray().map((r) => r == null ? null : o.type === Ln.time && typeof r == "number" ? r / 1e3 : r)
  );
}
function Nfe(e, t) {
  const n = e.fields.find((o) => o.name === t);
  return n ? n.values.toArray() : [];
}
function Rfe(e, t) {
  return gz(e, t);
}
function zfe(e) {
  for (const t of e.fields)
    if (t.type === Ln.time)
      return {
        name: t.name,
        timestamps: t.values.toArray().map((n) => typeof n == "number" ? n / 1e3 : Number.NaN)
      };
  return { name: "", timestamps: [] };
}
function Ffe(e, t) {
  if (t.length === 0)
    return "#4096ff";
  let n = t[0].color;
  for (const o of t)
    e >= o.value && (n = o.color);
  return n;
}
const _d = /* @__PURE__ */ new Map();
function Mg(e) {
  _d.set(e.type, e);
}
function Pp(e) {
  return _d.get(e);
}
function Bfe() {
  return Array.from(_d.values()).map((e) => e.meta);
}
function Lfe() {
  return Array.from(_d.values());
}
function Hfe() {
  _d.clear();
}
const uw = [
  "api-gateway",
  "auth-service",
  "payment-service",
  "user-service",
  "notification-service",
  "order-service",
  "inventory-service",
  "search-service"
];
function Gf(e) {
  let t = e;
  return () => (t = (t * 16807 + 0) % 2147483647, t / 2147483647);
}
function Qz(e, t, n, o, r) {
  const i = n ^ Math.floor(Date.now() / 5e3) * 2654435761, a = Gf(n), l = Gf(i);
  if (e === "random-walk") {
    const s = Gf((n + Date.now()) % 2147483647), u = r + o * 0.5, c = r * 0.1, d = r + o * 1.8, f = [u];
    for (let p = 1; p < t; p++) {
      const v = f[p - 1], g = (u - v) * 0.05, m = (s() - 0.5) * o * 0.08 + g;
      f.push(Math.max(c, Math.min(d, v + m)));
    }
    return f;
  }
  return Array.from({ length: t }, (s, u) => {
    const c = u / t;
    let d;
    switch (e) {
      case "sine":
        d = r + Math.sin(c * Math.PI * 4 + n) * o + (a() - 0.5) * o * 0.2;
        break;
      case "spike": {
        const p = [0.2, 0.5, 0.8].reduce(
          (v, g) => v + Math.exp(-((c - g) ** 2) / 1e-3) * o * 2,
          0
        );
        d = r + p + (a() - 0.5) * o * 0.15;
        break;
      }
      case "step":
        d = r + Math.floor(c * 5) % 3 * o * 0.5 + (a() - 0.5) * o * 0.1;
        break;
      case "sawtooth":
        d = r + c * 3 % 1 * o + (a() - 0.5) * o * 0.15;
        break;
      case "noise":
        d = r + a() * o;
        break;
      case "trend-up":
        d = r + c * o * 1.5 + Math.sin(c * 10) * o * 0.2 + (a() - 0.5) * o * 0.1;
        break;
      case "trend-down":
        d = r + (1 - c) * o * 1.5 + Math.sin(c * 8) * o * 0.15 + (a() - 0.5) * o * 0.1;
        break;
      case "plateau": {
        const v = c < 0.3 ? c / 0.3 : c > 0.7 ? (1 - c) / 0.30000000000000004 : 1;
        d = r + v * o + (a() - 0.5) * o * 0.1;
        break;
      }
      case "live": {
        if (c < 0.9)
          d = r + Math.sin(c * Math.PI * 4 + n) * o * 0.6 + (a() - 0.5) * o * 0.1;
        else {
          const p = (c - 0.9) / 0.09999999999999998;
          d = r + Math.sin(0.9 * Math.PI * 4 + n) * o * 0.6 + (l() - 0.5) * o * 0.4 * p * 2;
        }
        break;
      }
      default:
        d = r;
    }
    return Math.max(0, d);
  });
}
function XO(e, t = 15, n = 3, o = "sine", r) {
  const i = [];
  for (let l = e.from; l <= e.to; l += t)
    i.push(l);
  const a = Array.from({ length: n }, (l, s) => {
    const u = 20 + (s * 37 + 13) % 60, c = 10 + (s * 53 + 7) % 40, d = Qz(o, i.length, s * 1e3 + 42, u, c);
    return {
      label: r?.[s] ?? uw[s % uw.length],
      values: d
    };
  });
  return { timestamps: i, series: a };
}
function Zz(e, t, n, o) {
  const i = ((n + o) / 2 - e) * 0.05, a = (Math.random() - 0.5) * t * 0.08 + i;
  return Math.max(n, Math.min(o, e + a));
}
function Vfe() {
  const e = Math.floor(Date.now() / 1e3);
  return { from: e - 3600, to: e };
}
function jfe(e, t = 8) {
  const n = (e.to - e.from) / t, o = Array.from({ length: t }, (l, s) => Math.floor(e.from + s * n)), r = ["p50", "p90", "p99"], i = Gf(99), a = r.map((l, s) => {
    const u = [25, 85, 220][s], c = o.map(() => u + i() * u * 0.4);
    return { label: l, values: c };
  });
  return { timestamps: o, series: a };
}
class Jz {
  type = "mock";
  meta = {
    type: "mock",
    displayName: "Mock",
    icon: "🎲"
  };
  defaultQuery = () => ({
    type: "mock",
    metric: "",
    pattern: "sine",
    seriesCount: 3,
    liveAmplitude: 1
  });
  query(t) {
    const { range: n, targets: o, intervalMs: r, maxDataPoints: i } = t, a = n.to - n.from, l = Math.max(r, Math.ceil(a / (i || 1e3))), s = Math.max(Math.round(l / 1e3), 1), u = o.filter((c) => c).map((c) => {
      const { timestamps: d, series: f } = XO(
        { from: n.from / 1e3, to: n.to / 1e3 },
        s,
        c.seriesCount,
        c.pattern,
        c.labels
      ), p = d.map((g) => g * 1e3), v = [
        { name: "Time", type: Ln.time, values: p, config: {} },
        ...f.map((g) => ({
          name: g.label,
          type: Ln.number,
          values: g.values,
          config: { displayNameFromDS: g.label }
        }))
      ];
      return UO({ name: c.metric, refId: "A", fields: v });
    });
    return Promise.resolve({ data: u, state: "Done" });
  }
}
const Il = [
  "#4096ff",
  "#52c41a",
  "#faad14",
  "#ff4d4f",
  "#722ed1",
  "#13c2c2",
  "#eb2f96",
  "#fa8c16",
  "#a0d911",
  "#1677ff",
  "#2f54eb",
  "#f5222d",
  "#fadb14",
  "#7cb305",
  "#08979c",
  "#531dab",
  "#c41d7f",
  "#d4380d",
  "#d48806",
  "#389e0d"
];
function ma(e, t) {
  if (e.length < 2 || t < 2)
    return [...e];
  const n = (i) => [
    Number.parseInt(i.slice(1, 3), 16),
    Number.parseInt(i.slice(3, 5), 16),
    Number.parseInt(i.slice(5, 7), 16)
  ], o = (i) => Math.round(Math.max(0, Math.min(255, i))).toString(16).padStart(2, "0"), r = e.length - 1;
  return Array.from({ length: t }, (i, a) => {
    const l = a / (t - 1) * r, s = Math.min(Math.floor(l), r - 1), u = l - s, [c, d, f] = n(e[s]), [p, v, g] = n(e[s + 1]);
    return `#${o(c + (p - c) * u)}${o(d + (v - d) * u)}${o(f + (g - f) * u)}`;
  });
}
const Yr = {
  classic: Il,
  tableau10: [
    "#4e79a7",
    "#f28e2b",
    "#e15759",
    "#76b7b2",
    "#59a14f",
    "#edc948",
    "#b07aa1",
    "#ff9da7",
    "#9c755f",
    "#bab0ac"
  ],
  "grafana-classic": [
    "#7EB26D",
    "#EAB839",
    "#6ED0E0",
    "#EF843C",
    "#E24D42",
    "#1F78C1",
    "#BA43A9",
    "#705DA0",
    "#508642",
    "#CCA300",
    "#447EBC",
    "#C15C17",
    "#890F02",
    "#0A437C",
    "#6D1F62",
    "#584477",
    "#B7DBAB",
    "#F4D598",
    "#70DBED",
    "#F9BA8F"
  ],
  blues: ma(["#cfe2f3", "#9fc5e8", "#3d85c8", "#0b5394", "#041d3a"], 16),
  reds: ma(["#fce5cd", "#f6b26b", "#e06666", "#cc0000", "#660000"], 16),
  GrYlRd: ma(
    ["#37872d", "#96d98d", "#fee520", "#ff780a", "#f2495c", "#8f3bb8"],
    16
  ),
  "purple-orange": ma(
    ["#7b2d8b", "#d45087", "#ff7c43", "#ffa600", "#f0e442", "#b3de69"],
    16
  ),
  "green-yellow-red": ma(
    ["#1a9850", "#a6d96a", "#fee08b", "#fdae61", "#d73027"],
    16
  ),
  "red-yellow-green": ma(
    ["#d73027", "#fdae61", "#fee08b", "#a6d96a", "#1a9850"],
    16
  ),
  "blue-yellow-red": ma(
    ["#2166ac", "#92c5de", "#d1e5f0", "#fddbc7", "#f4a582", "#b2182b"],
    16
  ),
  "blue-purple": ma(
    ["#045a8d", "#74a9cf", "#ccebc5", "#9ebcda", "#8856a7", "#810f7c"],
    16
  ),
  "yellow-blue": ma(["#ffffd9", "#c7e9b4", "#41b6c4", "#225ea8", "#0c2c84"], 16)
};
function e4(e) {
  return !e || e === "classic" ? Il : Yr[e] ?? Il;
}
function t4(e, t, n = "sequential", o) {
  if (t === 0)
    return [];
  if (e === "fixed") {
    const i = o ?? Il[0];
    return Array.from({ length: t }, () => i);
  }
  if (e === "thresholds")
    return [];
  const r = e4(e);
  return n === "distributed" && t > 1 ? Array.from({ length: t }, (i, a) => {
    const l = Math.round(a * (r.length - 1) / (t - 1));
    return r[l];
  }) : Array.from({ length: t }, (i, a) => r[a % r.length]);
}
const Gn = {
  min: 0,
  max: 100,
  capRound: !0,
  trackWidth: 28,
  fillWidth: 30,
  trackColor: "#F4F5F5",
  sweepAngle: 270,
  valueColor: "#e6e6e6",
  valueSize: 28,
  valueVisible: !0,
  paddingX: 12,
  paddingY: 12,
  thresholdDisplay: "track",
  thresholdLabelDisplay: "none",
  orientation: "auto",
  colorFromScheme: !1,
  valueOffsetY: 18
};
let n4 = 0;
function fm() {
  return `panel-${Date.now()}-${++n4}`;
}
function Xr(e) {
  return [{ id: "A", enabled: !0, dataSource: e }];
}
const o4 = {
  timeseries: {
    queries: Xr({
      type: "mock",
      metric: "http_request_duration_seconds",
      pattern: "sine",
      seriesCount: 3
    }),
    lineWidth: 1.5,
    fillOpacity: 1,
    lineInterpolation: "linear",
    lineStyle: "solid",
    showPoints: !1,
    legendPosition: "bottom",
    tooltipMode: "multi",
    tooltipSort: "none",
    showAxisPointer: !0,
    unit: "",
    decimals: 1
  },
  bar: {
    queries: Xr({
      type: "mock",
      metric: "http_request_duration_seconds",
      pattern: "sine",
      seriesCount: 3,
      labels: ["p50", "p90", "p99"]
    }),
    lineWidth: 1,
    fillOpacity: 80,
    lineInterpolation: "linear",
    lineStyle: "solid",
    showPoints: !1,
    legendPosition: "bottom",
    unit: "ms",
    decimals: 0,
    stacked: !1
  },
  histogram: {
    queries: Xr({ type: "mock", metric: "request_duration_ms", pattern: "sine", seriesCount: 1 }),
    lineWidth: 1,
    fillOpacity: 60,
    lineInterpolation: "linear",
    lineStyle: "solid",
    showPoints: !1,
    legendPosition: "hidden",
    unit: "ms",
    decimals: 0
  },
  stat: {
    queries: Xr({
      type: "mock",
      metric: "http_requests_total",
      pattern: "trend-up",
      seriesCount: 1
    }),
    lineWidth: 1,
    fillOpacity: 0,
    lineInterpolation: "linear",
    lineStyle: "solid",
    showPoints: !1,
    legendPosition: "hidden",
    unit: "",
    decimals: 1,
    statValue: 0,
    statUnit: "",
    statTrend: "flat"
  },
  gauge: {
    queries: Xr({ type: "mock", metric: "system_cpu_usage", pattern: "sine", seriesCount: 1 }),
    lineWidth: 1,
    fillOpacity: 0,
    lineInterpolation: "linear",
    lineStyle: "solid",
    showPoints: !1,
    legendPosition: "hidden",
    unit: "%",
    decimals: 1,
    min: 0,
    max: 100
  },
  table: {
    queries: Xr({ type: "mock", metric: "http_requests", pattern: "noise", seriesCount: 1 }),
    lineWidth: 1,
    fillOpacity: 0,
    lineInterpolation: "linear",
    lineStyle: "solid",
    showPoints: !1,
    legendPosition: "hidden",
    unit: "",
    decimals: 0
  },
  pie: {
    queries: Xr({
      type: "mock",
      metric: "http_requests_by_service",
      pattern: "noise",
      seriesCount: 5
    }),
    lineWidth: 1,
    fillOpacity: 80,
    lineInterpolation: "linear",
    lineStyle: "solid",
    showPoints: !1,
    legendPosition: "bottom",
    unit: "",
    decimals: 1,
    pieType: "pie",
    pieSliceSorting: "desc",
    pieLabels: ["name", "percent"],
    pieShow: "calculate",
    pieCalculation: "lastNotNull"
  }
};
function QO(e, t) {
  const n = t?.id ?? fm();
  return { ...{
    id: n,
    type: e,
    title: `New ${e} panel`,
    description: "",
    queries: [
      {
        id: "A",
        enabled: !0,
        dataSource: { type: "mock", metric: "", pattern: "sine", seriesCount: 3 }
      }
    ],
    drawStyle: "lines",
    lineWidth: 1.5,
    fillOpacity: 1,
    gradientMode: "none",
    lineInterpolation: "linear",
    lineStyle: "solid",
    spanNulls: !1,
    insertNulls: !1,
    showPoints: !1,
    showPointsMode: "auto",
    stackingMode: "none",
    legendPosition: "bottom",
    unit: "",
    decimals: 1,
    thresholds: [],
    thresholdBaseColor: "#73bf69",
    softMin: null,
    softMax: null,
    logScale: !1,
    stacked: !1,
    min: 0,
    max: 100,
    links: [],
    axisPlacement: "left",
    showGridLines: "all",
    gridColor: "#E8E9EA",
    axisLabel: "all",
    axisLabelColor: "#666666",
    axisTick: "hidden",
    axisBorder: "hidden",
    scaleDistribution: "linear",
    centeredZero: !1
  }, ...o4[e], ...t, id: n };
}
function ZO() {
  const e = {}, t = [], n = [
    {
      id: "s1",
      type: "stat",
      title: "Requests/sec",
      x: 0,
      y: 0,
      w: 2,
      h: 4,
      extra: { statValue: 1247, statUnit: "req/s", statTrend: "up", unit: "reqps" }
    },
    {
      id: "s2",
      type: "stat",
      title: "Error Rate",
      x: 2,
      y: 0,
      w: 2,
      h: 4,
      extra: {
        statValue: 0.32,
        statUnit: "%",
        statTrend: "down",
        thresholds: [
          { value: 0, color: "#52c41a", label: "OK" },
          { value: 1, color: "#faad14", label: "Warn" },
          { value: 5, color: "#ff4d4f", label: "Crit" }
        ]
      }
    },
    {
      id: "s3",
      type: "stat",
      title: "P99 Latency",
      x: 4,
      y: 0,
      w: 2,
      h: 4,
      extra: {
        statValue: 342,
        statUnit: "ms",
        statTrend: "up",
        thresholds: [
          { value: 0, color: "#52c41a", label: "OK" },
          { value: 200, color: "#faad14", label: "Warn" },
          { value: 500, color: "#ff4d4f", label: "Crit" }
        ]
      }
    },
    {
      id: "s4",
      type: "stat",
      title: "Uptime",
      x: 6,
      y: 0,
      w: 2,
      h: 4,
      extra: { statValue: 99.97, statUnit: "%", statTrend: "flat" }
    },
    { id: "g1", type: "gauge", title: "CPU", x: 8, y: 0, w: 2, h: 4, extra: { statValue: 67.3 } },
    {
      id: "g2",
      type: "gauge",
      title: "Memory",
      x: 10,
      y: 0,
      w: 2,
      h: 4,
      extra: {
        statValue: 82.1,
        thresholds: [
          { value: 0, color: "#52c41a", label: "OK" },
          { value: 70, color: "#faad14", label: "Warn" },
          { value: 90, color: "#ff4d4f", label: "Crit" }
        ]
      }
    },
    {
      id: "ts1",
      type: "timeseries",
      title: "CPU Usage",
      x: 0,
      y: 4,
      w: 6,
      h: 8,
      extra: {
        description: "by service",
        queries: Xr({
          type: "mock",
          metric: "system_cpu_usage",
          pattern: "sine",
          seriesCount: 4,
          labels: ["api-gateway", "auth-service", "payment-service", "user-service"]
        }),
        unit: "percent"
      }
    },
    {
      id: "ts2",
      type: "timeseries",
      title: "Request Latency",
      x: 6,
      y: 4,
      w: 6,
      h: 8,
      extra: {
        description: "percentiles",
        queries: Xr({
          type: "mock",
          metric: "http_request_duration_seconds",
          pattern: "spike",
          seriesCount: 3,
          labels: ["p50", "p90", "p99"]
        }),
        unit: "ms",
        thresholds: [
          { value: 100, color: "#faad14", label: "Warning 100ms" },
          { value: 300, color: "#ff4d4f", label: "Critical 300ms" }
        ]
      }
    },
    {
      id: "ts3",
      type: "timeseries",
      title: "Throughput",
      x: 0,
      y: 12,
      w: 4,
      h: 8,
      extra: {
        description: "req/s",
        queries: Xr({
          type: "mock",
          metric: "http_requests_total",
          pattern: "trend-up",
          seriesCount: 3,
          labels: ["api-gateway", "auth-service", "payment-service"]
        })
      }
    },
    {
      id: "b1",
      type: "bar",
      title: "Latency Percentiles",
      x: 4,
      y: 12,
      w: 4,
      h: 8,
      extra: { description: "by bucket" }
    },
    { id: "h1", type: "histogram", title: "Duration Distribution", x: 8, y: 12, w: 4, h: 8 },
    {
      id: "ts4",
      type: "timeseries",
      title: "Error Rate",
      x: 0,
      y: 20,
      w: 6,
      h: 8,
      extra: {
        description: "5xx vs 4xx",
        queries: Xr({
          type: "mock",
          metric: "http_errors",
          pattern: "noise",
          seriesCount: 2,
          labels: ["5xx", "4xx"]
        }),
        fillOpacity: 3
      }
    },
    {
      id: "ts5",
      type: "timeseries",
      title: "Network I/O",
      x: 6,
      y: 20,
      w: 6,
      h: 8,
      extra: {
        description: "KB/s",
        queries: Xr({
          type: "mock",
          metric: "network_io",
          pattern: "sawtooth",
          seriesCount: 4,
          labels: ["eth0-rx", "eth0-tx", "eth1-rx", "eth1-tx"]
        }),
        unit: "bytes"
      }
    },
    {
      id: "t1",
      type: "table",
      title: "Recent Requests",
      x: 0,
      y: 28,
      w: 12,
      h: 10,
      extra: { description: "last 80 requests" }
    }
  ];
  for (const o of n) {
    const r = QO(o.type, { id: o.id, title: o.title, ...o.extra });
    e[o.id] = r, t.push({
      i: o.id,
      x: o.x,
      y: o.y,
      w: o.w,
      h: o.h,
      minH: o.type === "stat" || o.type === "gauge" ? 3 : 6
    });
  }
  return { panels: e, layouts: t };
}
function r4() {
  return JSON.stringify(ZO(), null, 2);
}
const My = /* @__PURE__ */ new Map();
function Ql(e) {
  My.set(e.meta.type, e);
}
function i4(e) {
  return My.get(e);
}
function Wfe() {
  return Array.from(My.values());
}
const a4 = {
  meta: { type: "bar", displayNameKey: "config.type.bar", icon: "📊" },
  optionCategories: [
    { key: "general", labelKey: "config.section.general", Component: null },
    { key: "bar-style", labelKey: "config.section.style", Component: null },
    { key: "axes", labelKey: "config.section.axes", Component: null },
    { key: "tooltip", labelKey: "config.section.tooltip", Component: null }
  ]
}, l4 = {
  meta: { type: "gauge", displayNameKey: "config.type.gauge", icon: "🎯" },
  optionCategories: [
    { key: "general", labelKey: "config.section.general", Component: null },
    { key: "value", labelKey: "config.section.value", Component: null },
    { key: "gauge-style", labelKey: "config.section.gaugeStyle", Component: null }
  ]
}, s4 = {
  meta: {
    type: "histogram",
    displayNameKey: "config.type.histogram",
    icon: "📉"
  },
  optionCategories: [
    { key: "general", labelKey: "config.section.general", Component: null },
    { key: "histogram-style", labelKey: "config.section.histStyle", Component: null },
    { key: "tooltip", labelKey: "config.section.tooltip", Component: null }
  ]
}, u4 = {
  meta: { type: "pie", displayNameKey: "config.type.pie", icon: "🥧" },
  optionCategories: [
    { key: "general", labelKey: "config.section.general", Component: null },
    { key: "value", labelKey: "config.section.value", Component: null },
    { key: "pie-style", labelKey: "config.section.pieStyle", Component: null },
    { key: "tooltip", labelKey: "config.section.tooltip", Component: null }
  ]
}, c4 = {
  meta: { type: "stat", displayNameKey: "config.type.stat", icon: "#" },
  optionCategories: [
    { key: "general", labelKey: "config.section.general", Component: null },
    { key: "value", labelKey: "config.section.value", Component: null },
    { key: "stat-style", labelKey: "config.section.gaugeStyle", Component: null }
  ]
}, d4 = {
  meta: { type: "table", displayNameKey: "config.type.table", icon: "📋" },
  optionCategories: [
    { key: "general", labelKey: "config.section.general", Component: null },
    { key: "table-style", labelKey: "config.section.tableStyle", Component: null }
  ]
}, f4 = {
  meta: { type: "timeseries", displayNameKey: "config.type.timeseries", icon: "📈" },
  optionCategories: [
    { key: "general", labelKey: "config.section.general", Component: null },
    { key: "value", labelKey: "config.section.value", Component: null },
    { key: "style", labelKey: "config.section.style", Component: null },
    { key: "axes", labelKey: "config.section.axes", Component: null },
    { key: "tooltip", labelKey: "config.section.tooltip", Component: null }
  ]
};
function p4() {
  Ql(f4), Ql(a4), Ql(s4), Ql(c4), Ql(l4), Ql(d4), Ql(u4);
}
function JO(e) {
  return e === void 0 || e === "0" || e === "3";
}
const h4 = /* @__PURE__ */ new Set(["mean", "min", "max", "sum", "count"]);
function zc(e, t = "lastNotNull", n) {
  if (!JO(n) && h4.has(t)) {
    const r = e.filter((i) => i !== null);
    return r.length > 0 ? r[r.length - 1] ?? 0 : 0;
  }
  const o = e.filter((r) => r !== null);
  switch (t) {
    case "lastNotNull":
      return o.length > 0 ? o[o.length - 1] ?? 0 : 0;
    case "last":
      return e.length > 0 ? e[e.length - 1] ?? 0 : 0;
    case "firstNotNull":
      return o.length > 0 ? o[0] ?? 0 : 0;
    case "first":
      return e.length > 0 ? e[0] ?? 0 : 0;
    case "mean":
      return o.length > 0 ? o.reduce((r, i) => r + i, 0) / o.length : 0;
    case "min":
      return o.length > 0 ? Math.min(...o) : 0;
    case "max":
      return o.length > 0 ? Math.max(...o) : 0;
    case "sum":
      return o.reduce((r, i) => r + i, 0);
    case "count":
      return o.length;
    default:
      return o.length > 0 ? o[o.length - 1] ?? 0 : 0;
  }
}
function sf(e, t) {
  if (!JO(t))
    return null;
  const n = e.filter((r) => r !== null);
  if (n.length < 2)
    return null;
  const o = n[0];
  return o === 0 ? null : (n[n.length - 1] - o) / o;
}
class gh {
  constructor(t) {
    this.props = t;
  }
}
var pm = /* @__PURE__ */ ((e) => (e.LOCAL_STORAGE = "LOCAL_STORAGE", e.IN_MEMORY = "IN_MEMORY", e))(pm || {}), ws = /* @__PURE__ */ ((e) => (e.Linear = "linear", e.Logarithmic = "logarithmic", e.Symlog = "symlog", e))(ws || {}), Pa = /* @__PURE__ */ ((e) => (e.Lines = "lines", e.Bars = "bars", e.Points = "points", e.Histogram = "histogram", e))(Pa || {}), Uf = /* @__PURE__ */ ((e) => (e.Linear = "linear", e.Smooth = "smooth", e.StepBefore = "stepBefore", e.StepAfter = "stepAfter", e))(Uf || {}), hm = /* @__PURE__ */ ((e) => (e.Solid = "solid", e.Dashed = "dashed", e.Dotted = "dotted", e))(hm || {}), Xf = /* @__PURE__ */ ((e) => (e.None = "none", e.Solid = "solid", e.Gradient = "gradient", e))(Xf || {}), ek = /* @__PURE__ */ ((e) => (e[e.Before = -1] = "Before", e[e.Center = 0] = "Center", e[e.After = 1] = "After", e))(ek || {});
function g4(e, t, n) {
  if (!n || n.length === 0)
    return 0;
  const o = n.reduce((r, i) => i.length > r.length ? i : r, "");
  return o === "" || !t.font?.[0] ? 0 : (e.ctx.font = t.font[0], e.ctx.measureText(o).width / devicePixelRatio);
}
function v4(e) {
  return (t, n, o, r) => {
    const i = t.axes[o];
    if (r > 1) {
      const l = i._size;
      if (l !== void 0)
        return l;
    }
    let a = (i.ticks?.size ?? 0) + e;
    return a += g4(t, i, n), Math.ceil(a);
  };
}
class m4 extends gh {
  buildGridConfig() {
    const { grid: t, isDarkMode: n, isLogScale: o } = this.props, r = n ? "#444" : "#E8E9EA", i = o ? 0.1 : 0.2;
    return t ? {
      stroke: t.stroke ?? r,
      width: t.width ?? i,
      show: t.show ?? !0
    } : { stroke: r, width: i, show: !0 };
  }
  buildTicksConfig() {
    const { ticks: t } = this.props;
    return t || { width: 0.3, show: !0 };
  }
  buildXAxisValuesFormatter() {
    if (this.props.isTimeAxis !== !1)
      return (t, n) => n.map((o) => {
        if (o == null || Number.isNaN(o))
          return "";
        const r = new Date(o * 1e3);
        return `${r.getHours().toString().padStart(2, "0")}:${r.getMinutes().toString().padStart(2, "0")}`;
      });
  }
  buildYAxisValuesFormatter() {
    const { yAxisUnit: t, decimalPrecision: n } = this.props;
    return (o, r) => r.map((i) => {
      if (i == null || Number.isNaN(i))
        return "";
      const a = i.toFixed(n ?? 1);
      return t ? `${a} ${t}` : a;
    });
  }
  buildValuesFormatter() {
    const { values: t, scaleKey: n } = this.props;
    if (t)
      return t;
    if (n === "x")
      return this.buildXAxisValuesFormatter();
    if (n === "y")
      return this.buildYAxisValuesFormatter();
  }
  buildSizeCalculator() {
    const { size: t, scaleKey: n } = this.props;
    if (t)
      return t;
    if (n === "y")
      return v4(this.props.gap ?? 5);
  }
  buildStrokeColor() {
    const { stroke: t, isDarkMode: n } = this.props;
    if (t !== void 0)
      return t;
    if (n !== void 0)
      return n ? "white" : "black";
  }
  getConfig() {
    const {
      scaleKey: t,
      label: n,
      show: o = !0,
      side: r = 2,
      space: i,
      gap: a = 5
    } = this.props, l = this.buildGridConfig(), s = this.buildTicksConfig(), u = this.buildValuesFormatter(), c = this.buildSizeCalculator(), d = this.buildStrokeColor(), f = { scale: t, show: o, side: r };
    n && (f.label = n), d && (f.stroke = d), l && (f.grid = l), s && (f.ticks = s), u && (f.values = u), a !== void 0 && (f.gap = a), i !== void 0 && (f.space = i), c && (f.size = c);
    const { border: p } = this.props;
    return p?.show && (f.border = {
      stroke: p.stroke ?? d ?? "#666666",
      width: p.width ?? 1,
      show: !0
    }), f;
  }
  merge(t) {
    this.props = { ...this.props, ...t };
  }
}
const b4 = "#FFFFFF", tk = 30, y4 = 1e6, x4 = 3, w4 = {
  focus: { alpha: 0.3 },
  legend: { show: !1 },
  padding: [16, 16, 8, 8],
  series: [],
  hooks: {}
}, Eg = {
  drag: { setScale: !0 },
  points: {
    one: !0,
    size: (e, t) => (e.series[t]?.points?.size ?? 0) * 3,
    width: (e, t, n) => n / 4,
    stroke: (e, t) => {
      const n = e.series[t]?.points, o = typeof n?.stroke == "function" ? n.stroke : void 0;
      return `${o !== void 0 ? o(e, t) : typeof n?.stroke == "string" ? n.stroke : ""}90`;
    },
    fill: () => b4
  },
  focus: { prox: y4 },
  hover: { prox: tk, bias: 0 }
};
function S4(e, t, n) {
  return e;
}
function C4(e) {
  const t = [10, 5];
  function n(i, a, l) {
    const s = i.ctx;
    s.save(), s.lineWidth = 2, s.setLineDash(t);
    const u = s.canvas.height * 0.9;
    for (const c of l) {
      const d = c.thresholdColor ?? "red", f = S4(
        c.thresholdValue,
        c.thresholdUnit,
        e.yAxisUnit
      ), p = i.valToPos(Number(f), a, !0), v = Math.round(i.bbox.left), g = Math.round(p), m = Math.round(i.bbox.left + i.bbox.width);
      if (s.strokeStyle = d, s.beginPath(), s.moveTo(v, g), s.lineTo(m, g), s.stroke(), c.thresholdLabel) {
        const x = s.measureText(c.thresholdLabel).width, S = m - x - 20, P = s.canvas.height - g > u ? g + 15 : g - 15;
        s.fillStyle = d, s.fillText(c.thresholdLabel, S, P);
      }
    }
  }
  const { scaleKey: o, thresholds: r } = e;
  return (i) => {
    const a = i.ctx;
    n(i, o, r), a.restore();
  };
}
function cw({
  seriesShow: e,
  seriesLabel: t,
  visibleStoredLabels: n,
  hiddenStoredLabels: o,
  hasActivePreference: r
}) {
  const i = !!n?.has(t), a = !!o?.has(t);
  return i ? !0 : a || r ? !1 : e ?? !0;
}
const nk = "series_visibility_";
function $4(e) {
  try {
    const t = localStorage.getItem(nk + e);
    return t ? JSON.parse(t) : null;
  } catch {
    return null;
  }
}
function P4(e, t) {
  try {
    localStorage.setItem(nk + e, JSON.stringify(t));
  } catch {
  }
}
function ok({
  uPlotInstance: e,
  stepInterval: t
}) {
  const n = e.scales.x;
  if (n && typeof n.min == "number") {
    const o = n.min, r = o + t, i = e.valToPos(o, "x"), a = e.valToPos(r, "x");
    return Math.abs(a - i);
  }
  return 0;
}
const O4 = !0, Ro = "u-", k4 = "uplot", I4 = Ro + "hz", _4 = Ro + "vt", T4 = Ro + "title", M4 = Ro + "wrap", E4 = Ro + "under", D4 = Ro + "over", A4 = Ro + "axis", us = Ro + "off", N4 = Ro + "select", R4 = Ro + "cursor-x", z4 = Ro + "cursor-y", F4 = Ro + "cursor-pt", B4 = Ro + "legend", L4 = Ro + "live", H4 = Ro + "inline", V4 = Ro + "series", j4 = Ro + "marker", dw = Ro + "label", W4 = Ro + "value", Fc = "width", Bc = "height", kc = "top", fw = "bottom", tu = "left", Dg = "right", Ey = "#000", pw = Ey + "0", hw = "mousemove", gw = "mousedown", Ag = "mouseup", vw = "mouseenter", mw = "mouseleave", bw = "dblclick", K4 = "resize", q4 = "scroll", yw = "change", Op = "dppxchange", Dy = "--", ac = typeof window < "u", gm = ac ? document : null, Ou = ac ? window : null, Y4 = ac ? navigator : null;
let Rn, uf;
function vm() {
  let e = devicePixelRatio;
  Rn != e && (Rn = e, uf && bm(yw, uf, vm), uf = matchMedia(`(min-resolution: ${Rn - 1e-3}dppx) and (max-resolution: ${Rn + 1e-3}dppx)`), Ss(yw, uf, vm), Ou.dispatchEvent(new CustomEvent(Op)));
}
function Or(e, t) {
  if (t != null) {
    let n = e.classList;
    !n.contains(t) && n.add(t);
  }
}
function mm(e, t) {
  let n = e.classList;
  n.contains(t) && n.remove(t);
}
function to(e, t, n) {
  e.style[t] = n + "px";
}
function pi(e, t, n, o) {
  let r = gm.createElement(e);
  return t != null && Or(r, t), n?.insertBefore(r, o), r;
}
function Gr(e, t) {
  return pi("div", e, t);
}
const xw = /* @__PURE__ */ new WeakMap();
function Hi(e, t, n, o, r) {
  let i = "translate(" + t + "px," + n + "px)", a = xw.get(e);
  i != a && (e.style.transform = i, xw.set(e, i), t < 0 || n < 0 || t > o || n > r ? Or(e, us) : mm(e, us));
}
const ww = /* @__PURE__ */ new WeakMap();
function Sw(e, t, n) {
  let o = t + n, r = ww.get(e);
  o != r && (ww.set(e, o), e.style.background = t, e.style.borderColor = n);
}
const Cw = /* @__PURE__ */ new WeakMap();
function $w(e, t, n, o) {
  let r = t + "" + n, i = Cw.get(e);
  r != i && (Cw.set(e, r), e.style.height = n + "px", e.style.width = t + "px", e.style.marginLeft = o ? -t / 2 + "px" : 0, e.style.marginTop = o ? -n / 2 + "px" : 0);
}
const Ay = { passive: !0 }, G4 = { ...Ay, capture: !0 };
function Ss(e, t, n, o) {
  t.addEventListener(e, n, o ? G4 : Ay);
}
function bm(e, t, n, o) {
  t.removeEventListener(e, n, Ay);
}
ac && vm();
function bi(e, t, n, o) {
  let r;
  n = n || 0, o = o || t.length - 1;
  let i = o <= 2147483647;
  for (; o - n > 1; )
    r = i ? n + o >> 1 : Tr((n + o) / 2), t[r] < e ? n = r : o = r;
  return e - t[n] <= t[o] - e ? n : o;
}
function Fu(e, t, n, o) {
  for (let r = o == 1 ? t : n; r >= t && r <= n; r += o)
    if (e[r] != null)
      return r;
  return -1;
}
function U4(e, t, n, o) {
  let r = vn, i = -vn;
  if (o == 1)
    r = e[t], i = e[n];
  else if (o == -1)
    r = e[n], i = e[t];
  else
    for (let a = t; a <= n; a++) {
      let l = e[a];
      l != null && (l < r && (r = l), l > i && (i = l));
    }
  return [r, i];
}
function X4(e, t, n) {
  let o = vn, r = -vn;
  for (let i = t; i <= n; i++) {
    let a = e[i];
    a != null && a > 0 && (a < o && (o = a), a > r && (r = a));
  }
  return [o, r];
}
function vh(e, t, n, o) {
  let r = kw(e), i = kw(t);
  e == t && (r == -1 ? (e *= n, t /= n) : (e /= n, t *= n));
  let a = n == 10 ? Da : rk, l = r == 1 ? Tr : Qr, s = i == 1 ? Qr : Tr, u = l(a(Io(e))), c = s(a(Io(t))), d = Bu(n, u), f = Bu(n, c);
  return n == 10 && (u < 0 && (d = Un(d, -u)), c < 0 && (f = Un(f, -c))), o || n == 2 ? (e = d * r, t = f * i) : (e = lk(e, d), t = mh(t, f)), [e, t];
}
function Ny(e, t, n, o) {
  let r = vh(e, t, n, o);
  return e == 0 && (r[0] = 0), t == 0 && (r[1] = 0), r;
}
const Ry = 0.1, Pw = {
  mode: 3,
  pad: Ry
}, Yc = {
  pad: 0,
  soft: null,
  mode: 0
}, Q4 = {
  min: Yc,
  max: Yc
};
function kp(e, t, n, o) {
  return bh(n) ? Ow(e, t, n) : (Yc.pad = n, Yc.soft = o ? 0 : null, Yc.mode = o ? 3 : 0, Ow(e, t, Q4));
}
function In(e, t) {
  return e ?? t;
}
function Z4(e, t, n) {
  for (t = In(t, 0), n = In(n, e.length - 1); t <= n; ) {
    if (e[t] != null)
      return !0;
    t++;
  }
  return !1;
}
function Ow(e, t, n) {
  let o = n.min, r = n.max, i = In(o.pad, 0), a = In(r.pad, 0), l = In(o.hard, -vn), s = In(r.hard, vn), u = In(o.soft, vn), c = In(r.soft, -vn), d = In(o.mode, 0), f = In(r.mode, 0), p = t - e, v = Da(p), g = Qo(Io(e), Io(t)), m = Da(g), x = Io(m - v);
  (p < 1e-24 || x > 10) && (p = 0, (e == 0 || t == 0) && (p = 1e-24, d == 2 && u != vn && (i = 0), f == 2 && c != -vn && (a = 0)));
  let S = p || g || 1e3, C = Da(S), P = Bu(10, Tr(C)), $ = S * (p == 0 ? e == 0 ? 0.1 : 1 : i), I = Un(lk(e - $, P / 10), 24), w = e >= u && (d == 1 || d == 3 && I <= u || d == 2 && I >= u) ? u : vn, _ = Qo(l, I < w && e >= w ? w : Jr(w, I)), M = S * (p == 0 ? t == 0 ? 0.1 : 1 : a), N = Un(mh(t + M, P / 10), 24), A = t <= c && (f == 1 || f == 3 && N >= c || f == 2 && N <= c) ? c : -vn, H = Jr(s, N > A && t <= A ? A : Qo(A, N));
  return _ == H && _ == 0 && (H = 100), [_, H];
}
const J4 = new Intl.NumberFormat(ac ? Y4.language : "en-US"), zy = (e) => J4.format(e), zr = Math, Qf = zr.PI, Io = zr.abs, Tr = zr.floor, Oo = zr.round, Qr = zr.ceil, Jr = zr.min, Qo = zr.max, Bu = zr.pow, kw = zr.sign, Da = zr.log10, rk = zr.log2, e3 = (e, t = 1) => zr.sinh(e) * t, Ng = (e, t = 1) => zr.asinh(e / t), vn = 1 / 0;
function Iw(e) {
  return (Da((e ^ e >> 31) - (e >> 31)) | 0) + 1;
}
function ym(e, t, n) {
  return Jr(Qo(e, t), n);
}
function gn(e) {
  return typeof e == "function" ? e : () => e;
}
const t3 = () => {
}, ik = (e) => e, ak = (e, t) => t, n3 = (e) => null, _w = (e) => !0, Tw = (e, t) => e == t, o3 = /\.\d*?(?=9{6,}|0{6,})/gm, Is = (e) => {
  if (uk(e) || Dl.has(e))
    return e;
  const t = `${e}`, n = t.match(o3);
  if (n == null)
    return e;
  let o = n[0].length - 1;
  if (t.indexOf("e-") != -1) {
    let [r, i] = t.split("e");
    return +`${Is(r)}e${i}`;
  }
  return Un(e, o);
};
function is(e, t) {
  return Is(Un(Is(e / t)) * t);
}
function mh(e, t) {
  return Is(Qr(Is(e / t)) * t);
}
function lk(e, t) {
  return Is(Tr(Is(e / t)) * t);
}
function Un(e, t = 0) {
  if (uk(e))
    return e;
  let n = 10 ** t, o = e * n * (1 + Number.EPSILON);
  return Oo(o) / n;
}
const Dl = /* @__PURE__ */ new Map();
function sk(e) {
  return (("" + e).split(".")[1] || "").length;
}
function dd(e, t, n, o) {
  let r = [], i = o.map(sk);
  for (let a = t; a < n; a++) {
    let l = Io(a), s = Un(Bu(e, a), l);
    for (let u = 0; u < o.length; u++) {
      let c = e == 10 ? +`${o[u]}e${a}` : o[u] * s, d = (a >= 0 ? 0 : l) + (a >= i[u] ? 0 : i[u]), f = e == 10 ? c : Un(c, d);
      r.push(f), Dl.set(f, d);
    }
  }
  return r;
}
const Gc = {}, Fy = [], Lu = [null, null], ml = Array.isArray, uk = Number.isInteger, r3 = (e) => e === void 0;
function Mw(e) {
  return typeof e == "string";
}
function bh(e) {
  let t = !1;
  if (e != null) {
    let n = e.constructor;
    t = n == null || n == Object;
  }
  return t;
}
function i3(e) {
  return e != null && typeof e == "object";
}
const a3 = Object.getPrototypeOf(Uint8Array), ck = "__proto__";
function Hu(e, t = bh) {
  let n;
  if (ml(e)) {
    let o = e.find((r) => r != null);
    if (ml(o) || t(o)) {
      n = Array(e.length);
      for (let r = 0; r < e.length; r++)
        n[r] = Hu(e[r], t);
    } else
      n = e.slice();
  } else if (e instanceof a3)
    n = e.slice();
  else if (t(e)) {
    n = {};
    for (let o in e)
      o != ck && (n[o] = Hu(e[o], t));
  } else
    n = e;
  return n;
}
function So(e) {
  let t = arguments;
  for (let n = 1; n < t.length; n++) {
    let o = t[n];
    for (let r in o)
      r != ck && (bh(e[r]) ? So(e[r], Hu(o[r])) : e[r] = Hu(o[r]));
  }
  return e;
}
const l3 = 0, s3 = 1, u3 = 2;
function c3(e, t, n) {
  for (let o = 0, r, i = -1; o < t.length; o++) {
    let a = t[o];
    if (a > i) {
      for (r = a - 1; r >= 0 && e[r] == null; )
        e[r--] = null;
      for (r = a + 1; r < n && e[r] == null; )
        e[i = r++] = null;
    }
  }
}
function d3(e, t) {
  if (h3(e)) {
    let a = e[0].slice();
    for (let l = 1; l < e.length; l++)
      a.push(...e[l].slice(1));
    return g3(a[0]) || (a = p3(a)), a;
  }
  let n = /* @__PURE__ */ new Set();
  for (let a = 0; a < e.length; a++) {
    let s = e[a][0], u = s.length;
    for (let c = 0; c < u; c++)
      n.add(s[c]);
  }
  let o = [Array.from(n).sort((a, l) => a - l)], r = o[0].length, i = /* @__PURE__ */ new Map();
  for (let a = 0; a < r; a++)
    i.set(o[0][a], a);
  for (let a = 0; a < e.length; a++) {
    let l = e[a], s = l[0];
    for (let u = 1; u < l.length; u++) {
      let c = l[u], d = Array(r).fill(void 0), f = t ? t[a][u] : s3, p = [];
      for (let v = 0; v < c.length; v++) {
        let g = c[v], m = i.get(s[v]);
        g === null ? f != l3 && (d[m] = g, f == u3 && p.push(m)) : d[m] = g;
      }
      c3(d, p, r), o.push(d);
    }
  }
  return o;
}
const f3 = typeof queueMicrotask > "u" ? (e) => Promise.resolve().then(e) : queueMicrotask;
function p3(e) {
  let t = e[0], n = t.length, o = Array(n);
  for (let i = 0; i < o.length; i++)
    o[i] = i;
  o.sort((i, a) => t[i] - t[a]);
  let r = [];
  for (let i = 0; i < e.length; i++) {
    let a = e[i], l = Array(n);
    for (let s = 0; s < n; s++)
      l[s] = a[o[s]];
    r.push(l);
  }
  return r;
}
function h3(e) {
  let t = e[0][0], n = t.length;
  for (let o = 1; o < e.length; o++) {
    let r = e[o][0];
    if (r.length != n)
      return !1;
    if (r != t) {
      for (let i = 0; i < n; i++)
        if (r[i] != t[i])
          return !1;
    }
  }
  return !0;
}
function g3(e, t = 100) {
  const n = e.length;
  if (n <= 1)
    return !0;
  let o = 0, r = n - 1;
  for (; o <= r && e[o] == null; )
    o++;
  for (; r >= o && e[r] == null; )
    r--;
  if (r <= o)
    return !0;
  const i = Qo(1, Tr((r - o + 1) / t));
  for (let a = e[o], l = o + i; l <= r; l += i) {
    const s = e[l];
    if (s != null) {
      if (s <= a)
        return !1;
      a = s;
    }
  }
  return !0;
}
const dk = [
  "January",
  "February",
  "March",
  "April",
  "May",
  "June",
  "July",
  "August",
  "September",
  "October",
  "November",
  "December"
], fk = [
  "Sunday",
  "Monday",
  "Tuesday",
  "Wednesday",
  "Thursday",
  "Friday",
  "Saturday"
];
function pk(e) {
  return e.slice(0, 3);
}
const v3 = fk.map(pk), m3 = dk.map(pk), b3 = {
  MMMM: dk,
  MMM: m3,
  WWWW: fk,
  WWW: v3
};
function Ic(e) {
  return (e < 10 ? "0" : "") + e;
}
function y3(e) {
  return (e < 10 ? "00" : e < 100 ? "0" : "") + e;
}
const x3 = {
  // 2019
  YYYY: (e) => e.getFullYear(),
  // 19
  YY: (e) => (e.getFullYear() + "").slice(2),
  // July
  MMMM: (e, t) => t.MMMM[e.getMonth()],
  // Jul
  MMM: (e, t) => t.MMM[e.getMonth()],
  // 07
  MM: (e) => Ic(e.getMonth() + 1),
  // 7
  M: (e) => e.getMonth() + 1,
  // 09
  DD: (e) => Ic(e.getDate()),
  // 9
  D: (e) => e.getDate(),
  // Monday
  WWWW: (e, t) => t.WWWW[e.getDay()],
  // Mon
  WWW: (e, t) => t.WWW[e.getDay()],
  // 03
  HH: (e) => Ic(e.getHours()),
  // 3
  H: (e) => e.getHours(),
  // 9 (12hr, unpadded)
  h: (e) => {
    let t = e.getHours();
    return t == 0 ? 12 : t > 12 ? t - 12 : t;
  },
  // AM
  AA: (e) => e.getHours() >= 12 ? "PM" : "AM",
  // am
  aa: (e) => e.getHours() >= 12 ? "pm" : "am",
  // a
  a: (e) => e.getHours() >= 12 ? "p" : "a",
  // 09
  mm: (e) => Ic(e.getMinutes()),
  // 9
  m: (e) => e.getMinutes(),
  // 09
  ss: (e) => Ic(e.getSeconds()),
  // 9
  s: (e) => e.getSeconds(),
  // 374
  fff: (e) => y3(e.getMilliseconds())
};
function By(e, t) {
  t = t || b3;
  let n = [], o = /\{([a-z]+)\}|[^{]+/gi, r;
  for (; r = o.exec(e); )
    n.push(r[0][0] == "{" ? x3[r[1]] : r[0]);
  return (i) => {
    let a = "";
    for (let l = 0; l < n.length; l++)
      a += typeof n[l] == "string" ? n[l] : n[l](i, t);
    return a;
  };
}
const w3 = new Intl.DateTimeFormat().resolvedOptions().timeZone;
function S3(e, t) {
  let n;
  return t == "UTC" || t == "Etc/UTC" ? n = new Date(+e + e.getTimezoneOffset() * 6e4) : t == w3 ? n = e : (n = new Date(e.toLocaleString("en-US", { timeZone: t })), n.setMilliseconds(e.getMilliseconds())), n;
}
const hk = (e) => e % 1 == 0, Ip = [1, 2, 2.5, 5], C3 = dd(10, -32, 0, Ip), gk = dd(10, 0, 32, Ip), $3 = gk.filter(hk), as = C3.concat(gk), Ly = `
`, vk = "{YYYY}", Ew = Ly + vk, mk = "{M}/{D}", Lc = Ly + mk, cf = Lc + "/{YY}", bk = "{aa}", P3 = "{h}:{mm}", pu = P3 + bk, Dw = Ly + pu, Aw = ":{ss}", zn = null;
function yk(e) {
  let t = e * 1e3, n = t * 60, o = n * 60, r = o * 24, i = r * 30, a = r * 365, s = (e == 1 ? dd(10, 0, 3, Ip).filter(hk) : dd(10, -3, 0, Ip)).concat([
    // minute divisors (# of secs)
    t,
    t * 5,
    t * 10,
    t * 15,
    t * 30,
    // hour divisors (# of mins)
    n,
    n * 5,
    n * 10,
    n * 15,
    n * 30,
    // day divisors (# of hrs)
    o,
    o * 2,
    o * 3,
    o * 4,
    o * 6,
    o * 8,
    o * 12,
    // month divisors TODO: need more?
    r,
    r * 2,
    r * 3,
    r * 4,
    r * 5,
    r * 6,
    r * 7,
    r * 8,
    r * 9,
    r * 10,
    r * 15,
    // year divisors (# months, approx)
    i,
    i * 2,
    i * 3,
    i * 4,
    i * 6,
    // century divisors
    a,
    a * 2,
    a * 5,
    a * 10,
    a * 25,
    a * 50,
    a * 100
  ]);
  const u = [
    //   tick incr    default          year                    month   day                   hour    min       sec   mode
    [a, vk, zn, zn, zn, zn, zn, zn, 1],
    [r * 28, "{MMM}", Ew, zn, zn, zn, zn, zn, 1],
    [r, mk, Ew, zn, zn, zn, zn, zn, 1],
    [o, "{h}" + bk, cf, zn, Lc, zn, zn, zn, 1],
    [n, pu, cf, zn, Lc, zn, zn, zn, 1],
    [t, Aw, cf + " " + pu, zn, Lc + " " + pu, zn, Dw, zn, 1],
    [e, Aw + ".{fff}", cf + " " + pu, zn, Lc + " " + pu, zn, Dw, zn, 1]
  ];
  function c(d) {
    return (f, p, v, g, m, x) => {
      let S = [], C = m >= a, P = m >= i && m < a, $ = d(v), I = Un($ * e, 3), w = Rg($.getFullYear(), C ? 0 : $.getMonth(), P || C ? 1 : $.getDate()), _ = Un(w * e, 3);
      if (P || C) {
        let M = P ? m / i : 0, N = C ? m / a : 0, A = I == _ ? I : Un(Rg(w.getFullYear() + N, w.getMonth() + M, 1) * e, 3), H = new Date(Oo(A / e)), B = H.getFullYear(), F = H.getMonth();
        for (let R = 0; A <= g; R++) {
          let X = Rg(B + N * R, F + M * R, 1), j = X - d(Un(X * e, 3));
          A = Un((+X + j) * e, 3), A <= g && S.push(A);
        }
      } else {
        let M = m >= r ? r : m, N = Tr(v) - Tr(I), A = _ + N + mh(I - _, M);
        S.push(A);
        let H = d(A), B = H.getHours() + H.getMinutes() / n + H.getSeconds() / o, F = m / o, R = f.axes[p]._space, X = x / R;
        for (; A = Un(A + m, e == 1 ? 0 : 3), !(A > g); )
          if (F > 1) {
            let j = Tr(Un(B + F, 6)) % 24, K = d(A).getHours() - j;
            K > 1 && (K = -1), A -= K * o, B = (B + F) % 24;
            let q = S[S.length - 1];
            Un((A - q) / m, 3) * X >= 0.7 && S.push(A);
          } else
            S.push(A);
      }
      return S;
    };
  }
  return [
    s,
    u,
    c
  ];
}
const [O3, k3, I3] = yk(1), [_3, T3, M3] = yk(1e-3);
dd(2, -53, 53, [1]);
function Nw(e, t) {
  return e.map((n) => n.map(
    (o, r) => r == 0 || r == 8 || o == null ? o : t(r == 1 || n[8] == 0 ? o : n[1] + o)
  ));
}
function Rw(e, t) {
  return (n, o, r, i, a) => {
    let l = t.find((v) => a >= v[0]) || t[t.length - 1], s, u, c, d, f, p;
    return o.map((v) => {
      let g = e(v), m = g.getFullYear(), x = g.getMonth(), S = g.getDate(), C = g.getHours(), P = g.getMinutes(), $ = g.getSeconds(), I = m != s && l[2] || x != u && l[3] || S != c && l[4] || C != d && l[5] || P != f && l[6] || $ != p && l[7] || l[1];
      return s = m, u = x, c = S, d = C, f = P, p = $, I(g);
    });
  };
}
function E3(e, t) {
  let n = By(t);
  return (o, r, i, a, l) => r.map((s) => n(e(s)));
}
function Rg(e, t, n) {
  return new Date(e, t, n);
}
function zw(e, t) {
  return t(e);
}
const D3 = "{YYYY}-{MM}-{DD} {h}:{mm}{aa}";
function Fw(e, t) {
  return (n, o, r, i) => i == null ? Dy : t(e(o));
}
function A3(e, t) {
  let n = e.series[t];
  return n.width ? n.stroke(e, t) : n.points.width ? n.points.stroke(e, t) : null;
}
function N3(e, t) {
  return e.series[t].fill(e, t);
}
const R3 = {
  show: !0,
  live: !0,
  isolate: !1,
  mount: t3,
  markers: {
    show: !0,
    width: 2,
    stroke: A3,
    fill: N3,
    dash: "solid"
  },
  idx: null,
  idxs: null,
  values: []
};
function z3(e, t) {
  let n = e.cursor.points, o = Gr(), r = n.size(e, t);
  to(o, Fc, r), to(o, Bc, r);
  let i = r / -2;
  to(o, "marginLeft", i), to(o, "marginTop", i);
  let a = n.width(e, t, r);
  return a && to(o, "borderWidth", a), o;
}
function F3(e, t) {
  let n = e.series[t].points;
  return n._fill || n._stroke;
}
function B3(e, t) {
  let n = e.series[t].points;
  return n._stroke || n._fill;
}
function L3(e, t) {
  return e.series[t].points.size;
}
const zg = [0, 0];
function H3(e, t, n) {
  return zg[0] = t, zg[1] = n, zg;
}
function df(e, t, n, o = !0) {
  return (r) => {
    r.button == 0 && (!o || r.target == t) && n(r);
  };
}
function Fg(e, t, n, o = !0) {
  return (r) => {
    (!o || r.target == t) && n(r);
  };
}
const V3 = {
  show: !0,
  x: !0,
  y: !0,
  lock: !1,
  move: H3,
  points: {
    one: !1,
    show: z3,
    size: L3,
    width: 0,
    stroke: B3,
    fill: F3
  },
  bind: {
    mousedown: df,
    mouseup: df,
    click: df,
    // legend clicks, not .u-over clicks
    dblclick: df,
    mousemove: Fg,
    mouseleave: Fg,
    mouseenter: Fg
  },
  drag: {
    setScale: !0,
    x: !0,
    y: !1,
    dist: 0,
    uni: null,
    click: (e, t) => {
      t.stopPropagation(), t.stopImmediatePropagation();
    },
    _x: !1,
    _y: !1
  },
  focus: {
    dist: (e, t, n, o, r) => o - r,
    prox: -1,
    bias: 0
  },
  hover: {
    skip: [void 0],
    prox: null,
    bias: 0
  },
  left: -10,
  top: -10,
  idx: null,
  dataIdx: null,
  idxs: null,
  event: null
}, xk = {
  show: !0,
  stroke: "rgba(0,0,0,0.07)",
  width: 2
  //	dash: [],
}, Hy = So({}, xk, {
  filter: ak
}), wk = So({}, Hy, {
  size: 10
}), Sk = So({}, xk, {
  show: !1
}), Vy = '12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"', Ck = "bold " + Vy, $k = 1.5, Bw = {
  show: !0,
  scale: "x",
  stroke: Ey,
  space: 50,
  gap: 5,
  size: 50,
  labelGap: 0,
  labelSize: 30,
  labelFont: Ck,
  side: 2,
  //	class: "x-vals",
  //	incrs: timeIncrs,
  //	values: timeVals,
  //	filter: retArg1,
  grid: Hy,
  ticks: wk,
  border: Sk,
  font: Vy,
  lineGap: $k,
  rotate: 0
}, j3 = "Value", W3 = "Time", Lw = {
  show: !0,
  scale: "x",
  auto: !1,
  sorted: 1,
  //	label: "Time",
  //	value: v => stamp(new Date(v * 1e3)),
  // internal caches
  min: vn,
  max: -vn,
  idxs: []
};
function K3(e, t, n, o, r) {
  return t.map((i) => i == null ? "" : zy(i));
}
function q3(e, t, n, o, r, i, a) {
  let l = [], s = Dl.get(r) || 0;
  n = a ? n : Un(mh(n, r), s);
  for (let u = n; u <= o; u = Un(u + r, s))
    l.push(Object.is(u, -0) ? 0 : u);
  return l;
}
function xm(e, t, n, o, r, i, a) {
  const l = [], s = e.scales[e.axes[t].scale].log, u = s == 10 ? Da : rk, c = Tr(u(n));
  r = Bu(s, c), s == 10 && (r = as[bi(r, as)]);
  let d = n, f = r * s;
  s == 10 && (f = as[bi(f, as)]);
  do
    l.push(d), d = d + r, s == 10 && !Dl.has(d) && (d = Un(d, Dl.get(r))), d >= f && (r = d, f = r * s, s == 10 && (f = as[bi(f, as)]));
  while (d <= o);
  return l;
}
function Y3(e, t, n, o, r, i, a) {
  let s = e.scales[e.axes[t].scale].asinh, u = o > s ? xm(e, t, Qo(s, n), o, r) : [s], c = o >= 0 && n <= 0 ? [0] : [];
  return (n < -s ? xm(e, t, Qo(s, -o), -n, r) : [s]).reverse().map((f) => -f).concat(c, u);
}
const Pk = /./, G3 = /[12357]/, U3 = /[125]/, Hw = /1/, wm = (e, t, n, o) => e.map((r, i) => t == 4 && r == 0 || i % o == 0 && n.test(r.toExponential()[r < 0 ? 1 : 0]) ? r : null);
function X3(e, t, n, o, r) {
  let i = e.axes[n], a = i.scale, l = e.scales[a], s = e.valToPos, u = i._space, c = s(10, a), d = s(9, a) - c >= u ? Pk : s(7, a) - c >= u ? G3 : s(5, a) - c >= u ? U3 : Hw;
  if (d == Hw) {
    let f = Io(s(1, a) - c);
    if (f < u)
      return wm(t.slice().reverse(), l.distr, d, Qr(u / f)).reverse();
  }
  return wm(t, l.distr, d, 1);
}
function Q3(e, t, n, o, r) {
  let i = e.axes[n], a = i.scale, l = i._space, s = e.valToPos, u = Io(s(1, a) - s(2, a));
  return u < l ? wm(t.slice().reverse(), 3, Pk, Qr(l / u)).reverse() : t;
}
function Z3(e, t, n, o) {
  return o == null ? Dy : t == null ? "" : zy(t);
}
const Vw = {
  show: !0,
  scale: "y",
  stroke: Ey,
  space: 30,
  gap: 5,
  size: 50,
  labelGap: 0,
  labelSize: 30,
  labelFont: Ck,
  side: 3,
  //	class: "y-vals",
  //	incrs: numIncrs,
  //	values: (vals, space) => vals,
  //	filter: retArg1,
  grid: Hy,
  ticks: wk,
  border: Sk,
  font: Vy,
  lineGap: $k,
  rotate: 0
};
function J3(e, t) {
  let n = 3 + (e || 1) * 2;
  return Un(n * t, 3);
}
function eF(e, t) {
  let { scale: n, idxs: o } = e.series[0], r = e._data[0], i = e.valToPos(r[o[0]], n, !0), a = e.valToPos(r[o[1]], n, !0), l = Io(a - i), s = e.series[t], u = l / (s.points.space * Rn);
  return o[1] - o[0] <= u;
}
const jw = {
  scale: null,
  auto: !0,
  sorted: 0,
  // internal caches
  min: vn,
  max: -vn
}, Ok = (e, t, n, o, r) => r, Ww = {
  show: !0,
  auto: !0,
  sorted: 0,
  gaps: Ok,
  alpha: 1,
  facets: [
    So({}, jw, { scale: "x" }),
    So({}, jw, { scale: "y" })
  ]
}, Kw = {
  scale: "y",
  auto: !0,
  sorted: 0,
  show: !0,
  spanGaps: !1,
  gaps: Ok,
  alpha: 1,
  points: {
    show: eF,
    filter: null
    //  paths:
    //	stroke: "#000",
    //	fill: "#fff",
    //	width: 1,
    //	size: 10,
  },
  //	label: "Value",
  //	value: v => v,
  values: null,
  // internal caches
  min: vn,
  max: -vn,
  idxs: [],
  path: null,
  clip: null
};
function tF(e, t, n, o, r) {
  return n / 10;
}
const kk = {
  time: O4,
  auto: !0,
  distr: 1,
  log: 10,
  asinh: 1,
  min: null,
  max: null,
  dir: 1,
  ori: 0
}, nF = So({}, kk, {
  time: !1,
  ori: 1
}), qw = {};
function Ik(e, t) {
  let n = qw[e];
  return n || (n = {
    key: e,
    plots: [],
    sub(o) {
      n.plots.push(o);
    },
    unsub(o) {
      n.plots = n.plots.filter((r) => r != o);
    },
    pub(o, r, i, a, l, s, u) {
      for (let c = 0; c < n.plots.length; c++)
        n.plots[c] != r && n.plots[c].pub(o, r, i, a, l, s, u);
    }
  }, e != null && (qw[e] = n)), n;
}
const Vu = 1, Sm = 2;
function zs(e, t, n) {
  const o = e.mode, r = e.series[t], i = o == 2 ? e._data[t] : e._data, a = e.scales, l = e.bbox;
  let s = i[0], u = o == 2 ? i[1] : i[t], c = o == 2 ? a[r.facets[0].scale] : a[e.series[0].scale], d = o == 2 ? a[r.facets[1].scale] : a[r.scale], f = l.left, p = l.top, v = l.width, g = l.height, m = e.valToPosH, x = e.valToPosV;
  return c.ori == 0 ? n(
    r,
    s,
    u,
    c,
    d,
    m,
    x,
    f,
    p,
    v,
    g,
    xh,
    lc,
    Sh,
    Tk,
    Ek
  ) : n(
    r,
    s,
    u,
    c,
    d,
    x,
    m,
    p,
    f,
    g,
    v,
    wh,
    sc,
    Ky,
    Mk,
    Dk
  );
}
function jy(e, t) {
  let n = 0, o = 0, r = In(e.bands, Fy);
  for (let i = 0; i < r.length; i++) {
    let a = r[i];
    a.series[0] == t ? n = a.dir : a.series[1] == t && (a.dir == 1 ? o |= 1 : o |= 2);
  }
  return [
    n,
    o == 1 ? -1 : (
      // neg only
      o == 2 ? 1 : (
        // pos only
        o == 3 ? 2 : (
          // both
          0
        )
      )
    )
  ];
}
function oF(e, t, n, o, r) {
  let i = e.mode, a = e.series[t], l = i == 2 ? a.facets[1].scale : a.scale, s = e.scales[l];
  return r == -1 ? s.min : r == 1 ? s.max : s.distr == 3 ? s.dir == 1 ? s.min : s.max : 0;
}
function Aa(e, t, n, o, r, i) {
  return zs(e, t, (a, l, s, u, c, d, f, p, v, g, m) => {
    let x = a.pxRound;
    const S = u.dir * (u.ori == 0 ? 1 : -1), C = u.ori == 0 ? lc : sc;
    let P, $;
    S == 1 ? (P = n, $ = o) : (P = o, $ = n);
    let I = x(d(l[P], u, g, p)), w = x(f(s[P], c, m, v)), _ = x(d(l[$], u, g, p)), M = x(f(i == 1 ? c.max : c.min, c, m, v)), N = new Path2D(r);
    return C(N, _, M), C(N, I, M), C(N, I, w), N;
  });
}
function yh(e, t, n, o, r, i) {
  let a = null;
  if (e.length > 0) {
    a = new Path2D();
    const l = t == 0 ? Sh : Ky;
    let s = n;
    for (let d = 0; d < e.length; d++) {
      let f = e[d];
      if (f[1] > f[0]) {
        let p = f[0] - s;
        p > 0 && l(a, s, o, p, o + i), s = f[1];
      }
    }
    let u = n + r - s, c = 10;
    u > 0 && l(a, s, o - c / 2, u, o + i + c);
  }
  return a;
}
function rF(e, t, n) {
  let o = e[e.length - 1];
  o && o[0] == t ? o[1] = n : e.push([t, n]);
}
function Wy(e, t, n, o, r, i, a) {
  let l = [], s = e.length;
  for (let u = r == 1 ? n : o; u >= n && u <= o; u += r)
    if (t[u] === null) {
      let d = u, f = u;
      if (r == 1)
        for (; ++u <= o && t[u] === null; )
          f = u;
      else
        for (; --u >= n && t[u] === null; )
          f = u;
      let p = i(e[d]), v = f == d ? p : i(e[f]), g = d - r;
      p = a <= 0 && g >= 0 && g < s ? i(e[g]) : p;
      let x = f + r;
      v = a >= 0 && x >= 0 && x < s ? i(e[x]) : v, v >= p && l.push([p, v]);
    }
  return l;
}
function Yw(e) {
  return e == 0 ? ik : e == 1 ? Oo : (t) => is(t, e);
}
function _k(e) {
  let t = e == 0 ? xh : wh, n = e == 0 ? (r, i, a, l, s, u) => {
    r.arcTo(i, a, l, s, u);
  } : (r, i, a, l, s, u) => {
    r.arcTo(a, i, s, l, u);
  }, o = e == 0 ? (r, i, a, l, s) => {
    r.rect(i, a, l, s);
  } : (r, i, a, l, s) => {
    r.rect(a, i, s, l);
  };
  return (r, i, a, l, s, u = 0, c = 0) => {
    u == 0 && c == 0 ? o(r, i, a, l, s) : (u = Jr(u, l / 2, s / 2), c = Jr(c, l / 2, s / 2), t(r, i + u, a), n(r, i + l, a, i + l, a + s, u), n(r, i + l, a + s, i, a + s, c), n(r, i, a + s, i, a, c), n(r, i, a, i + l, a, u), r.closePath());
  };
}
const xh = (e, t, n) => {
  e.moveTo(t, n);
}, wh = (e, t, n) => {
  e.moveTo(n, t);
}, lc = (e, t, n) => {
  e.lineTo(t, n);
}, sc = (e, t, n) => {
  e.lineTo(n, t);
}, Sh = _k(0), Ky = _k(1), Tk = (e, t, n, o, r, i) => {
  e.arc(t, n, o, r, i);
}, Mk = (e, t, n, o, r, i) => {
  e.arc(n, t, o, r, i);
}, Ek = (e, t, n, o, r, i, a) => {
  e.bezierCurveTo(t, n, o, r, i, a);
}, Dk = (e, t, n, o, r, i, a) => {
  e.bezierCurveTo(n, t, r, o, a, i);
};
function Ak(e) {
  return (t, n, o, r, i) => zs(t, n, (a, l, s, u, c, d, f, p, v, g, m) => {
    let { pxRound: x, points: S } = a, C, P;
    u.ori == 0 ? (C = xh, P = Tk) : (C = wh, P = Mk);
    const $ = Un(S.width * Rn, 3);
    let I = (S.size - S.width) / 2 * Rn, w = Un(I * 2, 3), _ = new Path2D(), M = new Path2D(), { left: N, top: A, width: H, height: B } = t.bbox;
    Sh(
      M,
      N - w,
      A - w,
      H + w * 2,
      B + w * 2
    );
    const F = (R) => {
      if (s[R] != null) {
        let X = x(d(l[R], u, g, p)), j = x(f(s[R], c, m, v));
        C(_, X + I, j), P(_, X, j, I, 0, Qf * 2);
      }
    };
    if (i)
      i.forEach(F);
    else
      for (let R = o; R <= r; R++)
        F(R);
    return {
      stroke: $ > 0 ? _ : null,
      fill: _,
      clip: M,
      flags: Vu | Sm
    };
  });
}
function Nk(e) {
  return (t, n, o, r, i, a) => {
    o != r && (i != o && a != o && e(t, n, o), i != r && a != r && e(t, n, r), e(t, n, a));
  };
}
const iF = Nk(lc), aF = Nk(sc);
function Rk(e) {
  const t = In(e?.alignGaps, 0);
  return (n, o, r, i) => zs(n, o, (a, l, s, u, c, d, f, p, v, g, m) => {
    let x = a.pxRound, S = (G) => x(d(G, u, g, p)), C = (G) => x(f(G, c, m, v)), P, $;
    u.ori == 0 ? (P = lc, $ = iF) : (P = sc, $ = aF);
    const I = u.dir * (u.ori == 0 ? 1 : -1), w = { stroke: new Path2D(), fill: null, clip: null, band: null, gaps: null, flags: Vu }, _ = w.stroke;
    let M = vn, N = -vn, A, H, B, F = S(l[I == 1 ? r : i]), R = Fu(s, r, i, 1 * I), X = Fu(s, r, i, -1 * I), j = S(l[R]), ee = S(l[X]), W = !1;
    for (let G = I == 1 ? r : i; G >= r && G <= i; G += I) {
      let ae = S(l[G]), le = s[G];
      ae == F ? le != null ? (H = C(le), M == vn && (P(_, ae, H), A = H), M = Jr(H, M), N = Qo(H, N)) : le === null && (W = !0) : (M != vn && ($(_, F, M, N, A, H), B = F), le != null ? (H = C(le), P(_, ae, H), M = N = A = H) : (M = vn, N = -vn, le === null && (W = !0)), F = ae);
    }
    M != vn && M != N && B != F && $(_, F, M, N, A, H);
    let [K, q] = jy(n, o);
    if (a.fill != null || K != 0) {
      let G = w.fill = new Path2D(_), ae = a.fillTo(n, o, a.min, a.max, K), le = C(ae);
      P(G, ee, le), P(G, j, le);
    }
    if (!a.spanGaps) {
      let G = [];
      W && G.push(...Wy(l, s, r, i, I, S, t)), w.gaps = G = a.gaps(n, o, r, i, G), w.clip = yh(G, u.ori, p, v, g, m);
    }
    return q != 0 && (w.band = q == 2 ? [
      Aa(n, o, r, i, _, -1),
      Aa(n, o, r, i, _, 1)
    ] : Aa(n, o, r, i, _, q)), w;
  });
}
function lF(e) {
  const t = In(e.align, 1), n = In(e.ascDesc, !1), o = In(e.alignGaps, 0), r = In(e.extend, !1);
  return (i, a, l, s) => zs(i, a, (u, c, d, f, p, v, g, m, x, S, C) => {
    let P = u.pxRound, { left: $, width: I } = i.bbox, w = (K) => P(v(K, f, S, m)), _ = (K) => P(g(K, p, C, x)), M = f.ori == 0 ? lc : sc;
    const N = { stroke: new Path2D(), fill: null, clip: null, band: null, gaps: null, flags: Vu }, A = N.stroke, H = f.dir * (f.ori == 0 ? 1 : -1);
    l = Fu(d, l, s, 1), s = Fu(d, l, s, -1);
    let B = _(d[H == 1 ? l : s]), F = w(c[H == 1 ? l : s]), R = F, X = F;
    r && t == -1 && (X = $, M(A, X, B)), M(A, F, B);
    for (let K = H == 1 ? l : s; K >= l && K <= s; K += H) {
      let q = d[K];
      if (q == null)
        continue;
      let G = w(c[K]), ae = _(q);
      t == 1 ? M(A, G, B) : M(A, R, ae), M(A, G, ae), B = ae, R = G;
    }
    let j = R;
    r && t == 1 && (j = $ + I, M(A, j, B));
    let [ee, W] = jy(i, a);
    if (u.fill != null || ee != 0) {
      let K = N.fill = new Path2D(A), q = u.fillTo(i, a, u.min, u.max, ee), G = _(q);
      M(K, j, G), M(K, X, G);
    }
    if (!u.spanGaps) {
      let K = [];
      K.push(...Wy(c, d, l, s, H, w, o));
      let q = u.width * Rn / 2, G = n || t == 1 ? q : -q, ae = n || t == -1 ? -q : q;
      K.forEach((le) => {
        le[0] += G, le[1] += ae;
      }), N.gaps = K = u.gaps(i, a, l, s, K), N.clip = yh(K, f.ori, m, x, S, C);
    }
    return W != 0 && (N.band = W == 2 ? [
      Aa(i, a, l, s, A, -1),
      Aa(i, a, l, s, A, 1)
    ] : Aa(i, a, l, s, A, W)), N;
  });
}
function Gw(e, t, n, o, r, i, a = vn) {
  if (e.length > 1) {
    let l = null;
    for (let s = 0, u = 1 / 0; s < e.length; s++)
      if (t[s] !== void 0) {
        if (l != null) {
          let c = Io(e[s] - e[l]);
          c < u && (u = c, a = Io(n(e[s], o, r, i) - n(e[l], o, r, i)));
        }
        l = s;
      }
  }
  return a;
}
function sF(e) {
  e = e || Gc;
  const t = In(e.size, [0.6, vn, 1]), n = e.align || 0, o = e.gap || 0;
  let r = e.radius;
  r = // [valueRadius, baselineRadius]
  r == null ? [0, 0] : typeof r == "number" ? [r, 0] : r;
  const i = gn(r), a = 1 - t[0], l = In(t[1], vn), s = In(t[2], 1), u = In(e.disp, Gc), c = In(e.each, (p) => {
  }), { fill: d, stroke: f } = u;
  return (p, v, g, m) => zs(p, v, (x, S, C, P, $, I, w, _, M, N, A) => {
    let H = x.pxRound, B = n, F = o * Rn, R = l * Rn, X = s * Rn, j, ee;
    P.ori == 0 ? [j, ee] = i(p, v) : [ee, j] = i(p, v);
    const W = P.dir * (P.ori == 0 ? 1 : -1);
    let K = P.ori == 0 ? Sh : Ky, q = P.ori == 0 ? c : (Se, Ce, Ae, qe, We, tt, Ee) => {
      c(Se, Ce, Ae, We, qe, Ee, tt);
    }, G = In(p.bands, Fy).find((Se) => Se.series[0] == v), ae = G != null ? G.dir : 0, le = x.fillTo(p, v, x.min, x.max, ae), ie = H(w(le, $, A, M)), re, te, ve, ue = N, pe = H(x.width * Rn), ge = !1, _e = null, ze = null, Ke = null, He = null;
    d != null && (pe == 0 || f != null) && (ge = !0, _e = d.values(p, v, g, m), ze = /* @__PURE__ */ new Map(), new Set(_e).forEach((Se) => {
      Se != null && ze.set(Se, new Path2D());
    }), pe > 0 && (Ke = f.values(p, v, g, m), He = /* @__PURE__ */ new Map(), new Set(Ke).forEach((Se) => {
      Se != null && He.set(Se, new Path2D());
    })));
    let { x0: Ne, size: Xe } = u;
    if (Ne != null && Xe != null) {
      B = 1, S = Ne.values(p, v, g, m), Ne.unit == 2 && (S = S.map((Ae) => p.posToVal(_ + Ae * N, P.key, !0)));
      let Se = Xe.values(p, v, g, m);
      Xe.unit == 2 ? te = Se[0] * N : te = I(Se[0], P, N, _) - I(0, P, N, _), ue = Gw(S, C, I, P, N, _, ue), ve = ue - te + F;
    } else
      ue = Gw(S, C, I, P, N, _, ue), ve = ue * a + F, te = ue - ve;
    ve < 1 && (ve = 0), pe >= te / 2 && (pe = 0), ve < 5 && (H = ik);
    let De = ve > 0, Fe = ue - ve - (De ? pe : 0);
    te = H(ym(Fe, X, R)), re = (B == 0 ? te / 2 : B == W ? 0 : te) - B * W * ((B == 0 ? F / 2 : 0) + (De ? pe / 2 : 0));
    const Ve = { stroke: null, fill: null, clip: null, band: null, gaps: null, flags: 0 }, nt = ge ? null : new Path2D();
    let je = null;
    if (G != null)
      je = p.data[G.series[1]];
    else {
      let { y0: Se, y1: Ce } = u;
      Se != null && Ce != null && (C = Ce.values(p, v, g, m), je = Se.values(p, v, g, m));
    }
    let Pe = j * te, Ge = ee * te;
    for (let Se = W == 1 ? g : m; Se >= g && Se <= m; Se += W) {
      let Ce = C[Se];
      if (Ce == null)
        continue;
      if (je != null) {
        let ot = je[Se] ?? 0;
        if (Ce - ot == 0)
          continue;
        ie = w(ot, $, A, M);
      }
      let Ae = P.distr != 2 || u != null ? S[Se] : Se, qe = I(Ae, P, N, _), We = w(In(Ce, le), $, A, M), tt = H(qe - re), Ee = H(Qo(We, ie)), Re = H(Jr(We, ie)), Be = Ee - Re;
      if (Ce != null) {
        let ot = Ce < 0 ? Ge : Pe, pt = Ce < 0 ? Pe : Ge;
        ge ? (pe > 0 && Ke[Se] != null && K(He.get(Ke[Se]), tt, Re + Tr(pe / 2), te, Qo(0, Be - pe), ot, pt), _e[Se] != null && K(ze.get(_e[Se]), tt, Re + Tr(pe / 2), te, Qo(0, Be - pe), ot, pt)) : K(nt, tt, Re + Tr(pe / 2), te, Qo(0, Be - pe), ot, pt), q(
          p,
          v,
          Se,
          tt - pe / 2,
          Re,
          te + pe,
          Be
        );
      }
    }
    return pe > 0 ? Ve.stroke = ge ? He : nt : ge || (Ve._fill = x.width == 0 ? x._fill : x._stroke ?? x._fill, Ve.width = 0), Ve.fill = ge ? ze : nt, Ve;
  });
}
function uF(e, t) {
  const n = In(t?.alignGaps, 0);
  return (o, r, i, a) => zs(o, r, (l, s, u, c, d, f, p, v, g, m, x) => {
    let S = l.pxRound, C = (j) => S(f(j, c, m, v)), P = (j) => S(p(j, d, x, g)), $, I, w;
    c.ori == 0 ? ($ = xh, w = lc, I = Ek) : ($ = wh, w = sc, I = Dk);
    const _ = c.dir * (c.ori == 0 ? 1 : -1);
    i = Fu(u, i, a, 1), a = Fu(u, i, a, -1);
    let M = C(s[_ == 1 ? i : a]), N = M, A = [], H = [];
    for (let j = _ == 1 ? i : a; j >= i && j <= a; j += _)
      if (u[j] != null) {
        let W = s[j], K = C(W);
        A.push(N = K), H.push(P(u[j]));
      }
    const B = { stroke: e(A, H, $, w, I, S), fill: null, clip: null, band: null, gaps: null, flags: Vu }, F = B.stroke;
    let [R, X] = jy(o, r);
    if (l.fill != null || R != 0) {
      let j = B.fill = new Path2D(F), ee = l.fillTo(o, r, l.min, l.max, R), W = P(ee);
      w(j, N, W), w(j, M, W);
    }
    if (!l.spanGaps) {
      let j = [];
      j.push(...Wy(s, u, i, a, _, C, n)), B.gaps = j = l.gaps(o, r, i, a, j), B.clip = yh(j, c.ori, v, g, m, x);
    }
    return X != 0 && (B.band = X == 2 ? [
      Aa(o, r, i, a, F, -1),
      Aa(o, r, i, a, F, 1)
    ] : Aa(o, r, i, a, F, X)), B;
  });
}
function cF(e) {
  return uF(dF, e);
}
function dF(e, t, n, o, r, i) {
  const a = e.length;
  if (a < 2)
    return null;
  const l = new Path2D();
  if (n(l, e[0], t[0]), a == 2)
    o(l, e[1], t[1]);
  else {
    let s = Array(a), u = Array(a - 1), c = Array(a - 1), d = Array(a - 1);
    for (let f = 0; f < a - 1; f++)
      c[f] = t[f + 1] - t[f], d[f] = e[f + 1] - e[f], u[f] = c[f] / d[f];
    s[0] = u[0];
    for (let f = 1; f < a - 1; f++)
      u[f] === 0 || u[f - 1] === 0 || u[f - 1] > 0 != u[f] > 0 ? s[f] = 0 : (s[f] = 3 * (d[f - 1] + d[f]) / ((2 * d[f] + d[f - 1]) / u[f - 1] + (d[f] + 2 * d[f - 1]) / u[f]), isFinite(s[f]) || (s[f] = 0));
    s[a - 1] = u[a - 2];
    for (let f = 0; f < a - 1; f++)
      r(
        l,
        e[f] + d[f] / 3,
        t[f] + s[f] * d[f] / 3,
        e[f + 1] - d[f] / 3,
        t[f + 1] - s[f + 1] * d[f] / 3,
        e[f + 1],
        t[f + 1]
      );
  }
  return l;
}
const Cm = /* @__PURE__ */ new Set();
function Uw() {
  for (let e of Cm)
    e.syncRect(!0);
}
ac && (Ss(K4, Ou, Uw), Ss(q4, Ou, Uw, !0), Ss(Op, Ou, () => {
  xo.pxRatio = Rn;
}));
const fF = Rk(), pF = Ak();
function Xw(e, t, n, o) {
  return (o ? [e[0], e[1]].concat(e.slice(2)) : [e[0]].concat(e.slice(1))).map((i, a) => $m(i, a, t, n));
}
function hF(e, t) {
  return e.map((n, o) => o == 0 ? {} : So({}, t, n));
}
function $m(e, t, n, o) {
  return So({}, t == 0 ? n : o, e);
}
function zk(e, t, n) {
  return t == null ? Lu : [t, n];
}
const gF = zk;
function vF(e, t, n) {
  return t == null ? Lu : kp(t, n, Ry, !0);
}
function Fk(e, t, n, o) {
  return t == null ? Lu : vh(t, n, e.scales[o].log, !1);
}
const mF = Fk;
function Bk(e, t, n, o) {
  return t == null ? Lu : Ny(t, n, e.scales[o].log, !1);
}
const bF = Bk;
function yF(e, t, n, o, r) {
  let i = Qo(Iw(e), Iw(t)), a = t - e, l = bi(r / o * a, n);
  do {
    let s = n[l], u = o * s / a;
    if (u >= r && i + (s < 5 ? Dl.get(s) : 0) <= 17)
      return [s, u];
  } while (++l < n.length);
  return [0, 0];
}
function Qw(e) {
  let t, n;
  return e = e.replace(/(\d+)px/, (o, r) => (t = Oo((n = +r) * Rn)) + "px"), [e, t, n];
}
function xF(e) {
  e.show && [e.font, e.labelFont].forEach((t) => {
    let n = Un(t[2] * Rn, 1);
    t[0] = t[0].replace(/[0-9.]+px/, n + "px"), t[1] = n;
  });
}
function xo(e, t, n) {
  const o = {
    mode: In(e.mode, 1)
  }, r = o.mode;
  function i(Y, J) {
    return ((J.distr == 3 ? Da(Y > 0 ? Y : J.clamp(o, Y, J.min, J.max, J.key)) : J.distr == 4 ? Ng(Y, J.asinh) : J.distr == 100 ? J.fwd(Y) : Y) - J._min) / (J._max - J._min);
  }
  function a(Y, J, me, ye) {
    let Ie = i(Y, J);
    return ye + me * (J.dir == -1 ? 1 - Ie : Ie);
  }
  function l(Y, J, me, ye) {
    let Ie = i(Y, J);
    return ye + me * (J.dir == -1 ? Ie : 1 - Ie);
  }
  function s(Y, J, me, ye) {
    return J.ori == 0 ? a(Y, J, me, ye) : l(Y, J, me, ye);
  }
  o.valToPosH = a, o.valToPosV = l;
  let u = !1;
  o.status = 0;
  const c = o.root = Gr(k4);
  if (e.id != null && (c.id = e.id), Or(c, e.class), e.title) {
    let Y = Gr(T4, c);
    Y.textContent = e.title;
  }
  const d = pi("canvas"), f = o.ctx = d.getContext("2d"), p = Gr(M4, c);
  Ss("click", p, (Y) => {
    Y.target === g && (qn != fa || Hn != sl) && Po.click(o, Y);
  }, !0);
  const v = o.under = Gr(E4, p);
  p.appendChild(d);
  const g = o.over = Gr(D4, p);
  e = Hu(e);
  const m = +In(e.pxAlign, 1), x = Yw(m);
  (e.plugins || []).forEach((Y) => {
    Y.opts && (e = Y.opts(o, e) || e);
  });
  const S = e.ms || 1e-3, C = o.series = r == 1 ? Xw(e.series || [], Lw, Kw, !1) : hF(e.series || [null], Ww), P = o.axes = Xw(e.axes || [], Bw, Vw, !0), $ = o.scales = {}, I = o.bands = e.bands || [];
  I.forEach((Y) => {
    Y.fill = gn(Y.fill || null), Y.dir = In(Y.dir, -1);
  });
  const w = r == 2 ? C[1].facets[0].scale : C[0].scale, _ = {
    axes: Gd,
    series: tl
  }, M = (e.drawOrder || ["axes", "series"]).map((Y) => _[Y]);
  function N(Y) {
    let J = $[Y];
    if (J == null) {
      let me = (e.scales || Gc)[Y] || Gc;
      if (me.from != null)
        N(me.from), $[Y] = So({}, $[me.from], me, { key: Y });
      else {
        J = $[Y] = So({}, Y == w ? kk : nF, me), J.key = Y;
        let ye = J.time, Ie = J.range, b = ml(Ie);
        if ((Y != w || r == 2 && !ye) && (b && (Ie[0] == null || Ie[1] == null) && (Ie = {
          min: Ie[0] == null ? Pw : {
            mode: 1,
            hard: Ie[0],
            soft: Ie[0]
          },
          max: Ie[1] == null ? Pw : {
            mode: 1,
            hard: Ie[1],
            soft: Ie[1]
          }
        }, b = !1), !b && bh(Ie))) {
          let y = Ie;
          Ie = (k, D, z) => D == null ? Lu : kp(D, z, y);
        }
        J.range = gn(Ie || (ye ? gF : Y == w ? J.distr == 3 ? mF : J.distr == 4 ? bF : zk : J.distr == 3 ? Fk : J.distr == 4 ? Bk : vF)), J.auto = gn(b ? !1 : J.auto), J.clamp = gn(J.clamp || tF), J._min = J._max = null;
      }
    }
  }
  N("x"), N("y"), r == 1 && C.forEach((Y) => {
    N(Y.scale);
  }), P.forEach((Y) => {
    N(Y.scale);
  });
  for (let Y in e.scales)
    N(Y);
  const A = $[w], H = A.distr;
  let B, F;
  A.ori == 0 ? (Or(c, I4), B = a, F = l) : (Or(c, _4), B = l, F = a);
  const R = {};
  for (let Y in $) {
    let J = $[Y];
    (J.min != null || J.max != null) && (R[Y] = { min: J.min, max: J.max }, J.min = J.max = null);
  }
  const X = e.tzDate || ((Y) => new Date(Oo(Y / S))), j = e.fmtDate || By, ee = S == 1 ? I3(X) : M3(X), W = Rw(X, Nw(S == 1 ? k3 : T3, j)), K = Fw(X, zw(D3, j)), q = [], G = o.legend = So({}, R3, e.legend), ae = G.show, le = G.markers;
  G.idxs = q, le.width = gn(le.width), le.dash = gn(le.dash), le.stroke = gn(le.stroke), le.fill = gn(le.fill);
  let ie, re, te, ve = [], ue = [], pe, ge = !1, _e = {};
  if (G.live) {
    const Y = C[1] ? C[1].values : null;
    ge = Y != null, pe = ge ? Y(o, 1, 0) : { _: 0 };
    for (let J in pe)
      _e[J] = Dy;
  }
  if (ae)
    if (ie = pi("table", B4, c), te = pi("tbody", null, ie), G.mount(o, ie), ge) {
      re = pi("thead", null, ie, te);
      let Y = pi("tr", null, re);
      pi("th", null, Y);
      for (var ze in pe)
        pi("th", dw, Y).textContent = ze;
    } else
      Or(ie, H4), G.live && Or(ie, L4);
  const Ke = { show: !0 }, He = { show: !1 };
  function Ne(Y, J) {
    if (J == 0 && (ge || !G.live || r == 2))
      return Lu;
    let me = [], ye = pi("tr", V4, te, te.childNodes[J]);
    Or(ye, Y.class), Y.show || Or(ye, us);
    let Ie = pi("th", null, ye);
    if (le.show) {
      let k = Gr(j4, Ie);
      if (J > 0) {
        let D = le.width(o, J);
        D && (k.style.border = D + "px " + le.dash(o, J) + " " + le.stroke(o, J)), k.style.background = le.fill(o, J);
      }
    }
    let b = Gr(dw, Ie);
    b.textContent = Y.label, J > 0 && (le.show || (b.style.color = Y.width > 0 ? le.stroke(o, J) : le.fill(o, J)), De("click", Ie, (k) => {
      if (gt._lock)
        return;
      En(k);
      let D = C.indexOf(Y);
      if ((k.ctrlKey || k.metaKey) != G.isolate) {
        let z = C.some((V, U) => U > 0 && U != D && V.show);
        C.forEach((V, U) => {
          U > 0 && Lr(U, z ? U == D ? Ke : He : Ke, !0, uo.setSeries);
        });
      } else
        Lr(D, { show: !Y.show }, !0, uo.setSeries);
    }, !1), so && De(vw, Ie, (k) => {
      gt._lock || (En(k), Lr(C.indexOf(Y), cl, !0, uo.setSeries));
    }, !1));
    for (var y in pe) {
      let k = pi("td", W4, ye);
      k.textContent = "--", me.push(k);
    }
    return [ye, me];
  }
  const Xe = /* @__PURE__ */ new Map();
  function De(Y, J, me, ye = !0) {
    const Ie = Xe.get(J) || {}, b = gt.bind[Y](o, J, me, ye);
    b && (Ss(Y, J, Ie[Y] = b), Xe.set(J, Ie));
  }
  function Fe(Y, J, me) {
    const ye = Xe.get(J) || {};
    for (let Ie in ye)
      (Y == null || Ie == Y) && (bm(Ie, J, ye[Ie]), delete ye[Ie]);
    Y == null && Xe.delete(J);
  }
  let Ve = 0, nt = 0, je = 0, Pe = 0, Ge = 0, Se = 0, Ce = Ge, Ae = Se, qe = je, We = Pe, tt = 0, Ee = 0, Re = 0, Be = 0;
  o.bbox = {};
  let ot = !1, pt = !1, at = !1, dt = !1, wt = !1, Ct = !1;
  function St(Y, J, me) {
    (me || Y != o.width || J != o.height) && yt(Y, J), il(!1), at = !0, pt = !0, Ri();
  }
  function yt(Y, J) {
    o.width = Ve = je = Y, o.height = nt = Pe = J, Ge = Se = 0, ln(), pn();
    let me = o.bbox;
    tt = me.left = is(Ge * Rn, 0.5), Ee = me.top = is(Se * Rn, 0.5), Re = me.width = is(je * Rn, 0.5), Be = me.height = is(Pe * Rn, 0.5);
  }
  const Ot = 3;
  function Wt() {
    let Y = !1, J = 0;
    for (; !Y; ) {
      J++;
      let me = qs(J), ye = Kl(J);
      Y = J == Ot || me && ye, Y || (yt(o.width, o.height), pt = !0);
    }
  }
  function Xt({ width: Y, height: J }) {
    St(Y, J);
  }
  o.setSize = Xt;
  function ln() {
    let Y = !1, J = !1, me = !1, ye = !1;
    P.forEach((Ie, b) => {
      if (Ie.show && Ie._show) {
        let { side: y, _size: k } = Ie, D = y % 2, z = Ie.label != null ? Ie.labelSize : 0, V = k + z;
        V > 0 && (D ? (je -= V, y == 3 ? (Ge += V, ye = !0) : me = !0) : (Pe -= V, y == 0 ? (Se += V, Y = !0) : J = !0));
      }
    }), Cn[0] = Y, Cn[1] = me, Cn[2] = J, Cn[3] = ye, je -= un[1] + un[3], Ge += un[3], Pe -= un[2] + un[0], Se += un[0];
  }
  function pn() {
    let Y = Ge + je, J = Se + Pe, me = Ge, ye = Se;
    function Ie(b, y) {
      switch (b) {
        case 1:
          return Y += y, Y - y;
        case 2:
          return J += y, J - y;
        case 3:
          return me -= y, me + y;
        case 0:
          return ye -= y, ye + y;
      }
    }
    P.forEach((b, y) => {
      if (b.show && b._show) {
        let k = b.side;
        b._pos = Ie(k, b._size), b.label != null && (b._lpos = Ie(k, b.labelSize));
      }
    });
  }
  const gt = o.cursor = So({}, V3, { drag: { y: r == 2 } }, e.cursor);
  if (gt.dataIdx == null) {
    let Y = gt.hover, J = Y.skip = new Set(Y.skip ?? []);
    J.add(void 0);
    let me = Y.prox = gn(Y.prox), ye = Y.bias ??= 0;
    gt.dataIdx = (Ie, b, y, k) => {
      if (b == 0)
        return y;
      let D = y, z = me(Ie, b, y, k) ?? vn, V = z >= 0 && z < vn, U = A.ori == 0 ? je : Pe, Z = gt.left, se = t[0], we = t[b];
      if (J.has(we[y])) {
        D = null;
        let de = null, Oe = null, Te;
        if (ye == 0 || ye == -1)
          for (Te = y; de == null && Te-- > 0; )
            J.has(we[Te]) || (de = Te);
        if (ye == 0 || ye == 1)
          for (Te = y; Oe == null && Te++ < we.length; )
            J.has(we[Te]) || (Oe = Te);
        if (de != null || Oe != null)
          if (V) {
            let Ye = de == null ? -1 / 0 : B(se[de], A, U, 0), Qe = Oe == null ? 1 / 0 : B(se[Oe], A, U, 0), Ze = Z - Ye, lt = Qe - Z;
            Ze <= lt ? Ze <= z && (D = de) : lt <= z && (D = Oe);
          } else
            D = Oe == null ? de : de == null ? Oe : y - de <= Oe - y ? de : Oe;
      } else V && Io(Z - B(se[y], A, U, 0)) > z && (D = null);
      return D;
    };
  }
  const En = (Y) => {
    gt.event = Y;
  };
  gt.idxs = q, gt._lock = !1;
  let hn = gt.points;
  hn.show = gn(hn.show), hn.size = gn(hn.size), hn.stroke = gn(hn.stroke), hn.width = gn(hn.width), hn.fill = gn(hn.fill);
  const Kn = o.focus = So({}, e.focus || { alpha: 0.3 }, gt.focus), so = Kn.prox >= 0, Uo = so && hn.one;
  let Ue = [], ht = [], vt = [];
  function Zt(Y, J) {
    let me = hn.show(o, J);
    if (me)
      return Or(me, F4), Or(me, Y.class), Hi(me, -10, -10, je, Pe), g.insertBefore(me, Ue[J]), me;
  }
  function Zn(Y, J) {
    if (r == 1 || J > 0) {
      let me = r == 1 && $[Y.scale].time, ye = Y.value;
      Y.value = me ? Mw(ye) ? Fw(X, zw(ye, j)) : ye || K : ye || Z3, Y.label = Y.label || (me ? W3 : j3);
    }
    if (Uo || J > 0) {
      Y.width = Y.width == null ? 1 : Y.width, Y.paths = Y.paths || fF || n3, Y.fillTo = gn(Y.fillTo || oF), Y.pxAlign = +In(Y.pxAlign, m), Y.pxRound = Yw(Y.pxAlign), Y.stroke = gn(Y.stroke || null), Y.fill = gn(Y.fill || null), Y._stroke = Y._fill = Y._paths = Y._focus = null;
      let me = J3(Qo(1, Y.width), 1), ye = Y.points = So({}, {
        size: me,
        width: Qo(1, me * 0.2),
        stroke: Y.stroke,
        space: me * 2,
        paths: pF,
        _stroke: null,
        _fill: null
      }, Y.points);
      ye.show = gn(ye.show), ye.filter = gn(ye.filter), ye.fill = gn(ye.fill), ye.stroke = gn(ye.stroke), ye.paths = gn(ye.paths), ye.pxAlign = Y.pxAlign;
    }
    if (ae) {
      let me = Ne(Y, J);
      ve.splice(J, 0, me[0]), ue.splice(J, 0, me[1]), G.values.push(null);
    }
    if (gt.show) {
      q.splice(J, 0, null);
      let me = null;
      Uo ? J == 0 && (me = Zt(Y, J)) : J > 0 && (me = Zt(Y, J)), Ue.splice(J, 0, me), ht.splice(J, 0, 0), vt.splice(J, 0, 0);
    }
    io("addSeries", J);
  }
  function Qn(Y, J) {
    J = J ?? C.length, Y = r == 1 ? $m(Y, J, Lw, Kw) : $m(Y, J, {}, Ww), C.splice(J, 0, Y), Zn(C[J], J);
  }
  o.addSeries = Qn;
  function $o(Y) {
    if (C.splice(Y, 1), ae) {
      G.values.splice(Y, 1), ue.splice(Y, 1);
      let J = ve.splice(Y, 1)[0];
      Fe(null, J.firstChild), J.remove();
    }
    gt.show && (q.splice(Y, 1), Ue.splice(Y, 1)[0].remove(), ht.splice(Y, 1), vt.splice(Y, 1)), io("delSeries", Y);
  }
  o.delSeries = $o;
  const Cn = [!1, !1, !1, !1];
  function Tt(Y, J) {
    if (Y._show = Y.show, Y.show) {
      let me = Y.side % 2, ye = $[Y.scale];
      ye == null && (Y.scale = me ? C[1].scale : w, ye = $[Y.scale]);
      let Ie = ye.time;
      Y.size = gn(Y.size), Y.space = gn(Y.space), Y.rotate = gn(Y.rotate), ml(Y.incrs) && Y.incrs.forEach((y) => {
        !Dl.has(y) && Dl.set(y, sk(y));
      }), Y.incrs = gn(Y.incrs || (ye.distr == 2 ? $3 : Ie ? S == 1 ? O3 : _3 : as)), Y.splits = gn(Y.splits || (Ie && ye.distr == 1 ? ee : ye.distr == 3 ? xm : ye.distr == 4 ? Y3 : q3)), Y.stroke = gn(Y.stroke), Y.grid.stroke = gn(Y.grid.stroke), Y.ticks.stroke = gn(Y.ticks.stroke), Y.border.stroke = gn(Y.border.stroke);
      let b = Y.values;
      Y.values = // static array of tick values
      ml(b) && !ml(b[0]) ? gn(b) : (
        // temporal
        Ie ? (
          // config array of fmtDate string tpls
          ml(b) ? Rw(X, Nw(b, j)) : (
            // fmtDate string tpl
            Mw(b) ? E3(X, b) : b || W
          )
        ) : b || K3
      ), Y.filter = gn(Y.filter || (ye.distr >= 3 && ye.log == 10 ? X3 : ye.distr == 3 && ye.log == 2 ? Q3 : ak)), Y.font = Qw(Y.font), Y.labelFont = Qw(Y.labelFont), Y._size = Y.size(o, null, J, 0), Y._space = Y._rotate = Y._incrs = Y._found = // foundIncrSpace
      Y._splits = Y._values = null, Y._size > 0 && (Cn[J] = !0, Y._el = Gr(A4, p));
    }
  }
  function po(Y, J, me, ye) {
    let [Ie, b, y, k] = me, D = J % 2, z = 0;
    return D == 0 && (k || b) && (z = J == 0 && !Ie || J == 2 && !y ? Oo(Bw.size / 3) : 0), D == 1 && (Ie || y) && (z = J == 1 && !b || J == 3 && !k ? Oo(Vw.size / 2) : 0), z;
  }
  const zo = o.padding = (e.padding || [po, po, po, po]).map((Y) => gn(In(Y, po))), un = o._padding = zo.map((Y, J) => Y(o, J, Cn, 0));
  let Dn, cn = null, An = null;
  const er = r == 1 ? C[0].idxs : null;
  let Jn = null, pr = !1;
  function Wo(Y, J) {
    if (t = Y ?? [], o.data = o._data = t, r == 2) {
      Dn = 0;
      for (let me = 1; me < C.length; me++)
        Dn += t[me][0].length;
    } else {
      t.length == 0 && (o.data = o._data = t = [[]]), Jn = t[0], Dn = Jn.length;
      let me = t;
      if (H == 2) {
        me = t.slice();
        let ye = me[0] = Array(Dn);
        for (let Ie = 0; Ie < Dn; Ie++)
          ye[Ie] = Ie;
      }
      o._data = t = me;
    }
    if (il(!0), io("setData"), H == 2 && (at = !0), J !== !1) {
      let me = A;
      me.auto(o, pr) ? la() : Ko(w, me.min, me.max), dt = dt || gt.left >= 0, Ct = !0, Ri();
    }
  }
  o.setData = Wo;
  function la() {
    pr = !0;
    let Y, J;
    r == 1 && (Dn > 0 ? (cn = er[0] = 0, An = er[1] = Dn - 1, Y = t[0][cn], J = t[0][An], H == 2 ? (Y = cn, J = An) : Y == J && (H == 3 ? [Y, J] = vh(Y, Y, A.log, !1) : H == 4 ? [Y, J] = Ny(Y, Y, A.log, !1) : A.time ? J = Y + Oo(86400 / S) : [Y, J] = kp(Y, J, Ry, !0))) : (cn = er[0] = Y = null, An = er[1] = J = null)), Ko(w, Y, J);
  }
  let sa, ai, Ei, Qa, Di, Za, li, Ai, Hl, tr;
  function Ks(Y, J, me, ye, Ie, b) {
    Y ??= pw, me ??= Fy, ye ??= "butt", Ie ??= pw, b ??= "round", Y != sa && (f.strokeStyle = sa = Y), Ie != ai && (f.fillStyle = ai = Ie), J != Ei && (f.lineWidth = Ei = J), b != Di && (f.lineJoin = Di = b), ye != Za && (f.lineCap = Za = ye), me != Qa && f.setLineDash(Qa = me);
  }
  function Vl(Y, J, me, ye) {
    J != ai && (f.fillStyle = ai = J), Y != li && (f.font = li = Y), me != Ai && (f.textAlign = Ai = me), ye != Hl && (f.textBaseline = Hl = ye);
  }
  function Ja(Y, J, me, ye, Ie = 0) {
    if (ye.length > 0 && Y.auto(o, pr) && (J == null || J.min == null)) {
      let b = In(cn, 0), y = In(An, ye.length - 1), k = me.min == null ? Y.distr == 3 ? X4(ye, b, y) : U4(ye, b, y, Ie) : [me.min, me.max];
      Y.min = Jr(Y.min, me.min = k[0]), Y.max = Qo(Y.max, me.max = k[1]);
    }
  }
  const jl = { min: null, max: null };
  function Wl() {
    for (let ye in $) {
      let Ie = $[ye];
      R[ye] == null && // scales that have never been set (on init)
      (Ie.min == null || // or auto scales when the x scale was explicitly set
      R[w] != null && Ie.auto(o, pr)) && (R[ye] = jl);
    }
    for (let ye in $) {
      let Ie = $[ye];
      R[ye] == null && Ie.from != null && R[Ie.from] != null && (R[ye] = jl);
    }
    R[w] != null && il(!0);
    let Y = {};
    for (let ye in R) {
      let Ie = R[ye];
      if (Ie != null) {
        let b = Y[ye] = Hu($[ye], i3);
        if (Ie.min != null)
          So(b, Ie);
        else if (ye != w || r == 2)
          if (Dn == 0 && b.from == null) {
            let y = b.range(o, null, null, ye);
            b.min = y[0], b.max = y[1];
          } else
            b.min = vn, b.max = -vn;
      }
    }
    if (Dn > 0) {
      C.forEach((ye, Ie) => {
        if (r == 1) {
          let b = ye.scale, y = R[b];
          if (y == null)
            return;
          let k = Y[b];
          if (Ie == 0) {
            let D = k.range(o, k.min, k.max, b);
            k.min = D[0], k.max = D[1], cn = bi(k.min, t[0]), An = bi(k.max, t[0]), An - cn > 1 && (t[0][cn] < k.min && cn++, t[0][An] > k.max && An--), ye.min = Jn[cn], ye.max = Jn[An];
          } else ye.show && ye.auto && Ja(k, y, ye, t[Ie], ye.sorted);
          ye.idxs[0] = cn, ye.idxs[1] = An;
        } else if (Ie > 0 && ye.show && ye.auto) {
          let [b, y] = ye.facets, k = b.scale, D = y.scale, [z, V] = t[Ie], U = Y[k], Z = Y[D];
          U != null && Ja(U, R[k], b, z, b.sorted), Z != null && Ja(Z, R[D], y, V, y.sorted), ye.min = y.min, ye.max = y.max;
        }
      });
      for (let ye in Y) {
        let Ie = Y[ye], b = R[ye];
        if (Ie.from == null && (b == null || b.min == null)) {
          let y = Ie.range(
            o,
            Ie.min == vn ? null : Ie.min,
            Ie.max == -vn ? null : Ie.max,
            ye
          );
          Ie.min = y[0], Ie.max = y[1];
        }
      }
    }
    for (let ye in Y) {
      let Ie = Y[ye];
      if (Ie.from != null) {
        let b = Y[Ie.from];
        if (b.min == null)
          Ie.min = Ie.max = null;
        else {
          let y = Ie.range(o, b.min, b.max, ye);
          Ie.min = y[0], Ie.max = y[1];
        }
      }
    }
    let J = {}, me = !1;
    for (let ye in Y) {
      let Ie = Y[ye], b = $[ye];
      if (b.min != Ie.min || b.max != Ie.max) {
        b.min = Ie.min, b.max = Ie.max;
        let y = b.distr;
        b._min = y == 3 ? Da(b.min) : y == 4 ? Ng(b.min, b.asinh) : y == 100 ? b.fwd(b.min) : b.min, b._max = y == 3 ? Da(b.max) : y == 4 ? Ng(b.max, b.asinh) : y == 100 ? b.fwd(b.max) : b.max, J[ye] = me = !0;
      }
    }
    if (me) {
      C.forEach((ye, Ie) => {
        r == 2 ? Ie > 0 && J.y && (ye._paths = null) : J[ye.scale] && (ye._paths = null);
      });
      for (let ye in J)
        at = !0, io("setScale", ye);
      gt.show && gt.left >= 0 && (dt = Ct = !0);
    }
    for (let ye in R)
      R[ye] = null;
  }
  function el(Y) {
    let J = ym(cn - 1, 0, Dn - 1), me = ym(An + 1, 0, Dn - 1);
    for (; Y[J] == null && J > 0; )
      J--;
    for (; Y[me] == null && me < Dn - 1; )
      me++;
    return [J, me];
  }
  function tl() {
    Dn > 0 && (C.forEach((Y, J) => {
      if (J > 0 && Y.show && (ro(J, !1), ro(J, !0), Y._paths == null)) {
        tr != Y.alpha && (f.globalAlpha = tr = Y.alpha);
        let me = r == 2 ? [0, t[J][0].length - 1] : el(t[J]);
        Y._paths = Y.paths(o, J, me[0], me[1]), tr != 1 && (f.globalAlpha = tr = 1);
      }
    }), C.forEach((Y, J) => {
      if (J > 0 && Y.show) {
        tr != Y.alpha && (f.globalAlpha = tr = Y.alpha), Y._paths != null && nr(J, !1);
        {
          let me = Y._paths != null ? Y._paths.gaps : null, ye = Y.points.show(o, J, cn, An, me), Ie = Y.points.filter(o, J, ye, me);
          (ye || Ie) && (Y.points._paths = Y.points.paths(o, J, cn, An, Ie), nr(J, !0));
        }
        tr != 1 && (f.globalAlpha = tr = 1), io("drawSeries", J);
      }
    }));
  }
  function ro(Y, J) {
    let me = J ? C[Y].points : C[Y];
    me._stroke = me.stroke(o, Y), me._fill = me.fill(o, Y);
  }
  function nr(Y, J) {
    let me = J ? C[Y].points : C[Y], {
      stroke: ye,
      fill: Ie,
      clip: b,
      flags: y,
      _stroke: k = me._stroke,
      _fill: D = me._fill,
      _width: z = me.width
    } = me._paths;
    z = Un(z * Rn, 3);
    let V = null, U = z % 2 / 2;
    J && D == null && (D = z > 0 ? "#fff" : k);
    let Z = me.pxAlign == 1 && U > 0;
    if (Z && f.translate(U, U), !J) {
      let se = tt - z / 2, we = Ee - z / 2, de = Re + z, Oe = Be + z;
      V = new Path2D(), V.rect(se, we, de, Oe);
    }
    J ? Fo(k, z, me.dash, me.cap, D, ye, Ie, y, b) : ua(Y, k, z, me.dash, me.cap, D, ye, Ie, y, V, b), Z && f.translate(-U, -U);
  }
  function ua(Y, J, me, ye, Ie, b, y, k, D, z, V) {
    let U = !1;
    D != 0 && I.forEach((Z, se) => {
      if (Z.series[0] == Y) {
        let we = C[Z.series[1]], de = t[Z.series[1]], Oe = (we._paths || Gc).band;
        ml(Oe) && (Oe = Z.dir == 1 ? Oe[0] : Oe[1]);
        let Te, Ye = null;
        we.show && Oe && Z4(de, cn, An) ? (Ye = Z.fill(o, se) || b, Te = we._paths.clip) : Oe = null, Fo(J, me, ye, Ie, Ye, y, k, D, z, V, Te, Oe), U = !0;
      }
    }), U || Fo(J, me, ye, Ie, b, y, k, D, z, V);
  }
  const or = Vu | Sm;
  function Fo(Y, J, me, ye, Ie, b, y, k, D, z, V, U) {
    Ks(Y, J, me, ye, Ie), (D || z || U) && (f.save(), D && f.clip(D), z && f.clip(z)), U ? (k & or) == or ? (f.clip(U), V && f.clip(V), ol(Ie, y), nl(Y, b, J)) : k & Sm ? (ol(Ie, y), f.clip(U), nl(Y, b, J)) : k & Vu && (f.save(), f.clip(U), V && f.clip(V), ol(Ie, y), f.restore(), nl(Y, b, J)) : (ol(Ie, y), nl(Y, b, J)), (D || z || U) && f.restore();
  }
  function nl(Y, J, me) {
    me > 0 && (J instanceof Map ? J.forEach((ye, Ie) => {
      f.strokeStyle = sa = Ie, f.stroke(ye);
    }) : J != null && Y && f.stroke(J));
  }
  function ol(Y, J) {
    J instanceof Map ? J.forEach((me, ye) => {
      f.fillStyle = ai = ye, f.fill(me);
    }) : J != null && Y && f.fill(J);
  }
  function rl(Y, J, me, ye) {
    let Ie = P[Y], b;
    if (ye <= 0)
      b = [0, 0];
    else {
      let y = Ie._space = Ie.space(o, Y, J, me, ye), k = Ie._incrs = Ie.incrs(o, Y, J, me, ye, y);
      b = yF(J, me, k, ye, y);
    }
    return Ie._found = b;
  }
  function Ni(Y, J, me, ye, Ie, b, y, k, D, z) {
    let V = y % 2 / 2;
    m == 1 && f.translate(V, V), Ks(k, y, D, z, k), f.beginPath();
    let U, Z, se, we, de = Ie + (ye == 0 || ye == 3 ? -b : b);
    me == 0 ? (Z = Ie, we = de) : (U = Ie, se = de);
    for (let Oe = 0; Oe < Y.length; Oe++)
      J[Oe] != null && (me == 0 ? U = se = Y[Oe] : Z = we = Y[Oe], f.moveTo(U, Z), f.lineTo(se, we));
    f.stroke(), m == 1 && f.translate(-V, -V);
  }
  function qs(Y) {
    let J = !0;
    return P.forEach((me, ye) => {
      if (!me.show)
        return;
      let Ie = $[me.scale];
      if (Ie.min == null) {
        me._show && (J = !1, me._show = !1, il(!1));
        return;
      } else
        me._show || (J = !1, me._show = !0, il(!1));
      let b = me.side, y = b % 2, { min: k, max: D } = Ie, [z, V] = rl(ye, k, D, y == 0 ? je : Pe);
      if (V == 0)
        return;
      let U = Ie.distr == 2, Z = me._splits = me.splits(o, ye, k, D, z, V, U), se = Ie.distr == 2 ? Z.map((Te) => Jn[Te]) : Z, we = Ie.distr == 2 ? Jn[Z[1]] - Jn[Z[0]] : z, de = me._values = me.values(o, me.filter(o, se, ye, V, we), ye, V, we);
      me._rotate = b == 2 ? me.rotate(o, de, ye, V) : 0;
      let Oe = me._size;
      me._size = Qr(me.size(o, de, ye, Y)), Oe != null && me._size != Oe && (J = !1);
    }), J;
  }
  function Kl(Y) {
    let J = !0;
    return zo.forEach((me, ye) => {
      let Ie = me(o, ye, Cn, Y);
      Ie != un[ye] && (J = !1), un[ye] = Ie;
    }), J;
  }
  function Gd() {
    for (let Y = 0; Y < P.length; Y++) {
      let J = P[Y];
      if (!J.show || !J._show)
        continue;
      let me = J.side, ye = me % 2, Ie, b, y = J.stroke(o, Y), k = me == 0 || me == 3 ? -1 : 1;
      if (J.label) {
        let Yn = J.labelGap * k, co = Oo((J._lpos + Yn) * Rn);
        Vl(J.labelFont[0], y, "center", me == 2 ? kc : fw), f.save(), ye == 1 ? (Ie = b = 0, f.translate(
          co,
          Oo(Ee + Be / 2)
        ), f.rotate((me == 3 ? -Qf : Qf) / 2)) : (Ie = Oo(tt + Re / 2), b = co), f.fillText(J.label, Ie, b), f.restore();
      }
      let [D, z] = J._found;
      if (z == 0)
        continue;
      let V = $[J.scale], U = ye == 0 ? Re : Be, Z = ye == 0 ? tt : Ee, se = Oo(J.gap * Rn), we = J._splits, de = V.distr == 2 ? we.map((Yn) => Jn[Yn]) : we, Oe = V.distr == 2 ? Jn[we[1]] - Jn[we[0]] : D, Te = J.ticks, Ye = J.border, Qe = Te.show ? Oo(Te.size * Rn) : 0, Ze = J._rotate * -Qf / 180, lt = x(J._pos * Rn), st = (Qe + se) * k, xt = lt + st;
      b = ye == 0 ? xt : 0, Ie = ye == 1 ? xt : 0;
      let Rt = J.font[0], Gt = J.align == 1 ? tu : J.align == 2 ? Dg : Ze > 0 ? tu : Ze < 0 ? Dg : ye == 0 ? "center" : me == 3 ? Dg : tu, Mt = Ze || ye == 1 ? "middle" : me == 2 ? kc : fw;
      Vl(Rt, y, Gt, Mt);
      let jt = J.font[1] * J.lineGap, Nn = we.map((Yn) => x(s(Yn, V, U, Z))), xn = J._values;
      for (let Yn = 0; Yn < xn.length; Yn++) {
        let co = xn[Yn];
        if (co != null) {
          ye == 0 ? Ie = Nn[Yn] : b = Nn[Yn], co = "" + co;
          let di = co.indexOf(`
`) == -1 ? [co] : co.split(/\n/gm);
          for (let hr = 0; hr < di.length; hr++) {
            let Vr = di[hr];
            Ze ? (f.save(), f.translate(Ie, b + hr * jt), f.rotate(Ze), f.fillText(Vr, 0, 0), f.restore()) : f.fillText(Vr, Ie, b + hr * jt);
          }
        }
      }
      Te.show && Ni(
        Nn,
        Te.filter(o, de, Y, z, Oe),
        ye,
        me,
        lt,
        Qe,
        Un(Te.width * Rn, 3),
        Te.stroke(o, Y),
        Te.dash,
        Te.cap
      );
      let Bn = J.grid;
      Bn.show && Ni(
        Nn,
        Bn.filter(o, de, Y, z, Oe),
        ye,
        ye == 0 ? 2 : 1,
        ye == 0 ? Ee : tt,
        ye == 0 ? Be : Re,
        Un(Bn.width * Rn, 3),
        Bn.stroke(o, Y),
        Bn.dash,
        Bn.cap
      ), Ye.show && Ni(
        [lt],
        [1],
        ye == 0 ? 1 : 0,
        ye == 0 ? 1 : 2,
        ye == 1 ? Ee : tt,
        ye == 1 ? Be : Re,
        Un(Ye.width * Rn, 3),
        Ye.stroke(o, Y),
        Ye.dash,
        Ye.cap
      );
    }
    io("drawAxes");
  }
  function il(Y) {
    C.forEach((J, me) => {
      me > 0 && (J._paths = null, Y && (r == 1 ? (J.min = null, J.max = null) : J.facets.forEach((ye) => {
        ye.min = null, ye.max = null;
      })));
    });
  }
  let Ys = !1, Gs = !1, al = [];
  function dg() {
    Gs = !1;
    for (let Y = 0; Y < al.length; Y++)
      io(...al[Y]);
    al.length = 0;
  }
  function Ri() {
    Ys || (f3(mc), Ys = !0);
  }
  function fg(Y, J = !1) {
    Ys = !0, Gs = J, Y(o), mc(), J && al.length > 0 && queueMicrotask(dg);
  }
  o.batch = fg;
  function mc() {
    if (ot && (Wl(), ot = !1), at && (Wt(), at = !1), pt) {
      if (to(v, tu, Ge), to(v, kc, Se), to(v, Fc, je), to(v, Bc, Pe), to(g, tu, Ge), to(g, kc, Se), to(g, Fc, je), to(g, Bc, Pe), to(p, Fc, Ve), to(p, Bc, nt), d.width = Oo(Ve * Rn), d.height = Oo(nt * Rn), P.forEach(({ _el: Y, _show: J, _size: me, _pos: ye, side: Ie }) => {
        if (Y != null)
          if (J) {
            let b = Ie === 3 || Ie === 0 ? me : 0, y = Ie % 2 == 1;
            to(Y, y ? "left" : "top", ye - b), to(Y, y ? "width" : "height", me), to(Y, y ? "top" : "left", y ? Se : Ge), to(Y, y ? "height" : "width", y ? Pe : je), mm(Y, us);
          } else
            Or(Y, us);
      }), sa = ai = Ei = Di = Za = li = Ai = Hl = Qa = null, tr = 1, pl(!0), Ge != Ce || Se != Ae || je != qe || Pe != We) {
        il(!1);
        let Y = je / qe, J = Pe / We;
        if (gt.show && !dt && gt.left >= 0) {
          gt.left *= Y, gt.top *= J, ca && Hi(ca, Oo(gt.left), 0, je, Pe), da && Hi(da, 0, Oo(gt.top), je, Pe);
          for (let me = 0; me < Ue.length; me++) {
            let ye = Ue[me];
            ye != null && (ht[me] *= Y, vt[me] *= J, Hi(ye, Qr(ht[me]), Qr(vt[me]), je, Pe));
          }
        }
        if (Vn.show && !wt && Vn.left >= 0 && Vn.width > 0) {
          Vn.left *= Y, Vn.width *= Y, Vn.top *= J, Vn.height *= J;
          for (let me in Sc)
            to(zi, me, Vn[me]);
        }
        Ce = Ge, Ae = Se, qe = je, We = Pe;
      }
      io("setSize"), pt = !1;
    }
    Ve > 0 && nt > 0 && (f.clearRect(0, 0, d.width, d.height), io("drawClear"), M.forEach((Y) => Y()), io("draw")), Vn.show && wt && (Us(Vn), wt = !1), gt.show && dt && (Li(null, !0, !1), dt = !1), G.show && G.live && Ct && (fl(), Ct = !1), u || (u = !0, o.status = 1, io("ready")), pr = !1, Ys = !1;
  }
  o.redraw = (Y, J) => {
    at = J || !1, Y !== !1 ? Ko(w, A.min, A.max) : Ri();
  };
  function bc(Y, J) {
    let me = $[Y];
    if (me.from == null) {
      if (Dn == 0) {
        let ye = me.range(o, J.min, J.max, Y);
        J.min = ye[0], J.max = ye[1];
      }
      if (J.min > J.max) {
        let ye = J.min;
        J.min = J.max, J.max = ye;
      }
      if (Dn > 1 && J.min != null && J.max != null && J.max - J.min < 1e-16)
        return;
      Y == w && me.distr == 2 && Dn > 0 && (J.min = bi(J.min, t[0]), J.max = bi(J.max, t[0]), J.min == J.max && J.max++), R[Y] = J, ot = !0, Ri();
    }
  }
  o.setScale = bc;
  let ll, yc, ca, da, Ud, xc, fa, sl, ul, ql, qn, Hn, si = !1;
  const Po = gt.drag;
  let ho = Po.x, mo = Po.y;
  gt.show && (gt.x && (ll = Gr(R4, g)), gt.y && (yc = Gr(z4, g)), A.ori == 0 ? (ca = ll, da = yc) : (ca = yc, da = ll), qn = gt.left, Hn = gt.top);
  const Vn = o.select = So({
    show: !0,
    over: !0,
    left: 0,
    width: 0,
    top: 0,
    height: 0
  }, e.select), zi = Vn.show ? Gr(N4, Vn.over ? g : v) : null;
  function Us(Y, J) {
    if (Vn.show) {
      for (let me in Y)
        Vn[me] = Y[me], me in Sc && to(zi, me, Y[me]);
      J !== !1 && io("setSelect");
    }
  }
  o.setSelect = Us;
  function pg(Y, J) {
    let me = C[Y], ye = ae ? ve[Y] : null;
    if (me.show)
      ye && mm(ye, us);
    else {
      ye && Or(ye, us);
      let Ie = Uo ? Ue[0] : Ue[Y];
      Hi(Ie, -10, -10, je, Pe);
    }
  }
  function Ko(Y, J, me) {
    bc(Y, { min: J, max: me });
  }
  function Lr(Y, J, me, ye) {
    J.focus != null && vg(Y), J.show != null && C.forEach((Ie, b) => {
      b > 0 && (Y == b || Y == null) && (Ie.show = J.show, pg(b, J.show), r == 2 ? (Ko(Ie.facets[0].scale, null, null), Ko(Ie.facets[1].scale, null, null)) : Ko(Ie.scale, null, null), Ri());
    }), me !== !1 && io("setSeries", Y, J), ye && Ul("setSeries", o, Y, J);
  }
  o.setSeries = Lr;
  function hg(Y, J) {
    So(I[Y], J);
  }
  function gg(Y, J) {
    Y.fill = gn(Y.fill || null), Y.dir = In(Y.dir, -1), J = J ?? I.length, I.splice(J, 0, Y);
  }
  function Xd(Y) {
    Y == null ? I.length = 0 : I.splice(Y, 1);
  }
  o.addBand = gg, o.setBand = hg, o.delBand = Xd;
  function Qd(Y, J) {
    C[Y].alpha = J, gt.show && Ue[Y] && (Ue[Y].style.opacity = J), ae && ve[Y] && (ve[Y].style.opacity = J);
  }
  let eo, Fi, pa;
  const cl = { focus: !0 };
  function vg(Y) {
    if (Y != pa) {
      let J = Y == null, me = Kn.alpha != 1;
      C.forEach((ye, Ie) => {
        if (r == 1 || Ie > 0) {
          let b = J || Ie == 0 || Ie == Y;
          ye._focus = J ? null : b, me && Qd(Ie, b ? 1 : Kn.alpha);
        }
      }), pa = Y, me && Ri();
    }
  }
  ae && so && De(mw, ie, (Y) => {
    gt._lock || (En(Y), pa != null && Lr(null, cl, !0, uo.setSeries));
  });
  function Hr(Y, J, me) {
    let ye = $[J];
    me && (Y = Y / Rn - (ye.ori == 1 ? Se : Ge));
    let Ie = je;
    ye.ori == 1 && (Ie = Pe, Y = Ie - Y), ye.dir == -1 && (Y = Ie - Y);
    let b = ye._min, y = ye._max, k = Y / Ie, D = b + (y - b) * k, z = ye.distr;
    return z == 3 ? Bu(10, D) : z == 4 ? e3(D, ye.asinh) : z == 100 ? ye.bwd(D) : D;
  }
  function mg(Y, J) {
    let me = Hr(Y, w, J);
    return bi(me, t[0], cn, An);
  }
  o.valToIdx = (Y) => bi(Y, t[0]), o.posToIdx = mg, o.posToVal = Hr, o.valToPos = (Y, J, me) => $[J].ori == 0 ? a(
    Y,
    $[J],
    me ? Re : je,
    me ? tt : 0
  ) : l(
    Y,
    $[J],
    me ? Be : Pe,
    me ? Ee : 0
  ), o.setCursor = (Y, J, me) => {
    qn = Y.left, Hn = Y.top, Li(null, J, me);
  };
  function Zd(Y, J) {
    to(zi, tu, Vn.left = Y), to(zi, Fc, Vn.width = J);
  }
  function Jd(Y, J) {
    to(zi, kc, Vn.top = Y), to(zi, Bc, Vn.height = J);
  }
  let dl = A.ori == 0 ? Zd : Jd, Bi = A.ori == 1 ? Zd : Jd;
  function ha() {
    if (ae && G.live)
      for (let Y = r == 2 ? 1 : 0; Y < C.length; Y++) {
        if (Y == 0 && ge)
          continue;
        let J = G.values[Y], me = 0;
        for (let ye in J)
          ue[Y][me++].firstChild.nodeValue = J[ye];
      }
  }
  function fl(Y, J) {
    if (Y != null && (Y.idxs ? Y.idxs.forEach((me, ye) => {
      q[ye] = me;
    }) : r3(Y.idx) || q.fill(Y.idx), G.idx = q[0]), ae && G.live) {
      for (let me = 0; me < C.length; me++)
        (me > 0 || r == 1 && !ge) && bg(me, q[me]);
      ha();
    }
    Ct = !1, J !== !1 && io("setLegend");
  }
  o.setLegend = fl;
  function bg(Y, J) {
    let me = C[Y], ye = Y == 0 && H == 2 ? Jn : t[Y], Ie;
    ge ? Ie = me.values(o, Y, J) ?? _e : (Ie = me.value(o, J == null ? null : ye[J], Y, J), Ie = Ie == null ? _e : { _: Ie }), G.values[Y] = Ie;
  }
  function Li(Y, J, me) {
    ul = qn, ql = Hn, [qn, Hn] = gt.move(o, qn, Hn), gt.left = qn, gt.top = Hn, gt.show && (ca && Hi(ca, Oo(qn), 0, je, Pe), da && Hi(da, 0, Oo(Hn), je, Pe));
    let ye, Ie = cn > An;
    eo = vn, Fi = null;
    let b = A.ori == 0 ? je : Pe, y = A.ori == 1 ? je : Pe;
    if (qn < 0 || Dn == 0 || Ie) {
      ye = gt.idx = null;
      for (let k = 0; k < C.length; k++) {
        let D = Ue[k];
        D != null && Hi(D, -10, -10, je, Pe);
      }
      so && Lr(null, cl, !0, Y == null && uo.setSeries), G.live && (q.fill(ye), Ct = !0);
    } else {
      let k, D, z;
      r == 1 && (k = A.ori == 0 ? qn : Hn, D = Hr(k, w), ye = gt.idx = bi(D, t[0], cn, An), z = B(t[0][ye], A, b, 0));
      let V = -10, U = -10, Z = 0, se = 0, we = !0, de = "", Oe = "";
      for (let Te = r == 2 ? 1 : 0; Te < C.length; Te++) {
        let Ye = C[Te], Qe = q[Te], Ze = Qe == null ? null : r == 1 ? t[Te][Qe] : t[Te][1][Qe], lt = gt.dataIdx(o, Te, ye, D), st = lt == null ? null : r == 1 ? t[Te][lt] : t[Te][1][lt];
        Ct = Ct || st != Ze || lt != Qe, q[Te] = lt;
        let xt = lt == ye ? z : B(r == 1 ? t[0][lt] : t[Te][0][lt], A, b, 0);
        if (Te > 0 && Ye.show) {
          let Rt = st == null ? -10 : F(st, r == 1 ? $[Ye.scale] : $[Ye.facets[1].scale], y, 0);
          if (so && st != null) {
            let Gt = A.ori == 1 ? qn : Hn, Mt = Io(Kn.dist(o, Te, lt, Rt, Gt));
            if (Mt < eo) {
              let jt = Kn.bias;
              if (jt != 0) {
                let Nn = Hr(Gt, Ye.scale), xn = st >= 0 ? 1 : -1, Bn = Nn >= 0 ? 1 : -1;
                Bn == xn && (Bn == 1 ? jt == 1 ? st >= Nn : st <= Nn : (
                  // >= 0
                  jt == 1 ? st <= Nn : st >= Nn
                )) && (eo = Mt, Fi = Te);
              } else
                eo = Mt, Fi = Te;
            }
          }
          if (Ct || Uo) {
            let Gt, Mt;
            A.ori == 0 ? (Gt = xt, Mt = Rt) : (Gt = Rt, Mt = xt);
            let jt, Nn, xn, Bn, Yn, co, di = !0, hr = hn.bbox;
            if (hr != null) {
              di = !1;
              let Vr = hr(o, Te);
              xn = Vr.left, Bn = Vr.top, jt = Vr.width, Nn = Vr.height;
            } else
              xn = Gt, Bn = Mt, jt = Nn = hn.size(o, Te);
            if (co = hn.fill(o, Te), Yn = hn.stroke(o, Te), Uo)
              Te == Fi && eo <= Kn.prox && (V = xn, U = Bn, Z = jt, se = Nn, we = di, de = co, Oe = Yn);
            else {
              let Vr = Ue[Te];
              Vr != null && (ht[Te] = xn, vt[Te] = Bn, $w(Vr, jt, Nn, di), Sw(Vr, co, Yn), Hi(Vr, Qr(xn), Qr(Bn), je, Pe));
            }
          }
        }
      }
      if (Uo) {
        let Te = Kn.prox, Ye = pa == null ? eo <= Te : eo > Te || Fi != pa;
        if (Ct || Ye) {
          let Qe = Ue[0];
          ht[0] = V, vt[0] = U, $w(Qe, Z, se, we), Sw(Qe, de, Oe), Hi(Qe, Qr(V), Qr(U), je, Pe);
        }
      }
    }
    if (Vn.show && si)
      if (Y != null) {
        let [k, D] = uo.scales, [z, V] = uo.match, [U, Z] = Y.cursor.sync.scales, se = Y.cursor.drag;
        if (ho = se._x, mo = se._y, ho || mo) {
          let { left: we, top: de, width: Oe, height: Te } = Y.select, Ye = Y.scales[U].ori, Qe = Y.posToVal, Ze, lt, st, xt, Rt, Gt = k != null && z(k, U), Mt = D != null && V(D, Z);
          Gt && ho ? (Ye == 0 ? (Ze = we, lt = Oe) : (Ze = de, lt = Te), st = $[k], xt = B(Qe(Ze, U), st, b, 0), Rt = B(Qe(Ze + lt, U), st, b, 0), dl(Jr(xt, Rt), Io(Rt - xt))) : dl(0, b), Mt && mo ? (Ye == 1 ? (Ze = we, lt = Oe) : (Ze = de, lt = Te), st = $[D], xt = F(Qe(Ze, Z), st, y, 0), Rt = F(Qe(Ze + lt, Z), st, y, 0), Bi(Jr(xt, Rt), Io(Rt - xt))) : Bi(0, y);
        } else
          Xs();
      } else {
        let k = Io(ul - Ud), D = Io(ql - xc);
        if (A.ori == 1) {
          let Z = k;
          k = D, D = Z;
        }
        ho = Po.x && k >= Po.dist, mo = Po.y && D >= Po.dist;
        let z = Po.uni;
        z != null ? ho && mo && (ho = k >= z, mo = D >= z, !ho && !mo && (D > k ? mo = !0 : ho = !0)) : Po.x && Po.y && (ho || mo) && (ho = mo = !0);
        let V, U;
        ho && (A.ori == 0 ? (V = fa, U = qn) : (V = sl, U = Hn), dl(Jr(V, U), Io(U - V)), mo || Bi(0, y)), mo && (A.ori == 1 ? (V = fa, U = qn) : (V = sl, U = Hn), Bi(Jr(V, U), Io(U - V)), ho || dl(0, b)), !ho && !mo && (dl(0, 0), Bi(0, 0));
      }
    if (Po._x = ho, Po._y = mo, Y == null) {
      if (me) {
        if (Js != null) {
          let [k, D] = uo.scales;
          uo.values[0] = k != null ? Hr(A.ori == 0 ? qn : Hn, k) : null, uo.values[1] = D != null ? Hr(A.ori == 1 ? qn : Hn, D) : null;
        }
        Ul(hw, o, qn, Hn, je, Pe, ye);
      }
      if (so) {
        let k = me && uo.setSeries, D = Kn.prox;
        pa == null ? eo <= D && Lr(Fi, cl, !0, k) : eo > D ? Lr(null, cl, !0, k) : Fi != pa && Lr(Fi, cl, !0, k);
      }
    }
    Ct && (G.idx = ye, fl()), J !== !1 && io("setCursor");
  }
  let ui = null;
  Object.defineProperty(o, "rect", {
    get() {
      return ui == null && pl(!1), ui;
    }
  });
  function pl(Y = !1) {
    Y ? ui = null : (ui = g.getBoundingClientRect(), io("syncRect", ui));
  }
  function hl(Y, J, me, ye, Ie, b, y) {
    gt._lock || si && Y != null && Y.movementX == 0 && Y.movementY == 0 || (wc(Y, J, me, ye, Ie, b, y, !1, Y != null), Y != null ? Li(null, !0, !0) : Li(J, !0, !1));
  }
  function wc(Y, J, me, ye, Ie, b, y, k, D) {
    if (ui == null && pl(!1), En(Y), Y != null)
      me = Y.clientX - ui.left, ye = Y.clientY - ui.top;
    else {
      if (me < 0 || ye < 0) {
        qn = -10, Hn = -10;
        return;
      }
      let [z, V] = uo.scales, U = J.cursor.sync, [Z, se] = U.values, [we, de] = U.scales, [Oe, Te] = uo.match, Ye = J.axes[0].side % 2 == 1, Qe = A.ori == 0 ? je : Pe, Ze = A.ori == 1 ? je : Pe, lt = Ye ? b : Ie, st = Ye ? Ie : b, xt = Ye ? ye : me, Rt = Ye ? me : ye;
      if (we != null ? me = Oe(z, we) ? s(Z, $[z], Qe, 0) : -10 : me = Qe * (xt / lt), de != null ? ye = Te(V, de) ? s(se, $[V], Ze, 0) : -10 : ye = Ze * (Rt / st), A.ori == 1) {
        let Gt = me;
        me = ye, ye = Gt;
      }
    }
    D && ((me <= 1 || me >= je - 1) && (me = is(me, je)), (ye <= 1 || ye >= Pe - 1) && (ye = is(ye, Pe))), k ? (Ud = me, xc = ye, [fa, sl] = gt.move(o, me, ye)) : (qn = me, Hn = ye);
  }
  const Sc = {
    width: 0,
    height: 0,
    left: 0,
    top: 0
  };
  function Xs() {
    Us(Sc, !1);
  }
  let ef, tf, nf, Qs;
  function of(Y, J, me, ye, Ie, b, y) {
    si = !0, ho = mo = Po._x = Po._y = !1, wc(Y, J, me, ye, Ie, b, y, !0, !1), Y != null && (De(Ag, gm, Yl, !1), Ul(gw, o, fa, sl, je, Pe, null));
    let { left: k, top: D, width: z, height: V } = Vn;
    ef = k, tf = D, nf = z, Qs = V, Xs();
  }
  function Yl(Y, J, me, ye, Ie, b, y) {
    si = Po._x = Po._y = !1, wc(Y, J, me, ye, Ie, b, y, !1, !0);
    let { left: k, top: D, width: z, height: V } = Vn, U = z > 0 || V > 0, Z = ef != k || tf != D || nf != z || Qs != V;
    if (U && Z && Us(Vn), Po.setScale && U && Z) {
      let se = k, we = z, de = D, Oe = V;
      if (A.ori == 1 && (se = D, we = V, de = k, Oe = z), ho && Ko(
        w,
        Hr(se, w),
        Hr(se + we, w)
      ), mo)
        for (let Te in $) {
          let Ye = $[Te];
          Te != w && Ye.from == null && Ye.min != vn && Ko(
            Te,
            Hr(de + Oe, Te),
            Hr(de, Te)
          );
        }
      Xs();
    } else gt.lock && (gt._lock = !gt._lock, Li(null, !0, !1));
    Y != null && (Fe(Ag, gm), Ul(Ag, o, qn, Hn, je, Pe, null));
  }
  function yg(Y, J, me, ye, Ie, b, y) {
    if (gt._lock)
      return;
    En(Y);
    let k = si;
    if (si) {
      let D = !0, z = !0, V = 10, U, Z;
      A.ori == 0 ? (U = ho, Z = mo) : (U = mo, Z = ho), U && Z && (D = qn <= V || qn >= je - V, z = Hn <= V || Hn >= Pe - V), U && D && (qn = qn < fa ? 0 : je), Z && z && (Hn = Hn < sl ? 0 : Pe), Li(null, !0, !0), si = !1;
    }
    qn = -10, Hn = -10, Li(null, !0, !0), k && (si = k);
  }
  function Zs(Y, J, me, ye, Ie, b, y) {
    gt._lock || (En(Y), la(), Xs(), Y != null && Ul(bw, o, qn, Hn, je, Pe, null));
  }
  function rf() {
    P.forEach(xF), St(o.width, o.height, !0);
  }
  Ss(Op, Ou, rf);
  const gl = {};
  gl.mousedown = of, gl.mousemove = hl, gl.mouseup = Yl, gl.dblclick = Zs, gl.setSeries = (Y, J, me, ye) => {
    let Ie = uo.match[2];
    me = Ie(o, J, me), me != -1 && Lr(me, ye, !0, !1);
  }, gt.show && (De(gw, g, of), De(hw, g, hl), De(vw, g, (Y) => {
    En(Y), pl(!1);
  }), De(mw, g, yg), De(bw, g, Zs), Cm.add(o), o.syncRect = pl);
  const Gl = o.hooks = e.hooks || {};
  function io(Y, J, me) {
    Gs ? al.push([Y, J, me]) : Y in Gl && Gl[Y].forEach((ye) => {
      ye.call(null, o, J, me);
    });
  }
  (e.plugins || []).forEach((Y) => {
    for (let J in Y.hooks)
      Gl[J] = (Gl[J] || []).concat(Y.hooks[J]);
  });
  const ci = (Y, J, me) => me, uo = So({
    key: null,
    setSeries: !1,
    filters: {
      pub: _w,
      sub: _w
    },
    scales: [w, C[1] ? C[1].scale : null],
    match: [Tw, Tw, ci],
    values: [null, null]
  }, gt.sync);
  uo.match.length == 2 && uo.match.push(ci), gt.sync = uo;
  const Js = uo.key, Cc = Ik(Js);
  function Ul(Y, J, me, ye, Ie, b, y) {
    uo.filters.pub(Y, J, me, ye, Ie, b, y) && Cc.pub(Y, J, me, ye, Ie, b, y);
  }
  Cc.sub(o);
  function xg(Y, J, me, ye, Ie, b, y) {
    uo.filters.sub(Y, J, me, ye, Ie, b, y) && gl[Y](null, J, me, ye, Ie, b, y);
  }
  o.pub = xg;
  function wg() {
    Cc.unsub(o), Cm.delete(o), Xe.clear(), bm(Op, Ou, rf), c.remove(), ie?.remove(), io("destroy");
  }
  o.destroy = wg;
  function $c() {
    io("init", e, t), Wo(t || e.data, !1), R[w] ? bc(w, R[w]) : la(), wt = Vn.show && (Vn.width > 0 || Vn.height > 0), dt = Ct = !0, St(e.width, e.height);
  }
  return C.forEach(Zn), P.forEach(Tt), n ? n instanceof HTMLElement ? (n.appendChild(c), $c()) : n(o, $c) : $c(), o;
}
xo.assign = So;
xo.fmtNum = zy;
xo.rangeNum = kp;
xo.rangeLog = vh;
xo.rangeAsinh = Ny;
xo.orient = zs;
xo.pxRatio = Rn;
xo.join = d3;
xo.fmtDate = By, xo.tzDate = S3;
xo.sync = Ik;
{
  xo.addGap = rF, xo.clipGaps = yh;
  let e = xo.paths = {
    points: Ak
  };
  e.linear = Rk, e.stepped = lF, e.bars = sF, e.spline = cF;
}
function wF(e, t) {
  if (!e || e.length === 0)
    return [null, null];
  let n = null, o = null;
  for (const { thresholdValue: r } of e)
    r !== void 0 && ((n === null || r < n) && (n = r), (o === null || r > o) && (o = r));
  return [n, o];
}
function SF({
  distr: e,
  logBase: t,
  limits: n
}) {
  if (e !== ws.Logarithmic)
    return n;
  const o = t === 2 ? Math.log2 : Math.log10;
  return {
    min: ff(n.min, t, o, Math.floor),
    max: ff(n.max, t, o, Math.ceil),
    softMin: ff(n.softMin, t, o, Math.floor),
    softMax: ff(n.softMax, t, o, Math.ceil)
  };
}
function ff(e, t, n, o) {
  return e == null || e <= 0 ? e : t ** o(n(e));
}
function CF({
  time: e,
  distr: t,
  logBase: n
}) {
  if (e)
    return {};
  const o = (n ?? 10) === 2 ? 2 : 10;
  return {
    distr: t === ws.Logarithmic ? 3 : t === ws.Symlog ? 2 : 1,
    log: o
  };
}
function $F(e, t, n, o, r, i) {
  const a = n == null ? 3 : 1, l = o == null ? 3 : 1, s = {
    min: {
      pad: r,
      hard: e ?? -1 / 0,
      soft: n !== null ? n : void 0,
      mode: a
    },
    max: {
      pad: i,
      hard: t ?? 1 / 0,
      soft: o !== null ? o : void 0,
      mode: l
    }
  }, u = n == null && e != null, c = o == null && t != null;
  return { rangeConfig: s, hardMinOnly: u, hardMaxOnly: c, hasFixedRange: u && c };
}
function PF(e, t, n) {
  return !n && e == null && t == null ? null : [e, t];
}
function OF(e, t, n, o) {
  const { rangeConfig: r, hardMinOnly: i, hardMaxOnly: a, min: l, max: s } = t, u = i ? l : n, c = a ? s : o;
  return u == null || c == null ? e : xo.rangeNum(u, c, r);
}
function kF(e, t, n, o, r) {
  const i = t.min ?? n, a = t.max ?? o;
  return i == null || a == null ? e : xo.rangeLog(i, a, r ?? 10, !0);
}
function IF(e, t, n) {
  let [o, r] = e;
  return o != null && (o = t ** Math.floor(n(o))), r != null && (r = t ** Math.ceil(n(r)), o === r && (r *= t)), [o, r];
}
function _F(e, t, n) {
  if (n !== 1)
    return e;
  let [o, r] = e;
  return t.hardMinOnly && t.min != null && (o = t.min), t.hardMaxOnly && t.max != null && (r = t.max), [o, r];
}
function TF(e, t) {
  const [n, o] = e;
  return n != null && o != null && n >= o ? [t === 3 ? 1 : 0, 100] : e;
}
function MF(e) {
  return (t, n, o, r) => {
    const i = t.scales[r], a = PF(n, o, e.hasFixedRange);
    if (!a)
      return [n, o];
    let l = a;
    const s = i.log;
    if (i.distr === 1)
      l = OF(l, e, n, o);
    else if (i.distr === 3) {
      l = kF(l, e, n, o, s);
      const u = i.log === 2 ? Math.log2 : Math.log10;
      l = IF(l, s ?? 10, u);
    }
    return l = _F(l, e, i.distr ?? 1), TF(l, i.distr ?? 1);
  };
}
function EF(e, t, n, o) {
  if (!n || n.length === 0)
    return { softMin: e, softMax: t };
  const [r, i] = wF(n);
  if (r === null && i === null)
    return { softMin: e, softMax: t };
  const a = r !== null ? e !== null ? Math.min(e, r) : r : e, l = i !== null ? t !== null ? Math.max(t, i) : i : t;
  return { softMin: a, softMax: l };
}
class DF extends gh {
  softMin;
  softMax;
  min;
  max;
  constructor(t) {
    super(t);
    const n = t.softMin === 0 && t.softMax === 0;
    this.softMin = n ? null : t.softMin ?? null, this.softMax = n ? null : t.softMax ?? null, this.min = t.min ?? null, this.max = t.max ?? null;
  }
  getConfig() {
    const {
      scaleKey: t,
      time: n,
      range: o,
      thresholds: r,
      logBase: i = 10,
      padMinBy: a = 0,
      padMaxBy: l = 0.05
    } = this.props;
    if (n) {
      if (this.min != null && this.max != null) {
        const _ = this.min;
        let M = this.max;
        const N = new Date(M * 1e3);
        return N.setSeconds(0), N.setMilliseconds(0), M = Math.floor(N.getTime() / 1e3) + 60, { [t]: { time: !0, auto: !1, range: [_, M] } };
      }
      return { [t]: { time: !0, auto: !0 } };
    }
    const s = this.props.distribution, u = r?.thresholds, { softMin: c, softMax: d } = EF(
      this.softMin,
      this.softMax,
      u,
      r?.yAxisUnit
    ), { min: f, max: p, softMin: v, softMax: g } = SF({
      distr: s,
      logBase: i,
      limits: {
        min: this.min,
        max: this.max,
        softMin: c,
        softMax: d
      }
    }), m = CF({ time: n, distr: s, logBase: i }), { rangeConfig: x, hardMinOnly: S, hardMaxOnly: C, hasFixedRange: P } = $F(
      f,
      p,
      v,
      g,
      a,
      l
    ), $ = MF({
      rangeConfig: x,
      hardMinOnly: S,
      hardMaxOnly: C,
      hasFixedRange: P,
      min: f,
      max: p
    });
    let I = this.props.auto;
    return I ??= !n && !P, {
      [t]: {
        time: n,
        auto: I,
        range: o ?? $,
        ...m
      }
    };
  }
  merge(t) {
    this.props = { ...this.props, ...t }, t.softMin !== void 0 && (this.softMin = t.softMin ?? null), t.softMax !== void 0 && (this.softMax = t.softMax ?? null), t.min !== void 0 && (this.min = t.min ?? null), t.max !== void 0 && (this.max = t.max ?? null);
  }
}
const Bg = {};
let Zw = 0;
const Jw = [
  "#4096ff",
  "#52c41a",
  "#faad14",
  "#ff4d4f",
  "#722ed1",
  "#13c2c2",
  "#eb2f96",
  "#fa8c16",
  "#a0d911",
  "#1677ff"
];
function AF(e) {
  if (Bg[e])
    return Bg[e];
  const t = Jw[Zw % Jw.length];
  return Zw++, Bg[e] = t, t;
}
const e1 = {
  white: "#ffffff",
  black: "#000000"
};
function NF(e, t, n, o = 100) {
  const r = e.ctx.createLinearGradient(0, 0, 0, e.bbox.height), i = Math.round(o / 100 * 112).toString(16).padStart(2, "0"), a = Math.round(o / 100 * 64).toString(16).padStart(2, "0");
  return r.addColorStop(0, `${t}${i}`), r.addColorStop(0.6, `${t}${a}`), r.addColorStop(1, n), r;
}
function RF(e, t) {
  for (let n = 1; n < 100; n++) {
    if (e[t + n] != null)
      return t + n;
    if (e[t - n] != null)
      return t - n;
  }
  return t;
}
function zF(e, t, n) {
  const o = [];
  for (let r = 0; r < e.length; r++) {
    const i = e[r + 1];
    if (i && e[r][1] === i[0]) {
      const a = n.posToIdx(e[r][1], !0);
      o.push(t[a] == null ? RF(t, a) : a);
    }
  }
  return o;
}
function FF(e, t, n, o) {
  if (n || !o || o.length === 0)
    return null;
  const r = e.series[t].idxs;
  if (!r)
    return null;
  const [i, a] = r, l = e.data[0], s = e.data[t], u = Math.round(e.valToPos(l[i], "x", !0)), c = Math.round(e.valToPos(l[a], "x", !0)), d = [];
  return o[0][0] === u && d.push(i), d.push(...zF(o, s, e)), o[o.length - 1][1] === c && d.push(a), d.length ? d : null;
}
const t1 = 2, BF = 2.5;
let ar = null;
class LF extends gh {
  constructor(t) {
    if (super(t), !ar) {
      const n = xo.paths, o = n.linear, r = n.spline, i = n.stepped;
      if (!o || !r || !i)
        throw new Error("Required uPlot path builders are not available");
      ar = {
        linear: o(),
        spline: r(),
        stepBefore: i({ align: -1 }),
        stepAfter: i({ align: 1 })
      };
    }
  }
  getLineColor() {
    const { colorMapping: t, lineColor: n, label: o, isDarkMode: r } = this.props;
    return o ? n ?? t?.[o] ?? AF(o) : n ?? (r ? e1.white : e1.black);
  }
  buildLineConfig({ resolvedLineColor: t }) {
    const { lineWidth: n, lineStyle: o, lineCap: r, fillColor: i, fillMode: a, fillOpacity: l } = this.props, s = {
      stroke: t,
      width: n ?? t1
    }, u = l != null && l > 0 ? Math.round(Math.min(l, 100) / 100 * 255).toString(16).padStart(2, "0") : null;
    o === hm.Dashed && (s.dash = [10, 10]), o === hm.Dotted && (s.dash = [2, 6]), r && (s.cap = r);
    const c = i ?? t;
    return this.props.drawStyle === Pa.Bars ? s.fill = u ? `${c}${u}` : c : this.props.drawStyle === Pa.Histogram ? s.fill = `${c}${u ?? "40"}` : a && a !== Xf.None ? a === Xf.Solid ? s.fill = u ? `${c}${u}` : c : a === Xf.Gradient && (s.fill = (d) => NF(d, c, "rgba(0, 0, 0, 0)", l ?? 100)) : u && (s.fill = `${c}${u}`), s;
  }
  buildPathConfig() {
    const {
      pathBuilder: t,
      drawStyle: n,
      lineInterpolation: o,
      barAlignment: r,
      barMaxWidth: i,
      barWidthFactor: a,
      stepInterval: l
    } = this.props;
    return t ? { paths: t } : n === Pa.Points ? { paths: () => null } : n != null ? {
      paths: (s, u, c, d) => HF({
        drawStyle: n,
        lineInterpolation: o,
        barAlignment: r,
        barMaxWidth: i,
        barWidthFactor: a,
        stepInterval: l
      })(s, u, c, d)
    } : {};
  }
  resolvePointsShow() {
    const { pointsBuilder: t, drawStyle: n, showPoints: o } = this.props;
    return t || (n === Pa.Points ? !0 : !!o);
  }
  shouldApplyIsolatedPointFilter(t) {
    const { drawStyle: n, pointsFilter: o } = this.props;
    return n === Pa.Lines && !o && !t;
  }
  buildPointsConfig({ resolvedLineColor: t }) {
    const { lineWidth: n, pointSize: o, pointsFilter: r } = this.props, i = o ?? (n ?? t1) * BF, a = {
      stroke: t,
      fill: t,
      size: i,
      filter: r || void 0,
      show: this.resolvePointsShow()
    };
    return this.shouldApplyIsolatedPointFilter(a.show) && (a.filter = FF), a;
  }
  getConfig() {
    const { scaleKey: t, label: n, spanGaps: o, show: r = !0, metric: i } = this.props, a = this.getLineColor(), l = this.buildLineConfig({ resolvedLineColor: a }), s = this.buildPathConfig(), u = this.buildPointsConfig({ resolvedLineColor: a });
    return {
      scale: t,
      label: n,
      spanGaps: typeof o == "number" ? !1 : o ?? !0,
      value: () => "",
      pxAlign: !0,
      show: r,
      metric: i,
      ...l,
      ...s,
      points: Object.keys(u).length > 0 ? u : void 0
    };
  }
  merge(t) {
    this.props = { ...this.props, ...t };
  }
}
function HF({
  drawStyle: e,
  lineInterpolation: t,
  barAlignment: n = ek.Center,
  barWidthFactor: o = 0.6,
  barMaxWidth: r = 200,
  stepInterval: i
}) {
  if (!ar)
    throw new Error("Required uPlot path builders are not available");
  if (e === Pa.Bars || e === Pa.Histogram) {
    const a = xo.paths;
    return VF({ pathBuilders: a, barAlignment: n, barWidthFactor: o, barMaxWidth: r, stepInterval: i });
  }
  if (e === Pa.Lines) {
    if (t === Uf.StepBefore)
      return ar.stepBefore;
    if (t === Uf.StepAfter)
      return ar.stepAfter;
    if (t === Uf.Linear)
      return ar.linear;
  }
  return ar.spline;
}
function VF({
  pathBuilders: e,
  barAlignment: t,
  barWidthFactor: n,
  barMaxWidth: o,
  stepInterval: r
}) {
  if (!ar)
    throw new Error("Required uPlot path builders are not available");
  const i = e.bars;
  if (typeof r == "number" && r > 0 && i)
    return (l, s, u, c) => {
      let d = o;
      const f = ok({
        uPlotInstance: l,
        stepInterval: r
      });
      f > 0 && (d = Math.min(d, f));
      const p = `bars|${t}|${n}|${d}`;
      return ar && !ar[p] && (ar[p] = i({
        size: [n, d],
        align: t
      })), ar?.[p]?.(l, s, u, c) ?? null;
    };
  const a = `bars|${t}|${n}|${o}`;
  return !ar[a] && i && (ar[a] = i({
    size: [n, o],
    align: t
  })), ar[a];
}
class jF extends gh {
  series = [];
  selectionPreferencesSource = pm.IN_MEMORY;
  shouldSaveSelectionPreference = !1;
  axes = {};
  stepInterval;
  scales = [];
  bands = [];
  cursor;
  hooks = {};
  plugins = [];
  padding;
  legend;
  focus;
  select;
  thresholds = {};
  tzDate;
  id;
  onDragSelect;
  constructor(t) {
    super(t);
    const {
      id: n,
      onDragSelect: o,
      tzDate: r,
      selectionPreferencesSource: i,
      shouldSaveSelectionPreference: a,
      stepInterval: l
    } = t ?? {};
    this.id = n, r && (this.tzDate = r), i && (this.selectionPreferencesSource = i), a && (this.shouldSaveSelectionPreference = a), l && (this.stepInterval = l), this.onDragSelect = () => {
    }, o && (this.onDragSelect = o, this.addHook("setSelect", (s) => {
      const u = s.select;
      if (u && u.width > 0) {
        const c = s.posToVal(u.left, "x"), d = s.posToVal(u.left + u.width, "x");
        this.onDragSelect(c * 1e3, d * 1e3);
      }
    }));
  }
  getShouldSaveSelectionPreference() {
    return this.shouldSaveSelectionPreference;
  }
  getId() {
    return this.id;
  }
  addAxis(t) {
    const { scaleKey: n } = t;
    if (this.axes[n]) {
      this.axes[n].merge?.(t);
      return;
    }
    this.axes[n] = new m4(t);
  }
  addScale(t) {
    const n = this.scales.find((o) => o.props.scaleKey === t.scaleKey);
    if (n) {
      n.merge?.(t);
      return;
    }
    this.scales.push(new DF(t));
  }
  addSeries(t) {
    this.series.push(new LF(t));
  }
  getSeriesSpanGapsOptions() {
    return this.series.map((t) => {
      const { spanGaps: n } = t.props;
      return { spanGaps: n };
    });
  }
  addHook(t, n) {
    return this.hooks[t] || (this.hooks[t] = []), this.hooks[t].push(n), () => {
      const o = this.hooks[t].indexOf(n);
      o !== -1 && this.hooks[t].splice(o, 1);
    };
  }
  addPlugin(t) {
    this.plugins.push(t);
  }
  addThresholds(t) {
    this.thresholds[t.scaleKey] || (this.thresholds[t.scaleKey] = t, this.addHook("draw", C4(t)));
  }
  setBands(t) {
    this.bands = t;
  }
  setCursor(t) {
    this.cursor = Gx({}, this.cursor, t);
  }
  setPadding(t) {
    this.padding = t;
  }
  setLegend(t) {
    this.legend = t;
  }
  setFocus(t) {
    this.focus = t;
  }
  setSelect(t) {
    this.select = t;
  }
  setTzDate(t) {
    this.tzDate = t;
  }
  getCursorConfig() {
    const t = {
      ...Eg,
      hover: {
        ...Eg.hover,
        prox: this.stepInterval ? (n) => ok({
          uPlotInstance: n,
          stepInterval: this.stepInterval ?? 0
        }) * x4 : tk
      }
    };
    return Gx({}, Eg, t, this.cursor);
  }
  getStoredVisibility() {
    return this.id && this.selectionPreferencesSource === pm.LOCAL_STORAGE ? $4(this.id) : null;
  }
  getVisibilityResolutionState() {
    const t = this.getStoredVisibility();
    if (!t || t.length === 0)
      return {
        visibleStoredLabels: /* @__PURE__ */ new Set(),
        hiddenStoredLabels: /* @__PURE__ */ new Set(),
        hasActivePreference: !1
      };
    const n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
    let r = !1, i = !1;
    for (const { label: d, show: f } of t)
      f ? (r = !0, n.add(d), o.has(d) && o.delete(d)) : (i = !0, n.has(d) || o.add(d));
    const a = r && i, l = this.series.map(
      (d) => d.getConfig().label ?? ""
    ), s = n.size > 0 && l.some((d) => n.has(d)), u = a && s;
    return !a || u ? { visibleStoredLabels: n, hiddenStoredLabels: o, hasActivePreference: u } : {
      visibleStoredLabels: /* @__PURE__ */ new Set(),
      hiddenStoredLabels: /* @__PURE__ */ new Set(),
      hasActivePreference: u
    };
  }
  getLegendItems() {
    const { visibleStoredLabels: t, hiddenStoredLabels: n, hasActivePreference: o } = this.getVisibilityResolutionState();
    return this.series.reduce(
      (r, i, a) => {
        const l = i.getConfig(), s = l.label ?? "", u = a + 1, c = cw({
          seriesShow: l.show,
          seriesLabel: s,
          visibleStoredLabels: t,
          hiddenStoredLabels: n,
          hasActivePreference: o
        });
        return r[u] = {
          seriesIndex: u,
          color: l.stroke ?? "#ccc",
          label: s,
          show: c,
          yAxis: 1
        }, r;
      },
      {}
    );
  }
  getConfig() {
    const t = { ...w4 }, { visibleStoredLabels: n, hiddenStoredLabels: o, hasActivePreference: r } = this.getVisibilityResolutionState();
    return t.series = [
      { value: () => "", label: "Timestamp" },
      ...this.series.map((i) => {
        const a = i.getConfig(), l = cw({
          seriesShow: a.show,
          seriesLabel: a.label ?? "",
          visibleStoredLabels: n,
          hiddenStoredLabels: o,
          hasActivePreference: r
        });
        return { ...a, show: l };
      })
    ], t.axes = Object.values(this.axes).map((i) => i.getConfig()), t.scales = this.scales.reduce(
      (i, a) => ({ ...i, ...a.getConfig() }),
      {}
    ), t.hooks = this.hooks, t.select = this.select, t.cursor = this.getCursorConfig(), t.tzDate = this.tzDate, t.plugins = this.plugins.length > 0 ? this.plugins : void 0, t.bands = this.bands.length > 0 ? this.bands : void 0, Array.isArray(this.padding) && (t.padding = this.padding), this.legend && (t.legend = this.legend), this.focus && (t.focus = this.focus), t;
  }
}
function n1(e, t) {
  return t.some(
    ({ spanGaps: n }) => typeof n == "number" && n > 0 && e > n
  );
}
function WF(e, t) {
  const n = JSON.parse(JSON.stringify(e)), [o, ...r] = n;
  if (!Array.isArray(o) || o.length < 2 || r.length === 0)
    return n;
  const i = o, a = i.length;
  let l = 0;
  for (let f = 0; f < a - 1; f += 1)
    n1(i[f + 1] - i[f], t) && (l += 1);
  if (l === 0)
    return e;
  const s = a + l, u = Array.from({ length: s }), c = r.map(
    () => Array.from({ length: s })
  );
  let d = 0;
  for (let f = 0; f < a; f += 1) {
    u[d] = i[f];
    for (const [p, v] of r.entries())
      c[p][d] = v[f];
    if (d += 1, f < a - 1 && n1(i[f + 1] - i[f], t)) {
      u[d] = i[f] + Math.max(1, Math.floor((i[f + 1] - i[f]) / 2));
      for (let p = 0; p < r.length; p += 1)
        c[p][d] = null;
      d += 1;
    }
  }
  return [u, ...c];
}
function KF(e, t) {
  const n = JSON.parse(JSON.stringify(e)), [o, ...r] = n;
  if (!Array.isArray(o) || r.length === 0)
    return n;
  const a = t.some(({ spanGaps: d }) => typeof d == "number") ? WF(n, t) : n;
  if (!t.some(({ spanGaps: d }) => d === !0))
    return a;
  const [s, ...u] = a, c = u.map((d, f) => {
    const { spanGaps: p } = t[f] ?? {};
    return p !== !0 ? d : d.map(
      (v) => v === null ? void 0 : v
    );
  });
  return [s, ...c];
}
const Ch = /\{\{(\w+)(?::(\w+))?\}\}/g;
function Kfe(e) {
  const t = [];
  let n;
  const o = new RegExp(Ch.source, "g");
  for (; (n = o.exec(e)) !== null; )
    t.push({
      name: n[1],
      format: n[2] || "single",
      start: n.index,
      end: n.index + n[0].length
    });
  return t;
}
function qfe(e) {
  return new RegExp(Ch.source, "g").test(e);
}
function qF(e, t) {
  if (typeof e == "number")
    return String(e);
  const n = Array.isArray(e) ? e : [e];
  switch (t) {
    case "csv":
      return n.join(",");
    case "sql":
      return n.map((o) => `'${o.replaceAll("'", "''")}'`).join(",");
    case "pipe":
      return n.join("|");
    case "single":
    default:
      return n[0] ?? "";
  }
}
function nu(e, t) {
  return e.replaceAll(Ch, (n, o, r) => {
    const i = t[o];
    return i == null ? n : qF(i, r || "single");
  });
}
function YF(e) {
  const t = /* @__PURE__ */ new Set();
  let n;
  const o = new RegExp(Ch.source, "g");
  for (; (n = o.exec(e)) !== null; )
    t.add(n[1]);
  return Array.from(t);
}
class GF {
  nodes = /* @__PURE__ */ new Map();
  ensureNode(t) {
    return this.nodes.has(t) || this.nodes.set(t, { name: t, dependsOn: [], dependents: [] }), this.nodes.get(t);
  }
  addVariable(t) {
    const n = t.name, o = this.ensureNode(n);
    for (const r of o.dependsOn) {
      const i = this.nodes.get(r);
      i && (i.dependents = i.dependents.filter((a) => a !== n));
    }
    o.dependsOn = [], t.query && (o.dependsOn = YF(t.query));
    for (const r of o.dependsOn)
      this.ensureNode(r).dependents.push(n);
  }
  removeVariable(t) {
    const n = this.nodes.get(t);
    if (n) {
      for (const o of n.dependsOn) {
        const r = this.nodes.get(o);
        r && (r.dependents = r.dependents.filter((i) => i !== t));
      }
      for (const o of n.dependents) {
        const r = this.nodes.get(o);
        r && (r.dependsOn = r.dependsOn.filter((i) => i !== t));
      }
      this.nodes.delete(t);
    }
  }
  getDependents(t) {
    return this.nodes.get(t)?.dependents ?? [];
  }
  getAllDependents(t) {
    const n = /* @__PURE__ */ new Set(), o = [], r = (i) => {
      if (n.has(i))
        return;
      n.add(i);
      const a = this.getDependents(i);
      for (const l of a)
        o.push(l), r(l);
    };
    return r(t), o;
  }
  detectCycle() {
    const r = /* @__PURE__ */ new Map(), i = [];
    for (const l of this.nodes.keys())
      r.set(l, 0);
    const a = (l) => {
      r.set(l, 1);
      const s = this.nodes.get(l);
      if (s)
        for (const u of s.dependsOn) {
          const c = r.get(u);
          if (c === 1)
            return i.push(u, l), !0;
          if (c === 0 && a(u))
            return i.push(l), !0;
        }
      return r.set(l, 2), !1;
    };
    for (const l of this.nodes.keys())
      if (r.get(l) === 0 && a(l))
        return i.reverse();
    return null;
  }
  topologicalSort() {
    const t = /* @__PURE__ */ new Set(), n = [], o = (r) => {
      if (t.has(r))
        return;
      t.add(r);
      const i = this.nodes.get(r);
      if (i)
        for (const a of i.dependsOn)
          o(a);
      n.push(r);
    };
    for (const r of this.nodes.keys())
      o(r);
    return n;
  }
  clear() {
    this.nodes.clear();
  }
}
function UF(e, t, n, o) {
  const r = /* @__PURE__ */ new Map();
  for (const l of e) {
    const s = Number(l.clock), u = Math.round(s / o) * o, c = Number.parseFloat(l.value);
    r.set(u, Number.isNaN(c) ? null : c);
  }
  const i = [], a = Math.ceil(t / o) * o;
  for (let l = a; l <= n; l += o)
    i.push({ ts: l * 1e3, value: r.get(l) ?? null });
  return i;
}
function XF(e, t) {
  return e.map((n) => n === null ? null : n * t);
}
function QF(e, t) {
  return e.map((n) => n === null ? null : n + t);
}
function ZF(e) {
  return e.map((t, n) => {
    if (n === 0)
      return 0;
    const o = e[n - 1];
    return t === null || o === null ? null : t - o;
  });
}
function JF(e, t) {
  return e.map((n, o) => {
    if (o === 0)
      return 0;
    const r = e[o - 1];
    if (n === null || r === null)
      return null;
    const i = t[o] - t[o - 1];
    return i > 0 ? (n - r) / i : 0;
  });
}
function eB(e, t) {
  return e.map((n, o) => {
    const r = Math.max(0, o - t + 1), i = e.slice(r, o + 1).filter((a) => a !== null);
    return i.length === 0 ? null : i.reduce((a, l) => a + l, 0) / i.length;
  });
}
function tB(e, t) {
  const n = [];
  let o = null;
  for (const r of e)
    if (r === null)
      n.push(null);
    else if (o === null)
      n.push(r), o = r;
    else {
      const i = t * r + (1 - t) * o;
      n.push(i), o = i;
    }
  return n;
}
function nB(e, t) {
  return e.map((n) => n !== null && n > t ? Number.NaN : n);
}
function oB(e, t) {
  return e.map((n) => n !== null && n < t ? Number.NaN : n);
}
function rB(e, t) {
  return e.map((n) => n === null || Number.isNaN(n) ? t : n);
}
function iB(e) {
  if (e.length === 0)
    return e;
  const t = e[0].values.length;
  return [{ label: "sumSeries", values: Array.from({ length: t }, (o, r) => e.every((a) => a.values[r] === null) ? null : e.reduce((a, l) => a + (l.values[r] ?? 0), 0)) }];
}
function aB(e, t, n) {
  return e.map((r) => {
    const i = r.values.filter((l) => l !== null && !Number.isNaN(l));
    let a = 0;
    return n === "max" ? a = i.reduce((l, s) => Math.max(l, s), -1 / 0) : n === "min" ? a = i.reduce((l, s) => Math.min(l, s), 1 / 0) : a = i.reduce((l, s) => l + s, 0) / (i.length || 1), { s: r, score: a };
  }).sort((r, i) => i.score - r.score).slice(0, t).map((r) => r.s);
}
function lB(e, t, n) {
  return e.map((r) => {
    const i = r.values.filter((l) => l !== null && !Number.isNaN(l));
    let a = 0;
    return n === "max" ? a = i.reduce((l, s) => Math.max(l, s), -1 / 0) : n === "min" ? a = i.reduce((l, s) => Math.min(l, s), 1 / 0) : a = i.reduce((l, s) => l + s, 0) / (i.length || 1), { s: r, score: a };
  }).sort((r, i) => r.score - i.score).slice(0, t).map((r) => r.s);
}
function sB(e, t) {
  if (!t || t.length === 0)
    return e;
  const { timestamps: n, series: o } = e;
  let r = o;
  for (const i of t) {
    const a = i.def.name, l = i.params;
    switch (a) {
      case "scale":
        r = r.map((s) => ({ ...s, values: XF(s.values, Number(l[0])) }));
        break;
      case "offset":
        r = r.map((s) => ({ ...s, values: QF(s.values, Number(l[0])) }));
        break;
      case "delta":
        r = r.map((s) => ({ ...s, values: ZF(s.values) }));
        break;
      case "rate":
        r = r.map((s) => ({ ...s, values: JF(s.values, n) }));
        break;
      case "movingAverage":
        r = r.map((s) => ({ ...s, values: eB(s.values, Number(l[0])) }));
        break;
      case "exponentialMovingAverage":
        r = r.map((s) => ({ ...s, values: tB(s.values, Number(l[0])) }));
        break;
      case "removeAboveValue":
        r = r.map((s) => ({ ...s, values: nB(s.values, Number(l[0])) }));
        break;
      case "removeBelowValue":
        r = r.map((s) => ({ ...s, values: oB(s.values, Number(l[0])) }));
        break;
      case "transformNull":
        r = r.map((s) => ({ ...s, values: rB(s.values, Number(l[0])) }));
        break;
      case "sumSeries":
        r = iB(r);
        break;
      case "top":
        r = aB(r, Number(l[0]), String(l[1] ?? "avg"));
        break;
      case "bottom":
        r = lB(r, Number(l[0]), String(l[1] ?? "avg"));
        break;
      case "setAlias":
        r = r.map((s) => ({ ...s, label: String(l[0] ?? "") }));
        break;
      case "replaceAlias":
        r = r.map((s) => ({ ...s, label: s.label.replace(new RegExp(String(l[0] ?? "")), String(l[1] ?? "")) }));
        break;
    }
  }
  return { timestamps: n, series: r };
}
function Yfe(e) {
  if (!e)
    return 6e4;
  const t = Number.parseInt(e, 10);
  return Number.isNaN(t) ? 6e4 : e.endsWith("m") ? t * 6e4 : e.endsWith("h") ? t * 36e5 : t * 1e3;
}
function uB(e, t, n, o) {
  const r = t[0], i = (e.get(r?.itemid ?? "") ?? []).map((l) => l.ts), a = new Pz({ name: "zabbix", refId: o, fields: [] });
  a.addField({ name: "Time", type: Ln.time, values: i });
  for (const l of t) {
    const u = (e.get(l.itemid) ?? []).map((d) => d.value), c = l.valuemapid ? n.get(l.valuemapid) : void 0;
    a.addField({
      name: l.name.replace(/^[\s:]+/, "").trim(),
      type: Ln.number,
      values: u,
      labels: { host: l.hostid, item_key: l.key_ },
      config: {
        unit: l.units || void 0,
        displayNameFromDS: l.name.replace(/^[\s:]+/, "").trim(),
        ...c ? {
          mappings: [{
            type: 1,
            // MappingType.ValueToText
            options: Object.fromEntries(
              Object.entries(c).map(([d, f], p) => [d, { text: f, index: p }])
            )
          }]
        } : {}
      }
    });
  }
  return a;
}
let cB = 1;
async function Jo(e, t, n) {
  const { url: o, token: r } = n, i = {
    jsonrpc: "2.0",
    method: e,
    params: t,
    auth: r,
    id: cB++
  }, a = await fetch(`${o}?_m=${e}`, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(i)
  });
  if (!a.ok)
    throw new Error(`Zabbix API HTTP error: ${a.status}`);
  const l = await a.json();
  if (l.error)
    throw new Error(`Zabbix API error [${l.error.code}]: ${l.error.data}`);
  return l.result;
}
function dB(e) {
  return Jo(
    "hostgroup.get",
    {
      output: ["groupid", "name"],
      sortfield: "name",
      limit: 200
    },
    e
  );
}
function fB(e, t, n) {
  return Jo(
    "host.get",
    {
      output: ["hostid", "host", "name"],
      ...e?.length ? { groupids: e } : {},
      ...t ? { search: { name: t }, searchWildcardsEnabled: !0 } : {},
      sortfield: "name",
      limit: 200
    },
    n
  );
}
function Gfe(e, t) {
  return Jo(
    "application.get",
    {
      output: ["applicationid", "name"],
      hostids: e,
      sortfield: "name",
      limit: 200
    },
    t
  );
}
function Lk(e, t, n, o, r) {
  const i = r ? hB(r) : void 0;
  return Jo(
    "item.get",
    {
      output: ["itemid", "hostid", "name", "key_", "value_type", "units", "valuemapid"],
      selectTags: "extend",
      hostids: e,
      filter: { value_type: ["0", "3"] },
      ...t?.length ? { applicationids: t } : {},
      ...n ? { search: { name: n }, searchWildcardsEnabled: !0 } : {},
      ...i ? { tags: [i], evaltype: 0 } : {},
      sortfield: "name",
      limit: 500
    },
    o
  );
}
function pB(e, t) {
  return Jo(
    "item.get",
    {
      output: ["itemid", "hostid", "name", "key_", "value_type", "units", "valuemapid"],
      itemids: e,
      sortfield: "name"
    },
    t
  );
}
function hB(e) {
  const t = e.indexOf(":");
  return t > 0 ? { tag: e.slice(0, t).trim(), value: e.slice(t + 1).trim(), operator: 0 } : { tag: e.trim(), value: "", operator: 2 };
}
function gB(e) {
  return e.value ? `${e.tag}: ${e.value}` : e.tag;
}
function vB(e, t, n) {
  return Jo(
    "item.get",
    {
      output: ["itemid", "hostid", "name", "key_", "value_type", "units", "valuemapid"],
      hostids: e,
      filter: { value_type: ["1", "2", "4"] },
      ...t?.length ? { applicationids: t } : {},
      sortfield: "name",
      limit: 500
    },
    n
  );
}
function Ufe(e, t, n) {
  return Jo(
    "trigger.get",
    {
      output: ["triggerid", "description", "priority", "status"],
      ...e?.length ? { hostids: e } : {},
      ...t?.length ? { groupids: t } : {},
      only_true: !1,
      sortfield: "description",
      limit: 500
    },
    n
  );
}
function Xfe(e, t, n, o, r, i) {
  return Jo(
    "problem.get",
    {
      output: ["eventid", "objectid", "name", "severity", "clock", "acknowledged"],
      ...e?.length ? { groupids: e } : {},
      ...t?.length ? { hostids: t } : {},
      ...n?.length ? { severities: n } : {},
      ...o ? { time_from: o } : {},
      ...r ? { time_till: r } : {},
      sortfield: ["eventid"],
      sortorder: "DESC",
      limit: 500
    },
    i
  );
}
function mB(e, t) {
  return Jo(
    "usermacro.get",
    {
      output: ["hostmacroid", "macro", "value"],
      ...e?.length ? { hostids: e } : {},
      sortfield: "macro",
      limit: 200
    },
    t
  );
}
function bB(e) {
  return Jo(
    "service.get",
    {
      output: ["serviceid", "name"],
      sortfield: "name",
      limit: 200
    },
    e
  );
}
async function Qfe(e, t, n, o) {
  return (n - t) / 86400 <= 7 ? Jo(
    "history.get",
    {
      output: "extend",
      itemids: e,
      history: 0,
      time_from: t,
      time_till: n,
      sortfield: "clock",
      sortorder: "ASC",
      limit: 1e4
    },
    o
  ) : (await Jo(
    "trend.get",
    {
      output: "extend",
      itemids: e,
      time_from: t,
      time_till: n,
      sortfield: "clock",
      sortorder: "ASC",
      limit: 1e4
    },
    o
  )).map((a) => ({
    itemid: a.itemid,
    clock: a.clock,
    value: a.value_avg,
    ns: "0"
  }));
}
function yB(e) {
  return Jo(
    "valuemap.get",
    {
      output: "extend",
      selectMappings: "extend"
    },
    e
  );
}
function xB(e, t) {
  return Jo(
    "discoveryrule.get",
    {
      output: ["itemid", "hostid", "name", "key_"],
      hostids: e,
      sortfield: "name",
      limit: 200
    },
    t
  );
}
function Hk(e, t) {
  return Jo(
    "itemprototype.get",
    {
      output: ["itemid", "name", "key_"],
      discoveryids: [e],
      sortfield: "name"
    },
    t
  );
}
async function Zfe(e, t, n, o) {
  const r = await Hk(t, o), i = [
    ...new Set(
      r.map((c) => {
        const d = c.key_.indexOf("[");
        return d > 0 ? c.key_.slice(0, d) : c.key_;
      })
    )
  ], a = n.length > 0 ? i.filter(
    (c) => n.some((d) => c.startsWith(d) || d.startsWith(c))
  ) : i;
  if (a.length === 0)
    return [];
  const l = await Promise.all(
    a.map(
      (c) => Jo(
        "item.get",
        {
          output: [
            "itemid",
            "hostid",
            "name",
            "key_",
            "value_type",
            "units",
            "lastvalue",
            "lastclock",
            "description"
          ],
          hostids: e,
          lld_ruleids: [t],
          search: { key_: `${c}*` },
          searchWildcardsEnabled: !0,
          sortfield: "name",
          limit: 500
        },
        o
      )
    )
  ), s = /* @__PURE__ */ new Set(), u = [];
  for (const c of l)
    for (const d of c)
      s.has(d.itemid) || (s.add(d.itemid), u.push(d));
  return u;
}
function wB(e, t) {
  const n = new Map(t.map((o) => [o, []]));
  for (const o of e)
    n.get(o.itemid)?.push(o);
  return n;
}
function SB(e, t) {
  if (e.length === 0)
    return 0;
  switch (t) {
    case "avg":
      return e.reduce((n, o) => n + o, 0) / e.length;
    case "sum":
      return e.reduce((n, o) => n + o, 0);
    case "min":
      return e.reduce((n, o) => Math.min(n, o), 1 / 0);
    case "max":
      return e.reduce((n, o) => Math.max(n, o), -1 / 0);
    case "count":
      return e.length;
    case "median": {
      const n = [...e].sort((o, r) => o - r);
      return n[Math.floor(n.length / 2)];
    }
  }
}
function CB(e, t, n = "avg") {
  if (e.length === 0)
    return [];
  const o = t / 1e3, r = /* @__PURE__ */ new Map();
  for (const a of e) {
    const l = Math.floor(Number(a.clock) / o) * o, s = r.get(l);
    s ? s.push(Number(a.value)) : r.set(l, [Number(a.value)]);
  }
  const i = e[0].itemid;
  return Array.from(r.entries()).sort(([a], [l]) => a - l).map(([a, l]) => ({
    itemid: i,
    clock: String(a),
    value: String(SB(l, n)),
    ns: "0"
  }));
}
const $B = [
  "Transform",
  "Aggregate",
  "Filter",
  "Trends",
  "Time",
  "Alias",
  "Special"
], o1 = [
  // Transform
  { name: "groupBy", category: "Transform", params: [{ name: "interval", type: "string" }, { name: "function", type: "string", options: ["avg", "min", "max", "sum", "count", "median", "first", "last"] }], defaultParams: ["1m", "avg"] },
  { name: "scale", category: "Transform", params: [{ name: "factor", type: "float", options: [100, 0.01, 10, -1] }], defaultParams: [100] },
  { name: "offset", category: "Transform", params: [{ name: "delta", type: "float", options: [-100, 100] }], defaultParams: [100] },
  { name: "delta", category: "Transform", params: [], defaultParams: [] },
  { name: "rate", category: "Transform", params: [], defaultParams: [] },
  { name: "movingAverage", category: "Transform", params: [{ name: "factor", type: "int", options: [6, 10, 60, 100, 600] }], defaultParams: [10] },
  { name: "exponentialMovingAverage", category: "Transform", params: [{ name: "smoothing", type: "float", options: [6, 10, 60, 100, 600] }], defaultParams: [0.2] },
  { name: "percentile", category: "Transform", params: [{ name: "interval", type: "string" }, { name: "percent", type: "float", options: [25, 50, 75, 90, 95, 99, 99.9] }], defaultParams: ["1m", 95] },
  { name: "removeAboveValue", category: "Transform", params: [{ name: "number", type: "float" }], defaultParams: [0] },
  { name: "removeBelowValue", category: "Transform", params: [{ name: "number", type: "float" }], defaultParams: [0] },
  { name: "transformNull", category: "Transform", params: [{ name: "number", type: "float" }], defaultParams: [0] },
  // Aggregate
  { name: "aggregateBy", category: "Aggregate", params: [{ name: "interval", type: "string" }, { name: "function", type: "string", options: ["avg", "min", "max", "sum", "count", "median", "first", "last"] }], defaultParams: ["1m", "avg"] },
  { name: "sumSeries", category: "Aggregate", params: [], defaultParams: [] },
  { name: "percentileAgg", category: "Aggregate", params: [{ name: "interval", type: "string" }, { name: "percent", type: "float", options: [25, 50, 75, 90, 95, 99, 99.9] }], defaultParams: ["1m", 95] },
  // Filter
  { name: "top", category: "Filter", params: [{ name: "number", type: "int" }, { name: "value", type: "string", options: ["avg", "min", "max", "sum", "count", "median", "first", "last"] }], defaultParams: [5, "avg"] },
  { name: "bottom", category: "Filter", params: [{ name: "number", type: "int" }, { name: "value", type: "string", options: ["avg", "min", "max", "sum", "count", "median", "first", "last"] }], defaultParams: [5, "avg"] },
  { name: "sortSeries", category: "Filter", params: [{ name: "direction", type: "string", options: ["asc", "desc"] }], defaultParams: ["asc"] },
  // Trends
  { name: "trendValue", category: "Trends", params: [{ name: "type", type: "string", options: ["avg", "min", "max", "sum", "count"] }], defaultParams: ["avg"] },
  // Time
  { name: "timeShift", category: "Time", params: [{ name: "interval", type: "string", options: ["24h", "7d", "1M", "+24h", "-24h"] }], defaultParams: ["24h"] },
  // Alias
  { name: "setAlias", category: "Alias", params: [{ name: "alias", type: "string" }], defaultParams: [] },
  { name: "setAliasByRegex", category: "Alias", params: [{ name: "aliasByRegex", type: "string" }], defaultParams: [] },
  { name: "replaceAlias", category: "Alias", params: [{ name: "regexp", type: "string" }, { name: "newAlias", type: "string" }], defaultParams: ["/(.*)/", "$1"] },
  // Special
  { name: "consolidateBy", category: "Special", params: [{ name: "type", type: "string", options: ["avg", "min", "max", "sum", "count"] }], defaultParams: ["avg"] }
], PB = /^\$(\w+)$/;
function Lg(e, t, n) {
  if (!e)
    return [];
  const o = PB.exec(e);
  if (!o)
    return [e];
  const r = o[1], i = t[r];
  if (i == null)
    return [e];
  const a = (Array.isArray(i) ? i : [i]).map(String);
  return a.includes("$__all") ? n[r] ?? [] : a.filter(Boolean);
}
function OB(e, t, n) {
  const o = {};
  for (const r of Object.values(n))
    o[r.config.name] = r.options.map((i) => i.value).filter((i) => i !== "$__all");
  return {
    ...e,
    hostIds: Lg(e.hostId, t, o),
    groupIds: Lg(e.groupId, t, o),
    lldRuleIds: Lg(e.lldRuleId, t, o),
    itemTagsFilter: nu(e.itemTagsFilter ?? "", t),
    triggerFilter: nu(e.triggerFilter ?? "", t),
    tagsFilter: nu(e.tagsFilter ?? "", t),
    itemids: nu(e.itemids ?? "", t),
    itServiceFilter: nu(e.itServiceFilter ?? "", t),
    macroFilter: nu(e.macroFilter ?? "", t)
  };
}
const ou = new GF();
function kB(e) {
  return e.split(",").map((t) => t.trim()).filter(Boolean).map((t) => ({ value: t, label: t }));
}
function IB(e) {
  return e.map((t) => ({ value: t.value, label: t.text || t.value }));
}
function _B(e, t, n) {
  if (t) {
    const o = e ?? n[0]?.value ?? "";
    return o ? [o] : [];
  }
  return e ?? n[0]?.value ?? "";
}
function TB(e, t) {
  return [{ value: t || "$__all", label: "$__all" }, ...e];
}
function MB(e, t, n) {
  switch (e.type) {
    case "custom": {
      if (e.customOptions && e.customOptions.length > 0)
        return Promise.resolve(IB(e.customOptions));
      const o = e.customValues ?? "";
      return Promise.resolve(kB(o));
    }
    case "query": {
      if (!t || !e.query)
        return Promise.resolve([]);
      const o = EB(e.query, n);
      return t(o);
    }
    case "textbox": {
      const o = e.defaultValue ?? "";
      return Promise.resolve(o ? [{ value: o, label: o }] : []);
    }
    case "constant": {
      const o = e.constantValue ?? "";
      return Promise.resolve(o ? [{ value: o, label: o }] : []);
    }
    default:
      return Promise.resolve([]);
  }
}
function EB(e, t) {
  return e.replace(/\{\{(\w+)(?::(\w+))?\}\}/g, (n, o) => {
    const r = t[o];
    return r == null ? n : Array.isArray(r) ? r.join(",") : String(r);
  });
}
const _s = ly("variable", () => {
  const e = ce({}), t = ce(null);
  function n(p) {
    t.value = p;
  }
  function o(p) {
    e.value[p.id] || (ou.addVariable(p), e.value[p.id] = Pn({
      config: p,
      options: [],
      current: "",
      loading: !1,
      error: null
    }), l(p.id));
  }
  function r(p) {
    const v = e.value[p];
    v && (ou.removeVariable(v.config.name), delete e.value[p]);
  }
  function i(p, v) {
    const g = e.value[p];
    g && (g.config = { ...g.config, ...v }, ("name" in v || "query" in v) && ou.addVariable(g.config), l(p));
  }
  function a(p, v) {
    const g = e.value[p];
    g && (g.current = v);
  }
  async function l(p) {
    const v = e.value[p];
    if (v) {
      v.loading = !0, v.error = null;
      try {
        const g = u(), m = await MB(v.config, t.value, g);
        v.options = v.config.includeAll ? TB(m, v.config.allValue) : m;
        const x = Array.isArray(v.current) ? v.current[0] : v.current;
        (!x || !v.options.some((S) => S.value === x)) && (v.current = _B(v.config.defaultValue, v.config.multi, v.options));
      } catch (g) {
        v.error = g?.message ?? String(g);
      } finally {
        v.loading = !1;
      }
    }
  }
  async function s() {
    const p = ou.topologicalSort();
    for (const v of p) {
      const g = Object.values(e.value).find((m) => m.config.name === v);
      g && await l(g.config.id);
    }
  }
  function u() {
    const p = {};
    for (const v of Object.values(e.value)) {
      const { name: g } = v.config;
      Array.isArray(v.current) ? p[g] = v.current.length === 1 ? v.current[0] : v.current : p[g] = v.current;
    }
    return p;
  }
  function c(p) {
    return Object.values(e.value).find((v) => v.config.name === p);
  }
  function d(p) {
    return ou.getAllDependents(p);
  }
  function f() {
    return ou.detectCycle();
  }
  return {
    variables: e,
    optionsResolver: t,
    setOptionsResolver: n,
    addVariable: o,
    removeVariable: r,
    updateVariable: i,
    setValue: a,
    refreshVariable: l,
    refreshAll: s,
    resolveAll: u,
    getVariable: c,
    getDependents: d,
    detectCycle: f
  };
});
function DB() {
  const e = Date.now();
  return { from: e - 3600 * 1e3, to: e };
}
const oa = ly("dashboard", () => {
  const e = ZO(), t = ce(""), n = ce(e.panels), o = ce(e.layouts), r = ce(!1), i = ce(null), a = ce(!1), l = ce(DB()), s = ce(0), u = ce(null), c = ce(!1), d = ce({});
  function f(F) {
    const R = fm(), X = QO(F, { id: R }), j = o.value.reduce((W, K) => Math.max(W, K.y + K.h), 0), ee = {
      i: R,
      x: 0,
      y: j,
      w: F === "stat" || F === "gauge" ? 3 : F === "table" ? 12 : 6,
      h: F === "stat" || F === "gauge" ? 4 : F === "table" ? 10 : 8,
      minH: F === "stat" || F === "gauge" ? 3 : 6
    };
    n.value[R] = X, o.value = [...o.value, ee], i.value = R, a.value = !1, c.value = !0;
  }
  function p(F) {
    const { [F]: R, ...X } = n.value;
    n.value = X, o.value = o.value.filter((j) => j.i !== F), i.value === F && (i.value = null), c.value = !0;
  }
  function v(F) {
    const R = n.value[F];
    if (!R)
      return;
    const X = fm(), j = { ...R, id: X, title: `${R.title} (copy)` }, ee = o.value.find((K) => K.i === F), W = o.value.reduce((K, q) => Math.max(K, q.y + q.h), 0);
    n.value[X] = j, o.value = [
      ...o.value,
      {
        i: X,
        x: ee?.x ?? 0,
        y: W,
        w: ee?.w ?? 6,
        h: ee?.h ?? 8,
        minH: ee?.minH
      }
    ], c.value = !0;
  }
  function g(F, R) {
    const X = n.value[F];
    X && (n.value[F] = { ...X, ...R }, c.value = !0);
  }
  function m() {
    n.value = {}, o.value = [], i.value = null, c.value = !0;
  }
  function x(F) {
    o.value = F;
  }
  function S() {
    u.value = {
      title: t.value,
      panels: { ...n.value },
      layouts: [...o.value]
    }, r.value = !0, c.value = !1;
  }
  function C(F) {
    F && F(H()), r.value = !1, u.value = null, c.value = !1;
  }
  function P() {
    const F = u.value;
    F && (t.value = F.title, n.value = F.panels, o.value = F.layouts), r.value = !1, u.value = null, c.value = !1;
  }
  function $() {
    r.value ? P() : S();
  }
  function I(F) {
    r.value = F;
  }
  function w(F) {
    i.value = F;
  }
  function _(F) {
    l.value = F;
  }
  function M(F) {
    s.value = F;
  }
  function N() {
    for (const F of Object.keys(n.value))
      d.value[F] = (d.value[F] ?? 0) + 1;
  }
  function A(F) {
    d.value[F] = (d.value[F] ?? 0) + 1;
  }
  function H() {
    const F = _s(), R = Object.values(F.variables).map((j) => j.config), X = {
      title: t.value,
      panels: n.value,
      layouts: o.value,
      variables: R
    };
    return JSON.stringify(X, null, 2);
  }
  function B(F) {
    try {
      const R = JSON.parse(F);
      if (R.panels && R.layouts && (t.value = R.title ?? "", n.value = R.panels, o.value = R.layouts, c.value = !0), R.variables && R.variables.length > 0) {
        const X = _s();
        for (const j of Object.keys(X.variables))
          X.removeVariable(j);
        for (const j of R.variables) {
          const ee = {
            ...j,
            hide: j.showOnDashboard === "nothing" || !!j.hideFromVariableList
          };
          X.addVariable(ee);
        }
      }
      return !!(R.panels && R.layouts);
    } catch {
      return !1;
    }
  }
  return {
    title: t,
    panels: n,
    layouts: o,
    isEditing: r,
    editingPanelId: i,
    addPanelModalOpen: a,
    timeRange: l,
    autoRefresh: s,
    _editSnapshot: u,
    isDirty: c,
    panelRefreshKeys: d,
    addPanel: f,
    removePanel: p,
    clonePanel: v,
    updatePanel: g,
    clearPanels: m,
    setLayouts: x,
    startEditing: S,
    confirmSave: C,
    discardChanges: P,
    setEditingPanel: w,
    toggleEditing: $,
    setEditing: I,
    setTimeRange: _,
    setAutoRefresh: M,
    refresh: N,
    refreshPanel: A,
    exportJSON: H,
    importJSON: B
  };
}), Fa = ly("theme", () => {
  const e = ce(
    (typeof localStorage < "u" ? localStorage.getItem("argus-theme") : null) || "dark"
  ), t = E(() => e.value === "dark");
  function n() {
    e.value = e.value === "dark" ? "light" : "dark", typeof document < "u" && (document.documentElement.dataset.theme = e.value), typeof localStorage < "u" && localStorage.setItem("argus-theme", e.value);
  }
  function o(r) {
    e.value = r, typeof document < "u" && (document.documentElement.dataset.theme = r), typeof localStorage < "u" && localStorage.setItem("argus-theme", r);
  }
  return { theme: e, isDark: t, toggle: n, setTheme: o };
});
function fd(e) {
  "@babel/helpers - typeof";
  return fd = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
    return typeof t;
  } : function(t) {
    return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
  }, fd(e);
}
function AB(e, t) {
  if (fd(e) != "object" || !e) return e;
  var n = e[Symbol.toPrimitive];
  if (n !== void 0) {
    var o = n.call(e, t);
    if (fd(o) != "object") return o;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (t === "string" ? String : Number)(e);
}
function NB(e) {
  var t = AB(e, "string");
  return fd(t) == "symbol" ? t : t + "";
}
function RB(e, t, n) {
  return (t = NB(t)) in e ? Object.defineProperty(e, t, {
    value: n,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[t] = n, e;
}
function r1(e, t) {
  var n = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var o = Object.getOwnPropertySymbols(e);
    t && (o = o.filter(function(r) {
      return Object.getOwnPropertyDescriptor(e, r).enumerable;
    })), n.push.apply(n, o);
  }
  return n;
}
function Q(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? arguments[t] : {};
    t % 2 ? r1(Object(n), !0).forEach(function(o) {
      RB(e, o, n[o]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : r1(Object(n)).forEach(function(o) {
      Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(n, o));
    });
  }
  return e;
}
function O() {
  return O = Object.assign ? Object.assign.bind() : function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var n = arguments[t];
      for (var o in n) ({}).hasOwnProperty.call(n, o) && (e[o] = n[o]);
    }
    return e;
  }, O.apply(null, arguments);
}
const zB = (e) => typeof e == "function", FB = Array.isArray, BB = (e) => typeof e == "string", LB = (e) => e !== null && typeof e == "object", HB = /^on[^a-z]/, VB = (e) => HB.test(e), qy = (e) => {
  const t = /* @__PURE__ */ Object.create(null);
  return (n) => t[n] || (t[n] = e(n));
}, jB = /-(\w)/g, Td = qy((e) => e.replace(jB, (t, n) => n ? n.toUpperCase() : "")), WB = /\B([A-Z])/g, KB = qy((e) => e.replace(WB, "-$1").toLowerCase()), qB = qy((e) => e.charAt(0).toUpperCase() + e.slice(1)), YB = Object.prototype.hasOwnProperty, i1 = (e, t) => YB.call(e, t);
function GB(e, t, n, o) {
  const r = e[n];
  if (r != null) {
    const i = i1(r, "default");
    if (i && o === void 0) {
      const a = r.default;
      o = r.type !== Function && zB(a) ? a() : a;
    }
    r.type === Boolean && (!i1(t, n) && !i ? o = !1 : o === "" && (o = !0));
  }
  return o;
}
function UB(e) {
  return Object.keys(e).reduce((t, n) => ((n.startsWith("data-") || n.startsWith("aria-")) && (t[n] = e[n]), t), {});
}
function cs(e) {
  return typeof e == "number" ? `${e}px` : e;
}
function xu(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 ? arguments[2] : void 0;
  return typeof e == "function" ? e(t) : e ?? n;
}
function XB(e) {
  let t;
  const n = new Promise((r) => {
    t = e(() => {
      r(!0);
    });
  }), o = () => {
    t?.();
  };
  return o.then = (r, i) => n.then(r, i), o.promise = n, o;
}
function Me() {
  const e = [];
  for (let t = 0; t < arguments.length; t++) {
    const n = t < 0 || arguments.length <= t ? void 0 : arguments[t];
    if (n) {
      if (BB(n))
        e.push(n);
      else if (FB(n))
        for (let o = 0; o < n.length; o++) {
          const r = Me(n[o]);
          r && e.push(r);
        }
      else if (LB(n))
        for (const o in n)
          n[o] && e.push(o);
    }
  }
  return e.join(" ");
}
var Vk = (function() {
  if (typeof Map < "u")
    return Map;
  function e(t, n) {
    var o = -1;
    return t.some(function(r, i) {
      return r[0] === n ? (o = i, !0) : !1;
    }), o;
  }
  return (
    /** @class */
    (function() {
      function t() {
        this.__entries__ = [];
      }
      return Object.defineProperty(t.prototype, "size", {
        /**
         * @returns {boolean}
         */
        get: function() {
          return this.__entries__.length;
        },
        enumerable: !0,
        configurable: !0
      }), t.prototype.get = function(n) {
        var o = e(this.__entries__, n), r = this.__entries__[o];
        return r && r[1];
      }, t.prototype.set = function(n, o) {
        var r = e(this.__entries__, n);
        ~r ? this.__entries__[r][1] = o : this.__entries__.push([n, o]);
      }, t.prototype.delete = function(n) {
        var o = this.__entries__, r = e(o, n);
        ~r && o.splice(r, 1);
      }, t.prototype.has = function(n) {
        return !!~e(this.__entries__, n);
      }, t.prototype.clear = function() {
        this.__entries__.splice(0);
      }, t.prototype.forEach = function(n, o) {
        o === void 0 && (o = null);
        for (var r = 0, i = this.__entries__; r < i.length; r++) {
          var a = i[r];
          n.call(o, a[1], a[0]);
        }
      }, t;
    })()
  );
})(), Pm = typeof window < "u" && typeof document < "u" && window.document === document, _p = (function() {
  return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
})(), QB = (function() {
  return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(_p) : function(e) {
    return setTimeout(function() {
      return e(Date.now());
    }, 1e3 / 60);
  };
})(), ZB = 2;
function JB(e, t) {
  var n = !1, o = !1, r = 0;
  function i() {
    n && (n = !1, e()), o && l();
  }
  function a() {
    QB(i);
  }
  function l() {
    var s = Date.now();
    if (n) {
      if (s - r < ZB)
        return;
      o = !0;
    } else
      n = !0, o = !1, setTimeout(a, t);
    r = s;
  }
  return l;
}
var e8 = 20, t8 = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], n8 = typeof MutationObserver < "u", o8 = (
  /** @class */
  (function() {
    function e() {
      this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = JB(this.refresh.bind(this), e8);
    }
    return e.prototype.addObserver = function(t) {
      ~this.observers_.indexOf(t) || this.observers_.push(t), this.connected_ || this.connect_();
    }, e.prototype.removeObserver = function(t) {
      var n = this.observers_, o = n.indexOf(t);
      ~o && n.splice(o, 1), !n.length && this.connected_ && this.disconnect_();
    }, e.prototype.refresh = function() {
      var t = this.updateObservers_();
      t && this.refresh();
    }, e.prototype.updateObservers_ = function() {
      var t = this.observers_.filter(function(n) {
        return n.gatherActive(), n.hasActive();
      });
      return t.forEach(function(n) {
        return n.broadcastActive();
      }), t.length > 0;
    }, e.prototype.connect_ = function() {
      !Pm || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), n8 ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
        attributes: !0,
        childList: !0,
        characterData: !0,
        subtree: !0
      })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
    }, e.prototype.disconnect_ = function() {
      !Pm || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
    }, e.prototype.onTransitionEnd_ = function(t) {
      var n = t.propertyName, o = n === void 0 ? "" : n, r = t8.some(function(i) {
        return !!~o.indexOf(i);
      });
      r && this.refresh();
    }, e.getInstance = function() {
      return this.instance_ || (this.instance_ = new e()), this.instance_;
    }, e.instance_ = null, e;
  })()
), jk = (function(e, t) {
  for (var n = 0, o = Object.keys(t); n < o.length; n++) {
    var r = o[n];
    Object.defineProperty(e, r, {
      value: t[r],
      enumerable: !1,
      writable: !1,
      configurable: !0
    });
  }
  return e;
}), ju = (function(e) {
  var t = e && e.ownerDocument && e.ownerDocument.defaultView;
  return t || _p;
}), Wk = $h(0, 0, 0, 0);
function Tp(e) {
  return parseFloat(e) || 0;
}
function a1(e) {
  for (var t = [], n = 1; n < arguments.length; n++)
    t[n - 1] = arguments[n];
  return t.reduce(function(o, r) {
    var i = e["border-" + r + "-width"];
    return o + Tp(i);
  }, 0);
}
function r8(e) {
  for (var t = ["top", "right", "bottom", "left"], n = {}, o = 0, r = t; o < r.length; o++) {
    var i = r[o], a = e["padding-" + i];
    n[i] = Tp(a);
  }
  return n;
}
function i8(e) {
  var t = e.getBBox();
  return $h(0, 0, t.width, t.height);
}
function a8(e) {
  var t = e.clientWidth, n = e.clientHeight;
  if (!t && !n)
    return Wk;
  var o = ju(e).getComputedStyle(e), r = r8(o), i = r.left + r.right, a = r.top + r.bottom, l = Tp(o.width), s = Tp(o.height);
  if (o.boxSizing === "border-box" && (Math.round(l + i) !== t && (l -= a1(o, "left", "right") + i), Math.round(s + a) !== n && (s -= a1(o, "top", "bottom") + a)), !s8(e)) {
    var u = Math.round(l + i) - t, c = Math.round(s + a) - n;
    Math.abs(u) !== 1 && (l -= u), Math.abs(c) !== 1 && (s -= c);
  }
  return $h(r.left, r.top, l, s);
}
var l8 = /* @__PURE__ */ (function() {
  return typeof SVGGraphicsElement < "u" ? function(e) {
    return e instanceof ju(e).SVGGraphicsElement;
  } : function(e) {
    return e instanceof ju(e).SVGElement && typeof e.getBBox == "function";
  };
})();
function s8(e) {
  return e === ju(e).document.documentElement;
}
function u8(e) {
  return Pm ? l8(e) ? i8(e) : a8(e) : Wk;
}
function c8(e) {
  var t = e.x, n = e.y, o = e.width, r = e.height, i = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, a = Object.create(i.prototype);
  return jk(a, {
    x: t,
    y: n,
    width: o,
    height: r,
    top: n,
    right: t + o,
    bottom: r + n,
    left: t
  }), a;
}
function $h(e, t, n, o) {
  return { x: e, y: t, width: n, height: o };
}
var d8 = (
  /** @class */
  (function() {
    function e(t) {
      this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = $h(0, 0, 0, 0), this.target = t;
    }
    return e.prototype.isActive = function() {
      var t = u8(this.target);
      return this.contentRect_ = t, t.width !== this.broadcastWidth || t.height !== this.broadcastHeight;
    }, e.prototype.broadcastRect = function() {
      var t = this.contentRect_;
      return this.broadcastWidth = t.width, this.broadcastHeight = t.height, t;
    }, e;
  })()
), f8 = (
  /** @class */
  /* @__PURE__ */ (function() {
    function e(t, n) {
      var o = c8(n);
      jk(this, { target: t, contentRect: o });
    }
    return e;
  })()
), p8 = (
  /** @class */
  (function() {
    function e(t, n, o) {
      if (this.activeObservations_ = [], this.observations_ = new Vk(), typeof t != "function")
        throw new TypeError("The callback provided as parameter 1 is not a function.");
      this.callback_ = t, this.controller_ = n, this.callbackCtx_ = o;
    }
    return e.prototype.observe = function(t) {
      if (!arguments.length)
        throw new TypeError("1 argument required, but only 0 present.");
      if (!(typeof Element > "u" || !(Element instanceof Object))) {
        if (!(t instanceof ju(t).Element))
          throw new TypeError('parameter 1 is not of type "Element".');
        var n = this.observations_;
        n.has(t) || (n.set(t, new d8(t)), this.controller_.addObserver(this), this.controller_.refresh());
      }
    }, e.prototype.unobserve = function(t) {
      if (!arguments.length)
        throw new TypeError("1 argument required, but only 0 present.");
      if (!(typeof Element > "u" || !(Element instanceof Object))) {
        if (!(t instanceof ju(t).Element))
          throw new TypeError('parameter 1 is not of type "Element".');
        var n = this.observations_;
        n.has(t) && (n.delete(t), n.size || this.controller_.removeObserver(this));
      }
    }, e.prototype.disconnect = function() {
      this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
    }, e.prototype.gatherActive = function() {
      var t = this;
      this.clearActive(), this.observations_.forEach(function(n) {
        n.isActive() && t.activeObservations_.push(n);
      });
    }, e.prototype.broadcastActive = function() {
      if (this.hasActive()) {
        var t = this.callbackCtx_, n = this.activeObservations_.map(function(o) {
          return new f8(o.target, o.broadcastRect());
        });
        this.callback_.call(t, n, t), this.clearActive();
      }
    }, e.prototype.clearActive = function() {
      this.activeObservations_.splice(0);
    }, e.prototype.hasActive = function() {
      return this.activeObservations_.length > 0;
    }, e;
  })()
), Kk = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new Vk(), qk = (
  /** @class */
  /* @__PURE__ */ (function() {
    function e(t) {
      if (!(this instanceof e))
        throw new TypeError("Cannot call a class as a function.");
      if (!arguments.length)
        throw new TypeError("1 argument required, but only 0 present.");
      var n = o8.getInstance(), o = new p8(t, n, this);
      Kk.set(this, o);
    }
    return e;
  })()
);
[
  "observe",
  "unobserve",
  "disconnect"
].forEach(function(e) {
  qk.prototype[e] = function() {
    var t;
    return (t = Kk.get(this))[e].apply(t, arguments);
  };
});
var Yk = (function() {
  return typeof _p.ResizeObserver < "u" ? _p.ResizeObserver : qk;
})();
const Om = (e) => e != null && e !== "", kn = (e, t) => {
  const n = O({}, e);
  return Object.keys(t).forEach((o) => {
    const r = n[o];
    if (r)
      r.type || r.default ? r.default = t[o] : r.def ? r.def(t[o]) : n[o] = {
        type: r,
        default: t[o]
      };
    else
      throw new Error(`not have ${o} prop`);
  }), n;
}, Gk = (e) => {
  const t = Object.keys(e), n = {}, o = {}, r = {};
  for (let i = 0, a = t.length; i < a; i++) {
    const l = t[i];
    VB(l) ? (n[l[2].toLowerCase() + l.slice(3)] = e[l], o[l] = e[l]) : r[l] = e[l];
  }
  return {
    onEvents: o,
    events: n,
    extraAttrs: r
  };
}, h8 = function() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const n = {}, o = /;(?![^(]*\))/g, r = /:(.+)/;
  return typeof e == "object" ? e : (e.split(o).forEach(function(i) {
    if (i) {
      const a = i.split(r);
      if (a.length > 1) {
        const l = t ? Td(a[0].trim()) : a[0].trim();
        n[l] = a[1].trim();
      }
    }
  }), n);
}, Oa = (e, t) => e[t] !== void 0, Uk = Symbol("skipFlatten"), go = function() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  const n = Array.isArray(e) ? e : [e], o = [];
  return n.forEach((r) => {
    Array.isArray(r) ? o.push(...go(r, t)) : r && r.type === Je ? r.key === Uk ? o.push(r) : o.push(...go(r.children, t)) : r && cr(r) ? t && !Ph(r) ? o.push(r) : t || o.push(r) : Om(r) && o.push(r);
  }), o;
}, Xk = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default", n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  if (cr(e))
    return e.type === Je ? t === "default" ? go(e.children) : [] : e.children && e.children[t] ? go(e.children[t](n)) : [];
  {
    const o = e.$slots[t] && e.$slots[t](n);
    return go(o);
  }
}, Ui = (e) => {
  var t;
  let n = ((t = e?.vnode) === null || t === void 0 ? void 0 : t.el) || e && (e.$el || e);
  for (; n && !n.tagName; )
    n = n.nextSibling;
  return n;
}, g8 = (e) => {
  const t = {};
  if (e.$ && e.$.vnode) {
    const n = e.$.vnode.props || {};
    Object.keys(e.$props).forEach((o) => {
      const r = e.$props[o], i = KB(o);
      (r !== void 0 || i in n) && (t[o] = r);
    });
  } else if (cr(e) && typeof e.type == "object") {
    const n = e.props || {}, o = {};
    Object.keys(n).forEach((i) => {
      o[Td(i)] = n[i];
    });
    const r = e.type.props || {};
    Object.keys(r).forEach((i) => {
      const a = GB(r, o, i, o[i]);
      (a !== void 0 || i in o) && (t[i] = a);
    });
  }
  return t;
}, Qk = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default", n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e, o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, r;
  if (e.$) {
    const i = e[t];
    if (i !== void 0)
      return typeof i == "function" && o ? i(n) : i;
    r = e.$slots[t], r = o && r ? r(n) : r;
  } else if (cr(e)) {
    const i = e.props && e.props[t];
    if (i !== void 0 && e.props !== null)
      return typeof i == "function" && o ? i(n) : i;
    e.type === Je ? r = e.children : e.children && e.children[t] && (r = e.children[t], r = o && r ? r(n) : r);
  }
  return Array.isArray(r) && (r = go(r), r = r.length === 1 ? r[0] : r, r = r.length === 0 ? void 0 : r), r;
};
function l1() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, n = {};
  return e.$ ? n = O(O({}, n), e.$attrs) : n = O(O({}, n), e.props), Gk(n)[t ? "onEvents" : "events"];
}
function v8(e, t) {
  let o = ((cr(e) ? e.props : e.$attrs) || {}).style || {};
  return typeof o == "string" && (o = h8(o, t)), o;
}
function m8(e) {
  return e.length === 1 && e[0].type === Je;
}
function Ph(e) {
  return e && (e.type === VP || e.type === Je && e.children.length === 0 || e.type === ry && e.children.trim() === "");
}
function Do() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  const t = [];
  return e.forEach((n) => {
    Array.isArray(n) ? t.push(...n) : n?.type === Je ? t.push(...Do(n.children)) : t.push(n);
  }), t.filter((n) => !Ph(n));
}
function _c(e) {
  if (e) {
    const t = Do(e);
    return t.length ? t : void 0;
  } else
    return e;
}
function Ao(e) {
  return Array.isArray(e) && e.length === 1 && (e = e[0]), e && e.__v_isVNode && typeof e.type != "symbol";
}
function ei(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "default";
  var o, r;
  return (o = t[n]) !== null && o !== void 0 ? o : (r = e[n]) === null || r === void 0 ? void 0 : r.call(e);
}
const Al = be({
  compatConfig: {
    MODE: 3
  },
  name: "ResizeObserver",
  props: {
    disabled: Boolean,
    onResize: Function
  },
  emits: ["resize"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = Pn({
      width: 0,
      height: 0,
      offsetHeight: 0,
      offsetWidth: 0
    });
    let r = null, i = null;
    const a = () => {
      i && (i.disconnect(), i = null);
    }, l = (c) => {
      const {
        onResize: d
      } = e, f = c[0].target, {
        width: p,
        height: v
      } = f.getBoundingClientRect(), {
        offsetWidth: g,
        offsetHeight: m
      } = f, x = Math.floor(p), S = Math.floor(v);
      if (o.width !== x || o.height !== S || o.offsetWidth !== g || o.offsetHeight !== m) {
        const C = {
          width: x,
          height: S,
          offsetWidth: g,
          offsetHeight: m
        };
        O(o, C), d && Promise.resolve().then(() => {
          d(O(O({}, C), {
            offsetWidth: g,
            offsetHeight: m
          }), f);
        });
      }
    }, s = fr(), u = () => {
      const {
        disabled: c
      } = e;
      if (c) {
        a();
        return;
      }
      const d = Ui(s);
      d !== r && (a(), r = d), !i && d && (i = new Yk(l), i.observe(d));
    };
    return Nt(() => {
      u();
    }), Ya(() => {
      u();
    }), jo(() => {
      a();
    }), ke(() => e.disabled, () => {
      u();
    }, {
      flush: "post"
    }), () => {
      var c;
      return (c = n.default) === null || c === void 0 ? void 0 : c.call(n)[0];
    };
  }
});
let Zk = (e) => setTimeout(e, 16), Jk = (e) => clearTimeout(e);
typeof window < "u" && "requestAnimationFrame" in window && (Zk = (e) => window.requestAnimationFrame(e), Jk = (e) => window.cancelAnimationFrame(e));
let s1 = 0;
const Yy = /* @__PURE__ */ new Map();
function eI(e) {
  Yy.delete(e);
}
function Vt(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
  s1 += 1;
  const n = s1;
  function o(r) {
    if (r === 0)
      eI(n), e();
    else {
      const i = Zk(() => {
        o(r - 1);
      });
      Yy.set(n, i);
    }
  }
  return o(t), n;
}
Vt.cancel = (e) => {
  const t = Yy.get(e);
  return eI(t), Jk(t);
};
const Dr = function() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  return t;
}, ii = (e) => {
  const t = e;
  return t.install = function(n) {
    n.component(t.displayName || t.name, e);
  }, e;
};
function Wu() {
  return {
    type: [Function, Array]
  };
}
function Et(e) {
  return {
    type: Object,
    default: e
  };
}
function ct(e) {
  return {
    type: Boolean,
    default: e
  };
}
function et(e) {
  return {
    type: Function,
    default: e
  };
}
function Ir(e, t) {
  return {
    validator: () => !0,
    default: e
  };
}
function Hg() {
  return {
    validator: () => !0
  };
}
function jn(e) {
  return {
    type: Array,
    default: e
  };
}
function an(e) {
  return {
    type: String,
    default: e
  };
}
function en(e, t) {
  return e ? {
    type: e,
    default: t
  } : Ir(t);
}
let Bo = !1;
try {
  const e = Object.defineProperty({}, "passive", {
    get() {
      Bo = !0;
    }
  });
  window.addEventListener("testPassive", null, e), window.removeEventListener("testPassive", null, e);
} catch {
}
function Ho(e, t, n, o) {
  if (e && e.addEventListener) {
    let r = o;
    r === void 0 && Bo && (t === "touchstart" || t === "touchmove" || t === "wheel") && (r = {
      passive: !1
    }), e.addEventListener(t, n, r);
  }
  return {
    remove: () => {
      e && e.removeEventListener && e.removeEventListener(t, n);
    }
  };
}
const Gy = "anticon", tI = Symbol("GlobalFormContextKey"), b8 = (e) => {
  Ft(tI, e);
}, y8 = () => zt(tI, {
  validateMessages: E(() => {
  })
}), x8 = () => ({
  iconPrefixCls: String,
  getTargetContainer: {
    type: Function
  },
  getPopupContainer: {
    type: Function
  },
  prefixCls: String,
  getPrefixCls: {
    type: Function
  },
  renderEmpty: {
    type: Function
  },
  transformCellText: {
    type: Function
  },
  csp: Et(),
  input: Et(),
  autoInsertSpaceInButton: {
    type: Boolean,
    default: void 0
  },
  locale: Et(),
  pageHeader: Et(),
  componentSize: {
    type: String
  },
  componentDisabled: {
    type: Boolean,
    default: void 0
  },
  direction: {
    type: String,
    default: "ltr"
  },
  space: Et(),
  virtual: {
    type: Boolean,
    default: void 0
  },
  dropdownMatchSelectWidth: {
    type: [Number, Boolean],
    default: !0
  },
  form: Et(),
  pagination: Et(),
  theme: Et(),
  select: Et(),
  wave: Et()
}), Uy = Symbol("configProvider"), nI = {
  getPrefixCls: (e, t) => t || (e ? `ant-${e}` : "ant"),
  iconPrefixCls: E(() => Gy),
  getPopupContainer: E(() => () => document.body),
  direction: E(() => "ltr")
}, Oh = () => zt(Uy, nI), w8 = (e) => Ft(Uy, e), oI = Symbol("DisabledContextKey"), _i = () => zt(oI, ce(void 0)), rI = (e) => {
  const t = _i();
  return Ft(oI, E(() => {
    var n;
    return (n = e.value) !== null && n !== void 0 ? n : t.value;
  })), e;
}, iI = {
  // Options.jsx
  items_per_page: "/ page",
  jump_to: "Go to",
  jump_to_confirm: "confirm",
  page: "",
  // Pagination.jsx
  prev_page: "Previous Page",
  next_page: "Next Page",
  prev_5: "Previous 5 Pages",
  next_5: "Next 5 Pages",
  prev_3: "Previous 3 Pages",
  next_3: "Next 3 Pages"
}, S8 = {
  locale: "en_US",
  today: "Today",
  now: "Now",
  backToToday: "Back to today",
  ok: "Ok",
  clear: "Clear",
  month: "Month",
  year: "Year",
  timeSelect: "select time",
  dateSelect: "select date",
  weekSelect: "Choose a week",
  monthSelect: "Choose a month",
  yearSelect: "Choose a year",
  decadeSelect: "Choose a decade",
  yearFormat: "YYYY",
  dateFormat: "M/D/YYYY",
  dayFormat: "D",
  dateTimeFormat: "M/D/YYYY HH:mm:ss",
  monthBeforeYear: !0,
  previousMonth: "Previous month (PageUp)",
  nextMonth: "Next month (PageDown)",
  previousYear: "Last year (Control + left)",
  nextYear: "Next year (Control + right)",
  previousDecade: "Last decade",
  nextDecade: "Next decade",
  previousCentury: "Last century",
  nextCentury: "Next century"
}, aI = {
  placeholder: "Select time",
  rangePlaceholder: ["Start time", "End time"]
}, Mp = {
  lang: O({
    placeholder: "Select date",
    yearPlaceholder: "Select year",
    quarterPlaceholder: "Select quarter",
    monthPlaceholder: "Select month",
    weekPlaceholder: "Select week",
    rangePlaceholder: ["Start date", "End date"],
    rangeYearPlaceholder: ["Start year", "End year"],
    rangeQuarterPlaceholder: ["Start quarter", "End quarter"],
    rangeMonthPlaceholder: ["Start month", "End month"],
    rangeWeekPlaceholder: ["Start week", "End week"]
  }, S8),
  timePickerLocale: O({}, aI)
}, Sr = "${label} is not a valid ${type}", Ba = {
  locale: "en",
  Pagination: iI,
  DatePicker: Mp,
  TimePicker: aI,
  Calendar: Mp,
  global: {
    placeholder: "Please select"
  },
  Table: {
    filterTitle: "Filter menu",
    filterConfirm: "OK",
    filterReset: "Reset",
    filterEmptyText: "No filters",
    filterCheckall: "Select all items",
    filterSearchPlaceholder: "Search in filters",
    emptyText: "No data",
    selectAll: "Select current page",
    selectInvert: "Invert current page",
    selectNone: "Clear all data",
    selectionAll: "Select all data",
    sortTitle: "Sort",
    expand: "Expand row",
    collapse: "Collapse row",
    triggerDesc: "Click to sort descending",
    triggerAsc: "Click to sort ascending",
    cancelSort: "Click to cancel sorting"
  },
  Tour: {
    Next: "Next",
    Previous: "Previous",
    Finish: "Finish"
  },
  Modal: {
    okText: "OK",
    cancelText: "Cancel",
    justOkText: "OK"
  },
  Popconfirm: {
    okText: "OK",
    cancelText: "Cancel"
  },
  Transfer: {
    titles: ["", ""],
    searchPlaceholder: "Search here",
    itemUnit: "item",
    itemsUnit: "items",
    remove: "Remove",
    selectCurrent: "Select current page",
    removeCurrent: "Remove current page",
    selectAll: "Select all data",
    removeAll: "Remove all data",
    selectInvert: "Invert current page"
  },
  Upload: {
    uploading: "Uploading...",
    removeFile: "Remove file",
    uploadError: "Upload error",
    previewFile: "Preview file",
    downloadFile: "Download file"
  },
  Empty: {
    description: "No data"
  },
  Icon: {
    icon: "icon"
  },
  Text: {
    edit: "Edit",
    copy: "Copy",
    copied: "Copied",
    expand: "Expand"
  },
  PageHeader: {
    back: "Back"
  },
  Form: {
    optional: "(optional)",
    defaultValidateMessages: {
      default: "Field validation error for ${label}",
      required: "Please enter ${label}",
      enum: "${label} must be one of [${enum}]",
      whitespace: "${label} cannot be a blank character",
      date: {
        format: "${label} date format is invalid",
        parse: "${label} cannot be converted to a date",
        invalid: "${label} is an invalid date"
      },
      types: {
        string: Sr,
        method: Sr,
        array: Sr,
        object: Sr,
        number: Sr,
        date: Sr,
        boolean: Sr,
        integer: Sr,
        float: Sr,
        regexp: Sr,
        email: Sr,
        url: Sr,
        hex: Sr
      },
      string: {
        len: "${label} must be ${len} characters",
        min: "${label} must be at least ${min} characters",
        max: "${label} must be up to ${max} characters",
        range: "${label} must be between ${min}-${max} characters"
      },
      number: {
        len: "${label} must be equal to ${len}",
        min: "${label} must be minimum ${min}",
        max: "${label} must be maximum ${max}",
        range: "${label} must be between ${min}-${max}"
      },
      array: {
        len: "Must be ${len} ${label}",
        min: "At least ${min} ${label}",
        max: "At most ${max} ${label}",
        range: "The amount of ${label} must be between ${min}-${max}"
      },
      pattern: {
        mismatch: "${label} does not match the pattern ${pattern}"
      }
    }
  },
  Image: {
    preview: "Preview"
  },
  QRCode: {
    expired: "QR code expired",
    refresh: "Refresh",
    scanned: "Scanned"
  }
}, lI = be({
  compatConfig: {
    MODE: 3
  },
  name: "LocaleReceiver",
  props: {
    componentName: String,
    defaultLocale: {
      type: [Object, Function]
    },
    children: {
      type: Function
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = zt("localeData", {}), r = E(() => {
      const {
        componentName: a = "global",
        defaultLocale: l
      } = e, s = l || Ba[a || "global"], {
        antLocale: u
      } = o, c = a && u ? u[a] : {};
      return O(O({}, typeof s == "function" ? s() : s), c || {});
    }), i = E(() => {
      const {
        antLocale: a
      } = o, l = a && a.locale;
      return a && a.exist && !l ? Ba.locale : l;
    });
    return () => {
      const a = e.children || n.default, {
        antLocale: l
      } = o;
      return a?.(r.value, i.value, l);
    };
  }
});
function Rl(e, t, n) {
  const o = zt("localeData", {});
  return [E(() => {
    const {
      antLocale: i
    } = o, a = T(t) || Ba[e || "global"], l = e && i ? i[e] : {};
    return O(O(O({}, typeof a == "function" ? a() : a), l || {}), T(n) || {});
  })];
}
function Xy(e) {
  for (var t = 0, n, o = 0, r = e.length; r >= 4; ++o, r -= 4)
    n = e.charCodeAt(o) & 255 | (e.charCodeAt(++o) & 255) << 8 | (e.charCodeAt(++o) & 255) << 16 | (e.charCodeAt(++o) & 255) << 24, n = /* Math.imul(k, m): */
    (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
    n >>> 24, t = /* Math.imul(k, m): */
    (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
    (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
  switch (r) {
    case 3:
      t ^= (e.charCodeAt(o + 2) & 255) << 16;
    case 2:
      t ^= (e.charCodeAt(o + 1) & 255) << 8;
    case 1:
      t ^= e.charCodeAt(o) & 255, t = /* Math.imul(h, m): */
      (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
  }
  return t ^= t >>> 13, t = /* Math.imul(h, m): */
  (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
}
const u1 = "%";
class C8 {
  constructor(t) {
    this.cache = /* @__PURE__ */ new Map(), this.instanceId = t;
  }
  get(t) {
    return this.cache.get(Array.isArray(t) ? t.join(u1) : t) || null;
  }
  update(t, n) {
    const o = Array.isArray(t) ? t.join(u1) : t, r = this.cache.get(o), i = n(r);
    i === null ? this.cache.delete(o) : this.cache.set(o, i);
  }
}
const sI = "data-token-hash", Cs = "data-css-hash", $8 = "data-cache-path", wu = "__cssinjs_instance__";
function pd() {
  const e = Math.random().toString(12).slice(2);
  if (typeof document < "u" && document.head && document.body) {
    const t = document.body.querySelectorAll(`style[${Cs}]`) || [], {
      firstChild: n
    } = document.head;
    Array.from(t).forEach((r) => {
      r[wu] = r[wu] || e, r[wu] === e && document.head.insertBefore(r, n);
    });
    const o = {};
    Array.from(document.querySelectorAll(`style[${Cs}]`)).forEach((r) => {
      var i;
      const a = r.getAttribute(Cs);
      o[a] ? r[wu] === e && ((i = r.parentNode) === null || i === void 0 || i.removeChild(r)) : o[a] = !0;
    });
  }
  return new C8(e);
}
const uI = Symbol("StyleContextKey"), P8 = () => {
  var e, t, n;
  const o = fr();
  let r;
  if (o && o.appContext) {
    const i = (n = (t = (e = o.appContext) === null || e === void 0 ? void 0 : e.config) === null || t === void 0 ? void 0 : t.globalProperties) === null || n === void 0 ? void 0 : n.__ANTDV_CSSINJS_CACHE__;
    i ? r = i : (r = pd(), o.appContext.config.globalProperties && (o.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__ = r));
  } else
    r = pd();
  return r;
}, cI = {
  cache: pd(),
  defaultCache: !0,
  hashPriority: "low"
}, kh = () => {
  const e = P8();
  return zt(uI, $e(O(O({}, cI), {
    cache: e
  })));
}, O8 = (e) => {
  const t = kh(), n = $e(O(O({}, cI), {
    cache: pd()
  }));
  return ke([() => T(e), t], () => {
    const o = O({}, t.value), r = T(e);
    Object.keys(r).forEach((a) => {
      const l = r[a];
      r[a] !== void 0 && (o[a] = l);
    });
    const {
      cache: i
    } = r;
    o.cache = o.cache || pd(), o.defaultCache = !i && t.value.defaultCache, n.value = o;
  }, {
    immediate: !0
  }), Ft(uI, n), n;
}, k8 = () => ({
  autoClear: ct(),
  /** @private Test only. Not work in production. */
  mock: an(),
  /**
   * Only set when you need ssr to extract style on you own.
   * If not provided, it will auto create <style /> on the end of Provider in server side.
   */
  cache: Et(),
  /** Tell children that this context is default generated context */
  defaultCache: ct(),
  /** Use `:where` selector to reduce hashId css selector priority */
  hashPriority: an(),
  /** Tell cssinjs where to inject style in */
  container: en(),
  /** Component wil render inline  `<style />` for fallback in SSR. Not recommend. */
  ssrInline: ct(),
  /** Transform css before inject in document. Please note that `transformers` do not support dynamic update */
  transformers: jn(),
  /**
   * Linters to lint css before inject in document.
   * Styles will be linted after transforming.
   * Please note that `linters` do not support dynamic update.
   */
  linters: jn()
});
ii(be({
  name: "AStyleProvider",
  inheritAttrs: !1,
  props: k8(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    return O8(e), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}));
function I8() {
  return !1;
}
let km = !1;
function _8() {
  return km;
}
const T8 = process.env.NODE_ENV === "production" ? I8 : _8;
if (process.env.NODE_ENV !== "production" && typeof module < "u" && module && module.hot && typeof window < "u") {
  const e = window;
  if (typeof e.webpackHotUpdate == "function") {
    const t = e.webpackHotUpdate;
    e.webpackHotUpdate = function() {
      return km = !0, setTimeout(() => {
        km = !1;
      }, 0), t(...arguments);
    };
  }
}
function dI(e, t, n, o) {
  const r = kh(), i = $e(""), a = $e();
  It(() => {
    i.value = [e, ...t.value].join("%");
  });
  const l = T8(), s = (u) => {
    r.value.cache.update(u, (c) => {
      const [d = 0, f] = c || [];
      return d - 1 === 0 ? (o?.(f, !1), null) : [d - 1, f];
    });
  };
  return ke(i, (u, c) => {
    c && s(c), r.value.cache.update(u, (d) => {
      const [f = 0, p] = d || [];
      let v = p;
      process.env.NODE_ENV !== "production" && p && l && (o?.(v, l), v = null);
      const g = v || n();
      return [f + 1, g];
    }), a.value = r.value.cache.get(i.value)[1];
  }, {
    immediate: !0
  }), qt(() => {
    s(i.value);
  }), a;
}
function xr() {
  return !!(typeof window < "u" && window.document && window.document.createElement);
}
function bl(e, t) {
  return e && e.contains ? e.contains(t) : !1;
}
const c1 = "data-vc-order", M8 = "vc-util-key", Im = /* @__PURE__ */ new Map();
function fI() {
  let {
    mark: e
  } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  return e ? e.startsWith("data-") ? e : `data-${e}` : M8;
}
function Ih(e) {
  return e.attachTo ? e.attachTo : document.querySelector("head") || document.body;
}
function E8(e) {
  return e === "queue" ? "prependQueue" : e ? "prepend" : "append";
}
function pI(e) {
  return Array.from((Im.get(e) || e).children).filter((t) => t.tagName === "STYLE");
}
function hI(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  if (!xr())
    return null;
  const {
    csp: n,
    prepend: o
  } = t, r = document.createElement("style");
  r.setAttribute(c1, E8(o)), n?.nonce && (r.nonce = n?.nonce), r.innerHTML = e;
  const i = Ih(t), {
    firstChild: a
  } = i;
  if (o) {
    if (o === "queue") {
      const l = pI(i).filter((s) => ["prepend", "prependQueue"].includes(s.getAttribute(c1)));
      if (l.length)
        return i.insertBefore(r, l[l.length - 1].nextSibling), r;
    }
    i.insertBefore(r, a);
  } else
    i.appendChild(r);
  return r;
}
function gI(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const n = Ih(t);
  return pI(n).find((o) => o.getAttribute(fI(t)) === e);
}
function Ep(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const n = gI(e, t);
  n && Ih(t).removeChild(n);
}
function D8(e, t) {
  const n = Im.get(e);
  if (!n || !bl(document, n)) {
    const o = hI("", t), {
      parentNode: r
    } = o;
    Im.set(e, r), e.removeChild(o);
  }
}
function hd(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  var o, r, i;
  const a = Ih(n);
  D8(a, n);
  const l = gI(t, n);
  if (l)
    return !((o = n.csp) === null || o === void 0) && o.nonce && l.nonce !== ((r = n.csp) === null || r === void 0 ? void 0 : r.nonce) && (l.nonce = (i = n.csp) === null || i === void 0 ? void 0 : i.nonce), l.innerHTML !== e && (l.innerHTML = e), l;
  const s = hI(e, n);
  return s.setAttribute(fI(n), t), s;
}
function A8(e, t) {
  if (e.length !== t.length)
    return !1;
  for (let n = 0; n < e.length; n++)
    if (e[n] !== t[n])
      return !1;
  return !0;
}
class Ku {
  constructor() {
    this.cache = /* @__PURE__ */ new Map(), this.keys = [], this.cacheCallTimes = 0;
  }
  size() {
    return this.keys.length;
  }
  internalGet(t) {
    let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, o = {
      map: this.cache
    };
    return t.forEach((r) => {
      var i;
      o ? o = (i = o?.map) === null || i === void 0 ? void 0 : i.get(r) : o = void 0;
    }), o?.value && n && (o.value[1] = this.cacheCallTimes++), o?.value;
  }
  get(t) {
    var n;
    return (n = this.internalGet(t, !0)) === null || n === void 0 ? void 0 : n[0];
  }
  has(t) {
    return !!this.internalGet(t);
  }
  set(t, n) {
    if (!this.has(t)) {
      if (this.size() + 1 > Ku.MAX_CACHE_SIZE + Ku.MAX_CACHE_OFFSET) {
        const [r] = this.keys.reduce((i, a) => {
          const [, l] = i;
          return this.internalGet(a)[1] < l ? [a, this.internalGet(a)[1]] : i;
        }, [this.keys[0], this.cacheCallTimes]);
        this.delete(r);
      }
      this.keys.push(t);
    }
    let o = this.cache;
    t.forEach((r, i) => {
      if (i === t.length - 1)
        o.set(r, {
          value: [n, this.cacheCallTimes++]
        });
      else {
        const a = o.get(r);
        a ? a.map || (a.map = /* @__PURE__ */ new Map()) : o.set(r, {
          map: /* @__PURE__ */ new Map()
        }), o = o.get(r).map;
      }
    });
  }
  deleteByPath(t, n) {
    var o;
    const r = t.get(n[0]);
    if (n.length === 1)
      return r.map ? t.set(n[0], {
        map: r.map
      }) : t.delete(n[0]), (o = r.value) === null || o === void 0 ? void 0 : o[0];
    const i = this.deleteByPath(r.map, n.slice(1));
    return (!r.map || r.map.size === 0) && !r.value && t.delete(n[0]), i;
  }
  delete(t) {
    if (this.has(t))
      return this.keys = this.keys.filter((n) => !A8(n, t)), this.deleteByPath(this.cache, t);
  }
}
Ku.MAX_CACHE_SIZE = 20;
Ku.MAX_CACHE_OFFSET = 5;
let _m = {};
function wn(e, t) {
  process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error(`Warning: ${t}`);
}
function vI(e, t) {
  process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.warn(`Note: ${t}`);
}
function N8() {
  _m = {};
}
function mI(e, t, n) {
  !t && !_m[n] && (e(!1, n), _m[n] = !0);
}
function vr(e, t) {
  mI(wn, e, t);
}
function Tm(e, t) {
  mI(vI, e, t);
}
function R8() {
}
let wo = R8;
process.env.NODE_ENV !== "production" && (wo = (e, t, n) => {
  vr(e, `[ant-design-vue: ${t}] ${n}`), process.env.NODE_ENV === "test" && N8();
});
let d1 = 0;
class bI {
  constructor(t) {
    this.derivatives = Array.isArray(t) ? t : [t], this.id = d1, t.length === 0 && wo(t.length > 0, "[Ant Design Vue CSS-in-JS] Theme should have at least one derivative function."), d1 += 1;
  }
  getDerivativeToken(t) {
    return this.derivatives.reduce((n, o) => o(t, n), void 0);
  }
}
const Vg = new Ku();
function yI(e) {
  const t = Array.isArray(e) ? e : [e];
  return Vg.has(t) || Vg.set(t, new bI(t)), Vg.get(t);
}
const f1 = /* @__PURE__ */ new WeakMap();
function Dp(e) {
  let t = f1.get(e) || "";
  return t || (Object.keys(e).forEach((n) => {
    const o = e[n];
    t += n, o instanceof bI ? t += o.id : o && typeof o == "object" ? t += Dp(o) : t += o;
  }), f1.set(e, t)), t;
}
function z8(e, t) {
  return Xy(`${t}_${Dp(e)}`);
}
const Uc = `random-${Date.now()}-${Math.random()}`.replace(/\./g, ""), xI = "_bAmBoO_";
function F8(e, t, n) {
  var o, r;
  if (xr()) {
    hd(e, Uc);
    const i = document.createElement("div");
    i.style.position = "fixed", i.style.left = "0", i.style.top = "0", t?.(i), document.body.appendChild(i), process.env.NODE_ENV !== "production" && (i.innerHTML = "Test", i.style.zIndex = "9999999");
    const a = n ? n(i) : (o = getComputedStyle(i).content) === null || o === void 0 ? void 0 : o.includes(xI);
    return (r = i.parentNode) === null || r === void 0 || r.removeChild(i), Ep(Uc), a;
  }
  return !1;
}
let jg;
function B8() {
  return jg === void 0 && (jg = F8(`@layer ${Uc} { .${Uc} { content: "${xI}"!important; } }`, (e) => {
    e.className = Uc;
  })), jg;
}
const p1 = {}, L8 = process.env.NODE_ENV === "production", H8 = process.env.NODE_ENV === "prerender", V8 = !L8 && !H8 ? "css-dev-only-do-not-override" : "css", ds = /* @__PURE__ */ new Map();
function j8(e) {
  ds.set(e, (ds.get(e) || 0) + 1);
}
function W8(e, t) {
  typeof document < "u" && document.querySelectorAll(`style[${sI}="${e}"]`).forEach((o) => {
    var r;
    o[wu] === t && ((r = o.parentNode) === null || r === void 0 || r.removeChild(o));
  });
}
const K8 = 0;
function q8(e, t) {
  ds.set(e, (ds.get(e) || 0) - 1);
  const n = Array.from(ds.keys()), o = n.filter((r) => (ds.get(r) || 0) <= 0);
  n.length - o.length > K8 && o.forEach((r) => {
    W8(r, t), ds.delete(r);
  });
}
const Y8 = (e, t, n, o) => {
  const r = n.getDerivativeToken(e);
  let i = O(O({}, r), t);
  return o && (i = o(i)), i;
};
function G8(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ce({});
  const o = kh(), r = E(() => O({}, ...t.value)), i = E(() => Dp(r.value)), a = E(() => Dp(n.value.override || p1));
  return dI("token", E(() => [n.value.salt || "", e.value.id, i.value, a.value]), () => {
    const {
      salt: s = "",
      override: u = p1,
      formatToken: c,
      getComputedToken: d
    } = n.value, f = d ? d(r.value, u, e.value) : Y8(r.value, u, e.value, c), p = z8(f, s);
    f._tokenKey = p, j8(p);
    const v = `${V8}-${Xy(p)}`;
    return f._hashId = v, [f, v];
  }, (s) => {
    var u;
    q8(s[0]._tokenKey, (u = o.value) === null || u === void 0 ? void 0 : u.cache.instanceId);
  });
}
var U8 = {
  animationIterationCount: 1,
  aspectRatio: 1,
  borderImageOutset: 1,
  borderImageSlice: 1,
  borderImageWidth: 1,
  boxFlex: 1,
  boxFlexGroup: 1,
  boxOrdinalGroup: 1,
  columnCount: 1,
  columns: 1,
  flex: 1,
  flexGrow: 1,
  flexPositive: 1,
  flexShrink: 1,
  flexNegative: 1,
  flexOrder: 1,
  gridRow: 1,
  gridRowEnd: 1,
  gridRowSpan: 1,
  gridRowStart: 1,
  gridColumn: 1,
  gridColumnEnd: 1,
  gridColumnSpan: 1,
  gridColumnStart: 1,
  msGridRow: 1,
  msGridRowSpan: 1,
  msGridColumn: 1,
  msGridColumnSpan: 1,
  fontWeight: 1,
  lineHeight: 1,
  opacity: 1,
  order: 1,
  orphans: 1,
  tabSize: 1,
  widows: 1,
  zIndex: 1,
  zoom: 1,
  WebkitLineClamp: 1,
  // SVG-related properties
  fillOpacity: 1,
  floodOpacity: 1,
  stopOpacity: 1,
  strokeDasharray: 1,
  strokeDashoffset: 1,
  strokeMiterlimit: 1,
  strokeOpacity: 1,
  strokeWidth: 1
}, wI = "comm", SI = "rule", CI = "decl", X8 = "@import", Q8 = "@namespace", Z8 = "@keyframes", J8 = "@layer", eL = Math.abs, Xc = String.fromCharCode;
function $I(e) {
  return e.trim();
}
function Mm(e, t, n) {
  return e.replace(t, n);
}
function ku(e, t) {
  return e.charCodeAt(t) | 0;
}
function qu(e, t, n) {
  return e.slice(t, n);
}
function Yi(e) {
  return e.length;
}
function tL(e) {
  return e.length;
}
function pf(e, t) {
  return t.push(e), e;
}
var _h = 1, Yu = 1, PI = 0, ni = 0, Co = 0, uc = "";
function Qy(e, t, n, o, r, i, a, l) {
  return { value: e, root: t, parent: n, type: o, props: r, children: i, line: _h, column: Yu, length: a, return: "", siblings: l };
}
function nL() {
  return Co;
}
function oL() {
  return Co = ni > 0 ? ku(uc, --ni) : 0, Yu--, Co === 10 && (Yu = 1, _h--), Co;
}
function Ci() {
  return Co = ni < PI ? ku(uc, ni++) : 0, Yu++, Co === 10 && (Yu = 1, _h++), Co;
}
function Cl() {
  return ku(uc, ni);
}
function Zf() {
  return ni;
}
function Th(e, t) {
  return qu(uc, e, t);
}
function gd(e) {
  switch (e) {
    // \0 \t \n \r \s whitespace token
    case 0:
    case 9:
    case 10:
    case 13:
    case 32:
      return 5;
    // ! + , / > @ ~ isolate token
    case 33:
    case 43:
    case 44:
    case 47:
    case 62:
    case 64:
    case 126:
    // ; { } breakpoint token
    case 59:
    case 123:
    case 125:
      return 4;
    // : accompanied token
    case 58:
      return 3;
    // " ' ( [ opening delimit token
    case 34:
    case 39:
    case 40:
    case 91:
      return 2;
    // ) ] closing delimit token
    case 41:
    case 93:
      return 1;
  }
  return 0;
}
function rL(e) {
  return _h = Yu = 1, PI = Yi(uc = e), ni = 0, [];
}
function iL(e) {
  return uc = "", e;
}
function Wg(e) {
  return $I(Th(ni - 1, Em(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
}
function aL(e) {
  for (; (Co = Cl()) && Co < 33; )
    Ci();
  return gd(e) > 2 || gd(Co) > 3 ? "" : " ";
}
function lL(e, t) {
  for (; --t && Ci() && !(Co < 48 || Co > 102 || Co > 57 && Co < 65 || Co > 70 && Co < 97); )
    ;
  return Th(e, Zf() + (t < 6 && Cl() == 32 && Ci() == 32));
}
function Em(e) {
  for (; Ci(); )
    switch (Co) {
      // ] ) " '
      case e:
        return ni;
      // " '
      case 34:
      case 39:
        e !== 34 && e !== 39 && Em(Co);
        break;
      // (
      case 40:
        e === 41 && Em(e);
        break;
      // \
      case 92:
        Ci();
        break;
    }
  return ni;
}
function sL(e, t) {
  for (; Ci() && e + Co !== 57; )
    if (e + Co === 84 && Cl() === 47)
      break;
  return "/*" + Th(t, ni - 1) + "*" + Xc(e === 47 ? e : Ci());
}
function uL(e) {
  for (; !gd(Cl()); )
    Ci();
  return Th(e, ni);
}
function cL(e) {
  return iL(Jf("", null, null, null, [""], e = rL(e), 0, [0], e));
}
function Jf(e, t, n, o, r, i, a, l, s) {
  for (var u = 0, c = 0, d = a, f = 0, p = 0, v = 0, g = 1, m = 1, x = 1, S = 0, C = 0, P = "", $ = r, I = i, w = o, _ = P; m; )
    switch (v = C, C = Ci()) {
      // (
      case 40:
        v != 108 && ku(_, d - 1) == 58 ? (S++, _ += "(") : _ += Wg(C);
        break;
      // )
      case 41:
        S--, _ += ")";
        break;
      // " ' [
      case 34:
      case 39:
      case 91:
        _ += Wg(C);
        break;
      // \t \n \r \s
      case 9:
      case 10:
      case 13:
      case 32:
        if (S > 0) {
          _ += Xc(C);
          break;
        }
        _ += aL(v);
        break;
      // \
      case 92:
        _ += lL(Zf() - 1, 7);
        continue;
      // /
      case 47:
        switch (Cl()) {
          case 42:
          case 47:
            pf(dL(sL(Ci(), Zf()), t, n, s), s), (gd(v || 1) == 5 || gd(Cl() || 1) == 5) && Yi(_) && qu(_, -1, void 0) !== " " && (_ += " ");
            break;
          default:
            _ += "/";
        }
        break;
      // {
      case 123 * g:
        l[u++] = Yi(_) * x;
      // } ; \0
      case 125 * g:
      case 59:
      case 0:
        if (S > 0 && C) {
          _ += Xc(C);
          break;
        }
        switch (C) {
          // \0 }
          case 0:
          case 125:
            m = 0;
          // ;
          case 59 + c:
            x == -1 && (_ = Mm(_, /\f/g, "")), p > 0 && (Yi(_) - d || g === 0) && pf(p > 32 ? g1(_ + ";", o, n, d - 1, s) : g1(Mm(_, " ", "") + ";", o, n, d - 2, s), s);
            break;
          // @ ;
          case 59:
            _ += ";";
          // { rule/at-rule
          default:
            if (pf(w = h1(_, t, n, u, c, r, l, P, $ = [], I = [], d, i), i), C === 123)
              if (c === 0)
                Jf(_, t, w, w, $, i, d, l, I);
              else {
                switch (f) {
                  // c(ontainer)
                  case 99:
                    if (ku(_, 3) === 110) break;
                  // l(ayer)
                  case 108:
                    if (ku(_, 2) === 97) break;
                  default:
                    c = 0;
                  // d(ocument) m(edia) s(upports)
                  case 100:
                  case 109:
                  case 115:
                }
                c ? Jf(e, w, w, o && pf(h1(e, w, w, 0, 0, r, l, P, r, $ = [], d, I), I), r, I, d, l, o ? $ : I) : Jf(_, w, w, w, [""], I, 0, l, I);
              }
        }
        u = c = p = 0, g = x = 1, P = _ = "", d = a;
        break;
      // :
      case 58:
        d = 1 + Yi(_), p = v;
      default:
        if (g < 1) {
          if (C == 123)
            --g;
          else if (C == 125 && g++ == 0 && oL() == 125)
            continue;
        }
        switch (_ += Xc(C), C * g) {
          // &
          case 38:
            x = c > 0 ? 1 : (_ += "\f", -1);
            break;
          // ,
          case 44:
            if (S > 0) break;
            l[u++] = (Yi(_) - 1) * x, x = 1;
            break;
          // @
          case 64:
            Cl() === 45 && (_ += Wg(Ci())), f = Cl(), c = d = Yi(P = _ += uL(Zf())), C++;
            break;
          // -
          case 45:
            v === 45 && Yi(_) == 2 && (g = 0);
        }
    }
  return i;
}
function h1(e, t, n, o, r, i, a, l, s, u, c, d) {
  for (var f = r - 1, p = r === 0 ? i : [""], v = tL(p), g = 0, m = 0, x = 0; g < o; ++g)
    for (var S = 0, C = qu(e, f + 1, f = eL(m = a[g])), P = e; S < v; ++S)
      (P = $I(m > 0 ? p[S] + " " + C : Mm(C, /&\f/g, p[S]))) && (s[x++] = P);
  return Qy(e, t, n, r === 0 ? SI : l, s, u, c, d);
}
function dL(e, t, n, o) {
  return Qy(e, t, n, wI, Xc(nL()), qu(e, 2, -2), 0, o);
}
function g1(e, t, n, o, r) {
  return Qy(e, t, n, CI, qu(e, 0, o), qu(e, o + 1, -1), o, r);
}
function Dm(e, t) {
  for (var n = "", o = 0; o < e.length; o++)
    n += t(e[o], o, e, t) || "";
  return n;
}
function fL(e, t, n, o) {
  switch (e.type) {
    case J8:
      if (e.children.length) break;
    case X8:
    case Q8:
    case CI:
      return e.return = e.return || e.value;
    case wI:
      return "";
    case Z8:
      return e.return = e.value + "{" + Dm(e.children, o) + "}";
    case SI:
      if (!Yi(e.value = e.props.join(","))) return "";
  }
  return Yi(n = Dm(e.children, o)) ? e.return = e.value + "{" + n + "}" : "";
}
function OI(e, t) {
  const {
    path: n,
    parentSelectors: o
  } = t;
  vr(!1, `[Ant Design Vue CSS-in-JS] ${n ? `Error in '${n}': ` : ""}${e}${o.length ? ` Selector info: ${o.join(" -> ")}` : ""}`);
}
const pL = (e, t, n) => {
  if (e === "content") {
    const o = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
    (typeof t != "string" || ["normal", "none", "initial", "inherit", "unset"].indexOf(t) === -1 && !o.test(t) && (t.charAt(0) !== t.charAt(t.length - 1) || t.charAt(0) !== '"' && t.charAt(0) !== "'")) && OI(`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${t}"'\`.`, n);
  }
}, hL = (e, t, n) => {
  e === "animation" && n.hashId && t !== "none" && OI(`You seem to be using hashed animation '${t}', in which case 'animationName' with Keyframe as value is recommended.`, n);
}, v1 = "data-ant-cssinjs-cache-path", gL = "_FILE_STYLE__";
let $s, kI = !0;
function vL() {
  var e;
  if (!$s && ($s = {}, xr())) {
    const t = document.createElement("div");
    t.className = v1, t.style.position = "fixed", t.style.visibility = "hidden", t.style.top = "-9999px", document.body.appendChild(t);
    let n = getComputedStyle(t).content || "";
    n = n.replace(/^"/, "").replace(/"$/, ""), n.split(";").forEach((r) => {
      const [i, a] = r.split(":");
      $s[i] = a;
    });
    const o = document.querySelector(`style[${v1}]`);
    o && (kI = !1, (e = o.parentNode) === null || e === void 0 || e.removeChild(o)), document.body.removeChild(t);
  }
}
function mL(e) {
  return vL(), !!$s[e];
}
function bL(e) {
  const t = $s[e];
  let n = null;
  if (t && xr())
    if (kI)
      n = gL;
    else {
      const o = document.querySelector(`style[${Cs}="${$s[e]}"]`);
      o ? n = o.innerHTML : delete $s[e];
    }
  return [n, t];
}
const m1 = xr(), II = "_skip_check_", _I = "_multi_value_";
function b1(e) {
  return Dm(cL(e), fL).replace(/\{%%%\:[^;];}/g, ";");
}
function yL(e) {
  return typeof e == "object" && e && (II in e || _I in e);
}
function xL(e, t, n) {
  if (!t)
    return e;
  const o = `.${t}`, r = n === "low" ? `:where(${o})` : o;
  return e.split(",").map((a) => {
    var l;
    const s = a.trim().split(/\s+/);
    let u = s[0] || "";
    const c = ((l = u.match(/^\w+/)) === null || l === void 0 ? void 0 : l[0]) || "";
    return u = `${c}${r}${u.slice(c.length)}`, [u, ...s.slice(1)].join(" ");
  }).join(",");
}
const Am = /* @__PURE__ */ new Set();
process.env.NODE_ENV;
const Nm = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, {
    root: n,
    injectHash: o,
    parentSelectors: r
  } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
    root: !0,
    parentSelectors: []
  };
  const {
    hashId: i,
    layer: a,
    path: l,
    hashPriority: s,
    transformers: u = [],
    linters: c = []
  } = t;
  let d = "", f = {};
  function p(m) {
    const x = m.getName(i);
    if (!f[x]) {
      const [S] = Nm(m.style, t, {
        root: !1,
        parentSelectors: r
      });
      f[x] = `@keyframes ${m.getName(i)}${S}`;
    }
  }
  function v(m) {
    let x = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
    return m.forEach((S) => {
      Array.isArray(S) ? v(S, x) : S && x.push(S);
    }), x;
  }
  if (v(Array.isArray(e) ? e : [e]).forEach((m) => {
    const x = typeof m == "string" && !n ? {} : m;
    if (typeof x == "string")
      d += `${x}
`;
    else if (x._keyframe)
      p(x);
    else {
      const S = u.reduce((C, P) => {
        var $;
        return (($ = P?.visit) === null || $ === void 0 ? void 0 : $.call(P, C)) || C;
      }, x);
      Object.keys(S).forEach((C) => {
        var P;
        const $ = S[C];
        if (typeof $ == "object" && $ && (C !== "animationName" || !$._keyframe) && !yL($)) {
          let I = !1, w = C.trim(), _ = !1;
          (n || o) && i ? w.startsWith("@") ? I = !0 : w = xL(C, i, s) : n && !i && (w === "&" || w === "") && (w = "", _ = !0);
          const [M, N] = Nm($, t, {
            root: _,
            injectHash: I,
            parentSelectors: [...r, w]
          });
          f = O(O({}, f), N), d += `${w}${M}`;
        } else {
          let I = function(_, M) {
            process.env.NODE_ENV !== "production" && (typeof $ != "object" || !$?.[II]) && [pL, hL, ...c].forEach((H) => H(_, M, {
              path: l,
              hashId: i,
              parentSelectors: r
            }));
            const N = _.replace(/[A-Z]/g, (H) => `-${H.toLowerCase()}`);
            let A = M;
            !U8[_] && typeof A == "number" && A !== 0 && (A = `${A}px`), _ === "animationName" && M?._keyframe && (p(M), A = M.getName(i)), d += `${N}:${A};`;
          };
          const w = (P = $?.value) !== null && P !== void 0 ? P : $;
          typeof $ == "object" && $?.[_I] && Array.isArray(w) ? w.forEach((_) => {
            I(C, _);
          }) : I(C, w);
        }
      });
    }
  }), !n)
    d = `{${d}}`;
  else if (a && B8()) {
    const m = a.split(",");
    d = `@layer ${m[m.length - 1].trim()} {${d}}`, m.length > 1 && (d = `@layer ${a}{%%%:%}${d}`);
  }
  return [d, f];
};
function wL(e, t) {
  return Xy(`${e.join("%")}${t}`);
}
function Rm(e, t) {
  const n = kh(), o = E(() => e.value.token._tokenKey), r = E(() => [o.value, ...e.value.path]);
  let i = m1;
  return process.env.NODE_ENV !== "production" && n.value.mock !== void 0 && (i = n.value.mock === "client"), dI(
    "style",
    r,
    // Create cache if needed
    () => {
      const {
        path: a,
        hashId: l,
        layer: s,
        nonce: u,
        clientOnly: c,
        order: d = 0
      } = e.value, f = r.value.join("|");
      if (mL(f)) {
        const [w, _] = bL(f);
        if (w)
          return [w, o.value, _, {}, c, d];
      }
      const p = t(), {
        hashPriority: v,
        container: g,
        transformers: m,
        linters: x,
        cache: S
      } = n.value, [C, P] = Nm(p, {
        hashId: l,
        hashPriority: v,
        layer: s,
        path: a.join("-"),
        transformers: m,
        linters: x
      }), $ = b1(C), I = wL(r.value, $);
      if (i) {
        const w = {
          mark: Cs,
          prepend: "queue",
          attachTo: g,
          priority: d
        }, _ = typeof u == "function" ? u() : u;
        _ && (w.csp = {
          nonce: _
        });
        const M = hd($, I, w);
        M[wu] = S.instanceId, M.setAttribute(sI, o.value), process.env.NODE_ENV !== "production" && M.setAttribute($8, r.value.join("|")), Object.keys(P).forEach((N) => {
          Am.has(N) || (Am.add(N), hd(b1(P[N]), `_effect-${N}`, {
            mark: Cs,
            prepend: "queue",
            attachTo: g
          }));
        });
      }
      return [$, o.value, I, P, c, d];
    },
    // Remove cache if no need
    (a, l) => {
      let [, , s] = a;
      (l || n.value.autoClear) && m1 && Ep(s, {
        mark: Cs
      });
    }
  ), (a) => a;
}
class tn {
  constructor(t, n) {
    this._keyframe = !0, this.name = t, this.style = n;
  }
  getName() {
    let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
    return t ? `${t}-${this.name}` : this.name;
  }
}
const SL = "4.2.6", vd = ["blue", "purple", "cyan", "green", "magenta", "pink", "red", "orange", "yellow", "volcano", "geekblue", "lime", "gold"];
function Go(e, t) {
  CL(e) && (e = "100%");
  var n = $L(e);
  return e = t === 360 ? e : Math.min(t, Math.max(0, parseFloat(e))), n && (e = parseInt(String(e * t), 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : (t === 360 ? e = (e < 0 ? e % t + t : e % t) / parseFloat(String(t)) : e = e % t / parseFloat(String(t)), e);
}
function hf(e) {
  return Math.min(1, Math.max(0, e));
}
function CL(e) {
  return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
}
function $L(e) {
  return typeof e == "string" && e.indexOf("%") !== -1;
}
function TI(e) {
  return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
}
function gf(e) {
  return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
}
function vs(e) {
  return e.length === 1 ? "0" + e : String(e);
}
function PL(e, t, n) {
  return {
    r: Go(e, 255) * 255,
    g: Go(t, 255) * 255,
    b: Go(n, 255) * 255
  };
}
function y1(e, t, n) {
  e = Go(e, 255), t = Go(t, 255), n = Go(n, 255);
  var o = Math.max(e, t, n), r = Math.min(e, t, n), i = 0, a = 0, l = (o + r) / 2;
  if (o === r)
    a = 0, i = 0;
  else {
    var s = o - r;
    switch (a = l > 0.5 ? s / (2 - o - r) : s / (o + r), o) {
      case e:
        i = (t - n) / s + (t < n ? 6 : 0);
        break;
      case t:
        i = (n - e) / s + 2;
        break;
      case n:
        i = (e - t) / s + 4;
        break;
    }
    i /= 6;
  }
  return { h: i, s: a, l };
}
function Kg(e, t, n) {
  return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * (6 * n) : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
}
function OL(e, t, n) {
  var o, r, i;
  if (e = Go(e, 360), t = Go(t, 100), n = Go(n, 100), t === 0)
    r = n, i = n, o = n;
  else {
    var a = n < 0.5 ? n * (1 + t) : n + t - n * t, l = 2 * n - a;
    o = Kg(l, a, e + 1 / 3), r = Kg(l, a, e), i = Kg(l, a, e - 1 / 3);
  }
  return { r: o * 255, g: r * 255, b: i * 255 };
}
function zm(e, t, n) {
  e = Go(e, 255), t = Go(t, 255), n = Go(n, 255);
  var o = Math.max(e, t, n), r = Math.min(e, t, n), i = 0, a = o, l = o - r, s = o === 0 ? 0 : l / o;
  if (o === r)
    i = 0;
  else {
    switch (o) {
      case e:
        i = (t - n) / l + (t < n ? 6 : 0);
        break;
      case t:
        i = (n - e) / l + 2;
        break;
      case n:
        i = (e - t) / l + 4;
        break;
    }
    i /= 6;
  }
  return { h: i, s, v: a };
}
function kL(e, t, n) {
  e = Go(e, 360) * 6, t = Go(t, 100), n = Go(n, 100);
  var o = Math.floor(e), r = e - o, i = n * (1 - t), a = n * (1 - r * t), l = n * (1 - (1 - r) * t), s = o % 6, u = [n, a, i, i, l, n][s], c = [l, n, n, a, i, i][s], d = [i, i, l, n, n, a][s];
  return { r: u * 255, g: c * 255, b: d * 255 };
}
function Fm(e, t, n, o) {
  var r = [
    vs(Math.round(e).toString(16)),
    vs(Math.round(t).toString(16)),
    vs(Math.round(n).toString(16))
  ];
  return o && r[0].startsWith(r[0].charAt(1)) && r[1].startsWith(r[1].charAt(1)) && r[2].startsWith(r[2].charAt(1)) ? r[0].charAt(0) + r[1].charAt(0) + r[2].charAt(0) : r.join("");
}
function IL(e, t, n, o, r) {
  var i = [
    vs(Math.round(e).toString(16)),
    vs(Math.round(t).toString(16)),
    vs(Math.round(n).toString(16)),
    vs(_L(o))
  ];
  return r && i[0].startsWith(i[0].charAt(1)) && i[1].startsWith(i[1].charAt(1)) && i[2].startsWith(i[2].charAt(1)) && i[3].startsWith(i[3].charAt(1)) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) + i[3].charAt(0) : i.join("");
}
function _L(e) {
  return Math.round(parseFloat(e) * 255).toString(16);
}
function x1(e) {
  return Pr(e) / 255;
}
function Pr(e) {
  return parseInt(e, 16);
}
function TL(e) {
  return {
    r: e >> 16,
    g: (e & 65280) >> 8,
    b: e & 255
  };
}
var Bm = {
  aliceblue: "#f0f8ff",
  antiquewhite: "#faebd7",
  aqua: "#00ffff",
  aquamarine: "#7fffd4",
  azure: "#f0ffff",
  beige: "#f5f5dc",
  bisque: "#ffe4c4",
  black: "#000000",
  blanchedalmond: "#ffebcd",
  blue: "#0000ff",
  blueviolet: "#8a2be2",
  brown: "#a52a2a",
  burlywood: "#deb887",
  cadetblue: "#5f9ea0",
  chartreuse: "#7fff00",
  chocolate: "#d2691e",
  coral: "#ff7f50",
  cornflowerblue: "#6495ed",
  cornsilk: "#fff8dc",
  crimson: "#dc143c",
  cyan: "#00ffff",
  darkblue: "#00008b",
  darkcyan: "#008b8b",
  darkgoldenrod: "#b8860b",
  darkgray: "#a9a9a9",
  darkgreen: "#006400",
  darkgrey: "#a9a9a9",
  darkkhaki: "#bdb76b",
  darkmagenta: "#8b008b",
  darkolivegreen: "#556b2f",
  darkorange: "#ff8c00",
  darkorchid: "#9932cc",
  darkred: "#8b0000",
  darksalmon: "#e9967a",
  darkseagreen: "#8fbc8f",
  darkslateblue: "#483d8b",
  darkslategray: "#2f4f4f",
  darkslategrey: "#2f4f4f",
  darkturquoise: "#00ced1",
  darkviolet: "#9400d3",
  deeppink: "#ff1493",
  deepskyblue: "#00bfff",
  dimgray: "#696969",
  dimgrey: "#696969",
  dodgerblue: "#1e90ff",
  firebrick: "#b22222",
  floralwhite: "#fffaf0",
  forestgreen: "#228b22",
  fuchsia: "#ff00ff",
  gainsboro: "#dcdcdc",
  ghostwhite: "#f8f8ff",
  goldenrod: "#daa520",
  gold: "#ffd700",
  gray: "#808080",
  green: "#008000",
  greenyellow: "#adff2f",
  grey: "#808080",
  honeydew: "#f0fff0",
  hotpink: "#ff69b4",
  indianred: "#cd5c5c",
  indigo: "#4b0082",
  ivory: "#fffff0",
  khaki: "#f0e68c",
  lavenderblush: "#fff0f5",
  lavender: "#e6e6fa",
  lawngreen: "#7cfc00",
  lemonchiffon: "#fffacd",
  lightblue: "#add8e6",
  lightcoral: "#f08080",
  lightcyan: "#e0ffff",
  lightgoldenrodyellow: "#fafad2",
  lightgray: "#d3d3d3",
  lightgreen: "#90ee90",
  lightgrey: "#d3d3d3",
  lightpink: "#ffb6c1",
  lightsalmon: "#ffa07a",
  lightseagreen: "#20b2aa",
  lightskyblue: "#87cefa",
  lightslategray: "#778899",
  lightslategrey: "#778899",
  lightsteelblue: "#b0c4de",
  lightyellow: "#ffffe0",
  lime: "#00ff00",
  limegreen: "#32cd32",
  linen: "#faf0e6",
  magenta: "#ff00ff",
  maroon: "#800000",
  mediumaquamarine: "#66cdaa",
  mediumblue: "#0000cd",
  mediumorchid: "#ba55d3",
  mediumpurple: "#9370db",
  mediumseagreen: "#3cb371",
  mediumslateblue: "#7b68ee",
  mediumspringgreen: "#00fa9a",
  mediumturquoise: "#48d1cc",
  mediumvioletred: "#c71585",
  midnightblue: "#191970",
  mintcream: "#f5fffa",
  mistyrose: "#ffe4e1",
  moccasin: "#ffe4b5",
  navajowhite: "#ffdead",
  navy: "#000080",
  oldlace: "#fdf5e6",
  olive: "#808000",
  olivedrab: "#6b8e23",
  orange: "#ffa500",
  orangered: "#ff4500",
  orchid: "#da70d6",
  palegoldenrod: "#eee8aa",
  palegreen: "#98fb98",
  paleturquoise: "#afeeee",
  palevioletred: "#db7093",
  papayawhip: "#ffefd5",
  peachpuff: "#ffdab9",
  peru: "#cd853f",
  pink: "#ffc0cb",
  plum: "#dda0dd",
  powderblue: "#b0e0e6",
  purple: "#800080",
  rebeccapurple: "#663399",
  red: "#ff0000",
  rosybrown: "#bc8f8f",
  royalblue: "#4169e1",
  saddlebrown: "#8b4513",
  salmon: "#fa8072",
  sandybrown: "#f4a460",
  seagreen: "#2e8b57",
  seashell: "#fff5ee",
  sienna: "#a0522d",
  silver: "#c0c0c0",
  skyblue: "#87ceeb",
  slateblue: "#6a5acd",
  slategray: "#708090",
  slategrey: "#708090",
  snow: "#fffafa",
  springgreen: "#00ff7f",
  steelblue: "#4682b4",
  tan: "#d2b48c",
  teal: "#008080",
  thistle: "#d8bfd8",
  tomato: "#ff6347",
  turquoise: "#40e0d0",
  violet: "#ee82ee",
  wheat: "#f5deb3",
  white: "#ffffff",
  whitesmoke: "#f5f5f5",
  yellow: "#ffff00",
  yellowgreen: "#9acd32"
};
function hu(e) {
  var t = { r: 0, g: 0, b: 0 }, n = 1, o = null, r = null, i = null, a = !1, l = !1;
  return typeof e == "string" && (e = DL(e)), typeof e == "object" && (ba(e.r) && ba(e.g) && ba(e.b) ? (t = PL(e.r, e.g, e.b), a = !0, l = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : ba(e.h) && ba(e.s) && ba(e.v) ? (o = gf(e.s), r = gf(e.v), t = kL(e.h, o, r), a = !0, l = "hsv") : ba(e.h) && ba(e.s) && ba(e.l) && (o = gf(e.s), i = gf(e.l), t = OL(e.h, o, i), a = !0, l = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = TI(n), {
    ok: a,
    format: e.format || l,
    r: Math.min(255, Math.max(t.r, 0)),
    g: Math.min(255, Math.max(t.g, 0)),
    b: Math.min(255, Math.max(t.b, 0)),
    a: n
  };
}
var ML = "[-\\+]?\\d+%?", EL = "[-\\+]?\\d*\\.\\d+%?", $l = "(?:".concat(EL, ")|(?:").concat(ML, ")"), qg = "[\\s|\\(]+(".concat($l, ")[,|\\s]+(").concat($l, ")[,|\\s]+(").concat($l, ")\\s*\\)?"), Yg = "[\\s|\\(]+(".concat($l, ")[,|\\s]+(").concat($l, ")[,|\\s]+(").concat($l, ")[,|\\s]+(").concat($l, ")\\s*\\)?"), hi = {
  CSS_UNIT: new RegExp($l),
  rgb: new RegExp("rgb" + qg),
  rgba: new RegExp("rgba" + Yg),
  hsl: new RegExp("hsl" + qg),
  hsla: new RegExp("hsla" + Yg),
  hsv: new RegExp("hsv" + qg),
  hsva: new RegExp("hsva" + Yg),
  hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
};
function DL(e) {
  if (e = e.trim().toLowerCase(), e.length === 0)
    return !1;
  var t = !1;
  if (Bm[e])
    e = Bm[e], t = !0;
  else if (e === "transparent")
    return { r: 0, g: 0, b: 0, a: 0, format: "name" };
  var n = hi.rgb.exec(e);
  return n ? { r: n[1], g: n[2], b: n[3] } : (n = hi.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = hi.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = hi.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = hi.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = hi.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = hi.hex8.exec(e), n ? {
    r: Pr(n[1]),
    g: Pr(n[2]),
    b: Pr(n[3]),
    a: x1(n[4]),
    format: t ? "name" : "hex8"
  } : (n = hi.hex6.exec(e), n ? {
    r: Pr(n[1]),
    g: Pr(n[2]),
    b: Pr(n[3]),
    format: t ? "name" : "hex"
  } : (n = hi.hex4.exec(e), n ? {
    r: Pr(n[1] + n[1]),
    g: Pr(n[2] + n[2]),
    b: Pr(n[3] + n[3]),
    a: x1(n[4] + n[4]),
    format: t ? "name" : "hex8"
  } : (n = hi.hex3.exec(e), n ? {
    r: Pr(n[1] + n[1]),
    g: Pr(n[2] + n[2]),
    b: Pr(n[3] + n[3]),
    format: t ? "name" : "hex"
  } : !1)))))))));
}
function ba(e) {
  return !!hi.CSS_UNIT.exec(String(e));
}
var _n = (
  /** @class */
  (function() {
    function e(t, n) {
      t === void 0 && (t = ""), n === void 0 && (n = {});
      var o;
      if (t instanceof e)
        return t;
      typeof t == "number" && (t = TL(t)), this.originalInput = t;
      var r = hu(t);
      this.originalInput = t, this.r = r.r, this.g = r.g, this.b = r.b, this.a = r.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (o = n.format) !== null && o !== void 0 ? o : r.format, this.gradientType = n.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = r.ok;
    }
    return e.prototype.isDark = function() {
      return this.getBrightness() < 128;
    }, e.prototype.isLight = function() {
      return !this.isDark();
    }, e.prototype.getBrightness = function() {
      var t = this.toRgb();
      return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
    }, e.prototype.getLuminance = function() {
      var t = this.toRgb(), n, o, r, i = t.r / 255, a = t.g / 255, l = t.b / 255;
      return i <= 0.03928 ? n = i / 12.92 : n = Math.pow((i + 0.055) / 1.055, 2.4), a <= 0.03928 ? o = a / 12.92 : o = Math.pow((a + 0.055) / 1.055, 2.4), l <= 0.03928 ? r = l / 12.92 : r = Math.pow((l + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * o + 0.0722 * r;
    }, e.prototype.getAlpha = function() {
      return this.a;
    }, e.prototype.setAlpha = function(t) {
      return this.a = TI(t), this.roundA = Math.round(100 * this.a) / 100, this;
    }, e.prototype.isMonochrome = function() {
      var t = this.toHsl().s;
      return t === 0;
    }, e.prototype.toHsv = function() {
      var t = zm(this.r, this.g, this.b);
      return { h: t.h * 360, s: t.s, v: t.v, a: this.a };
    }, e.prototype.toHsvString = function() {
      var t = zm(this.r, this.g, this.b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), r = Math.round(t.v * 100);
      return this.a === 1 ? "hsv(".concat(n, ", ").concat(o, "%, ").concat(r, "%)") : "hsva(".concat(n, ", ").concat(o, "%, ").concat(r, "%, ").concat(this.roundA, ")");
    }, e.prototype.toHsl = function() {
      var t = y1(this.r, this.g, this.b);
      return { h: t.h * 360, s: t.s, l: t.l, a: this.a };
    }, e.prototype.toHslString = function() {
      var t = y1(this.r, this.g, this.b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), r = Math.round(t.l * 100);
      return this.a === 1 ? "hsl(".concat(n, ", ").concat(o, "%, ").concat(r, "%)") : "hsla(".concat(n, ", ").concat(o, "%, ").concat(r, "%, ").concat(this.roundA, ")");
    }, e.prototype.toHex = function(t) {
      return t === void 0 && (t = !1), Fm(this.r, this.g, this.b, t);
    }, e.prototype.toHexString = function(t) {
      return t === void 0 && (t = !1), "#" + this.toHex(t);
    }, e.prototype.toHex8 = function(t) {
      return t === void 0 && (t = !1), IL(this.r, this.g, this.b, this.a, t);
    }, e.prototype.toHex8String = function(t) {
      return t === void 0 && (t = !1), "#" + this.toHex8(t);
    }, e.prototype.toHexShortString = function(t) {
      return t === void 0 && (t = !1), this.a === 1 ? this.toHexString(t) : this.toHex8String(t);
    }, e.prototype.toRgb = function() {
      return {
        r: Math.round(this.r),
        g: Math.round(this.g),
        b: Math.round(this.b),
        a: this.a
      };
    }, e.prototype.toRgbString = function() {
      var t = Math.round(this.r), n = Math.round(this.g), o = Math.round(this.b);
      return this.a === 1 ? "rgb(".concat(t, ", ").concat(n, ", ").concat(o, ")") : "rgba(".concat(t, ", ").concat(n, ", ").concat(o, ", ").concat(this.roundA, ")");
    }, e.prototype.toPercentageRgb = function() {
      var t = function(n) {
        return "".concat(Math.round(Go(n, 255) * 100), "%");
      };
      return {
        r: t(this.r),
        g: t(this.g),
        b: t(this.b),
        a: this.a
      };
    }, e.prototype.toPercentageRgbString = function() {
      var t = function(n) {
        return Math.round(Go(n, 255) * 100);
      };
      return this.a === 1 ? "rgb(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%)") : "rgba(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%, ").concat(this.roundA, ")");
    }, e.prototype.toName = function() {
      if (this.a === 0)
        return "transparent";
      if (this.a < 1)
        return !1;
      for (var t = "#" + Fm(this.r, this.g, this.b, !1), n = 0, o = Object.entries(Bm); n < o.length; n++) {
        var r = o[n], i = r[0], a = r[1];
        if (t === a)
          return i;
      }
      return !1;
    }, e.prototype.toString = function(t) {
      var n = !!t;
      t = t ?? this.format;
      var o = !1, r = this.a < 1 && this.a >= 0, i = !n && r && (t.startsWith("hex") || t === "name");
      return i ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (o = this.toRgbString()), t === "prgb" && (o = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (o = this.toHexString()), t === "hex3" && (o = this.toHexString(!0)), t === "hex4" && (o = this.toHex8String(!0)), t === "hex8" && (o = this.toHex8String()), t === "name" && (o = this.toName()), t === "hsl" && (o = this.toHslString()), t === "hsv" && (o = this.toHsvString()), o || this.toHexString());
    }, e.prototype.toNumber = function() {
      return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
    }, e.prototype.clone = function() {
      return new e(this.toString());
    }, e.prototype.lighten = function(t) {
      t === void 0 && (t = 10);
      var n = this.toHsl();
      return n.l += t / 100, n.l = hf(n.l), new e(n);
    }, e.prototype.brighten = function(t) {
      t === void 0 && (t = 10);
      var n = this.toRgb();
      return n.r = Math.max(0, Math.min(255, n.r - Math.round(255 * -(t / 100)))), n.g = Math.max(0, Math.min(255, n.g - Math.round(255 * -(t / 100)))), n.b = Math.max(0, Math.min(255, n.b - Math.round(255 * -(t / 100)))), new e(n);
    }, e.prototype.darken = function(t) {
      t === void 0 && (t = 10);
      var n = this.toHsl();
      return n.l -= t / 100, n.l = hf(n.l), new e(n);
    }, e.prototype.tint = function(t) {
      return t === void 0 && (t = 10), this.mix("white", t);
    }, e.prototype.shade = function(t) {
      return t === void 0 && (t = 10), this.mix("black", t);
    }, e.prototype.desaturate = function(t) {
      t === void 0 && (t = 10);
      var n = this.toHsl();
      return n.s -= t / 100, n.s = hf(n.s), new e(n);
    }, e.prototype.saturate = function(t) {
      t === void 0 && (t = 10);
      var n = this.toHsl();
      return n.s += t / 100, n.s = hf(n.s), new e(n);
    }, e.prototype.greyscale = function() {
      return this.desaturate(100);
    }, e.prototype.spin = function(t) {
      var n = this.toHsl(), o = (n.h + t) % 360;
      return n.h = o < 0 ? 360 + o : o, new e(n);
    }, e.prototype.mix = function(t, n) {
      n === void 0 && (n = 50);
      var o = this.toRgb(), r = new e(t).toRgb(), i = n / 100, a = {
        r: (r.r - o.r) * i + o.r,
        g: (r.g - o.g) * i + o.g,
        b: (r.b - o.b) * i + o.b,
        a: (r.a - o.a) * i + o.a
      };
      return new e(a);
    }, e.prototype.analogous = function(t, n) {
      t === void 0 && (t = 6), n === void 0 && (n = 30);
      var o = this.toHsl(), r = 360 / n, i = [this];
      for (o.h = (o.h - (r * t >> 1) + 720) % 360; --t; )
        o.h = (o.h + r) % 360, i.push(new e(o));
      return i;
    }, e.prototype.complement = function() {
      var t = this.toHsl();
      return t.h = (t.h + 180) % 360, new e(t);
    }, e.prototype.monochromatic = function(t) {
      t === void 0 && (t = 6);
      for (var n = this.toHsv(), o = n.h, r = n.s, i = n.v, a = [], l = 1 / t; t--; )
        a.push(new e({ h: o, s: r, v: i })), i = (i + l) % 1;
      return a;
    }, e.prototype.splitcomplement = function() {
      var t = this.toHsl(), n = t.h;
      return [
        this,
        new e({ h: (n + 72) % 360, s: t.s, l: t.l }),
        new e({ h: (n + 216) % 360, s: t.s, l: t.l })
      ];
    }, e.prototype.onBackground = function(t) {
      var n = this.toRgb(), o = new e(t).toRgb(), r = n.a + o.a * (1 - n.a);
      return new e({
        r: (n.r * n.a + o.r * o.a * (1 - n.a)) / r,
        g: (n.g * n.a + o.g * o.a * (1 - n.a)) / r,
        b: (n.b * n.a + o.b * o.a * (1 - n.a)) / r,
        a: r
      });
    }, e.prototype.triad = function() {
      return this.polyad(3);
    }, e.prototype.tetrad = function() {
      return this.polyad(4);
    }, e.prototype.polyad = function(t) {
      for (var n = this.toHsl(), o = n.h, r = [this], i = 360 / t, a = 1; a < t; a++)
        r.push(new e({ h: (o + a * i) % 360, s: n.s, l: n.l }));
      return r;
    }, e.prototype.equals = function(t) {
      return this.toRgbString() === new e(t).toRgbString();
    }, e;
  })()
), vf = 2, w1 = 0.16, AL = 0.05, NL = 0.05, RL = 0.15, MI = 5, EI = 4, zL = [{
  index: 7,
  opacity: 0.15
}, {
  index: 6,
  opacity: 0.25
}, {
  index: 5,
  opacity: 0.3
}, {
  index: 5,
  opacity: 0.45
}, {
  index: 5,
  opacity: 0.65
}, {
  index: 5,
  opacity: 0.85
}, {
  index: 4,
  opacity: 0.9
}, {
  index: 3,
  opacity: 0.95
}, {
  index: 2,
  opacity: 0.97
}, {
  index: 1,
  opacity: 0.98
}];
function S1(e) {
  var t = e.r, n = e.g, o = e.b, r = zm(t, n, o);
  return {
    h: r.h * 360,
    s: r.s,
    v: r.v
  };
}
function mf(e) {
  var t = e.r, n = e.g, o = e.b;
  return "#".concat(Fm(t, n, o, !1));
}
function FL(e, t, n) {
  var o = n / 100, r = {
    r: (t.r - e.r) * o + e.r,
    g: (t.g - e.g) * o + e.g,
    b: (t.b - e.b) * o + e.b
  };
  return r;
}
function C1(e, t, n) {
  var o;
  return Math.round(e.h) >= 60 && Math.round(e.h) <= 240 ? o = n ? Math.round(e.h) - vf * t : Math.round(e.h) + vf * t : o = n ? Math.round(e.h) + vf * t : Math.round(e.h) - vf * t, o < 0 ? o += 360 : o >= 360 && (o -= 360), o;
}
function $1(e, t, n) {
  if (e.h === 0 && e.s === 0)
    return e.s;
  var o;
  return n ? o = e.s - w1 * t : t === EI ? o = e.s + w1 : o = e.s + AL * t, o > 1 && (o = 1), n && t === MI && o > 0.1 && (o = 0.1), o < 0.06 && (o = 0.06), Number(o.toFixed(2));
}
function P1(e, t, n) {
  var o;
  return n ? o = e.v + NL * t : o = e.v - RL * t, o > 1 && (o = 1), Number(o.toFixed(2));
}
function La(e) {
  for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = [], o = hu(e), r = MI; r > 0; r -= 1) {
    var i = S1(o), a = mf(hu({
      h: C1(i, r, !0),
      s: $1(i, r, !0),
      v: P1(i, r, !0)
    }));
    n.push(a);
  }
  n.push(mf(o));
  for (var l = 1; l <= EI; l += 1) {
    var s = S1(o), u = mf(hu({
      h: C1(s, l),
      s: $1(s, l),
      v: P1(s, l)
    }));
    n.push(u);
  }
  return t.theme === "dark" ? zL.map(function(c) {
    var d = c.index, f = c.opacity, p = mf(FL(hu(t.backgroundColor || "#141414"), hu(n[d]), f * 100));
    return p;
  }) : n;
}
var Gg = {
  red: "#F5222D",
  volcano: "#FA541C",
  orange: "#FA8C16",
  gold: "#FAAD14",
  yellow: "#FADB14",
  lime: "#A0D911",
  green: "#52C41A",
  cyan: "#13C2C2",
  blue: "#1890FF",
  geekblue: "#2F54EB",
  purple: "#722ED1",
  magenta: "#EB2F96",
  grey: "#666666"
}, ep = {}, Ug = {};
Object.keys(Gg).forEach(function(e) {
  ep[e] = La(Gg[e]), ep[e].primary = ep[e][5], Ug[e] = La(Gg[e], {
    theme: "dark",
    backgroundColor: "#141414"
  }), Ug[e].primary = Ug[e][5];
});
var BL = ep.blue;
const LL = (e) => {
  const {
    controlHeight: t
  } = e;
  return {
    controlHeightSM: t * 0.75,
    controlHeightXS: t * 0.5,
    controlHeightLG: t * 1.25
  };
};
function HL(e) {
  const {
    sizeUnit: t,
    sizeStep: n
  } = e;
  return {
    sizeXXL: t * (n + 8),
    sizeXL: t * (n + 4),
    sizeLG: t * (n + 2),
    sizeMD: t * (n + 1),
    sizeMS: t * n,
    size: t * n,
    sizeSM: t * (n - 1),
    sizeXS: t * (n - 2),
    sizeXXS: t * (n - 3)
    // 4
  };
}
const Zy = {
  blue: "#1677ff",
  purple: "#722ED1",
  cyan: "#13C2C2",
  green: "#52C41A",
  magenta: "#EB2F96",
  pink: "#eb2f96",
  red: "#F5222D",
  orange: "#FA8C16",
  yellow: "#FADB14",
  volcano: "#FA541C",
  geekblue: "#2F54EB",
  gold: "#FAAD14",
  lime: "#A0D911"
}, Mh = O(O({}, Zy), {
  // Color
  colorPrimary: "#1677ff",
  colorSuccess: "#52c41a",
  colorWarning: "#faad14",
  colorError: "#ff4d4f",
  colorInfo: "#1677ff",
  colorTextBase: "",
  colorBgBase: "",
  // Font
  fontFamily: `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji'`,
  fontSize: 14,
  // Line
  lineWidth: 1,
  lineType: "solid",
  // Motion
  motionUnit: 0.1,
  motionBase: 0,
  motionEaseOutCirc: "cubic-bezier(0.08, 0.82, 0.17, 1)",
  motionEaseInOutCirc: "cubic-bezier(0.78, 0.14, 0.15, 0.86)",
  motionEaseOut: "cubic-bezier(0.215, 0.61, 0.355, 1)",
  motionEaseInOut: "cubic-bezier(0.645, 0.045, 0.355, 1)",
  motionEaseOutBack: "cubic-bezier(0.12, 0.4, 0.29, 1.46)",
  motionEaseInBack: "cubic-bezier(0.71, -0.46, 0.88, 0.6)",
  motionEaseInQuint: "cubic-bezier(0.755, 0.05, 0.855, 0.06)",
  motionEaseOutQuint: "cubic-bezier(0.23, 1, 0.32, 1)",
  // Radius
  borderRadius: 6,
  // Size
  sizeUnit: 4,
  sizeStep: 4,
  sizePopupArrow: 16,
  // Control Base
  controlHeight: 32,
  // zIndex
  zIndexBase: 0,
  zIndexPopupBase: 1e3,
  // Image
  opacityImage: 1,
  // Wireframe
  wireframe: !1
});
function DI(e, t) {
  let {
    generateColorPalettes: n,
    generateNeutralColorPalettes: o
  } = t;
  const {
    colorSuccess: r,
    colorWarning: i,
    colorError: a,
    colorInfo: l,
    colorPrimary: s,
    colorBgBase: u,
    colorTextBase: c
  } = e, d = n(s), f = n(r), p = n(i), v = n(a), g = n(l), m = o(u, c);
  return O(O({}, m), {
    colorPrimaryBg: d[1],
    colorPrimaryBgHover: d[2],
    colorPrimaryBorder: d[3],
    colorPrimaryBorderHover: d[4],
    colorPrimaryHover: d[5],
    colorPrimary: d[6],
    colorPrimaryActive: d[7],
    colorPrimaryTextHover: d[8],
    colorPrimaryText: d[9],
    colorPrimaryTextActive: d[10],
    colorSuccessBg: f[1],
    colorSuccessBgHover: f[2],
    colorSuccessBorder: f[3],
    colorSuccessBorderHover: f[4],
    colorSuccessHover: f[4],
    colorSuccess: f[6],
    colorSuccessActive: f[7],
    colorSuccessTextHover: f[8],
    colorSuccessText: f[9],
    colorSuccessTextActive: f[10],
    colorErrorBg: v[1],
    colorErrorBgHover: v[2],
    colorErrorBorder: v[3],
    colorErrorBorderHover: v[4],
    colorErrorHover: v[5],
    colorError: v[6],
    colorErrorActive: v[7],
    colorErrorTextHover: v[8],
    colorErrorText: v[9],
    colorErrorTextActive: v[10],
    colorWarningBg: p[1],
    colorWarningBgHover: p[2],
    colorWarningBorder: p[3],
    colorWarningBorderHover: p[4],
    colorWarningHover: p[4],
    colorWarning: p[6],
    colorWarningActive: p[7],
    colorWarningTextHover: p[8],
    colorWarningText: p[9],
    colorWarningTextActive: p[10],
    colorInfoBg: g[1],
    colorInfoBgHover: g[2],
    colorInfoBorder: g[3],
    colorInfoBorderHover: g[4],
    colorInfoHover: g[4],
    colorInfo: g[6],
    colorInfoActive: g[7],
    colorInfoTextHover: g[8],
    colorInfoText: g[9],
    colorInfoTextActive: g[10],
    colorBgMask: new _n("#000").setAlpha(0.45).toRgbString(),
    colorWhite: "#fff"
  });
}
const VL = (e) => {
  let t = e, n = e, o = e, r = e;
  return e < 6 && e >= 5 ? t = e + 1 : e < 16 && e >= 6 ? t = e + 2 : e >= 16 && (t = 16), e < 7 && e >= 5 ? n = 4 : e < 8 && e >= 7 ? n = 5 : e < 14 && e >= 8 ? n = 6 : e < 16 && e >= 14 ? n = 7 : e >= 16 && (n = 8), e < 6 && e >= 2 ? o = 1 : e >= 6 && (o = 2), e > 4 && e < 8 ? r = 4 : e >= 8 && (r = 6), {
    borderRadius: e > 16 ? 16 : e,
    borderRadiusXS: o,
    borderRadiusSM: n,
    borderRadiusLG: t,
    borderRadiusOuter: r
  };
};
function jL(e) {
  const {
    motionUnit: t,
    motionBase: n,
    borderRadius: o,
    lineWidth: r
  } = e;
  return O({
    // motion
    motionDurationFast: `${(n + t).toFixed(1)}s`,
    motionDurationMid: `${(n + t * 2).toFixed(1)}s`,
    motionDurationSlow: `${(n + t * 3).toFixed(1)}s`,
    // line
    lineWidthBold: r + 1
  }, VL(o));
}
const ya = (e, t) => new _n(e).setAlpha(t).toRgbString(), Tc = (e, t) => new _n(e).darken(t).toHexString(), WL = (e) => {
  const t = La(e);
  return {
    1: t[0],
    2: t[1],
    3: t[2],
    4: t[3],
    5: t[4],
    6: t[5],
    7: t[6],
    8: t[4],
    9: t[5],
    10: t[6]
    // 8: colors[7],
    // 9: colors[8],
    // 10: colors[9],
  };
}, KL = (e, t) => {
  const n = e || "#fff", o = t || "#000";
  return {
    colorBgBase: n,
    colorTextBase: o,
    colorText: ya(o, 0.88),
    colorTextSecondary: ya(o, 0.65),
    colorTextTertiary: ya(o, 0.45),
    colorTextQuaternary: ya(o, 0.25),
    colorFill: ya(o, 0.15),
    colorFillSecondary: ya(o, 0.06),
    colorFillTertiary: ya(o, 0.04),
    colorFillQuaternary: ya(o, 0.02),
    colorBgLayout: Tc(n, 4),
    colorBgContainer: Tc(n, 0),
    colorBgElevated: Tc(n, 0),
    colorBgSpotlight: ya(o, 0.85),
    colorBorder: Tc(n, 15),
    colorBorderSecondary: Tc(n, 6)
  };
};
function qL(e) {
  const t = new Array(10).fill(null).map((n, o) => {
    const r = o - 1, i = e * Math.pow(2.71828, r / 5), a = o > 1 ? Math.floor(i) : Math.ceil(i);
    return Math.floor(a / 2) * 2;
  });
  return t[1] = e, t.map((n) => {
    const o = n + 8;
    return {
      size: n,
      lineHeight: o / n
    };
  });
}
const YL = (e) => {
  const t = qL(e), n = t.map((r) => r.size), o = t.map((r) => r.lineHeight);
  return {
    fontSizeSM: n[0],
    fontSize: n[1],
    fontSizeLG: n[2],
    fontSizeXL: n[3],
    fontSizeHeading1: n[6],
    fontSizeHeading2: n[5],
    fontSizeHeading3: n[4],
    fontSizeHeading4: n[3],
    fontSizeHeading5: n[2],
    lineHeight: o[1],
    lineHeightLG: o[2],
    lineHeightSM: o[0],
    lineHeightHeading1: o[6],
    lineHeightHeading2: o[5],
    lineHeightHeading3: o[4],
    lineHeightHeading4: o[3],
    lineHeightHeading5: o[2]
  };
};
function Jy(e) {
  const t = Object.keys(Zy).map((n) => {
    const o = La(e[n]);
    return new Array(10).fill(1).reduce((r, i, a) => (r[`${n}-${a + 1}`] = o[a], r), {});
  }).reduce((n, o) => (n = O(O({}, n), o), n), {});
  return O(O(O(O(O(O(O({}, e), t), DI(e, {
    generateColorPalettes: WL,
    generateNeutralColorPalettes: KL
  })), YL(e.fontSize)), HL(e)), LL(e)), jL(e));
}
function Xg(e) {
  return e >= 0 && e <= 255;
}
function bf(e, t) {
  const {
    r: n,
    g: o,
    b: r,
    a: i
  } = new _n(e).toRgb();
  if (i < 1)
    return e;
  const {
    r: a,
    g: l,
    b: s
  } = new _n(t).toRgb();
  for (let u = 0.01; u <= 1; u += 0.01) {
    const c = Math.round((n - a * (1 - u)) / u), d = Math.round((o - l * (1 - u)) / u), f = Math.round((r - s * (1 - u)) / u);
    if (Xg(c) && Xg(d) && Xg(f))
      return new _n({
        r: c,
        g: d,
        b: f,
        a: Math.round(u * 100) / 100
      }).toRgbString();
  }
  return new _n({
    r: n,
    g: o,
    b: r,
    a: 1
  }).toRgbString();
}
var GL = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function UL(e) {
  const {
    override: t
  } = e, n = GL(e, ["override"]), o = O({}, t);
  Object.keys(Mh).forEach((p) => {
    delete o[p];
  });
  const r = O(O({}, n), o), i = 480, a = 576, l = 768, s = 992, u = 1200, c = 1600, d = 2e3;
  return O(O(O({}, r), {
    colorLink: r.colorInfoText,
    colorLinkHover: r.colorInfoHover,
    colorLinkActive: r.colorInfoActive,
    // ============== Background ============== //
    colorFillContent: r.colorFillSecondary,
    colorFillContentHover: r.colorFill,
    colorFillAlter: r.colorFillQuaternary,
    colorBgContainerDisabled: r.colorFillTertiary,
    // ============== Split ============== //
    colorBorderBg: r.colorBgContainer,
    colorSplit: bf(r.colorBorderSecondary, r.colorBgContainer),
    // ============== Text ============== //
    colorTextPlaceholder: r.colorTextQuaternary,
    colorTextDisabled: r.colorTextQuaternary,
    colorTextHeading: r.colorText,
    colorTextLabel: r.colorTextSecondary,
    colorTextDescription: r.colorTextTertiary,
    colorTextLightSolid: r.colorWhite,
    colorHighlight: r.colorError,
    colorBgTextHover: r.colorFillSecondary,
    colorBgTextActive: r.colorFill,
    colorIcon: r.colorTextTertiary,
    colorIconHover: r.colorText,
    colorErrorOutline: bf(r.colorErrorBg, r.colorBgContainer),
    colorWarningOutline: bf(r.colorWarningBg, r.colorBgContainer),
    // Font
    fontSizeIcon: r.fontSizeSM,
    // Control
    lineWidth: r.lineWidth,
    controlOutlineWidth: r.lineWidth * 2,
    // Checkbox size and expand icon size
    controlInteractiveSize: r.controlHeight / 2,
    controlItemBgHover: r.colorFillTertiary,
    controlItemBgActive: r.colorPrimaryBg,
    controlItemBgActiveHover: r.colorPrimaryBgHover,
    controlItemBgActiveDisabled: r.colorFill,
    controlTmpOutline: r.colorFillQuaternary,
    controlOutline: bf(r.colorPrimaryBg, r.colorBgContainer),
    lineType: r.lineType,
    borderRadius: r.borderRadius,
    borderRadiusXS: r.borderRadiusXS,
    borderRadiusSM: r.borderRadiusSM,
    borderRadiusLG: r.borderRadiusLG,
    fontWeightStrong: 600,
    opacityLoading: 0.65,
    linkDecoration: "none",
    linkHoverDecoration: "none",
    linkFocusDecoration: "none",
    controlPaddingHorizontal: 12,
    controlPaddingHorizontalSM: 8,
    paddingXXS: r.sizeXXS,
    paddingXS: r.sizeXS,
    paddingSM: r.sizeSM,
    padding: r.size,
    paddingMD: r.sizeMD,
    paddingLG: r.sizeLG,
    paddingXL: r.sizeXL,
    paddingContentHorizontalLG: r.sizeLG,
    paddingContentVerticalLG: r.sizeMS,
    paddingContentHorizontal: r.sizeMS,
    paddingContentVertical: r.sizeSM,
    paddingContentHorizontalSM: r.size,
    paddingContentVerticalSM: r.sizeXS,
    marginXXS: r.sizeXXS,
    marginXS: r.sizeXS,
    marginSM: r.sizeSM,
    margin: r.size,
    marginMD: r.sizeMD,
    marginLG: r.sizeLG,
    marginXL: r.sizeXL,
    marginXXL: r.sizeXXL,
    boxShadow: `
      0 1px 2px 0 rgba(0, 0, 0, 0.03),
      0 1px 6px -1px rgba(0, 0, 0, 0.02),
      0 2px 4px 0 rgba(0, 0, 0, 0.02)
    `,
    boxShadowSecondary: `
      0 6px 16px 0 rgba(0, 0, 0, 0.08),
      0 3px 6px -4px rgba(0, 0, 0, 0.12),
      0 9px 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowTertiary: `
      0 1px 2px 0 rgba(0, 0, 0, 0.03),
      0 1px 6px -1px rgba(0, 0, 0, 0.02),
      0 2px 4px 0 rgba(0, 0, 0, 0.02)
    `,
    screenXS: i,
    screenXSMin: i,
    screenXSMax: a - 1,
    screenSM: a,
    screenSMMin: a,
    screenSMMax: l - 1,
    screenMD: l,
    screenMDMin: l,
    screenMDMax: s - 1,
    screenLG: s,
    screenLGMin: s,
    screenLGMax: u - 1,
    screenXL: u,
    screenXLMin: u,
    screenXLMax: c - 1,
    screenXXL: c,
    screenXXLMin: c,
    screenXXLMax: d - 1,
    screenXXXL: d,
    screenXXXLMin: d,
    // FIXME: component box-shadow, should be removed
    boxShadowPopoverArrow: "3px 3px 7px rgba(0, 0, 0, 0.1)",
    boxShadowCard: `
      0 1px 2px -2px ${new _n("rgba(0, 0, 0, 0.16)").toRgbString()},
      0 3px 6px 0 ${new _n("rgba(0, 0, 0, 0.12)").toRgbString()},
      0 5px 12px 4px ${new _n("rgba(0, 0, 0, 0.09)").toRgbString()}
    `,
    boxShadowDrawerRight: `
      -6px 0 16px 0 rgba(0, 0, 0, 0.08),
      -3px 0 6px -4px rgba(0, 0, 0, 0.12),
      -9px 0 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowDrawerLeft: `
      6px 0 16px 0 rgba(0, 0, 0, 0.08),
      3px 0 6px -4px rgba(0, 0, 0, 0.12),
      9px 0 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowDrawerUp: `
      0 6px 16px 0 rgba(0, 0, 0, 0.08),
      0 3px 6px -4px rgba(0, 0, 0, 0.12),
      0 9px 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowDrawerDown: `
      0 -6px 16px 0 rgba(0, 0, 0, 0.08),
      0 -3px 6px -4px rgba(0, 0, 0, 0.12),
      0 -9px 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowTabsOverflowLeft: "inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",
    boxShadowTabsOverflowRight: "inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",
    boxShadowTabsOverflowTop: "inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",
    boxShadowTabsOverflowBottom: "inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"
  }), o);
}
const XL = (e) => ({
  // FIXME: This use link but is a operation unit. Seems should be a colorPrimary.
  // And Typography use this to generate link style which should not do this.
  color: e.colorLink,
  textDecoration: "none",
  outline: "none",
  cursor: "pointer",
  transition: `color ${e.motionDurationSlow}`,
  "&:focus, &:hover": {
    color: e.colorLinkHover
  },
  "&:active": {
    color: e.colorLinkActive
  }
}), e0 = (e, t, n, o, r) => {
  const i = e / 2, a = 0, l = i, s = n * 1 / Math.sqrt(2), u = i - n * (1 - 1 / Math.sqrt(2)), c = i - t * (1 / Math.sqrt(2)), d = n * (Math.sqrt(2) - 1) + t * (1 / Math.sqrt(2)), f = 2 * i - c, p = d, v = 2 * i - s, g = u, m = 2 * i - a, x = l, S = i * Math.sqrt(2) + n * (Math.sqrt(2) - 2), C = n * (Math.sqrt(2) - 1);
  return {
    pointerEvents: "none",
    width: e,
    height: e,
    overflow: "hidden",
    "&::after": {
      content: '""',
      position: "absolute",
      width: S,
      height: S,
      bottom: 0,
      insetInline: 0,
      margin: "auto",
      borderRadius: {
        _skip_check_: !0,
        value: `0 0 ${t}px 0`
      },
      transform: "translateY(50%) rotate(-135deg)",
      boxShadow: r,
      zIndex: 0,
      background: "transparent"
    },
    "&::before": {
      position: "absolute",
      bottom: 0,
      insetInlineStart: 0,
      width: e,
      height: e / 2,
      background: o,
      clipPath: {
        _multi_value_: !0,
        value: [`polygon(${C}px 100%, 50% ${C}px, ${2 * i - C}px 100%, ${C}px 100%)`, `path('M ${a} ${l} A ${n} ${n} 0 0 0 ${s} ${u} L ${c} ${d} A ${t} ${t} 0 0 1 ${f} ${p} L ${v} ${g} A ${n} ${n} 0 0 0 ${m} ${x} Z')`]
      },
      content: '""'
    }
  };
};
function AI(e, t) {
  return vd.reduce((n, o) => {
    const r = e[`${o}-1`], i = e[`${o}-3`], a = e[`${o}-6`], l = e[`${o}-7`];
    return O(O({}, n), t(o, {
      lightColor: r,
      lightBorderColor: i,
      darkColor: a,
      textColor: l
    }));
  }, {});
}
const Ha = {
  overflow: "hidden",
  whiteSpace: "nowrap",
  textOverflow: "ellipsis"
}, fn = (e) => ({
  boxSizing: "border-box",
  margin: 0,
  padding: 0,
  color: e.colorText,
  fontSize: e.fontSize,
  // font-variant: @font-variant-base;
  lineHeight: e.lineHeight,
  listStyle: "none",
  // font-feature-settings: @font-feature-settings-base;
  fontFamily: e.fontFamily
}), cc = () => ({
  display: "inline-flex",
  alignItems: "center",
  color: "inherit",
  fontStyle: "normal",
  lineHeight: 0,
  textAlign: "center",
  textTransform: "none",
  // for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
  verticalAlign: "-0.125em",
  textRendering: "optimizeLegibility",
  "-webkit-font-smoothing": "antialiased",
  "-moz-osx-font-smoothing": "grayscale",
  "> *": {
    lineHeight: 1
  },
  svg: {
    display: "inline-block"
  }
}), Va = () => ({
  // https://github.com/ant-design/ant-design/issues/21301#issuecomment-583955229
  "&::before": {
    display: "table",
    content: '""'
  },
  "&::after": {
    // https://github.com/ant-design/ant-design/issues/21864
    display: "table",
    clear: "both",
    content: '""'
  }
}), QL = (e) => ({
  a: {
    color: e.colorLink,
    textDecoration: e.linkDecoration,
    backgroundColor: "transparent",
    outline: "none",
    cursor: "pointer",
    transition: `color ${e.motionDurationSlow}`,
    "-webkit-text-decoration-skip": "objects",
    "&:hover": {
      color: e.colorLinkHover
    },
    "&:active": {
      color: e.colorLinkActive
    },
    "&:active,\n  &:hover": {
      textDecoration: e.linkHoverDecoration,
      outline: 0
    },
    // https://github.com/ant-design/ant-design/issues/22503
    "&:focus": {
      textDecoration: e.linkFocusDecoration,
      outline: 0
    },
    "&[disabled]": {
      color: e.colorTextDisabled,
      cursor: "not-allowed"
    }
  }
}), ZL = (e, t) => {
  const {
    fontFamily: n,
    fontSize: o
  } = e, r = `[class^="${t}"], [class*=" ${t}"]`;
  return {
    [r]: {
      fontFamily: n,
      fontSize: o,
      boxSizing: "border-box",
      "&::before, &::after": {
        boxSizing: "border-box"
      },
      [r]: {
        boxSizing: "border-box",
        "&::before, &::after": {
          boxSizing: "border-box"
        }
      }
    }
  };
}, ja = (e) => ({
  outline: `${e.lineWidthBold}px solid ${e.colorPrimaryBorder}`,
  outlineOffset: 1,
  transition: "outline-offset 0s, outline 0s"
}), Nl = (e) => ({
  "&:focus-visible": O({}, ja(e))
});
function Sn(e, t, n) {
  return (o) => {
    const r = E(() => o?.value), [i, a, l] = dc(), {
      getPrefixCls: s,
      iconPrefixCls: u
    } = Oh(), c = E(() => s()), d = E(() => ({
      theme: i.value,
      token: a.value,
      hashId: l.value,
      path: ["Shared", c.value]
    }));
    Rm(d, () => [{
      // Link
      "&": QL(a.value)
    }]);
    const f = E(() => ({
      theme: i.value,
      token: a.value,
      hashId: l.value,
      path: [e, r.value, u.value]
    }));
    return [Rm(f, () => {
      const {
        token: p,
        flush: v
      } = e6(a.value), g = typeof n == "function" ? n(p) : n, m = O(O({}, g), a.value[e]), x = `.${r.value}`, S = Qt(p, {
        componentCls: x,
        prefixCls: r.value,
        iconCls: `.${u.value}`,
        antCls: `.${c.value}`
      }, m), C = t(S, {
        hashId: l.value,
        prefixCls: r.value,
        rootPrefixCls: c.value,
        iconPrefixCls: u.value,
        overrideComponentToken: a.value[e]
      });
      return v(e, m), [ZL(a.value, r.value), C];
    }), l];
  };
}
const NI = process.env.NODE_ENV !== "production" || typeof CSSINJS_STATISTIC < "u";
let Lm = !0;
function Qt() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  if (!NI)
    return O({}, ...t);
  Lm = !1;
  const o = {};
  return t.forEach((r) => {
    Object.keys(r).forEach((a) => {
      Object.defineProperty(o, a, {
        configurable: !0,
        enumerable: !0,
        get: () => r[a]
      });
    });
  }), Lm = !0, o;
}
function JL() {
}
function e6(e) {
  let t, n = e, o = JL;
  return NI && (t = /* @__PURE__ */ new Set(), n = new Proxy(e, {
    get(r, i) {
      return Lm && t.add(i), r[i];
    }
  }), o = (r, i) => {
    Array.from(t);
  }), {
    token: n,
    keys: t,
    flush: o
  };
}
const t6 = yI(Jy), t0 = {
  token: Mh,
  hashed: !0
}, RI = Symbol("DesignTokenContext"), Hm = $e(), n6 = (e) => {
  Ft(RI, e), ke(e, () => {
    Hm.value = T(e), FE(Hm);
  }, {
    immediate: !0,
    deep: !0
  });
}, o6 = be({
  props: {
    value: Et()
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    return n6(E(() => e.value)), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
});
function dc() {
  const e = zt(RI, E(() => Hm.value || t0)), t = E(() => `${SL}-${e.value.hashed || ""}`), n = E(() => e.value.theme || t6), o = G8(n, E(() => [Mh, e.value.token]), E(() => ({
    salt: t.value,
    override: O({
      override: e.value.token
    }, e.value.components),
    formatToken: UL
  })));
  return [n, E(() => o.value[0]), E(() => e.value.hashed ? o.value[1] : "")];
}
const n0 = be({
  compatConfig: {
    MODE: 3
  },
  setup() {
    const [, e] = dc(), t = E(() => new _n(e.value.colorBgBase).toHsl().l < 0.5 ? {
      opacity: 0.65
    } : {});
    return () => h("svg", {
      style: t.value,
      width: "184",
      height: "152",
      viewBox: "0 0 184 152",
      xmlns: "http://www.w3.org/2000/svg"
    }, [h("g", {
      fill: "none",
      "fill-rule": "evenodd"
    }, [h("g", {
      transform: "translate(24 31.67)"
    }, [h("ellipse", {
      "fill-opacity": ".8",
      fill: "#F5F5F7",
      cx: "67.797",
      cy: "106.89",
      rx: "67.797",
      ry: "12.668"
    }, null), h("path", {
      d: "M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",
      fill: "#AEB8C2"
    }, null), h("path", {
      d: "M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",
      fill: "url(#linearGradient-1)",
      transform: "translate(13.56)"
    }, null), h("path", {
      d: "M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",
      fill: "#F5F5F7"
    }, null), h("path", {
      d: "M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",
      fill: "#DCE0E6"
    }, null)]), h("path", {
      d: "M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",
      fill: "#DCE0E6"
    }, null), h("g", {
      transform: "translate(149.65 15.383)",
      fill: "#FFF"
    }, [h("ellipse", {
      cx: "20.654",
      cy: "3.167",
      rx: "2.849",
      ry: "2.815"
    }, null), h("path", {
      d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
    }, null)])])]);
  }
});
n0.PRESENTED_IMAGE_DEFAULT = !0;
const zI = be({
  compatConfig: {
    MODE: 3
  },
  setup() {
    const [, e] = dc(), t = E(() => {
      const {
        colorFill: n,
        colorFillTertiary: o,
        colorFillQuaternary: r,
        colorBgContainer: i
      } = e.value;
      return {
        borderColor: new _n(n).onBackground(i).toHexString(),
        shadowColor: new _n(o).onBackground(i).toHexString(),
        contentColor: new _n(r).onBackground(i).toHexString()
      };
    });
    return () => h("svg", {
      width: "64",
      height: "41",
      viewBox: "0 0 64 41",
      xmlns: "http://www.w3.org/2000/svg"
    }, [h("g", {
      transform: "translate(0 1)",
      fill: "none",
      "fill-rule": "evenodd"
    }, [h("ellipse", {
      fill: t.value.shadowColor,
      cx: "32",
      cy: "33",
      rx: "32",
      ry: "7"
    }, null), h("g", {
      "fill-rule": "nonzero",
      stroke: t.value.borderColor
    }, [h("path", {
      d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
    }, null), h("path", {
      d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",
      fill: t.value.contentColor
    }, null)])])]);
  }
});
zI.PRESENTED_IMAGE_SIMPLE = !0;
const r6 = (e) => {
  const {
    componentCls: t,
    margin: n,
    marginXS: o,
    marginXL: r,
    fontSize: i,
    lineHeight: a
  } = e;
  return {
    [t]: {
      marginInline: o,
      fontSize: i,
      lineHeight: a,
      textAlign: "center",
      // 原来 &-image 没有父子结构，现在为了外层承担我们的hashId，改成父子结果
      [`${t}-image`]: {
        height: e.emptyImgHeight,
        marginBottom: o,
        opacity: e.opacityImage,
        img: {
          height: "100%"
        },
        svg: {
          height: "100%",
          margin: "auto"
        }
      },
      // 原来 &-footer 没有父子结构，现在为了外层承担我们的hashId，改成父子结果
      [`${t}-footer`]: {
        marginTop: n
      },
      "&-normal": {
        marginBlock: r,
        color: e.colorTextDisabled,
        [`${t}-image`]: {
          height: e.emptyImgHeightMD
        }
      },
      "&-small": {
        marginBlock: o,
        color: e.colorTextDisabled,
        [`${t}-image`]: {
          height: e.emptyImgHeightSM
        }
      }
    }
  };
}, i6 = Sn("Empty", (e) => {
  const {
    componentCls: t,
    controlHeightLG: n
  } = e, o = Qt(e, {
    emptyImgCls: `${t}-img`,
    emptyImgHeight: n * 2.5,
    emptyImgHeightMD: n,
    emptyImgHeightSM: n * 0.875
  });
  return [r6(o)];
});
var a6 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const l6 = () => ({
  prefixCls: String,
  imageStyle: Et(),
  image: Ir(),
  description: Ir()
}), o0 = be({
  name: "AEmpty",
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: l6(),
  setup(e, t) {
    let {
      slots: n = {},
      attrs: o
    } = t;
    const {
      direction: r,
      prefixCls: i
    } = _t("empty", e), [a, l] = i6(i);
    return () => {
      var s, u;
      const c = i.value, d = O(O({}, e), o), {
        image: f = ((s = n.image) === null || s === void 0 ? void 0 : s.call(n)) || ko(n0),
        description: p = ((u = n.description) === null || u === void 0 ? void 0 : u.call(n)) || void 0,
        imageStyle: v,
        class: g = ""
      } = d, m = a6(d, ["image", "description", "imageStyle", "class"]), x = typeof f == "function" ? f() : f, S = typeof x == "object" && "type" in x && x.type.PRESENTED_IMAGE_SIMPLE;
      return a(h(lI, {
        componentName: "Empty",
        children: (C) => {
          const P = typeof p < "u" ? p : C.description, $ = typeof P == "string" ? P : "empty";
          let I = null;
          return typeof x == "string" ? I = h("img", {
            alt: $,
            src: x
          }, null) : I = x, h("div", Q({
            class: Me(c, g, l.value, {
              [`${c}-normal`]: S,
              [`${c}-rtl`]: r.value === "rtl"
            })
          }, m), [h("div", {
            class: `${c}-image`,
            style: v
          }, [I]), P && h("p", {
            class: `${c}-description`
          }, [P]), n.default && h("div", {
            class: `${c}-footer`
          }, [Do(n.default())])]);
        }
      }, null));
    };
  }
});
o0.PRESENTED_IMAGE_DEFAULT = () => ko(n0);
o0.PRESENTED_IMAGE_SIMPLE = () => ko(zI);
const fs = ii(o0), r0 = (e) => {
  const {
    prefixCls: t
  } = _t("empty", e);
  return ((o) => {
    switch (o) {
      case "Table":
      case "List":
        return h(fs, {
          image: fs.PRESENTED_IMAGE_SIMPLE
        }, null);
      case "Select":
      case "TreeSelect":
      case "Cascader":
      case "Transfer":
      case "Mentions":
        return h(fs, {
          image: fs.PRESENTED_IMAGE_SIMPLE,
          class: `${t.value}-small`
        }, null);
      default:
        return h(fs, null, null);
    }
  })(e.componentName);
};
function s6(e) {
  return h(r0, {
    componentName: e
  }, null);
}
const FI = Symbol("SizeContextKey"), BI = () => zt(FI, ce(void 0)), LI = (e) => {
  const t = BI();
  return Ft(FI, E(() => e.value || t.value)), e;
}, _t = ((e, t) => {
  const n = BI(), o = _i(), r = zt(Uy, O(O({}, nI), {
    renderEmpty: (w) => ko(r0, {
      componentName: w
    })
  })), i = E(() => r.getPrefixCls(e, t.prefixCls)), a = E(() => {
    var w, _;
    return (w = t.direction) !== null && w !== void 0 ? w : (_ = r.direction) === null || _ === void 0 ? void 0 : _.value;
  }), l = E(() => {
    var w;
    return (w = t.iconPrefixCls) !== null && w !== void 0 ? w : r.iconPrefixCls.value;
  }), s = E(() => r.getPrefixCls()), u = E(() => {
    var w;
    return (w = r.autoInsertSpaceInButton) === null || w === void 0 ? void 0 : w.value;
  }), c = r.renderEmpty, d = r.space, f = r.pageHeader, p = r.form, v = E(() => {
    var w, _;
    return (w = t.getTargetContainer) !== null && w !== void 0 ? w : (_ = r.getTargetContainer) === null || _ === void 0 ? void 0 : _.value;
  }), g = E(() => {
    var w, _, M;
    return (_ = (w = t.getContainer) !== null && w !== void 0 ? w : t.getPopupContainer) !== null && _ !== void 0 ? _ : (M = r.getPopupContainer) === null || M === void 0 ? void 0 : M.value;
  }), m = E(() => {
    var w, _;
    return (w = t.dropdownMatchSelectWidth) !== null && w !== void 0 ? w : (_ = r.dropdownMatchSelectWidth) === null || _ === void 0 ? void 0 : _.value;
  }), x = E(() => {
    var w;
    return (t.virtual === void 0 ? ((w = r.virtual) === null || w === void 0 ? void 0 : w.value) !== !1 : t.virtual !== !1) && m.value !== !1;
  }), S = E(() => t.size || n.value), C = E(() => {
    var w, _, M;
    return (w = t.autocomplete) !== null && w !== void 0 ? w : (M = (_ = r.input) === null || _ === void 0 ? void 0 : _.value) === null || M === void 0 ? void 0 : M.autocomplete;
  }), P = E(() => {
    var w;
    return (w = t.disabled) !== null && w !== void 0 ? w : o.value;
  }), $ = E(() => {
    var w;
    return (w = t.csp) !== null && w !== void 0 ? w : r.csp;
  }), I = E(() => {
    var w, _;
    return (w = t.wave) !== null && w !== void 0 ? w : (_ = r.wave) === null || _ === void 0 ? void 0 : _.value;
  });
  return {
    configProvider: r,
    prefixCls: i,
    direction: a,
    size: S,
    getTargetContainer: v,
    getPopupContainer: g,
    space: d,
    pageHeader: f,
    form: p,
    autoInsertSpaceInButton: u,
    renderEmpty: c,
    virtual: x,
    dropdownMatchSelectWidth: m,
    rootPrefixCls: s,
    getPrefixCls: r.getPrefixCls,
    autocomplete: C,
    csp: $,
    iconPrefixCls: l,
    disabled: P,
    select: r.select,
    wave: I
  };
});
function Fn(e, t) {
  const n = O({}, e);
  for (let o = 0; o < t.length; o += 1) {
    const r = t[o];
    delete n[r];
  }
  return n;
}
function O1(e) {
  return typeof e == "object" && e != null && e.nodeType === 1;
}
function k1(e, t) {
  return (!t || e !== "hidden") && e !== "visible" && e !== "clip";
}
function Qg(e, t) {
  if (e.clientHeight < e.scrollHeight || e.clientWidth < e.scrollWidth) {
    var n = getComputedStyle(e, null);
    return k1(n.overflowY, t) || k1(n.overflowX, t) || (function(o) {
      var r = (function(i) {
        if (!i.ownerDocument || !i.ownerDocument.defaultView) return null;
        try {
          return i.ownerDocument.defaultView.frameElement;
        } catch {
          return null;
        }
      })(o);
      return !!r && (r.clientHeight < o.scrollHeight || r.clientWidth < o.scrollWidth);
    })(e);
  }
  return !1;
}
function yf(e, t, n, o, r, i, a, l) {
  return i < e && a > t || i > e && a < t ? 0 : i <= e && l <= n || a >= t && l >= n ? i - e - o : a > t && l < n || i < e && l > n ? a - t + r : 0;
}
var I1 = function(e, t) {
  var n = window, o = t.scrollMode, r = t.block, i = t.inline, a = t.boundary, l = t.skipOverflowHiddenElements, s = typeof a == "function" ? a : function(Ke) {
    return Ke !== a;
  };
  if (!O1(e)) throw new TypeError("Invalid target");
  for (var u, c, d = document.scrollingElement || document.documentElement, f = [], p = e; O1(p) && s(p); ) {
    if ((p = (c = (u = p).parentElement) == null ? u.getRootNode().host || null : c) === d) {
      f.push(p);
      break;
    }
    p != null && p === document.body && Qg(p) && !Qg(document.documentElement) || p != null && Qg(p, l) && f.push(p);
  }
  for (var v = n.visualViewport ? n.visualViewport.width : innerWidth, g = n.visualViewport ? n.visualViewport.height : innerHeight, m = window.scrollX || pageXOffset, x = window.scrollY || pageYOffset, S = e.getBoundingClientRect(), C = S.height, P = S.width, $ = S.top, I = S.right, w = S.bottom, _ = S.left, M = r === "start" || r === "nearest" ? $ : r === "end" ? w : $ + C / 2, N = i === "center" ? _ + P / 2 : i === "end" ? I : _, A = [], H = 0; H < f.length; H++) {
    var B = f[H], F = B.getBoundingClientRect(), R = F.height, X = F.width, j = F.top, ee = F.right, W = F.bottom, K = F.left;
    if (o === "if-needed" && $ >= 0 && _ >= 0 && w <= g && I <= v && $ >= j && w <= W && _ >= K && I <= ee) return A;
    var q = getComputedStyle(B), G = parseInt(q.borderLeftWidth, 10), ae = parseInt(q.borderTopWidth, 10), le = parseInt(q.borderRightWidth, 10), ie = parseInt(q.borderBottomWidth, 10), re = 0, te = 0, ve = "offsetWidth" in B ? B.offsetWidth - B.clientWidth - G - le : 0, ue = "offsetHeight" in B ? B.offsetHeight - B.clientHeight - ae - ie : 0, pe = "offsetWidth" in B ? B.offsetWidth === 0 ? 0 : X / B.offsetWidth : 0, ge = "offsetHeight" in B ? B.offsetHeight === 0 ? 0 : R / B.offsetHeight : 0;
    if (d === B) re = r === "start" ? M : r === "end" ? M - g : r === "nearest" ? yf(x, x + g, g, ae, ie, x + M, x + M + C, C) : M - g / 2, te = i === "start" ? N : i === "center" ? N - v / 2 : i === "end" ? N - v : yf(m, m + v, v, G, le, m + N, m + N + P, P), re = Math.max(0, re + x), te = Math.max(0, te + m);
    else {
      re = r === "start" ? M - j - ae : r === "end" ? M - W + ie + ue : r === "nearest" ? yf(j, W, R, ae, ie + ue, M, M + C, C) : M - (j + R / 2) + ue / 2, te = i === "start" ? N - K - G : i === "center" ? N - (K + X / 2) + ve / 2 : i === "end" ? N - ee + le + ve : yf(K, ee, X, G, le + ve, N, N + P, P);
      var _e = B.scrollLeft, ze = B.scrollTop;
      M += ze - (re = Math.max(0, Math.min(ze + re / ge, B.scrollHeight - R / ge + ue))), N += _e - (te = Math.max(0, Math.min(_e + te / pe, B.scrollWidth - X / pe + ve)));
    }
    A.push({ el: B, top: re, left: te });
  }
  return A;
};
function HI(e) {
  return e === Object(e) && Object.keys(e).length !== 0;
}
function u6(e, t) {
  t === void 0 && (t = "auto");
  var n = "scrollBehavior" in document.body.style;
  e.forEach(function(o) {
    var r = o.el, i = o.top, a = o.left;
    r.scroll && n ? r.scroll({
      top: i,
      left: a,
      behavior: t
    }) : (r.scrollTop = i, r.scrollLeft = a);
  });
}
function c6(e) {
  return e === !1 ? {
    block: "end",
    inline: "nearest"
  } : HI(e) ? e : {
    block: "start",
    inline: "nearest"
  };
}
function d6(e, t) {
  var n = e.isConnected || e.ownerDocument.documentElement.contains(e);
  if (HI(t) && typeof t.behavior == "function")
    return t.behavior(n ? I1(e, t) : []);
  if (n) {
    var o = c6(t);
    return u6(I1(e, o), o.behavior);
  }
}
function f6(e, t, n, o) {
  const r = n - t;
  return e /= o / 2, e < 1 ? r / 2 * e * e * e + t : r / 2 * ((e -= 2) * e * e + 2) + t;
}
function Vm(e) {
  return e != null && e === e.window;
}
function p6(e, t) {
  var n, o;
  if (typeof window > "u")
    return 0;
  const r = "scrollTop";
  let i = 0;
  return Vm(e) ? i = e.scrollY : e instanceof Document ? i = e.documentElement[r] : (e instanceof HTMLElement || e) && (i = e[r]), e && !Vm(e) && typeof i != "number" && (i = (o = ((n = e.ownerDocument) !== null && n !== void 0 ? n : e).documentElement) === null || o === void 0 ? void 0 : o[r]), i;
}
function h6(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const {
    getContainer: n = () => window,
    callback: o,
    duration: r = 450
  } = t, i = n(), a = p6(i), l = Date.now(), s = () => {
    const c = Date.now() - l, d = f6(c > r ? r : c, a, e, r);
    Vm(i) ? i.scrollTo(window.scrollX, d) : i instanceof Document ? i.documentElement.scrollTop = d : i.scrollTop = d, c < r ? Vt(s) : typeof o == "function" && o();
  };
  Vt(s);
}
function g6(e, t) {
  for (var n = 0; n < t.length; n++) {
    var o = t[n];
    o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);
  }
}
function VI(e, t, n) {
  return n && g6(e, n), e;
}
function tp() {
  return (tp = Object.assign || function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var n = arguments[t];
      for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
    }
    return e;
  }).apply(this, arguments);
}
function jI(e, t) {
  e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e.__proto__ = t;
}
function WI(e, t) {
  if (e == null) return {};
  var n, o, r = {}, i = Object.keys(e);
  for (o = 0; o < i.length; o++) t.indexOf(n = i[o]) >= 0 || (r[n] = e[n]);
  return r;
}
function _1(e) {
  return ((t = e) != null && typeof t == "object" && Array.isArray(t) === !1) == 1 && Object.prototype.toString.call(e) === "[object Object]";
  var t;
}
var KI = Object.prototype, qI = KI.toString, v6 = KI.hasOwnProperty, YI = /^\s*function (\w+)/;
function T1(e) {
  var t, n = (t = e?.type) !== null && t !== void 0 ? t : e;
  if (n) {
    var o = n.toString().match(YI);
    return o ? o[1] : "";
  }
  return "";
}
var Ts = function(e) {
  var t, n;
  return _1(e) !== !1 && typeof (t = e.constructor) == "function" && _1(n = t.prototype) !== !1 && n.hasOwnProperty("isPrototypeOf") !== !1;
}, GI = function(e) {
  return e;
}, yr = GI;
if (process.env.NODE_ENV !== "production") {
  var m6 = typeof console < "u";
  yr = m6 ? function(e) {
    console.warn("[VueTypes warn]: " + e);
  } : GI;
}
var md = function(e, t) {
  return v6.call(e, t);
}, b6 = Number.isInteger || function(e) {
  return typeof e == "number" && isFinite(e) && Math.floor(e) === e;
}, Gu = Array.isArray || function(e) {
  return qI.call(e) === "[object Array]";
}, Uu = function(e) {
  return qI.call(e) === "[object Function]";
}, Ap = function(e) {
  return Ts(e) && md(e, "_vueTypes_name");
}, UI = function(e) {
  return Ts(e) && (md(e, "type") || ["_vueTypes_name", "validator", "default", "required"].some(function(t) {
    return md(e, t);
  }));
};
function i0(e, t) {
  return Object.defineProperty(e.bind(t), "__original", { value: e });
}
function Fs(e, t, n) {
  var o, r = !0, i = "";
  o = Ts(e) ? e : { type: e };
  var a = Ap(o) ? o._vueTypes_name + " - " : "";
  if (UI(o) && o.type !== null) {
    if (o.type === void 0 || o.type === !0 || !o.required && t === void 0) return r;
    Gu(o.type) ? (r = o.type.some(function(d) {
      return Fs(d, t) === !0;
    }), i = o.type.map(function(d) {
      return T1(d);
    }).join(" or ")) : r = (i = T1(o)) === "Array" ? Gu(t) : i === "Object" ? Ts(t) : i === "String" || i === "Number" || i === "Boolean" || i === "Function" ? (function(d) {
      if (d == null) return "";
      var f = d.constructor.toString().match(YI);
      return f ? f[1] : "";
    })(t) === i : t instanceof o.type;
  }
  if (!r) {
    var l = a + 'value "' + t + '" should be of type "' + i + '"';
    return l;
  }
  if (md(o, "validator") && Uu(o.validator)) {
    var s = yr, u = [];
    if (yr = function(d) {
      u.push(d);
    }, r = o.validator(t), yr = s, !r) {
      var c = (u.length > 1 ? "* " : "") + u.join(`
* `);
      return u.length = 0, c;
    }
  }
  return r;
}
function Ar(e, t) {
  var n = Object.defineProperties(t, { _vueTypes_name: { value: e, writable: !0 }, isRequired: { get: function() {
    return this.required = !0, this;
  } }, def: { value: function(r) {
    return r !== void 0 || this.default ? Uu(r) || Fs(this, r) === !0 ? (this.default = Gu(r) ? function() {
      return [].concat(r);
    } : Ts(r) ? function() {
      return Object.assign({}, r);
    } : r, this) : (yr(this._vueTypes_name + ' - invalid default value: "' + r + '"'), this) : this;
  } } }), o = n.validator;
  return Uu(o) && (n.validator = i0(o, n)), n;
}
function Ji(e, t) {
  var n = Ar(e, t);
  return Object.defineProperty(n, "validate", { value: function(o) {
    return Uu(this.validator) && yr(this._vueTypes_name + ` - calling .validate() will overwrite the current custom validator function. Validator info:
` + JSON.stringify(this)), this.validator = i0(o, this), this;
  } });
}
function M1(e, t, n) {
  var o, r, i = (o = t, r = {}, Object.getOwnPropertyNames(o).forEach(function(d) {
    r[d] = Object.getOwnPropertyDescriptor(o, d);
  }), Object.defineProperties({}, r));
  if (i._vueTypes_name = e, !Ts(n)) return i;
  var a, l, s = n.validator, u = WI(n, ["validator"]);
  if (Uu(s)) {
    var c = i.validator;
    c && (c = (l = (a = c).__original) !== null && l !== void 0 ? l : a), i.validator = i0(c ? function(d) {
      return c.call(this, d) && s.call(this, d);
    } : s, i);
  }
  return Object.assign(i, u);
}
function Eh(e) {
  return e.replace(/^(?!\s*$)/gm, "  ");
}
var y6 = function() {
  return Ji("any", {});
}, x6 = function() {
  return Ji("function", { type: Function });
}, w6 = function() {
  return Ji("boolean", { type: Boolean });
}, S6 = function() {
  return Ji("string", { type: String });
}, C6 = function() {
  return Ji("number", { type: Number });
}, $6 = function() {
  return Ji("array", { type: Array });
}, P6 = function() {
  return Ji("object", { type: Object });
}, O6 = function() {
  return Ar("integer", { type: Number, validator: function(e) {
    return b6(e);
  } });
}, k6 = function() {
  return Ar("symbol", { validator: function(e) {
    return typeof e == "symbol";
  } });
};
function I6(e, t) {
  if (t === void 0 && (t = "custom validation failed"), typeof e != "function") throw new TypeError("[VueTypes error]: You must provide a function as argument");
  return Ar(e.name || "<<anonymous function>>", { validator: function(n) {
    var o = e(n);
    return o || yr(this._vueTypes_name + " - " + t), o;
  } });
}
function _6(e) {
  if (!Gu(e)) throw new TypeError("[VueTypes error]: You must provide an array as argument.");
  var t = 'oneOf - value should be one of "' + e.join('", "') + '".', n = e.reduce(function(o, r) {
    if (r != null) {
      var i = r.constructor;
      o.indexOf(i) === -1 && o.push(i);
    }
    return o;
  }, []);
  return Ar("oneOf", { type: n.length > 0 ? n : void 0, validator: function(o) {
    var r = e.indexOf(o) !== -1;
    return r || yr(t), r;
  } });
}
function T6(e) {
  if (!Gu(e)) throw new TypeError("[VueTypes error]: You must provide an array as argument");
  for (var t = !1, n = [], o = 0; o < e.length; o += 1) {
    var r = e[o];
    if (UI(r)) {
      if (Ap(r) && r._vueTypes_name === "oneOf") {
        n = n.concat(r.type);
        continue;
      }
      if (Uu(r.validator) && (t = !0), r.type !== !0 && r.type) {
        n = n.concat(r.type);
        continue;
      }
    }
    n.push(r);
  }
  return n = n.filter(function(i, a) {
    return n.indexOf(i) === a;
  }), Ar("oneOfType", t ? { type: n, validator: function(i) {
    var a = [], l = e.some(function(s) {
      var u = Fs(Ap(s) && s._vueTypes_name === "oneOf" ? s.type || null : s, i);
      return typeof u == "string" && a.push(u), u === !0;
    });
    return l || yr("oneOfType - provided value does not match any of the " + a.length + ` passed-in validators:
` + Eh(a.join(`
`))), l;
  } } : { type: n });
}
function M6(e) {
  return Ar("arrayOf", { type: Array, validator: function(t) {
    var n, o = t.every(function(r) {
      return (n = Fs(e, r)) === !0;
    });
    return o || yr(`arrayOf - value validation error:
` + Eh(n)), o;
  } });
}
function E6(e) {
  return Ar("instanceOf", { type: e });
}
function D6(e) {
  return Ar("objectOf", { type: Object, validator: function(t) {
    var n, o = Object.keys(t).every(function(r) {
      return (n = Fs(e, t[r])) === !0;
    });
    return o || yr(`objectOf - value validation error:
` + Eh(n)), o;
  } });
}
function A6(e) {
  var t = Object.keys(e), n = t.filter(function(r) {
    var i;
    return !!(!((i = e[r]) === null || i === void 0) && i.required);
  }), o = Ar("shape", { type: Object, validator: function(r) {
    var i = this;
    if (!Ts(r)) return !1;
    var a = Object.keys(r);
    if (n.length > 0 && n.some(function(s) {
      return a.indexOf(s) === -1;
    })) {
      var l = n.filter(function(s) {
        return a.indexOf(s) === -1;
      });
      return yr(l.length === 1 ? 'shape - required property "' + l[0] + '" is not defined.' : 'shape - required properties "' + l.join('", "') + '" are not defined.'), !1;
    }
    return a.every(function(s) {
      if (t.indexOf(s) === -1) return i._vueTypes_isLoose === !0 || (yr('shape - shape definition does not include a "' + s + '" property. Allowed keys: "' + t.join('", "') + '".'), !1);
      var u = Fs(e[s], r[s]);
      return typeof u == "string" && yr('shape - "' + s + `" property validation error:
 ` + Eh(u)), u === !0;
    });
  } });
  return Object.defineProperty(o, "_vueTypes_isLoose", { writable: !0, value: !1 }), Object.defineProperty(o, "loose", { get: function() {
    return this._vueTypes_isLoose = !0, this;
  } }), o;
}
var ji = (function() {
  function e() {
  }
  return e.extend = function(t) {
    var n = this;
    if (Gu(t)) return t.forEach(function(d) {
      return n.extend(d);
    }), this;
    var o = t.name, r = t.validate, i = r !== void 0 && r, a = t.getter, l = a !== void 0 && a, s = WI(t, ["name", "validate", "getter"]);
    if (md(this, o)) throw new TypeError('[VueTypes error]: Type "' + o + '" already defined');
    var u, c = s.type;
    return Ap(c) ? (delete s.type, Object.defineProperty(this, o, l ? { get: function() {
      return M1(o, c, s);
    } } : { value: function() {
      var d, f = M1(o, c, s);
      return f.validator && (f.validator = (d = f.validator).bind.apply(d, [f].concat([].slice.call(arguments)))), f;
    } })) : (u = l ? { get: function() {
      var d = Object.assign({}, s);
      return i ? Ji(o, d) : Ar(o, d);
    }, enumerable: !0 } : { value: function() {
      var d, f, p = Object.assign({}, s);
      return d = i ? Ji(o, p) : Ar(o, p), p.validator && (d.validator = (f = p.validator).bind.apply(f, [d].concat([].slice.call(arguments)))), d;
    }, enumerable: !0 }, Object.defineProperty(this, o, u));
  }, VI(e, null, [{ key: "any", get: function() {
    return y6();
  } }, { key: "func", get: function() {
    return x6().def(this.defaults.func);
  } }, { key: "bool", get: function() {
    return w6().def(this.defaults.bool);
  } }, { key: "string", get: function() {
    return S6().def(this.defaults.string);
  } }, { key: "number", get: function() {
    return C6().def(this.defaults.number);
  } }, { key: "array", get: function() {
    return $6().def(this.defaults.array);
  } }, { key: "object", get: function() {
    return P6().def(this.defaults.object);
  } }, { key: "integer", get: function() {
    return O6().def(this.defaults.integer);
  } }, { key: "symbol", get: function() {
    return k6();
  } }]), e;
})();
function XI(e) {
  var t;
  return e === void 0 && (e = { func: function() {
  }, bool: !0, string: "", number: 0, array: function() {
    return [];
  }, object: function() {
    return {};
  }, integer: 0 }), (t = (function(n) {
    function o() {
      return n.apply(this, arguments) || this;
    }
    return jI(o, n), VI(o, null, [{ key: "sensibleDefaults", get: function() {
      return tp({}, this.defaults);
    }, set: function(r) {
      this.defaults = r !== !1 ? tp({}, r !== !0 ? r : e) : {};
    } }]), o;
  })(ji)).defaults = tp({}, e), t;
}
ji.defaults = {}, ji.custom = I6, ji.oneOf = _6, ji.instanceOf = E6, ji.oneOfType = T6, ji.arrayOf = M6, ji.objectOf = D6, ji.shape = A6, ji.utils = { validate: function(e, t) {
  return Fs(t, e) === !0;
}, toType: function(e, t, n) {
  return n === void 0 && (n = !1), n ? Ji(e, t) : Ar(e, t);
} };
(function(e) {
  function t() {
    return e.apply(this, arguments) || this;
  }
  return jI(t, e), t;
})(XI());
const fe = XI({
  func: void 0,
  bool: void 0,
  string: void 0,
  number: void 0,
  array: void 0,
  object: void 0,
  integer: void 0
});
fe.extend([{
  name: "looseBool",
  getter: !0,
  type: Boolean,
  default: void 0
}, {
  name: "style",
  getter: !0,
  type: [String, Object],
  default: void 0
}, {
  name: "VueNode",
  getter: !0,
  type: null
}]);
function N6(e) {
  return e.default = void 0, e;
}
const dn = ((e, t, n) => {
  vr(e, `[ant-design-vue: ${t}] ${n}`);
});
function E1(e, t) {
  const {
    key: n
  } = e;
  let o;
  return "value" in e && ({
    value: o
  } = e), n ?? (o !== void 0 ? o : `rc-index-key-${t}`);
}
function QI(e, t) {
  const {
    label: n,
    value: o,
    options: r
  } = e || {};
  return {
    label: n || (t ? "children" : "label"),
    value: o || "value",
    options: r || "options"
  };
}
function R6(e) {
  let {
    fieldNames: t,
    childrenAsData: n
  } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const o = [], {
    label: r,
    value: i,
    options: a
  } = QI(t, !1);
  function l(s, u) {
    s.forEach((c) => {
      const d = c[r];
      if (u || !(a in c)) {
        const f = c[i];
        o.push({
          key: E1(c, o.length),
          groupOption: u,
          data: c,
          label: d,
          value: f
        });
      } else {
        let f = d;
        f === void 0 && n && (f = c.label), o.push({
          key: E1(c, o.length),
          group: !0,
          data: c,
          label: f
        }), l(c[a], !0);
      }
    });
  }
  return l(e, !1), o;
}
function jm(e) {
  const t = O({}, e);
  return "props" in t || Object.defineProperty(t, "props", {
    get() {
      return wn(!1, "Return type is option instead of Option instance. Please read value directly instead of reading from `props`."), t;
    }
  }), t;
}
function z6(e, t) {
  if (!t || !t.length)
    return null;
  let n = !1;
  function o(i, a) {
    let [l, ...s] = a;
    if (!l)
      return [i];
    const u = i.split(l);
    return n = n || u.length > 1, u.reduce((c, d) => [...c, ...o(d, s)], []).filter((c) => c);
  }
  const r = o(e, t);
  return n ? r : null;
}
function F6() {
  return "";
}
function B6(e) {
  return e ? e.ownerDocument : window.document;
}
function ZI() {
}
const L6 = () => ({
  action: fe.oneOfType([fe.string, fe.arrayOf(fe.string)]).def([]),
  showAction: fe.any.def([]),
  hideAction: fe.any.def([]),
  getPopupClassNameFromAlign: fe.any.def(F6),
  onPopupVisibleChange: Function,
  afterPopupVisibleChange: fe.func.def(ZI),
  popup: fe.any,
  arrow: fe.bool.def(!0),
  popupStyle: {
    type: Object,
    default: void 0
  },
  prefixCls: fe.string.def("rc-trigger-popup"),
  popupClassName: fe.string.def(""),
  popupPlacement: String,
  builtinPlacements: fe.object,
  popupTransitionName: String,
  popupAnimation: fe.any,
  mouseEnterDelay: fe.number.def(0),
  mouseLeaveDelay: fe.number.def(0.1),
  zIndex: Number,
  focusDelay: fe.number.def(0),
  blurDelay: fe.number.def(0.15),
  getPopupContainer: Function,
  getDocument: fe.func.def(B6),
  forceRender: {
    type: Boolean,
    default: void 0
  },
  destroyPopupOnHide: {
    type: Boolean,
    default: !1
  },
  mask: {
    type: Boolean,
    default: !1
  },
  maskClosable: {
    type: Boolean,
    default: !0
  },
  // onPopupAlign: PropTypes.func.def(noop),
  popupAlign: fe.object.def(() => ({})),
  popupVisible: {
    type: Boolean,
    default: void 0
  },
  defaultPopupVisible: {
    type: Boolean,
    default: !1
  },
  maskTransitionName: String,
  maskAnimation: String,
  stretch: String,
  alignPoint: {
    type: Boolean,
    default: void 0
  },
  autoDestroy: {
    type: Boolean,
    default: !1
  },
  mobile: Object,
  getTriggerDOMNode: Function
}), a0 = {
  visible: Boolean,
  prefixCls: String,
  zIndex: Number,
  destroyPopupOnHide: Boolean,
  forceRender: Boolean,
  arrow: {
    type: Boolean,
    default: !0
  },
  // Legacy Motion
  animation: [String, Object],
  transitionName: String,
  // Measure
  stretch: {
    type: String
  },
  // Align
  align: {
    type: Object
  },
  point: {
    type: Object
  },
  getRootDomNode: {
    type: Function
  },
  getClassNameFromAlign: {
    type: Function
  },
  onAlign: {
    type: Function
  },
  onMouseenter: {
    type: Function
  },
  onMouseleave: {
    type: Function
  },
  onMousedown: {
    type: Function
  },
  onTouchstart: {
    type: Function
  }
}, H6 = O(O({}, a0), {
  mobile: {
    type: Object
  }
}), V6 = O(O({}, a0), {
  mask: Boolean,
  mobile: {
    type: Object
  },
  maskAnimation: String,
  maskTransitionName: String
});
function l0(e) {
  let {
    prefixCls: t,
    animation: n,
    transitionName: o
  } = e;
  return n ? {
    name: `${t}-${n}`
  } : o ? {
    name: o
  } : {};
}
function JI(e) {
  const {
    prefixCls: t,
    visible: n,
    zIndex: o,
    mask: r,
    maskAnimation: i,
    maskTransitionName: a
  } = e;
  if (!r)
    return null;
  let l = {};
  return (a || i) && (l = l0({
    prefixCls: t,
    transitionName: a,
    animation: i
  })), h(Er, Q({
    appear: !0
  }, l), {
    default: () => [ti(h("div", {
      style: {
        zIndex: o
      },
      class: `${t}-mask`
    }, null), [[BE("if"), n]])]
  });
}
JI.displayName = "Mask";
const j6 = be({
  compatConfig: {
    MODE: 3
  },
  name: "MobilePopupInner",
  inheritAttrs: !1,
  props: H6,
  emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
  setup(e, t) {
    let {
      expose: n,
      slots: o
    } = t;
    const r = ce();
    return n({
      forceAlign: () => {
      },
      getElement: () => r.value
    }), () => {
      var i;
      const {
        zIndex: a,
        visible: l,
        prefixCls: s,
        mobile: {
          popupClassName: u,
          popupStyle: c,
          popupMotion: d = {},
          popupRender: f
        } = {}
      } = e, p = O({
        zIndex: a
      }, c);
      let v = go((i = o.default) === null || i === void 0 ? void 0 : i.call(o));
      v.length > 1 && (v = h("div", {
        class: `${s}-content`
      }, [v])), f && (v = f(v));
      const g = Me(s, u);
      return h(Er, Q({
        ref: r
      }, d), {
        default: () => [l ? h("div", {
          class: g,
          style: p
        }, [v]) : null]
      });
    };
  }
});
var W6 = function(e, t, n, o) {
  function r(i) {
    return i instanceof n ? i : new n(function(a) {
      a(i);
    });
  }
  return new (n || (n = Promise))(function(i, a) {
    function l(c) {
      try {
        u(o.next(c));
      } catch (d) {
        a(d);
      }
    }
    function s(c) {
      try {
        u(o.throw(c));
      } catch (d) {
        a(d);
      }
    }
    function u(c) {
      c.done ? i(c.value) : r(c.value).then(l, s);
    }
    u((o = o.apply(e, t || [])).next());
  });
};
const D1 = ["measure", "align", null, "motion"], K6 = ((e, t) => {
  const n = $e(null), o = $e(), r = $e(!1);
  function i(s) {
    r.value || (n.value = s);
  }
  function a() {
    Vt.cancel(o.value);
  }
  function l(s) {
    a(), o.value = Vt(() => {
      let u = n.value;
      switch (n.value) {
        case "align":
          u = "motion";
          break;
        case "motion":
          u = "stable";
          break;
      }
      i(u), s?.();
    });
  }
  return ke(e, () => {
    i("measure");
  }, {
    immediate: !0,
    flush: "post"
  }), Nt(() => {
    ke(n, () => {
      switch (n.value) {
        case "measure":
          t();
          break;
      }
      n.value && (o.value = Vt(() => W6(void 0, void 0, void 0, function* () {
        const s = D1.indexOf(n.value), u = D1[s + 1];
        u && s !== -1 && i(u);
      })));
    }, {
      immediate: !0,
      flush: "post"
    });
  }), qt(() => {
    r.value = !0, a();
  }), [n, l];
}), q6 = ((e) => {
  const t = $e({
    width: 0,
    height: 0
  });
  function n(r) {
    t.value = {
      width: r.offsetWidth,
      height: r.offsetHeight
    };
  }
  return [E(() => {
    const r = {};
    if (e.value) {
      const {
        width: i,
        height: a
      } = t.value;
      e.value.indexOf("height") !== -1 && a ? r.height = `${a}px` : e.value.indexOf("minHeight") !== -1 && a && (r.minHeight = `${a}px`), e.value.indexOf("width") !== -1 && i ? r.width = `${i}px` : e.value.indexOf("minWidth") !== -1 && i && (r.minWidth = `${i}px`);
    }
    return r;
  }), n];
});
function A1(e, t) {
  var n = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var o = Object.getOwnPropertySymbols(e);
    t && (o = o.filter(function(r) {
      return Object.getOwnPropertyDescriptor(e, r).enumerable;
    })), n.push.apply(n, o);
  }
  return n;
}
function N1(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? arguments[t] : {};
    t % 2 ? A1(Object(n), !0).forEach(function(o) {
      Y6(e, o, n[o]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : A1(Object(n)).forEach(function(o) {
      Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(n, o));
    });
  }
  return e;
}
function Wm(e) {
  "@babel/helpers - typeof";
  return Wm = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
    return typeof t;
  } : function(t) {
    return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
  }, Wm(e);
}
function Y6(e, t, n) {
  return t in e ? Object.defineProperty(e, t, {
    value: n,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[t] = n, e;
}
var Mc, G6 = {
  Webkit: "-webkit-",
  Moz: "-moz-",
  // IE did it wrong again ...
  ms: "-ms-",
  O: "-o-"
};
function Np() {
  if (Mc !== void 0)
    return Mc;
  Mc = "";
  var e = document.createElement("p").style, t = "Transform";
  for (var n in G6)
    n + t in e && (Mc = n);
  return Mc;
}
function e_() {
  return Np() ? "".concat(Np(), "TransitionProperty") : "transitionProperty";
}
function Dh() {
  return Np() ? "".concat(Np(), "Transform") : "transform";
}
function R1(e, t) {
  var n = e_();
  n && (e.style[n] = t, n !== "transitionProperty" && (e.style.transitionProperty = t));
}
function Zg(e, t) {
  var n = Dh();
  n && (e.style[n] = t, n !== "transform" && (e.style.transform = t));
}
function U6(e) {
  return e.style.transitionProperty || e.style[e_()];
}
function X6(e) {
  var t = window.getComputedStyle(e, null), n = t.getPropertyValue("transform") || t.getPropertyValue(Dh());
  if (n && n !== "none") {
    var o = n.replace(/[^0-9\-.,]/g, "").split(",");
    return {
      x: parseFloat(o[12] || o[4], 0),
      y: parseFloat(o[13] || o[5], 0)
    };
  }
  return {
    x: 0,
    y: 0
  };
}
var Q6 = /matrix\((.*)\)/, Z6 = /matrix3d\((.*)\)/;
function J6(e, t) {
  var n = window.getComputedStyle(e, null), o = n.getPropertyValue("transform") || n.getPropertyValue(Dh());
  if (o && o !== "none") {
    var r, i = o.match(Q6);
    if (i)
      i = i[1], r = i.split(",").map(function(l) {
        return parseFloat(l, 10);
      }), r[4] = t.x, r[5] = t.y, Zg(e, "matrix(".concat(r.join(","), ")"));
    else {
      var a = o.match(Z6)[1];
      r = a.split(",").map(function(l) {
        return parseFloat(l, 10);
      }), r[12] = t.x, r[13] = t.y, Zg(e, "matrix3d(".concat(r.join(","), ")"));
    }
  } else
    Zg(e, "translateX(".concat(t.x, "px) translateY(").concat(t.y, "px) translateZ(0)"));
}
var e5 = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source, Md;
function z1(e) {
  var t = e.style.display;
  e.style.display = "none", e.offsetHeight, e.style.display = t;
}
function Iu(e, t, n) {
  var o = n;
  if (Wm(t) === "object") {
    for (var r in t)
      t.hasOwnProperty(r) && Iu(e, r, t[r]);
    return;
  }
  if (typeof o < "u") {
    typeof o == "number" && (o = "".concat(o, "px")), e.style[t] = o;
    return;
  }
  return Md(e, t);
}
function t5(e) {
  var t, n, o, r = e.ownerDocument, i = r.body, a = r && r.documentElement;
  return t = e.getBoundingClientRect(), n = Math.floor(t.left), o = Math.floor(t.top), n -= a.clientLeft || i.clientLeft || 0, o -= a.clientTop || i.clientTop || 0, {
    left: n,
    top: o
  };
}
function t_(e, t) {
  var n = e["page".concat(t ? "Y" : "X", "Offset")], o = "scroll".concat(t ? "Top" : "Left");
  if (typeof n != "number") {
    var r = e.document;
    n = r.documentElement[o], typeof n != "number" && (n = r.body[o]);
  }
  return n;
}
function n_(e) {
  return t_(e);
}
function o_(e) {
  return t_(e, !0);
}
function bd(e) {
  var t = t5(e), n = e.ownerDocument, o = n.defaultView || n.parentWindow;
  return t.left += n_(o), t.top += o_(o), t;
}
function s0(e) {
  return e != null && e == e.window;
}
function r_(e) {
  return s0(e) ? e.document : e.nodeType === 9 ? e : e.ownerDocument;
}
function n5(e, t, n) {
  var o = n, r = "", i = r_(e);
  return o = o || i.defaultView.getComputedStyle(e, null), o && (r = o.getPropertyValue(t) || o[t]), r;
}
var o5 = new RegExp("^(".concat(e5, ")(?!px)[a-z%]+$"), "i"), r5 = /^(top|right|bottom|left)$/, Jg = "currentStyle", ev = "runtimeStyle", Zl = "left", i5 = "px";
function a5(e, t) {
  var n = e[Jg] && e[Jg][t];
  if (o5.test(n) && !r5.test(t)) {
    var o = e.style, r = o[Zl], i = e[ev][Zl];
    e[ev][Zl] = e[Jg][Zl], o[Zl] = t === "fontSize" ? "1em" : n || 0, n = o.pixelLeft + i5, o[Zl] = r, e[ev][Zl] = i;
  }
  return n === "" ? "auto" : n;
}
typeof window < "u" && (Md = window.getComputedStyle ? n5 : a5);
function xf(e, t) {
  return e === "left" ? t.useCssRight ? "right" : e : t.useCssBottom ? "bottom" : e;
}
function F1(e) {
  if (e === "left")
    return "right";
  if (e === "right")
    return "left";
  if (e === "top")
    return "bottom";
  if (e === "bottom")
    return "top";
}
function B1(e, t, n) {
  Iu(e, "position") === "static" && (e.style.position = "relative");
  var o = -999, r = -999, i = xf("left", n), a = xf("top", n), l = F1(i), s = F1(a);
  i !== "left" && (o = 999), a !== "top" && (r = 999);
  var u = "", c = bd(e);
  ("left" in t || "top" in t) && (u = U6(e) || "", R1(e, "none")), "left" in t && (e.style[l] = "", e.style[i] = "".concat(o, "px")), "top" in t && (e.style[s] = "", e.style[a] = "".concat(r, "px")), z1(e);
  var d = bd(e), f = {};
  for (var p in t)
    if (t.hasOwnProperty(p)) {
      var v = xf(p, n), g = p === "left" ? o : r, m = c[p] - d[p];
      v === p ? f[v] = g + m : f[v] = g - m;
    }
  Iu(e, f), z1(e), ("left" in t || "top" in t) && R1(e, u);
  var x = {};
  for (var S in t)
    if (t.hasOwnProperty(S)) {
      var C = xf(S, n), P = t[S] - c[S];
      S === C ? x[C] = f[C] + P : x[C] = f[C] - P;
    }
  Iu(e, x);
}
function l5(e, t) {
  var n = bd(e), o = X6(e), r = {
    x: o.x,
    y: o.y
  };
  "left" in t && (r.x = o.x + t.left - n.left), "top" in t && (r.y = o.y + t.top - n.top), J6(e, r);
}
function s5(e, t, n) {
  if (n.ignoreShake) {
    var o = bd(e), r = o.left.toFixed(0), i = o.top.toFixed(0), a = t.left.toFixed(0), l = t.top.toFixed(0);
    if (r === a && i === l)
      return;
  }
  n.useCssRight || n.useCssBottom ? B1(e, t, n) : n.useCssTransform && Dh() in document.body.style ? l5(e, t) : B1(e, t, n);
}
function u0(e, t) {
  for (var n = 0; n < e.length; n++)
    t(e[n]);
}
function i_(e) {
  return Md(e, "boxSizing") === "border-box";
}
var u5 = ["margin", "border", "padding"], Km = -1, c5 = 2, qm = 1, d5 = 0;
function f5(e, t, n) {
  var o = {}, r = e.style, i;
  for (i in t)
    t.hasOwnProperty(i) && (o[i] = r[i], r[i] = t[i]);
  n.call(e);
  for (i in t)
    t.hasOwnProperty(i) && (r[i] = o[i]);
}
function Hc(e, t, n) {
  var o = 0, r, i, a;
  for (i = 0; i < t.length; i++)
    if (r = t[i], r)
      for (a = 0; a < n.length; a++) {
        var l = void 0;
        r === "border" ? l = "".concat(r).concat(n[a], "Width") : l = r + n[a], o += parseFloat(Md(e, l)) || 0;
      }
  return o;
}
var Xi = {
  getParent: function(t) {
    var n = t;
    do
      n.nodeType === 11 && n.host ? n = n.host : n = n.parentNode;
    while (n && n.nodeType !== 1 && n.nodeType !== 9);
    return n;
  }
};
u0(["Width", "Height"], function(e) {
  Xi["doc".concat(e)] = function(t) {
    var n = t.document;
    return Math.max(
      // firefox chrome documentElement.scrollHeight< body.scrollHeight
      // ie standard mode : documentElement.scrollHeight> body.scrollHeight
      n.documentElement["scroll".concat(e)],
      // quirks : documentElement.scrollHeight 最大等于可视窗口多一点？
      n.body["scroll".concat(e)],
      Xi["viewport".concat(e)](n)
    );
  }, Xi["viewport".concat(e)] = function(t) {
    var n = "client".concat(e), o = t.document, r = o.body, i = o.documentElement, a = i[n];
    return o.compatMode === "CSS1Compat" && a || r && r[n] || a;
  };
});
function L1(e, t, n) {
  var o = n;
  if (s0(e))
    return t === "width" ? Xi.viewportWidth(e) : Xi.viewportHeight(e);
  if (e.nodeType === 9)
    return t === "width" ? Xi.docWidth(e) : Xi.docHeight(e);
  var r = t === "width" ? ["Left", "Right"] : ["Top", "Bottom"], i = Math.floor(t === "width" ? e.getBoundingClientRect().width : e.getBoundingClientRect().height), a = i_(e), l = 0;
  (i == null || i <= 0) && (i = void 0, l = Md(e, t), (l == null || Number(l) < 0) && (l = e.style[t] || 0), l = Math.floor(parseFloat(l)) || 0), o === void 0 && (o = a ? qm : Km);
  var s = i !== void 0 || a, u = i || l;
  return o === Km ? s ? u - Hc(e, ["border", "padding"], r) : l : s ? o === qm ? u : u + (o === c5 ? -Hc(e, ["border"], r) : Hc(e, ["margin"], r)) : l + Hc(e, u5.slice(o), r);
}
var p5 = {
  position: "absolute",
  visibility: "hidden",
  display: "block"
};
function H1() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  var o, r = t[0];
  return r.offsetWidth !== 0 ? o = L1.apply(void 0, t) : f5(r, p5, function() {
    o = L1.apply(void 0, t);
  }), o;
}
u0(["width", "height"], function(e) {
  var t = e.charAt(0).toUpperCase() + e.slice(1);
  Xi["outer".concat(t)] = function(o, r) {
    return o && H1(o, e, r ? d5 : qm);
  };
  var n = e === "width" ? ["Left", "Right"] : ["Top", "Bottom"];
  Xi[e] = function(o, r) {
    var i = r;
    if (i !== void 0) {
      if (o) {
        var a = i_(o);
        return a && (i += Hc(o, ["padding", "border"], n)), Iu(o, e, i);
      }
      return;
    }
    return o && H1(o, e, Km);
  };
});
function a_(e, t) {
  for (var n in t)
    t.hasOwnProperty(n) && (e[n] = t[n]);
  return e;
}
var Jt = {
  getWindow: function(t) {
    if (t && t.document && t.setTimeout)
      return t;
    var n = t.ownerDocument || t;
    return n.defaultView || n.parentWindow;
  },
  getDocument: r_,
  offset: function(t, n, o) {
    if (typeof n < "u")
      s5(t, n, o || {});
    else
      return bd(t);
  },
  isWindow: s0,
  each: u0,
  css: Iu,
  clone: function(t) {
    var n, o = {};
    for (n in t)
      t.hasOwnProperty(n) && (o[n] = t[n]);
    var r = t.overflow;
    if (r)
      for (n in t)
        t.hasOwnProperty(n) && (o.overflow[n] = t.overflow[n]);
    return o;
  },
  mix: a_,
  getWindowScrollLeft: function(t) {
    return n_(t);
  },
  getWindowScrollTop: function(t) {
    return o_(t);
  },
  merge: function() {
    for (var t = {}, n = 0; n < arguments.length; n++)
      Jt.mix(t, n < 0 || arguments.length <= n ? void 0 : arguments[n]);
    return t;
  },
  viewportWidth: 0,
  viewportHeight: 0
};
a_(Jt, Xi);
var tv = Jt.getParent;
function Ym(e) {
  if (Jt.isWindow(e) || e.nodeType === 9)
    return null;
  var t = Jt.getDocument(e), n = t.body, o, r = Jt.css(e, "position"), i = r === "fixed" || r === "absolute";
  if (!i)
    return e.nodeName.toLowerCase() === "html" ? null : tv(e);
  for (o = tv(e); o && o !== n && o.nodeType !== 9; o = tv(o))
    if (r = Jt.css(o, "position"), r !== "static")
      return o;
  return null;
}
var V1 = Jt.getParent;
function h5(e) {
  if (Jt.isWindow(e) || e.nodeType === 9)
    return !1;
  var t = Jt.getDocument(e), n = t.body, o = null;
  for (
    o = V1(e);
    // 修复元素位于 document.documentElement 下导致崩溃问题
    o && o !== n && o !== t;
    o = V1(o)
  ) {
    var r = Jt.css(o, "position");
    if (r === "fixed")
      return !0;
  }
  return !1;
}
function c0(e, t) {
  for (var n = {
    left: 0,
    right: 1 / 0,
    top: 0,
    bottom: 1 / 0
  }, o = Ym(e), r = Jt.getDocument(e), i = r.defaultView || r.parentWindow, a = r.body, l = r.documentElement; o; ) {
    if ((navigator.userAgent.indexOf("MSIE") === -1 || o.clientWidth !== 0) && // body may have overflow set on it, yet we still get the entire
    // viewport. In some browsers, el.offsetParent may be
    // document.documentElement, so check for that too.
    o !== a && o !== l && Jt.css(o, "overflow") !== "visible") {
      var s = Jt.offset(o);
      s.left += o.clientLeft, s.top += o.clientTop, n.top = Math.max(n.top, s.top), n.right = Math.min(
        n.right,
        // consider area without scrollBar
        s.left + o.clientWidth
      ), n.bottom = Math.min(n.bottom, s.top + o.clientHeight), n.left = Math.max(n.left, s.left);
    } else if (o === a || o === l)
      break;
    o = Ym(o);
  }
  var u = null;
  if (!Jt.isWindow(e) && e.nodeType !== 9) {
    u = e.style.position;
    var c = Jt.css(e, "position");
    c === "absolute" && (e.style.position = "fixed");
  }
  var d = Jt.getWindowScrollLeft(i), f = Jt.getWindowScrollTop(i), p = Jt.viewportWidth(i), v = Jt.viewportHeight(i), g = l.scrollWidth, m = l.scrollHeight, x = window.getComputedStyle(a);
  if (x.overflowX === "hidden" && (g = i.innerWidth), x.overflowY === "hidden" && (m = i.innerHeight), e.style && (e.style.position = u), t || h5(e))
    n.left = Math.max(n.left, d), n.top = Math.max(n.top, f), n.right = Math.min(n.right, d + p), n.bottom = Math.min(n.bottom, f + v);
  else {
    var S = Math.max(g, d + p);
    n.right = Math.min(n.right, S);
    var C = Math.max(m, f + v);
    n.bottom = Math.min(n.bottom, C);
  }
  return n.top >= 0 && n.left >= 0 && n.bottom > n.top && n.right > n.left ? n : null;
}
function g5(e, t, n, o) {
  var r = Jt.clone(e), i = {
    width: t.width,
    height: t.height
  };
  return o.adjustX && r.left < n.left && (r.left = n.left), o.resizeWidth && r.left >= n.left && r.left + i.width > n.right && (i.width -= r.left + i.width - n.right), o.adjustX && r.left + i.width > n.right && (r.left = Math.max(n.right - i.width, n.left)), o.adjustY && r.top < n.top && (r.top = n.top), o.resizeHeight && r.top >= n.top && r.top + i.height > n.bottom && (i.height -= r.top + i.height - n.bottom), o.adjustY && r.top + i.height > n.bottom && (r.top = Math.max(n.bottom - i.height, n.top)), Jt.mix(r, i);
}
function d0(e) {
  var t, n, o;
  if (!Jt.isWindow(e) && e.nodeType !== 9)
    t = Jt.offset(e), n = Jt.outerWidth(e), o = Jt.outerHeight(e);
  else {
    var r = Jt.getWindow(e);
    t = {
      left: Jt.getWindowScrollLeft(r),
      top: Jt.getWindowScrollTop(r)
    }, n = Jt.viewportWidth(r), o = Jt.viewportHeight(r);
  }
  return t.width = n, t.height = o, t;
}
function j1(e, t) {
  var n = t.charAt(0), o = t.charAt(1), r = e.width, i = e.height, a = e.left, l = e.top;
  return n === "c" ? l += i / 2 : n === "b" && (l += i), o === "c" ? a += r / 2 : o === "r" && (a += r), {
    left: a,
    top: l
  };
}
function wf(e, t, n, o, r) {
  var i = j1(t, n[1]), a = j1(e, n[0]), l = [a.left - i.left, a.top - i.top];
  return {
    left: Math.round(e.left - l[0] + o[0] - r[0]),
    top: Math.round(e.top - l[1] + o[1] - r[1])
  };
}
function W1(e, t, n) {
  return e.left < n.left || e.left + t.width > n.right;
}
function K1(e, t, n) {
  return e.top < n.top || e.top + t.height > n.bottom;
}
function v5(e, t, n) {
  return e.left > n.right || e.left + t.width < n.left;
}
function m5(e, t, n) {
  return e.top > n.bottom || e.top + t.height < n.top;
}
function Sf(e, t, n) {
  var o = [];
  return Jt.each(e, function(r) {
    o.push(r.replace(t, function(i) {
      return n[i];
    }));
  }), o;
}
function Cf(e, t) {
  return e[t] = -e[t], e;
}
function q1(e, t) {
  var n;
  return /%$/.test(e) ? n = parseInt(e.substring(0, e.length - 1), 10) / 100 * t : n = parseInt(e, 10), n || 0;
}
function Y1(e, t) {
  e[0] = q1(e[0], t.width), e[1] = q1(e[1], t.height);
}
function l_(e, t, n, o) {
  var r = n.points, i = n.offset || [0, 0], a = n.targetOffset || [0, 0], l = n.overflow, s = n.source || e;
  i = [].concat(i), a = [].concat(a), l = l || {};
  var u = {}, c = 0, d = !!(l && l.alwaysByViewport), f = c0(s, d), p = d0(s);
  Y1(i, p), Y1(a, t);
  var v = wf(p, t, r, i, a), g = Jt.merge(p, v);
  if (f && (l.adjustX || l.adjustY) && o) {
    if (l.adjustX && W1(v, p, f)) {
      var m = Sf(r, /[lr]/gi, {
        l: "r",
        r: "l"
      }), x = Cf(i, 0), S = Cf(a, 0), C = wf(p, t, m, x, S);
      v5(C, p, f) || (c = 1, r = m, i = x, a = S);
    }
    if (l.adjustY && K1(v, p, f)) {
      var P = Sf(r, /[tb]/gi, {
        t: "b",
        b: "t"
      }), $ = Cf(i, 1), I = Cf(a, 1), w = wf(p, t, P, $, I);
      m5(w, p, f) || (c = 1, r = P, i = $, a = I);
    }
    c && (v = wf(p, t, r, i, a), Jt.mix(g, v));
    var _ = W1(v, p, f), M = K1(v, p, f);
    if (_ || M) {
      var N = r;
      _ && (N = Sf(r, /[lr]/gi, {
        l: "r",
        r: "l"
      })), M && (N = Sf(r, /[tb]/gi, {
        t: "b",
        b: "t"
      })), r = N, i = n.offset || [0, 0], a = n.targetOffset || [0, 0];
    }
    u.adjustX = l.adjustX && _, u.adjustY = l.adjustY && M, (u.adjustX || u.adjustY) && (g = g5(v, p, f, u));
  }
  return g.width !== p.width && Jt.css(s, "width", Jt.width(s) + g.width - p.width), g.height !== p.height && Jt.css(s, "height", Jt.height(s) + g.height - p.height), Jt.offset(s, {
    left: g.left,
    top: g.top
  }, {
    useCssRight: n.useCssRight,
    useCssBottom: n.useCssBottom,
    useCssTransform: n.useCssTransform,
    ignoreShake: n.ignoreShake
  }), {
    points: r,
    offset: i,
    targetOffset: a,
    overflow: u
  };
}
function b5(e, t) {
  var n = c0(e, t), o = d0(e);
  return !n || o.left + o.width <= n.left || o.top + o.height <= n.top || o.left >= n.right || o.top >= n.bottom;
}
function f0(e, t, n) {
  var o = n.target || t, r = d0(o), i = !b5(o, n.overflow && n.overflow.alwaysByViewport);
  return l_(e, r, n, i);
}
f0.__getOffsetParent = Ym;
f0.__getVisibleRectForElement = c0;
function y5(e, t, n) {
  var o, r, i = Jt.getDocument(e), a = i.defaultView || i.parentWindow, l = Jt.getWindowScrollLeft(a), s = Jt.getWindowScrollTop(a), u = Jt.viewportWidth(a), c = Jt.viewportHeight(a);
  "pageX" in t ? o = t.pageX : o = l + t.clientX, "pageY" in t ? r = t.pageY : r = s + t.clientY;
  var d = {
    left: o,
    top: r,
    width: 0,
    height: 0
  }, f = o >= 0 && o <= l + u && r >= 0 && r <= s + c, p = [n.points[0], "cc"];
  return l_(e, d, N1(N1({}, n), {}, {
    points: p
  }), f);
}
function Xn(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, r = e;
  if (Array.isArray(e) && (r = Do(e)[0]), !r)
    return null;
  const i = Ml(r, t, o);
  return i.props = n ? O(O({}, i.props), t) : i.props, wo(typeof i.props.class != "object", "class must be string"), i;
}
function x5(e, t, n) {
  El(Ml(e, O({}, t)), n);
}
const s_ = (e) => (e || []).some((t) => cr(t) ? !(t.type === VP || t.type === Je && !s_(t.children)) : !0) ? e : null;
function Ah(e, t, n, o) {
  var r;
  const i = (r = e[t]) === null || r === void 0 ? void 0 : r.call(e, n);
  return s_(i) ? i : o?.();
}
const Nh = ((e) => {
  if (!e)
    return !1;
  if (e.offsetParent)
    return !0;
  if (e.getBBox) {
    const t = e.getBBox();
    if (t.width || t.height)
      return !0;
  }
  if (e.getBoundingClientRect) {
    const t = e.getBoundingClientRect();
    if (t.width || t.height)
      return !0;
  }
  return !1;
});
function w5(e, t) {
  return e === t ? !0 : !e || !t ? !1 : "pageX" in t && "pageY" in t ? e.pageX === t.pageX && e.pageY === t.pageY : "clientX" in t && "clientY" in t ? e.clientX === t.clientX && e.clientY === t.clientY : !1;
}
function S5(e, t) {
  e !== document.activeElement && bl(t, e) && typeof e.focus == "function" && e.focus();
}
function G1(e, t) {
  let n = null, o = null;
  function r(a) {
    let [{
      target: l
    }] = a;
    if (!document.documentElement.contains(l)) return;
    const {
      width: s,
      height: u
    } = l.getBoundingClientRect(), c = Math.floor(s), d = Math.floor(u);
    (n !== c || o !== d) && Promise.resolve().then(() => {
      t({
        width: c,
        height: d
      });
    }), n = c, o = d;
  }
  const i = new Yk(r);
  return e && i.observe(e), () => {
    i.disconnect();
  };
}
const C5 = ((e, t) => {
  let n = !1, o = null;
  function r() {
    clearTimeout(o);
  }
  function i(a) {
    if (!n || a === !0) {
      if (e() === !1)
        return;
      n = !0, r(), o = setTimeout(() => {
        n = !1;
      }, t.value);
    } else
      r(), o = setTimeout(() => {
        n = !1, i();
      }, t.value);
  }
  return [i, () => {
    n = !1, r();
  }];
}), $5 = {
  align: Object,
  target: [Object, Function],
  onAlign: Function,
  monitorBufferTime: Number,
  monitorWindowResize: Boolean,
  disabled: Boolean
};
function U1(e) {
  return typeof e != "function" ? null : e();
}
function X1(e) {
  return typeof e != "object" || !e ? null : e;
}
const P5 = be({
  compatConfig: {
    MODE: 3
  },
  name: "Align",
  props: $5,
  emits: ["align"],
  setup(e, t) {
    let {
      expose: n,
      slots: o
    } = t;
    const r = ce({}), i = ce(), [a, l] = C5(() => {
      const {
        disabled: f,
        target: p,
        align: v,
        onAlign: g
      } = e;
      if (!f && p && i.value) {
        const m = i.value;
        let x;
        const S = U1(p), C = X1(p);
        r.value.element = S, r.value.point = C, r.value.align = v;
        const {
          activeElement: P
        } = document;
        return S && Nh(S) ? x = f0(m, S, v) : C && (x = y5(m, C, v)), S5(P, m), g && x && g(m, x), !0;
      }
      return !1;
    }, E(() => e.monitorBufferTime)), s = ce({
      cancel: () => {
      }
    }), u = ce({
      cancel: () => {
      }
    }), c = () => {
      const f = e.target, p = U1(f), v = X1(f);
      i.value !== u.value.element && (u.value.cancel(), u.value.element = i.value, u.value.cancel = G1(i.value, a)), (r.value.element !== p || !w5(r.value.point, v) || !sy(r.value.align, e.align)) && (a(), s.value.element !== p && (s.value.cancel(), s.value.element = p, s.value.cancel = G1(p, a)));
    };
    Nt(() => {
      Yt(() => {
        c();
      });
    }), Ya(() => {
      Yt(() => {
        c();
      });
    }), ke(() => e.disabled, (f) => {
      f ? l() : a();
    }, {
      immediate: !0,
      flush: "post"
    });
    const d = ce(null);
    return ke(() => e.monitorWindowResize, (f) => {
      f ? d.value || (d.value = Ho(window, "resize", a)) : d.value && (d.value.remove(), d.value = null);
    }, {
      flush: "post"
    }), jo(() => {
      s.value.cancel(), u.value.cancel(), d.value && d.value.remove(), l();
    }), n({
      forceAlign: () => a(!0)
    }), () => {
      const f = o?.default();
      return f ? Xn(f[0], {
        ref: i
      }, !0, !0) : null;
    };
  }
});
Dr("bottomLeft", "bottomRight", "topLeft", "topRight");
const O5 = (e) => e !== void 0 && (e === "topLeft" || e === "topRight") ? "slide-down" : "slide-up", Ms = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  return O(e ? {
    name: e,
    appear: !0,
    // type: 'animation',
    // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
    // appearActiveClass: `antdv-base-transtion`,
    // appearToClass: `${transitionName}-appear ${transitionName}-appear-active`,
    enterFromClass: `${e}-enter ${e}-enter-prepare ${e}-enter-start`,
    enterActiveClass: `${e}-enter ${e}-enter-prepare`,
    enterToClass: `${e}-enter ${e}-enter-active`,
    leaveFromClass: ` ${e}-leave`,
    leaveActiveClass: `${e}-leave ${e}-leave-active`,
    leaveToClass: `${e}-leave ${e}-leave-active`
  } : {
    css: !1
  }, t);
}, p0 = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  return O(e ? {
    name: e,
    appear: !0,
    // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
    appearActiveClass: `${e}`,
    appearToClass: `${e}-appear ${e}-appear-active`,
    enterFromClass: `${e}-appear ${e}-enter ${e}-appear-prepare ${e}-enter-prepare`,
    enterActiveClass: `${e}`,
    enterToClass: `${e}-enter ${e}-appear ${e}-appear-active ${e}-enter-active`,
    leaveActiveClass: `${e} ${e}-leave`,
    leaveToClass: `${e}-leave-active`
  } : {
    css: !1
  }, t);
}, Wa = (e, t, n) => n !== void 0 ? n : `${e}-${t}`, k5 = be({
  compatConfig: {
    MODE: 3
  },
  name: "PopupInner",
  inheritAttrs: !1,
  props: a0,
  emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
  setup(e, t) {
    let {
      expose: n,
      attrs: o,
      slots: r
    } = t;
    const i = $e(), a = $e(), l = $e(), [s, u] = q6(Kt(e, "stretch")), c = () => {
      e.stretch && u(e.getRootDomNode());
    }, d = $e(!1);
    let f;
    ke(() => e.visible, (I) => {
      clearTimeout(f), I ? f = setTimeout(() => {
        d.value = e.visible;
      }) : d.value = !1;
    }, {
      immediate: !0
    });
    const [p, v] = K6(d, c), g = $e(), m = () => e.point ? e.point : e.getRootDomNode, x = () => {
      var I;
      (I = i.value) === null || I === void 0 || I.forceAlign();
    }, S = (I, w) => {
      var _;
      const M = e.getClassNameFromAlign(w), N = l.value;
      l.value !== M && (l.value = M), p.value === "align" && (N !== M ? Promise.resolve().then(() => {
        x();
      }) : v(() => {
        var A;
        (A = g.value) === null || A === void 0 || A.call(g);
      }), (_ = e.onAlign) === null || _ === void 0 || _.call(e, I, w));
    }, C = E(() => {
      const I = typeof e.animation == "object" ? e.animation : l0(e);
      return ["onAfterEnter", "onAfterLeave"].forEach((w) => {
        const _ = I[w];
        I[w] = (M) => {
          v(), p.value = "stable", _?.(M);
        };
      }), I;
    }), P = () => new Promise((I) => {
      g.value = I;
    });
    ke([C, p], () => {
      !C.value && p.value === "motion" && v();
    }, {
      immediate: !0
    }), n({
      forceAlign: x,
      getElement: () => a.value.$el || a.value
    });
    const $ = E(() => {
      var I;
      return !(!((I = e.align) === null || I === void 0) && I.points && (p.value === "align" || p.value === "stable"));
    });
    return () => {
      var I;
      const {
        zIndex: w,
        align: _,
        prefixCls: M,
        destroyPopupOnHide: N,
        onMouseenter: A,
        onMouseleave: H,
        onTouchstart: B = () => {
        },
        onMousedown: F
      } = e, R = p.value, X = [O(O({}, s.value), {
        zIndex: w,
        opacity: R === "motion" || R === "stable" || !d.value ? null : 0,
        // pointerEvents: statusValue === 'stable' ? null : 'none',
        pointerEvents: !d.value && R !== "stable" ? "none" : null
      }), o.style];
      let j = go((I = r.default) === null || I === void 0 ? void 0 : I.call(r, {
        visible: e.visible
      }));
      j.length > 1 && (j = h("div", {
        class: `${M}-content`
      }, [j]));
      const ee = Me(M, o.class, l.value, !e.arrow && `${M}-arrow-hidden`), K = d.value || !e.visible ? Ms(C.value.name, C.value) : {};
      return h(Er, Q(Q({
        ref: a
      }, K), {}, {
        onBeforeEnter: P
      }), {
        default: () => !N || e.visible ? ti(h(P5, {
          target: m(),
          key: "popup",
          ref: i,
          monitorWindowResize: !0,
          disabled: $.value,
          align: _,
          onAlign: S
        }, {
          default: () => h("div", {
            class: ee,
            onMouseenter: A,
            onMouseleave: H,
            onMousedown: ur(F, ["capture"]),
            [Bo ? "onTouchstartPassive" : "onTouchstart"]: ur(B, ["capture"]),
            style: X
          }, [j])
        }), [[Oi, d.value]]) : null
      });
    };
  }
}), I5 = be({
  compatConfig: {
    MODE: 3
  },
  name: "Popup",
  inheritAttrs: !1,
  props: V6,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      expose: r
    } = t;
    const i = $e(!1), a = $e(!1), l = $e(), s = $e();
    return ke([() => e.visible, () => e.mobile], () => {
      i.value = e.visible, e.visible && e.mobile && (a.value = !0);
    }, {
      immediate: !0,
      flush: "post"
    }), r({
      forceAlign: () => {
        var u;
        (u = l.value) === null || u === void 0 || u.forceAlign();
      },
      getElement: () => {
        var u;
        return (u = l.value) === null || u === void 0 ? void 0 : u.getElement();
      }
    }), () => {
      const u = O(O(O({}, e), n), {
        visible: i.value
      }), c = a.value ? h(j6, Q(Q({}, u), {}, {
        mobile: e.mobile,
        ref: l
      }), {
        default: o.default
      }) : h(k5, Q(Q({}, u), {}, {
        ref: l
      }), {
        default: o.default
      });
      return h("div", {
        ref: s
      }, [h(JI, u, null), c]);
    };
  }
});
function _5(e, t, n) {
  return n ? e[0] === t[0] : e[0] === t[0] && e[1] === t[1];
}
function Q1(e, t, n) {
  const o = e[t] || {};
  return O(O({}, o), n);
}
function T5(e, t, n, o) {
  const {
    points: r
  } = n, i = Object.keys(e);
  for (let a = 0; a < i.length; a += 1) {
    const l = i[a];
    if (_5(e[l].points, r, o))
      return `${t}-placement-${l}`;
  }
  return "";
}
const Ed = {
  methods: {
    setState() {
      let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0, n = typeof e == "function" ? e(this.$data, this.$props) : e;
      if (this.getDerivedStateFromProps) {
        const o = this.getDerivedStateFromProps(g8(this), O(O({}, this.$data), n));
        if (o === null)
          return;
        n = O(O({}, n), o || {});
      }
      O(this.$data, n), this._.isMounted && this.$forceUpdate(), Yt(() => {
        t && t();
      });
    },
    __emit() {
      const e = [].slice.call(arguments, 0);
      let t = e[0];
      t = `on${t[0].toUpperCase()}${t.substring(1)}`;
      const n = this.$props[t] || this.$attrs[t];
      if (e.length && n)
        if (Array.isArray(n))
          for (let o = 0, r = n.length; o < r; o++)
            n[o](...e.slice(1));
        else
          n(...e.slice(1));
    }
  }
}, u_ = Symbol("PortalContextKey"), h0 = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
    inTriggerContext: !0
  };
  Ft(u_, {
    inTriggerContext: t.inTriggerContext,
    shouldRender: E(() => {
      const {
        sPopupVisible: n,
        popupRef: o,
        forceRender: r,
        autoDestroy: i
      } = e || {};
      let a = !1;
      return (n || o || r) && (a = !0), !n && i && (a = !1), a;
    })
  });
}, M5 = () => {
  h0({}, {
    inTriggerContext: !1
  });
  const e = zt(u_, {
    shouldRender: E(() => !1),
    inTriggerContext: !1
  });
  return {
    shouldRender: E(() => e.shouldRender.value || e.inTriggerContext === !1)
  };
}, c_ = be({
  compatConfig: {
    MODE: 3
  },
  name: "Portal",
  inheritAttrs: !1,
  props: {
    getContainer: fe.func.isRequired,
    didUpdate: Function
  },
  setup(e, t) {
    let {
      slots: n
    } = t, o = !0, r;
    const {
      shouldRender: i
    } = M5();
    function a() {
      i.value && (r = e.getContainer());
    }
    th(() => {
      o = !1, a();
    }), Nt(() => {
      r || a();
    });
    const l = ke(i, () => {
      i.value && !r && (r = e.getContainer()), r && l();
    });
    return Ya(() => {
      Yt(() => {
        var s;
        i.value && ((s = e.didUpdate) === null || s === void 0 || s.call(e, e));
      });
    }), () => {
      var s;
      return i.value ? o ? (s = n.default) === null || s === void 0 ? void 0 : s.call(n) : r ? h(nh, {
        to: r
      }, n) : null : null;
    };
  }
});
let nv;
function Rp(e) {
  if (typeof document > "u")
    return 0;
  if (nv === void 0) {
    const t = document.createElement("div");
    t.style.width = "100%", t.style.height = "200px";
    const n = document.createElement("div"), o = n.style;
    o.position = "absolute", o.top = "0", o.left = "0", o.pointerEvents = "none", o.visibility = "hidden", o.width = "200px", o.height = "150px", o.overflow = "hidden", n.appendChild(t), document.body.appendChild(n);
    const r = t.offsetWidth;
    n.style.overflow = "scroll";
    let i = t.offsetWidth;
    r === i && (i = n.clientWidth), document.body.removeChild(n), nv = r - i;
  }
  return nv;
}
function Z1(e) {
  const t = e.match(/^(.*)px$/), n = Number(t?.[1]);
  return Number.isNaN(n) ? Rp() : n;
}
function E5(e) {
  if (typeof document > "u" || !e || !(e instanceof Element))
    return {
      width: 0,
      height: 0
    };
  const {
    width: t,
    height: n
  } = getComputedStyle(e, "::-webkit-scrollbar");
  return {
    width: Z1(t),
    height: Z1(n)
  };
}
const D5 = `vc-util-locker-${Date.now()}`;
let J1 = 0;
function A5() {
  return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
}
function N5(e) {
  const t = E(() => !!e && !!e.value);
  J1 += 1;
  const n = `${D5}_${J1}`;
  It((o) => {
    if (xr()) {
      if (t.value) {
        const r = Rp(), i = A5();
        hd(`
html body {
  overflow-y: hidden;
  ${i ? `width: calc(100% - ${r}px);` : ""}
}`, n);
      } else
        Ep(n);
      o(() => {
        Ep(n);
      });
    }
  }, {
    flush: "post"
  });
}
let Jl = 0;
const np = xr(), eS = (e) => {
  if (!np)
    return null;
  if (e) {
    if (typeof e == "string")
      return document.querySelectorAll(e)[0];
    if (typeof e == "function")
      return e();
    if (typeof e == "object" && e instanceof window.HTMLElement)
      return e;
  }
  return document.body;
}, g0 = be({
  compatConfig: {
    MODE: 3
  },
  name: "PortalWrapper",
  inheritAttrs: !1,
  props: {
    wrapperClassName: String,
    forceRender: {
      type: Boolean,
      default: void 0
    },
    getContainer: fe.any,
    visible: {
      type: Boolean,
      default: void 0
    },
    autoLock: ct(),
    didUpdate: Function
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = $e(), r = $e(), i = $e(), a = $e(1), l = xr() && document.createElement("div"), s = () => {
      var p, v;
      o.value === l && ((v = (p = o.value) === null || p === void 0 ? void 0 : p.parentNode) === null || v === void 0 || v.removeChild(o.value)), o.value = null;
    };
    let u = null;
    const c = function() {
      return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1) || o.value && !o.value.parentNode ? (u = eS(e.getContainer), u ? (u.appendChild(o.value), !0) : !1) : !0;
    }, d = () => np ? (o.value || (o.value = l, c(!0)), f(), o.value) : null, f = () => {
      const {
        wrapperClassName: p
      } = e;
      o.value && p && p !== o.value.className && (o.value.className = p);
    };
    return Ya(() => {
      f(), c();
    }), N5(E(() => e.autoLock && e.visible && xr() && (o.value === document.body || o.value === l))), Nt(() => {
      let p = !1;
      ke([() => e.visible, () => e.getContainer], (v, g) => {
        let [m, x] = v, [S, C] = g;
        np && (u = eS(e.getContainer), u === document.body && (m && !S ? Jl += 1 : p && (Jl -= 1))), p && (typeof x == "function" && typeof C == "function" ? x.toString() !== C.toString() : x !== C) && s(), p = !0;
      }, {
        immediate: !0,
        flush: "post"
      }), Yt(() => {
        c() || (i.value = Vt(() => {
          a.value += 1;
        }));
      });
    }), qt(() => {
      const {
        visible: p
      } = e;
      np && u === document.body && (Jl = p && Jl ? Jl - 1 : Jl), s(), Vt.cancel(i.value);
    }), () => {
      const {
        forceRender: p,
        visible: v
      } = e;
      let g = null;
      const m = {
        getOpenCount: () => Jl,
        getContainer: d
      };
      return a.value && (p || v || r.value) && (g = h(c_, {
        getContainer: d,
        ref: r,
        didUpdate: e.didUpdate
      }, {
        default: () => {
          var x;
          return (x = n.default) === null || x === void 0 ? void 0 : x.call(n, m);
        }
      })), g;
    };
  }
}), R5 = ["onClick", "onMousedown", "onTouchstart", "onMouseenter", "onMouseleave", "onFocus", "onBlur", "onContextmenu"], Dd = be({
  compatConfig: {
    MODE: 3
  },
  name: "Trigger",
  mixins: [Ed],
  inheritAttrs: !1,
  props: L6(),
  setup(e) {
    const t = E(() => {
      const {
        popupPlacement: r,
        popupAlign: i,
        builtinPlacements: a
      } = e;
      return r && a ? Q1(a, r, i) : i;
    }), n = $e(null), o = (r) => {
      n.value = r;
    };
    return {
      vcTriggerContext: zt("vcTriggerContext", {}),
      popupRef: n,
      setPopupRef: o,
      triggerRef: $e(null),
      align: t,
      focusTime: null,
      clickOutsideHandler: null,
      contextmenuOutsideHandler1: null,
      contextmenuOutsideHandler2: null,
      touchOutsideHandler: null,
      attachId: null,
      delayTimer: null,
      hasPopupMouseDown: !1,
      preClickTime: null,
      preTouchTime: null,
      mouseDownTimeout: null,
      childOriginEvents: {}
    };
  },
  data() {
    const e = this.$props;
    let t;
    return this.popupVisible !== void 0 ? t = !!e.popupVisible : t = !!e.defaultPopupVisible, R5.forEach((n) => {
      this[`fire${n}`] = (o) => {
        this.fireEvents(n, o);
      };
    }), {
      prevPopupVisible: t,
      sPopupVisible: t,
      point: null
    };
  },
  watch: {
    popupVisible(e) {
      e !== void 0 && (this.prevPopupVisible = this.sPopupVisible, this.sPopupVisible = e);
    }
  },
  created() {
    Ft("vcTriggerContext", {
      onPopupMouseDown: this.onPopupMouseDown,
      onPopupMouseenter: this.onPopupMouseenter,
      onPopupMouseleave: this.onPopupMouseleave
    }), h0(this);
  },
  deactivated() {
    this.setPopupVisible(!1);
  },
  mounted() {
    this.$nextTick(() => {
      this.updatedCal();
    });
  },
  updated() {
    this.$nextTick(() => {
      this.updatedCal();
    });
  },
  beforeUnmount() {
    this.clearDelayTimer(), this.clearOutsideHandler(), clearTimeout(this.mouseDownTimeout), Vt.cancel(this.attachId);
  },
  methods: {
    updatedCal() {
      const e = this.$props;
      if (this.$data.sPopupVisible) {
        let n;
        !this.clickOutsideHandler && (this.isClickToHide() || this.isContextmenuToShow()) && (n = e.getDocument(this.getRootDomNode()), this.clickOutsideHandler = Ho(n, "mousedown", this.onDocumentClick)), this.touchOutsideHandler || (n = n || e.getDocument(this.getRootDomNode()), this.touchOutsideHandler = Ho(n, "touchstart", this.onDocumentClick, Bo ? {
          passive: !1
        } : !1)), !this.contextmenuOutsideHandler1 && this.isContextmenuToShow() && (n = n || e.getDocument(this.getRootDomNode()), this.contextmenuOutsideHandler1 = Ho(n, "scroll", this.onContextmenuClose)), !this.contextmenuOutsideHandler2 && this.isContextmenuToShow() && (this.contextmenuOutsideHandler2 = Ho(window, "blur", this.onContextmenuClose));
      } else
        this.clearOutsideHandler();
    },
    onMouseenter(e) {
      const {
        mouseEnterDelay: t
      } = this.$props;
      this.fireEvents("onMouseenter", e), this.delaySetPopupVisible(!0, t, t ? null : e);
    },
    onMouseMove(e) {
      this.fireEvents("onMousemove", e), this.setPoint(e);
    },
    onMouseleave(e) {
      this.fireEvents("onMouseleave", e), this.delaySetPopupVisible(!1, this.$props.mouseLeaveDelay);
    },
    onPopupMouseenter() {
      const {
        vcTriggerContext: e = {}
      } = this;
      e.onPopupMouseenter && e.onPopupMouseenter(), this.clearDelayTimer();
    },
    onPopupMouseleave(e) {
      var t;
      if (e && e.relatedTarget && !e.relatedTarget.setTimeout && bl((t = this.popupRef) === null || t === void 0 ? void 0 : t.getElement(), e.relatedTarget))
        return;
      this.isMouseLeaveToHide() && this.delaySetPopupVisible(!1, this.$props.mouseLeaveDelay);
      const {
        vcTriggerContext: n = {}
      } = this;
      n.onPopupMouseleave && n.onPopupMouseleave(e);
    },
    onFocus(e) {
      this.fireEvents("onFocus", e), this.clearDelayTimer(), this.isFocusToShow() && (this.focusTime = Date.now(), this.delaySetPopupVisible(!0, this.$props.focusDelay));
    },
    onMousedown(e) {
      this.fireEvents("onMousedown", e), this.preClickTime = Date.now();
    },
    onTouchstart(e) {
      this.fireEvents("onTouchstart", e), this.preTouchTime = Date.now();
    },
    onBlur(e) {
      bl(e.target, e.relatedTarget || document.activeElement) || (this.fireEvents("onBlur", e), this.clearDelayTimer(), this.isBlurToHide() && this.delaySetPopupVisible(!1, this.$props.blurDelay));
    },
    onContextmenu(e) {
      e.preventDefault(), this.fireEvents("onContextmenu", e), this.setPopupVisible(!0, e);
    },
    onContextmenuClose() {
      this.isContextmenuToShow() && this.close();
    },
    onClick(e) {
      if (this.fireEvents("onClick", e), this.focusTime) {
        let n;
        if (this.preClickTime && this.preTouchTime ? n = Math.min(this.preClickTime, this.preTouchTime) : this.preClickTime ? n = this.preClickTime : this.preTouchTime && (n = this.preTouchTime), Math.abs(n - this.focusTime) < 20)
          return;
        this.focusTime = 0;
      }
      this.preClickTime = 0, this.preTouchTime = 0, this.isClickToShow() && (this.isClickToHide() || this.isBlurToHide()) && e && e.preventDefault && e.preventDefault(), e && e.domEvent && e.domEvent.preventDefault();
      const t = !this.$data.sPopupVisible;
      (this.isClickToHide() && !t || t && this.isClickToShow()) && this.setPopupVisible(!this.$data.sPopupVisible, e);
    },
    onPopupMouseDown() {
      const {
        vcTriggerContext: e = {}
      } = this;
      this.hasPopupMouseDown = !0, clearTimeout(this.mouseDownTimeout), this.mouseDownTimeout = setTimeout(() => {
        this.hasPopupMouseDown = !1;
      }, 0), e.onPopupMouseDown && e.onPopupMouseDown(...arguments);
    },
    onDocumentClick(e) {
      if (this.$props.mask && !this.$props.maskClosable)
        return;
      const t = e.target, n = this.getRootDomNode(), o = this.getPopupDomNode();
      // mousedown on the target should also close popup when action is contextMenu.
      // https://github.com/ant-design/ant-design/issues/29853
      (!bl(n, t) || this.isContextMenuOnly()) && !bl(o, t) && !this.hasPopupMouseDown && this.delaySetPopupVisible(!1, 0.1);
    },
    getPopupDomNode() {
      var e;
      return ((e = this.popupRef) === null || e === void 0 ? void 0 : e.getElement()) || null;
    },
    getRootDomNode() {
      var e, t, n, o;
      const {
        getTriggerDOMNode: r
      } = this.$props;
      if (r) {
        const i = ((t = (e = this.triggerRef) === null || e === void 0 ? void 0 : e.$el) === null || t === void 0 ? void 0 : t.nodeName) === "#comment" ? null : Ui(this.triggerRef);
        return Ui(r(i));
      }
      try {
        const i = ((o = (n = this.triggerRef) === null || n === void 0 ? void 0 : n.$el) === null || o === void 0 ? void 0 : o.nodeName) === "#comment" ? null : Ui(this.triggerRef);
        if (i)
          return i;
      } catch {
      }
      return Ui(this);
    },
    handleGetPopupClassFromAlign(e) {
      const t = [], n = this.$props, {
        popupPlacement: o,
        builtinPlacements: r,
        prefixCls: i,
        alignPoint: a,
        getPopupClassNameFromAlign: l
      } = n;
      return o && r && t.push(T5(r, i, e, a)), l && t.push(l(e)), t.join(" ");
    },
    getPopupAlign() {
      const e = this.$props, {
        popupPlacement: t,
        popupAlign: n,
        builtinPlacements: o
      } = e;
      return t && o ? Q1(o, t, n) : n;
    },
    getComponent() {
      const e = {};
      this.isMouseEnterToShow() && (e.onMouseenter = this.onPopupMouseenter), this.isMouseLeaveToHide() && (e.onMouseleave = this.onPopupMouseleave), e.onMousedown = this.onPopupMouseDown, e[Bo ? "onTouchstartPassive" : "onTouchstart"] = this.onPopupMouseDown;
      const {
        handleGetPopupClassFromAlign: t,
        getRootDomNode: n,
        $attrs: o
      } = this, {
        prefixCls: r,
        destroyPopupOnHide: i,
        popupClassName: a,
        popupAnimation: l,
        popupTransitionName: s,
        popupStyle: u,
        mask: c,
        maskAnimation: d,
        maskTransitionName: f,
        zIndex: p,
        stretch: v,
        alignPoint: g,
        mobile: m,
        arrow: x,
        forceRender: S
      } = this.$props, {
        sPopupVisible: C,
        point: P
      } = this.$data, $ = O(O({
        prefixCls: r,
        arrow: x,
        destroyPopupOnHide: i,
        visible: C,
        point: g ? P : null,
        align: this.align,
        animation: l,
        getClassNameFromAlign: t,
        stretch: v,
        getRootDomNode: n,
        mask: c,
        zIndex: p,
        transitionName: s,
        maskAnimation: d,
        maskTransitionName: f,
        class: a,
        style: u,
        onAlign: o.onPopupAlign || ZI
      }, e), {
        ref: this.setPopupRef,
        mobile: m,
        forceRender: S
      });
      return h(I5, $, {
        default: this.$slots.popup || (() => Qk(this, "popup"))
      });
    },
    attachParent(e) {
      Vt.cancel(this.attachId);
      const {
        getPopupContainer: t,
        getDocument: n
      } = this.$props, o = this.getRootDomNode();
      let r;
      t ? (o || t.length === 0) && (r = t(o)) : r = n(this.getRootDomNode()).body, r ? r.appendChild(e) : this.attachId = Vt(() => {
        this.attachParent(e);
      });
    },
    getContainer() {
      const {
        $props: e
      } = this, {
        getDocument: t
      } = e, n = t(this.getRootDomNode()).createElement("div");
      return n.style.position = "absolute", n.style.top = "0", n.style.left = "0", n.style.width = "100%", this.attachParent(n), n;
    },
    setPopupVisible(e, t) {
      const {
        alignPoint: n,
        sPopupVisible: o,
        onPopupVisibleChange: r
      } = this;
      this.clearDelayTimer(), o !== e && (Oa(this, "popupVisible") || this.setState({
        sPopupVisible: e,
        prevPopupVisible: o
      }), r && r(e)), n && t && e && this.setPoint(t);
    },
    setPoint(e) {
      const {
        alignPoint: t
      } = this.$props;
      !t || !e || this.setState({
        point: {
          pageX: e.pageX,
          pageY: e.pageY
        }
      });
    },
    handlePortalUpdate() {
      this.prevPopupVisible !== this.sPopupVisible && this.afterPopupVisibleChange(this.sPopupVisible);
    },
    delaySetPopupVisible(e, t, n) {
      const o = t * 1e3;
      if (this.clearDelayTimer(), o) {
        const r = n ? {
          pageX: n.pageX,
          pageY: n.pageY
        } : null;
        this.delayTimer = setTimeout(() => {
          this.setPopupVisible(e, r), this.clearDelayTimer();
        }, o);
      } else
        this.setPopupVisible(e, n);
    },
    clearDelayTimer() {
      this.delayTimer && (clearTimeout(this.delayTimer), this.delayTimer = null);
    },
    clearOutsideHandler() {
      this.clickOutsideHandler && (this.clickOutsideHandler.remove(), this.clickOutsideHandler = null), this.contextmenuOutsideHandler1 && (this.contextmenuOutsideHandler1.remove(), this.contextmenuOutsideHandler1 = null), this.contextmenuOutsideHandler2 && (this.contextmenuOutsideHandler2.remove(), this.contextmenuOutsideHandler2 = null), this.touchOutsideHandler && (this.touchOutsideHandler.remove(), this.touchOutsideHandler = null);
    },
    createTwoChains(e) {
      let t = () => {
      };
      const n = l1(this);
      return this.childOriginEvents[e] && n[e] ? this[`fire${e}`] : (t = this.childOriginEvents[e] || n[e] || t, t);
    },
    isClickToShow() {
      const {
        action: e,
        showAction: t
      } = this.$props;
      return e.indexOf("click") !== -1 || t.indexOf("click") !== -1;
    },
    isContextMenuOnly() {
      const {
        action: e
      } = this.$props;
      return e === "contextmenu" || e.length === 1 && e[0] === "contextmenu";
    },
    isContextmenuToShow() {
      const {
        action: e,
        showAction: t
      } = this.$props;
      return e.indexOf("contextmenu") !== -1 || t.indexOf("contextmenu") !== -1;
    },
    isClickToHide() {
      const {
        action: e,
        hideAction: t
      } = this.$props;
      return e.indexOf("click") !== -1 || t.indexOf("click") !== -1;
    },
    isMouseEnterToShow() {
      const {
        action: e,
        showAction: t
      } = this.$props;
      return e.indexOf("hover") !== -1 || t.indexOf("mouseenter") !== -1;
    },
    isMouseLeaveToHide() {
      const {
        action: e,
        hideAction: t
      } = this.$props;
      return e.indexOf("hover") !== -1 || t.indexOf("mouseleave") !== -1;
    },
    isFocusToShow() {
      const {
        action: e,
        showAction: t
      } = this.$props;
      return e.indexOf("focus") !== -1 || t.indexOf("focus") !== -1;
    },
    isBlurToHide() {
      const {
        action: e,
        hideAction: t
      } = this.$props;
      return e.indexOf("focus") !== -1 || t.indexOf("blur") !== -1;
    },
    forcePopupAlign() {
      var e;
      this.$data.sPopupVisible && ((e = this.popupRef) === null || e === void 0 || e.forceAlign());
    },
    fireEvents(e, t) {
      this.childOriginEvents[e] && this.childOriginEvents[e](t);
      const n = this.$props[e] || this.$attrs[e];
      n && n(t);
    },
    close() {
      this.setPopupVisible(!1);
    }
  },
  render() {
    const {
      $attrs: e
    } = this, t = Do(Xk(this)), {
      alignPoint: n,
      getPopupContainer: o
    } = this.$props, r = t[0];
    this.childOriginEvents = l1(r);
    const i = {
      key: "trigger"
    };
    this.isContextmenuToShow() ? i.onContextmenu = this.onContextmenu : i.onContextmenu = this.createTwoChains("onContextmenu"), this.isClickToHide() || this.isClickToShow() ? (i.onClick = this.onClick, i.onMousedown = this.onMousedown, i[Bo ? "onTouchstartPassive" : "onTouchstart"] = this.onTouchstart) : (i.onClick = this.createTwoChains("onClick"), i.onMousedown = this.createTwoChains("onMousedown"), i[Bo ? "onTouchstartPassive" : "onTouchstart"] = this.createTwoChains("onTouchstart")), this.isMouseEnterToShow() ? (i.onMouseenter = this.onMouseenter, n && (i.onMousemove = this.onMouseMove)) : i.onMouseenter = this.createTwoChains("onMouseenter"), this.isMouseLeaveToHide() ? i.onMouseleave = this.onMouseleave : i.onMouseleave = this.createTwoChains("onMouseleave"), this.isFocusToShow() || this.isBlurToHide() ? (i.onFocus = this.onFocus, i.onBlur = this.onBlur) : (i.onFocus = this.createTwoChains("onFocus"), i.onBlur = (u) => {
      u && (!u.relatedTarget || !bl(u.target, u.relatedTarget)) && this.createTwoChains("onBlur")(u);
    });
    const a = Me(r && r.props && r.props.class, e.class);
    a && (i.class = a);
    const l = Xn(r, O(O({}, i), {
      ref: "triggerRef"
    }), !0, !0), s = h(g0, {
      key: "portal",
      getContainer: o && (() => o(this.getRootDomNode())),
      didUpdate: this.handlePortalUpdate,
      visible: this.$data.sPopupVisible
    }, {
      default: this.getComponent
    });
    return h(Je, null, [l, s]);
  }
});
var z5 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const F5 = (e) => {
  const t = e === !0 ? 0 : 1;
  return {
    bottomLeft: {
      points: ["tl", "bl"],
      offset: [0, 4],
      overflow: {
        adjustX: t,
        adjustY: 1
      }
    },
    bottomRight: {
      points: ["tr", "br"],
      offset: [0, 4],
      overflow: {
        adjustX: t,
        adjustY: 1
      }
    },
    topLeft: {
      points: ["bl", "tl"],
      offset: [0, -4],
      overflow: {
        adjustX: t,
        adjustY: 1
      }
    },
    topRight: {
      points: ["br", "tr"],
      offset: [0, -4],
      overflow: {
        adjustX: t,
        adjustY: 1
      }
    }
  };
}, B5 = be({
  name: "SelectTrigger",
  inheritAttrs: !1,
  props: {
    dropdownAlign: Object,
    visible: {
      type: Boolean,
      default: void 0
    },
    disabled: {
      type: Boolean,
      default: void 0
    },
    dropdownClassName: String,
    dropdownStyle: fe.object,
    placement: String,
    empty: {
      type: Boolean,
      default: void 0
    },
    prefixCls: String,
    popupClassName: String,
    animation: String,
    transitionName: String,
    getPopupContainer: Function,
    dropdownRender: Function,
    containerWidth: Number,
    dropdownMatchSelectWidth: fe.oneOfType([Number, Boolean]).def(!0),
    popupElement: fe.any,
    direction: String,
    getTriggerDOMNode: Function,
    onPopupVisibleChange: Function,
    onPopupMouseEnter: Function,
    onPopupFocusin: Function,
    onPopupFocusout: Function
  },
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: r
    } = t;
    const i = E(() => {
      const {
        dropdownMatchSelectWidth: l
      } = e;
      return F5(l);
    }), a = ce();
    return r({
      getPopupElement: () => a.value
    }), () => {
      const l = O(O({}, e), o), {
        empty: s = !1
      } = l, u = z5(l, ["empty"]), {
        visible: c,
        dropdownAlign: d,
        prefixCls: f,
        popupElement: p,
        dropdownClassName: v,
        dropdownStyle: g,
        direction: m = "ltr",
        placement: x,
        dropdownMatchSelectWidth: S,
        containerWidth: C,
        dropdownRender: P,
        animation: $,
        transitionName: I,
        getPopupContainer: w,
        getTriggerDOMNode: _,
        onPopupVisibleChange: M,
        onPopupMouseEnter: N,
        onPopupFocusin: A,
        onPopupFocusout: H
      } = u, B = `${f}-dropdown`;
      let F = p;
      P && (F = P({
        menuNode: p,
        props: e
      }));
      const R = $ ? `${B}-${$}` : I, X = O({
        minWidth: `${C}px`
      }, g);
      return typeof S == "number" ? X.width = `${S}px` : S && (X.width = `${C}px`), h(Dd, Q(Q({}, e), {}, {
        showAction: M ? ["click"] : [],
        hideAction: M ? ["click"] : [],
        popupPlacement: x || (m === "rtl" ? "bottomRight" : "bottomLeft"),
        builtinPlacements: i.value,
        prefixCls: B,
        popupTransitionName: R,
        popupAlign: d,
        popupVisible: c,
        getPopupContainer: w,
        popupClassName: Me(v, {
          [`${B}-empty`]: s
        }),
        popupStyle: X,
        getTriggerDOMNode: _,
        onPopupVisibleChange: M
      }), {
        default: n.default,
        popup: () => h("div", {
          ref: a,
          onMouseenter: N,
          onFocusin: A,
          onFocusout: H
        }, [F])
      });
    };
  }
}), it = {
  /**
   * BACKSPACE
   */
  BACKSPACE: 8,
  /**
   * TAB
   */
  TAB: 9,
  /**
   * ENTER
   */
  ENTER: 13,
  /**
   * SHIFT
   */
  SHIFT: 16,
  /**
   * CTRL
   */
  CTRL: 17,
  /**
   * ALT
   */
  ALT: 18,
  /**
   * CAPS_LOCK
   */
  CAPS_LOCK: 20,
  /**
   * ESC
   */
  ESC: 27,
  /**
   * SPACE
   */
  SPACE: 32,
  /**
   * PAGE_UP
   */
  PAGE_UP: 33,
  /**
   * PAGE_DOWN
   */
  PAGE_DOWN: 34,
  /**
   * END
   */
  END: 35,
  /**
   * HOME
   */
  HOME: 36,
  /**
   * LEFT
   */
  LEFT: 37,
  /**
   * UP
   */
  UP: 38,
  /**
   * RIGHT
   */
  RIGHT: 39,
  /**
   * DOWN
   */
  DOWN: 40,
  /**
   * N
   */
  N: 78,
  /**
   * P
   */
  P: 80,
  /**
   * META
   */
  META: 91,
  /**
   * WIN_KEY_RIGHT
   */
  WIN_KEY_RIGHT: 92,
  /**
   * CONTEXT_MENU
   */
  CONTEXT_MENU: 93,
  /**
   * F1
   */
  F1: 112,
  /**
   * F2
   */
  F2: 113,
  /**
   * F3
   */
  F3: 114,
  /**
   * F4
   */
  F4: 115,
  /**
   * F5
   */
  F5: 116,
  /**
   * F6
   */
  F6: 117,
  /**
   * F7
   */
  F7: 118,
  /**
   * F8
   */
  F8: 119,
  /**
   * F9
   */
  F9: 120,
  /**
   * F10
   */
  F10: 121,
  /**
   * F11
   */
  F11: 122,
  /**
   * F12
   */
  F12: 123,
  /**
   * SEMICOLON
   */
  SEMICOLON: 186,
  /**
   * EQUALS
   */
  EQUALS: 187,
  /**
   * WIN_KEY
   */
  WIN_KEY: 224
}, Es = (e, t) => {
  let {
    slots: n
  } = t;
  var o;
  const {
    class: r,
    customizeIcon: i,
    customizeIconProps: a,
    onMousedown: l,
    onClick: s
  } = e;
  let u;
  return typeof i == "function" ? u = i(a) : u = cr(i) ? Ml(i) : i, h("span", {
    class: r,
    onMousedown: (c) => {
      c.preventDefault(), l && l(c);
    },
    style: {
      userSelect: "none",
      WebkitUserSelect: "none"
    },
    unselectable: "on",
    onClick: s,
    "aria-hidden": !0
  }, [u !== void 0 ? u : h("span", {
    class: r.split(/\s+/).map((c) => `${c}-icon`)
  }, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)])]);
};
Es.inheritAttrs = !1;
Es.displayName = "TransBtn";
Es.props = {
  class: String,
  customizeIcon: fe.any,
  customizeIconProps: fe.any,
  onMousedown: Function,
  onClick: Function
};
var L5 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const H5 = be({
  compatConfig: {
    MODE: 3
  },
  // inheritAttrs: false,
  props: {
    disabled: fe.looseBool,
    type: fe.string,
    value: fe.any,
    tag: {
      type: String,
      default: "input"
    },
    size: fe.string,
    onChange: Function,
    onInput: Function,
    onBlur: Function,
    onFocus: Function,
    onKeydown: Function,
    onCompositionstart: Function,
    onCompositionend: Function,
    onKeyup: Function,
    onPaste: Function,
    onMousedown: Function
  },
  emits: ["change", "input", "blur", "keydown", "focus", "compositionstart", "compositionend", "keyup", "paste", "mousedown"],
  setup(e, t) {
    let {
      expose: n
    } = t;
    const o = $e(null);
    return n({
      focus: () => {
        o.value && o.value.focus();
      },
      blur: () => {
        o.value && o.value.blur();
      },
      input: o,
      setSelectionRange: (s, u, c) => {
        var d;
        (d = o.value) === null || d === void 0 || d.setSelectionRange(s, u, c);
      },
      select: () => {
        var s;
        (s = o.value) === null || s === void 0 || s.select();
      },
      getSelectionStart: () => {
        var s;
        return (s = o.value) === null || s === void 0 ? void 0 : s.selectionStart;
      },
      getSelectionEnd: () => {
        var s;
        return (s = o.value) === null || s === void 0 ? void 0 : s.selectionEnd;
      },
      getScrollTop: () => {
        var s;
        return (s = o.value) === null || s === void 0 ? void 0 : s.scrollTop;
      }
    }), () => {
      const {
        tag: s,
        value: u
      } = e, c = L5(e, ["tag", "value"]);
      return h(s, Q(Q({}, c), {}, {
        ref: o,
        value: u
      }), null);
    };
  }
});
function tS(e) {
  const t = e.getBoundingClientRect(), n = document.documentElement;
  return {
    left: t.left + (window.scrollX || n.scrollLeft) - (n.clientLeft || document.body.clientLeft || 0),
    top: t.top + (window.scrollY || n.scrollTop) - (n.clientTop || document.body.clientTop || 0)
  };
}
function V5(e) {
  return Object.keys(e).reduce((t, n) => {
    const o = e[n];
    return typeof o > "u" || o === null || (t += `${n}: ${e[n]};`), t;
  }, "");
}
var j5 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const Ad = be({
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: {
    disabled: fe.looseBool,
    type: fe.string,
    value: fe.any,
    lazy: fe.bool.def(!0),
    tag: {
      type: String,
      default: "input"
    },
    size: fe.string,
    style: fe.oneOfType([String, Object]),
    class: fe.string
  },
  emits: ["change", "input", "blur", "keydown", "focus", "compositionstart", "compositionend", "keyup", "paste", "mousedown"],
  setup(e, t) {
    let {
      emit: n,
      attrs: o,
      expose: r
    } = t;
    const i = $e(null), a = ce(), l = ce(!1);
    ke([() => e.value, l], () => {
      l.value || (a.value = e.value);
    }, {
      immediate: !0
    });
    const s = (w) => {
      n("change", w);
    }, u = (w) => {
      l.value = !0, w.target.composing = !0, n("compositionstart", w);
    }, c = (w) => {
      l.value = !1, w.target.composing = !1, n("compositionend", w);
      const _ = document.createEvent("HTMLEvents");
      _.initEvent("input", !0, !0), w.target.dispatchEvent(_), s(w);
    }, d = (w) => {
      if (l.value && e.lazy) {
        a.value = w.target.value;
        return;
      }
      n("input", w);
    }, f = (w) => {
      n("blur", w);
    }, p = (w) => {
      n("focus", w);
    }, v = () => {
      i.value && i.value.focus();
    }, g = () => {
      i.value && i.value.blur();
    }, m = (w) => {
      n("keydown", w);
    }, x = (w) => {
      n("keyup", w);
    }, S = (w, _, M) => {
      var N;
      (N = i.value) === null || N === void 0 || N.setSelectionRange(w, _, M);
    }, C = () => {
      var w;
      (w = i.value) === null || w === void 0 || w.select();
    };
    r({
      focus: v,
      blur: g,
      input: E(() => {
        var w;
        return (w = i.value) === null || w === void 0 ? void 0 : w.input;
      }),
      setSelectionRange: S,
      select: C,
      getSelectionStart: () => {
        var w;
        return (w = i.value) === null || w === void 0 ? void 0 : w.getSelectionStart();
      },
      getSelectionEnd: () => {
        var w;
        return (w = i.value) === null || w === void 0 ? void 0 : w.getSelectionEnd();
      },
      getScrollTop: () => {
        var w;
        return (w = i.value) === null || w === void 0 ? void 0 : w.getScrollTop();
      }
    });
    const P = (w) => {
      n("mousedown", w);
    }, $ = (w) => {
      n("paste", w);
    }, I = E(() => e.style && typeof e.style != "string" ? V5(e.style) : e.style);
    return () => {
      const {
        style: w,
        lazy: _
      } = e, M = j5(e, ["style", "lazy"]);
      return h(H5, Q(Q(Q({}, M), o), {}, {
        style: I.value,
        onInput: d,
        onChange: s,
        onBlur: f,
        onFocus: p,
        ref: i,
        value: a.value,
        onCompositionstart: u,
        onCompositionend: c,
        onKeyup: x,
        onKeydown: m,
        onPaste: $,
        onMousedown: P
      }), null);
    };
  }
}), W5 = {
  inputRef: fe.any,
  prefixCls: String,
  id: String,
  inputElement: fe.VueNode,
  disabled: {
    type: Boolean,
    default: void 0
  },
  autofocus: {
    type: Boolean,
    default: void 0
  },
  autocomplete: String,
  editable: {
    type: Boolean,
    default: void 0
  },
  activeDescendantId: String,
  value: String,
  open: {
    type: Boolean,
    default: void 0
  },
  tabindex: fe.oneOfType([fe.number, fe.string]),
  /** Pass accessibility props to input */
  attrs: fe.object,
  onKeydown: {
    type: Function
  },
  onMousedown: {
    type: Function
  },
  onChange: {
    type: Function
  },
  onPaste: {
    type: Function
  },
  onCompositionstart: {
    type: Function
  },
  onCompositionend: {
    type: Function
  },
  onFocus: {
    type: Function
  },
  onBlur: {
    type: Function
  }
}, d_ = be({
  compatConfig: {
    MODE: 3
  },
  name: "SelectInput",
  inheritAttrs: !1,
  props: W5,
  setup(e) {
    let t = null;
    const n = zt("VCSelectContainerEvent");
    return () => {
      var o;
      const {
        prefixCls: r,
        id: i,
        inputElement: a,
        disabled: l,
        tabindex: s,
        autofocus: u,
        autocomplete: c,
        editable: d,
        activeDescendantId: f,
        value: p,
        onKeydown: v,
        onMousedown: g,
        onChange: m,
        onPaste: x,
        onCompositionstart: S,
        onCompositionend: C,
        onFocus: P,
        onBlur: $,
        open: I,
        inputRef: w,
        attrs: _
      } = e;
      let M = a || h(Ad, null, null);
      const N = M.props || {}, {
        onKeydown: A,
        onInput: H,
        onFocus: B,
        onBlur: F,
        onMousedown: R,
        onCompositionstart: X,
        onCompositionend: j,
        style: ee
      } = N;
      return M = Xn(M, O(O(O(O(O({
        type: "search"
      }, N), {
        id: i,
        ref: w,
        disabled: l,
        tabindex: s,
        lazy: !1,
        autocomplete: c || "off",
        autofocus: u,
        class: Me(`${r}-selection-search-input`, (o = M?.props) === null || o === void 0 ? void 0 : o.class),
        role: "combobox",
        "aria-expanded": I,
        "aria-haspopup": "listbox",
        "aria-owns": `${i}_list`,
        "aria-autocomplete": "list",
        "aria-controls": `${i}_list`,
        "aria-activedescendant": f
      }), _), {
        value: d ? p : "",
        readonly: !d,
        unselectable: d ? null : "on",
        style: O(O({}, ee), {
          opacity: d ? null : 0
        }),
        onKeydown: (W) => {
          v(W), A && A(W);
        },
        onMousedown: (W) => {
          g(W), R && R(W);
        },
        onInput: (W) => {
          m(W), H && H(W);
        },
        onCompositionstart(W) {
          S(W), X && X(W);
        },
        onCompositionend(W) {
          C(W), j && j(W);
        },
        onPaste: x,
        onFocus: function() {
          clearTimeout(t), B && B(arguments.length <= 0 ? void 0 : arguments[0]), P && P(arguments.length <= 0 ? void 0 : arguments[0]), n?.focus(arguments.length <= 0 ? void 0 : arguments[0]);
        },
        onBlur: function() {
          for (var W = arguments.length, K = new Array(W), q = 0; q < W; q++)
            K[q] = arguments[q];
          t = setTimeout(() => {
            F && F(K[0]), $ && $(K[0]), n?.blur(K[0]);
          }, 100);
        }
      }), M.type === "textarea" ? {} : {
        type: "search"
      }), !0, !0), M;
    };
  }
}), K5 = `accept acceptcharset accesskey action allowfullscreen allowtransparency
alt async autocomplete autofocus autoplay capture cellpadding cellspacing challenge
charset checked classid classname colspan cols content contenteditable contextmenu
controls coords crossorigin data datetime default defer dir disabled download draggable
enctype form formaction formenctype formmethod formnovalidate formtarget frameborder
headers height hidden high href hreflang htmlfor for httpequiv icon id inputmode integrity
is keyparams keytype kind label lang list loop low manifest marginheight marginwidth max maxlength media
mediagroup method min minlength multiple muted name novalidate nonce open
optimum pattern placeholder poster preload radiogroup readonly rel required
reversed role rowspan rows sandbox scope scoped scrolling seamless selected
shape size sizes span spellcheck src srcdoc srclang srcset start step style
summary tabindex target title type usemap value width wmode wrap`, q5 = `onCopy onCut onPaste onCompositionend onCompositionstart onCompositionupdate onKeydown
    onKeypress onKeyup onFocus onBlur onChange onInput onSubmit onClick onContextmenu onDoubleclick onDblclick
    onDrag onDragend onDragenter onDragexit onDragleave onDragover onDragstart onDrop onMousedown
    onMouseenter onMouseleave onMousemove onMouseout onMouseover onMouseup onSelect onTouchcancel
    onTouchend onTouchmove onTouchstart onTouchstartPassive onTouchmovePassive onScroll onWheel onAbort onCanplay onCanplaythrough
    onDurationchange onEmptied onEncrypted onEnded onError onLoadeddata onLoadedmetadata
    onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`, nS = `${K5} ${q5}`.split(/[\s\n]+/), Y5 = "aria-", G5 = "data-";
function oS(e, t) {
  return e.indexOf(t) === 0;
}
function Bs(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n;
  t === !1 ? n = {
    aria: !0,
    data: !0,
    attr: !0
  } : t === !0 ? n = {
    aria: !0
  } : n = O({}, t);
  const o = {};
  return Object.keys(e).forEach((r) => {
    // Aria
    (n.aria && (r === "role" || oS(r, Y5)) || // Data
    n.data && oS(r, G5) || // Attr
    n.attr && (nS.includes(r) || nS.includes(r.toLowerCase()))) && (o[r] = e[r]);
  }), o;
}
const f_ = Symbol("OverflowContextProviderKey"), Gm = be({
  compatConfig: {
    MODE: 3
  },
  name: "OverflowContextProvider",
  inheritAttrs: !1,
  props: {
    value: {
      type: Object
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Ft(f_, E(() => e.value)), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), U5 = () => zt(f_, E(() => null));
var X5 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const ru = void 0, op = be({
  compatConfig: {
    MODE: 3
  },
  name: "Item",
  props: {
    prefixCls: String,
    item: fe.any,
    renderItem: Function,
    responsive: Boolean,
    itemKey: {
      type: [String, Number]
    },
    registerSize: Function,
    display: Boolean,
    order: Number,
    component: fe.any,
    invalidate: Boolean
  },
  setup(e, t) {
    let {
      slots: n,
      expose: o
    } = t;
    const r = E(() => e.responsive && !e.display), i = ce();
    o({
      itemNodeRef: i
    });
    function a(l) {
      e.registerSize(e.itemKey, l);
    }
    return jo(() => {
      a(null);
    }), () => {
      var l;
      const {
        prefixCls: s,
        invalidate: u,
        item: c,
        renderItem: d,
        responsive: f,
        registerSize: p,
        itemKey: v,
        display: g,
        order: m,
        component: x = "div"
      } = e, S = X5(e, ["prefixCls", "invalidate", "item", "renderItem", "responsive", "registerSize", "itemKey", "display", "order", "component"]), C = (l = n.default) === null || l === void 0 ? void 0 : l.call(n), P = d && c !== ru ? d(c) : C;
      let $;
      u || ($ = {
        opacity: r.value ? 0 : 1,
        height: r.value ? 0 : ru,
        overflowY: r.value ? "hidden" : ru,
        order: f ? m : ru,
        pointerEvents: r.value ? "none" : ru,
        position: r.value ? "absolute" : ru
      });
      const I = {};
      return r.value && (I["aria-hidden"] = !0), h(Al, {
        disabled: !f,
        onResize: (w) => {
          let {
            offsetWidth: _
          } = w;
          a(_);
        }
      }, {
        default: () => h(x, Q(Q(Q({
          class: Me(!u && s),
          style: $
        }, I), S), {}, {
          ref: i
        }), {
          default: () => [P]
        })
      });
    };
  }
});
var ov = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const Q5 = be({
  compatConfig: {
    MODE: 3
  },
  name: "RawItem",
  inheritAttrs: !1,
  props: {
    component: fe.any,
    title: fe.any,
    id: String,
    onMouseenter: {
      type: Function
    },
    onMouseleave: {
      type: Function
    },
    onClick: {
      type: Function
    },
    onKeydown: {
      type: Function
    },
    onFocus: {
      type: Function
    },
    role: String,
    tabindex: Number
  },
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const r = U5();
    return () => {
      var i;
      if (!r.value) {
        const {
          component: d = "div"
        } = e, f = ov(e, ["component"]);
        return h(d, Q(Q({}, f), o), {
          default: () => [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]
        });
      }
      const a = r.value, {
        className: l
      } = a, s = ov(a, ["className"]), {
        class: u
      } = o, c = ov(o, ["class"]);
      return h(Gm, {
        value: null
      }, {
        default: () => [h(op, Q(Q(Q({
          class: Me(l, u)
        }, s), c), e), n)]
      });
    };
  }
});
var Z5 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const p_ = "responsive", h_ = "invalidate";
function J5(e) {
  return `+ ${e.length} ...`;
}
const eH = () => ({
  id: String,
  prefixCls: String,
  data: Array,
  itemKey: [String, Number, Function],
  /** Used for `responsive`. It will limit render node to avoid perf issue */
  itemWidth: {
    type: Number,
    default: 10
  },
  renderItem: Function,
  /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
  renderRawItem: Function,
  maxCount: [Number, String],
  renderRest: Function,
  /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
  renderRawRest: Function,
  suffix: fe.any,
  component: String,
  itemComponent: fe.any,
  /** @private This API may be refactor since not well design */
  onVisibleChange: Function,
  /** When set to `full`, ssr will render full items by default and remove at client side */
  ssr: String,
  onMousedown: Function,
  role: String
}), Na = be({
  name: "Overflow",
  inheritAttrs: !1,
  props: eH(),
  emits: ["visibleChange"],
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      slots: r
    } = t;
    const i = E(() => e.ssr === "full"), a = $e(null), l = E(() => a.value || 0), s = $e(/* @__PURE__ */ new Map()), u = $e(0), c = $e(0), d = $e(0), f = $e(null), p = $e(null), v = E(() => p.value === null && i.value ? Number.MAX_SAFE_INTEGER : p.value || 0), g = $e(!1), m = E(() => `${e.prefixCls}-item`), x = E(() => Math.max(u.value, c.value)), S = E(() => !!(e.data.length && e.maxCount === p_)), C = E(() => e.maxCount === h_), P = E(() => S.value || typeof e.maxCount == "number" && e.data.length > e.maxCount), $ = E(() => {
      let R = e.data;
      return S.value ? a.value === null && i.value ? R = e.data : R = e.data.slice(0, Math.min(e.data.length, l.value / e.itemWidth)) : typeof e.maxCount == "number" && (R = e.data.slice(0, e.maxCount)), R;
    }), I = E(() => S.value ? e.data.slice(v.value + 1) : e.data.slice($.value.length)), w = (R, X) => {
      var j;
      return typeof e.itemKey == "function" ? e.itemKey(R) : (j = e.itemKey && R?.[e.itemKey]) !== null && j !== void 0 ? j : X;
    }, _ = E(() => e.renderItem || ((R) => R)), M = (R, X) => {
      p.value = R, X || (g.value = R < e.data.length - 1, o("visibleChange", R));
    }, N = (R, X) => {
      a.value = X.clientWidth;
    }, A = (R, X) => {
      const j = new Map(s.value);
      X === null ? j.delete(R) : j.set(R, X), s.value = j;
    }, H = (R, X) => {
      u.value = c.value, c.value = X;
    }, B = (R, X) => {
      d.value = X;
    }, F = (R) => s.value.get(w($.value[R], R));
    return ke([l, s, c, d, () => e.itemKey, $], () => {
      if (l.value && x.value && $.value) {
        let R = d.value;
        const X = $.value.length, j = X - 1;
        if (!X) {
          M(0), f.value = null;
          return;
        }
        for (let ee = 0; ee < X; ee += 1) {
          const W = F(ee);
          if (W === void 0) {
            M(ee - 1, !0);
            break;
          }
          if (R += W, // Only one means `totalWidth` is the final width
          j === 0 && R <= l.value || // Last two width will be the final width
          ee === j - 1 && R + F(j) <= l.value) {
            M(j), f.value = null;
            break;
          } else if (R + x.value > l.value) {
            M(ee - 1), f.value = R - W - d.value + c.value;
            break;
          }
        }
        e.suffix && F(0) + d.value > l.value && (f.value = null);
      }
    }), () => {
      const R = g.value && !!I.value.length, {
        itemComponent: X,
        renderRawItem: j,
        renderRawRest: ee,
        renderRest: W,
        prefixCls: K = "rc-overflow",
        suffix: q,
        component: G = "div",
        id: ae,
        onMousedown: le
      } = e, {
        class: ie,
        style: re
      } = n, te = Z5(n, ["class", "style"]);
      let ve = {};
      f.value !== null && S.value && (ve = {
        position: "absolute",
        left: `${f.value}px`,
        top: 0
      });
      const ue = {
        prefixCls: m.value,
        responsive: S.value,
        component: X,
        invalidate: C.value
      }, pe = j ? (Ke, He) => {
        const Ne = w(Ke, He);
        return h(Gm, {
          key: Ne,
          value: O(O({}, ue), {
            order: He,
            item: Ke,
            itemKey: Ne,
            registerSize: A,
            display: He <= v.value
          })
        }, {
          default: () => [j(Ke, He)]
        });
      } : (Ke, He) => {
        const Ne = w(Ke, He);
        return h(op, Q(Q({}, ue), {}, {
          order: He,
          key: Ne,
          item: Ke,
          renderItem: _.value,
          itemKey: Ne,
          registerSize: A,
          display: He <= v.value
        }), null);
      };
      let ge = () => null;
      const _e = {
        order: R ? v.value : Number.MAX_SAFE_INTEGER,
        className: `${m.value} ${m.value}-rest`,
        registerSize: H,
        display: R
      };
      if (ee)
        ee && (ge = () => h(Gm, {
          value: O(O({}, ue), _e)
        }, {
          default: () => [ee(I.value)]
        }));
      else {
        const Ke = W || J5;
        ge = () => h(op, Q(Q({}, ue), _e), {
          default: () => typeof Ke == "function" ? Ke(I.value) : Ke
        });
      }
      const ze = () => {
        var Ke;
        return h(G, Q({
          id: ae,
          class: Me(!C.value && K, ie),
          style: re,
          onMousedown: le,
          role: e.role
        }, te), {
          default: () => [$.value.map(pe), P.value ? ge() : null, q && h(op, Q(Q({}, ue), {}, {
            order: v.value,
            class: `${m.value}-suffix`,
            registerSize: B,
            display: !0,
            style: ve
          }), {
            default: () => q
          }), (Ke = r.default) === null || Ke === void 0 ? void 0 : Ke.call(r)]
        });
      };
      return h(Al, {
        disabled: !S.value,
        onResize: N
      }, {
        default: ze
      });
    };
  }
});
Na.Item = Q5;
Na.RESPONSIVE = p_;
Na.INVALIDATE = h_;
const tH = Symbol("TreeSelectLegacyContextPropsKey");
function v0() {
  return zt(tH, {});
}
const nH = {
  id: String,
  prefixCls: String,
  values: fe.array,
  open: {
    type: Boolean,
    default: void 0
  },
  searchValue: String,
  inputRef: fe.any,
  placeholder: fe.any,
  disabled: {
    type: Boolean,
    default: void 0
  },
  mode: String,
  showSearch: {
    type: Boolean,
    default: void 0
  },
  autofocus: {
    type: Boolean,
    default: void 0
  },
  autocomplete: String,
  activeDescendantId: String,
  tabindex: fe.oneOfType([fe.number, fe.string]),
  compositionStatus: Boolean,
  removeIcon: fe.any,
  choiceTransitionName: String,
  maxTagCount: fe.oneOfType([fe.number, fe.string]),
  maxTagTextLength: Number,
  maxTagPlaceholder: fe.any.def(() => (e) => `+ ${e.length} ...`),
  tagRender: Function,
  onToggleOpen: {
    type: Function
  },
  onRemove: Function,
  onInputChange: Function,
  onInputPaste: Function,
  onInputKeyDown: Function,
  onInputMouseDown: Function,
  onInputCompositionStart: Function,
  onInputCompositionEnd: Function
}, rS = (e) => {
  e.preventDefault(), e.stopPropagation();
}, oH = be({
  name: "MultipleSelectSelector",
  inheritAttrs: !1,
  props: nH,
  setup(e) {
    const t = $e(), n = $e(0), o = $e(!1), r = v0(), i = E(() => `${e.prefixCls}-selection`), a = E(() => e.open || e.mode === "tags" ? e.searchValue : ""), l = E(() => e.mode === "tags" || e.showSearch && (e.open || o.value)), s = ce("");
    It(() => {
      s.value = a.value;
    }), Nt(() => {
      ke(s, () => {
        n.value = t.value.scrollWidth;
      }, {
        flush: "post",
        immediate: !0
      });
    });
    function u(v, g, m, x, S) {
      return h("span", {
        class: Me(`${i.value}-item`, {
          [`${i.value}-item-disabled`]: m
        }),
        title: typeof v == "string" || typeof v == "number" ? v.toString() : void 0
      }, [h("span", {
        class: `${i.value}-item-content`
      }, [g]), x && h(Es, {
        class: `${i.value}-item-remove`,
        onMousedown: rS,
        onClick: S,
        customizeIcon: e.removeIcon
      }, {
        default: () => [Le("×")]
      })]);
    }
    function c(v, g, m, x, S, C) {
      var P;
      const $ = (w) => {
        rS(w), e.onToggleOpen(!open);
      };
      let I = C;
      return r.keyEntities && (I = ((P = r.keyEntities[v]) === null || P === void 0 ? void 0 : P.node) || {}), h("span", {
        key: v,
        onMousedown: $
      }, [e.tagRender({
        label: g,
        value: v,
        disabled: m,
        closable: x,
        onClose: S,
        option: I
      })]);
    }
    function d(v) {
      const {
        disabled: g,
        label: m,
        value: x,
        option: S
      } = v, C = !e.disabled && !g;
      let P = m;
      if (typeof e.maxTagTextLength == "number" && (typeof m == "string" || typeof m == "number")) {
        const I = String(P);
        I.length > e.maxTagTextLength && (P = `${I.slice(0, e.maxTagTextLength)}...`);
      }
      const $ = (I) => {
        var w;
        I && I.stopPropagation(), (w = e.onRemove) === null || w === void 0 || w.call(e, v);
      };
      return typeof e.tagRender == "function" ? c(x, P, g, C, $, S) : u(m, P, g, C, $);
    }
    function f(v) {
      const {
        maxTagPlaceholder: g = (x) => `+ ${x.length} ...`
      } = e, m = typeof g == "function" ? g(v) : g;
      return u(m, m, !1);
    }
    const p = (v) => {
      const g = v.target.composing;
      s.value = v.target.value, g || e.onInputChange(v);
    };
    return () => {
      const {
        id: v,
        prefixCls: g,
        values: m,
        open: x,
        inputRef: S,
        placeholder: C,
        disabled: P,
        autofocus: $,
        autocomplete: I,
        activeDescendantId: w,
        tabindex: _,
        compositionStatus: M,
        onInputPaste: N,
        onInputKeyDown: A,
        onInputMouseDown: H,
        onInputCompositionStart: B,
        onInputCompositionEnd: F
      } = e, R = h("div", {
        class: `${i.value}-search`,
        style: {
          width: n.value + "px"
        },
        key: "input"
      }, [h(d_, {
        inputRef: S,
        open: x,
        prefixCls: g,
        id: v,
        inputElement: null,
        disabled: P,
        autofocus: $,
        autocomplete: I,
        editable: l.value,
        activeDescendantId: w,
        value: s.value,
        onKeydown: A,
        onMousedown: H,
        onChange: p,
        onPaste: N,
        onCompositionstart: B,
        onCompositionend: F,
        tabindex: _,
        attrs: Bs(e, !0),
        onFocus: () => o.value = !0,
        onBlur: () => o.value = !1
      }, null), h("span", {
        ref: t,
        class: `${i.value}-search-mirror`,
        "aria-hidden": !0
      }, [s.value, Le(" ")])]), X = h(Na, {
        prefixCls: `${i.value}-overflow`,
        data: m,
        renderItem: d,
        renderRest: f,
        suffix: R,
        itemKey: "key",
        maxCount: e.maxTagCount,
        key: "overflow"
      }, null);
      return h(Je, null, [X, !m.length && !a.value && !M && h("span", {
        class: `${i.value}-placeholder`
      }, [C])]);
    };
  }
}), rH = {
  inputElement: fe.any,
  id: String,
  prefixCls: String,
  values: fe.array,
  open: {
    type: Boolean,
    default: void 0
  },
  searchValue: String,
  inputRef: fe.any,
  placeholder: fe.any,
  compositionStatus: {
    type: Boolean,
    default: void 0
  },
  disabled: {
    type: Boolean,
    default: void 0
  },
  mode: String,
  showSearch: {
    type: Boolean,
    default: void 0
  },
  autofocus: {
    type: Boolean,
    default: void 0
  },
  autocomplete: String,
  activeDescendantId: String,
  tabindex: fe.oneOfType([fe.number, fe.string]),
  activeValue: String,
  backfill: {
    type: Boolean,
    default: void 0
  },
  optionLabelRender: Function,
  onInputChange: Function,
  onInputPaste: Function,
  onInputKeyDown: Function,
  onInputMouseDown: Function,
  onInputCompositionStart: Function,
  onInputCompositionEnd: Function
}, m0 = be({
  name: "SingleSelector",
  setup(e) {
    const t = $e(!1), n = E(() => e.mode === "combobox"), o = E(() => n.value || e.showSearch), r = E(() => {
      let c = e.searchValue || "";
      return n.value && e.activeValue && !t.value && (c = e.activeValue), c;
    }), i = v0();
    ke([n, () => e.activeValue], () => {
      n.value && (t.value = !1);
    }, {
      immediate: !0
    });
    const a = E(() => e.mode !== "combobox" && !e.open && !e.showSearch ? !1 : !!r.value || e.compositionStatus), l = E(() => {
      const c = e.values[0];
      return c && (typeof c.label == "string" || typeof c.label == "number") ? c.label.toString() : void 0;
    }), s = () => {
      if (e.values[0])
        return null;
      const c = a.value ? {
        visibility: "hidden"
      } : void 0;
      return h("span", {
        class: `${e.prefixCls}-selection-placeholder`,
        style: c
      }, [e.placeholder]);
    }, u = (c) => {
      c.target.composing || (t.value = !0, e.onInputChange(c));
    };
    return () => {
      var c, d, f, p;
      const {
        inputElement: v,
        prefixCls: g,
        id: m,
        values: x,
        inputRef: S,
        disabled: C,
        autofocus: P,
        autocomplete: $,
        activeDescendantId: I,
        open: w,
        tabindex: _,
        optionLabelRender: M,
        onInputKeyDown: N,
        onInputMouseDown: A,
        onInputPaste: H,
        onInputCompositionStart: B,
        onInputCompositionEnd: F
      } = e, R = x[0];
      let X = null;
      if (R && i.customSlots) {
        const j = (c = R.key) !== null && c !== void 0 ? c : R.value, ee = ((d = i.keyEntities[j]) === null || d === void 0 ? void 0 : d.node) || {};
        X = i.customSlots[(f = ee.slots) === null || f === void 0 ? void 0 : f.title] || i.customSlots.title || R.label, typeof X == "function" && (X = X(ee));
      } else
        X = M && R ? M(R.option) : R?.label;
      return h(Je, null, [h("span", {
        class: `${g}-selection-search`
      }, [h(d_, {
        inputRef: S,
        prefixCls: g,
        id: m,
        open: w,
        inputElement: v,
        disabled: C,
        autofocus: P,
        autocomplete: $,
        editable: o.value,
        activeDescendantId: I,
        value: r.value,
        onKeydown: N,
        onMousedown: A,
        onChange: u,
        onPaste: H,
        onCompositionstart: B,
        onCompositionend: F,
        tabindex: _,
        attrs: Bs(e, !0)
      }, null)]), !n.value && R && !a.value && h("span", {
        class: `${g}-selection-item`,
        title: l.value
      }, [h(Je, {
        key: (p = R.key) !== null && p !== void 0 ? p : R.value
      }, [X])]), s()]);
    };
  }
});
m0.props = rH;
m0.inheritAttrs = !1;
function iH(e) {
  return ![
    // System function button
    it.ESC,
    it.SHIFT,
    it.BACKSPACE,
    it.TAB,
    it.WIN_KEY,
    it.ALT,
    it.META,
    it.WIN_KEY_RIGHT,
    it.CTRL,
    it.SEMICOLON,
    it.EQUALS,
    it.CAPS_LOCK,
    it.CONTEXT_MENU,
    // F1-F12
    it.F1,
    it.F2,
    it.F3,
    it.F4,
    it.F5,
    it.F6,
    it.F7,
    it.F8,
    it.F9,
    it.F10,
    it.F11,
    it.F12
  ].includes(e);
}
function g_() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250, t = null, n;
  qt(() => {
    clearTimeout(n);
  });
  function o(r) {
    (r || t === null) && (t = r), clearTimeout(n), n = setTimeout(() => {
      t = null;
    }, e);
  }
  return [() => t, o];
}
function yd() {
  const e = (t) => {
    e.current = t;
  };
  return e;
}
const aH = be({
  name: "Selector",
  inheritAttrs: !1,
  props: {
    id: String,
    prefixCls: String,
    showSearch: {
      type: Boolean,
      default: void 0
    },
    open: {
      type: Boolean,
      default: void 0
    },
    /** Display in the Selector value, it's not same as `value` prop */
    values: fe.array,
    multiple: {
      type: Boolean,
      default: void 0
    },
    mode: String,
    searchValue: String,
    activeValue: String,
    inputElement: fe.any,
    autofocus: {
      type: Boolean,
      default: void 0
    },
    activeDescendantId: String,
    tabindex: fe.oneOfType([fe.number, fe.string]),
    disabled: {
      type: Boolean,
      default: void 0
    },
    placeholder: fe.any,
    removeIcon: fe.any,
    // Tags
    maxTagCount: fe.oneOfType([fe.number, fe.string]),
    maxTagTextLength: Number,
    maxTagPlaceholder: fe.any,
    tagRender: Function,
    optionLabelRender: Function,
    /** Check if `tokenSeparators` contains `\n` or `\r\n` */
    tokenWithEnter: {
      type: Boolean,
      default: void 0
    },
    // Motion
    choiceTransitionName: String,
    onToggleOpen: {
      type: Function
    },
    /** `onSearch` returns go next step boolean to check if need do toggle open */
    onSearch: Function,
    onSearchSubmit: Function,
    onRemove: Function,
    onInputKeyDown: {
      type: Function
    },
    /**
     * @private get real dom for trigger align.
     * This may be removed after React provides replacement of `findDOMNode`
     */
    domRef: Function
  },
  setup(e, t) {
    let {
      expose: n
    } = t;
    const o = yd(), r = ce(!1), [i, a] = g_(0), l = (x) => {
      const {
        which: S
      } = x;
      (S === it.UP || S === it.DOWN) && x.preventDefault(), e.onInputKeyDown && e.onInputKeyDown(x), S === it.ENTER && e.mode === "tags" && !r.value && !e.open && e.onSearchSubmit(x.target.value), iH(S) && e.onToggleOpen(!0);
    }, s = () => {
      a(!0);
    };
    let u = null;
    const c = (x) => {
      e.onSearch(x, !0, r.value) !== !1 && e.onToggleOpen(!0);
    }, d = () => {
      r.value = !0;
    }, f = (x) => {
      r.value = !1, e.mode !== "combobox" && c(x.target.value);
    }, p = (x) => {
      let {
        target: {
          value: S
        }
      } = x;
      if (e.tokenWithEnter && u && /[\r\n]/.test(u)) {
        const C = u.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
        S = S.replace(C, u);
      }
      u = null, c(S);
    }, v = (x) => {
      const {
        clipboardData: S
      } = x;
      u = S.getData("text");
    }, g = (x) => {
      let {
        target: S
      } = x;
      S !== o.current && (document.body.style.msTouchAction !== void 0 ? setTimeout(() => {
        o.current.focus();
      }) : o.current.focus());
    }, m = (x) => {
      const S = i();
      x.target !== o.current && !S && x.preventDefault(), (e.mode !== "combobox" && (!e.showSearch || !S) || !e.open) && (e.open && e.onSearch("", !0, !1), e.onToggleOpen());
    };
    return n({
      focus: () => {
        o.current.focus();
      },
      blur: () => {
        o.current.blur();
      }
    }), () => {
      const {
        prefixCls: x,
        domRef: S,
        mode: C
      } = e, P = {
        inputRef: o,
        onInputKeyDown: l,
        onInputMouseDown: s,
        onInputChange: p,
        onInputPaste: v,
        compositionStatus: r.value,
        onInputCompositionStart: d,
        onInputCompositionEnd: f
      }, $ = C === "multiple" || C === "tags" ? h(oH, Q(Q({}, e), P), null) : h(m0, Q(Q({}, e), P), null);
      return h("div", {
        ref: S,
        class: `${x}-selector`,
        onClick: g,
        onMousedown: m
      }, [$]);
    };
  }
});
function lH(e, t, n) {
  function o(r) {
    var i, a, l;
    let s = r.target;
    s.shadowRoot && r.composed && (s = r.composedPath()[0] || s);
    const u = [(i = e[0]) === null || i === void 0 ? void 0 : i.value, (l = (a = e[1]) === null || a === void 0 ? void 0 : a.value) === null || l === void 0 ? void 0 : l.getPopupElement()];
    t.value && u.every((c) => c && !c.contains(s) && c !== s) && n(!1);
  }
  Nt(() => {
    window.addEventListener("mousedown", o);
  }), qt(() => {
    window.removeEventListener("mousedown", o);
  });
}
function sH() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10;
  const t = $e(!1);
  let n;
  const o = () => {
    clearTimeout(n);
  };
  return Nt(() => {
    o();
  }), [t, (i, a) => {
    o(), n = setTimeout(() => {
      t.value = i, a && a();
    }, e);
  }, o];
}
const v_ = Symbol("BaseSelectContextKey");
function uH(e) {
  return Ft(v_, e);
}
function cH() {
  return zt(v_, {});
}
const b0 = (() => {
  if (typeof navigator > "u" || typeof window > "u")
    return !1;
  const e = navigator.userAgent || navigator.vendor || window.opera;
  return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e?.substring(0, 4));
});
function m_(e) {
  if (!jP(e)) return Pn(e);
  const t = new Proxy({}, {
    get(n, o, r) {
      return Reflect.get(e.value, o, r);
    },
    set(n, o, r) {
      return e.value[o] = r, !0;
    },
    deleteProperty(n, o) {
      return Reflect.deleteProperty(e.value, o);
    },
    has(n, o) {
      return Reflect.has(e.value, o);
    },
    ownKeys() {
      return Object.keys(e.value);
    },
    getOwnPropertyDescriptor() {
      return {
        enumerable: !0,
        configurable: !0
      };
    }
  });
  return Pn(t);
}
var dH = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const fH = ["value", "onChange", "removeIcon", "placeholder", "autofocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabindex", "OptionList", "notFoundContent"], pH = () => ({
  prefixCls: String,
  id: String,
  omitDomProps: Array,
  // >>> Value
  displayValues: Array,
  onDisplayValuesChange: Function,
  // >>> Active
  /** Current dropdown list active item string value */
  activeValue: String,
  /** Link search input with target element */
  activeDescendantId: String,
  onActiveValueChange: Function,
  // >>> Search
  searchValue: String,
  /** Trigger onSearch, return false to prevent trigger open event */
  onSearch: Function,
  /** Trigger when search text match the `tokenSeparators`. Will provide split content */
  onSearchSplit: Function,
  maxLength: Number,
  OptionList: fe.any,
  /** Tell if provided `options` is empty */
  emptyOptions: Boolean
}), b_ = () => ({
  showSearch: {
    type: Boolean,
    default: void 0
  },
  tagRender: {
    type: Function
  },
  optionLabelRender: {
    type: Function
  },
  direction: {
    type: String
  },
  // MISC
  tabindex: Number,
  autofocus: Boolean,
  notFoundContent: fe.any,
  placeholder: fe.any,
  onClear: Function,
  choiceTransitionName: String,
  // >>> Mode
  mode: String,
  // >>> Status
  disabled: {
    type: Boolean,
    default: void 0
  },
  loading: {
    type: Boolean,
    default: void 0
  },
  // >>> Open
  open: {
    type: Boolean,
    default: void 0
  },
  defaultOpen: {
    type: Boolean,
    default: void 0
  },
  onDropdownVisibleChange: {
    type: Function
  },
  // >>> Customize Input
  /** @private Internal usage. Do not use in your production. */
  getInputElement: {
    type: Function
  },
  /** @private Internal usage. Do not use in your production. */
  getRawInputElement: {
    type: Function
  },
  // >>> Selector
  maxTagTextLength: Number,
  maxTagCount: {
    type: [String, Number]
  },
  maxTagPlaceholder: fe.any,
  // >>> Search
  tokenSeparators: {
    type: Array
  },
  // >>> Icons
  allowClear: {
    type: Boolean,
    default: void 0
  },
  showArrow: {
    type: Boolean,
    default: void 0
  },
  inputIcon: fe.any,
  /** Clear all icon */
  clearIcon: fe.any,
  /** Selector remove icon */
  removeIcon: fe.any,
  // >>> Dropdown
  animation: String,
  transitionName: String,
  dropdownStyle: {
    type: Object
  },
  dropdownClassName: String,
  dropdownMatchSelectWidth: {
    type: [Boolean, Number],
    default: void 0
  },
  dropdownRender: {
    type: Function
  },
  dropdownAlign: Object,
  placement: {
    type: String
  },
  getPopupContainer: {
    type: Function
  },
  // >>> Focus
  showAction: {
    type: Array
  },
  onBlur: {
    type: Function
  },
  onFocus: {
    type: Function
  },
  // >>> Rest Events
  onKeyup: Function,
  onKeydown: Function,
  onMousedown: Function,
  onPopupScroll: Function,
  onInputKeyDown: Function,
  onMouseenter: Function,
  onMouseleave: Function,
  onClick: Function
}), hH = () => O(O({}, pH()), b_());
function y0(e) {
  return e === "tags" || e === "multiple";
}
const gH = be({
  compatConfig: {
    MODE: 3
  },
  name: "BaseSelect",
  inheritAttrs: !1,
  props: kn(hH(), {
    showAction: [],
    notFoundContent: "Not Found"
  }),
  setup(e, t) {
    let {
      attrs: n,
      expose: o,
      slots: r
    } = t;
    const i = E(() => y0(e.mode)), a = E(() => e.showSearch !== void 0 ? e.showSearch : i.value || e.mode === "combobox"), l = $e(!1);
    Nt(() => {
      l.value = b0();
    });
    const s = v0(), u = $e(null), c = yd(), d = $e(null), f = $e(null), p = $e(null), v = ce(!1), [g, m, x] = sH();
    o({
      focus: () => {
        var pe;
        (pe = f.value) === null || pe === void 0 || pe.focus();
      },
      blur: () => {
        var pe;
        (pe = f.value) === null || pe === void 0 || pe.blur();
      },
      scrollTo: (pe) => {
        var ge;
        return (ge = p.value) === null || ge === void 0 ? void 0 : ge.scrollTo(pe);
      }
    });
    const P = E(() => {
      var pe;
      if (e.mode !== "combobox")
        return e.searchValue;
      const ge = (pe = e.displayValues[0]) === null || pe === void 0 ? void 0 : pe.value;
      return typeof ge == "string" || typeof ge == "number" ? String(ge) : "";
    }), $ = e.open !== void 0 ? e.open : e.defaultOpen, I = $e($), w = $e($), _ = (pe) => {
      I.value = e.open !== void 0 ? e.open : pe, w.value = I.value;
    };
    ke(() => e.open, () => {
      _(e.open);
    });
    const M = E(() => !e.notFoundContent && e.emptyOptions);
    It(() => {
      w.value = I.value, (e.disabled || M.value && w.value && e.mode === "combobox") && (w.value = !1);
    });
    const N = E(() => M.value ? !1 : w.value), A = (pe) => {
      const ge = pe !== void 0 ? pe : !w.value;
      w.value !== ge && !e.disabled && (_(ge), e.onDropdownVisibleChange && e.onDropdownVisibleChange(ge), !ge && G.value && (G.value = !1, m(!1, () => {
        K.value = !1, v.value = !1;
      })));
    }, H = E(() => (e.tokenSeparators || []).some((pe) => [`
`, `\r
`].includes(pe))), B = (pe, ge, _e) => {
      var ze, Ke;
      let He = !0, Ne = pe;
      (ze = e.onActiveValueChange) === null || ze === void 0 || ze.call(e, null);
      const Xe = _e ? null : z6(pe, e.tokenSeparators);
      return e.mode !== "combobox" && Xe && (Ne = "", (Ke = e.onSearchSplit) === null || Ke === void 0 || Ke.call(e, Xe), A(!1), He = !1), e.onSearch && P.value !== Ne && e.onSearch(Ne, {
        source: ge ? "typing" : "effect"
      }), He;
    }, F = (pe) => {
      var ge;
      !pe || !pe.trim() || (ge = e.onSearch) === null || ge === void 0 || ge.call(e, pe, {
        source: "submit"
      });
    };
    ke(w, () => {
      !w.value && !i.value && e.mode !== "combobox" && B("", !1, !1);
    }, {
      immediate: !0,
      flush: "post"
    }), ke(() => e.disabled, () => {
      I.value && e.disabled && _(!1), e.disabled && !v.value && m(!1);
    }, {
      immediate: !0
    });
    const [R, X] = g_(), j = function(pe) {
      var ge;
      const _e = R(), {
        which: ze
      } = pe;
      if (ze === it.ENTER && (e.mode !== "combobox" && pe.preventDefault(), w.value || A(!0)), X(!!P.value), ze === it.BACKSPACE && !_e && i.value && !P.value && e.displayValues.length) {
        const Xe = [...e.displayValues];
        let De = null;
        for (let Fe = Xe.length - 1; Fe >= 0; Fe -= 1) {
          const Ve = Xe[Fe];
          if (!Ve.disabled) {
            Xe.splice(Fe, 1), De = Ve;
            break;
          }
        }
        De && e.onDisplayValuesChange(Xe, {
          type: "remove",
          values: [De]
        });
      }
      for (var Ke = arguments.length, He = new Array(Ke > 1 ? Ke - 1 : 0), Ne = 1; Ne < Ke; Ne++)
        He[Ne - 1] = arguments[Ne];
      w.value && p.value && p.value.onKeydown(pe, ...He), (ge = e.onKeydown) === null || ge === void 0 || ge.call(e, pe, ...He);
    }, ee = function(pe) {
      for (var ge = arguments.length, _e = new Array(ge > 1 ? ge - 1 : 0), ze = 1; ze < ge; ze++)
        _e[ze - 1] = arguments[ze];
      w.value && p.value && p.value.onKeyup(pe, ..._e), e.onKeyup && e.onKeyup(pe, ..._e);
    }, W = (pe) => {
      const ge = e.displayValues.filter((_e) => _e !== pe);
      e.onDisplayValuesChange(ge, {
        type: "remove",
        values: [pe]
      });
    }, K = $e(!1), q = function() {
      m(!0), e.disabled || (e.onFocus && !K.value && e.onFocus(...arguments), e.showAction && e.showAction.includes("focus") && A(!0)), K.value = !0;
    }, G = ce(!1), ae = function() {
      if (G.value || (v.value = !0, m(!1, () => {
        K.value = !1, v.value = !1, A(!1);
      }), e.disabled))
        return;
      const pe = P.value;
      pe && (e.mode === "tags" ? e.onSearch(pe, {
        source: "submit"
      }) : e.mode === "multiple" && e.onSearch("", {
        source: "blur"
      })), e.onBlur && e.onBlur(...arguments);
    }, le = () => {
      G.value = !0;
    }, ie = () => {
      G.value = !1;
    };
    Ft("VCSelectContainerEvent", {
      focus: q,
      blur: ae
    });
    const re = [];
    Nt(() => {
      re.forEach((pe) => clearTimeout(pe)), re.splice(0, re.length);
    }), qt(() => {
      re.forEach((pe) => clearTimeout(pe)), re.splice(0, re.length);
    });
    const te = function(pe) {
      var ge, _e;
      const {
        target: ze
      } = pe, Ke = (ge = d.value) === null || ge === void 0 ? void 0 : ge.getPopupElement();
      if (Ke && Ke.contains(ze)) {
        const De = setTimeout(() => {
          var Fe;
          const Ve = re.indexOf(De);
          Ve !== -1 && re.splice(Ve, 1), x(), !l.value && !Ke.contains(document.activeElement) && ((Fe = f.value) === null || Fe === void 0 || Fe.focus());
        });
        re.push(De);
      }
      for (var He = arguments.length, Ne = new Array(He > 1 ? He - 1 : 0), Xe = 1; Xe < He; Xe++)
        Ne[Xe - 1] = arguments[Xe];
      (_e = e.onMousedown) === null || _e === void 0 || _e.call(e, pe, ...Ne);
    }, ve = $e(null), ue = () => {
    };
    return Nt(() => {
      ke(N, () => {
        var pe;
        if (N.value) {
          const ge = Math.ceil((pe = u.value) === null || pe === void 0 ? void 0 : pe.offsetWidth);
          ve.value !== ge && !Number.isNaN(ge) && (ve.value = ge);
        }
      }, {
        immediate: !0,
        flush: "post"
      });
    }), lH([u, d], N, A), uH(m_(O(O({}, ys(e)), {
      open: w,
      triggerOpen: N,
      showSearch: a,
      multiple: i,
      toggleOpen: A
    }))), () => {
      const pe = O(O({}, e), n), {
        prefixCls: ge,
        id: _e,
        open: ze,
        defaultOpen: Ke,
        mode: He,
        // Search related
        showSearch: Ne,
        searchValue: Xe,
        onSearch: De,
        // Icons
        allowClear: Fe,
        clearIcon: Ve,
        showArrow: nt,
        inputIcon: je,
        // Others
        disabled: Pe,
        loading: Ge,
        getInputElement: Se,
        getPopupContainer: Ce,
        placement: Ae,
        // Dropdown
        animation: qe,
        transitionName: We,
        dropdownStyle: tt,
        dropdownClassName: Ee,
        dropdownMatchSelectWidth: Re,
        dropdownRender: Be,
        dropdownAlign: ot,
        showAction: pt,
        direction: at,
        // Tags
        tokenSeparators: dt,
        tagRender: wt,
        optionLabelRender: Ct,
        // Events
        onPopupScroll: St,
        onDropdownVisibleChange: yt,
        onFocus: Ot,
        onBlur: Wt,
        onKeyup: Xt,
        onKeydown: ln,
        onMousedown: pn,
        onClear: gt,
        omitDomProps: En,
        getRawInputElement: hn,
        displayValues: Kn,
        onDisplayValuesChange: so,
        emptyOptions: Uo,
        activeDescendantId: Ue,
        activeValue: ht,
        OptionList: vt
      } = pe, Zt = dH(pe, ["prefixCls", "id", "open", "defaultOpen", "mode", "showSearch", "searchValue", "onSearch", "allowClear", "clearIcon", "showArrow", "inputIcon", "disabled", "loading", "getInputElement", "getPopupContainer", "placement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "showAction", "direction", "tokenSeparators", "tagRender", "optionLabelRender", "onPopupScroll", "onDropdownVisibleChange", "onFocus", "onBlur", "onKeyup", "onKeydown", "onMousedown", "onClear", "omitDomProps", "getRawInputElement", "displayValues", "onDisplayValuesChange", "emptyOptions", "activeDescendantId", "activeValue", "OptionList"]), Zn = He === "combobox" && Se && Se() || null, Qn = typeof hn == "function" && hn(), $o = O({}, Zt);
      let Cn;
      Qn && (Cn = (Jn) => {
        A(Jn);
      }), fH.forEach((Jn) => {
        delete $o[Jn];
      }), En?.forEach((Jn) => {
        delete $o[Jn];
      });
      const Tt = nt !== void 0 ? nt : Ge || !i.value && He !== "combobox";
      let po;
      Tt && (po = h(Es, {
        class: Me(`${ge}-arrow`, {
          [`${ge}-arrow-loading`]: Ge
        }),
        customizeIcon: je,
        customizeIconProps: {
          loading: Ge,
          searchValue: P.value,
          open: w.value,
          focused: g.value,
          showSearch: a.value
        }
      }, null));
      let zo;
      const un = () => {
        gt?.(), so([], {
          type: "clear",
          values: Kn
        }), B("", !1, !1);
      };
      !Pe && Fe && (Kn.length || P.value) && (zo = h(Es, {
        class: `${ge}-clear`,
        onMousedown: un,
        customizeIcon: Ve
      }, {
        default: () => [Le("×")]
      }));
      const Dn = h(vt, {
        ref: p
      }, O(O({}, s.customSlots), {
        option: r.option
      })), cn = Me(ge, n.class, {
        [`${ge}-focused`]: g.value,
        [`${ge}-multiple`]: i.value,
        [`${ge}-single`]: !i.value,
        [`${ge}-allow-clear`]: Fe,
        [`${ge}-show-arrow`]: Tt,
        [`${ge}-disabled`]: Pe,
        [`${ge}-loading`]: Ge,
        [`${ge}-open`]: w.value,
        [`${ge}-customize-input`]: Zn,
        [`${ge}-show-search`]: a.value
      }), An = h(B5, {
        ref: d,
        disabled: Pe,
        prefixCls: ge,
        visible: N.value,
        popupElement: Dn,
        containerWidth: ve.value,
        animation: qe,
        transitionName: We,
        dropdownStyle: tt,
        dropdownClassName: Ee,
        direction: at,
        dropdownMatchSelectWidth: Re,
        dropdownRender: Be,
        dropdownAlign: ot,
        placement: Ae,
        getPopupContainer: Ce,
        empty: Uo,
        getTriggerDOMNode: () => c.current,
        onPopupVisibleChange: Cn,
        onPopupMouseEnter: ue,
        onPopupFocusin: le,
        onPopupFocusout: ie
      }, {
        default: () => Qn ? Ao(Qn) && Xn(Qn, {
          ref: c
        }, !1, !0) : h(aH, Q(Q({}, e), {}, {
          domRef: c,
          prefixCls: ge,
          inputElement: Zn,
          ref: f,
          id: _e,
          showSearch: a.value,
          mode: He,
          activeDescendantId: Ue,
          tagRender: wt,
          optionLabelRender: Ct,
          values: Kn,
          open: w.value,
          onToggleOpen: A,
          activeValue: ht,
          searchValue: P.value,
          onSearch: B,
          onSearchSubmit: F,
          onRemove: W,
          tokenWithEnter: H.value
        }), null)
      });
      let er;
      return Qn ? er = An : er = h("div", Q(Q({}, $o), {}, {
        class: cn,
        ref: u,
        onMousedown: te,
        onKeydown: j,
        onKeyup: ee
      }), [g.value && !w.value && h("span", {
        style: {
          width: 0,
          height: 0,
          position: "absolute",
          overflow: "hidden",
          opacity: 0
        },
        "aria-live": "polite"
      }, [`${Kn.map((Jn) => {
        let {
          label: pr,
          value: Wo
        } = Jn;
        return ["number", "string"].includes(typeof pr) ? pr : Wo;
      }).join(", ")}`]), An, po, zo]), er;
    };
  }
}), Rh = (e, t) => {
  let {
    height: n,
    offset: o,
    prefixCls: r,
    onInnerResize: i
  } = e, {
    slots: a
  } = t;
  var l;
  let s = {}, u = {
    display: "flex",
    flexDirection: "column"
  };
  return o !== void 0 && (s = {
    height: `${n}px`,
    position: "relative",
    overflow: "hidden"
  }, u = O(O({}, u), {
    transform: `translateY(${o}px)`,
    position: "absolute",
    left: 0,
    right: 0,
    top: 0
  })), h("div", {
    style: s
  }, [h(Al, {
    onResize: (c) => {
      let {
        offsetHeight: d
      } = c;
      d && i && i();
    }
  }, {
    default: () => [h("div", {
      style: u,
      class: Me({
        [`${r}-holder-inner`]: r
      })
    }, [(l = a.default) === null || l === void 0 ? void 0 : l.call(a)])]
  })]);
};
Rh.displayName = "Filter";
Rh.inheritAttrs = !1;
Rh.props = {
  prefixCls: String,
  /** Virtual filler height. Should be `count * itemMinHeight` */
  height: Number,
  /** Set offset of visible items. Should be the top of start item position */
  offset: Number,
  onInnerResize: Function
};
const y_ = (e, t) => {
  let {
    setRef: n
  } = e, {
    slots: o
  } = t;
  var r;
  const i = go((r = o.default) === null || r === void 0 ? void 0 : r.call(o));
  return i && i.length ? Ml(i[0], {
    ref: n
  }) : i;
};
y_.props = {
  setRef: {
    type: Function,
    default: () => {
    }
  }
};
const vH = 20;
function iS(e) {
  return "touches" in e ? e.touches[0].pageY : e.pageY;
}
const mH = be({
  compatConfig: {
    MODE: 3
  },
  name: "ScrollBar",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    scrollTop: Number,
    scrollHeight: Number,
    height: Number,
    count: Number,
    onScroll: {
      type: Function
    },
    onStartMove: {
      type: Function
    },
    onStopMove: {
      type: Function
    }
  },
  setup() {
    return {
      moveRaf: null,
      scrollbarRef: yd(),
      thumbRef: yd(),
      visibleTimeout: null,
      state: Pn({
        dragging: !1,
        pageY: null,
        startTop: null,
        visible: !1
      })
    };
  },
  watch: {
    scrollTop: {
      handler() {
        this.delayHidden();
      },
      flush: "post"
    }
  },
  mounted() {
    var e, t;
    (e = this.scrollbarRef.current) === null || e === void 0 || e.addEventListener("touchstart", this.onScrollbarTouchStart, Bo ? {
      passive: !1
    } : !1), (t = this.thumbRef.current) === null || t === void 0 || t.addEventListener("touchstart", this.onMouseDown, Bo ? {
      passive: !1
    } : !1);
  },
  beforeUnmount() {
    this.removeEvents(), clearTimeout(this.visibleTimeout);
  },
  methods: {
    delayHidden() {
      clearTimeout(this.visibleTimeout), this.state.visible = !0, this.visibleTimeout = setTimeout(() => {
        this.state.visible = !1;
      }, 2e3);
    },
    onScrollbarTouchStart(e) {
      e.preventDefault();
    },
    onContainerMouseDown(e) {
      e.stopPropagation(), e.preventDefault();
    },
    // ======================= Clean =======================
    patchEvents() {
      window.addEventListener("mousemove", this.onMouseMove), window.addEventListener("mouseup", this.onMouseUp), this.thumbRef.current.addEventListener("touchmove", this.onMouseMove, Bo ? {
        passive: !1
      } : !1), this.thumbRef.current.addEventListener("touchend", this.onMouseUp);
    },
    removeEvents() {
      window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("mouseup", this.onMouseUp), this.scrollbarRef.current.removeEventListener("touchstart", this.onScrollbarTouchStart, Bo ? {
        passive: !1
      } : !1), this.thumbRef.current && (this.thumbRef.current.removeEventListener("touchstart", this.onMouseDown, Bo ? {
        passive: !1
      } : !1), this.thumbRef.current.removeEventListener("touchmove", this.onMouseMove, Bo ? {
        passive: !1
      } : !1), this.thumbRef.current.removeEventListener("touchend", this.onMouseUp)), Vt.cancel(this.moveRaf);
    },
    // ======================= Thumb =======================
    onMouseDown(e) {
      const {
        onStartMove: t
      } = this.$props;
      O(this.state, {
        dragging: !0,
        pageY: iS(e),
        startTop: this.getTop()
      }), t(), this.patchEvents(), e.stopPropagation(), e.preventDefault();
    },
    onMouseMove(e) {
      const {
        dragging: t,
        pageY: n,
        startTop: o
      } = this.state, {
        onScroll: r
      } = this.$props;
      if (Vt.cancel(this.moveRaf), t) {
        const i = iS(e) - n, a = o + i, l = this.getEnableScrollRange(), s = this.getEnableHeightRange(), u = s ? a / s : 0, c = Math.ceil(u * l);
        this.moveRaf = Vt(() => {
          r(c);
        });
      }
    },
    onMouseUp() {
      const {
        onStopMove: e
      } = this.$props;
      this.state.dragging = !1, e(), this.removeEvents();
    },
    // ===================== Calculate =====================
    getSpinHeight() {
      const {
        height: e,
        scrollHeight: t
      } = this.$props;
      let n = e / t * 100;
      return n = Math.max(n, vH), n = Math.min(n, e / 2), Math.floor(n);
    },
    getEnableScrollRange() {
      const {
        scrollHeight: e,
        height: t
      } = this.$props;
      return e - t || 0;
    },
    getEnableHeightRange() {
      const {
        height: e
      } = this.$props, t = this.getSpinHeight();
      return e - t || 0;
    },
    getTop() {
      const {
        scrollTop: e
      } = this.$props, t = this.getEnableScrollRange(), n = this.getEnableHeightRange();
      return e === 0 || t === 0 ? 0 : e / t * n;
    },
    // Not show scrollbar when height is large than scrollHeight
    showScroll() {
      const {
        height: e,
        scrollHeight: t
      } = this.$props;
      return t > e;
    }
  },
  render() {
    const {
      dragging: e,
      visible: t
    } = this.state, {
      prefixCls: n
    } = this.$props, o = this.getSpinHeight() + "px", r = this.getTop() + "px", i = this.showScroll(), a = i && t;
    return h("div", {
      ref: this.scrollbarRef,
      class: Me(`${n}-scrollbar`, {
        [`${n}-scrollbar-show`]: i
      }),
      style: {
        width: "8px",
        top: 0,
        bottom: 0,
        right: 0,
        position: "absolute",
        display: a ? void 0 : "none"
      },
      onMousedown: this.onContainerMouseDown,
      onMousemove: this.delayHidden
    }, [h("div", {
      ref: this.thumbRef,
      class: Me(`${n}-scrollbar-thumb`, {
        [`${n}-scrollbar-thumb-moving`]: e
      }),
      style: {
        width: "100%",
        height: o,
        top: r,
        left: 0,
        position: "absolute",
        background: "rgba(0, 0, 0, 0.5)",
        borderRadius: "99px",
        cursor: "pointer",
        userSelect: "none"
      },
      onMousedown: this.onMouseDown
    }, null)]);
  }
});
function bH(e, t, n, o) {
  const r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = ce(Symbol("update"));
  ke(e, () => {
    a.value = Symbol("update");
  });
  let l;
  function s() {
    Vt.cancel(l);
  }
  function u() {
    s(), l = Vt(() => {
      r.forEach((d, f) => {
        if (d && d.offsetParent) {
          const {
            offsetHeight: p
          } = d;
          i.get(f) !== p && (a.value = Symbol("update"), i.set(f, d.offsetHeight));
        }
      });
    });
  }
  function c(d, f) {
    const p = t(d);
    r.get(p), f ? (r.set(p, f.$el || f), u()) : r.delete(p);
  }
  return jo(() => {
    s();
  }), [c, u, i, a];
}
function yH(e, t, n, o, r, i, a, l) {
  let s;
  return (u) => {
    if (u == null) {
      l();
      return;
    }
    Vt.cancel(s);
    const c = t.value, d = o.itemHeight;
    if (typeof u == "number")
      a(u);
    else if (u && typeof u == "object") {
      let f;
      const {
        align: p
      } = u;
      "index" in u ? {
        index: f
      } = u : f = c.findIndex((m) => r(m) === u.key);
      const {
        offset: v = 0
      } = u, g = (m, x) => {
        if (m < 0 || !e.value) return;
        const S = e.value.clientHeight;
        let C = !1, P = x;
        if (S) {
          const $ = x || p;
          let I = 0, w = 0, _ = 0;
          const M = Math.min(c.length, f);
          for (let H = 0; H <= M; H += 1) {
            const B = r(c[H]);
            w = I;
            const F = n.get(B);
            _ = w + (F === void 0 ? d : F), I = _, H === f && F === void 0 && (C = !0);
          }
          const N = e.value.scrollTop;
          let A = null;
          switch ($) {
            case "top":
              A = w - v;
              break;
            case "bottom":
              A = _ - S + v;
              break;
            default: {
              const H = N + S;
              w < N ? P = "top" : _ > H && (P = "bottom");
            }
          }
          A !== null && A !== N && a(A);
        }
        s = Vt(() => {
          C && i(), g(m - 1, P);
        }, 2);
      };
      g(5);
    }
  };
}
const xH = typeof navigator == "object" && /Firefox/i.test(navigator.userAgent), x_ = ((e, t) => {
  let n = !1, o = null;
  function r() {
    clearTimeout(o), n = !0, o = setTimeout(() => {
      n = !1;
    }, 50);
  }
  return function(i) {
    let a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
    const l = (
      // Pass origin wheel when on the top
      i < 0 && e.value || // Pass origin wheel when on the bottom
      i > 0 && t.value
    );
    return a && l ? (clearTimeout(o), n = !1) : (!l || n) && r(), !n && l;
  };
});
function wH(e, t, n, o) {
  let r = 0, i = null, a = null, l = !1;
  const s = x_(t, n);
  function u(d) {
    if (!e.value) return;
    Vt.cancel(i);
    const {
      deltaY: f
    } = d;
    r += f, a = f, !s(f) && (xH || d.preventDefault(), i = Vt(() => {
      o(r * (l ? 10 : 1)), r = 0;
    }));
  }
  function c(d) {
    e.value && (l = d.detail === a);
  }
  return [u, c];
}
const SH = 14 / 15;
function CH(e, t, n) {
  let o = !1, r = 0, i = null, a = null;
  const l = () => {
    i && (i.removeEventListener("touchmove", s), i.removeEventListener("touchend", u));
  }, s = (f) => {
    if (o) {
      const p = Math.ceil(f.touches[0].pageY);
      let v = r - p;
      r = p, n(v) && f.preventDefault(), clearInterval(a), a = setInterval(() => {
        v *= SH, (!n(v, !0) || Math.abs(v) <= 0.1) && clearInterval(a);
      }, 16);
    }
  }, u = () => {
    o = !1, l();
  }, c = (f) => {
    l(), f.touches.length === 1 && !o && (o = !0, r = Math.ceil(f.touches[0].pageY), i = f.target, i.addEventListener("touchmove", s, {
      passive: !1
    }), i.addEventListener("touchend", u));
  }, d = () => {
  };
  Nt(() => {
    document.addEventListener("touchmove", d, {
      passive: !1
    }), ke(e, (f) => {
      t.value.removeEventListener("touchstart", c), l(), clearInterval(a), f && t.value.addEventListener("touchstart", c, {
        passive: !1
      });
    }, {
      immediate: !0
    });
  }), qt(() => {
    document.removeEventListener("touchmove", d);
  });
}
var $H = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const PH = [], OH = {
  overflowY: "auto",
  overflowAnchor: "none"
};
function kH(e, t, n, o, r, i) {
  let {
    getKey: a
  } = i;
  return e.slice(t, n + 1).map((l, s) => {
    const u = t + s, c = r(l, u, {
      // style: status === 'MEASURE_START' ? { visibility: 'hidden' } : {},
    }), d = a(l);
    return h(y_, {
      key: d,
      setRef: (f) => o(l, f)
    }, {
      default: () => [c]
    });
  });
}
const w_ = be({
  compatConfig: {
    MODE: 3
  },
  name: "List",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    data: fe.array,
    height: Number,
    itemHeight: Number,
    /** If not match virtual scroll condition, Set List still use height of container. */
    fullHeight: {
      type: Boolean,
      default: void 0
    },
    itemKey: {
      type: [String, Number, Function],
      required: !0
    },
    component: {
      type: [String, Object]
    },
    /** Set `false` will always use real scroll instead of virtual one */
    virtual: {
      type: Boolean,
      default: void 0
    },
    children: Function,
    onScroll: Function,
    onMousedown: Function,
    onMouseenter: Function,
    onVisibleChange: Function
  },
  setup(e, t) {
    let {
      expose: n
    } = t;
    const o = E(() => {
      const {
        height: W,
        itemHeight: K,
        virtual: q
      } = e;
      return !!(q !== !1 && W && K);
    }), r = E(() => {
      const {
        height: W,
        itemHeight: K,
        data: q
      } = e;
      return o.value && q && K * q.length > W;
    }), i = Pn({
      scrollTop: 0,
      scrollMoving: !1
    }), a = E(() => e.data || PH), l = $e([]);
    ke(a, () => {
      l.value = dr(a.value).slice();
    }, {
      immediate: !0
    });
    const s = $e((W) => {
    });
    ke(() => e.itemKey, (W) => {
      typeof W == "function" ? s.value = W : s.value = (K) => K?.[W];
    }, {
      immediate: !0
    });
    const u = $e(), c = $e(), d = $e(), f = (W) => s.value(W), p = {
      getKey: f
    };
    function v(W) {
      let K;
      typeof W == "function" ? K = W(i.scrollTop) : K = W;
      const q = I(K);
      u.value && (u.value.scrollTop = q), i.scrollTop = q;
    }
    const [g, m, x, S] = bH(l, f), C = Pn({
      scrollHeight: void 0,
      start: 0,
      end: 0,
      offset: void 0
    }), P = $e(0);
    Nt(() => {
      Yt(() => {
        var W;
        P.value = ((W = c.value) === null || W === void 0 ? void 0 : W.offsetHeight) || 0;
      });
    }), Ya(() => {
      Yt(() => {
        var W;
        P.value = ((W = c.value) === null || W === void 0 ? void 0 : W.offsetHeight) || 0;
      });
    }), ke([o, l], () => {
      o.value || O(C, {
        scrollHeight: void 0,
        start: 0,
        end: l.value.length - 1,
        offset: void 0
      });
    }, {
      immediate: !0
    }), ke([o, l, P, r], () => {
      o.value && !r.value && O(C, {
        scrollHeight: P.value,
        start: 0,
        end: l.value.length - 1,
        offset: void 0
      }), u.value && (i.scrollTop = u.value.scrollTop);
    }, {
      immediate: !0
    }), ke([r, o, () => i.scrollTop, l, S, () => e.height, P], () => {
      if (!o.value || !r.value)
        return;
      let W = 0, K, q, G;
      const ae = l.value.length, le = l.value, ie = i.scrollTop, {
        itemHeight: re,
        height: te
      } = e, ve = ie + te;
      for (let ue = 0; ue < ae; ue += 1) {
        const pe = le[ue], ge = f(pe);
        let _e = x.get(ge);
        _e === void 0 && (_e = re);
        const ze = W + _e;
        K === void 0 && ze >= ie && (K = ue, q = W), G === void 0 && ze > ve && (G = ue), W = ze;
      }
      K === void 0 && (K = 0, q = 0, G = Math.ceil(te / re)), G === void 0 && (G = ae - 1), G = Math.min(G + 1, ae), O(C, {
        scrollHeight: W,
        start: K,
        end: G,
        offset: q
      });
    }, {
      immediate: !0
    });
    const $ = E(() => C.scrollHeight - e.height);
    function I(W) {
      let K = W;
      return Number.isNaN($.value) || (K = Math.min(K, $.value)), K = Math.max(K, 0), K;
    }
    const w = E(() => i.scrollTop <= 0), _ = E(() => i.scrollTop >= $.value), M = x_(w, _);
    function N(W) {
      v(W);
    }
    function A(W) {
      var K;
      const {
        scrollTop: q
      } = W.currentTarget;
      q !== i.scrollTop && v(q), (K = e.onScroll) === null || K === void 0 || K.call(e, W);
    }
    const [H, B] = wH(o, w, _, (W) => {
      v((K) => K + W);
    });
    CH(o, u, (W, K) => M(W, K) ? !1 : (H({
      preventDefault() {
      },
      deltaY: W
    }), !0));
    function F(W) {
      o.value && W.preventDefault();
    }
    const R = () => {
      u.value && (u.value.removeEventListener("wheel", H, Bo ? {
        passive: !1
      } : !1), u.value.removeEventListener("DOMMouseScroll", B), u.value.removeEventListener("MozMousePixelScroll", F));
    };
    It(() => {
      Yt(() => {
        u.value && (R(), u.value.addEventListener("wheel", H, Bo ? {
          passive: !1
        } : !1), u.value.addEventListener("DOMMouseScroll", B), u.value.addEventListener("MozMousePixelScroll", F));
      });
    }), qt(() => {
      R();
    });
    const X = yH(u, l, x, e, f, m, v, () => {
      var W;
      (W = d.value) === null || W === void 0 || W.delayHidden();
    });
    n({
      scrollTo: X
    });
    const j = E(() => {
      let W = null;
      return e.height && (W = O({
        [e.fullHeight ? "height" : "maxHeight"]: e.height + "px"
      }, OH), o.value && (W.overflowY = "hidden", i.scrollMoving && (W.pointerEvents = "none"))), W;
    });
    return ke([() => C.start, () => C.end, l], () => {
      if (e.onVisibleChange) {
        const W = l.value.slice(C.start, C.end + 1);
        e.onVisibleChange(W, l.value);
      }
    }, {
      flush: "post"
    }), {
      state: i,
      mergedData: l,
      componentStyle: j,
      onFallbackScroll: A,
      onScrollBar: N,
      componentRef: u,
      useVirtual: o,
      calRes: C,
      collectHeight: m,
      setInstance: g,
      sharedConfig: p,
      scrollBarRef: d,
      fillerInnerRef: c,
      delayHideScrollBar: () => {
        var W;
        (W = d.value) === null || W === void 0 || W.delayHidden();
      }
    };
  },
  render() {
    const e = O(O({}, this.$props), this.$attrs), {
      prefixCls: t = "rc-virtual-list",
      height: n,
      itemHeight: o,
      // eslint-disable-next-line no-unused-vars
      fullHeight: r,
      data: i,
      itemKey: a,
      virtual: l,
      component: s = "div",
      onScroll: u,
      children: c = this.$slots.default,
      style: d,
      class: f
    } = e, p = $H(e, ["prefixCls", "height", "itemHeight", "fullHeight", "data", "itemKey", "virtual", "component", "onScroll", "children", "style", "class"]), v = Me(t, f), {
      scrollTop: g
    } = this.state, {
      scrollHeight: m,
      offset: x,
      start: S,
      end: C
    } = this.calRes, {
      componentStyle: P,
      onFallbackScroll: $,
      onScrollBar: I,
      useVirtual: w,
      collectHeight: _,
      sharedConfig: M,
      setInstance: N,
      mergedData: A,
      delayHideScrollBar: H
    } = this;
    return h("div", Q({
      style: O(O({}, d), {
        position: "relative"
      }),
      class: v
    }, p), [h(s, {
      class: `${t}-holder`,
      style: P,
      ref: "componentRef",
      onScroll: $,
      onMouseenter: H
    }, {
      default: () => [h(Rh, {
        prefixCls: t,
        height: m,
        offset: x,
        onInnerResize: _,
        ref: "fillerInnerRef"
      }, {
        default: () => kH(A, S, C, N, c, M)
      })]
    }), w && h(mH, {
      ref: "scrollBarRef",
      prefixCls: t,
      scrollTop: g,
      height: n,
      scrollHeight: m,
      count: A.length,
      onScroll: I,
      onStartMove: () => {
        this.state.scrollMoving = !0;
      },
      onStopMove: () => {
        this.state.scrollMoving = !1;
      }
    }, null)]);
  }
});
function S_(e, t, n) {
  const o = ce(e());
  return ke(t, (r, i) => {
    n ? n(r, i) && (o.value = e()) : o.value = e();
  }), o;
}
function IH() {
  return /(mac\sos|macintosh)/i.test(navigator.appVersion);
}
const C_ = Symbol("SelectContextKey");
function _H(e) {
  return Ft(C_, e);
}
function TH() {
  return zt(C_, {});
}
var MH = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function aS(e) {
  return typeof e == "string" || typeof e == "number";
}
const EH = be({
  compatConfig: {
    MODE: 3
  },
  name: "OptionList",
  inheritAttrs: !1,
  setup(e, t) {
    let {
      expose: n,
      slots: o
    } = t;
    const r = cH(), i = TH(), a = E(() => `${r.prefixCls}-item`), l = S_(() => i.flattenOptions, [() => r.open, () => i.flattenOptions], ($) => $[0]), s = yd(), u = ($) => {
      $.preventDefault();
    }, c = ($) => {
      s.current && s.current.scrollTo(typeof $ == "number" ? {
        index: $
      } : $);
    }, d = function($) {
      let I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
      const w = l.value.length;
      for (let _ = 0; _ < w; _ += 1) {
        const M = ($ + _ * I + w) % w, {
          group: N,
          data: A
        } = l.value[M];
        if (!N && !A.disabled)
          return M;
      }
      return -1;
    }, f = Pn({
      activeIndex: d(0)
    }), p = function($) {
      let I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
      f.activeIndex = $;
      const w = {
        source: I ? "keyboard" : "mouse"
      }, _ = l.value[$];
      if (!_) {
        i.onActiveValue(null, -1, w);
        return;
      }
      i.onActiveValue(_.value, $, w);
    };
    ke([() => l.value.length, () => r.searchValue], () => {
      p(i.defaultActiveFirstOption !== !1 ? d(0) : -1);
    }, {
      immediate: !0
    });
    const v = ($) => i.rawValues.has($) && r.mode !== "combobox";
    ke([() => r.open, () => r.searchValue], () => {
      if (!r.multiple && r.open && i.rawValues.size === 1) {
        const $ = Array.from(i.rawValues)[0], I = dr(l.value).findIndex((w) => {
          let {
            data: _
          } = w;
          return _[i.fieldNames.value] === $;
        });
        I !== -1 && (p(I), Yt(() => {
          c(I);
        }));
      }
      r.open && Yt(() => {
        var $;
        ($ = s.current) === null || $ === void 0 || $.scrollTo(void 0);
      });
    }, {
      immediate: !0,
      flush: "post"
    });
    const g = ($) => {
      $ !== void 0 && i.onSelect($, {
        selected: !i.rawValues.has($)
      }), r.multiple || r.toggleOpen(!1);
    }, m = ($) => typeof $.label == "function" ? $.label() : $.label;
    function x($) {
      const I = l.value[$];
      if (!I) return null;
      const w = I.data || {}, {
        value: _
      } = w, {
        group: M
      } = I, N = Bs(w, !0), A = m(I);
      return I ? h("div", Q(Q({
        "aria-label": typeof A == "string" && !M ? A : null
      }, N), {}, {
        key: $,
        role: M ? "presentation" : "option",
        id: `${r.id}_list_${$}`,
        "aria-selected": v(_)
      }), [_]) : null;
    }
    return n({
      onKeydown: ($) => {
        const {
          which: I,
          ctrlKey: w
        } = $;
        switch (I) {
          // >>> Arrow keys & ctrl + n/p on Mac
          case it.N:
          case it.P:
          case it.UP:
          case it.DOWN: {
            let _ = 0;
            if (I === it.UP ? _ = -1 : I === it.DOWN ? _ = 1 : IH() && w && (I === it.N ? _ = 1 : I === it.P && (_ = -1)), _ !== 0) {
              const M = d(f.activeIndex + _, _);
              c(M), p(M, !0);
            }
            break;
          }
          // >>> Select
          case it.ENTER: {
            const _ = l.value[f.activeIndex];
            _ && !_.data.disabled ? g(_.value) : g(void 0), r.open && $.preventDefault();
            break;
          }
          // >>> Close
          case it.ESC:
            r.toggleOpen(!1), r.open && $.stopPropagation();
        }
      },
      onKeyup: () => {
      },
      scrollTo: ($) => {
        c($);
      }
    }), () => {
      const {
        id: $,
        notFoundContent: I,
        onPopupScroll: w
      } = r, {
        menuItemSelectedIcon: _,
        fieldNames: M,
        virtual: N,
        listHeight: A,
        listItemHeight: H
      } = i, B = o.option, {
        activeIndex: F
      } = f, R = Object.keys(M).map((X) => M[X]);
      return l.value.length === 0 ? h("div", {
        role: "listbox",
        id: `${$}_list`,
        class: `${a.value}-empty`,
        onMousedown: u
      }, [I]) : h(Je, null, [h("div", {
        role: "listbox",
        id: `${$}_list`,
        style: {
          height: 0,
          width: 0,
          overflow: "hidden"
        }
      }, [x(F - 1), x(F), x(F + 1)]), h(w_, {
        itemKey: "key",
        ref: s,
        data: l.value,
        height: A,
        itemHeight: H,
        fullHeight: !1,
        onMousedown: u,
        onScroll: w,
        virtual: N
      }, {
        default: (X, j) => {
          var ee;
          const {
            group: W,
            groupOption: K,
            data: q,
            value: G
          } = X, {
            key: ae
          } = q, le = typeof X.label == "function" ? X.label() : X.label;
          if (W) {
            const Ve = (ee = q.title) !== null && ee !== void 0 ? ee : aS(le) && le;
            return h("div", {
              class: Me(a.value, `${a.value}-group`),
              title: Ve
            }, [B ? B(q) : le !== void 0 ? le : ae]);
          }
          const {
            disabled: ie,
            title: re,
            children: te,
            style: ve,
            class: ue,
            className: pe
          } = q, ge = MH(q, ["disabled", "title", "children", "style", "class", "className"]), _e = Fn(ge, R), ze = v(G), Ke = `${a.value}-option`, He = Me(a.value, Ke, ue, pe, {
            [`${Ke}-grouped`]: K,
            [`${Ke}-active`]: F === j && !ie,
            [`${Ke}-disabled`]: ie,
            [`${Ke}-selected`]: ze
          }), Ne = m(X), Xe = !_ || typeof _ == "function" || ze, De = typeof Ne == "number" ? Ne : Ne || G;
          let Fe = aS(De) ? De.toString() : void 0;
          return re !== void 0 && (Fe = re), h("div", Q(Q({}, _e), {}, {
            "aria-selected": ze,
            class: He,
            title: Fe,
            onMousemove: (Ve) => {
              ge.onMousemove && ge.onMousemove(Ve), !(F === j || ie) && p(j);
            },
            onClick: (Ve) => {
              ie || g(G), ge.onClick && ge.onClick(Ve);
            },
            style: ve
          }), [h("div", {
            class: `${Ke}-content`
          }, [B ? B(q) : De]), Ao(_) || ze, Xe && h(Es, {
            class: `${a.value}-option-state`,
            customizeIcon: _,
            customizeIconProps: {
              isSelected: ze
            }
          }, {
            default: () => [ze ? "✓" : null]
          })]);
        }
      })]);
    };
  }
});
var DH = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function AH(e) {
  const t = e, {
    key: n,
    children: o
  } = t, r = t.props, {
    value: i,
    disabled: a
  } = r, l = DH(r, ["value", "disabled"]), s = o?.default;
  return O({
    key: n,
    value: i !== void 0 ? i : n,
    children: s,
    disabled: a || a === ""
  }, l);
}
function x0(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  return go(e).map((o, r) => {
    var i;
    if (!Ao(o) || !o.type)
      return null;
    const {
      type: {
        isSelectOptGroup: a
      },
      key: l,
      children: s,
      props: u
    } = o;
    if (t || !a)
      return AH(o);
    const c = s && s.default ? s.default() : void 0, d = u?.label || ((i = s.label) === null || i === void 0 ? void 0 : i.call(s)) || l;
    return O(O({
      key: `__RC_SELECT_GRP__${l === null ? r : String(l)}__`
    }, u), {
      label: d,
      options: x0(c || [])
    });
  }).filter((o) => o);
}
function NH(e, t, n) {
  const o = $e(), r = $e(), i = $e(), a = $e([]);
  return ke([e, t], () => {
    e.value ? a.value = dr(e.value).slice() : a.value = x0(t.value);
  }, {
    immediate: !0,
    deep: !0
  }), It(() => {
    const l = a.value, s = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), c = n.value;
    function d(f) {
      let p = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
      for (let v = 0; v < f.length; v += 1) {
        const g = f[v];
        !g[c.options] || p ? (s.set(g[c.value], g), u.set(g[c.label], g)) : d(g[c.options], !0);
      }
    }
    d(l), o.value = l, r.value = s, i.value = u;
  }), {
    options: o,
    valueOptions: r,
    labelOptions: i
  };
}
let lS = 0;
const RH = process.env.NODE_ENV !== "test" && xr();
function zH() {
  let e;
  return RH ? (e = lS, lS += 1) : e = "TEST_OR_SSR", e;
}
function FH() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ce("");
  const t = `rc_select_${zH()}`;
  return e.value || t;
}
function w0(e) {
  return Array.isArray(e) ? e : e !== void 0 ? [e] : [];
}
const BH = typeof window < "u" && window.document && window.document.documentElement;
process.env.NODE_ENV;
function LH(e) {
  const {
    mode: t,
    options: n,
    children: o,
    backfill: r,
    allowClear: i,
    placeholder: a,
    getInputElement: l,
    showSearch: s,
    onSearch: u,
    defaultOpen: c,
    autofocus: d,
    labelInValue: f,
    value: p,
    inputValue: v,
    optionLabelProp: g
  } = e, m = y0(t), x = s !== void 0 ? s : m || t === "combobox", S = n || x0(o);
  if (vr(t !== "tags" || S.every((C) => !C.disabled), "Please avoid setting option to disabled in tags mode since user can always type text as tag."), vr(t !== "combobox" || !g, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), vr(t === "combobox" || !r, "`backfill` only works with `combobox` mode."), vr(t === "combobox" || !l, "`getInputElement` only work with `combobox` mode."), Tm(t !== "combobox" || !l || !i || !a, "Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."), u && !x && t !== "combobox" && t !== "tags" && vr(!1, "`onSearch` should work with `showSearch` instead of use alone."), Tm(!c || d, "`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autofocus` if needed."), p != null) {
    const C = w0(p);
    vr(!f || C.every((P) => typeof P == "object" && ("key" in P || "value" in P)), "`value` should in shape of `{ value: string | number, label?: any }` when you set `labelInValue` to `true`"), vr(!m || Array.isArray(p), "`value` should be array when `mode` is `multiple` or `tags`");
  }
  if (o) {
    let C = null;
    o.some((P) => {
      var $;
      if (!Ao(P) || !P.type)
        return !1;
      const {
        type: I
      } = P;
      return I.isSelectOption ? !1 : I.isSelectOptGroup ? !((($ = P.children) === null || $ === void 0 ? void 0 : $.default()) || []).every((M) => !Ao(M) || !P.type || M.type.isSelectOption ? !0 : (C = M.type, !1)) : (C = I, !0);
    }), C && vr(!1, `\`children\` should be \`Select.Option\` or \`Select.OptGroup\` instead of \`${C.displayName || C.name || C}\`.`), vr(v === void 0, "`inputValue` is deprecated, please use `searchValue` instead.");
  }
}
function rv(e, t) {
  return w0(e).join("").toUpperCase().includes(t);
}
const HH = ((e, t, n, o, r) => E(() => {
  const i = n.value, a = r?.value, l = o?.value;
  if (!i || l === !1)
    return e.value;
  const {
    options: s,
    label: u,
    value: c
  } = t.value, d = [], f = typeof l == "function", p = i.toUpperCase(), v = f ? l : (m, x) => a ? rv(x[a], p) : x[s] ? rv(x[u !== "children" ? u : "label"], p) : rv(x[c], p), g = f ? (m) => jm(m) : (m) => m;
  return e.value.forEach((m) => {
    if (m[s]) {
      if (v(i, g(m)))
        d.push(m);
      else {
        const S = m[s].filter((C) => v(i, g(C)));
        S.length && d.push(O(O({}, m), {
          [s]: S
        }));
      }
      return;
    }
    v(i, g(m)) && d.push(m);
  }), d;
})), VH = ((e, t) => {
  const n = $e({
    values: /* @__PURE__ */ new Map(),
    options: /* @__PURE__ */ new Map()
  });
  return [E(() => {
    const {
      values: i,
      options: a
    } = n.value, l = e.value.map((c) => {
      var d;
      return c.label === void 0 ? O(O({}, c), {
        label: (d = i.get(c.value)) === null || d === void 0 ? void 0 : d.label
      }) : c;
    }), s = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
    return l.forEach((c) => {
      s.set(c.value, c), u.set(c.value, t.value.get(c.value) || a.get(c.value));
    }), n.value.values = s, n.value.options = u, l;
  }), (i) => t.value.get(i) || n.value.options.get(i)];
});
function lr(e, t) {
  const {
    defaultValue: n,
    value: o = ce()
  } = t || {};
  let r = typeof e == "function" ? e() : e;
  o.value !== void 0 && (r = T(o)), n !== void 0 && (r = typeof n == "function" ? n() : n);
  const i = ce(r), a = ce(r);
  It(() => {
    let s = o.value !== void 0 ? o.value : i.value;
    t.postState && (s = t.postState(s)), a.value = s;
  });
  function l(s) {
    const u = a.value;
    i.value = s, dr(a.value) !== s && t.onChange && t.onChange(s, u);
  }
  return ke(o, () => {
    i.value = o.value;
  }), [a, l];
}
function $n(e) {
  const t = typeof e == "function" ? e() : e, n = ce(t);
  function o(r) {
    n.value = r;
  }
  return [n, o];
}
const jH = ["inputValue"];
function $_() {
  return O(O({}, b_()), {
    prefixCls: String,
    id: String,
    backfill: {
      type: Boolean,
      default: void 0
    },
    // >>> Field Names
    fieldNames: Object,
    // >>> Search
    /** @deprecated Use `searchValue` instead */
    inputValue: String,
    searchValue: String,
    onSearch: Function,
    autoClearSearchValue: {
      type: Boolean,
      default: void 0
    },
    // >>> Select
    onSelect: Function,
    onDeselect: Function,
    // >>> Options
    /**
     * In Select, `false` means do nothing.
     * In TreeSelect, `false` will highlight match item.
     * It's by design.
     */
    filterOption: {
      type: [Boolean, Function],
      default: void 0
    },
    filterSort: Function,
    optionFilterProp: String,
    optionLabelProp: String,
    options: Array,
    defaultActiveFirstOption: {
      type: Boolean,
      default: void 0
    },
    virtual: {
      type: Boolean,
      default: void 0
    },
    listHeight: Number,
    listItemHeight: Number,
    // >>> Icon
    menuItemSelectedIcon: fe.any,
    mode: String,
    labelInValue: {
      type: Boolean,
      default: void 0
    },
    value: fe.any,
    defaultValue: fe.any,
    onChange: Function,
    children: Array
  });
}
function WH(e) {
  return !e || typeof e != "object";
}
const KH = be({
  compatConfig: {
    MODE: 3
  },
  name: "VcSelect",
  inheritAttrs: !1,
  props: kn($_(), {
    prefixCls: "vc-select",
    autoClearSearchValue: !0,
    listHeight: 200,
    listItemHeight: 20,
    dropdownMatchSelectWidth: !0
  }),
  setup(e, t) {
    let {
      expose: n,
      attrs: o,
      slots: r
    } = t;
    const i = FH(Kt(e, "id")), a = E(() => y0(e.mode)), l = E(() => !!(!e.options && e.children)), s = E(() => e.filterOption === void 0 && e.mode === "combobox" ? !1 : e.filterOption), u = E(() => QI(e.fieldNames, l.value)), [c, d] = lr("", {
      value: E(() => e.searchValue !== void 0 ? e.searchValue : e.inputValue),
      postState: (ue) => ue || ""
    }), f = NH(Kt(e, "options"), Kt(e, "children"), u), {
      valueOptions: p,
      labelOptions: v,
      options: g
    } = f, m = (ue) => w0(ue).map((ge) => {
      var _e, ze;
      let Ke, He, Ne, Xe;
      WH(ge) ? Ke = ge : (Ne = ge.key, He = ge.label, Ke = (_e = ge.value) !== null && _e !== void 0 ? _e : Ne);
      const De = p.value.get(Ke);
      return De && (He === void 0 && (He = De?.[e.optionLabelProp || u.value.label]), Ne === void 0 && (Ne = (ze = De?.key) !== null && ze !== void 0 ? ze : Ke), Xe = De?.disabled), {
        label: He,
        value: Ke,
        key: Ne,
        disabled: Xe,
        option: De
      };
    }), [x, S] = lr(e.defaultValue, {
      value: Kt(e, "value")
    }), C = E(() => {
      var ue;
      const pe = m(x.value);
      return e.mode === "combobox" && !(!((ue = pe[0]) === null || ue === void 0) && ue.value) ? [] : pe;
    }), [P, $] = VH(C, p), I = E(() => {
      if (!e.mode && P.value.length === 1) {
        const ue = P.value[0];
        if (ue.value === null && (ue.label === null || ue.label === void 0))
          return [];
      }
      return P.value.map((ue) => {
        var pe;
        return O(O({}, ue), {
          label: (pe = typeof ue.label == "function" ? ue.label() : ue.label) !== null && pe !== void 0 ? pe : ue.value
        });
      });
    }), w = E(() => new Set(P.value.map((ue) => ue.value)));
    It(() => {
      var ue;
      if (e.mode === "combobox") {
        const pe = (ue = P.value[0]) === null || ue === void 0 ? void 0 : ue.value;
        pe != null && d(String(pe));
      }
    }, {
      flush: "post"
    });
    const _ = (ue, pe) => {
      const ge = pe ?? ue;
      return {
        [u.value.value]: ue,
        [u.value.label]: ge
      };
    }, M = $e();
    It(() => {
      if (e.mode !== "tags") {
        M.value = g.value;
        return;
      }
      const ue = g.value.slice(), pe = (ge) => p.value.has(ge);
      [...P.value].sort((ge, _e) => ge.value < _e.value ? -1 : 1).forEach((ge) => {
        const _e = ge.value;
        pe(_e) || ue.push(_(_e, ge.label));
      }), M.value = ue;
    });
    const N = HH(M, u, c, s, Kt(e, "optionFilterProp")), A = E(() => e.mode !== "tags" || !c.value || N.value.some((ue) => ue[e.optionFilterProp || "value"] === c.value) ? N.value : [_(c.value), ...N.value]), H = E(() => e.filterSort ? [...A.value].sort((ue, pe) => e.filterSort(ue, pe)) : A.value), B = E(() => R6(H.value, {
      fieldNames: u.value,
      childrenAsData: l.value
    })), F = (ue) => {
      const pe = m(ue);
      if (S(pe), e.onChange && // Trigger event only when value changed
      (pe.length !== P.value.length || pe.some((ge, _e) => {
        var ze;
        return ((ze = P.value[_e]) === null || ze === void 0 ? void 0 : ze.value) !== ge?.value;
      }))) {
        const ge = e.labelInValue ? pe.map((ze) => O(O({}, ze), {
          originLabel: ze.label,
          label: typeof ze.label == "function" ? ze.label() : ze.label
        })) : pe.map((ze) => ze.value), _e = pe.map((ze) => jm($(ze.value)));
        e.onChange(
          // Value
          a.value ? ge : ge[0],
          // Option
          a.value ? _e : _e[0]
        );
      }
    }, [R, X] = $n(null), [j, ee] = $n(0), W = E(() => e.defaultActiveFirstOption !== void 0 ? e.defaultActiveFirstOption : e.mode !== "combobox"), K = function(ue, pe) {
      let {
        source: ge = "keyboard"
      } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
      ee(pe), e.backfill && e.mode === "combobox" && ue !== null && ge === "keyboard" && X(String(ue));
    }, q = (ue, pe) => {
      const ge = () => {
        var _e;
        const ze = $(ue), Ke = ze?.[u.value.label];
        return [e.labelInValue ? {
          label: typeof Ke == "function" ? Ke() : Ke,
          originLabel: Ke,
          value: ue,
          key: (_e = ze?.key) !== null && _e !== void 0 ? _e : ue
        } : ue, jm(ze)];
      };
      if (pe && e.onSelect) {
        const [_e, ze] = ge();
        e.onSelect(_e, ze);
      } else if (!pe && e.onDeselect) {
        const [_e, ze] = ge();
        e.onDeselect(_e, ze);
      }
    }, G = (ue, pe) => {
      let ge;
      const _e = a.value ? pe.selected : !0;
      _e ? ge = a.value ? [...P.value, ue] : [ue] : ge = P.value.filter((ze) => ze.value !== ue), F(ge), q(ue, _e), e.mode === "combobox" ? X("") : (!a.value || e.autoClearSearchValue) && (d(""), X(""));
    }, ae = (ue, pe) => {
      F(ue), (pe.type === "remove" || pe.type === "clear") && pe.values.forEach((ge) => {
        q(ge.value, !1);
      });
    }, le = (ue, pe) => {
      var ge;
      if (d(ue), X(null), pe.source === "submit") {
        const _e = (ue || "").trim();
        if (_e) {
          const ze = Array.from(/* @__PURE__ */ new Set([...w.value, _e]));
          F(ze), q(_e, !0), d("");
        }
        return;
      }
      pe.source !== "blur" && (e.mode === "combobox" && F(ue), (ge = e.onSearch) === null || ge === void 0 || ge.call(e, ue));
    }, ie = (ue) => {
      let pe = ue;
      e.mode !== "tags" && (pe = ue.map((_e) => {
        const ze = v.value.get(_e);
        return ze?.value;
      }).filter((_e) => _e !== void 0));
      const ge = Array.from(/* @__PURE__ */ new Set([...w.value, ...pe]));
      F(ge), ge.forEach((_e) => {
        q(_e, !0);
      });
    }, re = E(() => e.virtual !== !1 && e.dropdownMatchSelectWidth !== !1);
    _H(m_(O(O({}, f), {
      flattenOptions: B,
      onActiveValue: K,
      defaultActiveFirstOption: W,
      onSelect: G,
      menuItemSelectedIcon: Kt(e, "menuItemSelectedIcon"),
      rawValues: w,
      fieldNames: u,
      virtual: re,
      listHeight: Kt(e, "listHeight"),
      listItemHeight: Kt(e, "listItemHeight"),
      childrenAsData: l
    }))), process.env.NODE_ENV !== "production" && It(() => {
      LH(e);
    }, {
      flush: "post"
    });
    const te = ce();
    n({
      focus() {
        var ue;
        (ue = te.value) === null || ue === void 0 || ue.focus();
      },
      blur() {
        var ue;
        (ue = te.value) === null || ue === void 0 || ue.blur();
      },
      scrollTo(ue) {
        var pe;
        (pe = te.value) === null || pe === void 0 || pe.scrollTo(ue);
      }
    });
    const ve = E(() => Fn(e, [
      "id",
      "mode",
      "prefixCls",
      "backfill",
      "fieldNames",
      // Search
      "inputValue",
      "searchValue",
      "onSearch",
      "autoClearSearchValue",
      // Select
      "onSelect",
      "onDeselect",
      "dropdownMatchSelectWidth",
      // Options
      "filterOption",
      "filterSort",
      "optionFilterProp",
      "optionLabelProp",
      "options",
      "children",
      "defaultActiveFirstOption",
      "menuItemSelectedIcon",
      "virtual",
      "listHeight",
      "listItemHeight",
      // Value
      "value",
      "defaultValue",
      "labelInValue",
      "onChange"
    ]));
    return () => h(gH, Q(Q(Q({}, ve.value), o), {}, {
      id: i,
      prefixCls: e.prefixCls,
      ref: te,
      omitDomProps: jH,
      mode: e.mode,
      displayValues: I.value,
      onDisplayValuesChange: ae,
      searchValue: c.value,
      onSearch: le,
      onSearchSplit: ie,
      dropdownMatchSelectWidth: e.dropdownMatchSelectWidth,
      OptionList: EH,
      emptyOptions: !B.value.length,
      activeValue: R.value,
      activeDescendantId: `${i}_list_${j.value}`
    }), r);
  }
}), S0 = () => null;
S0.isSelectOption = !0;
S0.displayName = "ASelectOption";
const C0 = () => null;
C0.isSelectOptGroup = !0;
C0.displayName = "ASelectOptGroup";
var qH = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, name: "down", theme: "outlined" }, YH = Symbol("iconContext"), P_ = function() {
  return zt(YH, {
    prefixCls: ce("anticon"),
    rootClassName: ce(""),
    csp: ce()
  });
};
function $0() {
  return !!(typeof window < "u" && window.document && window.document.createElement);
}
function GH(e, t) {
  return e && e.contains ? e.contains(t) : !1;
}
var sS = "data-vc-order", UH = "vc-icon-key", Um = /* @__PURE__ */ new Map();
function O_() {
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.mark;
  return t ? t.startsWith("data-") ? t : "data-".concat(t) : UH;
}
function P0(e) {
  if (e.attachTo)
    return e.attachTo;
  var t = document.querySelector("head");
  return t || document.body;
}
function XH(e) {
  return e === "queue" ? "prependQueue" : e ? "prepend" : "append";
}
function k_(e) {
  return Array.from((Um.get(e) || e).children).filter(function(t) {
    return t.tagName === "STYLE";
  });
}
function I_(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  if (!$0())
    return null;
  var n = t.csp, o = t.prepend, r = document.createElement("style");
  r.setAttribute(sS, XH(o)), n && n.nonce && (r.nonce = n.nonce), r.innerHTML = e;
  var i = P0(t), a = i.firstChild;
  if (o) {
    if (o === "queue") {
      var l = k_(i).filter(function(s) {
        return ["prepend", "prependQueue"].includes(s.getAttribute(sS));
      });
      if (l.length)
        return i.insertBefore(r, l[l.length - 1].nextSibling), r;
    }
    i.insertBefore(r, a);
  } else
    i.appendChild(r);
  return r;
}
function QH(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = P0(t);
  return k_(n).find(function(o) {
    return o.getAttribute(O_(t)) === e;
  });
}
function ZH(e, t) {
  var n = Um.get(e);
  if (!n || !GH(document, n)) {
    var o = I_("", t), r = o.parentNode;
    Um.set(e, r), e.removeChild(o);
  }
}
function JH(e, t) {
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = P0(n);
  ZH(o, n);
  var r = QH(t, n);
  if (r)
    return n.csp && n.csp.nonce && r.nonce !== n.csp.nonce && (r.nonce = n.csp.nonce), r.innerHTML !== e && (r.innerHTML = e), r;
  var i = I_(e, n);
  return i.setAttribute(O_(n), t), i;
}
function uS(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      eV(e, r, n[r]);
    });
  }
  return e;
}
function eV(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
function tV(e, t) {
  process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error("Warning: ".concat(t));
}
function nV(e, t) {
  tV(e, "[@ant-design/icons-vue] ".concat(t));
}
function cS(e) {
  return typeof e == "object" && typeof e.name == "string" && typeof e.theme == "string" && (typeof e.icon == "object" || typeof e.icon == "function");
}
function Xm(e, t, n) {
  return n ? ko(e.tag, uS({
    key: t
  }, n, e.attrs), (e.children || []).map(function(o, r) {
    return Xm(o, "".concat(t, "-").concat(e.tag, "-").concat(r));
  })) : ko(e.tag, uS({
    key: t
  }, e.attrs), (e.children || []).map(function(o, r) {
    return Xm(o, "".concat(t, "-").concat(e.tag, "-").concat(r));
  }));
}
function __(e) {
  return La(e)[0];
}
function T_(e) {
  return e ? Array.isArray(e) ? e : [e] : [];
}
var oV = `
.anticon {
  display: inline-block;
  color: inherit;
  font-style: normal;
  line-height: 0;
  text-align: center;
  text-transform: none;
  vertical-align: -0.125em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.anticon > * {
  line-height: 1;
}

.anticon svg {
  display: inline-block;
}

.anticon::before {
  display: none;
}

.anticon .anticon-icon {
  display: block;
}

.anticon[tabindex] {
  cursor: pointer;
}

.anticon-spin::before,
.anticon-spin {
  display: inline-block;
  -webkit-animation: loadingCircle 1s infinite linear;
  animation: loadingCircle 1s infinite linear;
}

@-webkit-keyframes loadingCircle {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes loadingCircle {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
`;
function M_(e) {
  return e && e.getRootNode && e.getRootNode();
}
function rV(e) {
  return $0() ? M_(e) instanceof ShadowRoot : !1;
}
function iV(e) {
  return rV(e) ? M_(e) : null;
}
var aV = function() {
  var t = P_(), n = t.prefixCls, o = t.csp, r = fr(), i = oV;
  n && (i = i.replace(/anticon/g, n.value)), Yt(function() {
    if ($0()) {
      var a = r.vnode.el, l = iV(a);
      JH(i, "@ant-design-vue-icons", {
        prepend: !0,
        csp: o.value,
        attachTo: l
      });
    }
  });
}, lV = ["icon", "primaryColor", "secondaryColor"];
function sV(e, t) {
  if (e == null) return {};
  var n = uV(e, t), o, r;
  if (Object.getOwnPropertySymbols) {
    var i = Object.getOwnPropertySymbols(e);
    for (r = 0; r < i.length; r++)
      o = i[r], !(t.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(e, o) && (n[o] = e[o]);
  }
  return n;
}
function uV(e, t) {
  if (e == null) return {};
  var n = {}, o = Object.keys(e), r, i;
  for (i = 0; i < o.length; i++)
    r = o[i], !(t.indexOf(r) >= 0) && (n[r] = e[r]);
  return n;
}
function rp(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      cV(e, r, n[r]);
    });
  }
  return e;
}
function cV(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Qc = Pn({
  primaryColor: "#333",
  secondaryColor: "#E6E6E6",
  calculated: !1
});
function dV(e) {
  var t = e.primaryColor, n = e.secondaryColor;
  Qc.primaryColor = t, Qc.secondaryColor = n || __(t), Qc.calculated = !!n;
}
function fV() {
  return rp({}, Qc);
}
var zl = function(t, n) {
  var o = rp({}, t, n.attrs), r = o.icon, i = o.primaryColor, a = o.secondaryColor, l = sV(o, lV), s = Qc;
  if (i && (s = {
    primaryColor: i,
    secondaryColor: a || __(i)
  }), nV(cS(r), "icon should be icon definiton, but got ".concat(r)), !cS(r))
    return null;
  var u = r;
  return u && typeof u.icon == "function" && (u = rp({}, u, {
    icon: u.icon(s.primaryColor, s.secondaryColor)
  })), Xm(u.icon, "svg-".concat(u.name), rp({}, l, {
    "data-icon": u.name,
    width: "1em",
    height: "1em",
    fill: "currentColor",
    "aria-hidden": "true"
  }));
};
zl.props = {
  icon: Object,
  primaryColor: String,
  secondaryColor: String,
  focusable: String
};
zl.inheritAttrs = !1;
zl.displayName = "IconBase";
zl.getTwoToneColors = fV;
zl.setTwoToneColors = dV;
function pV(e, t) {
  return mV(e) || vV(e, t) || gV(e, t) || hV();
}
function hV() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function gV(e, t) {
  if (e) {
    if (typeof e == "string") return dS(e, t);
    var n = Object.prototype.toString.call(e).slice(8, -1);
    if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return dS(e, t);
  }
}
function dS(e, t) {
  (t == null || t > e.length) && (t = e.length);
  for (var n = 0, o = new Array(t); n < t; n++)
    o[n] = e[n];
  return o;
}
function vV(e, t) {
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
  if (n != null) {
    var o = [], r = !0, i = !1, a, l;
    try {
      for (n = n.call(e); !(r = (a = n.next()).done) && (o.push(a.value), !(t && o.length === t)); r = !0)
        ;
    } catch (s) {
      i = !0, l = s;
    } finally {
      try {
        !r && n.return != null && n.return();
      } finally {
        if (i) throw l;
      }
    }
    return o;
  }
}
function mV(e) {
  if (Array.isArray(e)) return e;
}
function E_(e) {
  var t = T_(e), n = pV(t, 2), o = n[0], r = n[1];
  return zl.setTwoToneColors({
    primaryColor: o,
    secondaryColor: r
  });
}
function bV() {
  var e = zl.getTwoToneColors();
  return e.calculated ? [e.primaryColor, e.secondaryColor] : e.primaryColor;
}
var yV = be({
  name: "InsertStyles",
  setup: function() {
    return aV(), function() {
      return null;
    };
  }
}), xV = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
function wV(e, t) {
  return PV(e) || $V(e, t) || CV(e, t) || SV();
}
function SV() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function CV(e, t) {
  if (e) {
    if (typeof e == "string") return fS(e, t);
    var n = Object.prototype.toString.call(e).slice(8, -1);
    if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return fS(e, t);
  }
}
function fS(e, t) {
  (t == null || t > e.length) && (t = e.length);
  for (var n = 0, o = new Array(t); n < t; n++)
    o[n] = e[n];
  return o;
}
function $V(e, t) {
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
  if (n != null) {
    var o = [], r = !0, i = !1, a, l;
    try {
      for (n = n.call(e); !(r = (a = n.next()).done) && (o.push(a.value), !(t && o.length === t)); r = !0)
        ;
    } catch (s) {
      i = !0, l = s;
    } finally {
      try {
        !r && n.return != null && n.return();
      } finally {
        if (i) throw l;
      }
    }
    return o;
  }
}
function PV(e) {
  if (Array.isArray(e)) return e;
}
function pS(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      Vc(e, r, n[r]);
    });
  }
  return e;
}
function Vc(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
function OV(e, t) {
  if (e == null) return {};
  var n = kV(e, t), o, r;
  if (Object.getOwnPropertySymbols) {
    var i = Object.getOwnPropertySymbols(e);
    for (r = 0; r < i.length; r++)
      o = i[r], !(t.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(e, o) && (n[o] = e[o]);
  }
  return n;
}
function kV(e, t) {
  if (e == null) return {};
  var n = {}, o = Object.keys(e), r, i;
  for (i = 0; i < o.length; i++)
    r = o[i], !(t.indexOf(r) >= 0) && (n[r] = e[r]);
  return n;
}
E_(BL.primary);
var on = function(t, n) {
  var o, r = pS({}, t, n.attrs), i = r.class, a = r.icon, l = r.spin, s = r.rotate, u = r.tabindex, c = r.twoToneColor, d = r.onClick, f = OV(r, xV), p = P_(), v = p.prefixCls, g = p.rootClassName, m = (o = {}, Vc(o, g.value, !!g.value), Vc(o, v.value, !0), Vc(o, "".concat(v.value, "-").concat(a.name), !!a.name), Vc(o, "".concat(v.value, "-spin"), !!l || a.name === "loading"), o), x = u;
  x === void 0 && d && (x = -1);
  var S = s ? {
    msTransform: "rotate(".concat(s, "deg)"),
    transform: "rotate(".concat(s, "deg)")
  } : void 0, C = T_(c), P = wV(C, 2), $ = P[0], I = P[1];
  return h("span", pS({
    role: "img",
    "aria-label": a.name
  }, f, {
    onClick: d,
    class: [m, i],
    tabindex: x
  }), [h(zl, {
    icon: a,
    primaryColor: $,
    secondaryColor: I,
    style: S
  }, null), h(yV, null, null)]);
};
on.props = {
  spin: Boolean,
  rotate: Number,
  icon: Object,
  twoToneColor: [String, Array]
};
on.displayName = "AntdIcon";
on.inheritAttrs = !1;
on.getTwoToneColor = bV;
on.setTwoToneColor = E_;
function hS(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      IV(e, r, n[r]);
    });
  }
  return e;
}
function IV(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Nd = function(t, n) {
  var o = hS({}, t, n.attrs);
  return h(on, hS({}, o, {
    icon: qH
  }), null);
};
Nd.displayName = "DownOutlined";
Nd.inheritAttrs = !1;
var _V = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" } }] }, name: "loading", theme: "outlined" };
function gS(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      TV(e, r, n[r]);
    });
  }
  return e;
}
function TV(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Ti = function(t, n) {
  var o = gS({}, t, n.attrs);
  return h(on, gS({}, o, {
    icon: _V
  }), null);
};
Ti.displayName = "LoadingOutlined";
Ti.inheritAttrs = !1;
var MV = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, name: "check", theme: "outlined" };
function vS(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      EV(e, r, n[r]);
    });
  }
  return e;
}
function EV(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var O0 = function(t, n) {
  var o = vS({}, t, n.attrs);
  return h(on, vS({}, o, {
    icon: MV
  }), null);
};
O0.displayName = "CheckOutlined";
O0.inheritAttrs = !1;
var DV = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, name: "close", theme: "outlined" };
function mS(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      AV(e, r, n[r]);
    });
  }
  return e;
}
function AV(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var ra = function(t, n) {
  var o = mS({}, t, n.attrs);
  return h(on, mS({}, o, {
    icon: DV
  }), null);
};
ra.displayName = "CloseOutlined";
ra.inheritAttrs = !1;
var NV = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" } }] }, name: "close-circle", theme: "filled" };
function bS(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      RV(e, r, n[r]);
    });
  }
  return e;
}
function RV(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Fr = function(t, n) {
  var o = bS({}, t, n.attrs);
  return h(on, bS({}, o, {
    icon: NV
  }), null);
};
Fr.displayName = "CloseCircleFilled";
Fr.inheritAttrs = !1;
var zV = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" } }] }, name: "search", theme: "outlined" };
function yS(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      FV(e, r, n[r]);
    });
  }
  return e;
}
function FV(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Rd = function(t, n) {
  var o = yS({}, t, n.attrs);
  return h(on, yS({}, o, {
    icon: zV
  }), null);
};
Rd.displayName = "SearchOutlined";
Rd.inheritAttrs = !1;
function BV(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const {
    loading: n,
    multiple: o,
    prefixCls: r,
    hasFeedback: i,
    feedbackIcon: a,
    showArrow: l
  } = e, s = e.suffixIcon || t.suffixIcon && t.suffixIcon(), u = e.clearIcon || t.clearIcon && t.clearIcon(), c = e.menuItemSelectedIcon || t.menuItemSelectedIcon && t.menuItemSelectedIcon(), d = e.removeIcon || t.removeIcon && t.removeIcon(), f = u ?? h(Fr, null, null), p = (x) => h(Je, null, [l !== !1 && x, i && a]);
  let v = null;
  if (s !== void 0)
    v = p(s);
  else if (n)
    v = p(h(Ti, {
      spin: !0
    }, null));
  else {
    const x = `${r}-suffix`;
    v = (S) => {
      let {
        open: C,
        showSearch: P
      } = S;
      return p(C && P ? h(Rd, {
        class: x
      }, null) : h(Nd, {
        class: x
      }, null));
    };
  }
  let g = null;
  c !== void 0 ? g = c : o ? g = h(O0, null, null) : g = null;
  let m = null;
  return d !== void 0 ? m = d : m = h(ra, null, null), {
    clearIcon: f,
    suffixIcon: v,
    itemIcon: g,
    removeIcon: m
  };
}
function k0(e) {
  const t = Symbol("contextKey");
  return {
    useProvide: (r, i) => {
      const a = Pn({});
      return Ft(t, a), It(() => {
        O(a, r, i || {});
      }), a;
    },
    useInject: () => zt(t, e) || {}
  };
}
const zp = Symbol("ContextProps"), Fp = Symbol("InternalContextProps"), LV = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : E(() => !0);
  const n = ce(/* @__PURE__ */ new Map()), o = (a, l) => {
    n.value.set(a, l), n.value = new Map(n.value);
  }, r = (a) => {
    n.value.delete(a), n.value = new Map(n.value);
  }, i = fr();
  ke([t, n], () => {
    if (process.env.NODE_ENV !== "production" && t.value && n.value.size > 1) {
      dn(!1, "Form.Item", `FormItem can only collect one field item, you haved set ${[...n.value.values()].map((l) => `\`${l.name}\``).join(", ")} ${n.value.size} field items.
        You can set not need to be collected fields into \`a-form-item-rest\``);
      let a = i;
      for (; a.parent; )
        console.warn("at", a.type), a = a.parent;
    }
  }), Ft(zp, e), Ft(Fp, {
    addFormItemField: o,
    removeFormItemField: r
  });
}, Qm = {
  id: E(() => {
  }),
  onFieldBlur: () => {
  },
  onFieldChange: () => {
  },
  clearValidate: () => {
  }
}, Zm = {
  addFormItemField: () => {
  },
  removeFormItemField: () => {
  }
}, Br = () => {
  const e = zt(Fp, Zm), t = Symbol("FormItemFieldKey"), n = fr();
  return e.addFormItemField(t, n.type), qt(() => {
    e.removeFormItemField(t);
  }), Ft(Fp, Zm), Ft(zp, Qm), zt(zp, Qm);
}, Jm = be({
  compatConfig: {
    MODE: 3
  },
  name: "AFormItemRest",
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Ft(Fp, Zm), Ft(zp, Qm), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), Nr = k0({}), Bp = be({
  name: "NoFormStatus",
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Nr.useProvide({}), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
});
function $i(e, t, n) {
  return Me({
    [`${e}-status-success`]: t === "success",
    [`${e}-status-warning`]: t === "warning",
    [`${e}-status-error`]: t === "error",
    [`${e}-status-validating`]: t === "validating",
    [`${e}-has-feedback`]: n
  });
}
const Ls = (e, t) => t || e, HV = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: {
      display: "inline-flex",
      "&-block": {
        display: "flex",
        width: "100%"
      },
      "&-vertical": {
        flexDirection: "column"
      }
    }
  };
}, VV = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: {
      display: "inline-flex",
      "&-rtl": {
        direction: "rtl"
      },
      "&-vertical": {
        flexDirection: "column"
      },
      "&-align": {
        flexDirection: "column",
        "&-center": {
          alignItems: "center"
        },
        "&-start": {
          alignItems: "flex-start"
        },
        "&-end": {
          alignItems: "flex-end"
        },
        "&-baseline": {
          alignItems: "baseline"
        }
      },
      [`${t}-item`]: {
        "&:empty": {
          display: "none"
        }
      }
    }
  };
}, D_ = Sn("Space", (e) => [VV(e), HV(e)]), jV = () => ({
  compactSize: String,
  compactDirection: fe.oneOf(Dr("horizontal", "vertical")).def("horizontal"),
  isFirstItem: ct(),
  isLastItem: ct()
}), zh = k0(null), fc = (e, t) => {
  const n = zh.useInject(), o = E(() => {
    if (!n || GP(n)) return "";
    const {
      compactDirection: r,
      isFirstItem: i,
      isLastItem: a
    } = n, l = r === "vertical" ? "-vertical-" : "-";
    return Me({
      [`${e.value}-compact${l}item`]: !0,
      [`${e.value}-compact${l}first-item`]: i,
      [`${e.value}-compact${l}last-item`]: a,
      [`${e.value}-compact${l}item-rtl`]: t.value === "rtl"
    });
  });
  return {
    compactSize: E(() => n?.compactSize),
    compactDirection: E(() => n?.compactDirection),
    compactItemClassnames: o
  };
}, xd = be({
  name: "NoCompactStyle",
  setup(e, t) {
    let {
      slots: n
    } = t;
    return zh.useProvide(null), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), WV = () => ({
  prefixCls: String,
  size: {
    type: String
  },
  direction: fe.oneOf(Dr("horizontal", "vertical")).def("horizontal"),
  align: fe.oneOf(Dr("start", "end", "center", "baseline")),
  block: {
    type: Boolean,
    default: void 0
  }
}), KV = be({
  name: "CompactItem",
  props: jV(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    return zh.useProvide(e), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), eb = be({
  name: "ASpaceCompact",
  inheritAttrs: !1,
  props: WV(),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const {
      prefixCls: r,
      direction: i
    } = _t("space-compact", e), a = zh.useInject(), [l, s] = D_(r), u = E(() => Me(r.value, s.value, {
      [`${r.value}-rtl`]: i.value === "rtl",
      [`${r.value}-block`]: e.block,
      [`${r.value}-vertical`]: e.direction === "vertical"
    }));
    return () => {
      var c;
      const d = go(((c = o.default) === null || c === void 0 ? void 0 : c.call(o)) || []);
      return d.length === 0 ? null : l(h("div", Q(Q({}, n), {}, {
        class: [u.value, n.class]
      }), [d.map((f, p) => {
        var v;
        const g = f && f.key || `${r.value}-item-${p}`, m = !a || GP(a);
        return h(KV, {
          key: g,
          compactSize: (v = e.size) !== null && v !== void 0 ? v : "middle",
          compactDirection: e.direction,
          isFirstItem: p === 0 && (m || a?.isFirstItem),
          isLastItem: p === d.length - 1 && (m || a?.isLastItem)
        }, {
          default: () => [f]
        });
      })]));
    };
  }
}), qV = (e) => ({
  animationDuration: e,
  animationFillMode: "both"
}), YV = (e) => ({
  animationDuration: e,
  animationFillMode: "both"
}), Fh = function(e, t, n, o) {
  const i = (arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1) ? "&" : "";
  return {
    [`
      ${i}${e}-enter,
      ${i}${e}-appear
    `]: O(O({}, qV(o)), {
      animationPlayState: "paused"
    }),
    [`${i}${e}-leave`]: O(O({}, YV(o)), {
      animationPlayState: "paused"
    }),
    [`
      ${i}${e}-enter${e}-enter-active,
      ${i}${e}-appear${e}-appear-active
    `]: {
      animationName: t,
      animationPlayState: "running"
    },
    [`${i}${e}-leave${e}-leave-active`]: {
      animationName: n,
      animationPlayState: "running",
      pointerEvents: "none"
    }
  };
}, GV = new tn("antFadeIn", {
  "0%": {
    opacity: 0
  },
  "100%": {
    opacity: 1
  }
}), UV = new tn("antFadeOut", {
  "0%": {
    opacity: 1
  },
  "100%": {
    opacity: 0
  }
}), XV = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const {
    antCls: n
  } = e, o = `${n}-fade`, r = t ? "&" : "";
  return [Fh(o, GV, UV, e.motionDurationMid, t), {
    [`
        ${r}${o}-enter,
        ${r}${o}-appear
      `]: {
      opacity: 0,
      animationTimingFunction: "linear"
    },
    [`${r}${o}-leave`]: {
      animationTimingFunction: "linear"
    }
  }];
}, QV = new tn("antMoveDownIn", {
  "0%": {
    transform: "translate3d(0, 100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), ZV = new tn("antMoveDownOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(0, 100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), JV = new tn("antMoveLeftIn", {
  "0%": {
    transform: "translate3d(-100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), ej = new tn("antMoveLeftOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(-100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), tj = new tn("antMoveRightIn", {
  "0%": {
    transform: "translate3d(100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), nj = new tn("antMoveRightOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), oj = new tn("antMoveUpIn", {
  "0%": {
    transform: "translate3d(0, -100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), rj = new tn("antMoveUpOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(0, -100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), ij = {
  "move-up": {
    inKeyframes: oj,
    outKeyframes: rj
  },
  "move-down": {
    inKeyframes: QV,
    outKeyframes: ZV
  },
  "move-left": {
    inKeyframes: JV,
    outKeyframes: ej
  },
  "move-right": {
    inKeyframes: tj,
    outKeyframes: nj
  }
}, Xu = (e, t) => {
  const {
    antCls: n
  } = e, o = `${n}-${t}`, {
    inKeyframes: r,
    outKeyframes: i
  } = ij[t];
  return [Fh(o, r, i, e.motionDurationMid), {
    [`
        ${o}-enter,
        ${o}-appear
      `]: {
      opacity: 0,
      animationTimingFunction: e.motionEaseOutCirc
    },
    [`${o}-leave`]: {
      animationTimingFunction: e.motionEaseInOutCirc
    }
  }];
}, Bh = new tn("antSlideUpIn", {
  "0%": {
    transform: "scaleY(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scaleY(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  }
}), Lh = new tn("antSlideUpOut", {
  "0%": {
    transform: "scaleY(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  },
  "100%": {
    transform: "scaleY(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  }
}), Hh = new tn("antSlideDownIn", {
  "0%": {
    transform: "scaleY(0.8)",
    transformOrigin: "100% 100%",
    opacity: 0
  },
  "100%": {
    transform: "scaleY(1)",
    transformOrigin: "100% 100%",
    opacity: 1
  }
}), Vh = new tn("antSlideDownOut", {
  "0%": {
    transform: "scaleY(1)",
    transformOrigin: "100% 100%",
    opacity: 1
  },
  "100%": {
    transform: "scaleY(0.8)",
    transformOrigin: "100% 100%",
    opacity: 0
  }
}), aj = new tn("antSlideLeftIn", {
  "0%": {
    transform: "scaleX(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scaleX(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  }
}), lj = new tn("antSlideLeftOut", {
  "0%": {
    transform: "scaleX(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  },
  "100%": {
    transform: "scaleX(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  }
}), sj = new tn("antSlideRightIn", {
  "0%": {
    transform: "scaleX(0.8)",
    transformOrigin: "100% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scaleX(1)",
    transformOrigin: "100% 0%",
    opacity: 1
  }
}), uj = new tn("antSlideRightOut", {
  "0%": {
    transform: "scaleX(1)",
    transformOrigin: "100% 0%",
    opacity: 1
  },
  "100%": {
    transform: "scaleX(0.8)",
    transformOrigin: "100% 0%",
    opacity: 0
  }
}), cj = {
  "slide-up": {
    inKeyframes: Bh,
    outKeyframes: Lh
  },
  "slide-down": {
    inKeyframes: Hh,
    outKeyframes: Vh
  },
  "slide-left": {
    inKeyframes: aj,
    outKeyframes: lj
  },
  "slide-right": {
    inKeyframes: sj,
    outKeyframes: uj
  }
}, ea = (e, t) => {
  const {
    antCls: n
  } = e, o = `${n}-${t}`, {
    inKeyframes: r,
    outKeyframes: i
  } = cj[t];
  return [Fh(o, r, i, e.motionDurationMid), {
    [`
      ${o}-enter,
      ${o}-appear
    `]: {
      transform: "scale(0)",
      transformOrigin: "0% 0%",
      opacity: 0,
      animationTimingFunction: e.motionEaseOutQuint
    },
    [`${o}-leave`]: {
      animationTimingFunction: e.motionEaseInQuint
    }
  }];
}, I0 = new tn("antZoomIn", {
  "0%": {
    transform: "scale(0.2)",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    opacity: 1
  }
}), dj = new tn("antZoomOut", {
  "0%": {
    transform: "scale(1)"
  },
  "100%": {
    transform: "scale(0.2)",
    opacity: 0
  }
}), xS = new tn("antZoomBigIn", {
  "0%": {
    transform: "scale(0.8)",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    opacity: 1
  }
}), wS = new tn("antZoomBigOut", {
  "0%": {
    transform: "scale(1)"
  },
  "100%": {
    transform: "scale(0.8)",
    opacity: 0
  }
}), fj = new tn("antZoomUpIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "50% 0%"
  }
}), pj = new tn("antZoomUpOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "50% 0%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 0%",
    opacity: 0
  }
}), hj = new tn("antZoomLeftIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "0% 50%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "0% 50%"
  }
}), gj = new tn("antZoomLeftOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "0% 50%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "0% 50%",
    opacity: 0
  }
}), vj = new tn("antZoomRightIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "100% 50%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "100% 50%"
  }
}), mj = new tn("antZoomRightOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "100% 50%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "100% 50%",
    opacity: 0
  }
}), bj = new tn("antZoomDownIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 100%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "50% 100%"
  }
}), yj = new tn("antZoomDownOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "50% 100%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 100%",
    opacity: 0
  }
}), xj = {
  zoom: {
    inKeyframes: I0,
    outKeyframes: dj
  },
  "zoom-big": {
    inKeyframes: xS,
    outKeyframes: wS
  },
  "zoom-big-fast": {
    inKeyframes: xS,
    outKeyframes: wS
  },
  "zoom-left": {
    inKeyframes: hj,
    outKeyframes: gj
  },
  "zoom-right": {
    inKeyframes: vj,
    outKeyframes: mj
  },
  "zoom-up": {
    inKeyframes: fj,
    outKeyframes: pj
  },
  "zoom-down": {
    inKeyframes: bj,
    outKeyframes: yj
  }
}, zd = (e, t) => {
  const {
    antCls: n
  } = e, o = `${n}-${t}`, {
    inKeyframes: r,
    outKeyframes: i
  } = xj[t];
  return [Fh(o, r, i, t === "zoom-big-fast" ? e.motionDurationFast : e.motionDurationMid), {
    [`
        ${o}-enter,
        ${o}-appear
      `]: {
      transform: "scale(0)",
      opacity: 0,
      animationTimingFunction: e.motionEaseOutCirc,
      "&-prepare": {
        transform: "none"
      }
    },
    [`${o}-leave`]: {
      animationTimingFunction: e.motionEaseInOutCirc
    }
  }];
}, jh = (e) => ({
  [e.componentCls]: {
    // For common/openAnimation
    [`${e.antCls}-motion-collapse-legacy`]: {
      overflow: "hidden",
      "&-active": {
        transition: `height ${e.motionDurationMid} ${e.motionEaseInOut},
        opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`
      }
    },
    [`${e.antCls}-motion-collapse`]: {
      overflow: "hidden",
      transition: `height ${e.motionDurationMid} ${e.motionEaseInOut},
        opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`
    }
  }
}), SS = (e) => {
  const {
    controlPaddingHorizontal: t
  } = e;
  return {
    position: "relative",
    display: "block",
    minHeight: e.controlHeight,
    padding: `${(e.controlHeight - e.fontSize * e.lineHeight) / 2}px ${t}px`,
    color: e.colorText,
    fontWeight: "normal",
    fontSize: e.fontSize,
    lineHeight: e.lineHeight,
    boxSizing: "border-box"
  };
}, wj = (e) => {
  const {
    antCls: t,
    componentCls: n
  } = e, o = `${n}-item`;
  return [
    {
      [`${n}-dropdown`]: O(O({}, fn(e)), {
        position: "absolute",
        top: -9999,
        zIndex: e.zIndexPopup,
        boxSizing: "border-box",
        padding: e.paddingXXS,
        overflow: "hidden",
        fontSize: e.fontSize,
        // Fix select render lag of long text in chrome
        // https://github.com/ant-design/ant-design/issues/11456
        // https://github.com/ant-design/ant-design/issues/11843
        fontVariant: "initial",
        backgroundColor: e.colorBgElevated,
        borderRadius: e.borderRadiusLG,
        outline: "none",
        boxShadow: e.boxShadowSecondary,
        [`
            &${t}-slide-up-enter${t}-slide-up-enter-active${n}-dropdown-placement-bottomLeft,
            &${t}-slide-up-appear${t}-slide-up-appear-active${n}-dropdown-placement-bottomLeft
          `]: {
          animationName: Bh
        },
        [`
            &${t}-slide-up-enter${t}-slide-up-enter-active${n}-dropdown-placement-topLeft,
            &${t}-slide-up-appear${t}-slide-up-appear-active${n}-dropdown-placement-topLeft
          `]: {
          animationName: Hh
        },
        [`&${t}-slide-up-leave${t}-slide-up-leave-active${n}-dropdown-placement-bottomLeft`]: {
          animationName: Lh
        },
        [`&${t}-slide-up-leave${t}-slide-up-leave-active${n}-dropdown-placement-topLeft`]: {
          animationName: Vh
        },
        "&-hidden": {
          display: "none"
        },
        "&-empty": {
          color: e.colorTextDisabled
        },
        // ========================= Options =========================
        [`${o}-empty`]: O(O({}, SS(e)), {
          color: e.colorTextDisabled
        }),
        [`${o}`]: O(O({}, SS(e)), {
          cursor: "pointer",
          transition: `background ${e.motionDurationSlow} ease`,
          borderRadius: e.borderRadiusSM,
          // =========== Group ============
          "&-group": {
            color: e.colorTextDescription,
            fontSize: e.fontSizeSM,
            cursor: "default"
          },
          // =========== Option ===========
          "&-option": {
            display: "flex",
            "&-content": O({
              flex: "auto"
            }, Ha),
            "&-state": {
              flex: "none"
            },
            [`&-active:not(${o}-option-disabled)`]: {
              backgroundColor: e.controlItemBgHover
            },
            [`&-selected:not(${o}-option-disabled)`]: {
              color: e.colorText,
              fontWeight: e.fontWeightStrong,
              backgroundColor: e.controlItemBgActive,
              [`${o}-option-state`]: {
                color: e.colorPrimary
              }
            },
            "&-disabled": {
              [`&${o}-option-selected`]: {
                backgroundColor: e.colorBgContainerDisabled
              },
              color: e.colorTextDisabled,
              cursor: "not-allowed"
            },
            "&-grouped": {
              paddingInlineStart: e.controlPaddingHorizontal * 2
            }
          }
        }),
        // =========================== RTL ===========================
        "&-rtl": {
          direction: "rtl"
        }
      })
    },
    // Follow code may reuse in other components
    ea(e, "slide-up"),
    ea(e, "slide-down"),
    Xu(e, "move-up"),
    Xu(e, "move-down")
  ];
}, iu = 2;
function A_(e) {
  let {
    controlHeightSM: t,
    controlHeight: n,
    lineWidth: o
  } = e;
  const r = (n - t) / 2 - o, i = Math.ceil(r / 2);
  return [r, i];
}
function iv(e, t) {
  const {
    componentCls: n,
    iconCls: o
  } = e, r = `${n}-selection-overflow`, i = e.controlHeightSM, [a] = A_(e), l = t ? `${n}-${t}` : "";
  return {
    [`${n}-multiple${l}`]: {
      fontSize: e.fontSize,
      /**
       * Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
       * may update to redesign with its align logic.
       */
      // =========================== Overflow ===========================
      [r]: {
        position: "relative",
        display: "flex",
        flex: "auto",
        flexWrap: "wrap",
        maxWidth: "100%",
        "&-item": {
          flex: "none",
          alignSelf: "center",
          maxWidth: "100%",
          display: "inline-flex"
        }
      },
      // ========================= Selector =========================
      [`${n}-selector`]: {
        display: "flex",
        flexWrap: "wrap",
        alignItems: "center",
        // Multiple is little different that horizontal is follow the vertical
        padding: `${a - iu}px ${iu * 2}px`,
        borderRadius: e.borderRadius,
        [`${n}-show-search&`]: {
          cursor: "text"
        },
        [`${n}-disabled&`]: {
          background: e.colorBgContainerDisabled,
          cursor: "not-allowed"
        },
        "&:after": {
          display: "inline-block",
          width: 0,
          margin: `${iu}px 0`,
          lineHeight: `${i}px`,
          content: '"\\a0"'
        }
      },
      [`
        &${n}-show-arrow ${n}-selector,
        &${n}-allow-clear ${n}-selector
      `]: {
        paddingInlineEnd: e.fontSizeIcon + e.controlPaddingHorizontal
      },
      // ======================== Selections ========================
      [`${n}-selection-item`]: {
        position: "relative",
        display: "flex",
        flex: "none",
        boxSizing: "border-box",
        maxWidth: "100%",
        height: i,
        marginTop: iu,
        marginBottom: iu,
        lineHeight: `${i - e.lineWidth * 2}px`,
        background: e.colorFillSecondary,
        border: `${e.lineWidth}px solid ${e.colorSplit}`,
        borderRadius: e.borderRadiusSM,
        cursor: "default",
        transition: `font-size ${e.motionDurationSlow}, line-height ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,
        userSelect: "none",
        marginInlineEnd: iu * 2,
        paddingInlineStart: e.paddingXS,
        paddingInlineEnd: e.paddingXS / 2,
        [`${n}-disabled&`]: {
          color: e.colorTextDisabled,
          borderColor: e.colorBorder,
          cursor: "not-allowed"
        },
        // It's ok not to do this, but 24px makes bottom narrow in view should adjust
        "&-content": {
          display: "inline-block",
          marginInlineEnd: e.paddingXS / 2,
          overflow: "hidden",
          whiteSpace: "pre",
          textOverflow: "ellipsis"
        },
        "&-remove": O(O({}, cc()), {
          display: "inline-block",
          color: e.colorIcon,
          fontWeight: "bold",
          fontSize: 10,
          lineHeight: "inherit",
          cursor: "pointer",
          [`> ${o}`]: {
            verticalAlign: "-0.2em"
          },
          "&:hover": {
            color: e.colorIconHover
          }
        })
      },
      // ========================== Input ==========================
      [`${r}-item + ${r}-item`]: {
        [`${n}-selection-search`]: {
          marginInlineStart: 0
        }
      },
      [`${n}-selection-search`]: {
        display: "inline-flex",
        position: "relative",
        maxWidth: "100%",
        marginInlineStart: e.inputPaddingHorizontalBase - a,
        "\n          &-input,\n          &-mirror\n        ": {
          height: i,
          fontFamily: e.fontFamily,
          lineHeight: `${i}px`,
          transition: `all ${e.motionDurationSlow}`
        },
        "&-input": {
          width: "100%",
          minWidth: 4.1
          // fix search cursor missing
        },
        "&-mirror": {
          position: "absolute",
          top: 0,
          insetInlineStart: 0,
          insetInlineEnd: "auto",
          zIndex: 999,
          whiteSpace: "pre",
          visibility: "hidden"
        }
      },
      // ======================= Placeholder =======================
      [`${n}-selection-placeholder `]: {
        position: "absolute",
        top: "50%",
        insetInlineStart: e.inputPaddingHorizontalBase,
        insetInlineEnd: e.inputPaddingHorizontalBase,
        transform: "translateY(-50%)",
        transition: `all ${e.motionDurationSlow}`
      }
    }
  };
}
function Sj(e) {
  const {
    componentCls: t
  } = e, n = Qt(e, {
    controlHeight: e.controlHeightSM,
    controlHeightSM: e.controlHeightXS,
    borderRadius: e.borderRadiusSM,
    borderRadiusSM: e.borderRadiusXS
  }), [, o] = A_(e);
  return [
    iv(e),
    // ======================== Small ========================
    // Shared
    iv(n, "sm"),
    // Padding
    {
      [`${t}-multiple${t}-sm`]: {
        [`${t}-selection-placeholder`]: {
          insetInlineStart: e.controlPaddingHorizontalSM - e.lineWidth,
          insetInlineEnd: "auto"
        },
        // https://github.com/ant-design/ant-design/issues/29559
        [`${t}-selection-search`]: {
          marginInlineStart: o
        }
      }
    },
    // ======================== Large ========================
    // Shared
    iv(Qt(e, {
      fontSize: e.fontSizeLG,
      controlHeight: e.controlHeightLG,
      controlHeightSM: e.controlHeight,
      borderRadius: e.borderRadiusLG,
      borderRadiusSM: e.borderRadius
    }), "lg")
  ];
}
function av(e, t) {
  const {
    componentCls: n,
    inputPaddingHorizontalBase: o,
    borderRadius: r
  } = e, i = e.controlHeight - e.lineWidth * 2, a = Math.ceil(e.fontSize * 1.25), l = t ? `${n}-${t}` : "";
  return {
    [`${n}-single${l}`]: {
      fontSize: e.fontSize,
      // ========================= Selector =========================
      [`${n}-selector`]: O(O({}, fn(e)), {
        display: "flex",
        borderRadius: r,
        [`${n}-selection-search`]: {
          position: "absolute",
          top: 0,
          insetInlineStart: o,
          insetInlineEnd: o,
          bottom: 0,
          "&-input": {
            width: "100%"
          }
        },
        [`
          ${n}-selection-item,
          ${n}-selection-placeholder
        `]: {
          padding: 0,
          lineHeight: `${i}px`,
          transition: `all ${e.motionDurationSlow}`,
          // Firefox inline-block position calculation is not same as Chrome & Safari. Patch this:
          "@supports (-moz-appearance: meterbar)": {
            lineHeight: `${i}px`
          }
        },
        [`${n}-selection-item`]: {
          position: "relative",
          userSelect: "none"
        },
        [`${n}-selection-placeholder`]: {
          transition: "none",
          pointerEvents: "none"
        },
        // For common baseline align
        [[
          "&:after",
          /* For '' value baseline align */
          `${n}-selection-item:after`,
          /* For undefined value baseline align */
          `${n}-selection-placeholder:after`
        ].join(",")]: {
          display: "inline-block",
          width: 0,
          visibility: "hidden",
          content: '"\\a0"'
        }
      }),
      [`
        &${n}-show-arrow ${n}-selection-item,
        &${n}-show-arrow ${n}-selection-placeholder
      `]: {
        paddingInlineEnd: a
      },
      // Opacity selection if open
      [`&${n}-open ${n}-selection-item`]: {
        color: e.colorTextPlaceholder
      },
      // ========================== Input ==========================
      // We only change the style of non-customize input which is only support by `combobox` mode.
      // Not customize
      [`&:not(${n}-customize-input)`]: {
        [`${n}-selector`]: {
          width: "100%",
          height: e.controlHeight,
          padding: `0 ${o}px`,
          [`${n}-selection-search-input`]: {
            height: i
          },
          "&:after": {
            lineHeight: `${i}px`
          }
        }
      },
      [`&${n}-customize-input`]: {
        [`${n}-selector`]: {
          "&:after": {
            display: "none"
          },
          [`${n}-selection-search`]: {
            position: "static",
            width: "100%"
          },
          [`${n}-selection-placeholder`]: {
            position: "absolute",
            insetInlineStart: 0,
            insetInlineEnd: 0,
            padding: `0 ${o}px`,
            "&:after": {
              display: "none"
            }
          }
        }
      }
    }
  };
}
function Cj(e) {
  const {
    componentCls: t
  } = e, n = e.controlPaddingHorizontalSM - e.lineWidth;
  return [
    av(e),
    // ======================== Small ========================
    // Shared
    av(Qt(e, {
      controlHeight: e.controlHeightSM,
      borderRadius: e.borderRadiusSM
    }), "sm"),
    // padding
    {
      [`${t}-single${t}-sm`]: {
        [`&:not(${t}-customize-input)`]: {
          [`${t}-selection-search`]: {
            insetInlineStart: n,
            insetInlineEnd: n
          },
          [`${t}-selector`]: {
            padding: `0 ${n}px`
          },
          // With arrow should provides `padding-right` to show the arrow
          [`&${t}-show-arrow ${t}-selection-search`]: {
            insetInlineEnd: n + e.fontSize * 1.5
          },
          [`
            &${t}-show-arrow ${t}-selection-item,
            &${t}-show-arrow ${t}-selection-placeholder
          `]: {
            paddingInlineEnd: e.fontSize * 1.5
          }
        }
      }
    },
    // ======================== Large ========================
    // Shared
    av(Qt(e, {
      controlHeight: e.controlHeightLG,
      fontSize: e.fontSizeLG,
      borderRadius: e.borderRadiusLG
    }), "lg")
  ];
}
function $j(e, t, n) {
  const {
    focusElCls: o,
    focus: r,
    borderElCls: i
  } = n, a = i ? "> *" : "", l = ["hover", r ? "focus" : null, "active"].filter(Boolean).map((s) => `&:${s} ${a}`).join(",");
  return {
    [`&-item:not(${t}-last-item)`]: {
      marginInlineEnd: -e.lineWidth
    },
    "&-item": O(O({
      [l]: {
        zIndex: 2
      }
    }, o ? {
      [`&${o}`]: {
        zIndex: 2
      }
    } : {}), {
      [`&[disabled] ${a}`]: {
        zIndex: 0
      }
    })
  };
}
function Pj(e, t, n) {
  const {
    borderElCls: o
  } = n, r = o ? `> ${o}` : "";
  return {
    [`&-item:not(${t}-first-item):not(${t}-last-item) ${r}`]: {
      borderRadius: 0
    },
    [`&-item:not(${t}-last-item)${t}-first-item`]: {
      [`& ${r}, &${e}-sm ${r}, &${e}-lg ${r}`]: {
        borderStartEndRadius: 0,
        borderEndEndRadius: 0
      }
    },
    [`&-item:not(${t}-first-item)${t}-last-item`]: {
      [`& ${r}, &${e}-sm ${r}, &${e}-lg ${r}`]: {
        borderStartStartRadius: 0,
        borderEndStartRadius: 0
      }
    }
  };
}
function Fd(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
    focus: !0
  };
  const {
    componentCls: n
  } = e, o = `${n}-compact`;
  return {
    [o]: O(O({}, $j(e, o, t)), Pj(n, o, t))
  };
}
const Oj = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    position: "relative",
    backgroundColor: e.colorBgContainer,
    border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
    transition: `all ${e.motionDurationMid} ${e.motionEaseInOut}`,
    input: {
      cursor: "pointer"
    },
    [`${t}-show-search&`]: {
      cursor: "text",
      input: {
        cursor: "auto",
        color: "inherit"
      }
    },
    [`${t}-disabled&`]: {
      color: e.colorTextDisabled,
      background: e.colorBgContainerDisabled,
      cursor: "not-allowed",
      [`${t}-multiple&`]: {
        background: e.colorBgContainerDisabled
      },
      input: {
        cursor: "not-allowed"
      }
    }
  };
}, lv = function(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
  const {
    componentCls: o,
    borderHoverColor: r,
    outlineColor: i,
    antCls: a
  } = t, l = n ? {
    [`${o}-selector`]: {
      borderColor: r
    }
  } : {};
  return {
    [e]: {
      [`&:not(${o}-disabled):not(${o}-customize-input):not(${a}-pagination-size-changer)`]: O(O({}, l), {
        [`${o}-focused& ${o}-selector`]: {
          borderColor: r,
          boxShadow: `0 0 0 ${t.controlOutlineWidth}px ${i}`,
          borderInlineEndWidth: `${t.controlLineWidth}px !important`,
          outline: 0
        },
        [`&:hover ${o}-selector`]: {
          borderColor: r,
          borderInlineEndWidth: `${t.controlLineWidth}px !important`
        }
      })
    }
  };
}, kj = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-selection-search-input`]: {
      margin: 0,
      padding: 0,
      background: "transparent",
      border: "none",
      outline: "none",
      appearance: "none",
      "&::-webkit-search-cancel-button": {
        display: "none",
        "-webkit-appearance": "none"
      }
    }
  };
}, Ij = (e) => {
  const {
    componentCls: t,
    inputPaddingHorizontalBase: n,
    iconCls: o
  } = e;
  return {
    [t]: O(O({}, fn(e)), {
      position: "relative",
      display: "inline-block",
      cursor: "pointer",
      [`&:not(${t}-customize-input) ${t}-selector`]: O(O({}, Oj(e)), kj(e)),
      // [`&:not(&-disabled):hover ${selectCls}-selector`]: {
      //   ...genHoverStyle(token),
      // },
      // ======================== Selection ========================
      [`${t}-selection-item`]: O({
        flex: 1,
        fontWeight: "normal"
      }, Ha),
      // ======================= Placeholder =======================
      [`${t}-selection-placeholder`]: O(O({}, Ha), {
        flex: 1,
        color: e.colorTextPlaceholder,
        pointerEvents: "none"
      }),
      // ========================== Arrow ==========================
      [`${t}-arrow`]: O(O({}, cc()), {
        position: "absolute",
        top: "50%",
        insetInlineStart: "auto",
        insetInlineEnd: n,
        height: e.fontSizeIcon,
        marginTop: -e.fontSizeIcon / 2,
        color: e.colorTextQuaternary,
        fontSize: e.fontSizeIcon,
        lineHeight: 1,
        textAlign: "center",
        pointerEvents: "none",
        display: "flex",
        alignItems: "center",
        [o]: {
          verticalAlign: "top",
          transition: `transform ${e.motionDurationSlow}`,
          "> svg": {
            verticalAlign: "top"
          },
          [`&:not(${t}-suffix)`]: {
            pointerEvents: "auto"
          }
        },
        [`${t}-disabled &`]: {
          cursor: "not-allowed"
        },
        "> *:not(:last-child)": {
          marginInlineEnd: 8
          // FIXME: magic
        }
      }),
      // ========================== Clear ==========================
      [`${t}-clear`]: {
        position: "absolute",
        top: "50%",
        insetInlineStart: "auto",
        insetInlineEnd: n,
        zIndex: 1,
        display: "inline-block",
        width: e.fontSizeIcon,
        height: e.fontSizeIcon,
        marginTop: -e.fontSizeIcon / 2,
        color: e.colorTextQuaternary,
        fontSize: e.fontSizeIcon,
        fontStyle: "normal",
        lineHeight: 1,
        textAlign: "center",
        textTransform: "none",
        background: e.colorBgContainer,
        cursor: "pointer",
        opacity: 0,
        transition: `color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,
        textRendering: "auto",
        "&:before": {
          display: "block"
        },
        "&:hover": {
          color: e.colorTextTertiary
        }
      },
      "&:hover": {
        [`${t}-clear`]: {
          opacity: 1
        }
      }
    }),
    // ========================= Feedback ==========================
    [`${t}-has-feedback`]: {
      [`${t}-clear`]: {
        insetInlineEnd: n + e.fontSize + e.paddingXXS
      }
    }
  };
}, _j = (e) => {
  const {
    componentCls: t
  } = e;
  return [
    {
      [t]: {
        // ==================== BorderLess ====================
        [`&-borderless ${t}-selector`]: {
          backgroundColor: "transparent !important",
          borderColor: "transparent !important",
          boxShadow: "none !important"
        },
        // ==================== In Form ====================
        [`&${t}-in-form-item`]: {
          width: "100%"
        }
      }
    },
    // =====================================================
    // ==                       LTR                       ==
    // =====================================================
    // Base
    Ij(e),
    // Single
    Cj(e),
    // Multiple
    Sj(e),
    // Dropdown
    wj(e),
    // =====================================================
    // ==                       RTL                       ==
    // =====================================================
    {
      [`${t}-rtl`]: {
        direction: "rtl"
      }
    },
    // =====================================================
    // ==                     Status                      ==
    // =====================================================
    lv(t, Qt(e, {
      borderHoverColor: e.colorPrimaryHover,
      outlineColor: e.controlOutline
    })),
    lv(`${t}-status-error`, Qt(e, {
      borderHoverColor: e.colorErrorHover,
      outlineColor: e.colorErrorOutline
    }), !0),
    lv(`${t}-status-warning`, Qt(e, {
      borderHoverColor: e.colorWarningHover,
      outlineColor: e.colorWarningOutline
    }), !0),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    Fd(e, {
      borderElCls: `${t}-selector`,
      focusElCls: `${t}-focused`
    })
  ];
}, Tj = Sn("Select", (e, t) => {
  let {
    rootPrefixCls: n
  } = t;
  const o = Qt(e, {
    rootPrefixCls: n,
    inputPaddingHorizontalBase: e.paddingSM - 1
  });
  return [_j(o)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase + 50
})), _0 = () => O(O({}, Fn($_(), ["inputIcon", "mode", "getInputElement", "getRawInputElement", "backfill"])), {
  value: en([Array, Object, String, Number]),
  defaultValue: en([Array, Object, String, Number]),
  notFoundContent: fe.any,
  suffixIcon: fe.any,
  itemIcon: fe.any,
  size: an(),
  mode: an(),
  bordered: ct(!0),
  transitionName: String,
  choiceTransitionName: an(""),
  popupClassName: String,
  /** @deprecated Please use `popupClassName` instead */
  dropdownClassName: String,
  placement: an(),
  status: an(),
  "onUpdate:value": et()
}), CS = "SECRET_COMBOBOX_MODE_DO_NOT_USE", Dt = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASelect",
  Option: S0,
  OptGroup: C0,
  inheritAttrs: !1,
  props: kn(_0(), {
    listHeight: 256,
    listItemHeight: 24
  }),
  SECRET_COMBOBOX_MODE_DO_NOT_USE: CS,
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      slots: r,
      expose: i
    } = t;
    const a = ce(), l = Br(), s = Nr.useInject(), u = E(() => Ls(s.status, e.status)), c = () => {
      var q;
      (q = a.value) === null || q === void 0 || q.focus();
    }, d = () => {
      var q;
      (q = a.value) === null || q === void 0 || q.blur();
    }, f = (q) => {
      var G;
      (G = a.value) === null || G === void 0 || G.scrollTo(q);
    }, p = E(() => {
      const {
        mode: q
      } = e;
      if (q !== "combobox")
        return q === CS ? "combobox" : q;
    });
    process.env.NODE_ENV !== "production" && dn(!e.dropdownClassName, "Select", "`dropdownClassName` is deprecated. Please use `popupClassName` instead.");
    const {
      prefixCls: v,
      direction: g,
      renderEmpty: m,
      size: x,
      getPrefixCls: S,
      getPopupContainer: C,
      disabled: P,
      select: $
    } = _t("select", e), {
      compactSize: I,
      compactItemClassnames: w
    } = fc(v, g), _ = E(() => I.value || x.value), M = _i(), N = E(() => {
      var q;
      return (q = P.value) !== null && q !== void 0 ? q : M.value;
    }), [A, H] = Tj(v), B = E(() => S()), F = E(() => e.placement !== void 0 ? e.placement : g.value === "rtl" ? "bottomRight" : "bottomLeft"), R = E(() => Wa(B.value, O5(F.value), e.transitionName)), X = E(() => Me({
      [`${v.value}-lg`]: _.value === "large",
      [`${v.value}-sm`]: _.value === "small",
      [`${v.value}-rtl`]: g.value === "rtl",
      [`${v.value}-borderless`]: !e.bordered,
      [`${v.value}-in-form-item`]: s.isFormItemInput
    }, $i(v.value, u.value, s.hasFeedback), w.value, H.value)), j = function() {
      for (var q = arguments.length, G = new Array(q), ae = 0; ae < q; ae++)
        G[ae] = arguments[ae];
      o("update:value", G[0]), o("change", ...G), l.onFieldChange();
    }, ee = (q) => {
      o("blur", q), l.onFieldBlur();
    };
    i({
      blur: d,
      focus: c,
      scrollTo: f
    });
    const W = E(() => p.value === "multiple" || p.value === "tags"), K = E(() => e.showArrow !== void 0 ? e.showArrow : e.loading || !(W.value || p.value === "combobox"));
    return () => {
      var q, G, ae, le;
      const {
        notFoundContent: ie,
        listHeight: re = 256,
        listItemHeight: te = 24,
        popupClassName: ve,
        dropdownClassName: ue,
        virtual: pe,
        dropdownMatchSelectWidth: ge,
        id: _e = l.id.value,
        placeholder: ze = (q = r.placeholder) === null || q === void 0 ? void 0 : q.call(r),
        showArrow: Ke
      } = e, {
        hasFeedback: He,
        feedbackIcon: Ne
      } = s;
      let Xe;
      ie !== void 0 ? Xe = ie : r.notFoundContent ? Xe = r.notFoundContent() : p.value === "combobox" ? Xe = null : Xe = m?.("Select") || h(r0, {
        componentName: "Select"
      }, null);
      const {
        suffixIcon: De,
        itemIcon: Fe,
        removeIcon: Ve,
        clearIcon: nt
      } = BV(O(O({}, e), {
        multiple: W.value,
        prefixCls: v.value,
        hasFeedback: He,
        feedbackIcon: Ne,
        showArrow: K.value
      }), r), je = Fn(e, ["prefixCls", "suffixIcon", "itemIcon", "removeIcon", "clearIcon", "size", "bordered", "status"]), Pe = Me(ve || ue, {
        [`${v.value}-dropdown-${g.value}`]: g.value === "rtl"
      }, H.value);
      return A(h(KH, Q(Q(Q({
        ref: a,
        virtual: pe,
        dropdownMatchSelectWidth: ge
      }, je), n), {}, {
        showSearch: (G = e.showSearch) !== null && G !== void 0 ? G : (ae = $?.value) === null || ae === void 0 ? void 0 : ae.showSearch,
        placeholder: ze,
        listHeight: re,
        listItemHeight: te,
        mode: p.value,
        prefixCls: v.value,
        direction: g.value,
        inputIcon: De,
        menuItemSelectedIcon: Fe,
        removeIcon: Ve,
        clearIcon: nt,
        notFoundContent: Xe,
        class: [X.value, n.class],
        getPopupContainer: C?.value,
        dropdownClassName: Pe,
        onChange: j,
        onBlur: ee,
        id: _e,
        dropdownRender: je.dropdownRender || r.dropdownRender,
        transitionName: R.value,
        children: (le = r.default) === null || le === void 0 ? void 0 : le.call(r),
        tagRender: e.tagRender || r.tagRender,
        optionLabelRender: r.optionLabel,
        maxTagPlaceholder: e.maxTagPlaceholder || r.maxTagPlaceholder,
        showArrow: He || Ke,
        disabled: N.value
      }), {
        option: r.option
      }));
    };
  }
});
Dt.install = function(e) {
  return e.component(Dt.name, Dt), e.component(Dt.Option.displayName, Dt.Option), e.component(Dt.OptGroup.displayName, Dt.OptGroup), e;
};
const Mj = Dt.Option;
Dt.OptGroup;
var Ej = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z" } }, { tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, name: "check-circle", theme: "outlined" };
function $S(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      Dj(e, r, n[r]);
    });
  }
  return e;
}
function Dj(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var T0 = function(t, n) {
  var o = $S({}, t, n.attrs);
  return h(on, $S({}, o, {
    icon: Ej
  }), null);
};
T0.displayName = "CheckCircleOutlined";
T0.inheritAttrs = !1;
var Aj = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, name: "exclamation-circle", theme: "outlined" };
function PS(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      Nj(e, r, n[r]);
    });
  }
  return e;
}
function Nj(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var M0 = function(t, n) {
  var o = PS({}, t, n.attrs);
  return h(on, PS({}, o, {
    icon: Aj
  }), null);
};
M0.displayName = "ExclamationCircleOutlined";
M0.inheritAttrs = !1;
var Rj = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z" } }] }, name: "info-circle", theme: "outlined" };
function OS(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      zj(e, r, n[r]);
    });
  }
  return e;
}
function zj(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var E0 = function(t, n) {
  var o = OS({}, t, n.attrs);
  return h(on, OS({}, o, {
    icon: Rj
  }), null);
};
E0.displayName = "InfoCircleOutlined";
E0.inheritAttrs = !1;
var Fj = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z" } }] }, name: "close-circle", theme: "outlined" };
function kS(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      Bj(e, r, n[r]);
    });
  }
  return e;
}
function Bj(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var D0 = function(t, n) {
  var o = kS({}, t, n.attrs);
  return h(on, kS({}, o, {
    icon: Fj
  }), null);
};
D0.displayName = "CloseCircleOutlined";
D0.inheritAttrs = !1;
var Lj = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, name: "check-circle", theme: "filled" };
function IS(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      Hj(e, r, n[r]);
    });
  }
  return e;
}
function Hj(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Fl = function(t, n) {
  var o = IS({}, t, n.attrs);
  return h(on, IS({}, o, {
    icon: Lj
  }), null);
};
Fl.displayName = "CheckCircleFilled";
Fl.inheritAttrs = !1;
var Vj = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "exclamation-circle", theme: "filled" };
function _S(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      jj(e, r, n[r]);
    });
  }
  return e;
}
function jj(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Bl = function(t, n) {
  var o = _S({}, t, n.attrs);
  return h(on, _S({}, o, {
    icon: Vj
  }), null);
};
Bl.displayName = "ExclamationCircleFilled";
Bl.inheritAttrs = !1;
var Wj = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "info-circle", theme: "filled" };
function TS(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      Kj(e, r, n[r]);
    });
  }
  return e;
}
function Kj(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Hs = function(t, n) {
  var o = TS({}, t, n.attrs);
  return h(on, TS({}, o, {
    icon: Wj
  }), null);
};
Hs.displayName = "InfoCircleFilled";
Hs.inheritAttrs = !1;
const $f = ["xxxl", "xxl", "xl", "lg", "md", "sm", "xs"], qj = (e) => ({
  xs: `(max-width: ${e.screenXSMax}px)`,
  sm: `(min-width: ${e.screenSM}px)`,
  md: `(min-width: ${e.screenMD}px)`,
  lg: `(min-width: ${e.screenLG}px)`,
  xl: `(min-width: ${e.screenXL}px)`,
  xxl: `(min-width: ${e.screenXXL}px)`,
  xxxl: `{min-width: ${e.screenXXXL}px}`
});
function N_() {
  const [, e] = dc();
  return E(() => {
    const t = qj(e.value), n = /* @__PURE__ */ new Map();
    let o = -1, r = {};
    return {
      matchHandlers: {},
      dispatch(i) {
        return r = i, n.forEach((a) => a(r)), n.size >= 1;
      },
      subscribe(i) {
        return n.size || this.register(), o += 1, n.set(o, i), i(r), o;
      },
      unsubscribe(i) {
        n.delete(i), n.size || this.unregister();
      },
      unregister() {
        Object.keys(t).forEach((i) => {
          const a = t[i], l = this.matchHandlers[a];
          l?.mql.removeListener(l?.listener);
        }), n.clear();
      },
      register() {
        Object.keys(t).forEach((i) => {
          const a = t[i], l = (u) => {
            let {
              matches: c
            } = u;
            this.dispatch(O(O({}, r), {
              [i]: c
            }));
          }, s = window.matchMedia(a);
          s.addListener(l), this.matchHandlers[a] = {
            mql: s,
            listener: l
          }, l(s);
        });
      },
      responsiveMap: t
    };
  });
}
function R_() {
  const e = $e({});
  let t = null;
  const n = N_();
  return Nt(() => {
    t = n.value.subscribe((o) => {
      e.value = o;
    });
  }), jo(() => {
    n.value.unsubscribe(t);
  }), e;
}
function gi(e) {
  const t = $e();
  return It(() => {
    t.value = e();
  }, {
    flush: "sync"
    // needed so updates are immediate.
  }), t;
}
const jr = {
  adjustX: 1,
  adjustY: 1
}, Wr = [0, 0], z_ = {
  left: {
    points: ["cr", "cl"],
    overflow: jr,
    offset: [-4, 0],
    targetOffset: Wr
  },
  right: {
    points: ["cl", "cr"],
    overflow: jr,
    offset: [4, 0],
    targetOffset: Wr
  },
  top: {
    points: ["bc", "tc"],
    overflow: jr,
    offset: [0, -4],
    targetOffset: Wr
  },
  bottom: {
    points: ["tc", "bc"],
    overflow: jr,
    offset: [0, 4],
    targetOffset: Wr
  },
  topLeft: {
    points: ["bl", "tl"],
    overflow: jr,
    offset: [0, -4],
    targetOffset: Wr
  },
  leftTop: {
    points: ["tr", "tl"],
    overflow: jr,
    offset: [-4, 0],
    targetOffset: Wr
  },
  topRight: {
    points: ["br", "tr"],
    overflow: jr,
    offset: [0, -4],
    targetOffset: Wr
  },
  rightTop: {
    points: ["tl", "tr"],
    overflow: jr,
    offset: [4, 0],
    targetOffset: Wr
  },
  bottomRight: {
    points: ["tr", "br"],
    overflow: jr,
    offset: [0, 4],
    targetOffset: Wr
  },
  rightBottom: {
    points: ["bl", "br"],
    overflow: jr,
    offset: [4, 0],
    targetOffset: Wr
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: jr,
    offset: [0, 4],
    targetOffset: Wr
  },
  leftBottom: {
    points: ["br", "bl"],
    overflow: jr,
    offset: [-4, 0],
    targetOffset: Wr
  }
}, Yj = {
  prefixCls: String,
  id: String,
  overlayInnerStyle: fe.any
}, Gj = be({
  compatConfig: {
    MODE: 3
  },
  name: "TooltipContent",
  props: Yj,
  setup(e, t) {
    let {
      slots: n
    } = t;
    return () => {
      var o;
      return h("div", {
        class: `${e.prefixCls}-inner`,
        id: e.id,
        role: "tooltip",
        style: e.overlayInnerStyle
      }, [(o = n.overlay) === null || o === void 0 ? void 0 : o.call(n)]);
    };
  }
});
var Uj = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function MS() {
}
const Xj = be({
  compatConfig: {
    MODE: 3
  },
  name: "Tooltip",
  inheritAttrs: !1,
  props: {
    trigger: fe.any.def(["hover"]),
    defaultVisible: {
      type: Boolean,
      default: void 0
    },
    visible: {
      type: Boolean,
      default: void 0
    },
    placement: fe.string.def("right"),
    transitionName: String,
    animation: fe.any,
    afterVisibleChange: fe.func.def(() => {
    }),
    overlayStyle: {
      type: Object,
      default: void 0
    },
    overlayClassName: String,
    prefixCls: fe.string.def("rc-tooltip"),
    mouseEnterDelay: fe.number.def(0.1),
    mouseLeaveDelay: fe.number.def(0.1),
    getPopupContainer: Function,
    destroyTooltipOnHide: {
      type: Boolean,
      default: !1
    },
    align: fe.object.def(() => ({})),
    arrowContent: fe.any.def(null),
    tipId: String,
    builtinPlacements: fe.object,
    overlayInnerStyle: {
      type: Object,
      default: void 0
    },
    popupVisible: {
      type: Boolean,
      default: void 0
    },
    onVisibleChange: Function,
    onPopupAlign: Function,
    arrow: {
      type: Boolean,
      default: !0
    }
  },
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: r
    } = t;
    const i = $e(), a = () => {
      const {
        prefixCls: c,
        tipId: d,
        overlayInnerStyle: f
      } = e;
      return [e.arrow ? h("div", {
        class: `${c}-arrow`,
        key: "arrow"
      }, [ei(n, e, "arrowContent")]) : null, h(Gj, {
        key: "content",
        prefixCls: c,
        id: d,
        overlayInnerStyle: f
      }, {
        overlay: n.overlay
      })];
    };
    r({
      getPopupDomNode: () => i.value.getPopupDomNode(),
      triggerDOM: i,
      forcePopupAlign: () => {
        var c;
        return (c = i.value) === null || c === void 0 ? void 0 : c.forcePopupAlign();
      }
    });
    const s = $e(!1), u = $e(!1);
    return It(() => {
      const {
        destroyTooltipOnHide: c
      } = e;
      if (typeof c == "boolean")
        s.value = c;
      else if (c && typeof c == "object") {
        const {
          keepParent: d
        } = c;
        s.value = d === !0, u.value = d === !1;
      }
    }), () => {
      const {
        overlayClassName: c,
        trigger: d,
        mouseEnterDelay: f,
        mouseLeaveDelay: p,
        overlayStyle: v,
        prefixCls: g,
        afterVisibleChange: m,
        transitionName: x,
        animation: S,
        placement: C,
        align: P,
        destroyTooltipOnHide: $,
        defaultVisible: I
      } = e, w = Uj(e, ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "afterVisibleChange", "transitionName", "animation", "placement", "align", "destroyTooltipOnHide", "defaultVisible"]), _ = O({}, w);
      e.visible !== void 0 && (_.popupVisible = e.visible);
      const M = O(O(O({
        popupClassName: c,
        prefixCls: g,
        action: d,
        builtinPlacements: z_,
        popupPlacement: C,
        popupAlign: P,
        afterPopupVisibleChange: m,
        popupTransitionName: x,
        popupAnimation: S,
        defaultPopupVisible: I,
        destroyPopupOnHide: s.value,
        autoDestroy: u.value,
        mouseLeaveDelay: p,
        popupStyle: v,
        mouseEnterDelay: f
      }, _), o), {
        onPopupVisibleChange: e.onVisibleChange || MS,
        onPopupAlign: e.onPopupAlign || MS,
        ref: i,
        arrow: !!e.arrow,
        popup: a()
      });
      return h(Dd, M, {
        default: n.default
      });
    };
  }
}), F_ = (() => ({
  trigger: [String, Array],
  open: {
    type: Boolean,
    default: void 0
  },
  /** @deprecated Please use `open` instead. */
  visible: {
    type: Boolean,
    default: void 0
  },
  placement: String,
  color: String,
  transitionName: String,
  overlayStyle: Et(),
  overlayInnerStyle: Et(),
  overlayClassName: String,
  openClassName: String,
  prefixCls: String,
  mouseEnterDelay: Number,
  mouseLeaveDelay: Number,
  getPopupContainer: Function,
  /**@deprecated Please use `arrow={{ pointAtCenter: true }}` instead. */
  arrowPointAtCenter: {
    type: Boolean,
    default: void 0
  },
  arrow: {
    type: [Boolean, Object],
    default: !0
  },
  autoAdjustOverflow: {
    type: [Boolean, Object],
    default: void 0
  },
  destroyTooltipOnHide: {
    type: Boolean,
    default: void 0
  },
  align: Et(),
  builtinPlacements: Et(),
  children: Array,
  /** @deprecated Please use `onOpenChange` instead. */
  onVisibleChange: Function,
  /** @deprecated Please use `onUpdate:open` instead. */
  "onUpdate:visible": Function,
  onOpenChange: Function,
  "onUpdate:open": Function
})), Qj = {
  adjustX: 1,
  adjustY: 1
}, ES = {
  adjustX: 0,
  adjustY: 0
}, Zj = [0, 0];
function DS(e) {
  return typeof e == "boolean" ? e ? Qj : ES : O(O({}, ES), e);
}
function B_(e) {
  const {
    arrowWidth: t = 4,
    horizontalArrowShift: n = 16,
    verticalArrowShift: o = 8,
    autoAdjustOverflow: r,
    arrowPointAtCenter: i
  } = e, a = {
    left: {
      points: ["cr", "cl"],
      offset: [-4, 0]
    },
    right: {
      points: ["cl", "cr"],
      offset: [4, 0]
    },
    top: {
      points: ["bc", "tc"],
      offset: [0, -4]
    },
    bottom: {
      points: ["tc", "bc"],
      offset: [0, 4]
    },
    topLeft: {
      points: ["bl", "tc"],
      offset: [-(n + t), -4]
    },
    leftTop: {
      points: ["tr", "cl"],
      offset: [-4, -(o + t)]
    },
    topRight: {
      points: ["br", "tc"],
      offset: [n + t, -4]
    },
    rightTop: {
      points: ["tl", "cr"],
      offset: [4, -(o + t)]
    },
    bottomRight: {
      points: ["tr", "bc"],
      offset: [n + t, 4]
    },
    rightBottom: {
      points: ["bl", "cr"],
      offset: [4, o + t]
    },
    bottomLeft: {
      points: ["tl", "bc"],
      offset: [-(n + t), 4]
    },
    leftBottom: {
      points: ["br", "cl"],
      offset: [-4, o + t]
    }
  };
  return Object.keys(a).forEach((l) => {
    a[l] = i ? O(O({}, a[l]), {
      overflow: DS(r),
      targetOffset: Zj
    }) : O(O({}, z_[l]), {
      overflow: DS(r)
    }), a[l].ignoreShake = !0;
  }), a;
}
function Lp() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  for (let t = 0, n = e.length; t < n; t++)
    if (e[t] !== void 0)
      return e[t];
}
const Jj = vd.map((e) => `${e}-inverse`), eW = ["success", "processing", "error", "default", "warning"];
function L_(e) {
  return (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0) ? [...Jj, ...vd].includes(e) : vd.includes(e);
}
function tW(e) {
  return eW.includes(e);
}
function nW(e, t) {
  const n = L_(t), o = Me({
    [`${e}-${t}`]: t && n
  }), r = {}, i = {};
  return t && !n && (r.background = t, i["--antd-arrow-background-color"] = t), {
    className: o,
    overlayStyle: r,
    arrowStyle: i
  };
}
function Pf(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
  return e.map((n) => `${t}${n}`).join(",");
}
const H_ = 8;
function V_(e) {
  const t = H_, {
    sizePopupArrow: n,
    contentRadius: o,
    borderRadiusOuter: r,
    limitVerticalRadius: i
  } = e, a = n / 2 - Math.ceil(r * (Math.sqrt(2) - 1)), l = (o > 12 ? o + 2 : 12) - a, s = i ? t - a : l;
  return {
    dropdownArrowOffset: l,
    dropdownArrowOffsetVertical: s
  };
}
function j_(e, t) {
  const {
    componentCls: n,
    sizePopupArrow: o,
    marginXXS: r,
    borderRadiusXS: i,
    borderRadiusOuter: a,
    boxShadowPopoverArrow: l
  } = e, {
    colorBg: s,
    showArrowCls: u,
    contentRadius: c = e.borderRadiusLG,
    limitVerticalRadius: d
  } = t, {
    dropdownArrowOffsetVertical: f,
    dropdownArrowOffset: p
  } = V_({
    sizePopupArrow: o,
    contentRadius: c,
    borderRadiusOuter: a,
    limitVerticalRadius: d
  }), v = o / 2 + r;
  return {
    [n]: {
      // ============================ Basic ============================
      [`${n}-arrow`]: [O(O({
        position: "absolute",
        zIndex: 1,
        display: "block"
      }, e0(o, i, a, s, l)), {
        "&:before": {
          background: s
        }
      })],
      // ========================== Placement ==========================
      // Here handle the arrow position and rotate stuff
      // >>>>> Top
      [[`&-placement-top ${n}-arrow`, `&-placement-topLeft ${n}-arrow`, `&-placement-topRight ${n}-arrow`].join(",")]: {
        bottom: 0,
        transform: "translateY(100%) rotate(180deg)"
      },
      [`&-placement-top ${n}-arrow`]: {
        left: {
          _skip_check_: !0,
          value: "50%"
        },
        transform: "translateX(-50%) translateY(100%) rotate(180deg)"
      },
      [`&-placement-topLeft ${n}-arrow`]: {
        left: {
          _skip_check_: !0,
          value: p
        }
      },
      [`&-placement-topRight ${n}-arrow`]: {
        right: {
          _skip_check_: !0,
          value: p
        }
      },
      // >>>>> Bottom
      [[`&-placement-bottom ${n}-arrow`, `&-placement-bottomLeft ${n}-arrow`, `&-placement-bottomRight ${n}-arrow`].join(",")]: {
        top: 0,
        transform: "translateY(-100%)"
      },
      [`&-placement-bottom ${n}-arrow`]: {
        left: {
          _skip_check_: !0,
          value: "50%"
        },
        transform: "translateX(-50%) translateY(-100%)"
      },
      [`&-placement-bottomLeft ${n}-arrow`]: {
        left: {
          _skip_check_: !0,
          value: p
        }
      },
      [`&-placement-bottomRight ${n}-arrow`]: {
        right: {
          _skip_check_: !0,
          value: p
        }
      },
      // >>>>> Left
      [[`&-placement-left ${n}-arrow`, `&-placement-leftTop ${n}-arrow`, `&-placement-leftBottom ${n}-arrow`].join(",")]: {
        right: {
          _skip_check_: !0,
          value: 0
        },
        transform: "translateX(100%) rotate(90deg)"
      },
      [`&-placement-left ${n}-arrow`]: {
        top: {
          _skip_check_: !0,
          value: "50%"
        },
        transform: "translateY(-50%) translateX(100%) rotate(90deg)"
      },
      [`&-placement-leftTop ${n}-arrow`]: {
        top: f
      },
      [`&-placement-leftBottom ${n}-arrow`]: {
        bottom: f
      },
      // >>>>> Right
      [[`&-placement-right ${n}-arrow`, `&-placement-rightTop ${n}-arrow`, `&-placement-rightBottom ${n}-arrow`].join(",")]: {
        left: {
          _skip_check_: !0,
          value: 0
        },
        transform: "translateX(-100%) rotate(-90deg)"
      },
      [`&-placement-right ${n}-arrow`]: {
        top: {
          _skip_check_: !0,
          value: "50%"
        },
        transform: "translateY(-50%) translateX(-100%) rotate(-90deg)"
      },
      [`&-placement-rightTop ${n}-arrow`]: {
        top: f
      },
      [`&-placement-rightBottom ${n}-arrow`]: {
        bottom: f
      },
      // =========================== Offset ============================
      // Offset the popover to account for the dropdown arrow
      // >>>>> Top
      [Pf(["&-placement-topLeft", "&-placement-top", "&-placement-topRight"].map((g) => g += ":not(&-arrow-hidden)"), u)]: {
        paddingBottom: v
      },
      // >>>>> Bottom
      [Pf(["&-placement-bottomLeft", "&-placement-bottom", "&-placement-bottomRight"].map((g) => g += ":not(&-arrow-hidden)"), u)]: {
        paddingTop: v
      },
      // >>>>> Left
      [Pf(["&-placement-leftTop", "&-placement-left", "&-placement-leftBottom"].map((g) => g += ":not(&-arrow-hidden)"), u)]: {
        paddingRight: {
          _skip_check_: !0,
          value: v
        }
      },
      // >>>>> Right
      [Pf(["&-placement-rightTop", "&-placement-right", "&-placement-rightBottom"].map((g) => g += ":not(&-arrow-hidden)"), u)]: {
        paddingLeft: {
          _skip_check_: !0,
          value: v
        }
      }
    }
  };
}
const oW = (e) => {
  const {
    componentCls: t,
    // ant-tooltip
    tooltipMaxWidth: n,
    tooltipColor: o,
    tooltipBg: r,
    tooltipBorderRadius: i,
    zIndexPopup: a,
    controlHeight: l,
    boxShadowSecondary: s,
    paddingSM: u,
    paddingXS: c,
    tooltipRadiusOuter: d
  } = e;
  return [
    {
      [t]: O(O(O(O({}, fn(e)), {
        position: "absolute",
        zIndex: a,
        display: "block",
        "&": [{
          width: "max-content"
        }, {
          width: "intrinsic"
        }],
        maxWidth: n,
        visibility: "visible",
        "&-hidden": {
          display: "none"
        },
        "--antd-arrow-background-color": r,
        // Wrapper for the tooltip content
        [`${t}-inner`]: {
          minWidth: l,
          minHeight: l,
          padding: `${u / 2}px ${c}px`,
          color: o,
          textAlign: "start",
          textDecoration: "none",
          wordWrap: "break-word",
          backgroundColor: r,
          borderRadius: i,
          boxShadow: s
        },
        // Limit left and right placement radius
        [["&-placement-left", "&-placement-leftTop", "&-placement-leftBottom", "&-placement-right", "&-placement-rightTop", "&-placement-rightBottom"].join(",")]: {
          [`${t}-inner`]: {
            borderRadius: Math.min(i, H_)
          }
        },
        [`${t}-content`]: {
          position: "relative"
        }
      }), AI(e, (f, p) => {
        let {
          darkColor: v
        } = p;
        return {
          [`&${t}-${f}`]: {
            [`${t}-inner`]: {
              backgroundColor: v
            },
            [`${t}-arrow`]: {
              "--antd-arrow-background-color": v
            }
          }
        };
      })), {
        // RTL
        "&-rtl": {
          direction: "rtl"
        }
      })
    },
    // Arrow Style
    j_(Qt(e, {
      borderRadiusOuter: d
    }), {
      colorBg: "var(--antd-arrow-background-color)",
      showArrowCls: "",
      contentRadius: i,
      limitVerticalRadius: !0
    }),
    // Pure Render
    {
      [`${t}-pure`]: {
        position: "relative",
        maxWidth: "none"
      }
    }
  ];
}, rW = ((e, t) => Sn("Tooltip", (o) => {
  if (t?.value === !1)
    return [];
  const {
    borderRadius: r,
    colorTextLightSolid: i,
    colorBgDefault: a,
    borderRadiusOuter: l
  } = o, s = Qt(o, {
    // default variables
    tooltipMaxWidth: 250,
    tooltipColor: i,
    tooltipBorderRadius: r,
    tooltipBg: a,
    tooltipRadiusOuter: l > 4 ? 4 : l
  });
  return [oW(s), zd(o, "zoom-big-fast")];
}, (o) => {
  let {
    zIndexPopupBase: r,
    colorBgSpotlight: i
  } = o;
  return {
    zIndexPopup: r + 70,
    colorBgDefault: i
  };
})(e)), iW = (e, t) => {
  const n = {}, o = O({}, e);
  return t.forEach((r) => {
    e && r in e && (n[r] = e[r], delete o[r]);
  }), {
    picked: n,
    omitted: o
  };
}, W_ = () => O(O({}, F_()), {
  title: fe.any
}), aW = () => ({
  trigger: "hover",
  align: {},
  placement: "top",
  mouseEnterDelay: 0.1,
  mouseLeaveDelay: 0.1,
  arrowPointAtCenter: !1,
  autoAdjustOverflow: !0
}), lW = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATooltip",
  inheritAttrs: !1,
  props: kn(W_(), {
    trigger: "hover",
    align: {},
    placement: "top",
    mouseEnterDelay: 0.1,
    mouseLeaveDelay: 0.1,
    arrowPointAtCenter: !1,
    autoAdjustOverflow: !0
  }),
  slots: Object,
  // emits: ['update:visible', 'visibleChange'],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: r,
      expose: i
    } = t;
    process.env.NODE_ENV !== "production" && [["visible", "open"], ["onVisibleChange", "onOpenChange"]].forEach((N) => {
      let [A, H] = N;
      wo(e[A] === void 0, "Tooltip", `\`${A}\` is deprecated, please use \`${H}\` instead.`);
    });
    const {
      prefixCls: a,
      getPopupContainer: l,
      direction: s,
      rootPrefixCls: u
    } = _t("tooltip", e), c = E(() => {
      var N;
      return (N = e.open) !== null && N !== void 0 ? N : e.visible;
    }), d = ce(Lp([e.open, e.visible])), f = ce();
    let p;
    ke(c, (N) => {
      Vt.cancel(p), p = Vt(() => {
        d.value = !!N;
      });
    });
    const v = () => {
      var N;
      const A = (N = e.title) !== null && N !== void 0 ? N : n.title;
      return !A && A !== 0;
    }, g = (N) => {
      const A = v();
      c.value === void 0 && (d.value = A ? !1 : N), A || (o("update:visible", N), o("visibleChange", N), o("update:open", N), o("openChange", N));
    };
    i({
      getPopupDomNode: () => f.value.getPopupDomNode(),
      open: d,
      forcePopupAlign: () => {
        var N;
        return (N = f.value) === null || N === void 0 ? void 0 : N.forcePopupAlign();
      }
    });
    const x = E(() => {
      var N;
      const {
        builtinPlacements: A,
        autoAdjustOverflow: H,
        arrow: B,
        arrowPointAtCenter: F
      } = e;
      let R = F;
      return typeof B == "object" && (R = (N = B.pointAtCenter) !== null && N !== void 0 ? N : F), A || B_({
        arrowPointAtCenter: R,
        autoAdjustOverflow: H
      });
    }), S = (N) => N || N === "", C = (N) => {
      const A = N.type;
      if (typeof A == "object" && N.props && ((A.__ANT_BUTTON === !0 || A === "button") && S(N.props.disabled) || A.__ANT_SWITCH === !0 && (S(N.props.disabled) || S(N.props.loading)) || A.__ANT_RADIO === !0 && S(N.props.disabled))) {
        const {
          picked: H,
          omitted: B
        } = iW(v8(N), ["position", "left", "right", "top", "bottom", "float", "display", "zIndex"]), F = O(O({
          display: "inline-block"
        }, H), {
          cursor: "not-allowed",
          lineHeight: 1,
          width: N.props && N.props.block ? "100%" : void 0
        }), R = O(O({}, B), {
          pointerEvents: "none"
        }), X = Xn(N, {
          style: R
        }, !0);
        return h("span", {
          style: F,
          class: `${a.value}-disabled-compatible-wrapper`
        }, [X]);
      }
      return N;
    }, P = () => {
      var N, A;
      return (N = e.title) !== null && N !== void 0 ? N : (A = n.title) === null || A === void 0 ? void 0 : A.call(n);
    }, $ = (N, A) => {
      const H = x.value, B = Object.keys(H).find((F) => {
        var R, X;
        return H[F].points[0] === ((R = A.points) === null || R === void 0 ? void 0 : R[0]) && H[F].points[1] === ((X = A.points) === null || X === void 0 ? void 0 : X[1]);
      });
      if (B) {
        const F = N.getBoundingClientRect(), R = {
          top: "50%",
          left: "50%"
        };
        B.indexOf("top") >= 0 || B.indexOf("Bottom") >= 0 ? R.top = `${F.height - A.offset[1]}px` : (B.indexOf("Top") >= 0 || B.indexOf("bottom") >= 0) && (R.top = `${-A.offset[1]}px`), B.indexOf("left") >= 0 || B.indexOf("Right") >= 0 ? R.left = `${F.width - A.offset[0]}px` : (B.indexOf("right") >= 0 || B.indexOf("Left") >= 0) && (R.left = `${-A.offset[0]}px`), N.style.transformOrigin = `${R.left} ${R.top}`;
      }
    }, I = E(() => nW(a.value, e.color)), w = E(() => r["data-popover-inject"]), [_, M] = rW(a, E(() => !w.value));
    return () => {
      var N, A;
      const {
        openClassName: H,
        overlayClassName: B,
        overlayStyle: F,
        overlayInnerStyle: R
      } = e;
      let X = (A = Do((N = n.default) === null || N === void 0 ? void 0 : N.call(n))) !== null && A !== void 0 ? A : null;
      X = X.length === 1 ? X[0] : X;
      let j = d.value;
      if (c.value === void 0 && v() && (j = !1), !X)
        return null;
      const ee = C(Ao(X) && !m8(X) ? X : h("span", null, [X])), W = Me({
        [H || `${a.value}-open`]: !0,
        [ee.props && ee.props.class]: ee.props && ee.props.class
      }), K = Me(B, {
        [`${a.value}-rtl`]: s.value === "rtl"
      }, I.value.className, M.value), q = O(O({}, I.value.overlayStyle), R), G = I.value.arrowStyle, ae = O(O(O({}, r), e), {
        prefixCls: a.value,
        arrow: !!e.arrow,
        getPopupContainer: l?.value,
        builtinPlacements: x.value,
        visible: j,
        ref: f,
        overlayClassName: K,
        overlayStyle: O(O({}, G), F),
        overlayInnerStyle: q,
        onVisibleChange: g,
        onPopupAlign: $,
        transitionName: Wa(u.value, "zoom-big-fast", e.transitionName)
      });
      return _(h(Xj, ae, {
        default: () => [d.value ? Xn(ee, {
          class: W
        }) : ee],
        arrowContent: () => h("span", {
          class: `${a.value}-arrow-content`
        }, null),
        overlay: P
      }));
    };
  }
}), Lo = ii(lW), sW = (e) => {
  const {
    componentCls: t,
    popoverBg: n,
    popoverColor: o,
    width: r,
    fontWeightStrong: i,
    popoverPadding: a,
    boxShadowSecondary: l,
    colorTextHeading: s,
    borderRadiusLG: u,
    zIndexPopup: c,
    marginXS: d,
    colorBgElevated: f
  } = e;
  return [
    {
      [t]: O(O({}, fn(e)), {
        position: "absolute",
        top: 0,
        // use `left` to fix https://github.com/ant-design/ant-design/issues/39195
        left: {
          _skip_check_: !0,
          value: 0
        },
        zIndex: c,
        fontWeight: "normal",
        whiteSpace: "normal",
        textAlign: "start",
        cursor: "auto",
        userSelect: "text",
        "--antd-arrow-background-color": f,
        "&-rtl": {
          direction: "rtl"
        },
        "&-hidden": {
          display: "none"
        },
        [`${t}-content`]: {
          position: "relative"
        },
        [`${t}-inner`]: {
          backgroundColor: n,
          backgroundClip: "padding-box",
          borderRadius: u,
          boxShadow: l,
          padding: a
        },
        [`${t}-title`]: {
          minWidth: r,
          marginBottom: d,
          color: s,
          fontWeight: i
        },
        [`${t}-inner-content`]: {
          color: o
        }
      })
    },
    // Arrow Style
    j_(e, {
      colorBg: "var(--antd-arrow-background-color)"
    }),
    // Pure Render
    {
      [`${t}-pure`]: {
        position: "relative",
        maxWidth: "none",
        [`${t}-content`]: {
          display: "inline-block"
        }
      }
    }
  ];
}, uW = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: vd.map((n) => {
      const o = e[`${n}-6`];
      return {
        [`&${t}-${n}`]: {
          "--antd-arrow-background-color": o,
          [`${t}-inner`]: {
            backgroundColor: o
          },
          [`${t}-arrow`]: {
            background: "transparent"
          }
        }
      };
    })
  };
}, cW = (e) => {
  const {
    componentCls: t,
    lineWidth: n,
    lineType: o,
    colorSplit: r,
    paddingSM: i,
    controlHeight: a,
    fontSize: l,
    lineHeight: s,
    padding: u
  } = e, c = a - Math.round(l * s), d = c / 2, f = c / 2 - n, p = u;
  return {
    [t]: {
      [`${t}-inner`]: {
        padding: 0
      },
      [`${t}-title`]: {
        margin: 0,
        padding: `${d}px ${p}px ${f}px`,
        borderBottom: `${n}px ${o} ${r}`
      },
      [`${t}-inner-content`]: {
        padding: `${i}px ${p}px`
      }
    }
  };
}, dW = Sn("Popover", (e) => {
  const {
    colorBgElevated: t,
    colorText: n,
    wireframe: o
  } = e, r = Qt(e, {
    popoverBg: t,
    popoverColor: n,
    popoverPadding: 12
    // Fixed Value
  });
  return [sW(r), uW(r), o && cW(r), zd(r, "zoom-big")];
}, (e) => {
  let {
    zIndexPopupBase: t
  } = e;
  return {
    zIndexPopup: t + 30,
    width: 177
  };
}), fW = () => O(O({}, F_()), {
  content: Ir(),
  title: Ir()
}), pW = be({
  compatConfig: {
    MODE: 3
  },
  name: "APopover",
  inheritAttrs: !1,
  props: kn(fW(), O(O({}, aW()), {
    trigger: "hover",
    placement: "top",
    mouseEnterDelay: 0.1,
    mouseLeaveDelay: 0.1
  })),
  setup(e, t) {
    let {
      expose: n,
      slots: o,
      attrs: r
    } = t;
    const i = ce();
    wo(e.visible === void 0, "popover", "`visible` will be removed in next major version, please use `open` instead."), n({
      getPopupDomNode: () => {
        var f, p;
        return (p = (f = i.value) === null || f === void 0 ? void 0 : f.getPopupDomNode) === null || p === void 0 ? void 0 : p.call(f);
      }
    });
    const {
      prefixCls: a,
      configProvider: l
    } = _t("popover", e), [s, u] = dW(a), c = E(() => l.getPrefixCls()), d = () => {
      var f, p;
      const {
        title: v = Do((f = o.title) === null || f === void 0 ? void 0 : f.call(o)),
        content: g = Do((p = o.content) === null || p === void 0 ? void 0 : p.call(o))
      } = e, m = !!(Array.isArray(v) ? v.length : v), x = !!(Array.isArray(g) ? g.length : v);
      return !m && !x ? null : h(Je, null, [m && h("div", {
        class: `${a.value}-title`
      }, [v]), h("div", {
        class: `${a.value}-inner-content`
      }, [g])]);
    };
    return () => {
      const f = Me(e.overlayClassName, u.value);
      return s(h(Lo, Q(Q(Q({}, Fn(e, ["title", "content"])), r), {}, {
        prefixCls: a.value,
        ref: i,
        overlayClassName: f,
        transitionName: Wa(c.value, "zoom-big", e.transitionName),
        "data-popover-inject": !0
      }), {
        title: d,
        default: o.default
      }));
    };
  }
}), hW = ii(pW), tb = (e) => !isNaN(parseFloat(e)) && isFinite(e), au = {
  adjustX: 1,
  adjustY: 1
}, lu = [0, 0], gW = {
  topLeft: {
    points: ["bl", "tl"],
    overflow: au,
    offset: [0, -4],
    targetOffset: lu
  },
  topCenter: {
    points: ["bc", "tc"],
    overflow: au,
    offset: [0, -4],
    targetOffset: lu
  },
  topRight: {
    points: ["br", "tr"],
    overflow: au,
    offset: [0, -4],
    targetOffset: lu
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: au,
    offset: [0, 4],
    targetOffset: lu
  },
  bottomCenter: {
    points: ["tc", "bc"],
    overflow: au,
    offset: [0, 4],
    targetOffset: lu
  },
  bottomRight: {
    points: ["tr", "br"],
    overflow: au,
    offset: [0, 4],
    targetOffset: lu
  }
};
var vW = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const K_ = be({
  compatConfig: {
    MODE: 3
  },
  props: {
    minOverlayWidthMatchTrigger: {
      type: Boolean,
      default: void 0
    },
    arrow: {
      type: Boolean,
      default: !1
    },
    prefixCls: fe.string.def("rc-dropdown"),
    transitionName: String,
    overlayClassName: fe.string.def(""),
    openClassName: String,
    animation: fe.any,
    align: fe.object,
    overlayStyle: {
      type: Object,
      default: void 0
    },
    placement: fe.string.def("bottomLeft"),
    overlay: fe.any,
    trigger: fe.oneOfType([fe.string, fe.arrayOf(fe.string)]).def("hover"),
    alignPoint: {
      type: Boolean,
      default: void 0
    },
    showAction: fe.array,
    hideAction: fe.array,
    getPopupContainer: Function,
    visible: {
      type: Boolean,
      default: void 0
    },
    defaultVisible: {
      type: Boolean,
      default: !1
    },
    mouseEnterDelay: fe.number.def(0.15),
    mouseLeaveDelay: fe.number.def(0.1)
  },
  emits: ["visibleChange", "overlayClick"],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      expose: r
    } = t;
    const i = ce(!!e.visible);
    ke(() => e.visible, (p) => {
      p !== void 0 && (i.value = p);
    });
    const a = ce();
    r({
      triggerRef: a
    });
    const l = (p) => {
      e.visible === void 0 && (i.value = !1), o("overlayClick", p);
    }, s = (p) => {
      e.visible === void 0 && (i.value = p), o("visibleChange", p);
    }, u = () => {
      var p;
      const v = (p = n.overlay) === null || p === void 0 ? void 0 : p.call(n), g = {
        prefixCls: `${e.prefixCls}-menu`,
        onClick: l
      };
      return h(Je, {
        key: Uk
      }, [e.arrow && h("div", {
        class: `${e.prefixCls}-arrow`
      }, null), Xn(v, g, !1)]);
    }, c = E(() => {
      const {
        minOverlayWidthMatchTrigger: p = !e.alignPoint
      } = e;
      return p;
    }), d = () => {
      var p;
      const v = (p = n.default) === null || p === void 0 ? void 0 : p.call(n);
      return i.value && v ? Xn(v[0], {
        class: e.openClassName || `${e.prefixCls}-open`
      }, !1) : v;
    }, f = E(() => !e.hideAction && e.trigger.indexOf("contextmenu") !== -1 ? ["click"] : e.hideAction);
    return () => {
      const {
        prefixCls: p,
        arrow: v,
        showAction: g,
        overlayStyle: m,
        trigger: x,
        placement: S,
        align: C,
        getPopupContainer: P,
        transitionName: $,
        animation: I,
        overlayClassName: w
      } = e, _ = vW(e, ["prefixCls", "arrow", "showAction", "overlayStyle", "trigger", "placement", "align", "getPopupContainer", "transitionName", "animation", "overlayClassName"]);
      return h(Dd, Q(Q({}, _), {}, {
        prefixCls: p,
        ref: a,
        popupClassName: Me(w, {
          [`${p}-show-arrow`]: v
        }),
        popupStyle: m,
        builtinPlacements: gW,
        action: x,
        showAction: g,
        hideAction: f.value || [],
        popupPlacement: S,
        popupAlign: C,
        popupTransitionName: $,
        popupAnimation: I,
        popupVisible: i.value,
        stretch: c.value ? "minWidth" : "",
        onPopupVisibleChange: s,
        getPopupContainer: P
      }), {
        popup: u,
        default: d
      });
    };
  }
}), mW = (e) => {
  const {
    componentCls: t,
    colorPrimary: n
  } = e;
  return {
    [t]: {
      position: "absolute",
      background: "transparent",
      pointerEvents: "none",
      boxSizing: "border-box",
      color: `var(--wave-color, ${n})`,
      boxShadow: "0 0 0 0 currentcolor",
      opacity: 0.2,
      // =================== Motion ===================
      "&.wave-motion-appear": {
        transition: [`box-shadow 0.4s ${e.motionEaseOutCirc}`, `opacity 2s ${e.motionEaseOutCirc}`].join(","),
        "&-active": {
          boxShadow: "0 0 0 6px currentcolor",
          opacity: 0
        }
      }
    }
  };
}, bW = Sn("Wave", (e) => [mW(e)]);
function yW(e) {
  const t = (e || "").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);
  return t && t[1] && t[2] && t[3] ? !(t[1] === t[2] && t[2] === t[3]) : !0;
}
function sv(e) {
  return e && e !== "#fff" && e !== "#ffffff" && e !== "rgb(255, 255, 255)" && e !== "rgba(255, 255, 255, 1)" && yW(e) && !/rgba\((?:\d*, ){3}0\)/.test(e) && // any transparent rgba color
  e !== "transparent";
}
function xW(e) {
  const {
    borderTopColor: t,
    borderColor: n,
    backgroundColor: o
  } = getComputedStyle(e);
  return sv(t) ? t : sv(n) ? n : sv(o) ? o : null;
}
function uv(e) {
  return Number.isNaN(e) ? 0 : e;
}
const wW = be({
  props: {
    target: Et(),
    className: String
  },
  setup(e) {
    const t = $e(null), [n, o] = $n(null), [r, i] = $n([]), [a, l] = $n(0), [s, u] = $n(0), [c, d] = $n(0), [f, p] = $n(0), [v, g] = $n(!1);
    function m() {
      const {
        target: w
      } = e, _ = getComputedStyle(w);
      o(xW(w));
      const M = _.position === "static", {
        borderLeftWidth: N,
        borderTopWidth: A
      } = _;
      l(M ? w.offsetLeft : uv(-parseFloat(N))), u(M ? w.offsetTop : uv(-parseFloat(A))), d(w.offsetWidth), p(w.offsetHeight);
      const {
        borderTopLeftRadius: H,
        borderTopRightRadius: B,
        borderBottomLeftRadius: F,
        borderBottomRightRadius: R
      } = _;
      i([H, B, R, F].map((X) => uv(parseFloat(X))));
    }
    let x, S, C;
    const P = () => {
      clearTimeout(C), Vt.cancel(S), x?.disconnect();
    }, $ = () => {
      var w;
      const _ = (w = t.value) === null || w === void 0 ? void 0 : w.parentElement;
      _ && (El(null, _), _.parentElement && _.parentElement.removeChild(_));
    };
    Nt(() => {
      P(), C = setTimeout(() => {
        $();
      }, 5e3);
      const {
        target: w
      } = e;
      w && (S = Vt(() => {
        m(), g(!0);
      }), typeof ResizeObserver < "u" && (x = new ResizeObserver(m), x.observe(w)));
    }), qt(() => {
      P();
    });
    const I = (w) => {
      w.propertyName === "opacity" && $();
    };
    return () => {
      if (!v.value)
        return null;
      const w = {
        left: `${a.value}px`,
        top: `${s.value}px`,
        width: `${c.value}px`,
        height: `${f.value}px`,
        borderRadius: r.value.map((_) => `${_}px`).join(" ")
      };
      return n && (w["--wave-color"] = n.value), h(Er, {
        appear: !0,
        name: "wave-motion",
        appearFromClass: "wave-motion-appear",
        appearActiveClass: "wave-motion-appear",
        appearToClass: "wave-motion-appear wave-motion-appear-active"
      }, {
        default: () => [h("div", {
          ref: t,
          class: e.className,
          style: w,
          onTransitionend: I
        }, null)]
      });
    };
  }
});
function SW(e, t) {
  const n = document.createElement("div");
  return n.style.position = "absolute", n.style.left = "0px", n.style.top = "0px", e?.insertBefore(n, e?.firstChild), El(h(wW, {
    target: e,
    className: t
  }, null), n), () => {
    El(null, n), n.parentElement && n.parentElement.removeChild(n);
  };
}
function CW(e, t) {
  const n = fr();
  let o;
  function r() {
    var i;
    const a = Ui(n);
    o?.(), !(!((i = t?.value) === null || i === void 0) && i.disabled || !a) && (o = SW(a, e.value));
  }
  return qt(() => {
    o?.();
  }), r;
}
const A0 = be({
  compatConfig: {
    MODE: 3
  },
  name: "Wave",
  props: {
    disabled: Boolean
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = fr(), {
      prefixCls: r,
      wave: i
    } = _t("wave", e), [, a] = bW(r), l = CW(E(() => Me(r.value, a.value)), i);
    let s;
    const u = () => {
      Ui(o).removeEventListener("click", s, !0);
    };
    return Nt(() => {
      ke(() => e.disabled, () => {
        u(), Yt(() => {
          const c = Ui(o);
          c?.removeEventListener("click", s, !0), !(!c || c.nodeType !== 1 || e.disabled) && (s = (d) => {
            d.target.tagName === "INPUT" || !Nh(d.target) || // No need wave
            !c.getAttribute || c.getAttribute("disabled") || c.disabled || c.className.includes("disabled") || c.className.includes("-leave") || l();
          }, c.addEventListener("click", s, !0));
        });
      }, {
        immediate: !0,
        flush: "post"
      });
    }), qt(() => {
      u();
    }), () => {
      var c;
      return (c = n.default) === null || c === void 0 ? void 0 : c.call(n)[0];
    };
  }
});
function q_(e) {
  return e === "danger" ? {
    danger: !0
  } : {
    type: e
  };
}
const Y_ = () => ({
  prefixCls: String,
  type: String,
  htmlType: {
    type: String,
    default: "button"
  },
  shape: {
    type: String
  },
  size: {
    type: String
  },
  loading: {
    type: [Boolean, Object],
    default: () => !1
  },
  disabled: {
    type: Boolean,
    default: void 0
  },
  ghost: {
    type: Boolean,
    default: void 0
  },
  block: {
    type: Boolean,
    default: void 0
  },
  danger: {
    type: Boolean,
    default: void 0
  },
  icon: fe.any,
  href: String,
  target: String,
  title: String,
  onClick: Wu(),
  onMousedown: Wu()
}), AS = (e) => {
  e && (e.style.width = "0px", e.style.opacity = "0", e.style.transform = "scale(0)");
}, NS = (e) => {
  Yt(() => {
    e && (e.style.width = `${e.scrollWidth}px`, e.style.opacity = "1", e.style.transform = "scale(1)");
  });
}, RS = (e) => {
  e && e.style && (e.style.width = null, e.style.opacity = null, e.style.transform = null);
}, $W = be({
  compatConfig: {
    MODE: 3
  },
  name: "LoadingIcon",
  props: {
    prefixCls: String,
    loading: [Boolean, Object],
    existIcon: Boolean
  },
  setup(e) {
    return () => {
      const {
        existIcon: t,
        prefixCls: n,
        loading: o
      } = e;
      if (t)
        return h("span", {
          class: `${n}-loading-icon`
        }, [h(Ti, null, null)]);
      const r = !!o;
      return h(Er, {
        name: `${n}-loading-icon-motion`,
        onBeforeEnter: AS,
        onEnter: NS,
        onAfterEnter: RS,
        onBeforeLeave: NS,
        onLeave: (i) => {
          setTimeout(() => {
            AS(i);
          });
        },
        onAfterLeave: RS
      }, {
        default: () => [r ? h("span", {
          class: `${n}-loading-icon`
        }, [h(Ti, null, null)]) : null]
      });
    };
  }
}), zS = (e, t) => ({
  // Border
  [`> span, > ${e}`]: {
    "&:not(:last-child)": {
      [`&, & > ${e}`]: {
        "&:not(:disabled)": {
          borderInlineEndColor: t
        }
      }
    },
    "&:not(:first-child)": {
      [`&, & > ${e}`]: {
        "&:not(:disabled)": {
          borderInlineStartColor: t
        }
      }
    }
  }
}), PW = (e) => {
  const {
    componentCls: t,
    fontSize: n,
    lineWidth: o,
    colorPrimaryHover: r,
    colorErrorHover: i
  } = e;
  return {
    [`${t}-group`]: [
      {
        position: "relative",
        display: "inline-flex",
        // Border
        [`> span, > ${t}`]: {
          "&:not(:last-child)": {
            [`&, & > ${t}`]: {
              borderStartEndRadius: 0,
              borderEndEndRadius: 0
            }
          },
          "&:not(:first-child)": {
            marginInlineStart: -o,
            [`&, & > ${t}`]: {
              borderStartStartRadius: 0,
              borderEndStartRadius: 0
            }
          }
        },
        [t]: {
          position: "relative",
          zIndex: 1,
          "&:hover,\n          &:focus,\n          &:active": {
            zIndex: 2
          },
          "&[disabled]": {
            zIndex: 0
          }
        },
        [`${t}-icon-only`]: {
          fontSize: n
        }
      },
      // Border Color
      zS(`${t}-primary`, r),
      zS(`${t}-danger`, i)
    ]
  };
};
function OW(e, t) {
  return {
    // border collapse
    [`&-item:not(${t}-last-item)`]: {
      marginBottom: -e.lineWidth
    },
    "&-item": {
      "&:hover,&:focus,&:active": {
        zIndex: 2
      },
      "&[disabled]": {
        zIndex: 0
      }
    }
  };
}
function kW(e, t) {
  return {
    [`&-item:not(${t}-first-item):not(${t}-last-item)`]: {
      borderRadius: 0
    },
    [`&-item${t}-first-item:not(${t}-last-item)`]: {
      [`&, &${e}-sm, &${e}-lg`]: {
        borderEndEndRadius: 0,
        borderEndStartRadius: 0
      }
    },
    [`&-item${t}-last-item:not(${t}-first-item)`]: {
      [`&, &${e}-sm, &${e}-lg`]: {
        borderStartStartRadius: 0,
        borderStartEndRadius: 0
      }
    }
  };
}
function IW(e) {
  const t = `${e.componentCls}-compact-vertical`;
  return {
    [t]: O(O({}, OW(e, t)), kW(e.componentCls, t))
  };
}
const _W = (e) => {
  const {
    componentCls: t,
    iconCls: n
  } = e;
  return {
    [t]: {
      outline: "none",
      position: "relative",
      display: "inline-block",
      fontWeight: 400,
      whiteSpace: "nowrap",
      textAlign: "center",
      backgroundImage: "none",
      backgroundColor: "transparent",
      border: `${e.lineWidth}px ${e.lineType} transparent`,
      cursor: "pointer",
      transition: `all ${e.motionDurationMid} ${e.motionEaseInOut}`,
      userSelect: "none",
      touchAction: "manipulation",
      lineHeight: e.lineHeight,
      color: e.colorText,
      "> span": {
        display: "inline-block"
      },
      // Leave a space between icon and text.
      [`> ${n} + span, > span + ${n}`]: {
        marginInlineStart: e.marginXS
      },
      "> a": {
        color: "currentColor"
      },
      "&:not(:disabled)": O({}, Nl(e)),
      // make `btn-icon-only` not too narrow
      [`&-icon-only${t}-compact-item`]: {
        flex: "none"
      },
      // Special styles for Primary Button
      [`&-compact-item${t}-primary`]: {
        [`&:not([disabled]) + ${t}-compact-item${t}-primary:not([disabled])`]: {
          position: "relative",
          "&:before": {
            position: "absolute",
            top: -e.lineWidth,
            insetInlineStart: -e.lineWidth,
            display: "inline-block",
            width: e.lineWidth,
            height: `calc(100% + ${e.lineWidth * 2}px)`,
            backgroundColor: e.colorPrimaryHover,
            content: '""'
          }
        }
      },
      // Special styles for Primary Button
      "&-compact-vertical-item": {
        [`&${t}-primary`]: {
          [`&:not([disabled]) + ${t}-compact-vertical-item${t}-primary:not([disabled])`]: {
            position: "relative",
            "&:before": {
              position: "absolute",
              top: -e.lineWidth,
              insetInlineStart: -e.lineWidth,
              display: "inline-block",
              width: `calc(100% + ${e.lineWidth * 2}px)`,
              height: e.lineWidth,
              backgroundColor: e.colorPrimaryHover,
              content: '""'
            }
          }
        }
      }
    }
  };
}, Ka = (e, t) => ({
  "&:not(:disabled)": {
    "&:hover": e,
    "&:active": t
  }
}), TW = (e) => ({
  minWidth: e.controlHeight,
  paddingInlineStart: 0,
  paddingInlineEnd: 0,
  borderRadius: "50%"
}), MW = (e) => ({
  borderRadius: e.controlHeight,
  paddingInlineStart: e.controlHeight / 2,
  paddingInlineEnd: e.controlHeight / 2
}), nb = (e) => ({
  cursor: "not-allowed",
  borderColor: e.colorBorder,
  color: e.colorTextDisabled,
  backgroundColor: e.colorBgContainerDisabled,
  boxShadow: "none"
}), Hp = (e, t, n, o, r, i, a) => ({
  [`&${e}-background-ghost`]: O(O({
    color: t || void 0,
    backgroundColor: "transparent",
    borderColor: n || void 0,
    boxShadow: "none"
  }, Ka(O({
    backgroundColor: "transparent"
  }, i), O({
    backgroundColor: "transparent"
  }, a))), {
    "&:disabled": {
      cursor: "not-allowed",
      color: o || void 0,
      borderColor: r || void 0
    }
  })
}), N0 = (e) => ({
  "&:disabled": O({}, nb(e))
}), G_ = (e) => O({}, N0(e)), Vp = (e) => ({
  "&:disabled": {
    cursor: "not-allowed",
    color: e.colorTextDisabled
  }
}), U_ = (e) => O(O(O(O(O({}, G_(e)), {
  backgroundColor: e.colorBgContainer,
  borderColor: e.colorBorder,
  boxShadow: `0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`
}), Ka({
  color: e.colorPrimaryHover,
  borderColor: e.colorPrimaryHover
}, {
  color: e.colorPrimaryActive,
  borderColor: e.colorPrimaryActive
})), Hp(e.componentCls, e.colorBgContainer, e.colorBgContainer, e.colorTextDisabled, e.colorBorder)), {
  [`&${e.componentCls}-dangerous`]: O(O(O({
    color: e.colorError,
    borderColor: e.colorError
  }, Ka({
    color: e.colorErrorHover,
    borderColor: e.colorErrorBorderHover
  }, {
    color: e.colorErrorActive,
    borderColor: e.colorErrorActive
  })), Hp(e.componentCls, e.colorError, e.colorError, e.colorTextDisabled, e.colorBorder)), N0(e))
}), EW = (e) => O(O(O(O(O({}, G_(e)), {
  color: e.colorTextLightSolid,
  backgroundColor: e.colorPrimary,
  boxShadow: `0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`
}), Ka({
  color: e.colorTextLightSolid,
  backgroundColor: e.colorPrimaryHover
}, {
  color: e.colorTextLightSolid,
  backgroundColor: e.colorPrimaryActive
})), Hp(e.componentCls, e.colorPrimary, e.colorPrimary, e.colorTextDisabled, e.colorBorder, {
  color: e.colorPrimaryHover,
  borderColor: e.colorPrimaryHover
}, {
  color: e.colorPrimaryActive,
  borderColor: e.colorPrimaryActive
})), {
  [`&${e.componentCls}-dangerous`]: O(O(O({
    backgroundColor: e.colorError,
    boxShadow: `0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`
  }, Ka({
    backgroundColor: e.colorErrorHover
  }, {
    backgroundColor: e.colorErrorActive
  })), Hp(e.componentCls, e.colorError, e.colorError, e.colorTextDisabled, e.colorBorder, {
    color: e.colorErrorHover,
    borderColor: e.colorErrorHover
  }, {
    color: e.colorErrorActive,
    borderColor: e.colorErrorActive
  })), N0(e))
}), DW = (e) => O(O({}, U_(e)), {
  borderStyle: "dashed"
}), AW = (e) => O(O(O({
  color: e.colorLink
}, Ka({
  color: e.colorLinkHover
}, {
  color: e.colorLinkActive
})), Vp(e)), {
  [`&${e.componentCls}-dangerous`]: O(O({
    color: e.colorError
  }, Ka({
    color: e.colorErrorHover
  }, {
    color: e.colorErrorActive
  })), Vp(e))
}), NW = (e) => O(O(O({}, Ka({
  color: e.colorText,
  backgroundColor: e.colorBgTextHover
}, {
  color: e.colorText,
  backgroundColor: e.colorBgTextActive
})), Vp(e)), {
  [`&${e.componentCls}-dangerous`]: O(O({
    color: e.colorError
  }, Vp(e)), Ka({
    color: e.colorErrorHover,
    backgroundColor: e.colorErrorBg
  }, {
    color: e.colorErrorHover,
    backgroundColor: e.colorErrorBg
  }))
}), RW = (e) => O(O({}, nb(e)), {
  [`&${e.componentCls}:hover`]: O({}, nb(e))
}), zW = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-default`]: U_(e),
    [`${t}-primary`]: EW(e),
    [`${t}-dashed`]: DW(e),
    [`${t}-link`]: AW(e),
    [`${t}-text`]: NW(e),
    [`${t}-disabled`]: RW(e)
  };
}, R0 = function(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
  const {
    componentCls: n,
    iconCls: o,
    controlHeight: r,
    fontSize: i,
    lineHeight: a,
    lineWidth: l,
    borderRadius: s,
    buttonPaddingHorizontal: u
  } = e, c = Math.max(0, (r - i * a) / 2 - l), d = u - l, f = `${n}-icon-only`;
  return [
    // Size
    {
      [`${n}${t}`]: {
        fontSize: i,
        height: r,
        padding: `${c}px ${d}px`,
        borderRadius: s,
        [`&${f}`]: {
          width: r,
          paddingInlineStart: 0,
          paddingInlineEnd: 0,
          [`&${n}-round`]: {
            width: "auto"
          },
          "> span": {
            transform: "scale(1.143)"
            // 14px -> 16px
          }
        },
        // Loading
        [`&${n}-loading`]: {
          opacity: e.opacityLoading,
          cursor: "default"
        },
        [`${n}-loading-icon`]: {
          transition: `width ${e.motionDurationSlow} ${e.motionEaseInOut}, opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`
        },
        [`&:not(${f}) ${n}-loading-icon > ${o}`]: {
          marginInlineEnd: e.marginXS
        }
      }
    },
    // Shape - patch prefixCls again to override solid border radius style
    {
      [`${n}${n}-circle${t}`]: TW(e)
    },
    {
      [`${n}${n}-round${t}`]: MW(e)
    }
  ];
}, FW = (e) => R0(e), BW = (e) => {
  const t = Qt(e, {
    controlHeight: e.controlHeightSM,
    padding: e.paddingXS,
    buttonPaddingHorizontal: 8,
    borderRadius: e.borderRadiusSM
  });
  return R0(t, `${e.componentCls}-sm`);
}, LW = (e) => {
  const t = Qt(e, {
    controlHeight: e.controlHeightLG,
    fontSize: e.fontSizeLG,
    borderRadius: e.borderRadiusLG
  });
  return R0(t, `${e.componentCls}-lg`);
}, HW = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: {
      [`&${t}-block`]: {
        width: "100%"
      }
    }
  };
}, VW = Sn("Button", (e) => {
  const {
    controlTmpOutline: t,
    paddingContentHorizontal: n
  } = e, o = Qt(e, {
    colorOutlineDefault: t,
    buttonPaddingHorizontal: n
  });
  return [
    // Shared
    _W(o),
    // Size
    BW(o),
    FW(o),
    LW(o),
    // Block
    HW(o),
    // Group (type, ghost, danger, disabled, loading)
    zW(o),
    // Button Group
    PW(o),
    // Space Compact
    Fd(e, {
      focus: !1
    }),
    IW(e)
  ];
}), jW = () => ({
  prefixCls: String,
  size: {
    type: String
  }
}), X_ = k0(), ob = be({
  compatConfig: {
    MODE: 3
  },
  name: "AButtonGroup",
  props: jW(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o,
      direction: r
    } = _t("btn-group", e), [, , i] = dc();
    X_.useProvide(Pn({
      size: E(() => e.size)
    }));
    const a = E(() => {
      const {
        size: l
      } = e;
      let s = "";
      switch (l) {
        case "large":
          s = "lg";
          break;
        case "small":
          s = "sm";
          break;
        case "middle":
        case void 0:
          break;
        default:
          dn(!l, "Button.Group", "Invalid prop `size`.");
      }
      return {
        [`${o.value}`]: !0,
        [`${o.value}-${s}`]: s,
        [`${o.value}-rtl`]: r.value === "rtl",
        [i.value]: !0
      };
    });
    return () => {
      var l;
      return h("div", {
        class: a.value
      }, [go((l = n.default) === null || l === void 0 ? void 0 : l.call(n))]);
    };
  }
}), FS = /^[\u4e00-\u9fa5]{2}$/, BS = FS.test.bind(FS);
function Of(e) {
  return e === "text" || e === "link";
}
const Lt = be({
  compatConfig: {
    MODE: 3
  },
  name: "AButton",
  inheritAttrs: !1,
  __ANT_BUTTON: !0,
  props: kn(Y_(), {
    type: "default"
  }),
  slots: Object,
  // emits: ['click', 'mousedown'],
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      emit: r,
      expose: i
    } = t;
    const {
      prefixCls: a,
      autoInsertSpaceInButton: l,
      direction: s,
      size: u
    } = _t("btn", e), [c, d] = VW(a), f = X_.useInject(), p = _i(), v = E(() => {
      var R;
      return (R = e.disabled) !== null && R !== void 0 ? R : p.value;
    }), g = $e(null), m = $e(void 0);
    let x = !1;
    const S = $e(!1), C = $e(!1), P = E(() => l.value !== !1), {
      compactSize: $,
      compactItemClassnames: I
    } = fc(a, s), w = E(() => typeof e.loading == "object" && e.loading.delay ? e.loading.delay || !0 : !!e.loading);
    ke(w, (R) => {
      clearTimeout(m.value), typeof w.value == "number" ? m.value = setTimeout(() => {
        S.value = R;
      }, w.value) : S.value = R;
    }, {
      immediate: !0
    });
    const _ = E(() => {
      const {
        type: R,
        shape: X = "default",
        ghost: j,
        block: ee,
        danger: W
      } = e, K = a.value, q = {
        large: "lg",
        small: "sm",
        middle: void 0
      }, G = $.value || f?.size || u.value, ae = G && q[G] || "";
      return [I.value, {
        [d.value]: !0,
        [`${K}`]: !0,
        [`${K}-${X}`]: X !== "default" && X,
        [`${K}-${R}`]: R,
        [`${K}-${ae}`]: ae,
        [`${K}-loading`]: S.value,
        [`${K}-background-ghost`]: j && !Of(R),
        [`${K}-two-chinese-chars`]: C.value && P.value,
        [`${K}-block`]: ee,
        [`${K}-dangerous`]: !!W,
        [`${K}-rtl`]: s.value === "rtl"
      }];
    }), M = () => {
      const R = g.value;
      if (!R || l.value === !1)
        return;
      const X = R.textContent;
      x && BS(X) ? C.value || (C.value = !0) : C.value && (C.value = !1);
    }, N = (R) => {
      if (S.value || v.value) {
        R.preventDefault();
        return;
      }
      r("click", R);
    }, A = (R) => {
      r("mousedown", R);
    }, H = (R, X) => {
      const j = X ? " " : "";
      if (R.type === ry) {
        let ee = R.children.trim();
        return BS(ee) && (ee = ee.split("").join(j)), h("span", null, [ee]);
      }
      return R;
    };
    return It(() => {
      dn(!(e.ghost && Of(e.type)), "Button", "`link` or `text` button can't be a `ghost` button.");
    }), Nt(M), Ya(M), qt(() => {
      m.value && clearTimeout(m.value);
    }), i({
      focus: () => {
        var R;
        (R = g.value) === null || R === void 0 || R.focus();
      },
      blur: () => {
        var R;
        (R = g.value) === null || R === void 0 || R.blur();
      }
    }), () => {
      var R, X;
      const {
        icon: j = (R = n.icon) === null || R === void 0 ? void 0 : R.call(n)
      } = e, ee = go((X = n.default) === null || X === void 0 ? void 0 : X.call(n));
      x = ee.length === 1 && !j && !Of(e.type);
      const {
        type: W,
        htmlType: K,
        href: q,
        title: G,
        target: ae
      } = e, le = S.value ? "loading" : j, ie = O(O({}, o), {
        title: G,
        disabled: v.value,
        class: [_.value, o.class, {
          [`${a.value}-icon-only`]: ee.length === 0 && !!le
        }],
        onClick: N,
        onMousedown: A
      });
      v.value || delete ie.disabled;
      const re = j && !S.value ? j : h($W, {
        existIcon: !!j,
        prefixCls: a.value,
        loading: !!S.value
      }, null), te = ee.map((ue) => H(ue, x && P.value));
      if (q !== void 0)
        return c(h("a", Q(Q({}, ie), {}, {
          href: q,
          target: ae,
          ref: g
        }), [re, te]));
      let ve = h("button", Q(Q({}, ie), {}, {
        ref: g,
        type: K
      }), [re, te]);
      if (!Of(W)) {
        const ue = /* @__PURE__ */ (function() {
          return ve;
        })();
        ve = h(A0, {
          ref: "wave",
          disabled: !!S.value
        }, {
          default: () => [ue]
        });
      }
      return c(ve);
    };
  }
});
Lt.Group = ob;
Lt.install = function(e) {
  return e.component(Lt.name, Lt), e.component(ob.name, ob), e;
};
const Q_ = () => ({
  arrow: en([Boolean, Object]),
  trigger: {
    type: [Array, String]
  },
  menu: Et(),
  overlay: fe.any,
  /** @deprecated Please use `open` instead */
  visible: ct(),
  open: ct(),
  disabled: ct(),
  danger: ct(),
  autofocus: ct(),
  align: Et(),
  getPopupContainer: Function,
  prefixCls: String,
  transitionName: String,
  placement: String,
  overlayClassName: String,
  overlayStyle: Et(),
  forceRender: ct(),
  mouseEnterDelay: Number,
  mouseLeaveDelay: Number,
  openClassName: String,
  minOverlayWidthMatchTrigger: ct(),
  destroyPopupOnHide: ct(),
  /** @deprecated Please use `onOpenChange` instead */
  onVisibleChange: {
    type: Function
  },
  /** @deprecated Please use `onUpdate:open` instead */
  "onUpdate:visible": {
    type: Function
  },
  onOpenChange: {
    type: Function
  },
  "onUpdate:open": {
    type: Function
  }
}), cv = Y_(), WW = () => O(O({}, Q_()), {
  type: cv.type,
  size: String,
  htmlType: cv.htmlType,
  href: String,
  disabled: ct(),
  prefixCls: String,
  icon: fe.any,
  title: String,
  loading: cv.loading,
  onClick: Wu()
});
var KW = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, name: "ellipsis", theme: "outlined" };
function LS(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      qW(e, r, n[r]);
    });
  }
  return e;
}
function qW(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Bd = function(t, n) {
  var o = LS({}, t, n.attrs);
  return h(on, LS({}, o, {
    icon: KW
  }), null);
};
Bd.displayName = "EllipsisOutlined";
Bd.inheritAttrs = !1;
const YW = (e) => {
  const {
    componentCls: t,
    antCls: n,
    paddingXS: o,
    opacityLoading: r
  } = e;
  return {
    [`${t}-button`]: {
      whiteSpace: "nowrap",
      [`&${n}-btn-group > ${n}-btn`]: {
        [`&-loading, &-loading + ${n}-btn`]: {
          cursor: "default",
          pointerEvents: "none",
          opacity: r
        },
        [`&:last-child:not(:first-child):not(${n}-btn-icon-only)`]: {
          paddingInline: o
        }
      }
    }
  };
}, GW = (e) => {
  const {
    componentCls: t,
    menuCls: n,
    colorError: o,
    colorTextLightSolid: r
  } = e, i = `${n}-item`;
  return {
    [`${t}, ${t}-menu-submenu`]: {
      [`${n} ${i}`]: {
        [`&${i}-danger:not(${i}-disabled)`]: {
          color: o,
          "&:hover": {
            color: r,
            backgroundColor: o
          }
        }
      }
    }
  };
}, UW = (e) => {
  const {
    componentCls: t,
    menuCls: n,
    zIndexPopup: o,
    dropdownArrowDistance: r,
    dropdownArrowOffset: i,
    sizePopupArrow: a,
    antCls: l,
    iconCls: s,
    motionDurationMid: u,
    dropdownPaddingVertical: c,
    fontSize: d,
    dropdownEdgeChildPadding: f,
    colorTextDisabled: p,
    fontSizeIcon: v,
    controlPaddingHorizontal: g,
    colorBgElevated: m,
    boxShadowPopoverArrow: x
  } = e;
  return [
    {
      [t]: O(O({}, fn(e)), {
        position: "absolute",
        top: -9999,
        left: {
          _skip_check_: !0,
          value: -9999
        },
        zIndex: o,
        display: "block",
        // A placeholder out of dropdown visible range to avoid close when user moving
        "&::before": {
          position: "absolute",
          insetBlock: -r + a / 2,
          // insetInlineStart: -7, // FIXME: Seems not work for hidden element
          zIndex: -9999,
          opacity: 1e-4,
          content: '""'
        },
        [`${t}-wrap`]: {
          position: "relative",
          [`${l}-btn > ${s}-down`]: {
            fontSize: v
          },
          [`${s}-down::before`]: {
            transition: `transform ${u}`
          }
        },
        [`${t}-wrap-open`]: {
          [`${s}-down::before`]: {
            transform: "rotate(180deg)"
          }
        },
        "\n        &-hidden,\n        &-menu-hidden,\n        &-menu-submenu-hidden\n      ": {
          display: "none"
        },
        // =============================================================
        // ==                          Arrow                          ==
        // =============================================================
        // Offset the popover to account for the dropdown arrow
        [`
        &-show-arrow${t}-placement-topLeft,
        &-show-arrow${t}-placement-top,
        &-show-arrow${t}-placement-topRight
      `]: {
          paddingBottom: r
        },
        [`
        &-show-arrow${t}-placement-bottomLeft,
        &-show-arrow${t}-placement-bottom,
        &-show-arrow${t}-placement-bottomRight
      `]: {
          paddingTop: r
        },
        // Note: .popover-arrow is outer, .popover-arrow:after is inner
        [`${t}-arrow`]: O({
          position: "absolute",
          zIndex: 1,
          display: "block"
        }, e0(a, e.borderRadiusXS, e.borderRadiusOuter, m, x)),
        [`
        &-placement-top > ${t}-arrow,
        &-placement-topLeft > ${t}-arrow,
        &-placement-topRight > ${t}-arrow
      `]: {
          bottom: r,
          transform: "translateY(100%) rotate(180deg)"
        },
        [`&-placement-top > ${t}-arrow`]: {
          left: {
            _skip_check_: !0,
            value: "50%"
          },
          transform: "translateX(-50%) translateY(100%) rotate(180deg)"
        },
        [`&-placement-topLeft > ${t}-arrow`]: {
          left: {
            _skip_check_: !0,
            value: i
          }
        },
        [`&-placement-topRight > ${t}-arrow`]: {
          right: {
            _skip_check_: !0,
            value: i
          }
        },
        [`
          &-placement-bottom > ${t}-arrow,
          &-placement-bottomLeft > ${t}-arrow,
          &-placement-bottomRight > ${t}-arrow
        `]: {
          top: r,
          transform: "translateY(-100%)"
        },
        [`&-placement-bottom > ${t}-arrow`]: {
          left: {
            _skip_check_: !0,
            value: "50%"
          },
          transform: "translateY(-100%) translateX(-50%)"
        },
        [`&-placement-bottomLeft > ${t}-arrow`]: {
          left: {
            _skip_check_: !0,
            value: i
          }
        },
        [`&-placement-bottomRight > ${t}-arrow`]: {
          right: {
            _skip_check_: !0,
            value: i
          }
        },
        // =============================================================
        // ==                         Motion                          ==
        // =============================================================
        // When position is not enough for dropdown, the placement will revert.
        // We will handle this with revert motion name.
        [`&${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottomLeft,
          &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottomLeft,
          &${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottom,
          &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottom,
          &${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottomRight,
          &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottomRight`]: {
          animationName: Bh
        },
        [`&${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-topLeft,
          &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-topLeft,
          &${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-top,
          &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-top,
          &${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-topRight,
          &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-topRight`]: {
          animationName: Hh
        },
        [`&${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottomLeft,
          &${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottom,
          &${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottomRight`]: {
          animationName: Lh
        },
        [`&${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-topLeft,
          &${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-top,
          &${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-topRight`]: {
          animationName: Vh
        }
      })
    },
    {
      // =============================================================
      // ==                          Menu                           ==
      // =============================================================
      [`${t} ${n}`]: {
        position: "relative",
        margin: 0
      },
      [`${n}-submenu-popup`]: {
        position: "absolute",
        zIndex: o,
        background: "transparent",
        boxShadow: "none",
        transformOrigin: "0 0",
        "ul,li": {
          listStyle: "none"
        },
        ul: {
          marginInline: "0.3em"
        }
      },
      [`${t}, ${t}-menu-submenu`]: {
        [n]: O(O({
          padding: f,
          listStyleType: "none",
          backgroundColor: m,
          backgroundClip: "padding-box",
          borderRadius: e.borderRadiusLG,
          outline: "none",
          boxShadow: e.boxShadowSecondary
        }, Nl(e)), {
          [`${n}-item-group-title`]: {
            padding: `${c}px ${g}px`,
            color: e.colorTextDescription,
            transition: `all ${u}`
          },
          // ======================= Item Content =======================
          [`${n}-item`]: {
            position: "relative",
            display: "flex",
            alignItems: "center",
            borderRadius: e.borderRadiusSM
          },
          [`${n}-item-icon`]: {
            minWidth: d,
            marginInlineEnd: e.marginXS,
            fontSize: e.fontSizeSM
          },
          [`${n}-title-content`]: {
            flex: "auto",
            "> a": {
              color: "inherit",
              transition: `all ${u}`,
              "&:hover": {
                color: "inherit"
              },
              "&::after": {
                position: "absolute",
                inset: 0,
                content: '""'
              }
            }
          },
          // =========================== Item ===========================
          [`${n}-item, ${n}-submenu-title`]: O(O({
            clear: "both",
            margin: 0,
            padding: `${c}px ${g}px`,
            color: e.colorText,
            fontWeight: "normal",
            fontSize: d,
            lineHeight: e.lineHeight,
            cursor: "pointer",
            transition: `all ${u}`,
            "&:hover, &-active": {
              backgroundColor: e.controlItemBgHover
            }
          }, Nl(e)), {
            "&-selected": {
              color: e.colorPrimary,
              backgroundColor: e.controlItemBgActive,
              "&:hover, &-active": {
                backgroundColor: e.controlItemBgActiveHover
              }
            },
            "&-disabled": {
              color: p,
              cursor: "not-allowed",
              "&:hover": {
                color: p,
                backgroundColor: m,
                cursor: "not-allowed"
              },
              a: {
                pointerEvents: "none"
              }
            },
            "&-divider": {
              height: 1,
              margin: `${e.marginXXS}px 0`,
              overflow: "hidden",
              lineHeight: 0,
              backgroundColor: e.colorSplit
            },
            [`${t}-menu-submenu-expand-icon`]: {
              position: "absolute",
              insetInlineEnd: e.paddingXS,
              [`${t}-menu-submenu-arrow-icon`]: {
                marginInlineEnd: "0 !important",
                color: e.colorTextDescription,
                fontSize: v,
                fontStyle: "normal"
              }
            }
          }),
          [`${n}-item-group-list`]: {
            margin: `0 ${e.marginXS}px`,
            padding: 0,
            listStyle: "none"
          },
          [`${n}-submenu-title`]: {
            paddingInlineEnd: g + e.fontSizeSM
          },
          [`${n}-submenu-vertical`]: {
            position: "relative"
          },
          [`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]: {
            [`&, ${t}-menu-submenu-arrow-icon`]: {
              color: p,
              backgroundColor: m,
              cursor: "not-allowed"
            }
          },
          // https://github.com/ant-design/ant-design/issues/19264
          [`${n}-submenu-selected ${t}-menu-submenu-title`]: {
            color: e.colorPrimary
          }
        })
      }
    },
    // Follow code may reuse in other components
    [ea(e, "slide-up"), ea(e, "slide-down"), Xu(e, "move-up"), Xu(e, "move-down"), zd(e, "zoom-big")]
  ];
}, Z_ = Sn("Dropdown", (e, t) => {
  let {
    rootPrefixCls: n
  } = t;
  const {
    marginXXS: o,
    sizePopupArrow: r,
    controlHeight: i,
    fontSize: a,
    lineHeight: l,
    paddingXXS: s,
    componentCls: u,
    borderRadiusOuter: c,
    borderRadiusLG: d
  } = e, f = (i - a * l) / 2, {
    dropdownArrowOffset: p
  } = V_({
    sizePopupArrow: r,
    contentRadius: d,
    borderRadiusOuter: c
  }), v = Qt(e, {
    menuCls: `${u}-menu`,
    rootPrefixCls: n,
    dropdownArrowDistance: r / 2 + o,
    dropdownArrowOffset: p,
    dropdownPaddingVertical: f,
    dropdownEdgeChildPadding: s
  });
  return [UW(v), YW(v), GW(v)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase + 50
}));
var XW = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const QW = Lt.Group, jp = be({
  compatConfig: {
    MODE: 3
  },
  name: "ADropdownButton",
  inheritAttrs: !1,
  __ANT_BUTTON: !0,
  props: kn(WW(), {
    trigger: "hover",
    placement: "bottomRight",
    type: "default"
  }),
  // emits: ['click', 'visibleChange', 'update:visible'],s
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      emit: r
    } = t;
    const i = (f) => {
      r("update:visible", f), r("visibleChange", f), r("update:open", f), r("openChange", f);
    }, {
      prefixCls: a,
      direction: l,
      getPopupContainer: s
    } = _t("dropdown", e), u = E(() => `${a.value}-button`), [c, d] = Z_(a);
    return () => {
      var f, p;
      const v = O(O({}, e), o), {
        type: g = "default",
        disabled: m,
        danger: x,
        loading: S,
        htmlType: C,
        class: P = "",
        overlay: $ = (f = n.overlay) === null || f === void 0 ? void 0 : f.call(n),
        trigger: I,
        align: w,
        open: _,
        visible: M,
        onVisibleChange: N,
        placement: A = l.value === "rtl" ? "bottomLeft" : "bottomRight",
        href: H,
        title: B,
        icon: F = ((p = n.icon) === null || p === void 0 ? void 0 : p.call(n)) || h(Bd, null, null),
        mouseEnterDelay: R,
        mouseLeaveDelay: X,
        overlayClassName: j,
        overlayStyle: ee,
        destroyPopupOnHide: W,
        onClick: K,
        "onUpdate:open": q
      } = v, G = XW(v, ["type", "disabled", "danger", "loading", "htmlType", "class", "overlay", "trigger", "align", "open", "visible", "onVisibleChange", "placement", "href", "title", "icon", "mouseEnterDelay", "mouseLeaveDelay", "overlayClassName", "overlayStyle", "destroyPopupOnHide", "onClick", "onUpdate:open"]), ae = {
        align: w,
        disabled: m,
        trigger: m ? [] : I,
        placement: A,
        getPopupContainer: s?.value,
        onOpenChange: i,
        mouseEnterDelay: R,
        mouseLeaveDelay: X,
        open: _ ?? M,
        overlayClassName: j,
        overlayStyle: ee,
        destroyPopupOnHide: W
      }, le = h(Lt, {
        danger: x,
        type: g,
        disabled: m,
        loading: S,
        onClick: K,
        htmlType: C,
        href: H,
        title: B
      }, {
        default: n.default
      }), ie = h(Lt, {
        danger: x,
        type: g,
        icon: F
      }, null);
      return c(h(QW, Q(Q({}, G), {}, {
        class: Me(u.value, P, d.value)
      }), {
        default: () => [n.leftButton ? n.leftButton({
          button: le
        }) : le, h(Mr, ae, {
          default: () => [n.rightButton ? n.rightButton({
            button: ie
          }) : ie],
          overlay: () => $
        })]
      }));
    };
  }
});
var ZW = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" } }] }, name: "right", theme: "outlined" };
function HS(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      JW(e, r, n[r]);
    });
  }
  return e;
}
function JW(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var qa = function(t, n) {
  var o = HS({}, t, n.attrs);
  return h(on, HS({}, o, {
    icon: ZW
  }), null);
};
qa.displayName = "RightOutlined";
qa.inheritAttrs = !1;
const J_ = Symbol("OverrideContextKey"), eT = () => zt(J_, void 0), tT = (e) => {
  var t, n, o;
  const {
    prefixCls: r,
    mode: i,
    selectable: a,
    validator: l,
    onClick: s,
    expandIcon: u
  } = eT() || {};
  Ft(J_, {
    prefixCls: E(() => {
      var c, d;
      return (d = (c = e.prefixCls) === null || c === void 0 ? void 0 : c.value) !== null && d !== void 0 ? d : r?.value;
    }),
    mode: E(() => {
      var c, d;
      return (d = (c = e.mode) === null || c === void 0 ? void 0 : c.value) !== null && d !== void 0 ? d : i?.value;
    }),
    selectable: E(() => {
      var c, d;
      return (d = (c = e.selectable) === null || c === void 0 ? void 0 : c.value) !== null && d !== void 0 ? d : a?.value;
    }),
    validator: (t = e.validator) !== null && t !== void 0 ? t : l,
    onClick: (n = e.onClick) !== null && n !== void 0 ? n : s,
    expandIcon: (o = e.expandIcon) !== null && o !== void 0 ? o : u?.value
  });
}, Mr = be({
  compatConfig: {
    MODE: 3
  },
  name: "ADropdown",
  inheritAttrs: !1,
  props: kn(Q_(), {
    mouseEnterDelay: 0.15,
    mouseLeaveDelay: 0.1,
    placement: "bottomLeft",
    trigger: "hover"
  }),
  // emits: ['visibleChange', 'update:visible'],
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      emit: r
    } = t;
    const {
      prefixCls: i,
      rootPrefixCls: a,
      direction: l,
      getPopupContainer: s
    } = _t("dropdown", e), [u, c] = Z_(i);
    process.env.NODE_ENV !== "production" && [["visible", "open"], ["onVisibleChange", "onOpenChange"], ["onUpdate:visible", "onUpdate:open"]].forEach((m) => {
      let [x, S] = m;
      wo(e[x] === void 0, "Dropdown", `\`${x}\` is deprecated which will be removed in next major version, please use \`${S}\` instead.`);
    });
    const d = E(() => {
      const {
        placement: m = "",
        transitionName: x
      } = e;
      return x !== void 0 ? x : m.includes("top") ? `${a.value}-slide-down` : `${a.value}-slide-up`;
    });
    tT({
      prefixCls: E(() => `${i.value}-menu`),
      expandIcon: E(() => h("span", {
        class: `${i.value}-menu-submenu-arrow`
      }, [h(qa, {
        class: `${i.value}-menu-submenu-arrow-icon`
      }, null)])),
      mode: E(() => "vertical"),
      selectable: E(() => !1),
      onClick: () => {
      },
      validator: (m) => {
        let {
          mode: x
        } = m;
        wo(!x || x === "vertical", "Dropdown", `mode="${x}" is not supported for Dropdown's Menu.`);
      }
    });
    const f = () => {
      var m, x, S;
      const C = e.overlay || ((m = n.overlay) === null || m === void 0 ? void 0 : m.call(n)), P = Array.isArray(C) ? C[0] : C;
      if (!P) return null;
      const $ = P.props || {};
      dn(!$.mode || $.mode === "vertical", "Dropdown", `mode="${$.mode}" is not supported for Dropdown's Menu.`);
      const {
        selectable: I = !1,
        expandIcon: w = (S = (x = P.children) === null || x === void 0 ? void 0 : x.expandIcon) === null || S === void 0 ? void 0 : S.call(x)
      } = $, _ = typeof w < "u" && Ao(w) ? w : h("span", {
        class: `${i.value}-menu-submenu-arrow`
      }, [h(qa, {
        class: `${i.value}-menu-submenu-arrow-icon`
      }, null)]);
      return Ao(P) ? Xn(P, {
        mode: "vertical",
        selectable: I,
        expandIcon: () => _
      }) : P;
    }, p = E(() => {
      const m = e.placement;
      if (!m)
        return l.value === "rtl" ? "bottomRight" : "bottomLeft";
      if (m.includes("Center")) {
        const x = m.slice(0, m.indexOf("Center"));
        return dn(!m.includes("Center"), "Dropdown", `You are using '${m}' placement in Dropdown, which is deprecated. Try to use '${x}' instead.`), x;
      }
      return m;
    }), v = E(() => typeof e.visible == "boolean" ? e.visible : e.open), g = (m) => {
      r("update:visible", m), r("visibleChange", m), r("update:open", m), r("openChange", m);
    };
    return () => {
      var m, x;
      const {
        arrow: S,
        trigger: C,
        disabled: P,
        overlayClassName: $
      } = e, I = (m = n.default) === null || m === void 0 ? void 0 : m.call(n)[0], w = Xn(I, O({
        class: Me((x = I?.props) === null || x === void 0 ? void 0 : x.class, {
          [`${i.value}-rtl`]: l.value === "rtl"
        }, `${i.value}-trigger`)
      }, P ? {
        disabled: P
      } : {})), _ = Me($, c.value, {
        [`${i.value}-rtl`]: l.value === "rtl"
      }), M = P ? [] : C;
      let N;
      M && M.includes("contextmenu") && (N = !0);
      const A = B_({
        arrowPointAtCenter: typeof S == "object" && S.pointAtCenter,
        autoAdjustOverflow: !0
      }), H = Fn(O(O(O({}, e), o), {
        visible: v.value,
        builtinPlacements: A,
        overlayClassName: _,
        arrow: !!S,
        alignPoint: N,
        prefixCls: i.value,
        getPopupContainer: s?.value,
        transitionName: d.value,
        trigger: M,
        onVisibleChange: g,
        placement: p.value
      }), ["overlay", "onUpdate:visible"]);
      return u(h(K_, H, {
        default: () => [w],
        overlay: f
      }));
    };
  }
});
Mr.Button = jp;
function e7(e, t, n, o) {
  let r;
  if (r !== void 0)
    return !!r;
  if (e === t)
    return !0;
  if (typeof e != "object" || !e || typeof t != "object" || !t)
    return !1;
  const i = Object.keys(e), a = Object.keys(t);
  if (i.length !== a.length)
    return !1;
  const l = Object.prototype.hasOwnProperty.bind(t);
  for (let s = 0; s < i.length; s++) {
    const u = i[s];
    if (!l(u))
      return !1;
    const c = e[u], d = t[u];
    if (r = void 0, r === !1 || r === void 0 && c !== d)
      return !1;
  }
  return !0;
}
function gu(e, t) {
  return e7(dr(e), dr(t));
}
const nT = Symbol("menuContextKey"), oT = (e) => {
  Ft(nT, e);
}, Xa = () => zt(nT), rT = Symbol("ForceRenderKey"), t7 = (e) => {
  Ft(rT, e);
}, iT = () => zt(rT, !1), aT = Symbol("menuFirstLevelContextKey"), lT = (e) => {
  Ft(aT, e);
}, n7 = () => zt(aT, !0), Wp = be({
  compatConfig: {
    MODE: 3
  },
  name: "MenuContextProvider",
  inheritAttrs: !1,
  props: {
    mode: {
      type: String,
      default: void 0
    },
    overflowDisabled: {
      type: Boolean,
      default: void 0
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = Xa(), r = O({}, o);
    return e.mode !== void 0 && (r.mode = Kt(e, "mode")), e.overflowDisabled !== void 0 && (r.overflowDisabled = Kt(e, "overflowDisabled")), oT(r), () => {
      var i;
      return (i = n.default) === null || i === void 0 ? void 0 : i.call(n);
    };
  }
}), sT = Symbol("siderCollapsed"), uT = Symbol("siderHookProvider"), kf = "$$__vc-menu-more__key", cT = Symbol("KeyPathContext"), z0 = () => zt(cT, {
  parentEventKeys: E(() => []),
  parentKeys: E(() => []),
  parentInfo: {}
}), o7 = (e, t, n) => {
  const {
    parentEventKeys: o,
    parentKeys: r
  } = z0(), i = E(() => [...o.value, e]), a = E(() => [...r.value, t]);
  return Ft(cT, {
    parentEventKeys: i,
    parentKeys: a,
    parentInfo: n
  }), a;
}, dT = Symbol("measure"), VS = be({
  compatConfig: {
    MODE: 3
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Ft(dT, !0), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), F0 = () => zt(dT, !1);
function fT(e) {
  const {
    mode: t,
    rtl: n,
    inlineIndent: o
  } = Xa();
  return E(() => t.value !== "inline" ? null : n.value ? {
    paddingRight: `${e.value * o.value}px`
  } : {
    paddingLeft: `${e.value * o.value}px`
  });
}
let r7 = 0;
const i7 = () => ({
  id: String,
  role: String,
  disabled: Boolean,
  danger: Boolean,
  title: {
    type: [String, Boolean],
    default: void 0
  },
  icon: fe.any,
  onMouseenter: Function,
  onMouseleave: Function,
  onClick: Function,
  onKeydown: Function,
  onFocus: Function,
  // Internal user prop
  originItemValue: Et()
}), Qu = be({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuItem",
  inheritAttrs: !1,
  props: i7(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: r
    } = t;
    const i = fr(), a = F0(), l = typeof i.vnode.key == "symbol" ? String(i.vnode.key) : i.vnode.key;
    dn(typeof i.vnode.key != "symbol", "MenuItem", `MenuItem \`:key="${String(l)}"\` not support Symbol type`);
    const s = `menu_item_${++r7}_$$_${l}`, {
      parentEventKeys: u,
      parentKeys: c
    } = z0(), {
      prefixCls: d,
      activeKeys: f,
      disabled: p,
      changeActiveKeys: v,
      rtl: g,
      inlineCollapsed: m,
      siderCollapsed: x,
      onItemClick: S,
      selectedKeys: C,
      registerMenuInfo: P,
      unRegisterMenuInfo: $
    } = Xa(), I = n7(), w = $e(!1), _ = E(() => [...c.value, l]);
    P(s, {
      eventKey: s,
      key: l,
      parentEventKeys: u,
      parentKeys: c,
      isLeaf: !0
    }), qt(() => {
      $(s);
    }), ke(f, () => {
      w.value = !!f.value.find((q) => q === l);
    }, {
      immediate: !0
    });
    const N = E(() => p.value || e.disabled), A = E(() => C.value.includes(l)), H = E(() => {
      const q = `${d.value}-item`;
      return {
        [`${q}`]: !0,
        [`${q}-danger`]: e.danger,
        [`${q}-active`]: w.value,
        [`${q}-selected`]: A.value,
        [`${q}-disabled`]: N.value
      };
    }), B = (q) => ({
      key: l,
      eventKey: s,
      keyPath: _.value,
      eventKeyPath: [...u.value, s],
      domEvent: q,
      item: O(O({}, e), r)
    }), F = (q) => {
      if (N.value)
        return;
      const G = B(q);
      o("click", q), S(G);
    }, R = (q) => {
      N.value || (v(_.value), o("mouseenter", q));
    }, X = (q) => {
      N.value || (v([]), o("mouseleave", q));
    }, j = (q) => {
      if (o("keydown", q), q.which === it.ENTER) {
        const G = B(q);
        o("click", q), S(G);
      }
    }, ee = (q) => {
      v(_.value), o("focus", q);
    }, W = (q, G) => {
      const ae = h("span", {
        class: `${d.value}-title-content`
      }, [G]);
      return (!q || Ao(G) && G.type === "span") && G && m.value && I && typeof G == "string" ? h("div", {
        class: `${d.value}-inline-collapsed-noicon`
      }, [G.charAt(0)]) : ae;
    }, K = fT(E(() => _.value.length));
    return () => {
      var q, G, ae, le, ie;
      if (a) return null;
      const re = (q = e.title) !== null && q !== void 0 ? q : (G = n.title) === null || G === void 0 ? void 0 : G.call(n), te = go((ae = n.default) === null || ae === void 0 ? void 0 : ae.call(n)), ve = te.length;
      let ue = re;
      typeof re > "u" ? ue = I && ve ? te : "" : re === !1 && (ue = "");
      const pe = {
        title: ue
      };
      !x.value && !m.value && (pe.title = null, pe.open = !1);
      const ge = {};
      e.role === "option" && (ge["aria-selected"] = A.value);
      const _e = (le = e.icon) !== null && le !== void 0 ? le : (ie = n.icon) === null || ie === void 0 ? void 0 : ie.call(n, e);
      return h(Lo, Q(Q({}, pe), {}, {
        placement: g.value ? "left" : "right",
        overlayClassName: `${d.value}-inline-collapsed-tooltip`
      }), {
        default: () => [h(Na.Item, Q(Q(Q({
          component: "li"
        }, r), {}, {
          id: e.id,
          style: O(O({}, r.style || {}), K.value),
          class: [H.value, {
            [`${r.class}`]: !!r.class,
            [`${d.value}-item-only-child`]: (_e ? ve + 1 : ve) === 1
          }],
          role: e.role || "menuitem",
          tabindex: e.disabled ? null : -1,
          "data-menu-id": l,
          "aria-disabled": e.disabled
        }, ge), {}, {
          onMouseenter: R,
          onMouseleave: X,
          onClick: F,
          onKeydown: j,
          onFocus: ee,
          title: typeof re == "string" ? re : void 0
        }), {
          default: () => [Xn(typeof _e == "function" ? _e(e.originItemValue) : _e, {
            class: `${d.value}-item-icon`
          }, !1), W(_e, te)]
        })]
      });
    };
  }
}), Pl = {
  adjustX: 1,
  adjustY: 1
}, a7 = {
  topLeft: {
    points: ["bl", "tl"],
    overflow: Pl,
    offset: [0, -7]
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: Pl,
    offset: [0, 7]
  },
  leftTop: {
    points: ["tr", "tl"],
    overflow: Pl,
    offset: [-4, 0]
  },
  rightTop: {
    points: ["tl", "tr"],
    overflow: Pl,
    offset: [4, 0]
  }
}, l7 = {
  topLeft: {
    points: ["bl", "tl"],
    overflow: Pl,
    offset: [0, -7]
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: Pl,
    offset: [0, 7]
  },
  rightTop: {
    points: ["tr", "tl"],
    overflow: Pl,
    offset: [-4, 0]
  },
  leftTop: {
    points: ["tl", "tr"],
    overflow: Pl,
    offset: [4, 0]
  }
}, s7 = {
  horizontal: "bottomLeft",
  vertical: "rightTop",
  "vertical-left": "rightTop",
  "vertical-right": "leftTop"
}, jS = be({
  compatConfig: {
    MODE: 3
  },
  name: "PopupTrigger",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    mode: String,
    visible: Boolean,
    // popup: React.ReactNode;
    popupClassName: String,
    popupOffset: Array,
    disabled: Boolean,
    onVisibleChange: Function
  },
  slots: Object,
  emits: ["visibleChange"],
  setup(e, t) {
    let {
      slots: n,
      emit: o
    } = t;
    const r = $e(!1), {
      getPopupContainer: i,
      rtl: a,
      subMenuOpenDelay: l,
      subMenuCloseDelay: s,
      builtinPlacements: u,
      triggerSubMenuAction: c,
      forceSubMenuRender: d,
      motion: f,
      defaultMotions: p,
      rootClassName: v
    } = Xa(), g = iT(), m = E(() => a.value ? O(O({}, l7), u.value) : O(O({}, a7), u.value)), x = E(() => s7[e.mode]), S = $e();
    ke(() => e.visible, ($) => {
      Vt.cancel(S.value), S.value = Vt(() => {
        r.value = $;
      });
    }, {
      immediate: !0
    }), qt(() => {
      Vt.cancel(S.value);
    });
    const C = ($) => {
      o("visibleChange", $);
    }, P = E(() => {
      var $, I;
      const w = f.value || (($ = p.value) === null || $ === void 0 ? void 0 : $[e.mode]) || ((I = p.value) === null || I === void 0 ? void 0 : I.other), _ = typeof w == "function" ? w() : w;
      return _ ? Ms(_.name, {
        css: !0
      }) : void 0;
    });
    return () => {
      const {
        prefixCls: $,
        popupClassName: I,
        mode: w,
        popupOffset: _,
        disabled: M
      } = e;
      return h(Dd, {
        prefixCls: $,
        popupClassName: Me(`${$}-popup`, {
          [`${$}-rtl`]: a.value
        }, I, v.value),
        stretch: w === "horizontal" ? "minWidth" : null,
        getPopupContainer: i.value,
        builtinPlacements: m.value,
        popupPlacement: x.value,
        popupVisible: r.value,
        popupAlign: _ && {
          offset: _
        },
        action: M ? [] : [c.value],
        mouseEnterDelay: l.value,
        mouseLeaveDelay: s.value,
        onPopupVisibleChange: C,
        forceRender: g || d.value,
        popupAnimation: P.value
      }, {
        popup: n.popup,
        default: n.default
      });
    };
  }
}), B0 = (e, t) => {
  let {
    slots: n,
    attrs: o
  } = t;
  var r;
  const {
    prefixCls: i,
    mode: a
  } = Xa();
  return h("ul", Q(Q({}, o), {}, {
    class: Me(i.value, `${i.value}-sub`, `${i.value}-${a.value === "inline" ? "inline" : "vertical"}`),
    "data-menu-list": !0
  }), [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)]);
};
B0.displayName = "SubMenuList";
const u7 = be({
  compatConfig: {
    MODE: 3
  },
  name: "InlineSubMenuList",
  inheritAttrs: !1,
  props: {
    id: String,
    open: Boolean,
    keyPath: Array
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = E(() => "inline"), {
      motion: r,
      mode: i,
      defaultMotions: a
    } = Xa(), l = E(() => i.value === o.value), s = ce(!l.value), u = E(() => l.value ? e.open : !1);
    ke(i, () => {
      l.value && (s.value = !1);
    }, {
      flush: "post"
    });
    const c = E(() => {
      var d, f;
      const p = r.value || ((d = a.value) === null || d === void 0 ? void 0 : d[o.value]) || ((f = a.value) === null || f === void 0 ? void 0 : f.other), v = typeof p == "function" ? p() : p;
      return O(O({}, v), {
        appear: e.keyPath.length <= 1
      });
    });
    return () => {
      var d;
      return s.value ? null : h(Wp, {
        mode: o.value
      }, {
        default: () => [h(Er, c.value, {
          default: () => [ti(h(B0, {
            id: e.id
          }, {
            default: () => [(d = n.default) === null || d === void 0 ? void 0 : d.call(n)]
          }), [[Oi, u.value]])]
        })]
      });
    };
  }
});
let WS = 0;
const c7 = () => ({
  icon: fe.any,
  title: fe.any,
  disabled: Boolean,
  level: Number,
  popupClassName: String,
  popupOffset: Array,
  internalPopupClose: Boolean,
  eventKey: String,
  expandIcon: Function,
  theme: String,
  onMouseenter: Function,
  onMouseleave: Function,
  onTitleClick: Function,
  // Internal user prop
  originItemValue: Et()
}), Zu = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASubMenu",
  inheritAttrs: !1,
  props: c7(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      emit: r
    } = t;
    var i, a;
    lT(!1);
    const l = F0(), s = fr(), u = typeof s.vnode.key == "symbol" ? String(s.vnode.key) : s.vnode.key;
    dn(typeof s.vnode.key != "symbol", "SubMenu", `SubMenu \`:key="${String(u)}"\` not support Symbol type`);
    const c = Om(u) ? u : `sub_menu_${++WS}_$$_not_set_key`, d = (i = e.eventKey) !== null && i !== void 0 ? i : Om(u) ? `sub_menu_${++WS}_$$_${u}` : c, {
      parentEventKeys: f,
      parentInfo: p,
      parentKeys: v
    } = z0(), g = E(() => [...v.value, c]), m = $e([]), x = {
      eventKey: d,
      key: c,
      parentEventKeys: f,
      childrenEventKeys: m,
      parentKeys: v
    };
    (a = p.childrenEventKeys) === null || a === void 0 || a.value.push(d), qt(() => {
      var Fe;
      p.childrenEventKeys && (p.childrenEventKeys.value = (Fe = p.childrenEventKeys) === null || Fe === void 0 ? void 0 : Fe.value.filter((Ve) => Ve != d));
    }), o7(d, c, x);
    const {
      prefixCls: S,
      activeKeys: C,
      disabled: P,
      changeActiveKeys: $,
      mode: I,
      inlineCollapsed: w,
      openKeys: _,
      overflowDisabled: M,
      onOpenChange: N,
      registerMenuInfo: A,
      unRegisterMenuInfo: H,
      selectedSubMenuKeys: B,
      expandIcon: F,
      theme: R
    } = Xa(), X = u != null, j = !l && (iT() || !X);
    t7(j), (l && X || !l && !X || j) && (A(d, x), qt(() => {
      H(d);
    }));
    const ee = E(() => `${S.value}-submenu`), W = E(() => P.value || e.disabled), K = $e(), q = $e(), G = E(() => _.value.includes(c)), ae = E(() => !M.value && G.value), le = E(() => B.value.includes(c)), ie = $e(!1);
    ke(C, () => {
      ie.value = !!C.value.find((Fe) => Fe === c);
    }, {
      immediate: !0
    });
    const re = (Fe) => {
      W.value || (r("titleClick", Fe, c), I.value === "inline" && N(c, !G.value));
    }, te = (Fe) => {
      W.value || ($(g.value), r("mouseenter", Fe));
    }, ve = (Fe) => {
      W.value || ($([]), r("mouseleave", Fe));
    }, ue = fT(E(() => g.value.length)), pe = (Fe) => {
      I.value !== "inline" && N(c, Fe);
    }, ge = () => {
      $(g.value);
    }, _e = d && `${d}-popup`, ze = E(() => Me(S.value, `${S.value}-${e.theme || R.value}`, e.popupClassName)), Ke = (Fe, Ve) => {
      if (!Ve)
        return w.value && !v.value.length && Fe && typeof Fe == "string" ? h("div", {
          class: `${S.value}-inline-collapsed-noicon`
        }, [Fe.charAt(0)]) : h("span", {
          class: `${S.value}-title-content`
        }, [Fe]);
      const nt = Ao(Fe) && Fe.type === "span";
      return h(Je, null, [Xn(typeof Ve == "function" ? Ve(e.originItemValue) : Ve, {
        class: `${S.value}-item-icon`
      }, !1), nt ? Fe : h("span", {
        class: `${S.value}-title-content`
      }, [Fe])]);
    }, He = E(() => I.value !== "inline" && g.value.length > 1 ? "vertical" : I.value), Ne = E(() => I.value === "horizontal" ? "vertical" : I.value), Xe = E(() => He.value === "horizontal" ? "vertical" : He.value), De = () => {
      var Fe, Ve;
      const nt = ee.value, je = (Fe = e.icon) !== null && Fe !== void 0 ? Fe : (Ve = n.icon) === null || Ve === void 0 ? void 0 : Ve.call(n, e), Pe = e.expandIcon || n.expandIcon || F.value, Ge = Ke(ei(n, e, "title"), je);
      return h("div", {
        style: ue.value,
        class: `${nt}-title`,
        tabindex: W.value ? null : -1,
        ref: K,
        title: typeof Ge == "string" ? Ge : null,
        "data-menu-id": c,
        "aria-expanded": ae.value,
        "aria-haspopup": !0,
        "aria-controls": _e,
        "aria-disabled": W.value,
        onClick: re,
        onFocus: ge
      }, [Ge, I.value !== "horizontal" && Pe ? Pe(O(O({}, e), {
        isOpen: ae.value
      })) : h("i", {
        class: `${nt}-arrow`
      }, null)]);
    };
    return () => {
      var Fe;
      if (l)
        return X ? (Fe = n.default) === null || Fe === void 0 ? void 0 : Fe.call(n) : null;
      const Ve = ee.value;
      let nt = () => null;
      if (!M.value && I.value !== "inline") {
        const je = I.value === "horizontal" ? [0, 8] : [10, 0];
        nt = () => h(jS, {
          mode: He.value,
          prefixCls: Ve,
          visible: !e.internalPopupClose && ae.value,
          popupClassName: ze.value,
          popupOffset: e.popupOffset || je,
          disabled: W.value,
          onVisibleChange: pe
        }, {
          default: () => [De()],
          popup: () => h(Wp, {
            mode: Xe.value
          }, {
            default: () => [h(B0, {
              id: _e,
              ref: q
            }, {
              default: n.default
            })]
          })
        });
      } else
        nt = () => h(jS, null, {
          default: De
        });
      return h(Wp, {
        mode: Ne.value
      }, {
        default: () => [h(Na.Item, Q(Q({
          component: "li"
        }, o), {}, {
          role: "none",
          class: Me(Ve, `${Ve}-${I.value}`, o.class, {
            [`${Ve}-open`]: ae.value,
            [`${Ve}-active`]: ie.value,
            [`${Ve}-selected`]: le.value,
            [`${Ve}-disabled`]: W.value
          }),
          onMouseenter: te,
          onMouseleave: ve,
          "data-submenu-id": c
        }), {
          default: () => h(Je, null, [nt(), !M.value && h(u7, {
            id: _e,
            open: ae.value,
            keyPath: g.value
          }, {
            default: n.default
          })])
        })]
      });
    };
  }
});
function pT(e, t) {
  return e.classList ? e.classList.contains(t) : ` ${e.className} `.indexOf(` ${t} `) > -1;
}
function rb(e, t) {
  e.classList ? e.classList.add(t) : pT(e, t) || (e.className = `${e.className} ${t}`);
}
function ib(e, t) {
  if (e.classList)
    e.classList.remove(t);
  else if (pT(e, t)) {
    const n = e.className;
    e.className = ` ${n} `.replace(` ${t} `, " ");
  }
}
const Wh = function() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "ant-motion-collapse", t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  return {
    name: e,
    appear: t,
    css: !0,
    onBeforeEnter: (n) => {
      n.style.height = "0px", n.style.opacity = "0", rb(n, e);
    },
    onEnter: (n) => {
      Yt(() => {
        n.style.height = `${n.scrollHeight}px`, n.style.opacity = "1";
      });
    },
    onAfterEnter: (n) => {
      n && (ib(n, e), n.style.height = null, n.style.opacity = null);
    },
    onBeforeLeave: (n) => {
      rb(n, e), n.style.height = `${n.offsetHeight}px`, n.style.opacity = null;
    },
    onLeave: (n) => {
      setTimeout(() => {
        n.style.height = "0px", n.style.opacity = "0";
      });
    },
    onAfterLeave: (n) => {
      n && (ib(n, e), n.style && (n.style.height = null, n.style.opacity = null));
    }
  };
}, d7 = () => ({
  title: fe.any,
  // Internal user prop
  originItemValue: Et()
}), Kp = be({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuItemGroup",
  inheritAttrs: !1,
  props: d7(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: r
    } = Xa(), i = E(() => `${r.value}-item-group`), a = F0();
    return () => {
      var l, s;
      return a ? (l = n.default) === null || l === void 0 ? void 0 : l.call(n) : h("li", Q(Q({}, o), {}, {
        onClick: (u) => u.stopPropagation(),
        class: i.value
      }), [h("div", {
        title: typeof e.title == "string" ? e.title : void 0,
        class: `${i.value}-title`
      }, [ei(n, e, "title")]), h("ul", {
        class: `${i.value}-list`
      }, [(s = n.default) === null || s === void 0 ? void 0 : s.call(n)])]);
    };
  }
}), f7 = () => ({
  prefixCls: String,
  dashed: Boolean
}), qp = be({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuDivider",
  props: f7(),
  setup(e) {
    const {
      prefixCls: t
    } = Xa(), n = E(() => ({
      [`${t.value}-item-divider`]: !0,
      [`${t.value}-item-divider-dashed`]: !!e.dashed
    }));
    return () => h("li", {
      class: n.value
    }, null);
  }
});
var p7 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function ab(e, t, n) {
  return (e || []).map((o, r) => {
    if (o && typeof o == "object") {
      const i = o, {
        label: a,
        children: l,
        key: s,
        type: u
      } = i, c = p7(i, ["label", "children", "key", "type"]), d = s ?? `tmp-${r}`, f = n ? n.parentKeys.slice() : [], p = [], v = {
        eventKey: d,
        key: d,
        parentEventKeys: ce(f),
        parentKeys: ce(f),
        childrenEventKeys: ce(p),
        isLeaf: !1
      };
      if (l || u === "group") {
        if (u === "group") {
          const m = ab(l, t, n);
          return h(Kp, Q(Q({
            key: d
          }, c), {}, {
            title: a,
            originItemValue: o
          }), {
            default: () => [m]
          });
        }
        t.set(d, v), n && n.childrenEventKeys.push(d);
        const g = ab(l, t, {
          childrenEventKeys: p,
          parentKeys: [].concat(f, d)
        });
        return h(Zu, Q(Q({
          key: d
        }, c), {}, {
          title: a,
          originItemValue: o
        }), {
          default: () => [g]
        });
      }
      return u === "divider" ? h(qp, Q({
        key: d
      }, c), null) : (v.isLeaf = !0, t.set(d, v), h(Qu, Q(Q({
        key: d
      }, c), {}, {
        originItemValue: o
      }), {
        default: () => [a]
      }));
    }
    return null;
  }).filter((o) => o);
}
function h7(e) {
  const t = $e([]), n = $e(!1), o = $e(/* @__PURE__ */ new Map());
  return ke(() => e.items, () => {
    const r = /* @__PURE__ */ new Map();
    n.value = !1, e.items ? (n.value = !0, t.value = ab(e.items, r)) : t.value = void 0, o.value = r;
  }, {
    immediate: !0,
    deep: !0
  }), {
    itemsNodes: t,
    store: o,
    hasItmes: n
  };
}
const g7 = (e) => {
  const {
    componentCls: t,
    motionDurationSlow: n,
    menuHorizontalHeight: o,
    colorSplit: r,
    lineWidth: i,
    lineType: a,
    menuItemPaddingInline: l
  } = e;
  return {
    [`${t}-horizontal`]: {
      lineHeight: `${o}px`,
      border: 0,
      borderBottom: `${i}px ${a} ${r}`,
      boxShadow: "none",
      "&::after": {
        display: "block",
        clear: "both",
        height: 0,
        content: '"\\20"'
      },
      // ======================= Item =======================
      [`${t}-item, ${t}-submenu`]: {
        position: "relative",
        display: "inline-block",
        verticalAlign: "bottom",
        paddingInline: l
      },
      [`> ${t}-item:hover,
        > ${t}-item-active,
        > ${t}-submenu ${t}-submenu-title:hover`]: {
        backgroundColor: "transparent"
      },
      [`${t}-item, ${t}-submenu-title`]: {
        transition: [`border-color ${n}`, `background ${n}`].join(",")
      },
      // ===================== Sub Menu =====================
      [`${t}-submenu-arrow`]: {
        display: "none"
      }
    }
  };
}, v7 = (e) => {
  let {
    componentCls: t,
    menuArrowOffset: n
  } = e;
  return {
    [`${t}-rtl`]: {
      direction: "rtl"
    },
    [`${t}-submenu-rtl`]: {
      transformOrigin: "100% 0"
    },
    // Vertical Arrow
    [`${t}-rtl${t}-vertical,
    ${t}-submenu-rtl ${t}-vertical`]: {
      [`${t}-submenu-arrow`]: {
        "&::before": {
          transform: `rotate(-45deg) translateY(-${n})`
        },
        "&::after": {
          transform: `rotate(45deg) translateY(${n})`
        }
      }
    }
  };
}, KS = (e) => O({}, ja(e)), qS = (e, t) => {
  const {
    componentCls: n,
    colorItemText: o,
    colorItemTextSelected: r,
    colorGroupTitle: i,
    colorItemBg: a,
    colorSubItemBg: l,
    colorItemBgSelected: s,
    colorActiveBarHeight: u,
    colorActiveBarWidth: c,
    colorActiveBarBorderSize: d,
    motionDurationSlow: f,
    motionEaseInOut: p,
    motionEaseOut: v,
    menuItemPaddingInline: g,
    motionDurationMid: m,
    colorItemTextHover: x,
    lineType: S,
    colorSplit: C,
    // Disabled
    colorItemTextDisabled: P,
    // Danger
    colorDangerItemText: $,
    colorDangerItemTextHover: I,
    colorDangerItemTextSelected: w,
    colorDangerItemBgActive: _,
    colorDangerItemBgSelected: M,
    colorItemBgHover: N,
    menuSubMenuBg: A,
    // Horizontal
    colorItemTextSelectedHorizontal: H,
    colorItemBgSelectedHorizontal: B
  } = e;
  return {
    [`${n}-${t}`]: {
      color: o,
      background: a,
      [`&${n}-root:focus-visible`]: O({}, KS(e)),
      // ======================== Item ========================
      [`${n}-item-group-title`]: {
        color: i
      },
      [`${n}-submenu-selected`]: {
        [`> ${n}-submenu-title`]: {
          color: r
        }
      },
      // Disabled
      [`${n}-item-disabled, ${n}-submenu-disabled`]: {
        color: `${P} !important`
      },
      // Hover
      [`${n}-item:hover, ${n}-submenu-title:hover`]: {
        [`&:not(${n}-item-selected):not(${n}-submenu-selected)`]: {
          color: x
        }
      },
      [`&:not(${n}-horizontal)`]: {
        [`${n}-item:not(${n}-item-selected)`]: {
          "&:hover": {
            backgroundColor: N
          },
          "&:active": {
            backgroundColor: s
          }
        },
        [`${n}-submenu-title`]: {
          "&:hover": {
            backgroundColor: N
          },
          "&:active": {
            backgroundColor: s
          }
        }
      },
      // Danger - only Item has
      [`${n}-item-danger`]: {
        color: $,
        [`&${n}-item:hover`]: {
          [`&:not(${n}-item-selected):not(${n}-submenu-selected)`]: {
            color: I
          }
        },
        [`&${n}-item:active`]: {
          background: _
        }
      },
      [`${n}-item a`]: {
        "&, &:hover": {
          color: "inherit"
        }
      },
      [`${n}-item-selected`]: {
        color: r,
        // Danger
        [`&${n}-item-danger`]: {
          color: w
        },
        "a, a:hover": {
          color: "inherit"
        }
      },
      [`& ${n}-item-selected`]: {
        backgroundColor: s,
        // Danger
        [`&${n}-item-danger`]: {
          backgroundColor: M
        }
      },
      [`${n}-item, ${n}-submenu-title`]: {
        [`&:not(${n}-item-disabled):focus-visible`]: O({}, KS(e))
      },
      [`&${n}-submenu > ${n}`]: {
        backgroundColor: A
      },
      [`&${n}-popup > ${n}`]: {
        backgroundColor: a
      },
      // ====================== Horizontal ======================
      [`&${n}-horizontal`]: O(O({}, t === "dark" ? {
        borderBottom: 0
      } : {}), {
        [`> ${n}-item, > ${n}-submenu`]: {
          top: d,
          marginTop: -d,
          marginBottom: 0,
          borderRadius: 0,
          "&::after": {
            position: "absolute",
            insetInline: g,
            bottom: 0,
            borderBottom: `${u}px solid transparent`,
            transition: `border-color ${f} ${p}`,
            content: '""'
          },
          "&:hover, &-active, &-open": {
            "&::after": {
              borderBottomWidth: u,
              borderBottomColor: H
            }
          },
          "&-selected": {
            color: H,
            backgroundColor: B,
            "&::after": {
              borderBottomWidth: u,
              borderBottomColor: H
            }
          }
        }
      }),
      // ================== Inline & Vertical ===================
      //
      [`&${n}-root`]: {
        [`&${n}-inline, &${n}-vertical`]: {
          borderInlineEnd: `${d}px ${S} ${C}`
        }
      },
      // ======================== Inline ========================
      [`&${n}-inline`]: {
        // Sub
        [`${n}-sub${n}-inline`]: {
          background: l
        },
        // Item
        [`${n}-item, ${n}-submenu-title`]: d && c ? {
          width: `calc(100% + ${d}px)`
        } : {},
        [`${n}-item`]: {
          position: "relative",
          "&::after": {
            position: "absolute",
            insetBlock: 0,
            insetInlineEnd: 0,
            borderInlineEnd: `${c}px solid ${r}`,
            transform: "scaleY(0.0001)",
            opacity: 0,
            transition: [`transform ${m} ${v}`, `opacity ${m} ${v}`].join(","),
            content: '""'
          },
          // Danger
          [`&${n}-item-danger`]: {
            "&::after": {
              borderInlineEndColor: w
            }
          }
        },
        [`${n}-selected, ${n}-item-selected`]: {
          "&::after": {
            transform: "scaleY(1)",
            opacity: 1,
            transition: [`transform ${m} ${p}`, `opacity ${m} ${p}`].join(",")
          }
        }
      }
    }
  };
}, YS = (e) => {
  const {
    componentCls: t,
    menuItemHeight: n,
    itemMarginInline: o,
    padding: r,
    menuArrowSize: i,
    marginXS: a,
    marginXXS: l
  } = e, s = r + i + a;
  return {
    [`${t}-item`]: {
      position: "relative"
    },
    [`${t}-item, ${t}-submenu-title`]: {
      height: n,
      lineHeight: `${n}px`,
      paddingInline: r,
      overflow: "hidden",
      textOverflow: "ellipsis",
      marginInline: o,
      marginBlock: l,
      width: `calc(100% - ${o * 2}px)`
    },
    // disable margin collapsed
    [`${t}-submenu`]: {
      paddingBottom: 0.02
    },
    [`> ${t}-item,
            > ${t}-submenu > ${t}-submenu-title`]: {
      height: n,
      lineHeight: `${n}px`
    },
    [`${t}-item-group-list ${t}-submenu-title,
            ${t}-submenu-title`]: {
      paddingInlineEnd: s
    }
  };
}, m7 = (e) => {
  const {
    componentCls: t,
    iconCls: n,
    menuItemHeight: o,
    colorTextLightSolid: r,
    dropdownWidth: i,
    controlHeightLG: a,
    motionDurationMid: l,
    motionEaseOut: s,
    paddingXL: u,
    fontSizeSM: c,
    fontSizeLG: d,
    motionDurationSlow: f,
    paddingXS: p,
    boxShadowSecondary: v
  } = e, g = {
    height: o,
    lineHeight: `${o}px`,
    listStylePosition: "inside",
    listStyleType: "disc"
  };
  return [
    {
      [t]: {
        "&-inline, &-vertical": O({
          [`&${t}-root`]: {
            boxShadow: "none"
          }
        }, YS(e))
      },
      [`${t}-submenu-popup`]: {
        [`${t}-vertical`]: O(O({}, YS(e)), {
          boxShadow: v
        })
      }
    },
    // Vertical only
    {
      [`${t}-submenu-popup ${t}-vertical${t}-sub`]: {
        minWidth: i,
        maxHeight: `calc(100vh - ${a * 2.5}px)`,
        padding: "0",
        overflow: "hidden",
        borderInlineEnd: 0,
        // https://github.com/ant-design/ant-design/issues/22244
        // https://github.com/ant-design/ant-design/issues/26812
        "&:not([class*='-active'])": {
          overflowX: "hidden",
          overflowY: "auto"
        }
      }
    },
    // Inline Only
    {
      [`${t}-inline`]: {
        width: "100%",
        // Motion enhance for first level
        [`&${t}-root`]: {
          [`${t}-item, ${t}-submenu-title`]: {
            display: "flex",
            alignItems: "center",
            transition: [`border-color ${f}`, `background ${f}`, `padding ${l} ${s}`].join(","),
            [`> ${t}-title-content`]: {
              flex: "auto",
              minWidth: 0,
              overflow: "hidden",
              textOverflow: "ellipsis"
            },
            "> *": {
              flex: "none"
            }
          }
        },
        // >>>>> Sub
        [`${t}-sub${t}-inline`]: {
          padding: 0,
          border: 0,
          borderRadius: 0,
          boxShadow: "none",
          [`& > ${t}-submenu > ${t}-submenu-title`]: g,
          [`& ${t}-item-group-title`]: {
            paddingInlineStart: u
          }
        },
        // >>>>> Item
        [`${t}-item`]: g
      }
    },
    // Inline Collapse Only
    {
      [`${t}-inline-collapsed`]: {
        width: o * 2,
        [`&${t}-root`]: {
          [`${t}-item, ${t}-submenu ${t}-submenu-title`]: {
            [`> ${t}-inline-collapsed-noicon`]: {
              fontSize: d,
              textAlign: "center"
            }
          }
        },
        [`> ${t}-item,
          > ${t}-item-group > ${t}-item-group-list > ${t}-item,
          > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
          > ${t}-submenu > ${t}-submenu-title`]: {
          insetInlineStart: 0,
          paddingInline: `calc(50% - ${c}px)`,
          textOverflow: "clip",
          [`
            ${t}-submenu-arrow,
            ${t}-submenu-expand-icon
          `]: {
            opacity: 0
          },
          [`${t}-item-icon, ${n}`]: {
            margin: 0,
            fontSize: d,
            lineHeight: `${o}px`,
            "+ span": {
              display: "inline-block",
              opacity: 0
            }
          }
        },
        [`${t}-item-icon, ${n}`]: {
          display: "inline-block"
        },
        "&-tooltip": {
          pointerEvents: "none",
          [`${t}-item-icon, ${n}`]: {
            display: "none"
          },
          "a, a:hover": {
            color: r
          }
        },
        [`${t}-item-group-title`]: O(O({}, Ha), {
          paddingInline: p
        })
      }
    }
  ];
}, GS = (e) => {
  const {
    componentCls: t,
    fontSize: n,
    motionDurationSlow: o,
    motionDurationMid: r,
    motionEaseInOut: i,
    motionEaseOut: a,
    iconCls: l,
    controlHeightSM: s
  } = e;
  return {
    // >>>>> Item
    [`${t}-item, ${t}-submenu-title`]: {
      position: "relative",
      display: "block",
      margin: 0,
      whiteSpace: "nowrap",
      cursor: "pointer",
      transition: [`border-color ${o}`, `background ${o}`, `padding ${o} ${i}`].join(","),
      [`${t}-item-icon, ${l}`]: {
        minWidth: n,
        fontSize: n,
        transition: [`font-size ${r} ${a}`, `margin ${o} ${i}`, `color ${o}`].join(","),
        "+ span": {
          marginInlineStart: s - n,
          opacity: 1,
          transition: [`opacity ${o} ${i}`, `margin ${o}`, `color ${o}`].join(",")
        }
      },
      [`${t}-item-icon`]: O({}, cc()),
      [`&${t}-item-only-child`]: {
        [`> ${l}, > ${t}-item-icon`]: {
          marginInlineEnd: 0
        }
      }
    },
    // Disabled state sets text to gray and nukes hover/tab effects
    [`${t}-item-disabled, ${t}-submenu-disabled`]: {
      background: "none !important",
      cursor: "not-allowed",
      "&::after": {
        borderColor: "transparent !important"
      },
      a: {
        color: "inherit !important"
      },
      [`> ${t}-submenu-title`]: {
        color: "inherit !important",
        cursor: "not-allowed"
      }
    }
  };
}, US = (e) => {
  const {
    componentCls: t,
    motionDurationSlow: n,
    motionEaseInOut: o,
    borderRadius: r,
    menuArrowSize: i,
    menuArrowOffset: a
  } = e;
  return {
    [`${t}-submenu`]: {
      "&-expand-icon, &-arrow": {
        position: "absolute",
        top: "50%",
        insetInlineEnd: e.margin,
        width: i,
        color: "currentcolor",
        transform: "translateY(-50%)",
        transition: `transform ${n} ${o}, opacity ${n}`
      },
      "&-arrow": {
        // →
        "&::before, &::after": {
          position: "absolute",
          width: i * 0.6,
          height: i * 0.15,
          backgroundColor: "currentcolor",
          borderRadius: r,
          transition: [`background ${n} ${o}`, `transform ${n} ${o}`, `top ${n} ${o}`, `color ${n} ${o}`].join(","),
          content: '""'
        },
        "&::before": {
          transform: `rotate(45deg) translateY(-${a})`
        },
        "&::after": {
          transform: `rotate(-45deg) translateY(${a})`
        }
      }
    }
  };
}, b7 = (e) => {
  const {
    antCls: t,
    componentCls: n,
    fontSize: o,
    motionDurationSlow: r,
    motionDurationMid: i,
    motionEaseInOut: a,
    lineHeight: l,
    paddingXS: s,
    padding: u,
    colorSplit: c,
    lineWidth: d,
    zIndexPopup: f,
    borderRadiusLG: p,
    radiusSubMenuItem: v,
    menuArrowSize: g,
    menuArrowOffset: m,
    lineType: x,
    menuPanelMaskInset: S
  } = e;
  return [
    // Misc
    {
      "": {
        [`${n}`]: O(O({}, Va()), {
          // Hidden
          "&-hidden": {
            display: "none"
          }
        })
      },
      [`${n}-submenu-hidden`]: {
        display: "none"
      }
    },
    {
      [n]: O(O(O(O(O(O(O({}, fn(e)), Va()), {
        marginBottom: 0,
        paddingInlineStart: 0,
        // Override default ul/ol
        fontSize: o,
        lineHeight: 0,
        listStyle: "none",
        outline: "none",
        transition: `width ${r} cubic-bezier(0.2, 0, 0, 1) 0s`,
        "ul, ol": {
          margin: 0,
          padding: 0,
          listStyle: "none"
        },
        // Overflow ellipsis
        "&-overflow": {
          display: "flex",
          [`${n}-item`]: {
            flex: "none"
          }
        },
        [`${n}-item, ${n}-submenu, ${n}-submenu-title`]: {
          borderRadius: e.radiusItem
        },
        [`${n}-item-group-title`]: {
          padding: `${s}px ${u}px`,
          fontSize: o,
          lineHeight: l,
          transition: `all ${r}`
        },
        [`&-horizontal ${n}-submenu`]: {
          transition: [`border-color ${r} ${a}`, `background ${r} ${a}`].join(",")
        },
        [`${n}-submenu, ${n}-submenu-inline`]: {
          transition: [`border-color ${r} ${a}`, `background ${r} ${a}`, `padding ${i} ${a}`].join(",")
        },
        [`${n}-submenu ${n}-sub`]: {
          cursor: "initial",
          transition: [`background ${r} ${a}`, `padding ${r} ${a}`].join(",")
        },
        [`${n}-title-content`]: {
          transition: `color ${r}`
        },
        [`${n}-item a`]: {
          "&::before": {
            position: "absolute",
            inset: 0,
            backgroundColor: "transparent",
            content: '""'
          }
        },
        // Removed a Badge related style seems it's safe
        // https://github.com/ant-design/ant-design/issues/19809
        // >>>>> Divider
        [`${n}-item-divider`]: {
          overflow: "hidden",
          lineHeight: 0,
          borderColor: c,
          borderStyle: x,
          borderWidth: 0,
          borderTopWidth: d,
          marginBlock: d,
          padding: 0,
          "&-dashed": {
            borderStyle: "dashed"
          }
        }
      }), GS(e)), {
        [`${n}-item-group`]: {
          [`${n}-item-group-list`]: {
            margin: 0,
            padding: 0,
            [`${n}-item, ${n}-submenu-title`]: {
              paddingInline: `${o * 2}px ${u}px`
            }
          }
        },
        // ======================= Sub Menu =======================
        "&-submenu": {
          "&-popup": {
            position: "absolute",
            zIndex: f,
            background: "transparent",
            borderRadius: p,
            boxShadow: "none",
            transformOrigin: "0 0",
            // https://github.com/ant-design/ant-design/issues/13955
            "&::before": {
              position: "absolute",
              inset: `${S}px 0 0`,
              zIndex: -1,
              width: "100%",
              height: "100%",
              opacity: 0,
              content: '""'
            }
          },
          // https://github.com/ant-design/ant-design/issues/13955
          "&-placement-rightTop::before": {
            top: 0,
            insetInlineStart: S
          },
          [`> ${n}`]: O(O(O({
            borderRadius: p
          }, GS(e)), US(e)), {
            [`${n}-item, ${n}-submenu > ${n}-submenu-title`]: {
              borderRadius: v
            },
            [`${n}-submenu-title::after`]: {
              transition: `transform ${r} ${a}`
            }
          })
        }
      }), US(e)), {
        [`&-inline-collapsed ${n}-submenu-arrow,
        &-inline ${n}-submenu-arrow`]: {
          // ↓
          "&::before": {
            transform: `rotate(-45deg) translateX(${m})`
          },
          "&::after": {
            transform: `rotate(45deg) translateX(-${m})`
          }
        },
        [`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]: {
          // ↑
          transform: `translateY(-${g * 0.2}px)`,
          "&::after": {
            transform: `rotate(-45deg) translateX(-${m})`
          },
          "&::before": {
            transform: `rotate(45deg) translateX(${m})`
          }
        }
      })
    },
    // Integration with header element so menu items have the same height
    {
      [`${t}-layout-header`]: {
        [n]: {
          lineHeight: "inherit"
        }
      }
    }
  ];
}, y7 = ((e, t) => Sn("Menu", (o, r) => {
  let {
    overrideComponentToken: i
  } = r;
  if (t?.value === !1)
    return [];
  const {
    colorBgElevated: a,
    colorPrimary: l,
    colorError: s,
    colorErrorHover: u,
    colorTextLightSolid: c
  } = o, {
    controlHeightLG: d,
    fontSize: f
  } = o, p = f / 7 * 5, v = Qt(o, {
    menuItemHeight: d,
    menuItemPaddingInline: o.margin,
    menuArrowSize: p,
    menuHorizontalHeight: d * 1.15,
    menuArrowOffset: `${p * 0.25}px`,
    menuPanelMaskInset: -7,
    menuSubMenuBg: a
  }), g = new _n(c).setAlpha(0.65).toRgbString(), m = Qt(v, {
    colorItemText: g,
    colorItemTextHover: c,
    colorGroupTitle: g,
    colorItemTextSelected: c,
    colorItemBg: "#001529",
    colorSubItemBg: "#000c17",
    colorItemBgActive: "transparent",
    colorItemBgSelected: l,
    colorActiveBarWidth: 0,
    colorActiveBarHeight: 0,
    colorActiveBarBorderSize: 0,
    // Disabled
    colorItemTextDisabled: new _n(c).setAlpha(0.25).toRgbString(),
    // Danger
    colorDangerItemText: s,
    colorDangerItemTextHover: u,
    colorDangerItemTextSelected: c,
    colorDangerItemBgActive: s,
    colorDangerItemBgSelected: s,
    menuSubMenuBg: "#001529",
    // Horizontal
    colorItemTextSelectedHorizontal: c,
    colorItemBgSelectedHorizontal: l
  }, O({}, i));
  return [
    // Basic
    b7(v),
    // Horizontal
    g7(v),
    // Vertical
    m7(v),
    // Theme
    qS(v, "light"),
    qS(m, "dark"),
    // RTL
    v7(v),
    // Motion
    jh(v),
    ea(v, "slide-up"),
    ea(v, "slide-down"),
    zd(v, "zoom-big")
  ];
}, (o) => {
  const {
    colorPrimary: r,
    colorError: i,
    colorTextDisabled: a,
    colorErrorBg: l,
    colorText: s,
    colorTextDescription: u,
    colorBgContainer: c,
    colorFillAlter: d,
    colorFillContent: f,
    lineWidth: p,
    lineWidthBold: v,
    controlItemBgActive: g,
    colorBgTextHover: m
  } = o;
  return {
    dropdownWidth: 160,
    zIndexPopup: o.zIndexPopupBase + 50,
    radiusItem: o.borderRadiusLG,
    radiusSubMenuItem: o.borderRadiusSM,
    colorItemText: s,
    colorItemTextHover: s,
    colorItemTextHoverHorizontal: r,
    colorGroupTitle: u,
    colorItemTextSelected: r,
    colorItemTextSelectedHorizontal: r,
    colorItemBg: c,
    colorItemBgHover: m,
    colorItemBgActive: f,
    colorSubItemBg: d,
    colorItemBgSelected: g,
    colorItemBgSelectedHorizontal: "transparent",
    colorActiveBarWidth: 0,
    colorActiveBarHeight: v,
    colorActiveBarBorderSize: p,
    // Disabled
    colorItemTextDisabled: a,
    // Danger
    colorDangerItemText: i,
    colorDangerItemTextHover: i,
    colorDangerItemTextSelected: i,
    colorDangerItemBgActive: l,
    colorDangerItemBgSelected: l,
    itemMarginInline: o.marginXXS
  };
})(e)), x7 = () => ({
  id: String,
  prefixCls: String,
  // donot use items, now only support inner use
  items: Array,
  disabled: Boolean,
  inlineCollapsed: Boolean,
  disabledOverflow: Boolean,
  forceSubMenuRender: Boolean,
  openKeys: Array,
  selectedKeys: Array,
  activeKey: String,
  selectable: {
    type: Boolean,
    default: !0
  },
  multiple: {
    type: Boolean,
    default: !1
  },
  tabindex: {
    type: [Number, String]
  },
  motion: Object,
  role: String,
  theme: {
    type: String,
    default: "light"
  },
  mode: {
    type: String,
    default: "vertical"
  },
  inlineIndent: {
    type: Number,
    default: 24
  },
  subMenuOpenDelay: {
    type: Number,
    default: 0
  },
  subMenuCloseDelay: {
    type: Number,
    default: 0.1
  },
  builtinPlacements: {
    type: Object
  },
  triggerSubMenuAction: {
    type: String,
    default: "hover"
  },
  getPopupContainer: Function,
  expandIcon: Function,
  onOpenChange: Function,
  onSelect: Function,
  onDeselect: Function,
  onClick: [Function, Array],
  onFocus: Function,
  onBlur: Function,
  onMousedown: Function,
  "onUpdate:openKeys": Function,
  "onUpdate:selectedKeys": Function,
  "onUpdate:activeKey": Function
}), XS = [], fo = be({
  compatConfig: {
    MODE: 3
  },
  name: "AMenu",
  inheritAttrs: !1,
  props: x7(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: r
    } = t;
    const {
      direction: i,
      getPrefixCls: a
    } = _t("menu", e), l = eT(), s = E(() => {
      var te;
      return a("menu", e.prefixCls || ((te = l?.prefixCls) === null || te === void 0 ? void 0 : te.value));
    }), [u, c] = y7(s, E(() => !l)), d = $e(/* @__PURE__ */ new Map()), f = zt(sT, ce(void 0)), p = E(() => f.value !== void 0 ? f.value : e.inlineCollapsed), {
      itemsNodes: v
    } = h7(e), g = $e(!1);
    Nt(() => {
      g.value = !0;
    }), It(() => {
      dn(!(e.inlineCollapsed === !0 && e.mode !== "inline"), "Menu", "`inlineCollapsed` should only be used when `mode` is inline."), dn(!(f.value !== void 0 && e.inlineCollapsed === !0), "Menu", "`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.");
    });
    const m = ce([]), x = ce([]), S = ce({});
    ke(d, () => {
      const te = {};
      for (const ve of d.value.values())
        te[ve.key] = ve;
      S.value = te;
    }, {
      flush: "post"
    }), It(() => {
      if (e.activeKey !== void 0) {
        let te = [];
        const ve = e.activeKey ? S.value[e.activeKey] : void 0;
        ve && e.activeKey !== void 0 ? te = Sg([].concat(T(ve.parentKeys), e.activeKey)) : te = [], gu(m.value, te) || (m.value = te);
      }
    }), ke(() => e.selectedKeys, (te) => {
      te && (x.value = te.slice());
    }, {
      immediate: !0,
      deep: !0
    });
    const C = ce([]);
    ke([S, x], () => {
      let te = [];
      x.value.forEach((ve) => {
        const ue = S.value[ve];
        ue && (te = te.concat(T(ue.parentKeys)));
      }), te = Sg(te), gu(C.value, te) || (C.value = te);
    }, {
      immediate: !0
    });
    const P = (te) => {
      if (e.selectable) {
        const {
          key: ve
        } = te, ue = x.value.includes(ve);
        let pe;
        e.multiple ? ue ? pe = x.value.filter((_e) => _e !== ve) : pe = [...x.value, ve] : pe = [ve];
        const ge = O(O({}, te), {
          selectedKeys: pe
        });
        gu(pe, x.value) || (e.selectedKeys === void 0 && (x.value = pe), o("update:selectedKeys", pe), ue && e.multiple ? o("deselect", ge) : o("select", ge));
      }
      N.value !== "inline" && !e.multiple && $.value.length && B(XS);
    }, $ = ce([]);
    ke(() => e.openKeys, function() {
      let te = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : $.value;
      gu($.value, te) || ($.value = te.slice());
    }, {
      immediate: !0,
      deep: !0
    });
    let I;
    const w = (te) => {
      clearTimeout(I), I = setTimeout(() => {
        e.activeKey === void 0 && (m.value = te), o("update:activeKey", te[te.length - 1]);
      });
    }, _ = E(() => !!e.disabled), M = E(() => i.value === "rtl"), N = ce("vertical"), A = $e(!1);
    It(() => {
      var te;
      (e.mode === "inline" || e.mode === "vertical") && p.value ? (N.value = "vertical", A.value = p.value) : (N.value = e.mode, A.value = !1), !((te = l?.mode) === null || te === void 0) && te.value && (N.value = l.mode.value);
    });
    const H = E(() => N.value === "inline"), B = (te) => {
      $.value = te, o("update:openKeys", te), o("openChange", te);
    }, F = ce($.value), R = $e(!1);
    ke($, () => {
      H.value && (F.value = $.value);
    }, {
      immediate: !0
    }), ke(H, () => {
      if (!R.value) {
        R.value = !0;
        return;
      }
      H.value ? $.value = F.value : B(XS);
    }, {
      immediate: !0
    });
    const X = E(() => ({
      [`${s.value}`]: !0,
      [`${s.value}-root`]: !0,
      [`${s.value}-${N.value}`]: !0,
      [`${s.value}-inline-collapsed`]: A.value,
      [`${s.value}-rtl`]: M.value,
      [`${s.value}-${e.theme}`]: !0
    })), j = E(() => a()), ee = E(() => ({
      horizontal: {
        name: `${j.value}-slide-up`
      },
      inline: Wh(`${j.value}-motion-collapse`),
      other: {
        name: `${j.value}-zoom-big`
      }
    }));
    lT(!0);
    const W = function() {
      let te = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
      const ve = [], ue = d.value;
      return te.forEach((pe) => {
        const {
          key: ge,
          childrenEventKeys: _e
        } = ue.get(pe);
        ve.push(ge, ...W(T(_e)));
      }), ve;
    }, K = (te) => {
      var ve;
      o("click", te), P(te), (ve = l?.onClick) === null || ve === void 0 || ve.call(l);
    }, q = (te, ve) => {
      var ue;
      const pe = ((ue = S.value[te]) === null || ue === void 0 ? void 0 : ue.childrenEventKeys) || [];
      let ge = $.value.filter((_e) => _e !== te);
      if (ve)
        ge.push(te);
      else if (N.value !== "inline") {
        const _e = W(T(pe));
        ge = Sg(ge.filter((ze) => !_e.includes(ze)));
      }
      gu($, ge) || B(ge);
    }, G = (te, ve) => {
      d.value.set(te, ve), d.value = new Map(d.value);
    }, ae = (te) => {
      d.value.delete(te), d.value = new Map(d.value);
    }, le = ce(0), ie = E(() => {
      var te;
      return e.expandIcon || n.expandIcon || !((te = l?.expandIcon) === null || te === void 0) && te.value ? (ve) => {
        let ue = e.expandIcon || n.expandIcon;
        return ue = typeof ue == "function" ? ue(ve) : ue, Xn(ue, {
          class: `${s.value}-submenu-expand-icon`
        }, !1);
      } : null;
    });
    oT({
      prefixCls: s,
      activeKeys: m,
      openKeys: $,
      selectedKeys: x,
      changeActiveKeys: w,
      disabled: _,
      rtl: M,
      mode: N,
      inlineIndent: E(() => e.inlineIndent),
      subMenuCloseDelay: E(() => e.subMenuCloseDelay),
      subMenuOpenDelay: E(() => e.subMenuOpenDelay),
      builtinPlacements: E(() => e.builtinPlacements),
      triggerSubMenuAction: E(() => e.triggerSubMenuAction),
      getPopupContainer: E(() => e.getPopupContainer),
      inlineCollapsed: A,
      theme: E(() => e.theme),
      siderCollapsed: f,
      defaultMotions: E(() => g.value ? ee.value : null),
      motion: E(() => g.value ? e.motion : null),
      overflowDisabled: $e(void 0),
      onOpenChange: q,
      onItemClick: K,
      registerMenuInfo: G,
      unRegisterMenuInfo: ae,
      selectedSubMenuKeys: C,
      expandIcon: ie,
      forceSubMenuRender: E(() => e.forceSubMenuRender),
      rootClassName: c
    });
    const re = () => {
      var te;
      return v.value || go((te = n.default) === null || te === void 0 ? void 0 : te.call(n));
    };
    return () => {
      var te;
      const ve = re(), ue = le.value >= ve.length - 1 || N.value !== "horizontal" || e.disabledOverflow, pe = (_e) => N.value !== "horizontal" || e.disabledOverflow ? _e : (
        // Need wrap for overflow dropdown that do not response for open
        _e.map((ze, Ke) => (
          // Always wrap provider to avoid sub node re-mount
          h(Wp, {
            key: ze.key,
            overflowDisabled: Ke > le.value
          }, {
            default: () => ze
          })
        ))
      ), ge = ((te = n.overflowedIndicator) === null || te === void 0 ? void 0 : te.call(n)) || h(Bd, null, null);
      return u(h(Na, Q(Q({}, r), {}, {
        onMousedown: e.onMousedown,
        prefixCls: `${s.value}-overflow`,
        component: "ul",
        itemComponent: Qu,
        class: [X.value, r.class, c.value],
        role: "menu",
        id: e.id,
        data: pe(ve),
        renderRawItem: (_e) => _e,
        renderRawRest: (_e) => {
          const ze = _e.length, Ke = ze ? ve.slice(-ze) : null;
          return h(Je, null, [h(Zu, {
            eventKey: kf,
            key: kf,
            title: ge,
            disabled: ue,
            internalPopupClose: ze === 0
          }, {
            default: () => Ke
          }), h(VS, null, {
            default: () => [h(Zu, {
              eventKey: kf,
              key: kf,
              title: ge,
              disabled: ue,
              internalPopupClose: ze === 0
            }, {
              default: () => Ke
            })]
          })]);
        },
        maxCount: N.value !== "horizontal" || e.disabledOverflow ? Na.INVALIDATE : Na.RESPONSIVE,
        ssr: "full",
        "data-menu-list": !0,
        onVisibleChange: (_e) => {
          le.value = _e;
        }
      }), {
        default: () => [h(nh, {
          to: "body"
        }, {
          default: () => [h("div", {
            style: {
              display: "none"
            },
            "aria-hidden": !0
          }, [h(VS, null, {
            default: () => [pe(re())]
          })])]
        })]
      }));
    };
  }
});
fo.install = function(e) {
  return e.component(fo.name, fo), e.component(Qu.name, Qu), e.component(Zu.name, Zu), e.component(qp.name, qp), e.component(Kp.name, Kp), e;
};
fo.Item = Qu;
fo.Divider = qp;
fo.SubMenu = Zu;
fo.ItemGroup = Kp;
yo.extend(QE);
yo.extend(XE);
yo.extend(KE);
yo.extend(qE);
yo.extend(YE);
yo.extend(GE);
yo.extend(UE);
yo.extend((e, t) => {
  const n = t.prototype, o = n.format;
  n.format = function(i) {
    const a = (i || "").replace("Wo", "wo");
    return o.bind(this)(a);
  };
});
const w7 = {
  // ar_EG:
  // az_AZ:
  // bg_BG:
  bn_BD: "bn-bd",
  by_BY: "be",
  // ca_ES:
  // cs_CZ:
  // da_DK:
  // de_DE:
  // el_GR:
  en_GB: "en-gb",
  en_US: "en",
  // es_ES:
  // et_EE:
  // fa_IR:
  // fi_FI:
  fr_BE: "fr",
  fr_CA: "fr-ca",
  // fr_FR:
  // ga_IE:
  // gl_ES:
  // he_IL:
  // hi_IN:
  // hr_HR:
  // hu_HU:
  hy_AM: "hy-am",
  // id_ID:
  // is_IS:
  // it_IT:
  // ja_JP:
  // ka_GE:
  // kk_KZ:
  // km_KH:
  kmr_IQ: "ku",
  // kn_IN:
  // ko_KR:
  // ku_IQ: // previous ku in antd
  // lt_LT:
  // lv_LV:
  // mk_MK:
  // ml_IN:
  // mn_MN:
  // ms_MY:
  // nb_NO:
  // ne_NP:
  nl_BE: "nl-be",
  // nl_NL:
  // pl_PL:
  pt_BR: "pt-br",
  // pt_PT:
  // ro_RO:
  // ru_RU:
  // sk_SK:
  // sl_SI:
  // sr_RS:
  // sv_SE:
  // ta_IN:
  // th_TH:
  // tr_TR:
  // uk_UA:
  // ur_PK:
  // vi_VN:
  zh_CN: "zh-cn",
  zh_HK: "zh-hk",
  zh_TW: "zh-tw"
}, es = (e) => w7[e] || e.split("_")[0], QS = () => {
  Tm(!1, "Not match any format. Please help to fire a issue about this.");
}, S7 = /\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|k{1,2}|S/g;
function ZS(e, t, n) {
  const o = [...new Set(e.split(n))];
  let r = 0;
  for (let i = 0; i < o.length; i++) {
    const a = o[i];
    if (r += a.length, r > t)
      return a;
    r += n.length;
  }
}
const JS = (e, t) => {
  if (!e) return null;
  if (yo.isDayjs(e))
    return e;
  const n = t.matchAll(S7);
  let o = yo(e, t);
  if (n === null)
    return o;
  for (const r of n) {
    const i = r[0], a = r.index;
    if (i === "Q") {
      const l = e.slice(a - 1, a), s = ZS(e, a, l).match(/\d+/)[0];
      o = o.quarter(parseInt(s));
    }
    if (i.toLowerCase() === "wo") {
      const l = e.slice(a - 1, a), s = ZS(e, a, l).match(/\d+/)[0];
      o = o.week(parseInt(s));
    }
    i.toLowerCase() === "ww" && (o = o.week(parseInt(e.slice(a, a + i.length)))), i.toLowerCase() === "w" && (o = o.week(parseInt(e.slice(a, a + i.length + 1))));
  }
  return o;
}, C7 = {
  // get
  getNow: () => yo(),
  getFixedDate: (e) => yo(e, ["YYYY-M-DD", "YYYY-MM-DD"]),
  getEndDate: (e) => e.endOf("month"),
  getWeekDay: (e) => {
    const t = e.locale("en");
    return t.weekday() + t.localeData().firstDayOfWeek();
  },
  getYear: (e) => e.year(),
  getMonth: (e) => e.month(),
  getDate: (e) => e.date(),
  getHour: (e) => e.hour(),
  getMinute: (e) => e.minute(),
  getSecond: (e) => e.second(),
  // set
  addYear: (e, t) => e.add(t, "year"),
  addMonth: (e, t) => e.add(t, "month"),
  addDate: (e, t) => e.add(t, "day"),
  setYear: (e, t) => e.year(t),
  setMonth: (e, t) => e.month(t),
  setDate: (e, t) => e.date(t),
  setHour: (e, t) => e.hour(t),
  setMinute: (e, t) => e.minute(t),
  setSecond: (e, t) => e.second(t),
  // Compare
  isAfter: (e, t) => e.isAfter(t),
  isValidate: (e) => e.isValid(),
  locale: {
    getWeekFirstDay: (e) => yo().locale(es(e)).localeData().firstDayOfWeek(),
    getWeekFirstDate: (e, t) => t.locale(es(e)).weekday(0),
    getWeek: (e, t) => t.locale(es(e)).week(),
    getShortWeekDays: (e) => yo().locale(es(e)).localeData().weekdaysMin(),
    getShortMonths: (e) => yo().locale(es(e)).localeData().monthsShort(),
    format: (e, t, n) => t.locale(es(e)).format(n),
    parse: (e, t, n) => {
      const o = es(e);
      for (let r = 0; r < n.length; r += 1) {
        const i = n[r], a = t;
        if (i.includes("wo") || i.includes("Wo")) {
          const s = a.split("-")[0], u = a.split("-")[1], c = yo(s, "YYYY").startOf("year").locale(o);
          for (let d = 0; d <= 52; d += 1) {
            const f = c.add(d, "week");
            if (f.format("Wo") === u)
              return f;
          }
          return QS(), null;
        }
        const l = yo(a, i, !0).locale(o);
        if (l.isValid())
          return l;
      }
      return t || QS(), null;
    }
  },
  toDate: (e, t) => Array.isArray(e) ? e.map((n) => JS(n, t)) : JS(e, t),
  toString: (e, t) => Array.isArray(e) ? e.map((n) => yo.isDayjs(n) ? n.format(t) : n) : yo.isDayjs(e) ? e.format(t) : e
};
function vo(e) {
  const t = LE();
  return O(O({}, e), t);
}
const hT = Symbol("PanelContextProps"), L0 = (e) => {
  Ft(hT, e);
}, ia = () => zt(hT, {}), If = {
  visibility: "hidden"
};
function Ll(e, t) {
  let {
    slots: n
  } = t;
  var o;
  const r = vo(e), {
    prefixCls: i,
    prevIcon: a = "‹",
    nextIcon: l = "›",
    superPrevIcon: s = "«",
    superNextIcon: u = "»",
    onSuperPrev: c,
    onSuperNext: d,
    onPrev: f,
    onNext: p
  } = r, {
    hideNextBtn: v,
    hidePrevBtn: g
  } = ia();
  return h("div", {
    class: i
  }, [c && h("button", {
    type: "button",
    onClick: c,
    tabindex: -1,
    class: `${i}-super-prev-btn`,
    style: g.value ? If : {}
  }, [s]), f && h("button", {
    type: "button",
    onClick: f,
    tabindex: -1,
    class: `${i}-prev-btn`,
    style: g.value ? If : {}
  }, [a]), h("div", {
    class: `${i}-view`
  }, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)]), p && h("button", {
    type: "button",
    onClick: p,
    tabindex: -1,
    class: `${i}-next-btn`,
    style: v.value ? If : {}
  }, [l]), d && h("button", {
    type: "button",
    onClick: d,
    tabindex: -1,
    class: `${i}-super-next-btn`,
    style: v.value ? If : {}
  }, [u])]);
}
Ll.displayName = "Header";
Ll.inheritAttrs = !1;
function H0(e) {
  const t = vo(e), {
    prefixCls: n,
    generateConfig: o,
    viewDate: r,
    onPrevDecades: i,
    onNextDecades: a
  } = t, {
    hideHeader: l
  } = ia();
  if (l)
    return null;
  const s = `${n}-header`, u = o.getYear(r), c = Math.floor(u / _a) * _a, d = c + _a - 1;
  return h(Ll, Q(Q({}, t), {}, {
    prefixCls: s,
    onSuperPrev: i,
    onSuperNext: a
  }), {
    default: () => [c, Le("-"), d]
  });
}
H0.displayName = "DecadeHeader";
H0.inheritAttrs = !1;
function gT(e, t, n, o, r) {
  let i = e.setHour(t, n);
  return i = e.setMinute(i, o), i = e.setSecond(i, r), i;
}
function ip(e, t, n) {
  if (!n)
    return t;
  let o = t;
  return o = e.setHour(o, e.getHour(n)), o = e.setMinute(o, e.getMinute(n)), o = e.setSecond(o, e.getSecond(n)), o;
}
function $7(e, t, n, o, r, i) {
  const a = Math.floor(e / o) * o;
  if (a < e)
    return [a, 60 - r, 60 - i];
  const l = Math.floor(t / r) * r;
  if (l < t)
    return [a, l, 60 - i];
  const s = Math.floor(n / i) * i;
  return [a, l, s];
}
function P7(e, t) {
  const n = e.getYear(t), o = e.getMonth(t) + 1, r = e.getEndDate(e.getFixedDate(`${n}-${o}-01`)), i = e.getDate(r), a = o < 10 ? `0${o}` : `${o}`;
  return `${n}-${a}-${i}`;
}
function Vs(e) {
  const {
    prefixCls: t,
    disabledDate: n,
    onSelect: o,
    picker: r,
    rowNum: i,
    colNum: a,
    prefixColumn: l,
    rowClassName: s,
    baseDate: u,
    getCellClassName: c,
    getCellText: d,
    getCellNode: f,
    getCellDate: p,
    generateConfig: v,
    titleCell: g,
    headerCells: m
  } = vo(e), {
    onDateMouseenter: x,
    onDateMouseleave: S,
    mode: C
  } = ia(), P = `${t}-cell`, $ = [];
  for (let I = 0; I < i; I += 1) {
    const w = [];
    let _;
    for (let M = 0; M < a; M += 1) {
      const N = I * a + M, A = p(u, N), H = cb({
        cellDate: A,
        mode: C.value,
        disabledDate: n,
        generateConfig: v
      });
      M === 0 && (_ = A, l && w.push(l(_)));
      const B = g && g(A);
      w.push(h("td", {
        key: M,
        title: B,
        class: Me(P, O({
          [`${P}-disabled`]: H,
          [`${P}-start`]: d(A) === 1 || r === "year" && Number(B) % 10 === 0,
          [`${P}-end`]: B === P7(v, A) || r === "year" && Number(B) % 10 === 9
        }, c(A))),
        onClick: (F) => {
          F.stopPropagation(), H || o(A);
        },
        onMouseenter: () => {
          !H && x && x(A);
        },
        onMouseleave: () => {
          !H && S && S(A);
        }
      }, [f ? f(A) : h("div", {
        class: `${P}-inner`
      }, [d(A)])]));
    }
    $.push(h("tr", {
      key: I,
      class: s && s(_)
    }, [w]));
  }
  return h("div", {
    class: `${t}-body`
  }, [h("table", {
    class: `${t}-content`
  }, [m && h("thead", null, [h("tr", null, [m])]), h("tbody", null, [$])])]);
}
Vs.displayName = "PanelBody";
Vs.inheritAttrs = !1;
const lb = 3, eC = 4;
function V0(e) {
  const t = vo(e), n = xi - 1, {
    prefixCls: o,
    viewDate: r,
    generateConfig: i
  } = t, a = `${o}-cell`, l = i.getYear(r), s = Math.floor(l / xi) * xi, u = Math.floor(l / _a) * _a, c = u + _a - 1, d = i.setYear(r, u - Math.ceil((lb * eC * xi - _a) / 2)), f = (p) => {
    const v = i.getYear(p), g = v + n;
    return {
      [`${a}-in-view`]: u <= v && g <= c,
      [`${a}-selected`]: v === s
    };
  };
  return h(Vs, Q(Q({}, t), {}, {
    rowNum: eC,
    colNum: lb,
    baseDate: d,
    getCellText: (p) => {
      const v = i.getYear(p);
      return `${v}-${v + n}`;
    },
    getCellClassName: f,
    getCellDate: (p, v) => i.addYear(p, v * xi)
  }), null);
}
V0.displayName = "DecadeBody";
V0.inheritAttrs = !1;
const _f = /* @__PURE__ */ new Map();
function O7(e, t) {
  let n;
  function o() {
    Nh(e) ? t() : n = Vt(() => {
      o();
    });
  }
  return o(), () => {
    Vt.cancel(n);
  };
}
function sb(e, t, n) {
  if (_f.get(e) && Vt.cancel(_f.get(e)), n <= 0) {
    _f.set(e, Vt(() => {
      e.scrollTop = t;
    }));
    return;
  }
  const r = (t - e.scrollTop) / n * 10;
  _f.set(e, Vt(() => {
    e.scrollTop += r, e.scrollTop !== t && sb(e, t, n - 10);
  }));
}
function pc(e, t) {
  let {
    onLeftRight: n,
    onCtrlLeftRight: o,
    onUpDown: r,
    onPageUpDown: i,
    onEnter: a
  } = t;
  const {
    which: l,
    ctrlKey: s,
    metaKey: u
  } = e;
  switch (l) {
    case it.LEFT:
      if (s || u) {
        if (o)
          return o(-1), !0;
      } else if (n)
        return n(-1), !0;
      break;
    case it.RIGHT:
      if (s || u) {
        if (o)
          return o(1), !0;
      } else if (n)
        return n(1), !0;
      break;
    case it.UP:
      if (r)
        return r(-1), !0;
      break;
    case it.DOWN:
      if (r)
        return r(1), !0;
      break;
    case it.PAGE_UP:
      if (i)
        return i(-1), !0;
      break;
    case it.PAGE_DOWN:
      if (i)
        return i(1), !0;
      break;
    case it.ENTER:
      if (a)
        return a(), !0;
      break;
  }
  return !1;
}
function vT(e, t, n, o) {
  let r = e;
  if (!r)
    switch (t) {
      case "time":
        r = o ? "hh:mm:ss a" : "HH:mm:ss";
        break;
      case "week":
        r = "gggg-wo";
        break;
      case "month":
        r = "YYYY-MM";
        break;
      case "quarter":
        r = "YYYY-[Q]Q";
        break;
      case "year":
        r = "YYYY";
        break;
      default:
        r = n ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
    }
  return r;
}
function mT(e, t, n) {
  const o = e === "time" ? 8 : 10, r = typeof t == "function" ? t(n.getNow()).length : t.length;
  return Math.max(o, r) + 2;
}
let Ec = null;
const Tf = /* @__PURE__ */ new Set();
function k7(e) {
  return !Ec && typeof window < "u" && window.addEventListener && (Ec = (t) => {
    [...Tf].forEach((n) => {
      n(t);
    });
  }, window.addEventListener("mousedown", Ec)), Tf.add(e), () => {
    Tf.delete(e), Tf.size === 0 && (window.removeEventListener("mousedown", Ec), Ec = null);
  };
}
function I7(e) {
  var t;
  const n = e.target;
  return e.composed && n.shadowRoot && ((t = e.composedPath) === null || t === void 0 ? void 0 : t.call(e)[0]) || n;
}
const _7 = (e) => e === "month" || e === "date" ? "year" : e, T7 = (e) => e === "date" ? "month" : e, M7 = (e) => e === "month" || e === "date" ? "quarter" : e, E7 = (e) => e === "date" ? "week" : e, D7 = {
  year: _7,
  month: T7,
  quarter: M7,
  week: E7,
  time: null,
  date: null
};
function bT(e, t) {
  return process.env.NODE_ENV === "test" ? !1 : e.some((n) => n && n.contains(t));
}
const xi = 10, _a = xi * 10;
function j0(e) {
  const t = vo(e), {
    prefixCls: n,
    onViewDateChange: o,
    generateConfig: r,
    viewDate: i,
    operationRef: a,
    onSelect: l,
    onPanelChange: s
  } = t, u = `${n}-decade-panel`;
  a.value = {
    onKeydown: (f) => pc(f, {
      onLeftRight: (p) => {
        l(r.addYear(i, p * xi), "key");
      },
      onCtrlLeftRight: (p) => {
        l(r.addYear(i, p * _a), "key");
      },
      onUpDown: (p) => {
        l(r.addYear(i, p * xi * lb), "key");
      },
      onEnter: () => {
        s("year", i);
      }
    })
  };
  const c = (f) => {
    const p = r.addYear(i, f * _a);
    o(p), s(null, p);
  }, d = (f) => {
    l(f, "mouse"), s("year", f);
  };
  return h("div", {
    class: u
  }, [h(H0, Q(Q({}, t), {}, {
    prefixCls: n,
    onPrevDecades: () => {
      c(-1);
    },
    onNextDecades: () => {
      c(1);
    }
  }), null), h(V0, Q(Q({}, t), {}, {
    prefixCls: n,
    onSelect: d
  }), null)]);
}
j0.displayName = "DecadePanel";
j0.inheritAttrs = !1;
const ap = 7;
function js(e, t) {
  if (!e && !t)
    return !0;
  if (!e || !t)
    return !1;
}
function A7(e, t, n) {
  const o = js(t, n);
  if (typeof o == "boolean")
    return o;
  const r = Math.floor(e.getYear(t) / 10), i = Math.floor(e.getYear(n) / 10);
  return r === i;
}
function Kh(e, t, n) {
  const o = js(t, n);
  return typeof o == "boolean" ? o : e.getYear(t) === e.getYear(n);
}
function ub(e, t) {
  return Math.floor(e.getMonth(t) / 3) + 1;
}
function yT(e, t, n) {
  const o = js(t, n);
  return typeof o == "boolean" ? o : Kh(e, t, n) && ub(e, t) === ub(e, n);
}
function W0(e, t, n) {
  const o = js(t, n);
  return typeof o == "boolean" ? o : Kh(e, t, n) && e.getMonth(t) === e.getMonth(n);
}
function Ta(e, t, n) {
  const o = js(t, n);
  return typeof o == "boolean" ? o : e.getYear(t) === e.getYear(n) && e.getMonth(t) === e.getMonth(n) && e.getDate(t) === e.getDate(n);
}
function N7(e, t, n) {
  const o = js(t, n);
  return typeof o == "boolean" ? o : e.getHour(t) === e.getHour(n) && e.getMinute(t) === e.getMinute(n) && e.getSecond(t) === e.getSecond(n);
}
function xT(e, t, n, o) {
  const r = js(n, o);
  return typeof r == "boolean" ? r : e.locale.getWeek(t, n) === e.locale.getWeek(t, o);
}
function _u(e, t, n) {
  return Ta(e, t, n) && N7(e, t, n);
}
function Mf(e, t, n, o) {
  return !t || !n || !o ? !1 : !Ta(e, t, o) && !Ta(e, n, o) && e.isAfter(o, t) && e.isAfter(n, o);
}
function R7(e, t, n) {
  const o = t.locale.getWeekFirstDay(e), r = t.setDate(n, 1), i = t.getWeekDay(r);
  let a = t.addDate(r, o - i);
  return t.getMonth(a) === t.getMonth(n) && t.getDate(a) > 1 && (a = t.addDate(a, -7)), a;
}
function Zc(e, t, n) {
  let o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 1;
  switch (t) {
    case "year":
      return n.addYear(e, o * 10);
    case "quarter":
    case "month":
      return n.addYear(e, o);
    default:
      return n.addMonth(e, o);
  }
}
function Yo(e, t) {
  let {
    generateConfig: n,
    locale: o,
    format: r
  } = t;
  return typeof r == "function" ? r(e) : n.locale.format(o.locale, e, r);
}
function wT(e, t) {
  let {
    generateConfig: n,
    locale: o,
    formatList: r
  } = t;
  return !e || typeof r[0] == "function" ? null : n.locale.parse(o.locale, e, r);
}
function cb(e) {
  let {
    cellDate: t,
    mode: n,
    disabledDate: o,
    generateConfig: r
  } = e;
  if (!o) return !1;
  const i = (a, l, s) => {
    let u = l;
    for (; u <= s; ) {
      let c;
      switch (a) {
        case "date": {
          if (c = r.setDate(t, u), !o(c))
            return !1;
          break;
        }
        case "month": {
          if (c = r.setMonth(t, u), !cb({
            cellDate: c,
            mode: "month",
            generateConfig: r,
            disabledDate: o
          }))
            return !1;
          break;
        }
        case "year": {
          if (c = r.setYear(t, u), !cb({
            cellDate: c,
            mode: "year",
            generateConfig: r,
            disabledDate: o
          }))
            return !1;
          break;
        }
      }
      u += 1;
    }
    return !0;
  };
  switch (n) {
    case "date":
    case "week":
      return o(t);
    case "month": {
      const l = r.getDate(r.getEndDate(t));
      return i("date", 1, l);
    }
    case "quarter": {
      const a = Math.floor(r.getMonth(t) / 3) * 3, l = a + 2;
      return i("month", a, l);
    }
    case "year":
      return i("month", 0, 11);
    case "decade": {
      const a = r.getYear(t), l = Math.floor(a / xi) * xi, s = l + xi - 1;
      return i("year", l, s);
    }
  }
}
function K0(e) {
  const t = vo(e), {
    hideHeader: n
  } = ia();
  if (n.value)
    return null;
  const {
    prefixCls: o,
    generateConfig: r,
    locale: i,
    value: a,
    format: l
  } = t, s = `${o}-header`;
  return h(Ll, {
    prefixCls: s
  }, {
    default: () => [a ? Yo(a, {
      locale: i,
      format: l,
      generateConfig: r
    }) : " "]
  });
}
K0.displayName = "TimeHeader";
K0.inheritAttrs = !1;
const Ef = be({
  name: "TimeUnitColumn",
  props: ["prefixCls", "units", "onSelect", "value", "active", "hideDisabledOptions"],
  setup(e) {
    const {
      open: t
    } = ia(), n = $e(null), o = ce(/* @__PURE__ */ new Map()), r = ce();
    return ke(() => e.value, () => {
      const i = o.value.get(e.value);
      i && t.value !== !1 && sb(n.value, i.offsetTop, 120);
    }), qt(() => {
      var i;
      (i = r.value) === null || i === void 0 || i.call(r);
    }), ke(t, () => {
      var i;
      (i = r.value) === null || i === void 0 || i.call(r), Yt(() => {
        if (t.value) {
          const a = o.value.get(e.value);
          a && (r.value = O7(a, () => {
            sb(n.value, a.offsetTop, 0);
          }));
        }
      });
    }, {
      immediate: !0,
      flush: "post"
    }), () => {
      const {
        prefixCls: i,
        units: a,
        onSelect: l,
        value: s,
        active: u,
        hideDisabledOptions: c
      } = e, d = `${i}-cell`;
      return h("ul", {
        class: Me(`${i}-column`, {
          [`${i}-column-active`]: u
        }),
        ref: n,
        style: {
          position: "relative"
        }
      }, [a.map((f) => c && f.disabled ? null : h("li", {
        key: f.value,
        ref: (p) => {
          o.value.set(f.value, p);
        },
        class: Me(d, {
          [`${d}-disabled`]: f.disabled,
          [`${d}-selected`]: s === f.value
        }),
        onClick: () => {
          f.disabled || l(f.value);
        }
      }, [h("div", {
        class: `${d}-inner`
      }, [f.label])]))]);
    };
  }
});
function ST(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "0", o = String(e);
  for (; o.length < t; )
    o = `${n}${e}`;
  return o;
}
const z7 = function() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  return t;
};
function CT(e) {
  return e == null ? [] : Array.isArray(e) ? e : [e];
}
function $T(e) {
  const t = {};
  return Object.keys(e).forEach((n) => {
    (n.startsWith("data-") || n.startsWith("aria-") || n === "role" || n === "name") && !n.startsWith("data-__") && (t[n] = e[n]);
  }), t;
}
function rn(e, t) {
  return e ? e[t] : null;
}
function Ur(e, t, n) {
  const o = [rn(e, 0), rn(e, 1)];
  return o[n] = typeof t == "function" ? t(o[n]) : t, !o[0] && !o[1] ? null : o;
}
function dv(e, t, n, o) {
  const r = [];
  for (let i = e; i <= t; i += n)
    r.push({
      label: ST(i, 2),
      value: i,
      disabled: (o || []).includes(i)
    });
  return r;
}
const F7 = be({
  compatConfig: {
    MODE: 3
  },
  name: "TimeBody",
  inheritAttrs: !1,
  props: ["generateConfig", "prefixCls", "operationRef", "activeColumnIndex", "value", "showHour", "showMinute", "showSecond", "use12Hours", "hourStep", "minuteStep", "secondStep", "disabledHours", "disabledMinutes", "disabledSeconds", "disabledTime", "hideDisabledOptions", "onSelect"],
  setup(e) {
    const t = E(() => e.value ? e.generateConfig.getHour(e.value) : -1), n = E(() => e.use12Hours ? t.value >= 12 : !1), o = E(() => e.use12Hours ? t.value % 12 : t.value), r = E(() => e.value ? e.generateConfig.getMinute(e.value) : -1), i = E(() => e.value ? e.generateConfig.getSecond(e.value) : -1), a = ce(e.generateConfig.getNow()), l = ce(), s = ce(), u = ce();
    iy(() => {
      a.value = e.generateConfig.getNow();
    }), It(() => {
      if (e.disabledTime) {
        const m = e.disabledTime(a);
        [l.value, s.value, u.value] = [m.disabledHours, m.disabledMinutes, m.disabledSeconds];
      } else
        [l.value, s.value, u.value] = [e.disabledHours, e.disabledMinutes, e.disabledSeconds];
    });
    const c = (m, x, S, C) => {
      let P = e.value || e.generateConfig.getNow();
      const $ = Math.max(0, x), I = Math.max(0, S), w = Math.max(0, C);
      return P = gT(e.generateConfig, P, !e.use12Hours || !m ? $ : $ + 12, I, w), P;
    }, d = E(() => {
      var m;
      return dv(0, 23, (m = e.hourStep) !== null && m !== void 0 ? m : 1, l.value && l.value());
    }), f = E(() => {
      if (!e.use12Hours)
        return [!1, !1];
      const m = [!0, !0];
      return d.value.forEach((x) => {
        let {
          disabled: S,
          value: C
        } = x;
        S || (C >= 12 ? m[1] = !1 : m[0] = !1);
      }), m;
    }), p = E(() => e.use12Hours ? d.value.filter(n.value ? (m) => m.value >= 12 : (m) => m.value < 12).map((m) => {
      const x = m.value % 12, S = x === 0 ? "12" : ST(x, 2);
      return O(O({}, m), {
        label: S,
        value: x
      });
    }) : d.value), v = E(() => {
      var m;
      return dv(0, 59, (m = e.minuteStep) !== null && m !== void 0 ? m : 1, s.value && s.value(t.value));
    }), g = E(() => {
      var m;
      return dv(0, 59, (m = e.secondStep) !== null && m !== void 0 ? m : 1, u.value && u.value(t.value, r.value));
    });
    return () => {
      const {
        prefixCls: m,
        operationRef: x,
        activeColumnIndex: S,
        showHour: C,
        showMinute: P,
        showSecond: $,
        use12Hours: I,
        hideDisabledOptions: w,
        onSelect: _
      } = e, M = [], N = `${m}-content`, A = `${m}-time-panel`;
      x.value = {
        onUpDown: (F) => {
          const R = M[S];
          if (R) {
            const X = R.units.findIndex((ee) => ee.value === R.value), j = R.units.length;
            for (let ee = 1; ee < j; ee += 1) {
              const W = R.units[(X + F * ee + j) % j];
              if (W.disabled !== !0) {
                R.onSelect(W.value);
                break;
              }
            }
          }
        }
      };
      function H(F, R, X, j, ee) {
        F !== !1 && M.push({
          node: Xn(R, {
            prefixCls: A,
            value: X,
            active: S === M.length,
            onSelect: ee,
            units: j,
            hideDisabledOptions: w
          }),
          onSelect: ee,
          value: X,
          units: j
        });
      }
      H(C, h(Ef, {
        key: "hour"
      }, null), o.value, p.value, (F) => {
        _(c(n.value, F, r.value, i.value), "mouse");
      }), H(P, h(Ef, {
        key: "minute"
      }, null), r.value, v.value, (F) => {
        _(c(n.value, o.value, F, i.value), "mouse");
      }), H($, h(Ef, {
        key: "second"
      }, null), i.value, g.value, (F) => {
        _(c(n.value, o.value, r.value, F), "mouse");
      });
      let B = -1;
      return typeof n.value == "boolean" && (B = n.value ? 1 : 0), H(I === !0, h(Ef, {
        key: "12hours"
      }, null), B, [{
        label: "AM",
        value: 0,
        disabled: f.value[0]
      }, {
        label: "PM",
        value: 1,
        disabled: f.value[1]
      }], (F) => {
        _(c(!!F, o.value, r.value, i.value), "mouse");
      }), h("div", {
        class: N
      }, [M.map((F) => {
        let {
          node: R
        } = F;
        return R;
      })]);
    };
  }
}), B7 = (e) => e.filter((t) => t !== !1).length;
function qh(e) {
  const t = vo(e), {
    generateConfig: n,
    format: o = "HH:mm:ss",
    prefixCls: r,
    active: i,
    operationRef: a,
    showHour: l,
    showMinute: s,
    showSecond: u,
    use12Hours: c = !1,
    onSelect: d,
    value: f
  } = t, p = `${r}-time-panel`, v = ce(), g = ce(-1), m = B7([l, s, u, c]);
  return a.value = {
    onKeydown: (x) => pc(x, {
      onLeftRight: (S) => {
        g.value = (g.value + S + m) % m;
      },
      onUpDown: (S) => {
        g.value === -1 ? g.value = 0 : v.value && v.value.onUpDown(S);
      },
      onEnter: () => {
        d(f || n.getNow(), "key"), g.value = -1;
      }
    }),
    onBlur: () => {
      g.value = -1;
    }
  }, h("div", {
    class: Me(p, {
      [`${p}-active`]: i
    })
  }, [h(K0, Q(Q({}, t), {}, {
    format: o,
    prefixCls: r
  }), null), h(F7, Q(Q({}, t), {}, {
    prefixCls: r,
    activeColumnIndex: g.value,
    operationRef: v
  }), null)]);
}
qh.displayName = "TimePanel";
qh.inheritAttrs = !1;
function Yh(e) {
  let {
    cellPrefixCls: t,
    generateConfig: n,
    rangedValue: o,
    hoverRangedValue: r,
    isInView: i,
    isSameCell: a,
    offsetCell: l,
    today: s,
    value: u
  } = e;
  function c(d) {
    const f = l(d, -1), p = l(d, 1), v = rn(o, 0), g = rn(o, 1), m = rn(r, 0), x = rn(r, 1), S = Mf(n, m, x, d);
    function C(M) {
      return a(v, M);
    }
    function P(M) {
      return a(g, M);
    }
    const $ = a(m, d), I = a(x, d), w = (S || I) && (!i(f) || P(f)), _ = (S || $) && (!i(p) || C(p));
    return {
      // In view
      [`${t}-in-view`]: i(d),
      // Range
      [`${t}-in-range`]: Mf(n, v, g, d),
      [`${t}-range-start`]: C(d),
      [`${t}-range-end`]: P(d),
      [`${t}-range-start-single`]: C(d) && !g,
      [`${t}-range-end-single`]: P(d) && !v,
      [`${t}-range-start-near-hover`]: C(d) && (a(f, m) || Mf(n, m, x, f)),
      [`${t}-range-end-near-hover`]: P(d) && (a(p, x) || Mf(n, m, x, p)),
      // Range Hover
      [`${t}-range-hover`]: S,
      [`${t}-range-hover-start`]: $,
      [`${t}-range-hover-end`]: I,
      // Range Edge
      [`${t}-range-hover-edge-start`]: w,
      [`${t}-range-hover-edge-end`]: _,
      [`${t}-range-hover-edge-start-near-range`]: w && a(f, g),
      [`${t}-range-hover-edge-end-near-range`]: _ && a(p, v),
      // Others
      [`${t}-today`]: a(s, d),
      [`${t}-selected`]: a(u, d)
    };
  }
  return c;
}
const PT = Symbol("RangeContextProps"), L7 = (e) => {
  Ft(PT, e);
}, Ld = () => zt(PT, {
  rangedValue: ce(),
  hoverRangedValue: ce(),
  inRange: ce(),
  panelPosition: ce()
}), H7 = be({
  compatConfig: {
    MODE: 3
  },
  name: "PanelContextProvider",
  inheritAttrs: !1,
  props: {
    value: {
      type: Object,
      default: () => ({})
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = {
      rangedValue: ce(e.value.rangedValue),
      hoverRangedValue: ce(e.value.hoverRangedValue),
      inRange: ce(e.value.inRange),
      panelPosition: ce(e.value.panelPosition)
    };
    return L7(o), ke(() => e.value, () => {
      Object.keys(e.value).forEach((r) => {
        o[r] && (o[r].value = e.value[r]);
      });
    }), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
});
function Gh(e) {
  const t = vo(e), {
    prefixCls: n,
    generateConfig: o,
    prefixColumn: r,
    locale: i,
    rowCount: a,
    viewDate: l,
    value: s,
    dateRender: u
  } = t, {
    rangedValue: c,
    hoverRangedValue: d
  } = Ld(), f = R7(i.locale, o, l), p = `${n}-cell`, v = o.locale.getWeekFirstDay(i.locale), g = o.getNow(), m = [], x = i.shortWeekDays || (o.locale.getShortWeekDays ? o.locale.getShortWeekDays(i.locale) : []);
  r && m.push(h("th", {
    key: "empty",
    "aria-label": "empty cell"
  }, null));
  for (let P = 0; P < ap; P += 1)
    m.push(h("th", {
      key: P
    }, [x[(P + v) % ap]]));
  const S = Yh({
    cellPrefixCls: p,
    today: g,
    value: s,
    generateConfig: o,
    rangedValue: r ? null : c.value,
    hoverRangedValue: r ? null : d.value,
    isSameCell: (P, $) => Ta(o, P, $),
    isInView: (P) => W0(o, P, l),
    offsetCell: (P, $) => o.addDate(P, $)
  }), C = u ? (P) => u({
    current: P,
    today: g
  }) : void 0;
  return h(Vs, Q(Q({}, t), {}, {
    rowNum: a,
    colNum: ap,
    baseDate: f,
    getCellNode: C,
    getCellText: o.getDate,
    getCellClassName: S,
    getCellDate: o.addDate,
    titleCell: (P) => Yo(P, {
      locale: i,
      format: "YYYY-MM-DD",
      generateConfig: o
    }),
    headerCells: m
  }), null);
}
Gh.displayName = "DateBody";
Gh.inheritAttrs = !1;
Gh.props = [
  "prefixCls",
  "generateConfig",
  "value?",
  "viewDate",
  "locale",
  "rowCount",
  "onSelect",
  "dateRender?",
  "disabledDate?",
  // Used for week panel
  "prefixColumn?",
  "rowClassName?"
];
function q0(e) {
  const t = vo(e), {
    prefixCls: n,
    generateConfig: o,
    locale: r,
    viewDate: i,
    onNextMonth: a,
    onPrevMonth: l,
    onNextYear: s,
    onPrevYear: u,
    onYearClick: c,
    onMonthClick: d
  } = t, {
    hideHeader: f
  } = ia();
  if (f.value)
    return null;
  const p = `${n}-header`, v = r.shortMonths || (o.locale.getShortMonths ? o.locale.getShortMonths(r.locale) : []), g = o.getMonth(i), m = h("button", {
    type: "button",
    key: "year",
    onClick: c,
    tabindex: -1,
    class: `${n}-year-btn`
  }, [Yo(i, {
    locale: r,
    format: r.yearFormat,
    generateConfig: o
  })]), x = h("button", {
    type: "button",
    key: "month",
    onClick: d,
    tabindex: -1,
    class: `${n}-month-btn`
  }, [r.monthFormat ? Yo(i, {
    locale: r,
    format: r.monthFormat,
    generateConfig: o
  }) : v[g]]), S = r.monthBeforeYear ? [x, m] : [m, x];
  return h(Ll, Q(Q({}, t), {}, {
    prefixCls: p,
    onSuperPrev: u,
    onPrev: l,
    onNext: a,
    onSuperNext: s
  }), {
    default: () => [S]
  });
}
q0.displayName = "DateHeader";
q0.inheritAttrs = !1;
const V7 = 6;
function Hd(e) {
  const t = vo(e), {
    prefixCls: n,
    panelName: o = "date",
    keyboardConfig: r,
    active: i,
    operationRef: a,
    generateConfig: l,
    value: s,
    viewDate: u,
    onViewDateChange: c,
    onPanelChange: d,
    onSelect: f
  } = t, p = `${n}-${o}-panel`;
  a.value = {
    onKeydown: (m) => pc(m, O({
      onLeftRight: (x) => {
        f(l.addDate(s || u, x), "key");
      },
      onCtrlLeftRight: (x) => {
        f(l.addYear(s || u, x), "key");
      },
      onUpDown: (x) => {
        f(l.addDate(s || u, x * ap), "key");
      },
      onPageUpDown: (x) => {
        f(l.addMonth(s || u, x), "key");
      }
    }, r))
  };
  const v = (m) => {
    const x = l.addYear(u, m);
    c(x), d(null, x);
  }, g = (m) => {
    const x = l.addMonth(u, m);
    c(x), d(null, x);
  };
  return h("div", {
    class: Me(p, {
      [`${p}-active`]: i
    })
  }, [h(q0, Q(Q({}, t), {}, {
    prefixCls: n,
    value: s,
    viewDate: u,
    onPrevYear: () => {
      v(-1);
    },
    onNextYear: () => {
      v(1);
    },
    onPrevMonth: () => {
      g(-1);
    },
    onNextMonth: () => {
      g(1);
    },
    onMonthClick: () => {
      d("month", u);
    },
    onYearClick: () => {
      d("year", u);
    }
  }), null), h(Gh, Q(Q({}, t), {}, {
    onSelect: (m) => f(m, "mouse"),
    prefixCls: n,
    value: s,
    viewDate: u,
    rowCount: V7
  }), null)]);
}
Hd.displayName = "DatePanel";
Hd.inheritAttrs = !1;
const tC = z7("date", "time");
function Y0(e) {
  const t = vo(e), {
    prefixCls: n,
    operationRef: o,
    generateConfig: r,
    value: i,
    defaultValue: a,
    disabledTime: l,
    showTime: s,
    onSelect: u
  } = t, c = `${n}-datetime-panel`, d = ce(null), f = ce({}), p = ce({}), v = typeof s == "object" ? O({}, s) : {};
  function g(C) {
    const P = tC.indexOf(d.value) + C;
    return tC[P] || null;
  }
  const m = (C) => {
    p.value.onBlur && p.value.onBlur(C), d.value = null;
  };
  o.value = {
    onKeydown: (C) => {
      if (C.which === it.TAB) {
        const P = g(C.shiftKey ? -1 : 1);
        return d.value = P, P && C.preventDefault(), !0;
      }
      if (d.value) {
        const P = d.value === "date" ? f : p;
        return P.value && P.value.onKeydown && P.value.onKeydown(C), !0;
      }
      return [it.LEFT, it.RIGHT, it.UP, it.DOWN].includes(C.which) ? (d.value = "date", !0) : !1;
    },
    onBlur: m,
    onClose: m
  };
  const x = (C, P) => {
    let $ = C;
    P === "date" && !i && v.defaultValue ? ($ = r.setHour($, r.getHour(v.defaultValue)), $ = r.setMinute($, r.getMinute(v.defaultValue)), $ = r.setSecond($, r.getSecond(v.defaultValue))) : P === "time" && !i && a && ($ = r.setYear($, r.getYear(a)), $ = r.setMonth($, r.getMonth(a)), $ = r.setDate($, r.getDate(a))), u && u($, "mouse");
  }, S = l ? l(i || null) : {};
  return h("div", {
    class: Me(c, {
      [`${c}-active`]: d.value
    })
  }, [h(Hd, Q(Q({}, t), {}, {
    operationRef: f,
    active: d.value === "date",
    onSelect: (C) => {
      x(ip(r, C, !i && typeof s == "object" ? s.defaultValue : null), "date");
    }
  }), null), h(qh, Q(Q(Q(Q({}, t), {}, {
    format: void 0
  }, v), S), {}, {
    disabledTime: null,
    defaultValue: void 0,
    operationRef: p,
    active: d.value === "time",
    onSelect: (C) => {
      x(C, "time");
    }
  }), null)]);
}
Y0.displayName = "DatetimePanel";
Y0.inheritAttrs = !1;
function G0(e) {
  const t = vo(e), {
    prefixCls: n,
    generateConfig: o,
    locale: r,
    value: i
  } = t, a = `${n}-cell`, l = (c) => h("td", {
    key: "week",
    class: Me(a, `${a}-week`)
  }, [o.locale.getWeek(r.locale, c)]), s = `${n}-week-panel-row`, u = (c) => Me(s, {
    [`${s}-selected`]: xT(o, r.locale, i, c)
  });
  return h(Hd, Q(Q({}, t), {}, {
    panelName: "week",
    prefixColumn: l,
    rowClassName: u,
    keyboardConfig: {
      onLeftRight: null
    }
  }), null);
}
G0.displayName = "WeekPanel";
G0.inheritAttrs = !1;
function U0(e) {
  const t = vo(e), {
    prefixCls: n,
    generateConfig: o,
    locale: r,
    viewDate: i,
    onNextYear: a,
    onPrevYear: l,
    onYearClick: s
  } = t, {
    hideHeader: u
  } = ia();
  if (u.value)
    return null;
  const c = `${n}-header`;
  return h(Ll, Q(Q({}, t), {}, {
    prefixCls: c,
    onSuperPrev: l,
    onSuperNext: a
  }), {
    default: () => [h("button", {
      type: "button",
      onClick: s,
      class: `${n}-year-btn`
    }, [Yo(i, {
      locale: r,
      format: r.yearFormat,
      generateConfig: o
    })])]
  });
}
U0.displayName = "MonthHeader";
U0.inheritAttrs = !1;
const OT = 3, j7 = 4;
function X0(e) {
  const t = vo(e), {
    prefixCls: n,
    locale: o,
    value: r,
    viewDate: i,
    generateConfig: a,
    monthCellRender: l
  } = t, {
    rangedValue: s,
    hoverRangedValue: u
  } = Ld(), c = `${n}-cell`, d = Yh({
    cellPrefixCls: c,
    value: r,
    generateConfig: a,
    rangedValue: s.value,
    hoverRangedValue: u.value,
    isSameCell: (g, m) => W0(a, g, m),
    isInView: () => !0,
    offsetCell: (g, m) => a.addMonth(g, m)
  }), f = o.shortMonths || (a.locale.getShortMonths ? a.locale.getShortMonths(o.locale) : []), p = a.setMonth(i, 0), v = l ? (g) => l({
    current: g,
    locale: o
  }) : void 0;
  return h(Vs, Q(Q({}, t), {}, {
    rowNum: j7,
    colNum: OT,
    baseDate: p,
    getCellNode: v,
    getCellText: (g) => o.monthFormat ? Yo(g, {
      locale: o,
      format: o.monthFormat,
      generateConfig: a
    }) : f[a.getMonth(g)],
    getCellClassName: d,
    getCellDate: a.addMonth,
    titleCell: (g) => Yo(g, {
      locale: o,
      format: "YYYY-MM",
      generateConfig: a
    })
  }), null);
}
X0.displayName = "MonthBody";
X0.inheritAttrs = !1;
function Q0(e) {
  const t = vo(e), {
    prefixCls: n,
    operationRef: o,
    onViewDateChange: r,
    generateConfig: i,
    value: a,
    viewDate: l,
    onPanelChange: s,
    onSelect: u
  } = t, c = `${n}-month-panel`;
  o.value = {
    onKeydown: (f) => pc(f, {
      onLeftRight: (p) => {
        u(i.addMonth(a || l, p), "key");
      },
      onCtrlLeftRight: (p) => {
        u(i.addYear(a || l, p), "key");
      },
      onUpDown: (p) => {
        u(i.addMonth(a || l, p * OT), "key");
      },
      onEnter: () => {
        s("date", a || l);
      }
    })
  };
  const d = (f) => {
    const p = i.addYear(l, f);
    r(p), s(null, p);
  };
  return h("div", {
    class: c
  }, [h(U0, Q(Q({}, t), {}, {
    prefixCls: n,
    onPrevYear: () => {
      d(-1);
    },
    onNextYear: () => {
      d(1);
    },
    onYearClick: () => {
      s("year", l);
    }
  }), null), h(X0, Q(Q({}, t), {}, {
    prefixCls: n,
    onSelect: (f) => {
      u(f, "mouse"), s("date", f);
    }
  }), null)]);
}
Q0.displayName = "MonthPanel";
Q0.inheritAttrs = !1;
function Z0(e) {
  const t = vo(e), {
    prefixCls: n,
    generateConfig: o,
    locale: r,
    viewDate: i,
    onNextYear: a,
    onPrevYear: l,
    onYearClick: s
  } = t, {
    hideHeader: u
  } = ia();
  if (u.value)
    return null;
  const c = `${n}-header`;
  return h(Ll, Q(Q({}, t), {}, {
    prefixCls: c,
    onSuperPrev: l,
    onSuperNext: a
  }), {
    default: () => [h("button", {
      type: "button",
      onClick: s,
      class: `${n}-year-btn`
    }, [Yo(i, {
      locale: r,
      format: r.yearFormat,
      generateConfig: o
    })])]
  });
}
Z0.displayName = "QuarterHeader";
Z0.inheritAttrs = !1;
const W7 = 4, K7 = 1;
function J0(e) {
  const t = vo(e), {
    prefixCls: n,
    locale: o,
    value: r,
    viewDate: i,
    generateConfig: a
  } = t, {
    rangedValue: l,
    hoverRangedValue: s
  } = Ld(), u = `${n}-cell`, c = Yh({
    cellPrefixCls: u,
    value: r,
    generateConfig: a,
    rangedValue: l.value,
    hoverRangedValue: s.value,
    isSameCell: (f, p) => yT(a, f, p),
    isInView: () => !0,
    offsetCell: (f, p) => a.addMonth(f, p * 3)
  }), d = a.setDate(a.setMonth(i, 0), 1);
  return h(Vs, Q(Q({}, t), {}, {
    rowNum: K7,
    colNum: W7,
    baseDate: d,
    getCellText: (f) => Yo(f, {
      locale: o,
      format: o.quarterFormat || "[Q]Q",
      generateConfig: a
    }),
    getCellClassName: c,
    getCellDate: (f, p) => a.addMonth(f, p * 3),
    titleCell: (f) => Yo(f, {
      locale: o,
      format: "YYYY-[Q]Q",
      generateConfig: a
    })
  }), null);
}
J0.displayName = "QuarterBody";
J0.inheritAttrs = !1;
function ex(e) {
  const t = vo(e), {
    prefixCls: n,
    operationRef: o,
    onViewDateChange: r,
    generateConfig: i,
    value: a,
    viewDate: l,
    onPanelChange: s,
    onSelect: u
  } = t, c = `${n}-quarter-panel`;
  o.value = {
    onKeydown: (f) => pc(f, {
      onLeftRight: (p) => {
        u(i.addMonth(a || l, p * 3), "key");
      },
      onCtrlLeftRight: (p) => {
        u(i.addYear(a || l, p), "key");
      },
      onUpDown: (p) => {
        u(i.addYear(a || l, p), "key");
      }
    })
  };
  const d = (f) => {
    const p = i.addYear(l, f);
    r(p), s(null, p);
  };
  return h("div", {
    class: c
  }, [h(Z0, Q(Q({}, t), {}, {
    prefixCls: n,
    onPrevYear: () => {
      d(-1);
    },
    onNextYear: () => {
      d(1);
    },
    onYearClick: () => {
      s("year", l);
    }
  }), null), h(J0, Q(Q({}, t), {}, {
    prefixCls: n,
    onSelect: (f) => {
      u(f, "mouse");
    }
  }), null)]);
}
ex.displayName = "QuarterPanel";
ex.inheritAttrs = !1;
function tx(e) {
  const t = vo(e), {
    prefixCls: n,
    generateConfig: o,
    viewDate: r,
    onPrevDecade: i,
    onNextDecade: a,
    onDecadeClick: l
  } = t, {
    hideHeader: s
  } = ia();
  if (s.value)
    return null;
  const u = `${n}-header`, c = o.getYear(r), d = Math.floor(c / Ol) * Ol, f = d + Ol - 1;
  return h(Ll, Q(Q({}, t), {}, {
    prefixCls: u,
    onSuperPrev: i,
    onSuperNext: a
  }), {
    default: () => [h("button", {
      type: "button",
      onClick: l,
      class: `${n}-decade-btn`
    }, [d, Le("-"), f])]
  });
}
tx.displayName = "YearHeader";
tx.inheritAttrs = !1;
const db = 3, nC = 4;
function nx(e) {
  const t = vo(e), {
    prefixCls: n,
    value: o,
    viewDate: r,
    locale: i,
    generateConfig: a
  } = t, {
    rangedValue: l,
    hoverRangedValue: s
  } = Ld(), u = `${n}-cell`, c = a.getYear(r), d = Math.floor(c / Ol) * Ol, f = d + Ol - 1, p = a.setYear(r, d - Math.ceil((db * nC - Ol) / 2)), v = (m) => {
    const x = a.getYear(m);
    return d <= x && x <= f;
  }, g = Yh({
    cellPrefixCls: u,
    value: o,
    generateConfig: a,
    rangedValue: l.value,
    hoverRangedValue: s.value,
    isSameCell: (m, x) => Kh(a, m, x),
    isInView: v,
    offsetCell: (m, x) => a.addYear(m, x)
  });
  return h(Vs, Q(Q({}, t), {}, {
    rowNum: nC,
    colNum: db,
    baseDate: p,
    getCellText: a.getYear,
    getCellClassName: g,
    getCellDate: a.addYear,
    titleCell: (m) => Yo(m, {
      locale: i,
      format: "YYYY",
      generateConfig: a
    })
  }), null);
}
nx.displayName = "YearBody";
nx.inheritAttrs = !1;
const Ol = 10;
function ox(e) {
  const t = vo(e), {
    prefixCls: n,
    operationRef: o,
    onViewDateChange: r,
    generateConfig: i,
    value: a,
    viewDate: l,
    sourceMode: s,
    onSelect: u,
    onPanelChange: c
  } = t, d = `${n}-year-panel`;
  o.value = {
    onKeydown: (p) => pc(p, {
      onLeftRight: (v) => {
        u(i.addYear(a || l, v), "key");
      },
      onCtrlLeftRight: (v) => {
        u(i.addYear(a || l, v * Ol), "key");
      },
      onUpDown: (v) => {
        u(i.addYear(a || l, v * db), "key");
      },
      onEnter: () => {
        c(s === "date" ? "date" : "month", a || l);
      }
    })
  };
  const f = (p) => {
    const v = i.addYear(l, p * 10);
    r(v), c(null, v);
  };
  return h("div", {
    class: d
  }, [h(tx, Q(Q({}, t), {}, {
    prefixCls: n,
    onPrevDecade: () => {
      f(-1);
    },
    onNextDecade: () => {
      f(1);
    },
    onDecadeClick: () => {
      c("decade", l);
    }
  }), null), h(nx, Q(Q({}, t), {}, {
    prefixCls: n,
    onSelect: (p) => {
      c(s === "date" ? "date" : "month", p), u(p, "mouse");
    }
  }), null)]);
}
ox.displayName = "YearPanel";
ox.inheritAttrs = !1;
function kT(e, t, n) {
  return n ? h("div", {
    class: `${e}-footer-extra`
  }, [n(t)]) : null;
}
function IT(e) {
  let {
    prefixCls: t,
    components: n = {},
    needConfirmButton: o,
    onNow: r,
    onOk: i,
    okDisabled: a,
    showNow: l,
    locale: s
  } = e, u, c;
  if (o) {
    const d = n.button || "button";
    r && l !== !1 && (u = h("li", {
      class: `${t}-now`
    }, [h("a", {
      class: `${t}-now-btn`,
      onClick: r
    }, [s.now])])), c = o && h("li", {
      class: `${t}-ok`
    }, [h(d, {
      disabled: a,
      onClick: (f) => {
        f.stopPropagation(), i && i();
      }
    }, {
      default: () => [s.ok]
    })]);
  }
  return !u && !c ? null : h("ul", {
    class: `${t}-ranges`
  }, [u, c]);
}
function q7() {
  return be({
    name: "PickerPanel",
    inheritAttrs: !1,
    props: {
      prefixCls: String,
      locale: Object,
      generateConfig: Object,
      value: Object,
      defaultValue: Object,
      pickerValue: Object,
      defaultPickerValue: Object,
      disabledDate: Function,
      mode: String,
      picker: {
        type: String,
        default: "date"
      },
      tabindex: {
        type: [Number, String],
        default: 0
      },
      showNow: {
        type: Boolean,
        default: void 0
      },
      showTime: [Boolean, Object],
      showToday: Boolean,
      renderExtraFooter: Function,
      dateRender: Function,
      hideHeader: {
        type: Boolean,
        default: void 0
      },
      onSelect: Function,
      onChange: Function,
      onPanelChange: Function,
      onMousedown: Function,
      onPickerValueChange: Function,
      onOk: Function,
      components: Object,
      direction: String,
      hourStep: {
        type: Number,
        default: 1
      },
      minuteStep: {
        type: Number,
        default: 1
      },
      secondStep: {
        type: Number,
        default: 1
      }
    },
    setup(e, t) {
      let {
        attrs: n
      } = t;
      const o = E(() => e.picker === "date" && !!e.showTime || e.picker === "time"), r = E(() => 24 % e.hourStep === 0), i = E(() => 60 % e.minuteStep === 0), a = E(() => 60 % e.secondStep === 0);
      process.env.NODE_ENV !== "production" && It(() => {
        const {
          generateConfig: j,
          value: ee,
          hourStep: W = 1,
          minuteStep: K = 1,
          secondStep: q = 1
        } = e;
        wn(!ee || j.isValidate(ee), "Invalidate date pass to `value`."), wn(!ee || j.isValidate(ee), "Invalidate date pass to `defaultValue`."), wn(r.value, `\`hourStep\` ${W} is invalid. It should be a factor of 24.`), wn(i.value, `\`minuteStep\` ${K} is invalid. It should be a factor of 60.`), wn(a.value, `\`secondStep\` ${q} is invalid. It should be a factor of 60.`);
      });
      const l = ia(), {
        operationRef: s,
        onSelect: u,
        hideRanges: c,
        defaultOpenValue: d
      } = l, {
        inRange: f,
        panelPosition: p,
        rangedValue: v,
        hoverRangedValue: g
      } = Ld(), m = ce({}), [x, S] = lr(null, {
        value: Kt(e, "value"),
        defaultValue: e.defaultValue,
        postState: (j) => !j && d?.value && e.picker === "time" ? d.value : j
      }), [C, P] = lr(null, {
        value: Kt(e, "pickerValue"),
        defaultValue: e.defaultPickerValue || x.value,
        postState: (j) => {
          const {
            generateConfig: ee,
            showTime: W,
            defaultValue: K
          } = e, q = ee.getNow();
          return j ? !x.value && e.showTime ? typeof W == "object" ? ip(ee, Array.isArray(j) ? j[0] : j, W.defaultValue || q) : K ? ip(ee, Array.isArray(j) ? j[0] : j, K) : ip(ee, Array.isArray(j) ? j[0] : j, q) : j : q;
        }
      }), $ = (j) => {
        P(j), e.onPickerValueChange && e.onPickerValueChange(j);
      }, I = (j) => {
        const ee = D7[e.picker];
        return ee ? ee(j) : j;
      }, [w, _] = lr(() => e.picker === "time" ? "time" : I("date"), {
        value: Kt(e, "mode")
      });
      ke(() => e.picker, () => {
        _(e.picker);
      });
      const M = ce(w.value), N = (j) => {
        M.value = j;
      }, A = (j, ee) => {
        const {
          onPanelChange: W,
          generateConfig: K
        } = e, q = I(j || w.value);
        N(w.value), _(q), W && (w.value !== q || _u(K, C.value, C.value)) && W(ee, q);
      }, H = function(j, ee) {
        let W = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
        const {
          picker: K,
          generateConfig: q,
          onSelect: G,
          onChange: ae,
          disabledDate: le
        } = e;
        (w.value === K || W) && (S(j), G && G(j), u && u(j, ee), ae && !_u(q, j, x.value) && !le?.(j) && ae(j));
      }, B = (j) => m.value && m.value.onKeydown ? ([it.LEFT, it.RIGHT, it.UP, it.DOWN, it.PAGE_UP, it.PAGE_DOWN, it.ENTER].includes(j.which) && j.preventDefault(), m.value.onKeydown(j)) : (wn(!1, "Panel not correct handle keyDown event. Please help to fire issue about this."), !1), F = (j) => {
        m.value && m.value.onBlur && m.value.onBlur(j);
      }, R = () => {
        const {
          generateConfig: j,
          hourStep: ee,
          minuteStep: W,
          secondStep: K
        } = e, q = j.getNow(), G = $7(j.getHour(q), j.getMinute(q), j.getSecond(q), r.value ? ee : 1, i.value ? W : 1, a.value ? K : 1), ae = gT(
          j,
          q,
          G[0],
          // hour
          G[1],
          // minute
          G[2]
        );
        H(ae, "submit");
      }, X = E(() => {
        const {
          prefixCls: j,
          direction: ee
        } = e;
        return Me(`${j}-panel`, {
          [`${j}-panel-has-range`]: v && v.value && v.value[0] && v.value[1],
          [`${j}-panel-has-range-hover`]: g && g.value && g.value[0] && g.value[1],
          [`${j}-panel-rtl`]: ee === "rtl"
        });
      });
      return L0(O(O({}, l), {
        mode: w,
        hideHeader: E(() => {
          var j;
          return e.hideHeader !== void 0 ? e.hideHeader : (j = l.hideHeader) === null || j === void 0 ? void 0 : j.value;
        }),
        hidePrevBtn: E(() => f.value && p.value === "right"),
        hideNextBtn: E(() => f.value && p.value === "left")
      })), ke(() => e.value, () => {
        e.value && P(e.value);
      }), () => {
        const {
          prefixCls: j = "ant-picker",
          locale: ee,
          generateConfig: W,
          disabledDate: K,
          picker: q = "date",
          tabindex: G = 0,
          showNow: ae,
          showTime: le,
          showToday: ie,
          renderExtraFooter: re,
          onMousedown: te,
          onOk: ve,
          components: ue
        } = e;
        s && p.value !== "right" && (s.value = {
          onKeydown: B,
          onClose: () => {
            m.value && m.value.onClose && m.value.onClose();
          }
        });
        let pe;
        const ge = O(O(O({}, n), e), {
          operationRef: m,
          prefixCls: j,
          viewDate: C.value,
          value: x.value,
          onViewDateChange: $,
          sourceMode: M.value,
          onPanelChange: A,
          disabledDate: K
        });
        switch (delete ge.onChange, delete ge.onSelect, w.value) {
          case "decade":
            pe = h(j0, Q(Q({}, ge), {}, {
              onSelect: (He, Ne) => {
                $(He), H(He, Ne);
              }
            }), null);
            break;
          case "year":
            pe = h(ox, Q(Q({}, ge), {}, {
              onSelect: (He, Ne) => {
                $(He), H(He, Ne);
              }
            }), null);
            break;
          case "month":
            pe = h(Q0, Q(Q({}, ge), {}, {
              onSelect: (He, Ne) => {
                $(He), H(He, Ne);
              }
            }), null);
            break;
          case "quarter":
            pe = h(ex, Q(Q({}, ge), {}, {
              onSelect: (He, Ne) => {
                $(He), H(He, Ne);
              }
            }), null);
            break;
          case "week":
            pe = h(G0, Q(Q({}, ge), {}, {
              onSelect: (He, Ne) => {
                $(He), H(He, Ne);
              }
            }), null);
            break;
          case "time":
            delete ge.showTime, pe = h(qh, Q(Q(Q({}, ge), typeof le == "object" ? le : null), {}, {
              onSelect: (He, Ne) => {
                $(He), H(He, Ne);
              }
            }), null);
            break;
          default:
            le ? pe = h(Y0, Q(Q({}, ge), {}, {
              onSelect: (He, Ne) => {
                $(He), H(He, Ne);
              }
            }), null) : pe = h(Hd, Q(Q({}, ge), {}, {
              onSelect: (He, Ne) => {
                $(He), H(He, Ne);
              }
            }), null);
        }
        let _e, ze;
        c?.value || (_e = kT(j, w.value, re), ze = IT({
          prefixCls: j,
          components: ue,
          needConfirmButton: o.value,
          okDisabled: !x.value || K && K(x.value),
          locale: ee,
          showNow: ae,
          onNow: o.value && R,
          onOk: () => {
            x.value && (H(x.value, "submit", !0), ve && ve(x.value));
          }
        }));
        let Ke;
        if (ie && w.value === "date" && q === "date" && !le) {
          const He = W.getNow(), Ne = `${j}-today-btn`, Xe = K && K(He);
          Ke = h("a", {
            class: Me(Ne, Xe && `${Ne}-disabled`),
            "aria-disabled": Xe,
            onClick: () => {
              Xe || H(He, "mouse", !0);
            }
          }, [ee.today]);
        }
        return h("div", {
          tabindex: G,
          class: Me(X.value, n.class),
          style: n.style,
          onKeydown: B,
          onBlur: F,
          onMousedown: te
        }, [pe, _e || ze || Ke ? h("div", {
          class: `${j}-footer`
        }, [_e, ze, Ke]) : null]);
      };
    }
  });
}
const Y7 = q7(), _T = ((e) => h(Y7, e)), G7 = {
  bottomLeft: {
    points: ["tl", "bl"],
    offset: [0, 4],
    overflow: {
      adjustX: 1,
      adjustY: 1
    }
  },
  bottomRight: {
    points: ["tr", "br"],
    offset: [0, 4],
    overflow: {
      adjustX: 1,
      adjustY: 1
    }
  },
  topLeft: {
    points: ["bl", "tl"],
    offset: [0, -4],
    overflow: {
      adjustX: 0,
      adjustY: 1
    }
  },
  topRight: {
    points: ["br", "tr"],
    offset: [0, -4],
    overflow: {
      adjustX: 0,
      adjustY: 1
    }
  }
};
function TT(e, t) {
  let {
    slots: n
  } = t;
  const {
    prefixCls: o,
    popupStyle: r,
    visible: i,
    dropdownClassName: a,
    dropdownAlign: l,
    transitionName: s,
    getPopupContainer: u,
    range: c,
    popupPlacement: d,
    direction: f
  } = vo(e), p = `${o}-dropdown`;
  return h(Dd, {
    showAction: [],
    hideAction: [],
    popupPlacement: d !== void 0 ? d : f === "rtl" ? "bottomRight" : "bottomLeft",
    builtinPlacements: G7,
    prefixCls: p,
    popupTransitionName: s,
    popupAlign: l,
    popupVisible: i,
    popupClassName: Me(a, {
      [`${p}-range`]: c,
      [`${p}-rtl`]: f === "rtl"
    }),
    popupStyle: r,
    getPopupContainer: u
  }, {
    default: n.default,
    popup: n.popupElement
  });
}
const MT = be({
  name: "PresetPanel",
  props: {
    prefixCls: String,
    presets: {
      type: Array,
      default: () => []
    },
    onClick: Function,
    onHover: Function
  },
  setup(e) {
    return () => e.presets.length ? h("div", {
      class: `${e.prefixCls}-presets`
    }, [h("ul", null, [e.presets.map((t, n) => {
      let {
        label: o,
        value: r
      } = t;
      return h("li", {
        key: n,
        onClick: (i) => {
          i.stopPropagation(), e.onClick(r);
        },
        onMouseenter: () => {
          var i;
          (i = e.onHover) === null || i === void 0 || i.call(e, r);
        },
        onMouseleave: () => {
          var i;
          (i = e.onHover) === null || i === void 0 || i.call(e, null);
        }
      }, [o]);
    })])]) : null;
  }
});
function fb(e) {
  let {
    open: t,
    value: n,
    isClickOutside: o,
    triggerOpen: r,
    forwardKeydown: i,
    onKeydown: a,
    blurToCancel: l,
    onSubmit: s,
    onCancel: u,
    onFocus: c,
    onBlur: d
  } = e;
  const f = $e(!1), p = $e(!1), v = $e(!1), g = $e(!1), m = $e(!1), x = E(() => ({
    onMousedown: () => {
      f.value = !0, r(!0);
    },
    onKeydown: (C) => {
      if (a(C, () => {
        m.value = !0;
      }), !m.value) {
        switch (C.which) {
          case it.ENTER: {
            t.value ? s() !== !1 && (f.value = !0) : r(!0), C.preventDefault();
            return;
          }
          case it.TAB: {
            f.value && t.value && !C.shiftKey ? (f.value = !1, C.preventDefault()) : !f.value && t.value && !i(C) && C.shiftKey && (f.value = !0, C.preventDefault());
            return;
          }
          case it.ESC: {
            f.value = !0, u();
            return;
          }
        }
        !t.value && ![it.SHIFT].includes(C.which) ? r(!0) : f.value || i(C);
      }
    },
    onFocus: (C) => {
      f.value = !0, p.value = !0, c && c(C);
    },
    onBlur: (C) => {
      if (v.value || !o(document.activeElement)) {
        v.value = !1;
        return;
      }
      l.value ? setTimeout(() => {
        let {
          activeElement: P
        } = document;
        for (; P && P.shadowRoot; )
          P = P.shadowRoot.activeElement;
        o(P) && u();
      }, 0) : t.value && (r(!1), g.value && s()), p.value = !1, d && d(C);
    }
  }));
  ke(t, () => {
    g.value = !1;
  }), ke(n, () => {
    g.value = !0;
  });
  const S = $e();
  return Nt(() => {
    S.value = k7((C) => {
      const P = I7(C);
      if (t.value) {
        const $ = o(P);
        $ ? (!p.value || $) && r(!1) : (v.value = !0, Vt(() => {
          v.value = !1;
        }));
      }
    });
  }), qt(() => {
    S.value && S.value();
  }), [x, {
    focused: p,
    typing: f
  }];
}
function pb(e) {
  let {
    valueTexts: t,
    onTextChange: n
  } = e;
  const o = ce("");
  function r(a) {
    o.value = a, n(a);
  }
  function i() {
    o.value = t.value[0];
  }
  return ke(() => [...t.value], function(a) {
    let l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
    a.join("||") !== l.join("||") && t.value.every((s) => s !== o.value) && i();
  }, {
    immediate: !0
  }), [o, r, i];
}
function Yp(e, t) {
  let {
    formatList: n,
    generateConfig: o,
    locale: r
  } = t;
  const i = S_(() => {
    if (!e.value)
      return [[""], ""];
    let s = "";
    const u = [];
    for (let c = 0; c < n.value.length; c += 1) {
      const d = n.value[c], f = Yo(e.value, {
        generateConfig: o.value,
        locale: r.value,
        format: d
      });
      u.push(f), c === 0 && (s = f);
    }
    return [u, s];
  }, [e, n], (s, u) => u[0] !== s[0] || !gu(u[1], s[1])), a = E(() => i.value[0]), l = E(() => i.value[1]);
  return [a, l];
}
function hb(e, t) {
  let {
    formatList: n,
    generateConfig: o,
    locale: r
  } = t;
  const i = ce(null);
  let a;
  function l(d) {
    let f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
    if (Vt.cancel(a), f) {
      i.value = d;
      return;
    }
    a = Vt(() => {
      i.value = d;
    });
  }
  const [, s] = Yp(i, {
    formatList: n,
    generateConfig: o,
    locale: r
  });
  function u(d) {
    l(d);
  }
  function c() {
    let d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
    l(null, d);
  }
  return ke(e, () => {
    c(!0);
  }), qt(() => {
    Vt.cancel(a);
  }), [s, u, c];
}
function ET(e, t) {
  return E(() => e?.value ? e.value : t?.value ? (vr(!1, "`ranges` is deprecated. Please use `presets` instead."), Object.keys(t.value).map((o) => {
    const r = t.value[o], i = typeof r == "function" ? r() : r;
    return {
      label: o,
      value: i
    };
  })) : []);
}
function DT(e) {
  const {
    picker: t,
    disabledHours: n,
    disabledMinutes: o,
    disabledSeconds: r
  } = e;
  t === "time" && (n || o || r) && wn(!1, "'disabledHours', 'disabledMinutes', 'disabledSeconds' will be removed in the next major version, please use 'disabledTime' instead.");
}
function U7() {
  return be({
    name: "Picker",
    inheritAttrs: !1,
    props: ["prefixCls", "id", "tabindex", "dropdownClassName", "dropdownAlign", "popupStyle", "transitionName", "generateConfig", "locale", "inputReadOnly", "allowClear", "autofocus", "showTime", "showNow", "showHour", "showMinute", "showSecond", "picker", "format", "use12Hours", "value", "defaultValue", "open", "defaultOpen", "defaultOpenValue", "suffixIcon", "presets", "clearIcon", "disabled", "disabledDate", "placeholder", "getPopupContainer", "panelRender", "inputRender", "onChange", "onOpenChange", "onPanelChange", "onFocus", "onBlur", "onMousedown", "onMouseup", "onMouseenter", "onMouseleave", "onContextmenu", "onClick", "onKeydown", "onSelect", "direction", "autocomplete", "showToday", "renderExtraFooter", "dateRender", "minuteStep", "hourStep", "secondStep", "hideDisabledOptions"],
    setup(e, t) {
      let {
        attrs: n,
        expose: o
      } = t;
      const r = ce(null), i = E(() => e.presets), a = ET(i), l = E(() => {
        var K;
        return (K = e.picker) !== null && K !== void 0 ? K : "date";
      }), s = E(() => l.value === "date" && !!e.showTime || l.value === "time");
      process.env.NODE_ENV !== "production" && DT(e);
      const u = E(() => CT(vT(e.format, l.value, e.showTime, e.use12Hours))), c = ce(null), d = ce(null), f = ce(null), [p, v] = lr(null, {
        value: Kt(e, "value"),
        defaultValue: e.defaultValue
      }), g = ce(p.value), m = (K) => {
        g.value = K;
      }, x = ce(null), [S, C] = lr(!1, {
        value: Kt(e, "open"),
        defaultValue: e.defaultOpen,
        postState: (K) => e.disabled ? !1 : K,
        onChange: (K) => {
          e.onOpenChange && e.onOpenChange(K), !K && x.value && x.value.onClose && x.value.onClose();
        }
      }), [P, $] = Yp(g, {
        formatList: u,
        generateConfig: Kt(e, "generateConfig"),
        locale: Kt(e, "locale")
      }), [I, w, _] = pb({
        valueTexts: P,
        onTextChange: (K) => {
          const q = wT(K, {
            locale: e.locale,
            formatList: u.value,
            generateConfig: e.generateConfig
          });
          q && (!e.disabledDate || !e.disabledDate(q)) && m(q);
        }
      }), M = (K) => {
        const {
          onChange: q,
          generateConfig: G,
          locale: ae
        } = e;
        m(K), v(K), q && !_u(G, p.value, K) && q(K, K ? Yo(K, {
          generateConfig: G,
          locale: ae,
          format: u.value[0]
        }) : "");
      }, N = (K) => {
        e.disabled && K || C(K);
      }, A = (K) => S.value && x.value && x.value.onKeydown ? x.value.onKeydown(K) : (wn(!1, "Picker not correct forward Keydown operation. Please help to fire issue about this."), !1), H = function() {
        e.onMouseup && e.onMouseup(...arguments), r.value && (r.value.focus(), N(!0));
      }, [B, {
        focused: F,
        typing: R
      }] = fb({
        blurToCancel: s,
        open: S,
        value: I,
        triggerOpen: N,
        forwardKeydown: A,
        isClickOutside: (K) => !bT([c.value, d.value, f.value], K),
        onSubmit: () => (
          // When user typing disabledDate with keyboard and enter, this value will be empty
          !g.value || // Normal disabled check
          e.disabledDate && e.disabledDate(g.value) ? !1 : (M(g.value), N(!1), _(), !0)
        ),
        onCancel: () => {
          N(!1), m(p.value), _();
        },
        onKeydown: (K, q) => {
          var G;
          (G = e.onKeydown) === null || G === void 0 || G.call(e, K, q);
        },
        onFocus: (K) => {
          var q;
          (q = e.onFocus) === null || q === void 0 || q.call(e, K);
        },
        onBlur: (K) => {
          var q;
          (q = e.onBlur) === null || q === void 0 || q.call(e, K);
        }
      });
      ke([S, P], () => {
        S.value || (m(p.value), !P.value.length || P.value[0] === "" ? w("") : $.value !== I.value && _());
      }), ke(l, () => {
        S.value || _();
      }), ke(p, () => {
        m(p.value);
      });
      const [X, j, ee] = hb(I, {
        formatList: u,
        generateConfig: Kt(e, "generateConfig"),
        locale: Kt(e, "locale")
      }), W = (K, q) => {
        (q === "submit" || q !== "key" && !s.value) && (M(K), N(!1));
      };
      return L0({
        operationRef: x,
        hideHeader: E(() => l.value === "time"),
        onSelect: W,
        open: S,
        defaultOpenValue: Kt(e, "defaultOpenValue"),
        onDateMouseenter: j,
        onDateMouseleave: ee
      }), o({
        focus: () => {
          r.value && r.value.focus();
        },
        blur: () => {
          r.value && r.value.blur();
        }
      }), () => {
        const {
          prefixCls: K = "rc-picker",
          id: q,
          tabindex: G,
          dropdownClassName: ae,
          dropdownAlign: le,
          popupStyle: ie,
          transitionName: re,
          generateConfig: te,
          locale: ve,
          inputReadOnly: ue,
          allowClear: pe,
          autofocus: ge,
          picker: _e = "date",
          defaultOpenValue: ze,
          suffixIcon: Ke,
          clearIcon: He,
          disabled: Ne,
          placeholder: Xe,
          getPopupContainer: De,
          panelRender: Fe,
          onMousedown: Ve,
          onMouseenter: nt,
          onMouseleave: je,
          onContextmenu: Pe,
          onClick: Ge,
          onSelect: Se,
          direction: Ce,
          autocomplete: Ae = "off"
        } = e, qe = O(O(O({}, e), n), {
          class: Me({
            [`${K}-panel-focused`]: !R.value
          }),
          style: void 0,
          pickerValue: void 0,
          onPickerValueChange: void 0,
          onChange: null
        });
        let We = h("div", {
          class: `${K}-panel-layout`
        }, [h(MT, {
          prefixCls: K,
          presets: a.value,
          onClick: (at) => {
            M(at), N(!1);
          }
        }, null), h(_T, Q(Q({}, qe), {}, {
          generateConfig: te,
          value: g.value,
          locale: ve,
          tabindex: -1,
          onSelect: (at) => {
            Se?.(at), m(at);
          },
          direction: Ce,
          onPanelChange: (at, dt) => {
            const {
              onPanelChange: wt
            } = e;
            ee(!0), wt?.(at, dt);
          }
        }), null)]);
        Fe && (We = Fe(We));
        const tt = h("div", {
          class: `${K}-panel-container`,
          ref: c,
          onMousedown: (at) => {
            at.preventDefault();
          }
        }, [We]);
        let Ee;
        Ke && (Ee = h("span", {
          class: `${K}-suffix`
        }, [Ke]));
        let Re;
        pe && p.value && !Ne && (Re = h("span", {
          onMousedown: (at) => {
            at.preventDefault(), at.stopPropagation();
          },
          onMouseup: (at) => {
            at.preventDefault(), at.stopPropagation(), M(null), N(!1);
          },
          class: `${K}-clear`,
          role: "button"
        }, [He || h("span", {
          class: `${K}-clear-btn`
        }, null)]));
        const Be = O(O(O(O({
          id: q,
          tabindex: G,
          disabled: Ne,
          readonly: ue || typeof u.value[0] == "function" || !R.value,
          value: X.value || I.value,
          onInput: (at) => {
            w(at.target.value);
          },
          autofocus: ge,
          placeholder: Xe,
          ref: r,
          title: I.value
        }, B.value), {
          size: mT(_e, u.value[0], te)
        }), $T(e)), {
          autocomplete: Ae
        }), ot = e.inputRender ? e.inputRender(Be) : h("input", Be, null);
        process.env.NODE_ENV !== "production" && wn(!ze, "`defaultOpenValue` may confuse user for the current value status. Please use `defaultValue` instead.");
        const pt = Ce === "rtl" ? "bottomRight" : "bottomLeft";
        return h("div", {
          ref: f,
          class: Me(K, n.class, {
            [`${K}-disabled`]: Ne,
            [`${K}-focused`]: F.value,
            [`${K}-rtl`]: Ce === "rtl"
          }),
          style: n.style,
          onMousedown: Ve,
          onMouseup: H,
          onMouseenter: nt,
          onMouseleave: je,
          onContextmenu: Pe,
          onClick: Ge
        }, [h("div", {
          class: Me(`${K}-input`, {
            [`${K}-input-placeholder`]: !!X.value
          }),
          ref: d
        }, [ot, Ee, Re]), h(TT, {
          visible: S.value,
          popupStyle: ie,
          prefixCls: K,
          dropdownClassName: ae,
          dropdownAlign: le,
          getPopupContainer: De,
          transitionName: re,
          popupPlacement: pt,
          direction: Ce
        }, {
          default: () => [h("div", {
            style: {
              pointerEvents: "none",
              position: "absolute",
              top: 0,
              bottom: 0,
              left: 0,
              right: 0
            }
          }, null)],
          popupElement: () => tt
        })]);
      };
    }
  });
}
const X7 = U7();
function Q7(e, t) {
  let {
    picker: n,
    locale: o,
    selectedValue: r,
    disabledDate: i,
    disabled: a,
    generateConfig: l
  } = e;
  const s = E(() => rn(r.value, 0)), u = E(() => rn(r.value, 1));
  function c(g) {
    return l.value.locale.getWeekFirstDate(o.value.locale, g);
  }
  function d(g) {
    const m = l.value.getYear(g), x = l.value.getMonth(g);
    return m * 100 + x;
  }
  function f(g) {
    const m = l.value.getYear(g), x = ub(l.value, g);
    return m * 10 + x;
  }
  return [(g) => {
    var m;
    if (i && (!((m = i?.value) === null || m === void 0) && m.call(i, g)))
      return !0;
    if (a[1] && u)
      return !Ta(l.value, g, u.value) && l.value.isAfter(g, u.value);
    if (t.value[1] && u.value)
      switch (n.value) {
        case "quarter":
          return f(g) > f(u.value);
        case "month":
          return d(g) > d(u.value);
        case "week":
          return c(g) > c(u.value);
        default:
          return !Ta(l.value, g, u.value) && l.value.isAfter(g, u.value);
      }
    return !1;
  }, (g) => {
    var m;
    if (!((m = i.value) === null || m === void 0) && m.call(i, g))
      return !0;
    if (a[0] && s)
      return !Ta(l.value, g, u.value) && l.value.isAfter(s.value, g);
    if (t.value[0] && s.value)
      switch (n.value) {
        case "quarter":
          return f(g) < f(s.value);
        case "month":
          return d(g) < d(s.value);
        case "week":
          return c(g) < c(s.value);
        default:
          return !Ta(l.value, g, s.value) && l.value.isAfter(s.value, g);
      }
    return !1;
  }];
}
function Z7(e, t, n, o) {
  const r = Zc(e, n, o, 1);
  function i(a) {
    return a(e, t) ? "same" : a(r, t) ? "closing" : "far";
  }
  switch (n) {
    case "year":
      return i((a, l) => A7(o, a, l));
    case "quarter":
    case "month":
      return i((a, l) => Kh(o, a, l));
    default:
      return i((a, l) => W0(o, a, l));
  }
}
function J7(e, t, n, o) {
  const r = rn(e, 0), i = rn(e, 1);
  if (t === 0)
    return r;
  if (r && i)
    switch (Z7(r, i, n, o)) {
      case "same":
        return r;
      case "closing":
        return r;
      default:
        return Zc(i, n, o, -1);
    }
  return r;
}
function e9(e) {
  let {
    values: t,
    picker: n,
    defaultDates: o,
    generateConfig: r
  } = e;
  const i = ce([rn(o, 0), rn(o, 1)]), a = ce(null), l = E(() => rn(t.value, 0)), s = E(() => rn(t.value, 1)), u = (p) => i.value[p] ? i.value[p] : rn(a.value, p) || J7(t.value, p, n.value, r.value) || l.value || s.value || r.value.getNow(), c = ce(null), d = ce(null);
  It(() => {
    c.value = u(0), d.value = u(1);
  });
  function f(p, v) {
    if (p) {
      let g = Ur(a.value, p, v);
      i.value = Ur(i.value, null, v) || [null, null];
      const m = (v + 1) % 2;
      rn(t.value, m) || (g = Ur(g, p, m)), a.value = g;
    } else (l.value || s.value) && (a.value = null);
  }
  return [c, d, f];
}
function t9(e) {
  return WP() ? (KP(e), !0) : !1;
}
function n9(e) {
  return typeof e == "function" ? e() : T(e);
}
function AT(e) {
  var t;
  const n = n9(e);
  return (t = n?.$el) !== null && t !== void 0 ? t : n;
}
function o9(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  fr() ? Nt(e) : t ? e() : Yt(e);
}
function r9(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const n = $e(), o = () => n.value = !!e();
  return o(), o9(o, t), n;
}
var fv;
const NT = typeof window < "u";
NT && (!((fv = window?.navigator) === null || fv === void 0) && fv.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
const i9 = NT ? window : void 0;
var a9 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function l9(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  const {
    window: o = i9
  } = n, r = a9(n, ["window"]);
  let i;
  const a = r9(() => o && "ResizeObserver" in o), l = () => {
    i && (i.disconnect(), i = void 0);
  }, s = ke(() => AT(e), (c) => {
    l(), a.value && o && c && (i = new ResizeObserver(t), i.observe(c, r));
  }, {
    immediate: !0,
    flush: "post"
  }), u = () => {
    l(), s();
  };
  return t9(u), {
    isSupported: a,
    stop: u
  };
}
function Dc(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
    width: 0,
    height: 0
  }, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  const {
    box: o = "content-box"
  } = n, r = $e(t.width), i = $e(t.height);
  return l9(e, (a) => {
    let [l] = a;
    const s = o === "border-box" ? l.borderBoxSize : o === "content-box" ? l.contentBoxSize : l.devicePixelContentBoxSize;
    s ? (r.value = s.reduce((u, c) => {
      let {
        inlineSize: d
      } = c;
      return u + d;
    }, 0), i.value = s.reduce((u, c) => {
      let {
        blockSize: d
      } = c;
      return u + d;
    }, 0)) : (r.value = l.contentRect.width, i.value = l.contentRect.height);
  }, n), ke(() => AT(e), (a) => {
    r.value = a ? t.width : 0, i.value = a ? t.height : 0;
  }), {
    width: r,
    height: i
  };
}
function oC(e, t) {
  return e && e[0] && e[1] && t.isAfter(e[0], e[1]) ? [e[1], e[0]] : e;
}
function rC(e, t, n, o) {
  return !!(e || o && o[t] || n[(t + 1) % 2]);
}
function s9() {
  return be({
    name: "RangerPicker",
    inheritAttrs: !1,
    props: ["prefixCls", "id", "popupStyle", "dropdownClassName", "transitionName", "dropdownAlign", "getPopupContainer", "generateConfig", "locale", "placeholder", "autofocus", "disabled", "format", "picker", "showTime", "showNow", "showHour", "showMinute", "showSecond", "use12Hours", "separator", "value", "defaultValue", "defaultPickerValue", "open", "defaultOpen", "disabledDate", "disabledTime", "dateRender", "panelRender", "ranges", "allowEmpty", "allowClear", "suffixIcon", "clearIcon", "pickerRef", "inputReadOnly", "mode", "renderExtraFooter", "onChange", "onOpenChange", "onPanelChange", "onCalendarChange", "onFocus", "onBlur", "onMousedown", "onMouseup", "onMouseenter", "onMouseleave", "onClick", "onOk", "onKeydown", "components", "order", "direction", "activePickerIndex", "autocomplete", "minuteStep", "hourStep", "secondStep", "hideDisabledOptions", "disabledMinutes", "presets", "prevIcon", "nextIcon", "superPrevIcon", "superNextIcon"],
    setup(e, t) {
      let {
        attrs: n,
        expose: o
      } = t;
      const r = E(() => e.picker === "date" && !!e.showTime || e.picker === "time"), i = E(() => e.presets), a = E(() => e.ranges), l = ET(i, a), s = ce({}), u = ce(null), c = ce(null), d = ce(null), f = ce(null), p = ce(null), v = ce(null), g = ce(null), m = ce(null);
      process.env.NODE_ENV !== "production" && DT(e);
      const x = E(() => CT(vT(e.format, e.picker, e.showTime, e.use12Hours))), [S, C] = lr(0, {
        value: Kt(e, "activePickerIndex")
      }), P = ce(null), $ = E(() => {
        const {
          disabled: Ue
        } = e;
        return Array.isArray(Ue) ? Ue : [Ue || !1, Ue || !1];
      }), [I, w] = lr(null, {
        value: Kt(e, "value"),
        defaultValue: e.defaultValue,
        postState: (Ue) => e.picker === "time" && !e.order ? Ue : oC(Ue, e.generateConfig)
      }), [_, M, N] = e9({
        values: I,
        picker: Kt(e, "picker"),
        defaultDates: e.defaultPickerValue,
        generateConfig: Kt(e, "generateConfig")
      }), [A, H] = lr(I.value, {
        postState: (Ue) => {
          let ht = Ue;
          if ($.value[0] && $.value[1])
            return ht;
          for (let vt = 0; vt < 2; vt += 1)
            $.value[vt] && !rn(ht, vt) && !rn(e.allowEmpty, vt) && (ht = Ur(ht, e.generateConfig.getNow(), vt));
          return ht;
        }
      }), [B, F] = lr([e.picker, e.picker], {
        value: Kt(e, "mode")
      });
      ke(() => e.picker, () => {
        F([e.picker, e.picker]);
      });
      const R = (Ue, ht) => {
        var vt;
        F(Ue), (vt = e.onPanelChange) === null || vt === void 0 || vt.call(e, ht, Ue);
      }, [X, j] = Q7({
        picker: Kt(e, "picker"),
        selectedValue: A,
        locale: Kt(e, "locale"),
        disabled: $,
        disabledDate: Kt(e, "disabledDate"),
        generateConfig: Kt(e, "generateConfig")
      }, s), [ee, W] = lr(!1, {
        value: Kt(e, "open"),
        defaultValue: e.defaultOpen,
        postState: (Ue) => $.value[S.value] ? !1 : Ue,
        onChange: (Ue) => {
          var ht;
          (ht = e.onOpenChange) === null || ht === void 0 || ht.call(e, Ue), !Ue && P.value && P.value.onClose && P.value.onClose();
        }
      }), K = E(() => ee.value && S.value === 0), q = E(() => ee.value && S.value === 1), G = ce(0), ae = ce(0), le = ce(0), {
        width: ie
      } = Dc(u);
      ke([ee, ie], () => {
        !ee.value && u.value && (le.value = ie.value);
      });
      const {
        width: re
      } = Dc(c), {
        width: te
      } = Dc(m), {
        width: ve
      } = Dc(d), {
        width: ue
      } = Dc(p);
      ke([S, ee, re, te, ve, ue, () => e.direction], () => {
        ae.value = 0, S.value ? d.value && p.value && (ae.value = ve.value + ue.value, re.value && te.value && ae.value > re.value - te.value - (e.direction === "rtl" || m.value.offsetLeft > ae.value ? 0 : m.value.offsetLeft) && (G.value = ae.value)) : S.value === 0 && (G.value = 0);
      }, {
        immediate: !0
      });
      const pe = ce();
      function ge(Ue, ht) {
        if (Ue)
          clearTimeout(pe.value), s.value[ht] = !0, C(ht), W(Ue), ee.value || N(null, ht);
        else if (S.value === ht) {
          W(Ue);
          const vt = s.value;
          pe.value = setTimeout(() => {
            vt === s.value && (s.value = {});
          });
        }
      }
      function _e(Ue) {
        ge(!0, Ue), setTimeout(() => {
          const ht = [v, g][Ue];
          ht.value && ht.value.focus();
        }, 0);
      }
      function ze(Ue, ht) {
        let vt = Ue, Zt = rn(vt, 0), Zn = rn(vt, 1);
        const {
          generateConfig: Qn,
          locale: $o,
          picker: Cn,
          order: Tt,
          onCalendarChange: po,
          allowEmpty: zo,
          onChange: un,
          showTime: Dn
        } = e;
        Zt && Zn && Qn.isAfter(Zt, Zn) && (// WeekPicker only compare week
        Cn === "week" && !xT(Qn, $o.locale, Zt, Zn) || // QuotaPicker only compare week
        Cn === "quarter" && !yT(Qn, Zt, Zn) || // Other non-TimePicker compare date
        Cn !== "week" && Cn !== "quarter" && Cn !== "time" && !(Dn ? _u(Qn, Zt, Zn) : Ta(Qn, Zt, Zn)) ? (ht === 0 ? (vt = [Zt, null], Zn = null) : (Zt = null, vt = [null, Zn]), s.value = {
          [ht]: !0
        }) : (Cn !== "time" || Tt !== !1) && (vt = oC(vt, Qn))), H(vt);
        const cn = vt && vt[0] ? Yo(vt[0], {
          generateConfig: Qn,
          locale: $o,
          format: x.value[0]
        }) : "", An = vt && vt[1] ? Yo(vt[1], {
          generateConfig: Qn,
          locale: $o,
          format: x.value[0]
        }) : "";
        po && po(vt, [cn, An], {
          range: ht === 0 ? "start" : "end"
        });
        const er = rC(Zt, 0, $.value, zo), Jn = rC(Zn, 1, $.value, zo);
        (vt === null || er && Jn) && (w(vt), un && (!_u(Qn, rn(I.value, 0), Zt) || !_u(Qn, rn(I.value, 1), Zn)) && un(vt, [cn, An]));
        let Wo = null;
        ht === 0 && !$.value[1] ? Wo = 1 : ht === 1 && !$.value[0] && (Wo = 0), Wo !== null && Wo !== S.value && (!s.value[Wo] || !rn(vt, Wo)) && rn(vt, ht) ? _e(Wo) : ge(!1, ht);
      }
      const Ke = (Ue) => ee && P.value && P.value.onKeydown ? P.value.onKeydown(Ue) : (wn(!1, "Picker not correct forward Keydown operation. Please help to fire issue about this."), !1), He = {
        formatList: x,
        generateConfig: Kt(e, "generateConfig"),
        locale: Kt(e, "locale")
      }, [Ne, Xe] = Yp(E(() => rn(A.value, 0)), He), [De, Fe] = Yp(E(() => rn(A.value, 1)), He), Ve = (Ue, ht) => {
        const vt = wT(Ue, {
          locale: e.locale,
          formatList: x.value,
          generateConfig: e.generateConfig
        });
        vt && !(ht === 0 ? X : j)(vt) && (H(Ur(A.value, vt, ht)), N(vt, ht));
      }, [nt, je, Pe] = pb({
        valueTexts: Ne,
        onTextChange: (Ue) => Ve(Ue, 0)
      }), [Ge, Se, Ce] = pb({
        valueTexts: De,
        onTextChange: (Ue) => Ve(Ue, 1)
      }), [Ae, qe] = $n(null), [We, tt] = $n(null), [Ee, Re, Be] = hb(nt, He), [ot, pt, at] = hb(Ge, He), dt = (Ue) => {
        tt(Ur(A.value, Ue, S.value)), S.value === 0 ? Re(Ue) : pt(Ue);
      }, wt = () => {
        tt(Ur(A.value, null, S.value)), S.value === 0 ? Be() : at();
      }, Ct = (Ue, ht) => ({
        forwardKeydown: Ke,
        onBlur: (vt) => {
          var Zt;
          (Zt = e.onBlur) === null || Zt === void 0 || Zt.call(e, vt);
        },
        isClickOutside: (vt) => !bT([c.value, d.value, f.value, u.value], vt),
        onFocus: (vt) => {
          var Zt;
          C(Ue), (Zt = e.onFocus) === null || Zt === void 0 || Zt.call(e, vt);
        },
        triggerOpen: (vt) => {
          ge(vt, Ue);
        },
        onSubmit: () => {
          if (
            // When user typing disabledDate with keyboard and enter, this value will be empty
            !A.value || // Normal disabled check
            e.disabledDate && e.disabledDate(A.value[Ue])
          )
            return !1;
          ze(A.value, Ue), ht();
        },
        onCancel: () => {
          ge(!1, Ue), H(I.value), ht();
        }
      }), [St, {
        focused: yt,
        typing: Ot
      }] = fb(O(O({}, Ct(0, Pe)), {
        blurToCancel: r,
        open: K,
        value: nt,
        onKeydown: (Ue, ht) => {
          var vt;
          (vt = e.onKeydown) === null || vt === void 0 || vt.call(e, Ue, ht);
        }
      })), [Wt, {
        focused: Xt,
        typing: ln
      }] = fb(O(O({}, Ct(1, Ce)), {
        blurToCancel: r,
        open: q,
        value: Ge,
        onKeydown: (Ue, ht) => {
          var vt;
          (vt = e.onKeydown) === null || vt === void 0 || vt.call(e, Ue, ht);
        }
      })), pn = (Ue) => {
        var ht;
        (ht = e.onClick) === null || ht === void 0 || ht.call(e, Ue), !ee.value && !v.value.contains(Ue.target) && !g.value.contains(Ue.target) && ($.value[0] ? $.value[1] || _e(1) : _e(0));
      }, gt = (Ue) => {
        var ht;
        (ht = e.onMousedown) === null || ht === void 0 || ht.call(e, Ue), ee.value && (yt.value || Xt.value) && !v.value.contains(Ue.target) && !g.value.contains(Ue.target) && Ue.preventDefault();
      }, En = E(() => {
        var Ue;
        return !((Ue = I.value) === null || Ue === void 0) && Ue[0] ? Yo(I.value[0], {
          locale: e.locale,
          format: "YYYYMMDDHHmmss",
          generateConfig: e.generateConfig
        }) : "";
      }), hn = E(() => {
        var Ue;
        return !((Ue = I.value) === null || Ue === void 0) && Ue[1] ? Yo(I.value[1], {
          locale: e.locale,
          format: "YYYYMMDDHHmmss",
          generateConfig: e.generateConfig
        }) : "";
      });
      ke([ee, Ne, De], () => {
        ee.value || (H(I.value), !Ne.value.length || Ne.value[0] === "" ? je("") : Xe.value !== nt.value && Pe(), !De.value.length || De.value[0] === "" ? Se("") : Fe.value !== Ge.value && Ce());
      }), ke([En, hn], () => {
        H(I.value);
      }), process.env.NODE_ENV !== "production" && It(() => {
        const {
          value: Ue,
          disabled: ht
        } = e;
        Ue && Array.isArray(ht) && (rn(ht, 0) && !rn(Ue, 0) || rn(ht, 1) && !rn(Ue, 1)) && wn(!1, "`disabled` should not set with empty `value`. You should set `allowEmpty` or `value` instead.");
      }), o({
        focus: () => {
          v.value && v.value.focus();
        },
        blur: () => {
          v.value && v.value.blur(), g.value && g.value.blur();
        }
      });
      const Kn = E(() => ee.value && We.value && We.value[0] && We.value[1] && e.generateConfig.isAfter(We.value[1], We.value[0]) ? We.value : null);
      function so() {
        let Ue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, ht = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
        const {
          generateConfig: vt,
          showTime: Zt,
          dateRender: Zn,
          direction: Qn,
          disabledTime: $o,
          prefixCls: Cn,
          locale: Tt
        } = e;
        let po = Zt;
        if (Zt && typeof Zt == "object" && Zt.defaultValue) {
          const un = Zt.defaultValue;
          po = O(O({}, Zt), {
            defaultValue: rn(un, S.value) || void 0
          });
        }
        let zo = null;
        return Zn && (zo = (un) => {
          let {
            current: Dn,
            today: cn
          } = un;
          return Zn({
            current: Dn,
            today: cn,
            info: {
              range: S.value ? "end" : "start"
            }
          });
        }), h(H7, {
          value: {
            inRange: !0,
            panelPosition: Ue,
            rangedValue: Ae.value || A.value,
            hoverRangedValue: Kn.value
          }
        }, {
          default: () => [h(_T, Q(Q(Q({}, e), ht), {}, {
            dateRender: zo,
            showTime: po,
            mode: B.value[S.value],
            generateConfig: vt,
            style: void 0,
            direction: Qn,
            disabledDate: S.value === 0 ? X : j,
            disabledTime: (un) => $o ? $o(un, S.value === 0 ? "start" : "end") : !1,
            class: Me({
              [`${Cn}-panel-focused`]: S.value === 0 ? !Ot.value : !ln.value
            }),
            value: rn(A.value, S.value),
            locale: Tt,
            tabIndex: -1,
            onPanelChange: (un, Dn) => {
              S.value === 0 && Be(!0), S.value === 1 && at(!0), R(Ur(B.value, Dn, S.value), Ur(A.value, un, S.value));
              let cn = un;
              Ue === "right" && B.value[S.value] === Dn && (cn = Zc(cn, Dn, vt, -1)), N(cn, S.value);
            },
            onOk: null,
            onSelect: void 0,
            onChange: void 0,
            defaultValue: S.value === 0 ? rn(A.value, 1) : rn(A.value, 0)
          }), null)]
        });
      }
      const Uo = (Ue, ht) => {
        const vt = Ur(A.value, Ue, S.value);
        ht === "submit" || ht !== "key" && !r.value ? (ze(vt, S.value), S.value === 0 ? Be() : at()) : H(vt);
      };
      return L0({
        operationRef: P,
        hideHeader: E(() => e.picker === "time"),
        onDateMouseenter: dt,
        onDateMouseleave: wt,
        hideRanges: E(() => !0),
        onSelect: Uo,
        open: ee
      }), () => {
        const {
          prefixCls: Ue = "rc-picker",
          id: ht,
          popupStyle: vt,
          dropdownClassName: Zt,
          transitionName: Zn,
          dropdownAlign: Qn,
          getPopupContainer: $o,
          generateConfig: Cn,
          locale: Tt,
          placeholder: po,
          autofocus: zo,
          picker: un = "date",
          showTime: Dn,
          separator: cn = "~",
          disabledDate: An,
          panelRender: er,
          allowClear: Jn,
          suffixIcon: pr,
          clearIcon: Wo,
          inputReadOnly: la,
          renderExtraFooter: sa,
          onMouseenter: ai,
          onMouseleave: Ei,
          onMouseup: Qa,
          onOk: Di,
          components: Za,
          direction: li,
          autocomplete: Ai = "off"
        } = e, Hl = li === "rtl" ? {
          right: `${ae.value}px`
        } : {
          left: `${ae.value}px`
        };
        function tr() {
          let ro;
          const nr = kT(Ue, B.value[S.value], sa), ua = IT({
            prefixCls: Ue,
            components: Za,
            needConfirmButton: r.value,
            okDisabled: !rn(A.value, S.value) || An && An(A.value[S.value]),
            locale: Tt,
            onOk: () => {
              rn(A.value, S.value) && (ze(A.value, S.value), Di && Di(A.value));
            }
          });
          if (un !== "time" && !Dn) {
            const Fo = S.value === 0 ? _.value : M.value, nl = Zc(Fo, un, Cn), rl = B.value[S.value] === un, Ni = so(rl ? "left" : !1, {
              pickerValue: Fo,
              onPickerValueChange: (Kl) => {
                N(Kl, S.value);
              }
            }), qs = so("right", {
              pickerValue: nl,
              onPickerValueChange: (Kl) => {
                N(Zc(Kl, un, Cn, -1), S.value);
              }
            });
            li === "rtl" ? ro = h(Je, null, [qs, rl && Ni]) : ro = h(Je, null, [Ni, rl && qs]);
          } else
            ro = so();
          let or = h("div", {
            class: `${Ue}-panel-layout`
          }, [h(MT, {
            prefixCls: Ue,
            presets: l.value,
            onClick: (Fo) => {
              ze(Fo, null), ge(!1, S.value);
            },
            onHover: (Fo) => {
              qe(Fo);
            }
          }, null), h("div", null, [h("div", {
            class: `${Ue}-panels`
          }, [ro]), (nr || ua) && h("div", {
            class: `${Ue}-footer`
          }, [nr, ua])])]);
          return er && (or = er(or)), h("div", {
            class: `${Ue}-panel-container`,
            style: {
              marginLeft: `${G.value}px`
            },
            ref: c,
            onMousedown: (Fo) => {
              Fo.preventDefault();
            }
          }, [or]);
        }
        const Ks = h("div", {
          class: Me(`${Ue}-range-wrapper`, `${Ue}-${un}-range-wrapper`),
          style: {
            minWidth: `${le.value}px`
          }
        }, [h("div", {
          ref: m,
          class: `${Ue}-range-arrow`,
          style: Hl
        }, null), tr()]);
        let Vl;
        pr && (Vl = h("span", {
          class: `${Ue}-suffix`
        }, [pr]));
        let Ja;
        Jn && (rn(I.value, 0) && !$.value[0] || rn(I.value, 1) && !$.value[1]) && (Ja = h("span", {
          onMousedown: (ro) => {
            ro.preventDefault(), ro.stopPropagation();
          },
          onMouseup: (ro) => {
            ro.preventDefault(), ro.stopPropagation();
            let nr = I.value;
            $.value[0] || (nr = Ur(nr, null, 0)), $.value[1] || (nr = Ur(nr, null, 1)), ze(nr, null), ge(!1, S.value);
          },
          class: `${Ue}-clear`
        }, [Wo || h("span", {
          class: `${Ue}-clear-btn`
        }, null)]));
        const jl = {
          size: mT(un, x.value[0], Cn)
        };
        let Wl = 0, el = 0;
        d.value && f.value && p.value && (S.value === 0 ? el = d.value.offsetWidth : (Wl = ae.value, el = f.value.offsetWidth));
        const tl = li === "rtl" ? {
          right: `${Wl}px`
        } : {
          left: `${Wl}px`
        };
        return h("div", Q({
          ref: u,
          class: Me(Ue, `${Ue}-range`, n.class, {
            [`${Ue}-disabled`]: $.value[0] && $.value[1],
            [`${Ue}-focused`]: S.value === 0 ? yt.value : Xt.value,
            [`${Ue}-rtl`]: li === "rtl"
          }),
          style: n.style,
          onClick: pn,
          onMouseenter: ai,
          onMouseleave: Ei,
          onMousedown: gt,
          onMouseup: Qa
        }, $T(e)), [h("div", {
          class: Me(`${Ue}-input`, {
            [`${Ue}-input-active`]: S.value === 0,
            [`${Ue}-input-placeholder`]: !!Ee.value
          }),
          ref: d
        }, [h("input", Q(Q(Q({
          id: ht,
          disabled: $.value[0],
          readonly: la || typeof x.value[0] == "function" || !Ot.value,
          value: Ee.value || nt.value,
          onInput: (ro) => {
            je(ro.target.value);
          },
          autofocus: zo,
          placeholder: rn(po, 0) || "",
          ref: v
        }, St.value), jl), {}, {
          autocomplete: Ai
        }), null)]), h("div", {
          class: `${Ue}-range-separator`,
          ref: p
        }, [cn]), h("div", {
          class: Me(`${Ue}-input`, {
            [`${Ue}-input-active`]: S.value === 1,
            [`${Ue}-input-placeholder`]: !!ot.value
          }),
          ref: f
        }, [h("input", Q(Q(Q({
          disabled: $.value[1],
          readonly: la || typeof x.value[0] == "function" || !ln.value,
          value: ot.value || Ge.value,
          onInput: (ro) => {
            Se(ro.target.value);
          },
          placeholder: rn(po, 1) || "",
          ref: g
        }, Wt.value), jl), {}, {
          autocomplete: Ai
        }), null)]), h("div", {
          class: `${Ue}-active-bar`,
          style: O(O({}, tl), {
            width: `${el}px`,
            position: "absolute"
          })
        }, null), Vl, Ja, h(TT, {
          visible: ee.value,
          popupStyle: vt,
          prefixCls: Ue,
          dropdownClassName: Zt,
          dropdownAlign: Qn,
          getPopupContainer: $o,
          transitionName: Zn,
          range: !0,
          direction: li
        }, {
          default: () => [h("div", {
            style: {
              pointerEvents: "none",
              position: "absolute",
              top: 0,
              bottom: 0,
              left: 0,
              right: 0
            }
          }, null)],
          popupElement: () => Ks
        })]);
      };
    }
  });
}
const u9 = s9();
var c9 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const d9 = {
  prefixCls: String,
  name: String,
  id: String,
  type: String,
  defaultChecked: {
    type: [Boolean, Number],
    default: void 0
  },
  checked: {
    type: [Boolean, Number],
    default: void 0
  },
  disabled: Boolean,
  tabindex: {
    type: [Number, String]
  },
  readonly: Boolean,
  autofocus: Boolean,
  value: fe.any,
  required: Boolean
}, RT = be({
  compatConfig: {
    MODE: 3
  },
  name: "Checkbox",
  inheritAttrs: !1,
  props: kn(d9, {
    prefixCls: "rc-checkbox",
    type: "checkbox",
    defaultChecked: !1
  }),
  emits: ["click", "change"],
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      expose: r
    } = t;
    const i = ce(e.checked === void 0 ? e.defaultChecked : e.checked), a = ce();
    ke(() => e.checked, () => {
      i.value = e.checked;
    }), r({
      focus() {
        var c;
        (c = a.value) === null || c === void 0 || c.focus();
      },
      blur() {
        var c;
        (c = a.value) === null || c === void 0 || c.blur();
      }
    });
    const l = ce(), s = (c) => {
      if (e.disabled)
        return;
      e.checked === void 0 && (i.value = c.target.checked), c.shiftKey = l.value;
      const d = {
        target: O(O({}, e), {
          checked: c.target.checked
        }),
        stopPropagation() {
          c.stopPropagation();
        },
        preventDefault() {
          c.preventDefault();
        },
        nativeEvent: c
      };
      e.checked !== void 0 && (a.value.checked = !!e.checked), o("change", d), l.value = !1;
    }, u = (c) => {
      o("click", c), l.value = c.shiftKey;
    };
    return () => {
      const {
        prefixCls: c,
        name: d,
        id: f,
        type: p,
        disabled: v,
        readonly: g,
        tabindex: m,
        autofocus: x,
        value: S,
        required: C
      } = e, P = c9(e, ["prefixCls", "name", "id", "type", "disabled", "readonly", "tabindex", "autofocus", "value", "required"]), {
        class: $,
        onFocus: I,
        onBlur: w,
        onKeydown: _,
        onKeypress: M,
        onKeyup: N
      } = n, A = O(O({}, P), n), H = Object.keys(A).reduce((R, X) => ((X.startsWith("data-") || X.startsWith("aria-") || X === "role") && (R[X] = A[X]), R), {}), B = Me(c, $, {
        [`${c}-checked`]: i.value,
        [`${c}-disabled`]: v
      }), F = O(O({
        name: d,
        id: f,
        type: p,
        readonly: g,
        disabled: v,
        tabindex: m,
        class: `${c}-input`,
        checked: !!i.value,
        autofocus: x,
        value: S
      }, H), {
        onChange: s,
        onClick: u,
        onFocus: I,
        onBlur: w,
        onKeydown: _,
        onKeypress: M,
        onKeyup: N,
        required: C
      });
      return h("span", {
        class: B
      }, [h("input", Q({
        ref: a
      }, F), null), h("span", {
        class: `${c}-inner`
      }, null)]);
    };
  }
}), zT = Symbol("radioGroupContextKey"), f9 = (e) => {
  Ft(zT, e);
}, p9 = () => zt(zT, void 0), FT = Symbol("radioOptionTypeContextKey"), h9 = (e) => {
  Ft(FT, e);
}, g9 = () => zt(FT, void 0), v9 = new tn("antRadioEffect", {
  "0%": {
    transform: "scale(1)",
    opacity: 0.5
  },
  "100%": {
    transform: "scale(1.6)",
    opacity: 0
  }
}), m9 = (e) => {
  const {
    componentCls: t,
    antCls: n
  } = e, o = `${t}-group`;
  return {
    [o]: O(O({}, fn(e)), {
      display: "inline-block",
      fontSize: 0,
      // RTL
      [`&${o}-rtl`]: {
        direction: "rtl"
      },
      [`${n}-badge ${n}-badge-count`]: {
        zIndex: 1
      },
      [`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]: {
        borderInlineStart: "none"
      }
    })
  };
}, b9 = (e) => {
  const {
    componentCls: t,
    radioWrapperMarginRight: n,
    radioCheckedColor: o,
    radioSize: r,
    motionDurationSlow: i,
    motionDurationMid: a,
    motionEaseInOut: l,
    motionEaseInOutCirc: s,
    radioButtonBg: u,
    colorBorder: c,
    lineWidth: d,
    radioDotSize: f,
    colorBgContainerDisabled: p,
    colorTextDisabled: v,
    paddingXS: g,
    radioDotDisabledColor: m,
    lineType: x,
    radioDotDisabledSize: S,
    wireframe: C,
    colorWhite: P
  } = e, $ = `${t}-inner`;
  return {
    [`${t}-wrapper`]: O(O({}, fn(e)), {
      position: "relative",
      display: "inline-flex",
      alignItems: "baseline",
      marginInlineStart: 0,
      marginInlineEnd: n,
      cursor: "pointer",
      // RTL
      [`&${t}-wrapper-rtl`]: {
        direction: "rtl"
      },
      "&-disabled": {
        cursor: "not-allowed",
        color: e.colorTextDisabled
      },
      "&::after": {
        display: "inline-block",
        width: 0,
        overflow: "hidden",
        content: '"\\a0"'
      },
      // hashId 在 wrapper 上，只能铺平
      [`${t}-checked::after`]: {
        position: "absolute",
        insetBlockStart: 0,
        insetInlineStart: 0,
        width: "100%",
        height: "100%",
        border: `${d}px ${x} ${o}`,
        borderRadius: "50%",
        visibility: "hidden",
        animationName: v9,
        animationDuration: i,
        animationTimingFunction: l,
        animationFillMode: "both",
        content: '""'
      },
      [t]: O(O({}, fn(e)), {
        position: "relative",
        display: "inline-block",
        outline: "none",
        cursor: "pointer",
        alignSelf: "center"
      }),
      [`${t}-wrapper:hover &,
        &:hover ${$}`]: {
        borderColor: o
      },
      [`${t}-input:focus-visible + ${$}`]: O({}, ja(e)),
      [`${t}:hover::after, ${t}-wrapper:hover &::after`]: {
        visibility: "visible"
      },
      [`${t}-inner`]: {
        "&::after": {
          boxSizing: "border-box",
          position: "absolute",
          insetBlockStart: "50%",
          insetInlineStart: "50%",
          display: "block",
          width: r,
          height: r,
          marginBlockStart: r / -2,
          marginInlineStart: r / -2,
          backgroundColor: C ? o : P,
          borderBlockStart: 0,
          borderInlineStart: 0,
          borderRadius: r,
          transform: "scale(0)",
          opacity: 0,
          transition: `all ${i} ${s}`,
          content: '""'
        },
        boxSizing: "border-box",
        position: "relative",
        insetBlockStart: 0,
        insetInlineStart: 0,
        display: "block",
        width: r,
        height: r,
        backgroundColor: u,
        borderColor: c,
        borderStyle: "solid",
        borderWidth: d,
        borderRadius: "50%",
        transition: `all ${a}`
      },
      [`${t}-input`]: {
        position: "absolute",
        insetBlockStart: 0,
        insetInlineEnd: 0,
        insetBlockEnd: 0,
        insetInlineStart: 0,
        zIndex: 1,
        cursor: "pointer",
        opacity: 0
      },
      // 选中状态
      [`${t}-checked`]: {
        [$]: {
          borderColor: o,
          backgroundColor: C ? u : o,
          "&::after": {
            transform: `scale(${f / r})`,
            opacity: 1,
            transition: `all ${i} ${s}`
          }
        }
      },
      [`${t}-disabled`]: {
        cursor: "not-allowed",
        [$]: {
          backgroundColor: p,
          borderColor: c,
          cursor: "not-allowed",
          "&::after": {
            backgroundColor: m
          }
        },
        [`${t}-input`]: {
          cursor: "not-allowed"
        },
        [`${t}-disabled + span`]: {
          color: v,
          cursor: "not-allowed"
        },
        [`&${t}-checked`]: {
          [$]: {
            "&::after": {
              transform: `scale(${S / r})`
            }
          }
        }
      },
      [`span${t} + *`]: {
        paddingInlineStart: g,
        paddingInlineEnd: g
      }
    })
  };
}, y9 = (e) => {
  const {
    radioButtonColor: t,
    controlHeight: n,
    componentCls: o,
    lineWidth: r,
    lineType: i,
    colorBorder: a,
    motionDurationSlow: l,
    motionDurationMid: s,
    radioButtonPaddingHorizontal: u,
    fontSize: c,
    radioButtonBg: d,
    fontSizeLG: f,
    controlHeightLG: p,
    controlHeightSM: v,
    paddingXS: g,
    borderRadius: m,
    borderRadiusSM: x,
    borderRadiusLG: S,
    radioCheckedColor: C,
    radioButtonCheckedBg: P,
    radioButtonHoverColor: $,
    radioButtonActiveColor: I,
    radioSolidCheckedColor: w,
    colorTextDisabled: _,
    colorBgContainerDisabled: M,
    radioDisabledButtonCheckedColor: N,
    radioDisabledButtonCheckedBg: A
  } = e;
  return {
    [`${o}-button-wrapper`]: {
      position: "relative",
      display: "inline-block",
      height: n,
      margin: 0,
      paddingInline: u,
      paddingBlock: 0,
      color: t,
      fontSize: c,
      lineHeight: `${n - r * 2}px`,
      background: d,
      border: `${r}px ${i} ${a}`,
      // strange align fix for chrome but works
      // https://gw.alipayobjects.com/zos/rmsportal/VFTfKXJuogBAXcvfAUWJ.gif
      borderBlockStartWidth: r + 0.02,
      borderInlineStartWidth: 0,
      borderInlineEndWidth: r,
      cursor: "pointer",
      transition: [`color ${s}`, `background ${s}`, `border-color ${s}`, `box-shadow ${s}`].join(","),
      a: {
        color: t
      },
      [`> ${o}-button`]: {
        position: "absolute",
        insetBlockStart: 0,
        insetInlineStart: 0,
        zIndex: -1,
        width: "100%",
        height: "100%"
      },
      "&:not(:first-child)": {
        "&::before": {
          position: "absolute",
          insetBlockStart: -r,
          insetInlineStart: -r,
          display: "block",
          boxSizing: "content-box",
          width: 1,
          height: "100%",
          paddingBlock: r,
          paddingInline: 0,
          backgroundColor: a,
          transition: `background-color ${l}`,
          content: '""'
        }
      },
      "&:first-child": {
        borderInlineStart: `${r}px ${i} ${a}`,
        borderStartStartRadius: m,
        borderEndStartRadius: m
      },
      "&:last-child": {
        borderStartEndRadius: m,
        borderEndEndRadius: m
      },
      "&:first-child:last-child": {
        borderRadius: m
      },
      [`${o}-group-large &`]: {
        height: p,
        fontSize: f,
        lineHeight: `${p - r * 2}px`,
        "&:first-child": {
          borderStartStartRadius: S,
          borderEndStartRadius: S
        },
        "&:last-child": {
          borderStartEndRadius: S,
          borderEndEndRadius: S
        }
      },
      [`${o}-group-small &`]: {
        height: v,
        paddingInline: g - r,
        paddingBlock: 0,
        lineHeight: `${v - r * 2}px`,
        "&:first-child": {
          borderStartStartRadius: x,
          borderEndStartRadius: x
        },
        "&:last-child": {
          borderStartEndRadius: x,
          borderEndEndRadius: x
        }
      },
      "&:hover": {
        position: "relative",
        color: C
      },
      "&:has(:focus-visible)": O({}, ja(e)),
      [`${o}-inner, input[type='checkbox'], input[type='radio']`]: {
        width: 0,
        height: 0,
        opacity: 0,
        pointerEvents: "none"
      },
      [`&-checked:not(${o}-button-wrapper-disabled)`]: {
        zIndex: 1,
        color: C,
        background: P,
        borderColor: C,
        "&::before": {
          backgroundColor: C
        },
        "&:first-child": {
          borderColor: C
        },
        "&:hover": {
          color: $,
          borderColor: $,
          "&::before": {
            backgroundColor: $
          }
        },
        "&:active": {
          color: I,
          borderColor: I,
          "&::before": {
            backgroundColor: I
          }
        }
      },
      [`${o}-group-solid &-checked:not(${o}-button-wrapper-disabled)`]: {
        color: w,
        background: C,
        borderColor: C,
        "&:hover": {
          color: w,
          background: $,
          borderColor: $
        },
        "&:active": {
          color: w,
          background: I,
          borderColor: I
        }
      },
      "&-disabled": {
        color: _,
        backgroundColor: M,
        borderColor: a,
        cursor: "not-allowed",
        "&:first-child, &:hover": {
          color: _,
          backgroundColor: M,
          borderColor: a
        }
      },
      [`&-disabled${o}-button-wrapper-checked`]: {
        color: N,
        backgroundColor: A,
        borderColor: a,
        boxShadow: "none"
      }
    }
  };
}, BT = Sn("Radio", (e) => {
  const {
    padding: t,
    lineWidth: n,
    controlItemBgActiveDisabled: o,
    colorTextDisabled: r,
    colorBgContainer: i,
    fontSizeLG: a,
    controlOutline: l,
    colorPrimaryHover: s,
    colorPrimaryActive: u,
    colorText: c,
    colorPrimary: d,
    marginXS: f,
    controlOutlineWidth: p,
    colorTextLightSolid: v,
    wireframe: g
  } = e, m = `0 0 0 ${p}px ${l}`, x = m, S = a, C = 4, P = S - C * 2, $ = g ? P : S - (C + n) * 2, I = d, w = c, _ = s, M = u, N = t - n, B = Qt(e, {
    radioFocusShadow: m,
    radioButtonFocusShadow: x,
    radioSize: S,
    radioDotSize: $,
    radioDotDisabledSize: P,
    radioCheckedColor: I,
    radioDotDisabledColor: r,
    radioSolidCheckedColor: v,
    radioButtonBg: i,
    radioButtonCheckedBg: i,
    radioButtonColor: w,
    radioButtonHoverColor: _,
    radioButtonActiveColor: M,
    radioButtonPaddingHorizontal: N,
    radioDisabledButtonCheckedBg: o,
    radioDisabledButtonCheckedColor: r,
    radioWrapperMarginRight: f
  });
  return [m9(B), b9(B), y9(B)];
});
var x9 = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const LT = () => ({
  prefixCls: String,
  checked: ct(),
  disabled: ct(),
  isGroup: ct(),
  value: fe.any,
  name: String,
  id: String,
  autofocus: ct(),
  onChange: et(),
  onFocus: et(),
  onBlur: et(),
  onClick: et(),
  "onUpdate:checked": et(),
  "onUpdate:value": et()
}), _o = be({
  compatConfig: {
    MODE: 3
  },
  name: "ARadio",
  inheritAttrs: !1,
  props: LT(),
  setup(e, t) {
    let {
      emit: n,
      expose: o,
      slots: r,
      attrs: i
    } = t;
    const a = Br(), l = Nr.useInject(), s = g9(), u = p9(), c = _i(), d = E(() => {
      var _;
      return (_ = g.value) !== null && _ !== void 0 ? _ : c.value;
    }), f = ce(), {
      prefixCls: p,
      direction: v,
      disabled: g
    } = _t("radio", e), m = E(() => u?.optionType.value === "button" || s === "button" ? `${p.value}-button` : p.value), x = _i(), [S, C] = BT(p);
    o({
      focus: () => {
        f.value.focus();
      },
      blur: () => {
        f.value.blur();
      }
    });
    const I = (_) => {
      const M = _.target.checked;
      n("update:checked", M), n("update:value", M), n("change", _), a.onFieldChange();
    }, w = (_) => {
      n("change", _), u && u.onChange && u.onChange(_);
    };
    return () => {
      var _;
      const M = u, {
        prefixCls: N,
        id: A = a.id.value
      } = e, H = x9(e, ["prefixCls", "id"]), B = O(O({
        prefixCls: m.value,
        id: A
      }, Fn(H, ["onUpdate:checked", "onUpdate:value"])), {
        disabled: (_ = g.value) !== null && _ !== void 0 ? _ : x.value
      });
      M ? (B.name = M.name.value, B.onChange = w, B.checked = e.value === M.value.value, B.disabled = d.value || M.disabled.value) : B.onChange = I;
      const F = Me({
        [`${m.value}-wrapper`]: !0,
        [`${m.value}-wrapper-checked`]: B.checked,
        [`${m.value}-wrapper-disabled`]: B.disabled,
        [`${m.value}-wrapper-rtl`]: v.value === "rtl",
        [`${m.value}-wrapper-in-form-item`]: l.isFormItemInput
      }, i.class, C.value);
      return S(h("label", Q(Q({}, i), {}, {
        class: F
      }), [h(RT, Q(Q({}, B), {}, {
        type: "radio",
        ref: f
      }), null), r.default && h("span", null, [r.default()])]));
    };
  }
}), w9 = () => ({
  prefixCls: String,
  value: fe.any,
  size: an(),
  options: jn(),
  disabled: ct(),
  name: String,
  buttonStyle: an("outline"),
  id: String,
  optionType: an("default"),
  onChange: et(),
  "onUpdate:value": et()
}), HT = be({
  compatConfig: {
    MODE: 3
  },
  name: "ARadioGroup",
  inheritAttrs: !1,
  props: w9(),
  // emits: ['update:value', 'change'],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: r
    } = t;
    const i = Br(), {
      prefixCls: a,
      direction: l,
      size: s
    } = _t("radio", e), [u, c] = BT(a), d = ce(e.value), f = ce(!1);
    return ke(() => e.value, (v) => {
      d.value = v, f.value = !1;
    }), f9({
      onChange: (v) => {
        const g = d.value, {
          value: m
        } = v.target;
        "value" in e || (d.value = m), !f.value && m !== g && (f.value = !0, o("update:value", m), o("change", v), i.onFieldChange()), Yt(() => {
          f.value = !1;
        });
      },
      value: d,
      disabled: E(() => e.disabled),
      name: E(() => e.name),
      optionType: E(() => e.optionType)
    }), () => {
      var v;
      const {
        options: g,
        buttonStyle: m,
        id: x = i.id.value
      } = e, S = `${a.value}-group`, C = Me(S, `${S}-${m}`, {
        [`${S}-${s.value}`]: s.value,
        [`${S}-rtl`]: l.value === "rtl"
      }, r.class, c.value);
      let P = null;
      return g && g.length > 0 ? P = g.map(($) => {
        if (typeof $ == "string" || typeof $ == "number")
          return h(_o, {
            key: $,
            prefixCls: a.value,
            disabled: e.disabled,
            value: $,
            checked: d.value === $
          }, {
            default: () => [$]
          });
        const {
          value: I,
          disabled: w,
          label: _
        } = $;
        return h(_o, {
          key: `radio-group-value-options-${I}`,
          prefixCls: a.value,
          disabled: w || e.disabled,
          value: I,
          checked: d.value === I
        }, {
          default: () => [_]
        });
      }) : P = (v = n.default) === null || v === void 0 ? void 0 : v.call(n), u(h("div", Q(Q({}, r), {}, {
        class: C,
        id: x
      }), [P]));
    };
  }
}), S9 = be({
  compatConfig: {
    MODE: 3
  },
  name: "ARadioButton",
  inheritAttrs: !1,
  props: LT(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: r
    } = _t("radio", e);
    return h9("button"), () => {
      var i;
      return h(_o, Q(Q(Q({}, o), e), {}, {
        prefixCls: r.value
      }), {
        default: () => [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]
      });
    };
  }
});
_o.Group = HT;
_o.Button = S9;
_o.install = function(e) {
  return e.component(_o.name, _o), e.component(_o.Group.name, _o.Group), e.component(_o.Button.name, _o.Button), e;
};
const VT = (e) => ({
  // Firefox
  "&::-moz-placeholder": {
    opacity: 1
  },
  "&::placeholder": {
    color: e,
    userSelect: "none"
    // https://github.com/ant-design/ant-design/pull/32639
  },
  "&:placeholder-shown": {
    textOverflow: "ellipsis"
  }
}), hc = (e) => ({
  borderColor: e.inputBorderHoverColor,
  borderInlineEndWidth: e.lineWidth
}), Ds = (e) => ({
  borderColor: e.inputBorderHoverColor,
  boxShadow: `0 0 0 ${e.controlOutlineWidth}px ${e.controlOutline}`,
  borderInlineEndWidth: e.lineWidth,
  outline: 0
}), jT = (e) => ({
  color: e.colorTextDisabled,
  backgroundColor: e.colorBgContainerDisabled,
  borderColor: e.colorBorder,
  boxShadow: "none",
  cursor: "not-allowed",
  opacity: 1,
  "&:hover": O({}, hc(Qt(e, {
    inputBorderHoverColor: e.colorBorder
  })))
}), WT = (e) => {
  const {
    inputPaddingVerticalLG: t,
    fontSizeLG: n,
    lineHeightLG: o,
    borderRadiusLG: r,
    inputPaddingHorizontalLG: i
  } = e;
  return {
    padding: `${t}px ${i}px`,
    fontSize: n,
    lineHeight: o,
    borderRadius: r
  };
}, rx = (e) => ({
  padding: `${e.inputPaddingVerticalSM}px ${e.controlPaddingHorizontalSM - 1}px`,
  borderRadius: e.borderRadiusSM
}), Uh = (e, t) => {
  const {
    componentCls: n,
    colorError: o,
    colorWarning: r,
    colorErrorOutline: i,
    colorWarningOutline: a,
    colorErrorBorderHover: l,
    colorWarningBorderHover: s
  } = e;
  return {
    [`&-status-error:not(${t}-disabled):not(${t}-borderless)${t}`]: {
      borderColor: o,
      "&:hover": {
        borderColor: l
      },
      "&:focus, &-focused": O({}, Ds(Qt(e, {
        inputBorderActiveColor: o,
        inputBorderHoverColor: o,
        controlOutline: i
      }))),
      [`${n}-prefix`]: {
        color: o
      }
    },
    [`&-status-warning:not(${t}-disabled):not(${t}-borderless)${t}`]: {
      borderColor: r,
      "&:hover": {
        borderColor: s
      },
      "&:focus, &-focused": O({}, Ds(Qt(e, {
        inputBorderActiveColor: r,
        inputBorderHoverColor: r,
        controlOutline: a
      }))),
      [`${n}-prefix`]: {
        color: r
      }
    }
  };
}, gc = (e) => O(O({
  position: "relative",
  display: "inline-block",
  width: "100%",
  minWidth: 0,
  padding: `${e.inputPaddingVertical}px ${e.inputPaddingHorizontal}px`,
  color: e.colorText,
  fontSize: e.fontSize,
  lineHeight: e.lineHeight,
  backgroundColor: e.colorBgContainer,
  backgroundImage: "none",
  borderWidth: e.lineWidth,
  borderStyle: e.lineType,
  borderColor: e.colorBorder,
  borderRadius: e.borderRadius,
  transition: `all ${e.motionDurationMid}`
}, VT(e.colorTextPlaceholder)), {
  "&:hover": O({}, hc(e)),
  "&:focus, &-focused": O({}, Ds(e)),
  "&-disabled, &[disabled]": O({}, jT(e)),
  "&-borderless": {
    "&, &:hover, &:focus, &-focused, &-disabled, &[disabled]": {
      backgroundColor: "transparent",
      border: "none",
      boxShadow: "none"
    }
  },
  // Reset height for `textarea`s
  "textarea&": {
    maxWidth: "100%",
    height: "auto",
    minHeight: e.controlHeight,
    lineHeight: e.lineHeight,
    verticalAlign: "bottom",
    transition: `all ${e.motionDurationSlow}, height 0s`,
    resize: "vertical"
  },
  // Size
  "&-lg": O({}, WT(e)),
  "&-sm": O({}, rx(e)),
  // RTL
  "&-rtl": {
    direction: "rtl"
  },
  "&-textarea-rtl": {
    direction: "rtl"
  }
}), KT = (e) => {
  const {
    componentCls: t,
    antCls: n
  } = e;
  return {
    position: "relative",
    display: "table",
    width: "100%",
    borderCollapse: "separate",
    borderSpacing: 0,
    // Undo padding and float of grid classes
    "&[class*='col-']": {
      paddingInlineEnd: e.paddingXS,
      "&:last-child": {
        paddingInlineEnd: 0
      }
    },
    // Sizing options
    [`&-lg ${t}, &-lg > ${t}-group-addon`]: O({}, WT(e)),
    [`&-sm ${t}, &-sm > ${t}-group-addon`]: O({}, rx(e)),
    [`> ${t}`]: {
      display: "table-cell",
      "&:not(:first-child):not(:last-child)": {
        borderRadius: 0
      }
    },
    [`${t}-group`]: {
      "&-addon, &-wrap": {
        display: "table-cell",
        width: 1,
        whiteSpace: "nowrap",
        verticalAlign: "middle",
        "&:not(:first-child):not(:last-child)": {
          borderRadius: 0
        }
      },
      "&-wrap > *": {
        display: "block !important"
      },
      "&-addon": {
        position: "relative",
        padding: `0 ${e.inputPaddingHorizontal}px`,
        color: e.colorText,
        fontWeight: "normal",
        fontSize: e.fontSize,
        textAlign: "center",
        backgroundColor: e.colorFillAlter,
        border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
        borderRadius: e.borderRadius,
        transition: `all ${e.motionDurationSlow}`,
        lineHeight: 1,
        // Reset Select's style in addon
        [`${n}-select`]: {
          margin: `-${e.inputPaddingVertical + 1}px -${e.inputPaddingHorizontal}px`,
          [`&${n}-select-single:not(${n}-select-customize-input)`]: {
            [`${n}-select-selector`]: {
              backgroundColor: "inherit",
              border: `${e.lineWidth}px ${e.lineType} transparent`,
              boxShadow: "none"
            }
          },
          "&-open, &-focused": {
            [`${n}-select-selector`]: {
              color: e.colorPrimary
            }
          }
        },
        // https://github.com/ant-design/ant-design/issues/31333
        [`${n}-cascader-picker`]: {
          margin: `-9px -${e.inputPaddingHorizontal}px`,
          backgroundColor: "transparent",
          [`${n}-cascader-input`]: {
            textAlign: "start",
            border: 0,
            boxShadow: "none"
          }
        }
      },
      "&-addon:first-child": {
        borderInlineEnd: 0
      },
      "&-addon:last-child": {
        borderInlineStart: 0
      }
    },
    [`${t}`]: {
      float: "inline-start",
      width: "100%",
      marginBottom: 0,
      textAlign: "inherit",
      "&:focus": {
        zIndex: 1,
        borderInlineEndWidth: 1
      },
      "&:hover": {
        zIndex: 1,
        borderInlineEndWidth: 1,
        [`${t}-search-with-button &`]: {
          zIndex: 0
        }
      }
    },
    // Reset rounded corners
    [`> ${t}:first-child, ${t}-group-addon:first-child`]: {
      borderStartEndRadius: 0,
      borderEndEndRadius: 0,
      // Reset Select's style in addon
      [`${n}-select ${n}-select-selector`]: {
        borderStartEndRadius: 0,
        borderEndEndRadius: 0
      }
    },
    [`> ${t}-affix-wrapper`]: {
      [`&:not(:first-child) ${t}`]: {
        borderStartStartRadius: 0,
        borderEndStartRadius: 0
      },
      [`&:not(:last-child) ${t}`]: {
        borderStartEndRadius: 0,
        borderEndEndRadius: 0
      }
    },
    [`> ${t}:last-child, ${t}-group-addon:last-child`]: {
      borderStartStartRadius: 0,
      borderEndStartRadius: 0,
      // Reset Select's style in addon
      [`${n}-select ${n}-select-selector`]: {
        borderStartStartRadius: 0,
        borderEndStartRadius: 0
      }
    },
    [`${t}-affix-wrapper`]: {
      "&:not(:last-child)": {
        borderStartEndRadius: 0,
        borderEndEndRadius: 0,
        [`${t}-search &`]: {
          borderStartStartRadius: e.borderRadius,
          borderEndStartRadius: e.borderRadius
        }
      },
      [`&:not(:first-child), ${t}-search &:not(:first-child)`]: {
        borderStartStartRadius: 0,
        borderEndStartRadius: 0
      }
    },
    [`&${t}-group-compact`]: O(O({
      display: "block"
    }, Va()), {
      [`${t}-group-addon, ${t}-group-wrap, > ${t}`]: {
        "&:not(:first-child):not(:last-child)": {
          borderInlineEndWidth: e.lineWidth,
          "&:hover": {
            zIndex: 1
          },
          "&:focus": {
            zIndex: 1
          }
        }
      },
      "& > *": {
        display: "inline-block",
        float: "none",
        verticalAlign: "top",
        borderRadius: 0
      },
      [`& > ${t}-affix-wrapper`]: {
        display: "inline-flex"
      },
      [`& > ${n}-picker-range`]: {
        display: "inline-flex"
      },
      "& > *:not(:last-child)": {
        marginInlineEnd: -e.lineWidth,
        borderInlineEndWidth: e.lineWidth
      },
      // Undo float for .ant-input-group .ant-input
      [`${t}`]: {
        float: "none"
      },
      // reset border for Select, DatePicker, AutoComplete, Cascader, Mention, TimePicker, Input
      [`& > ${n}-select > ${n}-select-selector,
      & > ${n}-select-auto-complete ${t},
      & > ${n}-cascader-picker ${t},
      & > ${t}-group-wrapper ${t}`]: {
        borderInlineEndWidth: e.lineWidth,
        borderRadius: 0,
        "&:hover": {
          zIndex: 1
        },
        "&:focus": {
          zIndex: 1
        }
      },
      [`& > ${n}-select-focused`]: {
        zIndex: 1
      },
      // update z-index for arrow icon
      [`& > ${n}-select > ${n}-select-arrow`]: {
        zIndex: 1
        // https://github.com/ant-design/ant-design/issues/20371
      },
      [`& > *:first-child,
      & > ${n}-select:first-child > ${n}-select-selector,
      & > ${n}-select-auto-complete:first-child ${t},
      & > ${n}-cascader-picker:first-child ${t}`]: {
        borderStartStartRadius: e.borderRadius,
        borderEndStartRadius: e.borderRadius
      },
      [`& > *:last-child,
      & > ${n}-select:last-child > ${n}-select-selector,
      & > ${n}-cascader-picker:last-child ${t},
      & > ${n}-cascader-picker-focused:last-child ${t}`]: {
        borderInlineEndWidth: e.lineWidth,
        borderStartEndRadius: e.borderRadius,
        borderEndEndRadius: e.borderRadius
      },
      // https://github.com/ant-design/ant-design/issues/12493
      [`& > ${n}-select-auto-complete ${t}`]: {
        verticalAlign: "top"
      },
      [`${t}-group-wrapper + ${t}-group-wrapper`]: {
        marginInlineStart: -e.lineWidth,
        [`${t}-affix-wrapper`]: {
          borderRadius: 0
        }
      },
      [`${t}-group-wrapper:not(:last-child)`]: {
        [`&${t}-search > ${t}-group`]: {
          [`& > ${t}-group-addon > ${t}-search-button`]: {
            borderRadius: 0
          },
          [`& > ${t}`]: {
            borderStartStartRadius: e.borderRadius,
            borderStartEndRadius: 0,
            borderEndEndRadius: 0,
            borderEndStartRadius: e.borderRadius
          }
        }
      }
    }),
    [`&&-sm ${n}-btn`]: {
      fontSize: e.fontSizeSM,
      height: e.controlHeightSM,
      lineHeight: "normal"
    },
    [`&&-lg ${n}-btn`]: {
      fontSize: e.fontSizeLG,
      height: e.controlHeightLG,
      lineHeight: "normal"
    },
    // Fix https://github.com/ant-design/ant-design/issues/5754
    [`&&-lg ${n}-select-single ${n}-select-selector`]: {
      height: `${e.controlHeightLG}px`,
      [`${n}-select-selection-item, ${n}-select-selection-placeholder`]: {
        // -2 is for the border size & override default
        lineHeight: `${e.controlHeightLG - 2}px`
      },
      [`${n}-select-selection-search-input`]: {
        height: `${e.controlHeightLG}px`
      }
    },
    [`&&-sm ${n}-select-single ${n}-select-selector`]: {
      height: `${e.controlHeightSM}px`,
      [`${n}-select-selection-item, ${n}-select-selection-placeholder`]: {
        // -2 is for the border size & override default
        lineHeight: `${e.controlHeightSM - 2}px`
      },
      [`${n}-select-selection-search-input`]: {
        height: `${e.controlHeightSM}px`
      }
    }
  };
}, C9 = (e) => {
  const {
    componentCls: t,
    controlHeightSM: n,
    lineWidth: o
  } = e, i = (n - o * 2 - 16) / 2;
  return {
    [t]: O(O(O(O({}, fn(e)), gc(e)), Uh(e, t)), {
      '&[type="color"]': {
        height: e.controlHeight,
        [`&${t}-lg`]: {
          height: e.controlHeightLG
        },
        [`&${t}-sm`]: {
          height: n,
          paddingTop: i,
          paddingBottom: i
        }
      }
    })
  };
}, $9 = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    // ========================= Input =========================
    [`${t}-clear-icon`]: {
      margin: 0,
      color: e.colorTextQuaternary,
      fontSize: e.fontSizeIcon,
      verticalAlign: -1,
      // https://github.com/ant-design/ant-design/pull/18151
      // https://codesandbox.io/s/wizardly-sun-u10br
      cursor: "pointer",
      transition: `color ${e.motionDurationSlow}`,
      "&:hover": {
        color: e.colorTextTertiary
      },
      "&:active": {
        color: e.colorText
      },
      "&-hidden": {
        visibility: "hidden"
      },
      "&-has-suffix": {
        margin: `0 ${e.inputAffixPadding}px`
      }
    },
    // ======================= TextArea ========================
    "&-textarea-with-clear-btn": {
      padding: "0 !important",
      border: "0 !important",
      [`${t}-clear-icon`]: {
        position: "absolute",
        insetBlockStart: e.paddingXS,
        insetInlineEnd: e.paddingXS,
        zIndex: 1
      }
    }
  };
}, P9 = (e) => {
  const {
    componentCls: t,
    inputAffixPadding: n,
    colorTextDescription: o,
    motionDurationSlow: r,
    colorIcon: i,
    colorIconHover: a,
    iconCls: l
  } = e;
  return {
    [`${t}-affix-wrapper`]: O(O(O(O(O({}, gc(e)), {
      display: "inline-flex",
      [`&:not(${t}-affix-wrapper-disabled):hover`]: O(O({}, hc(e)), {
        zIndex: 1,
        [`${t}-search-with-button &`]: {
          zIndex: 0
        }
      }),
      "&-focused, &:focus": {
        zIndex: 1
      },
      "&-disabled": {
        [`${t}[disabled]`]: {
          background: "transparent"
        }
      },
      [`> input${t}`]: {
        padding: 0,
        fontSize: "inherit",
        border: "none",
        borderRadius: 0,
        outline: "none",
        "&:focus": {
          boxShadow: "none !important"
        }
      },
      "&::before": {
        width: 0,
        visibility: "hidden",
        content: '"\\a0"'
      },
      [`${t}`]: {
        "&-prefix, &-suffix": {
          display: "flex",
          flex: "none",
          alignItems: "center",
          "> *:not(:last-child)": {
            marginInlineEnd: e.paddingXS
          }
        },
        "&-show-count-suffix": {
          color: o
        },
        "&-show-count-has-suffix": {
          marginInlineEnd: e.paddingXXS
        },
        "&-prefix": {
          marginInlineEnd: n
        },
        "&-suffix": {
          marginInlineStart: n
        }
      }
    }), $9(e)), {
      // password
      [`${l}${t}-password-icon`]: {
        color: i,
        cursor: "pointer",
        transition: `all ${r}`,
        "&:hover": {
          color: a
        }
      }
    }), Uh(e, `${t}-affix-wrapper`))
  };
}, O9 = (e) => {
  const {
    componentCls: t,
    colorError: n,
    colorSuccess: o,
    borderRadiusLG: r,
    borderRadiusSM: i
  } = e;
  return {
    [`${t}-group`]: O(O(O({}, fn(e)), KT(e)), {
      "&-rtl": {
        direction: "rtl"
      },
      "&-wrapper": {
        display: "inline-block",
        width: "100%",
        textAlign: "start",
        verticalAlign: "top",
        "&-rtl": {
          direction: "rtl"
        },
        // Size
        "&-lg": {
          [`${t}-group-addon`]: {
            borderRadius: r
          }
        },
        "&-sm": {
          [`${t}-group-addon`]: {
            borderRadius: i
          }
        },
        // Status
        "&-status-error": {
          [`${t}-group-addon`]: {
            color: n,
            borderColor: n
          }
        },
        "&-status-warning": {
          [`${t}-group-addon:last-child`]: {
            color: o,
            borderColor: o
          }
        }
      }
    })
  };
}, k9 = (e) => {
  const {
    componentCls: t,
    antCls: n
  } = e, o = `${t}-search`;
  return {
    [o]: {
      [`${t}`]: {
        "&:hover, &:focus": {
          borderColor: e.colorPrimaryHover,
          [`+ ${t}-group-addon ${o}-button:not(${n}-btn-primary)`]: {
            borderInlineStartColor: e.colorPrimaryHover
          }
        }
      },
      [`${t}-affix-wrapper`]: {
        borderRadius: 0
      },
      // fix slight height diff in Firefox:
      // https://ant.design/components/auto-complete-cn/#components-auto-complete-demo-certain-category
      [`${t}-lg`]: {
        lineHeight: e.lineHeightLG - 2e-4
      },
      [`> ${t}-group`]: {
        [`> ${t}-group-addon:last-child`]: {
          insetInlineStart: -1,
          padding: 0,
          border: 0,
          [`${o}-button`]: {
            paddingTop: 0,
            paddingBottom: 0,
            borderStartStartRadius: 0,
            borderStartEndRadius: e.borderRadius,
            borderEndEndRadius: e.borderRadius,
            borderEndStartRadius: 0
          },
          [`${o}-button:not(${n}-btn-primary)`]: {
            color: e.colorTextDescription,
            "&:hover": {
              color: e.colorPrimaryHover
            },
            "&:active": {
              color: e.colorPrimaryActive
            },
            [`&${n}-btn-loading::before`]: {
              insetInlineStart: 0,
              insetInlineEnd: 0,
              insetBlockStart: 0,
              insetBlockEnd: 0
            }
          }
        }
      },
      [`${o}-button`]: {
        height: e.controlHeight,
        "&:hover, &:focus": {
          zIndex: 1
        }
      },
      [`&-large ${o}-button`]: {
        height: e.controlHeightLG
      },
      [`&-small ${o}-button`]: {
        height: e.controlHeightSM
      },
      "&-rtl": {
        direction: "rtl"
      },
      // ===================== Compact Item Customized Styles =====================
      [`&${t}-compact-item`]: {
        [`&:not(${t}-compact-last-item)`]: {
          [`${t}-group-addon`]: {
            [`${t}-search-button`]: {
              marginInlineEnd: -e.lineWidth,
              borderRadius: 0
            }
          }
        },
        [`&:not(${t}-compact-first-item)`]: {
          [`${t},${t}-affix-wrapper`]: {
            borderRadius: 0
          }
        },
        [`> ${t}-group-addon ${t}-search-button,
        > ${t},
        ${t}-affix-wrapper`]: {
          "&:hover,&:focus,&:active": {
            zIndex: 2
          }
        },
        [`> ${t}-affix-wrapper-focused`]: {
          zIndex: 2
        }
      }
    }
  };
};
function Xh(e) {
  return Qt(e, {
    inputAffixPadding: e.paddingXXS,
    inputPaddingVertical: Math.max(Math.round((e.controlHeight - e.fontSize * e.lineHeight) / 2 * 10) / 10 - e.lineWidth, 3),
    inputPaddingVerticalLG: Math.ceil((e.controlHeightLG - e.fontSizeLG * e.lineHeightLG) / 2 * 10) / 10 - e.lineWidth,
    inputPaddingVerticalSM: Math.max(Math.round((e.controlHeightSM - e.fontSize * e.lineHeight) / 2 * 10) / 10 - e.lineWidth, 0),
    inputPaddingHorizontal: e.paddingSM - e.lineWidth,
    inputPaddingHorizontalSM: e.paddingXS - e.lineWidth,
    inputPaddingHorizontalLG: e.controlPaddingHorizontal - e.lineWidth,
    inputBorderHoverColor: e.colorPrimaryHover,
    inputBorderActiveColor: e.colorPrimaryHover
  });
}
const I9 = (e) => {
  const {
    componentCls: t,
    inputPaddingHorizontal: n,
    paddingLG: o
  } = e, r = `${t}-textarea`;
  return {
    [r]: {
      position: "relative",
      [`${r}-suffix`]: {
        position: "absolute",
        top: 0,
        insetInlineEnd: n,
        bottom: 0,
        zIndex: 1,
        display: "inline-flex",
        alignItems: "center",
        margin: "auto"
      },
      "&-status-error,\n        &-status-warning,\n        &-status-success,\n        &-status-validating": {
        [`&${r}-has-feedback`]: {
          [`${t}`]: {
            paddingInlineEnd: o
          }
        }
      },
      "&-show-count": {
        // https://github.com/ant-design/ant-design/issues/33049
        [`> ${t}`]: {
          height: "100%"
        },
        "&::after": {
          color: e.colorTextDescription,
          whiteSpace: "nowrap",
          content: "attr(data-count)",
          pointerEvents: "none",
          float: "right"
        }
      },
      "&-rtl": {
        "&::after": {
          float: "left"
        }
      }
    }
  };
}, ix = Sn("Input", (e) => {
  const t = Xh(e);
  return [
    C9(t),
    I9(t),
    P9(t),
    O9(t),
    k9(t),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    Fd(t)
  ];
}), pv = (e, t, n, o) => {
  const {
    lineHeight: r
  } = e, i = Math.floor(n * r) + 2, a = Math.max((t - i) / 2, 0), l = Math.max(t - i - a, 0);
  return {
    padding: `${a}px ${o}px ${l}px`
  };
}, _9 = (e) => {
  const {
    componentCls: t,
    pickerCellCls: n,
    pickerCellInnerCls: o,
    pickerPanelCellHeight: r,
    motionDurationSlow: i,
    borderRadiusSM: a,
    motionDurationMid: l,
    controlItemBgHover: s,
    lineWidth: u,
    lineType: c,
    colorPrimary: d,
    controlItemBgActive: f,
    colorTextLightSolid: p,
    controlHeightSM: v,
    pickerDateHoverRangeBorderColor: g,
    pickerCellBorderGap: m,
    pickerBasicCellHoverWithRangeColor: x,
    pickerPanelCellWidth: S,
    colorTextDisabled: C,
    colorBgContainerDisabled: P
  } = e;
  return {
    "&::before": {
      position: "absolute",
      top: "50%",
      insetInlineStart: 0,
      insetInlineEnd: 0,
      zIndex: 1,
      height: r,
      transform: "translateY(-50%)",
      transition: `all ${i}`,
      content: '""'
    },
    // >>> Default
    [o]: {
      position: "relative",
      zIndex: 2,
      display: "inline-block",
      minWidth: r,
      height: r,
      lineHeight: `${r}px`,
      borderRadius: a,
      transition: `background ${l}, border ${l}`
    },
    // >>> Hover
    [`&:hover:not(${n}-in-view),
    &:hover:not(${n}-selected):not(${n}-range-start):not(${n}-range-end):not(${n}-range-hover-start):not(${n}-range-hover-end)`]: {
      [o]: {
        background: s
      }
    },
    // >>> Today
    [`&-in-view${n}-today ${o}`]: {
      "&::before": {
        position: "absolute",
        top: 0,
        insetInlineEnd: 0,
        bottom: 0,
        insetInlineStart: 0,
        zIndex: 1,
        border: `${u}px ${c} ${d}`,
        borderRadius: a,
        content: '""'
      }
    },
    // >>> In Range
    [`&-in-view${n}-in-range`]: {
      position: "relative",
      "&::before": {
        background: f
      }
    },
    // >>> Selected
    [`&-in-view${n}-selected ${o},
      &-in-view${n}-range-start ${o},
      &-in-view${n}-range-end ${o}`]: {
      color: p,
      background: d
    },
    [`&-in-view${n}-range-start:not(${n}-range-start-single),
      &-in-view${n}-range-end:not(${n}-range-end-single)`]: {
      "&::before": {
        background: f
      }
    },
    [`&-in-view${n}-range-start::before`]: {
      insetInlineStart: "50%"
    },
    [`&-in-view${n}-range-end::before`]: {
      insetInlineEnd: "50%"
    },
    // >>> Range Hover
    [`&-in-view${n}-range-hover-start:not(${n}-in-range):not(${n}-range-start):not(${n}-range-end),
      &-in-view${n}-range-hover-end:not(${n}-in-range):not(${n}-range-start):not(${n}-range-end),
      &-in-view${n}-range-hover-start${n}-range-start-single,
      &-in-view${n}-range-hover-start${n}-range-start${n}-range-end${n}-range-end-near-hover,
      &-in-view${n}-range-hover-end${n}-range-start${n}-range-end${n}-range-start-near-hover,
      &-in-view${n}-range-hover-end${n}-range-end-single,
      &-in-view${n}-range-hover:not(${n}-in-range)`]: {
      "&::after": {
        position: "absolute",
        top: "50%",
        zIndex: 0,
        height: v,
        borderTop: `${u}px dashed ${g}`,
        borderBottom: `${u}px dashed ${g}`,
        transform: "translateY(-50%)",
        transition: `all ${i}`,
        content: '""'
      }
    },
    // Add space for stash
    "&-range-hover-start::after,\n      &-range-hover-end::after,\n      &-range-hover::after": {
      insetInlineEnd: 0,
      insetInlineStart: m
    },
    // Hover with in range
    [`&-in-view${n}-in-range${n}-range-hover::before,
      &-in-view${n}-range-start${n}-range-hover::before,
      &-in-view${n}-range-end${n}-range-hover::before,
      &-in-view${n}-range-start:not(${n}-range-start-single)${n}-range-hover-start::before,
      &-in-view${n}-range-end:not(${n}-range-end-single)${n}-range-hover-end::before,
      ${t}-panel
      > :not(${t}-date-panel)
      &-in-view${n}-in-range${n}-range-hover-start::before,
      ${t}-panel
      > :not(${t}-date-panel)
      &-in-view${n}-in-range${n}-range-hover-end::before`]: {
      background: x
    },
    // range start border-radius
    [`&-in-view${n}-range-start:not(${n}-range-start-single):not(${n}-range-end) ${o}`]: {
      borderStartStartRadius: a,
      borderEndStartRadius: a,
      borderStartEndRadius: 0,
      borderEndEndRadius: 0
    },
    // range end border-radius
    [`&-in-view${n}-range-end:not(${n}-range-end-single):not(${n}-range-start) ${o}`]: {
      borderStartStartRadius: 0,
      borderEndStartRadius: 0,
      borderStartEndRadius: a,
      borderEndEndRadius: a
    },
    [`&-range-hover${n}-range-end::after`]: {
      insetInlineStart: "50%"
    },
    // Edge start
    [`tr > &-in-view${n}-range-hover:first-child::after,
      tr > &-in-view${n}-range-hover-end:first-child::after,
      &-in-view${n}-start${n}-range-hover-edge-start${n}-range-hover-edge-start-near-range::after,
      &-in-view${n}-range-hover-edge-start:not(${n}-range-hover-edge-start-near-range)::after,
      &-in-view${n}-range-hover-start::after`]: {
      insetInlineStart: (S - r) / 2,
      borderInlineStart: `${u}px dashed ${g}`,
      borderStartStartRadius: u,
      borderEndStartRadius: u
    },
    // Edge end
    [`tr > &-in-view${n}-range-hover:last-child::after,
      tr > &-in-view${n}-range-hover-start:last-child::after,
      &-in-view${n}-end${n}-range-hover-edge-end${n}-range-hover-edge-end-near-range::after,
      &-in-view${n}-range-hover-edge-end:not(${n}-range-hover-edge-end-near-range)::after,
      &-in-view${n}-range-hover-end::after`]: {
      insetInlineEnd: (S - r) / 2,
      borderInlineEnd: `${u}px dashed ${g}`,
      borderStartEndRadius: u,
      borderEndEndRadius: u
    },
    // >>> Disabled
    "&-disabled": {
      color: C,
      pointerEvents: "none",
      [o]: {
        background: "transparent"
      },
      "&::before": {
        background: P
      }
    },
    [`&-disabled${n}-today ${o}::before`]: {
      borderColor: C
    }
  };
}, T9 = (e) => {
  const {
    componentCls: t,
    pickerCellInnerCls: n,
    pickerYearMonthCellWidth: o,
    pickerControlIconSize: r,
    pickerPanelCellWidth: i,
    paddingSM: a,
    paddingXS: l,
    paddingXXS: s,
    colorBgContainer: u,
    lineWidth: c,
    lineType: d,
    borderRadiusLG: f,
    colorPrimary: p,
    colorTextHeading: v,
    colorSplit: g,
    pickerControlIconBorderWidth: m,
    colorIcon: x,
    pickerTextHeight: S,
    motionDurationMid: C,
    colorIconHover: P,
    fontWeightStrong: $,
    pickerPanelCellHeight: I,
    pickerCellPaddingVertical: w,
    colorTextDisabled: _,
    colorText: M,
    fontSize: N,
    pickerBasicCellHoverWithRangeColor: A,
    motionDurationSlow: H,
    pickerPanelWithoutTimeCellHeight: B,
    pickerQuarterPanelContentHeight: F,
    colorLink: R,
    colorLinkActive: X,
    colorLinkHover: j,
    pickerDateHoverRangeBorderColor: ee,
    borderRadiusSM: W,
    colorTextLightSolid: K,
    borderRadius: q,
    controlItemBgHover: G,
    pickerTimePanelColumnHeight: ae,
    pickerTimePanelColumnWidth: le,
    pickerTimePanelCellHeight: ie,
    controlItemBgActive: re,
    marginXXS: te
  } = e, ve = i * 7 + a * 2 + 4, ue = (ve - l * 2) / 3 - o - a;
  return {
    [t]: {
      "&-panel": {
        display: "inline-flex",
        flexDirection: "column",
        textAlign: "center",
        background: u,
        border: `${c}px ${d} ${g}`,
        borderRadius: f,
        outline: "none",
        "&-focused": {
          borderColor: p
        },
        "&-rtl": {
          direction: "rtl",
          [`${t}-prev-icon,
              ${t}-super-prev-icon`]: {
            transform: "rotate(45deg)"
          },
          [`${t}-next-icon,
              ${t}-super-next-icon`]: {
            transform: "rotate(-135deg)"
          }
        }
      },
      // ========================================================
      // =                     Shared Panel                     =
      // ========================================================
      "&-decade-panel,\n        &-year-panel,\n        &-quarter-panel,\n        &-month-panel,\n        &-week-panel,\n        &-date-panel,\n        &-time-panel": {
        display: "flex",
        flexDirection: "column",
        width: ve
      },
      // ======================= Header =======================
      "&-header": {
        display: "flex",
        padding: `0 ${l}px`,
        color: v,
        borderBottom: `${c}px ${d} ${g}`,
        "> *": {
          flex: "none"
        },
        button: {
          padding: 0,
          color: x,
          lineHeight: `${S}px`,
          background: "transparent",
          border: 0,
          cursor: "pointer",
          transition: `color ${C}`
        },
        "> button": {
          minWidth: "1.6em",
          fontSize: N,
          "&:hover": {
            color: P
          }
        },
        "&-view": {
          flex: "auto",
          fontWeight: $,
          lineHeight: `${S}px`,
          button: {
            color: "inherit",
            fontWeight: "inherit",
            verticalAlign: "top",
            "&:not(:first-child)": {
              marginInlineStart: l
            },
            "&:hover": {
              color: p
            }
          }
        }
      },
      // Arrow button
      "&-prev-icon,\n        &-next-icon,\n        &-super-prev-icon,\n        &-super-next-icon": {
        position: "relative",
        display: "inline-block",
        width: r,
        height: r,
        "&::before": {
          position: "absolute",
          top: 0,
          insetInlineStart: 0,
          display: "inline-block",
          width: r,
          height: r,
          border: "0 solid currentcolor",
          borderBlockStartWidth: m,
          borderBlockEndWidth: 0,
          borderInlineStartWidth: m,
          borderInlineEndWidth: 0,
          content: '""'
        }
      },
      "&-super-prev-icon,\n        &-super-next-icon": {
        "&::after": {
          position: "absolute",
          top: Math.ceil(r / 2),
          insetInlineStart: Math.ceil(r / 2),
          display: "inline-block",
          width: r,
          height: r,
          border: "0 solid currentcolor",
          borderBlockStartWidth: m,
          borderBlockEndWidth: 0,
          borderInlineStartWidth: m,
          borderInlineEndWidth: 0,
          content: '""'
        }
      },
      "&-prev-icon,\n        &-super-prev-icon": {
        transform: "rotate(-45deg)"
      },
      "&-next-icon,\n        &-super-next-icon": {
        transform: "rotate(135deg)"
      },
      // ======================== Body ========================
      "&-content": {
        width: "100%",
        tableLayout: "fixed",
        borderCollapse: "collapse",
        "th, td": {
          position: "relative",
          minWidth: I,
          fontWeight: "normal"
        },
        th: {
          height: I + w * 2,
          color: M,
          verticalAlign: "middle"
        }
      },
      "&-cell": O({
        padding: `${w}px 0`,
        color: _,
        cursor: "pointer",
        // In view
        "&-in-view": {
          color: M
        }
      }, _9(e)),
      // DatePanel only
      [`&-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-start ${n},
        &-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-end ${n}`]: {
        "&::after": {
          position: "absolute",
          top: 0,
          bottom: 0,
          zIndex: -1,
          background: A,
          transition: `all ${H}`,
          content: '""'
        }
      },
      [`&-date-panel
        ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-start
        ${n}::after`]: {
        insetInlineEnd: -(i - I) / 2,
        insetInlineStart: 0
      },
      [`&-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-end ${n}::after`]: {
        insetInlineEnd: 0,
        insetInlineStart: -(i - I) / 2
      },
      // Hover with range start & end
      [`&-range-hover${t}-range-start::after`]: {
        insetInlineEnd: "50%"
      },
      "&-decade-panel,\n        &-year-panel,\n        &-quarter-panel,\n        &-month-panel": {
        [`${t}-content`]: {
          height: B * 4
        },
        [n]: {
          padding: `0 ${l}px`
        }
      },
      "&-quarter-panel": {
        [`${t}-content`]: {
          height: F
        }
      },
      // ======================== Footer ========================
      [`&-panel ${t}-footer`]: {
        borderTop: `${c}px ${d} ${g}`
      },
      "&-footer": {
        width: "min-content",
        minWidth: "100%",
        lineHeight: `${S - 2 * c}px`,
        textAlign: "center",
        "&-extra": {
          padding: `0 ${a}`,
          lineHeight: `${S - 2 * c}px`,
          textAlign: "start",
          "&:not(:last-child)": {
            borderBottom: `${c}px ${d} ${g}`
          }
        }
      },
      "&-now": {
        textAlign: "start"
      },
      "&-today-btn": {
        color: R,
        "&:hover": {
          color: j
        },
        "&:active": {
          color: X
        },
        [`&${t}-today-btn-disabled`]: {
          color: _,
          cursor: "not-allowed"
        }
      },
      // ========================================================
      // =                       Special                        =
      // ========================================================
      // ===================== Decade Panel =====================
      "&-decade-panel": {
        [n]: {
          padding: `0 ${l / 2}px`
        },
        [`${t}-cell::before`]: {
          display: "none"
        }
      },
      // ============= Year & Quarter & Month Panel =============
      "&-year-panel,\n        &-quarter-panel,\n        &-month-panel": {
        [`${t}-body`]: {
          padding: `0 ${l}px`
        },
        [n]: {
          width: o
        },
        [`${t}-cell-range-hover-start::after`]: {
          insetInlineStart: ue,
          borderInlineStart: `${c}px dashed ${ee}`,
          borderStartStartRadius: W,
          borderBottomStartRadius: W,
          borderStartEndRadius: 0,
          borderBottomEndRadius: 0,
          [`${t}-panel-rtl &`]: {
            insetInlineEnd: ue,
            borderInlineEnd: `${c}px dashed ${ee}`,
            borderStartStartRadius: 0,
            borderBottomStartRadius: 0,
            borderStartEndRadius: W,
            borderBottomEndRadius: W
          }
        },
        [`${t}-cell-range-hover-end::after`]: {
          insetInlineEnd: ue,
          borderInlineEnd: `${c}px dashed ${ee}`,
          borderStartStartRadius: 0,
          borderEndStartRadius: 0,
          borderStartEndRadius: q,
          borderEndEndRadius: q,
          [`${t}-panel-rtl &`]: {
            insetInlineStart: ue,
            borderInlineStart: `${c}px dashed ${ee}`,
            borderStartStartRadius: q,
            borderEndStartRadius: q,
            borderStartEndRadius: 0,
            borderEndEndRadius: 0
          }
        }
      },
      // ====================== Week Panel ======================
      "&-week-panel": {
        [`${t}-body`]: {
          padding: `${l}px ${a}px`
        },
        // Clear cell style
        [`${t}-cell`]: {
          [`&:hover ${n},
            &-selected ${n},
            ${n}`]: {
            background: "transparent !important"
          }
        },
        "&-row": {
          td: {
            transition: `background ${C}`,
            "&:first-child": {
              borderStartStartRadius: W,
              borderEndStartRadius: W
            },
            "&:last-child": {
              borderStartEndRadius: W,
              borderEndEndRadius: W
            }
          },
          "&:hover td": {
            background: G
          },
          "&-selected td,\n            &-selected:hover td": {
            background: p,
            [`&${t}-cell-week`]: {
              color: new _n(K).setAlpha(0.5).toHexString()
            },
            [`&${t}-cell-today ${n}::before`]: {
              borderColor: K
            },
            [n]: {
              color: K
            }
          }
        }
      },
      // ====================== Date Panel ======================
      "&-date-panel": {
        [`${t}-body`]: {
          padding: `${l}px ${a}px`
        },
        [`${t}-content`]: {
          width: i * 7,
          th: {
            width: i
          }
        }
      },
      // ==================== Datetime Panel ====================
      "&-datetime-panel": {
        display: "flex",
        [`${t}-time-panel`]: {
          borderInlineStart: `${c}px ${d} ${g}`
        },
        [`${t}-date-panel,
          ${t}-time-panel`]: {
          transition: `opacity ${H}`
        },
        // Keyboard
        "&-active": {
          [`${t}-date-panel,
            ${t}-time-panel`]: {
            opacity: 0.3,
            "&-active": {
              opacity: 1
            }
          }
        }
      },
      // ====================== Time Panel ======================
      "&-time-panel": {
        width: "auto",
        minWidth: "auto",
        direction: "ltr",
        [`${t}-content`]: {
          display: "flex",
          flex: "auto",
          height: ae
        },
        "&-column": {
          flex: "1 0 auto",
          width: le,
          margin: `${s}px 0`,
          padding: 0,
          overflowY: "hidden",
          textAlign: "start",
          listStyle: "none",
          transition: `background ${C}`,
          overflowX: "hidden",
          "&::after": {
            display: "block",
            height: ae - ie,
            content: '""'
          },
          "&:not(:first-child)": {
            borderInlineStart: `${c}px ${d} ${g}`
          },
          "&-active": {
            background: new _n(re).setAlpha(0.2).toHexString()
          },
          "&:hover": {
            overflowY: "auto"
          },
          "> li": {
            margin: 0,
            padding: 0,
            [`&${t}-time-panel-cell`]: {
              marginInline: te,
              [`${t}-time-panel-cell-inner`]: {
                display: "block",
                width: le - 2 * te,
                height: ie,
                margin: 0,
                paddingBlock: 0,
                paddingInlineEnd: 0,
                paddingInlineStart: (le - ie) / 2,
                color: M,
                lineHeight: `${ie}px`,
                borderRadius: W,
                cursor: "pointer",
                transition: `background ${C}`,
                "&:hover": {
                  background: G
                }
              },
              "&-selected": {
                [`${t}-time-panel-cell-inner`]: {
                  background: re
                }
              },
              "&-disabled": {
                [`${t}-time-panel-cell-inner`]: {
                  color: _,
                  background: "transparent",
                  cursor: "not-allowed"
                }
              }
            }
          }
        }
      },
      // https://github.com/ant-design/ant-design/issues/39227
      [`&-datetime-panel ${t}-time-panel-column:after`]: {
        height: ae - ie + s * 2
      }
    }
  };
}, M9 = (e) => {
  const {
    componentCls: t,
    colorBgContainer: n,
    colorError: o,
    colorErrorOutline: r,
    colorWarning: i,
    colorWarningOutline: a
  } = e;
  return {
    [t]: {
      [`&-status-error${t}`]: {
        "&, &:not([disabled]):hover": {
          backgroundColor: n,
          borderColor: o
        },
        "&-focused, &:focus": O({}, Ds(Qt(e, {
          inputBorderActiveColor: o,
          inputBorderHoverColor: o,
          controlOutline: r
        }))),
        [`${t}-active-bar`]: {
          background: o
        }
      },
      [`&-status-warning${t}`]: {
        "&, &:not([disabled]):hover": {
          backgroundColor: n,
          borderColor: i
        },
        "&-focused, &:focus": O({}, Ds(Qt(e, {
          inputBorderActiveColor: i,
          inputBorderHoverColor: i,
          controlOutline: a
        }))),
        [`${t}-active-bar`]: {
          background: i
        }
      }
    }
  };
}, E9 = (e) => {
  const {
    componentCls: t,
    antCls: n,
    boxShadowPopoverArrow: o,
    controlHeight: r,
    fontSize: i,
    inputPaddingHorizontal: a,
    colorBgContainer: l,
    lineWidth: s,
    lineType: u,
    colorBorder: c,
    borderRadius: d,
    motionDurationMid: f,
    colorBgContainerDisabled: p,
    colorTextDisabled: v,
    colorTextPlaceholder: g,
    controlHeightLG: m,
    fontSizeLG: x,
    controlHeightSM: S,
    inputPaddingHorizontalSM: C,
    paddingXS: P,
    marginXS: $,
    colorTextDescription: I,
    lineWidthBold: w,
    lineHeight: _,
    colorPrimary: M,
    motionDurationSlow: N,
    zIndexPopup: A,
    paddingXXS: H,
    paddingSM: B,
    pickerTextHeight: F,
    controlItemBgActive: R,
    colorPrimaryBorder: X,
    sizePopupArrow: j,
    borderRadiusXS: ee,
    borderRadiusOuter: W,
    colorBgElevated: K,
    borderRadiusLG: q,
    boxShadowSecondary: G,
    borderRadiusSM: ae,
    colorSplit: le,
    controlItemBgHover: ie,
    presetsWidth: re,
    presetsMaxWidth: te
  } = e;
  return [
    {
      [t]: O(O(O({}, fn(e)), pv(e, r, i, a)), {
        position: "relative",
        display: "inline-flex",
        alignItems: "center",
        background: l,
        lineHeight: 1,
        border: `${s}px ${u} ${c}`,
        borderRadius: d,
        transition: `border ${f}, box-shadow ${f}`,
        "&:hover, &-focused": O({}, hc(e)),
        "&-focused": O({}, Ds(e)),
        [`&${t}-disabled`]: {
          background: p,
          borderColor: c,
          cursor: "not-allowed",
          [`${t}-suffix`]: {
            color: v
          }
        },
        [`&${t}-borderless`]: {
          backgroundColor: "transparent !important",
          borderColor: "transparent !important",
          boxShadow: "none !important"
        },
        // ======================== Input =========================
        [`${t}-input`]: {
          position: "relative",
          display: "inline-flex",
          alignItems: "center",
          width: "100%",
          "> input": O(O({}, gc(e)), {
            flex: "auto",
            // Fix Firefox flex not correct:
            // https://github.com/ant-design/ant-design/pull/20023#issuecomment-564389553
            minWidth: 1,
            height: "auto",
            padding: 0,
            background: "transparent",
            border: 0,
            "&:focus": {
              boxShadow: "none"
            },
            "&[disabled]": {
              background: "transparent"
            }
          }),
          "&:hover": {
            [`${t}-clear`]: {
              opacity: 1
            }
          },
          "&-placeholder": {
            "> input": {
              color: g
            }
          }
        },
        // Size
        "&-large": O(O({}, pv(e, m, x, a)), {
          [`${t}-input > input`]: {
            fontSize: x
          }
        }),
        "&-small": O({}, pv(e, S, i, C)),
        [`${t}-suffix`]: {
          display: "flex",
          flex: "none",
          alignSelf: "center",
          marginInlineStart: P / 2,
          color: v,
          lineHeight: 1,
          pointerEvents: "none",
          "> *": {
            verticalAlign: "top",
            "&:not(:last-child)": {
              marginInlineEnd: $
            }
          }
        },
        [`${t}-clear`]: {
          position: "absolute",
          top: "50%",
          insetInlineEnd: 0,
          color: v,
          lineHeight: 1,
          background: l,
          transform: "translateY(-50%)",
          cursor: "pointer",
          opacity: 0,
          transition: `opacity ${f}, color ${f}`,
          "> *": {
            verticalAlign: "top"
          },
          "&:hover": {
            color: I
          }
        },
        [`${t}-separator`]: {
          position: "relative",
          display: "inline-block",
          width: "1em",
          height: x,
          color: v,
          fontSize: x,
          verticalAlign: "top",
          cursor: "default",
          [`${t}-focused &`]: {
            color: I
          },
          [`${t}-range-separator &`]: {
            [`${t}-disabled &`]: {
              cursor: "not-allowed"
            }
          }
        },
        // ======================== Range =========================
        "&-range": {
          position: "relative",
          display: "inline-flex",
          // Clear
          [`${t}-clear`]: {
            insetInlineEnd: a
          },
          "&:hover": {
            [`${t}-clear`]: {
              opacity: 1
            }
          },
          // Active bar
          [`${t}-active-bar`]: {
            bottom: -s,
            height: w,
            marginInlineStart: a,
            background: M,
            opacity: 0,
            transition: `all ${N} ease-out`,
            pointerEvents: "none"
          },
          [`&${t}-focused`]: {
            [`${t}-active-bar`]: {
              opacity: 1
            }
          },
          [`${t}-range-separator`]: {
            alignItems: "center",
            padding: `0 ${P}px`,
            lineHeight: 1
          },
          [`&${t}-small`]: {
            [`${t}-clear`]: {
              insetInlineEnd: C
            },
            [`${t}-active-bar`]: {
              marginInlineStart: C
            }
          }
        },
        // ======================= Dropdown =======================
        "&-dropdown": O(O(O({}, fn(e)), T9(e)), {
          position: "absolute",
          // Fix incorrect position of picker popup
          // https://github.com/ant-design/ant-design/issues/35590
          top: -9999,
          left: {
            _skip_check_: !0,
            value: -9999
          },
          zIndex: A,
          [`&${t}-dropdown-hidden`]: {
            display: "none"
          },
          [`&${t}-dropdown-placement-bottomLeft`]: {
            [`${t}-range-arrow`]: {
              top: 0,
              display: "block",
              transform: "translateY(-100%)"
            }
          },
          [`&${t}-dropdown-placement-topLeft`]: {
            [`${t}-range-arrow`]: {
              bottom: 0,
              display: "block",
              transform: "translateY(100%) rotate(180deg)"
            }
          },
          [`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topLeft,
          &${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topRight,
          &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topLeft,
          &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topRight`]: {
            animationName: Hh
          },
          [`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomLeft,
          &${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomRight,
          &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomLeft,
          &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomRight`]: {
            animationName: Bh
          },
          [`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topLeft,
          &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topRight`]: {
            animationName: Vh
          },
          [`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomLeft,
          &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomRight`]: {
            animationName: Lh
          },
          // Time picker with additional style
          [`${t}-panel > ${t}-time-panel`]: {
            paddingTop: H
          },
          // ======================== Ranges ========================
          [`${t}-ranges`]: {
            marginBottom: 0,
            padding: `${H}px ${B}px`,
            overflow: "hidden",
            lineHeight: `${F - 2 * s - P / 2}px`,
            textAlign: "start",
            listStyle: "none",
            display: "flex",
            justifyContent: "space-between",
            "> li": {
              display: "inline-block"
            },
            // https://github.com/ant-design/ant-design/issues/23687
            [`${t}-preset > ${n}-tag-blue`]: {
              color: M,
              background: R,
              borderColor: X,
              cursor: "pointer"
            },
            [`${t}-ok`]: {
              marginInlineStart: "auto"
            }
          },
          [`${t}-range-wrapper`]: {
            display: "flex",
            position: "relative"
          },
          [`${t}-range-arrow`]: O({
            position: "absolute",
            zIndex: 1,
            display: "none",
            marginInlineStart: a * 1.5,
            transition: `left ${N} ease-out`
          }, e0(j, ee, W, K, o)),
          [`${t}-panel-container`]: {
            overflow: "hidden",
            verticalAlign: "top",
            background: K,
            borderRadius: q,
            boxShadow: G,
            transition: `margin ${N}`,
            // ======================== Layout ========================
            [`${t}-panel-layout`]: {
              display: "flex",
              flexWrap: "nowrap",
              alignItems: "stretch"
            },
            // ======================== Preset ========================
            [`${t}-presets`]: {
              display: "flex",
              flexDirection: "column",
              minWidth: re,
              maxWidth: te,
              ul: {
                height: 0,
                flex: "auto",
                listStyle: "none",
                overflow: "auto",
                margin: 0,
                padding: P,
                borderInlineEnd: `${s}px ${u} ${le}`,
                li: O(O({}, Ha), {
                  borderRadius: ae,
                  paddingInline: P,
                  paddingBlock: (S - Math.round(i * _)) / 2,
                  cursor: "pointer",
                  transition: `all ${N}`,
                  "+ li": {
                    marginTop: $
                  },
                  "&:hover": {
                    background: ie
                  }
                })
              }
            },
            // ======================== Panels ========================
            [`${t}-panels`]: {
              display: "inline-flex",
              flexWrap: "nowrap",
              direction: "ltr",
              [`${t}-panel`]: {
                borderWidth: `0 0 ${s}px`
              },
              "&:last-child": {
                [`${t}-panel`]: {
                  borderWidth: 0
                }
              }
            },
            [`${t}-panel`]: {
              verticalAlign: "top",
              background: "transparent",
              borderRadius: 0,
              borderWidth: 0,
              [`${t}-content,
            table`]: {
                textAlign: "center"
              },
              "&-focused": {
                borderColor: c
              }
            }
          }
        }),
        "&-dropdown-range": {
          padding: `${j * 2 / 3}px 0`,
          "&-hidden": {
            display: "none"
          }
        },
        "&-rtl": {
          direction: "rtl",
          [`${t}-separator`]: {
            transform: "rotate(180deg)"
          },
          [`${t}-footer`]: {
            "&-extra": {
              direction: "rtl"
            }
          }
        }
      })
    },
    // Follow code may reuse in other components
    ea(e, "slide-up"),
    ea(e, "slide-down"),
    Xu(e, "move-up"),
    Xu(e, "move-down")
  ];
}, D9 = (e) => {
  const {
    componentCls: n,
    controlHeightLG: o,
    controlHeightSM: r,
    colorPrimary: i,
    paddingXXS: a
  } = e;
  return {
    pickerCellCls: `${n}-cell`,
    pickerCellInnerCls: `${n}-cell-inner`,
    pickerTextHeight: o,
    pickerPanelCellWidth: r * 1.5,
    pickerPanelCellHeight: r,
    pickerDateHoverRangeBorderColor: new _n(i).lighten(20).toHexString(),
    pickerBasicCellHoverWithRangeColor: new _n(i).lighten(35).toHexString(),
    pickerPanelWithoutTimeCellHeight: o * 1.65,
    pickerYearMonthCellWidth: o * 1.5,
    pickerTimePanelColumnHeight: 224,
    pickerTimePanelColumnWidth: o * 1.4,
    pickerTimePanelCellHeight: 28,
    pickerQuarterPanelContentHeight: o * 1.4,
    pickerCellPaddingVertical: a,
    pickerCellBorderGap: 2,
    pickerControlIconSize: 7,
    pickerControlIconBorderWidth: 1.5
  };
}, qT = Sn("DatePicker", (e) => {
  const t = Qt(Xh(e), D9(e));
  return [
    E9(t),
    M9(t),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    Fd(e, {
      focusElCls: `${e.componentCls}-focused`
    })
  ];
}, (e) => ({
  presetsWidth: 120,
  presetsMaxWidth: 200,
  zIndexPopup: e.zIndexPopupBase + 50
}));
function A9(e) {
  const t = $e(), n = $e(!1);
  function o() {
    for (var r = arguments.length, i = new Array(r), a = 0; a < r; a++)
      i[a] = arguments[a];
    n.value || (Vt.cancel(t.value), t.value = Vt(() => {
      e(...i);
    }));
  }
  return qt(() => {
    n.value = !0, Vt.cancel(t.value);
  }), o;
}
function N9(e) {
  const t = $e([]), n = $e(typeof e == "function" ? e() : e), o = A9(() => {
    let i = n.value;
    t.value.forEach((a) => {
      i = a(i);
    }), t.value = [], n.value = i;
  });
  function r(i) {
    t.value.push(i), o();
  }
  return [n, r];
}
const R9 = be({
  compatConfig: {
    MODE: 3
  },
  name: "TabNode",
  props: {
    id: {
      type: String
    },
    prefixCls: {
      type: String
    },
    tab: {
      type: Object
    },
    active: {
      type: Boolean
    },
    closable: {
      type: Boolean
    },
    editable: {
      type: Object
    },
    onClick: {
      type: Function
    },
    onResize: {
      type: Function
    },
    renderWrapper: {
      type: Function
    },
    removeAriaLabel: {
      type: String
    },
    // onRemove: { type: Function as PropType<() => void> },
    onFocus: {
      type: Function
    }
  },
  emits: ["click", "resize", "remove", "focus"],
  setup(e, t) {
    let {
      expose: n,
      attrs: o
    } = t;
    const r = ce();
    function i(s) {
      var u;
      !((u = e.tab) === null || u === void 0) && u.disabled || e.onClick(s);
    }
    n({
      domRef: r
    });
    function a(s) {
      var u;
      s.preventDefault(), s.stopPropagation(), e.editable.onEdit("remove", {
        key: (u = e.tab) === null || u === void 0 ? void 0 : u.key,
        event: s
      });
    }
    const l = E(() => {
      var s;
      return e.editable && e.closable !== !1 && !(!((s = e.tab) === null || s === void 0) && s.disabled);
    });
    return () => {
      var s;
      const {
        prefixCls: u,
        id: c,
        active: d,
        tab: {
          key: f,
          tab: p,
          disabled: v,
          closeIcon: g
        },
        renderWrapper: m,
        removeAriaLabel: x,
        editable: S,
        onFocus: C
      } = e, P = `${u}-tab`, $ = h("div", {
        key: f,
        ref: r,
        class: Me(P, {
          [`${P}-with-remove`]: l.value,
          [`${P}-active`]: d,
          [`${P}-disabled`]: v
        }),
        style: o.style,
        onClick: i
      }, [h("div", {
        role: "tab",
        "aria-selected": d,
        id: c && `${c}-tab-${f}`,
        class: `${P}-btn`,
        "aria-controls": c && `${c}-panel-${f}`,
        "aria-disabled": v,
        tabindex: v ? null : 0,
        onClick: (I) => {
          I.stopPropagation(), i(I);
        },
        onKeydown: (I) => {
          [it.SPACE, it.ENTER].includes(I.which) && (I.preventDefault(), i(I));
        },
        onFocus: C
      }, [typeof p == "function" ? p() : p]), l.value && h("button", {
        type: "button",
        "aria-label": x || "remove",
        tabindex: 0,
        class: `${P}-remove`,
        onClick: (I) => {
          I.stopPropagation(), a(I);
        }
      }, [g?.() || ((s = S.removeIcon) === null || s === void 0 ? void 0 : s.call(S)) || "×"])]);
      return m ? m($) : $;
    };
  }
}), iC = {
  width: 0,
  height: 0,
  left: 0,
  top: 0
};
function z9(e, t) {
  const n = ce(/* @__PURE__ */ new Map());
  return It(() => {
    var o, r;
    const i = /* @__PURE__ */ new Map(), a = e.value, l = t.value.get((o = a[0]) === null || o === void 0 ? void 0 : o.key) || iC, s = l.left + l.width;
    for (let u = 0; u < a.length; u += 1) {
      const {
        key: c
      } = a[u];
      let d = t.value.get(c);
      d || (d = t.value.get((r = a[u - 1]) === null || r === void 0 ? void 0 : r.key) || iC);
      const f = i.get(c) || O({}, d);
      f.right = s - f.left - f.width, i.set(c, f);
    }
    n.value = new Map(i);
  }), n;
}
const YT = be({
  compatConfig: {
    MODE: 3
  },
  name: "AddButton",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    editable: {
      type: Object
    },
    locale: {
      type: Object,
      default: void 0
    }
  },
  setup(e, t) {
    let {
      expose: n,
      attrs: o
    } = t;
    const r = ce();
    return n({
      domRef: r
    }), () => {
      const {
        prefixCls: i,
        editable: a,
        locale: l
      } = e;
      return !a || a.showAdd === !1 ? null : h("button", {
        ref: r,
        type: "button",
        class: `${i}-nav-add`,
        style: o.style,
        "aria-label": l?.addAriaLabel || "Add tab",
        onClick: (s) => {
          a.onEdit("add", {
            event: s
          });
        }
      }, [a.addIcon ? a.addIcon() : "+"]);
    };
  }
}), F9 = {
  prefixCls: {
    type: String
  },
  id: {
    type: String
  },
  tabs: {
    type: Object
  },
  rtl: {
    type: Boolean
  },
  tabBarGutter: {
    type: Number
  },
  activeKey: {
    type: [String, Number]
  },
  mobile: {
    type: Boolean
  },
  moreIcon: fe.any,
  moreTransitionName: {
    type: String
  },
  editable: {
    type: Object
  },
  locale: {
    type: Object,
    default: void 0
  },
  removeAriaLabel: String,
  onTabClick: {
    type: Function
  },
  popupClassName: String,
  getPopupContainer: et()
}, B9 = be({
  compatConfig: {
    MODE: 3
  },
  name: "OperationNode",
  inheritAttrs: !1,
  props: F9,
  emits: ["tabClick"],
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const [r, i] = $n(!1), [a, l] = $n(null), s = (p) => {
      const v = e.tabs.filter((x) => !x.disabled);
      let g = v.findIndex((x) => x.key === a.value) || 0;
      const m = v.length;
      for (let x = 0; x < m; x += 1) {
        g = (g + p + m) % m;
        const S = v[g];
        if (!S.disabled) {
          l(S.key);
          return;
        }
      }
    }, u = (p) => {
      const {
        which: v
      } = p;
      if (!r.value) {
        [it.DOWN, it.SPACE, it.ENTER].includes(v) && (i(!0), p.preventDefault());
        return;
      }
      switch (v) {
        case it.UP:
          s(-1), p.preventDefault();
          break;
        case it.DOWN:
          s(1), p.preventDefault();
          break;
        case it.ESC:
          i(!1);
          break;
        case it.SPACE:
        case it.ENTER:
          a.value !== null && e.onTabClick(a.value, p);
          break;
      }
    }, c = E(() => `${e.id}-more-popup`), d = E(() => a.value !== null ? `${c.value}-${a.value}` : null), f = (p, v) => {
      p.preventDefault(), p.stopPropagation(), e.editable.onEdit("remove", {
        key: v,
        event: p
      });
    };
    return Nt(() => {
      ke(a, () => {
        const p = document.getElementById(d.value);
        p && p.scrollIntoView && p.scrollIntoView(!1);
      }, {
        flush: "post",
        immediate: !0
      });
    }), ke(r, () => {
      r.value || l(null);
    }), tT({}), () => {
      var p;
      const {
        prefixCls: v,
        id: g,
        tabs: m,
        locale: x,
        mobile: S,
        moreIcon: C = ((p = o.moreIcon) === null || p === void 0 ? void 0 : p.call(o)) || h(Bd, null, null),
        moreTransitionName: P,
        editable: $,
        tabBarGutter: I,
        rtl: w,
        onTabClick: _,
        popupClassName: M
      } = e;
      if (!m.length) return null;
      const N = `${v}-dropdown`, A = x?.dropdownAriaLabel, H = {
        [w ? "marginRight" : "marginLeft"]: I
      };
      m.length || (H.visibility = "hidden", H.order = 1);
      const B = Me({
        [`${N}-rtl`]: w,
        [`${M}`]: !0
      }), F = S ? null : h(K_, {
        prefixCls: N,
        trigger: ["hover"],
        visible: r.value,
        transitionName: P,
        onVisibleChange: i,
        overlayClassName: B,
        mouseEnterDelay: 0.1,
        mouseLeaveDelay: 0.1,
        getPopupContainer: e.getPopupContainer
      }, {
        overlay: () => h(fo, {
          onClick: (R) => {
            let {
              key: X,
              domEvent: j
            } = R;
            _(X, j), i(!1);
          },
          id: c.value,
          tabindex: -1,
          role: "listbox",
          "aria-activedescendant": d.value,
          selectedKeys: [a.value],
          "aria-label": A !== void 0 ? A : "expanded dropdown"
        }, {
          default: () => [m.map((R) => {
            var X, j;
            const ee = $ && R.closable !== !1 && !R.disabled;
            return h(Qu, {
              key: R.key,
              id: `${c.value}-${R.key}`,
              role: "option",
              "aria-controls": g && `${g}-panel-${R.key}`,
              disabled: R.disabled
            }, {
              default: () => [h("span", null, [typeof R.tab == "function" ? R.tab() : R.tab]), ee && h("button", {
                type: "button",
                "aria-label": e.removeAriaLabel || "remove",
                tabindex: 0,
                class: `${N}-menu-item-remove`,
                onClick: (W) => {
                  W.stopPropagation(), f(W, R.key);
                }
              }, [((X = R.closeIcon) === null || X === void 0 ? void 0 : X.call(R)) || ((j = $.removeIcon) === null || j === void 0 ? void 0 : j.call($)) || "×"])]
            });
          })]
        }),
        default: () => h("button", {
          type: "button",
          class: `${v}-nav-more`,
          style: H,
          tabindex: -1,
          "aria-hidden": "true",
          "aria-haspopup": "listbox",
          "aria-controls": c.value,
          id: `${g}-more`,
          "aria-expanded": r.value,
          onKeydown: u
        }, [C])
      });
      return h("div", {
        class: Me(`${v}-nav-operations`, n.class),
        style: n.style
      }, [F, h(YT, {
        prefixCls: v,
        locale: x,
        editable: $
      }, null)]);
    };
  }
}), GT = Symbol("tabsContextKey"), UT = (e) => {
  Ft(GT, e);
}, XT = () => zt(GT, {
  tabs: ce([]),
  prefixCls: ce()
});
be({
  compatConfig: {
    MODE: 3
  },
  name: "TabsContextProvider",
  inheritAttrs: !1,
  props: {
    tabs: {
      type: Object,
      default: void 0
    },
    prefixCls: {
      type: String,
      default: void 0
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    return UT(ys(e)), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
});
const L9 = 0.1, aC = 0.01, lp = 20, lC = Math.pow(0.995, lp);
function H9(e, t) {
  const [n, o] = $n(), [r, i] = $n(0), [a, l] = $n(0), [s, u] = $n(), c = ce();
  function d($) {
    const {
      screenX: I,
      screenY: w
    } = $.touches[0];
    o({
      x: I,
      y: w
    }), clearInterval(c.value);
  }
  function f($) {
    if (!n.value) return;
    $.preventDefault();
    const {
      screenX: I,
      screenY: w
    } = $.touches[0], _ = I - n.value.x, M = w - n.value.y;
    t(_, M), o({
      x: I,
      y: w
    });
    const N = Date.now();
    l(N - r.value), i(N), u({
      x: _,
      y: M
    });
  }
  function p() {
    if (!n.value) return;
    const $ = s.value;
    if (o(null), u(null), $) {
      const I = $.x / a.value, w = $.y / a.value, _ = Math.abs(I), M = Math.abs(w);
      if (Math.max(_, M) < L9) return;
      let N = I, A = w;
      c.value = setInterval(() => {
        if (Math.abs(N) < aC && Math.abs(A) < aC) {
          clearInterval(c.value);
          return;
        }
        N *= lC, A *= lC, t(N * lp, A * lp);
      }, lp);
    }
  }
  const v = ce();
  function g($) {
    const {
      deltaX: I,
      deltaY: w
    } = $;
    let _ = 0;
    const M = Math.abs(I), N = Math.abs(w);
    M === N ? _ = v.value === "x" ? I : w : M > N ? (_ = I, v.value = "x") : (_ = w, v.value = "y"), t(-_, -_) && $.preventDefault();
  }
  const m = ce({
    onTouchStart: d,
    onTouchMove: f,
    onTouchEnd: p,
    onWheel: g
  });
  function x($) {
    m.value.onTouchStart($);
  }
  function S($) {
    m.value.onTouchMove($);
  }
  function C($) {
    m.value.onTouchEnd($);
  }
  function P($) {
    m.value.onWheel($);
  }
  Nt(() => {
    var $, I;
    document.addEventListener("touchmove", S, {
      passive: !1
    }), document.addEventListener("touchend", C, {
      passive: !1
    }), ($ = e.value) === null || $ === void 0 || $.addEventListener("touchstart", x, {
      passive: !1
    }), (I = e.value) === null || I === void 0 || I.addEventListener("wheel", P, {
      passive: !1
    });
  }), qt(() => {
    document.removeEventListener("touchmove", S), document.removeEventListener("touchend", C);
  });
}
function sC(e, t) {
  const n = ce(e);
  function o(r) {
    const i = typeof r == "function" ? r(n.value) : r;
    i !== n.value && t(i, n.value), n.value = i;
  }
  return [n, o];
}
const V9 = () => {
  const e = ce(/* @__PURE__ */ new Map()), t = (n) => (o) => {
    e.value.set(n, o);
  };
  return iy(() => {
    e.value = /* @__PURE__ */ new Map();
  }), [t, e];
}, uC = {
  width: 0,
  height: 0,
  left: 0,
  top: 0,
  right: 0
}, j9 = () => ({
  id: {
    type: String
  },
  tabPosition: {
    type: String
  },
  activeKey: {
    type: [String, Number]
  },
  rtl: {
    type: Boolean
  },
  animated: Et(),
  editable: Et(),
  moreIcon: fe.any,
  moreTransitionName: {
    type: String
  },
  mobile: {
    type: Boolean
  },
  tabBarGutter: {
    type: Number
  },
  renderTabBar: {
    type: Function
  },
  locale: Et(),
  popupClassName: String,
  getPopupContainer: et(),
  onTabClick: {
    type: Function
  },
  onTabScroll: {
    type: Function
  }
}), W9 = (e, t) => {
  const {
    offsetWidth: n,
    offsetHeight: o,
    offsetTop: r,
    offsetLeft: i
  } = e, {
    width: a,
    height: l,
    x: s,
    y: u
  } = e.getBoundingClientRect();
  return Math.abs(a - n) < 1 ? [a, l, s - t.x, u - t.y] : [n, o, i, r];
}, cC = be({
  compatConfig: {
    MODE: 3
  },
  name: "TabNavList",
  inheritAttrs: !1,
  props: j9(),
  slots: Object,
  emits: ["tabClick", "tabScroll"],
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const {
      tabs: r,
      prefixCls: i
    } = XT(), a = $e(), l = $e(), s = $e(), u = $e(), [c, d] = V9(), f = E(() => e.tabPosition === "top" || e.tabPosition === "bottom"), [p, v] = sC(0, (De, Fe) => {
      f.value && e.onTabScroll && e.onTabScroll({
        direction: De > Fe ? "left" : "right"
      });
    }), [g, m] = sC(0, (De, Fe) => {
      !f.value && e.onTabScroll && e.onTabScroll({
        direction: De > Fe ? "top" : "bottom"
      });
    }), [x, S] = $n(0), [C, P] = $n(0), [$, I] = $n(null), [w, _] = $n(null), [M, N] = $n(0), [A, H] = $n(0), [B, F] = N9(/* @__PURE__ */ new Map()), R = z9(r, B), X = E(() => `${i.value}-nav-operations-hidden`), j = $e(0), ee = $e(0);
    It(() => {
      f.value ? e.rtl ? (j.value = 0, ee.value = Math.max(0, x.value - $.value)) : (j.value = Math.min(0, $.value - x.value), ee.value = 0) : (j.value = Math.min(0, w.value - C.value), ee.value = 0);
    });
    const W = (De) => De < j.value ? j.value : De > ee.value ? ee.value : De, K = $e(), [q, G] = $n(), ae = () => {
      G(Date.now());
    }, le = () => {
      clearTimeout(K.value);
    }, ie = (De, Fe) => {
      De((Ve) => W(Ve + Fe));
    };
    H9(a, (De, Fe) => {
      if (f.value) {
        if ($.value >= x.value)
          return !1;
        ie(v, De);
      } else {
        if (w.value >= C.value)
          return !1;
        ie(m, Fe);
      }
      return le(), ae(), !0;
    }), ke(q, () => {
      le(), q.value && (K.value = setTimeout(() => {
        G(0);
      }, 100));
    });
    const re = function() {
      let De = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : e.activeKey;
      const Fe = R.value.get(De) || {
        width: 0,
        height: 0,
        left: 0,
        right: 0,
        top: 0
      };
      if (f.value) {
        let Ve = p.value;
        e.rtl ? Fe.right < p.value ? Ve = Fe.right : Fe.right + Fe.width > p.value + $.value && (Ve = Fe.right + Fe.width - $.value) : Fe.left < -p.value ? Ve = -Fe.left : Fe.left + Fe.width > -p.value + $.value && (Ve = -(Fe.left + Fe.width - $.value)), m(0), v(W(Ve));
      } else {
        let Ve = g.value;
        Fe.top < -g.value ? Ve = -Fe.top : Fe.top + Fe.height > -g.value + w.value && (Ve = -(Fe.top + Fe.height - w.value)), v(0), m(W(Ve));
      }
    }, te = $e(0), ve = $e(0);
    It(() => {
      let De, Fe, Ve, nt, je, Pe;
      const Ge = R.value;
      ["top", "bottom"].includes(e.tabPosition) ? (De = "width", nt = $.value, je = x.value, Pe = M.value, Fe = e.rtl ? "right" : "left", Ve = Math.abs(p.value)) : (De = "height", nt = w.value, je = x.value, Pe = A.value, Fe = "top", Ve = -g.value);
      let Se = nt;
      je + Pe > nt && je < nt && (Se = nt - Pe);
      const Ce = r.value;
      if (!Ce.length)
        return [te.value, ve.value] = [0, 0];
      const Ae = Ce.length;
      let qe = Ae;
      for (let tt = 0; tt < Ae; tt += 1) {
        const Ee = Ge.get(Ce[tt].key) || uC;
        if (Ee[Fe] + Ee[De] > Ve + Se) {
          qe = tt - 1;
          break;
        }
      }
      let We = 0;
      for (let tt = Ae - 1; tt >= 0; tt -= 1)
        if ((Ge.get(Ce[tt].key) || uC)[Fe] < Ve) {
          We = tt + 1;
          break;
        }
      return [te.value, ve.value] = [We, qe];
    });
    const ue = () => {
      F(() => {
        var De;
        const Fe = /* @__PURE__ */ new Map(), Ve = (De = l.value) === null || De === void 0 ? void 0 : De.getBoundingClientRect();
        return r.value.forEach((nt) => {
          let {
            key: je
          } = nt;
          const Pe = d.value.get(je), Ge = Pe?.$el || Pe;
          if (Ge) {
            const [Se, Ce, Ae, qe] = W9(Ge, Ve);
            Fe.set(je, {
              width: Se,
              height: Ce,
              left: Ae,
              top: qe
            });
          }
        }), Fe;
      });
    };
    ke(() => r.value.map((De) => De.key).join("%%"), () => {
      ue();
    }, {
      flush: "post"
    });
    const pe = () => {
      var De, Fe, Ve, nt, je;
      const Pe = ((De = a.value) === null || De === void 0 ? void 0 : De.offsetWidth) || 0, Ge = ((Fe = a.value) === null || Fe === void 0 ? void 0 : Fe.offsetHeight) || 0, Se = ((Ve = u.value) === null || Ve === void 0 ? void 0 : Ve.$el) || {}, Ce = Se.offsetWidth || 0, Ae = Se.offsetHeight || 0;
      I(Pe), _(Ge), N(Ce), H(Ae);
      const qe = (((nt = l.value) === null || nt === void 0 ? void 0 : nt.offsetWidth) || 0) - Ce, We = (((je = l.value) === null || je === void 0 ? void 0 : je.offsetHeight) || 0) - Ae;
      S(qe), P(We), ue();
    }, ge = E(() => [...r.value.slice(0, te.value), ...r.value.slice(ve.value + 1)]), [_e, ze] = $n(), Ke = E(() => R.value.get(e.activeKey)), He = $e(), Ne = () => {
      Vt.cancel(He.value);
    };
    ke([Ke, f, () => e.rtl], () => {
      const De = {};
      Ke.value && (f.value ? (e.rtl ? De.right = cs(Ke.value.right) : De.left = cs(Ke.value.left), De.width = cs(Ke.value.width)) : (De.top = cs(Ke.value.top), De.height = cs(Ke.value.height))), Ne(), He.value = Vt(() => {
        ze(De);
      });
    }), ke([() => e.activeKey, Ke, R, f], () => {
      re();
    }, {
      flush: "post"
    }), ke([() => e.rtl, () => e.tabBarGutter, () => e.activeKey, () => r.value], () => {
      pe();
    }, {
      flush: "post"
    });
    const Xe = (De) => {
      let {
        position: Fe,
        prefixCls: Ve,
        extra: nt
      } = De;
      if (!nt) return null;
      const je = nt?.({
        position: Fe
      });
      return je ? h("div", {
        class: `${Ve}-extra-content`
      }, [je]) : null;
    };
    return qt(() => {
      le(), Ne();
    }), () => {
      const {
        id: De,
        animated: Fe,
        activeKey: Ve,
        rtl: nt,
        editable: je,
        locale: Pe,
        tabPosition: Ge,
        tabBarGutter: Se,
        onTabClick: Ce
      } = e, {
        class: Ae,
        style: qe
      } = n, We = i.value, tt = !!ge.value.length, Ee = `${We}-nav-wrap`;
      let Re, Be, ot, pt;
      f.value ? nt ? (Be = p.value > 0, Re = p.value + $.value < x.value) : (Re = p.value < 0, Be = -p.value + $.value < x.value) : (ot = g.value < 0, pt = -g.value + w.value < C.value);
      const at = {};
      Ge === "top" || Ge === "bottom" ? at[nt ? "marginRight" : "marginLeft"] = typeof Se == "number" ? `${Se}px` : Se : at.marginTop = typeof Se == "number" ? `${Se}px` : Se;
      const dt = r.value.map((wt, Ct) => {
        const {
          key: St
        } = wt;
        return h(R9, {
          id: De,
          prefixCls: We,
          key: St,
          tab: wt,
          style: Ct === 0 ? void 0 : at,
          closable: wt.closable,
          editable: je,
          active: St === Ve,
          removeAriaLabel: Pe?.removeAriaLabel,
          ref: c(St),
          onClick: (yt) => {
            Ce(St, yt);
          },
          onFocus: () => {
            re(St), ae(), a.value && (nt || (a.value.scrollLeft = 0), a.value.scrollTop = 0);
          }
        }, o);
      });
      return h("div", {
        role: "tablist",
        class: Me(`${We}-nav`, Ae),
        style: qe,
        onKeydown: () => {
          ae();
        }
      }, [h(Xe, {
        position: "left",
        prefixCls: We,
        extra: o.leftExtra
      }, null), h(Al, {
        onResize: pe
      }, {
        default: () => [h("div", {
          class: Me(Ee, {
            [`${Ee}-ping-left`]: Re,
            [`${Ee}-ping-right`]: Be,
            [`${Ee}-ping-top`]: ot,
            [`${Ee}-ping-bottom`]: pt
          }),
          ref: a
        }, [h(Al, {
          onResize: pe
        }, {
          default: () => [h("div", {
            ref: l,
            class: `${We}-nav-list`,
            style: {
              transform: `translate(${p.value}px, ${g.value}px)`,
              transition: q.value ? "none" : void 0
            }
          }, [dt, h(YT, {
            ref: u,
            prefixCls: We,
            locale: Pe,
            editable: je,
            style: O(O({}, dt.length === 0 ? void 0 : at), {
              visibility: tt ? "hidden" : null
            })
          }, null), h("div", {
            class: Me(`${We}-ink-bar`, {
              [`${We}-ink-bar-animated`]: Fe.inkBar
            }),
            style: _e.value
          }, null)])]
        })])]
      }), h(B9, Q(Q({}, e), {}, {
        removeAriaLabel: Pe?.removeAriaLabel,
        ref: s,
        prefixCls: We,
        tabs: ge.value,
        class: !tt && X.value
      }), QP(o, ["moreIcon"])), h(Xe, {
        position: "right",
        prefixCls: We,
        extra: o.rightExtra
      }, null), h(Xe, {
        position: "right",
        prefixCls: We,
        extra: o.tabBarExtraContent
      }, null)]);
    };
  }
}), K9 = be({
  compatConfig: {
    MODE: 3
  },
  name: "TabPanelList",
  inheritAttrs: !1,
  props: {
    activeKey: {
      type: [String, Number]
    },
    id: {
      type: String
    },
    rtl: {
      type: Boolean
    },
    animated: {
      type: Object,
      default: void 0
    },
    tabPosition: {
      type: String
    },
    destroyInactiveTabPane: {
      type: Boolean
    }
  },
  setup(e) {
    const {
      tabs: t,
      prefixCls: n
    } = XT();
    return () => {
      const {
        id: o,
        activeKey: r,
        animated: i,
        tabPosition: a,
        rtl: l,
        destroyInactiveTabPane: s
      } = e, u = i.tabPane, c = n.value, d = t.value.findIndex((f) => f.key === r);
      return h("div", {
        class: `${c}-content-holder`
      }, [h("div", {
        class: [`${c}-content`, `${c}-content-${a}`, {
          [`${c}-content-animated`]: u
        }],
        style: d && u ? {
          [l ? "marginRight" : "marginLeft"]: `-${d}00%`
        } : null
      }, [t.value.map((f) => Xn(f.node, {
        key: f.key,
        prefixCls: c,
        tabKey: f.key,
        id: o,
        animated: u,
        active: f.key === r,
        destroyInactiveTabPane: s
      }))])]);
    };
  }
});
var q9 = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" } }, { tag: "path", attrs: { d: "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z" } }] }, name: "plus", theme: "outlined" };
function dC(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      Y9(e, r, n[r]);
    });
  }
  return e;
}
function Y9(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var ax = function(t, n) {
  var o = dC({}, t, n.attrs);
  return h(on, dC({}, o, {
    icon: q9
  }), null);
};
ax.displayName = "PlusOutlined";
ax.inheritAttrs = !1;
const G9 = (e) => {
  const {
    componentCls: t,
    motionDurationSlow: n
  } = e;
  return [
    {
      [t]: {
        [`${t}-switch`]: {
          "&-appear, &-enter": {
            transition: "none",
            "&-start": {
              opacity: 0
            },
            "&-active": {
              opacity: 1,
              transition: `opacity ${n}`
            }
          },
          "&-leave": {
            position: "absolute",
            transition: "none",
            inset: 0,
            "&-start": {
              opacity: 1
            },
            "&-active": {
              opacity: 0,
              transition: `opacity ${n}`
            }
          }
        }
      }
    },
    // Follow code may reuse in other components
    [ea(e, "slide-up"), ea(e, "slide-down")]
  ];
}, U9 = (e) => {
  const {
    componentCls: t,
    tabsCardHorizontalPadding: n,
    tabsCardHeadBackground: o,
    tabsCardGutter: r,
    colorSplit: i
  } = e;
  return {
    [`${t}-card`]: {
      [`> ${t}-nav, > div > ${t}-nav`]: {
        [`${t}-tab`]: {
          margin: 0,
          padding: n,
          background: o,
          border: `${e.lineWidth}px ${e.lineType} ${i}`,
          transition: `all ${e.motionDurationSlow} ${e.motionEaseInOut}`
        },
        [`${t}-tab-active`]: {
          color: e.colorPrimary,
          background: e.colorBgContainer
        },
        [`${t}-ink-bar`]: {
          visibility: "hidden"
        }
      },
      // ========================== Top & Bottom ==========================
      [`&${t}-top, &${t}-bottom`]: {
        [`> ${t}-nav, > div > ${t}-nav`]: {
          [`${t}-tab + ${t}-tab`]: {
            marginLeft: {
              _skip_check_: !0,
              value: `${r}px`
            }
          }
        }
      },
      [`&${t}-top`]: {
        [`> ${t}-nav, > div > ${t}-nav`]: {
          [`${t}-tab`]: {
            borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`
          },
          [`${t}-tab-active`]: {
            borderBottomColor: e.colorBgContainer
          }
        }
      },
      [`&${t}-bottom`]: {
        [`> ${t}-nav, > div > ${t}-nav`]: {
          [`${t}-tab`]: {
            borderRadius: `0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`
          },
          [`${t}-tab-active`]: {
            borderTopColor: e.colorBgContainer
          }
        }
      },
      // ========================== Left & Right ==========================
      [`&${t}-left, &${t}-right`]: {
        [`> ${t}-nav, > div > ${t}-nav`]: {
          [`${t}-tab + ${t}-tab`]: {
            marginTop: `${r}px`
          }
        }
      },
      [`&${t}-left`]: {
        [`> ${t}-nav, > div > ${t}-nav`]: {
          [`${t}-tab`]: {
            borderRadius: {
              _skip_check_: !0,
              value: `${e.borderRadiusLG}px 0 0 ${e.borderRadiusLG}px`
            }
          },
          [`${t}-tab-active`]: {
            borderRightColor: {
              _skip_check_: !0,
              value: e.colorBgContainer
            }
          }
        }
      },
      [`&${t}-right`]: {
        [`> ${t}-nav, > div > ${t}-nav`]: {
          [`${t}-tab`]: {
            borderRadius: {
              _skip_check_: !0,
              value: `0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px 0`
            }
          },
          [`${t}-tab-active`]: {
            borderLeftColor: {
              _skip_check_: !0,
              value: e.colorBgContainer
            }
          }
        }
      }
    }
  };
}, X9 = (e) => {
  const {
    componentCls: t,
    tabsHoverColor: n,
    dropdownEdgeChildVerticalPadding: o
  } = e;
  return {
    [`${t}-dropdown`]: O(O({}, fn(e)), {
      position: "absolute",
      top: -9999,
      left: {
        _skip_check_: !0,
        value: -9999
      },
      zIndex: e.zIndexPopup,
      display: "block",
      "&-hidden": {
        display: "none"
      },
      [`${t}-dropdown-menu`]: {
        maxHeight: e.tabsDropdownHeight,
        margin: 0,
        padding: `${o}px 0`,
        overflowX: "hidden",
        overflowY: "auto",
        textAlign: {
          _skip_check_: !0,
          value: "left"
        },
        listStyleType: "none",
        backgroundColor: e.colorBgContainer,
        backgroundClip: "padding-box",
        borderRadius: e.borderRadiusLG,
        outline: "none",
        boxShadow: e.boxShadowSecondary,
        "&-item": O(O({}, Ha), {
          display: "flex",
          alignItems: "center",
          minWidth: e.tabsDropdownWidth,
          margin: 0,
          padding: `${e.paddingXXS}px ${e.paddingSM}px`,
          color: e.colorText,
          fontWeight: "normal",
          fontSize: e.fontSize,
          lineHeight: e.lineHeight,
          cursor: "pointer",
          transition: `all ${e.motionDurationSlow}`,
          "> span": {
            flex: 1,
            whiteSpace: "nowrap"
          },
          "&-remove": {
            flex: "none",
            marginLeft: {
              _skip_check_: !0,
              value: e.marginSM
            },
            color: e.colorTextDescription,
            fontSize: e.fontSizeSM,
            background: "transparent",
            border: 0,
            cursor: "pointer",
            "&:hover": {
              color: n
            }
          },
          "&:hover": {
            background: e.controlItemBgHover
          },
          "&-disabled": {
            "&, &:hover": {
              color: e.colorTextDisabled,
              background: "transparent",
              cursor: "not-allowed"
            }
          }
        })
      }
    })
  };
}, Q9 = (e) => {
  const {
    componentCls: t,
    margin: n,
    colorSplit: o
  } = e;
  return {
    // ========================== Top & Bottom ==========================
    [`${t}-top, ${t}-bottom`]: {
      flexDirection: "column",
      [`> ${t}-nav, > div > ${t}-nav`]: {
        margin: `0 0 ${n}px 0`,
        "&::before": {
          position: "absolute",
          right: {
            _skip_check_: !0,
            value: 0
          },
          left: {
            _skip_check_: !0,
            value: 0
          },
          borderBottom: `${e.lineWidth}px ${e.lineType} ${o}`,
          content: "''"
        },
        [`${t}-ink-bar`]: {
          height: e.lineWidthBold,
          "&-animated": {
            transition: `width ${e.motionDurationSlow}, left ${e.motionDurationSlow},
            right ${e.motionDurationSlow}`
          }
        },
        [`${t}-nav-wrap`]: {
          "&::before, &::after": {
            top: 0,
            bottom: 0,
            width: e.controlHeight
          },
          "&::before": {
            left: {
              _skip_check_: !0,
              value: 0
            },
            boxShadow: e.boxShadowTabsOverflowLeft
          },
          "&::after": {
            right: {
              _skip_check_: !0,
              value: 0
            },
            boxShadow: e.boxShadowTabsOverflowRight
          },
          [`&${t}-nav-wrap-ping-left::before`]: {
            opacity: 1
          },
          [`&${t}-nav-wrap-ping-right::after`]: {
            opacity: 1
          }
        }
      }
    },
    [`${t}-top`]: {
      [`> ${t}-nav,
        > div > ${t}-nav`]: {
        "&::before": {
          bottom: 0
        },
        [`${t}-ink-bar`]: {
          bottom: 0
        }
      }
    },
    [`${t}-bottom`]: {
      [`> ${t}-nav, > div > ${t}-nav`]: {
        order: 1,
        marginTop: `${n}px`,
        marginBottom: 0,
        "&::before": {
          top: 0
        },
        [`${t}-ink-bar`]: {
          top: 0
        }
      },
      [`> ${t}-content-holder, > div > ${t}-content-holder`]: {
        order: 0
      }
    },
    // ========================== Left & Right ==========================
    [`${t}-left, ${t}-right`]: {
      [`> ${t}-nav, > div > ${t}-nav`]: {
        flexDirection: "column",
        minWidth: e.controlHeight * 1.25,
        // >>>>>>>>>>> Tab
        [`${t}-tab`]: {
          padding: `${e.paddingXS}px ${e.paddingLG}px`,
          textAlign: "center"
        },
        [`${t}-tab + ${t}-tab`]: {
          margin: `${e.margin}px 0 0 0`
        },
        // >>>>>>>>>>> Nav
        [`${t}-nav-wrap`]: {
          flexDirection: "column",
          "&::before, &::after": {
            right: {
              _skip_check_: !0,
              value: 0
            },
            left: {
              _skip_check_: !0,
              value: 0
            },
            height: e.controlHeight
          },
          "&::before": {
            top: 0,
            boxShadow: e.boxShadowTabsOverflowTop
          },
          "&::after": {
            bottom: 0,
            boxShadow: e.boxShadowTabsOverflowBottom
          },
          [`&${t}-nav-wrap-ping-top::before`]: {
            opacity: 1
          },
          [`&${t}-nav-wrap-ping-bottom::after`]: {
            opacity: 1
          }
        },
        // >>>>>>>>>>> Ink Bar
        [`${t}-ink-bar`]: {
          width: e.lineWidthBold,
          "&-animated": {
            transition: `height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`
          }
        },
        [`${t}-nav-list, ${t}-nav-operations`]: {
          flex: "1 0 auto",
          flexDirection: "column"
        }
      }
    },
    [`${t}-left`]: {
      [`> ${t}-nav, > div > ${t}-nav`]: {
        [`${t}-ink-bar`]: {
          right: {
            _skip_check_: !0,
            value: 0
          }
        }
      },
      [`> ${t}-content-holder, > div > ${t}-content-holder`]: {
        marginLeft: {
          _skip_check_: !0,
          value: `-${e.lineWidth}px`
        },
        borderLeft: {
          _skip_check_: !0,
          value: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`
        },
        [`> ${t}-content > ${t}-tabpane`]: {
          paddingLeft: {
            _skip_check_: !0,
            value: e.paddingLG
          }
        }
      }
    },
    [`${t}-right`]: {
      [`> ${t}-nav, > div > ${t}-nav`]: {
        order: 1,
        [`${t}-ink-bar`]: {
          left: {
            _skip_check_: !0,
            value: 0
          }
        }
      },
      [`> ${t}-content-holder, > div > ${t}-content-holder`]: {
        order: 0,
        marginRight: {
          _skip_check_: !0,
          value: -e.lineWidth
        },
        borderRight: {
          _skip_check_: !0,
          value: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`
        },
        [`> ${t}-content > ${t}-tabpane`]: {
          paddingRight: {
            _skip_check_: !0,
            value: e.paddingLG
          }
        }
      }
    }
  };
}, Z9 = (e) => {
  const {
    componentCls: t,
    padding: n
  } = e;
  return {
    [t]: {
      "&-small": {
        [`> ${t}-nav`]: {
          [`${t}-tab`]: {
            padding: `${e.paddingXS}px 0`,
            fontSize: e.fontSize
          }
        }
      },
      "&-large": {
        [`> ${t}-nav`]: {
          [`${t}-tab`]: {
            padding: `${n}px 0`,
            fontSize: e.fontSizeLG
          }
        }
      }
    },
    [`${t}-card`]: {
      [`&${t}-small`]: {
        [`> ${t}-nav`]: {
          [`${t}-tab`]: {
            padding: `${e.paddingXXS * 1.5}px ${n}px`
          }
        },
        [`&${t}-bottom`]: {
          [`> ${t}-nav ${t}-tab`]: {
            borderRadius: `0 0 ${e.borderRadius}px ${e.borderRadius}px`
          }
        },
        [`&${t}-top`]: {
          [`> ${t}-nav ${t}-tab`]: {
            borderRadius: `${e.borderRadius}px ${e.borderRadius}px 0 0`
          }
        },
        [`&${t}-right`]: {
          [`> ${t}-nav ${t}-tab`]: {
            borderRadius: {
              _skip_check_: !0,
              value: `0 ${e.borderRadius}px ${e.borderRadius}px 0`
            }
          }
        },
        [`&${t}-left`]: {
          [`> ${t}-nav ${t}-tab`]: {
            borderRadius: {
              _skip_check_: !0,
              value: `${e.borderRadius}px 0 0 ${e.borderRadius}px`
            }
          }
        }
      },
      [`&${t}-large`]: {
        [`> ${t}-nav`]: {
          [`${t}-tab`]: {
            padding: `${e.paddingXS}px ${n}px ${e.paddingXXS * 1.5}px`
          }
        }
      }
    }
  };
}, J9 = (e) => {
  const {
    componentCls: t,
    tabsActiveColor: n,
    tabsHoverColor: o,
    iconCls: r,
    tabsHorizontalGutter: i
  } = e, a = `${t}-tab`;
  return {
    [a]: {
      position: "relative",
      display: "inline-flex",
      alignItems: "center",
      padding: `${e.paddingSM}px 0`,
      fontSize: `${e.fontSize}px`,
      background: "transparent",
      border: 0,
      outline: "none",
      cursor: "pointer",
      "&-btn, &-remove": O({
        "&:focus:not(:focus-visible), &:active": {
          color: n
        }
      }, Nl(e)),
      "&-btn": {
        outline: "none",
        transition: "all 0.3s"
      },
      "&-remove": {
        flex: "none",
        marginRight: {
          _skip_check_: !0,
          value: -e.marginXXS
        },
        marginLeft: {
          _skip_check_: !0,
          value: e.marginXS
        },
        color: e.colorTextDescription,
        fontSize: e.fontSizeSM,
        background: "transparent",
        border: "none",
        outline: "none",
        cursor: "pointer",
        transition: `all ${e.motionDurationSlow}`,
        "&:hover": {
          color: e.colorTextHeading
        }
      },
      "&:hover": {
        color: o
      },
      [`&${a}-active ${a}-btn`]: {
        color: e.colorPrimary,
        textShadow: e.tabsActiveTextShadow
      },
      [`&${a}-disabled`]: {
        color: e.colorTextDisabled,
        cursor: "not-allowed"
      },
      [`&${a}-disabled ${a}-btn, &${a}-disabled ${t}-remove`]: {
        "&:focus, &:active": {
          color: e.colorTextDisabled
        }
      },
      [`& ${a}-remove ${r}`]: {
        margin: 0
      },
      [r]: {
        marginRight: {
          _skip_check_: !0,
          value: e.marginSM
        }
      }
    },
    [`${a} + ${a}`]: {
      margin: {
        _skip_check_: !0,
        value: `0 0 0 ${i}px`
      }
    }
  };
}, eK = (e) => {
  const {
    componentCls: t,
    tabsHorizontalGutter: n,
    iconCls: o,
    tabsCardGutter: r
  } = e;
  return {
    [`${t}-rtl`]: {
      direction: "rtl",
      [`${t}-nav`]: {
        [`${t}-tab`]: {
          margin: {
            _skip_check_: !0,
            value: `0 0 0 ${n}px`
          },
          [`${t}-tab:last-of-type`]: {
            marginLeft: {
              _skip_check_: !0,
              value: 0
            }
          },
          [o]: {
            marginRight: {
              _skip_check_: !0,
              value: 0
            },
            marginLeft: {
              _skip_check_: !0,
              value: `${e.marginSM}px`
            }
          },
          [`${t}-tab-remove`]: {
            marginRight: {
              _skip_check_: !0,
              value: `${e.marginXS}px`
            },
            marginLeft: {
              _skip_check_: !0,
              value: `-${e.marginXXS}px`
            },
            [o]: {
              margin: 0
            }
          }
        }
      },
      [`&${t}-left`]: {
        [`> ${t}-nav`]: {
          order: 1
        },
        [`> ${t}-content-holder`]: {
          order: 0
        }
      },
      [`&${t}-right`]: {
        [`> ${t}-nav`]: {
          order: 0
        },
        [`> ${t}-content-holder`]: {
          order: 1
        }
      },
      // ====================== Card ======================
      [`&${t}-card${t}-top, &${t}-card${t}-bottom`]: {
        [`> ${t}-nav, > div > ${t}-nav`]: {
          [`${t}-tab + ${t}-tab`]: {
            marginRight: {
              _skip_check_: !0,
              value: `${r}px`
            },
            marginLeft: {
              _skip_check_: !0,
              value: 0
            }
          }
        }
      }
    },
    [`${t}-dropdown-rtl`]: {
      direction: "rtl"
    },
    [`${t}-menu-item`]: {
      [`${t}-dropdown-rtl`]: {
        textAlign: {
          _skip_check_: !0,
          value: "right"
        }
      }
    }
  };
}, tK = (e) => {
  const {
    componentCls: t,
    tabsCardHorizontalPadding: n,
    tabsCardHeight: o,
    tabsCardGutter: r,
    tabsHoverColor: i,
    tabsActiveColor: a,
    colorSplit: l
  } = e;
  return {
    [t]: O(O(O(O({}, fn(e)), {
      display: "flex",
      // ========================== Navigation ==========================
      [`> ${t}-nav, > div > ${t}-nav`]: {
        position: "relative",
        display: "flex",
        flex: "none",
        alignItems: "center",
        [`${t}-nav-wrap`]: {
          position: "relative",
          display: "flex",
          flex: "auto",
          alignSelf: "stretch",
          overflow: "hidden",
          whiteSpace: "nowrap",
          transform: "translate(0)",
          // >>>>> Ping shadow
          "&::before, &::after": {
            position: "absolute",
            zIndex: 1,
            opacity: 0,
            transition: `opacity ${e.motionDurationSlow}`,
            content: "''",
            pointerEvents: "none"
          }
        },
        [`${t}-nav-list`]: {
          position: "relative",
          display: "flex",
          transition: `opacity ${e.motionDurationSlow}`
        },
        // >>>>>>>> Operations
        [`${t}-nav-operations`]: {
          display: "flex",
          alignSelf: "stretch"
        },
        [`${t}-nav-operations-hidden`]: {
          position: "absolute",
          visibility: "hidden",
          pointerEvents: "none"
        },
        [`${t}-nav-more`]: {
          position: "relative",
          padding: n,
          background: "transparent",
          border: 0,
          "&::after": {
            position: "absolute",
            right: {
              _skip_check_: !0,
              value: 0
            },
            bottom: 0,
            left: {
              _skip_check_: !0,
              value: 0
            },
            height: e.controlHeightLG / 8,
            transform: "translateY(100%)",
            content: "''"
          }
        },
        [`${t}-nav-add`]: O({
          minWidth: `${o}px`,
          marginLeft: {
            _skip_check_: !0,
            value: `${r}px`
          },
          padding: `0 ${e.paddingXS}px`,
          background: "transparent",
          border: `${e.lineWidth}px ${e.lineType} ${l}`,
          borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,
          outline: "none",
          cursor: "pointer",
          color: e.colorText,
          transition: `all ${e.motionDurationSlow} ${e.motionEaseInOut}`,
          "&:hover": {
            color: i
          },
          "&:active, &:focus:not(:focus-visible)": {
            color: a
          }
        }, Nl(e))
      },
      [`${t}-extra-content`]: {
        flex: "none"
      },
      // ============================ InkBar ============================
      [`${t}-ink-bar`]: {
        position: "absolute",
        background: e.colorPrimary,
        pointerEvents: "none"
      }
    }), J9(e)), {
      // =========================== TabPanes ===========================
      [`${t}-content`]: {
        position: "relative",
        display: "flex",
        width: "100%",
        "&-animated": {
          transition: "margin 0.3s"
        }
      },
      [`${t}-content-holder`]: {
        flex: "auto",
        minWidth: 0,
        minHeight: 0
      },
      [`${t}-tabpane`]: {
        outline: "none",
        flex: "none",
        width: "100%"
      }
    }),
    [`${t}-centered`]: {
      [`> ${t}-nav, > div > ${t}-nav`]: {
        [`${t}-nav-wrap`]: {
          [`&:not([class*='${t}-nav-wrap-ping'])`]: {
            justifyContent: "center"
          }
        }
      }
    }
  };
}, nK = Sn("Tabs", (e) => {
  const t = e.controlHeightLG, n = Qt(e, {
    tabsHoverColor: e.colorPrimaryHover,
    tabsActiveColor: e.colorPrimaryActive,
    tabsCardHorizontalPadding: `${(t - Math.round(e.fontSize * e.lineHeight)) / 2 - e.lineWidth}px ${e.padding}px`,
    tabsCardHeight: t,
    tabsCardGutter: e.marginXXS / 2,
    tabsHorizontalGutter: 32,
    tabsCardHeadBackground: e.colorFillAlter,
    dropdownEdgeChildVerticalPadding: e.paddingXXS,
    tabsActiveTextShadow: "0 0 0.25px currentcolor",
    tabsDropdownHeight: 200,
    tabsDropdownWidth: 120
  });
  return [Z9(n), eK(n), Q9(n), X9(n), U9(n), tK(n), G9(n)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase + 50
}));
let fC = 0;
const QT = () => ({
  prefixCls: {
    type: String
  },
  id: {
    type: String
  },
  popupClassName: String,
  getPopupContainer: et(),
  activeKey: {
    type: [String, Number]
  },
  defaultActiveKey: {
    type: [String, Number]
  },
  direction: an(),
  animated: en([Boolean, Object]),
  renderTabBar: et(),
  tabBarGutter: {
    type: Number
  },
  tabBarStyle: Et(),
  tabPosition: an(),
  destroyInactiveTabPane: ct(),
  hideAdd: Boolean,
  type: an(),
  size: an(),
  centered: Boolean,
  onEdit: et(),
  onChange: et(),
  onTabClick: et(),
  onTabScroll: et(),
  "onUpdate:activeKey": et(),
  // Accessibility
  locale: Et(),
  onPrevClick: et(),
  onNextClick: et(),
  tabBarExtraContent: fe.any
});
function oK(e) {
  return e.map((t) => {
    if (Ao(t)) {
      const n = O({}, t.props || {});
      for (const [f, p] of Object.entries(n))
        delete n[f], n[Td(f)] = p;
      const o = t.children || {}, r = t.key !== void 0 ? t.key : void 0, {
        tab: i = o.tab,
        disabled: a,
        forceRender: l,
        closable: s,
        animated: u,
        active: c,
        destroyInactiveTabPane: d
      } = n;
      return O(O({
        key: r
      }, n), {
        node: t,
        closeIcon: o.closeIcon,
        tab: i,
        disabled: a === "" || a,
        forceRender: l === "" || l,
        closable: s === "" || s,
        animated: u === "" || u,
        active: c === "" || c,
        destroyInactiveTabPane: d === "" || d
      });
    }
    return null;
  }).filter((t) => t);
}
const rK = be({
  compatConfig: {
    MODE: 3
  },
  name: "InternalTabs",
  inheritAttrs: !1,
  props: O(O({}, kn(QT(), {
    tabPosition: "top",
    animated: {
      inkBar: !0,
      tabPane: !1
    }
  })), {
    tabs: jn()
  }),
  slots: Object,
  // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'],
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    dn(e.onPrevClick === void 0 && e.onNextClick === void 0, "Tabs", "`onPrevClick / @prevClick` and `onNextClick / @nextClick` has been removed. Please use `onTabScroll / @tabScroll` instead."), dn(e.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` prop has been removed. Please use `rightExtra` slot instead."), dn(o.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` slot is deprecated. Please use `rightExtra` slot instead.");
    const {
      prefixCls: r,
      direction: i,
      size: a,
      rootPrefixCls: l,
      getPopupContainer: s
    } = _t("tabs", e), [u, c] = nK(r), d = E(() => i.value === "rtl"), f = E(() => {
      const {
        animated: w,
        tabPosition: _
      } = e;
      return w === !1 || ["left", "right"].includes(_) ? {
        inkBar: !1,
        tabPane: !1
      } : w === !0 ? {
        inkBar: !0,
        tabPane: !0
      } : O({
        inkBar: !0,
        tabPane: !1
      }, typeof w == "object" ? w : {});
    }), [p, v] = $n(!1);
    Nt(() => {
      v(b0());
    });
    const [g, m] = lr(() => {
      var w;
      return (w = e.tabs[0]) === null || w === void 0 ? void 0 : w.key;
    }, {
      value: E(() => e.activeKey),
      defaultValue: e.defaultActiveKey
    }), [x, S] = $n(() => e.tabs.findIndex((w) => w.key === g.value));
    It(() => {
      var w;
      let _ = e.tabs.findIndex((M) => M.key === g.value);
      _ === -1 && (_ = Math.max(0, Math.min(x.value, e.tabs.length - 1)), m((w = e.tabs[_]) === null || w === void 0 ? void 0 : w.key)), S(_);
    });
    const [C, P] = lr(null, {
      value: E(() => e.id)
    }), $ = E(() => p.value && !["left", "right"].includes(e.tabPosition) ? "top" : e.tabPosition);
    Nt(() => {
      e.id || (P(`rc-tabs-${process.env.NODE_ENV === "test" ? "test" : fC}`), fC += 1);
    });
    const I = (w, _) => {
      var M, N;
      (M = e.onTabClick) === null || M === void 0 || M.call(e, w, _);
      const A = w !== g.value;
      m(w), A && ((N = e.onChange) === null || N === void 0 || N.call(e, w));
    };
    return UT({
      tabs: E(() => e.tabs),
      prefixCls: r
    }), () => {
      const {
        id: w,
        type: _,
        tabBarGutter: M,
        tabBarStyle: N,
        locale: A,
        destroyInactiveTabPane: H,
        renderTabBar: B = o.renderTabBar,
        onTabScroll: F,
        hideAdd: R,
        centered: X
      } = e, j = {
        id: C.value,
        activeKey: g.value,
        animated: f.value,
        tabPosition: $.value,
        rtl: d.value,
        mobile: p.value
      };
      let ee;
      _ === "editable-card" && (ee = {
        onEdit: (G, ae) => {
          let {
            key: le,
            event: ie
          } = ae;
          var re;
          (re = e.onEdit) === null || re === void 0 || re.call(e, G === "add" ? ie : le, G);
        },
        removeIcon: () => h(ra, null, null),
        addIcon: o.addIcon ? o.addIcon : () => h(ax, null, null),
        showAdd: R !== !0
      });
      let W;
      const K = O(O({}, j), {
        moreTransitionName: `${l.value}-slide-up`,
        editable: ee,
        locale: A,
        tabBarGutter: M,
        onTabClick: I,
        onTabScroll: F,
        style: N,
        getPopupContainer: s.value,
        popupClassName: Me(e.popupClassName, c.value)
      });
      B ? W = B(O(O({}, K), {
        DefaultTabBar: cC
      })) : W = h(cC, K, QP(o, ["moreIcon", "leftExtra", "rightExtra", "tabBarExtraContent"]));
      const q = r.value;
      return u(h("div", Q(Q({}, n), {}, {
        id: w,
        class: Me(q, `${q}-${$.value}`, {
          [c.value]: !0,
          [`${q}-${a.value}`]: a.value,
          [`${q}-card`]: ["card", "editable-card"].includes(_),
          [`${q}-editable-card`]: _ === "editable-card",
          [`${q}-centered`]: X,
          [`${q}-mobile`]: p.value,
          [`${q}-editable`]: _ === "editable-card",
          [`${q}-rtl`]: d.value
        }, n.class)
      }), [W, h(K9, Q(Q({
        destroyInactiveTabPane: H
      }, j), {}, {
        animated: f.value
      }), null)]));
    };
  }
}), Tu = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATabs",
  inheritAttrs: !1,
  props: kn(QT(), {
    tabPosition: "top",
    animated: {
      inkBar: !0,
      tabPane: !1
    }
  }),
  slots: Object,
  // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'],
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: r
    } = t;
    const i = (a) => {
      r("update:activeKey", a), r("change", a);
    };
    return () => {
      var a;
      const l = oK(go((a = o.default) === null || a === void 0 ? void 0 : a.call(o)));
      return h(rK, Q(Q(Q({}, Fn(e, ["onUpdate:activeKey"])), n), {}, {
        onChange: i,
        tabs: l
      }), o);
    };
  }
}), iK = () => ({
  tab: fe.any,
  disabled: {
    type: Boolean
  },
  forceRender: {
    type: Boolean
  },
  closable: {
    type: Boolean
  },
  animated: {
    type: Boolean
  },
  active: {
    type: Boolean
  },
  destroyInactiveTabPane: {
    type: Boolean
  },
  // Pass by TabPaneList
  prefixCls: {
    type: String
  },
  tabKey: {
    type: [String, Number]
  },
  id: {
    type: String
  }
  // closeIcon: PropTypes.any,
}), gb = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATabPane",
  inheritAttrs: !1,
  __ANT_TAB_PANE: !0,
  props: iK(),
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const r = ce(e.forceRender);
    ke([() => e.active, () => e.destroyInactiveTabPane], () => {
      e.active ? r.value = !0 : e.destroyInactiveTabPane && (r.value = !1);
    }, {
      immediate: !0
    });
    const i = E(() => e.active ? {} : e.animated ? {
      visibility: "hidden",
      height: 0,
      overflowY: "hidden"
    } : {
      display: "none"
    });
    return () => {
      var a;
      const {
        prefixCls: l,
        forceRender: s,
        id: u,
        active: c,
        tabKey: d
      } = e;
      return h("div", {
        id: u && `${u}-panel-${d}`,
        role: "tabpanel",
        tabindex: c ? 0 : -1,
        "aria-labelledby": u && `${u}-tab-${d}`,
        "aria-hidden": !c,
        style: [i.value, n.style],
        class: [`${l}-tabpane`, c && `${l}-tabpane-active`, n.class]
      }, [(c || r.value || s) && ((a = o.default) === null || a === void 0 ? void 0 : a.call(o))]);
    };
  }
});
Tu.TabPane = gb;
Tu.install = function(e) {
  return e.component(Tu.name, Tu), e.component(gb.name, gb), e;
};
const aK = (e) => {
  const {
    antCls: t,
    componentCls: n,
    cardHeadHeight: o,
    cardPaddingBase: r,
    cardHeadTabsMarginBottom: i
  } = e;
  return O(O({
    display: "flex",
    justifyContent: "center",
    flexDirection: "column",
    minHeight: o,
    marginBottom: -1,
    padding: `0 ${r}px`,
    color: e.colorTextHeading,
    fontWeight: e.fontWeightStrong,
    fontSize: e.fontSizeLG,
    background: "transparent",
    borderBottom: `${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`,
    borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`
  }, Va()), {
    "&-wrapper": {
      width: "100%",
      display: "flex",
      alignItems: "center"
    },
    "&-title": O(O({
      display: "inline-block",
      flex: 1
    }, Ha), {
      [`
          > ${n}-typography,
          > ${n}-typography-edit-content
        `]: {
        insetInlineStart: 0,
        marginTop: 0,
        marginBottom: 0
      }
    }),
    [`${t}-tabs-top`]: {
      clear: "both",
      marginBottom: i,
      color: e.colorText,
      fontWeight: "normal",
      fontSize: e.fontSize,
      "&-bar": {
        borderBottom: `${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`
      }
    }
  });
}, lK = (e) => {
  const {
    cardPaddingBase: t,
    colorBorderSecondary: n,
    cardShadow: o,
    lineWidth: r
  } = e;
  return {
    width: "33.33%",
    padding: t,
    border: 0,
    borderRadius: 0,
    boxShadow: `
      ${r}px 0 0 0 ${n},
      0 ${r}px 0 0 ${n},
      ${r}px ${r}px 0 0 ${n},
      ${r}px 0 0 0 ${n} inset,
      0 ${r}px 0 0 ${n} inset;
    `,
    transition: `all ${e.motionDurationMid}`,
    "&-hoverable:hover": {
      position: "relative",
      zIndex: 1,
      boxShadow: o
    }
  };
}, sK = (e) => {
  const {
    componentCls: t,
    iconCls: n,
    cardActionsLiMargin: o,
    cardActionsIconSize: r,
    colorBorderSecondary: i
  } = e;
  return O(O({
    margin: 0,
    padding: 0,
    listStyle: "none",
    background: e.colorBgContainer,
    borderTop: `${e.lineWidth}px ${e.lineType} ${i}`,
    display: "flex",
    borderRadius: `0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px `
  }, Va()), {
    "& > li": {
      margin: o,
      color: e.colorTextDescription,
      textAlign: "center",
      "> span": {
        position: "relative",
        display: "block",
        minWidth: e.cardActionsIconSize * 2,
        fontSize: e.fontSize,
        lineHeight: e.lineHeight,
        cursor: "pointer",
        "&:hover": {
          color: e.colorPrimary,
          transition: `color ${e.motionDurationMid}`
        },
        [`a:not(${t}-btn), > ${n}`]: {
          display: "inline-block",
          width: "100%",
          color: e.colorTextDescription,
          lineHeight: `${e.fontSize * e.lineHeight}px`,
          transition: `color ${e.motionDurationMid}`,
          "&:hover": {
            color: e.colorPrimary
          }
        },
        [`> ${n}`]: {
          fontSize: r,
          lineHeight: `${r * e.lineHeight}px`
        }
      },
      "&:not(:last-child)": {
        borderInlineEnd: `${e.lineWidth}px ${e.lineType} ${i}`
      }
    }
  });
}, uK = (e) => O(O({
  margin: `-${e.marginXXS}px 0`,
  display: "flex"
}, Va()), {
  "&-avatar": {
    paddingInlineEnd: e.padding
  },
  "&-detail": {
    overflow: "hidden",
    flex: 1,
    "> div:not(:last-child)": {
      marginBottom: e.marginXS
    }
  },
  "&-title": O({
    color: e.colorTextHeading,
    fontWeight: e.fontWeightStrong,
    fontSize: e.fontSizeLG
  }, Ha),
  "&-description": {
    color: e.colorTextDescription
  }
}), cK = (e) => {
  const {
    componentCls: t,
    cardPaddingBase: n,
    colorFillAlter: o
  } = e;
  return {
    [`${t}-head`]: {
      padding: `0 ${n}px`,
      background: o,
      "&-title": {
        fontSize: e.fontSize
      }
    },
    [`${t}-body`]: {
      padding: `${e.padding}px ${n}px`
    }
  };
}, dK = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    overflow: "hidden",
    [`${t}-body`]: {
      userSelect: "none"
    }
  };
}, fK = (e) => {
  const {
    componentCls: t,
    cardShadow: n,
    cardHeadPadding: o,
    colorBorderSecondary: r,
    boxShadow: i,
    cardPaddingBase: a
  } = e;
  return {
    [t]: O(O({}, fn(e)), {
      position: "relative",
      background: e.colorBgContainer,
      borderRadius: e.borderRadiusLG,
      [`&:not(${t}-bordered)`]: {
        boxShadow: i
      },
      [`${t}-head`]: aK(e),
      [`${t}-extra`]: {
        // https://stackoverflow.com/a/22429853/3040605
        marginInlineStart: "auto",
        color: "",
        fontWeight: "normal",
        fontSize: e.fontSize
      },
      [`${t}-body`]: O({
        padding: a,
        borderRadius: ` 0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`
      }, Va()),
      [`${t}-grid`]: lK(e),
      [`${t}-cover`]: {
        "> *": {
          display: "block",
          width: "100%"
        },
        img: {
          borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`
        }
      },
      [`${t}-actions`]: sK(e),
      [`${t}-meta`]: uK(e)
    }),
    [`${t}-bordered`]: {
      border: `${e.lineWidth}px ${e.lineType} ${r}`,
      [`${t}-cover`]: {
        marginTop: -1,
        marginInlineStart: -1,
        marginInlineEnd: -1
      }
    },
    [`${t}-hoverable`]: {
      cursor: "pointer",
      transition: `box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,
      "&:hover": {
        borderColor: "transparent",
        boxShadow: n
      }
    },
    [`${t}-contain-grid`]: {
      [`${t}-body`]: {
        display: "flex",
        flexWrap: "wrap"
      },
      [`&:not(${t}-loading) ${t}-body`]: {
        marginBlockStart: -e.lineWidth,
        marginInlineStart: -e.lineWidth,
        padding: 0
      }
    },
    [`${t}-contain-tabs`]: {
      [`> ${t}-head`]: {
        [`${t}-head-title, ${t}-extra`]: {
          paddingTop: o
        }
      }
    },
    [`${t}-type-inner`]: cK(e),
    [`${t}-loading`]: dK(e),
    [`${t}-rtl`]: {
      direction: "rtl"
    }
  };
}, pK = (e) => {
  const {
    componentCls: t,
    cardPaddingSM: n,
    cardHeadHeightSM: o
  } = e;
  return {
    [`${t}-small`]: {
      [`> ${t}-head`]: {
        minHeight: o,
        padding: `0 ${n}px`,
        fontSize: e.fontSize,
        [`> ${t}-head-wrapper`]: {
          [`> ${t}-extra`]: {
            fontSize: e.fontSize
          }
        }
      },
      [`> ${t}-body`]: {
        padding: n
      }
    },
    [`${t}-small${t}-contain-tabs`]: {
      [`> ${t}-head`]: {
        [`${t}-head-title, ${t}-extra`]: {
          minHeight: o,
          paddingTop: 0,
          display: "flex",
          alignItems: "center"
        }
      }
    }
  };
}, hK = Sn("Card", (e) => {
  const t = Qt(e, {
    cardShadow: e.boxShadowCard,
    cardHeadHeight: e.fontSizeLG * e.lineHeightLG + e.padding * 2,
    cardHeadHeightSM: e.fontSize * e.lineHeight + e.paddingXS * 2,
    cardHeadPadding: e.padding,
    cardPaddingBase: e.paddingLG,
    cardHeadTabsMarginBottom: -e.padding - e.lineWidth,
    cardActionsLiMargin: `${e.paddingSM}px 0`,
    cardActionsIconSize: e.fontSize,
    cardPaddingSM: 12
    // Fixed padding.
  });
  return [
    // Style
    fK(t),
    // Size
    pK(t)
  ];
}), gK = () => ({
  prefixCls: String,
  width: {
    type: [Number, String]
  }
}), lx = be({
  compatConfig: {
    MODE: 3
  },
  name: "SkeletonTitle",
  props: gK(),
  setup(e) {
    return () => {
      const {
        prefixCls: t,
        width: n
      } = e, o = typeof n == "number" ? `${n}px` : n;
      return h("h3", {
        class: t,
        style: {
          width: o
        }
      }, null);
    };
  }
}), vK = () => ({
  prefixCls: String,
  width: {
    type: [Number, String, Array]
  },
  rows: Number
}), mK = be({
  compatConfig: {
    MODE: 3
  },
  name: "SkeletonParagraph",
  props: vK(),
  setup(e) {
    const t = (n) => {
      const {
        width: o,
        rows: r = 2
      } = e;
      if (Array.isArray(o))
        return o[n];
      if (r - 1 === n)
        return o;
    };
    return () => {
      const {
        prefixCls: n,
        rows: o
      } = e, r = [...Array(o)].map((i, a) => {
        const l = t(a);
        return h("li", {
          key: a,
          style: {
            width: typeof l == "number" ? `${l}px` : l
          }
        }, null);
      });
      return h("ul", {
        class: n
      }, [r]);
    };
  }
}), Qh = () => ({
  prefixCls: String,
  size: [String, Number],
  shape: String,
  active: {
    type: Boolean,
    default: void 0
  }
}), Vd = (e) => {
  const {
    prefixCls: t,
    size: n,
    shape: o
  } = e, r = Me({
    [`${t}-lg`]: n === "large",
    [`${t}-sm`]: n === "small"
  }), i = Me({
    [`${t}-circle`]: o === "circle",
    [`${t}-square`]: o === "square",
    [`${t}-round`]: o === "round"
  }), a = typeof n == "number" ? {
    width: `${n}px`,
    height: `${n}px`,
    lineHeight: `${n}px`
  } : {};
  return h("span", {
    class: Me(t, r, i),
    style: a
  }, null);
};
Vd.displayName = "SkeletonElement";
const bK = new tn("ant-skeleton-loading", {
  "0%": {
    transform: "translateX(-37.5%)"
  },
  "100%": {
    transform: "translateX(37.5%)"
  }
}), Zh = (e) => ({
  height: e,
  lineHeight: `${e}px`
}), Mu = (e) => O({
  width: e
}, Zh(e)), yK = (e) => ({
  position: "relative",
  // fix https://github.com/ant-design/ant-design/issues/36444
  // https://monshin.github.io/202109/css/safari-border-radius-overflow-hidden/
  /* stylelint-disable-next-line property-no-vendor-prefix,value-no-vendor-prefix */
  zIndex: 0,
  overflow: "hidden",
  background: "transparent",
  "&::after": {
    position: "absolute",
    top: 0,
    insetInlineEnd: "-150%",
    bottom: 0,
    insetInlineStart: "-150%",
    background: e.skeletonLoadingBackground,
    animationName: bK,
    animationDuration: e.skeletonLoadingMotionDuration,
    animationTimingFunction: "ease",
    animationIterationCount: "infinite",
    content: '""'
  }
}), hv = (e) => O({
  width: e * 5,
  minWidth: e * 5
}, Zh(e)), xK = (e) => {
  const {
    skeletonAvatarCls: t,
    color: n,
    controlHeight: o,
    controlHeightLG: r,
    controlHeightSM: i
  } = e;
  return {
    [`${t}`]: O({
      display: "inline-block",
      verticalAlign: "top",
      background: n
    }, Mu(o)),
    [`${t}${t}-circle`]: {
      borderRadius: "50%"
    },
    [`${t}${t}-lg`]: O({}, Mu(r)),
    [`${t}${t}-sm`]: O({}, Mu(i))
  };
}, wK = (e) => {
  const {
    controlHeight: t,
    borderRadiusSM: n,
    skeletonInputCls: o,
    controlHeightLG: r,
    controlHeightSM: i,
    color: a
  } = e;
  return {
    [`${o}`]: O({
      display: "inline-block",
      verticalAlign: "top",
      background: a,
      borderRadius: n
    }, hv(t)),
    [`${o}-lg`]: O({}, hv(r)),
    [`${o}-sm`]: O({}, hv(i))
  };
}, pC = (e) => O({
  width: e
}, Zh(e)), SK = (e) => {
  const {
    skeletonImageCls: t,
    imageSizeBase: n,
    color: o,
    borderRadiusSM: r
  } = e;
  return {
    [`${t}`]: O(O({
      display: "flex",
      alignItems: "center",
      justifyContent: "center",
      verticalAlign: "top",
      background: o,
      borderRadius: r
    }, pC(n * 2)), {
      [`${t}-path`]: {
        fill: "#bfbfbf"
      },
      [`${t}-svg`]: O(O({}, pC(n)), {
        maxWidth: n * 4,
        maxHeight: n * 4
      }),
      [`${t}-svg${t}-svg-circle`]: {
        borderRadius: "50%"
      }
    }),
    [`${t}${t}-circle`]: {
      borderRadius: "50%"
    }
  };
}, gv = (e, t, n) => {
  const {
    skeletonButtonCls: o
  } = e;
  return {
    [`${n}${o}-circle`]: {
      width: t,
      minWidth: t,
      borderRadius: "50%"
    },
    [`${n}${o}-round`]: {
      borderRadius: t
    }
  };
}, vv = (e) => O({
  width: e * 2,
  minWidth: e * 2
}, Zh(e)), CK = (e) => {
  const {
    borderRadiusSM: t,
    skeletonButtonCls: n,
    controlHeight: o,
    controlHeightLG: r,
    controlHeightSM: i,
    color: a
  } = e;
  return O(O(O(O(O({
    [`${n}`]: O({
      display: "inline-block",
      verticalAlign: "top",
      background: a,
      borderRadius: t,
      width: o * 2,
      minWidth: o * 2
    }, vv(o))
  }, gv(e, o, n)), {
    [`${n}-lg`]: O({}, vv(r))
  }), gv(e, r, `${n}-lg`)), {
    [`${n}-sm`]: O({}, vv(i))
  }), gv(e, i, `${n}-sm`));
}, $K = (e) => {
  const {
    componentCls: t,
    skeletonAvatarCls: n,
    skeletonTitleCls: o,
    skeletonParagraphCls: r,
    skeletonButtonCls: i,
    skeletonInputCls: a,
    skeletonImageCls: l,
    controlHeight: s,
    controlHeightLG: u,
    controlHeightSM: c,
    color: d,
    padding: f,
    marginSM: p,
    borderRadius: v,
    skeletonTitleHeight: g,
    skeletonBlockRadius: m,
    skeletonParagraphLineHeight: x,
    controlHeightXS: S,
    skeletonParagraphMarginTop: C
  } = e;
  return {
    [`${t}`]: {
      display: "table",
      width: "100%",
      [`${t}-header`]: {
        display: "table-cell",
        paddingInlineEnd: f,
        verticalAlign: "top",
        // Avatar
        [`${n}`]: O({
          display: "inline-block",
          verticalAlign: "top",
          background: d
        }, Mu(s)),
        [`${n}-circle`]: {
          borderRadius: "50%"
        },
        [`${n}-lg`]: O({}, Mu(u)),
        [`${n}-sm`]: O({}, Mu(c))
      },
      [`${t}-content`]: {
        display: "table-cell",
        width: "100%",
        verticalAlign: "top",
        // Title
        [`${o}`]: {
          width: "100%",
          height: g,
          background: d,
          borderRadius: m,
          [`+ ${r}`]: {
            marginBlockStart: c
          }
        },
        // paragraph
        [`${r}`]: {
          padding: 0,
          "> li": {
            width: "100%",
            height: x,
            listStyle: "none",
            background: d,
            borderRadius: m,
            "+ li": {
              marginBlockStart: S
            }
          }
        },
        [`${r}> li:last-child:not(:first-child):not(:nth-child(2))`]: {
          width: "61%"
        }
      },
      [`&-round ${t}-content`]: {
        [`${o}, ${r} > li`]: {
          borderRadius: v
        }
      }
    },
    [`${t}-with-avatar ${t}-content`]: {
      // Title
      [`${o}`]: {
        marginBlockStart: p,
        [`+ ${r}`]: {
          marginBlockStart: C
        }
      }
    },
    // Skeleton element
    [`${t}${t}-element`]: O(O(O(O({
      display: "inline-block",
      width: "auto"
    }, CK(e)), xK(e)), wK(e)), SK(e)),
    // Skeleton Block Button, Input
    [`${t}${t}-block`]: {
      width: "100%",
      [`${i}`]: {
        width: "100%"
      },
      [`${a}`]: {
        width: "100%"
      }
    },
    // With active animation
    [`${t}${t}-active`]: {
      [`
        ${o},
        ${r} > li,
        ${n},
        ${i},
        ${a},
        ${l}
      `]: O({}, yK(e))
    }
  };
}, jd = Sn("Skeleton", (e) => {
  const {
    componentCls: t
  } = e, n = Qt(e, {
    skeletonAvatarCls: `${t}-avatar`,
    skeletonTitleCls: `${t}-title`,
    skeletonParagraphCls: `${t}-paragraph`,
    skeletonButtonCls: `${t}-button`,
    skeletonInputCls: `${t}-input`,
    skeletonImageCls: `${t}-image`,
    imageSizeBase: e.controlHeight * 1.5,
    skeletonTitleHeight: e.controlHeight / 2,
    skeletonBlockRadius: e.borderRadiusSM,
    skeletonParagraphLineHeight: e.controlHeight / 2,
    skeletonParagraphMarginTop: e.marginLG + e.marginXXS,
    borderRadius: 100,
    skeletonLoadingBackground: `linear-gradient(90deg, ${e.color} 25%, ${e.colorGradientEnd} 37%, ${e.color} 63%)`,
    skeletonLoadingMotionDuration: "1.4s"
  });
  return [$K(n)];
}, (e) => {
  const {
    colorFillContent: t,
    colorFill: n
  } = e;
  return {
    color: t,
    colorGradientEnd: n
  };
}), PK = () => ({
  active: {
    type: Boolean,
    default: void 0
  },
  loading: {
    type: Boolean,
    default: void 0
  },
  prefixCls: String,
  avatar: {
    type: [Boolean, Object],
    default: void 0
  },
  title: {
    type: [Boolean, Object],
    default: void 0
  },
  paragraph: {
    type: [Boolean, Object],
    default: void 0
  },
  round: {
    type: Boolean,
    default: void 0
  }
});
function mv(e) {
  return e && typeof e == "object" ? e : {};
}
function OK(e, t) {
  return e && !t ? {
    size: "large",
    shape: "square"
  } : {
    size: "large",
    shape: "circle"
  };
}
function kK(e, t) {
  return !e && t ? {
    width: "38%"
  } : e && t ? {
    width: "50%"
  } : {};
}
function IK(e, t) {
  const n = {};
  return (!e || !t) && (n.width = "61%"), !e && t ? n.rows = 3 : n.rows = 2, n;
}
const mr = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeleton",
  props: kn(PK(), {
    avatar: !1,
    title: !0,
    paragraph: !0
  }),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o,
      direction: r
    } = _t("skeleton", e), [i, a] = jd(o);
    return () => {
      var l;
      const {
        loading: s,
        avatar: u,
        title: c,
        paragraph: d,
        active: f,
        round: p
      } = e, v = o.value;
      if (s || e.loading === void 0) {
        const g = !!u || u === "", m = !!c || c === "", x = !!d || d === "";
        let S;
        if (g) {
          const $ = O(O({
            prefixCls: `${v}-avatar`
          }, OK(m, x)), mv(u));
          S = h("div", {
            class: `${v}-header`
          }, [h(Vd, $, null)]);
        }
        let C;
        if (m || x) {
          let $;
          if (m) {
            const w = O(O({
              prefixCls: `${v}-title`
            }, kK(g, x)), mv(c));
            $ = h(lx, w, null);
          }
          let I;
          if (x) {
            const w = O(O({
              prefixCls: `${v}-paragraph`
            }, IK(g, m)), mv(d));
            I = h(mK, w, null);
          }
          C = h("div", {
            class: `${v}-content`
          }, [$, I]);
        }
        const P = Me(v, {
          [`${v}-with-avatar`]: g,
          [`${v}-active`]: f,
          [`${v}-rtl`]: r.value === "rtl",
          [`${v}-round`]: p,
          [a.value]: !0
        });
        return i(h("div", {
          class: P
        }, [S, C]));
      }
      return (l = n.default) === null || l === void 0 ? void 0 : l.call(n);
    };
  }
}), _K = () => O(O({}, Qh()), {
  size: String,
  block: Boolean
}), ZT = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeletonButton",
  props: kn(_K(), {
    size: "default"
  }),
  setup(e) {
    const {
      prefixCls: t
    } = _t("skeleton", e), [n, o] = jd(t), r = E(() => Me(t.value, `${t.value}-element`, {
      [`${t.value}-active`]: e.active,
      [`${t.value}-block`]: e.block
    }, o.value));
    return () => n(h("div", {
      class: r.value
    }, [h(Vd, Q(Q({}, e), {}, {
      prefixCls: `${t.value}-button`
    }), null)]));
  }
}), JT = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeletonInput",
  props: O(O({}, Fn(Qh(), ["shape"])), {
    size: String,
    block: Boolean
  }),
  setup(e) {
    const {
      prefixCls: t
    } = _t("skeleton", e), [n, o] = jd(t), r = E(() => Me(t.value, `${t.value}-element`, {
      [`${t.value}-active`]: e.active,
      [`${t.value}-block`]: e.block
    }, o.value));
    return () => n(h("div", {
      class: r.value
    }, [h(Vd, Q(Q({}, e), {}, {
      prefixCls: `${t.value}-input`
    }), null)]));
  }
}), TK = "M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z", eM = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeletonImage",
  props: Fn(Qh(), ["size", "shape", "active"]),
  setup(e) {
    const {
      prefixCls: t
    } = _t("skeleton", e), [n, o] = jd(t), r = E(() => Me(t.value, `${t.value}-element`, o.value));
    return () => n(h("div", {
      class: r.value
    }, [h("div", {
      class: `${t.value}-image`
    }, [h("svg", {
      viewBox: "0 0 1098 1024",
      xmlns: "http://www.w3.org/2000/svg",
      class: `${t.value}-image-svg`
    }, [h("path", {
      d: TK,
      class: `${t.value}-image-path`
    }, null)])])]));
  }
}), MK = () => O(O({}, Qh()), {
  shape: String
}), tM = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeletonAvatar",
  props: kn(MK(), {
    size: "default",
    shape: "circle"
  }),
  setup(e) {
    const {
      prefixCls: t
    } = _t("skeleton", e), [n, o] = jd(t), r = E(() => Me(t.value, `${t.value}-element`, {
      [`${t.value}-active`]: e.active
    }, o.value));
    return () => n(h("div", {
      class: r.value
    }, [h(Vd, Q(Q({}, e), {}, {
      prefixCls: `${t.value}-avatar`
    }), null)]));
  }
});
mr.Button = ZT;
mr.Avatar = tM;
mr.Input = JT;
mr.Image = eM;
mr.Title = lx;
mr.install = function(e) {
  return e.component(mr.name, mr), e.component(mr.Button.name, ZT), e.component(mr.Avatar.name, tM), e.component(mr.Input.name, JT), e.component(mr.Image.name, eM), e.component(mr.Title.name, lx), e;
};
const {
  TabPane: EK
} = Tu, DK = () => ({
  prefixCls: String,
  title: fe.any,
  extra: fe.any,
  bordered: {
    type: Boolean,
    default: !0
  },
  bodyStyle: {
    type: Object,
    default: void 0
  },
  headStyle: {
    type: Object,
    default: void 0
  },
  loading: {
    type: Boolean,
    default: !1
  },
  hoverable: {
    type: Boolean,
    default: !1
  },
  type: {
    type: String
  },
  size: {
    type: String
  },
  actions: fe.any,
  tabList: {
    type: Array
  },
  tabBarExtraContent: fe.any,
  activeTabKey: String,
  defaultActiveTabKey: String,
  cover: fe.any,
  onTabChange: {
    type: Function
  }
}), Eu = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACard",
  inheritAttrs: !1,
  props: DK(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: r,
      direction: i,
      size: a
    } = _t("card", e), [l, s] = hK(r), u = (f) => f.map((v, g) => cr(v) && !Ph(v) || !cr(v) ? h("li", {
      style: {
        width: `${100 / f.length}%`
      },
      key: `action-${g}`
    }, [h("span", null, [v])]) : null), c = (f) => {
      var p;
      (p = e.onTabChange) === null || p === void 0 || p.call(e, f);
    }, d = function() {
      let f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], p;
      return f.forEach((v) => {
        v && UP(v.type) && v.type.__ANT_CARD_GRID && (p = !0);
      }), p;
    };
    return () => {
      var f, p, v, g, m, x;
      const {
        headStyle: S = {},
        bodyStyle: C = {},
        loading: P,
        bordered: $ = !0,
        type: I,
        tabList: w,
        hoverable: _,
        activeTabKey: M,
        defaultActiveTabKey: N,
        tabBarExtraContent: A = _c((f = n.tabBarExtraContent) === null || f === void 0 ? void 0 : f.call(n)),
        title: H = _c((p = n.title) === null || p === void 0 ? void 0 : p.call(n)),
        extra: B = _c((v = n.extra) === null || v === void 0 ? void 0 : v.call(n)),
        actions: F = _c((g = n.actions) === null || g === void 0 ? void 0 : g.call(n)),
        cover: R = _c((m = n.cover) === null || m === void 0 ? void 0 : m.call(n))
      } = e, X = go((x = n.default) === null || x === void 0 ? void 0 : x.call(n)), j = r.value, ee = {
        [`${j}`]: !0,
        [s.value]: !0,
        [`${j}-loading`]: P,
        [`${j}-bordered`]: $,
        [`${j}-hoverable`]: !!_,
        [`${j}-contain-grid`]: d(X),
        [`${j}-contain-tabs`]: w && w.length,
        [`${j}-${a.value}`]: a.value,
        [`${j}-type-${I}`]: !!I,
        [`${j}-rtl`]: i.value === "rtl"
      }, W = h(mr, {
        loading: !0,
        active: !0,
        paragraph: {
          rows: 4
        },
        title: !1
      }, {
        default: () => [X]
      }), K = M !== void 0, q = {
        size: "large",
        [K ? "activeKey" : "defaultActiveKey"]: K ? M : N,
        onChange: c,
        class: `${j}-head-tabs`
      };
      let G;
      const ae = w && w.length ? h(Tu, q, {
        default: () => [w.map((te) => {
          const {
            tab: ve,
            slots: ue
          } = te, pe = ue?.tab;
          dn(!ue, "Card", "tabList slots is deprecated, Please use `customTab` instead.");
          let ge = ve !== void 0 ? ve : n[pe] ? n[pe](te) : null;
          return ge = Ah(n, "customTab", te, () => [ge]), h(EK, {
            tab: ge,
            key: te.key,
            disabled: te.disabled
          }, null);
        })],
        rightExtra: A ? () => A : null
      }) : null;
      (H || B || ae) && (G = h("div", {
        class: `${j}-head`,
        style: S
      }, [h("div", {
        class: `${j}-head-wrapper`
      }, [H && h("div", {
        class: `${j}-head-title`
      }, [H]), B && h("div", {
        class: `${j}-extra`
      }, [B])]), ae]));
      const le = R ? h("div", {
        class: `${j}-cover`
      }, [R]) : null, ie = h("div", {
        class: `${j}-body`,
        style: C
      }, [P ? W : X]), re = F && F.length ? h("ul", {
        class: `${j}-actions`
      }, [u(F)]) : null;
      return l(h("div", Q(Q({
        ref: "cardContainerRef"
      }, o), {}, {
        class: [ee, o.class]
      }), [G, le, X && X.length ? ie : null, re]));
    };
  }
}), AK = () => ({
  prefixCls: String,
  title: Hg(),
  description: Hg(),
  avatar: Hg()
}), vb = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACardMeta",
  props: AK(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o
    } = _t("card", e);
    return () => {
      const r = {
        [`${o.value}-meta`]: !0
      }, i = ei(n, e, "avatar"), a = ei(n, e, "title"), l = ei(n, e, "description"), s = i ? h("div", {
        class: `${o.value}-meta-avatar`
      }, [i]) : null, u = a ? h("div", {
        class: `${o.value}-meta-title`
      }, [a]) : null, c = l ? h("div", {
        class: `${o.value}-meta-description`
      }, [l]) : null, d = u || c ? h("div", {
        class: `${o.value}-meta-detail`
      }, [u, c]) : null;
      return h("div", {
        class: r
      }, [s, d]);
    };
  }
}), NK = () => ({
  prefixCls: String,
  hoverable: {
    type: Boolean,
    default: !0
  }
}), mb = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACardGrid",
  __ANT_CARD_GRID: !0,
  props: NK(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o
    } = _t("card", e), r = E(() => ({
      [`${o.value}-grid`]: !0,
      [`${o.value}-grid-hoverable`]: e.hoverable
    }));
    return () => {
      var i;
      return h("div", {
        class: r.value
      }, [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]);
    };
  }
});
Eu.Meta = vb;
Eu.Grid = mb;
Eu.install = function(e) {
  return e.component(Eu.name, Eu), e.component(vb.name, vb), e.component(mb.name, mb), e;
};
const RK = () => ({
  prefixCls: String,
  activeKey: en([Array, Number, String]),
  defaultActiveKey: en([Array, Number, String]),
  accordion: ct(),
  destroyInactivePanel: ct(),
  bordered: ct(),
  expandIcon: et(),
  openAnimation: fe.object,
  expandIconPosition: an(),
  collapsible: an(),
  ghost: ct(),
  onChange: et(),
  "onUpdate:activeKey": et()
}), nM = () => ({
  openAnimation: fe.object,
  prefixCls: String,
  header: fe.any,
  headerClass: String,
  showArrow: ct(),
  isActive: ct(),
  destroyInactivePanel: ct(),
  /** @deprecated Use `collapsible="disabled"` instead */
  disabled: ct(),
  accordion: ct(),
  forceRender: ct(),
  expandIcon: et(),
  extra: fe.any,
  panelKey: en(),
  collapsible: an(),
  role: String,
  onItemClick: et()
}), zK = (e) => {
  const {
    componentCls: t,
    collapseContentBg: n,
    padding: o,
    collapseContentPaddingHorizontal: r,
    collapseHeaderBg: i,
    collapseHeaderPadding: a,
    collapsePanelBorderRadius: l,
    lineWidth: s,
    lineType: u,
    colorBorder: c,
    colorText: d,
    colorTextHeading: f,
    colorTextDisabled: p,
    fontSize: v,
    lineHeight: g,
    marginSM: m,
    paddingSM: x,
    motionDurationSlow: S,
    fontSizeIcon: C
  } = e, P = `${s}px ${u} ${c}`;
  return {
    [t]: O(O({}, fn(e)), {
      backgroundColor: i,
      border: P,
      borderBottom: 0,
      borderRadius: `${l}px`,
      "&-rtl": {
        direction: "rtl"
      },
      [`& > ${t}-item`]: {
        borderBottom: P,
        "&:last-child": {
          [`
            &,
            & > ${t}-header`]: {
            borderRadius: `0 0 ${l}px ${l}px`
          }
        },
        [`> ${t}-header`]: {
          position: "relative",
          display: "flex",
          flexWrap: "nowrap",
          alignItems: "flex-start",
          padding: a,
          color: f,
          lineHeight: g,
          cursor: "pointer",
          transition: `all ${S}, visibility 0s`,
          [`> ${t}-header-text`]: {
            flex: "auto"
          },
          "&:focus": {
            outline: "none"
          },
          // >>>>> Arrow
          [`${t}-expand-icon`]: {
            height: v * g,
            display: "flex",
            alignItems: "center",
            paddingInlineEnd: m
          },
          [`${t}-arrow`]: O(O({}, cc()), {
            fontSize: C,
            svg: {
              transition: `transform ${S}`
            }
          }),
          // >>>>> Text
          [`${t}-header-text`]: {
            marginInlineEnd: "auto"
          }
        },
        [`${t}-header-collapsible-only`]: {
          cursor: "default",
          [`${t}-header-text`]: {
            flex: "none",
            cursor: "pointer"
          },
          [`${t}-expand-icon`]: {
            cursor: "pointer"
          }
        },
        [`${t}-icon-collapsible-only`]: {
          cursor: "default",
          [`${t}-expand-icon`]: {
            cursor: "pointer"
          }
        },
        [`&${t}-no-arrow`]: {
          [`> ${t}-header`]: {
            paddingInlineStart: x
          }
        }
      },
      [`${t}-content`]: {
        color: d,
        backgroundColor: n,
        borderTop: P,
        [`& > ${t}-content-box`]: {
          padding: `${o}px ${r}px`
        },
        "&-hidden": {
          display: "none"
        }
      },
      [`${t}-item:last-child`]: {
        [`> ${t}-content`]: {
          borderRadius: `0 0 ${l}px ${l}px`
        }
      },
      [`& ${t}-item-disabled > ${t}-header`]: {
        "\n          &,\n          & > .arrow\n        ": {
          color: p,
          cursor: "not-allowed"
        }
      },
      // ========================== Icon Position ==========================
      [`&${t}-icon-position-end`]: {
        [`& > ${t}-item`]: {
          [`> ${t}-header`]: {
            [`${t}-expand-icon`]: {
              order: 1,
              paddingInlineEnd: 0,
              paddingInlineStart: m
            }
          }
        }
      }
    })
  };
}, FK = (e) => {
  const {
    componentCls: t
  } = e, n = `> ${t}-item > ${t}-header ${t}-arrow svg`;
  return {
    [`${t}-rtl`]: {
      [n]: {
        transform: "rotate(180deg)"
      }
    }
  };
}, BK = (e) => {
  const {
    componentCls: t,
    collapseHeaderBg: n,
    paddingXXS: o,
    colorBorder: r
  } = e;
  return {
    [`${t}-borderless`]: {
      backgroundColor: n,
      border: 0,
      [`> ${t}-item`]: {
        borderBottom: `1px solid ${r}`
      },
      [`
        > ${t}-item:last-child,
        > ${t}-item:last-child ${t}-header
      `]: {
        borderRadius: 0
      },
      [`> ${t}-item:last-child`]: {
        borderBottom: 0
      },
      [`> ${t}-item > ${t}-content`]: {
        backgroundColor: "transparent",
        borderTop: 0
      },
      [`> ${t}-item > ${t}-content > ${t}-content-box`]: {
        paddingTop: o
      }
    }
  };
}, LK = (e) => {
  const {
    componentCls: t,
    paddingSM: n
  } = e;
  return {
    [`${t}-ghost`]: {
      backgroundColor: "transparent",
      border: 0,
      [`> ${t}-item`]: {
        borderBottom: 0,
        [`> ${t}-content`]: {
          backgroundColor: "transparent",
          border: 0,
          [`> ${t}-content-box`]: {
            paddingBlock: n
          }
        }
      }
    }
  };
}, HK = Sn("Collapse", (e) => {
  const t = Qt(e, {
    collapseContentBg: e.colorBgContainer,
    collapseHeaderBg: e.colorFillAlter,
    collapseHeaderPadding: `${e.paddingSM}px ${e.padding}px`,
    collapsePanelBorderRadius: e.borderRadiusLG,
    collapseContentPaddingHorizontal: 16
    // Fixed value
  });
  return [zK(t), BK(t), LK(t), FK(t), jh(t)];
});
function hC(e) {
  let t = e;
  if (!Array.isArray(t)) {
    const n = typeof t;
    t = n === "number" || n === "string" ? [t] : [];
  }
  return t.map((n) => String(n));
}
const _l = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACollapse",
  inheritAttrs: !1,
  props: kn(RK(), {
    accordion: !1,
    destroyInactivePanel: !1,
    bordered: !0,
    expandIconPosition: "start"
  }),
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: r
    } = t;
    const i = ce(hC(Lp([e.activeKey, e.defaultActiveKey])));
    ke(() => e.activeKey, () => {
      i.value = hC(e.activeKey);
    }, {
      deep: !0
    });
    const {
      prefixCls: a,
      direction: l,
      rootPrefixCls: s
    } = _t("collapse", e), [u, c] = HK(a), d = E(() => {
      const {
        expandIconPosition: x
      } = e;
      return x !== void 0 ? x : l.value === "rtl" ? "end" : "start";
    }), f = (x) => {
      const {
        expandIcon: S = o.expandIcon
      } = e, C = S ? S(x) : h(qa, {
        rotate: x.isActive ? 90 : void 0
      }, null);
      return h("div", {
        class: [`${a.value}-expand-icon`, c.value],
        onClick: () => ["header", "icon"].includes(e.collapsible) && v(x.panelKey)
      }, [Ao(Array.isArray(S) ? C[0] : C) ? Xn(C, {
        class: `${a.value}-arrow`
      }, !1) : C]);
    }, p = (x) => {
      e.activeKey === void 0 && (i.value = x);
      const S = e.accordion ? x[0] : x;
      r("update:activeKey", S), r("change", S);
    }, v = (x) => {
      let S = i.value;
      if (e.accordion)
        S = S[0] === x ? [] : [x];
      else {
        S = [...S];
        const C = S.indexOf(x);
        C > -1 ? S.splice(C, 1) : S.push(x);
      }
      p(S);
    }, g = (x, S) => {
      var C, P, $;
      if (Ph(x)) return;
      const I = i.value, {
        accordion: w,
        destroyInactivePanel: _,
        collapsible: M,
        openAnimation: N
      } = e, A = N || Wh(`${s.value}-motion-collapse`), H = String((C = x.key) !== null && C !== void 0 ? C : S), {
        header: B = ($ = (P = x.children) === null || P === void 0 ? void 0 : P.header) === null || $ === void 0 ? void 0 : $.call(P),
        headerClass: F,
        collapsible: R,
        disabled: X
      } = x.props || {};
      let j = !1;
      w ? j = I[0] === H : j = I.indexOf(H) > -1;
      let ee = R ?? M;
      (X || X === "") && (ee = "disabled");
      const W = {
        key: H,
        panelKey: H,
        header: B,
        headerClass: F,
        isActive: j,
        prefixCls: a.value,
        destroyInactivePanel: _,
        openAnimation: A,
        accordion: w,
        onItemClick: ee === "disabled" ? null : v,
        expandIcon: f,
        collapsible: ee
      };
      return Xn(x, W);
    }, m = () => {
      var x;
      return go((x = o.default) === null || x === void 0 ? void 0 : x.call(o)).map(g);
    };
    return () => {
      const {
        accordion: x,
        bordered: S,
        ghost: C
      } = e, P = Me(a.value, {
        [`${a.value}-borderless`]: !S,
        [`${a.value}-icon-position-${d.value}`]: !0,
        [`${a.value}-rtl`]: l.value === "rtl",
        [`${a.value}-ghost`]: !!C,
        [n.class]: !!n.class
      }, c.value);
      return u(h("div", Q(Q({
        class: P
      }, UB(n)), {}, {
        style: n.style,
        role: x ? "tablist" : null
      }), [m()]));
    };
  }
}), VK = be({
  compatConfig: {
    MODE: 3
  },
  name: "PanelContent",
  props: nM(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = $e(!1);
    return It(() => {
      (e.isActive || e.forceRender) && (o.value = !0);
    }), () => {
      var r;
      if (!o.value) return null;
      const {
        prefixCls: i,
        isActive: a,
        role: l
      } = e;
      return h("div", {
        class: Me(`${i}-content`, {
          [`${i}-content-active`]: a,
          [`${i}-content-inactive`]: !a
        }),
        role: l
      }, [h("div", {
        class: `${i}-content-box`
      }, [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)])]);
    };
  }
}), bb = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACollapsePanel",
  inheritAttrs: !1,
  props: kn(nM(), {
    showArrow: !0,
    isActive: !1,
    onItemClick() {
    },
    headerClass: "",
    forceRender: !1
  }),
  slots: Object,
  // emits: ['itemClick'],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: r
    } = t;
    dn(e.disabled === void 0, "Collapse.Panel", '`disabled` is deprecated. Please use `collapsible="disabled"` instead.');
    const {
      prefixCls: i
    } = _t("collapse", e), a = () => {
      o("itemClick", e.panelKey);
    }, l = (s) => {
      (s.key === "Enter" || s.keyCode === 13 || s.which === 13) && a();
    };
    return () => {
      var s, u;
      const {
        header: c = (s = n.header) === null || s === void 0 ? void 0 : s.call(n),
        headerClass: d,
        isActive: f,
        showArrow: p,
        destroyInactivePanel: v,
        accordion: g,
        forceRender: m,
        openAnimation: x,
        expandIcon: S = n.expandIcon,
        extra: C = (u = n.extra) === null || u === void 0 ? void 0 : u.call(n),
        collapsible: P
      } = e, $ = P === "disabled", I = i.value, w = Me(`${I}-header`, {
        [d]: d,
        [`${I}-header-collapsible-only`]: P === "header",
        [`${I}-icon-collapsible-only`]: P === "icon"
      }), _ = Me({
        [`${I}-item`]: !0,
        [`${I}-item-active`]: f,
        [`${I}-item-disabled`]: $,
        [`${I}-no-arrow`]: !p,
        [`${r.class}`]: !!r.class
      });
      let M = h("i", {
        class: "arrow"
      }, null);
      p && typeof S == "function" && (M = S(e));
      const N = ti(h(VK, {
        prefixCls: I,
        isActive: f,
        forceRender: m,
        role: g ? "tabpanel" : null
      }, {
        default: n.default
      }), [[Oi, f]]), A = O({
        appear: !1,
        css: !1
      }, x);
      return h("div", Q(Q({}, r), {}, {
        class: _
      }), [h("div", {
        class: w,
        onClick: () => !["header", "icon"].includes(P) && a(),
        role: g ? "tab" : "button",
        tabindex: $ ? -1 : 0,
        "aria-expanded": f,
        onKeypress: l
      }, [p && M, h("span", {
        onClick: () => P === "header" && a(),
        class: `${I}-header-text`
      }, [c]), C && h("div", {
        class: `${I}-extra`
      }, [C])]), h(Er, A, {
        default: () => [!v || f ? N : null]
      })]);
    };
  }
});
_l.Panel = bb;
_l.install = function(e) {
  return e.component(_l.name, _l), e.component(bb.name, bb), e;
};
const oM = Symbol("TreeContextKey"), jK = be({
  compatConfig: {
    MODE: 3
  },
  name: "TreeContext",
  props: {
    value: {
      type: Object
    }
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    return Ft(oM, E(() => e.value)), () => {
      var o;
      return (o = n.default) === null || o === void 0 ? void 0 : o.call(n);
    };
  }
}), sx = () => zt(oM, E(() => ({}))), rM = Symbol("KeysStateKey"), WK = (e) => {
  Ft(rM, e);
}, iM = () => zt(rM, {
  expandedKeys: $e([]),
  selectedKeys: $e([]),
  loadedKeys: $e([]),
  loadingKeys: $e([]),
  checkedKeys: $e([]),
  halfCheckedKeys: $e([]),
  expandedKeysSet: E(() => /* @__PURE__ */ new Set()),
  selectedKeysSet: E(() => /* @__PURE__ */ new Set()),
  loadedKeysSet: E(() => /* @__PURE__ */ new Set()),
  loadingKeysSet: E(() => /* @__PURE__ */ new Set()),
  checkedKeysSet: E(() => /* @__PURE__ */ new Set()),
  halfCheckedKeysSet: E(() => /* @__PURE__ */ new Set()),
  flattenNodes: $e([])
}), KK = (e) => {
  let {
    prefixCls: t,
    level: n,
    isStart: o,
    isEnd: r
  } = e;
  const i = `${t}-indent-unit`, a = [];
  for (let l = 0; l < n; l += 1)
    a.push(h("span", {
      key: l,
      class: {
        [i]: !0,
        [`${i}-start`]: o[l],
        [`${i}-end`]: r[l]
      }
    }, null));
  return h("span", {
    "aria-hidden": "true",
    class: `${t}-indent`
  }, [a]);
}, aM = {
  eventKey: [String, Number],
  prefixCls: String,
  // By parent
  // expanded: { type: Boolean, default: undefined },
  // selected: { type: Boolean, default: undefined },
  // checked: { type: Boolean, default: undefined },
  // loaded: { type: Boolean, default: undefined },
  // loading: { type: Boolean, default: undefined },
  // halfChecked: { type: Boolean, default: undefined },
  // dragOver: { type: Boolean, default: undefined },
  // dragOverGapTop: { type: Boolean, default: undefined },
  // dragOverGapBottom: { type: Boolean, default: undefined },
  // pos: String,
  title: fe.any,
  /** New added in Tree for easy data access */
  data: {
    type: Object,
    default: void 0
  },
  parent: {
    type: Object,
    default: void 0
  },
  isStart: {
    type: Array
  },
  isEnd: {
    type: Array
  },
  active: {
    type: Boolean,
    default: void 0
  },
  onMousemove: {
    type: Function
  },
  // By user
  isLeaf: {
    type: Boolean,
    default: void 0
  },
  checkable: {
    type: Boolean,
    default: void 0
  },
  selectable: {
    type: Boolean,
    default: void 0
  },
  disabled: {
    type: Boolean,
    default: void 0
  },
  disableCheckbox: {
    type: Boolean,
    default: void 0
  },
  icon: fe.any,
  switcherIcon: fe.any,
  domRef: {
    type: Function
  }
}, qK = {
  prefixCls: {
    type: String
  },
  // data: { type: Array as PropType<FlattenNode[]> },
  motion: {
    type: Object
  },
  focusable: {
    type: Boolean
  },
  activeItem: {
    type: Object
  },
  focused: {
    type: Boolean
  },
  tabindex: {
    type: Number
  },
  checkable: {
    type: Boolean
  },
  selectable: {
    type: Boolean
  },
  disabled: {
    type: Boolean
  },
  // expandedKeys: { type: Array as PropType<Key[]> },
  // selectedKeys: { type: Array as PropType<Key[]> },
  // checkedKeys: { type: Array as PropType<Key[]> },
  // loadedKeys: { type: Array as PropType<Key[]> },
  // loadingKeys: { type: Array as PropType<Key[]> },
  // halfCheckedKeys: { type: Array as PropType<Key[]> },
  // keyEntities: { type: Object as PropType<Record<Key, DataEntity<DataNode>>> },
  // dragging: { type: Boolean as PropType<boolean> },
  // dragOverNodeKey: { type: [String, Number] as PropType<Key> },
  // dropPosition: { type: Number as PropType<number> },
  // Virtual list
  height: {
    type: Number
  },
  itemHeight: {
    type: Number
  },
  virtual: {
    type: Boolean
  },
  onScroll: {
    type: Function
  },
  onKeydown: {
    type: Function
  },
  onFocus: {
    type: Function
  },
  onBlur: {
    type: Function
  },
  onActiveChange: {
    type: Function
  },
  onContextmenu: {
    type: Function
  },
  onListChangeStart: {
    type: Function
  },
  onListChangeEnd: {
    type: Function
  }
}, lM = () => ({
  prefixCls: String,
  focusable: {
    type: Boolean,
    default: void 0
  },
  activeKey: [Number, String],
  tabindex: Number,
  children: fe.any,
  treeData: {
    type: Array
  },
  fieldNames: {
    type: Object
  },
  showLine: {
    type: [Boolean, Object],
    default: void 0
  },
  showIcon: {
    type: Boolean,
    default: void 0
  },
  icon: fe.any,
  selectable: {
    type: Boolean,
    default: void 0
  },
  expandAction: [String, Boolean],
  disabled: {
    type: Boolean,
    default: void 0
  },
  multiple: {
    type: Boolean,
    default: void 0
  },
  checkable: {
    type: Boolean,
    default: void 0
  },
  checkStrictly: {
    type: Boolean,
    default: void 0
  },
  draggable: {
    type: [Function, Boolean]
  },
  defaultExpandParent: {
    type: Boolean,
    default: void 0
  },
  autoExpandParent: {
    type: Boolean,
    default: void 0
  },
  defaultExpandAll: {
    type: Boolean,
    default: void 0
  },
  defaultExpandedKeys: {
    type: Array
  },
  expandedKeys: {
    type: Array
  },
  defaultCheckedKeys: {
    type: Array
  },
  checkedKeys: {
    type: [Object, Array]
  },
  defaultSelectedKeys: {
    type: Array
  },
  selectedKeys: {
    type: Array
  },
  allowDrop: {
    type: Function
  },
  dropIndicatorRender: {
    type: Function
  },
  onFocus: {
    type: Function
  },
  onBlur: {
    type: Function
  },
  onKeydown: {
    type: Function
  },
  onContextmenu: {
    type: Function
  },
  onClick: {
    type: Function
  },
  onDblclick: {
    type: Function
  },
  onScroll: {
    type: Function
  },
  onExpand: {
    type: Function
  },
  onCheck: {
    type: Function
  },
  onSelect: {
    type: Function
  },
  onLoad: {
    type: Function
  },
  loadData: {
    type: Function
  },
  loadedKeys: {
    type: Array
  },
  onMouseenter: {
    type: Function
  },
  onMouseleave: {
    type: Function
  },
  onRightClick: {
    type: Function
  },
  onDragstart: {
    type: Function
  },
  onDragenter: {
    type: Function
  },
  onDragover: {
    type: Function
  },
  onDragleave: {
    type: Function
  },
  onDragend: {
    type: Function
  },
  onDrop: {
    type: Function
  },
  /**
   * Used for `rc-tree-select` only.
   * Do not use in your production code directly since this will be refactor.
   */
  onActiveChange: {
    type: Function
  },
  filterTreeNode: {
    type: Function
  },
  motion: fe.any,
  switcherIcon: fe.any,
  // Virtual List
  height: Number,
  itemHeight: Number,
  virtual: {
    type: Boolean,
    default: void 0
  },
  // direction for drag logic
  direction: {
    type: String
  },
  rootClassName: String,
  rootStyle: Object
});
var YK = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const gC = "open", vC = "close", GK = "---", yb = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATreeNode",
  inheritAttrs: !1,
  props: aM,
  isTreeNode: 1,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      expose: r
    } = t;
    wn(!("slots" in e.data), `treeData slots is deprecated, please use ${Object.keys(e.data.slots || {}).map((Se) => "`v-slot:" + Se + "` ")}instead`);
    const i = $e(!1), a = sx(), {
      expandedKeysSet: l,
      selectedKeysSet: s,
      loadedKeysSet: u,
      loadingKeysSet: c,
      checkedKeysSet: d,
      halfCheckedKeysSet: f
    } = iM(), {
      dragOverNodeKey: p,
      dropPosition: v,
      keyEntities: g
    } = a.value, m = E(() => sp(e.eventKey, {
      expandedKeysSet: l.value,
      selectedKeysSet: s.value,
      loadedKeysSet: u.value,
      loadingKeysSet: c.value,
      checkedKeysSet: d.value,
      halfCheckedKeysSet: f.value,
      dragOverNodeKey: p,
      dropPosition: v,
      keyEntities: g
    })), x = gi(() => m.value.expanded), S = gi(() => m.value.selected), C = gi(() => m.value.checked), P = gi(() => m.value.loaded), $ = gi(() => m.value.loading), I = gi(() => m.value.halfChecked), w = gi(() => m.value.dragOver), _ = gi(() => m.value.dragOverGapTop), M = gi(() => m.value.dragOverGapBottom), N = gi(() => m.value.pos), A = $e(), H = E(() => {
      const {
        eventKey: Se
      } = e, {
        keyEntities: Ce
      } = a.value, {
        children: Ae
      } = Ce[Se] || {};
      return !!(Ae || []).length;
    }), B = E(() => {
      const {
        isLeaf: Se
      } = e, {
        loadData: Ce
      } = a.value, Ae = H.value;
      return Se === !1 ? !1 : Se || !Ce && !Ae || Ce && P.value && !Ae;
    }), F = E(() => B.value ? null : x.value ? gC : vC), R = E(() => {
      const {
        disabled: Se
      } = e, {
        disabled: Ce
      } = a.value;
      return !!(Ce || Se);
    }), X = E(() => {
      const {
        checkable: Se
      } = e, {
        checkable: Ce
      } = a.value;
      return !Ce || Se === !1 ? !1 : Ce;
    }), j = E(() => {
      const {
        selectable: Se
      } = e, {
        selectable: Ce
      } = a.value;
      return typeof Se == "boolean" ? Se : Ce;
    }), ee = E(() => {
      const {
        data: Se,
        active: Ce,
        checkable: Ae,
        disableCheckbox: qe,
        disabled: We,
        selectable: tt
      } = e;
      return O(O({
        active: Ce,
        checkable: Ae,
        disableCheckbox: qe,
        disabled: We,
        selectable: tt
      }, Se), {
        dataRef: Se,
        data: Se,
        isLeaf: B.value,
        checked: C.value,
        expanded: x.value,
        loading: $.value,
        selected: S.value,
        halfChecked: I.value
      });
    }), W = fr(), K = E(() => {
      const {
        eventKey: Se
      } = e, {
        keyEntities: Ce
      } = a.value, {
        parent: Ae
      } = Ce[Se] || {};
      return O(O({}, up(O({}, e, m.value))), {
        parent: Ae
      });
    }), q = Pn({
      eventData: K,
      eventKey: E(() => e.eventKey),
      selectHandle: A,
      pos: N,
      key: W.vnode.key
    });
    r(q);
    const G = (Se) => {
      const {
        onNodeDoubleClick: Ce
      } = a.value;
      Ce(Se, K.value);
    }, ae = (Se) => {
      if (R.value) return;
      const {
        onNodeSelect: Ce
      } = a.value;
      Se.preventDefault(), Ce(Se, K.value);
    }, le = (Se) => {
      if (R.value) return;
      const {
        disableCheckbox: Ce
      } = e, {
        onNodeCheck: Ae
      } = a.value;
      if (!X.value || Ce) return;
      Se.preventDefault();
      const qe = !C.value;
      Ae(Se, K.value, qe);
    }, ie = (Se) => {
      const {
        onNodeClick: Ce
      } = a.value;
      Ce(Se, K.value), j.value ? ae(Se) : le(Se);
    }, re = (Se) => {
      const {
        onNodeMouseEnter: Ce
      } = a.value;
      Ce(Se, K.value);
    }, te = (Se) => {
      const {
        onNodeMouseLeave: Ce
      } = a.value;
      Ce(Se, K.value);
    }, ve = (Se) => {
      const {
        onNodeContextMenu: Ce
      } = a.value;
      Ce(Se, K.value);
    }, ue = (Se) => {
      const {
        onNodeDragStart: Ce
      } = a.value;
      Se.stopPropagation(), i.value = !0, Ce(Se, q);
      try {
        Se.dataTransfer.setData("text/plain", "");
      } catch {
      }
    }, pe = (Se) => {
      const {
        onNodeDragEnter: Ce
      } = a.value;
      Se.preventDefault(), Se.stopPropagation(), Ce(Se, q);
    }, ge = (Se) => {
      const {
        onNodeDragOver: Ce
      } = a.value;
      Se.preventDefault(), Se.stopPropagation(), Ce(Se, q);
    }, _e = (Se) => {
      const {
        onNodeDragLeave: Ce
      } = a.value;
      Se.stopPropagation(), Ce(Se, q);
    }, ze = (Se) => {
      const {
        onNodeDragEnd: Ce
      } = a.value;
      Se.stopPropagation(), i.value = !1, Ce(Se, q);
    }, Ke = (Se) => {
      const {
        onNodeDrop: Ce
      } = a.value;
      Se.preventDefault(), Se.stopPropagation(), i.value = !1, Ce(Se, q);
    }, He = (Se) => {
      const {
        onNodeExpand: Ce
      } = a.value;
      $.value || Ce(Se, K.value);
    }, Ne = () => {
      const {
        data: Se
      } = e, {
        draggable: Ce
      } = a.value;
      return !!(Ce && (!Ce.nodeDraggable || Ce.nodeDraggable(Se)));
    }, Xe = () => {
      const {
        draggable: Se,
        prefixCls: Ce
      } = a.value;
      return Se && Se?.icon ? h("span", {
        class: `${Ce}-draggable-icon`
      }, [Se.icon]) : null;
    }, De = () => {
      var Se, Ce, Ae;
      const {
        switcherIcon: qe = o.switcherIcon || ((Se = a.value.slots) === null || Se === void 0 ? void 0 : Se[(Ae = (Ce = e.data) === null || Ce === void 0 ? void 0 : Ce.slots) === null || Ae === void 0 ? void 0 : Ae.switcherIcon])
      } = e, {
        switcherIcon: We
      } = a.value, tt = qe || We;
      return typeof tt == "function" ? tt(ee.value) : tt;
    }, Fe = () => {
      const {
        loadData: Se,
        onNodeLoad: Ce
      } = a.value;
      $.value || Se && x.value && !B.value && !H.value && !P.value && Ce(K.value);
    };
    Nt(() => {
      Fe();
    }), Ya(() => {
      Fe();
    });
    const Ve = () => {
      const {
        prefixCls: Se
      } = a.value, Ce = De();
      if (B.value)
        return Ce !== !1 ? h("span", {
          class: Me(`${Se}-switcher`, `${Se}-switcher-noop`)
        }, [Ce]) : null;
      const Ae = Me(`${Se}-switcher`, `${Se}-switcher_${x.value ? gC : vC}`);
      return Ce !== !1 ? h("span", {
        onClick: He,
        class: Ae
      }, [Ce]) : null;
    }, nt = () => {
      var Se, Ce;
      const {
        disableCheckbox: Ae
      } = e, {
        prefixCls: qe
      } = a.value, We = R.value;
      return X.value ? h("span", {
        class: Me(`${qe}-checkbox`, C.value && `${qe}-checkbox-checked`, !C.value && I.value && `${qe}-checkbox-indeterminate`, (We || Ae) && `${qe}-checkbox-disabled`),
        onClick: le
      }, [(Ce = (Se = a.value).customCheckable) === null || Ce === void 0 ? void 0 : Ce.call(Se)]) : null;
    }, je = () => {
      const {
        prefixCls: Se
      } = a.value;
      return h("span", {
        class: Me(`${Se}-iconEle`, `${Se}-icon__${F.value || "docu"}`, $.value && `${Se}-icon_loading`)
      }, null);
    }, Pe = () => {
      const {
        disabled: Se,
        eventKey: Ce
      } = e, {
        draggable: Ae,
        dropLevelOffset: qe,
        dropPosition: We,
        prefixCls: tt,
        indent: Ee,
        dropIndicatorRender: Re,
        dragOverNodeKey: Be,
        direction: ot
      } = a.value;
      return !Se && Ae !== !1 && Be === Ce ? Re({
        dropPosition: We,
        dropLevelOffset: qe,
        indent: Ee,
        prefixCls: tt,
        direction: ot
      }) : null;
    }, Ge = () => {
      var Se, Ce, Ae, qe, We, tt;
      const {
        // title = slots.title ||
        //   context.value.slots?.[props.data?.slots?.title] ||
        //   context.value.slots?.title,
        // selected,
        icon: Ee = o.icon,
        // loading,
        data: Re
      } = e, Be = o.title || ((Se = a.value.slots) === null || Se === void 0 ? void 0 : Se[(Ae = (Ce = e.data) === null || Ce === void 0 ? void 0 : Ce.slots) === null || Ae === void 0 ? void 0 : Ae.title]) || ((qe = a.value.slots) === null || qe === void 0 ? void 0 : qe.title) || e.title, {
        prefixCls: ot,
        showIcon: pt,
        icon: at,
        loadData: dt
        // slots: contextSlots,
      } = a.value, wt = R.value, Ct = `${ot}-node-content-wrapper`;
      let St;
      if (pt) {
        const Wt = Ee || ((We = a.value.slots) === null || We === void 0 ? void 0 : We[(tt = Re?.slots) === null || tt === void 0 ? void 0 : tt.icon]) || at;
        St = Wt ? h("span", {
          class: Me(`${ot}-iconEle`, `${ot}-icon__customize`)
        }, [typeof Wt == "function" ? Wt(ee.value) : Wt]) : je();
      } else dt && $.value && (St = je());
      let yt;
      typeof Be == "function" ? yt = Be(ee.value) : yt = Be, yt = yt === void 0 ? GK : yt;
      const Ot = h("span", {
        class: `${ot}-title`
      }, [yt]);
      return h("span", {
        ref: A,
        title: typeof Be == "string" ? Be : "",
        class: Me(`${Ct}`, `${Ct}-${F.value || "normal"}`, !wt && (S.value || i.value) && `${ot}-node-selected`),
        onMouseenter: re,
        onMouseleave: te,
        onContextmenu: ve,
        onClick: ie,
        onDblclick: G
      }, [St, Ot, Pe()]);
    };
    return () => {
      const Se = O(O({}, e), n), {
        eventKey: Ce,
        isLeaf: Ae,
        isStart: qe,
        isEnd: We,
        domRef: tt,
        active: Ee,
        data: Re,
        onMousemove: Be,
        selectable: ot
      } = Se, pt = YK(Se, ["eventKey", "isLeaf", "isStart", "isEnd", "domRef", "active", "data", "onMousemove", "selectable"]), {
        prefixCls: at,
        filterTreeNode: dt,
        keyEntities: wt,
        dropContainerKey: Ct,
        dropTargetKey: St,
        draggingNodeKey: yt
      } = a.value, Ot = R.value, Wt = Bs(pt, {
        aria: !0,
        data: !0
      }), {
        level: Xt
      } = wt[Ce] || {}, ln = We[We.length - 1], pn = Ne(), gt = !Ot && pn, En = yt === Ce, hn = ot !== void 0 ? {
        "aria-selected": !!ot
      } : void 0;
      return h("div", Q(Q({
        ref: tt,
        class: Me(n.class, `${at}-treenode`, {
          [`${at}-treenode-disabled`]: Ot,
          [`${at}-treenode-switcher-${x.value ? "open" : "close"}`]: !Ae,
          [`${at}-treenode-checkbox-checked`]: C.value,
          [`${at}-treenode-checkbox-indeterminate`]: I.value,
          [`${at}-treenode-selected`]: S.value,
          [`${at}-treenode-loading`]: $.value,
          [`${at}-treenode-active`]: Ee,
          [`${at}-treenode-leaf-last`]: ln,
          [`${at}-treenode-draggable`]: gt,
          dragging: En,
          "drop-target": St === Ce,
          "drop-container": Ct === Ce,
          "drag-over": !Ot && w.value,
          "drag-over-gap-top": !Ot && _.value,
          "drag-over-gap-bottom": !Ot && M.value,
          "filter-node": dt && dt(K.value)
        }),
        style: n.style,
        draggable: gt,
        "aria-grabbed": En,
        onDragstart: gt ? ue : void 0,
        onDragenter: pn ? pe : void 0,
        onDragover: pn ? ge : void 0,
        onDragleave: pn ? _e : void 0,
        onDrop: pn ? Ke : void 0,
        onDragend: pn ? ze : void 0,
        onMousemove: Be
      }, hn), Wt), [h(KK, {
        prefixCls: at,
        level: Xt,
        isStart: qe,
        isEnd: We
      }, null), Xe(), Ve(), nt(), Ge()]);
    };
  }
});
function Wi(e, t) {
  if (!e) return [];
  const n = e.slice(), o = n.indexOf(t);
  return o >= 0 && n.splice(o, 1), n;
}
function wa(e, t) {
  const n = (e || []).slice();
  return n.indexOf(t) === -1 && n.push(t), n;
}
function ux(e) {
  return e.split("-");
}
function sM(e, t) {
  return `${e}-${t}`;
}
function UK(e) {
  return e && e.type && e.type.isTreeNode;
}
function XK(e, t) {
  const n = [], o = t[e];
  function r() {
    (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []).forEach((a) => {
      let {
        key: l,
        children: s
      } = a;
      n.push(l), r(s);
    });
  }
  return r(o.children), n;
}
function QK(e) {
  if (e.parent) {
    const t = ux(e.pos);
    return Number(t[t.length - 1]) === e.parent.children.length - 1;
  }
  return !1;
}
function ZK(e) {
  const t = ux(e.pos);
  return Number(t[t.length - 1]) === 0;
}
function mC(e, t, n, o, r, i, a, l, s, u) {
  var c;
  const {
    clientX: d,
    clientY: f
  } = e, {
    top: p,
    height: v
  } = e.target.getBoundingClientRect(), m = ((u === "rtl" ? -1 : 1) * ((r?.x || 0) - d) - 12) / o;
  let x = l[n.eventKey];
  if (f < p + v / 2) {
    const N = a.findIndex((B) => B.key === x.key), A = N <= 0 ? 0 : N - 1, H = a[A].key;
    x = l[H];
  }
  const S = x.key, C = x, P = x.key;
  let $ = 0, I = 0;
  if (!s.has(S))
    for (let N = 0; N < m && QK(x); N += 1)
      x = x.parent, I += 1;
  const w = t.eventData, _ = x.node;
  let M = !0;
  return ZK(x) && x.level === 0 && f < p + v / 2 && i({
    dragNode: w,
    dropNode: _,
    dropPosition: -1
  }) && x.key === n.eventKey ? $ = -1 : (C.children || []).length && s.has(P) ? i({
    dragNode: w,
    dropNode: _,
    dropPosition: 0
  }) ? $ = 0 : M = !1 : I === 0 ? m > -1.5 ? i({
    dragNode: w,
    dropNode: _,
    dropPosition: 1
  }) ? $ = 1 : M = !1 : i({
    dragNode: w,
    dropNode: _,
    dropPosition: 0
  }) ? $ = 0 : i({
    dragNode: w,
    dropNode: _,
    dropPosition: 1
  }) ? $ = 1 : M = !1 : i({
    dragNode: w,
    dropNode: _,
    dropPosition: 1
  }) ? $ = 1 : M = !1, {
    dropPosition: $,
    dropLevelOffset: I,
    dropTargetKey: x.key,
    dropTargetPos: x.pos,
    dragOverNodeKey: P,
    dropContainerKey: $ === 0 ? null : ((c = x.parent) === null || c === void 0 ? void 0 : c.key) || null,
    dropAllowed: M
  };
}
function bC(e, t) {
  if (!e) return;
  const {
    multiple: n
  } = t;
  return n ? e.slice() : e.length ? [e[0]] : e;
}
function bv(e) {
  if (!e)
    return null;
  let t;
  if (Array.isArray(e))
    t = {
      checkedKeys: e,
      halfCheckedKeys: void 0
    };
  else if (typeof e == "object")
    t = {
      checkedKeys: e.checked || void 0,
      halfCheckedKeys: e.halfChecked || void 0
    };
  else
    return wn(!1, "`checkedKeys` is not an array or an object"), null;
  return t;
}
function xb(e, t) {
  const n = /* @__PURE__ */ new Set();
  function o(r) {
    if (n.has(r)) return;
    const i = t[r];
    if (!i) return;
    n.add(r);
    const {
      parent: a,
      node: l
    } = i;
    l.disabled || a && o(a.key);
  }
  return (e || []).forEach((r) => {
    o(r);
  }), [...n];
}
var JK = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function Wd(e, t) {
  return e ?? t;
}
function Jh(e) {
  const {
    title: t,
    _title: n,
    key: o,
    children: r
  } = e || {}, i = t || "title";
  return {
    title: i,
    _title: n || [i],
    key: o || "key",
    children: r || "children"
  };
}
function wb(e) {
  function t() {
    let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
    return Do(n).map((r) => {
      var i, a, l, s;
      if (!UK(r))
        return wn(!r, "Tree/TreeNode can only accept TreeNode as children."), null;
      const u = r.children || {}, c = r.key, d = {};
      for (const [N, A] of Object.entries(r.props))
        d[Td(N)] = A;
      const {
        isLeaf: f,
        checkable: p,
        selectable: v,
        disabled: g,
        disableCheckbox: m
      } = d, x = {
        isLeaf: f || f === "" || void 0,
        checkable: p || p === "" || void 0,
        selectable: v || v === "" || void 0,
        disabled: g || g === "" || void 0,
        disableCheckbox: m || m === "" || void 0
      }, S = O(O({}, d), x), {
        title: C = (i = u.title) === null || i === void 0 ? void 0 : i.call(u, S),
        icon: P = (a = u.icon) === null || a === void 0 ? void 0 : a.call(u, S),
        switcherIcon: $ = (l = u.switcherIcon) === null || l === void 0 ? void 0 : l.call(u, S)
      } = d, I = JK(d, ["title", "icon", "switcherIcon"]), w = (s = u.default) === null || s === void 0 ? void 0 : s.call(u), _ = O(O(O({}, I), {
        title: C,
        icon: P,
        switcherIcon: $,
        key: c,
        isLeaf: f
      }), x), M = t(w);
      return M.length && (_.children = M), _;
    });
  }
  return t(e);
}
function eq(e, t, n) {
  const {
    _title: o,
    key: r,
    children: i
  } = Jh(n), a = new Set(t === !0 ? [] : t), l = [];
  function s(u) {
    let c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
    return u.map((d, f) => {
      const p = sM(c ? c.pos : "0", f), v = Wd(d[r], p);
      let g;
      for (let x = 0; x < o.length; x += 1) {
        const S = o[x];
        if (d[S] !== void 0) {
          g = d[S];
          break;
        }
      }
      const m = O(O({}, Fn(d, [...o, r, i])), {
        title: g,
        key: v,
        parent: c,
        pos: p,
        children: null,
        data: d,
        isStart: [...c ? c.isStart : [], f === 0],
        isEnd: [...c ? c.isEnd : [], f === u.length - 1]
      });
      return l.push(m), t === !0 || a.has(v) ? m.children = s(d[i] || [], m) : m.children = [], m;
    });
  }
  return s(e), l;
}
function tq(e, t, n) {
  let o = {};
  typeof n == "object" ? o = n : o = {
    externalGetKey: n
  }, o = o || {};
  const {
    childrenPropName: r,
    externalGetKey: i,
    fieldNames: a
  } = o, {
    key: l,
    children: s
  } = Jh(a), u = r || s;
  let c;
  i ? typeof i == "string" ? c = (f) => f[i] : typeof i == "function" && (c = (f) => i(f)) : c = (f, p) => Wd(f[l], p);
  function d(f, p, v, g) {
    const m = f ? f[u] : e, x = f ? sM(v.pos, p) : "0", S = f ? [...g, f] : [];
    if (f) {
      const C = c(f, x), P = {
        node: f,
        index: p,
        pos: x,
        key: C,
        parentPos: v.node ? v.pos : null,
        level: v.level + 1,
        nodes: S
      };
      t(P);
    }
    m && m.forEach((C, P) => {
      d(C, P, {
        node: f,
        pos: x,
        level: v ? v.level + 1 : -1
      }, S);
    });
  }
  d(null);
}
function cx(e) {
  let {
    initWrapper: t,
    processEntity: n,
    onProcessFinished: o,
    externalGetKey: r,
    childrenPropName: i,
    fieldNames: a
  } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, l = arguments.length > 2 ? arguments[2] : void 0;
  const s = r || l, u = {}, c = {};
  let d = {
    posEntities: u,
    keyEntities: c
  };
  return t && (d = t(d) || d), tq(e, (f) => {
    const {
      node: p,
      index: v,
      pos: g,
      key: m,
      parentPos: x,
      level: S,
      nodes: C
    } = f, P = {
      node: p,
      nodes: C,
      index: v,
      key: m,
      pos: g,
      level: S
    }, $ = Wd(m, g);
    u[g] = P, c[$] = P, P.parent = u[x], P.parent && (P.parent.children = P.parent.children || [], P.parent.children.push(P)), n && n(P, d);
  }, {
    externalGetKey: s,
    childrenPropName: i,
    fieldNames: a
  }), o && o(d), d;
}
function sp(e, t) {
  let {
    expandedKeysSet: n,
    selectedKeysSet: o,
    loadedKeysSet: r,
    loadingKeysSet: i,
    checkedKeysSet: a,
    halfCheckedKeysSet: l,
    dragOverNodeKey: s,
    dropPosition: u,
    keyEntities: c
  } = t;
  const d = c[e];
  return {
    eventKey: e,
    expanded: n.has(e),
    selected: o.has(e),
    loaded: r.has(e),
    loading: i.has(e),
    checked: a.has(e),
    halfChecked: l.has(e),
    pos: String(d ? d.pos : ""),
    parent: d.parent,
    // [Legacy] Drag props
    // Since the interaction of drag is changed, the semantic of the props are
    // not accuracy, I think it should be finally removed
    dragOver: s === e && u === 0,
    dragOverGapTop: s === e && u === -1,
    dragOverGapBottom: s === e && u === 1
  };
}
function up(e) {
  const {
    data: t,
    expanded: n,
    selected: o,
    checked: r,
    loaded: i,
    loading: a,
    halfChecked: l,
    dragOver: s,
    dragOverGapTop: u,
    dragOverGapBottom: c,
    pos: d,
    active: f,
    eventKey: p
  } = e, v = O(O({
    dataRef: t
  }, t), {
    expanded: n,
    selected: o,
    checked: r,
    loaded: i,
    loading: a,
    halfChecked: l,
    dragOver: s,
    dragOverGapTop: u,
    dragOverGapBottom: c,
    pos: d,
    active: f,
    eventKey: p,
    key: p
  });
  return "props" in v || Object.defineProperty(v, "props", {
    get() {
      return wn(!1, "Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."), e;
    }
  }), v;
}
function uM(e, t) {
  const n = /* @__PURE__ */ new Set();
  return e.forEach((o) => {
    t.has(o) || n.add(o);
  }), n;
}
function nq(e) {
  const {
    disabled: t,
    disableCheckbox: n,
    checkable: o
  } = e || {};
  return !!(t || n) || o === !1;
}
function oq(e, t, n, o) {
  const r = new Set(e), i = /* @__PURE__ */ new Set();
  for (let l = 0; l <= n; l += 1)
    (t.get(l) || /* @__PURE__ */ new Set()).forEach((u) => {
      const {
        key: c,
        node: d,
        children: f = []
      } = u;
      r.has(c) && !o(d) && f.filter((p) => !o(p.node)).forEach((p) => {
        r.add(p.key);
      });
    });
  const a = /* @__PURE__ */ new Set();
  for (let l = n; l >= 0; l -= 1)
    (t.get(l) || /* @__PURE__ */ new Set()).forEach((u) => {
      const {
        parent: c,
        node: d
      } = u;
      if (o(d) || !u.parent || a.has(u.parent.key))
        return;
      if (o(u.parent.node)) {
        a.add(c.key);
        return;
      }
      let f = !0, p = !1;
      (c.children || []).filter((v) => !o(v.node)).forEach((v) => {
        let {
          key: g
        } = v;
        const m = r.has(g);
        f && !m && (f = !1), !p && (m || i.has(g)) && (p = !0);
      }), f && r.add(c.key), p && i.add(c.key), a.add(c.key);
    });
  return {
    checkedKeys: Array.from(r),
    halfCheckedKeys: Array.from(uM(i, r))
  };
}
function rq(e, t, n, o, r) {
  const i = new Set(e);
  let a = new Set(t);
  for (let s = 0; s <= o; s += 1)
    (n.get(s) || /* @__PURE__ */ new Set()).forEach((c) => {
      const {
        key: d,
        node: f,
        children: p = []
      } = c;
      !i.has(d) && !a.has(d) && !r(f) && p.filter((v) => !r(v.node)).forEach((v) => {
        i.delete(v.key);
      });
    });
  a = /* @__PURE__ */ new Set();
  const l = /* @__PURE__ */ new Set();
  for (let s = o; s >= 0; s -= 1)
    (n.get(s) || /* @__PURE__ */ new Set()).forEach((c) => {
      const {
        parent: d,
        node: f
      } = c;
      if (r(f) || !c.parent || l.has(c.parent.key))
        return;
      if (r(c.parent.node)) {
        l.add(d.key);
        return;
      }
      let p = !0, v = !1;
      (d.children || []).filter((g) => !r(g.node)).forEach((g) => {
        let {
          key: m
        } = g;
        const x = i.has(m);
        p && !x && (p = !1), !v && (x || a.has(m)) && (v = !0);
      }), p || i.delete(d.key), v && a.add(d.key), l.add(d.key);
    });
  return {
    checkedKeys: Array.from(i),
    halfCheckedKeys: Array.from(uM(a, i))
  };
}
function Du(e, t, n, o, r, i) {
  const a = [];
  let l;
  i ? l = i : l = nq;
  const s = new Set(e.filter((c) => {
    const d = !!n[c];
    return d || a.push(c), d;
  }));
  vI(!a.length, `Tree missing follow keys: ${a.slice(0, 100).map((c) => `'${c}'`).join(", ")}`);
  let u;
  return t === !0 ? u = oq(s, r, o, l) : u = rq(s, t.halfCheckedKeys, r, o, l), u;
}
function cM(e) {
  const t = ce(0), n = $e();
  return It(() => {
    const o = /* @__PURE__ */ new Map();
    let r = 0;
    const i = e.value || {};
    for (const a in i)
      if (Object.prototype.hasOwnProperty.call(i, a)) {
        const l = i[a], {
          level: s
        } = l;
        let u = o.get(s);
        u || (u = /* @__PURE__ */ new Set(), o.set(s, u)), u.add(l), r = Math.max(r, s);
      }
    t.value = r, n.value = o;
  }), {
    maxLevel: t,
    levelEntities: n
  };
}
var iq = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" } }] }, name: "left", theme: "outlined" };
function yC(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      aq(e, r, n[r]);
    });
  }
  return e;
}
function aq(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Ju = function(t, n) {
  var o = yC({}, t, n.attrs);
  return h(on, yC({}, o, {
    icon: iq
  }), null);
};
Ju.displayName = "LeftOutlined";
Ju.inheritAttrs = !1;
const dM = () => xr() && window.document.documentElement, fM = (e) => {
  if (xr() && window.document.documentElement) {
    const t = Array.isArray(e) ? e : [e], {
      documentElement: n
    } = window.document;
    return t.some((o) => o in n.style);
  }
  return !1;
}, lq = (e, t) => {
  if (!fM(e))
    return !1;
  const n = document.createElement("div"), o = n.style[e];
  return n.style[e] = t, n.style[e] !== o;
};
function sq(e, t) {
  return !Array.isArray(e) && t !== void 0 ? lq(e, t) : fM(e);
}
let Df;
const uq = () => {
  if (!dM())
    return !1;
  if (Df !== void 0)
    return Df;
  const e = document.createElement("div");
  return e.style.display = "flex", e.style.flexDirection = "column", e.style.rowGap = "1px", e.appendChild(document.createElement("div")), e.appendChild(document.createElement("div")), document.body.appendChild(e), Df = e.scrollHeight === 1, document.body.removeChild(e), Df;
}, pM = (() => {
  const e = $e(!1);
  return Nt(() => {
    e.value = uq();
  }), e;
}), hM = Symbol("rowContextKey"), cq = (e) => {
  Ft(hM, e);
}, dq = () => zt(hM, {
  gutter: E(() => {
  }),
  wrap: E(() => {
  }),
  supportFlexGap: E(() => {
  })
}), fq = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    // Grid system
    [t]: {
      display: "flex",
      flexFlow: "row wrap",
      minWidth: 0,
      "&::before, &::after": {
        display: "flex"
      },
      "&-no-wrap": {
        flexWrap: "nowrap"
      },
      // The origin of the X-axis
      "&-start": {
        justifyContent: "flex-start"
      },
      // The center of the X-axis
      "&-center": {
        justifyContent: "center"
      },
      // The opposite of the X-axis
      "&-end": {
        justifyContent: "flex-end"
      },
      "&-space-between": {
        justifyContent: "space-between"
      },
      "&-space-around ": {
        justifyContent: "space-around"
      },
      "&-space-evenly ": {
        justifyContent: "space-evenly"
      },
      // Align at the top
      "&-top": {
        alignItems: "flex-start"
      },
      // Align at the center
      "&-middle": {
        alignItems: "center"
      },
      "&-bottom": {
        alignItems: "flex-end"
      }
    }
  };
}, pq = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    // Grid system
    [t]: {
      position: "relative",
      maxWidth: "100%",
      // Prevent columns from collapsing when empty
      minHeight: 1
    }
  };
}, hq = (e, t) => {
  const {
    componentCls: n,
    gridColumns: o
  } = e, r = {};
  for (let i = o; i >= 0; i--)
    i === 0 ? (r[`${n}${t}-${i}`] = {
      display: "none"
    }, r[`${n}-push-${i}`] = {
      insetInlineStart: "auto"
    }, r[`${n}-pull-${i}`] = {
      insetInlineEnd: "auto"
    }, r[`${n}${t}-push-${i}`] = {
      insetInlineStart: "auto"
    }, r[`${n}${t}-pull-${i}`] = {
      insetInlineEnd: "auto"
    }, r[`${n}${t}-offset-${i}`] = {
      marginInlineEnd: 0
    }, r[`${n}${t}-order-${i}`] = {
      order: 0
    }) : (r[`${n}${t}-${i}`] = {
      display: "block",
      flex: `0 0 ${i / o * 100}%`,
      maxWidth: `${i / o * 100}%`
    }, r[`${n}${t}-push-${i}`] = {
      insetInlineStart: `${i / o * 100}%`
    }, r[`${n}${t}-pull-${i}`] = {
      insetInlineEnd: `${i / o * 100}%`
    }, r[`${n}${t}-offset-${i}`] = {
      marginInlineStart: `${i / o * 100}%`
    }, r[`${n}${t}-order-${i}`] = {
      order: i
    });
  return r;
}, Sb = (e, t) => hq(e, t), gq = (e, t, n) => ({
  [`@media (min-width: ${t}px)`]: O({}, Sb(e, n))
}), vq = Sn("Grid", (e) => [fq(e)]), mq = Sn("Grid", (e) => {
  const t = Qt(e, {
    gridColumns: 24
    // Row is divided into 24 parts in Grid
  }), n = {
    "-sm": t.screenSMMin,
    "-md": t.screenMDMin,
    "-lg": t.screenLGMin,
    "-xl": t.screenXLMin,
    "-xxl": t.screenXXLMin
  };
  return [pq(t), Sb(t, ""), Sb(t, "-xs"), Object.keys(n).map((o) => gq(t, n[o], o)).reduce((o, r) => O(O({}, o), r), {})];
}), bq = () => ({
  align: en([String, Object]),
  justify: en([String, Object]),
  prefixCls: String,
  gutter: en([Number, Array, Object], 0),
  wrap: {
    type: Boolean,
    default: void 0
  }
}), gM = be({
  compatConfig: {
    MODE: 3
  },
  name: "ARow",
  inheritAttrs: !1,
  props: bq(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: r,
      direction: i
    } = _t("row", e), [a, l] = vq(r);
    let s;
    const u = N_(), c = ce({
      xs: !0,
      sm: !0,
      md: !0,
      lg: !0,
      xl: !0,
      xxl: !0
    }), d = ce({
      xs: !1,
      sm: !1,
      md: !1,
      lg: !1,
      xl: !1,
      xxl: !1
    }), f = (C) => E(() => {
      if (typeof e[C] == "string")
        return e[C];
      if (typeof e[C] != "object")
        return "";
      for (let P = 0; P < $f.length; P++) {
        const $ = $f[P];
        if (!d.value[$]) continue;
        const I = e[C][$];
        if (I !== void 0)
          return I;
      }
      return "";
    }), p = f("align"), v = f("justify"), g = pM();
    Nt(() => {
      s = u.value.subscribe((C) => {
        d.value = C;
        const P = e.gutter || 0;
        (!Array.isArray(P) && typeof P == "object" || Array.isArray(P) && (typeof P[0] == "object" || typeof P[1] == "object")) && (c.value = C);
      });
    }), qt(() => {
      u.value.unsubscribe(s);
    });
    const m = E(() => {
      const C = [void 0, void 0], {
        gutter: P = 0
      } = e;
      return (Array.isArray(P) ? P : [P, void 0]).forEach((I, w) => {
        if (typeof I == "object")
          for (let _ = 0; _ < $f.length; _++) {
            const M = $f[_];
            if (c.value[M] && I[M] !== void 0) {
              C[w] = I[M];
              break;
            }
          }
        else
          C[w] = I;
      }), C;
    });
    cq({
      gutter: m,
      supportFlexGap: g,
      wrap: E(() => e.wrap)
    });
    const x = E(() => Me(r.value, {
      [`${r.value}-no-wrap`]: e.wrap === !1,
      [`${r.value}-${v.value}`]: v.value,
      [`${r.value}-${p.value}`]: p.value,
      [`${r.value}-rtl`]: i.value === "rtl"
    }, o.class, l.value)), S = E(() => {
      const C = m.value, P = {}, $ = C[0] != null && C[0] > 0 ? `${C[0] / -2}px` : void 0, I = C[1] != null && C[1] > 0 ? `${C[1] / -2}px` : void 0;
      return $ && (P.marginLeft = $, P.marginRight = $), g.value ? P.rowGap = `${C[1]}px` : I && (P.marginTop = I, P.marginBottom = I), P;
    });
    return () => {
      var C;
      return a(h("div", Q(Q({}, o), {}, {
        class: x.value,
        style: O(O({}, S.value), o.style)
      }), [(C = n.default) === null || C === void 0 ? void 0 : C.call(n)]));
    };
  }
});
function ms() {
  return ms = Object.assign ? Object.assign.bind() : function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var n = arguments[t];
      for (var o in n)
        Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
    }
    return e;
  }, ms.apply(this, arguments);
}
function yq(e, t) {
  e.prototype = Object.create(t.prototype), e.prototype.constructor = e, wd(e, t);
}
function Cb(e) {
  return Cb = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
    return n.__proto__ || Object.getPrototypeOf(n);
  }, Cb(e);
}
function wd(e, t) {
  return wd = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(o, r) {
    return o.__proto__ = r, o;
  }, wd(e, t);
}
function xq() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
    })), !0;
  } catch {
    return !1;
  }
}
function cp(e, t, n) {
  return xq() ? cp = Reflect.construct.bind() : cp = function(r, i, a) {
    var l = [null];
    l.push.apply(l, i);
    var s = Function.bind.apply(r, l), u = new s();
    return a && wd(u, a.prototype), u;
  }, cp.apply(null, arguments);
}
function wq(e) {
  return Function.toString.call(e).indexOf("[native code]") !== -1;
}
function $b(e) {
  var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
  return $b = function(o) {
    if (o === null || !wq(o)) return o;
    if (typeof o != "function")
      throw new TypeError("Super expression must either be null or a function");
    if (typeof t < "u") {
      if (t.has(o)) return t.get(o);
      t.set(o, r);
    }
    function r() {
      return cp(o, arguments, Cb(this).constructor);
    }
    return r.prototype = Object.create(o.prototype, {
      constructor: {
        value: r,
        enumerable: !1,
        writable: !0,
        configurable: !0
      }
    }), wd(r, o);
  }, $b(e);
}
var Sq = /%[sdj%]/g, vM = function() {
};
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (vM = function(t, n) {
  typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && n.every(function(o) {
    return typeof o == "string";
  }) && console.warn(t, n);
});
function Pb(e) {
  if (!e || !e.length) return null;
  var t = {};
  return e.forEach(function(n) {
    var o = n.field;
    t[o] = t[o] || [], t[o].push(n);
  }), t;
}
function _r(e) {
  for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++)
    n[o - 1] = arguments[o];
  var r = 0, i = n.length;
  if (typeof e == "function")
    return e.apply(null, n);
  if (typeof e == "string") {
    var a = e.replace(Sq, function(l) {
      if (l === "%%")
        return "%";
      if (r >= i)
        return l;
      switch (l) {
        case "%s":
          return String(n[r++]);
        case "%d":
          return Number(n[r++]);
        case "%j":
          try {
            return JSON.stringify(n[r++]);
          } catch {
            return "[Circular]";
          }
          break;
        default:
          return l;
      }
    });
    return a;
  }
  return e;
}
function Cq(e) {
  return e === "string" || e === "url" || e === "hex" || e === "email" || e === "date" || e === "pattern";
}
function No(e, t) {
  return !!(e == null || t === "array" && Array.isArray(e) && !e.length || Cq(t) && typeof e == "string" && !e);
}
function $q(e, t, n) {
  var o = [], r = 0, i = e.length;
  function a(l) {
    o.push.apply(o, l || []), r++, r === i && n(o);
  }
  e.forEach(function(l) {
    t(l, a);
  });
}
function xC(e, t, n) {
  var o = 0, r = e.length;
  function i(a) {
    if (a && a.length) {
      n(a);
      return;
    }
    var l = o;
    o = o + 1, l < r ? t(e[l], i) : n([]);
  }
  i([]);
}
function Pq(e) {
  var t = [];
  return Object.keys(e).forEach(function(n) {
    t.push.apply(t, e[n] || []);
  }), t;
}
var wC = /* @__PURE__ */ (function(e) {
  yq(t, e);
  function t(n, o) {
    var r;
    return r = e.call(this, "Async Validation Error") || this, r.errors = n, r.fields = o, r;
  }
  return t;
})(/* @__PURE__ */ $b(Error));
function Oq(e, t, n, o, r) {
  if (t.first) {
    var i = new Promise(function(f, p) {
      var v = function(x) {
        return o(x), x.length ? p(new wC(x, Pb(x))) : f(r);
      }, g = Pq(e);
      xC(g, n, v);
    });
    return i.catch(function(f) {
      return f;
    }), i;
  }
  var a = t.firstFields === !0 ? Object.keys(e) : t.firstFields || [], l = Object.keys(e), s = l.length, u = 0, c = [], d = new Promise(function(f, p) {
    var v = function(m) {
      if (c.push.apply(c, m), u++, u === s)
        return o(c), c.length ? p(new wC(c, Pb(c))) : f(r);
    };
    l.length || (o(c), f(r)), l.forEach(function(g) {
      var m = e[g];
      a.indexOf(g) !== -1 ? xC(m, n, v) : $q(m, n, v);
    });
  });
  return d.catch(function(f) {
    return f;
  }), d;
}
function kq(e) {
  return !!(e && e.message !== void 0);
}
function Iq(e, t) {
  for (var n = e, o = 0; o < t.length; o++) {
    if (n == null)
      return n;
    n = n[t[o]];
  }
  return n;
}
function SC(e, t) {
  return function(n) {
    var o;
    return e.fullFields ? o = Iq(t, e.fullFields) : o = t[n.field || e.fullField], kq(n) ? (n.field = n.field || e.fullField, n.fieldValue = o, n) : {
      message: typeof n == "function" ? n() : n,
      fieldValue: o,
      field: n.field || e.fullField
    };
  };
}
function CC(e, t) {
  if (t) {
    for (var n in t)
      if (t.hasOwnProperty(n)) {
        var o = t[n];
        typeof o == "object" && typeof e[n] == "object" ? e[n] = ms({}, e[n], o) : e[n] = o;
      }
  }
  return e;
}
var mM = function(t, n, o, r, i, a) {
  t.required && (!o.hasOwnProperty(t.field) || No(n, a || t.type)) && r.push(_r(i.messages.required, t.fullField));
}, _q = function(t, n, o, r, i) {
  (/^\s+$/.test(n) || n === "") && r.push(_r(i.messages.whitespace, t.fullField));
}, Af, Tq = (function() {
  if (Af)
    return Af;
  var e = "[a-fA-F\\d:]", t = function(P) {
    return P && P.includeBoundaries ? "(?:(?<=\\s|^)(?=" + e + ")|(?<=" + e + ")(?=\\s|$))" : "";
  }, n = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", o = "[a-fA-F\\d]{1,4}", r = (`
(?:
(?:` + o + ":){7}(?:" + o + `|:)|                                    // 1:2:3:4:5:6:7::  1:2:3:4:5:6:7:8
(?:` + o + ":){6}(?:" + n + "|:" + o + `|:)|                             // 1:2:3:4:5:6::    1:2:3:4:5:6::8   1:2:3:4:5:6::8  1:2:3:4:5:6::1.2.3.4
(?:` + o + ":){5}(?::" + n + "|(?::" + o + `){1,2}|:)|                   // 1:2:3:4:5::      1:2:3:4:5::7:8   1:2:3:4:5::8    1:2:3:4:5::7:1.2.3.4
(?:` + o + ":){4}(?:(?::" + o + "){0,1}:" + n + "|(?::" + o + `){1,3}|:)| // 1:2:3:4::        1:2:3:4::6:7:8   1:2:3:4::8      1:2:3:4::6:7:1.2.3.4
(?:` + o + ":){3}(?:(?::" + o + "){0,2}:" + n + "|(?::" + o + `){1,4}|:)| // 1:2:3::          1:2:3::5:6:7:8   1:2:3::8        1:2:3::5:6:7:1.2.3.4
(?:` + o + ":){2}(?:(?::" + o + "){0,3}:" + n + "|(?::" + o + `){1,5}|:)| // 1:2::            1:2::4:5:6:7:8   1:2::8          1:2::4:5:6:7:1.2.3.4
(?:` + o + ":){1}(?:(?::" + o + "){0,4}:" + n + "|(?::" + o + `){1,6}|:)| // 1::              1::3:4:5:6:7:8   1::8            1::3:4:5:6:7:1.2.3.4
(?::(?:(?::` + o + "){0,5}:" + n + "|(?::" + o + `){1,7}|:))             // ::2:3:4:5:6:7:8  ::2:3:4:5:6:7:8  ::8             ::1.2.3.4
)(?:%[0-9a-zA-Z]{1,})?                                             // %eth0            %1
`).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), i = new RegExp("(?:^" + n + "$)|(?:^" + r + "$)"), a = new RegExp("^" + n + "$"), l = new RegExp("^" + r + "$"), s = function(P) {
    return P && P.exact ? i : new RegExp("(?:" + t(P) + n + t(P) + ")|(?:" + t(P) + r + t(P) + ")", "g");
  };
  s.v4 = function(C) {
    return C && C.exact ? a : new RegExp("" + t(C) + n + t(C), "g");
  }, s.v6 = function(C) {
    return C && C.exact ? l : new RegExp("" + t(C) + r + t(C), "g");
  };
  var u = "(?:(?:[a-z]+:)?//)", c = "(?:\\S+(?::\\S*)?@)?", d = s.v4().source, f = s.v6().source, p = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", v = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", g = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", m = "(?::\\d{2,5})?", x = '(?:[/?#][^\\s"]*)?', S = "(?:" + u + "|www\\.)" + c + "(?:localhost|" + d + "|" + f + "|" + p + v + g + ")" + m + x;
  return Af = new RegExp("(?:^" + S + "$)", "i"), Af;
}), $C = {
  // http://emailregex.com/
  email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
  // url: new RegExp(
  //   '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$',
  //   'i',
  // ),
  hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
}, jc = {
  integer: function(t) {
    return jc.number(t) && parseInt(t, 10) === t;
  },
  float: function(t) {
    return jc.number(t) && !jc.integer(t);
  },
  array: function(t) {
    return Array.isArray(t);
  },
  regexp: function(t) {
    if (t instanceof RegExp)
      return !0;
    try {
      return !!new RegExp(t);
    } catch {
      return !1;
    }
  },
  date: function(t) {
    return typeof t.getTime == "function" && typeof t.getMonth == "function" && typeof t.getYear == "function" && !isNaN(t.getTime());
  },
  number: function(t) {
    return isNaN(t) ? !1 : typeof t == "number";
  },
  object: function(t) {
    return typeof t == "object" && !jc.array(t);
  },
  method: function(t) {
    return typeof t == "function";
  },
  email: function(t) {
    return typeof t == "string" && t.length <= 320 && !!t.match($C.email);
  },
  url: function(t) {
    return typeof t == "string" && t.length <= 2048 && !!t.match(Tq());
  },
  hex: function(t) {
    return typeof t == "string" && !!t.match($C.hex);
  }
}, Mq = function(t, n, o, r, i) {
  if (t.required && n === void 0) {
    mM(t, n, o, r, i);
    return;
  }
  var a = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], l = t.type;
  a.indexOf(l) > -1 ? jc[l](n) || r.push(_r(i.messages.types[l], t.fullField, t.type)) : l && typeof n !== t.type && r.push(_r(i.messages.types[l], t.fullField, t.type));
}, Eq = function(t, n, o, r, i) {
  var a = typeof t.len == "number", l = typeof t.min == "number", s = typeof t.max == "number", u = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, c = n, d = null, f = typeof n == "number", p = typeof n == "string", v = Array.isArray(n);
  if (f ? d = "number" : p ? d = "string" : v && (d = "array"), !d)
    return !1;
  v && (c = n.length), p && (c = n.replace(u, "_").length), a ? c !== t.len && r.push(_r(i.messages[d].len, t.fullField, t.len)) : l && !s && c < t.min ? r.push(_r(i.messages[d].min, t.fullField, t.min)) : s && !l && c > t.max ? r.push(_r(i.messages[d].max, t.fullField, t.max)) : l && s && (c < t.min || c > t.max) && r.push(_r(i.messages[d].range, t.fullField, t.min, t.max));
}, su = "enum", Dq = function(t, n, o, r, i) {
  t[su] = Array.isArray(t[su]) ? t[su] : [], t[su].indexOf(n) === -1 && r.push(_r(i.messages[su], t.fullField, t[su].join(", ")));
}, Aq = function(t, n, o, r, i) {
  if (t.pattern) {
    if (t.pattern instanceof RegExp)
      t.pattern.lastIndex = 0, t.pattern.test(n) || r.push(_r(i.messages.pattern.mismatch, t.fullField, n, t.pattern));
    else if (typeof t.pattern == "string") {
      var a = new RegExp(t.pattern);
      a.test(n) || r.push(_r(i.messages.pattern.mismatch, t.fullField, n, t.pattern));
    }
  }
}, bn = {
  required: mM,
  whitespace: _q,
  type: Mq,
  range: Eq,
  enum: Dq,
  pattern: Aq
}, Nq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (No(n, "string") && !t.required)
      return o();
    bn.required(t, n, r, a, i, "string"), No(n, "string") || (bn.type(t, n, r, a, i), bn.range(t, n, r, a, i), bn.pattern(t, n, r, a, i), t.whitespace === !0 && bn.whitespace(t, n, r, a, i));
  }
  o(a);
}, Rq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (No(n) && !t.required)
      return o();
    bn.required(t, n, r, a, i), n !== void 0 && bn.type(t, n, r, a, i);
  }
  o(a);
}, zq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (n === "" && (n = void 0), No(n) && !t.required)
      return o();
    bn.required(t, n, r, a, i), n !== void 0 && (bn.type(t, n, r, a, i), bn.range(t, n, r, a, i));
  }
  o(a);
}, Fq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (No(n) && !t.required)
      return o();
    bn.required(t, n, r, a, i), n !== void 0 && bn.type(t, n, r, a, i);
  }
  o(a);
}, Bq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (No(n) && !t.required)
      return o();
    bn.required(t, n, r, a, i), No(n) || bn.type(t, n, r, a, i);
  }
  o(a);
}, Lq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (No(n) && !t.required)
      return o();
    bn.required(t, n, r, a, i), n !== void 0 && (bn.type(t, n, r, a, i), bn.range(t, n, r, a, i));
  }
  o(a);
}, Hq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (No(n) && !t.required)
      return o();
    bn.required(t, n, r, a, i), n !== void 0 && (bn.type(t, n, r, a, i), bn.range(t, n, r, a, i));
  }
  o(a);
}, Vq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (n == null && !t.required)
      return o();
    bn.required(t, n, r, a, i, "array"), n != null && (bn.type(t, n, r, a, i), bn.range(t, n, r, a, i));
  }
  o(a);
}, jq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (No(n) && !t.required)
      return o();
    bn.required(t, n, r, a, i), n !== void 0 && bn.type(t, n, r, a, i);
  }
  o(a);
}, Wq = "enum", Kq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (No(n) && !t.required)
      return o();
    bn.required(t, n, r, a, i), n !== void 0 && bn[Wq](t, n, r, a, i);
  }
  o(a);
}, qq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (No(n, "string") && !t.required)
      return o();
    bn.required(t, n, r, a, i), No(n, "string") || bn.pattern(t, n, r, a, i);
  }
  o(a);
}, Yq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (No(n, "date") && !t.required)
      return o();
    if (bn.required(t, n, r, a, i), !No(n, "date")) {
      var s;
      n instanceof Date ? s = n : s = new Date(n), bn.type(t, s, r, a, i), s && bn.range(t, s.getTime(), r, a, i);
    }
  }
  o(a);
}, Gq = function(t, n, o, r, i) {
  var a = [], l = Array.isArray(n) ? "array" : typeof n;
  bn.required(t, n, r, a, i, l), o(a);
}, yv = function(t, n, o, r, i) {
  var a = t.type, l = [], s = t.required || !t.required && r.hasOwnProperty(t.field);
  if (s) {
    if (No(n, a) && !t.required)
      return o();
    bn.required(t, n, r, l, i, a), No(n, a) || bn.type(t, n, r, l, i);
  }
  o(l);
}, Uq = function(t, n, o, r, i) {
  var a = [], l = t.required || !t.required && r.hasOwnProperty(t.field);
  if (l) {
    if (No(n) && !t.required)
      return o();
    bn.required(t, n, r, a, i);
  }
  o(a);
}, Jc = {
  string: Nq,
  method: Rq,
  number: zq,
  boolean: Fq,
  regexp: Bq,
  integer: Lq,
  float: Hq,
  array: Vq,
  object: jq,
  enum: Kq,
  pattern: qq,
  date: Yq,
  url: yv,
  hex: yv,
  email: yv,
  required: Gq,
  any: Uq
};
function Ob() {
  return {
    default: "Validation error on field %s",
    required: "%s is required",
    enum: "%s must be one of %s",
    whitespace: "%s cannot be empty",
    date: {
      format: "%s date %s is invalid for format %s",
      parse: "%s date could not be parsed, %s is invalid ",
      invalid: "%s date %s is invalid"
    },
    types: {
      string: "%s is not a %s",
      method: "%s is not a %s (function)",
      array: "%s is not an %s",
      object: "%s is not an %s",
      number: "%s is not a %s",
      date: "%s is not a %s",
      boolean: "%s is not a %s",
      integer: "%s is not an %s",
      float: "%s is not a %s",
      regexp: "%s is not a valid %s",
      email: "%s is not a valid %s",
      url: "%s is not a valid %s",
      hex: "%s is not a valid %s"
    },
    string: {
      len: "%s must be exactly %s characters",
      min: "%s must be at least %s characters",
      max: "%s cannot be longer than %s characters",
      range: "%s must be between %s and %s characters"
    },
    number: {
      len: "%s must equal %s",
      min: "%s cannot be less than %s",
      max: "%s cannot be greater than %s",
      range: "%s must be between %s and %s"
    },
    array: {
      len: "%s must be exactly %s in length",
      min: "%s cannot be less than %s in length",
      max: "%s cannot be greater than %s in length",
      range: "%s must be between %s and %s in length"
    },
    pattern: {
      mismatch: "%s value %s does not match pattern %s"
    },
    clone: function() {
      var t = JSON.parse(JSON.stringify(this));
      return t.clone = this.clone, t;
    }
  };
}
var kb = Ob(), Kd = /* @__PURE__ */ (function() {
  function e(n) {
    this.rules = null, this._messages = kb, this.define(n);
  }
  var t = e.prototype;
  return t.define = function(o) {
    var r = this;
    if (!o)
      throw new Error("Cannot configure a schema with no rules");
    if (typeof o != "object" || Array.isArray(o))
      throw new Error("Rules must be an object");
    this.rules = {}, Object.keys(o).forEach(function(i) {
      var a = o[i];
      r.rules[i] = Array.isArray(a) ? a : [a];
    });
  }, t.messages = function(o) {
    return o && (this._messages = CC(Ob(), o)), this._messages;
  }, t.validate = function(o, r, i) {
    var a = this;
    r === void 0 && (r = {}), i === void 0 && (i = function() {
    });
    var l = o, s = r, u = i;
    if (typeof s == "function" && (u = s, s = {}), !this.rules || Object.keys(this.rules).length === 0)
      return u && u(null, l), Promise.resolve(l);
    function c(g) {
      var m = [], x = {};
      function S(P) {
        if (Array.isArray(P)) {
          var $;
          m = ($ = m).concat.apply($, P);
        } else
          m.push(P);
      }
      for (var C = 0; C < g.length; C++)
        S(g[C]);
      m.length ? (x = Pb(m), u(m, x)) : u(null, l);
    }
    if (s.messages) {
      var d = this.messages();
      d === kb && (d = Ob()), CC(d, s.messages), s.messages = d;
    } else
      s.messages = this.messages();
    var f = {}, p = s.keys || Object.keys(this.rules);
    p.forEach(function(g) {
      var m = a.rules[g], x = l[g];
      m.forEach(function(S) {
        var C = S;
        typeof C.transform == "function" && (l === o && (l = ms({}, l)), x = l[g] = C.transform(x)), typeof C == "function" ? C = {
          validator: C
        } : C = ms({}, C), C.validator = a.getValidationMethod(C), C.validator && (C.field = g, C.fullField = C.fullField || g, C.type = a.getType(C), f[g] = f[g] || [], f[g].push({
          rule: C,
          value: x,
          source: l,
          field: g
        }));
      });
    });
    var v = {};
    return Oq(f, s, function(g, m) {
      var x = g.rule, S = (x.type === "object" || x.type === "array") && (typeof x.fields == "object" || typeof x.defaultField == "object");
      S = S && (x.required || !x.required && g.value), x.field = g.field;
      function C(I, w) {
        return ms({}, w, {
          fullField: x.fullField + "." + I,
          fullFields: x.fullFields ? [].concat(x.fullFields, [I]) : [I]
        });
      }
      function P(I) {
        I === void 0 && (I = []);
        var w = Array.isArray(I) ? I : [I];
        !s.suppressWarning && w.length && e.warning("async-validator:", w), w.length && x.message !== void 0 && (w = [].concat(x.message));
        var _ = w.map(SC(x, l));
        if (s.first && _.length)
          return v[x.field] = 1, m(_);
        if (!S)
          m(_);
        else {
          if (x.required && !g.value)
            return x.message !== void 0 ? _ = [].concat(x.message).map(SC(x, l)) : s.error && (_ = [s.error(x, _r(s.messages.required, x.field))]), m(_);
          var M = {};
          x.defaultField && Object.keys(g.value).map(function(H) {
            M[H] = x.defaultField;
          }), M = ms({}, M, g.rule.fields);
          var N = {};
          Object.keys(M).forEach(function(H) {
            var B = M[H], F = Array.isArray(B) ? B : [B];
            N[H] = F.map(C.bind(null, H));
          });
          var A = new e(N);
          A.messages(s.messages), g.rule.options && (g.rule.options.messages = s.messages, g.rule.options.error = s.error), A.validate(g.value, g.rule.options || s, function(H) {
            var B = [];
            _ && _.length && B.push.apply(B, _), H && H.length && B.push.apply(B, H), m(B.length ? B : null);
          });
        }
      }
      var $;
      if (x.asyncValidator)
        $ = x.asyncValidator(x, g.value, P, g.source, s);
      else if (x.validator) {
        try {
          $ = x.validator(x, g.value, P, g.source, s);
        } catch (I) {
          console.error?.(I), s.suppressValidatorError || setTimeout(function() {
            throw I;
          }, 0), P(I.message);
        }
        $ === !0 ? P() : $ === !1 ? P(typeof x.message == "function" ? x.message(x.fullField || x.field) : x.message || (x.fullField || x.field) + " fails") : $ instanceof Array ? P($) : $ instanceof Error && P($.message);
      }
      $ && $.then && $.then(function() {
        return P();
      }, function(I) {
        return P(I);
      });
    }, function(g) {
      c(g);
    }, l);
  }, t.getType = function(o) {
    if (o.type === void 0 && o.pattern instanceof RegExp && (o.type = "pattern"), typeof o.validator != "function" && o.type && !Jc.hasOwnProperty(o.type))
      throw new Error(_r("Unknown rule type %s", o.type));
    return o.type || "string";
  }, t.getValidationMethod = function(o) {
    if (typeof o.validator == "function")
      return o.validator;
    var r = Object.keys(o), i = r.indexOf("message");
    return i !== -1 && r.splice(i, 1), r.length === 1 && r[0] === "required" ? Jc.required : Jc[this.getType(o)] || void 0;
  }, e;
})();
Kd.register = function(t, n) {
  if (typeof n != "function")
    throw new Error("Cannot register a validator by type, validator is not a function");
  Jc[t] = n;
};
Kd.warning = vM;
Kd.messages = kb;
Kd.validators = Jc;
function Tl(e) {
  return e == null ? [] : Array.isArray(e) ? e : [e];
}
function bM(e, t) {
  let n = e;
  for (let o = 0; o < t.length; o += 1) {
    if (n == null)
      return;
    n = n[t[o]];
  }
  return n;
}
function yM(e, t, n, o) {
  if (!t.length)
    return n;
  const [r, ...i] = t;
  let a;
  return !e && typeof r == "number" ? a = [] : Array.isArray(e) ? a = [...e] : a = O({}, e), o && n === void 0 && i.length === 1 ? delete a[r][i[0]] : a[r] = yM(a[r], i, n, o), a;
}
function Xq(e, t, n) {
  let o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  return t.length && o && n === void 0 && !bM(e, t.slice(0, -1)) ? e : yM(e, t, n, o);
}
function Ib(e) {
  return Tl(e);
}
function Qq(e, t) {
  return bM(e, t);
}
function Zq(e, t, n) {
  let o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  return Xq(e, t, n, o);
}
function Jq(e, t) {
  return e && e.some((n) => tY(n, t));
}
function PC(e) {
  return typeof e == "object" && e !== null && Object.getPrototypeOf(e) === Object.prototype;
}
function xM(e, t) {
  const n = Array.isArray(e) ? [...e] : O({}, e);
  return t && Object.keys(t).forEach((o) => {
    const r = n[o], i = t[o], a = PC(r) && PC(i);
    n[o] = a ? xM(r, i || {}) : i;
  }), n;
}
function eY(e) {
  for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++)
    n[o - 1] = arguments[o];
  return n.reduce((r, i) => xM(r, i), e);
}
function OC(e, t) {
  let n = {};
  return t.forEach((o) => {
    const r = Qq(e, o);
    n = Zq(n, o, r);
  }), n;
}
function tY(e, t) {
  return !e || !t || e.length !== t.length ? !1 : e.every((n, o) => t[o] === n);
}
const Cr = "'${name}' is not a valid ${type}", eg = {
  default: "Validation error on field '${name}'",
  required: "'${name}' is required",
  enum: "'${name}' must be one of [${enum}]",
  whitespace: "'${name}' cannot be empty",
  date: {
    format: "'${name}' is invalid for format date",
    parse: "'${name}' could not be parsed as date",
    invalid: "'${name}' is invalid date"
  },
  types: {
    string: Cr,
    method: Cr,
    array: Cr,
    object: Cr,
    number: Cr,
    date: Cr,
    boolean: Cr,
    integer: Cr,
    float: Cr,
    regexp: Cr,
    email: Cr,
    url: Cr,
    hex: Cr
  },
  string: {
    len: "'${name}' must be exactly ${len} characters",
    min: "'${name}' must be at least ${min} characters",
    max: "'${name}' cannot be longer than ${max} characters",
    range: "'${name}' must be between ${min} and ${max} characters"
  },
  number: {
    len: "'${name}' must equal ${len}",
    min: "'${name}' cannot be less than ${min}",
    max: "'${name}' cannot be greater than ${max}",
    range: "'${name}' must be between ${min} and ${max}"
  },
  array: {
    len: "'${name}' must be exactly ${len} in length",
    min: "'${name}' cannot be less than ${min} in length",
    max: "'${name}' cannot be greater than ${max} in length",
    range: "'${name}' must be between ${min} and ${max} in length"
  },
  pattern: {
    mismatch: "'${name}' does not match pattern ${pattern}"
  }
};
var tg = function(e, t, n, o) {
  function r(i) {
    return i instanceof n ? i : new n(function(a) {
      a(i);
    });
  }
  return new (n || (n = Promise))(function(i, a) {
    function l(c) {
      try {
        u(o.next(c));
      } catch (d) {
        a(d);
      }
    }
    function s(c) {
      try {
        u(o.throw(c));
      } catch (d) {
        a(d);
      }
    }
    function u(c) {
      c.done ? i(c.value) : r(c.value).then(l, s);
    }
    u((o = o.apply(e, t || [])).next());
  });
};
const nY = Kd;
function oY(e, t) {
  return e.replace(/\$\{\w+\}/g, (n) => {
    const o = n.slice(2, -1);
    return t[o];
  });
}
function _b(e, t, n, o, r) {
  return tg(this, void 0, void 0, function* () {
    const i = O({}, n);
    delete i.ruleIndex, delete i.trigger;
    let a = null;
    i && i.type === "array" && i.defaultField && (a = i.defaultField, delete i.defaultField);
    const l = new nY({
      [e]: [i]
    }), s = eY({}, eg, o.validateMessages);
    l.messages(s);
    let u = [];
    try {
      yield Promise.resolve(l.validate({
        [e]: t
      }, O({}, o)));
    } catch (f) {
      f.errors ? u = f.errors.map((p, v) => {
        let {
          message: g
        } = p;
        return (
          // Wrap VueNode with `key`
          Ao(g) ? Ml(g, {
            key: `error_${v}`
          }) : g
        );
      }) : (console.error(f), u = [s.default()]);
    }
    if (!u.length && a)
      return (yield Promise.all(t.map((p, v) => _b(`${e}.${v}`, p, a, o, r)))).reduce((p, v) => [...p, ...v], []);
    const c = O(O(O({}, n), {
      name: e,
      enum: (n.enum || []).join(", ")
    }), r);
    return u.map((f) => typeof f == "string" ? oY(f, c) : f);
  });
}
function wM(e, t, n, o, r, i) {
  const a = e.join("."), l = n.map((u, c) => {
    const d = u.validator, f = O(O({}, u), {
      ruleIndex: c
    });
    return d && (f.validator = (p, v, g) => {
      let m = !1;
      const S = d(p, v, function() {
        for (var C = arguments.length, P = new Array(C), $ = 0; $ < C; $++)
          P[$] = arguments[$];
        Promise.resolve().then(() => {
          wn(!m, "Your validator function has already return a promise. `callback` will be ignored."), m || g(...P);
        });
      });
      m = S && typeof S.then == "function" && typeof S.catch == "function", wn(m, "`callback` is deprecated. Please return a promise instead."), m && S.then(() => {
        g();
      }).catch((C) => {
        g(C || " ");
      });
    }), f;
  }).sort((u, c) => {
    let {
      warningOnly: d,
      ruleIndex: f
    } = u, {
      warningOnly: p,
      ruleIndex: v
    } = c;
    return !!d == !!p ? f - v : d ? 1 : -1;
  });
  let s;
  if (r === !0)
    s = new Promise((u, c) => tg(this, void 0, void 0, function* () {
      for (let d = 0; d < l.length; d += 1) {
        const f = l[d], p = yield _b(a, t, f, o, i);
        if (p.length) {
          c([{
            errors: p,
            rule: f
          }]);
          return;
        }
      }
      u([]);
    }));
  else {
    const u = l.map((c) => _b(a, t, c, o, i).then((d) => ({
      errors: d,
      rule: c
    })));
    s = (r ? iY(u) : rY(u)).then((c) => Promise.reject(c));
  }
  return s.catch((u) => u), s;
}
function rY(e) {
  return tg(this, void 0, void 0, function* () {
    return Promise.all(e).then((t) => [].concat(...t));
  });
}
function iY(e) {
  return tg(this, void 0, void 0, function* () {
    let t = 0;
    return new Promise((n) => {
      e.forEach((o) => {
        o.then((r) => {
          r.errors.length && n([r]), t += 1, t === e.length && n([]);
        });
      });
    });
  });
}
const SM = Symbol("formContextKey"), CM = (e) => {
  Ft(SM, e);
}, dx = () => zt(SM, {
  name: E(() => {
  }),
  labelAlign: E(() => "right"),
  vertical: E(() => !1),
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
  addField: (e, t) => {
  },
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
  removeField: (e) => {
  },
  model: E(() => {
  }),
  rules: E(() => {
  }),
  colon: E(() => {
  }),
  labelWrap: E(() => {
  }),
  labelCol: E(() => {
  }),
  requiredMark: E(() => !1),
  validateTrigger: E(() => {
  }),
  onValidate: () => {
  },
  validateMessages: E(() => eg)
}), $M = Symbol("formItemPrefixContextKey"), aY = (e) => {
  Ft($M, e);
}, lY = () => zt($M, {
  prefixCls: E(() => "")
});
function sY(e) {
  return typeof e == "number" ? `${e} ${e} auto` : /^\d+(\.\d+)?(px|em|rem|%)$/.test(e) ? `0 0 ${e}` : e;
}
const uY = () => ({
  span: [String, Number],
  order: [String, Number],
  offset: [String, Number],
  push: [String, Number],
  pull: [String, Number],
  xs: {
    type: [String, Number, Object],
    default: void 0
  },
  sm: {
    type: [String, Number, Object],
    default: void 0
  },
  md: {
    type: [String, Number, Object],
    default: void 0
  },
  lg: {
    type: [String, Number, Object],
    default: void 0
  },
  xl: {
    type: [String, Number, Object],
    default: void 0
  },
  xxl: {
    type: [String, Number, Object],
    default: void 0
  },
  prefixCls: String,
  flex: [String, Number]
}), cY = ["xs", "sm", "md", "lg", "xl", "xxl"], fx = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACol",
  inheritAttrs: !1,
  props: uY(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      gutter: r,
      supportFlexGap: i,
      wrap: a
    } = dq(), {
      prefixCls: l,
      direction: s
    } = _t("col", e), [u, c] = mq(l), d = E(() => {
      const {
        span: p,
        order: v,
        offset: g,
        push: m,
        pull: x
      } = e, S = l.value;
      let C = {};
      return cY.forEach((P) => {
        let $ = {};
        const I = e[P];
        typeof I == "number" ? $.span = I : typeof I == "object" && ($ = I || {}), C = O(O({}, C), {
          [`${S}-${P}-${$.span}`]: $.span !== void 0,
          [`${S}-${P}-order-${$.order}`]: $.order || $.order === 0,
          [`${S}-${P}-offset-${$.offset}`]: $.offset || $.offset === 0,
          [`${S}-${P}-push-${$.push}`]: $.push || $.push === 0,
          [`${S}-${P}-pull-${$.pull}`]: $.pull || $.pull === 0,
          [`${S}-rtl`]: s.value === "rtl"
        });
      }), Me(S, {
        [`${S}-${p}`]: p !== void 0,
        [`${S}-order-${v}`]: v,
        [`${S}-offset-${g}`]: g,
        [`${S}-push-${m}`]: m,
        [`${S}-pull-${x}`]: x
      }, C, o.class, c.value);
    }), f = E(() => {
      const {
        flex: p
      } = e, v = r.value, g = {};
      if (v && v[0] > 0) {
        const m = `${v[0] / 2}px`;
        g.paddingLeft = m, g.paddingRight = m;
      }
      if (v && v[1] > 0 && !i.value) {
        const m = `${v[1] / 2}px`;
        g.paddingTop = m, g.paddingBottom = m;
      }
      return p && (g.flex = sY(p), a.value === !1 && !g.minWidth && (g.minWidth = 0)), g;
    });
    return () => {
      var p;
      return u(h("div", Q(Q({}, o), {}, {
        class: d.value,
        style: [f.value, o.style]
      }), [(p = n.default) === null || p === void 0 ? void 0 : p.call(n)]));
    };
  }
});
var dY = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, name: "question-circle", theme: "outlined" };
function kC(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      fY(e, r, n[r]);
    });
  }
  return e;
}
function fY(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var px = function(t, n) {
  var o = kC({}, t, n.attrs);
  return h(on, kC({}, o, {
    icon: dY
  }), null);
};
px.displayName = "QuestionCircleOutlined";
px.inheritAttrs = !1;
const hx = (e, t) => {
  let {
    slots: n,
    emit: o,
    attrs: r
  } = t;
  var i, a, l, s, u;
  const {
    prefixCls: c,
    htmlFor: d,
    labelCol: f,
    labelAlign: p,
    colon: v,
    required: g,
    requiredMark: m
  } = O(O({}, e), r), [x] = Rl("Form"), S = (i = e.label) !== null && i !== void 0 ? i : (a = n.label) === null || a === void 0 ? void 0 : a.call(n);
  if (!S) return null;
  const {
    vertical: C,
    labelAlign: P,
    labelCol: $,
    labelWrap: I,
    colon: w
  } = dx(), _ = f || $?.value || {}, M = p || P?.value, N = `${c}-item-label`, A = Me(N, M === "left" && `${N}-left`, _.class, {
    [`${N}-wrap`]: !!I.value
  });
  let H = S;
  const B = v === !0 || w?.value !== !1 && v !== !1;
  if (B && !C.value && typeof S == "string" && S.trim() !== "" && (H = S.replace(/[:|：]\s*$/, "")), e.tooltip || n.tooltip) {
    const X = h("span", {
      class: `${c}-item-tooltip`
    }, [h(Lo, {
      title: e.tooltip
    }, {
      default: () => [h(px, null, null)]
    })]);
    H = h(Je, null, [H, n.tooltip ? (l = n.tooltip) === null || l === void 0 ? void 0 : l.call(n, {
      class: `${c}-item-tooltip`
    }) : X]);
  }
  m === "optional" && !g && (H = h(Je, null, [H, h("span", {
    class: `${c}-item-optional`
  }, [((s = x.value) === null || s === void 0 ? void 0 : s.optional) || ((u = Ba.Form) === null || u === void 0 ? void 0 : u.optional)])]));
  const R = Me({
    [`${c}-item-required`]: g,
    [`${c}-item-required-mark-optional`]: m === "optional",
    [`${c}-item-no-colon`]: !B
  });
  return h(fx, Q(Q({}, _), {}, {
    class: A
  }), {
    default: () => [h("label", {
      for: d,
      class: R,
      title: typeof S == "string" ? S : "",
      onClick: (X) => o("click", X)
    }, [H])]
  });
};
hx.displayName = "FormItemLabel";
hx.inheritAttrs = !1;
const pY = (e) => {
  const {
    componentCls: t
  } = e, n = `${t}-show-help`, o = `${t}-show-help-item`;
  return {
    [n]: {
      // Explain holder
      transition: `opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`,
      "&-appear, &-enter": {
        opacity: 0,
        "&-active": {
          opacity: 1
        }
      },
      "&-leave": {
        opacity: 1,
        "&-active": {
          opacity: 0
        }
      },
      // Explain
      [o]: {
        overflow: "hidden",
        transition: `height ${e.motionDurationSlow} ${e.motionEaseInOut},
                     opacity ${e.motionDurationSlow} ${e.motionEaseInOut},
                     transform ${e.motionDurationSlow} ${e.motionEaseInOut} !important`,
        [`&${o}-appear, &${o}-enter`]: {
          transform: "translateY(-5px)",
          opacity: 0,
          "&-active": {
            transform: "translateY(0)",
            opacity: 1
          }
        },
        [`&${o}-leave-active`]: {
          transform: "translateY(-5px)"
        }
      }
    }
  };
}, hY = (e) => ({
  legend: {
    display: "block",
    width: "100%",
    marginBottom: e.marginLG,
    padding: 0,
    color: e.colorTextDescription,
    fontSize: e.fontSizeLG,
    lineHeight: "inherit",
    border: 0,
    borderBottom: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`
  },
  label: {
    fontSize: e.fontSize
  },
  'input[type="search"]': {
    boxSizing: "border-box"
  },
  // Position radios and checkboxes better
  'input[type="radio"], input[type="checkbox"]': {
    lineHeight: "normal"
  },
  'input[type="file"]': {
    display: "block"
  },
  // Make range inputs behave like textual form controls
  'input[type="range"]': {
    display: "block",
    width: "100%"
  },
  // Make multiple select elements height not fixed
  "select[multiple], select[size]": {
    height: "auto"
  },
  // Focus for file, radio, and checkbox
  "input[type='file']:focus,\n  input[type='radio']:focus,\n  input[type='checkbox']:focus": {
    outline: 0,
    boxShadow: `0 0 0 ${e.controlOutlineWidth}px ${e.controlOutline}`
  },
  // Adjust output element
  output: {
    display: "block",
    paddingTop: 15,
    color: e.colorText,
    fontSize: e.fontSize,
    lineHeight: e.lineHeight
  }
}), IC = (e, t) => {
  const {
    formItemCls: n
  } = e;
  return {
    [n]: {
      [`${n}-label > label`]: {
        height: t
      },
      [`${n}-control-input`]: {
        minHeight: t
      }
    }
  };
}, gY = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [e.componentCls]: O(O(O({}, fn(e)), hY(e)), {
      [`${t}-text`]: {
        display: "inline-block",
        paddingInlineEnd: e.paddingSM
      },
      // ================================================================
      // =                             Size                             =
      // ================================================================
      "&-small": O({}, IC(e, e.controlHeightSM)),
      "&-large": O({}, IC(e, e.controlHeightLG))
    })
  };
}, vY = (e) => {
  const {
    formItemCls: t,
    iconCls: n,
    componentCls: o,
    rootPrefixCls: r
  } = e;
  return {
    [t]: O(O({}, fn(e)), {
      marginBottom: e.marginLG,
      verticalAlign: "top",
      "&-with-help": {
        transition: "none"
      },
      [`&-hidden,
        &-hidden.${r}-row`]: {
        // https://github.com/ant-design/ant-design/issues/26141
        display: "none"
      },
      "&-has-warning": {
        [`${t}-split`]: {
          color: e.colorError
        }
      },
      "&-has-error": {
        [`${t}-split`]: {
          color: e.colorWarning
        }
      },
      // ==============================================================
      // =                            Label                           =
      // ==============================================================
      [`${t}-label`]: {
        display: "inline-block",
        flexGrow: 0,
        overflow: "hidden",
        whiteSpace: "nowrap",
        textAlign: "end",
        verticalAlign: "middle",
        "&-left": {
          textAlign: "start"
        },
        "&-wrap": {
          overflow: "unset",
          lineHeight: `${e.lineHeight} - 0.25em`,
          whiteSpace: "unset"
        },
        "> label": {
          position: "relative",
          display: "inline-flex",
          alignItems: "center",
          maxWidth: "100%",
          height: e.controlHeight,
          color: e.colorTextHeading,
          fontSize: e.fontSize,
          [`> ${n}`]: {
            fontSize: e.fontSize,
            verticalAlign: "top"
          },
          // Required mark
          [`&${t}-required:not(${t}-required-mark-optional)::before`]: {
            display: "inline-block",
            marginInlineEnd: e.marginXXS,
            color: e.colorError,
            fontSize: e.fontSize,
            fontFamily: "SimSun, sans-serif",
            lineHeight: 1,
            content: '"*"',
            [`${o}-hide-required-mark &`]: {
              display: "none"
            }
          },
          // Optional mark
          [`${t}-optional`]: {
            display: "inline-block",
            marginInlineStart: e.marginXXS,
            color: e.colorTextDescription,
            [`${o}-hide-required-mark &`]: {
              display: "none"
            }
          },
          // Optional mark
          [`${t}-tooltip`]: {
            color: e.colorTextDescription,
            cursor: "help",
            writingMode: "horizontal-tb",
            marginInlineStart: e.marginXXS
          },
          "&::after": {
            content: '":"',
            position: "relative",
            marginBlock: 0,
            marginInlineStart: e.marginXXS / 2,
            marginInlineEnd: e.marginXS
          },
          [`&${t}-no-colon::after`]: {
            content: '" "'
          }
        }
      },
      // ==============================================================
      // =                            Input                           =
      // ==============================================================
      [`${t}-control`]: {
        display: "flex",
        flexDirection: "column",
        flexGrow: 1,
        [`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]: {
          width: "100%"
        },
        "&-input": {
          position: "relative",
          display: "flex",
          alignItems: "center",
          minHeight: e.controlHeight,
          "&-content": {
            flex: "auto",
            maxWidth: "100%"
          }
        }
      },
      // ==============================================================
      // =                           Explain                          =
      // ==============================================================
      [t]: {
        "&-explain, &-extra": {
          clear: "both",
          color: e.colorTextDescription,
          fontSize: e.fontSize,
          lineHeight: e.lineHeight
        },
        "&-explain-connected": {
          width: "100%"
        },
        "&-extra": {
          minHeight: e.controlHeightSM,
          transition: `color ${e.motionDurationMid} ${e.motionEaseOut}`
          // sync input color transition
        },
        "&-explain": {
          "&-error": {
            color: e.colorError
          },
          "&-warning": {
            color: e.colorWarning
          }
        }
      },
      [`&-with-help ${t}-explain`]: {
        height: "auto",
        opacity: 1
      },
      // ==============================================================
      // =                        Feedback Icon                       =
      // ==============================================================
      [`${t}-feedback-icon`]: {
        fontSize: e.fontSize,
        textAlign: "center",
        visibility: "visible",
        animationName: I0,
        animationDuration: e.motionDurationMid,
        animationTimingFunction: e.motionEaseOutBack,
        pointerEvents: "none",
        "&-success": {
          color: e.colorSuccess
        },
        "&-error": {
          color: e.colorError
        },
        "&-warning": {
          color: e.colorWarning
        },
        "&-validating": {
          color: e.colorPrimary
        }
      }
    })
  };
}, mY = (e) => {
  const {
    componentCls: t,
    formItemCls: n,
    rootPrefixCls: o
  } = e;
  return {
    [`${t}-horizontal`]: {
      [`${n}-label`]: {
        flexGrow: 0
      },
      [`${n}-control`]: {
        flex: "1 1 0",
        // https://github.com/ant-design/ant-design/issues/32777
        // https://github.com/ant-design/ant-design/issues/33773
        minWidth: 0
      },
      // https://github.com/ant-design/ant-design/issues/32980
      [`${n}-label.${o}-col-24 + ${n}-control`]: {
        minWidth: "unset"
      }
    }
  };
}, bY = (e) => {
  const {
    componentCls: t,
    formItemCls: n
  } = e;
  return {
    [`${t}-inline`]: {
      display: "flex",
      flexWrap: "wrap",
      [n]: {
        flex: "none",
        flexWrap: "nowrap",
        marginInlineEnd: e.margin,
        marginBottom: 0,
        "&-with-help": {
          marginBottom: e.marginLG
        },
        [`> ${n}-label,
        > ${n}-control`]: {
          display: "inline-block",
          verticalAlign: "top"
        },
        [`> ${n}-label`]: {
          flex: "none"
        },
        [`${t}-text`]: {
          display: "inline-block"
        },
        [`${n}-has-feedback`]: {
          display: "inline-block"
        }
      }
    }
  };
}, vu = (e) => ({
  margin: 0,
  padding: `0 0 ${e.paddingXS}px`,
  whiteSpace: "initial",
  textAlign: "start",
  "> label": {
    margin: 0,
    "&::after": {
      display: "none"
    }
  }
}), yY = (e) => {
  const {
    componentCls: t,
    formItemCls: n
  } = e;
  return {
    [`${n} ${n}-label`]: vu(e),
    [t]: {
      [n]: {
        flexWrap: "wrap",
        [`${n}-label,
          ${n}-control`]: {
          flex: "0 0 100%",
          maxWidth: "100%"
        }
      }
    }
  };
}, xY = (e) => {
  const {
    componentCls: t,
    formItemCls: n,
    rootPrefixCls: o
  } = e;
  return {
    [`${t}-vertical`]: {
      [n]: {
        "&-row": {
          flexDirection: "column"
        },
        "&-label > label": {
          height: "auto"
        },
        [`${t}-item-control`]: {
          width: "100%"
        }
      }
    },
    [`${t}-vertical ${n}-label,
      .${o}-col-24${n}-label,
      .${o}-col-xl-24${n}-label`]: vu(e),
    [`@media (max-width: ${e.screenXSMax}px)`]: [yY(e), {
      [t]: {
        [`.${o}-col-xs-24${n}-label`]: vu(e)
      }
    }],
    [`@media (max-width: ${e.screenSMMax}px)`]: {
      [t]: {
        [`.${o}-col-sm-24${n}-label`]: vu(e)
      }
    },
    [`@media (max-width: ${e.screenMDMax}px)`]: {
      [t]: {
        [`.${o}-col-md-24${n}-label`]: vu(e)
      }
    },
    [`@media (max-width: ${e.screenLGMax}px)`]: {
      [t]: {
        [`.${o}-col-lg-24${n}-label`]: vu(e)
      }
    }
  };
}, gx = Sn("Form", (e, t) => {
  let {
    rootPrefixCls: n
  } = t;
  const o = Qt(e, {
    formItemCls: `${e.componentCls}-item`,
    rootPrefixCls: n
  });
  return [gY(o), vY(o), pY(o), mY(o), bY(o), xY(o), jh(o), I0];
}), wY = be({
  compatConfig: {
    MODE: 3
  },
  name: "ErrorList",
  inheritAttrs: !1,
  props: ["errors", "help", "onErrorVisibleChanged", "helpStatus", "warnings"],
  setup(e, t) {
    let {
      attrs: n
    } = t;
    const {
      prefixCls: o,
      status: r
    } = lY(), i = E(() => `${o.value}-item-explain`), a = E(() => !!(e.errors && e.errors.length)), l = ce(r.value), [, s] = gx(o);
    return ke([a, r], () => {
      a.value && (l.value = r.value);
    }), () => {
      var u, c;
      const d = Wh(`${o.value}-show-help-item`), f = p0(`${o.value}-show-help-item`, d);
      return f.role = "alert", f.class = [s.value, i.value, n.class, `${o.value}-show-help`], h(Er, Q(Q({}, Ms(`${o.value}-show-help`)), {}, {
        onAfterEnter: () => e.onErrorVisibleChanged(!0),
        onAfterLeave: () => e.onErrorVisibleChanged(!1)
      }), {
        default: () => [ti(h(ay, Q(Q({}, f), {}, {
          tag: "div"
        }), {
          default: () => [(c = e.errors) === null || c === void 0 ? void 0 : c.map((p, v) => h("div", {
            key: v,
            class: l.value ? `${i.value}-${l.value}` : ""
          }, [p]))]
        }), [[Oi, !!(!((u = e.errors) === null || u === void 0) && u.length)]])]
      });
    };
  }
}), SY = be({
  compatConfig: {
    MODE: 3
  },
  slots: Object,
  inheritAttrs: !1,
  props: ["prefixCls", "errors", "hasFeedback", "onDomErrorVisibleChange", "wrapperCol", "help", "extra", "status", "marginBottom", "onErrorVisibleChanged"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = dx(), {
      wrapperCol: r
    } = o, i = O({}, o);
    return delete i.labelCol, delete i.wrapperCol, CM(i), aY({
      prefixCls: E(() => e.prefixCls),
      status: E(() => e.status)
    }), () => {
      var a, l, s;
      const {
        prefixCls: u,
        wrapperCol: c,
        marginBottom: d,
        onErrorVisibleChanged: f,
        help: p = (a = n.help) === null || a === void 0 ? void 0 : a.call(n),
        errors: v = Do((l = n.errors) === null || l === void 0 ? void 0 : l.call(n)),
        // hasFeedback,
        // status,
        extra: g = (s = n.extra) === null || s === void 0 ? void 0 : s.call(n)
      } = e, m = `${u}-item`, x = c || r?.value || {}, S = Me(`${m}-control`, x.class);
      return h(fx, Q(Q({}, x), {}, {
        class: S
      }), {
        default: () => {
          var C;
          return h(Je, null, [h("div", {
            class: `${m}-control-input`
          }, [h("div", {
            class: `${m}-control-input-content`
          }, [(C = n.default) === null || C === void 0 ? void 0 : C.call(n)])]), d !== null || v.length ? h("div", {
            style: {
              display: "flex",
              flexWrap: "nowrap"
            }
          }, [h(wY, {
            errors: v,
            help: p,
            class: `${m}-explain-connected`,
            onErrorVisibleChanged: f
          }, null), !!d && h("div", {
            style: {
              width: 0,
              height: `${d}px`
            }
          }, null)]) : null, g ? h("div", {
            class: `${m}-extra`
          }, [g]) : null]);
        }
      });
    };
  }
});
function CY(e) {
  const t = $e(e.value.slice());
  let n = null;
  return It(() => {
    clearTimeout(n), n = setTimeout(() => {
      t.value = e.value;
    }, e.value.length ? 0 : 10);
  }), t;
}
Dr("success", "warning", "error", "validating", "");
const $Y = {
  success: Fl,
  warning: Bl,
  error: Fr,
  validating: Ti
};
function xv(e, t, n) {
  let o = e;
  const r = t;
  let i = 0;
  try {
    for (let a = r.length; i < a - 1 && !(!o && !n); ++i) {
      const l = r[i];
      if (l in o)
        o = o[l];
      else {
        if (n)
          throw Error("please transfer a valid name path to form item!");
        break;
      }
    }
    if (n && !o)
      throw Error("please transfer a valid name path to form item!");
  } catch {
    console.error("please transfer a valid name path to form item!");
  }
  return {
    o,
    k: r[i],
    v: o ? o[r[i]] : void 0
  };
}
const PY = () => ({
  htmlFor: String,
  prefixCls: String,
  label: fe.any,
  help: fe.any,
  extra: fe.any,
  labelCol: {
    type: Object
  },
  wrapperCol: {
    type: Object
  },
  hasFeedback: {
    type: Boolean,
    default: !1
  },
  colon: {
    type: Boolean,
    default: void 0
  },
  labelAlign: String,
  prop: {
    type: [String, Number, Array]
  },
  name: {
    type: [String, Number, Array]
  },
  rules: [Array, Object],
  autoLink: {
    type: Boolean,
    default: !0
  },
  required: {
    type: Boolean,
    default: void 0
  },
  validateFirst: {
    type: Boolean,
    default: void 0
  },
  validateStatus: fe.oneOf(Dr("", "success", "warning", "error", "validating")),
  validateTrigger: {
    type: [String, Array]
  },
  messageVariables: {
    type: Object
  },
  hidden: Boolean,
  noStyle: Boolean,
  tooltip: String
});
let OY = 0;
const kY = "form_item", IY = be({
  compatConfig: {
    MODE: 3
  },
  name: "AFormItem",
  inheritAttrs: !1,
  __ANT_NEW_FORM_ITEM: !0,
  props: PY(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: r
    } = t;
    wn(e.prop === void 0, "`prop` is deprecated. Please use `name` instead.");
    const i = `form-item-${++OY}`, {
      prefixCls: a
    } = _t("form", e), [l, s] = gx(a), u = $e(), c = dx(), d = E(() => e.name || e.prop), f = $e([]), p = $e(!1), v = $e(), g = E(() => {
      const ie = d.value;
      return Ib(ie);
    }), m = E(() => {
      if (g.value.length) {
        const ie = c.name.value, re = g.value.join("_");
        return ie ? `${ie}_${re}` : `${kY}_${re}`;
      } else
        return;
    }), x = () => {
      const ie = c.model.value;
      if (!(!ie || !d.value))
        return xv(ie, g.value, !0).v;
    }, S = E(() => x()), C = $e(Wf(S.value)), P = E(() => {
      let ie = e.validateTrigger !== void 0 ? e.validateTrigger : c.validateTrigger.value;
      return ie = ie === void 0 ? "change" : ie, Tl(ie);
    }), $ = E(() => {
      let ie = c.rules.value;
      const re = e.rules, te = e.required !== void 0 ? {
        required: !!e.required,
        trigger: P.value
      } : [], ve = xv(ie, g.value);
      ie = ie ? ve.o[ve.k] || ve.v : [];
      const ue = [].concat(re || ie || []);
      return ZE(ue, (pe) => pe.required) ? ue : ue.concat(te);
    }), I = E(() => {
      const ie = $.value;
      let re = !1;
      return ie && ie.length && ie.every((te) => te.required ? (re = !0, !1) : !0), re || e.required;
    }), w = $e();
    It(() => {
      w.value = e.validateStatus;
    });
    const _ = E(() => {
      let ie = {};
      return typeof e.label == "string" ? ie.label = e.label : e.name && (ie.label = String(e.name)), e.messageVariables && (ie = O(O({}, ie), e.messageVariables)), ie;
    }), M = (ie) => {
      if (g.value.length === 0)
        return;
      const {
        validateFirst: re = !1
      } = e, {
        triggerName: te
      } = ie || {};
      let ve = $.value;
      if (te && (ve = ve.filter((pe) => {
        const {
          trigger: ge
        } = pe;
        return !ge && !P.value.length ? !0 : Tl(ge || P.value).includes(te);
      })), !ve.length)
        return Promise.resolve();
      const ue = wM(g.value, S.value, ve, O({
        validateMessages: c.validateMessages.value
      }, ie), re, _.value);
      return w.value = "validating", f.value = [], ue.catch((pe) => pe).then(function() {
        let pe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
        if (w.value === "validating") {
          const ge = pe.filter((_e) => _e && _e.errors.length);
          w.value = ge.length ? "error" : "success", f.value = ge.map((_e) => _e.errors), c.onValidate(d.value, !f.value.length, f.value.length ? dr(f.value[0]) : null);
        }
      }), ue;
    }, N = () => {
      M({
        triggerName: "blur"
      });
    }, A = () => {
      if (p.value) {
        p.value = !1;
        return;
      }
      M({
        triggerName: "change"
      });
    }, H = () => {
      w.value = e.validateStatus, p.value = !1, f.value = [];
    }, B = () => {
      var ie;
      w.value = e.validateStatus, p.value = !0, f.value = [];
      const re = c.model.value || {}, te = S.value, ve = xv(re, g.value, !0);
      Array.isArray(te) ? ve.o[ve.k] = [].concat((ie = C.value) !== null && ie !== void 0 ? ie : []) : ve.o[ve.k] = C.value, Yt(() => {
        p.value = !1;
      });
    }, F = E(() => e.htmlFor === void 0 ? m.value : e.htmlFor), R = () => {
      const ie = F.value;
      if (!ie || !v.value)
        return;
      const re = v.value.$el.querySelector(`[id="${ie}"]`);
      re && re.focus && re.focus();
    };
    r({
      onFieldBlur: N,
      onFieldChange: A,
      clearValidate: H,
      resetField: B
    }), LV({
      id: m,
      onFieldBlur: () => {
        e.autoLink && N();
      },
      onFieldChange: () => {
        e.autoLink && A();
      },
      clearValidate: H
    }, E(() => !!(e.autoLink && c.model.value && d.value)));
    let X = !1;
    ke(d, (ie) => {
      ie ? X || (X = !0, c.addField(i, {
        fieldValue: S,
        fieldId: m,
        fieldName: d,
        resetField: B,
        clearValidate: H,
        namePath: g,
        validateRules: M,
        rules: $
      })) : (X = !1, c.removeField(i));
    }, {
      immediate: !0
    }), qt(() => {
      c.removeField(i);
    });
    const j = CY(f), ee = E(() => e.validateStatus !== void 0 ? e.validateStatus : j.value.length ? "error" : w.value), W = E(() => ({
      [`${a.value}-item`]: !0,
      [s.value]: !0,
      // Status
      [`${a.value}-item-has-feedback`]: ee.value && e.hasFeedback,
      [`${a.value}-item-has-success`]: ee.value === "success",
      [`${a.value}-item-has-warning`]: ee.value === "warning",
      [`${a.value}-item-has-error`]: ee.value === "error",
      [`${a.value}-item-is-validating`]: ee.value === "validating",
      [`${a.value}-item-hidden`]: e.hidden
    })), K = Pn({});
    Nr.useProvide(K), It(() => {
      let ie;
      if (e.hasFeedback) {
        const re = ee.value && $Y[ee.value];
        ie = re ? h("span", {
          class: Me(`${a.value}-item-feedback-icon`, `${a.value}-item-feedback-icon-${ee.value}`)
        }, [h(re, null, null)]) : null;
      }
      O(K, {
        status: ee.value,
        hasFeedback: e.hasFeedback,
        feedbackIcon: ie,
        isFormItemInput: !0
      });
    });
    const q = $e(null), G = $e(!1), ae = () => {
      if (u.value) {
        const ie = getComputedStyle(u.value);
        q.value = parseInt(ie.marginBottom, 10);
      }
    };
    Nt(() => {
      ke(G, () => {
        G.value && ae();
      }, {
        flush: "post",
        immediate: !0
      });
    });
    const le = (ie) => {
      ie || (q.value = null);
    };
    return () => {
      var ie, re;
      if (e.noStyle) return (ie = n.default) === null || ie === void 0 ? void 0 : ie.call(n);
      const te = (re = e.help) !== null && re !== void 0 ? re : n.help ? Do(n.help()) : null, ve = !!(te != null && Array.isArray(te) && te.length || j.value.length);
      return G.value = ve, l(h("div", {
        class: [W.value, ve ? `${a.value}-item-with-help` : "", o.class],
        ref: u
      }, [h(gM, Q(Q({}, o), {}, {
        class: `${a.value}-item-row`,
        key: "row"
      }), {
        default: () => {
          var ue, pe;
          return h(Je, null, [h(hx, Q(Q({}, e), {}, {
            htmlFor: F.value,
            required: I.value,
            requiredMark: c.requiredMark.value,
            prefixCls: a.value,
            onClick: R,
            label: e.label
          }), {
            label: n.label,
            tooltip: n.tooltip
          }), h(SY, Q(Q({}, e), {}, {
            errors: te != null ? Tl(te) : j.value,
            marginBottom: q.value,
            prefixCls: a.value,
            status: ee.value,
            ref: v,
            help: te,
            extra: (ue = e.extra) !== null && ue !== void 0 ? ue : (pe = n.extra) === null || pe === void 0 ? void 0 : pe.call(n),
            onErrorVisibleChanged: le
          }), {
            default: n.default
          })]);
        }
      }), !!q.value && h("div", {
        class: `${a.value}-margin-offset`,
        style: {
          marginBottom: `-${q.value}px`
        }
      }, null)]));
    };
  }
});
function PM(e) {
  let t = !1, n = e.length;
  const o = [];
  return e.length ? new Promise((r, i) => {
    e.forEach((a, l) => {
      a.catch((s) => (t = !0, s)).then((s) => {
        n -= 1, o[l] = s, !(n > 0) && (t && i(o), r(o));
      });
    });
  }) : Promise.resolve([]);
}
function _C(e) {
  let t = !1;
  return e && e.length && e.every((n) => n.required ? (t = !0, !1) : !0), t;
}
function TC(e) {
  return e == null ? [] : Array.isArray(e) ? e : [e];
}
function wv(e, t, n) {
  let o = e;
  t = t.replace(/\[(\w+)\]/g, ".$1"), t = t.replace(/^\./, "");
  const r = t.split(".");
  let i = 0;
  for (let a = r.length; i < a - 1 && !(!o && !n); ++i) {
    const l = r[i];
    if (l in o)
      o = o[l];
    else {
      if (n)
        throw new Error("please transfer a valid name path to validate!");
      break;
    }
  }
  return {
    o,
    k: r[i],
    v: o ? o[r[i]] : null,
    isValid: o && r[i] in o
  };
}
function _Y(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ce({}), n = arguments.length > 2 ? arguments[2] : void 0;
  const o = Wf(T(e)), r = Pn({}), i = $e([]), a = (C) => {
    O(T(e), O(O({}, Wf(o)), C)), Yt(() => {
      Object.keys(r).forEach((P) => {
        r[P] = {
          autoLink: !1,
          required: _C(T(t)[P])
        };
      });
    });
  }, l = function() {
    let C = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], P = arguments.length > 1 ? arguments[1] : void 0;
    return P.length ? C.filter(($) => {
      const I = TC($.trigger || "change");
      return JE(I, P).length;
    }) : C;
  };
  let s = null;
  const u = function(C) {
    let P = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, $ = arguments.length > 2 ? arguments[2] : void 0;
    const I = [], w = {};
    for (let N = 0; N < C.length; N++) {
      const A = C[N], H = wv(T(e), A, $);
      if (!H.isValid) continue;
      w[A] = H.v;
      const B = l(T(t)[A], TC(P && P.trigger));
      B.length && I.push(c(A, H.v, B, P || {}).then(() => ({
        name: A,
        errors: [],
        warnings: []
      })).catch((F) => {
        const R = [], X = [];
        return F.forEach((j) => {
          let {
            rule: {
              warningOnly: ee
            },
            errors: W
          } = j;
          ee ? X.push(...W) : R.push(...W);
        }), R.length ? Promise.reject({
          name: A,
          errors: R,
          warnings: X
        }) : {
          name: A,
          errors: R,
          warnings: X
        };
      }));
    }
    const _ = PM(I);
    s = _;
    const M = _.then(() => s === _ ? Promise.resolve(w) : Promise.reject([])).catch((N) => {
      const A = N.filter((H) => H && H.errors.length);
      return A.length ? Promise.reject({
        values: w,
        errorFields: A,
        outOfDate: s !== _
      }) : Promise.resolve(w);
    });
    return M.catch((N) => N), M;
  }, c = function(C, P, $) {
    let I = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
    const w = wM([C], P, $, O({
      validateMessages: eg
    }, I), !!I.validateFirst);
    return r[C] ? (r[C].validateStatus = "validating", w.catch((_) => _).then(function() {
      let _ = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
      var M;
      if (r[C].validateStatus === "validating") {
        const N = _.filter((A) => A && A.errors.length);
        r[C].validateStatus = N.length ? "error" : "success", r[C].help = N.length ? N.map((A) => A.errors) : null, (M = n?.onValidate) === null || M === void 0 || M.call(n, C, !N.length, N.length ? dr(r[C].help[0]) : null);
      }
    }), w) : w.catch((_) => _);
  }, d = (C, P) => {
    let $ = [], I = !0;
    C ? Array.isArray(C) ? $ = C : $ = [C] : (I = !1, $ = i.value);
    const w = u($, P || {}, I);
    return w.catch((_) => _), w;
  }, f = (C) => {
    let P = [];
    C ? Array.isArray(C) ? P = C : P = [C] : P = i.value, P.forEach(($) => {
      r[$] && O(r[$], {
        validateStatus: "",
        help: null
      });
    });
  }, p = (C) => {
    const P = {
      autoLink: !1
    }, $ = [], I = Array.isArray(C) ? C : [C];
    for (let w = 0; w < I.length; w++) {
      const _ = I[w];
      _?.validateStatus === "error" && (P.validateStatus = "error", _.help && $.push(_.help)), P.required = P.required || _?.required;
    }
    return P.help = $, P;
  };
  let v = o, g = !0;
  const m = (C) => {
    const P = [];
    i.value.forEach(($) => {
      const I = wv(C, $, !1), w = wv(v, $, !1);
      (g && n?.immediate && I.isValid || !sy(I.v, w.v)) && P.push($);
    }), d(P, {
      trigger: "change"
    }), g = !1, v = Wf(dr(C));
  }, x = n?.debounce;
  let S = !0;
  return ke(t, () => {
    i.value = t ? Object.keys(T(t)) : [], !S && n && n.validateOnRuleChange && d(), S = !1;
  }, {
    deep: !0,
    immediate: !0
  }), ke(i, () => {
    const C = {};
    i.value.forEach((P) => {
      C[P] = O({}, r[P], {
        autoLink: !1,
        required: _C(T(t)[P])
      }), delete r[P];
    });
    for (const P in r)
      Object.prototype.hasOwnProperty.call(r, P) && delete r[P];
    O(r, C);
  }, {
    immediate: !0
  }), ke(e, x && x.wait ? XP(m, x.wait, eD(x, ["wait"])) : m, {
    immediate: n && !!n.immediate,
    deep: !0
  }), {
    modelRef: e,
    rulesRef: t,
    initialModel: o,
    validateInfos: r,
    resetFields: a,
    validate: d,
    validateField: c,
    mergeValidateInfo: p,
    clearValidate: f
  };
}
const TY = () => ({
  layout: fe.oneOf(Dr("horizontal", "inline", "vertical")),
  labelCol: Et(),
  wrapperCol: Et(),
  colon: ct(),
  labelAlign: an(),
  labelWrap: ct(),
  prefixCls: String,
  requiredMark: en([String, Boolean]),
  /** @deprecated Will warning in future branch. Pls use `requiredMark` instead. */
  hideRequiredMark: ct(),
  model: fe.object,
  rules: Et(),
  validateMessages: Et(),
  validateOnRuleChange: ct(),
  // 提交失败自动滚动到第一个错误字段
  scrollToFirstError: Ir(),
  onSubmit: et(),
  name: String,
  validateTrigger: en([String, Array]),
  size: an(),
  disabled: ct(),
  onValuesChange: et(),
  onFieldsChange: et(),
  onFinish: et(),
  onFinishFailed: et(),
  onValidate: et()
});
function MY(e, t) {
  return sy(Tl(e), Tl(t));
}
const yl = be({
  compatConfig: {
    MODE: 3
  },
  name: "AForm",
  inheritAttrs: !1,
  props: kn(TY(), {
    layout: "horizontal",
    hideRequiredMark: !1,
    colon: !0
  }),
  Item: IY,
  useForm: _Y,
  // emits: ['finishFailed', 'submit', 'finish', 'validate'],
  setup(e, t) {
    let {
      emit: n,
      slots: o,
      expose: r,
      attrs: i
    } = t;
    const {
      prefixCls: a,
      direction: l,
      form: s,
      size: u,
      disabled: c
    } = _t("form", e), d = E(() => e.requiredMark === "" || e.requiredMark), f = E(() => {
      var j;
      return d.value !== void 0 ? d.value : s && ((j = s.value) === null || j === void 0 ? void 0 : j.requiredMark) !== void 0 ? s.value.requiredMark : !e.hideRequiredMark;
    });
    LI(u), rI(c);
    const p = E(() => {
      var j, ee;
      return (j = e.colon) !== null && j !== void 0 ? j : (ee = s.value) === null || ee === void 0 ? void 0 : ee.colon;
    }), {
      validateMessages: v
    } = y8(), g = E(() => O(O(O({}, eg), v.value), e.validateMessages)), [m, x] = gx(a), S = E(() => Me(a.value, {
      [`${a.value}-${e.layout}`]: !0,
      [`${a.value}-hide-required-mark`]: f.value === !1,
      [`${a.value}-rtl`]: l.value === "rtl",
      [`${a.value}-${u.value}`]: u.value
    }, x.value)), C = ce(), P = {}, $ = (j, ee) => {
      P[j] = ee;
    }, I = (j) => {
      delete P[j];
    }, w = (j) => {
      const ee = !!j, W = ee ? Tl(j).map(Ib) : [];
      return ee ? Object.values(P).filter((K) => W.findIndex((q) => MY(q, K.fieldName.value)) > -1) : Object.values(P);
    }, _ = (j) => {
      if (!e.model) {
        wo(!1, "Form", "model is required for resetFields to work.");
        return;
      }
      w(j).forEach((ee) => {
        ee.resetField();
      });
    }, M = (j) => {
      w(j).forEach((ee) => {
        ee.clearValidate();
      });
    }, N = (j) => {
      const {
        scrollToFirstError: ee
      } = e;
      if (n("finishFailed", j), ee && j.errorFields.length) {
        let W = {};
        typeof ee == "object" && (W = ee), H(j.errorFields[0].name, W);
      }
    }, A = function() {
      return R(...arguments);
    }, H = function(j) {
      let ee = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      const W = w(j ? [j] : void 0);
      if (W.length) {
        const K = W[0].fieldId.value, q = K ? document.getElementById(K) : null;
        q && d6(q, O({
          scrollMode: "if-needed",
          block: "nearest"
        }, ee));
      }
    }, B = function() {
      let j = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
      if (j === !0) {
        const ee = [];
        return Object.values(P).forEach((W) => {
          let {
            namePath: K
          } = W;
          ee.push(K.value);
        }), OC(e.model, ee);
      } else
        return OC(e.model, j);
    }, F = (j, ee) => {
      if (wo(!(j instanceof Function), "Form", "validateFields/validateField/validate not support callback, please use promise instead"), !e.model)
        return wo(!1, "Form", "model is required for validateFields to work."), Promise.reject("Form `model` is required for validateFields to work.");
      const W = !!j, K = W ? Tl(j).map(Ib) : [], q = [];
      Object.values(P).forEach((le) => {
        var ie;
        if (W || K.push(le.namePath.value), !(!((ie = le.rules) === null || ie === void 0) && ie.value.length))
          return;
        const re = le.namePath.value;
        if (!W || Jq(K, re)) {
          const te = le.validateRules(O({
            validateMessages: g.value
          }, ee));
          q.push(te.then(() => ({
            name: re,
            errors: [],
            warnings: []
          })).catch((ve) => {
            const ue = [], pe = [];
            return ve.forEach((ge) => {
              let {
                rule: {
                  warningOnly: _e
                },
                errors: ze
              } = ge;
              _e ? pe.push(...ze) : ue.push(...ze);
            }), ue.length ? Promise.reject({
              name: re,
              errors: ue,
              warnings: pe
            }) : {
              name: re,
              errors: ue,
              warnings: pe
            };
          }));
        }
      });
      const G = PM(q);
      C.value = G;
      const ae = G.then(() => C.value === G ? Promise.resolve(B(K)) : Promise.reject([])).catch((le) => {
        const ie = le.filter((re) => re && re.errors.length);
        return Promise.reject({
          values: B(K),
          errorFields: ie,
          outOfDate: C.value !== G
        });
      });
      return ae.catch((le) => le), ae;
    }, R = function() {
      return F(...arguments);
    }, X = (j) => {
      j.preventDefault(), j.stopPropagation(), n("submit", j), e.model && F().then((W) => {
        n("finish", W);
      }).catch((W) => {
        N(W);
      });
    };
    return r({
      resetFields: _,
      clearValidate: M,
      validateFields: F,
      getFieldsValue: B,
      validate: A,
      scrollToField: H
    }), CM({
      model: E(() => e.model),
      name: E(() => e.name),
      labelAlign: E(() => e.labelAlign),
      labelCol: E(() => e.labelCol),
      labelWrap: E(() => e.labelWrap),
      wrapperCol: E(() => e.wrapperCol),
      vertical: E(() => e.layout === "vertical"),
      colon: p,
      requiredMark: f,
      validateTrigger: E(() => e.validateTrigger),
      rules: E(() => e.rules),
      addField: $,
      removeField: I,
      onValidate: (j, ee, W) => {
        n("validate", j, ee, W);
      },
      validateMessages: g
    }), ke(() => e.rules, () => {
      e.validateOnRuleChange && F();
    }), () => {
      var j;
      return m(h("form", Q(Q({}, i), {}, {
        onSubmit: X,
        class: [S.value, i.class]
      }), [(j = o.default) === null || j === void 0 ? void 0 : j.call(o)]));
    };
  }
});
yl.useInjectFormItemContext = Br;
yl.ItemRest = Jm;
yl.install = function(e) {
  return e.component(yl.name, yl), e.component(yl.Item.name, yl.Item), e.component(Jm.name, Jm), e;
};
const EY = new tn("antCheckboxEffect", {
  "0%": {
    transform: "scale(1)",
    opacity: 0.5
  },
  "100%": {
    transform: "scale(1.6)",
    opacity: 0
  }
}), DY = (e) => {
  const {
    checkboxCls: t
  } = e, n = `${t}-wrapper`;
  return [
    // ===================== Basic =====================
    {
      // Group
      [`${t}-group`]: O(O({}, fn(e)), {
        display: "inline-flex",
        flexWrap: "wrap",
        columnGap: e.marginXS,
        // Group > Grid
        [`> ${e.antCls}-row`]: {
          flex: 1
        }
      }),
      // Wrapper
      [n]: O(O({}, fn(e)), {
        display: "inline-flex",
        alignItems: "baseline",
        cursor: "pointer",
        // Fix checkbox & radio in flex align #30260
        "&:after": {
          display: "inline-block",
          width: 0,
          overflow: "hidden",
          content: "'\\a0'"
        },
        // Checkbox near checkbox
        [`& + ${n}`]: {
          marginInlineStart: 0
        },
        [`&${n}-in-form-item`]: {
          'input[type="checkbox"]': {
            width: 14,
            height: 14
            // FIXME: magic
          }
        }
      }),
      // Wrapper > Checkbox
      [t]: O(O({}, fn(e)), {
        position: "relative",
        whiteSpace: "nowrap",
        lineHeight: 1,
        cursor: "pointer",
        // To make alignment right when `controlHeight` is changed
        // Ref: https://github.com/ant-design/ant-design/issues/41564
        alignSelf: "center",
        // Wrapper > Checkbox > input
        [`${t}-input`]: {
          position: "absolute",
          // Since baseline align will get additional space offset,
          // we need to move input to top to make it align with text.
          // Ref: https://github.com/ant-design/ant-design/issues/38926#issuecomment-1486137799
          inset: 0,
          zIndex: 1,
          cursor: "pointer",
          opacity: 0,
          margin: 0,
          [`&:focus-visible + ${t}-inner`]: O({}, ja(e))
        },
        // Wrapper > Checkbox > inner
        [`${t}-inner`]: {
          boxSizing: "border-box",
          position: "relative",
          top: 0,
          insetInlineStart: 0,
          display: "block",
          width: e.checkboxSize,
          height: e.checkboxSize,
          direction: "ltr",
          backgroundColor: e.colorBgContainer,
          border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
          borderRadius: e.borderRadiusSM,
          borderCollapse: "separate",
          transition: `all ${e.motionDurationSlow}`,
          "&:after": {
            boxSizing: "border-box",
            position: "absolute",
            top: "50%",
            insetInlineStart: "21.5%",
            display: "table",
            width: e.checkboxSize / 14 * 5,
            height: e.checkboxSize / 14 * 8,
            border: `${e.lineWidthBold}px solid ${e.colorWhite}`,
            borderTop: 0,
            borderInlineStart: 0,
            transform: "rotate(45deg) scale(0) translate(-50%,-50%)",
            opacity: 0,
            content: '""',
            transition: `all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`
          }
        },
        // Wrapper > Checkbox + Text
        "& + span": {
          paddingInlineStart: e.paddingXS,
          paddingInlineEnd: e.paddingXS
        }
      })
    },
    // ================= Indeterminate =================
    {
      [t]: {
        "&-indeterminate": {
          // Wrapper > Checkbox > inner
          [`${t}-inner`]: {
            "&:after": {
              top: "50%",
              insetInlineStart: "50%",
              width: e.fontSizeLG / 2,
              height: e.fontSizeLG / 2,
              backgroundColor: e.colorPrimary,
              border: 0,
              transform: "translate(-50%, -50%) scale(1)",
              opacity: 1,
              content: '""'
            }
          }
        }
      }
    },
    // ===================== Hover =====================
    {
      // Wrapper
      [`${n}:hover ${t}:after`]: {
        visibility: "visible"
      },
      // Wrapper & Wrapper > Checkbox
      [`
        ${n}:not(${n}-disabled),
        ${t}:not(${t}-disabled)
      `]: {
        [`&:hover ${t}-inner`]: {
          borderColor: e.colorPrimary
        }
      },
      [`${n}:not(${n}-disabled)`]: {
        [`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]: {
          backgroundColor: e.colorPrimaryHover,
          borderColor: "transparent"
        },
        [`&:hover ${t}-checked:not(${t}-disabled):after`]: {
          borderColor: e.colorPrimaryHover
        }
      }
    },
    // ==================== Checked ====================
    {
      // Wrapper > Checkbox
      [`${t}-checked`]: {
        [`${t}-inner`]: {
          backgroundColor: e.colorPrimary,
          borderColor: e.colorPrimary,
          "&:after": {
            opacity: 1,
            transform: "rotate(45deg) scale(1) translate(-50%,-50%)",
            transition: `all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`
          }
        },
        // Checked Effect
        "&:after": {
          position: "absolute",
          top: 0,
          insetInlineStart: 0,
          width: "100%",
          height: "100%",
          borderRadius: e.borderRadiusSM,
          visibility: "hidden",
          border: `${e.lineWidthBold}px solid ${e.colorPrimary}`,
          animationName: EY,
          animationDuration: e.motionDurationSlow,
          animationTimingFunction: "ease-in-out",
          animationFillMode: "backwards",
          content: '""',
          transition: `all ${e.motionDurationSlow}`
        }
      },
      [`
        ${n}-checked:not(${n}-disabled),
        ${t}-checked:not(${t}-disabled)
      `]: {
        [`&:hover ${t}-inner`]: {
          backgroundColor: e.colorPrimaryHover,
          borderColor: "transparent"
        },
        [`&:hover ${t}:after`]: {
          borderColor: e.colorPrimaryHover
        }
      }
    },
    // ==================== Disable ====================
    {
      // Wrapper
      [`${n}-disabled`]: {
        cursor: "not-allowed"
      },
      // Wrapper > Checkbox
      [`${t}-disabled`]: {
        // Wrapper > Checkbox > input
        [`&, ${t}-input`]: {
          cursor: "not-allowed",
          // Disabled for native input to enable Tooltip event handler
          // ref: https://github.com/ant-design/ant-design/issues/39822#issuecomment-1365075901
          pointerEvents: "none"
        },
        // Wrapper > Checkbox > inner
        [`${t}-inner`]: {
          background: e.colorBgContainerDisabled,
          borderColor: e.colorBorder,
          "&:after": {
            borderColor: e.colorTextDisabled
          }
        },
        "&:after": {
          display: "none"
        },
        "& + span": {
          color: e.colorTextDisabled
        },
        [`&${t}-indeterminate ${t}-inner::after`]: {
          background: e.colorTextDisabled
        }
      }
    }
  ];
};
function OM(e, t) {
  const n = Qt(t, {
    checkboxCls: `.${e}`,
    checkboxSize: t.controlInteractiveSize
  });
  return [DY(n)];
}
const kM = Sn("Checkbox", (e, t) => {
  let {
    prefixCls: n
  } = t;
  return [OM(n, e)];
}), AY = () => ({
  name: String,
  prefixCls: String,
  options: jn([]),
  disabled: Boolean,
  id: String
}), NY = () => O(O({}, AY()), {
  defaultValue: jn(),
  value: jn(),
  onChange: et(),
  "onUpdate:value": et()
}), RY = () => ({
  prefixCls: String,
  defaultChecked: ct(),
  checked: ct(),
  disabled: ct(),
  isGroup: ct(),
  value: fe.any,
  name: String,
  id: String,
  indeterminate: ct(),
  type: an("checkbox"),
  autofocus: ct(),
  onChange: et(),
  "onUpdate:checked": et(),
  onClick: et(),
  skipGroup: ct(!1)
}), zY = () => O(O({}, RY()), {
  indeterminate: ct(!1)
}), IM = Symbol("CheckboxGroupContext");
var MC = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const Eo = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACheckbox",
  inheritAttrs: !1,
  __ANT_CHECKBOX: !0,
  props: zY(),
  // emits: ['change', 'update:checked'],
  setup(e, t) {
    let {
      emit: n,
      attrs: o,
      slots: r,
      expose: i
    } = t;
    const a = Br(), l = Nr.useInject(), {
      prefixCls: s,
      direction: u,
      disabled: c
    } = _t("checkbox", e), d = _i(), [f, p] = kM(s), v = zt(IM, void 0), g = Symbol("checkboxUniId"), m = E(() => v?.disabled.value || c.value);
    It(() => {
      !e.skipGroup && v && v.registerValue(g, e.value);
    }), qt(() => {
      v && v.cancelValue(g);
    }), Nt(() => {
      wo(!!(e.checked !== void 0 || v || e.value === void 0), "Checkbox", "`value` is not validate prop, do you mean `checked`?");
    });
    const x = ($) => {
      const I = $.target.checked;
      n("update:checked", I), n("change", $), a.onFieldChange();
    }, S = ce();
    return i({
      focus: () => {
        var $;
        ($ = S.value) === null || $ === void 0 || $.focus();
      },
      blur: () => {
        var $;
        ($ = S.value) === null || $ === void 0 || $.blur();
      }
    }), () => {
      var $;
      const I = go(($ = r.default) === null || $ === void 0 ? void 0 : $.call(r)), {
        indeterminate: w,
        skipGroup: _,
        id: M = a.id.value
      } = e, N = MC(e, ["indeterminate", "skipGroup", "id"]), {
        onMouseenter: A,
        onMouseleave: H,
        onInput: B,
        class: F,
        style: R
      } = o, X = MC(o, ["onMouseenter", "onMouseleave", "onInput", "class", "style"]), j = O(O(O(O({}, N), {
        id: M,
        prefixCls: s.value
      }), X), {
        disabled: m.value
      });
      v && !_ ? (j.onChange = function() {
        for (var q = arguments.length, G = new Array(q), ae = 0; ae < q; ae++)
          G[ae] = arguments[ae];
        n("change", ...G), v.toggleOption({
          label: I,
          value: e.value
        });
      }, j.name = v.name.value, j.checked = v.mergedValue.value.includes(e.value), j.disabled = m.value || d.value, j.indeterminate = w) : j.onChange = x;
      const ee = Me({
        [`${s.value}-wrapper`]: !0,
        [`${s.value}-rtl`]: u.value === "rtl",
        [`${s.value}-wrapper-checked`]: j.checked,
        [`${s.value}-wrapper-disabled`]: j.disabled,
        [`${s.value}-wrapper-in-form-item`]: l.isFormItemInput
      }, F, p.value), W = Me({
        [`${s.value}-indeterminate`]: w
      }, p.value);
      return f(h("label", {
        class: ee,
        style: R,
        onMouseenter: A,
        onMouseleave: H
      }, [h(RT, Q(Q({
        "aria-checked": w ? "mixed" : void 0
      }, j), {}, {
        class: W,
        ref: S
      }), null), I.length ? h("span", null, [I]) : null]));
    };
  }
}), Tb = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACheckboxGroup",
  inheritAttrs: !1,
  props: NY(),
  // emits: ['change', 'update:value'],
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      emit: r,
      expose: i
    } = t;
    const a = Br(), {
      prefixCls: l,
      direction: s
    } = _t("checkbox", e), u = E(() => `${l.value}-group`), [c, d] = kM(u), f = ce((e.value === void 0 ? e.defaultValue : e.value) || []);
    ke(() => e.value, () => {
      f.value = e.value || [];
    });
    const p = E(() => e.options.map((P) => typeof P == "string" || typeof P == "number" ? {
      label: P,
      value: P
    } : P)), v = ce(Symbol()), g = ce(/* @__PURE__ */ new Map()), m = (P) => {
      g.value.delete(P), v.value = Symbol();
    }, x = (P, $) => {
      g.value.set(P, $), v.value = Symbol();
    }, S = ce(/* @__PURE__ */ new Map());
    return ke(v, () => {
      const P = /* @__PURE__ */ new Map();
      for (const $ of g.value.values())
        P.set($, !0);
      S.value = P;
    }), Ft(IM, {
      cancelValue: m,
      registerValue: x,
      toggleOption: (P) => {
        const $ = f.value.indexOf(P.value), I = [...f.value];
        $ === -1 ? I.push(P.value) : I.splice($, 1), e.value === void 0 && (f.value = I);
        const w = I.filter((_) => S.value.has(_)).sort((_, M) => {
          const N = p.value.findIndex((H) => H.value === _), A = p.value.findIndex((H) => H.value === M);
          return N - A;
        });
        r("update:value", w), r("change", w), a.onFieldChange();
      },
      mergedValue: f,
      name: E(() => e.name),
      disabled: E(() => e.disabled)
    }), i({
      mergedValue: f
    }), () => {
      var P;
      const {
        id: $ = a.id.value
      } = e;
      let I = null;
      return p.value && p.value.length > 0 && (I = p.value.map((w) => {
        var _;
        return h(Eo, {
          prefixCls: l.value,
          key: w.value.toString(),
          disabled: "disabled" in w ? w.disabled : e.disabled,
          indeterminate: w.indeterminate,
          value: w.value,
          checked: f.value.indexOf(w.value) !== -1,
          onChange: w.onChange,
          class: `${u.value}-item`
        }, {
          default: () => [n.label !== void 0 ? (_ = n.label) === null || _ === void 0 ? void 0 : _.call(n, w) : w.label]
        });
      })), c(h("div", Q(Q({}, o), {}, {
        class: [u.value, {
          [`${u.value}-rtl`]: s.value === "rtl"
        }, o.class, d.value],
        id: $
      }), [I || ((P = n.default) === null || P === void 0 ? void 0 : P.call(n))]));
    };
  }
});
Eo.Group = Tb;
Eo.install = function(e) {
  return e.component(Eo.name, Eo), e.component(Tb.name, Tb), e;
};
const FY = ii(fx);
let dp = O({}, Ba.Modal);
function BY(e) {
  e ? dp = O(O({}, dp), e) : dp = O({}, Ba.Modal);
}
function LY() {
  return dp;
}
const Mb = "internalMark", fp = be({
  compatConfig: {
    MODE: 3
  },
  name: "ALocaleProvider",
  props: {
    locale: {
      type: Object
    },
    ANT_MARK__: String
  },
  setup(e, t) {
    let {
      slots: n
    } = t;
    wo(e.ANT_MARK__ === Mb, "LocaleProvider", "`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead");
    const o = Pn({
      antLocale: O(O({}, e.locale), {
        exist: !0
      }),
      ANT_MARK__: Mb
    });
    return Ft("localeData", o), ke(() => e.locale, (r) => {
      BY(r && r.Modal), o.antLocale = O(O({}, r), {
        exist: !0
      });
    }, {
      immediate: !0
    }), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
});
fp.install = function(e) {
  return e.component(fp.name, fp), e;
};
const HY = ii(fp), ng = be({
  name: "Notice",
  inheritAttrs: !1,
  props: ["prefixCls", "duration", "updateMark", "noticeKey", "closeIcon", "closable", "props", "onClick", "onClose", "holder", "visible"],
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t, r, i = !1;
    const a = E(() => e.duration === void 0 ? 4.5 : e.duration), l = () => {
      a.value && !i && (r = setTimeout(() => {
        u();
      }, a.value * 1e3));
    }, s = () => {
      r && (clearTimeout(r), r = null);
    }, u = (d) => {
      d && d.stopPropagation(), s();
      const {
        onClose: f,
        noticeKey: p
      } = e;
      f && f(p);
    }, c = () => {
      s(), l();
    };
    return Nt(() => {
      l();
    }), jo(() => {
      i = !0, s();
    }), ke([a, () => e.updateMark, () => e.visible], (d, f) => {
      let [p, v, g] = d, [m, x, S] = f;
      (p !== m || v !== x || g !== S && S) && c();
    }, {
      flush: "post"
    }), () => {
      var d, f;
      const {
        prefixCls: p,
        closable: v,
        closeIcon: g = (d = o.closeIcon) === null || d === void 0 ? void 0 : d.call(o),
        onClick: m,
        holder: x
      } = e, {
        class: S,
        style: C
      } = n, P = `${p}-notice`, $ = Object.keys(n).reduce((w, _) => ((_.startsWith("data-") || _.startsWith("aria-") || _ === "role") && (w[_] = n[_]), w), {}), I = h("div", Q({
        class: Me(P, S, {
          [`${P}-closable`]: v
        }),
        style: C,
        onMouseenter: s,
        onMouseleave: l,
        onClick: m
      }, $), [h("div", {
        class: `${P}-content`
      }, [(f = o.default) === null || f === void 0 ? void 0 : f.call(o)]), v ? h("a", {
        tabindex: 0,
        onClick: u,
        class: `${P}-close`
      }, [g || h("span", {
        class: `${P}-close-x`
      }, null)]) : null]);
      return x ? h(nh, {
        to: x
      }, {
        default: () => I
      }) : I;
    };
  }
});
var VY = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
let EC = 0;
const jY = Date.now();
function DC() {
  const e = EC;
  return EC += 1, `rcNotification_${jY}_${e}`;
}
const Gp = be({
  name: "Notification",
  inheritAttrs: !1,
  props: ["prefixCls", "transitionName", "animation", "maxCount", "closeIcon", "hashId"],
  setup(e, t) {
    let {
      attrs: n,
      expose: o,
      slots: r
    } = t;
    const i = /* @__PURE__ */ new Map(), a = ce([]), l = E(() => {
      const {
        prefixCls: c,
        animation: d = "fade"
      } = e;
      let f = e.transitionName;
      return !f && d && (f = `${c}-${d}`), p0(f);
    }), s = (c, d) => {
      const f = c.key || DC(), p = O(O({}, c), {
        key: f
      }), {
        maxCount: v
      } = e, g = a.value.map((x) => x.notice.key).indexOf(f), m = a.value.concat();
      g !== -1 ? m.splice(g, 1, {
        notice: p,
        holderCallback: d
      }) : (v && a.value.length >= v && (p.key = m[0].notice.key, p.updateMark = DC(), p.userPassKey = f, m.shift()), m.push({
        notice: p,
        holderCallback: d
      })), a.value = m;
    }, u = (c) => {
      a.value = dr(a.value).filter((d) => {
        let {
          notice: {
            key: f,
            userPassKey: p
          }
        } = d;
        return (p || f) !== c;
      });
    };
    return o({
      add: s,
      remove: u,
      notices: a
    }), () => {
      var c;
      const {
        prefixCls: d,
        closeIcon: f = (c = r.closeIcon) === null || c === void 0 ? void 0 : c.call(r, {
          prefixCls: d
        })
      } = e, p = a.value.map((g, m) => {
        let {
          notice: x,
          holderCallback: S
        } = g;
        const C = m === a.value.length - 1 ? x.updateMark : void 0, {
          key: P,
          userPassKey: $
        } = x, {
          content: I
        } = x, w = O(O(O({
          prefixCls: d,
          closeIcon: typeof f == "function" ? f({
            prefixCls: d
          }) : f
        }, x), x.props), {
          key: P,
          noticeKey: $ || P,
          updateMark: C,
          onClose: (_) => {
            var M;
            u(_), (M = x.onClose) === null || M === void 0 || M.call(x);
          },
          onClick: x.onClick
        });
        return S ? h("div", {
          key: P,
          class: `${d}-hook-holder`,
          ref: (_) => {
            typeof P > "u" || (_ ? (i.set(P, _), S(_, w)) : i.delete(P));
          }
        }, null) : h(ng, Q(Q({}, w), {}, {
          class: Me(w.class, e.hashId)
        }), {
          default: () => [typeof I == "function" ? I({
            prefixCls: d
          }) : I]
        });
      }), v = {
        [d]: 1,
        [n.class]: !!n.class,
        [e.hashId]: !0
      };
      return h("div", {
        class: v,
        style: n.style || {
          top: "65px",
          left: "50%"
        }
      }, [h(ay, Q({
        tag: "div"
      }, l.value), {
        default: () => [p]
      })]);
    };
  }
});
Gp.newInstance = function(t, n) {
  const o = t || {}, {
    name: r = "notification",
    getContainer: i,
    appContext: a,
    prefixCls: l,
    rootPrefixCls: s,
    transitionName: u,
    hasTransitionName: c,
    useStyle: d
  } = o, f = VY(o, ["name", "getContainer", "appContext", "prefixCls", "rootPrefixCls", "transitionName", "hasTransitionName", "useStyle"]), p = document.createElement("div");
  i ? i().appendChild(p) : document.body.appendChild(p);
  const v = be({
    compatConfig: {
      MODE: 3
    },
    name: "NotificationWrapper",
    setup(m, x) {
      let {
        attrs: S
      } = x;
      const C = $e(), P = E(() => qo.getPrefixCls(r, l)), [, $] = d(P);
      return Nt(() => {
        n({
          notice(I) {
            var w;
            (w = C.value) === null || w === void 0 || w.add(I);
          },
          removeNotice(I) {
            var w;
            (w = C.value) === null || w === void 0 || w.remove(I);
          },
          destroy() {
            El(null, p), p.parentNode && p.parentNode.removeChild(p);
          },
          component: C
        });
      }), () => {
        const I = qo, w = I.getRootPrefixCls(s, P.value), _ = c ? u : `${P.value}-${u}`;
        return h(Ps, Q(Q({}, I), {}, {
          prefixCls: w
        }), {
          default: () => [h(Gp, Q(Q({
            ref: C
          }, S), {}, {
            prefixCls: P.value,
            transitionName: _,
            hashId: $.value
          }), null)]
        });
      };
    }
  }), g = h(v, f);
  g.appContext = a || g.appContext, El(g, p);
};
let AC = 0;
const WY = Date.now();
function NC() {
  const e = AC;
  return AC += 1, `rcNotification_${WY}_${e}`;
}
const KY = be({
  name: "HookNotification",
  inheritAttrs: !1,
  props: ["prefixCls", "transitionName", "animation", "maxCount", "closeIcon", "hashId", "remove", "notices", "getStyles", "getClassName", "onAllRemoved", "getContainer"],
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const r = /* @__PURE__ */ new Map(), i = E(() => e.notices), a = E(() => {
      let c = e.transitionName;
      if (!c && e.animation)
        switch (typeof e.animation) {
          case "string":
            c = e.animation;
            break;
          case "function":
            c = e.animation().name;
            break;
          case "object":
            c = e.animation.name;
            break;
          default:
            c = `${e.prefixCls}-fade`;
            break;
        }
      return p0(c);
    }), l = (c) => e.remove(c), s = ce({});
    ke(i, () => {
      const c = {};
      Object.keys(s.value).forEach((d) => {
        c[d] = [];
      }), e.notices.forEach((d) => {
        const {
          placement: f = "topRight"
        } = d.notice;
        f && (c[f] = c[f] || [], c[f].push(d));
      }), s.value = c;
    });
    const u = E(() => Object.keys(s.value));
    return () => {
      var c;
      const {
        prefixCls: d,
        closeIcon: f = (c = o.closeIcon) === null || c === void 0 ? void 0 : c.call(o, {
          prefixCls: d
        })
      } = e, p = u.value.map((v) => {
        var g, m;
        const x = s.value[v], S = (g = e.getClassName) === null || g === void 0 ? void 0 : g.call(e, v), C = (m = e.getStyles) === null || m === void 0 ? void 0 : m.call(e, v), P = x.map((w, _) => {
          let {
            notice: M,
            holderCallback: N
          } = w;
          const A = _ === i.value.length - 1 ? M.updateMark : void 0, {
            key: H,
            userPassKey: B
          } = M, {
            content: F
          } = M, R = O(O(O({
            prefixCls: d,
            closeIcon: typeof f == "function" ? f({
              prefixCls: d
            }) : f
          }, M), M.props), {
            key: H,
            noticeKey: B || H,
            updateMark: A,
            onClose: (X) => {
              var j;
              l(X), (j = M.onClose) === null || j === void 0 || j.call(M);
            },
            onClick: M.onClick
          });
          return N ? h("div", {
            key: H,
            class: `${d}-hook-holder`,
            ref: (X) => {
              typeof H > "u" || (X ? (r.set(H, X), N(X, R)) : r.delete(H));
            }
          }, null) : h(ng, Q(Q({}, R), {}, {
            class: Me(R.class, e.hashId)
          }), {
            default: () => [typeof F == "function" ? F({
              prefixCls: d
            }) : F]
          });
        }), $ = {
          [d]: 1,
          [`${d}-${v}`]: 1,
          [n.class]: !!n.class,
          [e.hashId]: !0,
          [S]: !!S
        };
        function I() {
          var w;
          x.length > 0 || (Reflect.deleteProperty(s.value, v), (w = e.onAllRemoved) === null || w === void 0 || w.call(e));
        }
        return h("div", {
          key: v,
          class: $,
          style: n.style || C || {
            top: "65px",
            left: "50%"
          }
        }, [h(ay, Q(Q({
          tag: "div"
        }, a.value), {}, {
          onAfterLeave: I
        }), {
          default: () => [P]
        })]);
      });
      return h(c_, {
        getContainer: e.getContainer
      }, {
        default: () => [p]
      });
    };
  }
});
var qY = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const YY = () => document.body;
let RC = 0;
function GY() {
  const e = {};
  for (var t = arguments.length, n = new Array(t), o = 0; o < t; o++)
    n[o] = arguments[o];
  return n.forEach((r) => {
    r && Object.keys(r).forEach((i) => {
      const a = r[i];
      a !== void 0 && (e[i] = a);
    });
  }), e;
}
function _M() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  const {
    getContainer: t = YY,
    motion: n,
    prefixCls: o,
    maxCount: r,
    getClassName: i,
    getStyles: a,
    onAllRemoved: l
  } = e, s = qY(e, ["getContainer", "motion", "prefixCls", "maxCount", "getClassName", "getStyles", "onAllRemoved"]), u = $e([]), c = $e(), d = (x, S) => {
    const C = x.key || NC(), P = O(O({}, x), {
      key: C
    }), $ = u.value.map((w) => w.notice.key).indexOf(C), I = u.value.concat();
    $ !== -1 ? I.splice($, 1, {
      notice: P,
      holderCallback: S
    }) : (r && u.value.length >= r && (P.key = I[0].notice.key, P.updateMark = NC(), P.userPassKey = C, I.shift()), I.push({
      notice: P,
      holderCallback: S
    })), u.value = I;
  }, f = (x) => {
    u.value = u.value.filter((S) => {
      let {
        notice: {
          key: C,
          userPassKey: P
        }
      } = S;
      return (P || C) !== x;
    });
  }, p = () => {
    u.value = [];
  }, v = () => h(KY, {
    ref: c,
    prefixCls: o,
    maxCount: r,
    notices: u.value,
    remove: f,
    getClassName: i,
    getStyles: a,
    animation: n,
    hashId: e.hashId,
    onAllRemoved: l,
    getContainer: t
  }, null), g = $e([]), m = {
    open: (x) => {
      const S = GY(s, x);
      (S.key === null || S.key === void 0) && (S.key = `vc-notification-${RC}`, RC += 1), g.value = [...g.value, {
        type: "open",
        config: S
      }];
    },
    close: (x) => {
      g.value = [...g.value, {
        type: "close",
        key: x
      }];
    },
    destroy: () => {
      g.value = [...g.value, {
        type: "destroy"
      }];
    }
  };
  return ke(g, () => {
    g.value.length && (g.value.forEach((x) => {
      switch (x.type) {
        case "open":
          d(x.config);
          break;
        case "close":
          f(x.key);
          break;
        case "destroy":
          p();
          break;
      }
    }), g.value = []);
  }), [m, v];
}
const UY = (e) => {
  const {
    componentCls: t,
    iconCls: n,
    boxShadowSecondary: o,
    colorBgElevated: r,
    colorSuccess: i,
    colorError: a,
    colorWarning: l,
    colorInfo: s,
    fontSizeLG: u,
    motionEaseInOutCirc: c,
    motionDurationSlow: d,
    marginXS: f,
    paddingXS: p,
    borderRadiusLG: v,
    zIndexPopup: g,
    // Custom token
    messageNoticeContentPadding: m
  } = e, x = new tn("MessageMoveIn", {
    "0%": {
      padding: 0,
      transform: "translateY(-100%)",
      opacity: 0
    },
    "100%": {
      padding: p,
      transform: "translateY(0)",
      opacity: 1
    }
  }), S = new tn("MessageMoveOut", {
    "0%": {
      maxHeight: e.height,
      padding: p,
      opacity: 1
    },
    "100%": {
      maxHeight: 0,
      padding: 0,
      opacity: 0
    }
  });
  return [
    // ============================ Holder ============================
    {
      [t]: O(O({}, fn(e)), {
        position: "fixed",
        top: f,
        left: "50%",
        transform: "translateX(-50%)",
        width: "100%",
        pointerEvents: "none",
        zIndex: g,
        [`${t}-move-up`]: {
          animationFillMode: "forwards"
        },
        [`
        ${t}-move-up-appear,
        ${t}-move-up-enter
      `]: {
          animationName: x,
          animationDuration: d,
          animationPlayState: "paused",
          animationTimingFunction: c
        },
        [`
        ${t}-move-up-appear${t}-move-up-appear-active,
        ${t}-move-up-enter${t}-move-up-enter-active
      `]: {
          animationPlayState: "running"
        },
        [`${t}-move-up-leave`]: {
          animationName: S,
          animationDuration: d,
          animationPlayState: "paused",
          animationTimingFunction: c
        },
        [`${t}-move-up-leave${t}-move-up-leave-active`]: {
          animationPlayState: "running"
        },
        "&-rtl": {
          direction: "rtl",
          span: {
            direction: "rtl"
          }
        }
      })
    },
    // ============================ Notice ============================
    {
      [`${t}-notice`]: {
        padding: p,
        textAlign: "center",
        [n]: {
          verticalAlign: "text-bottom",
          marginInlineEnd: f,
          fontSize: u
        },
        [`${t}-notice-content`]: {
          display: "inline-block",
          padding: m,
          background: r,
          borderRadius: v,
          boxShadow: o,
          pointerEvents: "all"
        },
        [`${t}-success ${n}`]: {
          color: i
        },
        [`${t}-error ${n}`]: {
          color: a
        },
        [`${t}-warning ${n}`]: {
          color: l
        },
        [`
        ${t}-info ${n},
        ${t}-loading ${n}`]: {
          color: s
        }
      }
    },
    // ============================= Pure =============================
    {
      [`${t}-notice-pure-panel`]: {
        padding: 0,
        textAlign: "start"
      }
    }
  ];
}, vx = Sn("Message", (e) => {
  const t = Qt(e, {
    messageNoticeContentPadding: `${(e.controlHeightLG - e.fontSize * e.lineHeight) / 2}px ${e.paddingSM}px`
  });
  return [UY(t)];
}, (e) => ({
  height: 150,
  zIndexPopup: e.zIndexPopupBase + 10
})), XY = {
  info: h(Hs, null, null),
  success: h(Fl, null, null),
  error: h(Fr, null, null),
  warning: h(Bl, null, null),
  loading: h(Ti, null, null)
}, TM = be({
  name: "PureContent",
  inheritAttrs: !1,
  props: ["prefixCls", "type", "icon"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    return () => {
      var o;
      return h("div", {
        class: Me(`${e.prefixCls}-custom-content`, `${e.prefixCls}-${e.type}`)
      }, [e.icon || XY[e.type], h("span", null, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)])]);
    };
  }
});
be({
  name: "PurePanel",
  inheritAttrs: !1,
  props: ["prefixCls", "class", "type", "icon", "content"],
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    var r;
    const {
      getPrefixCls: i
    } = Oh(), a = E(() => e.prefixCls || i("message")), [, l] = vx(a);
    return h(ng, Q(Q({}, o), {}, {
      prefixCls: a.value,
      class: Me(l.value, `${a.value}-notice-pure-panel`),
      noticeKey: "pure",
      duration: null
    }), {
      default: () => [h(TM, {
        prefixCls: a.value,
        type: e.type,
        icon: e.icon
      }, {
        default: () => [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)]
      })]
    });
  }
});
var QY = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const ZY = 8, JY = 3, eG = be({
  name: "Holder",
  inheritAttrs: !1,
  props: ["top", "prefixCls", "getContainer", "maxCount", "duration", "rtl", "transitionName", "onAllRemoved", "animation", "staticGetContainer"],
  setup(e, t) {
    let {
      expose: n
    } = t;
    var o, r;
    const {
      getPrefixCls: i,
      getPopupContainer: a
    } = _t("message", e), l = E(() => i("message", e.prefixCls)), [, s] = vx(l), u = () => {
      var g;
      const m = (g = e.top) !== null && g !== void 0 ? g : ZY;
      return {
        left: "50%",
        transform: "translateX(-50%)",
        top: typeof m == "number" ? `${m}px` : m
      };
    }, c = () => Me(s.value, e.rtl ? `${l.value}-rtl` : ""), d = () => {
      var g;
      return l0({
        prefixCls: l.value,
        animation: (g = e.animation) !== null && g !== void 0 ? g : "move-up",
        transitionName: e.transitionName
      });
    }, f = h("span", {
      class: `${l.value}-close-x`
    }, [h(ra, {
      class: `${l.value}-close-icon`
    }, null)]), [p, v] = _M({
      //@ts-ignore
      getStyles: u,
      prefixCls: l.value,
      getClassName: c,
      motion: d,
      closable: !1,
      closeIcon: f,
      duration: (o = e.duration) !== null && o !== void 0 ? o : JY,
      getContainer: (r = e.staticGetContainer) !== null && r !== void 0 ? r : a.value,
      maxCount: e.maxCount,
      onAllRemoved: e.onAllRemoved
    });
    return n(O(O({}, p), {
      prefixCls: l,
      hashId: s
    })), v;
  }
});
let zC = 0;
function tG(e) {
  const t = $e(null), n = Symbol("messageHolderKey"), o = (s) => {
    var u;
    (u = t.value) === null || u === void 0 || u.close(s);
  }, r = (s) => {
    if (!t.value) {
      const $ = () => {
      };
      return $.then = () => {
      }, $;
    }
    const {
      open: u,
      prefixCls: c,
      hashId: d
    } = t.value, f = `${c}-notice`, {
      content: p,
      icon: v,
      type: g,
      key: m,
      class: x,
      onClose: S
    } = s, C = QY(s, ["content", "icon", "type", "key", "class", "onClose"]);
    let P = m;
    return P == null && (zC += 1, P = `antd-message-${zC}`), XB(($) => (u(O(O({}, C), {
      key: P,
      content: () => h(TM, {
        prefixCls: c,
        type: g,
        icon: typeof v == "function" ? v() : v
      }, {
        default: () => [typeof p == "function" ? p() : p]
      }),
      placement: "top",
      // @ts-ignore
      class: Me(g && `${f}-${g}`, d, x),
      onClose: () => {
        S?.(), $();
      }
    })), () => {
      o(P);
    }));
  }, a = {
    open: r,
    destroy: (s) => {
      var u;
      s !== void 0 ? o(s) : (u = t.value) === null || u === void 0 || u.destroy();
    }
  };
  return ["info", "success", "warning", "error", "loading"].forEach((s) => {
    const u = (c, d, f) => {
      let p;
      c && typeof c == "object" && "content" in c ? p = c : p = {
        content: c
      };
      let v, g;
      typeof d == "function" ? g = d : (v = d, g = f);
      const m = O(O({
        onClose: g,
        duration: v
      }, p), {
        type: s
      });
      return r(m);
    };
    a[s] = u;
  }), [a, () => h(eG, Q(Q({
    key: n
  }, e), {}, {
    ref: t
  }), null)];
}
function MM(e) {
  return tG(e);
}
let EM = 3, DM, sr, nG = 1, AM = "", NM = "move-up", RM = !1, zM = () => document.body, FM, BM = !1;
function oG() {
  return nG++;
}
function rG(e) {
  e.top !== void 0 && (DM = e.top, sr = null), e.duration !== void 0 && (EM = e.duration), e.prefixCls !== void 0 && (AM = e.prefixCls), e.getContainer !== void 0 && (zM = e.getContainer, sr = null), e.transitionName !== void 0 && (NM = e.transitionName, sr = null, RM = !0), e.maxCount !== void 0 && (FM = e.maxCount, sr = null), e.rtl !== void 0 && (BM = e.rtl);
}
function iG(e, t) {
  if (sr) {
    t(sr);
    return;
  }
  Gp.newInstance({
    appContext: e.appContext,
    prefixCls: e.prefixCls || AM,
    rootPrefixCls: e.rootPrefixCls,
    transitionName: NM,
    hasTransitionName: RM,
    style: {
      top: DM
    },
    getContainer: zM || e.getPopupContainer,
    maxCount: FM,
    name: "message",
    useStyle: vx
  }, (n) => {
    if (sr) {
      t(sr);
      return;
    }
    sr = n, t(n);
  });
}
const LM = {
  info: Hs,
  success: Fl,
  error: Fr,
  warning: Bl,
  loading: Ti
}, aG = Object.keys(LM);
function lG(e) {
  const t = e.duration !== void 0 ? e.duration : EM, n = e.key || oG(), o = new Promise((i) => {
    const a = () => (typeof e.onClose == "function" && e.onClose(), i(!0));
    iG(e, (l) => {
      l.notice({
        key: n,
        duration: t,
        style: e.style || {},
        class: e.class,
        content: (s) => {
          let {
            prefixCls: u
          } = s;
          const c = LM[e.type], d = c ? h(c, null, null) : "", f = Me(`${u}-custom-content`, {
            [`${u}-${e.type}`]: e.type,
            [`${u}-rtl`]: BM === !0
          });
          return h("div", {
            class: f
          }, [typeof e.icon == "function" ? e.icon() : e.icon || d, h("span", null, [typeof e.content == "function" ? e.content() : e.content])]);
        },
        onClose: a,
        onClick: e.onClick
      });
    });
  }), r = () => {
    sr && sr.removeNotice(n);
  };
  return r.then = (i, a) => o.then(i, a), r.promise = o, r;
}
function sG(e) {
  return Object.prototype.toString.call(e) === "[object Object]" && !!e.content;
}
const Sd = {
  open: lG,
  config: rG,
  destroy(e) {
    if (sr)
      if (e) {
        const {
          removeNotice: t
        } = sr;
        t(e);
      } else {
        const {
          destroy: t
        } = sr;
        t(), sr = null;
      }
  }
};
function uG(e, t) {
  e[t] = (n, o, r) => sG(n) ? e.open(O(O({}, n), {
    type: t
  })) : (typeof o == "function" && (r = o, o = void 0), e.open({
    content: n,
    duration: o,
    type: t,
    onClose: r
  }));
}
aG.forEach((e) => uG(Sd, e));
Sd.warn = Sd.warning;
Sd.useMessage = MM;
const cG = (e) => {
  const {
    componentCls: t,
    width: n,
    notificationMarginEdge: o
  } = e, r = new tn("antNotificationTopFadeIn", {
    "0%": {
      marginTop: "-100%",
      opacity: 0
    },
    "100%": {
      marginTop: 0,
      opacity: 1
    }
  }), i = new tn("antNotificationBottomFadeIn", {
    "0%": {
      marginBottom: "-100%",
      opacity: 0
    },
    "100%": {
      marginBottom: 0,
      opacity: 1
    }
  }), a = new tn("antNotificationLeftFadeIn", {
    "0%": {
      right: {
        _skip_check_: !0,
        value: n
      },
      opacity: 0
    },
    "100%": {
      right: {
        _skip_check_: !0,
        value: 0
      },
      opacity: 1
    }
  });
  return {
    [`&${t}-top, &${t}-bottom`]: {
      marginInline: 0
    },
    [`&${t}-top`]: {
      [`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]: {
        animationName: r
      }
    },
    [`&${t}-bottom`]: {
      [`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]: {
        animationName: i
      }
    },
    [`&${t}-topLeft, &${t}-bottomLeft`]: {
      marginInlineEnd: 0,
      marginInlineStart: o,
      [`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]: {
        animationName: a
      }
    }
  };
}, dG = (e) => {
  const {
    iconCls: t,
    componentCls: n,
    // .ant-notification
    boxShadowSecondary: o,
    fontSizeLG: r,
    notificationMarginBottom: i,
    borderRadiusLG: a,
    colorSuccess: l,
    colorInfo: s,
    colorWarning: u,
    colorError: c,
    colorTextHeading: d,
    notificationBg: f,
    notificationPadding: p,
    notificationMarginEdge: v,
    motionDurationMid: g,
    motionEaseInOut: m,
    fontSize: x,
    lineHeight: S,
    width: C,
    notificationIconSize: P
  } = e, $ = `${n}-notice`, I = new tn("antNotificationFadeIn", {
    "0%": {
      left: {
        _skip_check_: !0,
        value: C
      },
      opacity: 0
    },
    "100%": {
      left: {
        _skip_check_: !0,
        value: 0
      },
      opacity: 1
    }
  }), w = new tn("antNotificationFadeOut", {
    "0%": {
      maxHeight: e.animationMaxHeight,
      marginBottom: i,
      opacity: 1
    },
    "100%": {
      maxHeight: 0,
      marginBottom: 0,
      paddingTop: 0,
      paddingBottom: 0,
      opacity: 0
    }
  });
  return [
    // ============================ Holder ============================
    {
      [n]: O(O(O(O({}, fn(e)), {
        position: "fixed",
        zIndex: e.zIndexPopup,
        marginInlineEnd: v,
        [`${n}-hook-holder`]: {
          position: "relative"
        },
        [`&${n}-top, &${n}-bottom`]: {
          [`${n}-notice`]: {
            marginInline: "auto auto"
          }
        },
        [`&${n}-topLeft, &${n}-bottomLeft`]: {
          [`${n}-notice`]: {
            marginInlineEnd: "auto",
            marginInlineStart: 0
          }
        },
        //  animation
        [`${n}-fade-enter, ${n}-fade-appear`]: {
          animationDuration: e.motionDurationMid,
          animationTimingFunction: m,
          animationFillMode: "both",
          opacity: 0,
          animationPlayState: "paused"
        },
        [`${n}-fade-leave`]: {
          animationTimingFunction: m,
          animationFillMode: "both",
          animationDuration: g,
          animationPlayState: "paused"
        },
        [`${n}-fade-enter${n}-fade-enter-active, ${n}-fade-appear${n}-fade-appear-active`]: {
          animationName: I,
          animationPlayState: "running"
        },
        [`${n}-fade-leave${n}-fade-leave-active`]: {
          animationName: w,
          animationPlayState: "running"
        }
      }), cG(e)), {
        // RTL
        "&-rtl": {
          direction: "rtl",
          [`${n}-notice-btn`]: {
            float: "left"
          }
        }
      })
    },
    // ============================ Notice ============================
    {
      [$]: {
        position: "relative",
        width: C,
        maxWidth: `calc(100vw - ${v * 2}px)`,
        marginBottom: i,
        marginInlineStart: "auto",
        padding: p,
        overflow: "hidden",
        lineHeight: S,
        wordWrap: "break-word",
        background: f,
        borderRadius: a,
        boxShadow: o,
        [`${n}-close-icon`]: {
          fontSize: x,
          cursor: "pointer"
        },
        [`${$}-message`]: {
          marginBottom: e.marginXS,
          color: d,
          fontSize: r,
          lineHeight: e.lineHeightLG
        },
        [`${$}-description`]: {
          fontSize: x
        },
        [`&${$}-closable ${$}-message`]: {
          paddingInlineEnd: e.paddingLG
        },
        [`${$}-with-icon ${$}-message`]: {
          marginBottom: e.marginXS,
          marginInlineStart: e.marginSM + P,
          fontSize: r
        },
        [`${$}-with-icon ${$}-description`]: {
          marginInlineStart: e.marginSM + P,
          fontSize: x
        },
        // Icon & color style in different selector level
        // https://github.com/ant-design/ant-design/issues/16503
        // https://github.com/ant-design/ant-design/issues/15512
        [`${$}-icon`]: {
          position: "absolute",
          fontSize: P,
          lineHeight: 0,
          // icon-font
          [`&-success${t}`]: {
            color: l
          },
          [`&-info${t}`]: {
            color: s
          },
          [`&-warning${t}`]: {
            color: u
          },
          [`&-error${t}`]: {
            color: c
          }
        },
        [`${$}-close`]: {
          position: "absolute",
          top: e.notificationPaddingVertical,
          insetInlineEnd: e.notificationPaddingHorizontal,
          color: e.colorIcon,
          outline: "none",
          width: e.notificationCloseButtonSize,
          height: e.notificationCloseButtonSize,
          borderRadius: e.borderRadiusSM,
          transition: `background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,
          display: "flex",
          alignItems: "center",
          justifyContent: "center",
          "&:hover": {
            color: e.colorIconHover,
            backgroundColor: e.wireframe ? "transparent" : e.colorFillContent
          }
        },
        [`${$}-btn`]: {
          float: "right",
          marginTop: e.marginSM
        }
      }
    },
    // ============================= Pure =============================
    {
      [`${$}-pure-panel`]: {
        margin: 0
      }
    }
  ];
}, mx = Sn("Notification", (e) => {
  const t = e.paddingMD, n = e.paddingLG, o = Qt(e, {
    // default.less variables
    notificationBg: e.colorBgElevated,
    notificationPaddingVertical: t,
    notificationPaddingHorizontal: n,
    // index.less variables
    notificationPadding: `${e.paddingMD}px ${e.paddingContentHorizontalLG}px`,
    notificationMarginBottom: e.margin,
    notificationMarginEdge: e.marginLG,
    animationMaxHeight: 150,
    notificationIconSize: e.fontSizeLG * e.lineHeightLG,
    notificationCloseButtonSize: e.controlHeightLG * 0.55
  });
  return [dG(o)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase + 50,
  width: 384
}));
function HM(e, t) {
  return t || h("span", {
    class: `${e}-close-x`
  }, [h(ra, {
    class: `${e}-close-icon`
  }, null)]);
}
h(Hs, null, null), h(Fl, null, null), h(Fr, null, null), h(Bl, null, null), h(Ti, null, null);
const fG = {
  success: Fl,
  info: Hs,
  error: Fr,
  warning: Bl
};
function VM(e) {
  let {
    prefixCls: t,
    icon: n,
    type: o,
    message: r,
    description: i,
    btn: a
  } = e, l = null;
  if (n)
    l = h("span", {
      class: `${t}-icon`
    }, [xu(n)]);
  else if (o) {
    const s = fG[o];
    l = h(s, {
      class: `${t}-icon ${t}-icon-${o}`
    }, null);
  }
  return h("div", {
    class: Me({
      [`${t}-with-icon`]: l
    }),
    role: "alert"
  }, [l, h("div", {
    class: `${t}-message`
  }, [r]), h("div", {
    class: `${t}-description`
  }, [i]), a && h("div", {
    class: `${t}-btn`
  }, [a])]);
}
be({
  name: "PurePanel",
  inheritAttrs: !1,
  props: ["prefixCls", "icon", "type", "message", "description", "btn", "closeIcon"],
  setup(e) {
    const {
      getPrefixCls: t
    } = _t("notification", e), n = E(() => e.prefixCls || t("notification")), o = E(() => `${n.value}-notice`), [, r] = mx(n);
    return () => h(ng, Q(Q({}, e), {}, {
      prefixCls: n.value,
      class: Me(r.value, `${o.value}-pure-panel`),
      noticeKey: "pure",
      duration: null,
      closable: e.closable,
      closeIcon: HM(n.value, e.closeIcon)
    }), {
      default: () => [h(VM, {
        prefixCls: o.value,
        icon: e.icon,
        type: e.type,
        message: e.message,
        description: e.description,
        btn: e.btn
      }, null)]
    });
  }
});
function jM(e, t, n) {
  let o;
  switch (t = typeof t == "number" ? `${t}px` : t, n = typeof n == "number" ? `${n}px` : n, e) {
    case "top":
      o = {
        left: "50%",
        transform: "translateX(-50%)",
        right: "auto",
        top: t,
        bottom: "auto"
      };
      break;
    case "topLeft":
      o = {
        left: 0,
        top: t,
        bottom: "auto"
      };
      break;
    case "topRight":
      o = {
        right: 0,
        top: t,
        bottom: "auto"
      };
      break;
    case "bottom":
      o = {
        left: "50%",
        transform: "translateX(-50%)",
        right: "auto",
        top: "auto",
        bottom: n
      };
      break;
    case "bottomLeft":
      o = {
        left: 0,
        top: "auto",
        bottom: n
      };
      break;
    default:
      o = {
        right: 0,
        top: "auto",
        bottom: n
      };
      break;
  }
  return o;
}
function pG(e) {
  return {
    name: `${e}-fade`
  };
}
var hG = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const FC = 24, gG = 4.5, vG = be({
  name: "Holder",
  inheritAttrs: !1,
  props: ["prefixCls", "class", "type", "icon", "content", "onAllRemoved"],
  setup(e, t) {
    let {
      expose: n
    } = t;
    const {
      getPrefixCls: o,
      getPopupContainer: r
    } = _t("notification", e), i = E(() => e.prefixCls || o("notification")), a = (f) => {
      var p, v;
      return jM(f, (p = e.top) !== null && p !== void 0 ? p : FC, (v = e.bottom) !== null && v !== void 0 ? v : FC);
    }, [, l] = mx(i), s = () => Me(l.value, {
      [`${i.value}-rtl`]: e.rtl
    }), u = () => pG(i.value), [c, d] = _M({
      prefixCls: i.value,
      getStyles: a,
      getClassName: s,
      motion: u,
      closable: !0,
      closeIcon: HM(i.value),
      duration: gG,
      getContainer: () => {
        var f, p;
        return ((f = e.getPopupContainer) === null || f === void 0 ? void 0 : f.call(e)) || ((p = r.value) === null || p === void 0 ? void 0 : p.call(r)) || document.body;
      },
      maxCount: e.maxCount,
      hashId: l.value,
      onAllRemoved: e.onAllRemoved
    });
    return n(O(O({}, c), {
      prefixCls: i.value,
      hashId: l
    })), d;
  }
});
function mG(e) {
  const t = $e(null), n = Symbol("notificationHolderKey"), o = (l) => {
    if (!t.value)
      return;
    const {
      open: s,
      prefixCls: u,
      hashId: c
    } = t.value, d = `${u}-notice`, {
      message: f,
      description: p,
      icon: v,
      type: g,
      btn: m,
      class: x
    } = l, S = hG(l, ["message", "description", "icon", "type", "btn", "class"]);
    return s(O(O({
      placement: "topRight"
    }, S), {
      content: () => h(VM, {
        prefixCls: d,
        icon: typeof v == "function" ? v() : v,
        type: g,
        message: typeof f == "function" ? f() : f,
        description: typeof p == "function" ? p() : p,
        btn: typeof m == "function" ? m() : m
      }, null),
      // @ts-ignore
      class: Me(g && `${d}-${g}`, c, x)
    }));
  }, i = {
    open: o,
    destroy: (l) => {
      var s, u;
      l !== void 0 ? (s = t.value) === null || s === void 0 || s.close(l) : (u = t.value) === null || u === void 0 || u.destroy();
    }
  };
  return ["success", "info", "warning", "error"].forEach((l) => {
    i[l] = (s) => o(O(O({}, s), {
      type: l
    }));
  }), [i, () => h(vG, Q(Q({
    key: n
  }, e), {}, {
    ref: t
  }), null)];
}
function WM(e) {
  return mG(e);
}
const ps = {};
let KM = 4.5, qM = "24px", YM = "24px", Eb = "", GM = "topRight", UM = () => document.body, XM = null, Db = !1, QM;
function bG(e) {
  const {
    duration: t,
    placement: n,
    bottom: o,
    top: r,
    getContainer: i,
    closeIcon: a,
    prefixCls: l
  } = e;
  l !== void 0 && (Eb = l), t !== void 0 && (KM = t), n !== void 0 && (GM = n), o !== void 0 && (YM = typeof o == "number" ? `${o}px` : o), r !== void 0 && (qM = typeof r == "number" ? `${r}px` : r), i !== void 0 && (UM = i), a !== void 0 && (XM = a), e.rtl !== void 0 && (Db = e.rtl), e.maxCount !== void 0 && (QM = e.maxCount);
}
function yG(e, t) {
  let {
    prefixCls: n,
    placement: o = GM,
    getContainer: r = UM,
    top: i,
    bottom: a,
    closeIcon: l = XM,
    appContext: s
  } = e;
  const {
    getPrefixCls: u
  } = MG(), c = u("notification", n || Eb), d = `${c}-${o}-${Db}`, f = ps[d];
  if (f) {
    Promise.resolve(f).then((v) => {
      t(v);
    });
    return;
  }
  const p = Me(`${c}-${o}`, {
    [`${c}-rtl`]: Db === !0
  });
  Gp.newInstance({
    name: "notification",
    prefixCls: n || Eb,
    useStyle: mx,
    class: p,
    style: jM(o, i ?? qM, a ?? YM),
    appContext: s,
    getContainer: r,
    closeIcon: (v) => {
      let {
        prefixCls: g
      } = v;
      return h("span", {
        class: `${g}-close-x`
      }, [xu(l, {}, h(ra, {
        class: `${g}-close-icon`
      }, null))]);
    },
    maxCount: QM,
    hasTransitionName: !0
  }, (v) => {
    ps[d] = v, t(v);
  });
}
const xG = {
  success: T0,
  info: E0,
  error: D0,
  warning: M0
};
function wG(e) {
  const {
    icon: t,
    type: n,
    description: o,
    message: r,
    btn: i
  } = e, a = e.duration === void 0 ? KM : e.duration;
  yG(e, (l) => {
    l.notice({
      content: (s) => {
        let {
          prefixCls: u
        } = s;
        const c = `${u}-notice`;
        let d = null;
        if (t)
          d = () => h("span", {
            class: `${c}-icon`
          }, [xu(t)]);
        else if (n) {
          const f = xG[n];
          d = () => h(f, {
            class: `${c}-icon ${c}-icon-${n}`
          }, null);
        }
        return h("div", {
          class: d ? `${c}-with-icon` : ""
        }, [d && d(), h("div", {
          class: `${c}-message`
        }, [!o && d ? h("span", {
          class: `${c}-message-single-line-auto-margin`
        }, null) : null, xu(r)]), h("div", {
          class: `${c}-description`
        }, [xu(o)]), i ? h("span", {
          class: `${c}-btn`
        }, [xu(i)]) : null]);
      },
      duration: a,
      closable: !0,
      onClose: e.onClose,
      onClick: e.onClick,
      key: e.key,
      style: e.style || {},
      class: e.class
    });
  });
}
const ec = {
  open: wG,
  close(e) {
    Object.keys(ps).forEach((t) => Promise.resolve(ps[t]).then((n) => {
      n.removeNotice(e);
    }));
  },
  config: bG,
  destroy() {
    Object.keys(ps).forEach((e) => {
      Promise.resolve(ps[e]).then((t) => {
        t.destroy();
      }), delete ps[e];
    });
  }
}, SG = ["success", "info", "warning", "error"];
SG.forEach((e) => {
  ec[e] = (t) => ec.open(O(O({}, t), {
    type: e
  }));
});
ec.warn = ec.warning;
ec.useNotification = WM;
const CG = `-ant-${Date.now()}-${Math.random()}`;
function $G(e, t) {
  const n = {}, o = (a, l) => {
    let s = a.clone();
    return s = l?.(s) || s, s.toRgbString();
  }, r = (a, l) => {
    const s = new _n(a), u = La(s.toRgbString());
    n[`${l}-color`] = o(s), n[`${l}-color-disabled`] = u[1], n[`${l}-color-hover`] = u[4], n[`${l}-color-active`] = u[6], n[`${l}-color-outline`] = s.clone().setAlpha(0.2).toRgbString(), n[`${l}-color-deprecated-bg`] = u[0], n[`${l}-color-deprecated-border`] = u[2];
  };
  if (t.primaryColor) {
    r(t.primaryColor, "primary");
    const a = new _n(t.primaryColor), l = La(a.toRgbString());
    l.forEach((u, c) => {
      n[`primary-${c + 1}`] = u;
    }), n["primary-color-deprecated-l-35"] = o(a, (u) => u.lighten(35)), n["primary-color-deprecated-l-20"] = o(a, (u) => u.lighten(20)), n["primary-color-deprecated-t-20"] = o(a, (u) => u.tint(20)), n["primary-color-deprecated-t-50"] = o(a, (u) => u.tint(50)), n["primary-color-deprecated-f-12"] = o(a, (u) => u.setAlpha(u.getAlpha() * 0.12));
    const s = new _n(l[0]);
    n["primary-color-active-deprecated-f-30"] = o(s, (u) => u.setAlpha(u.getAlpha() * 0.3)), n["primary-color-active-deprecated-d-02"] = o(s, (u) => u.darken(2));
  }
  return t.successColor && r(t.successColor, "success"), t.warningColor && r(t.warningColor, "warning"), t.errorColor && r(t.errorColor, "error"), t.infoColor && r(t.infoColor, "info"), `
  :root {
    ${Object.keys(n).map((a) => `--${e}-${a}: ${n[a]};`).join(`
`)}
  }
  `.trim();
}
function PG(e, t) {
  const n = $G(e, t);
  xr() ? hd(n, `${CG}-dynamic-theme`) : wo(!1, "ConfigProvider", "SSR do not support dynamic theme with css variables.");
}
const OG = (e) => {
  const [t, n] = dc();
  return Rm(E(() => ({
    theme: t.value,
    token: n.value,
    hashId: "",
    path: ["ant-design-icons", e.value]
  })), () => [{
    [`.${e.value}`]: O(O({}, cc()), {
      [`.${e.value} .${e.value}-icon`]: {
        display: "block"
      }
    })
  }]);
};
function kG(e, t) {
  const n = E(() => e?.value || {}), o = E(() => n.value.inherit === !1 || !t?.value ? t0 : t.value);
  return E(() => {
    if (!e?.value)
      return t?.value;
    const i = O({}, o.value.components);
    return Object.keys(e.value.components || {}).forEach((a) => {
      i[a] = O(O({}, i[a]), e.value.components[a]);
    }), O(O(O({}, o.value), n.value), {
      token: O(O({}, o.value.token), n.value.token),
      components: i
    });
  });
}
var IG = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const _G = "ant";
function Au() {
  return qo.prefixCls || _G;
}
function ZM() {
  return qo.iconPrefixCls || Gy;
}
const bx = Pn({}), qo = Pn({});
It(() => {
  O(qo, bx), qo.prefixCls = Au(), qo.iconPrefixCls = ZM(), qo.getPrefixCls = (e, t) => t || (e ? `${qo.prefixCls}-${e}` : qo.prefixCls), qo.getRootPrefixCls = () => qo.prefixCls ? qo.prefixCls : Au();
});
let Sv;
const TG = (e) => {
  Sv && Sv(), Sv = It(() => {
    O(bx, Pn(e)), O(qo, Pn(e));
  }), e.theme && PG(Au(), e.theme);
}, MG = () => ({
  getPrefixCls: (e, t) => t || (e ? `${Au()}-${e}` : Au()),
  getIconPrefixCls: ZM,
  getRootPrefixCls: () => qo.prefixCls ? qo.prefixCls : Au()
}), Ps = be({
  compatConfig: {
    MODE: 3
  },
  name: "AConfigProvider",
  inheritAttrs: !1,
  props: x8(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = Oh(), r = (R, X) => {
      const {
        prefixCls: j = "ant"
      } = e;
      if (X) return X;
      const ee = j || o.getPrefixCls("");
      return R ? `${ee}-${R}` : ee;
    }, i = E(() => e.iconPrefixCls || o.iconPrefixCls.value || Gy), a = E(() => i.value !== o.iconPrefixCls.value), l = E(() => {
      var R;
      return e.csp || ((R = o.csp) === null || R === void 0 ? void 0 : R.value);
    }), s = OG(i), u = kG(E(() => e.theme), E(() => {
      var R;
      return (R = o.theme) === null || R === void 0 ? void 0 : R.value;
    })), c = (R) => (e.renderEmpty || n.renderEmpty || o.renderEmpty || s6)(R), d = E(() => {
      var R, X;
      return (R = e.autoInsertSpaceInButton) !== null && R !== void 0 ? R : (X = o.autoInsertSpaceInButton) === null || X === void 0 ? void 0 : X.value;
    }), f = E(() => {
      var R;
      return e.locale || ((R = o.locale) === null || R === void 0 ? void 0 : R.value);
    });
    ke(f, () => {
      bx.locale = f.value;
    }, {
      immediate: !0
    });
    const p = E(() => {
      var R;
      return e.direction || ((R = o.direction) === null || R === void 0 ? void 0 : R.value);
    }), v = E(() => {
      var R, X;
      return (R = e.space) !== null && R !== void 0 ? R : (X = o.space) === null || X === void 0 ? void 0 : X.value;
    }), g = E(() => {
      var R, X;
      return (R = e.virtual) !== null && R !== void 0 ? R : (X = o.virtual) === null || X === void 0 ? void 0 : X.value;
    }), m = E(() => {
      var R, X;
      return (R = e.dropdownMatchSelectWidth) !== null && R !== void 0 ? R : (X = o.dropdownMatchSelectWidth) === null || X === void 0 ? void 0 : X.value;
    }), x = E(() => {
      var R;
      return e.getTargetContainer !== void 0 ? e.getTargetContainer : (R = o.getTargetContainer) === null || R === void 0 ? void 0 : R.value;
    }), S = E(() => {
      var R;
      return e.getPopupContainer !== void 0 ? e.getPopupContainer : (R = o.getPopupContainer) === null || R === void 0 ? void 0 : R.value;
    }), C = E(() => {
      var R;
      return e.pageHeader !== void 0 ? e.pageHeader : (R = o.pageHeader) === null || R === void 0 ? void 0 : R.value;
    }), P = E(() => {
      var R;
      return e.input !== void 0 ? e.input : (R = o.input) === null || R === void 0 ? void 0 : R.value;
    }), $ = E(() => {
      var R;
      return e.pagination !== void 0 ? e.pagination : (R = o.pagination) === null || R === void 0 ? void 0 : R.value;
    }), I = E(() => {
      var R;
      return e.form !== void 0 ? e.form : (R = o.form) === null || R === void 0 ? void 0 : R.value;
    }), w = E(() => {
      var R;
      return e.select !== void 0 ? e.select : (R = o.select) === null || R === void 0 ? void 0 : R.value;
    }), _ = E(() => e.componentSize), M = E(() => e.componentDisabled), N = E(() => {
      var R, X;
      return (R = e.wave) !== null && R !== void 0 ? R : (X = o.wave) === null || X === void 0 ? void 0 : X.value;
    }), A = {
      csp: l,
      autoInsertSpaceInButton: d,
      locale: f,
      direction: p,
      space: v,
      virtual: g,
      dropdownMatchSelectWidth: m,
      getPrefixCls: r,
      iconPrefixCls: i,
      theme: E(() => {
        var R, X;
        return (R = u.value) !== null && R !== void 0 ? R : (X = o.theme) === null || X === void 0 ? void 0 : X.value;
      }),
      renderEmpty: c,
      getTargetContainer: x,
      getPopupContainer: S,
      pageHeader: C,
      input: P,
      pagination: $,
      form: I,
      select: w,
      componentSize: _,
      componentDisabled: M,
      transformCellText: E(() => e.transformCellText),
      wave: N
    }, H = E(() => {
      const R = u.value || {}, {
        algorithm: X,
        token: j
      } = R, ee = IG(R, ["algorithm", "token"]), W = X && (!Array.isArray(X) || X.length > 0) ? yI(X) : void 0;
      return O(O({}, ee), {
        theme: W,
        token: O(O({}, Mh), j)
      });
    }), B = E(() => {
      var R, X;
      let j = {};
      return f.value && (j = ((R = f.value.Form) === null || R === void 0 ? void 0 : R.defaultValidateMessages) || ((X = Ba.Form) === null || X === void 0 ? void 0 : X.defaultValidateMessages) || {}), e.form && e.form.validateMessages && (j = O(O({}, j), e.form.validateMessages)), j;
    });
    w8(A), b8({
      validateMessages: B
    }), LI(_), rI(M);
    const F = (R) => {
      var X, j;
      let ee = a.value ? s((X = n.default) === null || X === void 0 ? void 0 : X.call(n)) : (j = n.default) === null || j === void 0 ? void 0 : j.call(n);
      if (e.theme) {
        const W = /* @__PURE__ */ (function() {
          return ee;
        })();
        ee = h(o6, {
          value: H.value
        }, {
          default: () => [W]
        });
      }
      return h(HY, {
        locale: f.value || R,
        ANT_MARK__: Mb
      }, {
        default: () => [ee]
      });
    };
    return It(() => {
      p.value && (Sd.config({
        rtl: p.value === "rtl"
      }), ec.config({
        rtl: p.value === "rtl"
      }));
    }), () => h(lI, {
      children: (R, X, j) => F(j)
    }, null);
  }
});
Ps.config = TG;
Ps.install = function(e) {
  e.component(Ps.name, Ps);
};
const EG = (e, t) => {
  let {
    attrs: n,
    slots: o
  } = t;
  return h(Lt, Q(Q({
    size: "small",
    type: "primary"
  }, e), n), o);
}, Nf = (e, t, n) => {
  const o = qB(n);
  return {
    [`${e.componentCls}-${t}`]: {
      color: e[`color${n}`],
      background: e[`color${o}Bg`],
      borderColor: e[`color${o}Border`],
      [`&${e.componentCls}-borderless`]: {
        borderColor: "transparent"
      }
    }
  };
}, DG = (e) => AI(e, (t, n) => {
  let {
    textColor: o,
    lightBorderColor: r,
    lightColor: i,
    darkColor: a
  } = n;
  return {
    [`${e.componentCls}-${t}`]: {
      color: o,
      background: i,
      borderColor: r,
      // Inverse color
      "&-inverse": {
        color: e.colorTextLightSolid,
        background: a,
        borderColor: a
      },
      [`&${e.componentCls}-borderless`]: {
        borderColor: "transparent"
      }
    }
  };
}), AG = (e) => {
  const {
    paddingXXS: t,
    lineWidth: n,
    tagPaddingHorizontal: o,
    componentCls: r
  } = e, i = o - n, a = t - n;
  return {
    // Result
    [r]: O(O({}, fn(e)), {
      display: "inline-block",
      height: "auto",
      marginInlineEnd: e.marginXS,
      paddingInline: i,
      fontSize: e.tagFontSize,
      lineHeight: `${e.tagLineHeight}px`,
      whiteSpace: "nowrap",
      background: e.tagDefaultBg,
      border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
      borderRadius: e.borderRadiusSM,
      opacity: 1,
      transition: `all ${e.motionDurationMid}`,
      textAlign: "start",
      // RTL
      [`&${r}-rtl`]: {
        direction: "rtl"
      },
      "&, a, a:hover": {
        color: e.tagDefaultColor
      },
      [`${r}-close-icon`]: {
        marginInlineStart: a,
        color: e.colorTextDescription,
        fontSize: e.tagIconSize,
        cursor: "pointer",
        transition: `all ${e.motionDurationMid}`,
        "&:hover": {
          color: e.colorTextHeading
        }
      },
      [`&${r}-has-color`]: {
        borderColor: "transparent",
        [`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]: {
          color: e.colorTextLightSolid
        }
      },
      "&-checkable": {
        backgroundColor: "transparent",
        borderColor: "transparent",
        cursor: "pointer",
        [`&:not(${r}-checkable-checked):hover`]: {
          color: e.colorPrimary,
          backgroundColor: e.colorFillSecondary
        },
        "&:active, &-checked": {
          color: e.colorTextLightSolid
        },
        "&-checked": {
          backgroundColor: e.colorPrimary,
          "&:hover": {
            backgroundColor: e.colorPrimaryHover
          }
        },
        "&:active": {
          backgroundColor: e.colorPrimaryActive
        }
      },
      "&-hidden": {
        display: "none"
      },
      // To ensure that a space will be placed between character and `Icon`.
      [`> ${e.iconCls} + span, > span + ${e.iconCls}`]: {
        marginInlineStart: i
      }
    }),
    [`${r}-borderless`]: {
      borderColor: "transparent",
      background: e.tagBorderlessBg
    }
  };
}, JM = Sn("Tag", (e) => {
  const {
    fontSize: t,
    lineHeight: n,
    lineWidth: o,
    fontSizeIcon: r
  } = e, i = Math.round(t * n), a = e.fontSizeSM, l = i - o * 2, s = e.colorFillAlter, u = e.colorText, c = Qt(e, {
    tagFontSize: a,
    tagLineHeight: l,
    tagDefaultBg: s,
    tagDefaultColor: u,
    tagIconSize: r - 2 * o,
    tagPaddingHorizontal: 8,
    tagBorderlessBg: e.colorFillTertiary
  });
  return [AG(c), DG(c), Nf(c, "success", "Success"), Nf(c, "processing", "Info"), Nf(c, "error", "Error"), Nf(c, "warning", "Warning")];
}), NG = () => ({
  prefixCls: String,
  checked: {
    type: Boolean,
    default: void 0
  },
  onChange: {
    type: Function
  },
  onClick: {
    type: Function
  },
  "onUpdate:checked": Function
}), Ab = be({
  compatConfig: {
    MODE: 3
  },
  name: "ACheckableTag",
  inheritAttrs: !1,
  props: NG(),
  // emits: ['update:checked', 'change', 'click'],
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: r
    } = t;
    const {
      prefixCls: i
    } = _t("tag", e), [a, l] = JM(i), s = (c) => {
      const {
        checked: d
      } = e;
      o("update:checked", !d), o("change", !d), o("click", c);
    }, u = E(() => Me(i.value, l.value, {
      [`${i.value}-checkable`]: !0,
      [`${i.value}-checkable-checked`]: e.checked
    }));
    return () => {
      var c;
      return a(h("span", Q(Q({}, r), {}, {
        class: [u.value, r.class],
        onClick: s
      }), [(c = n.default) === null || c === void 0 ? void 0 : c.call(n)]));
    };
  }
}), RG = () => ({
  prefixCls: String,
  color: {
    type: String
  },
  closable: {
    type: Boolean,
    default: !1
  },
  closeIcon: fe.any,
  /** @deprecated `visible` will be removed in next major version. */
  visible: {
    type: Boolean,
    default: void 0
  },
  onClose: {
    type: Function
  },
  onClick: Wu(),
  "onUpdate:visible": Function,
  icon: fe.any,
  bordered: {
    type: Boolean,
    default: !0
  }
}), Pi = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATag",
  inheritAttrs: !1,
  props: RG(),
  // emits: ['update:visible', 'close'],
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      emit: o,
      attrs: r
    } = t;
    const {
      prefixCls: i,
      direction: a
    } = _t("tag", e), [l, s] = JM(i), u = $e(!0);
    process.env.NODE_ENV !== "production" && wo(e.visible === void 0, "Tag", '`visible` is deprecated, please use `<Tag v-show="visible" />` instead.'), It(() => {
      e.visible !== void 0 && (u.value = e.visible);
    });
    const c = (v) => {
      v.stopPropagation(), o("update:visible", !1), o("close", v), !v.defaultPrevented && e.visible === void 0 && (u.value = !1);
    }, d = E(() => L_(e.color) || tW(e.color)), f = E(() => Me(i.value, s.value, {
      [`${i.value}-${e.color}`]: d.value,
      [`${i.value}-has-color`]: e.color && !d.value,
      [`${i.value}-hidden`]: !u.value,
      [`${i.value}-rtl`]: a.value === "rtl",
      [`${i.value}-borderless`]: !e.bordered
    })), p = (v) => {
      o("click", v);
    };
    return () => {
      var v, g, m;
      const {
        icon: x = (v = n.icon) === null || v === void 0 ? void 0 : v.call(n),
        color: S,
        closeIcon: C = (g = n.closeIcon) === null || g === void 0 ? void 0 : g.call(n),
        closable: P = !1
      } = e, $ = () => P ? C ? h("span", {
        class: `${i.value}-close-icon`,
        onClick: c
      }, [C]) : h(ra, {
        class: `${i.value}-close-icon`,
        onClick: c
      }, null) : null, I = {
        backgroundColor: S && !d.value ? S : void 0
      }, w = x || null, _ = (m = n.default) === null || m === void 0 ? void 0 : m.call(n), M = w ? h(Je, null, [w, h("span", null, [_])]) : _, N = e.onClick !== void 0, A = h("span", Q(Q({}, r), {}, {
        onClick: p,
        class: [f.value, r.class],
        style: [I, r.style]
      }), [M, $()]);
      return l(N ? h(A0, null, {
        default: () => [A]
      }) : A);
    };
  }
});
Pi.CheckableTag = Ab;
Pi.install = function(e) {
  return e.component(Pi.name, Pi), e.component(Ab.name, Ab), e;
};
function zG(e, t) {
  let {
    slots: n,
    attrs: o
  } = t;
  return h(Pi, Q(Q({
    color: "blue"
  }, e), o), n);
}
var FG = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z" } }] }, name: "calendar", theme: "outlined" };
function BC(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      BG(e, r, n[r]);
    });
  }
  return e;
}
function BG(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var og = function(t, n) {
  var o = BC({}, t, n.attrs);
  return h(on, BC({}, o, {
    icon: FG
  }), null);
};
og.displayName = "CalendarOutlined";
og.inheritAttrs = !1;
var LG = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z" } }] }, name: "clock-circle", theme: "outlined" };
function LC(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      HG(e, r, n[r]);
    });
  }
  return e;
}
function HG(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var rg = function(t, n) {
  var o = LC({}, t, n.attrs);
  return h(on, LC({}, o, {
    icon: LG
  }), null);
};
rg.displayName = "ClockCircleOutlined";
rg.inheritAttrs = !1;
function VG(e, t, n) {
  return n !== void 0 ? n : t === "year" && e.lang.yearPlaceholder ? e.lang.yearPlaceholder : t === "quarter" && e.lang.quarterPlaceholder ? e.lang.quarterPlaceholder : t === "month" && e.lang.monthPlaceholder ? e.lang.monthPlaceholder : t === "week" && e.lang.weekPlaceholder ? e.lang.weekPlaceholder : t === "time" && e.timePickerLocale.placeholder ? e.timePickerLocale.placeholder : e.lang.placeholder;
}
function jG(e, t, n) {
  return n !== void 0 ? n : t === "year" && e.lang.yearPlaceholder ? e.lang.rangeYearPlaceholder : t === "month" && e.lang.monthPlaceholder ? e.lang.rangeMonthPlaceholder : t === "week" && e.lang.weekPlaceholder ? e.lang.rangeWeekPlaceholder : t === "time" && e.timePickerLocale.placeholder ? e.timePickerLocale.rangePlaceholder : e.lang.rangePlaceholder;
}
function e2(e, t) {
  const n = {
    adjustX: 1,
    adjustY: 1
  };
  switch (t) {
    case "bottomLeft":
      return {
        points: ["tl", "bl"],
        offset: [0, 4],
        overflow: n
      };
    case "bottomRight":
      return {
        points: ["tr", "br"],
        offset: [0, 4],
        overflow: n
      };
    case "topLeft":
      return {
        points: ["bl", "tl"],
        offset: [0, -4],
        overflow: n
      };
    case "topRight":
      return {
        points: ["br", "tr"],
        offset: [0, -4],
        overflow: n
      };
    default:
      return {
        points: e === "rtl" ? ["tr", "br"] : ["tl", "bl"],
        offset: [0, 4],
        overflow: n
      };
  }
}
function t2() {
  return {
    id: String,
    /**
     * @deprecated `dropdownClassName` is deprecated which will be removed in next major
     *   version.Please use `popupClassName` instead.
     */
    dropdownClassName: String,
    popupClassName: String,
    popupStyle: Et(),
    transitionName: String,
    placeholder: String,
    allowClear: ct(),
    autofocus: ct(),
    disabled: ct(),
    tabindex: Number,
    open: ct(),
    defaultOpen: ct(),
    /** Make input readOnly to avoid popup keyboard in mobile */
    inputReadOnly: ct(),
    format: en([String, Function, Array]),
    // Value
    // format:  string | CustomFormat<DateType> | (string | CustomFormat<DateType>)[];
    // Render
    // suffixIcon?: VueNode;
    // clearIcon?: VueNode;
    // prevIcon?: VueNode;
    // nextIcon?: VueNode;
    // superPrevIcon?: VueNode;
    // superNextIcon?: VueNode;
    getPopupContainer: et(),
    panelRender: et(),
    // // Events
    onChange: et(),
    "onUpdate:value": et(),
    onOk: et(),
    onOpenChange: et(),
    "onUpdate:open": et(),
    onFocus: et(),
    onBlur: et(),
    onMousedown: et(),
    onMouseup: et(),
    onMouseenter: et(),
    onMouseleave: et(),
    onClick: et(),
    onContextmenu: et(),
    onKeydown: et(),
    // WAI-ARIA
    role: String,
    name: String,
    autocomplete: String,
    direction: an(),
    showToday: ct(),
    showTime: en([Boolean, Object]),
    locale: Et(),
    size: an(),
    bordered: ct(),
    dateRender: et(),
    disabledDate: et(),
    mode: an(),
    picker: an(),
    valueFormat: String,
    placement: an(),
    status: an(),
    /** @deprecated Please use `disabledTime` instead. */
    disabledHours: et(),
    /** @deprecated Please use `disabledTime` instead. */
    disabledMinutes: et(),
    /** @deprecated Please use `disabledTime` instead. */
    disabledSeconds: et()
  };
}
function WG() {
  return {
    defaultPickerValue: en([Object, String]),
    defaultValue: en([Object, String]),
    value: en([Object, String]),
    presets: jn(),
    disabledTime: et(),
    renderExtraFooter: et(),
    showNow: ct(),
    monthCellRender: et(),
    // deprecated  Please use `monthCellRender"` instead.',
    monthCellContentRender: et()
  };
}
function KG() {
  return {
    allowEmpty: jn(),
    dateRender: et(),
    defaultPickerValue: jn(),
    defaultValue: jn(),
    value: jn(),
    presets: jn(),
    disabledTime: et(),
    disabled: en([Boolean, Array]),
    renderExtraFooter: et(),
    separator: {
      type: String
    },
    showTime: en([Boolean, Object]),
    ranges: Et(),
    placeholder: jn(),
    mode: jn(),
    onChange: et(),
    "onUpdate:value": et(),
    onCalendarChange: et(),
    onPanelChange: et(),
    onOk: et()
  };
}
var qG = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function YG(e, t) {
  function n(u, c) {
    const d = O(O(O({}, t2()), WG()), t);
    return be({
      compatConfig: {
        MODE: 3
      },
      name: c,
      inheritAttrs: !1,
      props: d,
      slots: Object,
      setup(f, p) {
        let {
          slots: v,
          expose: g,
          attrs: m,
          emit: x
        } = p;
        const S = f, C = Br(), P = Nr.useInject();
        process.env.NODE_ENV !== "production" && (dn(u !== "quarter", c || "DatePicker", `DatePicker.${c} is legacy usage. Please use DatePicker[picker='${u}'] directly.`), dn(!S.dropdownClassName, c || "DatePicker", "`dropdownClassName` is deprecated. Please use `popupClassName` instead."), dn(!(S.monthCellContentRender || v.monthCellContentRender), c || "DatePicker", '`monthCellContentRender` is deprecated. Please use `monthCellRender"` instead.'), dn(!m.getCalendarContainer, c || "DatePicker", '`getCalendarContainer` is deprecated. Please use `getPopupContainer"` instead.'));
        const {
          prefixCls: $,
          direction: I,
          getPopupContainer: w,
          size: _,
          rootPrefixCls: M,
          disabled: N
        } = _t("picker", S), {
          compactSize: A,
          compactItemClassnames: H
        } = fc($, I), B = E(() => A.value || _.value), [F, R] = qT($), X = ce();
        g({
          focus: () => {
            var ve;
            (ve = X.value) === null || ve === void 0 || ve.focus();
          },
          blur: () => {
            var ve;
            (ve = X.value) === null || ve === void 0 || ve.blur();
          }
        });
        const j = (ve) => S.valueFormat ? e.toString(ve, S.valueFormat) : ve, ee = (ve, ue) => {
          const pe = j(ve);
          x("update:value", pe), x("change", pe, ue), C.onFieldChange();
        }, W = (ve) => {
          x("update:open", ve), x("openChange", ve);
        }, K = (ve) => {
          x("focus", ve);
        }, q = (ve) => {
          x("blur", ve), C.onFieldBlur();
        }, G = (ve, ue) => {
          const pe = j(ve);
          x("panelChange", pe, ue);
        }, ae = (ve) => {
          const ue = j(ve);
          x("ok", ue);
        }, [le] = Rl("DatePicker", Mp), ie = E(() => S.value ? S.valueFormat ? e.toDate(S.value, S.valueFormat) : S.value : S.value === "" ? void 0 : S.value), re = E(() => S.defaultValue ? S.valueFormat ? e.toDate(S.defaultValue, S.valueFormat) : S.defaultValue : S.defaultValue === "" ? void 0 : S.defaultValue), te = E(() => S.defaultPickerValue ? S.valueFormat ? e.toDate(S.defaultPickerValue, S.valueFormat) : S.defaultPickerValue : S.defaultPickerValue === "" ? void 0 : S.defaultPickerValue);
        return () => {
          var ve, ue, pe, ge, _e, ze;
          const Ke = O(O({}, le.value), S.locale), He = O(O({}, S), m), {
            bordered: Ne = !0,
            placeholder: Xe,
            suffixIcon: De = (ve = v.suffixIcon) === null || ve === void 0 ? void 0 : ve.call(v),
            showToday: Fe = !0,
            transitionName: Ve,
            allowClear: nt = !0,
            dateRender: je = v.dateRender,
            renderExtraFooter: Pe = v.renderExtraFooter,
            monthCellRender: Ge = v.monthCellRender || S.monthCellContentRender || v.monthCellContentRender,
            clearIcon: Se = (ue = v.clearIcon) === null || ue === void 0 ? void 0 : ue.call(v),
            id: Ce = C.id.value
          } = He, Ae = qG(He, ["bordered", "placeholder", "suffixIcon", "showToday", "transitionName", "allowClear", "dateRender", "renderExtraFooter", "monthCellRender", "clearIcon", "id"]), qe = He.showTime === "" ? !0 : He.showTime, {
            format: We
          } = He;
          let tt = {};
          u && (tt.picker = u);
          const Ee = u || He.picker || "date";
          tt = O(O(O({}, tt), qe ? Up(O({
            format: We,
            picker: Ee
          }, typeof qe == "object" ? qe : {})) : {}), Ee === "time" ? Up(O(O({
            format: We
          }, Ae), {
            picker: Ee
          })) : {});
          const Re = $.value, Be = h(Je, null, [De || (u === "time" ? h(rg, null, null) : h(og, null, null)), P.hasFeedback && P.feedbackIcon]);
          return F(h(X7, Q(Q(Q({
            monthCellRender: Ge,
            dateRender: je,
            renderExtraFooter: Pe,
            ref: X,
            placeholder: VG(Ke, Ee, Xe),
            suffixIcon: Be,
            dropdownAlign: e2(I.value, S.placement),
            clearIcon: Se || h(Fr, null, null),
            allowClear: nt,
            transitionName: Ve || `${M.value}-slide-up`
          }, Ae), tt), {}, {
            id: Ce,
            picker: Ee,
            value: ie.value,
            defaultValue: re.value,
            defaultPickerValue: te.value,
            showToday: Fe,
            locale: Ke.lang,
            class: Me({
              [`${Re}-${B.value}`]: B.value,
              [`${Re}-borderless`]: !Ne
            }, $i(Re, Ls(P.status, S.status), P.hasFeedback), m.class, R.value, H.value),
            disabled: N.value,
            prefixCls: Re,
            getPopupContainer: m.getCalendarContainer || w.value,
            generateConfig: e,
            prevIcon: ((pe = v.prevIcon) === null || pe === void 0 ? void 0 : pe.call(v)) || h("span", {
              class: `${Re}-prev-icon`
            }, null),
            nextIcon: ((ge = v.nextIcon) === null || ge === void 0 ? void 0 : ge.call(v)) || h("span", {
              class: `${Re}-next-icon`
            }, null),
            superPrevIcon: ((_e = v.superPrevIcon) === null || _e === void 0 ? void 0 : _e.call(v)) || h("span", {
              class: `${Re}-super-prev-icon`
            }, null),
            superNextIcon: ((ze = v.superNextIcon) === null || ze === void 0 ? void 0 : ze.call(v)) || h("span", {
              class: `${Re}-super-next-icon`
            }, null),
            components: n2,
            direction: I.value,
            dropdownClassName: Me(R.value, S.popupClassName, S.dropdownClassName),
            onChange: ee,
            onOpenChange: W,
            onFocus: K,
            onBlur: q,
            onPanelChange: G,
            onOk: ae
          }), null));
        };
      }
    });
  }
  const o = n(void 0, "ADatePicker"), r = n("week", "AWeekPicker"), i = n("month", "AMonthPicker"), a = n("year", "AYearPicker"), l = n("time", "TimePicker"), s = n("quarter", "AQuarterPicker");
  return {
    DatePicker: o,
    WeekPicker: r,
    MonthPicker: i,
    YearPicker: a,
    TimePicker: l,
    QuarterPicker: s
  };
}
var GG = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z" } }] }, name: "swap-right", theme: "outlined" };
function HC(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      UG(e, r, n[r]);
    });
  }
  return e;
}
function UG(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var yx = function(t, n) {
  var o = HC({}, t, n.attrs);
  return h(on, HC({}, o, {
    icon: GG
  }), null);
};
yx.displayName = "SwapRightOutlined";
yx.inheritAttrs = !1;
var XG = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function QG(e, t) {
  return be({
    compatConfig: {
      MODE: 3
    },
    name: "ARangePicker",
    inheritAttrs: !1,
    props: O(O(O({}, t2()), KG()), t),
    slots: Object,
    setup(o, r) {
      let {
        expose: i,
        slots: a,
        attrs: l,
        emit: s
      } = r;
      const u = o, c = Br(), d = Nr.useInject();
      process.env.NODE_ENV !== "production" && (dn(!u.dropdownClassName, "RangePicker", "`dropdownClassName` is deprecated. Please use `popupClassName` instead."), dn(!l.getCalendarContainer, "DatePicker", '`getCalendarContainer` is deprecated. Please use `getPopupContainer"` instead.'));
      const {
        prefixCls: f,
        direction: p,
        getPopupContainer: v,
        size: g,
        rootPrefixCls: m,
        disabled: x
      } = _t("picker", u), {
        compactSize: S,
        compactItemClassnames: C
      } = fc(f, p), P = E(() => S.value || g.value), [$, I] = qT(f), w = ce();
      i({
        focus: () => {
          var K;
          (K = w.value) === null || K === void 0 || K.focus();
        },
        blur: () => {
          var K;
          (K = w.value) === null || K === void 0 || K.blur();
        }
      });
      const _ = (K) => u.valueFormat ? e.toString(K, u.valueFormat) : K, M = (K, q) => {
        const G = _(K);
        s("update:value", G), s("change", G, q), c.onFieldChange();
      }, N = (K) => {
        s("update:open", K), s("openChange", K);
      }, A = (K) => {
        s("focus", K);
      }, H = (K) => {
        s("blur", K), c.onFieldBlur();
      }, B = (K, q) => {
        const G = _(K);
        s("panelChange", G, q);
      }, F = (K) => {
        const q = _(K);
        s("ok", q);
      }, R = (K, q, G) => {
        const ae = _(K);
        s("calendarChange", ae, q, G);
      }, [X] = Rl("DatePicker", Mp), j = E(() => u.value && u.valueFormat ? e.toDate(u.value, u.valueFormat) : u.value), ee = E(() => u.defaultValue && u.valueFormat ? e.toDate(u.defaultValue, u.valueFormat) : u.defaultValue), W = E(() => u.defaultPickerValue && u.valueFormat ? e.toDate(u.defaultPickerValue, u.valueFormat) : u.defaultPickerValue);
      return () => {
        var K, q, G, ae, le, ie, re;
        const te = O(O({}, X.value), u.locale), ve = O(O({}, u), l), {
          prefixCls: ue,
          bordered: pe = !0,
          placeholder: ge,
          suffixIcon: _e = (K = a.suffixIcon) === null || K === void 0 ? void 0 : K.call(a),
          picker: ze = "date",
          transitionName: Ke,
          allowClear: He = !0,
          dateRender: Ne = a.dateRender,
          renderExtraFooter: Xe = a.renderExtraFooter,
          separator: De = (q = a.separator) === null || q === void 0 ? void 0 : q.call(a),
          clearIcon: Fe = (G = a.clearIcon) === null || G === void 0 ? void 0 : G.call(a),
          id: Ve = c.id.value
        } = ve, nt = XG(ve, ["prefixCls", "bordered", "placeholder", "suffixIcon", "picker", "transitionName", "allowClear", "dateRender", "renderExtraFooter", "separator", "clearIcon", "id"]);
        delete nt["onUpdate:value"], delete nt["onUpdate:open"];
        const {
          format: je,
          showTime: Pe
        } = ve;
        let Ge = {};
        Ge = O(O(O({}, Ge), Pe ? Up(O({
          format: je,
          picker: ze
        }, Pe)) : {}), ze === "time" ? Up(O(O({
          format: je
        }, Fn(nt, ["disabledTime"])), {
          picker: ze
        })) : {});
        const Se = f.value, Ce = h(Je, null, [_e || (ze === "time" ? h(rg, null, null) : h(og, null, null)), d.hasFeedback && d.feedbackIcon]);
        return $(h(u9, Q(Q(Q({
          dateRender: Ne,
          renderExtraFooter: Xe,
          separator: De || h("span", {
            "aria-label": "to",
            class: `${Se}-separator`
          }, [h(yx, null, null)]),
          ref: w,
          dropdownAlign: e2(p.value, u.placement),
          placeholder: jG(te, ze, ge),
          suffixIcon: Ce,
          clearIcon: Fe || h(Fr, null, null),
          allowClear: He,
          transitionName: Ke || `${m.value}-slide-up`
        }, nt), Ge), {}, {
          disabled: x.value,
          id: Ve,
          value: j.value,
          defaultValue: ee.value,
          defaultPickerValue: W.value,
          picker: ze,
          class: Me({
            [`${Se}-${P.value}`]: P.value,
            [`${Se}-borderless`]: !pe
          }, $i(Se, Ls(d.status, u.status), d.hasFeedback), l.class, I.value, C.value),
          locale: te.lang,
          prefixCls: Se,
          getPopupContainer: l.getCalendarContainer || v.value,
          generateConfig: e,
          prevIcon: ((ae = a.prevIcon) === null || ae === void 0 ? void 0 : ae.call(a)) || h("span", {
            class: `${Se}-prev-icon`
          }, null),
          nextIcon: ((le = a.nextIcon) === null || le === void 0 ? void 0 : le.call(a)) || h("span", {
            class: `${Se}-next-icon`
          }, null),
          superPrevIcon: ((ie = a.superPrevIcon) === null || ie === void 0 ? void 0 : ie.call(a)) || h("span", {
            class: `${Se}-super-prev-icon`
          }, null),
          superNextIcon: ((re = a.superNextIcon) === null || re === void 0 ? void 0 : re.call(a)) || h("span", {
            class: `${Se}-super-next-icon`
          }, null),
          components: n2,
          direction: p.value,
          dropdownClassName: Me(I.value, u.popupClassName, u.dropdownClassName),
          onChange: M,
          onOpenChange: N,
          onFocus: A,
          onBlur: H,
          onPanelChange: B,
          onOk: F,
          onCalendarChange: R
        }), null));
      };
    }
  });
}
const n2 = {
  button: EG,
  rangeItem: zG
};
function ZG(e) {
  return e ? Array.isArray(e) ? e : [e] : [];
}
function Up(e) {
  const {
    format: t,
    picker: n,
    showHour: o,
    showMinute: r,
    showSecond: i,
    use12Hours: a
  } = e, l = ZG(t)[0], s = O({}, e);
  return l && typeof l == "string" && (!l.includes("s") && i === void 0 && (s.showSecond = !1), !l.includes("m") && r === void 0 && (s.showMinute = !1), !l.includes("H") && !l.includes("h") && o === void 0 && (s.showHour = !1), (l.includes("a") || l.includes("A")) && a === void 0 && (s.use12Hours = !0)), n === "time" ? s : (typeof l == "function" && delete s.format, {
    showTime: s
  });
}
function JG(e, t) {
  const {
    DatePicker: n,
    WeekPicker: o,
    MonthPicker: r,
    YearPicker: i,
    TimePicker: a,
    QuarterPicker: l
  } = YG(e, t), s = QG(e, t);
  return {
    DatePicker: n,
    WeekPicker: o,
    MonthPicker: r,
    YearPicker: i,
    TimePicker: a,
    QuarterPicker: l,
    RangePicker: s
  };
}
const {
  DatePicker: Cv,
  WeekPicker: $v,
  MonthPicker: Pv,
  YearPicker: eU,
  TimePicker: tU,
  QuarterPicker: Ov,
  RangePicker: kv
} = JG(C7), nU = O(Cv, {
  WeekPicker: $v,
  MonthPicker: Pv,
  YearPicker: eU,
  RangePicker: kv,
  TimePicker: tU,
  QuarterPicker: Ov,
  install: (e) => (e.component(Cv.name, Cv), e.component(kv.name, kv), e.component(Pv.name, Pv), e.component($v.name, $v), e.component(Ov.name, Ov), e)
}), oU = (e) => {
  const {
    componentCls: t,
    sizePaddingEdgeHorizontal: n,
    colorSplit: o,
    lineWidth: r
  } = e;
  return {
    [t]: O(O({}, fn(e)), {
      borderBlockStart: `${r}px solid ${o}`,
      // vertical
      "&-vertical": {
        position: "relative",
        top: "-0.06em",
        display: "inline-block",
        height: "0.9em",
        margin: `0 ${e.dividerVerticalGutterMargin}px`,
        verticalAlign: "middle",
        borderTop: 0,
        borderInlineStart: `${r}px solid ${o}`
      },
      "&-horizontal": {
        display: "flex",
        clear: "both",
        width: "100%",
        minWidth: "100%",
        margin: `${e.dividerHorizontalGutterMargin}px 0`
      },
      [`&-horizontal${t}-with-text`]: {
        display: "flex",
        alignItems: "center",
        margin: `${e.dividerHorizontalWithTextGutterMargin}px 0`,
        color: e.colorTextHeading,
        fontWeight: 500,
        fontSize: e.fontSizeLG,
        whiteSpace: "nowrap",
        textAlign: "center",
        borderBlockStart: `0 ${o}`,
        "&::before, &::after": {
          position: "relative",
          width: "50%",
          borderBlockStart: `${r}px solid transparent`,
          // Chrome not accept `inherit` in `border-top`
          borderBlockStartColor: "inherit",
          borderBlockEnd: 0,
          transform: "translateY(50%)",
          content: "''"
        }
      },
      [`&-horizontal${t}-with-text-left`]: {
        "&::before": {
          width: "5%"
        },
        "&::after": {
          width: "95%"
        }
      },
      [`&-horizontal${t}-with-text-right`]: {
        "&::before": {
          width: "95%"
        },
        "&::after": {
          width: "5%"
        }
      },
      [`${t}-inner-text`]: {
        display: "inline-block",
        padding: "0 1em"
      },
      "&-dashed": {
        background: "none",
        borderColor: o,
        borderStyle: "dashed",
        borderWidth: `${r}px 0 0`
      },
      [`&-horizontal${t}-with-text${t}-dashed`]: {
        "&::before, &::after": {
          borderStyle: "dashed none none"
        }
      },
      [`&-vertical${t}-dashed`]: {
        borderInlineStartWidth: r,
        borderInlineEnd: 0,
        borderBlockStart: 0,
        borderBlockEnd: 0
      },
      [`&-plain${t}-with-text`]: {
        color: e.colorText,
        fontWeight: "normal",
        fontSize: e.fontSize
      },
      [`&-horizontal${t}-with-text-left${t}-no-default-orientation-margin-left`]: {
        "&::before": {
          width: 0
        },
        "&::after": {
          width: "100%"
        },
        [`${t}-inner-text`]: {
          paddingInlineStart: n
        }
      },
      [`&-horizontal${t}-with-text-right${t}-no-default-orientation-margin-right`]: {
        "&::before": {
          width: "100%"
        },
        "&::after": {
          width: 0
        },
        [`${t}-inner-text`]: {
          paddingInlineEnd: n
        }
      }
    })
  };
}, rU = Sn("Divider", (e) => {
  const t = Qt(e, {
    dividerVerticalGutterMargin: e.marginXS,
    dividerHorizontalWithTextGutterMargin: e.margin,
    dividerHorizontalGutterMargin: e.marginLG
  });
  return [oU(t)];
}, {
  sizePaddingEdgeHorizontal: 0
}), iU = () => ({
  prefixCls: String,
  type: {
    type: String,
    default: "horizontal"
  },
  dashed: {
    type: Boolean,
    default: !1
  },
  orientation: {
    type: String,
    default: "center"
  },
  plain: {
    type: Boolean,
    default: !1
  },
  orientationMargin: [String, Number]
}), aU = be({
  name: "ADivider",
  inheritAttrs: !1,
  compatConfig: {
    MODE: 3
  },
  props: iU(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: r,
      direction: i
    } = _t("divider", e), [a, l] = rU(r), s = E(() => e.orientation === "left" && e.orientationMargin != null), u = E(() => e.orientation === "right" && e.orientationMargin != null), c = E(() => {
      const {
        type: p,
        dashed: v,
        plain: g
      } = e, m = r.value;
      return {
        [m]: !0,
        [l.value]: !!l.value,
        [`${m}-${p}`]: !0,
        [`${m}-dashed`]: !!v,
        [`${m}-plain`]: !!g,
        [`${m}-rtl`]: i.value === "rtl",
        [`${m}-no-default-orientation-margin-left`]: s.value,
        [`${m}-no-default-orientation-margin-right`]: u.value
      };
    }), d = E(() => {
      const p = typeof e.orientationMargin == "number" ? `${e.orientationMargin}px` : e.orientationMargin;
      return O(O({}, s.value && {
        marginLeft: p
      }), u.value && {
        marginRight: p
      });
    }), f = E(() => e.orientation.length > 0 ? "-" + e.orientation : e.orientation);
    return () => {
      var p;
      const v = go((p = n.default) === null || p === void 0 ? void 0 : p.call(n));
      return a(h("div", Q(Q({}, o), {}, {
        class: [c.value, v.length ? `${r.value}-with-text ${r.value}-with-text${f.value}` : "", o.class],
        role: "separator"
      }), [v.length ? h("span", {
        class: `${r.value}-inner-text`,
        style: d.value
      }, [v]) : null]));
    };
  }
}), lU = ii(aU);
Mr.Button = jp;
Mr.install = function(e) {
  return e.component(Mr.name, Mr), e.component(jp.name, jp), e;
};
const o2 = () => ({
  prefixCls: String,
  width: fe.oneOfType([fe.string, fe.number]),
  height: fe.oneOfType([fe.string, fe.number]),
  style: {
    type: Object,
    default: void 0
  },
  class: String,
  rootClassName: String,
  rootStyle: Et(),
  placement: {
    type: String
  },
  wrapperClassName: String,
  level: {
    type: [String, Array]
  },
  levelMove: {
    type: [Number, Function, Array]
  },
  duration: String,
  ease: String,
  showMask: {
    type: Boolean,
    default: void 0
  },
  maskClosable: {
    type: Boolean,
    default: void 0
  },
  maskStyle: {
    type: Object,
    default: void 0
  },
  afterVisibleChange: Function,
  keyboard: {
    type: Boolean,
    default: void 0
  },
  contentWrapperStyle: jn(),
  autofocus: {
    type: Boolean,
    default: void 0
  },
  open: {
    type: Boolean,
    default: void 0
  },
  // Motion
  motion: et(),
  maskMotion: Et()
}), sU = () => O(O({}, o2()), {
  forceRender: {
    type: Boolean,
    default: void 0
  },
  getContainer: fe.oneOfType([fe.string, fe.func, fe.object, fe.looseBool])
}), uU = () => O(O({}, o2()), {
  getContainer: Function,
  getOpenCount: Function,
  scrollLocker: fe.any,
  inline: Boolean
});
function cU(e) {
  return Array.isArray(e) ? e : [e];
}
const dU = {
  transition: "transitionend",
  WebkitTransition: "webkitTransitionEnd",
  MozTransition: "transitionend",
  OTransition: "oTransitionEnd otransitionend"
};
Object.keys(dU).filter((e) => {
  if (typeof document > "u")
    return !1;
  const t = document.getElementsByTagName("html")[0];
  return e in (t ? t.style : {});
})[0];
const fU = !(typeof window < "u" && window.document && window.document.createElement);
var pU = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const VC = be({
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: uU(),
  emits: ["close", "handleClick", "change"],
  setup(e, t) {
    let {
      emit: n,
      slots: o
    } = t;
    const r = $e(), i = $e(), a = $e(), l = $e(), s = $e();
    let u = [];
    `${Number((Date.now() + Math.random()).toString().replace(".", Math.round(Math.random() * 9).toString())).toString(16)}`, Nt(() => {
      Yt(() => {
        var x;
        const {
          open: S,
          getContainer: C,
          showMask: P,
          autofocus: $
        } = e, I = C?.();
        v(e), S && (I && (I.parentNode, document.body), Yt(() => {
          $ && c();
        }), P && ((x = e.scrollLocker) === null || x === void 0 || x.lock()));
      });
    }), ke(() => e.level, () => {
      v(e);
    }, {
      flush: "post"
    }), ke(() => e.open, () => {
      const {
        open: x,
        getContainer: S,
        scrollLocker: C,
        showMask: P,
        autofocus: $
      } = e, I = S?.();
      I && (I.parentNode, document.body), x ? ($ && c(), P && C?.lock()) : C?.unLock();
    }, {
      flush: "post"
    }), jo(() => {
      var x;
      const {
        open: S
      } = e;
      S && (document.body.style.touchAction = ""), (x = e.scrollLocker) === null || x === void 0 || x.unLock();
    }), ke(() => e.placement, (x) => {
      x && (s.value = null);
    });
    const c = () => {
      var x, S;
      (S = (x = i.value) === null || x === void 0 ? void 0 : x.focus) === null || S === void 0 || S.call(x);
    }, d = (x) => {
      n("close", x);
    }, f = (x) => {
      x.keyCode === it.ESC && (x.stopPropagation(), d(x));
    }, p = () => {
      const {
        open: x,
        afterVisibleChange: S
      } = e;
      S && S(!!x);
    }, v = (x) => {
      let {
        level: S,
        getContainer: C
      } = x;
      if (fU)
        return;
      const P = C?.(), $ = P ? P.parentNode : null;
      u = [], S === "all" ? ($ ? Array.prototype.slice.call($.children) : []).forEach((w) => {
        w.nodeName !== "SCRIPT" && w.nodeName !== "STYLE" && w.nodeName !== "LINK" && w !== P && u.push(w);
      }) : S && cU(S).forEach((I) => {
        document.querySelectorAll(I).forEach((w) => {
          u.push(w);
        });
      });
    }, g = (x) => {
      n("handleClick", x);
    }, m = $e(!1);
    return ke(i, () => {
      Yt(() => {
        m.value = !0;
      });
    }), () => {
      var x, S;
      const {
        width: C,
        height: P,
        open: $,
        prefixCls: I,
        placement: w,
        level: _,
        levelMove: M,
        ease: N,
        duration: A,
        getContainer: H,
        onChange: B,
        afterVisibleChange: F,
        showMask: R,
        maskClosable: X,
        maskStyle: j,
        keyboard: ee,
        getOpenCount: W,
        scrollLocker: K,
        contentWrapperStyle: q,
        style: G,
        class: ae,
        rootClassName: le,
        rootStyle: ie,
        maskMotion: re,
        motion: te,
        inline: ve
      } = e, ue = pU(e, ["width", "height", "open", "prefixCls", "placement", "level", "levelMove", "ease", "duration", "getContainer", "onChange", "afterVisibleChange", "showMask", "maskClosable", "maskStyle", "keyboard", "getOpenCount", "scrollLocker", "contentWrapperStyle", "style", "class", "rootClassName", "rootStyle", "maskMotion", "motion", "inline"]), pe = $ && m.value, ge = Me(I, {
        [`${I}-${w}`]: !0,
        [`${I}-open`]: pe,
        [`${I}-inline`]: ve,
        "no-mask": !R,
        [le]: !0
      }), _e = typeof te == "function" ? te(w) : te;
      return h("div", Q(Q({}, Fn(ue, ["autofocus"])), {}, {
        tabindex: -1,
        class: ge,
        style: ie,
        ref: i,
        onKeydown: pe && ee ? f : void 0
      }), [h(Er, re, {
        default: () => [R && ti(h("div", {
          class: `${I}-mask`,
          onClick: X ? d : void 0,
          style: j,
          ref: a
        }, null), [[Oi, pe]])]
      }), h(Er, Q(Q({}, _e), {}, {
        onAfterEnter: p,
        onAfterLeave: p
      }), {
        default: () => [ti(h("div", {
          class: `${I}-content-wrapper`,
          style: [q],
          ref: r
        }, [h("div", {
          class: [`${I}-content`, ae],
          style: G,
          ref: s
        }, [(x = o.default) === null || x === void 0 ? void 0 : x.call(o)]), o.handler ? h("div", {
          onClick: g,
          ref: l
        }, [(S = o.handler) === null || S === void 0 ? void 0 : S.call(o)]) : null]), [[Oi, pe]])]
      })]);
    };
  }
});
var jC = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const hU = be({
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: kn(sU(), {
    prefixCls: "drawer",
    placement: "left",
    getContainer: "body",
    level: "all",
    duration: ".3s",
    ease: "cubic-bezier(0.78, 0.14, 0.15, 0.86)",
    afterVisibleChange: () => {
    },
    showMask: !0,
    maskClosable: !0,
    maskStyle: {},
    wrapperClassName: "",
    keyboard: !0,
    forceRender: !1,
    autofocus: !0
  }),
  emits: ["handleClick", "close"],
  setup(e, t) {
    let {
      emit: n,
      slots: o
    } = t;
    const r = ce(null), i = (l) => {
      n("handleClick", l);
    }, a = (l) => {
      n("close", l);
    };
    return () => {
      const {
        getContainer: l,
        wrapperClassName: s,
        rootClassName: u,
        rootStyle: c,
        forceRender: d
      } = e, f = jC(e, ["getContainer", "wrapperClassName", "rootClassName", "rootStyle", "forceRender"]);
      let p = null;
      if (!l)
        return h(VC, Q(Q({}, f), {}, {
          rootClassName: u,
          rootStyle: c,
          open: e.open,
          onClose: a,
          onHandleClick: i,
          inline: !0
        }), o);
      const v = !!o.handler || d;
      return (v || e.open || r.value) && (p = h(g0, {
        autoLock: !0,
        visible: e.open,
        forceRender: v,
        getContainer: l,
        wrapperClassName: s
      }, {
        default: (g) => {
          var {
            visible: m,
            afterClose: x
          } = g, S = jC(g, ["visible", "afterClose"]);
          return h(VC, Q(Q(Q({
            ref: r
          }, f), S), {}, {
            rootClassName: u,
            rootStyle: c,
            open: m !== void 0 ? m : e.open,
            afterVisibleChange: x !== void 0 ? x : e.afterVisibleChange,
            onClose: a,
            onHandleClick: i
          }), o);
        }
      })), p;
    };
  }
}), gU = (e) => {
  const {
    componentCls: t,
    motionDurationSlow: n
  } = e, o = {
    "&-enter, &-appear, &-leave": {
      "&-start": {
        transition: "none"
      },
      "&-active": {
        transition: `all ${n}`
      }
    }
  };
  return {
    [t]: {
      // ======================== Mask ========================
      [`${t}-mask-motion`]: {
        "&-enter, &-appear, &-leave": {
          "&-active": {
            transition: `all ${n}`
          }
        },
        "&-enter, &-appear": {
          opacity: 0,
          "&-active": {
            opacity: 1
          }
        },
        "&-leave": {
          opacity: 1,
          "&-active": {
            opacity: 0
          }
        }
      },
      // ======================= Panel ========================
      [`${t}-panel-motion`]: {
        // Left
        "&-left": [o, {
          "&-enter, &-appear": {
            "&-start": {
              transform: "translateX(-100%) !important"
            },
            "&-active": {
              transform: "translateX(0)"
            }
          },
          "&-leave": {
            transform: "translateX(0)",
            "&-active": {
              transform: "translateX(-100%)"
            }
          }
        }],
        // Right
        "&-right": [o, {
          "&-enter, &-appear": {
            "&-start": {
              transform: "translateX(100%) !important"
            },
            "&-active": {
              transform: "translateX(0)"
            }
          },
          "&-leave": {
            transform: "translateX(0)",
            "&-active": {
              transform: "translateX(100%)"
            }
          }
        }],
        // Top
        "&-top": [o, {
          "&-enter, &-appear": {
            "&-start": {
              transform: "translateY(-100%) !important"
            },
            "&-active": {
              transform: "translateY(0)"
            }
          },
          "&-leave": {
            transform: "translateY(0)",
            "&-active": {
              transform: "translateY(-100%)"
            }
          }
        }],
        // Bottom
        "&-bottom": [o, {
          "&-enter, &-appear": {
            "&-start": {
              transform: "translateY(100%) !important"
            },
            "&-active": {
              transform: "translateY(0)"
            }
          },
          "&-leave": {
            transform: "translateY(0)",
            "&-active": {
              transform: "translateY(100%)"
            }
          }
        }]
      }
    }
  };
}, vU = (e) => {
  const {
    componentCls: t,
    zIndexPopup: n,
    colorBgMask: o,
    colorBgElevated: r,
    motionDurationSlow: i,
    motionDurationMid: a,
    padding: l,
    paddingLG: s,
    fontSizeLG: u,
    lineHeightLG: c,
    lineWidth: d,
    lineType: f,
    colorSplit: p,
    marginSM: v,
    colorIcon: g,
    colorIconHover: m,
    colorText: x,
    fontWeightStrong: S,
    drawerFooterPaddingVertical: C,
    drawerFooterPaddingHorizontal: P
  } = e, $ = `${t}-content-wrapper`;
  return {
    [t]: {
      position: "fixed",
      inset: 0,
      zIndex: n,
      pointerEvents: "none",
      "&-pure": {
        position: "relative",
        background: r,
        [`&${t}-left`]: {
          boxShadow: e.boxShadowDrawerLeft
        },
        [`&${t}-right`]: {
          boxShadow: e.boxShadowDrawerRight
        },
        [`&${t}-top`]: {
          boxShadow: e.boxShadowDrawerUp
        },
        [`&${t}-bottom`]: {
          boxShadow: e.boxShadowDrawerDown
        }
      },
      "&-inline": {
        position: "absolute"
      },
      // ====================== Mask ======================
      [`${t}-mask`]: {
        position: "absolute",
        inset: 0,
        zIndex: n,
        background: o,
        pointerEvents: "auto"
      },
      // ==================== Content =====================
      [$]: {
        position: "absolute",
        zIndex: n,
        transition: `all ${i}`,
        "&-hidden": {
          display: "none"
        }
      },
      // Placement
      [`&-left > ${$}`]: {
        top: 0,
        bottom: 0,
        left: {
          _skip_check_: !0,
          value: 0
        },
        boxShadow: e.boxShadowDrawerLeft
      },
      [`&-right > ${$}`]: {
        top: 0,
        right: {
          _skip_check_: !0,
          value: 0
        },
        bottom: 0,
        boxShadow: e.boxShadowDrawerRight
      },
      [`&-top > ${$}`]: {
        top: 0,
        insetInline: 0,
        boxShadow: e.boxShadowDrawerUp
      },
      [`&-bottom > ${$}`]: {
        bottom: 0,
        insetInline: 0,
        boxShadow: e.boxShadowDrawerDown
      },
      [`${t}-content`]: {
        width: "100%",
        height: "100%",
        overflow: "auto",
        background: r,
        pointerEvents: "auto"
      },
      // ===================== Panel ======================
      [`${t}-wrapper-body`]: {
        display: "flex",
        flexDirection: "column",
        width: "100%",
        height: "100%"
      },
      // Header
      [`${t}-header`]: {
        display: "flex",
        flex: 0,
        alignItems: "center",
        padding: `${l}px ${s}px`,
        fontSize: u,
        lineHeight: c,
        borderBottom: `${d}px ${f} ${p}`,
        "&-title": {
          display: "flex",
          flex: 1,
          alignItems: "center",
          minWidth: 0,
          minHeight: 0
        }
      },
      [`${t}-extra`]: {
        flex: "none"
      },
      [`${t}-close`]: {
        display: "inline-block",
        marginInlineEnd: v,
        color: g,
        fontWeight: S,
        fontSize: u,
        fontStyle: "normal",
        lineHeight: 1,
        textAlign: "center",
        textTransform: "none",
        textDecoration: "none",
        background: "transparent",
        border: 0,
        outline: 0,
        cursor: "pointer",
        transition: `color ${a}`,
        textRendering: "auto",
        "&:focus, &:hover": {
          color: m,
          textDecoration: "none"
        }
      },
      [`${t}-title`]: {
        flex: 1,
        margin: 0,
        color: x,
        fontWeight: e.fontWeightStrong,
        fontSize: u,
        lineHeight: c
      },
      // Body
      [`${t}-body`]: {
        flex: 1,
        minWidth: 0,
        minHeight: 0,
        padding: s,
        overflow: "auto"
      },
      // Footer
      [`${t}-footer`]: {
        flexShrink: 0,
        padding: `${C}px ${P}px`,
        borderTop: `${d}px ${f} ${p}`
      },
      // ====================== RTL =======================
      "&-rtl": {
        direction: "rtl"
      }
    }
  };
}, mU = Sn("Drawer", (e) => {
  const t = Qt(e, {
    drawerFooterPaddingVertical: e.paddingXS,
    drawerFooterPaddingHorizontal: e.padding
  });
  return [vU(t), gU(t)];
}, (e) => ({
  zIndexPopup: e.zIndexPopupBase
}));
var bU = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const yU = ["top", "right", "bottom", "left"], WC = {
  distance: 180
}, xU = () => ({
  autofocus: {
    type: Boolean,
    default: void 0
  },
  closable: {
    type: Boolean,
    default: void 0
  },
  closeIcon: fe.any,
  destroyOnClose: {
    type: Boolean,
    default: void 0
  },
  forceRender: {
    type: Boolean,
    default: void 0
  },
  getContainer: {
    type: [String, Function, Boolean, Object],
    default: void 0
  },
  maskClosable: {
    type: Boolean,
    default: void 0
  },
  mask: {
    type: Boolean,
    default: void 0
  },
  maskStyle: Et(),
  rootClassName: String,
  rootStyle: Et(),
  size: {
    type: String
  },
  drawerStyle: Et(),
  headerStyle: Et(),
  bodyStyle: Et(),
  contentWrapperStyle: {
    type: Object,
    default: void 0
  },
  title: fe.any,
  /** @deprecated Please use `open` instead */
  visible: {
    type: Boolean,
    default: void 0
  },
  open: {
    type: Boolean,
    default: void 0
  },
  width: fe.oneOfType([fe.string, fe.number]),
  height: fe.oneOfType([fe.string, fe.number]),
  zIndex: Number,
  prefixCls: String,
  push: fe.oneOfType([fe.looseBool, {
    type: Object
  }]),
  placement: fe.oneOf(yU),
  keyboard: {
    type: Boolean,
    default: void 0
  },
  extra: fe.any,
  footer: fe.any,
  footerStyle: Et(),
  level: fe.any,
  levelMove: {
    type: [Number, Array, Function]
  },
  handle: fe.any,
  /** @deprecated Use `@afterVisibleChange` instead */
  afterVisibleChange: Function,
  /** @deprecated Please use `@afterOpenChange` instead */
  onAfterVisibleChange: Function,
  onAfterOpenChange: Function,
  /** @deprecated Please use `onUpdate:open` instead */
  "onUpdate:visible": Function,
  "onUpdate:open": Function,
  onClose: Function
}), wU = be({
  compatConfig: {
    MODE: 3
  },
  name: "ADrawer",
  inheritAttrs: !1,
  props: kn(xU(), {
    closable: !0,
    placement: "right",
    maskClosable: !0,
    mask: !0,
    level: null,
    keyboard: !0,
    push: WC
  }),
  slots: Object,
  // emits: ['update:visible', 'close', 'afterVisibleChange'],
  setup(e, t) {
    let {
      emit: n,
      slots: o,
      attrs: r
    } = t;
    const i = $e(!1), a = $e(!1), l = $e(null), s = $e(!1), u = $e(!1), c = E(() => {
      var W;
      return (W = e.open) !== null && W !== void 0 ? W : e.visible;
    });
    ke(c, () => {
      c.value ? s.value = !0 : u.value = !1;
    }, {
      immediate: !0
    }), ke([c, s], () => {
      c.value && s.value && (u.value = !0);
    }, {
      immediate: !0
    });
    const d = zt("parentDrawerOpts", null), {
      prefixCls: f,
      getPopupContainer: p,
      direction: v
    } = _t("drawer", e), [g, m] = mU(f), x = E(() => (
      // 有可能为 false，所以不能直接判断
      e.getContainer === void 0 && p?.value ? () => p.value(document.body) : e.getContainer
    ));
    dn(!e.afterVisibleChange, "Drawer", "`afterVisibleChange` prop is deprecated, please use `@afterVisibleChange` event instead"), process.env.NODE_ENV !== "production" && [["visible", "open"], ["onUpdate:visible", "onUpdate:open"], ["onAfterVisibleChange", "onAfterOpenChange"]].forEach((W) => {
      let [K, q] = W;
      dn(!e[K], "Drawer", `\`${K}\` is deprecated, please use \`${q}\` instead.`);
    }), Ft("parentDrawerOpts", {
      setPush: () => {
        i.value = !0;
      },
      setPull: () => {
        i.value = !1, Yt(() => {
          P();
        });
      }
    }), Nt(() => {
      c.value && d && d.setPush();
    }), jo(() => {
      d && d.setPull();
    }), ke(u, () => {
      d && (u.value ? d.setPush() : d.setPull());
    }, {
      flush: "post"
    });
    const P = () => {
      var W, K;
      (K = (W = l.value) === null || W === void 0 ? void 0 : W.domFocus) === null || K === void 0 || K.call(W);
    }, $ = (W) => {
      n("update:visible", !1), n("update:open", !1), n("close", W);
    }, I = (W) => {
      var K;
      W || (a.value === !1 && (a.value = !0), e.destroyOnClose && (s.value = !1)), (K = e.afterVisibleChange) === null || K === void 0 || K.call(e, W), n("afterVisibleChange", W), n("afterOpenChange", W);
    }, w = E(() => {
      const {
        push: W,
        placement: K
      } = e;
      let q;
      return typeof W == "boolean" ? q = W ? WC.distance : 0 : q = W.distance, q = parseFloat(String(q || 0)), K === "left" || K === "right" ? `translateX(${K === "left" ? q : -q}px)` : K === "top" || K === "bottom" ? `translateY(${K === "top" ? q : -q}px)` : null;
    }), _ = E(() => {
      var W;
      return (W = e.width) !== null && W !== void 0 ? W : e.size === "large" ? 736 : 378;
    }), M = E(() => {
      var W;
      return (W = e.height) !== null && W !== void 0 ? W : e.size === "large" ? 736 : 378;
    }), N = E(() => {
      const {
        mask: W,
        placement: K
      } = e;
      if (!u.value && !W)
        return {};
      const q = {};
      return K === "left" || K === "right" ? q.width = tb(_.value) ? `${_.value}px` : _.value : q.height = tb(M.value) ? `${M.value}px` : M.value, q;
    }), A = E(() => {
      const {
        zIndex: W,
        contentWrapperStyle: K
      } = e, q = N.value;
      return [{
        zIndex: W,
        transform: i.value ? w.value : void 0
      }, O({}, K), q];
    }), H = (W) => {
      const {
        closable: K,
        headerStyle: q
      } = e, G = ei(o, e, "extra"), ae = ei(o, e, "title");
      return !ae && !K ? null : h("div", {
        class: Me(`${W}-header`, {
          [`${W}-header-close-only`]: K && !ae && !G
        }),
        style: q
      }, [h("div", {
        class: `${W}-header-title`
      }, [B(W), ae && h("div", {
        class: `${W}-title`
      }, [ae])]), G && h("div", {
        class: `${W}-extra`
      }, [G])]);
    }, B = (W) => {
      var K;
      const {
        closable: q
      } = e, G = o.closeIcon ? (K = o.closeIcon) === null || K === void 0 ? void 0 : K.call(o) : e.closeIcon;
      return q && h("button", {
        key: "closer",
        onClick: $,
        "aria-label": "Close",
        class: `${W}-close`
      }, [G === void 0 ? h(ra, null, null) : G]);
    }, F = (W) => {
      var K;
      if (a.value && !e.forceRender && !s.value)
        return null;
      const {
        bodyStyle: q,
        drawerStyle: G
      } = e;
      return h("div", {
        class: `${W}-wrapper-body`,
        style: G
      }, [H(W), h("div", {
        key: "body",
        class: `${W}-body`,
        style: q
      }, [(K = o.default) === null || K === void 0 ? void 0 : K.call(o)]), R(W)]);
    }, R = (W) => {
      const K = ei(o, e, "footer");
      if (!K)
        return null;
      const q = `${W}-footer`;
      return h("div", {
        class: q,
        style: e.footerStyle
      }, [K]);
    }, X = E(() => Me({
      "no-mask": !e.mask,
      [`${f.value}-rtl`]: v.value === "rtl"
    }, e.rootClassName, m.value)), j = E(() => Ms(Wa(f.value, "mask-motion"))), ee = (W) => Ms(Wa(f.value, `panel-motion-${W}`));
    return () => {
      const {
        width: W,
        height: K,
        placement: q,
        mask: G,
        forceRender: ae
      } = e, le = bU(e, ["width", "height", "placement", "mask", "forceRender"]), ie = O(O(O({}, r), Fn(le, ["size", "closeIcon", "closable", "destroyOnClose", "drawerStyle", "headerStyle", "bodyStyle", "title", "push", "onAfterVisibleChange", "onClose", "onUpdate:visible", "onUpdate:open", "visible"])), {
        forceRender: ae,
        onClose: $,
        afterVisibleChange: I,
        handler: !1,
        prefixCls: f.value,
        open: u.value,
        showMask: G,
        placement: q,
        ref: l
      });
      return g(h(xd, null, {
        default: () => [h(hU, Q(Q({}, ie), {}, {
          maskMotion: j.value,
          motion: ee,
          width: _.value,
          height: M.value,
          getContainer: x.value,
          rootClassName: X.value,
          rootStyle: e.rootStyle,
          contentWrapperStyle: A.value
        }), {
          handler: e.handle ? () => e.handle : o.handle,
          default: () => F(f.value)
        })]
      }));
    };
  }
}), SU = ii(wU), ed = (e) => e != null && (Array.isArray(e) ? Do(e).length : !0);
function xx(e) {
  return ed(e.prefix) || ed(e.suffix) || ed(e.allowClear);
}
function pp(e) {
  return ed(e.addonBefore) || ed(e.addonAfter);
}
function Nb(e) {
  return typeof e > "u" || e === null ? "" : String(e);
}
function td(e, t, n, o) {
  if (!n)
    return;
  const r = t;
  if (t.type === "click") {
    Object.defineProperty(r, "target", {
      writable: !0
    }), Object.defineProperty(r, "currentTarget", {
      writable: !0
    });
    const i = e.cloneNode(!0);
    r.target = i, r.currentTarget = i, i.value = "", n(r);
    return;
  }
  if (o !== void 0) {
    Object.defineProperty(r, "target", {
      writable: !0
    }), Object.defineProperty(r, "currentTarget", {
      writable: !0
    }), r.target = e, r.currentTarget = e, e.value = o, n(r);
    return;
  }
  n(r);
}
function r2(e, t) {
  if (!e) return;
  e.focus(t);
  const {
    cursor: n
  } = t || {};
  if (n) {
    const o = e.value.length;
    switch (n) {
      case "start":
        e.setSelectionRange(0, 0);
        break;
      case "end":
        e.setSelectionRange(o, o);
        break;
      default:
        e.setSelectionRange(0, o);
    }
  }
}
const CU = () => ({
  addonBefore: fe.any,
  addonAfter: fe.any,
  prefix: fe.any,
  suffix: fe.any,
  clearIcon: fe.any,
  affixWrapperClassName: String,
  groupClassName: String,
  wrapperClassName: String,
  inputClassName: String,
  allowClear: {
    type: Boolean,
    default: void 0
  }
}), i2 = () => O(O({}, CU()), {
  value: {
    type: [String, Number, Symbol],
    default: void 0
  },
  defaultValue: {
    type: [String, Number, Symbol],
    default: void 0
  },
  inputElement: fe.any,
  prefixCls: String,
  disabled: {
    type: Boolean,
    default: void 0
  },
  focused: {
    type: Boolean,
    default: void 0
  },
  triggerFocus: Function,
  readonly: {
    type: Boolean,
    default: void 0
  },
  handleReset: Function,
  hidden: {
    type: Boolean,
    default: void 0
  }
}), a2 = () => O(O({}, i2()), {
  id: String,
  placeholder: {
    type: [String, Number]
  },
  autocomplete: String,
  type: an("text"),
  name: String,
  size: {
    type: String
  },
  autofocus: {
    type: Boolean,
    default: void 0
  },
  lazy: {
    type: Boolean,
    default: !0
  },
  maxlength: Number,
  loading: {
    type: Boolean,
    default: void 0
  },
  bordered: {
    type: Boolean,
    default: void 0
  },
  showCount: {
    type: [Boolean, Object]
  },
  htmlSize: Number,
  onPressEnter: Function,
  onKeydown: Function,
  onKeyup: Function,
  onFocus: Function,
  onBlur: Function,
  onChange: Function,
  onInput: Function,
  "onUpdate:value": Function,
  onCompositionstart: Function,
  onCompositionend: Function,
  valueModifiers: Object,
  hidden: {
    type: Boolean,
    default: void 0
  },
  status: String
}), $U = be({
  name: "BaseInput",
  inheritAttrs: !1,
  props: i2(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const r = ce(), i = (l) => {
      var s;
      if (!((s = r.value) === null || s === void 0) && s.contains(l.target)) {
        const {
          triggerFocus: u
        } = e;
        u?.();
      }
    }, a = () => {
      var l;
      const {
        allowClear: s,
        value: u,
        disabled: c,
        readonly: d,
        handleReset: f,
        suffix: p = n.suffix,
        prefixCls: v
      } = e;
      if (!s)
        return null;
      const g = !c && !d && u, m = `${v}-clear-icon`, x = ((l = n.clearIcon) === null || l === void 0 ? void 0 : l.call(n)) || "*";
      return h("span", {
        onClick: f,
        onMousedown: (S) => S.preventDefault(),
        class: Me({
          [`${m}-hidden`]: !g,
          [`${m}-has-suffix`]: !!p
        }, m),
        role: "button",
        tabindex: -1
      }, [x]);
    };
    return () => {
      var l, s;
      const {
        focused: u,
        value: c,
        disabled: d,
        allowClear: f,
        readonly: p,
        hidden: v,
        prefixCls: g,
        prefix: m = (l = n.prefix) === null || l === void 0 ? void 0 : l.call(n),
        suffix: x = (s = n.suffix) === null || s === void 0 ? void 0 : s.call(n),
        addonAfter: S = n.addonAfter,
        addonBefore: C = n.addonBefore,
        inputElement: P,
        affixWrapperClassName: $,
        wrapperClassName: I,
        groupClassName: w
      } = e;
      let _ = Xn(P, {
        value: c,
        hidden: v
      });
      if (xx({
        prefix: m,
        suffix: x,
        allowClear: f
      })) {
        const M = `${g}-affix-wrapper`, N = Me(M, {
          [`${M}-disabled`]: d,
          [`${M}-focused`]: u,
          [`${M}-readonly`]: p,
          [`${M}-input-with-clear-btn`]: x && f && c
        }, !pp({
          addonAfter: S,
          addonBefore: C
        }) && o.class, $), A = (x || f) && h("span", {
          class: `${g}-suffix`
        }, [a(), x]);
        _ = h("span", {
          class: N,
          style: o.style,
          hidden: !pp({
            addonAfter: S,
            addonBefore: C
          }) && v,
          onMousedown: i,
          ref: r
        }, [m && h("span", {
          class: `${g}-prefix`
        }, [m]), Xn(P, {
          style: null,
          value: c,
          hidden: null
        }), A]);
      }
      if (pp({
        addonAfter: S,
        addonBefore: C
      })) {
        const M = `${g}-group`, N = `${M}-addon`, A = Me(`${g}-wrapper`, M, I), H = Me(`${g}-group-wrapper`, o.class, w);
        return h("span", {
          class: H,
          style: o.style,
          hidden: v
        }, [h("span", {
          class: A
        }, [C && h("span", {
          class: N
        }, [C]), Xn(_, {
          style: null,
          hidden: null
        }), S && h("span", {
          class: N
        }, [S])])]);
      }
      return _;
    };
  }
});
var PU = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const OU = be({
  name: "VCInput",
  inheritAttrs: !1,
  props: a2(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: r,
      emit: i
    } = t;
    const a = $e(e.value === void 0 ? e.defaultValue : e.value), l = $e(!1), s = $e(), u = $e();
    ke(() => e.value, () => {
      a.value = e.value;
    }), ke(() => e.disabled, () => {
      e.disabled && (l.value = !1);
    });
    const c = (w) => {
      s.value && r2(s.value.input, w);
    }, d = () => {
      var w;
      (w = s.value.input) === null || w === void 0 || w.blur();
    }, f = (w, _, M) => {
      var N;
      (N = s.value.input) === null || N === void 0 || N.setSelectionRange(w, _, M);
    }, p = () => {
      var w;
      (w = s.value.input) === null || w === void 0 || w.select();
    };
    r({
      focus: c,
      blur: d,
      input: E(() => {
        var w;
        return (w = s.value.input) === null || w === void 0 ? void 0 : w.input;
      }),
      stateValue: a,
      setSelectionRange: f,
      select: p
    });
    const v = (w) => {
      i("change", w);
    }, g = (w, _) => {
      a.value !== w && (e.value === void 0 ? a.value = w : Yt(() => {
        var M;
        s.value.input.value !== a.value && ((M = u.value) === null || M === void 0 || M.$forceUpdate());
      }), Yt(() => {
        _ && _();
      }));
    }, m = (w) => {
      const {
        value: _
      } = w.target;
      if (a.value === _) return;
      const M = w.target.value;
      td(s.value.input, w, v), g(M);
    }, x = (w) => {
      w.keyCode === 13 && i("pressEnter", w), i("keydown", w);
    }, S = (w) => {
      l.value = !0, i("focus", w);
    }, C = (w) => {
      l.value = !1, i("blur", w);
    }, P = (w) => {
      td(s.value.input, w, v), g("", () => {
        c();
      });
    }, $ = () => {
      var w, _;
      const {
        addonBefore: M = n.addonBefore,
        addonAfter: N = n.addonAfter,
        disabled: A,
        valueModifiers: H = {},
        htmlSize: B,
        autocomplete: F,
        prefixCls: R,
        inputClassName: X,
        prefix: j = (w = n.prefix) === null || w === void 0 ? void 0 : w.call(n),
        suffix: ee = (_ = n.suffix) === null || _ === void 0 ? void 0 : _.call(n),
        allowClear: W,
        type: K = "text"
      } = e, q = Fn(e, [
        "prefixCls",
        "onPressEnter",
        "addonBefore",
        "addonAfter",
        "prefix",
        "suffix",
        "allowClear",
        // Input elements must be either controlled or uncontrolled,
        // specify either the value prop, or the defaultValue prop, but not both.
        "defaultValue",
        "size",
        "bordered",
        "htmlSize",
        "lazy",
        "showCount",
        "valueModifiers",
        "showCount",
        "affixWrapperClassName",
        "groupClassName",
        "inputClassName",
        "wrapperClassName"
      ]), G = O(O(O({}, q), o), {
        autocomplete: F,
        onChange: m,
        onInput: m,
        onFocus: S,
        onBlur: C,
        onKeydown: x,
        class: Me(R, {
          [`${R}-disabled`]: A
        }, X, !pp({
          addonAfter: N,
          addonBefore: M
        }) && !xx({
          prefix: j,
          suffix: ee,
          allowClear: W
        }) && o.class),
        ref: s,
        key: "ant-input",
        size: B,
        type: K,
        lazy: e.lazy
      });
      return H.lazy && delete G.onInput, G.autofocus || delete G.autofocus, h(Ad, Fn(G, ["size"]), null);
    }, I = () => {
      var w;
      const {
        maxlength: _,
        suffix: M = (w = n.suffix) === null || w === void 0 ? void 0 : w.call(n),
        showCount: N,
        prefixCls: A
      } = e, H = Number(_) > 0;
      if (M || N) {
        const B = [...Nb(a.value)].length, F = typeof N == "object" ? N.formatter({
          count: B,
          maxlength: _
        }) : `${B}${H ? ` / ${_}` : ""}`;
        return h(Je, null, [!!N && h("span", {
          class: Me(`${A}-show-count-suffix`, {
            [`${A}-show-count-has-suffix`]: !!M
          })
        }, [F]), M]);
      }
      return null;
    };
    return Nt(() => {
      process.env.NODE_ENV === "test" && e.autofocus && c();
    }), () => {
      const {
        prefixCls: w,
        disabled: _
      } = e, M = PU(e, ["prefixCls", "disabled"]);
      return h($U, Q(Q(Q({}, M), o), {}, {
        ref: u,
        prefixCls: w,
        inputElement: $(),
        handleReset: P,
        value: Nb(a.value),
        focused: l.value,
        triggerFocus: c,
        suffix: I(),
        disabled: _
      }), n);
    };
  }
}), ig = () => Fn(a2(), ["wrapperClassName", "groupClassName", "inputClassName", "affixWrapperClassName"]), l2 = () => O(O({}, Fn(ig(), ["prefix", "addonBefore", "addonAfter", "suffix"])), {
  rows: Number,
  autosize: {
    type: [Boolean, Object],
    default: void 0
  },
  autoSize: {
    type: [Boolean, Object],
    default: void 0
  },
  onResize: {
    type: Function
  },
  onCompositionstart: Wu(),
  onCompositionend: Wu(),
  valueModifiers: Object
});
var kU = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const kt = be({
  compatConfig: {
    MODE: 3
  },
  name: "AInput",
  inheritAttrs: !1,
  props: ig(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: r,
      emit: i
    } = t;
    const a = ce(), l = Br(), s = Nr.useInject(), u = E(() => Ls(s.status, e.status)), {
      direction: c,
      prefixCls: d,
      size: f,
      autocomplete: p
    } = _t("input", e), {
      compactSize: v,
      compactItemClassnames: g
    } = fc(d, c), m = E(() => v.value || f.value), [x, S] = ix(d), C = _i();
    r({
      focus: (B) => {
        var F;
        (F = a.value) === null || F === void 0 || F.focus(B);
      },
      blur: () => {
        var B;
        (B = a.value) === null || B === void 0 || B.blur();
      },
      input: a,
      setSelectionRange: (B, F, R) => {
        var X;
        (X = a.value) === null || X === void 0 || X.setSelectionRange(B, F, R);
      },
      select: () => {
        var B;
        (B = a.value) === null || B === void 0 || B.select();
      }
    });
    const _ = ce([]), M = () => {
      _.value.push(setTimeout(() => {
        var B, F, R, X;
        !((B = a.value) === null || B === void 0) && B.input && ((F = a.value) === null || F === void 0 ? void 0 : F.input.getAttribute("type")) === "password" && (!((R = a.value) === null || R === void 0) && R.input.hasAttribute("value")) && ((X = a.value) === null || X === void 0 || X.input.removeAttribute("value"));
      }));
    };
    Nt(() => {
      M();
    }), iy(() => {
      _.value.forEach((B) => clearTimeout(B));
    }), qt(() => {
      _.value.forEach((B) => clearTimeout(B));
    });
    const N = (B) => {
      M(), i("blur", B), l.onFieldBlur();
    }, A = (B) => {
      M(), i("focus", B);
    }, H = (B) => {
      i("update:value", B.target.value), i("change", B), i("input", B), l.onFieldChange();
    };
    return () => {
      var B, F, R, X, j, ee;
      const {
        hasFeedback: W,
        feedbackIcon: K
      } = s, {
        allowClear: q,
        bordered: G = !0,
        prefix: ae = (B = n.prefix) === null || B === void 0 ? void 0 : B.call(n),
        suffix: le = (F = n.suffix) === null || F === void 0 ? void 0 : F.call(n),
        addonAfter: ie = (R = n.addonAfter) === null || R === void 0 ? void 0 : R.call(n),
        addonBefore: re = (X = n.addonBefore) === null || X === void 0 ? void 0 : X.call(n),
        id: te = (j = l.id) === null || j === void 0 ? void 0 : j.value
      } = e, ve = kU(e, ["allowClear", "bordered", "prefix", "suffix", "addonAfter", "addonBefore", "id"]), ue = (W || le) && h(Je, null, [le, W && K]), pe = d.value, ge = xx({
        prefix: ae,
        suffix: le
      }) || !!W, _e = n.clearIcon || (() => h(Fr, null, null));
      return x(h(OU, Q(Q(Q({}, o), Fn(ve, ["onUpdate:value", "onChange", "onInput"])), {}, {
        onChange: H,
        id: te,
        disabled: (ee = e.disabled) !== null && ee !== void 0 ? ee : C.value,
        ref: a,
        prefixCls: pe,
        autocomplete: p.value,
        onBlur: N,
        onFocus: A,
        prefix: ae,
        suffix: ue,
        allowClear: q,
        addonAfter: ie && h(xd, null, {
          default: () => [h(Bp, null, {
            default: () => [ie]
          })]
        }),
        addonBefore: re && h(xd, null, {
          default: () => [h(Bp, null, {
            default: () => [re]
          })]
        }),
        class: [o.class, g.value],
        inputClassName: Me({
          [`${pe}-sm`]: m.value === "small",
          [`${pe}-lg`]: m.value === "large",
          [`${pe}-rtl`]: c.value === "rtl",
          [`${pe}-borderless`]: !G
        }, !ge && $i(pe, u.value), S.value),
        affixWrapperClassName: Me({
          [`${pe}-affix-wrapper-sm`]: m.value === "small",
          [`${pe}-affix-wrapper-lg`]: m.value === "large",
          [`${pe}-affix-wrapper-rtl`]: c.value === "rtl",
          [`${pe}-affix-wrapper-borderless`]: !G
        }, $i(`${pe}-affix-wrapper`, u.value, W), S.value),
        wrapperClassName: Me({
          [`${pe}-group-rtl`]: c.value === "rtl"
        }, S.value),
        groupClassName: Me({
          [`${pe}-group-wrapper-sm`]: m.value === "small",
          [`${pe}-group-wrapper-lg`]: m.value === "large",
          [`${pe}-group-wrapper-rtl`]: c.value === "rtl"
        }, $i(`${pe}-group-wrapper`, u.value, W), S.value)
      }), O(O({}, n), {
        clearIcon: _e
      })));
    };
  }
}), IU = be({
  compatConfig: {
    MODE: 3
  },
  name: "AInputGroup",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    size: {
      type: String
    },
    compact: {
      type: Boolean,
      default: void 0
    }
  },
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: r,
      direction: i,
      getPrefixCls: a
    } = _t("input-group", e), l = Nr.useInject();
    Nr.useProvide(l, {
      isFormItemInput: !1
    });
    const s = E(() => a("input")), [u, c] = ix(s), d = E(() => {
      const f = r.value;
      return {
        [`${f}`]: !0,
        [c.value]: !0,
        [`${f}-lg`]: e.size === "large",
        [`${f}-sm`]: e.size === "small",
        [`${f}-compact`]: e.compact,
        [`${f}-rtl`]: i.value === "rtl"
      };
    });
    return () => {
      var f;
      return u(h("span", Q(Q({}, o), {}, {
        class: Me(d.value, o.class)
      }), [(f = n.default) === null || f === void 0 ? void 0 : f.call(n)]));
    };
  }
});
var _U = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const TU = be({
  compatConfig: {
    MODE: 3
  },
  name: "AInputSearch",
  inheritAttrs: !1,
  props: O(O({}, ig()), {
    inputPrefixCls: String,
    // 不能设置默认值 https://github.com/vueComponent/ant-design-vue/issues/1916
    enterButton: fe.any,
    onSearch: {
      type: Function
    }
  }),
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: r,
      emit: i
    } = t;
    const a = $e(), l = $e(!1);
    r({
      focus: () => {
        var $;
        ($ = a.value) === null || $ === void 0 || $.focus();
      },
      blur: () => {
        var $;
        ($ = a.value) === null || $ === void 0 || $.blur();
      }
    });
    const c = ($) => {
      i("update:value", $.target.value), $ && $.target && $.type === "click" && i("search", $.target.value, $), i("change", $);
    }, d = ($) => {
      var I;
      document.activeElement === ((I = a.value) === null || I === void 0 ? void 0 : I.input) && $.preventDefault();
    }, f = ($) => {
      var I, w;
      i("search", (w = (I = a.value) === null || I === void 0 ? void 0 : I.input) === null || w === void 0 ? void 0 : w.stateValue, $);
    }, p = ($) => {
      l.value || e.loading || f($);
    }, v = ($) => {
      l.value = !0, i("compositionstart", $);
    }, g = ($) => {
      l.value = !1, i("compositionend", $);
    }, {
      prefixCls: m,
      getPrefixCls: x,
      direction: S,
      size: C
    } = _t("input-search", e), P = E(() => x("input", e.inputPrefixCls));
    return () => {
      var $, I, w, _;
      const {
        disabled: M,
        loading: N,
        addonAfter: A = ($ = n.addonAfter) === null || $ === void 0 ? void 0 : $.call(n),
        suffix: H = (I = n.suffix) === null || I === void 0 ? void 0 : I.call(n)
      } = e, B = _U(e, ["disabled", "loading", "addonAfter", "suffix"]);
      let {
        enterButton: F = (_ = (w = n.enterButton) === null || w === void 0 ? void 0 : w.call(n)) !== null && _ !== void 0 ? _ : !1
      } = e;
      F = F || F === "";
      const R = typeof F == "boolean" ? h(Rd, null, null) : null, X = `${m.value}-button`, j = Array.isArray(F) ? F[0] : F;
      let ee;
      const W = j.type && UP(j.type) && j.type.__ANT_BUTTON;
      if (W || j.tagName === "button")
        ee = Xn(j, O({
          onMousedown: d,
          onClick: f,
          key: "enterButton"
        }, W ? {
          class: X,
          size: C.value
        } : {}), !1);
      else {
        const q = R && !F;
        ee = h(Lt, {
          class: X,
          type: F ? "primary" : void 0,
          size: C.value,
          disabled: M,
          key: "enterButton",
          onMousedown: d,
          onClick: f,
          loading: N,
          icon: q ? R : null
        }, {
          default: () => [q ? null : R || F]
        });
      }
      A && (ee = [ee, A]);
      const K = Me(m.value, {
        [`${m.value}-rtl`]: S.value === "rtl",
        [`${m.value}-${C.value}`]: !!C.value,
        [`${m.value}-with-button`]: !!F
      }, o.class);
      return h(kt, Q(Q(Q({
        ref: a
      }, Fn(B, ["onUpdate:value", "onSearch", "enterButton"])), o), {}, {
        onPressEnter: p,
        onCompositionstart: v,
        onCompositionend: g,
        size: C.value,
        prefixCls: P.value,
        addonAfter: ee,
        suffix: H,
        onChange: c,
        class: K,
        disabled: M
      }), n);
    };
  }
}), KC = (e) => e != null && (Array.isArray(e) ? Do(e).length : !0);
function MU(e) {
  return KC(e.addonBefore) || KC(e.addonAfter);
}
const EU = ["text", "input"], DU = be({
  compatConfig: {
    MODE: 3
  },
  name: "ClearableLabeledInput",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    inputType: fe.oneOf(Dr("text", "input")),
    value: Ir(),
    defaultValue: Ir(),
    allowClear: {
      type: Boolean,
      default: void 0
    },
    element: Ir(),
    handleReset: Function,
    disabled: {
      type: Boolean,
      default: void 0
    },
    direction: {
      type: String
    },
    size: {
      type: String
    },
    suffix: Ir(),
    prefix: Ir(),
    addonBefore: Ir(),
    addonAfter: Ir(),
    readonly: {
      type: Boolean,
      default: void 0
    },
    focused: {
      type: Boolean,
      default: void 0
    },
    bordered: {
      type: Boolean,
      default: !0
    },
    triggerFocus: {
      type: Function
    },
    hidden: Boolean,
    status: String,
    hashId: String
  },
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const r = Nr.useInject(), i = (l) => {
      const {
        value: s,
        disabled: u,
        readonly: c,
        handleReset: d,
        suffix: f = n.suffix
      } = e, p = !u && !c && s, v = `${l}-clear-icon`;
      return h(Fr, {
        onClick: d,
        onMousedown: (g) => g.preventDefault(),
        class: Me({
          [`${v}-hidden`]: !p,
          [`${v}-has-suffix`]: !!f
        }, v),
        role: "button"
      }, null);
    }, a = (l, s) => {
      const {
        value: u,
        allowClear: c,
        direction: d,
        bordered: f,
        hidden: p,
        status: v,
        addonAfter: g = n.addonAfter,
        addonBefore: m = n.addonBefore,
        hashId: x
      } = e, {
        status: S,
        hasFeedback: C
      } = r;
      if (!c)
        return Xn(s, {
          value: u,
          disabled: e.disabled
        });
      const P = Me(`${l}-affix-wrapper`, `${l}-affix-wrapper-textarea-with-clear-btn`, $i(`${l}-affix-wrapper`, Ls(S, v), C), {
        [`${l}-affix-wrapper-rtl`]: d === "rtl",
        [`${l}-affix-wrapper-borderless`]: !f,
        // className will go to addon wrapper
        [`${o.class}`]: !MU({
          addonAfter: g,
          addonBefore: m
        }) && o.class
      }, x);
      return h("span", {
        class: P,
        style: o.style,
        hidden: p
      }, [Xn(s, {
        style: null,
        value: u,
        disabled: e.disabled
      }), i(l)]);
    };
    return () => {
      var l;
      const {
        prefixCls: s,
        inputType: u,
        element: c = (l = n.element) === null || l === void 0 ? void 0 : l.call(n)
      } = e;
      return u === EU[0] ? a(s, c) : null;
    };
  }
}), AU = `
  min-height:0 !important;
  max-height:none !important;
  height:0 !important;
  visibility:hidden !important;
  overflow:hidden !important;
  position:absolute !important;
  z-index:-1000 !important;
  top:0 !important;
  right:0 !important;
  pointer-events: none !important;
`, NU = ["letter-spacing", "line-height", "padding-top", "padding-bottom", "font-family", "font-weight", "font-size", "font-variant", "text-rendering", "text-transform", "width", "text-indent", "padding-left", "padding-right", "border-width", "box-sizing", "word-break", "white-space"], Iv = {};
let Kr;
function RU(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const n = e.getAttribute("id") || e.getAttribute("data-reactid") || e.getAttribute("name");
  if (t && Iv[n])
    return Iv[n];
  const o = window.getComputedStyle(e), r = o.getPropertyValue("box-sizing") || o.getPropertyValue("-moz-box-sizing") || o.getPropertyValue("-webkit-box-sizing"), i = parseFloat(o.getPropertyValue("padding-bottom")) + parseFloat(o.getPropertyValue("padding-top")), a = parseFloat(o.getPropertyValue("border-bottom-width")) + parseFloat(o.getPropertyValue("border-top-width")), s = {
    sizingStyle: NU.map((u) => `${u}:${o.getPropertyValue(u)}`).join(";"),
    paddingSize: i,
    borderSize: a,
    boxSizing: r
  };
  return t && n && (Iv[n] = s), s;
}
function zU(e) {
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
  Kr || (Kr = document.createElement("textarea"), Kr.setAttribute("tab-index", "-1"), Kr.setAttribute("aria-hidden", "true"), document.body.appendChild(Kr)), e.getAttribute("wrap") ? Kr.setAttribute("wrap", e.getAttribute("wrap")) : Kr.removeAttribute("wrap");
  const {
    paddingSize: r,
    borderSize: i,
    boxSizing: a,
    sizingStyle: l
  } = RU(e, t);
  Kr.setAttribute("style", `${l};${AU}`), Kr.value = e.value || e.placeholder || "";
  let s, u, c, d = Kr.scrollHeight;
  if (a === "border-box" ? d += i : a === "content-box" && (d -= r), n !== null || o !== null) {
    Kr.value = " ";
    const p = Kr.scrollHeight - r;
    n !== null && (s = p * n, a === "border-box" && (s = s + r + i), d = Math.max(s, d)), o !== null && (u = p * o, a === "border-box" && (u = u + r + i), c = d > u ? "" : "hidden", d = Math.min(u, d));
  }
  const f = {
    height: `${d}px`,
    overflowY: c,
    resize: "none"
  };
  return s && (f.minHeight = `${s}px`), u && (f.maxHeight = `${u}px`), f;
}
const _v = 0, Tv = 1, Mv = 2, FU = be({
  compatConfig: {
    MODE: 3
  },
  name: "ResizableTextArea",
  inheritAttrs: !1,
  props: l2(),
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      expose: r
    } = t, i, a;
    const l = ce(), s = ce({}), u = ce(Mv);
    qt(() => {
      Vt.cancel(i), Vt.cancel(a);
    });
    const c = () => {
      try {
        if (l.value && document.activeElement === l.value.input) {
          const I = l.value.getSelectionStart(), w = l.value.getSelectionEnd(), _ = l.value.getScrollTop();
          l.value.setSelectionRange(I, w), l.value.setScrollTop(_);
        }
      } catch {
      }
    }, d = ce(), f = ce();
    It(() => {
      const I = e.autoSize || e.autosize;
      I ? (d.value = I.minRows, f.value = I.maxRows) : (d.value = void 0, f.value = void 0);
    });
    const p = E(() => !!(e.autoSize || e.autosize)), v = () => {
      u.value = _v;
    };
    ke([() => e.value, d, f, p], () => {
      p.value && v();
    }, {
      immediate: !0
    });
    const g = ce();
    ke([u, l], () => {
      if (l.value)
        if (u.value === _v)
          u.value = Tv;
        else if (u.value === Tv) {
          const I = zU(l.value.input, !1, d.value, f.value);
          u.value = Mv, g.value = I;
        } else
          c();
    }, {
      immediate: !0,
      flush: "post"
    });
    const m = fr(), x = ce(), S = () => {
      Vt.cancel(x.value);
    }, C = (I) => {
      u.value === Mv && (o("resize", I), p.value && (S(), x.value = Vt(() => {
        v();
      })));
    };
    qt(() => {
      S();
    }), r({
      resizeTextarea: () => {
        v();
      },
      textArea: E(() => {
        var I;
        return (I = l.value) === null || I === void 0 ? void 0 : I.input;
      }),
      instance: m
    }), wo(e.autosize === void 0, "Input.TextArea", "autosize is deprecated, please use autoSize instead.");
    const $ = () => {
      const {
        prefixCls: I,
        disabled: w
      } = e, _ = Fn(e, ["prefixCls", "onPressEnter", "autoSize", "autosize", "defaultValue", "allowClear", "type", "maxlength", "valueModifiers"]), M = Me(I, n.class, {
        [`${I}-disabled`]: w
      }), N = p.value ? g.value : null, A = [n.style, s.value, N], H = O(O(O({}, _), n), {
        style: A,
        class: M
      });
      return (u.value === _v || u.value === Tv) && A.push({
        overflowX: "hidden",
        overflowY: "hidden"
      }), H.autofocus || delete H.autofocus, H.rows === 0 && delete H.rows, h(Al, {
        onResize: C,
        disabled: !p.value
      }, {
        default: () => [h(Ad, Q(Q({}, H), {}, {
          ref: l,
          tag: "textarea"
        }), null)]
      });
    };
    return () => $();
  }
});
function s2(e, t) {
  return [...e || ""].slice(0, t).join("");
}
function qC(e, t, n, o) {
  let r = n;
  return e ? r = s2(n, o) : [...t || ""].length < n.length && [...n || ""].length > o && (r = t), r;
}
const BU = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATextarea",
  inheritAttrs: !1,
  props: l2(),
  setup(e, t) {
    let {
      attrs: n,
      expose: o,
      emit: r
    } = t;
    var i;
    const a = Br(), l = Nr.useInject(), s = E(() => Ls(l.status, e.status)), u = $e((i = e.value) !== null && i !== void 0 ? i : e.defaultValue), c = $e(), d = $e(""), {
      prefixCls: f,
      size: p,
      direction: v
    } = _t("input", e), [g, m] = ix(f), x = _i(), S = E(() => e.showCount === "" || e.showCount || !1), C = E(() => Number(e.maxlength) > 0), P = $e(!1), $ = $e(), I = $e(0), w = (W) => {
      P.value = !0, $.value = d.value, I.value = W.currentTarget.selectionStart, r("compositionstart", W);
    }, _ = (W) => {
      var K;
      P.value = !1;
      let q = W.currentTarget.value;
      if (C.value) {
        const G = I.value >= e.maxlength + 1 || I.value === ((K = $.value) === null || K === void 0 ? void 0 : K.length);
        q = qC(G, $.value, q, e.maxlength);
      }
      q !== d.value && (H(q), td(W.currentTarget, W, R, q)), r("compositionend", W);
    }, M = fr();
    ke(() => e.value, () => {
      var W;
      "value" in M.vnode.props, u.value = (W = e.value) !== null && W !== void 0 ? W : "";
    });
    const N = (W) => {
      var K;
      r2((K = c.value) === null || K === void 0 ? void 0 : K.textArea, W);
    }, A = () => {
      var W, K;
      (K = (W = c.value) === null || W === void 0 ? void 0 : W.textArea) === null || K === void 0 || K.blur();
    }, H = (W, K) => {
      u.value !== W && (e.value === void 0 ? u.value = W : Yt(() => {
        var q, G, ae;
        c.value.textArea.value !== d.value && ((ae = (q = c.value) === null || q === void 0 ? void 0 : (G = q.instance).update) === null || ae === void 0 || ae.call(G));
      }), Yt(() => {
        K && K();
      }));
    }, B = (W) => {
      W.keyCode === 13 && r("pressEnter", W), r("keydown", W);
    }, F = (W) => {
      const {
        onBlur: K
      } = e;
      K?.(W), a.onFieldBlur();
    }, R = (W) => {
      r("update:value", W.target.value), r("change", W), r("input", W), a.onFieldChange();
    }, X = (W) => {
      td(c.value.textArea, W, R), H("", () => {
        N();
      });
    }, j = (W) => {
      let K = W.target.value;
      if (u.value !== K) {
        if (C.value) {
          const q = W.target, G = q.selectionStart >= e.maxlength + 1 || q.selectionStart === K.length || !q.selectionStart;
          K = qC(G, d.value, K, e.maxlength);
        }
        td(W.currentTarget, W, R, K), H(K);
      }
    }, ee = () => {
      var W, K;
      const {
        class: q
      } = n, {
        bordered: G = !0
      } = e, ae = O(O(O({}, Fn(e, ["allowClear"])), n), {
        class: [{
          [`${f.value}-borderless`]: !G,
          [`${q}`]: q && !S.value,
          [`${f.value}-sm`]: p.value === "small",
          [`${f.value}-lg`]: p.value === "large"
        }, $i(f.value, s.value), m.value],
        disabled: x.value,
        showCount: null,
        prefixCls: f.value,
        onInput: j,
        onChange: j,
        onBlur: F,
        onKeydown: B,
        onCompositionstart: w,
        onCompositionend: _
      });
      return !((W = e.valueModifiers) === null || W === void 0) && W.lazy && delete ae.onInput, h(FU, Q(Q({}, ae), {}, {
        id: (K = ae?.id) !== null && K !== void 0 ? K : a.id.value,
        ref: c,
        maxlength: e.maxlength,
        lazy: e.lazy
      }), null);
    };
    return o({
      focus: N,
      blur: A,
      resizableTextArea: c
    }), It(() => {
      let W = Nb(u.value);
      !P.value && C.value && (e.value === null || e.value === void 0) && (W = s2(W, e.maxlength)), d.value = W;
    }), () => {
      var W;
      const {
        maxlength: K,
        bordered: q = !0,
        hidden: G
      } = e, {
        style: ae,
        class: le
      } = n, ie = O(O(O({}, e), n), {
        prefixCls: f.value,
        inputType: "text",
        handleReset: X,
        direction: v.value,
        bordered: q,
        style: S.value ? void 0 : ae,
        hashId: m.value,
        disabled: (W = e.disabled) !== null && W !== void 0 ? W : x.value
      });
      let re = h(DU, Q(Q({}, ie), {}, {
        value: d.value,
        status: e.status
      }), {
        element: ee
      });
      if (S.value || l.hasFeedback) {
        const te = [...d.value].length;
        let ve = "";
        typeof S.value == "object" ? ve = S.value.formatter({
          value: d.value,
          count: te,
          maxlength: K
        }) : ve = `${te}${C.value ? ` / ${K}` : ""}`, re = h("div", {
          hidden: G,
          class: Me(`${f.value}-textarea`, {
            [`${f.value}-textarea-rtl`]: v.value === "rtl",
            [`${f.value}-textarea-show-count`]: S.value,
            [`${f.value}-textarea-in-form-item`]: l.isFormItemInput
          }, `${f.value}-textarea-show-count`, le, m.value),
          style: ae,
          "data-count": typeof ve != "object" ? ve : void 0
        }, [re, l.hasFeedback && h("span", {
          class: `${f.value}-textarea-suffix`
        }, [l.feedbackIcon])]);
      }
      return g(re);
    };
  }
});
var LU = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, name: "eye", theme: "outlined" };
function YC(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      HU(e, r, n[r]);
    });
  }
  return e;
}
function HU(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var wx = function(t, n) {
  var o = YC({}, t, n.attrs);
  return h(on, YC({}, o, {
    icon: LU
  }), null);
};
wx.displayName = "EyeOutlined";
wx.inheritAttrs = !1;
var VU = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { tag: "path", attrs: { d: "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, name: "eye-invisible", theme: "outlined" };
function GC(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      jU(e, r, n[r]);
    });
  }
  return e;
}
function jU(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Sx = function(t, n) {
  var o = GC({}, t, n.attrs);
  return h(on, GC({}, o, {
    icon: VU
  }), null);
};
Sx.displayName = "EyeInvisibleOutlined";
Sx.inheritAttrs = !1;
var WU = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const KU = {
  click: "onClick",
  hover: "onMouseover"
}, qU = (e) => e ? h(wx, null, null) : h(Sx, null, null), YU = be({
  compatConfig: {
    MODE: 3
  },
  name: "AInputPassword",
  inheritAttrs: !1,
  props: O(O({}, ig()), {
    prefixCls: String,
    inputPrefixCls: String,
    action: {
      type: String,
      default: "click"
    },
    visibilityToggle: {
      type: Boolean,
      default: !0
    },
    visible: {
      type: Boolean,
      default: void 0
    },
    "onUpdate:visible": Function,
    iconRender: Function
  }),
  setup(e, t) {
    let {
      slots: n,
      attrs: o,
      expose: r,
      emit: i
    } = t;
    const a = $e(!1), l = () => {
      const {
        disabled: m
      } = e;
      m || (a.value = !a.value, i("update:visible", a.value));
    };
    It(() => {
      e.visible !== void 0 && (a.value = !!e.visible);
    });
    const s = $e();
    r({
      focus: () => {
        var m;
        (m = s.value) === null || m === void 0 || m.focus();
      },
      blur: () => {
        var m;
        (m = s.value) === null || m === void 0 || m.blur();
      }
    });
    const d = (m) => {
      const {
        action: x,
        iconRender: S = n.iconRender || qU
      } = e, C = KU[x] || "", P = S(a.value), $ = {
        [C]: l,
        class: `${m}-icon`,
        key: "passwordIcon",
        onMousedown: (I) => {
          I.preventDefault();
        },
        onMouseup: (I) => {
          I.preventDefault();
        }
      };
      return Xn(Ao(P) ? P : h("span", null, [P]), $);
    }, {
      prefixCls: f,
      getPrefixCls: p
    } = _t("input-password", e), v = E(() => p("input", e.inputPrefixCls)), g = () => {
      const {
        size: m,
        visibilityToggle: x
      } = e, S = WU(e, ["size", "visibilityToggle"]), C = x && d(f.value), P = Me(f.value, o.class, {
        [`${f.value}-${m}`]: !!m
      }), $ = O(O(O({}, Fn(S, ["suffix", "iconRender", "action"])), o), {
        type: a.value ? "text" : "password",
        class: P,
        prefixCls: v.value,
        suffix: C
      });
      return m && ($.size = m), h(kt, Q({
        ref: s
      }, $), n);
    };
    return () => g();
  }
});
kt.Group = IU;
kt.Search = TU;
kt.TextArea = BU;
kt.Password = YU;
kt.install = function(e) {
  return e.component(kt.name, kt), e.component(kt.Group.name, kt.Group), e.component(kt.Search.name, kt.Search), e.component(kt.TextArea.name, kt.TextArea), e.component(kt.Password.name, kt.Password), e;
};
function Cx() {
  return {
    keyboard: {
      type: Boolean,
      default: void 0
    },
    mask: {
      type: Boolean,
      default: void 0
    },
    afterClose: Function,
    closable: {
      type: Boolean,
      default: void 0
    },
    maskClosable: {
      type: Boolean,
      default: void 0
    },
    visible: {
      type: Boolean,
      default: void 0
    },
    destroyOnClose: {
      type: Boolean,
      default: void 0
    },
    mousePosition: fe.shape({
      x: Number,
      y: Number
    }).loose,
    title: fe.any,
    footer: fe.any,
    transitionName: String,
    maskTransitionName: String,
    animation: fe.any,
    maskAnimation: fe.any,
    wrapStyle: {
      type: Object,
      default: void 0
    },
    bodyStyle: {
      type: Object,
      default: void 0
    },
    maskStyle: {
      type: Object,
      default: void 0
    },
    prefixCls: String,
    wrapClassName: String,
    rootClassName: String,
    width: [String, Number],
    height: [String, Number],
    zIndex: Number,
    bodyProps: fe.any,
    maskProps: fe.any,
    wrapProps: fe.any,
    getContainer: fe.any,
    dialogStyle: {
      type: Object,
      default: void 0
    },
    dialogClass: String,
    closeIcon: fe.any,
    forceRender: {
      type: Boolean,
      default: void 0
    },
    getOpenCount: Function,
    // https://github.com/ant-design/ant-design/issues/19771
    // https://github.com/react-component/dialog/issues/95
    focusTriggerAfterClose: {
      type: Boolean,
      default: void 0
    },
    onClose: Function,
    modalRender: Function
  };
}
function UC(e, t, n) {
  let o = t;
  return !o && n && (o = `${e}-${n}`), o;
}
let XC = -1;
function GU() {
  return XC += 1, XC;
}
function QC(e, t) {
  let n = e[`page${t ? "Y" : "X"}Offset`];
  const o = `scroll${t ? "Top" : "Left"}`;
  if (typeof n != "number") {
    const r = e.document;
    n = r.documentElement[o], typeof n != "number" && (n = r.body[o]);
  }
  return n;
}
function UU(e) {
  const t = e.getBoundingClientRect(), n = {
    left: t.left,
    top: t.top
  }, o = e.ownerDocument, r = o.defaultView || o.parentWindow;
  return n.left += QC(r), n.top += QC(r, !0), n;
}
const XU = {
  width: 0,
  height: 0,
  overflow: "hidden",
  outline: "none"
}, QU = {
  outline: "none"
}, ZU = be({
  compatConfig: {
    MODE: 3
  },
  name: "DialogContent",
  inheritAttrs: !1,
  props: O(O({}, Cx()), {
    motionName: String,
    ariaId: String,
    onVisibleChanged: Function,
    onMousedown: Function,
    onMouseup: Function
  }),
  setup(e, t) {
    let {
      expose: n,
      slots: o,
      attrs: r
    } = t;
    const i = ce(), a = ce(), l = ce();
    n({
      focus: () => {
        var f;
        (f = i.value) === null || f === void 0 || f.focus({
          preventScroll: !0
        });
      },
      changeActive: (f) => {
        const {
          activeElement: p
        } = document;
        f && p === a.value ? i.value.focus({
          preventScroll: !0
        }) : !f && p === i.value && a.value.focus({
          preventScroll: !0
        });
      }
    });
    const s = ce(), u = E(() => {
      const {
        width: f,
        height: p
      } = e, v = {};
      return f !== void 0 && (v.width = typeof f == "number" ? `${f}px` : f), p !== void 0 && (v.height = typeof p == "number" ? `${p}px` : p), s.value && (v.transformOrigin = s.value), v;
    }), c = () => {
      Yt(() => {
        if (l.value) {
          const f = UU(l.value);
          s.value = e.mousePosition ? `${e.mousePosition.x - f.left}px ${e.mousePosition.y - f.top}px` : "";
        }
      });
    }, d = (f) => {
      e.onVisibleChanged(f);
    };
    return () => {
      var f, p, v, g;
      const {
        prefixCls: m,
        footer: x = (f = o.footer) === null || f === void 0 ? void 0 : f.call(o),
        title: S = (p = o.title) === null || p === void 0 ? void 0 : p.call(o),
        ariaId: C,
        closable: P,
        closeIcon: $ = (v = o.closeIcon) === null || v === void 0 ? void 0 : v.call(o),
        onClose: I,
        bodyStyle: w,
        bodyProps: _,
        onMousedown: M,
        onMouseup: N,
        visible: A,
        modalRender: H = o.modalRender,
        destroyOnClose: B,
        motionName: F
      } = e;
      let R;
      x && (R = h("div", {
        class: `${m}-footer`
      }, [x]));
      let X;
      S && (X = h("div", {
        class: `${m}-header`
      }, [h("div", {
        class: `${m}-title`,
        id: C
      }, [S])]));
      let j;
      P && (j = h("button", {
        type: "button",
        onClick: I,
        "aria-label": "Close",
        class: `${m}-close`
      }, [$ || h("span", {
        class: `${m}-close-x`
      }, null)]));
      const ee = h("div", {
        class: `${m}-content`
      }, [j, X, h("div", Q({
        class: `${m}-body`,
        style: w
      }, _), [(g = o.default) === null || g === void 0 ? void 0 : g.call(o)]), R]), W = Ms(F);
      return h(Er, Q(Q({}, W), {}, {
        onBeforeEnter: c,
        onAfterEnter: () => d(!0),
        onAfterLeave: () => d(!1)
      }), {
        default: () => [A || !B ? ti(h("div", Q(Q({}, r), {}, {
          ref: l,
          key: "dialog-element",
          role: "document",
          style: [u.value, r.style],
          class: [m, r.class],
          onMousedown: M,
          onMouseup: N
        }), [h("div", {
          tabindex: 0,
          ref: i,
          style: QU
        }, [H ? H({
          originVNode: ee
        }) : ee]), h("div", {
          tabindex: 0,
          ref: a,
          style: XU
        }, null)]), [[Oi, A]]) : null]
      });
    };
  }
}), JU = be({
  compatConfig: {
    MODE: 3
  },
  name: "DialogMask",
  props: {
    prefixCls: String,
    visible: Boolean,
    motionName: String,
    maskProps: Object
  },
  setup(e, t) {
    return () => {
      const {
        prefixCls: n,
        visible: o,
        maskProps: r,
        motionName: i
      } = e, a = Ms(i);
      return h(Er, a, {
        default: () => [ti(h("div", Q({
          class: `${n}-mask`
        }, r), null), [[Oi, o]])]
      });
    };
  }
}), ZC = be({
  compatConfig: {
    MODE: 3
  },
  name: "VcDialog",
  inheritAttrs: !1,
  props: kn(O(O({}, Cx()), {
    getOpenCount: Function,
    scrollLocker: Object
  }), {
    mask: !0,
    visible: !1,
    keyboard: !0,
    closable: !0,
    maskClosable: !0,
    destroyOnClose: !1,
    prefixCls: "rc-dialog",
    getOpenCount: () => null,
    focusTriggerAfterClose: !0
  }),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const r = $e(), i = $e(), a = $e(), l = $e(e.visible), s = $e(`vcDialogTitle${GU()}`), u = (x) => {
      var S, C;
      if (x)
        bl(i.value, document.activeElement) || (r.value = document.activeElement, (S = a.value) === null || S === void 0 || S.focus());
      else {
        const P = l.value;
        if (l.value = !1, e.mask && r.value && e.focusTriggerAfterClose) {
          try {
            r.value.focus({
              preventScroll: !0
            });
          } catch {
          }
          r.value = null;
        }
        P && ((C = e.afterClose) === null || C === void 0 || C.call(e));
      }
    }, c = (x) => {
      var S;
      (S = e.onClose) === null || S === void 0 || S.call(e, x);
    }, d = $e(!1), f = $e(), p = () => {
      clearTimeout(f.value), d.value = !0;
    }, v = () => {
      f.value = setTimeout(() => {
        d.value = !1;
      });
    }, g = (x) => {
      if (!e.maskClosable) return null;
      d.value ? d.value = !1 : i.value === x.target && c(x);
    }, m = (x) => {
      if (e.keyboard && x.keyCode === it.ESC) {
        x.stopPropagation(), c(x);
        return;
      }
      e.visible && x.keyCode === it.TAB && a.value.changeActive(!x.shiftKey);
    };
    return ke(() => e.visible, () => {
      e.visible && (l.value = !0);
    }, {
      flush: "post"
    }), qt(() => {
      var x;
      clearTimeout(f.value), (x = e.scrollLocker) === null || x === void 0 || x.unLock();
    }), It(() => {
      var x, S;
      (x = e.scrollLocker) === null || x === void 0 || x.unLock(), l.value && ((S = e.scrollLocker) === null || S === void 0 || S.lock());
    }), () => {
      const {
        prefixCls: x,
        mask: S,
        visible: C,
        maskTransitionName: P,
        maskAnimation: $,
        zIndex: I,
        wrapClassName: w,
        rootClassName: _,
        wrapStyle: M,
        closable: N,
        maskProps: A,
        maskStyle: H,
        transitionName: B,
        animation: F,
        wrapProps: R,
        title: X = o.title
      } = e, {
        style: j,
        class: ee
      } = n;
      return h("div", Q({
        class: [`${x}-root`, _]
      }, Bs(e, {
        data: !0
      })), [h(JU, {
        prefixCls: x,
        visible: S && C,
        motionName: UC(x, P, $),
        style: O({
          zIndex: I
        }, H),
        maskProps: A
      }, null), h("div", Q({
        tabIndex: -1,
        onKeydown: m,
        class: Me(`${x}-wrap`, w),
        ref: i,
        onClick: g,
        role: "dialog",
        "aria-labelledby": X ? s.value : null,
        style: O(O({
          zIndex: I
        }, M), {
          display: l.value ? null : "none"
        })
      }, R), [h(ZU, Q(Q({}, Fn(e, ["scrollLocker"])), {}, {
        style: j,
        class: ee,
        onMousedown: p,
        onMouseup: v,
        ref: a,
        closable: N,
        ariaId: s.value,
        prefixCls: x,
        visible: C,
        onClose: c,
        onVisibleChanged: u,
        motionName: UC(x, B, F)
      }), o)])]);
    };
  }
}), eX = Cx(), tX = be({
  compatConfig: {
    MODE: 3
  },
  name: "DialogWrap",
  inheritAttrs: !1,
  props: kn(eX, {
    visible: !1
  }),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const r = ce(e.visible);
    return h0({}, {
      inTriggerContext: !1
    }), ke(() => e.visible, () => {
      e.visible && (r.value = !0);
    }, {
      flush: "post"
    }), () => {
      const {
        visible: i,
        getContainer: a,
        forceRender: l,
        destroyOnClose: s = !1,
        afterClose: u
      } = e;
      let c = O(O(O({}, e), n), {
        ref: "_component",
        key: "dialog"
      });
      return a === !1 ? h(ZC, Q(Q({}, c), {}, {
        getOpenCount: () => 2
      }), o) : !l && s && !r.value ? null : h(g0, {
        autoLock: !0,
        visible: i,
        forceRender: l,
        getContainer: a
      }, {
        default: (d) => (c = O(O(O({}, c), d), {
          afterClose: () => {
            u?.(), r.value = !1;
          }
        }), h(ZC, c, o))
      });
    };
  }
});
function JC(e) {
  return {
    position: e,
    top: 0,
    insetInlineEnd: 0,
    bottom: 0,
    insetInlineStart: 0
  };
}
const nX = (e) => {
  const {
    componentCls: t
  } = e;
  return [{
    [`${t}-root`]: {
      [`${t}${e.antCls}-zoom-enter, ${t}${e.antCls}-zoom-appear`]: {
        // reset scale avoid mousePosition bug
        transform: "none",
        opacity: 0,
        animationDuration: e.motionDurationSlow,
        // https://github.com/ant-design/ant-design/issues/11777
        userSelect: "none"
      },
      [`${t}${e.antCls}-zoom-leave ${t}-content`]: {
        pointerEvents: "none"
      },
      [`${t}-mask`]: O(O({}, JC("fixed")), {
        zIndex: e.zIndexPopupBase,
        height: "100%",
        backgroundColor: e.colorBgMask,
        [`${t}-hidden`]: {
          display: "none"
        }
      }),
      [`${t}-wrap`]: O(O({}, JC("fixed")), {
        overflow: "auto",
        outline: 0,
        WebkitOverflowScrolling: "touch"
      })
    }
  }, {
    [`${t}-root`]: XV(e)
  }];
}, oX = (e) => {
  const {
    componentCls: t
  } = e;
  return [
    // ======================== Root =========================
    {
      [`${t}-root`]: {
        [`${t}-wrap`]: {
          zIndex: e.zIndexPopupBase,
          position: "fixed",
          inset: 0,
          overflow: "auto",
          outline: 0,
          WebkitOverflowScrolling: "touch"
        },
        [`${t}-wrap-rtl`]: {
          direction: "rtl"
        },
        [`${t}-centered`]: {
          textAlign: "center",
          "&::before": {
            display: "inline-block",
            width: 0,
            height: "100%",
            verticalAlign: "middle",
            content: '""'
          },
          [t]: {
            top: 0,
            display: "inline-block",
            paddingBottom: 0,
            textAlign: "start",
            verticalAlign: "middle"
          }
        },
        [`@media (max-width: ${e.screenSMMax})`]: {
          [t]: {
            maxWidth: "calc(100vw - 16px)",
            margin: `${e.marginXS} auto`
          },
          [`${t}-centered`]: {
            [t]: {
              flex: 1
            }
          }
        }
      }
    },
    // ======================== Modal ========================
    {
      [t]: O(O({}, fn(e)), {
        pointerEvents: "none",
        position: "relative",
        top: 100,
        width: "auto",
        maxWidth: `calc(100vw - ${e.margin * 2}px)`,
        margin: "0 auto",
        paddingBottom: e.paddingLG,
        [`${t}-title`]: {
          margin: 0,
          color: e.modalHeadingColor,
          fontWeight: e.fontWeightStrong,
          fontSize: e.modalHeaderTitleFontSize,
          lineHeight: e.modalHeaderTitleLineHeight,
          wordWrap: "break-word"
        },
        [`${t}-content`]: {
          position: "relative",
          backgroundColor: e.modalContentBg,
          backgroundClip: "padding-box",
          border: 0,
          borderRadius: e.borderRadiusLG,
          boxShadow: e.boxShadowSecondary,
          pointerEvents: "auto",
          padding: `${e.paddingMD}px ${e.paddingContentHorizontalLG}px`
        },
        [`${t}-close`]: O({
          position: "absolute",
          top: (e.modalHeaderCloseSize - e.modalCloseBtnSize) / 2,
          insetInlineEnd: (e.modalHeaderCloseSize - e.modalCloseBtnSize) / 2,
          zIndex: e.zIndexPopupBase + 10,
          padding: 0,
          color: e.modalCloseColor,
          fontWeight: e.fontWeightStrong,
          lineHeight: 1,
          textDecoration: "none",
          background: "transparent",
          borderRadius: e.borderRadiusSM,
          width: e.modalConfirmIconSize,
          height: e.modalConfirmIconSize,
          border: 0,
          outline: 0,
          cursor: "pointer",
          transition: `color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,
          "&-x": {
            display: "block",
            fontSize: e.fontSizeLG,
            fontStyle: "normal",
            lineHeight: `${e.modalCloseBtnSize}px`,
            textAlign: "center",
            textTransform: "none",
            textRendering: "auto"
          },
          "&:hover": {
            color: e.modalIconHoverColor,
            backgroundColor: e.wireframe ? "transparent" : e.colorFillContent,
            textDecoration: "none"
          },
          "&:active": {
            backgroundColor: e.wireframe ? "transparent" : e.colorFillContentHover
          }
        }, Nl(e)),
        [`${t}-header`]: {
          color: e.colorText,
          background: e.modalHeaderBg,
          borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,
          marginBottom: e.marginXS
        },
        [`${t}-body`]: {
          fontSize: e.fontSize,
          lineHeight: e.lineHeight,
          wordWrap: "break-word"
        },
        [`${t}-footer`]: {
          textAlign: "end",
          background: e.modalFooterBg,
          marginTop: e.marginSM,
          [`${e.antCls}-btn + ${e.antCls}-btn:not(${e.antCls}-dropdown-trigger)`]: {
            marginBottom: 0,
            marginInlineStart: e.marginXS
          }
        },
        [`${t}-open`]: {
          overflow: "hidden"
        }
      })
    },
    // ======================== Pure =========================
    {
      [`${t}-pure-panel`]: {
        top: "auto",
        padding: 0,
        display: "flex",
        flexDirection: "column",
        [`${t}-content,
          ${t}-body,
          ${t}-confirm-body-wrapper`]: {
          display: "flex",
          flexDirection: "column",
          flex: "auto"
        },
        [`${t}-confirm-body`]: {
          marginBottom: "auto"
        }
      }
    }
  ];
}, rX = (e) => {
  const {
    componentCls: t
  } = e, n = `${t}-confirm`;
  return {
    [n]: {
      "&-rtl": {
        direction: "rtl"
      },
      [`${e.antCls}-modal-header`]: {
        display: "none"
      },
      [`${n}-body-wrapper`]: O({}, Va()),
      [`${n}-body`]: {
        display: "flex",
        flexWrap: "wrap",
        alignItems: "center",
        [`${n}-title`]: {
          flex: "0 0 100%",
          display: "block",
          // create BFC to avoid
          // https://user-images.githubusercontent.com/507615/37702510-ba844e06-2d2d-11e8-9b67-8e19be57f445.png
          overflow: "hidden",
          color: e.colorTextHeading,
          fontWeight: e.fontWeightStrong,
          fontSize: e.modalHeaderTitleFontSize,
          lineHeight: e.modalHeaderTitleLineHeight,
          [`+ ${n}-content`]: {
            marginBlockStart: e.marginXS,
            flexBasis: "100%",
            maxWidth: `calc(100% - ${e.modalConfirmIconSize + e.marginSM}px)`
          }
        },
        [`${n}-content`]: {
          color: e.colorText,
          fontSize: e.fontSize
        },
        [`> ${e.iconCls}`]: {
          flex: "none",
          marginInlineEnd: e.marginSM,
          fontSize: e.modalConfirmIconSize,
          [`+ ${n}-title`]: {
            flex: 1
          },
          // `content` after `icon` should set marginLeft
          [`+ ${n}-title + ${n}-content`]: {
            marginInlineStart: e.modalConfirmIconSize + e.marginSM
          }
        }
      },
      [`${n}-btns`]: {
        textAlign: "end",
        marginTop: e.marginSM,
        [`${e.antCls}-btn + ${e.antCls}-btn`]: {
          marginBottom: 0,
          marginInlineStart: e.marginXS
        }
      }
    },
    [`${n}-error ${n}-body > ${e.iconCls}`]: {
      color: e.colorError
    },
    [`${n}-warning ${n}-body > ${e.iconCls},
        ${n}-confirm ${n}-body > ${e.iconCls}`]: {
      color: e.colorWarning
    },
    [`${n}-info ${n}-body > ${e.iconCls}`]: {
      color: e.colorInfo
    },
    [`${n}-success ${n}-body > ${e.iconCls}`]: {
      color: e.colorSuccess
    },
    // https://github.com/ant-design/ant-design/issues/37329
    [`${t}-zoom-leave ${t}-btns`]: {
      pointerEvents: "none"
    }
  };
}, iX = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-root`]: {
      [`${t}-wrap-rtl`]: {
        direction: "rtl",
        [`${t}-confirm-body`]: {
          direction: "rtl"
        }
      }
    }
  };
}, aX = (e) => {
  const {
    componentCls: t,
    antCls: n
  } = e, o = `${t}-confirm`;
  return {
    [t]: {
      [`${t}-content`]: {
        padding: 0
      },
      [`${t}-header`]: {
        padding: e.modalHeaderPadding,
        borderBottom: `${e.modalHeaderBorderWidth}px ${e.modalHeaderBorderStyle} ${e.modalHeaderBorderColorSplit}`,
        marginBottom: 0
      },
      [`${t}-body`]: {
        padding: e.modalBodyPadding
      },
      [`${t}-footer`]: {
        padding: `${e.modalFooterPaddingVertical}px ${e.modalFooterPaddingHorizontal}px`,
        borderTop: `${e.modalFooterBorderWidth}px ${e.modalFooterBorderStyle} ${e.modalFooterBorderColorSplit}`,
        borderRadius: `0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`,
        marginTop: 0
      }
    },
    [o]: {
      [`${n}-modal-body`]: {
        padding: `${e.padding * 2}px ${e.padding * 2}px ${e.paddingLG}px`
      },
      [`${o}-body`]: {
        [`> ${e.iconCls}`]: {
          marginInlineEnd: e.margin,
          // `content` after `icon` should set marginLeft
          [`+ ${o}-title + ${o}-content`]: {
            marginInlineStart: e.modalConfirmIconSize + e.margin
          }
        }
      },
      [`${o}-btns`]: {
        marginTop: e.marginLG
      }
    }
  };
}, lX = Sn("Modal", (e) => {
  const t = e.padding, n = e.fontSizeHeading5, o = e.lineHeightHeading5, r = Qt(e, {
    modalBodyPadding: e.paddingLG,
    modalHeaderBg: e.colorBgElevated,
    modalHeaderPadding: `${t}px ${e.paddingLG}px`,
    modalHeaderBorderWidth: e.lineWidth,
    modalHeaderBorderStyle: e.lineType,
    modalHeaderTitleLineHeight: o,
    modalHeaderTitleFontSize: n,
    modalHeaderBorderColorSplit: e.colorSplit,
    modalHeaderCloseSize: o * n + t * 2,
    modalContentBg: e.colorBgElevated,
    modalHeadingColor: e.colorTextHeading,
    modalCloseColor: e.colorTextDescription,
    modalFooterBg: "transparent",
    modalFooterBorderColorSplit: e.colorSplit,
    modalFooterBorderStyle: e.lineType,
    modalFooterPaddingVertical: e.paddingXS,
    modalFooterPaddingHorizontal: e.padding,
    modalFooterBorderWidth: e.lineWidth,
    modalConfirmTitleFontSize: e.fontSizeLG,
    modalIconHoverColor: e.colorIconHover,
    modalConfirmIconSize: e.fontSize * e.lineHeight,
    modalCloseBtnSize: e.controlHeightLG * 0.55
  });
  return [oX(r), rX(r), iX(r), nX(r), e.wireframe && aX(r), zd(r, "zoom")];
});
var sX = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z" } }] }, name: "up", theme: "outlined" };
function e$(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      uX(e, r, n[r]);
    });
  }
  return e;
}
function uX(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var $x = function(t, n) {
  var o = e$({}, t, n.attrs);
  return h(on, e$({}, o, {
    icon: sX
  }), null);
};
$x.displayName = "UpOutlined";
$x.inheritAttrs = !1;
function Rb() {
  return typeof BigInt == "function";
}
function nd(e) {
  let t = e.trim(), n = t.startsWith("-");
  n && (t = t.slice(1)), t = t.replace(/(\.\d*[^0])0*$/, "$1").replace(/\.0*$/, "").replace(/^0+/, ""), t.startsWith(".") && (t = `0${t}`);
  const o = t || "0", r = o.split("."), i = r[0] || "0", a = r[1] || "0";
  i === "0" && a === "0" && (n = !1);
  const l = n ? "-" : "";
  return {
    negative: n,
    negativeStr: l,
    trimStr: o,
    integerStr: i,
    decimalStr: a,
    fullStr: `${l}${o}`
  };
}
function Px(e) {
  const t = String(e);
  return !Number.isNaN(Number(t)) && t.includes("e");
}
function Cd(e) {
  const t = String(e);
  if (Px(e)) {
    let n = Number(t.slice(t.indexOf("e-") + 2));
    const o = t.match(/\.(\d+)/);
    return o?.[1] && (n += o[1].length), n;
  }
  return t.includes(".") && kx(t) ? t.length - t.indexOf(".") - 1 : 0;
}
function Ox(e) {
  let t = String(e);
  if (Px(e)) {
    if (e > Number.MAX_SAFE_INTEGER)
      return String(Rb() ? BigInt(e).toString() : Number.MAX_SAFE_INTEGER);
    if (e < Number.MIN_SAFE_INTEGER)
      return String(Rb() ? BigInt(e).toString() : Number.MIN_SAFE_INTEGER);
    t = e.toFixed(Cd(t));
  }
  return nd(t).fullStr;
}
function kx(e) {
  return typeof e == "number" ? !Number.isNaN(e) : e ? (
    // Normal type: 11.28
    /^\s*-?\d+(\.\d+)?\s*$/.test(e) || // Pre-number: 1.
    /^\s*-?\d+\.\s*$/.test(e) || // Post-number: .1
    /^\s*-?\.\d+\s*$/.test(e)
  ) : !1;
}
function u2(e) {
  return !e && e !== 0 && !Number.isNaN(e) || !String(e).trim();
}
class hs {
  constructor(t) {
    if (this.origin = "", u2(t)) {
      this.empty = !0;
      return;
    }
    this.origin = String(t), this.number = Number(t);
  }
  negate() {
    return new hs(-this.toNumber());
  }
  add(t) {
    if (this.isInvalidate())
      return new hs(t);
    const n = Number(t);
    if (Number.isNaN(n))
      return this;
    const o = this.number + n;
    if (o > Number.MAX_SAFE_INTEGER)
      return new hs(Number.MAX_SAFE_INTEGER);
    if (o < Number.MIN_SAFE_INTEGER)
      return new hs(Number.MIN_SAFE_INTEGER);
    const r = Math.max(Cd(this.number), Cd(n));
    return new hs(o.toFixed(r));
  }
  isEmpty() {
    return this.empty;
  }
  isNaN() {
    return Number.isNaN(this.number);
  }
  isInvalidate() {
    return this.isEmpty() || this.isNaN();
  }
  equals(t) {
    return this.toNumber() === t?.toNumber();
  }
  lessEquals(t) {
    return this.add(t.negate().toString()).toNumber() <= 0;
  }
  toNumber() {
    return this.number;
  }
  toString() {
    return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" : Ox(this.number) : this.origin;
  }
}
class Su {
  constructor(t) {
    if (this.origin = "", u2(t)) {
      this.empty = !0;
      return;
    }
    if (this.origin = String(t), t === "-" || Number.isNaN(t)) {
      this.nan = !0;
      return;
    }
    let n = t;
    if (Px(n) && (n = Number(n)), n = typeof n == "string" ? n : Ox(n), kx(n)) {
      const o = nd(n);
      this.negative = o.negative;
      const r = o.trimStr.split(".");
      this.integer = BigInt(r[0]);
      const i = r[1] || "0";
      this.decimal = BigInt(i), this.decimalLen = i.length;
    } else
      this.nan = !0;
  }
  getMark() {
    return this.negative ? "-" : "";
  }
  getIntegerStr() {
    return this.integer.toString();
  }
  getDecimalStr() {
    return this.decimal.toString().padStart(this.decimalLen, "0");
  }
  /**
   * Align BigIntDecimal with same decimal length. e.g. 12.3 + 5 = 1230000
   * This is used for add function only.
   */
  alignDecimal(t) {
    const n = `${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(t, "0")}`;
    return BigInt(n);
  }
  negate() {
    const t = new Su(this.toString());
    return t.negative = !t.negative, t;
  }
  add(t) {
    if (this.isInvalidate())
      return new Su(t);
    const n = new Su(t);
    if (n.isInvalidate())
      return this;
    const o = Math.max(this.getDecimalStr().length, n.getDecimalStr().length), r = this.alignDecimal(o), i = n.alignDecimal(o), a = (r + i).toString(), {
      negativeStr: l,
      trimStr: s
    } = nd(a), u = `${l}${s.padStart(o + 1, "0")}`;
    return new Su(`${u.slice(0, -o)}.${u.slice(-o)}`);
  }
  isEmpty() {
    return this.empty;
  }
  isNaN() {
    return this.nan;
  }
  isInvalidate() {
    return this.isEmpty() || this.isNaN();
  }
  equals(t) {
    return this.toString() === t?.toString();
  }
  lessEquals(t) {
    return this.add(t.negate().toString()).toNumber() <= 0;
  }
  toNumber() {
    return this.isNaN() ? NaN : Number(this.toString());
  }
  toString() {
    return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" : nd(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr : this.origin;
  }
}
function Ki(e) {
  return Rb() ? new Su(e) : new hs(e);
}
function zb(e, t, n) {
  let o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  if (e === "")
    return "";
  const {
    negativeStr: r,
    integerStr: i,
    decimalStr: a
  } = nd(e), l = `${t}${a}`, s = `${r}${i}`;
  if (n >= 0) {
    const u = Number(a[n]);
    if (u >= 5 && !o) {
      const c = Ki(e).add(`${r}0.${"0".repeat(n)}${10 - u}`);
      return zb(c.toString(), t, n, o);
    }
    return n === 0 ? s : `${s}${t}${a.padEnd(n, "0").slice(0, n)}`;
  }
  return l === ".0" ? s : `${s}${l}`;
}
const cX = 200, dX = 600, fX = be({
  compatConfig: {
    MODE: 3
  },
  name: "StepHandler",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    upDisabled: Boolean,
    downDisabled: Boolean,
    onStep: et()
  },
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      emit: o
    } = t;
    const r = ce(), i = (l, s) => {
      l.preventDefault(), o("step", s);
      function u() {
        o("step", s), r.value = setTimeout(u, cX);
      }
      r.value = setTimeout(u, dX);
    }, a = () => {
      clearTimeout(r.value);
    };
    return qt(() => {
      a();
    }), () => {
      if (b0())
        return null;
      const {
        prefixCls: l,
        upDisabled: s,
        downDisabled: u
      } = e, c = `${l}-handler`, d = Me(c, `${c}-up`, {
        [`${c}-up-disabled`]: s
      }), f = Me(c, `${c}-down`, {
        [`${c}-down-disabled`]: u
      }), p = {
        unselectable: "on",
        role: "button",
        onMouseup: a,
        onMouseleave: a
      }, {
        upNode: v,
        downNode: g
      } = n;
      return h("div", {
        class: `${c}-wrap`
      }, [h("span", Q(Q({}, p), {}, {
        onMousedown: (m) => {
          i(m, !0);
        },
        "aria-label": "Increase Value",
        "aria-disabled": s,
        class: d
      }), [v?.() || h("span", {
        unselectable: "on",
        class: `${l}-handler-up-inner`
      }, null)]), h("span", Q(Q({}, p), {}, {
        onMousedown: (m) => {
          i(m, !1);
        },
        "aria-label": "Decrease Value",
        "aria-disabled": u,
        class: f
      }), [g?.() || h("span", {
        unselectable: "on",
        class: `${l}-handler-down-inner`
      }, null)])]);
    };
  }
});
function pX(e, t) {
  const n = ce(null);
  function o() {
    try {
      const {
        selectionStart: i,
        selectionEnd: a,
        value: l
      } = e.value, s = l.substring(0, i), u = l.substring(a);
      n.value = {
        start: i,
        end: a,
        value: l,
        beforeTxt: s,
        afterTxt: u
      };
    } catch {
    }
  }
  function r() {
    if (e.value && n.value && t.value)
      try {
        const {
          value: i
        } = e.value, {
          beforeTxt: a,
          afterTxt: l,
          start: s
        } = n.value;
        let u = i.length;
        if (i.endsWith(l))
          u = i.length - n.value.afterTxt.length;
        else if (i.startsWith(a))
          u = a.length;
        else {
          const c = a[s - 1], d = i.indexOf(c, s - 1);
          d !== -1 && (u = d + 1);
        }
        e.value.setSelectionRange(u, u);
      } catch (i) {
        wn(!1, `Something warning of cursor restore. Please fire issue about this: ${i.message}`);
      }
  }
  return [o, r];
}
const hX = (() => {
  const e = $e(0), t = () => {
    Vt.cancel(e.value);
  };
  return qt(() => {
    t();
  }), (n) => {
    t(), e.value = Vt(() => {
      n();
    });
  };
});
var gX = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const t$ = (e, t) => e || t.isEmpty() ? t.toString() : t.toNumber(), n$ = (e) => {
  const t = Ki(e);
  return t.isInvalidate() ? null : t;
}, c2 = () => ({
  /** value will show as string */
  stringMode: ct(),
  defaultValue: en([String, Number]),
  value: en([String, Number]),
  prefixCls: an(),
  min: en([String, Number]),
  max: en([String, Number]),
  step: en([String, Number], 1),
  tabindex: Number,
  controls: ct(!0),
  readonly: ct(),
  disabled: ct(),
  autofocus: ct(),
  keyboard: ct(!0),
  /** Parse display value to validate number */
  parser: et(),
  /** Transform `value` to display value show in input */
  formatter: et(),
  /** Syntactic sugar of `formatter`. Config precision of display. */
  precision: Number,
  /** Syntactic sugar of `formatter`. Config decimal separator of display. */
  decimalSeparator: String,
  onInput: et(),
  onChange: et(),
  onPressEnter: et(),
  onStep: et(),
  onBlur: et(),
  onFocus: et()
}), vX = be({
  compatConfig: {
    MODE: 3
  },
  name: "InnerInputNumber",
  inheritAttrs: !1,
  props: O(O({}, c2()), {
    lazy: Boolean
  }),
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: r,
      expose: i
    } = t;
    const a = $e(), l = $e(!1), s = $e(!1), u = $e(!1), c = $e(Ki(e.value));
    function d(G) {
      e.value === void 0 && (c.value = G);
    }
    const f = (G, ae) => {
      if (!ae)
        return e.precision >= 0 ? e.precision : Math.max(Cd(G), Cd(e.step));
    }, p = (G) => {
      const ae = String(G);
      if (e.parser)
        return e.parser(ae);
      let le = ae;
      return e.decimalSeparator && (le = le.replace(e.decimalSeparator, ".")), le.replace(/[^\w.-]+/g, "");
    }, v = $e(""), g = (G, ae) => {
      if (e.formatter)
        return e.formatter(G, {
          userTyping: ae,
          input: String(v.value)
        });
      let le = typeof G == "number" ? Ox(G) : G;
      if (!ae) {
        const ie = f(le, ae);
        if (kx(le) && (e.decimalSeparator || ie >= 0)) {
          const re = e.decimalSeparator || ".";
          le = zb(le, re, ie);
        }
      }
      return le;
    }, m = (() => {
      const G = e.value;
      return c.value.isInvalidate() && ["string", "number"].includes(typeof G) ? Number.isNaN(G) ? "" : G : g(c.value.toString(), !1);
    })();
    v.value = m;
    function x(G, ae) {
      v.value = g(
        // Invalidate number is sometime passed by external control, we should let it go
        // Otherwise is controlled by internal interactive logic which check by userTyping
        // You can ref 'show limited value when input is not focused' test for more info.
        G.isInvalidate() ? G.toString(!1) : G.toString(!ae),
        ae
      );
    }
    const S = E(() => n$(e.max)), C = E(() => n$(e.min)), P = E(() => !S.value || !c.value || c.value.isInvalidate() ? !1 : S.value.lessEquals(c.value)), $ = E(() => !C.value || !c.value || c.value.isInvalidate() ? !1 : c.value.lessEquals(C.value)), [I, w] = pX(a, l), _ = (G) => S.value && !G.lessEquals(S.value) ? S.value : C.value && !C.value.lessEquals(G) ? C.value : null, M = (G) => !_(G), N = (G, ae) => {
      var le;
      let ie = G, re = M(ie) || ie.isEmpty();
      if (!ie.isEmpty() && !ae && (ie = _(ie) || ie, re = !0), !e.readonly && !e.disabled && re) {
        const te = ie.toString(), ve = f(te, ae);
        return ve >= 0 && (ie = Ki(zb(te, ".", ve))), ie.equals(c.value) || (d(ie), (le = e.onChange) === null || le === void 0 || le.call(e, ie.isEmpty() ? null : t$(e.stringMode, ie)), e.value === void 0 && x(ie, ae)), ie;
      }
      return c.value;
    }, A = hX(), H = (G) => {
      var ae;
      if (I(), v.value = G, !u.value) {
        const le = p(G), ie = Ki(le);
        ie.isNaN() || N(ie, !0);
      }
      (ae = e.onInput) === null || ae === void 0 || ae.call(e, G), A(() => {
        let le = G;
        e.parser || (le = G.replace(/。/g, ".")), le !== G && H(le);
      });
    }, B = () => {
      u.value = !0;
    }, F = () => {
      u.value = !1, H(a.value.value);
    }, R = (G) => {
      H(G.target.value);
    }, X = (G) => {
      var ae, le;
      if (G && P.value || !G && $.value)
        return;
      s.value = !1;
      let ie = Ki(e.step);
      G || (ie = ie.negate());
      const re = (c.value || Ki(0)).add(ie.toString()), te = N(re, !1);
      (ae = e.onStep) === null || ae === void 0 || ae.call(e, t$(e.stringMode, te), {
        offset: e.step,
        type: G ? "up" : "down"
      }), (le = a.value) === null || le === void 0 || le.focus();
    }, j = (G) => {
      const ae = Ki(p(v.value));
      let le = ae;
      ae.isNaN() ? le = c.value : le = N(ae, G), e.value !== void 0 ? x(c.value, !1) : le.isNaN() || x(le, !1);
    }, ee = () => {
      s.value = !0;
    }, W = (G) => {
      var ae;
      const {
        which: le
      } = G;
      s.value = !0, le === it.ENTER && (u.value || (s.value = !1), j(!1), (ae = e.onPressEnter) === null || ae === void 0 || ae.call(e, G)), e.keyboard !== !1 && !u.value && [it.UP, it.DOWN].includes(le) && (X(it.UP === le), G.preventDefault());
    }, K = () => {
      s.value = !1;
    }, q = (G) => {
      j(!1), l.value = !1, s.value = !1, r("blur", G);
    };
    return ke(() => e.precision, () => {
      c.value.isInvalidate() || x(c.value, !1);
    }, {
      flush: "post"
    }), ke(() => e.value, () => {
      const G = Ki(e.value);
      c.value = G;
      const ae = Ki(p(v.value));
      (!G.equals(ae) || !s.value || e.formatter) && x(G, s.value);
    }, {
      flush: "post"
    }), ke(v, () => {
      e.formatter && w();
    }, {
      flush: "post"
    }), ke(() => e.disabled, (G) => {
      G && (l.value = !1);
    }), i({
      focus: () => {
        var G;
        (G = a.value) === null || G === void 0 || G.focus();
      },
      blur: () => {
        var G;
        (G = a.value) === null || G === void 0 || G.blur();
      }
    }), () => {
      const G = O(O({}, n), e), {
        prefixCls: ae = "rc-input-number",
        min: le,
        max: ie,
        step: re = 1,
        defaultValue: te,
        value: ve,
        disabled: ue,
        readonly: pe,
        keyboard: ge,
        controls: _e = !0,
        autofocus: ze,
        stringMode: Ke,
        parser: He,
        formatter: Ne,
        precision: Xe,
        decimalSeparator: De,
        onChange: Fe,
        onInput: Ve,
        onPressEnter: nt,
        onStep: je,
        lazy: Pe,
        class: Ge,
        style: Se
      } = G, Ce = gX(G, ["prefixCls", "min", "max", "step", "defaultValue", "value", "disabled", "readonly", "keyboard", "controls", "autofocus", "stringMode", "parser", "formatter", "precision", "decimalSeparator", "onChange", "onInput", "onPressEnter", "onStep", "lazy", "class", "style"]), {
        upHandler: Ae,
        downHandler: qe
      } = o, We = `${ae}-input`, tt = {};
      return Pe ? tt.onChange = R : tt.onInput = R, h("div", {
        class: Me(ae, Ge, {
          [`${ae}-focused`]: l.value,
          [`${ae}-disabled`]: ue,
          [`${ae}-readonly`]: pe,
          [`${ae}-not-a-number`]: c.value.isNaN(),
          [`${ae}-out-of-range`]: !c.value.isInvalidate() && !M(c.value)
        }),
        style: Se,
        onKeydown: W,
        onKeyup: K
      }, [_e && h(fX, {
        prefixCls: ae,
        upDisabled: P.value,
        downDisabled: $.value,
        onStep: X
      }, {
        upNode: Ae,
        downNode: qe
      }), h("div", {
        class: `${We}-wrap`
      }, [h("input", Q(Q(Q({
        autofocus: ze,
        autocomplete: "off",
        role: "spinbutton",
        "aria-valuemin": le,
        "aria-valuemax": ie,
        "aria-valuenow": c.value.isInvalidate() ? null : c.value.toString(),
        step: re
      }, Ce), {}, {
        ref: a,
        class: We,
        value: v.value,
        disabled: ue,
        readonly: pe,
        onFocus: (Ee) => {
          l.value = !0, r("focus", Ee);
        }
      }, tt), {}, {
        onBlur: q,
        onCompositionstart: B,
        onCompositionend: F,
        onBeforeinput: ee
      }), null)])]);
    };
  }
});
function Ev(e) {
  return e != null;
}
const mX = (e) => {
  const {
    componentCls: t,
    lineWidth: n,
    lineType: o,
    colorBorder: r,
    borderRadius: i,
    fontSizeLG: a,
    controlHeightLG: l,
    controlHeightSM: s,
    colorError: u,
    inputPaddingHorizontalSM: c,
    colorTextDescription: d,
    motionDurationMid: f,
    colorPrimary: p,
    controlHeight: v,
    inputPaddingHorizontal: g,
    colorBgContainer: m,
    colorTextDisabled: x,
    borderRadiusSM: S,
    borderRadiusLG: C,
    controlWidth: P,
    handleVisible: $
  } = e;
  return [
    {
      [t]: O(O(O(O({}, fn(e)), gc(e)), Uh(e, t)), {
        display: "inline-block",
        width: P,
        margin: 0,
        padding: 0,
        border: `${n}px ${o} ${r}`,
        borderRadius: i,
        "&-rtl": {
          direction: "rtl",
          [`${t}-input`]: {
            direction: "rtl"
          }
        },
        "&-lg": {
          padding: 0,
          fontSize: a,
          borderRadius: C,
          [`input${t}-input`]: {
            height: l - 2 * n
          }
        },
        "&-sm": {
          padding: 0,
          borderRadius: S,
          [`input${t}-input`]: {
            height: s - 2 * n,
            padding: `0 ${c}px`
          }
        },
        "&:hover": O({}, hc(e)),
        "&-focused": O({}, Ds(e)),
        "&-disabled": O(O({}, jT(e)), {
          [`${t}-input`]: {
            cursor: "not-allowed"
          }
        }),
        // ===================== Out Of Range =====================
        "&-out-of-range": {
          input: {
            color: u
          }
        },
        // Style for input-group: input with label, with button or dropdown...
        "&-group": O(O(O({}, fn(e)), KT(e)), {
          "&-wrapper": {
            display: "inline-block",
            textAlign: "start",
            verticalAlign: "top",
            [`${t}-affix-wrapper`]: {
              width: "100%"
            },
            // Size
            "&-lg": {
              [`${t}-group-addon`]: {
                borderRadius: C
              }
            },
            "&-sm": {
              [`${t}-group-addon`]: {
                borderRadius: S
              }
            }
          }
        }),
        [t]: {
          "&-input": O(O({
            width: "100%",
            height: v - 2 * n,
            padding: `0 ${g}px`,
            textAlign: "start",
            backgroundColor: "transparent",
            border: 0,
            borderRadius: i,
            outline: 0,
            transition: `all ${f} linear`,
            appearance: "textfield",
            color: e.colorText,
            fontSize: "inherit",
            verticalAlign: "top"
          }, VT(e.colorTextPlaceholder)), {
            '&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button': {
              margin: 0,
              /* stylelint-disable-next-line property-no-vendor-prefix */
              webkitAppearance: "none",
              appearance: "none"
            }
          })
        }
      })
    },
    // Handler
    {
      [t]: {
        [`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]: {
          opacity: 1
        },
        [`${t}-handler-wrap`]: {
          position: "absolute",
          insetBlockStart: 0,
          insetInlineEnd: 0,
          width: e.handleWidth,
          height: "100%",
          background: m,
          borderStartStartRadius: 0,
          borderStartEndRadius: i,
          borderEndEndRadius: i,
          borderEndStartRadius: 0,
          opacity: $ === !0 ? 1 : 0,
          display: "flex",
          flexDirection: "column",
          alignItems: "stretch",
          transition: `opacity ${f} linear ${f}`,
          // Fix input number inside Menu makes icon too large
          // We arise the selector priority by nest selector here
          // https://github.com/ant-design/ant-design/issues/14367
          [`${t}-handler`]: {
            display: "flex",
            alignItems: "center",
            justifyContent: "center",
            flex: "auto",
            height: "40%",
            [`
              ${t}-handler-up-inner,
              ${t}-handler-down-inner
            `]: {
              marginInlineEnd: 0,
              fontSize: e.handleFontSize
            }
          }
        },
        [`${t}-handler`]: {
          height: "50%",
          overflow: "hidden",
          color: d,
          fontWeight: "bold",
          lineHeight: 0,
          textAlign: "center",
          cursor: "pointer",
          borderInlineStart: `${n}px ${o} ${r}`,
          transition: `all ${f} linear`,
          "&:active": {
            background: e.colorFillAlter
          },
          // Hover
          "&:hover": {
            height: "60%",
            [`
              ${t}-handler-up-inner,
              ${t}-handler-down-inner
            `]: {
              color: p
            }
          },
          "&-up-inner, &-down-inner": O(O({}, cc()), {
            color: d,
            transition: `all ${f} linear`,
            userSelect: "none"
          })
        },
        [`${t}-handler-up`]: {
          borderStartEndRadius: i
        },
        [`${t}-handler-down`]: {
          borderBlockStart: `${n}px ${o} ${r}`,
          borderEndEndRadius: i
        },
        // Disabled
        "&-disabled, &-readonly": {
          [`${t}-handler-wrap`]: {
            display: "none"
          },
          [`${t}-input`]: {
            color: "inherit"
          }
        },
        [`
          ${t}-handler-up-disabled,
          ${t}-handler-down-disabled
        `]: {
          cursor: "not-allowed"
        },
        [`
          ${t}-handler-up-disabled:hover &-handler-up-inner,
          ${t}-handler-down-disabled:hover &-handler-down-inner
        `]: {
          color: x
        }
      }
    },
    // Border-less
    {
      [`${t}-borderless`]: {
        borderColor: "transparent",
        boxShadow: "none",
        [`${t}-handler-down`]: {
          borderBlockStartWidth: 0
        }
      }
    }
  ];
}, bX = (e) => {
  const {
    componentCls: t,
    inputPaddingHorizontal: n,
    inputAffixPadding: o,
    controlWidth: r,
    borderRadiusLG: i,
    borderRadiusSM: a
  } = e;
  return {
    [`${t}-affix-wrapper`]: O(O(O({}, gc(e)), Uh(e, `${t}-affix-wrapper`)), {
      // or number handler will cover form status
      position: "relative",
      display: "inline-flex",
      width: r,
      padding: 0,
      paddingInlineStart: n,
      "&-lg": {
        borderRadius: i
      },
      "&-sm": {
        borderRadius: a
      },
      [`&:not(${t}-affix-wrapper-disabled):hover`]: O(O({}, hc(e)), {
        zIndex: 1
      }),
      "&-focused, &:focus": {
        zIndex: 1
      },
      "&-disabled": {
        [`${t}[disabled]`]: {
          background: "transparent"
        }
      },
      [`> div${t}`]: {
        width: "100%",
        border: "none",
        outline: "none",
        [`&${t}-focused`]: {
          boxShadow: "none !important"
        }
      },
      [`input${t}-input`]: {
        padding: 0
      },
      "&::before": {
        width: 0,
        visibility: "hidden",
        content: '"\\a0"'
      },
      [`${t}-handler-wrap`]: {
        zIndex: 2
      },
      [t]: {
        "&-prefix, &-suffix": {
          display: "flex",
          flex: "none",
          alignItems: "center",
          pointerEvents: "none"
        },
        "&-prefix": {
          marginInlineEnd: o
        },
        "&-suffix": {
          position: "absolute",
          insetBlockStart: 0,
          insetInlineEnd: 0,
          zIndex: 1,
          height: "100%",
          marginInlineEnd: n,
          marginInlineStart: o
        }
      }
    })
  };
}, yX = Sn("InputNumber", (e) => {
  const t = Xh(e);
  return [
    mX(t),
    bX(t),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    Fd(t)
  ];
}, (e) => ({
  controlWidth: 90,
  handleWidth: e.controlHeightSM - e.lineWidth * 2,
  handleFontSize: e.fontSize / 2,
  handleVisible: "auto"
}));
var xX = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const o$ = c2(), wX = () => O(O({}, o$), {
  size: an(),
  bordered: ct(!0),
  placeholder: String,
  name: String,
  id: String,
  type: String,
  addonBefore: fe.any,
  addonAfter: fe.any,
  prefix: fe.any,
  "onUpdate:value": o$.onChange,
  valueModifiers: Object,
  status: an()
}), Dv = be({
  compatConfig: {
    MODE: 3
  },
  name: "AInputNumber",
  inheritAttrs: !1,
  props: wX(),
  // emits: ['focus', 'blur', 'change', 'input', 'update:value'],
  slots: Object,
  setup(e, t) {
    let {
      emit: n,
      expose: o,
      attrs: r,
      slots: i
    } = t;
    var a;
    const l = Br(), s = Nr.useInject(), u = E(() => Ls(s.status, e.status)), {
      prefixCls: c,
      size: d,
      direction: f,
      disabled: p
    } = _t("input-number", e), {
      compactSize: v,
      compactItemClassnames: g
    } = fc(c, f), m = _i(), x = E(() => {
      var B;
      return (B = p.value) !== null && B !== void 0 ? B : m.value;
    }), [S, C] = yX(c), P = E(() => v.value || d.value), $ = $e((a = e.value) !== null && a !== void 0 ? a : e.defaultValue), I = $e(!1);
    ke(() => e.value, () => {
      $.value = e.value;
    });
    const w = $e(null), _ = () => {
      var B;
      (B = w.value) === null || B === void 0 || B.focus();
    };
    o({
      focus: _,
      blur: () => {
        var B;
        (B = w.value) === null || B === void 0 || B.blur();
      }
    });
    const N = (B) => {
      e.value === void 0 && ($.value = B), n("update:value", B), n("change", B), l.onFieldChange();
    }, A = (B) => {
      I.value = !1, n("blur", B), l.onFieldBlur();
    }, H = (B) => {
      I.value = !0, n("focus", B);
    };
    return () => {
      var B, F, R, X;
      const {
        hasFeedback: j,
        isFormItemInput: ee,
        feedbackIcon: W
      } = s, K = (B = e.id) !== null && B !== void 0 ? B : l.id.value, q = O(O(O({}, r), e), {
        id: K,
        disabled: x.value
      }), {
        class: G,
        bordered: ae,
        readonly: le,
        style: ie,
        addonBefore: re = (F = i.addonBefore) === null || F === void 0 ? void 0 : F.call(i),
        addonAfter: te = (R = i.addonAfter) === null || R === void 0 ? void 0 : R.call(i),
        prefix: ve = (X = i.prefix) === null || X === void 0 ? void 0 : X.call(i),
        valueModifiers: ue = {}
      } = q, pe = xX(q, ["class", "bordered", "readonly", "style", "addonBefore", "addonAfter", "prefix", "valueModifiers"]), ge = c.value, _e = Me({
        [`${ge}-lg`]: P.value === "large",
        [`${ge}-sm`]: P.value === "small",
        [`${ge}-rtl`]: f.value === "rtl",
        [`${ge}-readonly`]: le,
        [`${ge}-borderless`]: !ae,
        [`${ge}-in-form-item`]: ee
      }, $i(ge, u.value), G, g.value, C.value);
      let ze = h(vX, Q(Q({}, Fn(pe, ["size", "defaultValue"])), {}, {
        ref: w,
        lazy: !!ue.lazy,
        value: $.value,
        class: _e,
        prefixCls: ge,
        readonly: le,
        onChange: N,
        onBlur: A,
        onFocus: H
      }), {
        upHandler: i.upIcon ? () => h("span", {
          class: `${ge}-handler-up-inner`
        }, [i.upIcon()]) : () => h($x, {
          class: `${ge}-handler-up-inner`
        }, null),
        downHandler: i.downIcon ? () => h("span", {
          class: `${ge}-handler-down-inner`
        }, [i.downIcon()]) : () => h(Nd, {
          class: `${ge}-handler-down-inner`
        }, null)
      });
      const Ke = Ev(re) || Ev(te), He = Ev(ve);
      if (He || j) {
        const Ne = Me(`${ge}-affix-wrapper`, $i(`${ge}-affix-wrapper`, u.value, j), {
          [`${ge}-affix-wrapper-focused`]: I.value,
          [`${ge}-affix-wrapper-disabled`]: x.value,
          [`${ge}-affix-wrapper-sm`]: P.value === "small",
          [`${ge}-affix-wrapper-lg`]: P.value === "large",
          [`${ge}-affix-wrapper-rtl`]: f.value === "rtl",
          [`${ge}-affix-wrapper-readonly`]: le,
          [`${ge}-affix-wrapper-borderless`]: !ae,
          // className will go to addon wrapper
          [`${G}`]: !Ke && G
        }, C.value);
        ze = h("div", {
          class: Ne,
          style: ie,
          onClick: _
        }, [He && h("span", {
          class: `${ge}-prefix`
        }, [ve]), ze, j && h("span", {
          class: `${ge}-suffix`
        }, [W])]);
      }
      if (Ke) {
        const Ne = `${ge}-group`, Xe = `${Ne}-addon`, De = re ? h("div", {
          class: Xe
        }, [re]) : null, Fe = te ? h("div", {
          class: Xe
        }, [te]) : null, Ve = Me(`${ge}-wrapper`, Ne, {
          [`${Ne}-rtl`]: f.value === "rtl"
        }, C.value), nt = Me(`${ge}-group-wrapper`, {
          [`${ge}-group-wrapper-sm`]: P.value === "small",
          [`${ge}-group-wrapper-lg`]: P.value === "large",
          [`${ge}-group-wrapper-rtl`]: f.value === "rtl"
        }, $i(`${c}-group-wrapper`, u.value, j), G, C.value);
        ze = h("div", {
          class: nt,
          style: ie
        }, [h("div", {
          class: Ve
        }, [De && h(xd, null, {
          default: () => [h(Bp, null, {
            default: () => [De]
          })]
        }), ze, Fe && h(xd, null, {
          default: () => [h(Bp, null, {
            default: () => [Fe]
          })]
        })])]);
      }
      return S(Xn(ze, {
        style: ie
      }));
    };
  }
}), To = O(Dv, {
  install: (e) => (e.component(Dv.name, Dv), e)
}), SX = (e) => {
  const {
    componentCls: t,
    colorBgContainer: n,
    colorBgBody: o,
    colorText: r
  } = e;
  return {
    [`${t}-sider-light`]: {
      background: n,
      [`${t}-sider-trigger`]: {
        color: r,
        background: n
      },
      [`${t}-sider-zero-width-trigger`]: {
        color: r,
        background: n,
        border: `1px solid ${o}`,
        borderInlineStart: 0
      }
    }
  };
}, CX = (e) => {
  const {
    antCls: t,
    // .ant
    componentCls: n,
    // .ant-layout
    colorText: o,
    colorTextLightSolid: r,
    colorBgHeader: i,
    colorBgBody: a,
    colorBgTrigger: l,
    layoutHeaderHeight: s,
    layoutHeaderPaddingInline: u,
    layoutHeaderColor: c,
    layoutFooterPadding: d,
    layoutTriggerHeight: f,
    layoutZeroTriggerSize: p,
    motionDurationMid: v,
    motionDurationSlow: g,
    fontSize: m,
    borderRadius: x
  } = e;
  return {
    [n]: O(O({
      display: "flex",
      flex: "auto",
      flexDirection: "column",
      color: o,
      /* fix firefox can't set height smaller than content on flex item */
      minHeight: 0,
      background: a,
      "&, *": {
        boxSizing: "border-box"
      },
      [`&${n}-has-sider`]: {
        flexDirection: "row",
        [`> ${n}, > ${n}-content`]: {
          // https://segmentfault.com/a/1190000019498300
          width: 0
        }
      },
      [`${n}-header, &${n}-footer`]: {
        flex: "0 0 auto"
      },
      [`${n}-header`]: {
        height: s,
        paddingInline: u,
        color: c,
        lineHeight: `${s}px`,
        background: i,
        // Other components/menu/style/index.less line:686
        // Integration with header element so menu items have the same height
        [`${t}-menu`]: {
          lineHeight: "inherit"
        }
      },
      [`${n}-footer`]: {
        padding: d,
        color: o,
        fontSize: m,
        background: a
      },
      [`${n}-content`]: {
        flex: "auto",
        // fix firefox can't set height smaller than content on flex item
        minHeight: 0
      },
      [`${n}-sider`]: {
        position: "relative",
        // fix firefox can't set width smaller than content on flex item
        minWidth: 0,
        background: i,
        transition: `all ${v}, background 0s`,
        "&-children": {
          height: "100%",
          // Hack for fixing margin collapse bug
          // https://github.com/ant-design/ant-design/issues/7967
          // solution from https://stackoverflow.com/a/33132624/3040605
          marginTop: -0.1,
          paddingTop: 0.1,
          [`${t}-menu${t}-menu-inline-collapsed`]: {
            width: "auto"
          }
        },
        "&-has-trigger": {
          paddingBottom: f
        },
        "&-right": {
          order: 1
        },
        "&-trigger": {
          position: "fixed",
          bottom: 0,
          zIndex: 1,
          height: f,
          color: r,
          lineHeight: `${f}px`,
          textAlign: "center",
          background: l,
          cursor: "pointer",
          transition: `all ${v}`
        },
        "&-zero-width": {
          "> *": {
            overflow: "hidden"
          },
          "&-trigger": {
            position: "absolute",
            top: s,
            insetInlineEnd: -p,
            zIndex: 1,
            width: p,
            height: p,
            color: r,
            fontSize: e.fontSizeXL,
            display: "flex",
            alignItems: "center",
            justifyContent: "center",
            background: i,
            borderStartStartRadius: 0,
            borderStartEndRadius: x,
            borderEndEndRadius: x,
            borderEndStartRadius: 0,
            cursor: "pointer",
            transition: `background ${g} ease`,
            "&::after": {
              position: "absolute",
              inset: 0,
              background: "transparent",
              transition: `all ${g}`,
              content: '""'
            },
            "&:hover::after": {
              // FIXME: Hardcode, but seems no need to create a token for this
              background: "rgba(255, 255, 255, 0.2)"
            },
            "&-right": {
              insetInlineStart: -p,
              borderStartStartRadius: x,
              borderStartEndRadius: 0,
              borderEndEndRadius: 0,
              borderEndStartRadius: x
            }
          }
        }
      }
    }, SX(e)), {
      // RTL
      "&-rtl": {
        direction: "rtl"
      }
    })
  };
}, $X = Sn("Layout", (e) => {
  const {
    colorText: t,
    controlHeightSM: n,
    controlHeight: o,
    controlHeightLG: r,
    marginXXS: i
  } = e, a = r * 1.25, l = Qt(e, {
    // Layout
    layoutHeaderHeight: o * 2,
    layoutHeaderPaddingInline: a,
    layoutHeaderColor: t,
    layoutFooterPadding: `${n}px ${a}px`,
    layoutTriggerHeight: r + i * 2,
    layoutZeroTriggerSize: r
  });
  return [CX(l)];
}, (e) => {
  const {
    colorBgLayout: t
  } = e;
  return {
    colorBgHeader: "#001529",
    colorBgBody: t,
    colorBgTrigger: "#002140"
  };
}), Ix = () => ({
  prefixCls: String,
  hasSider: {
    type: Boolean,
    default: void 0
  },
  tagName: String
});
function ag(e) {
  let {
    suffixCls: t,
    tagName: n,
    name: o
  } = e;
  return (r) => be({
    compatConfig: {
      MODE: 3
    },
    name: o,
    props: Ix(),
    setup(a, l) {
      let {
        slots: s
      } = l;
      const {
        prefixCls: u
      } = _t(t, a);
      return () => {
        const c = O(O({}, a), {
          prefixCls: u.value,
          tagName: n
        });
        return h(r, c, s);
      };
    }
  });
}
const _x = be({
  compatConfig: {
    MODE: 3
  },
  props: Ix(),
  setup(e, t) {
    let {
      slots: n
    } = t;
    return () => h(e.tagName, {
      class: e.prefixCls
    }, n);
  }
}), PX = be({
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: Ix(),
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: r,
      direction: i
    } = _t("", e), [a, l] = $X(r), s = ce([]);
    Ft(uT, {
      addSider: (d) => {
        s.value = [...s.value, d];
      },
      removeSider: (d) => {
        s.value = s.value.filter((f) => f !== d);
      }
    });
    const c = E(() => {
      const {
        prefixCls: d,
        hasSider: f
      } = e;
      return {
        [l.value]: !0,
        [`${d}`]: !0,
        [`${d}-has-sider`]: typeof f == "boolean" ? f : s.value.length > 0,
        [`${d}-rtl`]: i.value === "rtl"
      };
    });
    return () => {
      const {
        tagName: d
      } = e;
      return a(h(d, O(O({}, o), {
        class: [c.value, o.class]
      }), n));
    };
  }
}), Av = ag({
  suffixCls: "layout",
  tagName: "section",
  name: "ALayout"
})(PX), Nv = ag({
  suffixCls: "layout-header",
  tagName: "header",
  name: "ALayoutHeader"
})(_x), Rv = ag({
  suffixCls: "layout-footer",
  tagName: "footer",
  name: "ALayoutFooter"
})(_x), zv = ag({
  suffixCls: "layout-content",
  tagName: "main",
  name: "ALayoutContent"
})(_x);
var OX = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, name: "bars", theme: "outlined" };
function r$(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      kX(e, r, n[r]);
    });
  }
  return e;
}
function kX(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Tx = function(t, n) {
  var o = r$({}, t, n.attrs);
  return h(on, r$({}, o, {
    icon: OX
  }), null);
};
Tx.displayName = "BarsOutlined";
Tx.inheritAttrs = !1;
const i$ = {
  xs: "479.98px",
  sm: "575.98px",
  md: "767.98px",
  lg: "991.98px",
  xl: "1199.98px",
  xxl: "1599.98px",
  xxxl: "1999.98px"
}, IX = () => ({
  prefixCls: String,
  collapsible: {
    type: Boolean,
    default: void 0
  },
  collapsed: {
    type: Boolean,
    default: void 0
  },
  defaultCollapsed: {
    type: Boolean,
    default: void 0
  },
  reverseArrow: {
    type: Boolean,
    default: void 0
  },
  zeroWidthTriggerStyle: {
    type: Object,
    default: void 0
  },
  trigger: fe.any,
  width: fe.oneOfType([fe.number, fe.string]),
  collapsedWidth: fe.oneOfType([fe.number, fe.string]),
  breakpoint: fe.oneOf(Dr("xs", "sm", "md", "lg", "xl", "xxl", "xxxl")),
  theme: fe.oneOf(Dr("light", "dark")).def("dark"),
  onBreakpoint: Function,
  onCollapse: Function
}), _X = /* @__PURE__ */ (() => {
  let e = 0;
  return function() {
    let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
    return e += 1, `${t}${e}`;
  };
})(), Fv = be({
  compatConfig: {
    MODE: 3
  },
  name: "ALayoutSider",
  inheritAttrs: !1,
  props: kn(IX(), {
    collapsible: !1,
    defaultCollapsed: !1,
    reverseArrow: !1,
    width: 200,
    collapsedWidth: 80
  }),
  emits: ["breakpoint", "update:collapsed", "collapse"],
  setup(e, t) {
    let {
      emit: n,
      attrs: o,
      slots: r
    } = t;
    const {
      prefixCls: i
    } = _t("layout-sider", e), a = zt(uT, void 0), l = $e(!!(e.collapsed !== void 0 ? e.collapsed : e.defaultCollapsed)), s = $e(!1);
    ke(() => e.collapsed, () => {
      l.value = !!e.collapsed;
    }), Ft(sT, l);
    const u = (g, m) => {
      e.collapsed === void 0 && (l.value = g), n("update:collapsed", g), n("collapse", g, m);
    }, c = $e((g) => {
      s.value = g.matches, n("breakpoint", g.matches), l.value !== g.matches && u(g.matches, "responsive");
    });
    let d;
    function f(g) {
      return c.value(g);
    }
    const p = _X("ant-sider-");
    a && a.addSider(p), Nt(() => {
      ke(() => e.breakpoint, () => {
        try {
          d?.removeEventListener("change", f);
        } catch {
          d?.removeListener(f);
        }
        if (typeof window < "u") {
          const {
            matchMedia: g
          } = window;
          if (g && e.breakpoint && e.breakpoint in i$) {
            d = g(`(max-width: ${i$[e.breakpoint]})`);
            try {
              d.addEventListener("change", f);
            } catch {
              d.addListener(f);
            }
            f(d);
          }
        }
      }, {
        immediate: !0
      });
    }), qt(() => {
      try {
        d?.removeEventListener("change", f);
      } catch {
        d?.removeListener(f);
      }
      a && a.removeSider(p);
    });
    const v = () => {
      u(!l.value, "clickTrigger");
    };
    return () => {
      var g, m;
      const x = i.value, {
        collapsedWidth: S,
        width: C,
        reverseArrow: P,
        zeroWidthTriggerStyle: $,
        trigger: I = (g = r.trigger) === null || g === void 0 ? void 0 : g.call(r),
        collapsible: w,
        theme: _
      } = e, M = l.value ? S : C, N = tb(M) ? `${M}px` : String(M), A = parseFloat(String(S || 0)) === 0 ? h("span", {
        onClick: v,
        class: Me(`${x}-zero-width-trigger`, `${x}-zero-width-trigger-${P ? "right" : "left"}`),
        style: $
      }, [I || h(Tx, null, null)]) : null, H = {
        expanded: P ? h(qa, null, null) : h(Ju, null, null),
        collapsed: P ? h(Ju, null, null) : h(qa, null, null)
      }, B = l.value ? "collapsed" : "expanded", F = H[B], R = I !== null ? A || h("div", {
        class: `${x}-trigger`,
        onClick: v,
        style: {
          width: N
        }
      }, [I || F]) : null, X = [o.style, {
        flex: `0 0 ${N}`,
        maxWidth: N,
        minWidth: N,
        width: N
      }], j = Me(x, `${x}-${_}`, {
        [`${x}-collapsed`]: !!l.value,
        [`${x}-has-trigger`]: w && I !== null && !A,
        [`${x}-below`]: !!s.value,
        [`${x}-zero-width`]: parseFloat(N) === 0
      }, o.class);
      return h("aside", Q(Q({}, o), {}, {
        class: j,
        style: X
      }), [h("div", {
        class: `${x}-children`
      }, [(m = r.default) === null || m === void 0 ? void 0 : m.call(r)]), w || s.value && A ? R : null]);
    };
  }
}), a$ = O(Av, {
  Header: Nv,
  Footer: Rv,
  Content: zv,
  Sider: Fv,
  install: (e) => (e.component(Av.name, Av), e.component(Nv.name, Nv), e.component(Rv.name, Rv), e.component(Fv.name, Fv), e.component(zv.name, zv), e)
});
function TX(e, t, n) {
  var o = n || {}, r = o.noTrailing, i = r === void 0 ? !1 : r, a = o.noLeading, l = a === void 0 ? !1 : a, s = o.debounceMode, u = s === void 0 ? void 0 : s, c, d = !1, f = 0;
  function p() {
    c && clearTimeout(c);
  }
  function v(m) {
    var x = m || {}, S = x.upcomingOnly, C = S === void 0 ? !1 : S;
    p(), d = !C;
  }
  function g() {
    for (var m = arguments.length, x = new Array(m), S = 0; S < m; S++)
      x[S] = arguments[S];
    var C = this, P = Date.now() - f;
    if (d)
      return;
    function $() {
      f = Date.now(), t.apply(C, x);
    }
    function I() {
      c = void 0;
    }
    !l && u && !c && $(), p(), u === void 0 && P > e ? l ? (f = Date.now(), i || (c = setTimeout(u ? I : $, e))) : $() : i !== !0 && (c = setTimeout(u ? I : $, u === void 0 ? e - P : e));
  }
  return g.cancel = v, g;
}
function MX(e, t, n) {
  var o = {}, r = o.atBegin, i = r === void 0 ? !1 : r;
  return TX(e, t, {
    debounceMode: i !== !1
  });
}
const EX = new tn("antSpinMove", {
  to: {
    opacity: 1
  }
}), DX = new tn("antRotate", {
  to: {
    transform: "rotate(405deg)"
  }
}), AX = (e) => ({
  [`${e.componentCls}`]: O(O({}, fn(e)), {
    position: "absolute",
    display: "none",
    color: e.colorPrimary,
    textAlign: "center",
    verticalAlign: "middle",
    opacity: 0,
    transition: `transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,
    "&-spinning": {
      position: "static",
      display: "inline-block",
      opacity: 1
    },
    "&-nested-loading": {
      position: "relative",
      [`> div > ${e.componentCls}`]: {
        position: "absolute",
        top: 0,
        insetInlineStart: 0,
        zIndex: 4,
        display: "block",
        width: "100%",
        height: "100%",
        maxHeight: e.contentHeight,
        [`${e.componentCls}-dot`]: {
          position: "absolute",
          top: "50%",
          insetInlineStart: "50%",
          margin: -e.spinDotSize / 2
        },
        [`${e.componentCls}-text`]: {
          position: "absolute",
          top: "50%",
          width: "100%",
          paddingTop: (e.spinDotSize - e.fontSize) / 2 + 2,
          textShadow: `0 1px 2px ${e.colorBgContainer}`
          // FIXME: shadow
        },
        [`&${e.componentCls}-show-text ${e.componentCls}-dot`]: {
          marginTop: -(e.spinDotSize / 2) - 10
        },
        "&-sm": {
          [`${e.componentCls}-dot`]: {
            margin: -e.spinDotSizeSM / 2
          },
          [`${e.componentCls}-text`]: {
            paddingTop: (e.spinDotSizeSM - e.fontSize) / 2 + 2
          },
          [`&${e.componentCls}-show-text ${e.componentCls}-dot`]: {
            marginTop: -(e.spinDotSizeSM / 2) - 10
          }
        },
        "&-lg": {
          [`${e.componentCls}-dot`]: {
            margin: -(e.spinDotSizeLG / 2)
          },
          [`${e.componentCls}-text`]: {
            paddingTop: (e.spinDotSizeLG - e.fontSize) / 2 + 2
          },
          [`&${e.componentCls}-show-text ${e.componentCls}-dot`]: {
            marginTop: -(e.spinDotSizeLG / 2) - 10
          }
        }
      },
      [`${e.componentCls}-container`]: {
        position: "relative",
        transition: `opacity ${e.motionDurationSlow}`,
        "&::after": {
          position: "absolute",
          top: 0,
          insetInlineEnd: 0,
          bottom: 0,
          insetInlineStart: 0,
          zIndex: 10,
          width: "100%",
          height: "100%",
          background: e.colorBgContainer,
          opacity: 0,
          transition: `all ${e.motionDurationSlow}`,
          content: '""',
          pointerEvents: "none"
        }
      },
      [`${e.componentCls}-blur`]: {
        clear: "both",
        opacity: 0.5,
        userSelect: "none",
        pointerEvents: "none",
        "&::after": {
          opacity: 0.4,
          pointerEvents: "auto"
        }
      }
    },
    // tip
    // ------------------------------
    "&-tip": {
      color: e.spinDotDefault
    },
    // dots
    // ------------------------------
    [`${e.componentCls}-dot`]: {
      position: "relative",
      display: "inline-block",
      fontSize: e.spinDotSize,
      width: "1em",
      height: "1em",
      "&-item": {
        position: "absolute",
        display: "block",
        width: (e.spinDotSize - e.marginXXS / 2) / 2,
        height: (e.spinDotSize - e.marginXXS / 2) / 2,
        backgroundColor: e.colorPrimary,
        borderRadius: "100%",
        transform: "scale(0.75)",
        transformOrigin: "50% 50%",
        opacity: 0.3,
        animationName: EX,
        animationDuration: "1s",
        animationIterationCount: "infinite",
        animationTimingFunction: "linear",
        animationDirection: "alternate",
        "&:nth-child(1)": {
          top: 0,
          insetInlineStart: 0
        },
        "&:nth-child(2)": {
          top: 0,
          insetInlineEnd: 0,
          animationDelay: "0.4s"
        },
        "&:nth-child(3)": {
          insetInlineEnd: 0,
          bottom: 0,
          animationDelay: "0.8s"
        },
        "&:nth-child(4)": {
          bottom: 0,
          insetInlineStart: 0,
          animationDelay: "1.2s"
        }
      },
      "&-spin": {
        transform: "rotate(45deg)",
        animationName: DX,
        animationDuration: "1.2s",
        animationIterationCount: "infinite",
        animationTimingFunction: "linear"
      }
    },
    // Sizes
    // ------------------------------
    // small
    [`&-sm ${e.componentCls}-dot`]: {
      fontSize: e.spinDotSizeSM,
      i: {
        width: (e.spinDotSizeSM - e.marginXXS / 2) / 2,
        height: (e.spinDotSizeSM - e.marginXXS / 2) / 2
      }
    },
    // large
    [`&-lg ${e.componentCls}-dot`]: {
      fontSize: e.spinDotSizeLG,
      i: {
        width: (e.spinDotSizeLG - e.marginXXS) / 2,
        height: (e.spinDotSizeLG - e.marginXXS) / 2
      }
    },
    [`&${e.componentCls}-show-text ${e.componentCls}-text`]: {
      display: "block"
    }
  })
}), NX = Sn("Spin", (e) => {
  const t = Qt(e, {
    spinDotDefault: e.colorTextDescription,
    spinDotSize: e.controlHeightLG / 2,
    spinDotSizeSM: e.controlHeightLG * 0.35,
    spinDotSizeLG: e.controlHeight
  });
  return [AX(t)];
}, {
  contentHeight: 400
});
var RX = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const zX = () => ({
  prefixCls: String,
  spinning: {
    type: Boolean,
    default: void 0
  },
  size: String,
  wrapperClassName: String,
  tip: fe.any,
  delay: Number,
  indicator: fe.any
});
let hp = null;
function FX(e, t) {
  return !!e && !!t && !isNaN(Number(t));
}
function BX(e) {
  const t = e.indicator;
  hp = typeof t == "function" ? t : () => h(t, null, null);
}
const Xo = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASpin",
  inheritAttrs: !1,
  props: kn(zX(), {
    size: "default",
    spinning: !0,
    wrapperClassName: ""
  }),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const {
      prefixCls: r,
      size: i,
      direction: a
    } = _t("spin", e), [l, s] = NX(r), u = $e(e.spinning && !FX(e.spinning, e.delay));
    let c;
    return ke([() => e.spinning, () => e.delay], () => {
      c?.cancel(), c = MX(e.delay, () => {
        u.value = e.spinning;
      }), c?.();
    }, {
      immediate: !0,
      flush: "post"
    }), qt(() => {
      c?.cancel();
    }), () => {
      var d, f;
      const {
        class: p
      } = n, v = RX(n, ["class"]), {
        tip: g = (d = o.tip) === null || d === void 0 ? void 0 : d.call(o)
      } = e, m = (f = o.default) === null || f === void 0 ? void 0 : f.call(o), x = {
        [s.value]: !0,
        [r.value]: !0,
        [`${r.value}-sm`]: i.value === "small",
        [`${r.value}-lg`]: i.value === "large",
        [`${r.value}-spinning`]: u.value,
        [`${r.value}-show-text`]: !!g,
        [`${r.value}-rtl`]: a.value === "rtl",
        [p]: !!p
      };
      function S(P) {
        const $ = `${P}-dot`;
        let I = ei(o, e, "indicator");
        return I === null ? null : (Array.isArray(I) && (I = I.length === 1 ? I[0] : I), cr(I) ? Ml(I, {
          class: $
        }) : hp && cr(hp()) ? Ml(hp(), {
          class: $
        }) : h("span", {
          class: `${$} ${P}-dot-spin`
        }, [h("i", {
          class: `${P}-dot-item`
        }, null), h("i", {
          class: `${P}-dot-item`
        }, null), h("i", {
          class: `${P}-dot-item`
        }, null), h("i", {
          class: `${P}-dot-item`
        }, null)]));
      }
      const C = h("div", Q(Q({}, v), {}, {
        class: x,
        "aria-live": "polite",
        "aria-busy": u.value
      }), [S(r.value), g ? h("div", {
        class: `${r.value}-text`
      }, [g]) : null]);
      if (m && Do(m).length) {
        const P = {
          [`${r.value}-container`]: !0,
          [`${r.value}-blur`]: u.value
        };
        return l(h("div", {
          class: [`${r.value}-nested-loading`, e.wrapperClassName, s.value]
        }, [u.value && h("div", {
          key: "loading"
        }, [C]), h("div", {
          class: P,
          key: "container"
        }, [m])]));
      }
      return l(C);
    };
  }
});
Xo.setDefaultIndicator = BX;
Xo.install = function(e) {
  return e.component(Xo.name, Xo), e;
};
var LX = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z" } }] }, name: "double-left", theme: "outlined" };
function l$(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      HX(e, r, n[r]);
    });
  }
  return e;
}
function HX(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Xp = function(t, n) {
  var o = l$({}, t, n.attrs);
  return h(on, l$({}, o, {
    icon: LX
  }), null);
};
Xp.displayName = "DoubleLeftOutlined";
Xp.inheritAttrs = !1;
var VX = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z" } }] }, name: "double-right", theme: "outlined" };
function s$(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      jX(e, r, n[r]);
    });
  }
  return e;
}
function jX(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Qp = function(t, n) {
  var o = s$({}, t, n.attrs);
  return h(on, s$({}, o, {
    icon: VX
  }), null);
};
Qp.displayName = "DoubleRightOutlined";
Qp.inheritAttrs = !1;
const WX = be({
  name: "MiniSelect",
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: _0(),
  Option: Dt.Option,
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    return () => {
      const r = O(O(O({}, e), {
        size: "small"
      }), n);
      return h(Dt, r, o);
    };
  }
}), KX = be({
  name: "MiddleSelect",
  inheritAttrs: !1,
  props: _0(),
  Option: Dt.Option,
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    return () => {
      const r = O(O(O({}, e), {
        size: "middle"
      }), n);
      return h(Dt, r, o);
    };
  }
}), ts = be({
  compatConfig: {
    MODE: 3
  },
  name: "Pager",
  inheritAttrs: !1,
  props: {
    rootPrefixCls: String,
    page: Number,
    active: {
      type: Boolean,
      default: void 0
    },
    last: {
      type: Boolean,
      default: void 0
    },
    locale: fe.object,
    showTitle: {
      type: Boolean,
      default: void 0
    },
    itemRender: {
      type: Function,
      default: () => {
      }
    },
    onClick: {
      type: Function
    },
    onKeypress: {
      type: Function
    }
  },
  eimt: ["click", "keypress"],
  setup(e, t) {
    let {
      emit: n,
      attrs: o
    } = t;
    const r = () => {
      n("click", e.page);
    }, i = (a) => {
      n("keypress", a, r, e.page);
    };
    return () => {
      const {
        showTitle: a,
        page: l,
        itemRender: s
      } = e, {
        class: u,
        style: c
      } = o, d = `${e.rootPrefixCls}-item`, f = Me(d, `${d}-${e.page}`, {
        [`${d}-active`]: e.active,
        [`${d}-disabled`]: !e.page
      }, u);
      return h("li", {
        onClick: r,
        onKeypress: i,
        title: a ? String(l) : null,
        tabindex: "0",
        class: f,
        style: c
      }, [s({
        page: l,
        type: "page",
        originalElement: h("a", {
          rel: "nofollow"
        }, [l])
      })]);
    };
  }
}), ls = {
  ENTER: 13,
  ARROW_UP: 38,
  ARROW_DOWN: 40
}, qX = be({
  compatConfig: {
    MODE: 3
  },
  props: {
    disabled: {
      type: Boolean,
      default: void 0
    },
    changeSize: Function,
    quickGo: Function,
    selectComponentClass: fe.any,
    current: Number,
    pageSizeOptions: fe.array.def(["10", "20", "50", "100"]),
    pageSize: Number,
    buildOptionText: Function,
    locale: fe.object,
    rootPrefixCls: String,
    selectPrefixCls: String,
    goButton: fe.any
  },
  setup(e) {
    const t = ce(""), n = E(() => !t.value || isNaN(t.value) ? void 0 : Number(t.value)), o = (s) => `${s.value} ${e.locale.items_per_page}`, r = (s) => {
      const {
        value: u
      } = s.target;
      t.value !== u && (t.value = u);
    }, i = (s) => {
      const {
        goButton: u,
        quickGo: c,
        rootPrefixCls: d
      } = e;
      if (!(u || t.value === ""))
        if (s.relatedTarget && (s.relatedTarget.className.indexOf(`${d}-item-link`) >= 0 || s.relatedTarget.className.indexOf(`${d}-item`) >= 0)) {
          t.value = "";
          return;
        } else
          c(n.value), t.value = "";
    }, a = (s) => {
      t.value !== "" && (s.keyCode === ls.ENTER || s.type === "click") && (e.quickGo(n.value), t.value = "");
    }, l = E(() => {
      const {
        pageSize: s,
        pageSizeOptions: u
      } = e;
      return u.some((c) => c.toString() === s.toString()) ? u : u.concat([s.toString()]).sort((c, d) => {
        const f = isNaN(Number(c)) ? 0 : Number(c), p = isNaN(Number(d)) ? 0 : Number(d);
        return f - p;
      });
    });
    return () => {
      const {
        rootPrefixCls: s,
        locale: u,
        changeSize: c,
        quickGo: d,
        goButton: f,
        selectComponentClass: p,
        selectPrefixCls: v,
        pageSize: g,
        disabled: m
      } = e, x = `${s}-options`;
      let S = null, C = null, P = null;
      if (!c && !d)
        return null;
      if (c && p) {
        const $ = e.buildOptionText || o, I = l.value.map((w, _) => h(p.Option, {
          key: _,
          value: w
        }, {
          default: () => [$({
            value: w
          })]
        }));
        S = h(p, {
          disabled: m,
          prefixCls: v,
          showSearch: !1,
          class: `${x}-size-changer`,
          optionLabelProp: "children",
          value: (g || l.value[0]).toString(),
          onChange: (w) => c(Number(w)),
          getPopupContainer: (w) => w.parentNode
        }, {
          default: () => [I]
        });
      }
      return d && (f && (P = typeof f == "boolean" ? h("button", {
        type: "button",
        onClick: a,
        onKeyup: a,
        disabled: m,
        class: `${x}-quick-jumper-button`
      }, [u.jump_to_confirm]) : h("span", {
        onClick: a,
        onKeyup: a
      }, [f])), C = h("div", {
        class: `${x}-quick-jumper`
      }, [u.jump_to, h(Ad, {
        disabled: m,
        type: "text",
        value: t.value,
        onInput: r,
        onChange: r,
        onKeyup: a,
        onBlur: i
      }, null), u.page, P])), h("li", {
        class: `${x}`
      }, [S, C]);
    };
  }
}), YX = {
  // Options.jsx
  items_per_page: "条/页",
  jump_to: "跳至",
  jump_to_confirm: "确定",
  page: "页",
  // Pagination.jsx
  prev_page: "上一页",
  next_page: "下一页",
  prev_5: "向前 5 页",
  next_5: "向后 5 页",
  prev_3: "向前 3 页",
  next_3: "向后 3 页"
};
var GX = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function UX(e) {
  return typeof e == "number" && isFinite(e) && Math.floor(e) === e;
}
function XX(e) {
  let {
    originalElement: t
  } = e;
  return t;
}
function xa(e, t, n) {
  const o = typeof e > "u" ? t.statePageSize : e;
  return Math.floor((n.total - 1) / o) + 1;
}
const QX = be({
  compatConfig: {
    MODE: 3
  },
  name: "Pagination",
  mixins: [Ed],
  inheritAttrs: !1,
  props: {
    disabled: {
      type: Boolean,
      default: void 0
    },
    prefixCls: fe.string.def("rc-pagination"),
    selectPrefixCls: fe.string.def("rc-select"),
    current: Number,
    defaultCurrent: fe.number.def(1),
    total: fe.number.def(0),
    pageSize: Number,
    defaultPageSize: fe.number.def(10),
    hideOnSinglePage: {
      type: Boolean,
      default: !1
    },
    showSizeChanger: {
      type: Boolean,
      default: void 0
    },
    showLessItems: {
      type: Boolean,
      default: !1
    },
    // showSizeChange: PropTypes.func.def(noop),
    selectComponentClass: fe.any,
    showPrevNextJumpers: {
      type: Boolean,
      default: !0
    },
    showQuickJumper: fe.oneOfType([fe.looseBool, fe.object]).def(!1),
    showTitle: {
      type: Boolean,
      default: !0
    },
    pageSizeOptions: fe.arrayOf(fe.oneOfType([fe.number, fe.string])),
    buildOptionText: Function,
    showTotal: Function,
    simple: {
      type: Boolean,
      default: void 0
    },
    locale: fe.object.def(YX),
    itemRender: fe.func.def(XX),
    prevIcon: fe.any,
    nextIcon: fe.any,
    jumpPrevIcon: fe.any,
    jumpNextIcon: fe.any,
    totalBoundaryShowSizeChanger: fe.number.def(50)
  },
  data() {
    const e = this.$props;
    let t = Lp([this.current, this.defaultCurrent]);
    const n = Lp([this.pageSize, this.defaultPageSize]);
    return t = Math.min(t, xa(n, void 0, e)), {
      stateCurrent: t,
      stateCurrentInputValue: t,
      statePageSize: n
    };
  },
  watch: {
    current(e) {
      this.setState({
        stateCurrent: e,
        stateCurrentInputValue: e
      });
    },
    pageSize(e) {
      const t = {};
      let n = this.stateCurrent;
      const o = xa(e, this.$data, this.$props);
      n = n > o ? o : n, Oa(this, "current") || (t.stateCurrent = n, t.stateCurrentInputValue = n), t.statePageSize = e, this.setState(t);
    },
    stateCurrent(e, t) {
      this.$nextTick(() => {
        if (this.$refs.paginationNode) {
          const n = this.$refs.paginationNode.querySelector(`.${this.prefixCls}-item-${t}`);
          n && document.activeElement === n && n.blur();
        }
      });
    },
    total() {
      const e = {}, t = xa(this.pageSize, this.$data, this.$props);
      if (Oa(this, "current")) {
        const n = Math.min(this.current, t);
        e.stateCurrent = n, e.stateCurrentInputValue = n;
      } else {
        let n = this.stateCurrent;
        n === 0 && t > 0 ? n = 1 : n = Math.min(this.stateCurrent, t), e.stateCurrent = n;
      }
      this.setState(e);
    }
  },
  methods: {
    getJumpPrevPage() {
      return Math.max(1, this.stateCurrent - (this.showLessItems ? 3 : 5));
    },
    getJumpNextPage() {
      return Math.min(xa(void 0, this.$data, this.$props), this.stateCurrent + (this.showLessItems ? 3 : 5));
    },
    getItemIcon(e, t) {
      const {
        prefixCls: n
      } = this.$props;
      return Qk(this, e, this.$props) || h("button", {
        type: "button",
        "aria-label": t,
        class: `${n}-item-link`
      }, null);
    },
    getValidValue(e) {
      const t = e.target.value, n = xa(void 0, this.$data, this.$props), {
        stateCurrentInputValue: o
      } = this.$data;
      let r;
      return t === "" ? r = t : isNaN(Number(t)) ? r = o : t >= n ? r = n : r = Number(t), r;
    },
    isValid(e) {
      return UX(e) && e !== this.stateCurrent;
    },
    shouldDisplayQuickJumper() {
      const {
        showQuickJumper: e,
        pageSize: t,
        total: n
      } = this.$props;
      return n <= t ? !1 : e;
    },
    // calculatePage (p) {
    //   let pageSize = p
    //   if (typeof pageSize === 'undefined') {
    //     pageSize = this.statePageSize
    //   }
    //   return Math.floor((this.total - 1) / pageSize) + 1
    // },
    handleKeyDown(e) {
      (e.keyCode === ls.ARROW_UP || e.keyCode === ls.ARROW_DOWN) && e.preventDefault();
    },
    handleKeyUp(e) {
      const t = this.getValidValue(e), n = this.stateCurrentInputValue;
      t !== n && this.setState({
        stateCurrentInputValue: t
      }), e.keyCode === ls.ENTER ? this.handleChange(t) : e.keyCode === ls.ARROW_UP ? this.handleChange(t - 1) : e.keyCode === ls.ARROW_DOWN && this.handleChange(t + 1);
    },
    changePageSize(e) {
      let t = this.stateCurrent;
      const n = t, o = xa(e, this.$data, this.$props);
      t = t > o ? o : t, o === 0 && (t = this.stateCurrent), typeof e == "number" && (Oa(this, "pageSize") || this.setState({
        statePageSize: e
      }), Oa(this, "current") || this.setState({
        stateCurrent: t,
        stateCurrentInputValue: t
      })), this.__emit("update:pageSize", e), t !== n && this.__emit("update:current", t), this.__emit("showSizeChange", t, e), this.__emit("change", t, e);
    },
    handleChange(e) {
      const {
        disabled: t
      } = this.$props;
      let n = e;
      if (this.isValid(n) && !t) {
        const o = xa(void 0, this.$data, this.$props);
        return n > o ? n = o : n < 1 && (n = 1), Oa(this, "current") || this.setState({
          stateCurrent: n,
          stateCurrentInputValue: n
        }), this.__emit("update:current", n), this.__emit("change", n, this.statePageSize), n;
      }
      return this.stateCurrent;
    },
    prev() {
      this.hasPrev() && this.handleChange(this.stateCurrent - 1);
    },
    next() {
      this.hasNext() && this.handleChange(this.stateCurrent + 1);
    },
    jumpPrev() {
      this.handleChange(this.getJumpPrevPage());
    },
    jumpNext() {
      this.handleChange(this.getJumpNextPage());
    },
    hasPrev() {
      return this.stateCurrent > 1;
    },
    hasNext() {
      return this.stateCurrent < xa(void 0, this.$data, this.$props);
    },
    getShowSizeChanger() {
      const {
        showSizeChanger: e,
        total: t,
        totalBoundaryShowSizeChanger: n
      } = this.$props;
      return typeof e < "u" ? e : t > n;
    },
    runIfEnter(e, t) {
      if (e.key === "Enter" || e.charCode === 13) {
        e.preventDefault();
        for (var n = arguments.length, o = new Array(n > 2 ? n - 2 : 0), r = 2; r < n; r++)
          o[r - 2] = arguments[r];
        t(...o);
      }
    },
    runIfEnterPrev(e) {
      this.runIfEnter(e, this.prev);
    },
    runIfEnterNext(e) {
      this.runIfEnter(e, this.next);
    },
    runIfEnterJumpPrev(e) {
      this.runIfEnter(e, this.jumpPrev);
    },
    runIfEnterJumpNext(e) {
      this.runIfEnter(e, this.jumpNext);
    },
    handleGoTO(e) {
      (e.keyCode === ls.ENTER || e.type === "click") && this.handleChange(this.stateCurrentInputValue);
    },
    renderPrev(e) {
      const {
        itemRender: t
      } = this.$props, n = t({
        page: e,
        type: "prev",
        originalElement: this.getItemIcon("prevIcon", "prev page")
      }), o = !this.hasPrev();
      return Ao(n) ? Xn(n, o ? {
        disabled: o
      } : {}) : n;
    },
    renderNext(e) {
      const {
        itemRender: t
      } = this.$props, n = t({
        page: e,
        type: "next",
        originalElement: this.getItemIcon("nextIcon", "next page")
      }), o = !this.hasNext();
      return Ao(n) ? Xn(n, o ? {
        disabled: o
      } : {}) : n;
    }
  },
  render() {
    const {
      prefixCls: e,
      disabled: t,
      hideOnSinglePage: n,
      total: o,
      locale: r,
      showQuickJumper: i,
      showLessItems: a,
      showTitle: l,
      showTotal: s,
      simple: u,
      itemRender: c,
      showPrevNextJumpers: d,
      jumpPrevIcon: f,
      jumpNextIcon: p,
      selectComponentClass: v,
      selectPrefixCls: g,
      pageSizeOptions: m
    } = this.$props, {
      stateCurrent: x,
      statePageSize: S
    } = this, C = Gk(this.$attrs).extraAttrs, {
      class: P
    } = C, $ = GX(C, ["class"]);
    if (n === !0 && this.total <= S)
      return null;
    const I = xa(void 0, this.$data, this.$props), w = [];
    let _ = null, M = null, N = null, A = null, H = null;
    const B = i && i.goButton, F = a ? 1 : 2, R = x - 1 > 0 ? x - 1 : 0, X = x + 1 < I ? x + 1 : I, j = this.hasPrev(), ee = this.hasNext();
    if (u)
      return B && (typeof B == "boolean" ? H = h("button", {
        type: "button",
        onClick: this.handleGoTO,
        onKeyup: this.handleGoTO
      }, [r.jump_to_confirm]) : H = h("span", {
        onClick: this.handleGoTO,
        onKeyup: this.handleGoTO
      }, [B]), H = h("li", {
        title: l ? `${r.jump_to}${x}/${I}` : null,
        class: `${e}-simple-pager`
      }, [H])), h("ul", Q({
        class: Me(`${e} ${e}-simple`, {
          [`${e}-disabled`]: t
        }, P)
      }, $), [h("li", {
        title: l ? r.prev_page : null,
        onClick: this.prev,
        tabindex: j ? 0 : null,
        onKeypress: this.runIfEnterPrev,
        class: Me(`${e}-prev`, {
          [`${e}-disabled`]: !j
        }),
        "aria-disabled": !j
      }, [this.renderPrev(R)]), h("li", {
        title: l ? `${x}/${I}` : null,
        class: `${e}-simple-pager`
      }, [h(Ad, {
        type: "text",
        value: this.stateCurrentInputValue,
        disabled: t,
        onKeydown: this.handleKeyDown,
        onKeyup: this.handleKeyUp,
        onInput: this.handleKeyUp,
        onChange: this.handleKeyUp,
        size: "3"
      }, null), h("span", {
        class: `${e}-slash`
      }, [Le("／")]), I]), h("li", {
        title: l ? r.next_page : null,
        onClick: this.next,
        tabindex: ee ? 0 : null,
        onKeypress: this.runIfEnterNext,
        class: Me(`${e}-next`, {
          [`${e}-disabled`]: !ee
        }),
        "aria-disabled": !ee
      }, [this.renderNext(X)]), H]);
    if (I <= 3 + F * 2) {
      const ae = {
        locale: r,
        rootPrefixCls: e,
        showTitle: l,
        itemRender: c,
        onClick: this.handleChange,
        onKeypress: this.runIfEnter
      };
      I || w.push(h(ts, Q(Q({}, ae), {}, {
        key: "noPager",
        page: 1,
        class: `${e}-item-disabled`
      }), null));
      for (let le = 1; le <= I; le += 1) {
        const ie = x === le;
        w.push(h(ts, Q(Q({}, ae), {}, {
          key: le,
          page: le,
          active: ie
        }), null));
      }
    } else {
      const ae = a ? r.prev_3 : r.prev_5, le = a ? r.next_3 : r.next_5;
      d && (_ = h("li", {
        title: this.showTitle ? ae : null,
        key: "prev",
        onClick: this.jumpPrev,
        tabindex: "0",
        onKeypress: this.runIfEnterJumpPrev,
        class: Me(`${e}-jump-prev`, {
          [`${e}-jump-prev-custom-icon`]: !!f
        })
      }, [c({
        page: this.getJumpPrevPage(),
        type: "jump-prev",
        originalElement: this.getItemIcon("jumpPrevIcon", "prev page")
      })]), M = h("li", {
        title: this.showTitle ? le : null,
        key: "next",
        tabindex: "0",
        onClick: this.jumpNext,
        onKeypress: this.runIfEnterJumpNext,
        class: Me(`${e}-jump-next`, {
          [`${e}-jump-next-custom-icon`]: !!p
        })
      }, [c({
        page: this.getJumpNextPage(),
        type: "jump-next",
        originalElement: this.getItemIcon("jumpNextIcon", "next page")
      })])), A = h(ts, {
        locale: r,
        last: !0,
        rootPrefixCls: e,
        onClick: this.handleChange,
        onKeypress: this.runIfEnter,
        key: I,
        page: I,
        active: !1,
        showTitle: l,
        itemRender: c
      }, null), N = h(ts, {
        locale: r,
        rootPrefixCls: e,
        onClick: this.handleChange,
        onKeypress: this.runIfEnter,
        key: 1,
        page: 1,
        active: !1,
        showTitle: l,
        itemRender: c
      }, null);
      let ie = Math.max(1, x - F), re = Math.min(x + F, I);
      x - 1 <= F && (re = 1 + F * 2), I - x <= F && (ie = I - F * 2);
      for (let te = ie; te <= re; te += 1) {
        const ve = x === te;
        w.push(h(ts, {
          locale: r,
          rootPrefixCls: e,
          onClick: this.handleChange,
          onKeypress: this.runIfEnter,
          key: te,
          page: te,
          active: ve,
          showTitle: l,
          itemRender: c
        }, null));
      }
      x - 1 >= F * 2 && x !== 3 && (w[0] = h(ts, {
        locale: r,
        rootPrefixCls: e,
        onClick: this.handleChange,
        onKeypress: this.runIfEnter,
        key: ie,
        page: ie,
        class: `${e}-item-after-jump-prev`,
        active: !1,
        showTitle: this.showTitle,
        itemRender: c
      }, null), w.unshift(_)), I - x >= F * 2 && x !== I - 2 && (w[w.length - 1] = h(ts, {
        locale: r,
        rootPrefixCls: e,
        onClick: this.handleChange,
        onKeypress: this.runIfEnter,
        key: re,
        page: re,
        class: `${e}-item-before-jump-next`,
        active: !1,
        showTitle: this.showTitle,
        itemRender: c
      }, null), w.push(M)), ie !== 1 && w.unshift(N), re !== I && w.push(A);
    }
    let W = null;
    s && (W = h("li", {
      class: `${e}-total-text`
    }, [s(o, [o === 0 ? 0 : (x - 1) * S + 1, x * S > o ? o : x * S])]));
    const K = !j || !I, q = !ee || !I, G = this.buildOptionText || this.$slots.buildOptionText;
    return h("ul", Q(Q({
      unselectable: "on",
      ref: "paginationNode"
    }, $), {}, {
      class: Me({
        [`${e}`]: !0,
        [`${e}-disabled`]: t
      }, P)
    }), [W, h("li", {
      title: l ? r.prev_page : null,
      onClick: this.prev,
      tabindex: K ? null : 0,
      onKeypress: this.runIfEnterPrev,
      class: Me(`${e}-prev`, {
        [`${e}-disabled`]: K
      }),
      "aria-disabled": K
    }, [this.renderPrev(R)]), w, h("li", {
      title: l ? r.next_page : null,
      onClick: this.next,
      tabindex: q ? null : 0,
      onKeypress: this.runIfEnterNext,
      class: Me(`${e}-next`, {
        [`${e}-disabled`]: q
      }),
      "aria-disabled": q
    }, [this.renderNext(X)]), h(qX, {
      disabled: t,
      locale: r,
      rootPrefixCls: e,
      selectComponentClass: v,
      selectPrefixCls: g,
      changeSize: this.getShowSizeChanger() ? this.changePageSize : null,
      current: x,
      pageSize: S,
      pageSizeOptions: m,
      buildOptionText: G || null,
      quickGo: this.shouldDisplayQuickJumper() ? this.handleChange : null,
      goButton: B
    }, null)]);
  }
}), ZX = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-disabled`]: {
      "&, &:hover": {
        cursor: "not-allowed",
        [`${t}-item-link`]: {
          color: e.colorTextDisabled,
          cursor: "not-allowed"
        }
      },
      "&:focus-visible": {
        cursor: "not-allowed",
        [`${t}-item-link`]: {
          color: e.colorTextDisabled,
          cursor: "not-allowed"
        }
      }
    },
    [`&${t}-disabled`]: {
      cursor: "not-allowed",
      [`&${t}-mini`]: {
        [`
          &:hover ${t}-item:not(${t}-item-active),
          &:active ${t}-item:not(${t}-item-active),
          &:hover ${t}-item-link,
          &:active ${t}-item-link
        `]: {
          backgroundColor: "transparent"
        }
      },
      [`${t}-item`]: {
        cursor: "not-allowed",
        "&:hover, &:active": {
          backgroundColor: "transparent"
        },
        a: {
          color: e.colorTextDisabled,
          backgroundColor: "transparent",
          border: "none",
          cursor: "not-allowed"
        },
        "&-active": {
          borderColor: e.colorBorder,
          backgroundColor: e.paginationItemDisabledBgActive,
          "&:hover, &:active": {
            backgroundColor: e.paginationItemDisabledBgActive
          },
          a: {
            color: e.paginationItemDisabledColorActive
          }
        }
      },
      [`${t}-item-link`]: {
        color: e.colorTextDisabled,
        cursor: "not-allowed",
        "&:hover, &:active": {
          backgroundColor: "transparent"
        },
        [`${t}-simple&`]: {
          backgroundColor: "transparent",
          "&:hover, &:active": {
            backgroundColor: "transparent"
          }
        }
      },
      [`${t}-simple-pager`]: {
        color: e.colorTextDisabled
      },
      [`${t}-jump-prev, ${t}-jump-next`]: {
        [`${t}-item-link-icon`]: {
          opacity: 0
        },
        [`${t}-item-ellipsis`]: {
          opacity: 1
        }
      }
    },
    [`&${t}-simple`]: {
      [`${t}-prev, ${t}-next`]: {
        [`&${t}-disabled ${t}-item-link`]: {
          "&:hover, &:active": {
            backgroundColor: "transparent"
          }
        }
      }
    }
  };
}, JX = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]: {
      height: e.paginationItemSizeSM,
      lineHeight: `${e.paginationItemSizeSM}px`
    },
    [`&${t}-mini ${t}-item`]: {
      minWidth: e.paginationItemSizeSM,
      height: e.paginationItemSizeSM,
      margin: 0,
      lineHeight: `${e.paginationItemSizeSM - 2}px`
    },
    [`&${t}-mini ${t}-item:not(${t}-item-active)`]: {
      backgroundColor: "transparent",
      borderColor: "transparent",
      "&:hover": {
        backgroundColor: e.colorBgTextHover
      },
      "&:active": {
        backgroundColor: e.colorBgTextActive
      }
    },
    [`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]: {
      minWidth: e.paginationItemSizeSM,
      height: e.paginationItemSizeSM,
      margin: 0,
      lineHeight: `${e.paginationItemSizeSM}px`,
      [`&:hover ${t}-item-link`]: {
        backgroundColor: e.colorBgTextHover
      },
      [`&:active ${t}-item-link`]: {
        backgroundColor: e.colorBgTextActive
      },
      [`&${t}-disabled:hover ${t}-item-link`]: {
        backgroundColor: "transparent"
      }
    },
    [`
    &${t}-mini ${t}-prev ${t}-item-link,
    &${t}-mini ${t}-next ${t}-item-link
    `]: {
      backgroundColor: "transparent",
      borderColor: "transparent",
      "&::after": {
        height: e.paginationItemSizeSM,
        lineHeight: `${e.paginationItemSizeSM}px`
      }
    },
    [`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]: {
      height: e.paginationItemSizeSM,
      marginInlineEnd: 0,
      lineHeight: `${e.paginationItemSizeSM}px`
    },
    [`&${t}-mini ${t}-options`]: {
      marginInlineStart: e.paginationMiniOptionsMarginInlineStart,
      "&-size-changer": {
        top: e.paginationMiniOptionsSizeChangerTop
      },
      "&-quick-jumper": {
        height: e.paginationItemSizeSM,
        lineHeight: `${e.paginationItemSizeSM}px`,
        input: O(O({}, rx(e)), {
          width: e.paginationMiniQuickJumperInputWidth,
          height: e.controlHeightSM
        })
      }
    }
  };
}, eQ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`
    &${t}-simple ${t}-prev,
    &${t}-simple ${t}-next
    `]: {
      height: e.paginationItemSizeSM,
      lineHeight: `${e.paginationItemSizeSM}px`,
      verticalAlign: "top",
      [`${t}-item-link`]: {
        height: e.paginationItemSizeSM,
        backgroundColor: "transparent",
        border: 0,
        "&:hover": {
          backgroundColor: e.colorBgTextHover
        },
        "&:active": {
          backgroundColor: e.colorBgTextActive
        },
        "&::after": {
          height: e.paginationItemSizeSM,
          lineHeight: `${e.paginationItemSizeSM}px`
        }
      }
    },
    [`&${t}-simple ${t}-simple-pager`]: {
      display: "inline-block",
      height: e.paginationItemSizeSM,
      marginInlineEnd: e.marginXS,
      input: {
        boxSizing: "border-box",
        height: "100%",
        marginInlineEnd: e.marginXS,
        padding: `0 ${e.paginationItemPaddingInline}px`,
        textAlign: "center",
        backgroundColor: e.paginationItemInputBg,
        border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
        borderRadius: e.borderRadius,
        outline: "none",
        transition: `border-color ${e.motionDurationMid}`,
        color: "inherit",
        "&:hover": {
          borderColor: e.colorPrimary
        },
        "&:focus": {
          borderColor: e.colorPrimaryHover,
          boxShadow: `${e.inputOutlineOffset}px 0 ${e.controlOutlineWidth}px ${e.controlOutline}`
        },
        "&[disabled]": {
          color: e.colorTextDisabled,
          backgroundColor: e.colorBgContainerDisabled,
          borderColor: e.colorBorder,
          cursor: "not-allowed"
        }
      }
    }
  };
}, tQ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-jump-prev, ${t}-jump-next`]: {
      outline: 0,
      [`${t}-item-container`]: {
        position: "relative",
        [`${t}-item-link-icon`]: {
          color: e.colorPrimary,
          fontSize: e.fontSizeSM,
          opacity: 0,
          transition: `all ${e.motionDurationMid}`,
          "&-svg": {
            top: 0,
            insetInlineEnd: 0,
            bottom: 0,
            insetInlineStart: 0,
            margin: "auto"
          }
        },
        [`${t}-item-ellipsis`]: {
          position: "absolute",
          top: 0,
          insetInlineEnd: 0,
          bottom: 0,
          insetInlineStart: 0,
          display: "block",
          margin: "auto",
          color: e.colorTextDisabled,
          fontFamily: "Arial, Helvetica, sans-serif",
          letterSpacing: e.paginationEllipsisLetterSpacing,
          textAlign: "center",
          textIndent: e.paginationEllipsisTextIndent,
          opacity: 1,
          transition: `all ${e.motionDurationMid}`
        }
      },
      "&:hover": {
        [`${t}-item-link-icon`]: {
          opacity: 1
        },
        [`${t}-item-ellipsis`]: {
          opacity: 0
        }
      },
      "&:focus-visible": O({
        [`${t}-item-link-icon`]: {
          opacity: 1
        },
        [`${t}-item-ellipsis`]: {
          opacity: 0
        }
      }, ja(e))
    },
    [`
    ${t}-prev,
    ${t}-jump-prev,
    ${t}-jump-next
    `]: {
      marginInlineEnd: e.marginXS
    },
    [`
    ${t}-prev,
    ${t}-next,
    ${t}-jump-prev,
    ${t}-jump-next
    `]: {
      display: "inline-block",
      minWidth: e.paginationItemSize,
      height: e.paginationItemSize,
      color: e.colorText,
      fontFamily: e.paginationFontFamily,
      lineHeight: `${e.paginationItemSize}px`,
      textAlign: "center",
      verticalAlign: "middle",
      listStyle: "none",
      borderRadius: e.borderRadius,
      cursor: "pointer",
      transition: `all ${e.motionDurationMid}`
    },
    [`${t}-prev, ${t}-next`]: {
      fontFamily: "Arial, Helvetica, sans-serif",
      outline: 0,
      button: {
        color: e.colorText,
        cursor: "pointer",
        userSelect: "none"
      },
      [`${t}-item-link`]: {
        display: "block",
        width: "100%",
        height: "100%",
        padding: 0,
        fontSize: e.fontSizeSM,
        textAlign: "center",
        backgroundColor: "transparent",
        border: `${e.lineWidth}px ${e.lineType} transparent`,
        borderRadius: e.borderRadius,
        outline: "none",
        transition: `all ${e.motionDurationMid}`
      },
      [`&:focus-visible ${t}-item-link`]: O({}, ja(e)),
      [`&:hover ${t}-item-link`]: {
        backgroundColor: e.colorBgTextHover
      },
      [`&:active ${t}-item-link`]: {
        backgroundColor: e.colorBgTextActive
      },
      [`&${t}-disabled:hover`]: {
        [`${t}-item-link`]: {
          backgroundColor: "transparent"
        }
      }
    },
    [`${t}-slash`]: {
      marginInlineEnd: e.paginationSlashMarginInlineEnd,
      marginInlineStart: e.paginationSlashMarginInlineStart
    },
    [`${t}-options`]: {
      display: "inline-block",
      marginInlineStart: e.margin,
      verticalAlign: "middle",
      "&-size-changer.-select": {
        display: "inline-block",
        width: "auto"
      },
      "&-quick-jumper": {
        display: "inline-block",
        height: e.controlHeight,
        marginInlineStart: e.marginXS,
        lineHeight: `${e.controlHeight}px`,
        verticalAlign: "top",
        input: O(O({}, gc(e)), {
          width: e.controlHeightLG * 1.25,
          height: e.controlHeight,
          boxSizing: "border-box",
          margin: 0,
          marginInlineStart: e.marginXS,
          marginInlineEnd: e.marginXS
        })
      }
    }
  };
}, nQ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-item`]: O(O({
      display: "inline-block",
      minWidth: e.paginationItemSize,
      height: e.paginationItemSize,
      marginInlineEnd: e.marginXS,
      fontFamily: e.paginationFontFamily,
      lineHeight: `${e.paginationItemSize - 2}px`,
      textAlign: "center",
      verticalAlign: "middle",
      listStyle: "none",
      backgroundColor: "transparent",
      border: `${e.lineWidth}px ${e.lineType} transparent`,
      borderRadius: e.borderRadius,
      outline: 0,
      cursor: "pointer",
      userSelect: "none",
      a: {
        display: "block",
        padding: `0 ${e.paginationItemPaddingInline}px`,
        color: e.colorText,
        transition: "none",
        "&:hover": {
          textDecoration: "none"
        }
      },
      [`&:not(${t}-item-active)`]: {
        "&:hover": {
          transition: `all ${e.motionDurationMid}`,
          backgroundColor: e.colorBgTextHover
        },
        "&:active": {
          backgroundColor: e.colorBgTextActive
        }
      }
    }, Nl(e)), {
      "&-active": {
        fontWeight: e.paginationFontWeightActive,
        backgroundColor: e.paginationItemBgActive,
        borderColor: e.colorPrimary,
        a: {
          color: e.colorPrimary
        },
        "&:hover": {
          borderColor: e.colorPrimaryHover
        },
        "&:hover a": {
          color: e.colorPrimaryHover
        }
      }
    })
  };
}, oQ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: O(O(O(O(O(O(O(O({}, fn(e)), {
      "ul, ol": {
        margin: 0,
        padding: 0,
        listStyle: "none"
      },
      "&::after": {
        display: "block",
        clear: "both",
        height: 0,
        overflow: "hidden",
        visibility: "hidden",
        content: '""'
      },
      [`${t}-total-text`]: {
        display: "inline-block",
        height: e.paginationItemSize,
        marginInlineEnd: e.marginXS,
        lineHeight: `${e.paginationItemSize - 2}px`,
        verticalAlign: "middle"
      }
    }), nQ(e)), tQ(e)), eQ(e)), JX(e)), ZX(e)), {
      // media query style
      [`@media only screen and (max-width: ${e.screenLG}px)`]: {
        [`${t}-item`]: {
          "&-after-jump-prev, &-before-jump-next": {
            display: "none"
          }
        }
      },
      [`@media only screen and (max-width: ${e.screenSM}px)`]: {
        [`${t}-options`]: {
          display: "none"
        }
      }
    }),
    // rtl style
    [`&${e.componentCls}-rtl`]: {
      direction: "rtl"
    }
  };
}, rQ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}${t}-disabled`]: {
      "&, &:hover": {
        [`${t}-item-link`]: {
          borderColor: e.colorBorder
        }
      },
      "&:focus-visible": {
        [`${t}-item-link`]: {
          borderColor: e.colorBorder
        }
      },
      [`${t}-item, ${t}-item-link`]: {
        backgroundColor: e.colorBgContainerDisabled,
        borderColor: e.colorBorder,
        [`&:hover:not(${t}-item-active)`]: {
          backgroundColor: e.colorBgContainerDisabled,
          borderColor: e.colorBorder,
          a: {
            color: e.colorTextDisabled
          }
        },
        [`&${t}-item-active`]: {
          backgroundColor: e.paginationItemDisabledBgActive
        }
      },
      [`${t}-prev, ${t}-next`]: {
        "&:hover button": {
          backgroundColor: e.colorBgContainerDisabled,
          borderColor: e.colorBorder,
          color: e.colorTextDisabled
        },
        [`${t}-item-link`]: {
          backgroundColor: e.colorBgContainerDisabled,
          borderColor: e.colorBorder
        }
      }
    },
    [t]: {
      [`${t}-prev, ${t}-next`]: {
        "&:hover button": {
          borderColor: e.colorPrimaryHover,
          backgroundColor: e.paginationItemBg
        },
        [`${t}-item-link`]: {
          backgroundColor: e.paginationItemLinkBg,
          borderColor: e.colorBorder
        },
        [`&:hover ${t}-item-link`]: {
          borderColor: e.colorPrimary,
          backgroundColor: e.paginationItemBg,
          color: e.colorPrimary
        },
        [`&${t}-disabled`]: {
          [`${t}-item-link`]: {
            borderColor: e.colorBorder,
            color: e.colorTextDisabled
          }
        }
      },
      [`${t}-item`]: {
        backgroundColor: e.paginationItemBg,
        border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
        [`&:hover:not(${t}-item-active)`]: {
          borderColor: e.colorPrimary,
          backgroundColor: e.paginationItemBg,
          a: {
            color: e.colorPrimary
          }
        },
        "&-active": {
          borderColor: e.colorPrimary
        }
      }
    }
  };
}, iQ = Sn("Pagination", (e) => {
  const t = Qt(e, {
    paginationItemSize: e.controlHeight,
    paginationFontFamily: e.fontFamily,
    paginationItemBg: e.colorBgContainer,
    paginationItemBgActive: e.colorBgContainer,
    paginationFontWeightActive: e.fontWeightStrong,
    paginationItemSizeSM: e.controlHeightSM,
    paginationItemInputBg: e.colorBgContainer,
    paginationMiniOptionsSizeChangerTop: 0,
    paginationItemDisabledBgActive: e.controlItemBgActiveDisabled,
    paginationItemDisabledColorActive: e.colorTextDisabled,
    paginationItemLinkBg: e.colorBgContainer,
    inputOutlineOffset: "0 0",
    paginationMiniOptionsMarginInlineStart: e.marginXXS / 2,
    paginationMiniQuickJumperInputWidth: e.controlHeightLG * 1.1,
    paginationItemPaddingInline: e.marginXXS * 1.5,
    paginationEllipsisLetterSpacing: e.marginXXS / 2,
    paginationSlashMarginInlineStart: e.marginXXS,
    paginationSlashMarginInlineEnd: e.marginSM,
    paginationEllipsisTextIndent: "0.13em"
    // magic for ui experience
  }, Xh(e));
  return [oQ(t), e.wireframe && rQ(t)];
});
var aQ = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const lQ = () => ({
  total: Number,
  defaultCurrent: Number,
  disabled: ct(),
  current: Number,
  defaultPageSize: Number,
  pageSize: Number,
  hideOnSinglePage: ct(),
  showSizeChanger: ct(),
  pageSizeOptions: jn(),
  buildOptionText: et(),
  showQuickJumper: en([Boolean, Object]),
  showTotal: et(),
  size: an(),
  simple: ct(),
  locale: Object,
  prefixCls: String,
  selectPrefixCls: String,
  totalBoundaryShowSizeChanger: Number,
  selectComponentClass: String,
  itemRender: et(),
  role: String,
  responsive: Boolean,
  showLessItems: ct(),
  onChange: et(),
  onShowSizeChange: et(),
  "onUpdate:current": et(),
  "onUpdate:pageSize": et()
}), sQ = be({
  compatConfig: {
    MODE: 3
  },
  name: "APagination",
  inheritAttrs: !1,
  props: lQ(),
  // emits: ['change', 'showSizeChange', 'update:current', 'update:pageSize'],
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: r,
      configProvider: i,
      direction: a,
      size: l
    } = _t("pagination", e), [s, u] = iQ(r), c = E(() => i.getPrefixCls("select", e.selectPrefixCls)), d = R_(), [f] = Rl("Pagination", iI, Kt(e, "locale")), p = (v) => {
      const g = h("span", {
        class: `${v}-item-ellipsis`
      }, [Le("•••")]), m = h("button", {
        class: `${v}-item-link`,
        type: "button",
        tabindex: -1
      }, [a.value === "rtl" ? h(qa, null, null) : h(Ju, null, null)]), x = h("button", {
        class: `${v}-item-link`,
        type: "button",
        tabindex: -1
      }, [a.value === "rtl" ? h(Ju, null, null) : h(qa, null, null)]), S = h("a", {
        rel: "nofollow",
        class: `${v}-item-link`
      }, [h("div", {
        class: `${v}-item-container`
      }, [a.value === "rtl" ? h(Qp, {
        class: `${v}-item-link-icon`
      }, null) : h(Xp, {
        class: `${v}-item-link-icon`
      }, null), g])]), C = h("a", {
        rel: "nofollow",
        class: `${v}-item-link`
      }, [h("div", {
        class: `${v}-item-container`
      }, [a.value === "rtl" ? h(Xp, {
        class: `${v}-item-link-icon`
      }, null) : h(Qp, {
        class: `${v}-item-link-icon`
      }, null), g])]);
      return {
        prevIcon: m,
        nextIcon: x,
        jumpPrevIcon: S,
        jumpNextIcon: C
      };
    };
    return () => {
      var v;
      const {
        itemRender: g = n.itemRender,
        buildOptionText: m = n.buildOptionText,
        selectComponentClass: x,
        responsive: S
      } = e, C = aQ(e, ["itemRender", "buildOptionText", "selectComponentClass", "responsive"]), P = l.value === "small" || !!(!((v = d.value) === null || v === void 0) && v.xs && !l.value && S), $ = O(O(O(O(O({}, C), p(r.value)), {
        prefixCls: r.value,
        selectPrefixCls: c.value,
        selectComponentClass: x || (P ? WX : KX),
        locale: f.value,
        buildOptionText: m
      }), o), {
        class: Me({
          [`${r.value}-mini`]: P,
          [`${r.value}-rtl`]: a.value === "rtl"
        }, o.class, u.value),
        itemRender: g
      });
      return s(h(QX, $, null));
    };
  }
}), uQ = ii(sQ);
var cQ = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
let Fb;
const dQ = (e) => {
  Fb = {
    x: e.pageX,
    y: e.pageY
  }, setTimeout(() => Fb = null, 100);
};
dM() && Ho(document.documentElement, "click", dQ, !0);
const fQ = () => ({
  prefixCls: String,
  /** @deprecated Please use `open` instead. */
  visible: {
    type: Boolean,
    default: void 0
  },
  open: {
    type: Boolean,
    default: void 0
  },
  confirmLoading: {
    type: Boolean,
    default: void 0
  },
  title: fe.any,
  closable: {
    type: Boolean,
    default: void 0
  },
  closeIcon: fe.any,
  onOk: Function,
  onCancel: Function,
  "onUpdate:visible": Function,
  "onUpdate:open": Function,
  onChange: Function,
  afterClose: Function,
  centered: {
    type: Boolean,
    default: void 0
  },
  width: [String, Number],
  footer: fe.any,
  okText: fe.any,
  okType: String,
  cancelText: fe.any,
  icon: fe.any,
  maskClosable: {
    type: Boolean,
    default: void 0
  },
  forceRender: {
    type: Boolean,
    default: void 0
  },
  okButtonProps: Et(),
  cancelButtonProps: Et(),
  destroyOnClose: {
    type: Boolean,
    default: void 0
  },
  wrapClassName: String,
  maskTransitionName: String,
  transitionName: String,
  getContainer: {
    type: [String, Function, Boolean, Object],
    default: void 0
  },
  zIndex: Number,
  bodyStyle: Et(),
  maskStyle: Et(),
  mask: {
    type: Boolean,
    default: void 0
  },
  keyboard: {
    type: Boolean,
    default: void 0
  },
  wrapProps: Object,
  focusTriggerAfterClose: {
    type: Boolean,
    default: void 0
  },
  modalRender: Function,
  mousePosition: Et()
}), Vo = be({
  compatConfig: {
    MODE: 3
  },
  name: "AModal",
  inheritAttrs: !1,
  props: kn(fQ(), {
    width: 520,
    confirmLoading: !1,
    okType: "primary"
  }),
  setup(e, t) {
    let {
      emit: n,
      slots: o,
      attrs: r
    } = t;
    const [i] = Rl("Modal"), {
      prefixCls: a,
      rootPrefixCls: l,
      direction: s,
      getPopupContainer: u
    } = _t("modal", e), [c, d] = lX(a);
    wo(e.visible === void 0, "Modal", "`visible` will be removed in next major version, please use `open` instead.");
    const f = (g) => {
      n("update:visible", !1), n("update:open", !1), n("cancel", g), n("change", !1);
    }, p = (g) => {
      n("ok", g);
    }, v = () => {
      var g, m;
      const {
        okText: x = (g = o.okText) === null || g === void 0 ? void 0 : g.call(o),
        okType: S,
        cancelText: C = (m = o.cancelText) === null || m === void 0 ? void 0 : m.call(o),
        confirmLoading: P
      } = e;
      return h(Je, null, [h(Lt, Q({
        onClick: f
      }, e.cancelButtonProps), {
        default: () => [C || i.value.cancelText]
      }), h(Lt, Q(Q({}, q_(S)), {}, {
        loading: P,
        onClick: p
      }, e.okButtonProps), {
        default: () => [x || i.value.okText]
      })]);
    };
    return () => {
      var g, m;
      const {
        prefixCls: x,
        visible: S,
        open: C,
        wrapClassName: P,
        centered: $,
        getContainer: I,
        closeIcon: w = (g = o.closeIcon) === null || g === void 0 ? void 0 : g.call(o),
        focusTriggerAfterClose: _ = !0
      } = e, M = cQ(e, ["prefixCls", "visible", "open", "wrapClassName", "centered", "getContainer", "closeIcon", "focusTriggerAfterClose"]), N = Me(P, {
        [`${a.value}-centered`]: !!$,
        [`${a.value}-wrap-rtl`]: s.value === "rtl"
      });
      return c(h(tX, Q(Q(Q({}, M), r), {}, {
        rootClassName: d.value,
        class: Me(d.value, r.class),
        getContainer: I || u?.value,
        prefixCls: a.value,
        wrapClassName: N,
        visible: C ?? S,
        onClose: f,
        focusTriggerAfterClose: _,
        transitionName: Wa(l.value, "zoom", e.transitionName),
        maskTransitionName: Wa(l.value, "fade", e.maskTransitionName),
        mousePosition: (m = M.mousePosition) !== null && m !== void 0 ? m : Fb
      }), O(O({}, o), {
        footer: o.footer || v,
        closeIcon: () => h("span", {
          class: `${a.value}-close-x`
        }, [w || h(ra, {
          class: `${a.value}-close-icon`
        }, null)])
      })));
    };
  }
}), pQ = () => {
  const e = $e(!1);
  return qt(() => {
    e.value = !0;
  }), e;
}, hQ = {
  type: {
    type: String
  },
  actionFn: Function,
  close: Function,
  autofocus: Boolean,
  prefixCls: String,
  buttonProps: Et(),
  emitEvent: Boolean,
  quitOnNullishReturnValue: Boolean
};
function u$(e) {
  return !!(e && e.then);
}
const c$ = be({
  compatConfig: {
    MODE: 3
  },
  name: "ActionButton",
  props: hQ,
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = $e(!1), r = $e(), i = $e(!1);
    let a;
    const l = pQ();
    Nt(() => {
      e.autofocus && (a = setTimeout(() => {
        var d, f;
        return (f = (d = Ui(r.value)) === null || d === void 0 ? void 0 : d.focus) === null || f === void 0 ? void 0 : f.call(d);
      }));
    }), qt(() => {
      clearTimeout(a);
    });
    const s = function() {
      for (var d, f = arguments.length, p = new Array(f), v = 0; v < f; v++)
        p[v] = arguments[v];
      (d = e.close) === null || d === void 0 || d.call(e, ...p);
    }, u = (d) => {
      u$(d) && (i.value = !0, d.then(function() {
        l.value || (i.value = !1), s(...arguments), o.value = !1;
      }, (f) => (l.value || (i.value = !1), o.value = !1, Promise.reject(f))));
    }, c = (d) => {
      const {
        actionFn: f
      } = e;
      if (o.value)
        return;
      if (o.value = !0, !f) {
        s();
        return;
      }
      let p;
      if (e.emitEvent) {
        if (p = f(d), e.quitOnNullishReturnValue && !u$(p)) {
          o.value = !1, s(d);
          return;
        }
      } else if (f.length)
        p = f(e.close), o.value = !1;
      else if (p = f(), !p) {
        s();
        return;
      }
      u(p);
    };
    return () => {
      const {
        type: d,
        prefixCls: f,
        buttonProps: p
      } = e;
      return h(Lt, Q(Q(Q({}, q_(d)), {}, {
        onClick: c,
        loading: i.value,
        prefixCls: f
      }, p), {}, {
        ref: r
      }), n);
    };
  }
});
function uu(e) {
  return typeof e == "function" ? e() : e;
}
const d2 = be({
  name: "ConfirmDialog",
  inheritAttrs: !1,
  props: ["icon", "onCancel", "onOk", "close", "closable", "zIndex", "afterClose", "visible", "open", "keyboard", "centered", "getContainer", "maskStyle", "okButtonProps", "cancelButtonProps", "okType", "prefixCls", "okCancel", "width", "mask", "maskClosable", "okText", "cancelText", "autoFocusButton", "transitionName", "maskTransitionName", "type", "title", "content", "direction", "rootPrefixCls", "bodyStyle", "closeIcon", "modalRender", "focusTriggerAfterClose", "wrapClassName", "confirmPrefixCls", "footer"],
  setup(e, t) {
    let {
      attrs: n
    } = t;
    const [o] = Rl("Modal");
    return process.env.NODE_ENV !== "production" && wo(e.visible === void 0, "Modal", "`visible` is deprecated, please use `open` instead."), () => {
      const {
        icon: r,
        onCancel: i,
        onOk: a,
        close: l,
        okText: s,
        closable: u = !1,
        zIndex: c,
        afterClose: d,
        keyboard: f,
        centered: p,
        getContainer: v,
        maskStyle: g,
        okButtonProps: m,
        cancelButtonProps: x,
        okCancel: S,
        width: C = 416,
        mask: P = !0,
        maskClosable: $ = !1,
        type: I,
        open: w,
        title: _,
        content: M,
        direction: N,
        closeIcon: A,
        modalRender: H,
        focusTriggerAfterClose: B,
        rootPrefixCls: F,
        bodyStyle: R,
        wrapClassName: X,
        footer: j
      } = e;
      let ee = r;
      if (!r && r !== null)
        switch (I) {
          case "info":
            ee = h(Hs, null, null);
            break;
          case "success":
            ee = h(Fl, null, null);
            break;
          case "error":
            ee = h(Fr, null, null);
            break;
          default:
            ee = h(Bl, null, null);
        }
      const W = e.okType || "primary", K = e.prefixCls || "ant-modal", q = `${K}-confirm`, G = n.style || {}, ae = S ?? I === "confirm", le = e.autoFocusButton === null ? !1 : e.autoFocusButton || "ok", ie = `${K}-confirm`, re = Me(ie, `${ie}-${e.type}`, {
        [`${ie}-rtl`]: N === "rtl"
      }, n.class), te = o.value, ve = ae && h(c$, {
        actionFn: i,
        close: l,
        autofocus: le === "cancel",
        buttonProps: x,
        prefixCls: `${F}-btn`
      }, {
        default: () => [uu(e.cancelText) || te.cancelText]
      });
      return h(Vo, {
        prefixCls: K,
        class: re,
        wrapClassName: Me({
          [`${ie}-centered`]: !!p
        }, X),
        onCancel: (ue) => l?.({
          triggerCancel: !0
        }, ue),
        open: w,
        title: "",
        footer: "",
        transitionName: Wa(F, "zoom", e.transitionName),
        maskTransitionName: Wa(F, "fade", e.maskTransitionName),
        mask: P,
        maskClosable: $,
        maskStyle: g,
        style: G,
        bodyStyle: R,
        width: C,
        zIndex: c,
        afterClose: d,
        keyboard: f,
        centered: p,
        getContainer: v,
        closable: u,
        closeIcon: A,
        modalRender: H,
        focusTriggerAfterClose: B
      }, {
        default: () => [h("div", {
          class: `${q}-body-wrapper`
        }, [h("div", {
          class: `${q}-body`
        }, [uu(ee), _ === void 0 ? null : h("span", {
          class: `${q}-title`
        }, [uu(_)]), h("div", {
          class: `${q}-content`
        }, [uu(M)])]), j !== void 0 ? uu(j) : h("div", {
          class: `${q}-btns`
        }, [ve, h(c$, {
          type: W,
          actionFn: a,
          close: l,
          autofocus: le === "ok",
          buttonProps: m,
          prefixCls: `${F}-btn`
        }, {
          default: () => [uu(s) || (ae ? te.okText : te.justOkText)]
        })])])]
      });
    };
  }
}), bs = [], qd = (e) => {
  const t = document.createDocumentFragment();
  let n = O(O({}, Fn(e, ["parentContext", "appContext"])), {
    close: i,
    open: !0
  }), o = null;
  function r() {
    o && (El(null, t), o = null);
    for (var u = arguments.length, c = new Array(u), d = 0; d < u; d++)
      c[d] = arguments[d];
    const f = c.some((p) => p && p.triggerCancel);
    e.onCancel && f && e.onCancel(() => {
    }, ...c.slice(1));
    for (let p = 0; p < bs.length; p++)
      if (bs[p] === i) {
        bs.splice(p, 1);
        break;
      }
  }
  function i() {
    for (var u = arguments.length, c = new Array(u), d = 0; d < u; d++)
      c[d] = arguments[d];
    n = O(O({}, n), {
      open: !1,
      afterClose: () => {
        typeof e.afterClose == "function" && e.afterClose(), r.apply(this, c);
      }
    }), n.visible && delete n.visible, a(n);
  }
  function a(u) {
    typeof u == "function" ? n = u(n) : n = O(O({}, n), u), o && x5(o, n, t);
  }
  const l = (u) => {
    const c = qo, d = c.prefixCls, f = u.prefixCls || `${d}-modal`, p = c.iconPrefixCls, v = LY();
    return h(Ps, Q(Q({}, c), {}, {
      prefixCls: d
    }), {
      default: () => [h(d2, Q(Q({}, u), {}, {
        rootPrefixCls: d,
        prefixCls: f,
        iconPrefixCls: p,
        locale: v,
        cancelText: u.cancelText || v.cancelText
      }), null)]
    });
  };
  function s(u) {
    const c = h(l, O({}, u));
    return c.appContext = e.parentContext || e.appContext || c.appContext, El(c, t), c;
  }
  return o = s(n), bs.push(i), {
    destroy: i,
    update: a
  };
};
function f2(e) {
  return O(O({}, e), {
    type: "warning"
  });
}
function p2(e) {
  return O(O({}, e), {
    type: "info"
  });
}
function h2(e) {
  return O(O({}, e), {
    type: "success"
  });
}
function g2(e) {
  return O(O({}, e), {
    type: "error"
  });
}
function v2(e) {
  return O(O({}, e), {
    type: "confirm"
  });
}
const gQ = () => ({
  config: Object,
  afterClose: Function,
  destroyAction: Function,
  open: Boolean
}), vQ = be({
  name: "HookModal",
  inheritAttrs: !1,
  props: kn(gQ(), {
    config: {
      width: 520,
      okType: "primary"
    }
  }),
  setup(e, t) {
    let {
      expose: n
    } = t;
    var o;
    const r = E(() => e.open), i = E(() => e.config), {
      direction: a,
      getPrefixCls: l
    } = Oh(), s = l("modal"), u = l(), c = () => {
      var v, g;
      e?.afterClose(), (g = (v = i.value).afterClose) === null || g === void 0 || g.call(v);
    }, d = function() {
      e.destroyAction(...arguments);
    };
    n({
      destroy: d
    });
    const f = (o = i.value.okCancel) !== null && o !== void 0 ? o : i.value.type === "confirm", [p] = Rl("Modal", Ba.Modal);
    return () => h(d2, Q(Q({
      prefixCls: s,
      rootPrefixCls: u
    }, i.value), {}, {
      close: d,
      open: r.value,
      afterClose: c,
      okText: i.value.okText || (f ? p?.value.okText : p?.value.justOkText),
      direction: i.value.direction || a.value,
      cancelText: i.value.cancelText || p?.value.cancelText
    }), null);
  }
});
let d$ = 0;
const mQ = be({
  name: "ElementsHolder",
  inheritAttrs: !1,
  setup(e, t) {
    let {
      expose: n
    } = t;
    const o = $e([]);
    return n({
      addModal: (i) => (o.value.push(i), o.value = o.value.slice(), () => {
        o.value = o.value.filter((a) => a !== i);
      })
    }), () => o.value.map((i) => i());
  }
});
function m2() {
  const e = $e(null), t = $e([]);
  ke(t, () => {
    t.value.length && ([...t.value].forEach((a) => {
      a();
    }), t.value = []);
  }, {
    immediate: !0
  });
  const n = (i) => function(l) {
    var s;
    d$ += 1;
    const u = $e(!0), c = $e(null), d = $e(T(l)), f = $e({});
    ke(() => l, (C) => {
      m(O(O({}, jP(C) ? C.value : C), f.value));
    });
    const p = function() {
      u.value = !1;
      for (var C = arguments.length, P = new Array(C), $ = 0; $ < C; $++)
        P[$] = arguments[$];
      const I = P.some((w) => w && w.triggerCancel);
      d.value.onCancel && I && d.value.onCancel(() => {
      }, ...P.slice(1));
    };
    let v;
    const g = () => h(vQ, {
      key: `modal-${d$}`,
      config: i(d.value),
      ref: c,
      open: u.value,
      destroyAction: p,
      afterClose: () => {
        v?.();
      }
    }, null);
    v = (s = e.value) === null || s === void 0 ? void 0 : s.addModal(g), v && bs.push(v);
    const m = (C) => {
      d.value = O(O({}, d.value), C);
    };
    return {
      destroy: () => {
        c.value ? p() : t.value = [...t.value, p];
      },
      update: (C) => {
        f.value = C, c.value ? m(C) : t.value = [...t.value, () => m(C)];
      }
    };
  }, o = E(() => ({
    info: n(p2),
    success: n(h2),
    error: n(g2),
    warning: n(f2),
    confirm: n(v2)
  })), r = Symbol("modalHolderKey");
  return [o.value, () => h(mQ, {
    key: r,
    ref: e
  }, null)];
}
function b2(e) {
  return qd(f2(e));
}
Vo.useModal = m2;
Vo.info = function(t) {
  return qd(p2(t));
};
Vo.success = function(t) {
  return qd(h2(t));
};
Vo.error = function(t) {
  return qd(g2(t));
};
Vo.warning = b2;
Vo.warn = b2;
Vo.confirm = function(t) {
  return qd(v2(t));
};
Vo.destroyAll = function() {
  for (; bs.length; ) {
    const t = bs.pop();
    t && t();
  }
};
Vo.install = function(e) {
  return e.component(Vo.name, Vo), e;
};
const bQ = {
  small: 8,
  middle: 16,
  large: 24
}, yQ = () => ({
  prefixCls: String,
  size: {
    type: [String, Number, Array]
  },
  direction: fe.oneOf(Dr("horizontal", "vertical")).def("horizontal"),
  align: fe.oneOf(Dr("start", "end", "center", "baseline")),
  wrap: ct()
});
function xQ(e) {
  return typeof e == "string" ? bQ[e] : e || 0;
}
const Qi = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASpace",
  inheritAttrs: !1,
  props: yQ(),
  slots: Object,
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const {
      prefixCls: r,
      space: i,
      direction: a
    } = _t("space", e), [l, s] = D_(r), u = pM(), c = E(() => {
      var x, S, C;
      return (C = (x = e.size) !== null && x !== void 0 ? x : (S = i?.value) === null || S === void 0 ? void 0 : S.size) !== null && C !== void 0 ? C : "small";
    }), d = ce(), f = ce();
    ke(c, () => {
      [d.value, f.value] = (Array.isArray(c.value) ? c.value : [c.value, c.value]).map((x) => xQ(x));
    }, {
      immediate: !0
    });
    const p = E(() => e.align === void 0 && e.direction === "horizontal" ? "center" : e.align), v = E(() => Me(r.value, s.value, `${r.value}-${e.direction}`, {
      [`${r.value}-rtl`]: a.value === "rtl",
      [`${r.value}-align-${p.value}`]: p.value
    })), g = E(() => a.value === "rtl" ? "marginLeft" : "marginRight"), m = E(() => {
      const x = {};
      return u.value && (x.columnGap = `${d.value}px`, x.rowGap = `${f.value}px`), O(O({}, x), e.wrap && {
        flexWrap: "wrap",
        marginBottom: `${-f.value}px`
      });
    });
    return () => {
      var x, S;
      const {
        wrap: C,
        direction: P = "horizontal"
      } = e, $ = (x = n.default) === null || x === void 0 ? void 0 : x.call(n), I = Do($), w = I.length;
      if (w === 0)
        return null;
      const _ = (S = n.split) === null || S === void 0 ? void 0 : S.call(n), M = `${r.value}-item`, N = d.value, A = w - 1;
      return h("div", Q(Q({}, o), {}, {
        class: [v.value, o.class],
        style: [m.value, o.style]
      }), [I.map((H, B) => {
        let F = $.indexOf(H);
        F === -1 && (F = `$$space-${B}`);
        let R = {};
        return u.value || (P === "vertical" ? B < A && (R = {
          marginBottom: `${N / (_ ? 2 : 1)}px`
        }) : R = O(O({}, B < A && {
          [g.value]: `${N / (_ ? 2 : 1)}px`
        }), C && {
          paddingBottom: `${f.value}px`
        })), l(h(Je, {
          key: F
        }, [h("div", {
          class: M,
          style: R
        }, [H]), B < A && _ && h("span", {
          class: `${M}-split`,
          style: R
        }, [_])]));
      })]);
    };
  }
});
Qi.Compact = eb;
Qi.install = function(e) {
  return e.component(Qi.name, Qi), e.component(eb.name, eb), e;
};
const wQ = ii(gM), Mx = (e, t) => {
  let {
    attrs: n
  } = t;
  const {
    included: o,
    vertical: r,
    style: i,
    class: a
  } = n;
  let {
    length: l,
    offset: s,
    reverse: u
  } = n;
  l < 0 && (u = !u, l = Math.abs(l), s = 100 - s);
  const c = r ? {
    [u ? "top" : "bottom"]: `${s}%`,
    [u ? "bottom" : "top"]: "auto",
    height: `${l}%`
  } : {
    [u ? "right" : "left"]: `${s}%`,
    [u ? "left" : "right"]: "auto",
    width: `${l}%`
  }, d = O(O({}, i), c);
  return o ? h("div", {
    class: a,
    style: d
  }, null) : null;
};
Mx.inheritAttrs = !1;
const SQ = (e, t, n, o, r, i) => {
  wo(n ? o > 0 : !0, "Slider", "`Slider[step]` should be a positive number in order to make Slider[dots] work.");
  const a = Object.keys(t).map(parseFloat).sort((l, s) => l - s);
  if (n && o)
    for (let l = r; l <= i; l += o)
      a.indexOf(l) === -1 && a.push(l);
  return a;
}, y2 = (e, t) => {
  let {
    attrs: n
  } = t;
  const {
    prefixCls: o,
    vertical: r,
    reverse: i,
    marks: a,
    dots: l,
    step: s,
    included: u,
    lowerBound: c,
    upperBound: d,
    max: f,
    min: p,
    dotStyle: v,
    activeDotStyle: g
  } = n, m = f - p, x = SQ(r, a, l, s, p, f).map((S) => {
    const C = `${Math.abs(S - p) / m * 100}%`, P = !u && S === d || u && S <= d && S >= c;
    let $ = r ? O(O({}, v), {
      [i ? "top" : "bottom"]: C
    }) : O(O({}, v), {
      [i ? "right" : "left"]: C
    });
    P && ($ = O(O({}, $), g));
    const I = Me({
      [`${o}-dot`]: !0,
      [`${o}-dot-active`]: P,
      [`${o}-dot-reverse`]: i
    });
    return h("span", {
      class: I,
      style: $,
      key: S
    }, null);
  });
  return h("div", {
    class: `${o}-step`
  }, [x]);
};
y2.inheritAttrs = !1;
const x2 = (e, t) => {
  let {
    attrs: n,
    slots: o
  } = t;
  const {
    class: r,
    vertical: i,
    reverse: a,
    marks: l,
    included: s,
    upperBound: u,
    lowerBound: c,
    max: d,
    min: f,
    onClickLabel: p
  } = n, v = Object.keys(l), g = o.mark, m = d - f, x = v.map(parseFloat).sort((S, C) => S - C).map((S) => {
    const C = typeof l[S] == "function" ? l[S]() : l[S], P = typeof C == "object" && !Ao(C);
    let $ = P ? C.label : C;
    if (!$ && $ !== 0)
      return null;
    g && ($ = g({
      point: S,
      label: $
    }));
    const I = !s && S === u || s && S <= u && S >= c, w = Me({
      [`${r}-text`]: !0,
      [`${r}-text-active`]: I
    }), _ = {
      marginBottom: "-50%",
      [a ? "top" : "bottom"]: `${(S - f) / m * 100}%`
    }, M = {
      transform: `translateX(${a ? "50%" : "-50%"})`,
      msTransform: `translateX(${a ? "50%" : "-50%"})`,
      [a ? "right" : "left"]: `${(S - f) / m * 100}%`
    }, N = i ? _ : M, A = P ? O(O({}, N), C.style) : N, H = {
      [Bo ? "onTouchstartPassive" : "onTouchstart"]: (B) => p(B, S)
    };
    return h("span", Q({
      class: w,
      style: A,
      key: S,
      onMousedown: (B) => p(B, S)
    }, H), [$]);
  });
  return h("div", {
    class: r
  }, [x]);
};
x2.inheritAttrs = !1;
const w2 = be({
  compatConfig: {
    MODE: 3
  },
  name: "Handle",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    vertical: {
      type: Boolean,
      default: void 0
    },
    offset: Number,
    disabled: {
      type: Boolean,
      default: void 0
    },
    min: Number,
    max: Number,
    value: Number,
    tabindex: fe.oneOfType([fe.number, fe.string]),
    reverse: {
      type: Boolean,
      default: void 0
    },
    ariaLabel: String,
    ariaLabelledBy: String,
    ariaValueTextFormatter: Function,
    onMouseenter: {
      type: Function
    },
    onMouseleave: {
      type: Function
    },
    onMousedown: {
      type: Function
    }
  },
  setup(e, t) {
    let {
      attrs: n,
      emit: o,
      expose: r
    } = t;
    const i = $e(!1), a = $e(), l = () => {
      document.activeElement === a.value && (i.value = !0);
    }, s = (m) => {
      i.value = !1, o("blur", m);
    }, u = () => {
      i.value = !1;
    }, c = () => {
      var m;
      (m = a.value) === null || m === void 0 || m.focus();
    }, d = () => {
      var m;
      (m = a.value) === null || m === void 0 || m.blur();
    }, f = () => {
      i.value = !0, c();
    }, p = (m) => {
      m.preventDefault(), c(), o("mousedown", m);
    };
    r({
      focus: c,
      blur: d,
      clickFocus: f,
      ref: a
    });
    let v = null;
    Nt(() => {
      v = Ho(document, "mouseup", l);
    }), qt(() => {
      v?.remove();
    });
    const g = E(() => {
      const {
        vertical: m,
        offset: x,
        reverse: S
      } = e;
      return m ? {
        [S ? "top" : "bottom"]: `${x}%`,
        [S ? "bottom" : "top"]: "auto",
        transform: S ? null : "translateY(+50%)"
      } : {
        [S ? "right" : "left"]: `${x}%`,
        [S ? "left" : "right"]: "auto",
        transform: `translateX(${S ? "+" : "-"}50%)`
      };
    });
    return () => {
      const {
        prefixCls: m,
        disabled: x,
        min: S,
        max: C,
        value: P,
        tabindex: $,
        ariaLabel: I,
        ariaLabelledBy: w,
        ariaValueTextFormatter: _,
        onMouseenter: M,
        onMouseleave: N
      } = e, A = Me(n.class, {
        [`${m}-handle-click-focused`]: i.value
      }), H = {
        "aria-valuemin": S,
        "aria-valuemax": C,
        "aria-valuenow": P,
        "aria-disabled": !!x
      }, B = [n.style, g.value];
      let F = $ || 0;
      (x || $ === null) && (F = null);
      let R;
      _ && (R = _(P));
      const X = O(O(O(O({}, n), {
        role: "slider",
        tabindex: F
      }), H), {
        class: A,
        onBlur: s,
        onKeydown: u,
        onMousedown: p,
        onMouseenter: M,
        onMouseleave: N,
        ref: a,
        style: B
      });
      return h("div", Q(Q({}, X), {}, {
        "aria-label": I,
        "aria-labelledby": w,
        "aria-valuetext": R
      }), null);
    };
  }
});
function Bv(e, t) {
  try {
    return Object.keys(t).some((n) => e.target === t[n].ref);
  } catch {
    return !1;
  }
}
function S2(e, t) {
  let {
    min: n,
    max: o
  } = t;
  return e < n || e > o;
}
function f$(e) {
  return e.touches.length > 1 || e.type.toLowerCase() === "touchend" && e.touches.length > 0;
}
function p$(e, t) {
  let {
    marks: n,
    step: o,
    min: r,
    max: i
  } = t;
  const a = Object.keys(n).map(parseFloat);
  if (o !== null) {
    const s = Math.pow(10, C2(o)), u = Math.floor((i * s - r * s) / (o * s)), c = Math.min((e - r) / o, u), d = Math.round(c) * o + r;
    a.push(d);
  }
  const l = a.map((s) => Math.abs(e - s));
  return a[l.indexOf(Math.min(...l))];
}
function C2(e) {
  const t = e.toString();
  let n = 0;
  return t.indexOf(".") >= 0 && (n = t.length - t.indexOf(".") - 1), n;
}
function h$(e, t) {
  let n = 1;
  return window.visualViewport && (n = +(window.visualViewport.width / document.body.getBoundingClientRect().width).toFixed(2)), (e ? t.clientY : t.pageX) / n;
}
function g$(e, t) {
  let n = 1;
  return window.visualViewport && (n = +(window.visualViewport.width / document.body.getBoundingClientRect().width).toFixed(2)), (e ? t.touches[0].clientY : t.touches[0].pageX) / n;
}
function v$(e, t) {
  const n = t.getBoundingClientRect();
  return e ? n.top + n.height * 0.5 : window.scrollX + n.left + n.width * 0.5;
}
function Ex(e, t) {
  let {
    max: n,
    min: o
  } = t;
  return e <= o ? o : e >= n ? n : e;
}
function $2(e, t) {
  const {
    step: n
  } = t, o = isFinite(p$(e, t)) ? p$(e, t) : 0;
  return n === null ? o : parseFloat(o.toFixed(C2(n)));
}
function tc(e) {
  e.stopPropagation(), e.preventDefault();
}
function CQ(e, t, n) {
  const o = {
    increase: (a, l) => a + l,
    decrease: (a, l) => a - l
  }, r = o[e](Object.keys(n.marks).indexOf(JSON.stringify(t)), 1), i = Object.keys(n.marks)[r];
  return n.step ? o[e](t, n.step) : Object.keys(n.marks).length && n.marks[i] ? n.marks[i] : t;
}
function P2(e, t, n) {
  const o = "increase", r = "decrease";
  let i = o;
  switch (e.keyCode) {
    case it.UP:
      i = t && n ? r : o;
      break;
    case it.RIGHT:
      i = !t && n ? r : o;
      break;
    case it.DOWN:
      i = t && n ? o : r;
      break;
    case it.LEFT:
      i = !t && n ? o : r;
      break;
    case it.END:
      return (a, l) => l.max;
    case it.HOME:
      return (a, l) => l.min;
    case it.PAGE_UP:
      return (a, l) => a + l.step * 2;
    case it.PAGE_DOWN:
      return (a, l) => a - l.step * 2;
    default:
      return;
  }
  return (a, l) => CQ(i, a, l);
}
var $Q = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function ns() {
}
function O2(e) {
  const t = {
    id: String,
    min: Number,
    max: Number,
    step: Number,
    marks: fe.object,
    included: {
      type: Boolean,
      default: void 0
    },
    prefixCls: String,
    disabled: {
      type: Boolean,
      default: void 0
    },
    handle: Function,
    dots: {
      type: Boolean,
      default: void 0
    },
    vertical: {
      type: Boolean,
      default: void 0
    },
    reverse: {
      type: Boolean,
      default: void 0
    },
    minimumTrackStyle: fe.object,
    maximumTrackStyle: fe.object,
    handleStyle: fe.oneOfType([fe.object, fe.arrayOf(fe.object)]),
    trackStyle: fe.oneOfType([fe.object, fe.arrayOf(fe.object)]),
    railStyle: fe.object,
    dotStyle: fe.object,
    activeDotStyle: fe.object,
    autofocus: {
      type: Boolean,
      default: void 0
    },
    draggableTrack: {
      type: Boolean,
      default: void 0
    }
  };
  return be({
    compatConfig: {
      MODE: 3
    },
    name: "CreateSlider",
    mixins: [Ed, e],
    inheritAttrs: !1,
    props: kn(t, {
      prefixCls: "rc-slider",
      min: 0,
      max: 100,
      step: 1,
      marks: {},
      included: !0,
      disabled: !1,
      dots: !1,
      vertical: !1,
      reverse: !1,
      trackStyle: [{}],
      handleStyle: [{}],
      railStyle: {},
      dotStyle: {},
      activeDotStyle: {}
    }),
    emits: ["change", "blur", "focus"],
    data() {
      const {
        step: n,
        max: o,
        min: r
      } = this, i = isFinite(o - r) ? (o - r) % n === 0 : !0;
      return wo(n && Math.floor(n) === n ? i : !0, `Slider[max] - Slider[min] (${o - r}) should be a multiple of Slider[step] (${n})`), this.handlesRefs = {}, {};
    },
    mounted() {
      this.$nextTick(() => {
        this.document = this.sliderRef && this.sliderRef.ownerDocument;
        const {
          autofocus: n,
          disabled: o
        } = this;
        n && !o && this.focus();
      });
    },
    beforeUnmount() {
      this.$nextTick(() => {
        this.removeDocumentEvents();
      });
    },
    methods: {
      defaultHandle(n) {
        var {
          index: o,
          directives: r,
          className: i,
          style: a
        } = n, l = $Q(n, ["index", "directives", "className", "style"]);
        if (delete l.dragging, l.value === null)
          return null;
        const s = O(O({}, l), {
          class: i,
          style: a,
          key: o
        });
        return h(w2, s, null);
      },
      onDown(n, o) {
        let r = o;
        const {
          draggableTrack: i,
          vertical: a
        } = this.$props, {
          bounds: l
        } = this.$data, s = i && this.positionGetValue ? this.positionGetValue(r) || [] : [], u = Bv(n, this.handlesRefs);
        if (this.dragTrack = i && l.length >= 2 && !u && !s.map((c, d) => {
          const f = d ? !0 : c >= l[d];
          return d === s.length - 1 ? c <= l[d] : f;
        }).some((c) => !c), this.dragTrack)
          this.dragOffset = r, this.startBounds = [...l];
        else {
          if (!u)
            this.dragOffset = 0;
          else {
            const c = v$(a, n.target);
            this.dragOffset = r - c, r = c;
          }
          this.onStart(r);
        }
      },
      onMouseDown(n) {
        if (n.button !== 0)
          return;
        this.removeDocumentEvents();
        const o = this.$props.vertical, r = h$(o, n);
        this.onDown(n, r), this.addDocumentMouseEvents();
      },
      onTouchStart(n) {
        if (f$(n)) return;
        const o = this.vertical, r = g$(o, n);
        this.onDown(n, r), this.addDocumentTouchEvents(), tc(n);
      },
      onFocus(n) {
        const {
          vertical: o
        } = this;
        if (Bv(n, this.handlesRefs) && !this.dragTrack) {
          const r = v$(o, n.target);
          this.dragOffset = 0, this.onStart(r), tc(n), this.$emit("focus", n);
        }
      },
      onBlur(n) {
        this.dragTrack || this.onEnd(), this.$emit("blur", n);
      },
      onMouseUp() {
        this.handlesRefs[this.prevMovedHandleIndex] && this.handlesRefs[this.prevMovedHandleIndex].clickFocus();
      },
      onMouseMove(n) {
        if (!this.sliderRef) {
          this.onEnd();
          return;
        }
        const o = h$(this.vertical, n);
        this.onMove(n, o - this.dragOffset, this.dragTrack, this.startBounds);
      },
      onTouchMove(n) {
        if (f$(n) || !this.sliderRef) {
          this.onEnd();
          return;
        }
        const o = g$(this.vertical, n);
        this.onMove(n, o - this.dragOffset, this.dragTrack, this.startBounds);
      },
      onKeyDown(n) {
        this.sliderRef && Bv(n, this.handlesRefs) && this.onKeyboard(n);
      },
      onClickMarkLabel(n, o) {
        n.stopPropagation(), this.onChange({
          sValue: o
        }), this.setState({
          sValue: o
        }, () => this.onEnd(!0));
      },
      getSliderStart() {
        const n = this.sliderRef, {
          vertical: o,
          reverse: r
        } = this, i = n.getBoundingClientRect();
        return o ? r ? i.bottom : i.top : window.scrollX + (r ? i.right : i.left);
      },
      getSliderLength() {
        const n = this.sliderRef;
        if (!n)
          return 0;
        const o = n.getBoundingClientRect();
        return this.vertical ? o.height : o.width;
      },
      addDocumentTouchEvents() {
        this.onTouchMoveListener = Ho(this.document, "touchmove", this.onTouchMove), this.onTouchUpListener = Ho(this.document, "touchend", this.onEnd);
      },
      addDocumentMouseEvents() {
        this.onMouseMoveListener = Ho(this.document, "mousemove", this.onMouseMove), this.onMouseUpListener = Ho(this.document, "mouseup", this.onEnd);
      },
      removeDocumentEvents() {
        this.onTouchMoveListener && this.onTouchMoveListener.remove(), this.onTouchUpListener && this.onTouchUpListener.remove(), this.onMouseMoveListener && this.onMouseMoveListener.remove(), this.onMouseUpListener && this.onMouseUpListener.remove();
      },
      focus() {
        var n;
        this.$props.disabled || (n = this.handlesRefs[0]) === null || n === void 0 || n.focus();
      },
      blur() {
        this.$props.disabled || Object.keys(this.handlesRefs).forEach((n) => {
          var o, r;
          (r = (o = this.handlesRefs[n]) === null || o === void 0 ? void 0 : o.blur) === null || r === void 0 || r.call(o);
        });
      },
      calcValue(n) {
        const {
          vertical: o,
          min: r,
          max: i
        } = this, a = Math.abs(Math.max(n, 0) / this.getSliderLength());
        return o ? (1 - a) * (i - r) + r : a * (i - r) + r;
      },
      calcValueByPos(n) {
        const r = (this.reverse ? -1 : 1) * (n - this.getSliderStart());
        return this.trimAlignValue(this.calcValue(r));
      },
      calcOffset(n) {
        const {
          min: o,
          max: r
        } = this, i = (n - o) / (r - o);
        return Math.max(0, i * 100);
      },
      saveSlider(n) {
        this.sliderRef = n;
      },
      saveHandle(n, o) {
        this.handlesRefs[n] = o;
      }
    },
    render() {
      const {
        prefixCls: n,
        marks: o,
        dots: r,
        step: i,
        included: a,
        disabled: l,
        vertical: s,
        reverse: u,
        min: c,
        max: d,
        maximumTrackStyle: f,
        railStyle: p,
        dotStyle: v,
        activeDotStyle: g,
        id: m
      } = this, {
        class: x,
        style: S
      } = this.$attrs, {
        tracks: C,
        handles: P
      } = this.renderSlider(), $ = Me(n, x, {
        [`${n}-with-marks`]: Object.keys(o).length,
        [`${n}-disabled`]: l,
        [`${n}-vertical`]: s,
        [`${n}-horizontal`]: !s
      }), I = {
        vertical: s,
        marks: o,
        included: a,
        lowerBound: this.getLowerBound(),
        upperBound: this.getUpperBound(),
        max: d,
        min: c,
        reverse: u,
        class: `${n}-mark`,
        onClickLabel: l ? ns : this.onClickMarkLabel
      }, w = {
        [Bo ? "onTouchstartPassive" : "onTouchstart"]: l ? ns : this.onTouchStart
      };
      return h("div", Q(Q({
        id: m,
        ref: this.saveSlider,
        tabindex: "-1",
        class: $
      }, w), {}, {
        onMousedown: l ? ns : this.onMouseDown,
        onMouseup: l ? ns : this.onMouseUp,
        onKeydown: l ? ns : this.onKeyDown,
        onFocus: l ? ns : this.onFocus,
        onBlur: l ? ns : this.onBlur,
        style: S
      }), [h("div", {
        class: `${n}-rail`,
        style: O(O({}, f), p)
      }, null), C, h(y2, {
        prefixCls: n,
        vertical: s,
        reverse: u,
        marks: o,
        dots: r,
        step: i,
        included: a,
        lowerBound: this.getLowerBound(),
        upperBound: this.getUpperBound(),
        max: d,
        min: c,
        dotStyle: v,
        activeDotStyle: g
      }, null), P, h(x2, I, {
        mark: this.$slots.mark
      }), Xk(this)]);
    }
  });
}
const PQ = be({
  compatConfig: {
    MODE: 3
  },
  name: "Slider",
  mixins: [Ed],
  inheritAttrs: !1,
  props: {
    defaultValue: Number,
    value: Number,
    disabled: {
      type: Boolean,
      default: void 0
    },
    autofocus: {
      type: Boolean,
      default: void 0
    },
    tabindex: fe.oneOfType([fe.number, fe.string]),
    reverse: {
      type: Boolean,
      default: void 0
    },
    min: Number,
    max: Number,
    ariaLabelForHandle: String,
    ariaLabelledByForHandle: String,
    ariaValueTextFormatterForHandle: String,
    startPoint: Number
  },
  emits: ["beforeChange", "afterChange", "change"],
  data() {
    const e = this.defaultValue !== void 0 ? this.defaultValue : this.min, t = this.value !== void 0 ? this.value : e;
    return {
      sValue: this.trimAlignValue(t),
      dragging: !1
    };
  },
  watch: {
    value: {
      handler(e) {
        this.setChangeValue(e);
      },
      deep: !0
    },
    min() {
      const {
        sValue: e
      } = this;
      this.setChangeValue(e);
    },
    max() {
      const {
        sValue: e
      } = this;
      this.setChangeValue(e);
    }
  },
  methods: {
    setChangeValue(e) {
      const t = e !== void 0 ? e : this.sValue, n = this.trimAlignValue(t, this.$props);
      n !== this.sValue && (this.setState({
        sValue: n
      }), S2(t, this.$props) && this.$emit("change", n));
    },
    onChange(e) {
      const t = !Oa(this, "value"), n = e.sValue > this.max ? O(O({}, e), {
        sValue: this.max
      }) : e;
      t && this.setState(n);
      const o = n.sValue;
      this.$emit("change", o);
    },
    onStart(e) {
      this.setState({
        dragging: !0
      });
      const {
        sValue: t
      } = this;
      this.$emit("beforeChange", t);
      const n = this.calcValueByPos(e);
      this.startValue = n, this.startPosition = e, n !== t && (this.prevMovedHandleIndex = 0, this.onChange({
        sValue: n
      }));
    },
    onEnd(e) {
      const {
        dragging: t
      } = this;
      this.removeDocumentEvents(), (t || e) && this.$emit("afterChange", this.sValue), this.setState({
        dragging: !1
      });
    },
    onMove(e, t) {
      tc(e);
      const {
        sValue: n
      } = this, o = this.calcValueByPos(t);
      o !== n && this.onChange({
        sValue: o
      });
    },
    onKeyboard(e) {
      const {
        reverse: t,
        vertical: n
      } = this.$props, o = P2(e, n, t);
      if (o) {
        tc(e);
        const {
          sValue: r
        } = this, i = o(r, this.$props), a = this.trimAlignValue(i);
        if (a === r) return;
        this.onChange({
          sValue: a
        }), this.$emit("afterChange", a), this.onEnd();
      }
    },
    getLowerBound() {
      const e = this.$props.startPoint || this.$props.min;
      return this.$data.sValue > e ? e : this.$data.sValue;
    },
    getUpperBound() {
      return this.$data.sValue < this.$props.startPoint ? this.$props.startPoint : this.$data.sValue;
    },
    trimAlignValue(e) {
      let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      if (e === null)
        return null;
      const n = O(O({}, this.$props), t), o = Ex(e, n);
      return $2(o, n);
    },
    getTrack(e) {
      let {
        prefixCls: t,
        reverse: n,
        vertical: o,
        included: r,
        minimumTrackStyle: i,
        mergedTrackStyle: a,
        length: l,
        offset: s
      } = e;
      return h(Mx, {
        class: `${t}-track`,
        vertical: o,
        included: r,
        offset: s,
        reverse: n,
        length: l,
        style: O(O({}, i), a)
      }, null);
    },
    renderSlider() {
      const {
        prefixCls: e,
        vertical: t,
        included: n,
        disabled: o,
        minimumTrackStyle: r,
        trackStyle: i,
        handleStyle: a,
        tabindex: l,
        ariaLabelForHandle: s,
        ariaLabelledByForHandle: u,
        ariaValueTextFormatterForHandle: c,
        min: d,
        max: f,
        startPoint: p,
        reverse: v,
        handle: g,
        defaultHandle: m
      } = this, x = g || m, {
        sValue: S,
        dragging: C
      } = this, P = this.calcOffset(S), $ = x({
        class: `${e}-handle`,
        prefixCls: e,
        vertical: t,
        offset: P,
        value: S,
        dragging: C,
        disabled: o,
        min: d,
        max: f,
        reverse: v,
        index: 0,
        tabindex: l,
        ariaLabel: s,
        ariaLabelledBy: u,
        ariaValueTextFormatter: c,
        style: a[0] || a,
        ref: (_) => this.saveHandle(0, _),
        onFocus: this.onFocus,
        onBlur: this.onBlur
      }), I = p !== void 0 ? this.calcOffset(p) : 0, w = i[0] || i;
      return {
        tracks: this.getTrack({
          prefixCls: e,
          reverse: v,
          vertical: t,
          included: n,
          offset: I,
          minimumTrackStyle: r,
          mergedTrackStyle: w,
          length: P - I
        }),
        handles: $
      };
    }
  }
}), OQ = O2(PQ), Ac = (e) => {
  let {
    value: t,
    handle: n,
    bounds: o,
    props: r
  } = e;
  const {
    allowCross: i,
    pushable: a
  } = r, l = Number(a), s = Ex(t, r);
  let u = s;
  return !i && n != null && o !== void 0 && (n > 0 && s <= o[n - 1] + l && (u = o[n - 1] + l), n < o.length - 1 && s >= o[n + 1] - l && (u = o[n + 1] - l)), $2(u, r);
}, kQ = {
  defaultValue: fe.arrayOf(fe.number),
  value: fe.arrayOf(fe.number),
  count: Number,
  pushable: N6(fe.oneOfType([fe.looseBool, fe.number])),
  allowCross: {
    type: Boolean,
    default: void 0
  },
  disabled: {
    type: Boolean,
    default: void 0
  },
  reverse: {
    type: Boolean,
    default: void 0
  },
  tabindex: fe.arrayOf(fe.number),
  prefixCls: String,
  min: Number,
  max: Number,
  autofocus: {
    type: Boolean,
    default: void 0
  },
  ariaLabelGroupForHandles: Array,
  ariaLabelledByGroupForHandles: Array,
  ariaValueTextFormatterGroupForHandles: Array,
  draggableTrack: {
    type: Boolean,
    default: void 0
  }
}, IQ = be({
  compatConfig: {
    MODE: 3
  },
  name: "Range",
  mixins: [Ed],
  inheritAttrs: !1,
  props: kn(kQ, {
    count: 1,
    allowCross: !0,
    pushable: !1,
    tabindex: [],
    draggableTrack: !1,
    ariaLabelGroupForHandles: [],
    ariaLabelledByGroupForHandles: [],
    ariaValueTextFormatterGroupForHandles: []
  }),
  emits: ["beforeChange", "afterChange", "change"],
  displayName: "Range",
  data() {
    const {
      count: e,
      min: t,
      max: n
    } = this, o = Array(...Array(e + 1)).map(() => t), r = Oa(this, "defaultValue") ? this.defaultValue : o;
    let {
      value: i
    } = this;
    i === void 0 && (i = r);
    const a = i.map((s, u) => Ac({
      value: s,
      handle: u,
      props: this.$props
    }));
    return {
      sHandle: null,
      recent: a[0] === n ? 0 : a.length - 1,
      bounds: a
    };
  },
  watch: {
    value: {
      handler(e) {
        const {
          bounds: t
        } = this;
        this.setChangeValue(e || t);
      },
      deep: !0
    },
    min() {
      const {
        value: e
      } = this;
      this.setChangeValue(e || this.bounds);
    },
    max() {
      const {
        value: e
      } = this;
      this.setChangeValue(e || this.bounds);
    }
  },
  methods: {
    setChangeValue(e) {
      const {
        bounds: t
      } = this;
      let n = e.map((o, r) => Ac({
        value: o,
        handle: r,
        bounds: t,
        props: this.$props
      }));
      if (t.length === n.length) {
        if (n.every((o, r) => o === t[r]))
          return null;
      } else
        n = e.map((o, r) => Ac({
          value: o,
          handle: r,
          props: this.$props
        }));
      if (this.setState({
        bounds: n
      }), e.some((o) => S2(o, this.$props))) {
        const o = e.map((r) => Ex(r, this.$props));
        this.$emit("change", o);
      }
    },
    onChange(e) {
      if (!Oa(this, "value"))
        this.setState(e);
      else {
        const r = {};
        ["sHandle", "recent"].forEach((i) => {
          e[i] !== void 0 && (r[i] = e[i]);
        }), Object.keys(r).length && this.setState(r);
      }
      const o = O(O({}, this.$data), e).bounds;
      this.$emit("change", o);
    },
    positionGetValue(e) {
      const t = this.getValue(), n = this.calcValueByPos(e), o = this.getClosestBound(n), r = this.getBoundNeedMoving(n, o), i = t[r];
      if (n === i) return null;
      const a = [...t];
      return a[r] = n, a;
    },
    onStart(e) {
      const {
        bounds: t
      } = this;
      this.$emit("beforeChange", t);
      const n = this.calcValueByPos(e);
      this.startValue = n, this.startPosition = e;
      const o = this.getClosestBound(n);
      this.prevMovedHandleIndex = this.getBoundNeedMoving(n, o), this.setState({
        sHandle: this.prevMovedHandleIndex,
        recent: this.prevMovedHandleIndex
      });
      const r = t[this.prevMovedHandleIndex];
      if (n === r) return;
      const i = [...t];
      i[this.prevMovedHandleIndex] = n, this.onChange({
        bounds: i
      });
    },
    onEnd(e) {
      const {
        sHandle: t
      } = this;
      this.removeDocumentEvents(), t || (this.dragTrack = !1), (t !== null || e) && this.$emit("afterChange", this.bounds), this.setState({
        sHandle: null
      });
    },
    onMove(e, t, n, o) {
      tc(e);
      const {
        $data: r,
        $props: i
      } = this, a = i.max || 100, l = i.min || 0;
      if (n) {
        let f = i.vertical ? -t : t;
        f = i.reverse ? -f : f;
        const p = a - Math.max(...o), v = l - Math.min(...o), g = Math.min(Math.max(f / (this.getSliderLength() / 100), v), p), m = o.map((x) => Math.floor(Math.max(Math.min(x + g, a), l)));
        r.bounds.map((x, S) => x === m[S]).some((x) => !x) && this.onChange({
          bounds: m
        });
        return;
      }
      const {
        bounds: s,
        sHandle: u
      } = this, c = this.calcValueByPos(t), d = s[u];
      c !== d && this.moveTo(c);
    },
    onKeyboard(e) {
      const {
        reverse: t,
        vertical: n
      } = this.$props, o = P2(e, n, t);
      if (o) {
        tc(e);
        const {
          bounds: r,
          sHandle: i
        } = this, a = r[i === null ? this.recent : i], l = o(a, this.$props), s = Ac({
          value: l,
          handle: i,
          bounds: r,
          props: this.$props
        });
        if (s === a) return;
        this.moveTo(s, !0);
      }
    },
    getClosestBound(e) {
      const {
        bounds: t
      } = this;
      let n = 0;
      for (let o = 1; o < t.length - 1; o += 1)
        e >= t[o] && (n = o);
      return Math.abs(t[n + 1] - e) < Math.abs(t[n] - e) && (n += 1), n;
    },
    getBoundNeedMoving(e, t) {
      const {
        bounds: n,
        recent: o
      } = this;
      let r = t;
      const i = n[t + 1] === n[t];
      return i && n[o] === n[t] && (r = o), i && e !== n[t + 1] && (r = e < n[t + 1] ? t : t + 1), r;
    },
    getLowerBound() {
      return this.bounds[0];
    },
    getUpperBound() {
      const {
        bounds: e
      } = this;
      return e[e.length - 1];
    },
    /**
     * Returns an array of possible slider points, taking into account both
     * `marks` and `step`. The result is cached.
     */
    getPoints() {
      const {
        marks: e,
        step: t,
        min: n,
        max: o
      } = this, r = this.internalPointsCache;
      if (!r || r.marks !== e || r.step !== t) {
        const i = O({}, e);
        if (t !== null)
          for (let l = n; l <= o; l += t)
            i[l] = l;
        const a = Object.keys(i).map(parseFloat);
        a.sort((l, s) => l - s), this.internalPointsCache = {
          marks: e,
          step: t,
          points: a
        };
      }
      return this.internalPointsCache.points;
    },
    moveTo(e, t) {
      const n = [...this.bounds], {
        sHandle: o,
        recent: r
      } = this, i = o === null ? r : o;
      n[i] = e;
      let a = i;
      this.$props.pushable !== !1 ? this.pushSurroundingHandles(n, a) : this.$props.allowCross && (n.sort((l, s) => l - s), a = n.indexOf(e)), this.onChange({
        recent: a,
        sHandle: a,
        bounds: n
      }), t && (this.$emit("afterChange", n), this.setState({}, () => {
        this.handlesRefs[a].focus();
      }), this.onEnd());
    },
    pushSurroundingHandles(e, t) {
      const n = e[t], {
        pushable: o
      } = this, r = Number(o);
      let i = 0;
      if (e[t + 1] - n < r && (i = 1), n - e[t - 1] < r && (i = -1), i === 0)
        return;
      const a = t + i, l = i * (e[a] - n);
      this.pushHandle(e, a, i, r - l) || (e[t] = e[a] - i * r);
    },
    pushHandle(e, t, n, o) {
      const r = e[t];
      let i = e[t];
      for (; n * (i - r) < o; ) {
        if (!this.pushHandleOnePoint(e, t, n))
          return e[t] = r, !1;
        i = e[t];
      }
      return !0;
    },
    pushHandleOnePoint(e, t, n) {
      const o = this.getPoints(), i = o.indexOf(e[t]) + n;
      if (i >= o.length || i < 0)
        return !1;
      const a = t + n, l = o[i], {
        pushable: s
      } = this, u = Number(s), c = n * (e[a] - l);
      return this.pushHandle(e, a, n, u - c) ? (e[t] = l, !0) : !1;
    },
    trimAlignValue(e) {
      const {
        sHandle: t,
        bounds: n
      } = this;
      return Ac({
        value: e,
        handle: t,
        bounds: n,
        props: this.$props
      });
    },
    ensureValueNotConflict(e, t, n) {
      let {
        allowCross: o,
        pushable: r
      } = n;
      const i = this.$data || {}, {
        bounds: a
      } = i;
      if (e = e === void 0 ? i.sHandle : e, r = Number(r), !o && e != null && a !== void 0) {
        if (e > 0 && t <= a[e - 1] + r)
          return a[e - 1] + r;
        if (e < a.length - 1 && t >= a[e + 1] - r)
          return a[e + 1] - r;
      }
      return t;
    },
    getTrack(e) {
      let {
        bounds: t,
        prefixCls: n,
        reverse: o,
        vertical: r,
        included: i,
        offsets: a,
        trackStyle: l
      } = e;
      return t.slice(0, -1).map((s, u) => {
        const c = u + 1, d = Me({
          [`${n}-track`]: !0,
          [`${n}-track-${c}`]: !0
        });
        return h(Mx, {
          class: d,
          vertical: r,
          reverse: o,
          included: i,
          offset: a[c - 1],
          length: a[c] - a[c - 1],
          style: l[u],
          key: c
        }, null);
      });
    },
    renderSlider() {
      const {
        sHandle: e,
        bounds: t,
        prefixCls: n,
        vertical: o,
        included: r,
        disabled: i,
        min: a,
        max: l,
        reverse: s,
        handle: u,
        defaultHandle: c,
        trackStyle: d,
        handleStyle: f,
        tabindex: p,
        ariaLabelGroupForHandles: v,
        ariaLabelledByGroupForHandles: g,
        ariaValueTextFormatterGroupForHandles: m
      } = this, x = u || c, S = t.map(($) => this.calcOffset($)), C = `${n}-handle`, P = t.map(($, I) => {
        let w = p[I] || 0;
        (i || p[I] === null) && (w = null);
        const _ = e === I;
        return x({
          class: Me({
            [C]: !0,
            [`${C}-${I + 1}`]: !0,
            [`${C}-dragging`]: _
          }),
          prefixCls: n,
          vertical: o,
          dragging: _,
          offset: S[I],
          value: $,
          index: I,
          tabindex: w,
          min: a,
          max: l,
          reverse: s,
          disabled: i,
          style: f[I],
          ref: (M) => this.saveHandle(I, M),
          onFocus: this.onFocus,
          onBlur: this.onBlur,
          ariaLabel: v[I],
          ariaLabelledBy: g[I],
          ariaValueTextFormatter: m[I]
        });
      });
      return {
        tracks: this.getTrack({
          bounds: t,
          prefixCls: n,
          reverse: s,
          vertical: o,
          included: r,
          offsets: S,
          trackStyle: d
        }),
        handles: P
      };
    }
  }
}), _Q = O2(IQ), TQ = be({
  compatConfig: {
    MODE: 3
  },
  name: "SliderTooltip",
  inheritAttrs: !1,
  props: W_(),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const r = ce(null), i = ce(null);
    function a() {
      Vt.cancel(i.value), i.value = null;
    }
    function l() {
      i.value = Vt(() => {
        var u;
        (u = r.value) === null || u === void 0 || u.forcePopupAlign(), i.value = null;
      });
    }
    const s = () => {
      a(), e.open && l();
    };
    return ke([() => e.open, () => e.title], () => {
      s();
    }, {
      flush: "post",
      immediate: !0
    }), qP(() => {
      s();
    }), qt(() => {
      a();
    }), () => h(Lo, Q(Q({
      ref: r
    }, e), n), o);
  }
}), MQ = (e) => {
  const {
    componentCls: t,
    controlSize: n,
    dotSize: o,
    marginFull: r,
    marginPart: i,
    colorFillContentHover: a
  } = e;
  return {
    [t]: O(O({}, fn(e)), {
      position: "relative",
      height: n,
      margin: `${i}px ${r}px`,
      padding: 0,
      cursor: "pointer",
      touchAction: "none",
      "&-vertical": {
        margin: `${r}px ${i}px`
      },
      [`${t}-rail`]: {
        position: "absolute",
        backgroundColor: e.colorFillTertiary,
        borderRadius: e.borderRadiusXS,
        transition: `background-color ${e.motionDurationMid}`
      },
      [`${t}-track`]: {
        position: "absolute",
        backgroundColor: e.colorPrimaryBorder,
        borderRadius: e.borderRadiusXS,
        transition: `background-color ${e.motionDurationMid}`
      },
      "&:hover": {
        [`${t}-rail`]: {
          backgroundColor: e.colorFillSecondary
        },
        [`${t}-track`]: {
          backgroundColor: e.colorPrimaryBorderHover
        },
        [`${t}-dot`]: {
          borderColor: a
        },
        [`${t}-handle::after`]: {
          boxShadow: `0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorderHover}`
        },
        [`${t}-dot-active`]: {
          borderColor: e.colorPrimary
        }
      },
      [`${t}-handle`]: {
        position: "absolute",
        width: e.handleSize,
        height: e.handleSize,
        outline: "none",
        [`${t}-dragging`]: {
          zIndex: 1
        },
        // 扩大选区
        "&::before": {
          content: '""',
          position: "absolute",
          insetInlineStart: -e.handleLineWidth,
          insetBlockStart: -e.handleLineWidth,
          width: e.handleSize + e.handleLineWidth * 2,
          height: e.handleSize + e.handleLineWidth * 2,
          backgroundColor: "transparent"
        },
        "&::after": {
          content: '""',
          position: "absolute",
          insetBlockStart: 0,
          insetInlineStart: 0,
          width: e.handleSize,
          height: e.handleSize,
          backgroundColor: e.colorBgElevated,
          boxShadow: `0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorder}`,
          borderRadius: "50%",
          cursor: "pointer",
          transition: `
            inset-inline-start ${e.motionDurationMid},
            inset-block-start ${e.motionDurationMid},
            width ${e.motionDurationMid},
            height ${e.motionDurationMid},
            box-shadow ${e.motionDurationMid}
          `
        },
        "&:hover, &:active, &:focus": {
          "&::before": {
            insetInlineStart: -((e.handleSizeHover - e.handleSize) / 2 + e.handleLineWidthHover),
            insetBlockStart: -((e.handleSizeHover - e.handleSize) / 2 + e.handleLineWidthHover),
            width: e.handleSizeHover + e.handleLineWidthHover * 2,
            height: e.handleSizeHover + e.handleLineWidthHover * 2
          },
          "&::after": {
            boxShadow: `0 0 0 ${e.handleLineWidthHover}px ${e.colorPrimary}`,
            width: e.handleSizeHover,
            height: e.handleSizeHover,
            insetInlineStart: (e.handleSize - e.handleSizeHover) / 2,
            insetBlockStart: (e.handleSize - e.handleSizeHover) / 2
          }
        }
      },
      [`${t}-mark`]: {
        position: "absolute",
        fontSize: e.fontSize
      },
      [`${t}-mark-text`]: {
        position: "absolute",
        display: "inline-block",
        color: e.colorTextDescription,
        textAlign: "center",
        wordBreak: "keep-all",
        cursor: "pointer",
        userSelect: "none",
        "&-active": {
          color: e.colorText
        }
      },
      [`${t}-step`]: {
        position: "absolute",
        background: "transparent",
        pointerEvents: "none"
      },
      [`${t}-dot`]: {
        position: "absolute",
        width: o,
        height: o,
        backgroundColor: e.colorBgElevated,
        border: `${e.handleLineWidth}px solid ${e.colorBorderSecondary}`,
        borderRadius: "50%",
        cursor: "pointer",
        transition: `border-color ${e.motionDurationSlow}`,
        "&-active": {
          borderColor: e.colorPrimaryBorder
        }
      },
      [`&${t}-disabled`]: {
        cursor: "not-allowed",
        [`${t}-rail`]: {
          backgroundColor: `${e.colorFillSecondary} !important`
        },
        [`${t}-track`]: {
          backgroundColor: `${e.colorTextDisabled} !important`
        },
        [`
          ${t}-dot
        `]: {
          backgroundColor: e.colorBgElevated,
          borderColor: e.colorTextDisabled,
          boxShadow: "none",
          cursor: "not-allowed"
        },
        [`${t}-handle::after`]: {
          backgroundColor: e.colorBgElevated,
          cursor: "not-allowed",
          width: e.handleSize,
          height: e.handleSize,
          boxShadow: `0 0 0 ${e.handleLineWidth}px ${new _n(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString()}`,
          insetInlineStart: 0,
          insetBlockStart: 0
        },
        [`
          ${t}-mark-text,
          ${t}-dot
        `]: {
          cursor: "not-allowed !important"
        }
      }
    })
  };
}, k2 = (e, t) => {
  const {
    componentCls: n,
    railSize: o,
    handleSize: r,
    dotSize: i
  } = e, a = t ? "paddingBlock" : "paddingInline", l = t ? "width" : "height", s = t ? "height" : "width", u = t ? "insetBlockStart" : "insetInlineStart", c = t ? "top" : "insetInlineStart";
  return {
    [a]: o,
    [s]: o * 3,
    [`${n}-rail`]: {
      [l]: "100%",
      [s]: o
    },
    [`${n}-track`]: {
      [s]: o
    },
    [`${n}-handle`]: {
      [u]: (o * 3 - r) / 2
    },
    [`${n}-mark`]: {
      // Reset all
      insetInlineStart: 0,
      top: 0,
      [c]: r,
      [l]: "100%"
    },
    [`${n}-step`]: {
      // Reset all
      insetInlineStart: 0,
      top: 0,
      [c]: o,
      [l]: "100%",
      [s]: o
    },
    [`${n}-dot`]: {
      position: "absolute",
      [u]: (o - i) / 2
    }
  };
}, EQ = (e) => {
  const {
    componentCls: t,
    marginPartWithMark: n
  } = e;
  return {
    [`${t}-horizontal`]: O(O({}, k2(e, !0)), {
      [`&${t}-with-marks`]: {
        marginBottom: n
      }
    })
  };
}, DQ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-vertical`]: O(O({}, k2(e, !1)), {
      height: "100%"
    })
  };
}, AQ = Sn("Slider", (e) => {
  const t = Qt(e, {
    marginPart: (e.controlHeight - e.controlSize) / 2,
    marginFull: e.controlSize / 2,
    marginPartWithMark: e.controlHeightLG - e.controlSize
  });
  return [MQ(t), EQ(t), DQ(t)];
}, (e) => {
  const n = e.controlHeightLG / 4, o = e.controlHeightSM / 2, r = e.lineWidth + 1, i = e.lineWidth + 3;
  return {
    controlSize: n,
    railSize: 4,
    handleSize: n,
    handleSizeHover: o,
    dotSize: 8,
    handleLineWidth: r,
    handleLineWidthHover: i
  };
});
var m$ = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const NQ = (e) => typeof e == "number" ? e.toString() : "", RQ = () => ({
  id: String,
  prefixCls: String,
  tooltipPrefixCls: String,
  range: en([Boolean, Object]),
  reverse: ct(),
  min: Number,
  max: Number,
  step: en([Object, Number]),
  marks: Et(),
  dots: ct(),
  value: en([Array, Number]),
  defaultValue: en([Array, Number]),
  included: ct(),
  disabled: ct(),
  vertical: ct(),
  tipFormatter: en([Function, Object], () => NQ),
  tooltipOpen: ct(),
  /** @deprecated `tooltipVisible` is deprecated. Please use `tooltipOpen` instead. */
  tooltipVisible: ct(),
  tooltipPlacement: an(),
  getTooltipPopupContainer: et(),
  autofocus: ct(),
  handleStyle: en([Array, Object]),
  trackStyle: en([Array, Object]),
  onChange: et(),
  onAfterChange: et(),
  onFocus: et(),
  onBlur: et(),
  "onUpdate:value": et()
}), zQ = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASlider",
  inheritAttrs: !1,
  props: RQ(),
  // emits: ['update:value', 'change', 'afterChange', 'blur'],
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: r,
      expose: i
    } = t;
    process.env.NODE_ENV !== "production" && [["tooltipVisible", "tooltipOpen"]].forEach((w) => {
      let [_, M] = w;
      dn(e.tooltipVisible === void 0, "Slider", `\`${_}\` is deprecated, please use \`${M}\` instead.`);
    });
    const {
      prefixCls: a,
      rootPrefixCls: l,
      direction: s,
      getPopupContainer: u,
      configProvider: c
    } = _t("slider", e), [d, f] = AQ(a), p = Br(), v = ce(), g = ce({}), m = (w, _) => {
      g.value[w] = _;
    }, x = E(() => e.tooltipPlacement ? e.tooltipPlacement : e.vertical ? s.value === "rtl" ? "left" : "right" : "top"), S = () => {
      var w;
      (w = v.value) === null || w === void 0 || w.focus();
    }, C = () => {
      var w;
      (w = v.value) === null || w === void 0 || w.blur();
    }, P = (w) => {
      r("update:value", w), r("change", w), p.onFieldChange();
    }, $ = (w) => {
      r("blur", w);
    };
    i({
      focus: S,
      blur: C
    });
    const I = (w) => {
      var {
        tooltipPrefixCls: _
      } = w, M = w.info, {
        value: N,
        dragging: A,
        index: H
      } = M, B = m$(M, ["value", "dragging", "index"]);
      const {
        tipFormatter: F,
        tooltipOpen: R = e.tooltipVisible,
        getTooltipPopupContainer: X
      } = e, j = F ? g.value[H] || A : !1, ee = R || R === void 0 && j;
      return h(TQ, {
        prefixCls: _,
        title: F ? F(N) : "",
        open: ee,
        placement: x.value,
        transitionName: `${l.value}-zoom-down`,
        key: H,
        overlayClassName: `${a.value}-tooltip`,
        getPopupContainer: X || u?.value
      }, {
        default: () => [h(w2, Q(Q({}, B), {}, {
          value: N,
          onMouseenter: () => m(H, !0),
          onMouseleave: () => m(H, !1)
        }), null)]
      });
    };
    return () => {
      const {
        tooltipPrefixCls: w,
        range: _,
        id: M = p.id.value
      } = e, N = m$(e, ["tooltipPrefixCls", "range", "id"]), A = c.getPrefixCls("tooltip", w), H = Me(n.class, {
        [`${a.value}-rtl`]: s.value === "rtl"
      }, f.value);
      s.value === "rtl" && !N.vertical && (N.reverse = !N.reverse);
      let B;
      return typeof _ == "object" && (B = _.draggableTrack), d(_ ? h(_Q, Q(Q(Q({}, n), N), {}, {
        step: N.step,
        draggableTrack: B,
        class: H,
        ref: v,
        handle: (F) => I({
          tooltipPrefixCls: A,
          prefixCls: a.value,
          info: F
        }),
        prefixCls: a.value,
        onChange: P,
        onBlur: $
      }), {
        mark: o.mark
      }) : h(OQ, Q(Q(Q({}, n), N), {}, {
        id: M,
        step: N.step,
        class: H,
        ref: v,
        handle: (F) => I({
          tooltipPrefixCls: A,
          prefixCls: a.value,
          info: F
        }),
        prefixCls: a.value,
        onChange: P,
        onBlur: $
      }), {
        mark: o.mark
      }));
    };
  }
}), br = ii(zQ), FQ = (e) => {
  const {
    componentCls: t
  } = e, n = `${t}-inner`;
  return {
    [t]: {
      [`&${t}-small`]: {
        minWidth: e.switchMinWidthSM,
        height: e.switchHeightSM,
        lineHeight: `${e.switchHeightSM}px`,
        [`${t}-inner`]: {
          paddingInlineStart: e.switchInnerMarginMaxSM,
          paddingInlineEnd: e.switchInnerMarginMinSM,
          [`${n}-checked`]: {
            marginInlineStart: `calc(-100% + ${e.switchPinSizeSM + e.switchPadding * 2}px - ${e.switchInnerMarginMaxSM * 2}px)`,
            marginInlineEnd: `calc(100% - ${e.switchPinSizeSM + e.switchPadding * 2}px + ${e.switchInnerMarginMaxSM * 2}px)`
          },
          [`${n}-unchecked`]: {
            marginTop: -e.switchHeightSM,
            marginInlineStart: 0,
            marginInlineEnd: 0
          }
        },
        [`${t}-handle`]: {
          width: e.switchPinSizeSM,
          height: e.switchPinSizeSM
        },
        [`${t}-loading-icon`]: {
          top: (e.switchPinSizeSM - e.switchLoadingIconSize) / 2,
          fontSize: e.switchLoadingIconSize
        },
        [`&${t}-checked`]: {
          [`${t}-inner`]: {
            paddingInlineStart: e.switchInnerMarginMinSM,
            paddingInlineEnd: e.switchInnerMarginMaxSM,
            [`${n}-checked`]: {
              marginInlineStart: 0,
              marginInlineEnd: 0
            },
            [`${n}-unchecked`]: {
              marginInlineStart: `calc(100% - ${e.switchPinSizeSM + e.switchPadding * 2}px + ${e.switchInnerMarginMaxSM * 2}px)`,
              marginInlineEnd: `calc(-100% + ${e.switchPinSizeSM + e.switchPadding * 2}px - ${e.switchInnerMarginMaxSM * 2}px)`
            }
          },
          [`${t}-handle`]: {
            insetInlineStart: `calc(100% - ${e.switchPinSizeSM + e.switchPadding}px)`
          }
        },
        [`&:not(${t}-disabled):active`]: {
          [`&:not(${t}-checked) ${n}`]: {
            [`${n}-unchecked`]: {
              marginInlineStart: e.marginXXS / 2,
              marginInlineEnd: -e.marginXXS / 2
            }
          },
          [`&${t}-checked ${n}`]: {
            [`${n}-checked`]: {
              marginInlineStart: -e.marginXXS / 2,
              marginInlineEnd: e.marginXXS / 2
            }
          }
        }
      }
    }
  };
}, BQ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: {
      [`${t}-loading-icon${e.iconCls}`]: {
        position: "relative",
        top: (e.switchPinSize - e.fontSize) / 2,
        color: e.switchLoadingIconColor,
        verticalAlign: "top"
      },
      [`&${t}-checked ${t}-loading-icon`]: {
        color: e.switchColor
      }
    }
  };
}, LQ = (e) => {
  const {
    componentCls: t
  } = e, n = `${t}-handle`;
  return {
    [t]: {
      [n]: {
        position: "absolute",
        top: e.switchPadding,
        insetInlineStart: e.switchPadding,
        width: e.switchPinSize,
        height: e.switchPinSize,
        transition: `all ${e.switchDuration} ease-in-out`,
        "&::before": {
          position: "absolute",
          top: 0,
          insetInlineEnd: 0,
          bottom: 0,
          insetInlineStart: 0,
          backgroundColor: e.colorWhite,
          borderRadius: e.switchPinSize / 2,
          boxShadow: e.switchHandleShadow,
          transition: `all ${e.switchDuration} ease-in-out`,
          content: '""'
        }
      },
      [`&${t}-checked ${n}`]: {
        insetInlineStart: `calc(100% - ${e.switchPinSize + e.switchPadding}px)`
      },
      [`&:not(${t}-disabled):active`]: {
        [`${n}::before`]: {
          insetInlineEnd: e.switchHandleActiveInset,
          insetInlineStart: 0
        },
        [`&${t}-checked ${n}::before`]: {
          insetInlineEnd: 0,
          insetInlineStart: e.switchHandleActiveInset
        }
      }
    }
  };
}, HQ = (e) => {
  const {
    componentCls: t
  } = e, n = `${t}-inner`;
  return {
    [t]: {
      [n]: {
        display: "block",
        overflow: "hidden",
        borderRadius: 100,
        height: "100%",
        paddingInlineStart: e.switchInnerMarginMax,
        paddingInlineEnd: e.switchInnerMarginMin,
        transition: `padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,
        [`${n}-checked, ${n}-unchecked`]: {
          display: "block",
          color: e.colorTextLightSolid,
          fontSize: e.fontSizeSM,
          transition: `margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,
          pointerEvents: "none"
        },
        [`${n}-checked`]: {
          marginInlineStart: `calc(-100% + ${e.switchPinSize + e.switchPadding * 2}px - ${e.switchInnerMarginMax * 2}px)`,
          marginInlineEnd: `calc(100% - ${e.switchPinSize + e.switchPadding * 2}px + ${e.switchInnerMarginMax * 2}px)`
        },
        [`${n}-unchecked`]: {
          marginTop: -e.switchHeight,
          marginInlineStart: 0,
          marginInlineEnd: 0
        }
      },
      [`&${t}-checked ${n}`]: {
        paddingInlineStart: e.switchInnerMarginMin,
        paddingInlineEnd: e.switchInnerMarginMax,
        [`${n}-checked`]: {
          marginInlineStart: 0,
          marginInlineEnd: 0
        },
        [`${n}-unchecked`]: {
          marginInlineStart: `calc(100% - ${e.switchPinSize + e.switchPadding * 2}px + ${e.switchInnerMarginMax * 2}px)`,
          marginInlineEnd: `calc(-100% + ${e.switchPinSize + e.switchPadding * 2}px - ${e.switchInnerMarginMax * 2}px)`
        }
      },
      [`&:not(${t}-disabled):active`]: {
        [`&:not(${t}-checked) ${n}`]: {
          [`${n}-unchecked`]: {
            marginInlineStart: e.switchPadding * 2,
            marginInlineEnd: -e.switchPadding * 2
          }
        },
        [`&${t}-checked ${n}`]: {
          [`${n}-checked`]: {
            marginInlineStart: -e.switchPadding * 2,
            marginInlineEnd: e.switchPadding * 2
          }
        }
      }
    }
  };
}, VQ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [t]: O(O(O(O({}, fn(e)), {
      position: "relative",
      display: "inline-block",
      boxSizing: "border-box",
      minWidth: e.switchMinWidth,
      height: e.switchHeight,
      lineHeight: `${e.switchHeight}px`,
      verticalAlign: "middle",
      background: e.colorTextQuaternary,
      border: "0",
      borderRadius: 100,
      cursor: "pointer",
      transition: `all ${e.motionDurationMid}`,
      userSelect: "none",
      [`&:hover:not(${t}-disabled)`]: {
        background: e.colorTextTertiary
      }
    }), Nl(e)), {
      [`&${t}-checked`]: {
        background: e.switchColor,
        [`&:hover:not(${t}-disabled)`]: {
          background: e.colorPrimaryHover
        }
      },
      [`&${t}-loading, &${t}-disabled`]: {
        cursor: "not-allowed",
        opacity: e.switchDisabledOpacity,
        "*": {
          boxShadow: "none",
          cursor: "not-allowed"
        }
      },
      // rtl style
      [`&${t}-rtl`]: {
        direction: "rtl"
      }
    })
  };
}, jQ = Sn("Switch", (e) => {
  const t = e.fontSize * e.lineHeight, n = e.controlHeight / 2, o = 2, r = t - o * 2, i = n - o * 2, a = Qt(e, {
    switchMinWidth: r * 2 + o * 4,
    switchHeight: t,
    switchDuration: e.motionDurationMid,
    switchColor: e.colorPrimary,
    switchDisabledOpacity: e.opacityLoading,
    switchInnerMarginMin: r / 2,
    switchInnerMarginMax: r + o + o * 2,
    switchPadding: o,
    switchPinSize: r,
    switchBg: e.colorBgContainer,
    switchMinWidthSM: i * 2 + o * 2,
    switchHeightSM: n,
    switchInnerMarginMinSM: i / 2,
    switchInnerMarginMaxSM: i + o + o * 2,
    switchPinSizeSM: i,
    switchHandleShadow: `0 2px 4px 0 ${new _n("#00230b").setAlpha(0.2).toRgbString()}`,
    switchLoadingIconSize: e.fontSizeIcon * 0.75,
    switchLoadingIconColor: `rgba(0, 0, 0, ${e.opacityLoading})`,
    switchHandleActiveInset: "-30%"
  });
  return [
    VQ(a),
    // inner style
    HQ(a),
    // handle style
    LQ(a),
    // loading style
    BQ(a),
    // small style
    FQ(a)
  ];
}), WQ = Dr("small", "default"), KQ = () => ({
  id: String,
  prefixCls: String,
  size: fe.oneOf(WQ),
  disabled: {
    type: Boolean,
    default: void 0
  },
  checkedChildren: fe.any,
  unCheckedChildren: fe.any,
  tabindex: fe.oneOfType([fe.string, fe.number]),
  autofocus: {
    type: Boolean,
    default: void 0
  },
  loading: {
    type: Boolean,
    default: void 0
  },
  checked: fe.oneOfType([fe.string, fe.number, fe.looseBool]),
  checkedValue: fe.oneOfType([fe.string, fe.number, fe.looseBool]).def(!0),
  unCheckedValue: fe.oneOfType([fe.string, fe.number, fe.looseBool]).def(!1),
  onChange: {
    type: Function
  },
  onClick: {
    type: Function
  },
  onKeydown: {
    type: Function
  },
  onMouseup: {
    type: Function
  },
  "onUpdate:checked": {
    type: Function
  },
  onBlur: Function,
  onFocus: Function
}), qQ = be({
  compatConfig: {
    MODE: 3
  },
  name: "ASwitch",
  __ANT_SWITCH: !0,
  inheritAttrs: !1,
  props: KQ(),
  slots: Object,
  // emits: ['update:checked', 'mouseup', 'change', 'click', 'keydown', 'blur'],
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      expose: r,
      emit: i
    } = t;
    const a = Br(), l = _i(), s = E(() => {
      var M;
      return (M = e.disabled) !== null && M !== void 0 ? M : l.value;
    });
    th(() => {
      wo(!("defaultChecked" in n), "Switch", "'defaultChecked' is deprecated, please use 'v-model:checked'"), wo(!("value" in n), "Switch", "`value` is not validate prop, do you mean `checked`?");
    });
    const u = ce(e.checked !== void 0 ? e.checked : n.defaultChecked), c = E(() => u.value === e.checkedValue);
    ke(() => e.checked, () => {
      u.value = e.checked;
    });
    const {
      prefixCls: d,
      direction: f,
      size: p
    } = _t("switch", e), [v, g] = jQ(d), m = ce(), x = () => {
      var M;
      (M = m.value) === null || M === void 0 || M.focus();
    };
    r({
      focus: x,
      blur: () => {
        var M;
        (M = m.value) === null || M === void 0 || M.blur();
      }
    }), Nt(() => {
      Yt(() => {
        e.autofocus && !s.value && m.value.focus();
      });
    });
    const C = (M, N) => {
      s.value || (i("update:checked", M), i("change", M, N), a.onFieldChange());
    }, P = (M) => {
      i("blur", M);
    }, $ = (M) => {
      x();
      const N = c.value ? e.unCheckedValue : e.checkedValue;
      C(N, M), i("click", N, M);
    }, I = (M) => {
      M.keyCode === it.LEFT ? C(e.unCheckedValue, M) : M.keyCode === it.RIGHT && C(e.checkedValue, M), i("keydown", M);
    }, w = (M) => {
      var N;
      (N = m.value) === null || N === void 0 || N.blur(), i("mouseup", M);
    }, _ = E(() => ({
      [`${d.value}-small`]: p.value === "small",
      [`${d.value}-loading`]: e.loading,
      [`${d.value}-checked`]: c.value,
      [`${d.value}-disabled`]: s.value,
      [d.value]: !0,
      [`${d.value}-rtl`]: f.value === "rtl",
      [g.value]: !0
    }));
    return () => {
      var M;
      return v(h(A0, null, {
        default: () => [h("button", Q(Q(Q({}, Fn(e, ["prefixCls", "checkedChildren", "unCheckedChildren", "checked", "autofocus", "checkedValue", "unCheckedValue", "id", "onChange", "onUpdate:checked"])), n), {}, {
          id: (M = e.id) !== null && M !== void 0 ? M : a.id.value,
          onKeydown: I,
          onClick: $,
          onBlur: P,
          onMouseup: w,
          type: "button",
          role: "switch",
          "aria-checked": u.value,
          disabled: s.value || e.loading,
          class: [n.class, _.value],
          ref: m
        }), [h("div", {
          class: `${d.value}-handle`
        }, [e.loading ? h(Ti, {
          class: `${d.value}-loading-icon`
        }, null) : null]), h("span", {
          class: `${d.value}-inner`
        }, [h("span", {
          class: `${d.value}-inner-checked`
        }, [ei(o, e, "checkedChildren")]), h("span", {
          class: `${d.value}-inner-unchecked`
        }, [ei(o, e, "unCheckedChildren")])])])]
      }));
    };
  }
}), Sa = ii(qQ), I2 = Symbol("TableContextProps"), YQ = (e) => {
  Ft(I2, e);
}, aa = () => zt(I2, {}), GQ = "RC_TABLE_KEY";
function _2(e) {
  return e == null ? [] : Array.isArray(e) ? e : [e];
}
function T2(e, t) {
  if (!t && typeof t != "number")
    return e;
  const n = _2(t);
  let o = e;
  for (let r = 0; r < n.length; r += 1) {
    if (!o)
      return null;
    const i = n[r];
    o = o[i];
  }
  return o;
}
function lg(e) {
  const t = [], n = {};
  return e.forEach((o) => {
    const {
      key: r,
      dataIndex: i
    } = o || {};
    let a = r || _2(i).join("-") || GQ;
    for (; n[a]; )
      a = `${a}_next`;
    n[a] = !0, t.push(a);
  }), t;
}
function UQ() {
  const e = {};
  function t(i, a) {
    a && Object.keys(a).forEach((l) => {
      const s = a[l];
      s && typeof s == "object" ? (i[l] = i[l] || {}, t(i[l], s)) : i[l] = s;
    });
  }
  for (var n = arguments.length, o = new Array(n), r = 0; r < n; r++)
    o[r] = arguments[r];
  return o.forEach((i) => {
    t(e, i);
  }), e;
}
function Bb(e) {
  return e != null;
}
const M2 = Symbol("SlotsContextProps"), XQ = (e) => {
  Ft(M2, e);
}, Dx = () => zt(M2, E(() => ({}))), E2 = Symbol("ContextProps"), QQ = (e) => {
  Ft(E2, e);
}, ZQ = () => zt(E2, {
  onResizeColumn: () => {
  }
}), Nu = "RC_TABLE_INTERNAL_COL_DEFINE", D2 = Symbol("HoverContextProps"), JQ = (e) => {
  Ft(D2, e);
}, eZ = () => zt(D2, {
  startRow: $e(-1),
  endRow: $e(-1),
  onHover() {
  }
}), Lb = $e(!1), tZ = () => {
  Nt(() => {
    Lb.value = Lb.value || sq("position", "sticky");
  });
}, nZ = () => Lb;
var oZ = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function rZ(e, t, n, o) {
  const r = e + t - 1;
  return e <= o && r >= n;
}
function iZ(e) {
  return e && typeof e == "object" && !Array.isArray(e) && !cr(e);
}
const sg = be({
  name: "Cell",
  props: ["prefixCls", "record", "index", "renderIndex", "dataIndex", "customRender", "component", "colSpan", "rowSpan", "fixLeft", "fixRight", "firstFixLeft", "lastFixLeft", "firstFixRight", "lastFixRight", "appendNode", "additionalProps", "ellipsis", "align", "rowType", "isSticky", "column", "cellType", "transformCellText"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = Dx(), {
      onHover: r,
      startRow: i,
      endRow: a
    } = eZ(), l = E(() => {
      var g, m, x, S;
      return (x = (g = e.colSpan) !== null && g !== void 0 ? g : (m = e.additionalProps) === null || m === void 0 ? void 0 : m.colSpan) !== null && x !== void 0 ? x : (S = e.additionalProps) === null || S === void 0 ? void 0 : S.colspan;
    }), s = E(() => {
      var g, m, x, S;
      return (x = (g = e.rowSpan) !== null && g !== void 0 ? g : (m = e.additionalProps) === null || m === void 0 ? void 0 : m.rowSpan) !== null && x !== void 0 ? x : (S = e.additionalProps) === null || S === void 0 ? void 0 : S.rowspan;
    }), u = gi(() => {
      const {
        index: g
      } = e;
      return rZ(g, s.value || 1, i.value, a.value);
    }), c = nZ(), d = (g, m) => {
      var x;
      const {
        record: S,
        index: C,
        additionalProps: P
      } = e;
      S && r(C, C + m - 1), (x = P?.onMouseenter) === null || x === void 0 || x.call(P, g);
    }, f = (g) => {
      var m;
      const {
        record: x,
        additionalProps: S
      } = e;
      x && r(-1, -1), (m = S?.onMouseleave) === null || m === void 0 || m.call(S, g);
    }, p = (g) => {
      const m = Do(g)[0];
      return cr(m) ? m.type === ry ? m.children : Array.isArray(m.children) ? p(m.children) : void 0 : m;
    }, v = $e(null);
    return ke([u, () => e.prefixCls, v], () => {
      const g = Ui(v.value);
      g && (u.value ? rb(g, `${e.prefixCls}-cell-row-hover`) : ib(g, `${e.prefixCls}-cell-row-hover`));
    }), () => {
      var g, m, x, S, C, P;
      const {
        prefixCls: $,
        record: I,
        index: w,
        renderIndex: _,
        dataIndex: M,
        customRender: N,
        component: A = "td",
        fixLeft: H,
        fixRight: B,
        firstFixLeft: F,
        lastFixLeft: R,
        firstFixRight: X,
        lastFixRight: j,
        appendNode: ee = (g = n.appendNode) === null || g === void 0 ? void 0 : g.call(n),
        additionalProps: W = {},
        ellipsis: K,
        align: q,
        rowType: G,
        isSticky: ae,
        column: le = {},
        cellType: ie
      } = e, re = `${$}-cell`;
      let te, ve;
      const ue = (m = n.default) === null || m === void 0 ? void 0 : m.call(n);
      if (Bb(ue) || ie === "header")
        ve = ue;
      else {
        const Se = T2(I, M);
        if (ve = Se, N) {
          const Ce = N({
            text: Se,
            value: Se,
            record: I,
            index: w,
            renderIndex: _,
            column: le.__originColumn__
          });
          iZ(Ce) ? (process.env.NODE_ENV !== "production" && wn(!1, "`columns.customRender` return cell props is deprecated with perf issue, please use `customCell` instead."), ve = Ce.children, te = Ce.props) : ve = Ce;
        }
        if (!(Nu in le) && ie === "body" && o.value.bodyCell && !(!((x = le.slots) === null || x === void 0) && x.customRender)) {
          const Ce = Ah(o.value, "bodyCell", {
            text: Se,
            value: Se,
            record: I,
            index: w,
            column: le.__originColumn__
          }, () => {
            const Ae = ve === void 0 ? Se : ve;
            return [typeof Ae == "object" && Ao(Ae) || typeof Ae != "object" ? Ae : null];
          });
          ve = go(Ce);
        }
        e.transformCellText && (ve = e.transformCellText({
          text: ve,
          record: I,
          index: w,
          column: le.__originColumn__
        }));
      }
      typeof ve == "object" && !Array.isArray(ve) && !cr(ve) && (ve = null), K && (R || X) && (ve = h("span", {
        class: `${re}-content`
      }, [ve])), Array.isArray(ve) && ve.length === 1 && (ve = ve[0]);
      const pe = te || {}, {
        colSpan: ge,
        rowSpan: _e,
        style: ze,
        class: Ke
      } = pe, He = oZ(pe, ["colSpan", "rowSpan", "style", "class"]), Ne = (S = ge !== void 0 ? ge : l.value) !== null && S !== void 0 ? S : 1, Xe = (C = _e !== void 0 ? _e : s.value) !== null && C !== void 0 ? C : 1;
      if (Ne === 0 || Xe === 0)
        return null;
      const De = {}, Fe = typeof H == "number" && c.value, Ve = typeof B == "number" && c.value;
      Fe && (De.position = "sticky", De.left = `${H}px`), Ve && (De.position = "sticky", De.right = `${B}px`);
      const nt = {};
      q && (nt.textAlign = q);
      let je;
      const Pe = K === !0 ? {
        showTitle: !0
      } : K;
      Pe && (Pe.showTitle || G === "header") && (typeof ve == "string" || typeof ve == "number" ? je = ve.toString() : cr(ve) && (je = p([ve])));
      const Ge = O(O(O({
        title: je
      }, He), W), {
        colSpan: Ne !== 1 ? Ne : null,
        rowSpan: Xe !== 1 ? Xe : null,
        class: Me(re, {
          [`${re}-fix-left`]: Fe && c.value,
          [`${re}-fix-left-first`]: F && c.value,
          [`${re}-fix-left-last`]: R && c.value,
          [`${re}-fix-right`]: Ve && c.value,
          [`${re}-fix-right-first`]: X && c.value,
          [`${re}-fix-right-last`]: j && c.value,
          [`${re}-ellipsis`]: K,
          [`${re}-with-append`]: ee,
          [`${re}-fix-sticky`]: (Fe || Ve) && ae && c.value
        }, W.class, Ke),
        onMouseenter: (Se) => {
          d(Se, Xe);
        },
        onMouseleave: f,
        style: [W.style, nt, De, ze]
      });
      return h(A, Q(Q({}, Ge), {}, {
        ref: v
      }), {
        default: () => [ee, ve, (P = n.dragHandle) === null || P === void 0 ? void 0 : P.call(n)]
      });
    };
  }
});
function Ax(e, t, n, o, r) {
  const i = n[e] || {}, a = n[t] || {};
  let l, s;
  i.fixed === "left" ? l = o.left[e] : a.fixed === "right" && (s = o.right[t]);
  let u = !1, c = !1, d = !1, f = !1;
  const p = n[t + 1], v = n[e - 1];
  return r === "rtl" ? l !== void 0 ? f = !(v && v.fixed === "left") : s !== void 0 && (d = !(p && p.fixed === "right")) : l !== void 0 ? u = !(p && p.fixed === "left") : s !== void 0 && (c = !(v && v.fixed === "right")), {
    fixLeft: l,
    fixRight: s,
    lastFixLeft: u,
    firstFixRight: c,
    lastFixRight: d,
    firstFixLeft: f,
    isSticky: o.isSticky
  };
}
const b$ = {
  mouse: {
    move: "mousemove",
    stop: "mouseup"
  },
  touch: {
    move: "touchmove",
    stop: "touchend"
  }
}, y$ = 50, aZ = be({
  compatConfig: {
    MODE: 3
  },
  name: "DragHandle",
  props: {
    prefixCls: String,
    width: {
      type: Number,
      required: !0
    },
    minWidth: {
      type: Number,
      default: y$
    },
    maxWidth: {
      type: Number,
      default: 1 / 0
    },
    column: {
      type: Object,
      default: void 0
    }
  },
  setup(e) {
    let t = 0, n = {
      remove: () => {
      }
    }, o = {
      remove: () => {
      }
    };
    const r = () => {
      n.remove(), o.remove();
    };
    jo(() => {
      r();
    }), It(() => {
      dn(!isNaN(e.width), "Table", "width must be a number when use resizable");
    });
    const {
      onResizeColumn: i
    } = ZQ(), a = E(() => typeof e.minWidth == "number" && !isNaN(e.minWidth) ? e.minWidth : y$), l = E(() => typeof e.maxWidth == "number" && !isNaN(e.maxWidth) ? e.maxWidth : 1 / 0), s = fr();
    let u = 0;
    const c = $e(!1);
    let d;
    const f = (C) => {
      let P = 0;
      C.touches ? C.touches.length ? P = C.touches[0].pageX : P = C.changedTouches[0].pageX : P = C.pageX;
      const $ = t - P;
      let I = Math.max(u - $, a.value);
      I = Math.min(I, l.value), Vt.cancel(d), d = Vt(() => {
        i(I, e.column.__originColumn__);
      });
    }, p = (C) => {
      f(C);
    }, v = (C) => {
      c.value = !1, f(C), r();
    }, g = (C, P) => {
      c.value = !0, r(), u = s.vnode.el.parentNode.getBoundingClientRect().width, !(C instanceof MouseEvent && C.which !== 1) && (C.stopPropagation && C.stopPropagation(), t = C.touches ? C.touches[0].pageX : C.pageX, n = Ho(document.documentElement, P.move, p), o = Ho(document.documentElement, P.stop, v));
    }, m = (C) => {
      C.stopPropagation(), C.preventDefault(), g(C, b$.mouse);
    }, x = (C) => {
      C.stopPropagation(), C.preventDefault(), g(C, b$.touch);
    }, S = (C) => {
      C.stopPropagation(), C.preventDefault();
    };
    return () => {
      const {
        prefixCls: C
      } = e, P = {
        [Bo ? "onTouchstartPassive" : "onTouchstart"]: ($) => x($)
      };
      return h("div", Q(Q({
        class: `${C}-resize-handle ${c.value ? "dragging" : ""}`,
        onMousedown: m
      }, P), {}, {
        onClick: S
      }), [h("div", {
        class: `${C}-resize-handle-line`
      }, null)]);
    };
  }
}), lZ = be({
  name: "HeaderRow",
  props: ["cells", "stickyOffsets", "flattenColumns", "rowComponent", "cellComponent", "index", "customHeaderRow"],
  setup(e) {
    const t = aa();
    return () => {
      const {
        prefixCls: n,
        direction: o
      } = t, {
        cells: r,
        stickyOffsets: i,
        flattenColumns: a,
        rowComponent: l,
        cellComponent: s,
        customHeaderRow: u,
        index: c
      } = e;
      let d;
      u && (d = u(r.map((p) => p.column), c));
      const f = lg(r.map((p) => p.column));
      return h(l, d, {
        default: () => [r.map((p, v) => {
          const {
            column: g
          } = p, m = Ax(p.colStart, p.colEnd, a, i, o);
          let x;
          g && g.customHeaderCell && (x = p.column.customHeaderCell(g));
          const S = g;
          return h(sg, Q(Q(Q({}, p), {}, {
            cellType: "header",
            ellipsis: g.ellipsis,
            align: g.align,
            component: s,
            prefixCls: n,
            key: f[v]
          }, m), {}, {
            additionalProps: x,
            rowType: "header",
            column: g
          }), {
            default: () => g.title,
            dragHandle: () => S.resizable ? h(aZ, {
              prefixCls: n,
              width: S.width,
              minWidth: S.minWidth,
              maxWidth: S.maxWidth,
              column: S
            }, null) : null
          });
        })]
      });
    };
  }
});
function sZ(e) {
  const t = [];
  function n(r, i) {
    let a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
    t[a] = t[a] || [];
    let l = i;
    return r.filter(Boolean).map((u) => {
      const c = {
        key: u.key,
        class: Me(u.className, u.class),
        // children: column.title,
        column: u,
        colStart: l
      };
      let d = 1;
      const f = u.children;
      return f && f.length > 0 && (d = n(f, l, a + 1).reduce((p, v) => p + v, 0), c.hasSubColumns = !0), "colSpan" in u && ({
        colSpan: d
      } = u), "rowSpan" in u && (c.rowSpan = u.rowSpan), c.colSpan = d, c.colEnd = c.colStart + d - 1, t[a].push(c), l += d, d;
    });
  }
  n(e, 0);
  const o = t.length;
  for (let r = 0; r < o; r += 1)
    t[r].forEach((i) => {
      !("rowSpan" in i) && !i.hasSubColumns && (i.rowSpan = o - r);
    });
  return t;
}
const x$ = be({
  name: "TableHeader",
  inheritAttrs: !1,
  props: ["columns", "flattenColumns", "stickyOffsets", "customHeaderRow"],
  setup(e) {
    const t = aa(), n = E(() => sZ(e.columns));
    return () => {
      const {
        prefixCls: o,
        getComponent: r
      } = t, {
        stickyOffsets: i,
        flattenColumns: a,
        customHeaderRow: l
      } = e, s = r(["header", "wrapper"], "thead"), u = r(["header", "row"], "tr"), c = r(["header", "cell"], "th");
      return h(s, {
        class: `${o}-thead`
      }, {
        default: () => [n.value.map((d, f) => h(lZ, {
          key: f,
          flattenColumns: a,
          cells: d,
          stickyOffsets: i,
          rowComponent: u,
          cellComponent: c,
          customHeaderRow: l,
          index: f
        }, null))]
      });
    };
  }
}), A2 = Symbol("ExpandedRowProps"), uZ = (e) => {
  Ft(A2, e);
}, cZ = () => zt(A2, {}), N2 = be({
  name: "ExpandedRow",
  inheritAttrs: !1,
  props: ["prefixCls", "component", "cellComponent", "expanded", "colSpan", "isEmpty"],
  setup(e, t) {
    let {
      slots: n,
      attrs: o
    } = t;
    const r = aa(), i = cZ(), {
      fixHeader: a,
      fixColumn: l,
      componentWidth: s,
      horizonScroll: u
    } = i;
    return () => {
      const {
        prefixCls: c,
        component: d,
        cellComponent: f,
        expanded: p,
        colSpan: v,
        isEmpty: g
      } = e;
      return h(d, {
        class: o.class,
        style: {
          display: p ? null : "none"
        }
      }, {
        default: () => [h(sg, {
          component: f,
          prefixCls: c,
          colSpan: v
        }, {
          default: () => {
            var m;
            let x = (m = n.default) === null || m === void 0 ? void 0 : m.call(n);
            return (g ? u.value : l.value) && (x = h("div", {
              style: {
                width: `${s.value - (a.value ? r.scrollbarSize : 0)}px`,
                position: "sticky",
                left: 0,
                overflow: "hidden"
              },
              class: `${c}-expanded-row-fixed`
            }, [x])), x;
          }
        })]
      });
    };
  }
}), dZ = be({
  name: "MeasureCell",
  props: ["columnKey"],
  setup(e, t) {
    let {
      emit: n
    } = t;
    const o = ce();
    return Nt(() => {
      o.value && n("columnResize", e.columnKey, o.value.offsetWidth);
    }), () => h(Al, {
      onResize: (r) => {
        let {
          offsetWidth: i
        } = r;
        n("columnResize", e.columnKey, i);
      }
    }, {
      default: () => [h("td", {
        ref: o,
        style: {
          padding: 0,
          border: 0,
          height: 0
        }
      }, [h("div", {
        style: {
          height: 0,
          overflow: "hidden"
        }
      }, [Le(" ")])])]
    });
  }
}), R2 = Symbol("BodyContextProps"), fZ = (e) => {
  Ft(R2, e);
}, z2 = () => zt(R2, {}), pZ = be({
  name: "BodyRow",
  inheritAttrs: !1,
  props: ["record", "index", "renderIndex", "recordKey", "expandedKeys", "rowComponent", "cellComponent", "customRow", "rowExpandable", "indent", "rowKey", "getRowKey", "childrenColumnName"],
  setup(e, t) {
    let {
      attrs: n
    } = t;
    const o = aa(), r = z2(), i = $e(!1), a = E(() => e.expandedKeys && e.expandedKeys.has(e.recordKey));
    It(() => {
      a.value && (i.value = !0);
    });
    const l = E(() => r.expandableType === "row" && (!e.rowExpandable || e.rowExpandable(e.record))), s = E(() => r.expandableType === "nest"), u = E(() => e.childrenColumnName && e.record && e.record[e.childrenColumnName]), c = E(() => l.value || s.value), d = (m, x) => {
      r.onTriggerExpand(m, x);
    }, f = E(() => {
      var m;
      return ((m = e.customRow) === null || m === void 0 ? void 0 : m.call(e, e.record, e.index)) || {};
    }), p = function(m) {
      var x, S;
      r.expandRowByClick && c.value && d(e.record, m);
      for (var C = arguments.length, P = new Array(C > 1 ? C - 1 : 0), $ = 1; $ < C; $++)
        P[$ - 1] = arguments[$];
      (S = (x = f.value) === null || x === void 0 ? void 0 : x.onClick) === null || S === void 0 || S.call(x, m, ...P);
    }, v = E(() => {
      const {
        record: m,
        index: x,
        indent: S
      } = e, {
        rowClassName: C
      } = r;
      return typeof C == "string" ? C : typeof C == "function" ? C(m, x, S) : "";
    }), g = E(() => lg(r.flattenColumns));
    return () => {
      const {
        class: m,
        style: x
      } = n, {
        record: S,
        index: C,
        rowKey: P,
        indent: $ = 0,
        rowComponent: I,
        cellComponent: w
      } = e, {
        prefixCls: _,
        fixedInfoList: M,
        transformCellText: N
      } = o, {
        flattenColumns: A,
        expandedRowClassName: H,
        indentSize: B,
        expandIcon: F,
        expandedRowRender: R,
        expandIconColumnIndex: X
      } = r, j = h(I, Q(Q({}, f.value), {}, {
        "data-row-key": P,
        class: Me(m, `${_}-row`, `${_}-row-level-${$}`, v.value, f.value.class),
        style: [x, f.value.style],
        onClick: p
      }), {
        default: () => [A.map((W, K) => {
          const {
            customRender: q,
            dataIndex: G,
            className: ae
          } = W, le = g[K], ie = M[K];
          let re;
          W.customCell && (re = W.customCell(S, C, W));
          const te = K === (X || 0) && s.value ? h(Je, null, [h("span", {
            style: {
              paddingLeft: `${B * $}px`
            },
            class: `${_}-row-indent indent-level-${$}`
          }, null), F({
            prefixCls: _,
            expanded: a.value,
            expandable: u.value,
            record: S,
            onExpand: d
          })]) : null;
          return h(sg, Q(Q({
            cellType: "body",
            class: ae,
            ellipsis: W.ellipsis,
            align: W.align,
            component: w,
            prefixCls: _,
            key: le,
            record: S,
            index: C,
            renderIndex: e.renderIndex,
            dataIndex: G,
            customRender: q
          }, ie), {}, {
            additionalProps: re,
            column: W,
            transformCellText: N,
            appendNode: te
          }), null);
        })]
      });
      let ee;
      if (l.value && (i.value || a.value)) {
        const W = R({
          record: S,
          index: C,
          indent: $ + 1,
          expanded: a.value
        }), K = H && H(S, C, $);
        ee = h(N2, {
          expanded: a.value,
          class: Me(`${_}-expanded-row`, `${_}-expanded-row-level-${$ + 1}`, K),
          prefixCls: _,
          component: I,
          cellComponent: w,
          colSpan: A.length,
          isEmpty: !1
        }, {
          default: () => [W]
        });
      }
      return h(Je, null, [j, ee]);
    };
  }
});
function F2(e, t, n, o, r, i) {
  const a = [];
  a.push({
    record: e,
    indent: t,
    index: i
  });
  const l = r(e), s = o?.has(l);
  if (e && Array.isArray(e[n]) && s)
    for (let u = 0; u < e[n].length; u += 1) {
      const c = F2(e[n][u], t + 1, n, o, r, u);
      a.push(...c);
    }
  return a;
}
function hZ(e, t, n, o) {
  return E(() => {
    const i = t.value, a = n.value, l = e.value;
    if (a?.size) {
      const s = [];
      for (let u = 0; u < l?.length; u += 1) {
        const c = l[u];
        s.push(...F2(c, 0, i, a, o.value, u));
      }
      return s;
    }
    return l?.map((s, u) => ({
      record: s,
      indent: 0,
      index: u
    }));
  });
}
const B2 = Symbol("ResizeContextProps"), gZ = (e) => {
  Ft(B2, e);
}, vZ = () => zt(B2, {
  onColumnResize: () => {
  }
}), mZ = be({
  name: "TableBody",
  props: ["data", "getRowKey", "measureColumnWidth", "expandedKeys", "customRow", "rowExpandable", "childrenColumnName"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = vZ(), r = aa(), i = z2(), a = hZ(Kt(e, "data"), Kt(e, "childrenColumnName"), Kt(e, "expandedKeys"), Kt(e, "getRowKey")), l = $e(-1), s = $e(-1);
    let u;
    return JQ({
      startRow: l,
      endRow: s,
      onHover: (c, d) => {
        clearTimeout(u), u = setTimeout(() => {
          l.value = c, s.value = d;
        }, 100);
      }
    }), () => {
      var c;
      const {
        data: d,
        getRowKey: f,
        measureColumnWidth: p,
        expandedKeys: v,
        customRow: g,
        rowExpandable: m,
        childrenColumnName: x
      } = e, {
        onColumnResize: S
      } = o, {
        prefixCls: C,
        getComponent: P
      } = r, {
        flattenColumns: $
      } = i, I = P(["body", "wrapper"], "tbody"), w = P(["body", "row"], "tr"), _ = P(["body", "cell"], "td");
      let M;
      d.length ? M = a.value.map((A, H) => {
        const {
          record: B,
          indent: F,
          index: R
        } = A, X = f(B, H);
        return h(pZ, {
          key: X,
          rowKey: X,
          record: B,
          recordKey: X,
          index: H,
          renderIndex: R,
          rowComponent: w,
          cellComponent: _,
          expandedKeys: v,
          customRow: g,
          getRowKey: f,
          rowExpandable: m,
          childrenColumnName: x,
          indent: F
        }, null);
      }) : M = h(N2, {
        expanded: !0,
        class: `${C}-placeholder`,
        prefixCls: C,
        component: w,
        cellComponent: _,
        colSpan: $.length,
        isEmpty: !0
      }, {
        default: () => [(c = n.emptyNode) === null || c === void 0 ? void 0 : c.call(n)]
      });
      const N = lg($);
      return h(I, {
        class: `${C}-tbody`
      }, {
        default: () => [p && h("tr", {
          "aria-hidden": "true",
          class: `${C}-measure-row`,
          style: {
            height: 0,
            fontSize: 0
          }
        }, [N.map((A) => h(dZ, {
          key: A,
          columnKey: A,
          onColumnResize: S
        }, null))]), M]
      });
    };
  }
}), qi = {};
var bZ = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function Hb(e) {
  return e.reduce((t, n) => {
    const {
      fixed: o
    } = n, r = o === !0 ? "left" : o, i = n.children;
    return i && i.length > 0 ? [...t, ...Hb(i).map((a) => O({
      fixed: r
    }, a))] : [...t, O(O({}, n), {
      fixed: r
    })];
  }, []);
}
function yZ(e) {
  let t = !0;
  for (let o = 0; o < e.length; o += 1) {
    const r = e[o];
    if (t && r.fixed !== "left")
      t = !1;
    else if (!t && r.fixed === "left") {
      wn(!1, `Index ${o - 1} of \`columns\` missing \`fixed='left'\` prop.`);
      break;
    }
  }
  let n = !0;
  for (let o = e.length - 1; o >= 0; o -= 1) {
    const r = e[o];
    if (n && r.fixed !== "right")
      n = !1;
    else if (!n && r.fixed === "right") {
      wn(!1, `Index ${o + 1} of \`columns\` missing \`fixed='right'\` prop.`);
      break;
    }
  }
}
function xZ(e) {
  return e.map((t) => {
    const {
      fixed: n
    } = t, o = bZ(t, ["fixed"]);
    let r = n;
    return n === "left" ? r = "right" : n === "right" && (r = "left"), O({
      fixed: r
    }, o);
  });
}
function wZ(e, t) {
  let {
    prefixCls: n,
    columns: o,
    // children,
    expandable: r,
    expandedKeys: i,
    getRowKey: a,
    onTriggerExpand: l,
    expandIcon: s,
    rowExpandable: u,
    expandIconColumnIndex: c,
    direction: d,
    expandRowByClick: f,
    expandColumnWidth: p,
    expandFixed: v
  } = e;
  const g = Dx(), m = E(() => {
    if (r.value) {
      let C = o.value.slice();
      if (process.env.NODE_ENV !== "production" && c.value >= 0 && wn(!1, "`expandIconColumnIndex` is deprecated. Please use `Table.EXPAND_COLUMN` in `columns` instead."), !C.includes(qi)) {
        const B = c.value || 0;
        B >= 0 && C.splice(B, 0, qi);
      }
      process.env.NODE_ENV !== "production" && C.filter((B) => B === qi).length > 1 && wn(!1, "There exist more than one `EXPAND_COLUMN` in `columns`.");
      const P = C.indexOf(qi);
      C = C.filter((B, F) => B !== qi || F === P);
      const $ = o.value[P];
      let I;
      (v.value === "left" || v.value) && !c.value ? I = "left" : (v.value === "right" || v.value) && c.value === o.value.length ? I = "right" : I = $ ? $.fixed : null;
      const w = i.value, _ = u.value, M = s.value, N = n.value, A = f.value, H = {
        [Nu]: {
          class: `${n.value}-expand-icon-col`,
          columnType: "EXPAND_COLUMN"
        },
        title: Ah(g.value, "expandColumnTitle", {}, () => [""]),
        fixed: I,
        class: `${n.value}-row-expand-icon-cell`,
        width: p.value,
        customRender: (B) => {
          let {
            record: F,
            index: R
          } = B;
          const X = a.value(F, R), j = w.has(X), ee = _ ? _(F) : !0, W = M({
            prefixCls: N,
            expanded: j,
            expandable: ee,
            record: F,
            onExpand: l
          });
          return A ? h("span", {
            onClick: (K) => K.stopPropagation()
          }, [W]) : W;
        }
      };
      return C.map((B) => B === qi ? H : B);
    }
    return process.env.NODE_ENV !== "production" && o.value.includes(qi) && wn(!1, "`expandable` is not config but there exist `EXPAND_COLUMN` in `columns`."), o.value.filter((C) => C !== qi);
  }), x = E(() => {
    let C = m.value;
    return t.value && (C = t.value(C)), C.length || (C = [{
      customRender: () => null
    }]), C;
  }), S = E(() => d.value === "rtl" ? xZ(Hb(x.value)) : Hb(x.value));
  return process.env.NODE_ENV !== "production" && It(() => {
    setTimeout(() => {
      yZ(S.value);
    });
  }), [x, S];
}
function L2(e) {
  const t = $e(e);
  let n;
  const o = $e([]);
  function r(i) {
    o.value.push(i), Vt.cancel(n), n = Vt(() => {
      const a = o.value;
      o.value = [], a.forEach((l) => {
        t.value = l(t.value);
      });
    });
  }
  return qt(() => {
    Vt.cancel(n);
  }), [t, r];
}
function SZ(e) {
  const t = ce(null), n = ce();
  function o() {
    clearTimeout(n.value);
  }
  function r(a) {
    t.value = a, o(), n.value = setTimeout(() => {
      t.value = null, n.value = void 0;
    }, 100);
  }
  function i() {
    return t.value;
  }
  return qt(() => {
    o();
  }), [r, i];
}
function CZ(e, t, n) {
  return E(() => {
    const r = [], i = [];
    let a = 0, l = 0;
    const s = e.value, u = t.value, c = n.value;
    for (let d = 0; d < u; d += 1)
      if (c === "rtl") {
        i[d] = l, l += s[d] || 0;
        const f = u - d - 1;
        r[f] = a, a += s[f] || 0;
      } else {
        r[d] = a, a += s[d] || 0;
        const f = u - d - 1;
        i[f] = l, l += s[f] || 0;
      }
    return {
      left: r,
      right: i
    };
  });
}
var $Z = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function H2(e) {
  let {
    colWidths: t,
    columns: n,
    columCount: o
  } = e;
  const r = [], i = o || n.length;
  let a = !1;
  for (let l = i - 1; l >= 0; l -= 1) {
    const s = t[l], u = n && n[l], c = u && u[Nu];
    if (s || c || a) {
      const d = c || {}, {
        columnType: f
      } = d, p = $Z(d, ["columnType"]);
      r.unshift(h("col", Q({
        key: l,
        style: {
          width: typeof s == "number" ? `${s}px` : s
        }
      }, p), null)), a = !0;
    }
  }
  return h("colgroup", null, [r]);
}
function Vb(e, t) {
  let {
    slots: n
  } = t;
  var o;
  return h("div", null, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)]);
}
Vb.displayName = "Panel";
let PZ = 0;
const OZ = be({
  name: "TableSummary",
  props: ["fixed"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = aa(), r = `table-summary-uni-key-${++PZ}`, i = E(() => e.fixed === "" || e.fixed);
    return It(() => {
      o.summaryCollect(r, i.value);
    }), qt(() => {
      o.summaryCollect(r, !1);
    }), () => {
      var a;
      return (a = n.default) === null || a === void 0 ? void 0 : a.call(n);
    };
  }
}), kZ = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATableSummaryRow",
  setup(e, t) {
    let {
      slots: n
    } = t;
    return () => {
      var o;
      return h("tr", null, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)]);
    };
  }
}), V2 = Symbol("SummaryContextProps"), IZ = (e) => {
  Ft(V2, e);
}, _Z = () => zt(V2, {}), TZ = be({
  name: "ATableSummaryCell",
  props: ["index", "colSpan", "rowSpan", "align"],
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const r = aa(), i = _Z();
    return () => {
      const {
        index: a,
        colSpan: l = 1,
        rowSpan: s,
        align: u
      } = e, {
        prefixCls: c,
        direction: d
      } = r, {
        scrollColumnIndex: f,
        stickyOffsets: p,
        flattenColumns: v
      } = i, m = a + l - 1 + 1 === f ? l + 1 : l, x = Ax(a, a + m - 1, v, p, d);
      return h(sg, Q({
        class: n.class,
        index: a,
        component: "td",
        prefixCls: c,
        record: null,
        dataIndex: null,
        align: u,
        colSpan: m,
        rowSpan: s,
        customRender: () => {
          var S;
          return (S = o.default) === null || S === void 0 ? void 0 : S.call(o);
        }
      }, x), null);
    };
  }
}), Rf = be({
  name: "TableFooter",
  inheritAttrs: !1,
  props: ["stickyOffsets", "flattenColumns"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = aa();
    return IZ(Pn({
      stickyOffsets: Kt(e, "stickyOffsets"),
      flattenColumns: Kt(e, "flattenColumns"),
      scrollColumnIndex: E(() => {
        const r = e.flattenColumns.length - 1, i = e.flattenColumns[r];
        return i?.scrollbar ? r : null;
      })
    })), () => {
      var r;
      const {
        prefixCls: i
      } = o;
      return h("tfoot", {
        class: `${i}-summary`
      }, [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)]);
    };
  }
}), MZ = OZ;
function EZ(e) {
  let {
    prefixCls: t,
    record: n,
    onExpand: o,
    expanded: r,
    expandable: i
  } = e;
  const a = `${t}-row-expand-icon`;
  if (!i)
    return h("span", {
      class: [a, `${t}-row-spaced`]
    }, null);
  const l = (s) => {
    o(n, s), s.stopPropagation();
  };
  return h("span", {
    class: {
      [a]: !0,
      [`${t}-row-expanded`]: r,
      [`${t}-row-collapsed`]: !r
    },
    onClick: l
  }, null);
}
function DZ(e, t, n) {
  const o = [];
  function r(i) {
    (i || []).forEach((a, l) => {
      o.push(t(a, l)), r(a[n]);
    });
  }
  return r(e), o;
}
const AZ = be({
  name: "StickyScrollBar",
  inheritAttrs: !1,
  props: ["offsetScroll", "container", "scrollBodyRef", "scrollBodySizeInfo"],
  emits: ["scroll"],
  setup(e, t) {
    let {
      emit: n,
      expose: o
    } = t;
    const r = aa(), i = $e(0), a = $e(0), l = $e(0);
    It(() => {
      i.value = e.scrollBodySizeInfo.scrollWidth || 0, a.value = e.scrollBodySizeInfo.clientWidth || 0, l.value = i.value && a.value * (a.value / i.value);
    }, {
      flush: "post"
    });
    const s = $e(), [u, c] = L2({
      scrollLeft: 0,
      isHiddenScrollBar: !0
    }), d = ce({
      delta: 0,
      x: 0
    }), f = $e(!1), p = () => {
      f.value = !1;
    }, v = (w) => {
      d.value = {
        delta: w.pageX - u.value.scrollLeft,
        x: 0
      }, f.value = !0, w.preventDefault();
    }, g = (w) => {
      const {
        buttons: _
      } = w || window?.event;
      if (!f.value || _ === 0) {
        f.value && (f.value = !1);
        return;
      }
      let M = d.value.x + w.pageX - d.value.x - d.value.delta;
      M <= 0 && (M = 0), M + l.value >= a.value && (M = a.value - l.value), n("scroll", {
        scrollLeft: M / a.value * (i.value + 2)
      }), d.value.x = w.pageX;
    }, m = () => {
      if (!e.scrollBodyRef.value)
        return;
      const w = tS(e.scrollBodyRef.value).top, _ = w + e.scrollBodyRef.value.offsetHeight, M = e.container === window ? document.documentElement.scrollTop + window.innerHeight : tS(e.container).top + e.container.clientHeight;
      _ - Rp() <= M || w >= M - e.offsetScroll ? c((N) => O(O({}, N), {
        isHiddenScrollBar: !0
      })) : c((N) => O(O({}, N), {
        isHiddenScrollBar: !1
      }));
    };
    o({
      setScrollLeft: (w) => {
        c((_) => O(O({}, _), {
          scrollLeft: w / i.value * a.value || 0
        }));
      }
    });
    let S = null, C = null, P = null, $ = null;
    Nt(() => {
      S = Ho(document.body, "mouseup", p, !1), C = Ho(document.body, "mousemove", g, !1), P = Ho(window, "resize", m, !1);
    }), qP(() => {
      Yt(() => {
        m();
      });
    }), Nt(() => {
      setTimeout(() => {
        ke([l, f], () => {
          m();
        }, {
          immediate: !0,
          flush: "post"
        });
      });
    }), ke(() => e.container, () => {
      $?.remove(), $ = Ho(e.container, "scroll", m, !1);
    }, {
      immediate: !0,
      flush: "post"
    }), qt(() => {
      S?.remove(), C?.remove(), $?.remove(), P?.remove();
    }), ke(() => O({}, u.value), (w, _) => {
      w.isHiddenScrollBar !== _?.isHiddenScrollBar && !w.isHiddenScrollBar && c((M) => {
        const N = e.scrollBodyRef.value;
        return N ? O(O({}, M), {
          scrollLeft: N.scrollLeft / N.scrollWidth * N.clientWidth
        }) : M;
      });
    }, {
      immediate: !0
    });
    const I = Rp();
    return () => {
      if (i.value <= a.value || !l.value || u.value.isHiddenScrollBar)
        return null;
      const {
        prefixCls: w
      } = r;
      return h("div", {
        style: {
          height: `${I}px`,
          width: `${a.value}px`,
          bottom: `${e.offsetScroll}px`
        },
        class: `${w}-sticky-scroll`
      }, [h("div", {
        onMousedown: v,
        ref: s,
        class: Me(`${w}-sticky-scroll-bar`, {
          [`${w}-sticky-scroll-bar-active`]: f.value
        }),
        style: {
          width: `${l.value}px`,
          transform: `translate3d(${u.value.scrollLeft}px, 0, 0)`
        }
      }, null)]);
    };
  }
}), w$ = xr() ? window : null;
function NZ(e, t) {
  return E(() => {
    const {
      offsetHeader: n = 0,
      offsetSummary: o = 0,
      offsetScroll: r = 0,
      getContainer: i = () => w$
    } = typeof e.value == "object" ? e.value : {}, a = i() || w$, l = !!e.value;
    return {
      isSticky: l,
      stickyClassName: l ? `${t.value}-sticky-holder` : "",
      offsetHeader: n,
      offsetSummary: o,
      offsetScroll: r,
      container: a
    };
  });
}
function RZ(e, t) {
  return E(() => {
    const n = [], o = e.value, r = t.value;
    for (let i = 0; i < r; i += 1) {
      const a = o[i];
      if (a !== void 0)
        n[i] = a;
      else
        return null;
    }
    return n;
  });
}
const S$ = be({
  name: "FixedHolder",
  inheritAttrs: !1,
  props: ["columns", "flattenColumns", "stickyOffsets", "customHeaderRow", "noData", "maxContentScroll", "colWidths", "columCount", "direction", "fixHeader", "stickyTopOffset", "stickyBottomOffset", "stickyClassName"],
  emits: ["scroll"],
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: r
    } = t;
    const i = aa(), a = E(() => i.isSticky && !e.fixHeader ? 0 : i.scrollbarSize), l = ce(), s = (g) => {
      const {
        currentTarget: m,
        deltaX: x
      } = g;
      x && (r("scroll", {
        currentTarget: m,
        scrollLeft: m.scrollLeft + x
      }), g.preventDefault());
    }, u = ce();
    Nt(() => {
      Yt(() => {
        u.value = Ho(l.value, "wheel", s);
      });
    }), qt(() => {
      var g;
      (g = u.value) === null || g === void 0 || g.remove();
    });
    const c = E(() => e.flattenColumns.every((g) => g.width && g.width !== 0 && g.width !== "0px")), d = ce([]), f = ce([]);
    It(() => {
      const g = e.flattenColumns[e.flattenColumns.length - 1], m = {
        fixed: g ? g.fixed : null,
        scrollbar: !0,
        customHeaderCell: () => ({
          class: `${i.prefixCls}-cell-scrollbar`
        })
      };
      d.value = a.value ? [...e.columns, m] : e.columns, f.value = a.value ? [...e.flattenColumns, m] : e.flattenColumns;
    });
    const p = E(() => {
      const {
        stickyOffsets: g,
        direction: m
      } = e, {
        right: x,
        left: S
      } = g;
      return O(O({}, g), {
        left: m === "rtl" ? [...S.map((C) => C + a.value), 0] : S,
        right: m === "rtl" ? x : [...x.map((C) => C + a.value), 0],
        isSticky: i.isSticky
      });
    }), v = RZ(Kt(e, "colWidths"), Kt(e, "columCount"));
    return () => {
      var g;
      const {
        noData: m,
        columCount: x,
        stickyTopOffset: S,
        stickyBottomOffset: C,
        stickyClassName: P,
        maxContentScroll: $
      } = e, {
        isSticky: I
      } = i;
      return h("div", {
        style: O({
          overflow: "hidden"
        }, I ? {
          top: `${S}px`,
          bottom: `${C}px`
        } : {}),
        ref: l,
        class: Me(n.class, {
          [P]: !!P
        })
      }, [h("table", {
        style: {
          tableLayout: "fixed",
          visibility: m || v.value ? null : "hidden"
        }
      }, [(!m || !$ || c.value) && h(H2, {
        colWidths: v.value ? [...v.value, a.value] : [],
        columCount: x + 1,
        columns: f.value
      }, null), (g = o.default) === null || g === void 0 ? void 0 : g.call(o, O(O({}, e), {
        stickyOffsets: p.value,
        columns: d.value,
        flattenColumns: f.value
      }))])]);
    };
  }
});
function C$(e) {
  for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++)
    n[o - 1] = arguments[o];
  return Pn(WE(n.map((r) => [r, Kt(e, r)])));
}
const zZ = [], FZ = {}, jb = "rc-table-internal-hook", BZ = be({
  name: "VcTable",
  inheritAttrs: !1,
  props: ["prefixCls", "data", "columns", "rowKey", "tableLayout", "scroll", "rowClassName", "title", "footer", "id", "showHeader", "components", "customRow", "customHeaderRow", "direction", "expandFixed", "expandColumnWidth", "expandedRowKeys", "defaultExpandedRowKeys", "expandedRowRender", "expandRowByClick", "expandIcon", "onExpand", "onExpandedRowsChange", "onUpdate:expandedRowKeys", "defaultExpandAllRows", "indentSize", "expandIconColumnIndex", "expandedRowClassName", "childrenColumnName", "rowExpandable", "sticky", "transformColumns", "internalHooks", "internalRefs", "canExpandable", "onUpdateInternalRefs", "transformCellText"],
  emits: ["expand", "expandedRowsChange", "updateInternalRefs", "update:expandedRowKeys"],
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: r
    } = t;
    const i = E(() => e.data || zZ), a = E(() => !!i.value.length), l = E(() => UQ(e.components, {})), s = (Ce, Ae) => T2(l.value, Ce) || Ae, u = E(() => {
      const Ce = e.rowKey;
      return typeof Ce == "function" ? Ce : (Ae) => {
        const qe = Ae && Ae[Ce];
        return process.env.NODE_ENV !== "production" && wn(qe !== void 0, "Each record in table should have a unique `key` prop, or set `rowKey` to an unique primary key."), qe;
      };
    }), c = E(() => e.expandIcon || EZ), d = E(() => e.childrenColumnName || "children"), f = E(() => e.expandedRowRender ? "row" : e.canExpandable || i.value.some((Ce) => Ce && typeof Ce == "object" && Ce[d.value]) ? "nest" : !1), p = $e([]);
    It(() => {
      e.defaultExpandedRowKeys && (p.value = e.defaultExpandedRowKeys), e.defaultExpandAllRows && (p.value = DZ(i.value, u.value, d.value));
    })();
    const g = E(() => new Set(e.expandedRowKeys || p.value || [])), m = (Ce) => {
      const Ae = u.value(Ce, i.value.indexOf(Ce));
      let qe;
      const We = g.value.has(Ae);
      We ? (g.value.delete(Ae), qe = [...g.value]) : qe = [...g.value, Ae], p.value = qe, r("expand", !We, Ce), r("update:expandedRowKeys", qe), r("expandedRowsChange", qe);
    };
    process.env.NODE_ENV !== "production" && e.expandedRowRender && i.value.some((Ce) => Array.isArray(Ce?.[d.value])) && wn(!1, "`expandedRowRender` should not use with nested Table");
    const x = ce(0), [S, C] = wZ(O(O({}, ys(e)), {
      // children,
      expandable: E(() => !!e.expandedRowRender),
      expandedKeys: g,
      getRowKey: u,
      onTriggerExpand: m,
      expandIcon: c
    }), E(() => e.internalHooks === jb ? e.transformColumns : null)), P = E(() => ({
      columns: S.value,
      flattenColumns: C.value
    })), $ = ce(), I = ce(), w = ce(), _ = ce({
      scrollWidth: 0,
      clientWidth: 0
    }), M = ce(), [N, A] = $n(!1), [H, B] = $n(!1), [F, R] = L2(/* @__PURE__ */ new Map()), X = E(() => lg(C.value)), j = E(() => X.value.map((Ce) => F.value.get(Ce))), ee = E(() => C.value.length), W = CZ(j, ee, Kt(e, "direction")), K = E(() => e.scroll && Bb(e.scroll.y)), q = E(() => e.scroll && Bb(e.scroll.x) || !!e.expandFixed), G = E(() => q.value && C.value.some((Ce) => {
      let {
        fixed: Ae
      } = Ce;
      return Ae;
    })), ae = ce(), le = NZ(Kt(e, "sticky"), Kt(e, "prefixCls")), ie = Pn({}), re = E(() => {
      const Ce = Object.values(ie)[0];
      return (K.value || le.value.isSticky) && Ce;
    }), te = (Ce, Ae) => {
      Ae ? ie[Ce] = Ae : delete ie[Ce];
    }, ve = ce({}), ue = ce({}), pe = ce({});
    It(() => {
      K.value && (ue.value = {
        overflowY: "scroll",
        maxHeight: cs(e.scroll.y)
      }), q.value && (ve.value = {
        overflowX: "auto"
      }, K.value || (ue.value = {
        overflowY: "hidden"
      }), pe.value = {
        width: e.scroll.x === !0 ? "auto" : cs(e.scroll.x),
        minWidth: "100%"
      });
    });
    const ge = (Ce, Ae) => {
      Nh($.value) && R((qe) => {
        if (qe.get(Ce) !== Ae) {
          const We = new Map(qe);
          return We.set(Ce, Ae), We;
        }
        return qe;
      });
    }, [_e, ze] = SZ();
    function Ke(Ce, Ae) {
      if (!Ae)
        return;
      if (typeof Ae == "function") {
        Ae(Ce);
        return;
      }
      const qe = Ae.$el || Ae;
      qe.scrollLeft !== Ce && (qe.scrollLeft = Ce);
    }
    const He = (Ce) => {
      let {
        currentTarget: Ae,
        scrollLeft: qe
      } = Ce;
      var We;
      const tt = e.direction === "rtl", Ee = typeof qe == "number" ? qe : Ae.scrollLeft, Re = Ae || FZ;
      if ((!ze() || ze() === Re) && (_e(Re), Ke(Ee, I.value), Ke(Ee, w.value), Ke(Ee, M.value), Ke(Ee, (We = ae.value) === null || We === void 0 ? void 0 : We.setScrollLeft)), Ae) {
        const {
          scrollWidth: Be,
          clientWidth: ot
        } = Ae;
        tt ? (A(-Ee < Be - ot), B(-Ee > 0)) : (A(Ee > 0), B(Ee < Be - ot));
      }
    }, Ne = () => {
      q.value && w.value ? He({
        currentTarget: w.value
      }) : (A(!1), B(!1));
    };
    let Xe;
    const De = (Ce) => {
      Ce !== x.value && (Ne(), x.value = $.value ? $.value.offsetWidth : Ce);
    }, Fe = (Ce) => {
      let {
        width: Ae
      } = Ce;
      if (clearTimeout(Xe), x.value === 0) {
        De(Ae);
        return;
      }
      Xe = setTimeout(() => {
        De(Ae);
      }, 100);
    };
    ke([q, () => e.data, () => e.columns], () => {
      q.value && Ne();
    }, {
      flush: "post"
    });
    const [Ve, nt] = $n(0);
    tZ(), Nt(() => {
      Yt(() => {
        var Ce, Ae;
        Ne(), nt(E5(w.value).width), _.value = {
          scrollWidth: ((Ce = w.value) === null || Ce === void 0 ? void 0 : Ce.scrollWidth) || 0,
          clientWidth: ((Ae = w.value) === null || Ae === void 0 ? void 0 : Ae.clientWidth) || 0
        };
      });
    }), Ya(() => {
      Yt(() => {
        var Ce, Ae;
        const qe = ((Ce = w.value) === null || Ce === void 0 ? void 0 : Ce.scrollWidth) || 0, We = ((Ae = w.value) === null || Ae === void 0 ? void 0 : Ae.clientWidth) || 0;
        (_.value.scrollWidth !== qe || _.value.clientWidth !== We) && (_.value = {
          scrollWidth: qe,
          clientWidth: We
        });
      });
    }), It(() => {
      e.internalHooks === jb && e.internalRefs && e.onUpdateInternalRefs({
        body: w.value ? w.value.$el || w.value : null
      });
    }, {
      flush: "post"
    });
    const je = E(() => e.tableLayout ? e.tableLayout : G.value ? e.scroll.x === "max-content" ? "auto" : "fixed" : K.value || le.value.isSticky || C.value.some((Ce) => {
      let {
        ellipsis: Ae
      } = Ce;
      return Ae;
    }) ? "fixed" : "auto"), Pe = () => {
      var Ce;
      return a.value ? null : ((Ce = o.emptyText) === null || Ce === void 0 ? void 0 : Ce.call(o)) || "No Data";
    };
    YQ(Pn(O(O({}, ys(C$(e, "prefixCls", "direction", "transformCellText"))), {
      getComponent: s,
      scrollbarSize: Ve,
      fixedInfoList: E(() => C.value.map((Ce, Ae) => Ax(Ae, Ae, C.value, W.value, e.direction))),
      isSticky: E(() => le.value.isSticky),
      summaryCollect: te
    }))), fZ(Pn(O(O({}, ys(C$(e, "rowClassName", "expandedRowClassName", "expandRowByClick", "expandedRowRender", "expandIconColumnIndex", "indentSize"))), {
      columns: S,
      flattenColumns: C,
      tableLayout: je,
      expandIcon: c,
      expandableType: f,
      onTriggerExpand: m
    }))), gZ({
      onColumnResize: ge
    }), uZ({
      componentWidth: x,
      fixHeader: K,
      fixColumn: G,
      horizonScroll: q
    });
    const Ge = () => h(mZ, {
      data: i.value,
      measureColumnWidth: K.value || q.value || le.value.isSticky,
      expandedKeys: g.value,
      rowExpandable: e.rowExpandable,
      getRowKey: u.value,
      customRow: e.customRow,
      childrenColumnName: d.value
    }, {
      emptyNode: Pe
    }), Se = () => h(H2, {
      colWidths: C.value.map((Ce) => {
        let {
          width: Ae
        } = Ce;
        return Ae;
      }),
      columns: C.value
    }, null);
    return () => {
      var Ce;
      const {
        prefixCls: Ae,
        scroll: qe,
        tableLayout: We,
        direction: tt,
        // Additional Part
        title: Ee = o.title,
        footer: Re = o.footer,
        // Customize
        id: Be,
        showHeader: ot,
        customHeaderRow: pt
      } = e, {
        isSticky: at,
        offsetHeader: dt,
        offsetSummary: wt,
        offsetScroll: Ct,
        stickyClassName: St,
        container: yt
      } = le.value, Ot = s(["table"], "table"), Wt = s(["body"]), Xt = (Ce = o.summary) === null || Ce === void 0 ? void 0 : Ce.call(o, {
        pageData: i.value
      });
      let ln = () => null;
      const pn = {
        colWidths: j.value,
        columCount: C.value.length,
        stickyOffsets: W.value,
        customHeaderRow: pt,
        fixHeader: K.value,
        scroll: qe
      };
      if (process.env.NODE_ENV !== "production" && typeof Wt == "function" && a.value && !K.value && wn(!1, "`components.body` with render props is only work on `scroll.y`."), K.value || at) {
        let hn = () => null;
        typeof Wt == "function" ? (hn = () => Wt(i.value, {
          scrollbarSize: Ve.value,
          ref: w,
          onScroll: He
        }), pn.colWidths = C.value.map((so, Uo) => {
          let {
            width: Ue
          } = so;
          const ht = Uo === S.value.length - 1 ? Ue - Ve.value : Ue;
          return typeof ht == "number" && !Number.isNaN(ht) ? ht : (wn(!1, "When use `components.body` with render props. Each column should have a fixed `width` value."), 0);
        })) : hn = () => h("div", {
          style: O(O({}, ve.value), ue.value),
          onScroll: He,
          ref: w,
          class: Me(`${Ae}-body`)
        }, [h(Ot, {
          style: O(O({}, pe.value), {
            tableLayout: je.value
          })
        }, {
          default: () => [Se(), Ge(), !re.value && Xt && h(Rf, {
            stickyOffsets: W.value,
            flattenColumns: C.value
          }, {
            default: () => [Xt]
          })]
        })]);
        const Kn = O(O(O({
          noData: !i.value.length,
          maxContentScroll: q.value && qe.x === "max-content"
        }, pn), P.value), {
          direction: tt,
          stickyClassName: St,
          onScroll: He
        });
        ln = () => h(Je, null, [ot !== !1 && h(S$, Q(Q({}, Kn), {}, {
          stickyTopOffset: dt,
          class: `${Ae}-header`,
          ref: I
        }), {
          default: (so) => h(Je, null, [h(x$, so, null), re.value === "top" && h(Rf, so, {
            default: () => [Xt]
          })])
        }), hn(), re.value && re.value !== "top" && h(S$, Q(Q({}, Kn), {}, {
          stickyBottomOffset: wt,
          class: `${Ae}-summary`,
          ref: M
        }), {
          default: (so) => h(Rf, so, {
            default: () => [Xt]
          })
        }), at && w.value && h(AZ, {
          ref: ae,
          offsetScroll: Ct,
          scrollBodyRef: w,
          onScroll: He,
          container: yt,
          scrollBodySizeInfo: _.value
        }, null)]);
      } else
        ln = () => h("div", {
          style: O(O({}, ve.value), ue.value),
          class: Me(`${Ae}-content`),
          onScroll: He,
          ref: w
        }, [h(Ot, {
          style: O(O({}, pe.value), {
            tableLayout: je.value
          })
        }, {
          default: () => [Se(), ot !== !1 && h(x$, Q(Q({}, pn), P.value), null), Ge(), Xt && h(Rf, {
            stickyOffsets: W.value,
            flattenColumns: C.value
          }, {
            default: () => [Xt]
          })]
        })]);
      const gt = Bs(n, {
        aria: !0,
        data: !0
      }), En = () => h("div", Q(Q({}, gt), {}, {
        class: Me(Ae, {
          [`${Ae}-rtl`]: tt === "rtl",
          [`${Ae}-ping-left`]: N.value,
          [`${Ae}-ping-right`]: H.value,
          [`${Ae}-layout-fixed`]: We === "fixed",
          [`${Ae}-fixed-header`]: K.value,
          /** No used but for compatible */
          [`${Ae}-fixed-column`]: G.value,
          [`${Ae}-scroll-horizontal`]: q.value,
          [`${Ae}-has-fix-left`]: C.value[0] && C.value[0].fixed,
          [`${Ae}-has-fix-right`]: C.value[ee.value - 1] && C.value[ee.value - 1].fixed === "right",
          [n.class]: n.class
        }),
        style: n.style,
        id: Be,
        ref: $
      }), [Ee && h(Vb, {
        class: `${Ae}-title`
      }, {
        default: () => [Ee(i.value)]
      }), h("div", {
        class: `${Ae}-container`
      }, [ln()]), Re && h(Vb, {
        class: `${Ae}-footer`
      }, {
        default: () => [Re(i.value)]
      })]);
      return q.value ? h(Al, {
        onResize: Fe
      }, {
        default: En
      }) : En();
    };
  }
});
function LZ() {
  const e = O({}, arguments.length <= 0 ? void 0 : arguments[0]);
  for (let t = 1; t < arguments.length; t++) {
    const n = t < 0 || arguments.length <= t ? void 0 : arguments[t];
    n && Object.keys(n).forEach((o) => {
      const r = n[o];
      r !== void 0 && (e[o] = r);
    });
  }
  return e;
}
const Wb = 10;
function HZ(e, t) {
  const n = {
    current: e.current,
    pageSize: e.pageSize
  };
  return Object.keys(t && typeof t == "object" ? t : {}).forEach((r) => {
    const i = e[r];
    typeof i != "function" && (n[r] = i);
  }), n;
}
function VZ(e, t, n) {
  const o = E(() => t.value && typeof t.value == "object" ? t.value : {}), r = E(() => o.value.total || 0), [i, a] = $n(() => ({
    current: "defaultCurrent" in o.value ? o.value.defaultCurrent : 1,
    pageSize: "defaultPageSize" in o.value ? o.value.defaultPageSize : Wb
  })), l = E(() => {
    const c = LZ(i.value, o.value, {
      total: r.value > 0 ? r.value : e.value
    }), d = Math.ceil((r.value || e.value) / c.pageSize);
    return c.current > d && (c.current = d || 1), c;
  }), s = (c, d) => {
    t.value !== !1 && a({
      current: c ?? 1,
      pageSize: d || l.value.pageSize
    });
  }, u = (c, d) => {
    var f, p;
    t.value && ((p = (f = o.value).onChange) === null || p === void 0 || p.call(f, c, d)), s(c, d), n(c, d || l.value.pageSize);
  };
  return [E(() => t.value === !1 ? {} : O(O({}, l.value), {
    onChange: u
  })), s];
}
function jZ(e, t, n) {
  const o = $e({});
  ke([e, t, n], () => {
    const i = /* @__PURE__ */ new Map(), a = n.value, l = t.value;
    function s(u) {
      u.forEach((c, d) => {
        const f = a(c, d);
        i.set(f, c), c && typeof c == "object" && l in c && s(c[l] || []);
      });
    }
    s(e.value), o.value = {
      kvMap: i
    };
  }, {
    deep: !0,
    immediate: !0
  });
  function r(i) {
    return o.value.kvMap.get(i);
  }
  return [r];
}
const vi = {}, Kb = "SELECT_ALL", qb = "SELECT_INVERT", Yb = "SELECT_NONE", WZ = [];
function j2(e, t) {
  let n = [];
  return (t || []).forEach((o) => {
    n.push(o), o && typeof o == "object" && e in o && (n = [...n, ...j2(e, o[e])]);
  }), n;
}
function KZ(e, t) {
  const n = E(() => {
    const M = e.value || {}, {
      checkStrictly: N = !0
    } = M;
    return O(O({}, M), {
      checkStrictly: N
    });
  }), [o, r] = lr(n.value.selectedRowKeys || n.value.defaultSelectedRowKeys || WZ, {
    value: E(() => n.value.selectedRowKeys)
  }), i = $e(/* @__PURE__ */ new Map()), a = (M) => {
    if (n.value.preserveSelectedRowKeys) {
      const N = /* @__PURE__ */ new Map();
      M.forEach((A) => {
        let H = t.getRecordByKey(A);
        !H && i.value.has(A) && (H = i.value.get(A)), N.set(A, H);
      }), i.value = N;
    }
  };
  It(() => {
    a(o.value);
  });
  const l = E(() => n.value.checkStrictly ? null : cx(t.data.value, {
    externalGetKey: t.getRowKey.value,
    childrenPropName: t.childrenColumnName.value
  }).keyEntities), s = E(() => j2(t.childrenColumnName.value, t.pageData.value)), u = E(() => {
    const M = /* @__PURE__ */ new Map(), N = t.getRowKey.value, A = n.value.getCheckboxProps;
    return s.value.forEach((H, B) => {
      const F = N(H, B), R = (A ? A(H) : null) || {};
      M.set(F, R), process.env.NODE_ENV !== "production" && ("checked" in R || "defaultChecked" in R) && dn(!1, "Table", "Do not set `checked` or `defaultChecked` in `getCheckboxProps`. Please use `selectedRowKeys` instead.");
    }), M;
  }), {
    maxLevel: c,
    levelEntities: d
  } = cM(l), f = (M) => {
    var N;
    return !!(!((N = u.value.get(t.getRowKey.value(M))) === null || N === void 0) && N.disabled);
  }, p = E(() => {
    if (n.value.checkStrictly)
      return [o.value || [], []];
    const {
      checkedKeys: M,
      halfCheckedKeys: N
    } = Du(o.value, !0, l.value, c.value, d.value, f);
    return [M || [], N];
  }), v = E(() => p.value[0]), g = E(() => p.value[1]), m = E(() => {
    const M = n.value.type === "radio" ? v.value.slice(0, 1) : v.value;
    return new Set(M);
  }), x = E(() => n.value.type === "radio" ? /* @__PURE__ */ new Set() : new Set(g.value)), [S, C] = $n(null), P = (M) => {
    let N, A;
    a(M);
    const {
      preserveSelectedRowKeys: H,
      onChange: B
    } = n.value, {
      getRecordByKey: F
    } = t;
    H ? (N = M, A = M.map((R) => i.value.get(R))) : (N = [], A = [], M.forEach((R) => {
      const X = F(R);
      X !== void 0 && (N.push(R), A.push(X));
    })), r(N), B?.(N, A);
  }, $ = (M, N, A, H) => {
    const {
      onSelect: B
    } = n.value, {
      getRecordByKey: F
    } = t || {};
    if (B) {
      const R = A.map((X) => F(X));
      B(F(M), N, R, H);
    }
    P(A);
  }, I = E(() => {
    const {
      onSelectInvert: M,
      onSelectNone: N,
      selections: A,
      hideSelectAll: H
    } = n.value, {
      data: B,
      pageData: F,
      getRowKey: R,
      locale: X
    } = t;
    return !A || H ? null : (A === !0 ? [Kb, qb, Yb] : A).map((ee) => ee === Kb ? {
      key: "all",
      text: X.value.selectionAll,
      onSelect() {
        P(B.value.map((W, K) => R.value(W, K)).filter((W) => {
          const K = u.value.get(W);
          return !K?.disabled || m.value.has(W);
        }));
      }
    } : ee === qb ? {
      key: "invert",
      text: X.value.selectInvert,
      onSelect() {
        const W = new Set(m.value);
        F.value.forEach((q, G) => {
          const ae = R.value(q, G), le = u.value.get(ae);
          le?.disabled || (W.has(ae) ? W.delete(ae) : W.add(ae));
        });
        const K = Array.from(W);
        M && (dn(!1, "Table", "`onSelectInvert` will be removed in future. Please use `onChange` instead."), M(K)), P(K);
      }
    } : ee === Yb ? {
      key: "none",
      text: X.value.selectNone,
      onSelect() {
        N?.(), P(Array.from(m.value).filter((W) => {
          const K = u.value.get(W);
          return K?.disabled;
        }));
      }
    } : ee);
  }), w = E(() => s.value.length);
  return [(M) => {
    var N;
    const {
      onSelectAll: A,
      onSelectMultiple: H,
      columnWidth: B,
      type: F,
      fixed: R,
      renderCell: X,
      hideSelectAll: j,
      checkStrictly: ee
    } = n.value, {
      prefixCls: W,
      getRecordByKey: K,
      getRowKey: q,
      expandType: G,
      getPopupContainer: ae
    } = t;
    if (!e.value)
      return process.env.NODE_ENV !== "production" && dn(!M.includes(vi), "Table", "`rowSelection` is not config but `SELECTION_COLUMN` exists in the `columns`."), M.filter((De) => De !== vi);
    let le = M.slice();
    const ie = new Set(m.value), re = s.value.map(q.value).filter((De) => !u.value.get(De).disabled), te = re.every((De) => ie.has(De)), ve = re.some((De) => ie.has(De)), ue = () => {
      const De = [];
      te ? re.forEach((Ve) => {
        ie.delete(Ve), De.push(Ve);
      }) : re.forEach((Ve) => {
        ie.has(Ve) || (ie.add(Ve), De.push(Ve));
      });
      const Fe = Array.from(ie);
      A?.(!te, Fe.map((Ve) => K(Ve)), De.map((Ve) => K(Ve))), P(Fe);
    };
    let pe;
    if (F !== "radio") {
      let De;
      if (I.value) {
        const Pe = h(fo, {
          getPopupContainer: ae.value
        }, {
          default: () => [I.value.map((Ge, Se) => {
            const {
              key: Ce,
              text: Ae,
              onSelect: qe
            } = Ge;
            return h(fo.Item, {
              key: Ce || Se,
              onClick: () => {
                qe?.(re);
              }
            }, {
              default: () => [Ae]
            });
          })]
        });
        De = h("div", {
          class: `${W.value}-selection-extra`
        }, [h(Mr, {
          overlay: Pe,
          getPopupContainer: ae.value
        }, {
          default: () => [h("span", null, [h(Nd, null, null)])]
        })]);
      }
      const Fe = s.value.map((Pe, Ge) => {
        const Se = q.value(Pe, Ge), Ce = u.value.get(Se) || {};
        return O({
          checked: ie.has(Se)
        }, Ce);
      }).filter((Pe) => {
        let {
          disabled: Ge
        } = Pe;
        return Ge;
      }), Ve = !!Fe.length && Fe.length === w.value, nt = Ve && Fe.every((Pe) => {
        let {
          checked: Ge
        } = Pe;
        return Ge;
      }), je = Ve && Fe.some((Pe) => {
        let {
          checked: Ge
        } = Pe;
        return Ge;
      });
      pe = !j && h("div", {
        class: `${W.value}-selection`
      }, [h(Eo, {
        checked: Ve ? nt : !!w.value && te,
        indeterminate: Ve ? !nt && je : !te && ve,
        onChange: ue,
        disabled: w.value === 0 || Ve,
        "aria-label": De ? "Custom selection" : "Select all",
        skipGroup: !0
      }, null), De]);
    }
    let ge;
    F === "radio" ? ge = (De) => {
      let {
        record: Fe,
        index: Ve
      } = De;
      const nt = q.value(Fe, Ve), je = ie.has(nt);
      return {
        node: h(_o, Q(Q({}, u.value.get(nt)), {}, {
          checked: je,
          onClick: (Pe) => Pe.stopPropagation(),
          onChange: (Pe) => {
            ie.has(nt) || $(nt, !0, [nt], Pe.nativeEvent);
          }
        }), null),
        checked: je
      };
    } : ge = (De) => {
      let {
        record: Fe,
        index: Ve
      } = De;
      var nt;
      const je = q.value(Fe, Ve), Pe = ie.has(je), Ge = x.value.has(je), Se = u.value.get(je);
      let Ce;
      return G.value === "nest" ? (Ce = Ge, dn(typeof Se?.indeterminate != "boolean", "Table", "set `indeterminate` using `rowSelection.getCheckboxProps` is not allowed with tree structured dataSource.")) : Ce = (nt = Se?.indeterminate) !== null && nt !== void 0 ? nt : Ge, {
        node: h(Eo, Q(Q({}, Se), {}, {
          indeterminate: Ce,
          checked: Pe,
          skipGroup: !0,
          onClick: (Ae) => Ae.stopPropagation(),
          onChange: (Ae) => {
            let {
              nativeEvent: qe
            } = Ae;
            const {
              shiftKey: We
            } = qe;
            let tt = -1, Ee = -1;
            if (We && ee) {
              const Re = /* @__PURE__ */ new Set([S.value, je]);
              re.some((Be, ot) => {
                if (Re.has(Be))
                  if (tt === -1)
                    tt = ot;
                  else
                    return Ee = ot, !0;
                return !1;
              });
            }
            if (Ee !== -1 && tt !== Ee && ee) {
              const Re = re.slice(tt, Ee + 1), Be = [];
              Pe ? Re.forEach((pt) => {
                ie.has(pt) && (Be.push(pt), ie.delete(pt));
              }) : Re.forEach((pt) => {
                ie.has(pt) || (Be.push(pt), ie.add(pt));
              });
              const ot = Array.from(ie);
              H?.(!Pe, ot.map((pt) => K(pt)), Be.map((pt) => K(pt))), P(ot);
            } else {
              const Re = v.value;
              if (ee) {
                const Be = Pe ? Wi(Re, je) : wa(Re, je);
                $(je, !Pe, Be, qe);
              } else {
                const Be = Du([...Re, je], !0, l.value, c.value, d.value, f), {
                  checkedKeys: ot,
                  halfCheckedKeys: pt
                } = Be;
                let at = ot;
                if (Pe) {
                  const dt = new Set(ot);
                  dt.delete(je), at = Du(Array.from(dt), {
                    halfCheckedKeys: pt
                  }, l.value, c.value, d.value, f).checkedKeys;
                }
                $(je, !Pe, at, qe);
              }
            }
            C(je);
          }
        }), null),
        checked: Pe
      };
    };
    const _e = (De) => {
      let {
        record: Fe,
        index: Ve
      } = De;
      const {
        node: nt,
        checked: je
      } = ge({
        record: Fe,
        index: Ve
      });
      return X ? X(je, Fe, Ve, nt) : nt;
    };
    if (!le.includes(vi))
      if (le.findIndex((De) => {
        var Fe;
        return ((Fe = De[Nu]) === null || Fe === void 0 ? void 0 : Fe.columnType) === "EXPAND_COLUMN";
      }) === 0) {
        const [De, ...Fe] = le;
        le = [De, vi, ...Fe];
      } else
        le = [vi, ...le];
    const ze = le.indexOf(vi);
    process.env.NODE_ENV !== "production" && le.filter((De) => De === vi).length > 1 && dn(!1, "Table", "Multiple `SELECTION_COLUMN` exist in `columns`."), le = le.filter((De, Fe) => De !== vi || Fe === ze);
    const Ke = le[ze - 1], He = le[ze + 1];
    let Ne = R;
    Ne === void 0 && (He?.fixed !== void 0 ? Ne = He.fixed : Ke?.fixed !== void 0 && (Ne = Ke.fixed)), Ne && Ke && ((N = Ke[Nu]) === null || N === void 0 ? void 0 : N.columnType) === "EXPAND_COLUMN" && Ke.fixed === void 0 && (Ke.fixed = Ne);
    const Xe = {
      fixed: Ne,
      width: B,
      className: `${W.value}-selection-column`,
      title: n.value.columnTitle || pe,
      customRender: _e,
      [Nu]: {
        class: `${W.value}-selection-col`
      }
    };
    return le.map((De) => De === vi ? Xe : De);
  }, m];
}
var qZ = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z" } }] }, name: "caret-down", theme: "outlined" };
function $$(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      YZ(e, r, n[r]);
    });
  }
  return e;
}
function YZ(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Nx = function(t, n) {
  var o = $$({}, t, n.attrs);
  return h(on, $$({}, o, {
    icon: qZ
  }), null);
};
Nx.displayName = "CaretDownOutlined";
Nx.inheritAttrs = !1;
var GZ = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z" } }] }, name: "caret-up", theme: "outlined" };
function P$(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      UZ(e, r, n[r]);
    });
  }
  return e;
}
function UZ(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Rx = function(t, n) {
  var o = P$({}, t, n.attrs);
  return h(on, P$({}, o, {
    icon: GZ
  }), null);
};
Rx.displayName = "CaretUpOutlined";
Rx.inheritAttrs = !1;
var XZ = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
function As(e, t) {
  return "key" in e && e.key !== void 0 && e.key !== null ? e.key : e.dataIndex ? Array.isArray(e.dataIndex) ? e.dataIndex.join(".") : e.dataIndex : t;
}
function Yd(e, t) {
  return t ? `${t}-${e}` : `${e}`;
}
function zx(e, t) {
  return typeof e == "function" ? e(t) : e;
}
function W2() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  const t = go(e), n = [];
  return t.forEach((o) => {
    var r, i, a, l;
    if (!o)
      return;
    const s = o.key, u = ((r = o.props) === null || r === void 0 ? void 0 : r.style) || {}, c = ((i = o.props) === null || i === void 0 ? void 0 : i.class) || "", d = o.props || {};
    for (const [m, x] of Object.entries(d))
      d[Td(m)] = x;
    const f = o.children || {}, {
      default: p
    } = f, v = XZ(f, ["default"]), g = O(O(O({}, v), d), {
      style: u,
      class: c
    });
    if (s && (g.key = s), !((a = o.type) === null || a === void 0) && a.__ANT_TABLE_COLUMN_GROUP)
      g.children = W2(typeof p == "function" ? p() : p);
    else {
      const m = (l = o.children) === null || l === void 0 ? void 0 : l.default;
      g.customRender = g.customRender || m;
    }
    n.push(g);
  }), n;
}
const gp = "ascend", Lv = "descend";
function Zp(e) {
  return typeof e.sorter == "object" && typeof e.sorter.multiple == "number" ? e.sorter.multiple : !1;
}
function O$(e) {
  return typeof e == "function" ? e : e && typeof e == "object" && e.compare ? e.compare : !1;
}
function QZ(e, t) {
  return t ? e[e.indexOf(t) + 1] : e[0];
}
function Gb(e, t, n) {
  let o = [];
  function r(i, a) {
    o.push({
      column: i,
      key: As(i, a),
      multiplePriority: Zp(i),
      sortOrder: i.sortOrder
    });
  }
  return (e || []).forEach((i, a) => {
    const l = Yd(a, n);
    i.children ? ("sortOrder" in i && r(i, l), o = [...o, ...Gb(i.children, t, l)]) : i.sorter && ("sortOrder" in i ? r(i, l) : t && i.defaultSortOrder && o.push({
      column: i,
      key: As(i, l),
      multiplePriority: Zp(i),
      sortOrder: i.defaultSortOrder
    }));
  }), o;
}
function K2(e, t, n, o, r, i, a, l) {
  return (t || []).map((s, u) => {
    const c = Yd(u, l);
    let d = s;
    if (d.sorter) {
      const f = d.sortDirections || r, p = d.showSorterTooltip === void 0 ? a : d.showSorterTooltip, v = As(d, c), g = n.find((M) => {
        let {
          key: N
        } = M;
        return N === v;
      }), m = g ? g.sortOrder : null, x = QZ(f, m), S = f.includes(gp) && h(Rx, {
        class: Me(`${e}-column-sorter-up`, {
          active: m === gp
        }),
        role: "presentation"
      }, null), C = f.includes(Lv) && h(Nx, {
        role: "presentation",
        class: Me(`${e}-column-sorter-down`, {
          active: m === Lv
        })
      }, null), {
        cancelSort: P,
        triggerAsc: $,
        triggerDesc: I
      } = i || {};
      let w = P;
      x === Lv ? w = I : x === gp && (w = $);
      const _ = typeof p == "object" ? p : {
        title: w
      };
      d = O(O({}, d), {
        className: Me(d.className, {
          [`${e}-column-sort`]: m
        }),
        title: (M) => {
          const N = h("div", {
            class: `${e}-column-sorters`
          }, [h("span", {
            class: `${e}-column-title`
          }, [zx(s.title, M)]), h("span", {
            class: Me(`${e}-column-sorter`, {
              [`${e}-column-sorter-full`]: !!(S && C)
            })
          }, [h("span", {
            class: `${e}-column-sorter-inner`
          }, [S, C])])]);
          return p ? h(Lo, _, {
            default: () => [N]
          }) : N;
        },
        customHeaderCell: (M) => {
          const N = s.customHeaderCell && s.customHeaderCell(M) || {}, A = N.onClick, H = N.onKeydown;
          return N.onClick = (B) => {
            o({
              column: s,
              key: v,
              sortOrder: x,
              multiplePriority: Zp(s)
            }), A && A(B);
          }, N.onKeydown = (B) => {
            B.keyCode === it.ENTER && (o({
              column: s,
              key: v,
              sortOrder: x,
              multiplePriority: Zp(s)
            }), H?.(B));
          }, m && (N["aria-sort"] = m === "ascend" ? "ascending" : "descending"), N.class = Me(N.class, `${e}-column-has-sorters`), N.tabindex = 0, N;
        }
      });
    }
    return "children" in d && (d = O(O({}, d), {
      children: K2(e, d.children, n, o, r, i, a, c)
    })), d;
  });
}
function k$(e) {
  const {
    column: t,
    sortOrder: n
  } = e;
  return {
    column: t,
    order: n,
    field: t.dataIndex,
    columnKey: t.key
  };
}
function I$(e) {
  const t = e.filter((n) => {
    let {
      sortOrder: o
    } = n;
    return o;
  }).map(k$);
  return t.length === 0 && e.length ? O(O({}, k$(e[e.length - 1])), {
    column: void 0
  }) : t.length <= 1 ? t[0] || {} : t;
}
function Ub(e, t, n) {
  const o = t.slice().sort((a, l) => l.multiplePriority - a.multiplePriority), r = e.slice(), i = o.filter((a) => {
    let {
      column: {
        sorter: l
      },
      sortOrder: s
    } = a;
    return O$(l) && s;
  });
  return i.length ? r.sort((a, l) => {
    for (let s = 0; s < i.length; s += 1) {
      const u = i[s], {
        column: {
          sorter: c
        },
        sortOrder: d
      } = u, f = O$(c);
      if (f && d) {
        const p = f(a, l, d);
        if (p !== 0)
          return d === gp ? p : -p;
      }
    }
    return 0;
  }).map((a) => {
    const l = a[n];
    return l ? O(O({}, a), {
      [n]: Ub(l, t, n)
    }) : a;
  }) : r;
}
function ZZ(e) {
  let {
    prefixCls: t,
    mergedColumns: n,
    onSorterChange: o,
    sortDirections: r,
    tableLocale: i,
    showSorterTooltip: a
  } = e;
  const [l, s] = $n(Gb(n.value, !0)), u = E(() => {
    let v = !0;
    const g = Gb(n.value, !1);
    if (!g.length)
      return l.value;
    const m = [];
    function x(C) {
      v ? m.push(C) : m.push(O(O({}, C), {
        sortOrder: null
      }));
    }
    let S = null;
    return g.forEach((C) => {
      S === null ? (x(C), C.sortOrder && (C.multiplePriority === !1 ? v = !1 : S = !0)) : (S && C.multiplePriority !== !1 || (v = !1), x(C));
    }), m;
  }), c = E(() => {
    const v = u.value.map((g) => {
      let {
        column: m,
        sortOrder: x
      } = g;
      return {
        column: m,
        order: x
      };
    });
    return {
      sortColumns: v,
      // Legacy
      sortColumn: v[0] && v[0].column,
      sortOrder: v[0] && v[0].order
    };
  });
  function d(v) {
    let g;
    v.multiplePriority === !1 || !u.value.length || u.value[0].multiplePriority === !1 ? g = [v] : g = [...u.value.filter((m) => {
      let {
        key: x
      } = m;
      return x !== v.key;
    }), v], s(g), o(I$(g), g);
  }
  const f = (v) => K2(t.value, v, u.value, d, r.value, i.value, a.value), p = E(() => I$(u.value));
  return [f, u, c, p];
}
var JZ = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z" } }] }, name: "filter", theme: "filled" };
function _$(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      eJ(e, r, n[r]);
    });
  }
  return e;
}
function eJ(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Fx = function(t, n) {
  var o = _$({}, t, n.attrs);
  return h(on, _$({}, o, {
    icon: JZ
  }), null);
};
Fx.displayName = "FilterFilled";
Fx.inheritAttrs = !1;
const tJ = (e) => {
  const {
    keyCode: t
  } = e;
  t === it.ENTER && e.stopPropagation();
}, nJ = (e, t) => {
  let {
    slots: n
  } = t;
  var o;
  return h("div", {
    onClick: (r) => r.stopPropagation(),
    onKeydown: tJ
  }, [(o = n.default) === null || o === void 0 ? void 0 : o.call(n)]);
}, T$ = be({
  compatConfig: {
    MODE: 3
  },
  name: "FilterSearch",
  inheritAttrs: !1,
  props: {
    value: an(),
    onChange: et(),
    filterSearch: en([Boolean, Function]),
    tablePrefixCls: an(),
    locale: Et()
  },
  setup(e) {
    return () => {
      const {
        value: t,
        onChange: n,
        filterSearch: o,
        tablePrefixCls: r,
        locale: i
      } = e;
      return o ? h("div", {
        class: `${r}-filter-dropdown-search`
      }, [h(kt, {
        placeholder: i.filterSearchPlaceholder,
        onChange: n,
        value: t,
        htmlSize: 1,
        class: `${r}-filter-dropdown-search-input`
      }, {
        prefix: () => h(Rd, null, null)
      })]) : null;
    };
  }
});
var M$ = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const oJ = be({
  compatConfig: {
    MODE: 3
  },
  name: "MotionTreeNode",
  inheritAttrs: !1,
  props: O(O({}, aM), {
    active: Boolean,
    motion: Object,
    motionNodes: {
      type: Array
    },
    onMotionStart: Function,
    onMotionEnd: Function,
    motionType: String
  }),
  setup(e, t) {
    let {
      attrs: n,
      slots: o
    } = t;
    const r = $e(!0), i = sx(), a = $e(!1), l = E(() => e.motion ? e.motion : Wh()), s = (u, c) => {
      var d, f, p, v;
      c === "appear" ? (f = (d = l.value) === null || d === void 0 ? void 0 : d.onAfterEnter) === null || f === void 0 || f.call(d, u) : c === "leave" && ((v = (p = l.value) === null || p === void 0 ? void 0 : p.onAfterLeave) === null || v === void 0 || v.call(p, u)), a.value || e.onMotionEnd(), a.value = !0;
    };
    return ke(() => e.motionNodes, () => {
      e.motionNodes && e.motionType === "hide" && r.value && Yt(() => {
        r.value = !1;
      });
    }, {
      immediate: !0,
      flush: "post"
    }), Nt(() => {
      e.motionNodes && e.onMotionStart();
    }), qt(() => {
      e.motionNodes && s();
    }), () => {
      const {
        motion: u,
        motionNodes: c,
        motionType: d,
        active: f,
        eventKey: p
      } = e, v = M$(e, ["motion", "motionNodes", "motionType", "active", "eventKey"]);
      return c ? h(Er, Q(Q({}, l.value), {}, {
        appear: d === "show",
        onAfterAppear: (g) => s(g, "appear"),
        onAfterLeave: (g) => s(g, "leave")
      }), {
        default: () => [ti(h("div", {
          class: `${i.value.prefixCls}-treenode-motion`
        }, [c.map((g) => {
          const m = M$(g.data, []), {
            title: x,
            key: S,
            isStart: C,
            isEnd: P
          } = g;
          return delete m.children, h(yb, Q(Q({}, m), {}, {
            title: x,
            active: f,
            data: g.data,
            key: S,
            eventKey: S,
            isStart: C,
            isEnd: P
          }), o);
        })]), [[Oi, r.value]])]
      }) : h(yb, Q(Q({
        class: n.class,
        style: n.style
      }, v), {}, {
        active: f,
        eventKey: p
      }), o);
    };
  }
});
function rJ() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
  const n = e.length, o = t.length;
  if (Math.abs(n - o) !== 1)
    return {
      add: !1,
      key: null
    };
  function r(i, a) {
    const l = /* @__PURE__ */ new Map();
    i.forEach((u) => {
      l.set(u, !0);
    });
    const s = a.filter((u) => !l.has(u));
    return s.length === 1 ? s[0] : null;
  }
  return n < o ? {
    add: !0,
    key: r(e, t)
  } : {
    add: !1,
    key: r(t, e)
  };
}
function E$(e, t, n) {
  const o = e.findIndex((a) => a.key === n), r = e[o + 1], i = t.findIndex((a) => a.key === n);
  if (r) {
    const a = t.findIndex((l) => l.key === r.key);
    return t.slice(i + 1, a);
  }
  return t.slice(i + 1);
}
var D$ = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const A$ = {
  width: 0,
  height: 0,
  display: "flex",
  overflow: "hidden",
  opacity: 0,
  border: 0,
  padding: 0,
  margin: 0
}, iJ = () => {
}, Ns = `RC_TREE_MOTION_${Math.random()}`, Xb = {
  key: Ns
}, q2 = {
  key: Ns,
  level: 0,
  index: 0,
  pos: "0",
  node: Xb,
  nodes: [Xb]
}, N$ = {
  parent: null,
  children: [],
  pos: q2.pos,
  data: Xb,
  title: null,
  key: Ns,
  /** Hold empty list here since we do not use it */
  isStart: [],
  isEnd: []
};
function R$(e, t, n, o) {
  return t === !1 || !n ? e : e.slice(0, Math.ceil(n / o) + 1);
}
function z$(e) {
  const {
    key: t,
    pos: n
  } = e;
  return Wd(t, n);
}
function aJ(e) {
  let t = String(e.key), n = e;
  for (; n.parent; )
    n = n.parent, t = `${n.key} > ${t}`;
  return t;
}
const lJ = be({
  compatConfig: {
    MODE: 3
  },
  name: "NodeList",
  inheritAttrs: !1,
  props: qK,
  setup(e, t) {
    let {
      expose: n,
      attrs: o
    } = t;
    const r = ce(), i = ce(), {
      expandedKeys: a,
      flattenNodes: l
    } = iM();
    n({
      scrollTo: (g) => {
        r.value.scrollTo(g);
      },
      getIndentWidth: () => i.value.offsetWidth
    });
    const s = $e(l.value), u = $e([]), c = ce(null);
    function d() {
      s.value = l.value, u.value = [], c.value = null, e.onListChangeEnd();
    }
    const f = sx();
    ke([() => a.value.slice(), l], (g, m) => {
      let [x, S] = g, [C, P] = m;
      const $ = rJ(C, x);
      if ($.key !== null) {
        const {
          virtual: I,
          height: w,
          itemHeight: _
        } = e;
        if ($.add) {
          const M = P.findIndex((H) => {
            let {
              key: B
            } = H;
            return B === $.key;
          }), N = R$(E$(P, S, $.key), I, w, _), A = P.slice();
          A.splice(M + 1, 0, N$), s.value = A, u.value = N, c.value = "show";
        } else {
          const M = S.findIndex((H) => {
            let {
              key: B
            } = H;
            return B === $.key;
          }), N = R$(E$(S, P, $.key), I, w, _), A = S.slice();
          A.splice(M + 1, 0, N$), s.value = A, u.value = N, c.value = "hide";
        }
      } else P !== S && (s.value = S);
    }), ke(() => f.value.dragging, (g) => {
      g || d();
    });
    const p = E(() => e.motion === void 0 ? s.value : l.value), v = () => {
      e.onActiveChange(null);
    };
    return () => {
      const g = O(O({}, e), o), {
        prefixCls: m,
        selectable: x,
        checkable: S,
        disabled: C,
        motion: P,
        height: $,
        itemHeight: I,
        virtual: w,
        focusable: _,
        activeItem: M,
        focused: N,
        tabindex: A,
        onKeydown: H,
        onFocus: B,
        onBlur: F,
        onListChangeStart: R,
        onListChangeEnd: X
      } = g, j = D$(g, ["prefixCls", "selectable", "checkable", "disabled", "motion", "height", "itemHeight", "virtual", "focusable", "activeItem", "focused", "tabindex", "onKeydown", "onFocus", "onBlur", "onListChangeStart", "onListChangeEnd"]);
      return h(Je, null, [N && M && h("span", {
        style: A$,
        "aria-live": "assertive"
      }, [aJ(M)]), h("div", null, [h("input", {
        style: A$,
        disabled: _ === !1 || C,
        tabindex: _ !== !1 ? A : null,
        onKeydown: H,
        onFocus: B,
        onBlur: F,
        value: "",
        onChange: iJ,
        "aria-label": "for screen reader"
      }, null)]), h("div", {
        class: `${m}-treenode`,
        "aria-hidden": !0,
        style: {
          position: "absolute",
          pointerEvents: "none",
          visibility: "hidden",
          height: 0,
          overflow: "hidden"
        }
      }, [h("div", {
        class: `${m}-indent`
      }, [h("div", {
        ref: i,
        class: `${m}-indent-unit`
      }, null)])]), h(w_, Q(Q({}, Fn(j, ["onActiveChange"])), {}, {
        data: p.value,
        itemKey: z$,
        height: $,
        fullHeight: !1,
        virtual: w,
        itemHeight: I,
        prefixCls: `${m}-list`,
        ref: r,
        onVisibleChange: (ee, W) => {
          const K = new Set(ee);
          W.filter((G) => !K.has(G)).some((G) => z$(G) === Ns) && d();
        }
      }), {
        default: (ee) => {
          const {
            pos: W
          } = ee, K = D$(ee.data, []), {
            title: q,
            key: G,
            isStart: ae,
            isEnd: le
          } = ee, ie = Wd(G, W);
          return delete K.key, delete K.children, h(oJ, Q(Q({}, K), {}, {
            eventKey: ie,
            title: q,
            active: !!M && G === M.key,
            data: ee.data,
            isStart: ae,
            isEnd: le,
            motion: P,
            motionNodes: G === Ns ? u.value : null,
            motionType: c.value,
            onMotionStart: R,
            onMotionEnd: d,
            onMousemove: v
          }), null);
        }
      })]);
    };
  }
});
function sJ(e) {
  let {
    dropPosition: t,
    dropLevelOffset: n,
    indent: o
  } = e;
  const r = {
    pointerEvents: "none",
    position: "absolute",
    right: 0,
    backgroundColor: "red",
    height: "2px"
  };
  switch (t) {
    case -1:
      r.top = 0, r.left = `${-n * o}px`;
      break;
    case 1:
      r.bottom = 0, r.left = `${-n * o}px`;
      break;
    case 0:
      r.bottom = 0, r.left = `${o}`;
      break;
  }
  return h("div", {
    style: r
  }, null);
}
const uJ = 10, cJ = be({
  compatConfig: {
    MODE: 3
  },
  name: "Tree",
  inheritAttrs: !1,
  props: kn(lM(), {
    prefixCls: "vc-tree",
    showLine: !1,
    showIcon: !0,
    selectable: !0,
    multiple: !1,
    checkable: !1,
    disabled: !1,
    checkStrictly: !1,
    draggable: !1,
    expandAction: !1,
    defaultExpandParent: !0,
    autoExpandParent: !1,
    defaultExpandAll: !1,
    defaultExpandedKeys: [],
    defaultCheckedKeys: [],
    defaultSelectedKeys: [],
    dropIndicatorRender: sJ,
    allowDrop: () => !0
  }),
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      expose: r
    } = t;
    const i = $e(!1);
    let a = {};
    const l = $e(), s = $e([]), u = $e([]), c = $e([]), d = $e([]), f = $e([]), p = $e([]), v = {}, g = Pn({
      draggingNodeKey: null,
      dragChildrenKeys: [],
      // dropTargetKey is the key of abstract-drop-node
      // the abstract-drop-node is the real drop node when drag and drop
      // not the DOM drag over node
      dropTargetKey: null,
      dropPosition: null,
      dropContainerKey: null,
      dropLevelOffset: null,
      dropTargetPos: null,
      dropAllowed: !0,
      // the abstract-drag-over-node
      // if mouse is on the bottom of top dom node or no the top of the bottom dom node
      // abstract-drag-over-node is the top node
      dragOverNodeKey: null
    }), m = $e([]);
    ke([() => e.treeData, () => e.children], () => {
      m.value = e.treeData !== void 0 ? e.treeData.slice() : wb(dr(e.children));
    }, {
      immediate: !0,
      deep: !0
    });
    const x = $e({}), S = $e(!1), C = $e(null), P = $e(!1), $ = E(() => Jh(e.fieldNames)), I = $e();
    let w = null, _ = null, M = null;
    const N = E(() => ({
      expandedKeysSet: A.value,
      selectedKeysSet: H.value,
      loadedKeysSet: B.value,
      loadingKeysSet: F.value,
      checkedKeysSet: R.value,
      halfCheckedKeysSet: X.value,
      dragOverNodeKey: g.dragOverNodeKey,
      dropPosition: g.dropPosition,
      keyEntities: x.value
    })), A = E(() => new Set(p.value)), H = E(() => new Set(s.value)), B = E(() => new Set(d.value)), F = E(() => new Set(f.value)), R = E(() => new Set(u.value)), X = E(() => new Set(c.value));
    It(() => {
      if (m.value) {
        const Ee = cx(m.value, {
          fieldNames: $.value
        });
        x.value = O({
          [Ns]: q2
        }, Ee.keyEntities);
      }
    });
    let j = !1;
    ke(
      [() => e.expandedKeys, () => e.autoExpandParent, x],
      // eslint-disable-next-line @typescript-eslint/no-unused-vars
      (Ee, Re) => {
        let [Be, ot] = Ee, [pt, at] = Re, dt = p.value;
        if (e.expandedKeys !== void 0 || j && ot !== at)
          dt = e.autoExpandParent || !j && e.defaultExpandParent ? xb(e.expandedKeys, x.value) : e.expandedKeys;
        else if (!j && e.defaultExpandAll) {
          const wt = O({}, x.value);
          delete wt[Ns], dt = Object.keys(wt).map((Ct) => wt[Ct].key);
        } else !j && e.defaultExpandedKeys && (dt = e.autoExpandParent || e.defaultExpandParent ? xb(e.defaultExpandedKeys, x.value) : e.defaultExpandedKeys);
        dt && (p.value = dt), j = !0;
      },
      {
        immediate: !0
      }
    );
    const ee = $e([]);
    It(() => {
      ee.value = eq(m.value, p.value, $.value);
    }), It(() => {
      e.selectable && (e.selectedKeys !== void 0 ? s.value = bC(e.selectedKeys, e) : !j && e.defaultSelectedKeys && (s.value = bC(e.defaultSelectedKeys, e)));
    });
    const {
      maxLevel: W,
      levelEntities: K
    } = cM(x);
    It(() => {
      if (e.checkable) {
        let Ee;
        if (e.checkedKeys !== void 0 ? Ee = bv(e.checkedKeys) || {} : !j && e.defaultCheckedKeys ? Ee = bv(e.defaultCheckedKeys) || {} : m.value && (Ee = bv(e.checkedKeys) || {
          checkedKeys: u.value,
          halfCheckedKeys: c.value
        }), Ee) {
          let {
            checkedKeys: Re = [],
            halfCheckedKeys: Be = []
          } = Ee;
          e.checkStrictly || ({
            checkedKeys: Re,
            halfCheckedKeys: Be
          } = Du(Re, !0, x.value, W.value, K.value)), u.value = Re, c.value = Be;
        }
      }
    }), It(() => {
      e.loadedKeys && (d.value = e.loadedKeys);
    });
    const q = () => {
      O(g, {
        dragOverNodeKey: null,
        dropPosition: null,
        dropLevelOffset: null,
        dropTargetKey: null,
        dropContainerKey: null,
        dropTargetPos: null,
        dropAllowed: !1
      });
    }, G = (Ee) => {
      I.value.scrollTo(Ee);
    };
    ke(() => e.activeKey, () => {
      e.activeKey !== void 0 && (C.value = e.activeKey);
    }, {
      immediate: !0
    }), ke(C, (Ee) => {
      Yt(() => {
        Ee !== null && G({
          key: Ee
        });
      });
    }, {
      immediate: !0,
      flush: "post"
    });
    const ae = (Ee) => {
      e.expandedKeys === void 0 && (p.value = Ee);
    }, le = () => {
      g.draggingNodeKey !== null && O(g, {
        draggingNodeKey: null,
        dropPosition: null,
        dropContainerKey: null,
        dropTargetKey: null,
        dropLevelOffset: null,
        dropAllowed: !0,
        dragOverNodeKey: null
      }), w = null, M = null;
    }, ie = (Ee, Re) => {
      const {
        onDragend: Be
      } = e;
      g.dragOverNodeKey = null, le(), Be?.({
        event: Ee,
        node: Re.eventData
      }), _ = null;
    }, re = (Ee) => {
      ie(Ee, null), window.removeEventListener("dragend", re);
    }, te = (Ee, Re) => {
      const {
        onDragstart: Be
      } = e, {
        eventKey: ot,
        eventData: pt
      } = Re;
      _ = Re, w = {
        x: Ee.clientX,
        y: Ee.clientY
      };
      const at = Wi(p.value, ot);
      g.draggingNodeKey = ot, g.dragChildrenKeys = XK(ot, x.value), l.value = I.value.getIndentWidth(), ae(at), window.addEventListener("dragend", re), Be && Be({
        event: Ee,
        node: pt
      });
    }, ve = (Ee, Re) => {
      const {
        onDragenter: Be,
        onExpand: ot,
        allowDrop: pt,
        direction: at
      } = e, {
        pos: dt,
        eventKey: wt
      } = Re;
      if (M !== wt && (M = wt), !_) {
        q();
        return;
      }
      const {
        dropPosition: Ct,
        dropLevelOffset: St,
        dropTargetKey: yt,
        dropContainerKey: Ot,
        dropTargetPos: Wt,
        dropAllowed: Xt,
        dragOverNodeKey: ln
      } = mC(Ee, _, Re, l.value, w, pt, ee.value, x.value, A.value, at);
      if (
        // don't allow drop inside its children
        g.dragChildrenKeys.indexOf(yt) !== -1 || // don't allow drop when drop is not allowed caculated by calcDropPosition
        !Xt
      ) {
        q();
        return;
      }
      if (a || (a = {}), Object.keys(a).forEach((pn) => {
        clearTimeout(a[pn]);
      }), _.eventKey !== Re.eventKey && (a[dt] = window.setTimeout(() => {
        if (g.draggingNodeKey === null) return;
        let pn = p.value.slice();
        const gt = x.value[Re.eventKey];
        gt && (gt.children || []).length && (pn = wa(p.value, Re.eventKey)), ae(pn), ot && ot(pn, {
          node: Re.eventData,
          expanded: !0,
          nativeEvent: Ee
        });
      }, 800)), _.eventKey === yt && St === 0) {
        q();
        return;
      }
      O(g, {
        dragOverNodeKey: ln,
        dropPosition: Ct,
        dropLevelOffset: St,
        dropTargetKey: yt,
        dropContainerKey: Ot,
        dropTargetPos: Wt,
        dropAllowed: Xt
      }), Be && Be({
        event: Ee,
        node: Re.eventData,
        expandedKeys: p.value
      });
    }, ue = (Ee, Re) => {
      const {
        onDragover: Be,
        allowDrop: ot,
        direction: pt
      } = e;
      if (!_)
        return;
      const {
        dropPosition: at,
        dropLevelOffset: dt,
        dropTargetKey: wt,
        dropContainerKey: Ct,
        dropAllowed: St,
        dropTargetPos: yt,
        dragOverNodeKey: Ot
      } = mC(Ee, _, Re, l.value, w, ot, ee.value, x.value, A.value, pt);
      g.dragChildrenKeys.indexOf(wt) !== -1 || !St || (_.eventKey === wt && dt === 0 ? g.dropPosition === null && g.dropLevelOffset === null && g.dropTargetKey === null && g.dropContainerKey === null && g.dropTargetPos === null && g.dropAllowed === !1 && g.dragOverNodeKey === null || q() : at === g.dropPosition && dt === g.dropLevelOffset && wt === g.dropTargetKey && Ct === g.dropContainerKey && yt === g.dropTargetPos && St === g.dropAllowed && Ot === g.dragOverNodeKey || O(g, {
        dropPosition: at,
        dropLevelOffset: dt,
        dropTargetKey: wt,
        dropContainerKey: Ct,
        dropTargetPos: yt,
        dropAllowed: St,
        dragOverNodeKey: Ot
      }), Be && Be({
        event: Ee,
        node: Re.eventData
      }));
    }, pe = (Ee, Re) => {
      M === Re.eventKey && !Ee.currentTarget.contains(Ee.relatedTarget) && (q(), M = null);
      const {
        onDragleave: Be
      } = e;
      Be && Be({
        event: Ee,
        node: Re.eventData
      });
    }, ge = function(Ee, Re) {
      let Be = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
      var ot;
      const {
        dragChildrenKeys: pt,
        dropPosition: at,
        dropTargetKey: dt,
        dropTargetPos: wt,
        dropAllowed: Ct
      } = g;
      if (!Ct) return;
      const {
        onDrop: St
      } = e;
      if (g.dragOverNodeKey = null, le(), dt === null) return;
      const yt = O(O({}, sp(dt, dr(N.value))), {
        active: ((ot = Ae.value) === null || ot === void 0 ? void 0 : ot.key) === dt,
        data: x.value[dt].node
      }), Ot = pt.indexOf(dt) !== -1;
      wn(!Ot, "Can not drop to dragNode's children node. Maybe this is a bug of ant-design-vue. Please report an issue.");
      const Wt = ux(wt), Xt = {
        event: Ee,
        node: up(yt),
        dragNode: _ ? _.eventData : null,
        dragNodesKeys: [_.eventKey].concat(pt),
        dropToGap: at !== 0,
        dropPosition: at + Number(Wt[Wt.length - 1])
      };
      Be || St?.(Xt), _ = null;
    }, _e = (Ee, Re) => {
      const {
        expanded: Be,
        key: ot
      } = Re, pt = ee.value.filter((dt) => dt.key === ot)[0], at = up(O(O({}, sp(ot, N.value)), {
        data: pt.data
      }));
      ae(Be ? Wi(p.value, ot) : wa(p.value, ot)), Pe(Ee, at);
    }, ze = (Ee, Re) => {
      const {
        onClick: Be,
        expandAction: ot
      } = e;
      ot === "click" && _e(Ee, Re), Be && Be(Ee, Re);
    }, Ke = (Ee, Re) => {
      const {
        onDblclick: Be,
        expandAction: ot
      } = e;
      (ot === "doubleclick" || ot === "dblclick") && _e(Ee, Re), Be && Be(Ee, Re);
    }, He = (Ee, Re) => {
      let Be = s.value;
      const {
        onSelect: ot,
        multiple: pt
      } = e, {
        selected: at
      } = Re, dt = Re[$.value.key], wt = !at;
      wt ? pt ? Be = wa(Be, dt) : Be = [dt] : Be = Wi(Be, dt);
      const Ct = x.value, St = Be.map((yt) => {
        const Ot = Ct[yt];
        return Ot ? Ot.node : null;
      }).filter((yt) => yt);
      e.selectedKeys === void 0 && (s.value = Be), ot && ot(Be, {
        event: "select",
        selected: wt,
        node: Re,
        selectedNodes: St,
        nativeEvent: Ee
      });
    }, Ne = (Ee, Re, Be) => {
      const {
        checkStrictly: ot,
        onCheck: pt
      } = e, at = Re[$.value.key];
      let dt;
      const wt = {
        event: "check",
        node: Re,
        checked: Be,
        nativeEvent: Ee
      }, Ct = x.value;
      if (ot) {
        const St = Be ? wa(u.value, at) : Wi(u.value, at), yt = Wi(c.value, at);
        dt = {
          checked: St,
          halfChecked: yt
        }, wt.checkedNodes = St.map((Ot) => Ct[Ot]).filter((Ot) => Ot).map((Ot) => Ot.node), e.checkedKeys === void 0 && (u.value = St);
      } else {
        let {
          checkedKeys: St,
          halfCheckedKeys: yt
        } = Du([...u.value, at], !0, Ct, W.value, K.value);
        if (!Be) {
          const Ot = new Set(St);
          Ot.delete(at), {
            checkedKeys: St,
            halfCheckedKeys: yt
          } = Du(Array.from(Ot), {
            halfCheckedKeys: yt
          }, Ct, W.value, K.value);
        }
        dt = St, wt.checkedNodes = [], wt.checkedNodesPositions = [], wt.halfCheckedKeys = yt, St.forEach((Ot) => {
          const Wt = Ct[Ot];
          if (!Wt) return;
          const {
            node: Xt,
            pos: ln
          } = Wt;
          wt.checkedNodes.push(Xt), wt.checkedNodesPositions.push({
            node: Xt,
            pos: ln
          });
        }), e.checkedKeys === void 0 && (u.value = St, c.value = yt);
      }
      pt && pt(dt, wt);
    }, Xe = (Ee) => {
      const Re = Ee[$.value.key], Be = new Promise((ot, pt) => {
        const {
          loadData: at,
          onLoad: dt
        } = e;
        if (!at || B.value.has(Re) || F.value.has(Re))
          return null;
        at(Ee).then(() => {
          const Ct = wa(d.value, Re), St = Wi(f.value, Re);
          dt && dt(Ct, {
            event: "load",
            node: Ee
          }), e.loadedKeys === void 0 && (d.value = Ct), f.value = St, ot();
        }).catch((Ct) => {
          const St = Wi(f.value, Re);
          if (f.value = St, v[Re] = (v[Re] || 0) + 1, v[Re] >= uJ) {
            wn(!1, "Retry for `loadData` many times but still failed. No more retry.");
            const yt = wa(d.value, Re);
            e.loadedKeys === void 0 && (d.value = yt), ot();
          }
          pt(Ct);
        }), f.value = wa(f.value, Re);
      });
      return Be.catch(() => {
      }), Be;
    }, De = (Ee, Re) => {
      const {
        onMouseenter: Be
      } = e;
      Be && Be({
        event: Ee,
        node: Re
      });
    }, Fe = (Ee, Re) => {
      const {
        onMouseleave: Be
      } = e;
      Be && Be({
        event: Ee,
        node: Re
      });
    }, Ve = (Ee, Re) => {
      const {
        onRightClick: Be
      } = e;
      Be && (Ee.preventDefault(), Be({
        event: Ee,
        node: Re
      }));
    }, nt = (Ee) => {
      const {
        onFocus: Re
      } = e;
      S.value = !0, Re && Re(Ee);
    }, je = (Ee) => {
      const {
        onBlur: Re
      } = e;
      S.value = !1, Ce(null), Re && Re(Ee);
    }, Pe = (Ee, Re) => {
      let Be = p.value;
      const {
        onExpand: ot,
        loadData: pt
      } = e, {
        expanded: at
      } = Re, dt = Re[$.value.key];
      if (P.value)
        return;
      const wt = Be.indexOf(dt), Ct = !at;
      if (wn(at && wt !== -1 || !at && wt === -1, "Expand state not sync with index check"), Ct ? Be = wa(Be, dt) : Be = Wi(Be, dt), ae(Be), ot && ot(Be, {
        node: Re,
        expanded: Ct,
        nativeEvent: Ee
      }), Ct && pt) {
        const St = Xe(Re);
        St && St.then(() => {
        }).catch((yt) => {
          const Ot = Wi(p.value, dt);
          ae(Ot), Promise.reject(yt);
        });
      }
    }, Ge = () => {
      P.value = !0;
    }, Se = () => {
      setTimeout(() => {
        P.value = !1;
      });
    }, Ce = (Ee) => {
      const {
        onActiveChange: Re
      } = e;
      C.value !== Ee && (e.activeKey !== void 0 && (C.value = Ee), Ee !== null && G({
        key: Ee
      }), Re && Re(Ee));
    }, Ae = E(() => C.value === null ? null : ee.value.find((Ee) => {
      let {
        key: Re
      } = Ee;
      return Re === C.value;
    }) || null), qe = (Ee) => {
      let Re = ee.value.findIndex((ot) => {
        let {
          key: pt
        } = ot;
        return pt === C.value;
      });
      Re === -1 && Ee < 0 && (Re = ee.value.length), Re = (Re + Ee + ee.value.length) % ee.value.length;
      const Be = ee.value[Re];
      if (Be) {
        const {
          key: ot
        } = Be;
        Ce(ot);
      } else
        Ce(null);
    }, We = E(() => up(O(O({}, sp(C.value, N.value)), {
      data: Ae.value.data,
      active: !0
    }))), tt = (Ee) => {
      const {
        onKeydown: Re,
        checkable: Be,
        selectable: ot
      } = e;
      switch (Ee.which) {
        case it.UP: {
          qe(-1), Ee.preventDefault();
          break;
        }
        case it.DOWN: {
          qe(1), Ee.preventDefault();
          break;
        }
      }
      const pt = Ae.value;
      if (pt && pt.data) {
        const at = pt.data.isLeaf === !1 || !!(pt.data.children || []).length, dt = We.value;
        switch (Ee.which) {
          // >>> Expand
          case it.LEFT: {
            at && A.value.has(C.value) ? Pe({}, dt) : pt.parent && Ce(pt.parent.key), Ee.preventDefault();
            break;
          }
          case it.RIGHT: {
            at && !A.value.has(C.value) ? Pe({}, dt) : pt.children && pt.children.length && Ce(pt.children[0].key), Ee.preventDefault();
            break;
          }
          // Selection
          case it.ENTER:
          case it.SPACE: {
            Be && !dt.disabled && dt.checkable !== !1 && !dt.disableCheckbox ? Ne({}, dt, !R.value.has(C.value)) : !Be && ot && !dt.disabled && dt.selectable !== !1 && He({}, dt);
            break;
          }
        }
      }
      Re && Re(Ee);
    };
    return r({
      onNodeExpand: Pe,
      scrollTo: G,
      onKeydown: tt,
      selectedKeys: E(() => s.value),
      checkedKeys: E(() => u.value),
      halfCheckedKeys: E(() => c.value),
      loadedKeys: E(() => d.value),
      loadingKeys: E(() => f.value),
      expandedKeys: E(() => p.value)
    }), jo(() => {
      window.removeEventListener("dragend", re), i.value = !0;
    }), WK({
      expandedKeys: p,
      selectedKeys: s,
      loadedKeys: d,
      loadingKeys: f,
      checkedKeys: u,
      halfCheckedKeys: c,
      expandedKeysSet: A,
      selectedKeysSet: H,
      loadedKeysSet: B,
      loadingKeysSet: F,
      checkedKeysSet: R,
      halfCheckedKeysSet: X,
      flattenNodes: ee
    }), () => {
      const {
        // focused,
        // flattenNodes,
        // keyEntities,
        draggingNodeKey: Ee,
        // activeKey,
        dropLevelOffset: Re,
        dropContainerKey: Be,
        dropTargetKey: ot,
        dropPosition: pt,
        dragOverNodeKey: at
        // indent,
      } = g, {
        prefixCls: dt,
        showLine: wt,
        focusable: Ct,
        tabindex: St = 0,
        selectable: yt,
        showIcon: Ot,
        icon: Wt = o.icon,
        switcherIcon: Xt,
        draggable: ln,
        checkable: pn,
        checkStrictly: gt,
        disabled: En,
        motion: hn,
        loadData: Kn,
        filterTreeNode: so,
        height: Uo,
        itemHeight: Ue,
        virtual: ht,
        dropIndicatorRender: vt,
        onContextmenu: Zt,
        onScroll: Zn,
        direction: Qn,
        rootClassName: $o,
        rootStyle: Cn
      } = e, {
        class: Tt,
        style: po
      } = n, zo = Bs(O(O({}, e), n), {
        aria: !0,
        data: !0
      });
      let un;
      return ln ? typeof ln == "object" ? un = ln : typeof ln == "function" ? un = {
        nodeDraggable: ln
      } : un = {} : un = !1, h(jK, {
        value: {
          prefixCls: dt,
          selectable: yt,
          showIcon: Ot,
          icon: Wt,
          switcherIcon: Xt,
          draggable: un,
          draggingNodeKey: Ee,
          checkable: pn,
          customCheckable: o.checkable,
          checkStrictly: gt,
          disabled: En,
          keyEntities: x.value,
          dropLevelOffset: Re,
          dropContainerKey: Be,
          dropTargetKey: ot,
          dropPosition: pt,
          dragOverNodeKey: at,
          dragging: Ee !== null,
          indent: l.value,
          direction: Qn,
          dropIndicatorRender: vt,
          loadData: Kn,
          filterTreeNode: so,
          onNodeClick: ze,
          onNodeDoubleClick: Ke,
          onNodeExpand: Pe,
          onNodeSelect: He,
          onNodeCheck: Ne,
          onNodeLoad: Xe,
          onNodeMouseEnter: De,
          onNodeMouseLeave: Fe,
          onNodeContextMenu: Ve,
          onNodeDragStart: te,
          onNodeDragEnter: ve,
          onNodeDragOver: ue,
          onNodeDragLeave: pe,
          onNodeDragEnd: ie,
          onNodeDrop: ge,
          slots: o
        }
      }, {
        default: () => [h("div", {
          role: "tree",
          class: Me(dt, Tt, $o, {
            [`${dt}-show-line`]: wt,
            [`${dt}-focused`]: S.value,
            [`${dt}-active-focused`]: C.value !== null
          }),
          style: Cn
        }, [h(lJ, Q({
          ref: I,
          prefixCls: dt,
          style: po,
          disabled: En,
          selectable: yt,
          checkable: !!pn,
          motion: hn,
          height: Uo,
          itemHeight: Ue,
          virtual: ht,
          focusable: Ct,
          focused: S.value,
          tabindex: St,
          activeItem: Ae.value,
          onFocus: nt,
          onBlur: je,
          onKeydown: tt,
          onActiveChange: Ce,
          onListChangeStart: Ge,
          onListChangeEnd: Se,
          onContextmenu: Zt,
          onScroll: Zn
        }, zo), null)])]
      });
    };
  }
});
var dJ = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z" } }] }, name: "file", theme: "outlined" };
function F$(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      fJ(e, r, n[r]);
    });
  }
  return e;
}
function fJ(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var ug = function(t, n) {
  var o = F$({}, t, n.attrs);
  return h(on, F$({}, o, {
    icon: dJ
  }), null);
};
ug.displayName = "FileOutlined";
ug.inheritAttrs = !1;
var pJ = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z" } }, { tag: "path", attrs: { d: "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, name: "minus-square", theme: "outlined" };
function B$(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      hJ(e, r, n[r]);
    });
  }
  return e;
}
function hJ(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Bx = function(t, n) {
  var o = B$({}, t, n.attrs);
  return h(on, B$({}, o, {
    icon: pJ
  }), null);
};
Bx.displayName = "MinusSquareOutlined";
Bx.inheritAttrs = !1;
var gJ = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z" } }, { tag: "path", attrs: { d: "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, name: "plus-square", theme: "outlined" };
function L$(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      vJ(e, r, n[r]);
    });
  }
  return e;
}
function vJ(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Lx = function(t, n) {
  var o = L$({}, t, n.attrs);
  return h(on, L$({}, o, {
    icon: gJ
  }), null);
};
Lx.displayName = "PlusSquareOutlined";
Lx.inheritAttrs = !1;
var mJ = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z" } }] }, name: "caret-down", theme: "filled" };
function H$(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      bJ(e, r, n[r]);
    });
  }
  return e;
}
function bJ(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Hx = function(t, n) {
  var o = H$({}, t, n.attrs);
  return h(on, H$({}, o, {
    icon: mJ
  }), null);
};
Hx.displayName = "CaretDownFilled";
Hx.inheritAttrs = !1;
function yJ(e, t, n, o, r) {
  const {
    isLeaf: i,
    expanded: a,
    loading: l
  } = n;
  let s = t;
  if (l)
    return h(Ti, {
      class: `${e}-switcher-loading-icon`
    }, null);
  let u;
  r && typeof r == "object" && (u = r.showLeafIcon);
  let c = null;
  const d = `${e}-switcher-icon`;
  return i ? r ? u && o ? o(n) : (typeof r == "object" && !u ? c = h("span", {
    class: `${e}-switcher-leaf-line`
  }, null) : c = h(ug, {
    class: `${e}-switcher-line-icon`
  }, null), c) : null : (c = h(Hx, {
    class: d
  }, null), r && (c = a ? h(Bx, {
    class: `${e}-switcher-line-icon`
  }, null) : h(Lx, {
    class: `${e}-switcher-line-icon`
  }, null)), typeof t == "function" ? s = t(O(O({}, n), {
    defaultIcon: c,
    switcherCls: d
  })) : Ao(s) && (s = Ml(s, {
    class: d
  })), s || c);
}
const V$ = 4;
function xJ(e) {
  const {
    dropPosition: t,
    dropLevelOffset: n,
    prefixCls: o,
    indent: r,
    direction: i = "ltr"
  } = e, a = i === "ltr" ? "left" : "right", l = i === "ltr" ? "right" : "left", s = {
    [a]: `${-n * r + V$}px`,
    [l]: 0
  };
  switch (t) {
    case -1:
      s.top = "-3px";
      break;
    case 1:
      s.bottom = "-3px";
      break;
    default:
      s.bottom = "-3px", s[a] = `${r + V$}px`;
      break;
  }
  return h("div", {
    style: s,
    class: `${o}-drop-indicator`
  }, null);
}
const wJ = new tn("ant-tree-node-fx-do-not-use", {
  "0%": {
    opacity: 0
  },
  "100%": {
    opacity: 1
  }
}), SJ = (e, t) => ({
  [`.${e}-switcher-icon`]: {
    display: "inline-block",
    fontSize: 10,
    verticalAlign: "baseline",
    svg: {
      transition: `transform ${t.motionDurationSlow}`
    }
  }
}), CJ = (e, t) => ({
  [`.${e}-drop-indicator`]: {
    position: "absolute",
    // it should displayed over the following node
    zIndex: 1,
    height: 2,
    backgroundColor: t.colorPrimary,
    borderRadius: 1,
    pointerEvents: "none",
    "&:after": {
      position: "absolute",
      top: -3,
      insetInlineStart: -6,
      width: 8,
      height: 8,
      backgroundColor: "transparent",
      border: `${t.lineWidthBold}px solid ${t.colorPrimary}`,
      borderRadius: "50%",
      content: '""'
    }
  }
}), $J = (e, t) => {
  const {
    treeCls: n,
    treeNodeCls: o,
    treeNodePadding: r,
    treeTitleHeight: i
  } = t, a = (i - t.fontSizeLG) / 2, l = t.paddingXS;
  return {
    [n]: O(O({}, fn(t)), {
      background: t.colorBgContainer,
      borderRadius: t.borderRadius,
      transition: `background-color ${t.motionDurationSlow}`,
      [`&${n}-rtl`]: {
        // >>> Switcher
        [`${n}-switcher`]: {
          "&_close": {
            [`${n}-switcher-icon`]: {
              svg: {
                transform: "rotate(90deg)"
              }
            }
          }
        }
      },
      [`&-focused:not(:hover):not(${n}-active-focused)`]: O({}, ja(t)),
      // =================== Virtual List ===================
      [`${n}-list-holder-inner`]: {
        alignItems: "flex-start"
      },
      [`&${n}-block-node`]: {
        [`${n}-list-holder-inner`]: {
          alignItems: "stretch",
          // >>> Title
          [`${n}-node-content-wrapper`]: {
            flex: "auto"
          },
          // >>> Drag
          [`${o}.dragging`]: {
            position: "relative",
            "&:after": {
              position: "absolute",
              top: 0,
              insetInlineEnd: 0,
              bottom: r,
              insetInlineStart: 0,
              border: `1px solid ${t.colorPrimary}`,
              opacity: 0,
              animationName: wJ,
              animationDuration: t.motionDurationSlow,
              animationPlayState: "running",
              animationFillMode: "forwards",
              content: '""',
              pointerEvents: "none"
            }
          }
        }
      },
      // ===================== TreeNode =====================
      [`${o}`]: {
        display: "flex",
        alignItems: "flex-start",
        padding: `0 0 ${r}px 0`,
        outline: "none",
        "&-rtl": {
          direction: "rtl"
        },
        // Disabled
        "&-disabled": {
          // >>> Title
          [`${n}-node-content-wrapper`]: {
            color: t.colorTextDisabled,
            cursor: "not-allowed",
            "&:hover": {
              background: "transparent"
            }
          }
        },
        [`&-active ${n}-node-content-wrapper`]: O({}, ja(t)),
        [`&:not(${o}-disabled).filter-node ${n}-title`]: {
          color: "inherit",
          fontWeight: 500
        },
        "&-draggable": {
          [`${n}-draggable-icon`]: {
            width: i,
            lineHeight: `${i}px`,
            textAlign: "center",
            visibility: "visible",
            opacity: 0.2,
            transition: `opacity ${t.motionDurationSlow}`,
            [`${o}:hover &`]: {
              opacity: 0.45
            }
          },
          [`&${o}-disabled`]: {
            [`${n}-draggable-icon`]: {
              visibility: "hidden"
            }
          }
        }
      },
      // >>> Indent
      [`${n}-indent`]: {
        alignSelf: "stretch",
        whiteSpace: "nowrap",
        userSelect: "none",
        "&-unit": {
          display: "inline-block",
          width: i
        }
      },
      // >>> Drag Handler
      [`${n}-draggable-icon`]: {
        visibility: "hidden"
      },
      // >>> Switcher
      [`${n}-switcher`]: O(O({}, SJ(e, t)), {
        position: "relative",
        flex: "none",
        alignSelf: "stretch",
        width: i,
        margin: 0,
        lineHeight: `${i}px`,
        textAlign: "center",
        cursor: "pointer",
        userSelect: "none",
        "&-noop": {
          cursor: "default"
        },
        "&_close": {
          [`${n}-switcher-icon`]: {
            svg: {
              transform: "rotate(-90deg)"
            }
          }
        },
        "&-loading-icon": {
          color: t.colorPrimary
        },
        "&-leaf-line": {
          position: "relative",
          zIndex: 1,
          display: "inline-block",
          width: "100%",
          height: "100%",
          // https://github.com/ant-design/ant-design/issues/31884
          "&:before": {
            position: "absolute",
            top: 0,
            insetInlineEnd: i / 2,
            bottom: -r,
            marginInlineStart: -1,
            borderInlineEnd: `1px solid ${t.colorBorder}`,
            content: '""'
          },
          "&:after": {
            position: "absolute",
            width: i / 2 * 0.8,
            height: i / 2,
            borderBottom: `1px solid ${t.colorBorder}`,
            content: '""'
          }
        }
      }),
      // >>> Checkbox
      [`${n}-checkbox`]: {
        top: "initial",
        marginInlineEnd: l,
        marginBlockStart: a
      },
      // >>> Title
      // add `${treeCls}-checkbox + span` to cover checkbox `${checkboxCls} + span`
      [`${n}-node-content-wrapper, ${n}-checkbox + span`]: {
        position: "relative",
        zIndex: "auto",
        minHeight: i,
        margin: 0,
        padding: `0 ${t.paddingXS / 2}px`,
        color: "inherit",
        lineHeight: `${i}px`,
        background: "transparent",
        borderRadius: t.borderRadius,
        cursor: "pointer",
        transition: `all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,
        "&:hover": {
          backgroundColor: t.controlItemBgHover
        },
        [`&${n}-node-selected`]: {
          backgroundColor: t.controlItemBgActive
        },
        // Icon
        [`${n}-iconEle`]: {
          display: "inline-block",
          width: i,
          height: i,
          lineHeight: `${i}px`,
          textAlign: "center",
          verticalAlign: "top",
          "&:empty": {
            display: "none"
          }
        }
      },
      // https://github.com/ant-design/ant-design/issues/28217
      [`${n}-unselectable ${n}-node-content-wrapper:hover`]: {
        backgroundColor: "transparent"
      },
      // ==================== Draggable =====================
      [`${n}-node-content-wrapper`]: O({
        lineHeight: `${i}px`,
        userSelect: "none"
      }, CJ(e, t)),
      [`${o}.drop-container`]: {
        "> [draggable]": {
          boxShadow: `0 0 0 2px ${t.colorPrimary}`
        }
      },
      // ==================== Show Line =====================
      "&-show-line": {
        // ================ Indent lines ================
        [`${n}-indent`]: {
          "&-unit": {
            position: "relative",
            height: "100%",
            "&:before": {
              position: "absolute",
              top: 0,
              insetInlineEnd: i / 2,
              bottom: -r,
              borderInlineEnd: `1px solid ${t.colorBorder}`,
              content: '""'
            },
            "&-end": {
              "&:before": {
                display: "none"
              }
            }
          }
        },
        // ============== Cover Background ==============
        [`${n}-switcher`]: {
          background: "transparent",
          "&-line-icon": {
            // https://github.com/ant-design/ant-design/issues/32813
            verticalAlign: "-0.15em"
          }
        }
      },
      [`${o}-leaf-last`]: {
        [`${n}-switcher`]: {
          "&-leaf-line": {
            "&:before": {
              top: "auto !important",
              bottom: "auto !important",
              height: `${i / 2}px !important`
            }
          }
        }
      }
    })
  };
}, PJ = (e) => {
  const {
    treeCls: t,
    treeNodeCls: n,
    treeNodePadding: o
  } = e;
  return {
    [`${t}${t}-directory`]: {
      // ================== TreeNode ==================
      [n]: {
        position: "relative",
        // Hover color
        "&:before": {
          position: "absolute",
          top: 0,
          insetInlineEnd: 0,
          bottom: o,
          insetInlineStart: 0,
          transition: `background-color ${e.motionDurationMid}`,
          content: '""',
          pointerEvents: "none"
        },
        "&:hover": {
          "&:before": {
            background: e.controlItemBgHover
          }
        },
        // Elements
        "> *": {
          zIndex: 1
        },
        // >>> Switcher
        [`${t}-switcher`]: {
          transition: `color ${e.motionDurationMid}`
        },
        // >>> Title
        [`${t}-node-content-wrapper`]: {
          borderRadius: 0,
          userSelect: "none",
          "&:hover": {
            background: "transparent"
          },
          [`&${t}-node-selected`]: {
            color: e.colorTextLightSolid,
            background: "transparent"
          }
        },
        // ============= Selected =============
        "&-selected": {
          "\n            &:hover::before,\n            &::before\n          ": {
            background: e.colorPrimary
          },
          // >>> Switcher
          [`${t}-switcher`]: {
            color: e.colorTextLightSolid
          },
          // >>> Title
          [`${t}-node-content-wrapper`]: {
            color: e.colorTextLightSolid,
            background: "transparent"
          }
        }
      }
    }
  };
}, OJ = (e, t) => {
  const n = `.${e}`, o = `${n}-treenode`, r = t.paddingXS / 2, i = t.controlHeightSM, a = Qt(t, {
    treeCls: n,
    treeNodeCls: o,
    treeNodePadding: r,
    treeTitleHeight: i
  });
  return [
    // Basic
    $J(e, a),
    // Directory
    PJ(a)
  ];
}, kJ = Sn("Tree", (e, t) => {
  let {
    prefixCls: n
  } = t;
  return [{
    [e.componentCls]: OM(`${n}-checkbox`, e)
  }, OJ(n, e), jh(e)];
}), Y2 = () => {
  const e = lM();
  return O(O({}, e), {
    showLine: en([Boolean, Object]),
    /** 是否支持多选 */
    multiple: ct(),
    /** 是否自动展开父节点 */
    autoExpandParent: ct(),
    /** checkable状态下节点选择完全受控（父子节点选中状态不再关联）*/
    checkStrictly: ct(),
    /** 是否支持选中 */
    checkable: ct(),
    /** 是否禁用树 */
    disabled: ct(),
    /** 默认展开所有树节点 */
    defaultExpandAll: ct(),
    /** 默认展开对应树节点 */
    defaultExpandParent: ct(),
    /** 默认展开指定的树节点 */
    defaultExpandedKeys: jn(),
    /** （受控）展开指定的树节点 */
    expandedKeys: jn(),
    /** （受控）选中复选框的树节点 */
    checkedKeys: en([Array, Object]),
    /** 默认选中复选框的树节点 */
    defaultCheckedKeys: jn(),
    /** （受控）设置选中的树节点 */
    selectedKeys: jn(),
    /** 默认选中的树节点 */
    defaultSelectedKeys: jn(),
    selectable: ct(),
    loadedKeys: jn(),
    draggable: ct(),
    showIcon: ct(),
    icon: et(),
    switcherIcon: fe.any,
    prefixCls: String,
    /**
     * @default{title,key,children}
     * deprecated, please use `fieldNames` instead
     * 替换treeNode中 title,key,children字段为treeData中对应的字段
     */
    replaceFields: Et(),
    blockNode: ct(),
    openAnimation: fe.any,
    onDoubleclick: e.onDblclick,
    "onUpdate:selectedKeys": et(),
    "onUpdate:checkedKeys": et(),
    "onUpdate:expandedKeys": et()
  });
}, vp = be({
  compatConfig: {
    MODE: 3
  },
  name: "ATree",
  inheritAttrs: !1,
  props: kn(Y2(), {
    checkable: !1,
    selectable: !0,
    showIcon: !1,
    blockNode: !1
  }),
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      expose: o,
      emit: r,
      slots: i
    } = t;
    wn(!(e.treeData === void 0 && i.default), "`children` of Tree is deprecated. Please use `treeData` instead.");
    const {
      prefixCls: a,
      direction: l,
      virtual: s
    } = _t("tree", e), [u, c] = kJ(a), d = ce();
    o({
      treeRef: d,
      onNodeExpand: function() {
        var m;
        (m = d.value) === null || m === void 0 || m.onNodeExpand(...arguments);
      },
      scrollTo: (m) => {
        var x;
        (x = d.value) === null || x === void 0 || x.scrollTo(m);
      },
      selectedKeys: E(() => {
        var m;
        return (m = d.value) === null || m === void 0 ? void 0 : m.selectedKeys;
      }),
      checkedKeys: E(() => {
        var m;
        return (m = d.value) === null || m === void 0 ? void 0 : m.checkedKeys;
      }),
      halfCheckedKeys: E(() => {
        var m;
        return (m = d.value) === null || m === void 0 ? void 0 : m.halfCheckedKeys;
      }),
      loadedKeys: E(() => {
        var m;
        return (m = d.value) === null || m === void 0 ? void 0 : m.loadedKeys;
      }),
      loadingKeys: E(() => {
        var m;
        return (m = d.value) === null || m === void 0 ? void 0 : m.loadingKeys;
      }),
      expandedKeys: E(() => {
        var m;
        return (m = d.value) === null || m === void 0 ? void 0 : m.expandedKeys;
      })
    }), It(() => {
      dn(e.replaceFields === void 0, "Tree", "`replaceFields` is deprecated, please use fieldNames instead");
    });
    const p = (m, x) => {
      r("update:checkedKeys", m), r("check", m, x);
    }, v = (m, x) => {
      r("update:expandedKeys", m), r("expand", m, x);
    }, g = (m, x) => {
      r("update:selectedKeys", m), r("select", m, x);
    };
    return () => {
      const {
        showIcon: m,
        showLine: x,
        switcherIcon: S = i.switcherIcon,
        icon: C = i.icon,
        blockNode: P,
        checkable: $,
        selectable: I,
        fieldNames: w = e.replaceFields,
        motion: _ = e.openAnimation,
        itemHeight: M = 28,
        onDoubleclick: N,
        onDblclick: A
      } = e, H = O(O(O({}, n), Fn(e, ["onUpdate:checkedKeys", "onUpdate:expandedKeys", "onUpdate:selectedKeys", "onDoubleclick"])), {
        showLine: !!x,
        dropIndicatorRender: xJ,
        fieldNames: w,
        icon: C,
        itemHeight: M
      }), B = i.default ? Do(i.default()) : void 0;
      return u(h(cJ, Q(Q({}, H), {}, {
        virtual: s.value,
        motion: _,
        ref: d,
        prefixCls: a.value,
        class: Me({
          [`${a.value}-icon-hide`]: !m,
          [`${a.value}-block-node`]: P,
          [`${a.value}-unselectable`]: !I,
          [`${a.value}-rtl`]: l.value === "rtl"
        }, n.class, c.value),
        direction: l.value,
        checkable: $,
        selectable: I,
        switcherIcon: (F) => yJ(a.value, S, F, i.leafIcon, x),
        onCheck: p,
        onExpand: v,
        onSelect: g,
        onDblclick: A || N,
        children: B
      }), O(O({}, i), {
        checkable: () => h("span", {
          class: `${a.value}-checkbox-inner`
        }, null)
      })));
    };
  }
});
var IJ = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z" } }] }, name: "folder-open", theme: "outlined" };
function j$(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      _J(e, r, n[r]);
    });
  }
  return e;
}
function _J(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var Vx = function(t, n) {
  var o = j$({}, t, n.attrs);
  return h(on, j$({}, o, {
    icon: IJ
  }), null);
};
Vx.displayName = "FolderOpenOutlined";
Vx.inheritAttrs = !1;
var TJ = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z" } }] }, name: "folder", theme: "outlined" };
function W$(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(r) {
      return Object.getOwnPropertyDescriptor(n, r).enumerable;
    }))), o.forEach(function(r) {
      MJ(e, r, n[r]);
    });
  }
  return e;
}
function MJ(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
var jx = function(t, n) {
  var o = W$({}, t, n.attrs);
  return h(on, W$({}, o, {
    icon: TJ
  }), null);
};
jx.displayName = "FolderOutlined";
jx.inheritAttrs = !1;
var $a;
(function(e) {
  e[e.None = 0] = "None", e[e.Start = 1] = "Start", e[e.End = 2] = "End";
})($a || ($a = {}));
function Wx(e, t, n) {
  function o(r) {
    const i = r[t.key], a = r[t.children];
    n(i, r) !== !1 && Wx(a || [], t, n);
  }
  e.forEach(o);
}
function EJ(e) {
  let {
    treeData: t,
    expandedKeys: n,
    startKey: o,
    endKey: r,
    fieldNames: i = {
      title: "title",
      key: "key",
      children: "children"
    }
  } = e;
  const a = [];
  let l = $a.None;
  if (o && o === r)
    return [o];
  if (!o || !r)
    return [];
  function s(u) {
    return u === o || u === r;
  }
  return Wx(t, i, (u) => {
    if (l === $a.End)
      return !1;
    if (s(u)) {
      if (a.push(u), l === $a.None)
        l = $a.Start;
      else if (l === $a.Start)
        return l = $a.End, !1;
    } else l === $a.Start && a.push(u);
    return n.includes(u);
  }), a;
}
function Hv(e, t, n) {
  const o = [...t], r = [];
  return Wx(e, n, (i, a) => {
    const l = o.indexOf(i);
    return l !== -1 && (r.push(a), o.splice(l, 1)), !!o.length;
  }), r;
}
var DJ = function(e, t) {
  var n = {};
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
    t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
};
const AJ = () => O(O({}, Y2()), {
  expandAction: en([Boolean, String])
});
function NJ(e) {
  const {
    isLeaf: t,
    expanded: n
  } = e;
  return t ? h(ug, null, null) : n ? h(Vx, null, null) : h(jx, null, null);
}
const Vv = be({
  compatConfig: {
    MODE: 3
  },
  name: "ADirectoryTree",
  inheritAttrs: !1,
  props: kn(AJ(), {
    showIcon: !0,
    expandAction: "click"
  }),
  slots: Object,
  // emits: [
  //   'update:selectedKeys',
  //   'update:checkedKeys',
  //   'update:expandedKeys',
  //   'expand',
  //   'select',
  //   'check',
  //   'doubleclick',
  //   'dblclick',
  //   'click',
  // ],
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      emit: r,
      expose: i
    } = t;
    var a;
    const l = ce(e.treeData || wb(Do((a = o.default) === null || a === void 0 ? void 0 : a.call(o))));
    ke(() => e.treeData, () => {
      l.value = e.treeData;
    }), Ya(() => {
      Yt(() => {
        var M;
        e.treeData === void 0 && o.default && (l.value = wb(Do((M = o.default) === null || M === void 0 ? void 0 : M.call(o))));
      });
    });
    const s = ce(), u = ce(), c = E(() => Jh(e.fieldNames)), d = ce();
    i({
      scrollTo: (M) => {
        var N;
        (N = d.value) === null || N === void 0 || N.scrollTo(M);
      },
      selectedKeys: E(() => {
        var M;
        return (M = d.value) === null || M === void 0 ? void 0 : M.selectedKeys;
      }),
      checkedKeys: E(() => {
        var M;
        return (M = d.value) === null || M === void 0 ? void 0 : M.checkedKeys;
      }),
      halfCheckedKeys: E(() => {
        var M;
        return (M = d.value) === null || M === void 0 ? void 0 : M.halfCheckedKeys;
      }),
      loadedKeys: E(() => {
        var M;
        return (M = d.value) === null || M === void 0 ? void 0 : M.loadedKeys;
      }),
      loadingKeys: E(() => {
        var M;
        return (M = d.value) === null || M === void 0 ? void 0 : M.loadingKeys;
      }),
      expandedKeys: E(() => {
        var M;
        return (M = d.value) === null || M === void 0 ? void 0 : M.expandedKeys;
      })
    });
    const p = () => {
      const {
        keyEntities: M
      } = cx(l.value, {
        fieldNames: c.value
      });
      let N;
      return e.defaultExpandAll ? N = Object.keys(M) : e.defaultExpandParent ? N = xb(e.expandedKeys || e.defaultExpandedKeys || [], M) : N = e.expandedKeys || e.defaultExpandedKeys, N;
    }, v = ce(e.selectedKeys || e.defaultSelectedKeys || []), g = ce(p());
    ke(() => e.selectedKeys, () => {
      e.selectedKeys !== void 0 && (v.value = e.selectedKeys);
    }, {
      immediate: !0
    }), ke(() => e.expandedKeys, () => {
      e.expandedKeys !== void 0 && (g.value = e.expandedKeys);
    }, {
      immediate: !0
    });
    const x = XP((M, N) => {
      const {
        isLeaf: A
      } = N;
      A || M.shiftKey || M.metaKey || M.ctrlKey || d.value.onNodeExpand(M, N);
    }, 200, {
      leading: !0
    }), S = (M, N) => {
      e.expandedKeys === void 0 && (g.value = M), r("update:expandedKeys", M), r("expand", M, N);
    }, C = (M, N) => {
      const {
        expandAction: A
      } = e;
      A === "click" && x(M, N), r("click", M, N);
    }, P = (M, N) => {
      const {
        expandAction: A
      } = e;
      (A === "dblclick" || A === "doubleclick") && x(M, N), r("doubleclick", M, N), r("dblclick", M, N);
    }, $ = (M, N) => {
      const {
        multiple: A
      } = e, {
        node: H,
        nativeEvent: B
      } = N, F = H[c.value.key], R = O(O({}, N), {
        selected: !0
      }), X = B?.ctrlKey || B?.metaKey, j = B?.shiftKey;
      let ee;
      A && X ? (ee = M, s.value = F, u.value = ee, R.selectedNodes = Hv(l.value, ee, c.value)) : A && j ? (ee = Array.from(/* @__PURE__ */ new Set([...u.value || [], ...EJ({
        treeData: l.value,
        expandedKeys: g.value,
        startKey: F,
        endKey: s.value,
        fieldNames: c.value
      })])), R.selectedNodes = Hv(l.value, ee, c.value)) : (ee = [F], s.value = F, u.value = ee, R.selectedNodes = Hv(l.value, ee, c.value)), r("update:selectedKeys", ee), r("select", ee, R), e.selectedKeys === void 0 && (v.value = ee);
    }, I = (M, N) => {
      r("update:checkedKeys", M), r("check", M, N);
    }, {
      prefixCls: w,
      direction: _
    } = _t("tree", e);
    return () => {
      const M = Me(`${w.value}-directory`, {
        [`${w.value}-directory-rtl`]: _.value === "rtl"
      }, n.class), {
        icon: N = o.icon,
        blockNode: A = !0
      } = e, H = DJ(e, ["icon", "blockNode"]);
      return h(vp, Q(Q(Q({}, n), {}, {
        icon: N || NJ,
        ref: d,
        blockNode: A
      }, H), {}, {
        prefixCls: w.value,
        class: M,
        expandedKeys: g.value,
        selectedKeys: v.value,
        onSelect: $,
        onClick: C,
        onDblclick: P,
        onExpand: S,
        onCheck: I
      }), o);
    };
  }
}), jv = yb, RJ = O(vp, {
  DirectoryTree: Vv,
  TreeNode: jv,
  install: (e) => (e.component(vp.name, vp), e.component(jv.name, jv), e.component(Vv.name, Vv), e)
});
function K$(e, t) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
  const o = /* @__PURE__ */ new Set();
  function r(i, a) {
    let l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
    const s = o.has(i);
    if (vr(!s, "Warning: There may be circular references"), s)
      return !1;
    if (i === a)
      return !0;
    if (n && l > 1)
      return !1;
    o.add(i);
    const u = l + 1;
    if (Array.isArray(i)) {
      if (!Array.isArray(a) || i.length !== a.length)
        return !1;
      for (let c = 0; c < i.length; c++)
        if (!r(i[c], a[c], u))
          return !1;
      return !0;
    }
    if (i && a && typeof i == "object" && typeof a == "object") {
      const c = Object.keys(i);
      return c.length !== Object.keys(a).length ? !1 : c.every((d) => r(i[d], a[d], u));
    }
    return !1;
  }
  return r(e, t);
}
const {
  SubMenu: zJ,
  Item: FJ
} = fo;
function BJ(e) {
  return e.some((t) => {
    let {
      children: n
    } = t;
    return n && n.length > 0;
  });
}
function G2(e, t) {
  return typeof t == "string" || typeof t == "number" ? t?.toString().toLowerCase().includes(e.trim().toLowerCase()) : !1;
}
function U2(e) {
  let {
    filters: t,
    prefixCls: n,
    filteredKeys: o,
    filterMultiple: r,
    searchValue: i,
    filterSearch: a
  } = e;
  return t.map((l, s) => {
    const u = String(l.value);
    if (l.children)
      return h(zJ, {
        key: u || s,
        title: l.text,
        popupClassName: `${n}-dropdown-submenu`
      }, {
        default: () => [U2({
          filters: l.children,
          prefixCls: n,
          filteredKeys: o,
          filterMultiple: r,
          searchValue: i,
          filterSearch: a
        })]
      });
    const c = r ? Eo : _o, d = h(FJ, {
      key: l.value !== void 0 ? u : s
    }, {
      default: () => [h(c, {
        checked: o.includes(u)
      }, null), h("span", null, [l.text])]
    });
    return i.trim() ? typeof a == "function" ? a(i, l) ? d : void 0 : G2(i, l.text) ? d : void 0 : d;
  });
}
const LJ = be({
  name: "FilterDropdown",
  props: ["tablePrefixCls", "prefixCls", "dropdownPrefixCls", "column", "filterState", "filterMultiple", "filterMode", "filterSearch", "columnKey", "triggerFilter", "locale", "getPopupContainer"],
  setup(e, t) {
    let {
      slots: n
    } = t;
    const o = Dx(), r = E(() => {
      var G;
      return (G = e.filterMode) !== null && G !== void 0 ? G : "menu";
    }), i = E(() => {
      var G;
      return (G = e.filterSearch) !== null && G !== void 0 ? G : !1;
    }), a = E(() => e.column.filterDropdownOpen || e.column.filterDropdownVisible), l = E(() => e.column.onFilterDropdownOpenChange || e.column.onFilterDropdownVisibleChange);
    process.env.NODE_ENV !== "production" && [["filterDropdownVisible", "filterDropdownOpen", e.column.filterDropdownVisible], ["onFilterDropdownVisibleChange", "onFilterDropdownOpenChange", e.column.onFilterDropdownVisibleChange]].forEach((G) => {
      let [ae, le, ie] = G;
      dn(ie == null, "Table", `\`${ae}\` is deprecated. Please use \`${le}\` instead.`);
    });
    const s = $e(!1), u = E(() => {
      var G;
      return !!(e.filterState && (!((G = e.filterState.filteredKeys) === null || G === void 0) && G.length || e.filterState.forceFiltered));
    }), c = E(() => {
      var G;
      return cg((G = e.column) === null || G === void 0 ? void 0 : G.filters);
    }), d = E(() => {
      const {
        filterDropdown: G,
        slots: ae = {},
        customFilterDropdown: le
      } = e.column;
      return G || ae.filterDropdown && o.value[ae.filterDropdown] || le && o.value.customFilterDropdown;
    }), f = E(() => {
      const {
        filterIcon: G,
        slots: ae = {}
      } = e.column;
      return G || ae.filterIcon && o.value[ae.filterIcon] || o.value.customFilterIcon;
    }), p = (G) => {
      var ae;
      s.value = G, (ae = l.value) === null || ae === void 0 || ae.call(l, G);
    }, v = E(() => typeof a.value == "boolean" ? a.value : s.value), g = E(() => {
      var G;
      return (G = e.filterState) === null || G === void 0 ? void 0 : G.filteredKeys;
    }), m = $e([]), x = (G) => {
      let {
        selectedKeys: ae
      } = G;
      m.value = ae;
    }, S = (G, ae) => {
      let {
        node: le,
        checked: ie
      } = ae;
      e.filterMultiple ? x({
        selectedKeys: G
      }) : x({
        selectedKeys: ie && le.key ? [le.key] : []
      });
    };
    ke(g, () => {
      s.value && x({
        selectedKeys: g.value || []
      });
    }, {
      immediate: !0
    });
    const C = $e([]), P = $e(), $ = (G) => {
      P.value = setTimeout(() => {
        C.value = G;
      });
    }, I = () => {
      clearTimeout(P.value);
    };
    qt(() => {
      clearTimeout(P.value);
    });
    const w = $e(""), _ = (G) => {
      const {
        value: ae
      } = G.target;
      w.value = ae;
    };
    ke(s, () => {
      s.value || (w.value = "");
    });
    const M = (G) => {
      const {
        column: ae,
        columnKey: le,
        filterState: ie
      } = e, re = G && G.length ? G : null;
      if (re === null && (!ie || !ie.filteredKeys) || K$(re, ie?.filteredKeys, !0))
        return null;
      e.triggerFilter({
        column: ae,
        key: le,
        filteredKeys: re
      });
    }, N = () => {
      p(!1), M(m.value);
    }, A = function() {
      let {
        confirm: G,
        closeDropdown: ae
      } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
        confirm: !1,
        closeDropdown: !1
      };
      G && M([]), ae && p(!1), w.value = "", e.column.filterResetToDefaultFilteredValue ? m.value = (e.column.defaultFilteredValue || []).map((le) => String(le)) : m.value = [];
    }, H = function() {
      let {
        closeDropdown: G
      } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
        closeDropdown: !0
      };
      G && p(!1), M(m.value);
    }, B = (G) => {
      G && g.value !== void 0 && (m.value = g.value || []), p(G), !G && !d.value && N();
    }, {
      direction: F
    } = _t("", e), R = (G) => {
      if (G.target.checked) {
        const ae = c.value;
        m.value = ae;
      } else
        m.value = [];
    }, X = (G) => {
      let {
        filters: ae
      } = G;
      return (ae || []).map((le, ie) => {
        const re = String(le.value), te = {
          title: le.text,
          key: le.value !== void 0 ? re : ie
        };
        return le.children && (te.children = X({
          filters: le.children
        })), te;
      });
    }, j = (G) => {
      var ae;
      return O(O({}, G), {
        text: G.title,
        value: G.key,
        children: ((ae = G.children) === null || ae === void 0 ? void 0 : ae.map((le) => j(le))) || []
      });
    }, ee = E(() => X({
      filters: e.column.filters
    })), W = E(() => Me({
      [`${e.dropdownPrefixCls}-menu-without-submenu`]: !BJ(e.column.filters || [])
    })), K = () => {
      const G = m.value, {
        column: ae,
        locale: le,
        tablePrefixCls: ie,
        filterMultiple: re,
        dropdownPrefixCls: te,
        getPopupContainer: ve,
        prefixCls: ue
      } = e;
      return (ae.filters || []).length === 0 ? h(fs, {
        image: fs.PRESENTED_IMAGE_SIMPLE,
        description: le.filterEmptyText,
        imageStyle: {
          height: 24
        },
        style: {
          margin: 0,
          padding: "16px 0"
        }
      }, null) : r.value === "tree" ? h(Je, null, [h(T$, {
        filterSearch: i.value,
        value: w.value,
        onChange: _,
        tablePrefixCls: ie,
        locale: le
      }, null), h("div", {
        class: `${ie}-filter-dropdown-tree`
      }, [re ? h(Eo, {
        class: `${ie}-filter-dropdown-checkall`,
        onChange: R,
        checked: G.length === c.value.length,
        indeterminate: G.length > 0 && G.length < c.value.length
      }, {
        default: () => [le.filterCheckall]
      }) : null, h(RJ, {
        checkable: !0,
        selectable: !1,
        blockNode: !0,
        multiple: re,
        checkStrictly: !re,
        class: `${te}-menu`,
        onCheck: S,
        checkedKeys: G,
        selectedKeys: G,
        showIcon: !1,
        treeData: ee.value,
        autoExpandParent: !0,
        defaultExpandAll: !0,
        filterTreeNode: w.value.trim() ? (pe) => typeof i.value == "function" ? i.value(w.value, j(pe)) : G2(w.value, pe.title) : void 0
      }, null)])]) : h(Je, null, [h(T$, {
        filterSearch: i.value,
        value: w.value,
        onChange: _,
        tablePrefixCls: ie,
        locale: le
      }, null), h(fo, {
        multiple: re,
        prefixCls: `${te}-menu`,
        class: W.value,
        onClick: I,
        onSelect: x,
        onDeselect: x,
        selectedKeys: G,
        getPopupContainer: ve,
        openKeys: C.value,
        onOpenChange: $
      }, {
        default: () => U2({
          filters: ae.filters || [],
          filterSearch: i.value,
          prefixCls: ue,
          filteredKeys: m.value,
          filterMultiple: re,
          searchValue: w.value
        })
      })]);
    }, q = E(() => {
      const G = m.value;
      return e.column.filterResetToDefaultFilteredValue ? K$((e.column.defaultFilteredValue || []).map((ae) => String(ae)), G, !0) : G.length === 0;
    });
    return () => {
      var G;
      const {
        tablePrefixCls: ae,
        prefixCls: le,
        column: ie,
        dropdownPrefixCls: re,
        locale: te,
        getPopupContainer: ve
      } = e;
      let ue;
      typeof d.value == "function" ? ue = d.value({
        prefixCls: `${re}-custom`,
        setSelectedKeys: (_e) => x({
          selectedKeys: _e
        }),
        selectedKeys: m.value,
        confirm: H,
        clearFilters: A,
        filters: ie.filters,
        visible: v.value,
        column: ie.__originColumn__,
        close: () => {
          p(!1);
        }
      }) : d.value ? ue = d.value : ue = h(Je, null, [K(), h("div", {
        class: `${le}-dropdown-btns`
      }, [h(Lt, {
        type: "link",
        size: "small",
        disabled: q.value,
        onClick: () => A()
      }, {
        default: () => [te.filterReset]
      }), h(Lt, {
        type: "primary",
        size: "small",
        onClick: N
      }, {
        default: () => [te.filterConfirm]
      })])]);
      const pe = h(nJ, {
        class: `${le}-dropdown`
      }, {
        default: () => [ue]
      });
      let ge;
      return typeof f.value == "function" ? ge = f.value({
        filtered: u.value,
        column: ie.__originColumn__
      }) : f.value ? ge = f.value : ge = h(Fx, null, null), h("div", {
        class: `${le}-column`
      }, [h("span", {
        class: `${ae}-column-title`
      }, [(G = n.default) === null || G === void 0 ? void 0 : G.call(n)]), h(Mr, {
        overlay: pe,
        trigger: ["click"],
        open: v.value,
        onOpenChange: B,
        getPopupContainer: ve,
        placement: F.value === "rtl" ? "bottomLeft" : "bottomRight"
      }, {
        default: () => [h("span", {
          role: "button",
          tabindex: -1,
          class: Me(`${le}-trigger`, {
            active: u.value
          }),
          onClick: (_e) => {
            _e.stopPropagation();
          }
        }, [ge])]
      })]);
    };
  }
});
function Qb(e, t, n) {
  let o = [];
  return (e || []).forEach((r, i) => {
    var a, l;
    const s = Yd(i, n), u = r.filterDropdown || ((a = r?.slots) === null || a === void 0 ? void 0 : a.filterDropdown) || r.customFilterDropdown;
    if (r.filters || u || "onFilter" in r)
      if ("filteredValue" in r) {
        let c = r.filteredValue;
        u || (c = (l = c?.map(String)) !== null && l !== void 0 ? l : c), o.push({
          column: r,
          key: As(r, s),
          filteredKeys: c,
          forceFiltered: r.filtered
        });
      } else
        o.push({
          column: r,
          key: As(r, s),
          filteredKeys: t && r.defaultFilteredValue ? r.defaultFilteredValue : void 0,
          forceFiltered: r.filtered
        });
    "children" in r && (o = [...o, ...Qb(r.children, t, s)]);
  }), o;
}
function X2(e, t, n, o, r, i, a, l) {
  return n.map((s, u) => {
    var c;
    const d = Yd(u, l), {
      filterMultiple: f = !0,
      filterMode: p,
      filterSearch: v
    } = s;
    let g = s;
    const m = s.filterDropdown || ((c = s?.slots) === null || c === void 0 ? void 0 : c.filterDropdown) || s.customFilterDropdown;
    if (g.filters || m) {
      const x = As(g, d), S = o.find((C) => {
        let {
          key: P
        } = C;
        return x === P;
      });
      g = O(O({}, g), {
        title: (C) => h(LJ, {
          tablePrefixCls: e,
          prefixCls: `${e}-filter`,
          dropdownPrefixCls: t,
          column: g,
          columnKey: x,
          filterState: S,
          filterMultiple: f,
          filterMode: p,
          filterSearch: v,
          triggerFilter: i,
          locale: r,
          getPopupContainer: a
        }, {
          default: () => [zx(s.title, C)]
        })
      });
    }
    return "children" in g && (g = O(O({}, g), {
      children: X2(e, t, g.children, o, r, i, a, d)
    })), g;
  });
}
function cg(e) {
  let t = [];
  return (e || []).forEach((n) => {
    let {
      value: o,
      children: r
    } = n;
    t.push(o), r && (t = [...t, ...cg(r)]);
  }), t;
}
function q$(e) {
  const t = {};
  return e.forEach((n) => {
    let {
      key: o,
      filteredKeys: r,
      column: i
    } = n;
    var a;
    const l = i.filterDropdown || ((a = i?.slots) === null || a === void 0 ? void 0 : a.filterDropdown) || i.customFilterDropdown, {
      filters: s
    } = i;
    if (l)
      t[o] = r || null;
    else if (Array.isArray(r)) {
      const u = cg(s);
      t[o] = u.filter((c) => r.includes(String(c)));
    } else
      t[o] = null;
  }), t;
}
function Y$(e, t) {
  return t.reduce((n, o) => {
    const {
      column: {
        onFilter: r,
        filters: i
      },
      filteredKeys: a
    } = o;
    return r && a && a.length ? n.filter((l) => a.some((s) => {
      const u = cg(i), c = u.findIndex((f) => String(f) === String(s)), d = c !== -1 ? u[c] : s;
      return r(d, l);
    })) : n;
  }, e);
}
function Q2(e) {
  return e.flatMap((t) => "children" in t ? [t, ...Q2(t.children || [])] : [t]);
}
function HJ(e) {
  let {
    prefixCls: t,
    dropdownPrefixCls: n,
    mergedColumns: o,
    locale: r,
    onFilterChange: i,
    getPopupContainer: a
  } = e;
  const l = E(() => Q2(o.value)), [s, u] = $n(Qb(l.value, !0)), c = E(() => {
    const v = Qb(l.value, !1);
    if (v.length === 0)
      return v;
    let g = !0, m = !0;
    if (v.forEach((x) => {
      let {
        filteredKeys: S
      } = x;
      S !== void 0 ? g = !1 : m = !1;
    }), g) {
      const x = (l.value || []).map((S, C) => As(S, Yd(C)));
      return s.value.filter((S) => {
        let {
          key: C
        } = S;
        return x.includes(C);
      }).map((S) => {
        const C = l.value[x.findIndex((P) => P === S.key)];
        return O(O({}, S), {
          column: O(O({}, S.column), C),
          forceFiltered: C.filtered
        });
      });
    }
    return dn(m, "Table", "Columns should all contain `filteredValue` or not contain `filteredValue`."), v;
  }), d = E(() => q$(c.value)), f = (v) => {
    const g = c.value.filter((m) => {
      let {
        key: x
      } = m;
      return x !== v.key;
    });
    g.push(v), u(g), i(q$(g), g);
  };
  return [(v) => X2(t.value, n.value, v, c.value, r.value, f, a.value), c, d];
}
function Z2(e, t) {
  return e.map((n) => {
    const o = O({}, n);
    return o.title = zx(o.title, t), "children" in o && (o.children = Z2(o.children, t)), o;
  });
}
function VJ(e) {
  return [(n) => Z2(n, e.value)];
}
function jJ(e) {
  return function(n) {
    let {
      prefixCls: o,
      onExpand: r,
      record: i,
      expanded: a,
      expandable: l
    } = n;
    const s = `${o}-row-expand-icon`;
    return h("button", {
      type: "button",
      onClick: (u) => {
        r(i, u), u.stopPropagation();
      },
      class: Me(s, {
        [`${s}-spaced`]: !l,
        [`${s}-expanded`]: l && a,
        [`${s}-collapsed`]: l && !a
      }),
      "aria-label": a ? e.collapse : e.expand,
      "aria-expanded": a
    }, null);
  };
}
function J2(e, t) {
  const n = t.value;
  return e.map((o) => {
    var r;
    if (o === vi || o === qi) return o;
    const i = O({}, o), {
      slots: a = {}
    } = i;
    return i.__originColumn__ = o, dn(!("slots" in i), "Table", "`column.slots` is deprecated. Please use `v-slot:headerCell` `v-slot:bodyCell` instead."), Object.keys(a).forEach((l) => {
      const s = a[l];
      i[l] === void 0 && n[s] && (i[l] = n[s]);
    }), t.value.headerCell && !(!((r = o.slots) === null || r === void 0) && r.title) && (i.title = Ah(t.value, "headerCell", {
      title: o.title,
      column: o
    }, () => [o.title])), "children" in i && Array.isArray(i.children) && (i.children = J2(i.children, t)), i;
  });
}
function WJ(e) {
  return [(n) => J2(n, e)];
}
const KJ = (e) => {
  const {
    componentCls: t
  } = e, n = `${e.lineWidth}px ${e.lineType} ${e.tableBorderColor}`, o = (r, i, a) => ({
    [`&${t}-${r}`]: {
      [`> ${t}-container`]: {
        [`> ${t}-content, > ${t}-body`]: {
          "> table > tbody > tr > td": {
            [`> ${t}-expanded-row-fixed`]: {
              margin: `-${i}px -${a + e.lineWidth}px`
            }
          }
        }
      }
    }
  });
  return {
    [`${t}-wrapper`]: {
      [`${t}${t}-bordered`]: O(O(O({
        // ============================ Title =============================
        [`> ${t}-title`]: {
          border: n,
          borderBottom: 0
        },
        // ============================ Content ============================
        [`> ${t}-container`]: {
          borderInlineStart: n,
          [`
            > ${t}-content,
            > ${t}-header,
            > ${t}-body,
            > ${t}-summary
          `]: {
            "> table": {
              // ============================= Cell =============================
              "\n                > thead > tr > th,\n                > tbody > tr > td,\n                > tfoot > tr > th,\n                > tfoot > tr > td\n              ": {
                borderInlineEnd: n
              },
              // ============================ Header ============================
              "> thead": {
                "> tr:not(:last-child) > th": {
                  borderBottom: n
                },
                "> tr > th::before": {
                  backgroundColor: "transparent !important"
                }
              },
              // Fixed right should provides additional border
              "\n                > thead > tr,\n                > tbody > tr,\n                > tfoot > tr\n              ": {
                [`> ${t}-cell-fix-right-first::after`]: {
                  borderInlineEnd: n
                }
              },
              // ========================== Expandable ==========================
              "> tbody > tr > td": {
                [`> ${t}-expanded-row-fixed`]: {
                  margin: `-${e.tablePaddingVertical}px -${e.tablePaddingHorizontal + e.lineWidth}px`,
                  "&::after": {
                    position: "absolute",
                    top: 0,
                    insetInlineEnd: e.lineWidth,
                    bottom: 0,
                    borderInlineEnd: n,
                    content: '""'
                  }
                }
              }
            }
          },
          [`
            > ${t}-content,
            > ${t}-header
          `]: {
            "> table": {
              borderTop: n
            }
          }
        },
        // ============================ Scroll ============================
        [`&${t}-scroll-horizontal`]: {
          [`> ${t}-container > ${t}-body`]: {
            "> table > tbody": {
              [`
                > tr${t}-expanded-row,
                > tr${t}-placeholder
              `]: {
                "> td": {
                  borderInlineEnd: 0
                }
              }
            }
          }
        }
      }, o("middle", e.tablePaddingVerticalMiddle, e.tablePaddingHorizontalMiddle)), o("small", e.tablePaddingVerticalSmall, e.tablePaddingHorizontalSmall)), {
        // ============================ Footer ============================
        [`> ${t}-footer`]: {
          border: n,
          borderTop: 0
        }
      }),
      // ============================ Nested ============================
      [`${t}-cell`]: {
        [`${t}-container:first-child`]: {
          // :first-child to avoid the case when bordered and title is set
          borderTop: 0
        },
        // https://github.com/ant-design/ant-design/issues/35577
        "&-scrollbar:not([rowspan])": {
          boxShadow: `0 ${e.lineWidth}px 0 ${e.lineWidth}px ${e.tableHeaderBg}`
        }
      }
    }
  };
}, qJ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-wrapper`]: {
      [`${t}-cell-ellipsis`]: O(O({}, Ha), {
        wordBreak: "keep-all",
        // Fixed first or last should special process
        [`
          &${t}-cell-fix-left-last,
          &${t}-cell-fix-right-first
        `]: {
          overflow: "visible",
          [`${t}-cell-content`]: {
            display: "block",
            overflow: "hidden",
            textOverflow: "ellipsis"
          }
        },
        [`${t}-column-title`]: {
          overflow: "hidden",
          textOverflow: "ellipsis",
          wordBreak: "keep-all"
        }
      })
    }
  };
}, YJ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-wrapper`]: {
      [`${t}-tbody > tr${t}-placeholder`]: {
        textAlign: "center",
        color: e.colorTextDisabled,
        "&:hover > td": {
          background: e.colorBgContainer
        }
      }
    }
  };
}, GJ = (e) => {
  const {
    componentCls: t,
    antCls: n,
    controlInteractiveSize: o,
    motionDurationSlow: r,
    lineWidth: i,
    paddingXS: a,
    lineType: l,
    tableBorderColor: s,
    tableExpandIconBg: u,
    tableExpandColumnWidth: c,
    borderRadius: d,
    fontSize: f,
    fontSizeSM: p,
    lineHeight: v,
    tablePaddingVertical: g,
    tablePaddingHorizontal: m,
    tableExpandedRowBg: x,
    paddingXXS: S
  } = e, C = o / 2 - i, P = C * 2 + i * 3, $ = `${i}px ${l} ${s}`, I = S - i;
  return {
    [`${t}-wrapper`]: {
      [`${t}-expand-icon-col`]: {
        width: c
      },
      [`${t}-row-expand-icon-cell`]: {
        textAlign: "center",
        [`${t}-row-expand-icon`]: {
          display: "inline-flex",
          float: "none",
          verticalAlign: "sub"
        }
      },
      [`${t}-row-indent`]: {
        height: 1,
        float: "left"
      },
      [`${t}-row-expand-icon`]: O(O({}, XL(e)), {
        position: "relative",
        float: "left",
        boxSizing: "border-box",
        width: P,
        height: P,
        padding: 0,
        color: "inherit",
        lineHeight: `${P}px`,
        background: u,
        border: $,
        borderRadius: d,
        transform: `scale(${o / P})`,
        transition: `all ${r}`,
        userSelect: "none",
        "&:focus, &:hover, &:active": {
          borderColor: "currentcolor"
        },
        "&::before, &::after": {
          position: "absolute",
          background: "currentcolor",
          transition: `transform ${r} ease-out`,
          content: '""'
        },
        "&::before": {
          top: C,
          insetInlineEnd: I,
          insetInlineStart: I,
          height: i
        },
        "&::after": {
          top: I,
          bottom: I,
          insetInlineStart: C,
          width: i,
          transform: "rotate(90deg)"
        },
        // Motion effect
        "&-collapsed::before": {
          transform: "rotate(-180deg)"
        },
        "&-collapsed::after": {
          transform: "rotate(0deg)"
        },
        "&-spaced": {
          "&::before, &::after": {
            display: "none",
            content: "none"
          },
          background: "transparent",
          border: 0,
          visibility: "hidden"
        }
      }),
      [`${t}-row-indent + ${t}-row-expand-icon`]: {
        marginTop: (f * v - i * 3) / 2 - Math.ceil((p * 1.4 - i * 3) / 2),
        marginInlineEnd: a
      },
      [`tr${t}-expanded-row`]: {
        "&, &:hover": {
          "> td": {
            background: x
          }
        },
        // https://github.com/ant-design/ant-design/issues/25573
        [`${n}-descriptions-view`]: {
          display: "flex",
          table: {
            flex: "auto",
            width: "auto"
          }
        }
      },
      // With fixed
      [`${t}-expanded-row-fixed`]: {
        position: "relative",
        margin: `-${g}px -${m}px`,
        padding: `${g}px ${m}px`
      }
    }
  };
}, UJ = (e) => {
  const {
    componentCls: t,
    antCls: n,
    iconCls: o,
    tableFilterDropdownWidth: r,
    tableFilterDropdownSearchWidth: i,
    paddingXXS: a,
    paddingXS: l,
    colorText: s,
    lineWidth: u,
    lineType: c,
    tableBorderColor: d,
    tableHeaderIconColor: f,
    fontSizeSM: p,
    tablePaddingHorizontal: v,
    borderRadius: g,
    motionDurationSlow: m,
    colorTextDescription: x,
    colorPrimary: S,
    tableHeaderFilterActiveBg: C,
    colorTextDisabled: P,
    tableFilterDropdownBg: $,
    tableFilterDropdownHeight: I,
    controlItemBgHover: w,
    controlItemBgActive: _,
    boxShadowSecondary: M
  } = e, N = `${n}-dropdown`, A = `${t}-filter-dropdown`, H = `${n}-tree`, B = `${u}px ${c} ${d}`;
  return [
    {
      [`${t}-wrapper`]: {
        [`${t}-filter-column`]: {
          display: "flex",
          justifyContent: "space-between"
        },
        [`${t}-filter-trigger`]: {
          position: "relative",
          display: "flex",
          alignItems: "center",
          marginBlock: -a,
          marginInline: `${a}px ${-v / 2}px`,
          padding: `0 ${a}px`,
          color: f,
          fontSize: p,
          borderRadius: g,
          cursor: "pointer",
          transition: `all ${m}`,
          "&:hover": {
            color: x,
            background: C
          },
          "&.active": {
            color: S
          }
        }
      }
    },
    {
      // Dropdown
      [`${n}-dropdown`]: {
        [A]: O(O({}, fn(e)), {
          minWidth: r,
          backgroundColor: $,
          borderRadius: g,
          boxShadow: M,
          // Reset menu
          [`${N}-menu`]: {
            // https://github.com/ant-design/ant-design/issues/4916
            // https://github.com/ant-design/ant-design/issues/19542
            maxHeight: I,
            overflowX: "hidden",
            border: 0,
            boxShadow: "none",
            "&:empty::after": {
              display: "block",
              padding: `${l}px 0`,
              color: P,
              fontSize: p,
              textAlign: "center",
              content: '"Not Found"'
            }
          },
          [`${A}-tree`]: {
            paddingBlock: `${l}px 0`,
            paddingInline: l,
            [H]: {
              padding: 0
            },
            [`${H}-treenode ${H}-node-content-wrapper:hover`]: {
              backgroundColor: w
            },
            [`${H}-treenode-checkbox-checked ${H}-node-content-wrapper`]: {
              "&, &:hover": {
                backgroundColor: _
              }
            }
          },
          [`${A}-search`]: {
            padding: l,
            borderBottom: B,
            "&-input": {
              input: {
                minWidth: i
              },
              [o]: {
                color: P
              }
            }
          },
          [`${A}-checkall`]: {
            width: "100%",
            marginBottom: a,
            marginInlineStart: a
          },
          // Operation
          [`${A}-btns`]: {
            display: "flex",
            justifyContent: "space-between",
            padding: `${l - u}px ${l}px`,
            overflow: "hidden",
            backgroundColor: "inherit",
            borderTop: B
          }
        })
      }
    },
    // Dropdown Menu & SubMenu
    {
      // submenu of table filter dropdown
      [`${n}-dropdown ${A}, ${A}-submenu`]: {
        // Checkbox
        [`${n}-checkbox-wrapper + span`]: {
          paddingInlineStart: l,
          color: s
        },
        "> ul": {
          maxHeight: "calc(100vh - 130px)",
          overflowX: "hidden",
          overflowY: "auto"
        }
      }
    }
  ];
}, XJ = (e) => {
  const {
    componentCls: t,
    lineWidth: n,
    colorSplit: o,
    motionDurationSlow: r,
    zIndexTableFixed: i,
    tableBg: a,
    zIndexTableSticky: l
  } = e, s = o;
  return {
    [`${t}-wrapper`]: {
      [`
        ${t}-cell-fix-left,
        ${t}-cell-fix-right
      `]: {
        position: "sticky !important",
        zIndex: i,
        background: a
      },
      [`
        ${t}-cell-fix-left-first::after,
        ${t}-cell-fix-left-last::after
      `]: {
        position: "absolute",
        top: 0,
        right: {
          _skip_check_: !0,
          value: 0
        },
        bottom: -n,
        width: 30,
        transform: "translateX(100%)",
        transition: `box-shadow ${r}`,
        content: '""',
        pointerEvents: "none"
      },
      [`${t}-cell-fix-left-all::after`]: {
        display: "none"
      },
      [`
        ${t}-cell-fix-right-first::after,
        ${t}-cell-fix-right-last::after
      `]: {
        position: "absolute",
        top: 0,
        bottom: -n,
        left: {
          _skip_check_: !0,
          value: 0
        },
        width: 30,
        transform: "translateX(-100%)",
        transition: `box-shadow ${r}`,
        content: '""',
        pointerEvents: "none"
      },
      [`${t}-container`]: {
        "&::before, &::after": {
          position: "absolute",
          top: 0,
          bottom: 0,
          zIndex: l + 1,
          width: 30,
          transition: `box-shadow ${r}`,
          content: '""',
          pointerEvents: "none"
        },
        "&::before": {
          insetInlineStart: 0
        },
        "&::after": {
          insetInlineEnd: 0
        }
      },
      [`${t}-ping-left`]: {
        [`&:not(${t}-has-fix-left) ${t}-container`]: {
          position: "relative",
          "&::before": {
            boxShadow: `inset 10px 0 8px -8px ${s}`
          }
        },
        [`
          ${t}-cell-fix-left-first::after,
          ${t}-cell-fix-left-last::after
        `]: {
          boxShadow: `inset 10px 0 8px -8px ${s}`
        },
        [`${t}-cell-fix-left-last::before`]: {
          backgroundColor: "transparent !important"
        }
      },
      [`${t}-ping-right`]: {
        [`&:not(${t}-has-fix-right) ${t}-container`]: {
          position: "relative",
          "&::after": {
            boxShadow: `inset -10px 0 8px -8px ${s}`
          }
        },
        [`
          ${t}-cell-fix-right-first::after,
          ${t}-cell-fix-right-last::after
        `]: {
          boxShadow: `inset -10px 0 8px -8px ${s}`
        }
      }
    }
  };
}, QJ = (e) => {
  const {
    componentCls: t,
    antCls: n
  } = e;
  return {
    [`${t}-wrapper`]: {
      // ========================== Pagination ==========================
      [`${t}-pagination${n}-pagination`]: {
        margin: `${e.margin}px 0`
      },
      [`${t}-pagination`]: {
        display: "flex",
        flexWrap: "wrap",
        rowGap: e.paddingXS,
        "> *": {
          flex: "none"
        },
        "&-left": {
          justifyContent: "flex-start"
        },
        "&-center": {
          justifyContent: "center"
        },
        "&-right": {
          justifyContent: "flex-end"
        }
      }
    }
  };
}, ZJ = (e) => {
  const {
    componentCls: t,
    tableRadius: n
  } = e;
  return {
    [`${t}-wrapper`]: {
      [t]: {
        // https://github.com/ant-design/ant-design/issues/39115#issuecomment-1362314574
        [`${t}-title, ${t}-header`]: {
          borderRadius: `${n}px ${n}px 0 0`
        },
        [`${t}-title + ${t}-container`]: {
          borderStartStartRadius: 0,
          borderStartEndRadius: 0,
          table: {
            borderRadius: 0,
            "> thead > tr:first-child": {
              "th:first-child": {
                borderRadius: 0
              },
              "th:last-child": {
                borderRadius: 0
              }
            }
          }
        },
        "&-container": {
          borderStartStartRadius: n,
          borderStartEndRadius: n,
          "table > thead > tr:first-child": {
            "> *:first-child": {
              borderStartStartRadius: n
            },
            "> *:last-child": {
              borderStartEndRadius: n
            }
          }
        },
        "&-footer": {
          borderRadius: `0 0 ${n}px ${n}px`
        }
      }
    }
  };
}, JJ = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-wrapper-rtl`]: {
      direction: "rtl",
      table: {
        direction: "rtl"
      },
      [`${t}-pagination-left`]: {
        justifyContent: "flex-end"
      },
      [`${t}-pagination-right`]: {
        justifyContent: "flex-start"
      },
      [`${t}-row-expand-icon`]: {
        "&::after": {
          transform: "rotate(-90deg)"
        },
        "&-collapsed::before": {
          transform: "rotate(180deg)"
        },
        "&-collapsed::after": {
          transform: "rotate(0deg)"
        }
      }
    }
  };
}, eee = (e) => {
  const {
    componentCls: t,
    antCls: n,
    iconCls: o,
    fontSizeIcon: r,
    paddingXS: i,
    tableHeaderIconColor: a,
    tableHeaderIconColorHover: l
  } = e;
  return {
    [`${t}-wrapper`]: {
      // ========================== Selections ==========================
      [`${t}-selection-col`]: {
        width: e.tableSelectionColumnWidth
      },
      [`${t}-bordered ${t}-selection-col`]: {
        width: e.tableSelectionColumnWidth + i * 2
      },
      [`
        table tr th${t}-selection-column,
        table tr td${t}-selection-column
      `]: {
        paddingInlineEnd: e.paddingXS,
        paddingInlineStart: e.paddingXS,
        textAlign: "center",
        [`${n}-radio-wrapper`]: {
          marginInlineEnd: 0
        }
      },
      [`table tr th${t}-selection-column${t}-cell-fix-left`]: {
        zIndex: e.zIndexTableFixed + 1
      },
      [`table tr th${t}-selection-column::after`]: {
        backgroundColor: "transparent !important"
      },
      [`${t}-selection`]: {
        position: "relative",
        display: "inline-flex",
        flexDirection: "column"
      },
      [`${t}-selection-extra`]: {
        position: "absolute",
        top: 0,
        zIndex: 1,
        cursor: "pointer",
        transition: `all ${e.motionDurationSlow}`,
        marginInlineStart: "100%",
        paddingInlineStart: `${e.tablePaddingHorizontal / 4}px`,
        [o]: {
          color: a,
          fontSize: r,
          verticalAlign: "baseline",
          "&:hover": {
            color: l
          }
        }
      }
    }
  };
}, tee = (e) => {
  const {
    componentCls: t
  } = e, n = (o, r, i, a) => ({
    [`${t}${t}-${o}`]: {
      fontSize: a,
      [`
        ${t}-title,
        ${t}-footer,
        ${t}-thead > tr > th,
        ${t}-tbody > tr > td,
        tfoot > tr > th,
        tfoot > tr > td
      `]: {
        padding: `${r}px ${i}px`
      },
      [`${t}-filter-trigger`]: {
        marginInlineEnd: `-${i / 2}px`
      },
      [`${t}-expanded-row-fixed`]: {
        margin: `-${r}px -${i}px`
      },
      [`${t}-tbody`]: {
        // ========================= Nest Table ===========================
        [`${t}-wrapper:only-child ${t}`]: {
          marginBlock: `-${r}px`,
          marginInline: `${e.tableExpandColumnWidth - i}px -${i}px`
        }
      },
      // https://github.com/ant-design/ant-design/issues/35167
      [`${t}-selection-column`]: {
        paddingInlineStart: `${i / 4}px`
      }
    }
  });
  return {
    [`${t}-wrapper`]: O(O({}, n("middle", e.tablePaddingVerticalMiddle, e.tablePaddingHorizontalMiddle, e.tableFontSizeMiddle)), n("small", e.tablePaddingVerticalSmall, e.tablePaddingHorizontalSmall, e.tableFontSizeSmall))
  };
}, nee = (e) => {
  const {
    componentCls: t
  } = e;
  return {
    [`${t}-wrapper ${t}-resize-handle`]: {
      position: "absolute",
      top: 0,
      height: "100% !important",
      bottom: 0,
      left: " auto !important",
      right: " -8px",
      cursor: "col-resize",
      touchAction: "none",
      userSelect: "auto",
      width: "16px",
      zIndex: 1,
      "&-line": {
        display: "block",
        width: "1px",
        marginLeft: "7px",
        height: "100% !important",
        backgroundColor: e.colorPrimary,
        opacity: 0
      },
      "&:hover &-line": {
        opacity: 1
      }
    },
    [`${t}-wrapper  ${t}-resize-handle.dragging`]: {
      overflow: "hidden",
      [`${t}-resize-handle-line`]: {
        opacity: 1
      },
      "&:before": {
        position: "absolute",
        top: 0,
        bottom: 0,
        content: '" "',
        width: "200vw",
        transform: "translateX(-50%)",
        opacity: 0
      }
    }
  };
}, oee = (e) => {
  const {
    componentCls: t,
    marginXXS: n,
    fontSizeIcon: o,
    tableHeaderIconColor: r,
    tableHeaderIconColorHover: i
  } = e;
  return {
    [`${t}-wrapper`]: {
      [`${t}-thead th${t}-column-has-sorters`]: {
        outline: "none",
        cursor: "pointer",
        transition: `all ${e.motionDurationSlow}`,
        "&:hover": {
          background: e.tableHeaderSortHoverBg,
          "&::before": {
            backgroundColor: "transparent !important"
          }
        },
        "&:focus-visible": {
          color: e.colorPrimary
        },
        // https://github.com/ant-design/ant-design/issues/30969
        [`
          &${t}-cell-fix-left:hover,
          &${t}-cell-fix-right:hover
        `]: {
          background: e.tableFixedHeaderSortActiveBg
        }
      },
      [`${t}-thead th${t}-column-sort`]: {
        background: e.tableHeaderSortBg,
        "&::before": {
          backgroundColor: "transparent !important"
        }
      },
      [`td${t}-column-sort`]: {
        background: e.tableBodySortBg
      },
      [`${t}-column-title`]: {
        position: "relative",
        zIndex: 1,
        flex: 1
      },
      [`${t}-column-sorters`]: {
        display: "flex",
        flex: "auto",
        alignItems: "center",
        justifyContent: "space-between",
        "&::after": {
          position: "absolute",
          inset: 0,
          width: "100%",
          height: "100%",
          content: '""'
        }
      },
      [`${t}-column-sorter`]: {
        marginInlineStart: n,
        color: r,
        fontSize: 0,
        transition: `color ${e.motionDurationSlow}`,
        "&-inner": {
          display: "inline-flex",
          flexDirection: "column",
          alignItems: "center"
        },
        "&-up, &-down": {
          fontSize: o,
          "&.active": {
            color: e.colorPrimary
          }
        },
        [`${t}-column-sorter-up + ${t}-column-sorter-down`]: {
          marginTop: "-0.3em"
        }
      },
      [`${t}-column-sorters:hover ${t}-column-sorter`]: {
        color: i
      }
    }
  };
}, ree = (e) => {
  const {
    componentCls: t,
    opacityLoading: n,
    tableScrollThumbBg: o,
    tableScrollThumbBgHover: r,
    tableScrollThumbSize: i,
    tableScrollBg: a,
    zIndexTableSticky: l
  } = e, s = `${e.lineWidth}px ${e.lineType} ${e.tableBorderColor}`;
  return {
    [`${t}-wrapper`]: {
      [`${t}-sticky`]: {
        "&-holder": {
          position: "sticky",
          zIndex: l,
          background: e.colorBgContainer
        },
        "&-scroll": {
          position: "sticky",
          bottom: 0,
          height: `${i}px !important`,
          zIndex: l,
          display: "flex",
          alignItems: "center",
          background: a,
          borderTop: s,
          opacity: n,
          "&:hover": {
            transformOrigin: "center bottom"
          },
          // fake scrollbar style of sticky
          "&-bar": {
            height: i,
            backgroundColor: o,
            borderRadius: 100,
            transition: `all ${e.motionDurationSlow}, transform none`,
            position: "absolute",
            bottom: 0,
            "&:hover, &-active": {
              backgroundColor: r
            }
          }
        }
      }
    }
  };
}, G$ = (e) => {
  const {
    componentCls: t,
    lineWidth: n,
    tableBorderColor: o
  } = e, r = `${n}px ${e.lineType} ${o}`;
  return {
    [`${t}-wrapper`]: {
      [`${t}-summary`]: {
        position: "relative",
        zIndex: e.zIndexTableFixed,
        background: e.tableBg,
        "> tr": {
          "> th, > td": {
            borderBottom: r
          }
        }
      },
      [`div${t}-summary`]: {
        boxShadow: `0 -${n}px 0 ${o}`
      }
    }
  };
}, iee = (e) => {
  const {
    componentCls: t,
    fontWeightStrong: n,
    tablePaddingVertical: o,
    tablePaddingHorizontal: r,
    lineWidth: i,
    lineType: a,
    tableBorderColor: l,
    tableFontSize: s,
    tableBg: u,
    tableRadius: c,
    tableHeaderTextColor: d,
    motionDurationMid: f,
    tableHeaderBg: p,
    tableHeaderCellSplitColor: v,
    tableRowHoverBg: g,
    tableSelectedRowBg: m,
    tableSelectedRowHoverBg: x,
    tableFooterTextColor: S,
    tableFooterBg: C,
    paddingContentVerticalLG: P
  } = e, $ = `${i}px ${a} ${l}`;
  return {
    [`${t}-wrapper`]: O(O({
      clear: "both",
      maxWidth: "100%"
    }, Va()), {
      [t]: O(O({}, fn(e)), {
        fontSize: s,
        background: u,
        borderRadius: `${c}px ${c}px 0 0`
      }),
      // https://github.com/ant-design/ant-design/issues/17611
      table: {
        width: "100%",
        textAlign: "start",
        borderRadius: `${c}px ${c}px 0 0`,
        borderCollapse: "separate",
        borderSpacing: 0
      },
      // ============================= Cell =============================
      [`
          ${t}-thead > tr > th,
          ${t}-tbody > tr > td,
          tfoot > tr > th,
          tfoot > tr > td
        `]: {
        position: "relative",
        padding: `${P}px ${r}px`,
        overflowWrap: "break-word"
      },
      // ============================ Title =============================
      [`${t}-title`]: {
        padding: `${o}px ${r}px`
      },
      // ============================ Header ============================
      [`${t}-thead`]: {
        "\n          > tr > th,\n          > tr > td\n        ": {
          position: "relative",
          color: d,
          fontWeight: n,
          textAlign: "start",
          background: p,
          borderBottom: $,
          transition: `background ${f} ease`,
          "&[colspan]:not([colspan='1'])": {
            textAlign: "center"
          },
          [`&:not(:last-child):not(${t}-selection-column):not(${t}-row-expand-icon-cell):not([colspan])::before`]: {
            position: "absolute",
            top: "50%",
            insetInlineEnd: 0,
            width: 1,
            height: "1.6em",
            backgroundColor: v,
            transform: "translateY(-50%)",
            transition: `background-color ${f}`,
            content: '""'
          }
        },
        "> tr:not(:last-child) > th[colspan]": {
          borderBottom: 0
        }
      },
      // ============================ Body ============================
      // Borderless Table has unique hover style, which would be implemented with `borderTop`.
      [`${t}:not(${t}-bordered)`]: {
        [`${t}-tbody`]: {
          "> tr": {
            "> td": {
              borderTop: $,
              borderBottom: "transparent"
            },
            "&:last-child > td": {
              borderBottom: $
            },
            [`&:first-child > td,
              &${t}-measure-row + tr > td`]: {
              borderTop: "none",
              borderTopColor: "transparent"
            }
          }
        }
      },
      // Bordered Table remains simple `borderBottom`.
      // Ref issue: https://github.com/ant-design/ant-design/issues/38724
      [`${t}${t}-bordered`]: {
        [`${t}-tbody`]: {
          "> tr": {
            "> td": {
              borderBottom: $
            }
          }
        }
      },
      [`${t}-tbody`]: {
        "> tr": {
          "> td": {
            transition: `background ${f}, border-color ${f}`,
            // ========================= Nest Table ===========================
            [`
              > ${t}-wrapper:only-child,
              > ${t}-expanded-row-fixed > ${t}-wrapper:only-child
            `]: {
              [t]: {
                marginBlock: `-${o}px`,
                marginInline: `${e.tableExpandColumnWidth - r}px -${r}px`,
                [`${t}-tbody > tr:last-child > td`]: {
                  borderBottom: 0,
                  "&:first-child, &:last-child": {
                    borderRadius: 0
                  }
                }
              }
            }
          },
          [`
            &${t}-row:hover > td,
            > td${t}-cell-row-hover
          `]: {
            background: g
          },
          [`&${t}-row-selected`]: {
            "> td": {
              background: m
            },
            "&:hover > td": {
              background: x
            }
          }
        }
      },
      // ============================ Footer ============================
      [`${t}-footer`]: {
        padding: `${o}px ${r}px`,
        color: S,
        background: C
      }
    })
  };
}, aee = Sn("Table", (e) => {
  const {
    controlItemBgActive: t,
    controlItemBgActiveHover: n,
    colorTextPlaceholder: o,
    colorTextHeading: r,
    colorSplit: i,
    colorBorderSecondary: a,
    fontSize: l,
    padding: s,
    paddingXS: u,
    paddingSM: c,
    controlHeight: d,
    colorFillAlter: f,
    colorIcon: p,
    colorIconHover: v,
    opacityLoading: g,
    colorBgContainer: m,
    borderRadiusLG: x,
    colorFillContent: S,
    colorFillSecondary: C,
    controlInteractiveSize: P
  } = e, $ = new _n(p), I = new _n(v), w = t, _ = 2, M = new _n(C).onBackground(m).toHexString(), N = new _n(S).onBackground(m).toHexString(), A = new _n(f).onBackground(m).toHexString(), H = Qt(e, {
    tableFontSize: l,
    tableBg: m,
    tableRadius: x,
    tablePaddingVertical: s,
    tablePaddingHorizontal: s,
    tablePaddingVerticalMiddle: c,
    tablePaddingHorizontalMiddle: u,
    tablePaddingVerticalSmall: u,
    tablePaddingHorizontalSmall: u,
    tableBorderColor: a,
    tableHeaderTextColor: r,
    tableHeaderBg: A,
    tableFooterTextColor: r,
    tableFooterBg: A,
    tableHeaderCellSplitColor: a,
    tableHeaderSortBg: M,
    tableHeaderSortHoverBg: N,
    tableHeaderIconColor: $.clone().setAlpha($.getAlpha() * g).toRgbString(),
    tableHeaderIconColorHover: I.clone().setAlpha(I.getAlpha() * g).toRgbString(),
    tableBodySortBg: A,
    tableFixedHeaderSortActiveBg: M,
    tableHeaderFilterActiveBg: S,
    tableFilterDropdownBg: m,
    tableRowHoverBg: A,
    tableSelectedRowBg: w,
    tableSelectedRowHoverBg: n,
    zIndexTableFixed: _,
    zIndexTableSticky: _ + 1,
    tableFontSizeMiddle: l,
    tableFontSizeSmall: l,
    tableSelectionColumnWidth: d,
    tableExpandIconBg: m,
    tableExpandColumnWidth: P + 2 * e.padding,
    tableExpandedRowBg: f,
    // Dropdown
    tableFilterDropdownWidth: 120,
    tableFilterDropdownHeight: 264,
    tableFilterDropdownSearchWidth: 140,
    // Virtual Scroll Bar
    tableScrollThumbSize: 8,
    tableScrollThumbBg: o,
    tableScrollThumbBgHover: r,
    tableScrollBg: i
  });
  return [iee(H), QJ(H), G$(H), oee(H), UJ(H), KJ(H), ZJ(H), GJ(H), G$(H), YJ(H), eee(H), XJ(H), ree(H), qJ(H), tee(H), nee(H), JJ(H)];
}), lee = [], eE = () => ({
  prefixCls: an(),
  columns: jn(),
  rowKey: en([String, Function]),
  tableLayout: an(),
  rowClassName: en([String, Function]),
  title: et(),
  footer: et(),
  id: an(),
  showHeader: ct(),
  components: Et(),
  customRow: et(),
  customHeaderRow: et(),
  direction: an(),
  expandFixed: en([Boolean, String]),
  expandColumnWidth: Number,
  expandedRowKeys: jn(),
  defaultExpandedRowKeys: jn(),
  expandedRowRender: et(),
  expandRowByClick: ct(),
  expandIcon: et(),
  onExpand: et(),
  onExpandedRowsChange: et(),
  "onUpdate:expandedRowKeys": et(),
  defaultExpandAllRows: ct(),
  indentSize: Number,
  /** @deprecated Please use `EXPAND_COLUMN` in `columns` directly */
  expandIconColumnIndex: Number,
  showExpandColumn: ct(),
  expandedRowClassName: et(),
  childrenColumnName: an(),
  rowExpandable: et(),
  sticky: en([Boolean, Object]),
  dropdownPrefixCls: String,
  dataSource: jn(),
  pagination: en([Boolean, Object]),
  loading: en([Boolean, Object]),
  size: an(),
  bordered: ct(),
  locale: Et(),
  onChange: et(),
  onResizeColumn: et(),
  rowSelection: Et(),
  getPopupContainer: et(),
  scroll: Et(),
  sortDirections: jn(),
  showSorterTooltip: en([Boolean, Object], !0),
  transformCellText: et()
}), see = be({
  name: "InternalTable",
  inheritAttrs: !1,
  props: kn(O(O({}, eE()), {
    contextSlots: Et()
  }), {
    rowKey: "key"
  }),
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      expose: r,
      emit: i
    } = t;
    dn(!(typeof e.rowKey == "function" && e.rowKey.length > 1), "Table", "`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected."), XQ(E(() => e.contextSlots)), QQ({
      onResizeColumn: (Ne, Xe) => {
        i("resizeColumn", Ne, Xe);
      }
    });
    const a = R_(), l = E(() => {
      const Ne = new Set(Object.keys(a.value).filter((Xe) => a.value[Xe]));
      return e.columns.filter((Xe) => !Xe.responsive || Xe.responsive.some((De) => Ne.has(De)));
    }), {
      size: s,
      renderEmpty: u,
      direction: c,
      prefixCls: d,
      configProvider: f
    } = _t("table", e), [p, v] = aee(d), g = E(() => {
      var Ne;
      return e.transformCellText || ((Ne = f.transformCellText) === null || Ne === void 0 ? void 0 : Ne.value);
    }), [m] = Rl("Table", Ba.Table, Kt(e, "locale")), x = E(() => e.dataSource || lee), S = E(() => f.getPrefixCls("dropdown", e.dropdownPrefixCls)), C = E(() => e.childrenColumnName || "children"), P = E(() => x.value.some((Ne) => Ne?.[C.value]) ? "nest" : e.expandedRowRender ? "row" : null), $ = Pn({
      body: null
    }), I = (Ne) => {
      O($, Ne);
    }, w = E(() => typeof e.rowKey == "function" ? e.rowKey : (Ne) => Ne?.[e.rowKey]), [_] = jZ(x, C, w), M = {}, N = function(Ne, Xe) {
      let De = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
      const {
        pagination: Fe,
        scroll: Ve,
        onChange: nt
      } = e, je = O(O({}, M), Ne);
      De && (M.resetPagination(), je.pagination.current && (je.pagination.current = 1), Fe && Fe.onChange && Fe.onChange(1, je.pagination.pageSize)), Ve && Ve.scrollToFirstRowOnChange !== !1 && $.body && h6(0, {
        getContainer: () => $.body
      }), nt?.(je.pagination, je.filters, je.sorter, {
        currentDataSource: Y$(Ub(x.value, je.sorterStates, C.value), je.filterStates),
        action: Xe
      });
    }, A = (Ne, Xe) => {
      N({
        sorter: Ne,
        sorterStates: Xe
      }, "sort", !1);
    }, [H, B, F, R] = ZZ({
      prefixCls: d,
      mergedColumns: l,
      onSorterChange: A,
      sortDirections: E(() => e.sortDirections || ["ascend", "descend"]),
      tableLocale: m,
      showSorterTooltip: Kt(e, "showSorterTooltip")
    }), X = E(() => Ub(x.value, B.value, C.value)), j = (Ne, Xe) => {
      N({
        filters: Ne,
        filterStates: Xe
      }, "filter", !0);
    }, [ee, W, K] = HJ({
      prefixCls: d,
      locale: m,
      dropdownPrefixCls: S,
      mergedColumns: l,
      onFilterChange: j,
      getPopupContainer: Kt(e, "getPopupContainer")
    }), q = E(() => Y$(X.value, W.value)), [G] = WJ(Kt(e, "contextSlots")), ae = E(() => {
      const Ne = {}, Xe = K.value;
      return Object.keys(Xe).forEach((De) => {
        Xe[De] !== null && (Ne[De] = Xe[De]);
      }), O(O({}, F.value), {
        filters: Ne
      });
    }), [le] = VJ(ae), ie = (Ne, Xe) => {
      N({
        pagination: O(O({}, M.pagination), {
          current: Ne,
          pageSize: Xe
        })
      }, "paginate");
    }, [re, te] = VZ(E(() => q.value.length), Kt(e, "pagination"), ie);
    It(() => {
      M.sorter = R.value, M.sorterStates = B.value, M.filters = K.value, M.filterStates = W.value, M.pagination = e.pagination === !1 ? {} : HZ(re.value, e.pagination), M.resetPagination = te;
    });
    const ve = E(() => {
      if (e.pagination === !1 || !re.value.pageSize)
        return q.value;
      const {
        current: Ne = 1,
        total: Xe,
        pageSize: De = Wb
      } = re.value;
      return dn(Ne > 0, "Table", "`current` should be positive number."), q.value.length < Xe ? q.value.length > De ? q.value.slice((Ne - 1) * De, Ne * De) : q.value : q.value.slice((Ne - 1) * De, Ne * De);
    });
    It(() => {
      Yt(() => {
        const {
          total: Ne,
          pageSize: Xe = Wb
        } = re.value;
        q.value.length < Ne && q.value.length > Xe && dn(!1, "Table", "`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode.");
      });
    }, {
      flush: "post"
    });
    const ue = E(() => e.showExpandColumn === !1 ? -1 : P.value === "nest" && e.expandIconColumnIndex === void 0 ? e.rowSelection ? 1 : 0 : e.expandIconColumnIndex > 0 && e.rowSelection ? e.expandIconColumnIndex - 1 : e.expandIconColumnIndex), pe = ce();
    ke(() => e.rowSelection, () => {
      pe.value = e.rowSelection ? O({}, e.rowSelection) : e.rowSelection;
    }, {
      deep: !0,
      immediate: !0
    });
    const [ge, _e] = KZ(pe, {
      prefixCls: d,
      data: q,
      pageData: ve,
      getRowKey: w,
      getRecordByKey: _,
      expandType: P,
      childrenColumnName: C,
      locale: m,
      getPopupContainer: E(() => e.getPopupContainer)
    }), ze = (Ne, Xe, De) => {
      let Fe;
      const {
        rowClassName: Ve
      } = e;
      return typeof Ve == "function" ? Fe = Me(Ve(Ne, Xe, De)) : Fe = Me(Ve), Me({
        [`${d.value}-row-selected`]: _e.value.has(w.value(Ne, Xe))
      }, Fe);
    };
    r({
      selectedKeySet: _e
    });
    const Ke = E(() => typeof e.indentSize == "number" ? e.indentSize : 15), He = (Ne) => le(ge(ee(H(G(Ne)))));
    return () => {
      var Ne;
      const {
        expandIcon: Xe = o.expandIcon || jJ(m.value),
        pagination: De,
        loading: Fe,
        bordered: Ve
      } = e;
      let nt, je;
      if (De !== !1 && (!((Ne = re.value) === null || Ne === void 0) && Ne.total)) {
        let Ce;
        re.value.size ? Ce = re.value.size : Ce = s.value === "small" || s.value === "middle" ? "small" : void 0;
        const Ae = (tt) => h(uQ, Q(Q({}, re.value), {}, {
          class: [`${d.value}-pagination ${d.value}-pagination-${tt}`, re.value.class],
          size: Ce
        }), null), qe = c.value === "rtl" ? "left" : "right", {
          position: We
        } = re.value;
        if (We !== null && Array.isArray(We)) {
          const tt = We.find((Be) => Be.includes("top")), Ee = We.find((Be) => Be.includes("bottom")), Re = We.every((Be) => `${Be}` == "none");
          !tt && !Ee && !Re && (je = Ae(qe)), tt && (nt = Ae(tt.toLowerCase().replace("top", ""))), Ee && (je = Ae(Ee.toLowerCase().replace("bottom", "")));
        } else
          je = Ae(qe);
      }
      let Pe;
      typeof Fe == "boolean" ? Pe = {
        spinning: Fe
      } : typeof Fe == "object" && (Pe = O({
        spinning: !0
      }, Fe));
      const Ge = Me(`${d.value}-wrapper`, {
        [`${d.value}-wrapper-rtl`]: c.value === "rtl"
      }, n.class, v.value), Se = Fn(e, ["columns"]);
      return p(h("div", {
        class: Ge,
        style: n.style
      }, [h(Xo, Q({
        spinning: !1
      }, Pe), {
        default: () => [nt, h(BZ, Q(Q(Q({}, n), Se), {}, {
          expandedRowKeys: e.expandedRowKeys,
          defaultExpandedRowKeys: e.defaultExpandedRowKeys,
          expandIconColumnIndex: ue.value,
          indentSize: Ke.value,
          expandIcon: Xe,
          columns: l.value,
          direction: c.value,
          prefixCls: d.value,
          class: Me({
            [`${d.value}-middle`]: s.value === "middle",
            [`${d.value}-small`]: s.value === "small",
            [`${d.value}-bordered`]: Ve,
            [`${d.value}-empty`]: x.value.length === 0
          }),
          data: ve.value,
          rowKey: w.value,
          rowClassName: ze,
          internalHooks: jb,
          internalRefs: $,
          onUpdateInternalRefs: I,
          transformColumns: He,
          transformCellText: g.value
        }), O(O({}, o), {
          emptyText: () => {
            var Ce, Ae;
            return ((Ce = o.emptyText) === null || Ce === void 0 ? void 0 : Ce.call(o)) || ((Ae = e.locale) === null || Ae === void 0 ? void 0 : Ae.emptyText) || u("Table");
          }
        })), je]
      })]));
    };
  }
}), Wv = be({
  name: "ATable",
  inheritAttrs: !1,
  props: kn(eE(), {
    rowKey: "key"
  }),
  slots: Object,
  setup(e, t) {
    let {
      attrs: n,
      slots: o,
      expose: r
    } = t;
    const i = ce();
    return r({
      table: i
    }), () => {
      var a;
      const l = e.columns || W2((a = o.default) === null || a === void 0 ? void 0 : a.call(o));
      return h(see, Q(Q(Q({
        ref: i
      }, n), e), {}, {
        columns: l || [],
        expandedRowRender: o.expandedRowRender || e.expandedRowRender,
        contextSlots: O({}, o)
      }), o);
    };
  }
}), Kv = be({
  name: "ATableColumn",
  slots: Object,
  render() {
    return null;
  }
}), qv = be({
  name: "ATableColumnGroup",
  slots: Object,
  __ANT_TABLE_COLUMN_GROUP: !0,
  render() {
    return null;
  }
}), Zb = kZ, Jb = TZ, Yv = O(MZ, {
  Cell: Jb,
  Row: Zb,
  name: "ATableSummary"
}), uee = O(Wv, {
  SELECTION_ALL: Kb,
  SELECTION_INVERT: qb,
  SELECTION_NONE: Yb,
  SELECTION_COLUMN: vi,
  EXPAND_COLUMN: qi,
  Column: Kv,
  ColumnGroup: qv,
  Summary: Yv,
  install: (e) => (e.component(Yv.name, Yv), e.component(Jb.name, Jb), e.component(Zb.name, Zb), e.component(Wv.name, Wv), e.component(Kv.name, Kv), e.component(qv.name, qv), e)
}), tE = Symbol("appConfigContext"), cee = (e) => Ft(tE, e), dee = () => zt(tE, {}), nE = Symbol("appContext"), fee = (e) => Ft(nE, e), pee = Pn({
  message: {},
  notification: {},
  modal: {}
}), hee = () => zt(nE, pee), gee = (e) => {
  const {
    componentCls: t,
    colorText: n,
    fontSize: o,
    lineHeight: r,
    fontFamily: i
  } = e;
  return {
    [t]: {
      color: n,
      fontSize: o,
      lineHeight: r,
      fontFamily: i
    }
  };
}, vee = Sn("App", (e) => [gee(e)]), mee = () => ({
  rootClassName: String,
  message: Et(),
  notification: Et()
}), bee = () => hee(), Ru = be({
  name: "AApp",
  props: kn(mee(), {}),
  setup(e, t) {
    let {
      slots: n
    } = t;
    const {
      prefixCls: o
    } = _t("app", e), [r, i] = vee(o), a = E(() => Me(i.value, o.value, e.rootClassName)), l = dee(), s = E(() => ({
      message: O(O({}, l.message), e.message),
      notification: O(O({}, l.notification), e.notification)
    }));
    cee(s.value);
    const [u, c] = MM(s.value.message), [d, f] = WM(s.value.notification), [p, v] = m2(), g = E(() => ({
      message: u,
      notification: d,
      modal: p
    }));
    return fee(g.value), () => {
      var m;
      return r(h("div", {
        class: a.value
      }, [v(), c(), f(), (m = n.default) === null || m === void 0 ? void 0 : m.call(n)]));
    };
  }
});
Ru.useApp = bee;
Ru.install = function(e) {
  e.component(Ru.name, Ru);
};
const vl = (e, t) => new _n(e).setAlpha(t).toRgbString(), cu = (e, t) => new _n(e).lighten(t).toHexString(), yee = (e) => {
  const t = La(e, {
    theme: "dark"
  });
  return {
    1: t[0],
    2: t[1],
    3: t[2],
    4: t[3],
    5: t[6],
    6: t[5],
    7: t[4],
    8: t[6],
    9: t[5],
    10: t[4]
    // 8: colors[9],
    // 9: colors[8],
    // 10: colors[7],
  };
}, xee = (e, t) => {
  const n = e || "#000", o = t || "#fff";
  return {
    colorBgBase: n,
    colorTextBase: o,
    colorText: vl(o, 0.85),
    colorTextSecondary: vl(o, 0.65),
    colorTextTertiary: vl(o, 0.45),
    colorTextQuaternary: vl(o, 0.25),
    colorFill: vl(o, 0.18),
    colorFillSecondary: vl(o, 0.12),
    colorFillTertiary: vl(o, 0.08),
    colorFillQuaternary: vl(o, 0.04),
    colorBgElevated: cu(n, 12),
    colorBgContainer: cu(n, 8),
    colorBgLayout: cu(n, 0),
    colorBgSpotlight: cu(n, 26),
    colorBorder: cu(n, 26),
    colorBorderSecondary: cu(n, 19)
  };
}, wee = (e, t) => {
  const n = Object.keys(Zy).map((r) => {
    const i = La(e[r], {
      theme: "dark"
    });
    return new Array(10).fill(1).reduce((a, l, s) => (a[`${r}-${s + 1}`] = i[s], a), {});
  }).reduce((r, i) => (r = O(O({}, r), i), r), {}), o = t ?? Jy(e);
  return O(O(O({}, o), n), DI(e, {
    generateColorPalettes: yee,
    generateNeutralColorPalettes: xee
  }));
}, U$ = {
  /** Default seedToken */
  defaultSeed: t0.token,
  defaultAlgorithm: Jy,
  darkAlgorithm: wee
}, See = typeof window < "u";
var X$;
See && ((X$ = window?.navigator) != null && X$.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function kr(e) {
  return e == null;
}
function oE() {
}
const Cee = Object.freeze({
  aliceblue: "f0f8ff",
  antiquewhite: "faebd7",
  aqua: "0ff",
  aquamarine: "7fffd4",
  azure: "f0ffff",
  beige: "f5f5dc",
  bisque: "ffe4c4",
  black: "000",
  blanchedalmond: "ffebcd",
  blue: "00f",
  blueviolet: "8a2be2",
  brown: "a52a2a",
  burlywood: "deb887",
  burntsienna: "ea7e5d",
  cadetblue: "5f9ea0",
  chartreuse: "7fff00",
  chocolate: "d2691e",
  coral: "ff7f50",
  cornflowerblue: "6495ed",
  cornsilk: "fff8dc",
  crimson: "dc143c",
  cyan: "0ff",
  darkblue: "00008b",
  darkcyan: "008b8b",
  darkgoldenrod: "b8860b",
  darkgray: "a9a9a9",
  darkgreen: "006400",
  darkgrey: "a9a9a9",
  darkkhaki: "bdb76b",
  darkmagenta: "8b008b",
  darkolivegreen: "556b2f",
  darkorange: "ff8c00",
  darkorchid: "9932cc",
  darkred: "8b0000",
  darksalmon: "e9967a",
  darkseagreen: "8fbc8f",
  darkslateblue: "483d8b",
  darkslategray: "2f4f4f",
  darkslategrey: "2f4f4f",
  darkturquoise: "00ced1",
  darkviolet: "9400d3",
  deeppink: "ff1493",
  deepskyblue: "00bfff",
  dimgray: "696969",
  dimgrey: "696969",
  dodgerblue: "1e90ff",
  firebrick: "b22222",
  floralwhite: "fffaf0",
  forestgreen: "228b22",
  fuchsia: "f0f",
  gainsboro: "dcdcdc",
  ghostwhite: "f8f8ff",
  gold: "ffd700",
  goldenrod: "daa520",
  gray: "808080",
  green: "008000",
  greenyellow: "adff2f",
  grey: "808080",
  honeydew: "f0fff0",
  hotpink: "ff69b4",
  indianred: "cd5c5c",
  indigo: "4b0082",
  ivory: "fffff0",
  khaki: "f0e68c",
  lavender: "e6e6fa",
  lavenderblush: "fff0f5",
  lawngreen: "7cfc00",
  lemonchiffon: "fffacd",
  lightblue: "add8e6",
  lightcoral: "f08080",
  lightcyan: "e0ffff",
  lightgoldenrodyellow: "fafad2",
  lightgray: "d3d3d3",
  lightgreen: "90ee90",
  lightgrey: "d3d3d3",
  lightpink: "ffb6c1",
  lightsalmon: "ffa07a",
  lightseagreen: "20b2aa",
  lightskyblue: "87cefa",
  lightslategray: "789",
  lightslategrey: "789",
  lightsteelblue: "b0c4de",
  lightyellow: "ffffe0",
  lime: "0f0",
  limegreen: "32cd32",
  linen: "faf0e6",
  magenta: "f0f",
  maroon: "800000",
  mediumaquamarine: "66cdaa",
  mediumblue: "0000cd",
  mediumorchid: "ba55d3",
  mediumpurple: "9370db",
  mediumseagreen: "3cb371",
  mediumslateblue: "7b68ee",
  mediumspringgreen: "00fa9a",
  mediumturquoise: "48d1cc",
  mediumvioletred: "c71585",
  midnightblue: "191970",
  mintcream: "f5fffa",
  mistyrose: "ffe4e1",
  moccasin: "ffe4b5",
  navajowhite: "ffdead",
  navy: "000080",
  oldlace: "fdf5e6",
  olive: "808000",
  olivedrab: "6b8e23",
  orange: "ffa500",
  orangered: "ff4500",
  orchid: "da70d6",
  palegoldenrod: "eee8aa",
  palegreen: "98fb98",
  paleturquoise: "afeeee",
  palevioletred: "db7093",
  papayawhip: "ffefd5",
  peachpuff: "ffdab9",
  peru: "cd853f",
  pink: "ffc0cb",
  plum: "dda0dd",
  powderblue: "b0e0e6",
  purple: "800080",
  rebeccapurple: "663399",
  red: "f00",
  rosybrown: "bc8f8f",
  royalblue: "4169e1",
  saddlebrown: "8b4513",
  salmon: "fa8072",
  sandybrown: "f4a460",
  seagreen: "2e8b57",
  seashell: "fff5ee",
  sienna: "a0522d",
  silver: "c0c0c0",
  skyblue: "87ceeb",
  slateblue: "6a5acd",
  slategray: "708090",
  slategrey: "708090",
  snow: "fffafa",
  springgreen: "00ff7f",
  steelblue: "4682b4",
  tan: "d2b48c",
  teal: "008080",
  thistle: "d8bfd8",
  tomato: "ff6347",
  turquoise: "40e0d0",
  violet: "ee82ee",
  wheat: "f5deb3",
  white: "fff",
  whitesmoke: "f5f5f5",
  yellow: "ff0",
  yellowgreen: "9acd32"
});
Object.freeze(new Set(Object.keys(Cee)));
function $ee() {
  const e = /* @__PURE__ */ new Map();
  return {
    on(t, n) {
      const o = e.get(t);
      o?.add(n) || e.set(t, /* @__PURE__ */ new Set([n]));
    },
    off(t, n) {
      const o = e.get(t);
      o && o.delete(n);
    },
    clear(t) {
      const n = e.get(t);
      n && n.clear();
    },
    clearAll() {
      e.clear();
    },
    emit(t, ...n) {
      const o = e.get(t);
      o && o.forEach((r) => {
        r(...n);
      });
    }
  };
}
function Q$(e, t = 16) {
  if (typeof e != "function")
    return oE;
  const n = (...i) => {
    e(...i);
  };
  if (t <= 0)
    return rE(n);
  let o = 0, r;
  return function(...i) {
    const a = Date.now(), l = a - o;
    clearTimeout(r), l >= t ? (o = a, n(...i)) : r = setTimeout(
      () => {
        o = Date.now(), n(...i);
      },
      Math.max(0, t - l)
    );
  };
}
function Pee(e, t = 100) {
  if (typeof e != "function")
    return oE;
  const n = (...r) => {
    e(...r);
  };
  if (t <= 0)
    return rE(n);
  let o;
  return function(...r) {
    clearTimeout(o), o = setTimeout(() => {
      n(...r);
    }, t);
  };
}
function rE(e) {
  if (typeof e != "function")
    return e;
  let t = !1, n, o;
  return function(...r) {
    return n = r, t || (t = !0, o = Promise.resolve().then(() => (t = !1, o = void 0, e(...n)))), o;
  };
}
const od = /* @__PURE__ */ new Set(), iE = /* @__PURE__ */ new WeakMap();
function Oee() {
  od.forEach((e) => {
    e(...iE.get(e));
  }), od.clear();
}
function rr(e, ...t) {
  if (typeof e != "function")
    return e;
  iE.set(e, t), !od.has(e) && (od.add(e), od.size === 1 && Promise.resolve().then(Oee));
}
const aE = Symbol("LAYOUT_KEY"), lE = Symbol("EMITTER_KEY");
function kee(e) {
  let t = 0, n;
  for (let o = 0, r = e.length; o < r; o++)
    n = e[o].y + e[o].h, n > t && (t = n);
  return t;
}
function ey(e) {
  const t = Array(e.length);
  for (let n = 0, o = e.length; n < o; n++)
    t[n] = Iee(e[n]);
  return t;
}
function Iee(e) {
  return { ...e };
}
function sE(e, t) {
  return !(e === t || e.x + e.w <= t.x || e.x >= t.x + t.w || e.y + e.h <= t.y || e.y >= t.y + t.h);
}
function mu(e, t, n) {
  const o = cE(e), r = dE(e), i = Array(e.length);
  for (let a = 0, l = r.length; a < l; a++) {
    let s = r[a];
    s.static || (s = _ee(o, s, t, n), o.push(s)), i[e.findIndex((u) => u.i === s.i)] = s, s.moved = !1;
  }
  return i;
}
function _ee(e, t, n, o) {
  if (n)
    for (; t.y > 0 && !rd(e, t); )
      t.y--;
  else if (o) {
    const i = o[t.i].y;
    for (; t.y > i && !rd(e, t); )
      t.y--;
  }
  let r;
  for (; r = rd(e, t); )
    t.y = r.y + r.h;
  return t;
}
function Tee(e, t) {
  const n = cE(e);
  for (let o = 0, r = e.length; o < r; o++) {
    const i = e[o];
    if (i.x + i.w > t.cols && (i.x = t.cols - i.w), i.x < 0 && (i.x = 0, i.w = t.cols), !i.static) n.push(i);
    else
      for (; rd(n, i); )
        i.y++;
  }
  return e;
}
function Z$(e, t) {
  for (let n = 0, o = e.length; n < o; n++)
    if (e[n].i === t) return e[n];
}
function rd(e, t) {
  for (let n = 0, o = e.length; n < o; n++)
    if (sE(e[n], t)) return e[n];
}
function uE(e, t) {
  return e.filter((n) => sE(n, t));
}
function cE(e) {
  return e.filter((t) => t.static);
}
function ty(e, t, n, o, r = !1, i = !1) {
  if (t.static) return e;
  const a = t.x, l = t.y, s = o && t.y > o;
  typeof n == "number" && (t.x = n), typeof o == "number" && (t.y = o), t.moved = !0;
  let u = dE(e);
  s && (u = u.reverse());
  const c = uE(u, t);
  if (i && c.length)
    return t.x = a, t.y = l, t.moved = !1, e;
  for (let d = 0, f = c.length; d < f; d++) {
    const p = c[d];
    p.moved || t.y > p.y && t.y - p.y > p.h / 4 || (p.static ? e = J$(e, p, t, r) : e = J$(e, t, p, r));
  }
  return e;
}
function J$(e, t, n, o) {
  if (o) {
    const r = {
      x: n.x,
      y: n.y,
      w: n.w,
      h: n.h
    };
    if (r.y = Math.max(t.y - n.h, 0), !rd(e, r))
      return ty(e, n, void 0, r.y, !1);
  }
  return ty(e, n, void 0, n.y + 1, !1);
}
function Mee(e, t, n, o) {
  const r = "translate3d(" + t + "px," + e + "px, 0)";
  return {
    transform: r,
    WebkitTransform: r,
    MozTransform: r,
    msTransform: r,
    OTransform: r,
    width: n + "px",
    height: o + "px",
    position: "absolute"
  };
}
function Eee(e, t, n, o) {
  const r = "translate3d(" + t * -1 + "px," + e + "px, 0)";
  return {
    transform: r,
    WebkitTransform: r,
    MozTransform: r,
    msTransform: r,
    OTransform: r,
    width: n + "px",
    height: o + "px",
    position: "absolute"
  };
}
function Dee(e, t, n, o) {
  return {
    top: e + "px",
    left: t + "px",
    width: n + "px",
    height: o + "px",
    position: "absolute"
  };
}
function Aee(e, t, n, o) {
  return {
    top: e + "px",
    right: t + "px",
    width: n + "px",
    height: o + "px",
    position: "absolute"
  };
}
function dE(e) {
  return Array.from(e).sort(function(t, n) {
    return t.y === n.y && t.x === n.x ? 0 : t.y > n.y || t.y === n.y && t.x > n.x ? 1 : -1;
  });
}
function Nee(e, t) {
  t = t || "Layout";
  const n = ["x", "y", "w", "h"], o = [];
  if (!Array.isArray(e)) throw new Error(t + " must be an array!");
  for (let r = 0, i = e.length; r < i; r++) {
    const a = e[r];
    for (let l = 0; l < n.length; l++)
      if (typeof a[n[l]] != "number")
        throw new Error(
          "VueGridLayout: " + t + "[" + r + "]." + n[l] + " must be a number!"
        );
    if (a.i === void 0 || a.i === null)
      throw new Error("VueGridLayout: " + t + "[" + r + "].i cannot be null!");
    if (typeof a.i != "number" && typeof a.i != "string")
      throw new Error("VueGridLayout: " + t + "[" + r + "].i must be a string or number!");
    if (o.indexOf(a.i) >= 0)
      throw new Error("VueGridLayout: " + t + "[" + r + "].i must be unique!");
    if (o.push(a.i), a.static !== void 0 && typeof a.static != "boolean")
      throw new Error("VueGridLayout: " + t + "[" + r + "].static must be a boolean!");
  }
}
function Ree(e, t = "vgl") {
  const n = () => `${t}-${e}`;
  return {
    b: n,
    be: (o) => `${n()}__${o}`,
    bm: (o) => `${n()}--${o}`,
    bem: (o, r) => `${n()}__${o}--${r}`
  };
}
function eP(e) {
  return zee(e);
}
function zee(e) {
  var t;
  const n = ((t = e.target) == null ? void 0 : t.offsetParent) || document.body, o = e.offsetParent === document.body ? { left: 0, top: 0 } : n.getBoundingClientRect(), r = e.clientX + n.scrollLeft - o.left, i = e.clientY + n.scrollTop - o.top;
  return { x: r, y: i };
}
function tP(e, t, n, o) {
  return Fee(e) ? {
    deltaX: n - e,
    deltaY: o - t,
    lastX: e,
    lastY: t,
    x: n,
    y: o
  } : {
    deltaX: 0,
    deltaY: 0,
    lastX: n,
    lastY: o,
    x: n,
    y: o
  };
}
function Fee(e) {
  return typeof e == "number" && !Number.isNaN(e);
}
function Bee(e, t) {
  const n = pE(e);
  let o = n[0];
  for (let r = 1, i = n.length; r < i; r++) {
    const a = n[r];
    t > e[a] && (o = a);
  }
  return o;
}
function fE(e, t) {
  if (!t[e])
    throw new Error(
      "ResponsiveGridLayout: `cols` entry for breakpoint " + e + " is missing!"
    );
  return t[e];
}
function Lee(e, t, n, o, r, i, a) {
  if (t[o]) return ey(t[o]);
  let l = e;
  const s = pE(n), u = s.slice(s.indexOf(o));
  for (let c = 0, d = u.length; c < d; c++) {
    const f = u[c];
    if (t[f]) {
      l = t[f];
      break;
    }
  }
  return l = ey(l || []), mu(Tee(l, { cols: i }), a);
}
function pE(e) {
  return Object.keys(e).sort((t, n) => e[t] - e[n]);
}
let Hee = "auto";
function Vee() {
  return typeof document < "u";
}
function nP() {
  return Vee() ? typeof document.dir < "u" ? document.dir : document.getElementsByTagName("html")[0].getAttribute("dir") : Hee;
}
var Wc = { exports: {} }, jee = Wc.exports, oP;
function Wee() {
  return oP || (oP = 1, (function(e, t) {
    (function(n, o) {
      e.exports = o();
    })(jee, (function() {
      function n(b, y) {
        var k = Object.keys(b);
        if (Object.getOwnPropertySymbols) {
          var D = Object.getOwnPropertySymbols(b);
          y && (D = D.filter((function(z) {
            return Object.getOwnPropertyDescriptor(b, z).enumerable;
          }))), k.push.apply(k, D);
        }
        return k;
      }
      function o(b) {
        for (var y = 1; y < arguments.length; y++) {
          var k = arguments[y] != null ? arguments[y] : {};
          y % 2 ? n(Object(k), !0).forEach((function(D) {
            s(b, D, k[D]);
          })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(b, Object.getOwnPropertyDescriptors(k)) : n(Object(k)).forEach((function(D) {
            Object.defineProperty(b, D, Object.getOwnPropertyDescriptor(k, D));
          }));
        }
        return b;
      }
      function r(b) {
        return r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(y) {
          return typeof y;
        } : function(y) {
          return y && typeof Symbol == "function" && y.constructor === Symbol && y !== Symbol.prototype ? "symbol" : typeof y;
        }, r(b);
      }
      function i(b, y) {
        if (!(b instanceof y)) throw new TypeError("Cannot call a class as a function");
      }
      function a(b, y) {
        for (var k = 0; k < y.length; k++) {
          var D = y[k];
          D.enumerable = D.enumerable || !1, D.configurable = !0, "value" in D && (D.writable = !0), Object.defineProperty(b, g(D.key), D);
        }
      }
      function l(b, y, k) {
        return y && a(b.prototype, y), Object.defineProperty(b, "prototype", { writable: !1 }), b;
      }
      function s(b, y, k) {
        return (y = g(y)) in b ? Object.defineProperty(b, y, { value: k, enumerable: !0, configurable: !0, writable: !0 }) : b[y] = k, b;
      }
      function u(b, y) {
        if (typeof y != "function" && y !== null) throw new TypeError("Super expression must either be null or a function");
        b.prototype = Object.create(y && y.prototype, { constructor: { value: b, writable: !0, configurable: !0 } }), Object.defineProperty(b, "prototype", { writable: !1 }), y && d(b, y);
      }
      function c(b) {
        return c = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(y) {
          return y.__proto__ || Object.getPrototypeOf(y);
        }, c(b);
      }
      function d(b, y) {
        return d = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(k, D) {
          return k.__proto__ = D, k;
        }, d(b, y);
      }
      function f(b) {
        if (b === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        return b;
      }
      function p(b) {
        var y = (function() {
          if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
          if (typeof Proxy == "function") return !0;
          try {
            return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {
            }))), !0;
          } catch {
            return !1;
          }
        })();
        return function() {
          var k, D = c(b);
          if (y) {
            var z = c(this).constructor;
            k = Reflect.construct(D, arguments, z);
          } else k = D.apply(this, arguments);
          return (function(V, U) {
            if (U && (typeof U == "object" || typeof U == "function")) return U;
            if (U !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
            return f(V);
          })(this, k);
        };
      }
      function v() {
        return v = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(b, y, k) {
          var D = (function(V, U) {
            for (; !Object.prototype.hasOwnProperty.call(V, U) && (V = c(V)) !== null; ) ;
            return V;
          })(b, y);
          if (D) {
            var z = Object.getOwnPropertyDescriptor(D, y);
            return z.get ? z.get.call(arguments.length < 3 ? b : k) : z.value;
          }
        }, v.apply(this, arguments);
      }
      function g(b) {
        var y = (function(k, D) {
          if (typeof k != "object" || k === null) return k;
          var z = k[Symbol.toPrimitive];
          if (z !== void 0) {
            var V = z.call(k, D);
            if (typeof V != "object") return V;
            throw new TypeError("@@toPrimitive must return a primitive value.");
          }
          return String(k);
        })(b, "string");
        return typeof y == "symbol" ? y : y + "";
      }
      var m = function(b) {
        return !(!b || !b.Window) && b instanceof b.Window;
      }, x = void 0, S = void 0;
      function C(b) {
        x = b;
        var y = b.document.createTextNode("");
        y.ownerDocument !== b.document && typeof b.wrap == "function" && b.wrap(y) === y && (b = b.wrap(b)), S = b;
      }
      function P(b) {
        return m(b) ? b : (b.ownerDocument || b).defaultView || S.window;
      }
      typeof window < "u" && window && C(window);
      var $ = function(b) {
        return !!b && r(b) === "object";
      }, I = function(b) {
        return typeof b == "function";
      }, w = { window: function(b) {
        return b === S || m(b);
      }, docFrag: function(b) {
        return $(b) && b.nodeType === 11;
      }, object: $, func: I, number: function(b) {
        return typeof b == "number";
      }, bool: function(b) {
        return typeof b == "boolean";
      }, string: function(b) {
        return typeof b == "string";
      }, element: function(b) {
        if (!b || r(b) !== "object") return !1;
        var y = P(b) || S;
        return /object|function/.test(typeof Element > "u" ? "undefined" : r(Element)) ? b instanceof Element || b instanceof y.Element : b.nodeType === 1 && typeof b.nodeName == "string";
      }, plainObject: function(b) {
        return $(b) && !!b.constructor && /function Object\b/.test(b.constructor.toString());
      }, array: function(b) {
        return $(b) && b.length !== void 0 && I(b.splice);
      } };
      function _(b) {
        var y = b.interaction;
        if (y.prepared.name === "drag") {
          var k = y.prepared.axis;
          k === "x" ? (y.coords.cur.page.y = y.coords.start.page.y, y.coords.cur.client.y = y.coords.start.client.y, y.coords.velocity.client.y = 0, y.coords.velocity.page.y = 0) : k === "y" && (y.coords.cur.page.x = y.coords.start.page.x, y.coords.cur.client.x = y.coords.start.client.x, y.coords.velocity.client.x = 0, y.coords.velocity.page.x = 0);
        }
      }
      function M(b) {
        var y = b.iEvent, k = b.interaction;
        if (k.prepared.name === "drag") {
          var D = k.prepared.axis;
          if (D === "x" || D === "y") {
            var z = D === "x" ? "y" : "x";
            y.page[z] = k.coords.start.page[z], y.client[z] = k.coords.start.client[z], y.delta[z] = 0;
          }
        }
      }
      var N = { id: "actions/drag", install: function(b) {
        var y = b.actions, k = b.Interactable, D = b.defaults;
        k.prototype.draggable = N.draggable, y.map.drag = N, y.methodDict.drag = "draggable", D.actions.drag = N.defaults;
      }, listeners: { "interactions:before-action-move": _, "interactions:action-resume": _, "interactions:action-move": M, "auto-start:check": function(b) {
        var y = b.interaction, k = b.interactable, D = b.buttons, z = k.options.drag;
        if (z && z.enabled && (!y.pointerIsDown || !/mouse|pointer/.test(y.pointerType) || (D & k.options.drag.mouseButtons) != 0)) return b.action = { name: "drag", axis: z.lockAxis === "start" ? z.startAxis : z.lockAxis }, !1;
      } }, draggable: function(b) {
        return w.object(b) ? (this.options.drag.enabled = b.enabled !== !1, this.setPerAction("drag", b), this.setOnEvents("drag", b), /^(xy|x|y|start)$/.test(b.lockAxis) && (this.options.drag.lockAxis = b.lockAxis), /^(xy|x|y)$/.test(b.startAxis) && (this.options.drag.startAxis = b.startAxis), this) : w.bool(b) ? (this.options.drag.enabled = b, this) : this.options.drag;
      }, beforeMove: _, move: M, defaults: { startAxis: "xy", lockAxis: "xy" }, getCursor: function() {
        return "move";
      }, filterEventType: function(b) {
        return b.search("drag") === 0;
      } }, A = N, H = { init: function(b) {
        var y = b;
        H.document = y.document, H.DocumentFragment = y.DocumentFragment || B, H.SVGElement = y.SVGElement || B, H.SVGSVGElement = y.SVGSVGElement || B, H.SVGElementInstance = y.SVGElementInstance || B, H.Element = y.Element || B, H.HTMLElement = y.HTMLElement || H.Element, H.Event = y.Event, H.Touch = y.Touch || B, H.PointerEvent = y.PointerEvent || y.MSPointerEvent;
      }, document: null, DocumentFragment: null, SVGElement: null, SVGSVGElement: null, SVGElementInstance: null, Element: null, HTMLElement: null, Event: null, Touch: null, PointerEvent: null };
      function B() {
      }
      var F = H, R = { init: function(b) {
        var y = F.Element, k = b.navigator || {};
        R.supportsTouch = "ontouchstart" in b || w.func(b.DocumentTouch) && F.document instanceof b.DocumentTouch, R.supportsPointerEvent = k.pointerEnabled !== !1 && !!F.PointerEvent, R.isIOS = /iP(hone|od|ad)/.test(k.platform), R.isIOS7 = /iP(hone|od|ad)/.test(k.platform) && /OS 7[^\d]/.test(k.appVersion), R.isIe9 = /MSIE 9/.test(k.userAgent), R.isOperaMobile = k.appName === "Opera" && R.supportsTouch && /Presto/.test(k.userAgent), R.prefixedMatchesSelector = "matches" in y.prototype ? "matches" : "webkitMatchesSelector" in y.prototype ? "webkitMatchesSelector" : "mozMatchesSelector" in y.prototype ? "mozMatchesSelector" : "oMatchesSelector" in y.prototype ? "oMatchesSelector" : "msMatchesSelector", R.pEventTypes = R.supportsPointerEvent ? F.PointerEvent === b.MSPointerEvent ? { up: "MSPointerUp", down: "MSPointerDown", over: "mouseover", out: "mouseout", move: "MSPointerMove", cancel: "MSPointerCancel" } : { up: "pointerup", down: "pointerdown", over: "pointerover", out: "pointerout", move: "pointermove", cancel: "pointercancel" } : null, R.wheelEvent = F.document && "onmousewheel" in F.document ? "mousewheel" : "wheel";
      }, supportsTouch: null, supportsPointerEvent: null, isIOS7: null, isIOS: null, isIe9: null, isOperaMobile: null, prefixedMatchesSelector: null, pEventTypes: null, wheelEvent: null }, X = R;
      function j(b, y) {
        if (b.contains) return b.contains(y);
        for (; y; ) {
          if (y === b) return !0;
          y = y.parentNode;
        }
        return !1;
      }
      function ee(b, y) {
        for (; w.element(b); ) {
          if (K(b, y)) return b;
          b = W(b);
        }
        return null;
      }
      function W(b) {
        var y = b.parentNode;
        if (w.docFrag(y)) {
          for (; (y = y.host) && w.docFrag(y); ) ;
          return y;
        }
        return y;
      }
      function K(b, y) {
        return S !== x && (y = y.replace(/\/deep\//g, " ")), b[X.prefixedMatchesSelector](y);
      }
      var q = function(b) {
        return b.parentNode || b.host;
      };
      function G(b, y) {
        for (var k, D = [], z = b; (k = q(z)) && z !== y && k !== z.ownerDocument; ) D.unshift(z), z = k;
        return D;
      }
      function ae(b, y, k) {
        for (; w.element(b); ) {
          if (K(b, y)) return !0;
          if ((b = W(b)) === k) return K(b, y);
        }
        return !1;
      }
      function le(b) {
        return b.correspondingUseElement || b;
      }
      function ie(b) {
        var y = b instanceof F.SVGElement ? b.getBoundingClientRect() : b.getClientRects()[0];
        return y && { left: y.left, right: y.right, top: y.top, bottom: y.bottom, width: y.width || y.right - y.left, height: y.height || y.bottom - y.top };
      }
      function re(b) {
        var y, k = ie(b);
        if (!X.isIOS7 && k) {
          var D = { x: (y = (y = P(b)) || S).scrollX || y.document.documentElement.scrollLeft, y: y.scrollY || y.document.documentElement.scrollTop };
          k.left += D.x, k.right += D.x, k.top += D.y, k.bottom += D.y;
        }
        return k;
      }
      function te(b) {
        for (var y = []; b; ) y.push(b), b = W(b);
        return y;
      }
      function ve(b) {
        return !!w.string(b) && (F.document.querySelector(b), !0);
      }
      function ue(b, y) {
        for (var k in y) b[k] = y[k];
        return b;
      }
      function pe(b, y, k) {
        return b === "parent" ? W(k) : b === "self" ? y.getRect(k) : ee(k, b);
      }
      function ge(b, y, k, D) {
        var z = b;
        return w.string(z) ? z = pe(z, y, k) : w.func(z) && (z = z.apply(void 0, D)), w.element(z) && (z = re(z)), z;
      }
      function _e(b) {
        return b && { x: "x" in b ? b.x : b.left, y: "y" in b ? b.y : b.top };
      }
      function ze(b) {
        return !b || "x" in b && "y" in b || ((b = ue({}, b)).x = b.left || 0, b.y = b.top || 0, b.width = b.width || (b.right || 0) - b.x, b.height = b.height || (b.bottom || 0) - b.y), b;
      }
      function Ke(b, y, k) {
        b.left && (y.left += k.x), b.right && (y.right += k.x), b.top && (y.top += k.y), b.bottom && (y.bottom += k.y), y.width = y.right - y.left, y.height = y.bottom - y.top;
      }
      function He(b, y, k) {
        var D = k && b.options[k];
        return _e(ge(D && D.origin || b.options.origin, b, y, [b && y])) || { x: 0, y: 0 };
      }
      function Ne(b, y) {
        var k = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function(se) {
          return !0;
        }, D = arguments.length > 3 ? arguments[3] : void 0;
        if (D = D || {}, w.string(b) && b.search(" ") !== -1 && (b = Xe(b)), w.array(b)) return b.forEach((function(se) {
          return Ne(se, y, k, D);
        })), D;
        if (w.object(b) && (y = b, b = ""), w.func(y) && k(b)) D[b] = D[b] || [], D[b].push(y);
        else if (w.array(y)) for (var z = 0, V = y; z < V.length; z++) {
          var U = V[z];
          Ne(b, U, k, D);
        }
        else if (w.object(y)) for (var Z in y)
          Ne(Xe(Z).map((function(se) {
            return "".concat(b).concat(se);
          })), y[Z], k, D);
        return D;
      }
      function Xe(b) {
        return b.trim().split(/ +/);
      }
      var De = function(b, y) {
        return Math.sqrt(b * b + y * y);
      }, Fe = ["webkit", "moz"];
      function Ve(b, y) {
        b.__set || (b.__set = {});
        var k = function(z) {
          if (Fe.some((function(V) {
            return z.indexOf(V) === 0;
          }))) return 1;
          typeof b[z] != "function" && z !== "__set" && Object.defineProperty(b, z, { get: function() {
            return z in b.__set ? b.__set[z] : b.__set[z] = y[z];
          }, set: function(V) {
            b.__set[z] = V;
          }, configurable: !0 });
        };
        for (var D in y) k(D);
        return b;
      }
      function nt(b, y) {
        b.page = b.page || {}, b.page.x = y.page.x, b.page.y = y.page.y, b.client = b.client || {}, b.client.x = y.client.x, b.client.y = y.client.y, b.timeStamp = y.timeStamp;
      }
      function je(b) {
        b.page.x = 0, b.page.y = 0, b.client.x = 0, b.client.y = 0;
      }
      function Pe(b) {
        return b instanceof F.Event || b instanceof F.Touch;
      }
      function Ge(b, y, k) {
        return b = b || "page", (k = k || {}).x = y[b + "X"], k.y = y[b + "Y"], k;
      }
      function Se(b, y) {
        return y = y || { x: 0, y: 0 }, X.isOperaMobile && Pe(b) ? (Ge("screen", b, y), y.x += window.scrollX, y.y += window.scrollY) : Ge("page", b, y), y;
      }
      function Ce(b) {
        return w.number(b.pointerId) ? b.pointerId : b.identifier;
      }
      function Ae(b, y, k) {
        var D = y.length > 1 ? We(y) : y[0];
        Se(D, b.page), (function(z, V) {
          V = V || {}, X.isOperaMobile && Pe(z) ? Ge("screen", z, V) : Ge("client", z, V);
        })(D, b.client), b.timeStamp = k;
      }
      function qe(b) {
        var y = [];
        return w.array(b) ? (y[0] = b[0], y[1] = b[1]) : b.type === "touchend" ? b.touches.length === 1 ? (y[0] = b.touches[0], y[1] = b.changedTouches[0]) : b.touches.length === 0 && (y[0] = b.changedTouches[0], y[1] = b.changedTouches[1]) : (y[0] = b.touches[0], y[1] = b.touches[1]), y;
      }
      function We(b) {
        for (var y = { pageX: 0, pageY: 0, clientX: 0, clientY: 0, screenX: 0, screenY: 0 }, k = 0; k < b.length; k++) {
          var D = b[k];
          for (var z in y) y[z] += D[z];
        }
        for (var V in y) y[V] /= b.length;
        return y;
      }
      function tt(b) {
        if (!b.length) return null;
        var y = qe(b), k = Math.min(y[0].pageX, y[1].pageX), D = Math.min(y[0].pageY, y[1].pageY), z = Math.max(y[0].pageX, y[1].pageX), V = Math.max(y[0].pageY, y[1].pageY);
        return { x: k, y: D, left: k, top: D, right: z, bottom: V, width: z - k, height: V - D };
      }
      function Ee(b, y) {
        var k = y + "X", D = y + "Y", z = qe(b), V = z[0][k] - z[1][k], U = z[0][D] - z[1][D];
        return De(V, U);
      }
      function Re(b, y) {
        var k = y + "X", D = y + "Y", z = qe(b), V = z[1][k] - z[0][k], U = z[1][D] - z[0][D];
        return 180 * Math.atan2(U, V) / Math.PI;
      }
      function Be(b) {
        return w.string(b.pointerType) ? b.pointerType : w.number(b.pointerType) ? [void 0, void 0, "touch", "pen", "mouse"][b.pointerType] : /touch/.test(b.type || "") || b instanceof F.Touch ? "touch" : "mouse";
      }
      function ot(b) {
        var y = w.func(b.composedPath) ? b.composedPath() : b.path;
        return [le(y ? y[0] : b.target), le(b.currentTarget)];
      }
      var pt = (function() {
        function b(y) {
          i(this, b), this.immediatePropagationStopped = !1, this.propagationStopped = !1, this._interaction = y;
        }
        return l(b, [{ key: "preventDefault", value: function() {
        } }, { key: "stopPropagation", value: function() {
          this.propagationStopped = !0;
        } }, { key: "stopImmediatePropagation", value: function() {
          this.immediatePropagationStopped = this.propagationStopped = !0;
        } }]), b;
      })();
      Object.defineProperty(pt.prototype, "interaction", { get: function() {
        return this._interaction._proxy;
      }, set: function() {
      } });
      var at = function(b, y) {
        for (var k = 0; k < y.length; k++) {
          var D = y[k];
          b.push(D);
        }
        return b;
      }, dt = function(b) {
        return at([], b);
      }, wt = function(b, y) {
        for (var k = 0; k < b.length; k++) if (y(b[k], k, b)) return k;
        return -1;
      }, Ct = function(b, y) {
        return b[wt(b, y)];
      }, St = (function(b) {
        u(k, b);
        var y = p(k);
        function k(D, z, V) {
          var U;
          i(this, k), (U = y.call(this, z._interaction)).dropzone = void 0, U.dragEvent = void 0, U.relatedTarget = void 0, U.draggable = void 0, U.propagationStopped = !1, U.immediatePropagationStopped = !1;
          var Z = V === "dragleave" ? D.prev : D.cur, se = Z.element, we = Z.dropzone;
          return U.type = V, U.target = se, U.currentTarget = se, U.dropzone = we, U.dragEvent = z, U.relatedTarget = z.target, U.draggable = z.interactable, U.timeStamp = z.timeStamp, U;
        }
        return l(k, [{ key: "reject", value: function() {
          var D = this, z = this._interaction.dropState;
          if (this.type === "dropactivate" || this.dropzone && z.cur.dropzone === this.dropzone && z.cur.element === this.target) if (z.prev.dropzone = this.dropzone, z.prev.element = this.target, z.rejected = !0, z.events.enter = null, this.stopImmediatePropagation(), this.type === "dropactivate") {
            var V = z.activeDrops, U = wt(V, (function(se) {
              var we = se.dropzone, de = se.element;
              return we === D.dropzone && de === D.target;
            }));
            z.activeDrops.splice(U, 1);
            var Z = new k(z, this.dragEvent, "dropdeactivate");
            Z.dropzone = this.dropzone, Z.target = this.target, this.dropzone.fire(Z);
          } else this.dropzone.fire(new k(z, this.dragEvent, "dragleave"));
        } }, { key: "preventDefault", value: function() {
        } }, { key: "stopPropagation", value: function() {
          this.propagationStopped = !0;
        } }, { key: "stopImmediatePropagation", value: function() {
          this.immediatePropagationStopped = this.propagationStopped = !0;
        } }]), k;
      })(pt);
      function yt(b, y) {
        for (var k = 0, D = b.slice(); k < D.length; k++) {
          var z = D[k], V = z.dropzone, U = z.element;
          y.dropzone = V, y.target = U, V.fire(y), y.propagationStopped = y.immediatePropagationStopped = !1;
        }
      }
      function Ot(b, y) {
        for (var k = (function(V, U) {
          for (var Z = [], se = 0, we = V.interactables.list; se < we.length; se++) {
            var de = we[se];
            if (de.options.drop.enabled) {
              var Oe = de.options.drop.accept;
              if (!(w.element(Oe) && Oe !== U || w.string(Oe) && !K(U, Oe) || w.func(Oe) && !Oe({ dropzone: de, draggableElement: U }))) for (var Te = 0, Ye = de.getAllElements(); Te < Ye.length; Te++) {
                var Qe = Ye[Te];
                Qe !== U && Z.push({ dropzone: de, element: Qe, rect: de.getRect(Qe) });
              }
            }
          }
          return Z;
        })(b, y), D = 0; D < k.length; D++) {
          var z = k[D];
          z.rect = z.dropzone.getRect(z.element);
        }
        return k;
      }
      function Wt(b, y, k) {
        for (var D = b.dropState, z = b.interactable, V = b.element, U = [], Z = 0, se = D.activeDrops; Z < se.length; Z++) {
          var we = se[Z], de = we.dropzone, Oe = we.element, Te = we.rect, Ye = de.dropCheck(y, k, z, V, Oe, Te);
          U.push(Ye ? Oe : null);
        }
        var Qe = (function(Ze) {
          for (var lt, st, xt, Rt = [], Gt = 0; Gt < Ze.length; Gt++) {
            var Mt = Ze[Gt], jt = Ze[lt];
            if (Mt && Gt !== lt) if (jt) {
              var Nn = q(Mt), xn = q(jt);
              if (Nn !== Mt.ownerDocument) if (xn !== Mt.ownerDocument) if (Nn !== xn) {
                Rt = Rt.length ? Rt : G(jt);
                var Bn = void 0;
                if (jt instanceof F.HTMLElement && Mt instanceof F.SVGElement && !(Mt instanceof F.SVGSVGElement)) {
                  if (Mt === xn) continue;
                  Bn = Mt.ownerSVGElement;
                } else Bn = Mt;
                for (var Yn = G(Bn, jt.ownerDocument), co = 0; Yn[co] && Yn[co] === Rt[co]; ) co++;
                var di = [Yn[co - 1], Yn[co], Rt[co]];
                if (di[0]) for (var hr = di[0].lastChild; hr; ) {
                  if (hr === di[1]) {
                    lt = Gt, Rt = Yn;
                    break;
                  }
                  if (hr === di[2]) break;
                  hr = hr.previousSibling;
                }
              } else xt = jt, (parseInt(P(st = Mt).getComputedStyle(st).zIndex, 10) || 0) >= (parseInt(P(xt).getComputedStyle(xt).zIndex, 10) || 0) && (lt = Gt);
              else lt = Gt;
            } else lt = Gt;
          }
          return lt;
        })(U);
        return D.activeDrops[Qe] || null;
      }
      function Xt(b, y, k) {
        var D = b.dropState, z = { enter: null, leave: null, activate: null, deactivate: null, move: null, drop: null };
        return k.type === "dragstart" && (z.activate = new St(D, k, "dropactivate"), z.activate.target = null, z.activate.dropzone = null), k.type === "dragend" && (z.deactivate = new St(D, k, "dropdeactivate"), z.deactivate.target = null, z.deactivate.dropzone = null), D.rejected || (D.cur.element !== D.prev.element && (D.prev.dropzone && (z.leave = new St(D, k, "dragleave"), k.dragLeave = z.leave.target = D.prev.element, k.prevDropzone = z.leave.dropzone = D.prev.dropzone), D.cur.dropzone && (z.enter = new St(D, k, "dragenter"), k.dragEnter = D.cur.element, k.dropzone = D.cur.dropzone)), k.type === "dragend" && D.cur.dropzone && (z.drop = new St(D, k, "drop"), k.dropzone = D.cur.dropzone, k.relatedTarget = D.cur.element), k.type === "dragmove" && D.cur.dropzone && (z.move = new St(D, k, "dropmove"), k.dropzone = D.cur.dropzone)), z;
      }
      function ln(b, y) {
        var k = b.dropState, D = k.activeDrops, z = k.cur, V = k.prev;
        y.leave && V.dropzone.fire(y.leave), y.enter && z.dropzone.fire(y.enter), y.move && z.dropzone.fire(y.move), y.drop && z.dropzone.fire(y.drop), y.deactivate && yt(D, y.deactivate), k.prev.dropzone = z.dropzone, k.prev.element = z.element;
      }
      function pn(b, y) {
        var k = b.interaction, D = b.iEvent, z = b.event;
        if (D.type === "dragmove" || D.type === "dragend") {
          var V = k.dropState;
          y.dynamicDrop && (V.activeDrops = Ot(y, k.element));
          var U = D, Z = Wt(k, U, z);
          V.rejected = V.rejected && !!Z && Z.dropzone === V.cur.dropzone && Z.element === V.cur.element, V.cur.dropzone = Z && Z.dropzone, V.cur.element = Z && Z.element, V.events = Xt(k, 0, U);
        }
      }
      var gt = { id: "actions/drop", install: function(b) {
        var y = b.actions, k = b.interactStatic, D = b.Interactable, z = b.defaults;
        b.usePlugin(A), D.prototype.dropzone = function(V) {
          return (function(U, Z) {
            if (w.object(Z)) {
              if (U.options.drop.enabled = Z.enabled !== !1, Z.listeners) {
                var se = Ne(Z.listeners), we = Object.keys(se).reduce((function(Oe, Te) {
                  return Oe[/^(enter|leave)/.test(Te) ? "drag".concat(Te) : /^(activate|deactivate|move)/.test(Te) ? "drop".concat(Te) : Te] = se[Te], Oe;
                }), {}), de = U.options.drop.listeners;
                de && U.off(de), U.on(we), U.options.drop.listeners = we;
              }
              return w.func(Z.ondrop) && U.on("drop", Z.ondrop), w.func(Z.ondropactivate) && U.on("dropactivate", Z.ondropactivate), w.func(Z.ondropdeactivate) && U.on("dropdeactivate", Z.ondropdeactivate), w.func(Z.ondragenter) && U.on("dragenter", Z.ondragenter), w.func(Z.ondragleave) && U.on("dragleave", Z.ondragleave), w.func(Z.ondropmove) && U.on("dropmove", Z.ondropmove), /^(pointer|center)$/.test(Z.overlap) ? U.options.drop.overlap = Z.overlap : w.number(Z.overlap) && (U.options.drop.overlap = Math.max(Math.min(1, Z.overlap), 0)), "accept" in Z && (U.options.drop.accept = Z.accept), "checker" in Z && (U.options.drop.checker = Z.checker), U;
            }
            return w.bool(Z) ? (U.options.drop.enabled = Z, U) : U.options.drop;
          })(this, V);
        }, D.prototype.dropCheck = function(V, U, Z, se, we, de) {
          return (function(Oe, Te, Ye, Qe, Ze, lt, st) {
            var xt = !1;
            if (!(st = st || Oe.getRect(lt))) return !!Oe.options.drop.checker && Oe.options.drop.checker(Te, Ye, xt, Oe, lt, Qe, Ze);
            var Rt = Oe.options.drop.overlap;
            if (Rt === "pointer") {
              var Gt = He(Qe, Ze, "drag"), Mt = Se(Te);
              Mt.x += Gt.x, Mt.y += Gt.y;
              var jt = Mt.x > st.left && Mt.x < st.right, Nn = Mt.y > st.top && Mt.y < st.bottom;
              xt = jt && Nn;
            }
            var xn = Qe.getRect(Ze);
            if (xn && Rt === "center") {
              var Bn = xn.left + xn.width / 2, Yn = xn.top + xn.height / 2;
              xt = Bn >= st.left && Bn <= st.right && Yn >= st.top && Yn <= st.bottom;
            }
            return xn && w.number(Rt) && (xt = Math.max(0, Math.min(st.right, xn.right) - Math.max(st.left, xn.left)) * Math.max(0, Math.min(st.bottom, xn.bottom) - Math.max(st.top, xn.top)) / (xn.width * xn.height) >= Rt), Oe.options.drop.checker && (xt = Oe.options.drop.checker(Te, Ye, xt, Oe, lt, Qe, Ze)), xt;
          })(this, V, U, Z, se, we, de);
        }, k.dynamicDrop = function(V) {
          return w.bool(V) ? (b.dynamicDrop = V, k) : b.dynamicDrop;
        }, ue(y.phaselessTypes, { dragenter: !0, dragleave: !0, dropactivate: !0, dropdeactivate: !0, dropmove: !0, drop: !0 }), y.methodDict.drop = "dropzone", b.dynamicDrop = !1, z.actions.drop = gt.defaults;
      }, listeners: { "interactions:before-action-start": function(b) {
        var y = b.interaction;
        y.prepared.name === "drag" && (y.dropState = { cur: { dropzone: null, element: null }, prev: { dropzone: null, element: null }, rejected: null, events: null, activeDrops: [] });
      }, "interactions:after-action-start": function(b, y) {
        var k = b.interaction, D = (b.event, b.iEvent);
        if (k.prepared.name === "drag") {
          var z = k.dropState;
          z.activeDrops = [], z.events = {}, z.activeDrops = Ot(y, k.element), z.events = Xt(k, 0, D), z.events.activate && (yt(z.activeDrops, z.events.activate), y.fire("actions/drop:start", { interaction: k, dragEvent: D }));
        }
      }, "interactions:action-move": pn, "interactions:after-action-move": function(b, y) {
        var k = b.interaction, D = b.iEvent;
        if (k.prepared.name === "drag") {
          var z = k.dropState;
          ln(k, z.events), y.fire("actions/drop:move", { interaction: k, dragEvent: D }), z.events = {};
        }
      }, "interactions:action-end": function(b, y) {
        if (b.interaction.prepared.name === "drag") {
          var k = b.interaction, D = b.iEvent;
          pn(b, y), ln(k, k.dropState.events), y.fire("actions/drop:end", { interaction: k, dragEvent: D });
        }
      }, "interactions:stop": function(b) {
        var y = b.interaction;
        if (y.prepared.name === "drag") {
          var k = y.dropState;
          k && (k.activeDrops = null, k.events = null, k.cur.dropzone = null, k.cur.element = null, k.prev.dropzone = null, k.prev.element = null, k.rejected = !1);
        }
      } }, getActiveDrops: Ot, getDrop: Wt, getDropEvents: Xt, fireDropEvents: ln, filterEventType: function(b) {
        return b.search("drag") === 0 || b.search("drop") === 0;
      }, defaults: { enabled: !1, accept: null, overlap: "pointer" } }, En = gt;
      function hn(b) {
        var y = b.interaction, k = b.iEvent, D = b.phase;
        if (y.prepared.name === "gesture") {
          var z = y.pointers.map((function(we) {
            return we.pointer;
          })), V = D === "start", U = D === "end", Z = y.interactable.options.deltaSource;
          if (k.touches = [z[0], z[1]], V) k.distance = Ee(z, Z), k.box = tt(z), k.scale = 1, k.ds = 0, k.angle = Re(z, Z), k.da = 0, y.gesture.startDistance = k.distance, y.gesture.startAngle = k.angle;
          else if (U || y.pointers.length < 2) {
            var se = y.prevEvent;
            k.distance = se.distance, k.box = se.box, k.scale = se.scale, k.ds = 0, k.angle = se.angle, k.da = 0;
          } else k.distance = Ee(z, Z), k.box = tt(z), k.scale = k.distance / y.gesture.startDistance, k.angle = Re(z, Z), k.ds = k.scale - y.gesture.scale, k.da = k.angle - y.gesture.angle;
          y.gesture.distance = k.distance, y.gesture.angle = k.angle, w.number(k.scale) && k.scale !== 1 / 0 && !isNaN(k.scale) && (y.gesture.scale = k.scale);
        }
      }
      var Kn = { id: "actions/gesture", before: ["actions/drag", "actions/resize"], install: function(b) {
        var y = b.actions, k = b.Interactable, D = b.defaults;
        k.prototype.gesturable = function(z) {
          return w.object(z) ? (this.options.gesture.enabled = z.enabled !== !1, this.setPerAction("gesture", z), this.setOnEvents("gesture", z), this) : w.bool(z) ? (this.options.gesture.enabled = z, this) : this.options.gesture;
        }, y.map.gesture = Kn, y.methodDict.gesture = "gesturable", D.actions.gesture = Kn.defaults;
      }, listeners: { "interactions:action-start": hn, "interactions:action-move": hn, "interactions:action-end": hn, "interactions:new": function(b) {
        b.interaction.gesture = { angle: 0, distance: 0, scale: 1, startAngle: 0, startDistance: 0 };
      }, "auto-start:check": function(b) {
        if (!(b.interaction.pointers.length < 2)) {
          var y = b.interactable.options.gesture;
          if (y && y.enabled) return b.action = { name: "gesture" }, !1;
        }
      } }, defaults: {}, getCursor: function() {
        return "";
      }, filterEventType: function(b) {
        return b.search("gesture") === 0;
      } }, so = Kn;
      function Uo(b, y, k, D, z, V, U) {
        if (!y) return !1;
        if (y === !0) {
          var Z = w.number(V.width) ? V.width : V.right - V.left, se = w.number(V.height) ? V.height : V.bottom - V.top;
          if (U = Math.min(U, Math.abs((b === "left" || b === "right" ? Z : se) / 2)), Z < 0 && (b === "left" ? b = "right" : b === "right" && (b = "left")), se < 0 && (b === "top" ? b = "bottom" : b === "bottom" && (b = "top")), b === "left") {
            var we = Z >= 0 ? V.left : V.right;
            return k.x < we + U;
          }
          if (b === "top") {
            var de = se >= 0 ? V.top : V.bottom;
            return k.y < de + U;
          }
          if (b === "right") return k.x > (Z >= 0 ? V.right : V.left) - U;
          if (b === "bottom") return k.y > (se >= 0 ? V.bottom : V.top) - U;
        }
        return !!w.element(D) && (w.element(y) ? y === D : ae(D, y, z));
      }
      function Ue(b) {
        var y = b.iEvent, k = b.interaction;
        if (k.prepared.name === "resize" && k.resizeAxes) {
          var D = y;
          k.interactable.options.resize.square ? (k.resizeAxes === "y" ? D.delta.x = D.delta.y : D.delta.y = D.delta.x, D.axes = "xy") : (D.axes = k.resizeAxes, k.resizeAxes === "x" ? D.delta.y = 0 : k.resizeAxes === "y" && (D.delta.x = 0));
        }
      }
      var ht, vt, Zt = { id: "actions/resize", before: ["actions/drag"], install: function(b) {
        var y = b.actions, k = b.browser, D = b.Interactable, z = b.defaults;
        Zt.cursors = (function(V) {
          return V.isIe9 ? { x: "e-resize", y: "s-resize", xy: "se-resize", top: "n-resize", left: "w-resize", bottom: "s-resize", right: "e-resize", topleft: "se-resize", bottomright: "se-resize", topright: "ne-resize", bottomleft: "ne-resize" } : { x: "ew-resize", y: "ns-resize", xy: "nwse-resize", top: "ns-resize", left: "ew-resize", bottom: "ns-resize", right: "ew-resize", topleft: "nwse-resize", bottomright: "nwse-resize", topright: "nesw-resize", bottomleft: "nesw-resize" };
        })(k), Zt.defaultMargin = k.supportsTouch || k.supportsPointerEvent ? 20 : 10, D.prototype.resizable = function(V) {
          return (function(U, Z, se) {
            return w.object(Z) ? (U.options.resize.enabled = Z.enabled !== !1, U.setPerAction("resize", Z), U.setOnEvents("resize", Z), w.string(Z.axis) && /^x$|^y$|^xy$/.test(Z.axis) ? U.options.resize.axis = Z.axis : Z.axis === null && (U.options.resize.axis = se.defaults.actions.resize.axis), w.bool(Z.preserveAspectRatio) ? U.options.resize.preserveAspectRatio = Z.preserveAspectRatio : w.bool(Z.square) && (U.options.resize.square = Z.square), U) : w.bool(Z) ? (U.options.resize.enabled = Z, U) : U.options.resize;
          })(this, V, b);
        }, y.map.resize = Zt, y.methodDict.resize = "resizable", z.actions.resize = Zt.defaults;
      }, listeners: { "interactions:new": function(b) {
        b.interaction.resizeAxes = "xy";
      }, "interactions:action-start": function(b) {
        (function(y) {
          var k = y.iEvent, D = y.interaction;
          if (D.prepared.name === "resize" && D.prepared.edges) {
            var z = k, V = D.rect;
            D._rects = { start: ue({}, V), corrected: ue({}, V), previous: ue({}, V), delta: { left: 0, right: 0, width: 0, top: 0, bottom: 0, height: 0 } }, z.edges = D.prepared.edges, z.rect = D._rects.corrected, z.deltaRect = D._rects.delta;
          }
        })(b), Ue(b);
      }, "interactions:action-move": function(b) {
        (function(y) {
          var k = y.iEvent, D = y.interaction;
          if (D.prepared.name === "resize" && D.prepared.edges) {
            var z = k, V = D.interactable.options.resize.invert, U = V === "reposition" || V === "negate", Z = D.rect, se = D._rects, we = se.start, de = se.corrected, Oe = se.delta, Te = se.previous;
            if (ue(Te, de), U) {
              if (ue(de, Z), V === "reposition") {
                if (de.top > de.bottom) {
                  var Ye = de.top;
                  de.top = de.bottom, de.bottom = Ye;
                }
                if (de.left > de.right) {
                  var Qe = de.left;
                  de.left = de.right, de.right = Qe;
                }
              }
            } else de.top = Math.min(Z.top, we.bottom), de.bottom = Math.max(Z.bottom, we.top), de.left = Math.min(Z.left, we.right), de.right = Math.max(Z.right, we.left);
            for (var Ze in de.width = de.right - de.left, de.height = de.bottom - de.top, de) Oe[Ze] = de[Ze] - Te[Ze];
            z.edges = D.prepared.edges, z.rect = de, z.deltaRect = Oe;
          }
        })(b), Ue(b);
      }, "interactions:action-end": function(b) {
        var y = b.iEvent, k = b.interaction;
        if (k.prepared.name === "resize" && k.prepared.edges) {
          var D = y;
          D.edges = k.prepared.edges, D.rect = k._rects.corrected, D.deltaRect = k._rects.delta;
        }
      }, "auto-start:check": function(b) {
        var y = b.interaction, k = b.interactable, D = b.element, z = b.rect, V = b.buttons;
        if (z) {
          var U = ue({}, y.coords.cur.page), Z = k.options.resize;
          if (Z && Z.enabled && (!y.pointerIsDown || !/mouse|pointer/.test(y.pointerType) || (V & Z.mouseButtons) != 0)) {
            if (w.object(Z.edges)) {
              var se = { left: !1, right: !1, top: !1, bottom: !1 };
              for (var we in se) se[we] = Uo(we, Z.edges[we], U, y._latestPointer.eventTarget, D, z, Z.margin || Zt.defaultMargin);
              se.left = se.left && !se.right, se.top = se.top && !se.bottom, (se.left || se.right || se.top || se.bottom) && (b.action = { name: "resize", edges: se });
            } else {
              var de = Z.axis !== "y" && U.x > z.right - Zt.defaultMargin, Oe = Z.axis !== "x" && U.y > z.bottom - Zt.defaultMargin;
              (de || Oe) && (b.action = { name: "resize", axes: (de ? "x" : "") + (Oe ? "y" : "") });
            }
            return !b.action && void 0;
          }
        }
      } }, defaults: { square: !1, preserveAspectRatio: !1, axis: "xy", margin: NaN, edges: null, invert: "none" }, cursors: null, getCursor: function(b) {
        var y = b.edges, k = b.axis, D = b.name, z = Zt.cursors, V = null;
        if (k) V = z[D + k];
        else if (y) {
          for (var U = "", Z = 0, se = ["top", "bottom", "left", "right"]; Z < se.length; Z++) {
            var we = se[Z];
            y[we] && (U += we);
          }
          V = z[U];
        }
        return V;
      }, filterEventType: function(b) {
        return b.search("resize") === 0;
      }, defaultMargin: null }, Zn = Zt, Qn = { id: "actions", install: function(b) {
        b.usePlugin(so), b.usePlugin(Zn), b.usePlugin(A), b.usePlugin(En);
      } }, $o = 0, Cn = { request: function(b) {
        return ht(b);
      }, cancel: function(b) {
        return vt(b);
      }, init: function(b) {
        if (ht = b.requestAnimationFrame, vt = b.cancelAnimationFrame, !ht) for (var y = ["ms", "moz", "webkit", "o"], k = 0; k < y.length; k++) {
          var D = y[k];
          ht = b["".concat(D, "RequestAnimationFrame")], vt = b["".concat(D, "CancelAnimationFrame")] || b["".concat(D, "CancelRequestAnimationFrame")];
        }
        ht = ht && ht.bind(b), vt = vt && vt.bind(b), ht || (ht = function(z) {
          var V = Date.now(), U = Math.max(0, 16 - (V - $o)), Z = b.setTimeout((function() {
            z(V + U);
          }), U);
          return $o = V + U, Z;
        }, vt = function(z) {
          return clearTimeout(z);
        });
      } }, Tt = { defaults: { enabled: !1, margin: 60, container: null, speed: 300 }, now: Date.now, interaction: null, i: 0, x: 0, y: 0, isScrolling: !1, prevTime: 0, margin: 0, speed: 0, start: function(b) {
        Tt.isScrolling = !0, Cn.cancel(Tt.i), b.autoScroll = Tt, Tt.interaction = b, Tt.prevTime = Tt.now(), Tt.i = Cn.request(Tt.scroll);
      }, stop: function() {
        Tt.isScrolling = !1, Tt.interaction && (Tt.interaction.autoScroll = null), Cn.cancel(Tt.i);
      }, scroll: function() {
        var b = Tt.interaction, y = b.interactable, k = b.element, D = b.prepared.name, z = y.options[D].autoScroll, V = po(z.container, y, k), U = Tt.now(), Z = (U - Tt.prevTime) / 1e3, se = z.speed * Z;
        if (se >= 1) {
          var we = { x: Tt.x * se, y: Tt.y * se };
          if (we.x || we.y) {
            var de = zo(V);
            w.window(V) ? V.scrollBy(we.x, we.y) : V && (V.scrollLeft += we.x, V.scrollTop += we.y);
            var Oe = zo(V), Te = { x: Oe.x - de.x, y: Oe.y - de.y };
            (Te.x || Te.y) && y.fire({ type: "autoscroll", target: k, interactable: y, delta: Te, interaction: b, container: V });
          }
          Tt.prevTime = U;
        }
        Tt.isScrolling && (Cn.cancel(Tt.i), Tt.i = Cn.request(Tt.scroll));
      }, check: function(b, y) {
        var k;
        return (k = b.options[y].autoScroll) == null ? void 0 : k.enabled;
      }, onInteractionMove: function(b) {
        var y = b.interaction, k = b.pointer;
        if (y.interacting() && Tt.check(y.interactable, y.prepared.name)) if (y.simulation) Tt.x = Tt.y = 0;
        else {
          var D, z, V, U, Z = y.interactable, se = y.element, we = y.prepared.name, de = Z.options[we].autoScroll, Oe = po(de.container, Z, se);
          if (w.window(Oe)) U = k.clientX < Tt.margin, D = k.clientY < Tt.margin, z = k.clientX > Oe.innerWidth - Tt.margin, V = k.clientY > Oe.innerHeight - Tt.margin;
          else {
            var Te = ie(Oe);
            U = k.clientX < Te.left + Tt.margin, D = k.clientY < Te.top + Tt.margin, z = k.clientX > Te.right - Tt.margin, V = k.clientY > Te.bottom - Tt.margin;
          }
          Tt.x = z ? 1 : U ? -1 : 0, Tt.y = V ? 1 : D ? -1 : 0, Tt.isScrolling || (Tt.margin = de.margin, Tt.speed = de.speed, Tt.start(y));
        }
      } };
      function po(b, y, k) {
        return (w.string(b) ? pe(b, y, k) : b) || P(k);
      }
      function zo(b) {
        return w.window(b) && (b = window.document.body), { x: b.scrollLeft, y: b.scrollTop };
      }
      var un = { id: "auto-scroll", install: function(b) {
        var y = b.defaults, k = b.actions;
        b.autoScroll = Tt, Tt.now = function() {
          return b.now();
        }, k.phaselessTypes.autoscroll = !0, y.perAction.autoScroll = Tt.defaults;
      }, listeners: { "interactions:new": function(b) {
        b.interaction.autoScroll = null;
      }, "interactions:destroy": function(b) {
        b.interaction.autoScroll = null, Tt.stop(), Tt.interaction && (Tt.interaction = null);
      }, "interactions:stop": Tt.stop, "interactions:action-move": function(b) {
        return Tt.onInteractionMove(b);
      } } }, Dn = un;
      function cn(b, y) {
        var k = !1;
        return function() {
          return k || (S.console.warn(y), k = !0), b.apply(this, arguments);
        };
      }
      function An(b, y) {
        return b.name = y.name, b.axis = y.axis, b.edges = y.edges, b;
      }
      function er(b) {
        return w.bool(b) ? (this.options.styleCursor = b, this) : b === null ? (delete this.options.styleCursor, this) : this.options.styleCursor;
      }
      function Jn(b) {
        return w.func(b) ? (this.options.actionChecker = b, this) : b === null ? (delete this.options.actionChecker, this) : this.options.actionChecker;
      }
      var pr = { id: "auto-start/interactableMethods", install: function(b) {
        var y = b.Interactable;
        y.prototype.getAction = function(k, D, z, V) {
          var U = (function(Z, se, we, de, Oe) {
            var Te = Z.getRect(de), Ye = se.buttons || { 0: 1, 1: 4, 3: 8, 4: 16 }[se.button], Qe = { action: null, interactable: Z, interaction: we, element: de, rect: Te, buttons: Ye };
            return Oe.fire("auto-start:check", Qe), Qe.action;
          })(this, D, z, V, b);
          return this.options.actionChecker ? this.options.actionChecker(k, D, U, this, V, z) : U;
        }, y.prototype.ignoreFrom = cn((function(k) {
          return this._backCompatOption("ignoreFrom", k);
        }), "Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."), y.prototype.allowFrom = cn((function(k) {
          return this._backCompatOption("allowFrom", k);
        }), "Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."), y.prototype.actionChecker = Jn, y.prototype.styleCursor = er;
      } };
      function Wo(b, y, k, D, z) {
        return y.testIgnoreAllow(y.options[b.name], k, D) && y.options[b.name].enabled && Ei(y, k, b, z) ? b : null;
      }
      function la(b, y, k, D, z, V, U) {
        for (var Z = 0, se = D.length; Z < se; Z++) {
          var we = D[Z], de = z[Z], Oe = we.getAction(y, k, b, de);
          if (Oe) {
            var Te = Wo(Oe, we, de, V, U);
            if (Te) return { action: Te, interactable: we, element: de };
          }
        }
        return { action: null, interactable: null, element: null };
      }
      function sa(b, y, k, D, z) {
        var V = [], U = [], Z = D;
        function se(de) {
          V.push(de), U.push(Z);
        }
        for (; w.element(Z); ) {
          V = [], U = [], z.interactables.forEachMatch(Z, se);
          var we = la(b, y, k, V, U, D, z);
          if (we.action && !we.interactable.options[we.action.name].manualStart) return we;
          Z = W(Z);
        }
        return { action: null, interactable: null, element: null };
      }
      function ai(b, y, k) {
        var D = y.action, z = y.interactable, V = y.element;
        D = D || { name: null }, b.interactable = z, b.element = V, An(b.prepared, D), b.rect = z && D.name ? z.getRect(V) : null, Za(b, k), k.fire("autoStart:prepared", { interaction: b });
      }
      function Ei(b, y, k, D) {
        var z = b.options, V = z[k.name].max, U = z[k.name].maxPerElement, Z = D.autoStart.maxInteractions, se = 0, we = 0, de = 0;
        if (!(V && U && Z)) return !1;
        for (var Oe = 0, Te = D.interactions.list; Oe < Te.length; Oe++) {
          var Ye = Te[Oe], Qe = Ye.prepared.name;
          if (Ye.interacting() && (++se >= Z || Ye.interactable === b && ((we += Qe === k.name ? 1 : 0) >= V || Ye.element === y && (de++, Qe === k.name && de >= U))))
            return !1;
        }
        return Z > 0;
      }
      function Qa(b, y) {
        return w.number(b) ? (y.autoStart.maxInteractions = b, this) : y.autoStart.maxInteractions;
      }
      function Di(b, y, k) {
        var D = k.autoStart.cursorElement;
        D && D !== b && (D.style.cursor = ""), b.ownerDocument.documentElement.style.cursor = y, b.style.cursor = y, k.autoStart.cursorElement = y ? b : null;
      }
      function Za(b, y) {
        var k = b.interactable, D = b.element, z = b.prepared;
        if (b.pointerType === "mouse" && k && k.options.styleCursor) {
          var V = "";
          if (z.name) {
            var U = k.options[z.name].cursorChecker;
            V = w.func(U) ? U(z, k, D, b._interacting) : y.actions.map[z.name].getCursor(z);
          }
          Di(b.element, V || "", y);
        } else y.autoStart.cursorElement && Di(y.autoStart.cursorElement, "", y);
      }
      var li = { id: "auto-start/base", before: ["actions"], install: function(b) {
        var y = b.interactStatic, k = b.defaults;
        b.usePlugin(pr), k.base.actionChecker = null, k.base.styleCursor = !0, ue(k.perAction, { manualStart: !1, max: 1 / 0, maxPerElement: 1, allowFrom: null, ignoreFrom: null, mouseButtons: 1 }), y.maxInteractions = function(D) {
          return Qa(D, b);
        }, b.autoStart = { maxInteractions: 1 / 0, withinInteractionLimit: Ei, cursorElement: null };
      }, listeners: { "interactions:down": function(b, y) {
        var k = b.interaction, D = b.pointer, z = b.event, V = b.eventTarget;
        k.interacting() || ai(k, sa(k, D, z, V, y), y);
      }, "interactions:move": function(b, y) {
        (function(k, D) {
          var z = k.interaction, V = k.pointer, U = k.event, Z = k.eventTarget;
          z.pointerType !== "mouse" || z.pointerIsDown || z.interacting() || ai(z, sa(z, V, U, Z, D), D);
        })(b, y), (function(k, D) {
          var z = k.interaction;
          if (z.pointerIsDown && !z.interacting() && z.pointerWasMoved && z.prepared.name) {
            D.fire("autoStart:before-start", k);
            var V = z.interactable, U = z.prepared.name;
            U && V && (V.options[U].manualStart || !Ei(V, z.element, z.prepared, D) ? z.stop() : (z.start(z.prepared, V, z.element), Za(z, D)));
          }
        })(b, y);
      }, "interactions:stop": function(b, y) {
        var k = b.interaction, D = k.interactable;
        D && D.options.styleCursor && Di(k.element, "", y);
      } }, maxInteractions: Qa, withinInteractionLimit: Ei, validateAction: Wo }, Ai = li, Hl = { id: "auto-start/dragAxis", listeners: { "autoStart:before-start": function(b, y) {
        var k = b.interaction, D = b.eventTarget, z = b.dx, V = b.dy;
        if (k.prepared.name === "drag") {
          var U = Math.abs(z), Z = Math.abs(V), se = k.interactable.options.drag, we = se.startAxis, de = U > Z ? "x" : U < Z ? "y" : "xy";
          if (k.prepared.axis = se.lockAxis === "start" ? de[0] : se.lockAxis, de !== "xy" && we !== "xy" && we !== de) {
            k.prepared.name = null;
            for (var Oe = D, Te = function(Qe) {
              if (Qe !== k.interactable) {
                var Ze = k.interactable.options.drag;
                if (!Ze.manualStart && Qe.testIgnoreAllow(Ze, Oe, D)) {
                  var lt = Qe.getAction(k.downPointer, k.downEvent, k, Oe);
                  if (lt && lt.name === "drag" && (function(st, xt) {
                    if (!xt) return !1;
                    var Rt = xt.options.drag.startAxis;
                    return st === "xy" || Rt === "xy" || Rt === st;
                  })(de, Qe) && Ai.validateAction(lt, Qe, Oe, D, y)) return Qe;
                }
              }
            }; w.element(Oe); ) {
              var Ye = y.interactables.forEachMatch(Oe, Te);
              if (Ye) {
                k.prepared.name = "drag", k.interactable = Ye, k.element = Oe;
                break;
              }
              Oe = W(Oe);
            }
          }
        }
      } } };
      function tr(b) {
        var y = b.prepared && b.prepared.name;
        if (!y) return null;
        var k = b.interactable.options;
        return k[y].hold || k[y].delay;
      }
      var Ks = { id: "auto-start/hold", install: function(b) {
        var y = b.defaults;
        b.usePlugin(Ai), y.perAction.hold = 0, y.perAction.delay = 0;
      }, listeners: { "interactions:new": function(b) {
        b.interaction.autoStartHoldTimer = null;
      }, "autoStart:prepared": function(b) {
        var y = b.interaction, k = tr(y);
        k > 0 && (y.autoStartHoldTimer = setTimeout((function() {
          y.start(y.prepared, y.interactable, y.element);
        }), k));
      }, "interactions:move": function(b) {
        var y = b.interaction, k = b.duplicate;
        y.autoStartHoldTimer && y.pointerWasMoved && !k && (clearTimeout(y.autoStartHoldTimer), y.autoStartHoldTimer = null);
      }, "autoStart:before-start": function(b) {
        var y = b.interaction;
        tr(y) > 0 && (y.prepared.name = null);
      } }, getHoldDuration: tr }, Vl = Ks, Ja = { id: "auto-start", install: function(b) {
        b.usePlugin(Ai), b.usePlugin(Vl), b.usePlugin(Hl);
      } }, jl = function(b) {
        return /^(always|never|auto)$/.test(b) ? (this.options.preventDefault = b, this) : w.bool(b) ? (this.options.preventDefault = b ? "always" : "never", this) : this.options.preventDefault;
      };
      function Wl(b) {
        var y = b.interaction, k = b.event;
        y.interactable && y.interactable.checkAndPreventDefault(k);
      }
      var el = { id: "core/interactablePreventDefault", install: function(b) {
        var y = b.Interactable;
        y.prototype.preventDefault = jl, y.prototype.checkAndPreventDefault = function(k) {
          return (function(D, z, V) {
            var U = D.options.preventDefault;
            if (U !== "never") if (U !== "always") {
              if (z.events.supportsPassive && /^touch(start|move)$/.test(V.type)) {
                var Z = P(V.target).document, se = z.getDocOptions(Z);
                if (!se || !se.events || se.events.passive !== !1) return;
              }
              /^(mouse|pointer|touch)*(down|start)/i.test(V.type) || w.element(V.target) && K(V.target, "input,select,textarea,[contenteditable=true],[contenteditable=true] *") || V.preventDefault();
            } else V.preventDefault();
          })(this, b, k);
        }, b.interactions.docEvents.push({ type: "dragstart", listener: function(k) {
          for (var D = 0, z = b.interactions.list; D < z.length; D++) {
            var V = z[D];
            if (V.element && (V.element === k.target || j(V.element, k.target))) return void V.interactable.checkAndPreventDefault(k);
          }
        } });
      }, listeners: ["down", "move", "up", "cancel"].reduce((function(b, y) {
        return b["interactions:".concat(y)] = Wl, b;
      }), {}) };
      function tl(b, y) {
        if (y.phaselessTypes[b]) return !0;
        for (var k in y.map) if (b.indexOf(k) === 0 && b.substr(k.length) in y.phases) return !0;
        return !1;
      }
      function ro(b) {
        var y = {};
        for (var k in b) {
          var D = b[k];
          w.plainObject(D) ? y[k] = ro(D) : w.array(D) ? y[k] = dt(D) : y[k] = D;
        }
        return y;
      }
      var nr = (function() {
        function b(y) {
          i(this, b), this.states = [], this.startOffset = { left: 0, right: 0, top: 0, bottom: 0 }, this.startDelta = void 0, this.result = void 0, this.endResult = void 0, this.startEdges = void 0, this.edges = void 0, this.interaction = void 0, this.interaction = y, this.result = ua(), this.edges = { left: !1, right: !1, top: !1, bottom: !1 };
        }
        return l(b, [{ key: "start", value: function(y, k) {
          var D, z, V = y.phase, U = this.interaction, Z = (function(we) {
            var de = we.interactable.options[we.prepared.name], Oe = de.modifiers;
            return Oe && Oe.length ? Oe : ["snap", "snapSize", "snapEdges", "restrict", "restrictEdges", "restrictSize"].map((function(Te) {
              var Ye = de[Te];
              return Ye && Ye.enabled && { options: Ye, methods: Ye._methods };
            })).filter((function(Te) {
              return !!Te;
            }));
          })(U);
          this.prepareStates(Z), this.startEdges = ue({}, U.edges), this.edges = ue({}, this.startEdges), this.startOffset = (D = U.rect, z = k, D ? { left: z.x - D.left, top: z.y - D.top, right: D.right - z.x, bottom: D.bottom - z.y } : { left: 0, top: 0, right: 0, bottom: 0 }), this.startDelta = { x: 0, y: 0 };
          var se = this.fillArg({ phase: V, pageCoords: k, preEnd: !1 });
          return this.result = ua(), this.startAll(se), this.result = this.setAll(se);
        } }, { key: "fillArg", value: function(y) {
          var k = this.interaction;
          return y.interaction = k, y.interactable = k.interactable, y.element = k.element, y.rect || (y.rect = k.rect), y.edges || (y.edges = this.startEdges), y.startOffset = this.startOffset, y;
        } }, { key: "startAll", value: function(y) {
          for (var k = 0, D = this.states; k < D.length; k++) {
            var z = D[k];
            z.methods.start && (y.state = z, z.methods.start(y));
          }
        } }, { key: "setAll", value: function(y) {
          var k = y.phase, D = y.preEnd, z = y.skipModifiers, V = y.rect, U = y.edges;
          y.coords = ue({}, y.pageCoords), y.rect = ue({}, V), y.edges = ue({}, U);
          for (var Z = z ? this.states.slice(z) : this.states, se = ua(y.coords, y.rect), we = 0; we < Z.length; we++) {
            var de, Oe = Z[we], Te = Oe.options, Ye = ue({}, y.coords), Qe = null;
            (de = Oe.methods) != null && de.set && this.shouldDo(Te, D, k) && (y.state = Oe, Qe = Oe.methods.set(y), Ke(y.edges, y.rect, { x: y.coords.x - Ye.x, y: y.coords.y - Ye.y })), se.eventProps.push(Qe);
          }
          ue(this.edges, y.edges), se.delta.x = y.coords.x - y.pageCoords.x, se.delta.y = y.coords.y - y.pageCoords.y, se.rectDelta.left = y.rect.left - V.left, se.rectDelta.right = y.rect.right - V.right, se.rectDelta.top = y.rect.top - V.top, se.rectDelta.bottom = y.rect.bottom - V.bottom;
          var Ze = this.result.coords, lt = this.result.rect;
          if (Ze && lt) {
            var st = se.rect.left !== lt.left || se.rect.right !== lt.right || se.rect.top !== lt.top || se.rect.bottom !== lt.bottom;
            se.changed = st || Ze.x !== se.coords.x || Ze.y !== se.coords.y;
          }
          return se;
        } }, { key: "applyToInteraction", value: function(y) {
          var k = this.interaction, D = y.phase, z = k.coords.cur, V = k.coords.start, U = this.result, Z = this.startDelta, se = U.delta;
          D === "start" && ue(this.startDelta, U.delta);
          for (var we = 0, de = [[V, Z], [z, se]]; we < de.length; we++) {
            var Oe = de[we], Te = Oe[0], Ye = Oe[1];
            Te.page.x += Ye.x, Te.page.y += Ye.y, Te.client.x += Ye.x, Te.client.y += Ye.y;
          }
          var Qe = this.result.rectDelta, Ze = y.rect || k.rect;
          Ze.left += Qe.left, Ze.right += Qe.right, Ze.top += Qe.top, Ze.bottom += Qe.bottom, Ze.width = Ze.right - Ze.left, Ze.height = Ze.bottom - Ze.top;
        } }, { key: "setAndApply", value: function(y) {
          var k = this.interaction, D = y.phase, z = y.preEnd, V = y.skipModifiers, U = this.setAll(this.fillArg({ preEnd: z, phase: D, pageCoords: y.modifiedCoords || k.coords.cur.page }));
          if (this.result = U, !U.changed && (!V || V < this.states.length) && k.interacting()) return !1;
          if (y.modifiedCoords) {
            var Z = k.coords.cur.page, se = { x: y.modifiedCoords.x - Z.x, y: y.modifiedCoords.y - Z.y };
            U.coords.x += se.x, U.coords.y += se.y, U.delta.x += se.x, U.delta.y += se.y;
          }
          this.applyToInteraction(y);
        } }, { key: "beforeEnd", value: function(y) {
          var k = y.interaction, D = y.event, z = this.states;
          if (z && z.length) {
            for (var V = !1, U = 0; U < z.length; U++) {
              var Z = z[U];
              y.state = Z;
              var se = Z.options, we = Z.methods, de = we.beforeEnd && we.beforeEnd(y);
              if (de) return this.endResult = de, !1;
              V = V || !V && this.shouldDo(se, !0, y.phase, !0);
            }
            V && k.move({ event: D, preEnd: !0 });
          }
        } }, { key: "stop", value: function(y) {
          var k = y.interaction;
          if (this.states && this.states.length) {
            var D = ue({ states: this.states, interactable: k.interactable, element: k.element, rect: null }, y);
            this.fillArg(D);
            for (var z = 0, V = this.states; z < V.length; z++) {
              var U = V[z];
              D.state = U, U.methods.stop && U.methods.stop(D);
            }
            this.states = null, this.endResult = null;
          }
        } }, { key: "prepareStates", value: function(y) {
          this.states = [];
          for (var k = 0; k < y.length; k++) {
            var D = y[k], z = D.options, V = D.methods, U = D.name;
            this.states.push({ options: z, methods: V, index: k, name: U });
          }
          return this.states;
        } }, { key: "restoreInteractionCoords", value: function(y) {
          var k = y.interaction, D = k.coords, z = k.rect, V = k.modification;
          if (V.result) {
            for (var U = V.startDelta, Z = V.result, se = Z.delta, we = Z.rectDelta, de = 0, Oe = [[D.start, U], [D.cur, se]]; de < Oe.length; de++) {
              var Te = Oe[de], Ye = Te[0], Qe = Te[1];
              Ye.page.x -= Qe.x, Ye.page.y -= Qe.y, Ye.client.x -= Qe.x, Ye.client.y -= Qe.y;
            }
            z.left -= we.left, z.right -= we.right, z.top -= we.top, z.bottom -= we.bottom;
          }
        } }, { key: "shouldDo", value: function(y, k, D, z) {
          return !(!y || y.enabled === !1 || z && !y.endOnly || y.endOnly && !k || D === "start" && !y.setStart);
        } }, { key: "copyFrom", value: function(y) {
          this.startOffset = y.startOffset, this.startDelta = y.startDelta, this.startEdges = y.startEdges, this.edges = y.edges, this.states = y.states.map((function(k) {
            return ro(k);
          })), this.result = ua(ue({}, y.result.coords), ue({}, y.result.rect));
        } }, { key: "destroy", value: function() {
          for (var y in this) this[y] = null;
        } }]), b;
      })();
      function ua(b, y) {
        return { rect: y, coords: b, delta: { x: 0, y: 0 }, rectDelta: { left: 0, right: 0, top: 0, bottom: 0 }, eventProps: [], changed: !0 };
      }
      function or(b, y) {
        var k = b.defaults, D = { start: b.start, set: b.set, beforeEnd: b.beforeEnd, stop: b.stop }, z = function(V) {
          var U = V || {};
          for (var Z in U.enabled = U.enabled !== !1, k) Z in U || (U[Z] = k[Z]);
          var se = { options: U, methods: D, name: y, enable: function() {
            return U.enabled = !0, se;
          }, disable: function() {
            return U.enabled = !1, se;
          } };
          return se;
        };
        return y && typeof y == "string" && (z._defaults = k, z._methods = D), z;
      }
      function Fo(b) {
        var y = b.iEvent, k = b.interaction.modification.result;
        k && (y.modifiers = k.eventProps);
      }
      var nl = { id: "modifiers/base", before: ["actions"], install: function(b) {
        b.defaults.perAction.modifiers = [];
      }, listeners: { "interactions:new": function(b) {
        var y = b.interaction;
        y.modification = new nr(y);
      }, "interactions:before-action-start": function(b) {
        var y = b.interaction, k = b.interaction.modification;
        k.start(b, y.coords.start.page), y.edges = k.edges, k.applyToInteraction(b);
      }, "interactions:before-action-move": function(b) {
        var y = b.interaction, k = y.modification, D = k.setAndApply(b);
        return y.edges = k.edges, D;
      }, "interactions:before-action-end": function(b) {
        var y = b.interaction, k = y.modification, D = k.beforeEnd(b);
        return y.edges = k.startEdges, D;
      }, "interactions:action-start": Fo, "interactions:action-move": Fo, "interactions:action-end": Fo, "interactions:after-action-start": function(b) {
        return b.interaction.modification.restoreInteractionCoords(b);
      }, "interactions:after-action-move": function(b) {
        return b.interaction.modification.restoreInteractionCoords(b);
      }, "interactions:stop": function(b) {
        return b.interaction.modification.stop(b);
      } } }, ol = nl, rl = { base: { preventDefault: "auto", deltaSource: "page" }, perAction: { enabled: !1, origin: { x: 0, y: 0 } }, actions: {} }, Ni = (function(b) {
        u(k, b);
        var y = p(k);
        function k(D, z, V, U, Z, se, we) {
          var de;
          i(this, k), (de = y.call(this, D)).relatedTarget = null, de.screenX = void 0, de.screenY = void 0, de.button = void 0, de.buttons = void 0, de.ctrlKey = void 0, de.shiftKey = void 0, de.altKey = void 0, de.metaKey = void 0, de.page = void 0, de.client = void 0, de.delta = void 0, de.rect = void 0, de.x0 = void 0, de.y0 = void 0, de.t0 = void 0, de.dt = void 0, de.duration = void 0, de.clientX0 = void 0, de.clientY0 = void 0, de.velocity = void 0, de.speed = void 0, de.swipe = void 0, de.axes = void 0, de.preEnd = void 0, Z = Z || D.element;
          var Oe = D.interactable, Te = (Oe && Oe.options || rl).deltaSource, Ye = He(Oe, Z, V), Qe = U === "start", Ze = U === "end", lt = Qe ? f(de) : D.prevEvent, st = Qe ? D.coords.start : Ze ? { page: lt.page, client: lt.client, timeStamp: D.coords.cur.timeStamp } : D.coords.cur;
          return de.page = ue({}, st.page), de.client = ue({}, st.client), de.rect = ue({}, D.rect), de.timeStamp = st.timeStamp, Ze || (de.page.x -= Ye.x, de.page.y -= Ye.y, de.client.x -= Ye.x, de.client.y -= Ye.y), de.ctrlKey = z.ctrlKey, de.altKey = z.altKey, de.shiftKey = z.shiftKey, de.metaKey = z.metaKey, de.button = z.button, de.buttons = z.buttons, de.target = Z, de.currentTarget = Z, de.preEnd = se, de.type = we || V + (U || ""), de.interactable = Oe, de.t0 = Qe ? D.pointers[D.pointers.length - 1].downTime : lt.t0, de.x0 = D.coords.start.page.x - Ye.x, de.y0 = D.coords.start.page.y - Ye.y, de.clientX0 = D.coords.start.client.x - Ye.x, de.clientY0 = D.coords.start.client.y - Ye.y, de.delta = Qe || Ze ? { x: 0, y: 0 } : { x: de[Te].x - lt[Te].x, y: de[Te].y - lt[Te].y }, de.dt = D.coords.delta.timeStamp, de.duration = de.timeStamp - de.t0, de.velocity = ue({}, D.coords.velocity[Te]), de.speed = De(de.velocity.x, de.velocity.y), de.swipe = Ze || U === "inertiastart" ? de.getSwipe() : null, de;
        }
        return l(k, [{ key: "getSwipe", value: function() {
          var D = this._interaction;
          if (D.prevEvent.speed < 600 || this.timeStamp - D.prevEvent.timeStamp > 150) return null;
          var z = 180 * Math.atan2(D.prevEvent.velocityY, D.prevEvent.velocityX) / Math.PI;
          z < 0 && (z += 360);
          var V = 112.5 <= z && z < 247.5, U = 202.5 <= z && z < 337.5;
          return { up: U, down: !U && 22.5 <= z && z < 157.5, left: V, right: !V && (292.5 <= z || z < 67.5), angle: z, speed: D.prevEvent.speed, velocity: { x: D.prevEvent.velocityX, y: D.prevEvent.velocityY } };
        } }, { key: "preventDefault", value: function() {
        } }, { key: "stopImmediatePropagation", value: function() {
          this.immediatePropagationStopped = this.propagationStopped = !0;
        } }, { key: "stopPropagation", value: function() {
          this.propagationStopped = !0;
        } }]), k;
      })(pt);
      Object.defineProperties(Ni.prototype, { pageX: { get: function() {
        return this.page.x;
      }, set: function(b) {
        this.page.x = b;
      } }, pageY: { get: function() {
        return this.page.y;
      }, set: function(b) {
        this.page.y = b;
      } }, clientX: { get: function() {
        return this.client.x;
      }, set: function(b) {
        this.client.x = b;
      } }, clientY: { get: function() {
        return this.client.y;
      }, set: function(b) {
        this.client.y = b;
      } }, dx: { get: function() {
        return this.delta.x;
      }, set: function(b) {
        this.delta.x = b;
      } }, dy: { get: function() {
        return this.delta.y;
      }, set: function(b) {
        this.delta.y = b;
      } }, velocityX: { get: function() {
        return this.velocity.x;
      }, set: function(b) {
        this.velocity.x = b;
      } }, velocityY: { get: function() {
        return this.velocity.y;
      }, set: function(b) {
        this.velocity.y = b;
      } } });
      var qs = l((function b(y, k, D, z, V) {
        i(this, b), this.id = void 0, this.pointer = void 0, this.event = void 0, this.downTime = void 0, this.downTarget = void 0, this.id = y, this.pointer = k, this.event = D, this.downTime = z, this.downTarget = V;
      })), Kl = (function(b) {
        return b.interactable = "", b.element = "", b.prepared = "", b.pointerIsDown = "", b.pointerWasMoved = "", b._proxy = "", b;
      })({}), Gd = (function(b) {
        return b.start = "", b.move = "", b.end = "", b.stop = "", b.interacting = "", b;
      })({}), il = 0, Ys = (function() {
        function b(y) {
          var k = this, D = y.pointerType, z = y.scopeFire;
          i(this, b), this.interactable = null, this.element = null, this.rect = null, this._rects = void 0, this.edges = null, this._scopeFire = void 0, this.prepared = { name: null, axis: null, edges: null }, this.pointerType = void 0, this.pointers = [], this.downEvent = null, this.downPointer = {}, this._latestPointer = { pointer: null, event: null, eventTarget: null }, this.prevEvent = null, this.pointerIsDown = !1, this.pointerWasMoved = !1, this._interacting = !1, this._ending = !1, this._stopped = !0, this._proxy = void 0, this.simulation = null, this.doMove = cn((function(de) {
            this.move(de);
          }), "The interaction.doMove() method has been renamed to interaction.move()"), this.coords = { start: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, prev: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, cur: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, delta: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, velocity: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 } }, this._id = il++, this._scopeFire = z, this.pointerType = D;
          var V = this;
          this._proxy = {};
          var U = function(de) {
            Object.defineProperty(k._proxy, de, { get: function() {
              return V[de];
            } });
          };
          for (var Z in Kl) U(Z);
          var se = function(de) {
            Object.defineProperty(k._proxy, de, { value: function() {
              return V[de].apply(V, arguments);
            } });
          };
          for (var we in Gd) se(we);
          this._scopeFire("interactions:new", { interaction: this });
        }
        return l(b, [{ key: "pointerMoveTolerance", get: function() {
          return 1;
        } }, { key: "pointerDown", value: function(y, k, D) {
          var z = this.updatePointer(y, k, D, !0), V = this.pointers[z];
          this._scopeFire("interactions:down", { pointer: y, event: k, eventTarget: D, pointerIndex: z, pointerInfo: V, type: "down", interaction: this });
        } }, { key: "start", value: function(y, k, D) {
          return !(this.interacting() || !this.pointerIsDown || this.pointers.length < (y.name === "gesture" ? 2 : 1) || !k.options[y.name].enabled) && (An(this.prepared, y), this.interactable = k, this.element = D, this.rect = k.getRect(D), this.edges = this.prepared.edges ? ue({}, this.prepared.edges) : { left: !0, right: !0, top: !0, bottom: !0 }, this._stopped = !1, this._interacting = this._doPhase({ interaction: this, event: this.downEvent, phase: "start" }) && !this._stopped, this._interacting);
        } }, { key: "pointerMove", value: function(y, k, D) {
          this.simulation || this.modification && this.modification.endResult || this.updatePointer(y, k, D, !1);
          var z, V, U = this.coords.cur.page.x === this.coords.prev.page.x && this.coords.cur.page.y === this.coords.prev.page.y && this.coords.cur.client.x === this.coords.prev.client.x && this.coords.cur.client.y === this.coords.prev.client.y;
          this.pointerIsDown && !this.pointerWasMoved && (z = this.coords.cur.client.x - this.coords.start.client.x, V = this.coords.cur.client.y - this.coords.start.client.y, this.pointerWasMoved = De(z, V) > this.pointerMoveTolerance);
          var Z, se, we, de = this.getPointerIndex(y), Oe = { pointer: y, pointerIndex: de, pointerInfo: this.pointers[de], event: k, type: "move", eventTarget: D, dx: z, dy: V, duplicate: U, interaction: this };
          U || (Z = this.coords.velocity, se = this.coords.delta, we = Math.max(se.timeStamp / 1e3, 1e-3), Z.page.x = se.page.x / we, Z.page.y = se.page.y / we, Z.client.x = se.client.x / we, Z.client.y = se.client.y / we, Z.timeStamp = we), this._scopeFire("interactions:move", Oe), U || this.simulation || (this.interacting() && (Oe.type = null, this.move(Oe)), this.pointerWasMoved && nt(this.coords.prev, this.coords.cur));
        } }, { key: "move", value: function(y) {
          y && y.event || je(this.coords.delta), (y = ue({ pointer: this._latestPointer.pointer, event: this._latestPointer.event, eventTarget: this._latestPointer.eventTarget, interaction: this }, y || {})).phase = "move", this._doPhase(y);
        } }, { key: "pointerUp", value: function(y, k, D, z) {
          var V = this.getPointerIndex(y);
          V === -1 && (V = this.updatePointer(y, k, D, !1));
          var U = /cancel$/i.test(k.type) ? "cancel" : "up";
          this._scopeFire("interactions:".concat(U), { pointer: y, pointerIndex: V, pointerInfo: this.pointers[V], event: k, eventTarget: D, type: U, curEventTarget: z, interaction: this }), this.simulation || this.end(k), this.removePointer(y, k);
        } }, { key: "documentBlur", value: function(y) {
          this.end(y), this._scopeFire("interactions:blur", { event: y, type: "blur", interaction: this });
        } }, { key: "end", value: function(y) {
          var k;
          this._ending = !0, y = y || this._latestPointer.event, this.interacting() && (k = this._doPhase({ event: y, interaction: this, phase: "end" })), this._ending = !1, k === !0 && this.stop();
        } }, { key: "currentAction", value: function() {
          return this._interacting ? this.prepared.name : null;
        } }, { key: "interacting", value: function() {
          return this._interacting;
        } }, { key: "stop", value: function() {
          this._scopeFire("interactions:stop", { interaction: this }), this.interactable = this.element = null, this._interacting = !1, this._stopped = !0, this.prepared.name = this.prevEvent = null;
        } }, { key: "getPointerIndex", value: function(y) {
          var k = Ce(y);
          return this.pointerType === "mouse" || this.pointerType === "pen" ? this.pointers.length - 1 : wt(this.pointers, (function(D) {
            return D.id === k;
          }));
        } }, { key: "getPointerInfo", value: function(y) {
          return this.pointers[this.getPointerIndex(y)];
        } }, { key: "updatePointer", value: function(y, k, D, z) {
          var V, U, Z, se = Ce(y), we = this.getPointerIndex(y), de = this.pointers[we];
          return z = z !== !1 && (z || /(down|start)$/i.test(k.type)), de ? de.pointer = y : (de = new qs(se, y, k, null, null), we = this.pointers.length, this.pointers.push(de)), Ae(this.coords.cur, this.pointers.map((function(Oe) {
            return Oe.pointer;
          })), this._now()), V = this.coords.delta, U = this.coords.prev, Z = this.coords.cur, V.page.x = Z.page.x - U.page.x, V.page.y = Z.page.y - U.page.y, V.client.x = Z.client.x - U.client.x, V.client.y = Z.client.y - U.client.y, V.timeStamp = Z.timeStamp - U.timeStamp, z && (this.pointerIsDown = !0, de.downTime = this.coords.cur.timeStamp, de.downTarget = D, Ve(this.downPointer, y), this.interacting() || (nt(this.coords.start, this.coords.cur), nt(this.coords.prev, this.coords.cur), this.downEvent = k, this.pointerWasMoved = !1)), this._updateLatestPointer(y, k, D), this._scopeFire("interactions:update-pointer", { pointer: y, event: k, eventTarget: D, down: z, pointerInfo: de, pointerIndex: we, interaction: this }), we;
        } }, { key: "removePointer", value: function(y, k) {
          var D = this.getPointerIndex(y);
          if (D !== -1) {
            var z = this.pointers[D];
            this._scopeFire("interactions:remove-pointer", { pointer: y, event: k, eventTarget: null, pointerIndex: D, pointerInfo: z, interaction: this }), this.pointers.splice(D, 1), this.pointerIsDown = !1;
          }
        } }, { key: "_updateLatestPointer", value: function(y, k, D) {
          this._latestPointer.pointer = y, this._latestPointer.event = k, this._latestPointer.eventTarget = D;
        } }, { key: "destroy", value: function() {
          this._latestPointer.pointer = null, this._latestPointer.event = null, this._latestPointer.eventTarget = null;
        } }, { key: "_createPreparedEvent", value: function(y, k, D, z) {
          return new Ni(this, y, this.prepared.name, k, this.element, D, z);
        } }, { key: "_fireEvent", value: function(y) {
          var k;
          (k = this.interactable) == null || k.fire(y), (!this.prevEvent || y.timeStamp >= this.prevEvent.timeStamp) && (this.prevEvent = y);
        } }, { key: "_doPhase", value: function(y) {
          var k = y.event, D = y.phase, z = y.preEnd, V = y.type, U = this.rect;
          if (U && D === "move" && (Ke(this.edges, U, this.coords.delta[this.interactable.options.deltaSource]), U.width = U.right - U.left, U.height = U.bottom - U.top), this._scopeFire("interactions:before-action-".concat(D), y) === !1) return !1;
          var Z = y.iEvent = this._createPreparedEvent(k, D, z, V);
          return this._scopeFire("interactions:action-".concat(D), y), D === "start" && (this.prevEvent = Z), this._fireEvent(Z), this._scopeFire("interactions:after-action-".concat(D), y), !0;
        } }, { key: "_now", value: function() {
          return Date.now();
        } }]), b;
      })();
      function Gs(b) {
        al(b.interaction);
      }
      function al(b) {
        if (!(function(k) {
          return !(!k.offset.pending.x && !k.offset.pending.y);
        })(b)) return !1;
        var y = b.offset.pending;
        return Ri(b.coords.cur, y), Ri(b.coords.delta, y), Ke(b.edges, b.rect, y), y.x = 0, y.y = 0, !0;
      }
      function dg(b) {
        var y = b.x, k = b.y;
        this.offset.pending.x += y, this.offset.pending.y += k, this.offset.total.x += y, this.offset.total.y += k;
      }
      function Ri(b, y) {
        var k = b.page, D = b.client, z = y.x, V = y.y;
        k.x += z, k.y += V, D.x += z, D.y += V;
      }
      Gd.offsetBy = "";
      var fg = { id: "offset", before: ["modifiers", "pointer-events", "actions", "inertia"], install: function(b) {
        b.Interaction.prototype.offsetBy = dg;
      }, listeners: { "interactions:new": function(b) {
        b.interaction.offset = { total: { x: 0, y: 0 }, pending: { x: 0, y: 0 } };
      }, "interactions:update-pointer": function(b) {
        return (function(y) {
          y.pointerIsDown && (Ri(y.coords.cur, y.offset.total), y.offset.pending.x = 0, y.offset.pending.y = 0);
        })(b.interaction);
      }, "interactions:before-action-start": Gs, "interactions:before-action-move": Gs, "interactions:before-action-end": function(b) {
        var y = b.interaction;
        if (al(y)) return y.move({ offset: !0 }), y.end(), !1;
      }, "interactions:stop": function(b) {
        var y = b.interaction;
        y.offset.total.x = 0, y.offset.total.y = 0, y.offset.pending.x = 0, y.offset.pending.y = 0;
      } } }, mc = fg, bc = (function() {
        function b(y) {
          i(this, b), this.active = !1, this.isModified = !1, this.smoothEnd = !1, this.allowResume = !1, this.modification = void 0, this.modifierCount = 0, this.modifierArg = void 0, this.startCoords = void 0, this.t0 = 0, this.v0 = 0, this.te = 0, this.targetOffset = void 0, this.modifiedOffset = void 0, this.currentOffset = void 0, this.lambda_v0 = 0, this.one_ve_v0 = 0, this.timeout = void 0, this.interaction = void 0, this.interaction = y;
        }
        return l(b, [{ key: "start", value: function(y) {
          var k = this.interaction, D = ll(k);
          if (!D || !D.enabled) return !1;
          var z = k.coords.velocity.client, V = De(z.x, z.y), U = this.modification || (this.modification = new nr(k));
          if (U.copyFrom(k.modification), this.t0 = k._now(), this.allowResume = D.allowResume, this.v0 = V, this.currentOffset = { x: 0, y: 0 }, this.startCoords = k.coords.cur.page, this.modifierArg = U.fillArg({ pageCoords: this.startCoords, preEnd: !0, phase: "inertiastart" }), this.t0 - k.coords.cur.timeStamp < 50 && V > D.minSpeed && V > D.endSpeed) this.startInertia();
          else {
            if (U.result = U.setAll(this.modifierArg), !U.result.changed) return !1;
            this.startSmoothEnd();
          }
          return k.modification.result.rect = null, k.offsetBy(this.targetOffset), k._doPhase({ interaction: k, event: y, phase: "inertiastart" }), k.offsetBy({ x: -this.targetOffset.x, y: -this.targetOffset.y }), k.modification.result.rect = null, this.active = !0, k.simulation = this, !0;
        } }, { key: "startInertia", value: function() {
          var y = this, k = this.interaction.coords.velocity.client, D = ll(this.interaction), z = D.resistance, V = -Math.log(D.endSpeed / this.v0) / z;
          this.targetOffset = { x: (k.x - V) / z, y: (k.y - V) / z }, this.te = V, this.lambda_v0 = z / this.v0, this.one_ve_v0 = 1 - D.endSpeed / this.v0;
          var U = this.modification, Z = this.modifierArg;
          Z.pageCoords = { x: this.startCoords.x + this.targetOffset.x, y: this.startCoords.y + this.targetOffset.y }, U.result = U.setAll(Z), U.result.changed && (this.isModified = !0, this.modifiedOffset = { x: this.targetOffset.x + U.result.delta.x, y: this.targetOffset.y + U.result.delta.y }), this.onNextFrame((function() {
            return y.inertiaTick();
          }));
        } }, { key: "startSmoothEnd", value: function() {
          var y = this;
          this.smoothEnd = !0, this.isModified = !0, this.targetOffset = { x: this.modification.result.delta.x, y: this.modification.result.delta.y }, this.onNextFrame((function() {
            return y.smoothEndTick();
          }));
        } }, { key: "onNextFrame", value: function(y) {
          var k = this;
          this.timeout = Cn.request((function() {
            k.active && y();
          }));
        } }, { key: "inertiaTick", value: function() {
          var y, k, D, z, V, U, Z, se = this, we = this.interaction, de = ll(we).resistance, Oe = (we._now() - this.t0) / 1e3;
          if (Oe < this.te) {
            var Te, Ye = 1 - (Math.exp(-de * Oe) - this.lambda_v0) / this.one_ve_v0;
            this.isModified ? (y = 0, k = 0, D = this.targetOffset.x, z = this.targetOffset.y, V = this.modifiedOffset.x, U = this.modifiedOffset.y, Te = { x: ca(Z = Ye, y, D, V), y: ca(Z, k, z, U) }) : Te = { x: this.targetOffset.x * Ye, y: this.targetOffset.y * Ye };
            var Qe = { x: Te.x - this.currentOffset.x, y: Te.y - this.currentOffset.y };
            this.currentOffset.x += Qe.x, this.currentOffset.y += Qe.y, we.offsetBy(Qe), we.move(), this.onNextFrame((function() {
              return se.inertiaTick();
            }));
          } else we.offsetBy({ x: this.modifiedOffset.x - this.currentOffset.x, y: this.modifiedOffset.y - this.currentOffset.y }), this.end();
        } }, { key: "smoothEndTick", value: function() {
          var y = this, k = this.interaction, D = k._now() - this.t0, z = ll(k).smoothEndDuration;
          if (D < z) {
            var V = { x: da(D, 0, this.targetOffset.x, z), y: da(D, 0, this.targetOffset.y, z) }, U = { x: V.x - this.currentOffset.x, y: V.y - this.currentOffset.y };
            this.currentOffset.x += U.x, this.currentOffset.y += U.y, k.offsetBy(U), k.move({ skipModifiers: this.modifierCount }), this.onNextFrame((function() {
              return y.smoothEndTick();
            }));
          } else k.offsetBy({ x: this.targetOffset.x - this.currentOffset.x, y: this.targetOffset.y - this.currentOffset.y }), this.end();
        } }, { key: "resume", value: function(y) {
          var k = y.pointer, D = y.event, z = y.eventTarget, V = this.interaction;
          V.offsetBy({ x: -this.currentOffset.x, y: -this.currentOffset.y }), V.updatePointer(k, D, z, !0), V._doPhase({ interaction: V, event: D, phase: "resume" }), nt(V.coords.prev, V.coords.cur), this.stop();
        } }, { key: "end", value: function() {
          this.interaction.move(), this.interaction.end(), this.stop();
        } }, { key: "stop", value: function() {
          this.active = this.smoothEnd = !1, this.interaction.simulation = null, Cn.cancel(this.timeout);
        } }]), b;
      })();
      function ll(b) {
        var y = b.interactable, k = b.prepared;
        return y && y.options && k.name && y.options[k.name].inertia;
      }
      var yc = { id: "inertia", before: ["modifiers", "actions"], install: function(b) {
        var y = b.defaults;
        b.usePlugin(mc), b.usePlugin(ol), b.actions.phases.inertiastart = !0, b.actions.phases.resume = !0, y.perAction.inertia = { enabled: !1, resistance: 10, minSpeed: 100, endSpeed: 10, allowResume: !0, smoothEndDuration: 300 };
      }, listeners: { "interactions:new": function(b) {
        var y = b.interaction;
        y.inertia = new bc(y);
      }, "interactions:before-action-end": function(b) {
        var y = b.interaction, k = b.event;
        return (!y._interacting || y.simulation || !y.inertia.start(k)) && null;
      }, "interactions:down": function(b) {
        var y = b.interaction, k = b.eventTarget, D = y.inertia;
        if (D.active) for (var z = k; w.element(z); ) {
          if (z === y.element) {
            D.resume(b);
            break;
          }
          z = W(z);
        }
      }, "interactions:stop": function(b) {
        var y = b.interaction.inertia;
        y.active && y.stop();
      }, "interactions:before-action-resume": function(b) {
        var y = b.interaction.modification;
        y.stop(b), y.start(b, b.interaction.coords.cur.page), y.applyToInteraction(b);
      }, "interactions:before-action-inertiastart": function(b) {
        return b.interaction.modification.setAndApply(b);
      }, "interactions:action-resume": Fo, "interactions:action-inertiastart": Fo, "interactions:after-action-inertiastart": function(b) {
        return b.interaction.modification.restoreInteractionCoords(b);
      }, "interactions:after-action-resume": function(b) {
        return b.interaction.modification.restoreInteractionCoords(b);
      } } };
      function ca(b, y, k, D) {
        var z = 1 - b;
        return z * z * y + 2 * z * b * k + b * b * D;
      }
      function da(b, y, k, D) {
        return -k * (b /= D) * (b - 2) + y;
      }
      var Ud = yc;
      function xc(b, y) {
        for (var k = 0; k < y.length; k++) {
          var D = y[k];
          if (b.immediatePropagationStopped) break;
          D(b);
        }
      }
      var fa = (function() {
        function b(y) {
          i(this, b), this.options = void 0, this.types = {}, this.propagationStopped = !1, this.immediatePropagationStopped = !1, this.global = void 0, this.options = ue({}, y || {});
        }
        return l(b, [{ key: "fire", value: function(y) {
          var k, D = this.global;
          (k = this.types[y.type]) && xc(y, k), !y.propagationStopped && D && (k = D[y.type]) && xc(y, k);
        } }, { key: "on", value: function(y, k) {
          var D = Ne(y, k);
          for (y in D) this.types[y] = at(this.types[y] || [], D[y]);
        } }, { key: "off", value: function(y, k) {
          var D = Ne(y, k);
          for (y in D) {
            var z = this.types[y];
            if (z && z.length) for (var V = 0, U = D[y]; V < U.length; V++) {
              var Z = U[V], se = z.indexOf(Z);
              se !== -1 && z.splice(se, 1);
            }
          }
        } }, { key: "getRect", value: function(y) {
          return null;
        } }]), b;
      })(), sl = (function() {
        function b(y) {
          i(this, b), this.currentTarget = void 0, this.originalEvent = void 0, this.type = void 0, this.originalEvent = y, Ve(this, y);
        }
        return l(b, [{ key: "preventOriginalDefault", value: function() {
          this.originalEvent.preventDefault();
        } }, { key: "stopPropagation", value: function() {
          this.originalEvent.stopPropagation();
        } }, { key: "stopImmediatePropagation", value: function() {
          this.originalEvent.stopImmediatePropagation();
        } }]), b;
      })();
      function ul(b) {
        return w.object(b) ? { capture: !!b.capture, passive: !!b.passive } : { capture: !!b, passive: !1 };
      }
      function ql(b, y) {
        return b === y || (typeof b == "boolean" ? !!y.capture === b && !y.passive : !!b.capture == !!y.capture && !!b.passive == !!y.passive);
      }
      var qn = { id: "events", install: function(b) {
        var y, k = [], D = {}, z = [], V = { add: U, remove: Z, addDelegate: function(de, Oe, Te, Ye, Qe) {
          var Ze = ul(Qe);
          if (!D[Te]) {
            D[Te] = [];
            for (var lt = 0; lt < z.length; lt++) {
              var st = z[lt];
              U(st, Te, se), U(st, Te, we, !0);
            }
          }
          var xt = D[Te], Rt = Ct(xt, (function(Gt) {
            return Gt.selector === de && Gt.context === Oe;
          }));
          Rt || (Rt = { selector: de, context: Oe, listeners: [] }, xt.push(Rt)), Rt.listeners.push({ func: Ye, options: Ze });
        }, removeDelegate: function(de, Oe, Te, Ye, Qe) {
          var Ze, lt = ul(Qe), st = D[Te], xt = !1;
          if (st)
            for (Ze = st.length - 1; Ze >= 0; Ze--) {
              var Rt = st[Ze];
              if (Rt.selector === de && Rt.context === Oe) {
                for (var Gt = Rt.listeners, Mt = Gt.length - 1; Mt >= 0; Mt--) {
                  var jt = Gt[Mt];
                  if (jt.func === Ye && ql(jt.options, lt)) {
                    Gt.splice(Mt, 1), Gt.length || (st.splice(Ze, 1), Z(Oe, Te, se), Z(Oe, Te, we, !0)), xt = !0;
                    break;
                  }
                }
                if (xt) break;
              }
            }
        }, delegateListener: se, delegateUseCapture: we, delegatedEvents: D, documents: z, targets: k, supportsOptions: !1, supportsPassive: !1 };
        function U(de, Oe, Te, Ye) {
          if (de.addEventListener) {
            var Qe = ul(Ye), Ze = Ct(k, (function(lt) {
              return lt.eventTarget === de;
            }));
            Ze || (Ze = { eventTarget: de, events: {} }, k.push(Ze)), Ze.events[Oe] || (Ze.events[Oe] = []), Ct(Ze.events[Oe], (function(lt) {
              return lt.func === Te && ql(lt.options, Qe);
            })) || (de.addEventListener(Oe, Te, V.supportsOptions ? Qe : Qe.capture), Ze.events[Oe].push({ func: Te, options: Qe }));
          }
        }
        function Z(de, Oe, Te, Ye) {
          if (de.addEventListener && de.removeEventListener) {
            var Qe = wt(k, (function(Nn) {
              return Nn.eventTarget === de;
            })), Ze = k[Qe];
            if (Ze && Ze.events) if (Oe !== "all") {
              var lt = !1, st = Ze.events[Oe];
              if (st) {
                if (Te === "all") {
                  for (var xt = st.length - 1; xt >= 0; xt--) {
                    var Rt = st[xt];
                    Z(de, Oe, Rt.func, Rt.options);
                  }
                  return;
                }
                for (var Gt = ul(Ye), Mt = 0; Mt < st.length; Mt++) {
                  var jt = st[Mt];
                  if (jt.func === Te && ql(jt.options, Gt)) {
                    de.removeEventListener(Oe, Te, V.supportsOptions ? Gt : Gt.capture), st.splice(Mt, 1), st.length === 0 && (delete Ze.events[Oe], lt = !0);
                    break;
                  }
                }
              }
              lt && !Object.keys(Ze.events).length && k.splice(Qe, 1);
            } else for (Oe in Ze.events) Ze.events.hasOwnProperty(Oe) && Z(de, Oe, "all");
          }
        }
        function se(de, Oe) {
          for (var Te = ul(Oe), Ye = new sl(de), Qe = D[de.type], Ze = ot(de)[0], lt = Ze; w.element(lt); ) {
            for (var st = 0; st < Qe.length; st++) {
              var xt = Qe[st], Rt = xt.selector, Gt = xt.context;
              if (K(lt, Rt) && j(Gt, Ze) && j(Gt, lt)) {
                var Mt = xt.listeners;
                Ye.currentTarget = lt;
                for (var jt = 0; jt < Mt.length; jt++) {
                  var Nn = Mt[jt];
                  ql(Nn.options, Te) && Nn.func(Ye);
                }
              }
            }
            lt = W(lt);
          }
        }
        function we(de) {
          return se(de, !0);
        }
        return (y = b.document) == null || y.createElement("div").addEventListener("test", null, { get capture() {
          return V.supportsOptions = !0;
        }, get passive() {
          return V.supportsPassive = !0;
        } }), b.events = V, V;
      } }, Hn = { methodOrder: ["simulationResume", "mouseOrPen", "hasPointer", "idle"], search: function(b) {
        for (var y = 0, k = Hn.methodOrder; y < k.length; y++) {
          var D = k[y], z = Hn[D](b);
          if (z) return z;
        }
        return null;
      }, simulationResume: function(b) {
        var y = b.pointerType, k = b.eventType, D = b.eventTarget, z = b.scope;
        if (!/down|start/i.test(k)) return null;
        for (var V = 0, U = z.interactions.list; V < U.length; V++) {
          var Z = U[V], se = D;
          if (Z.simulation && Z.simulation.allowResume && Z.pointerType === y) for (; se; ) {
            if (se === Z.element) return Z;
            se = W(se);
          }
        }
        return null;
      }, mouseOrPen: function(b) {
        var y, k = b.pointerId, D = b.pointerType, z = b.eventType, V = b.scope;
        if (D !== "mouse" && D !== "pen") return null;
        for (var U = 0, Z = V.interactions.list; U < Z.length; U++) {
          var se = Z[U];
          if (se.pointerType === D) {
            if (se.simulation && !si(se, k)) continue;
            if (se.interacting()) return se;
            y || (y = se);
          }
        }
        if (y) return y;
        for (var we = 0, de = V.interactions.list; we < de.length; we++) {
          var Oe = de[we];
          if (!(Oe.pointerType !== D || /down/i.test(z) && Oe.simulation)) return Oe;
        }
        return null;
      }, hasPointer: function(b) {
        for (var y = b.pointerId, k = 0, D = b.scope.interactions.list; k < D.length; k++) {
          var z = D[k];
          if (si(z, y)) return z;
        }
        return null;
      }, idle: function(b) {
        for (var y = b.pointerType, k = 0, D = b.scope.interactions.list; k < D.length; k++) {
          var z = D[k];
          if (z.pointers.length === 1) {
            var V = z.interactable;
            if (V && (!V.options.gesture || !V.options.gesture.enabled)) continue;
          } else if (z.pointers.length >= 2) continue;
          if (!z.interacting() && y === z.pointerType) return z;
        }
        return null;
      } };
      function si(b, y) {
        return b.pointers.some((function(k) {
          return k.id === y;
        }));
      }
      var Po = Hn, ho = ["pointerDown", "pointerMove", "pointerUp", "updatePointer", "removePointer", "windowBlur"];
      function mo(b, y) {
        return function(k) {
          var D = y.interactions.list, z = Be(k), V = ot(k), U = V[0], Z = V[1], se = [];
          if (/^touch/.test(k.type)) {
            y.prevTouchTime = y.now();
            for (var we = 0, de = k.changedTouches; we < de.length; we++) {
              var Oe = de[we], Te = { pointer: Oe, pointerId: Ce(Oe), pointerType: z, eventType: k.type, eventTarget: U, curEventTarget: Z, scope: y }, Ye = Vn(Te);
              se.push([Te.pointer, Te.eventTarget, Te.curEventTarget, Ye]);
            }
          } else {
            var Qe = !1;
            if (!X.supportsPointerEvent && /mouse/.test(k.type)) {
              for (var Ze = 0; Ze < D.length && !Qe; Ze++) Qe = D[Ze].pointerType !== "mouse" && D[Ze].pointerIsDown;
              Qe = Qe || y.now() - y.prevTouchTime < 500 || k.timeStamp === 0;
            }
            if (!Qe) {
              var lt = { pointer: k, pointerId: Ce(k), pointerType: z, eventType: k.type, curEventTarget: Z, eventTarget: U, scope: y }, st = Vn(lt);
              se.push([lt.pointer, lt.eventTarget, lt.curEventTarget, st]);
            }
          }
          for (var xt = 0; xt < se.length; xt++) {
            var Rt = se[xt], Gt = Rt[0], Mt = Rt[1], jt = Rt[2];
            Rt[3][b](Gt, k, Mt, jt);
          }
        };
      }
      function Vn(b) {
        var y = b.pointerType, k = b.scope, D = { interaction: Po.search(b), searchDetails: b };
        return k.fire("interactions:find", D), D.interaction || k.interactions.new({ pointerType: y });
      }
      function zi(b, y) {
        var k = b.doc, D = b.scope, z = b.options, V = D.interactions.docEvents, U = D.events, Z = U[y];
        for (var se in D.browser.isIOS && !z.events && (z.events = { passive: !1 }), U.delegatedEvents) Z(k, se, U.delegateListener), Z(k, se, U.delegateUseCapture, !0);
        for (var we = z && z.events, de = 0; de < V.length; de++) {
          var Oe = V[de];
          Z(k, Oe.type, Oe.listener, we);
        }
      }
      var Us = { id: "core/interactions", install: function(b) {
        for (var y = {}, k = 0; k < ho.length; k++) {
          var D = ho[k];
          y[D] = mo(D, b);
        }
        var z, V = X.pEventTypes;
        function U() {
          for (var Z = 0, se = b.interactions.list; Z < se.length; Z++) {
            var we = se[Z];
            if (we.pointerIsDown && we.pointerType === "touch" && !we._interacting) for (var de = function() {
              var Ye = Te[Oe];
              b.documents.some((function(Qe) {
                return j(Qe.doc, Ye.downTarget);
              })) || we.removePointer(Ye.pointer, Ye.event);
            }, Oe = 0, Te = we.pointers; Oe < Te.length; Oe++) de();
          }
        }
        (z = F.PointerEvent ? [{ type: V.down, listener: U }, { type: V.down, listener: y.pointerDown }, { type: V.move, listener: y.pointerMove }, { type: V.up, listener: y.pointerUp }, { type: V.cancel, listener: y.pointerUp }] : [{ type: "mousedown", listener: y.pointerDown }, { type: "mousemove", listener: y.pointerMove }, { type: "mouseup", listener: y.pointerUp }, { type: "touchstart", listener: U }, { type: "touchstart", listener: y.pointerDown }, { type: "touchmove", listener: y.pointerMove }, { type: "touchend", listener: y.pointerUp }, { type: "touchcancel", listener: y.pointerUp }]).push({ type: "blur", listener: function(Z) {
          for (var se = 0, we = b.interactions.list; se < we.length; se++)
            we[se].documentBlur(Z);
        } }), b.prevTouchTime = 0, b.Interaction = (function(Z) {
          u(we, Z);
          var se = p(we);
          function we() {
            return i(this, we), se.apply(this, arguments);
          }
          return l(we, [{ key: "pointerMoveTolerance", get: function() {
            return b.interactions.pointerMoveTolerance;
          }, set: function(de) {
            b.interactions.pointerMoveTolerance = de;
          } }, { key: "_now", value: function() {
            return b.now();
          } }]), we;
        })(Ys), b.interactions = { list: [], new: function(Z) {
          Z.scopeFire = function(we, de) {
            return b.fire(we, de);
          };
          var se = new b.Interaction(Z);
          return b.interactions.list.push(se), se;
        }, listeners: y, docEvents: z, pointerMoveTolerance: 1 }, b.usePlugin(el);
      }, listeners: { "scope:add-document": function(b) {
        return zi(b, "add");
      }, "scope:remove-document": function(b) {
        return zi(b, "remove");
      }, "interactable:unset": function(b, y) {
        for (var k = b.interactable, D = y.interactions.list.length - 1; D >= 0; D--) {
          var z = y.interactions.list[D];
          z.interactable === k && (z.stop(), y.fire("interactions:destroy", { interaction: z }), z.destroy(), y.interactions.list.length > 2 && y.interactions.list.splice(D, 1));
        }
      } }, onDocSignal: zi, doOnInteractions: mo, methodNames: ho }, pg = Us, Ko = (function(b) {
        return b[b.On = 0] = "On", b[b.Off = 1] = "Off", b;
      })(Ko || {}), Lr = (function() {
        function b(y, k, D, z) {
          i(this, b), this.target = void 0, this.options = void 0, this._actions = void 0, this.events = new fa(), this._context = void 0, this._win = void 0, this._doc = void 0, this._scopeEvents = void 0, this._actions = k.actions, this.target = y, this._context = k.context || D, this._win = P(ve(y) ? this._context : y), this._doc = this._win.document, this._scopeEvents = z, this.set(k);
        }
        return l(b, [{ key: "_defaults", get: function() {
          return { base: {}, perAction: {}, actions: {} };
        } }, { key: "setOnEvents", value: function(y, k) {
          return w.func(k.onstart) && this.on("".concat(y, "start"), k.onstart), w.func(k.onmove) && this.on("".concat(y, "move"), k.onmove), w.func(k.onend) && this.on("".concat(y, "end"), k.onend), w.func(k.oninertiastart) && this.on("".concat(y, "inertiastart"), k.oninertiastart), this;
        } }, { key: "updatePerActionListeners", value: function(y, k, D) {
          var z, V = this, U = (z = this._actions.map[y]) == null ? void 0 : z.filterEventType, Z = function(se) {
            return (U == null || U(se)) && tl(se, V._actions);
          };
          (w.array(k) || w.object(k)) && this._onOff(Ko.Off, y, k, void 0, Z), (w.array(D) || w.object(D)) && this._onOff(Ko.On, y, D, void 0, Z);
        } }, { key: "setPerAction", value: function(y, k) {
          var D = this._defaults;
          for (var z in k) {
            var V = z, U = this.options[y], Z = k[V];
            V === "listeners" && this.updatePerActionListeners(y, U.listeners, Z), w.array(Z) ? U[V] = dt(Z) : w.plainObject(Z) ? (U[V] = ue(U[V] || {}, ro(Z)), w.object(D.perAction[V]) && "enabled" in D.perAction[V] && (U[V].enabled = Z.enabled !== !1)) : w.bool(Z) && w.object(D.perAction[V]) ? U[V].enabled = Z : U[V] = Z;
          }
        } }, { key: "getRect", value: function(y) {
          return y = y || (w.element(this.target) ? this.target : null), w.string(this.target) && (y = y || this._context.querySelector(this.target)), re(y);
        } }, { key: "rectChecker", value: function(y) {
          var k = this;
          return w.func(y) ? (this.getRect = function(D) {
            var z = ue({}, y.apply(k, D));
            return "width" in z || (z.width = z.right - z.left, z.height = z.bottom - z.top), z;
          }, this) : y === null ? (delete this.getRect, this) : this.getRect;
        } }, { key: "_backCompatOption", value: function(y, k) {
          if (ve(k) || w.object(k)) {
            for (var D in this.options[y] = k, this._actions.map) this.options[D][y] = k;
            return this;
          }
          return this.options[y];
        } }, { key: "origin", value: function(y) {
          return this._backCompatOption("origin", y);
        } }, { key: "deltaSource", value: function(y) {
          return y === "page" || y === "client" ? (this.options.deltaSource = y, this) : this.options.deltaSource;
        } }, { key: "getAllElements", value: function() {
          var y = this.target;
          return w.string(y) ? Array.from(this._context.querySelectorAll(y)) : w.func(y) && y.getAllElements ? y.getAllElements() : w.element(y) ? [y] : [];
        } }, { key: "context", value: function() {
          return this._context;
        } }, { key: "inContext", value: function(y) {
          return this._context === y.ownerDocument || j(this._context, y);
        } }, { key: "testIgnoreAllow", value: function(y, k, D) {
          return !this.testIgnore(y.ignoreFrom, k, D) && this.testAllow(y.allowFrom, k, D);
        } }, { key: "testAllow", value: function(y, k, D) {
          return !y || !!w.element(D) && (w.string(y) ? ae(D, y, k) : !!w.element(y) && j(y, D));
        } }, { key: "testIgnore", value: function(y, k, D) {
          return !(!y || !w.element(D)) && (w.string(y) ? ae(D, y, k) : !!w.element(y) && j(y, D));
        } }, { key: "fire", value: function(y) {
          return this.events.fire(y), this;
        } }, { key: "_onOff", value: function(y, k, D, z, V) {
          w.object(k) && !w.array(k) && (z = D, D = null);
          var U = Ne(k, D, V);
          for (var Z in U) {
            Z === "wheel" && (Z = X.wheelEvent);
            for (var se = 0, we = U[Z]; se < we.length; se++) {
              var de = we[se];
              tl(Z, this._actions) ? this.events[y === Ko.On ? "on" : "off"](Z, de) : w.string(this.target) ? this._scopeEvents[y === Ko.On ? "addDelegate" : "removeDelegate"](this.target, this._context, Z, de, z) : this._scopeEvents[y === Ko.On ? "add" : "remove"](this.target, Z, de, z);
            }
          }
          return this;
        } }, { key: "on", value: function(y, k, D) {
          return this._onOff(Ko.On, y, k, D);
        } }, { key: "off", value: function(y, k, D) {
          return this._onOff(Ko.Off, y, k, D);
        } }, { key: "set", value: function(y) {
          var k = this._defaults;
          for (var D in w.object(y) || (y = {}), this.options = ro(k.base), this._actions.methodDict) {
            var z = D, V = this._actions.methodDict[z];
            this.options[z] = {}, this.setPerAction(z, ue(ue({}, k.perAction), k.actions[z])), this[V](y[z]);
          }
          for (var U in y) U !== "getRect" ? w.func(this[U]) && this[U](y[U]) : this.rectChecker(y.getRect);
          return this;
        } }, { key: "unset", value: function() {
          if (w.string(this.target)) for (var y in this._scopeEvents.delegatedEvents) for (var k = this._scopeEvents.delegatedEvents[y], D = k.length - 1; D >= 0; D--) {
            var z = k[D], V = z.selector, U = z.context, Z = z.listeners;
            V === this.target && U === this._context && k.splice(D, 1);
            for (var se = Z.length - 1; se >= 0; se--) this._scopeEvents.removeDelegate(this.target, this._context, y, Z[se][0], Z[se][1]);
          }
          else this._scopeEvents.remove(this.target, "all");
        } }]), b;
      })(), hg = (function() {
        function b(y) {
          var k = this;
          i(this, b), this.list = [], this.selectorMap = {}, this.scope = void 0, this.scope = y, y.addListeners({ "interactable:unset": function(D) {
            var z = D.interactable, V = z.target, U = w.string(V) ? k.selectorMap[V] : V[k.scope.id], Z = wt(U, (function(se) {
              return se === z;
            }));
            U.splice(Z, 1);
          } });
        }
        return l(b, [{ key: "new", value: function(y, k) {
          k = ue(k || {}, { actions: this.scope.actions });
          var D = new this.scope.Interactable(y, k, this.scope.document, this.scope.events);
          return this.scope.addDocument(D._doc), this.list.push(D), w.string(y) ? (this.selectorMap[y] || (this.selectorMap[y] = []), this.selectorMap[y].push(D)) : (D.target[this.scope.id] || Object.defineProperty(y, this.scope.id, { value: [], configurable: !0 }), y[this.scope.id].push(D)), this.scope.fire("interactable:new", { target: y, options: k, interactable: D, win: this.scope._win }), D;
        } }, { key: "getExisting", value: function(y, k) {
          var D = k && k.context || this.scope.document, z = w.string(y), V = z ? this.selectorMap[y] : y[this.scope.id];
          if (V) return Ct(V, (function(U) {
            return U._context === D && (z || U.inContext(y));
          }));
        } }, { key: "forEachMatch", value: function(y, k) {
          for (var D = 0, z = this.list; D < z.length; D++) {
            var V = z[D], U = void 0;
            if ((w.string(V.target) ? w.element(y) && K(y, V.target) : y === V.target) && V.inContext(y) && (U = k(V)), U !== void 0) return U;
          }
        } }]), b;
      })(), gg = (function() {
        function b() {
          var y = this;
          i(this, b), this.id = "__interact_scope_".concat(Math.floor(100 * Math.random())), this.isInitialized = !1, this.listenerMaps = [], this.browser = X, this.defaults = ro(rl), this.Eventable = fa, this.actions = { map: {}, phases: { start: !0, move: !0, end: !0 }, methodDict: {}, phaselessTypes: {} }, this.interactStatic = (function(D) {
            var z = function V(U, Z) {
              var se = D.interactables.getExisting(U, Z);
              return se || ((se = D.interactables.new(U, Z)).events.global = V.globalEvents), se;
            };
            return z.getPointerAverage = We, z.getTouchBBox = tt, z.getTouchDistance = Ee, z.getTouchAngle = Re, z.getElementRect = re, z.getElementClientRect = ie, z.matchesSelector = K, z.closest = ee, z.globalEvents = {}, z.version = "1.10.27", z.scope = D, z.use = function(V, U) {
              return this.scope.usePlugin(V, U), this;
            }, z.isSet = function(V, U) {
              return !!this.scope.interactables.get(V, U && U.context);
            }, z.on = cn((function(V, U, Z) {
              if (w.string(V) && V.search(" ") !== -1 && (V = V.trim().split(/ +/)), w.array(V)) {
                for (var se = 0, we = V; se < we.length; se++) {
                  var de = we[se];
                  this.on(de, U, Z);
                }
                return this;
              }
              if (w.object(V)) {
                for (var Oe in V) this.on(Oe, V[Oe], U);
                return this;
              }
              return tl(V, this.scope.actions) ? this.globalEvents[V] ? this.globalEvents[V].push(U) : this.globalEvents[V] = [U] : this.scope.events.add(this.scope.document, V, U, { options: Z }), this;
            }), "The interact.on() method is being deprecated"), z.off = cn((function(V, U, Z) {
              if (w.string(V) && V.search(" ") !== -1 && (V = V.trim().split(/ +/)), w.array(V)) {
                for (var se = 0, we = V; se < we.length; se++) {
                  var de = we[se];
                  this.off(de, U, Z);
                }
                return this;
              }
              if (w.object(V)) {
                for (var Oe in V) this.off(Oe, V[Oe], U);
                return this;
              }
              var Te;
              return tl(V, this.scope.actions) ? V in this.globalEvents && (Te = this.globalEvents[V].indexOf(U)) !== -1 && this.globalEvents[V].splice(Te, 1) : this.scope.events.remove(this.scope.document, V, U, Z), this;
            }), "The interact.off() method is being deprecated"), z.debug = function() {
              return this.scope;
            }, z.supportsTouch = function() {
              return X.supportsTouch;
            }, z.supportsPointerEvent = function() {
              return X.supportsPointerEvent;
            }, z.stop = function() {
              for (var V = 0, U = this.scope.interactions.list; V < U.length; V++) U[V].stop();
              return this;
            }, z.pointerMoveTolerance = function(V) {
              return w.number(V) ? (this.scope.interactions.pointerMoveTolerance = V, this) : this.scope.interactions.pointerMoveTolerance;
            }, z.addDocument = function(V, U) {
              this.scope.addDocument(V, U);
            }, z.removeDocument = function(V) {
              this.scope.removeDocument(V);
            }, z;
          })(this), this.InteractEvent = Ni, this.Interactable = void 0, this.interactables = new hg(this), this._win = void 0, this.document = void 0, this.window = void 0, this.documents = [], this._plugins = { list: [], map: {} }, this.onWindowUnload = function(D) {
            return y.removeDocument(D.target);
          };
          var k = this;
          this.Interactable = (function(D) {
            u(V, D);
            var z = p(V);
            function V() {
              return i(this, V), z.apply(this, arguments);
            }
            return l(V, [{ key: "_defaults", get: function() {
              return k.defaults;
            } }, { key: "set", value: function(U) {
              return v(c(V.prototype), "set", this).call(this, U), k.fire("interactable:set", { options: U, interactable: this }), this;
            } }, { key: "unset", value: function() {
              v(c(V.prototype), "unset", this).call(this);
              var U = k.interactables.list.indexOf(this);
              U < 0 || (k.interactables.list.splice(U, 1), k.fire("interactable:unset", { interactable: this }));
            } }]), V;
          })(Lr);
        }
        return l(b, [{ key: "addListeners", value: function(y, k) {
          this.listenerMaps.push({ id: k, map: y });
        } }, { key: "fire", value: function(y, k) {
          for (var D = 0, z = this.listenerMaps; D < z.length; D++) {
            var V = z[D].map[y];
            if (V && V(k, this, y) === !1) return !1;
          }
        } }, { key: "init", value: function(y) {
          return this.isInitialized ? this : (function(k, D) {
            return k.isInitialized = !0, w.window(D) && C(D), F.init(D), X.init(D), Cn.init(D), k.window = D, k.document = D.document, k.usePlugin(pg), k.usePlugin(qn), k;
          })(this, y);
        } }, { key: "pluginIsInstalled", value: function(y) {
          var k = y.id;
          return k ? !!this._plugins.map[k] : this._plugins.list.indexOf(y) !== -1;
        } }, { key: "usePlugin", value: function(y, k) {
          if (!this.isInitialized) return this;
          if (this.pluginIsInstalled(y)) return this;
          if (y.id && (this._plugins.map[y.id] = y), this._plugins.list.push(y), y.install && y.install(this, k), y.listeners && y.before) {
            for (var D = 0, z = this.listenerMaps.length, V = y.before.reduce((function(Z, se) {
              return Z[se] = !0, Z[Xd(se)] = !0, Z;
            }), {}); D < z; D++) {
              var U = this.listenerMaps[D].id;
              if (U && (V[U] || V[Xd(U)])) break;
            }
            this.listenerMaps.splice(D, 0, { id: y.id, map: y.listeners });
          } else y.listeners && this.listenerMaps.push({ id: y.id, map: y.listeners });
          return this;
        } }, { key: "addDocument", value: function(y, k) {
          if (this.getDocIndex(y) !== -1) return !1;
          var D = P(y);
          k = k ? ue({}, k) : {}, this.documents.push({ doc: y, options: k }), this.events.documents.push(y), y !== this.document && this.events.add(D, "unload", this.onWindowUnload), this.fire("scope:add-document", { doc: y, window: D, scope: this, options: k });
        } }, { key: "removeDocument", value: function(y) {
          var k = this.getDocIndex(y), D = P(y), z = this.documents[k].options;
          this.events.remove(D, "unload", this.onWindowUnload), this.documents.splice(k, 1), this.events.documents.splice(k, 1), this.fire("scope:remove-document", { doc: y, window: D, scope: this, options: z });
        } }, { key: "getDocIndex", value: function(y) {
          for (var k = 0; k < this.documents.length; k++) if (this.documents[k].doc === y) return k;
          return -1;
        } }, { key: "getDocOptions", value: function(y) {
          var k = this.getDocIndex(y);
          return k === -1 ? null : this.documents[k].options;
        } }, { key: "now", value: function() {
          return (this.window.Date || Date).now();
        } }]), b;
      })();
      function Xd(b) {
        return b && b.replace(/\/.*$/, "");
      }
      var Qd = new gg(), eo = Qd.interactStatic, Fi = typeof globalThis < "u" ? globalThis : window;
      Qd.init(Fi);
      var pa = Object.freeze({ __proto__: null, edgeTarget: function() {
      }, elements: function() {
      }, grid: function(b) {
        var y = [["x", "y"], ["left", "top"], ["right", "bottom"], ["width", "height"]].filter((function(D) {
          var z = D[0], V = D[1];
          return z in b || V in b;
        })), k = function(D, z) {
          for (var V = b.range, U = b.limits, Z = U === void 0 ? { left: -1 / 0, right: 1 / 0, top: -1 / 0, bottom: 1 / 0 } : U, se = b.offset, we = se === void 0 ? { x: 0, y: 0 } : se, de = { range: V, grid: b, x: null, y: null }, Oe = 0; Oe < y.length; Oe++) {
            var Te = y[Oe], Ye = Te[0], Qe = Te[1], Ze = Math.round((D - we.x) / b[Ye]), lt = Math.round((z - we.y) / b[Qe]);
            de[Ye] = Math.max(Z.left, Math.min(Z.right, Ze * b[Ye] + we.x)), de[Qe] = Math.max(Z.top, Math.min(Z.bottom, lt * b[Qe] + we.y));
          }
          return de;
        };
        return k.grid = b, k.coordFields = y, k;
      } }), cl = { id: "snappers", install: function(b) {
        var y = b.interactStatic;
        y.snappers = ue(y.snappers || {}, pa), y.createSnapGrid = y.snappers.grid;
      } }, vg = cl, Hr = { start: function(b) {
        var y = b.state, k = b.rect, D = b.edges, z = b.pageCoords, V = y.options, U = V.ratio, Z = V.enabled, se = y.options, we = se.equalDelta, de = se.modifiers;
        U === "preserve" && (U = k.width / k.height), y.startCoords = ue({}, z), y.startRect = ue({}, k), y.ratio = U, y.equalDelta = we;
        var Oe = y.linkedEdges = { top: D.top || D.left && !D.bottom, left: D.left || D.top && !D.right, bottom: D.bottom || D.right && !D.top, right: D.right || D.bottom && !D.left };
        if (y.xIsPrimaryAxis = !(!D.left && !D.right), y.equalDelta) {
          var Te = (Oe.left ? 1 : -1) * (Oe.top ? 1 : -1);
          y.edgeSign = { x: Te, y: Te };
        } else y.edgeSign = { x: Oe.left ? -1 : 1, y: Oe.top ? -1 : 1 };
        if (Z !== !1 && ue(D, Oe), de != null && de.length) {
          var Ye = new nr(b.interaction);
          Ye.copyFrom(b.interaction.modification), Ye.prepareStates(de), y.subModification = Ye, Ye.startAll(o({}, b));
        }
      }, set: function(b) {
        var y = b.state, k = b.rect, D = b.coords, z = y.linkedEdges, V = ue({}, D), U = y.equalDelta ? mg : Zd;
        if (ue(b.edges, z), U(y, y.xIsPrimaryAxis, D, k), !y.subModification) return null;
        var Z = ue({}, k);
        Ke(z, Z, { x: D.x - V.x, y: D.y - V.y });
        var se = y.subModification.setAll(o(o({}, b), {}, { rect: Z, edges: z, pageCoords: D, prevCoords: D, prevRect: Z })), we = se.delta;
        return se.changed && (U(y, Math.abs(we.x) > Math.abs(we.y), se.coords, se.rect), ue(D, se.coords)), se.eventProps;
      }, defaults: { ratio: "preserve", equalDelta: !1, modifiers: [], enabled: !1 } };
      function mg(b, y, k) {
        var D = b.startCoords, z = b.edgeSign;
        y ? k.y = D.y + (k.x - D.x) * z.y : k.x = D.x + (k.y - D.y) * z.x;
      }
      function Zd(b, y, k, D) {
        var z = b.startRect, V = b.startCoords, U = b.ratio, Z = b.edgeSign;
        if (y) {
          var se = D.width / U;
          k.y = V.y + (se - z.height) * Z.y;
        } else {
          var we = D.height * U;
          k.x = V.x + (we - z.width) * Z.x;
        }
      }
      var Jd = or(Hr, "aspectRatio"), dl = function() {
      };
      dl._defaults = {};
      var Bi = dl;
      function ha(b, y, k) {
        return w.func(b) ? ge(b, y.interactable, y.element, [k.x, k.y, y]) : ge(b, y.interactable, y.element);
      }
      var fl = { start: function(b) {
        var y = b.rect, k = b.startOffset, D = b.state, z = b.interaction, V = b.pageCoords, U = D.options, Z = U.elementRect, se = ue({ left: 0, top: 0, right: 0, bottom: 0 }, U.offset || {});
        if (y && Z) {
          var we = ha(U.restriction, z, V);
          if (we) {
            var de = we.right - we.left - y.width, Oe = we.bottom - we.top - y.height;
            de < 0 && (se.left += de, se.right += de), Oe < 0 && (se.top += Oe, se.bottom += Oe);
          }
          se.left += k.left - y.width * Z.left, se.top += k.top - y.height * Z.top, se.right += k.right - y.width * (1 - Z.right), se.bottom += k.bottom - y.height * (1 - Z.bottom);
        }
        D.offset = se;
      }, set: function(b) {
        var y = b.coords, k = b.interaction, D = b.state, z = D.options, V = D.offset, U = ha(z.restriction, k, y);
        if (U) {
          var Z = (function(se) {
            return !se || "left" in se && "top" in se || ((se = ue({}, se)).left = se.x || 0, se.top = se.y || 0, se.right = se.right || se.left + se.width, se.bottom = se.bottom || se.top + se.height), se;
          })(U);
          y.x = Math.max(Math.min(Z.right - V.right, y.x), Z.left + V.left), y.y = Math.max(Math.min(Z.bottom - V.bottom, y.y), Z.top + V.top);
        }
      }, defaults: { restriction: null, elementRect: null, offset: null, endOnly: !1, enabled: !1 } }, bg = or(fl, "restrict"), Li = { top: 1 / 0, left: 1 / 0, bottom: -1 / 0, right: -1 / 0 }, ui = { top: -1 / 0, left: -1 / 0, bottom: 1 / 0, right: 1 / 0 };
      function pl(b, y) {
        for (var k = 0, D = ["top", "left", "bottom", "right"]; k < D.length; k++) {
          var z = D[k];
          z in b || (b[z] = y[z]);
        }
        return b;
      }
      var hl = { noInner: Li, noOuter: ui, start: function(b) {
        var y, k = b.interaction, D = b.startOffset, z = b.state, V = z.options;
        V && (y = _e(ha(V.offset, k, k.coords.start.page))), y = y || { x: 0, y: 0 }, z.offset = { top: y.y + D.top, left: y.x + D.left, bottom: y.y - D.bottom, right: y.x - D.right };
      }, set: function(b) {
        var y = b.coords, k = b.edges, D = b.interaction, z = b.state, V = z.offset, U = z.options;
        if (k) {
          var Z = ue({}, y), se = ha(U.inner, D, Z) || {}, we = ha(U.outer, D, Z) || {};
          pl(se, Li), pl(we, ui), k.top ? y.y = Math.min(Math.max(we.top + V.top, Z.y), se.top + V.top) : k.bottom && (y.y = Math.max(Math.min(we.bottom + V.bottom, Z.y), se.bottom + V.bottom)), k.left ? y.x = Math.min(Math.max(we.left + V.left, Z.x), se.left + V.left) : k.right && (y.x = Math.max(Math.min(we.right + V.right, Z.x), se.right + V.right));
        }
      }, defaults: { inner: null, outer: null, offset: null, endOnly: !1, enabled: !1 } }, wc = or(hl, "restrictEdges"), Sc = ue({ get elementRect() {
        return { top: 0, left: 0, bottom: 1, right: 1 };
      }, set elementRect(b) {
      } }, fl.defaults), Xs = or({ start: fl.start, set: fl.set, defaults: Sc }, "restrictRect"), ef = { width: -1 / 0, height: -1 / 0 }, tf = { width: 1 / 0, height: 1 / 0 }, nf = or({ start: function(b) {
        return hl.start(b);
      }, set: function(b) {
        var y = b.interaction, k = b.state, D = b.rect, z = b.edges, V = k.options;
        if (z) {
          var U = ze(ha(V.min, y, b.coords)) || ef, Z = ze(ha(V.max, y, b.coords)) || tf;
          k.options = { endOnly: V.endOnly, inner: ue({}, hl.noInner), outer: ue({}, hl.noOuter) }, z.top ? (k.options.inner.top = D.bottom - U.height, k.options.outer.top = D.bottom - Z.height) : z.bottom && (k.options.inner.bottom = D.top + U.height, k.options.outer.bottom = D.top + Z.height), z.left ? (k.options.inner.left = D.right - U.width, k.options.outer.left = D.right - Z.width) : z.right && (k.options.inner.right = D.left + U.width, k.options.outer.right = D.left + Z.width), hl.set(b), k.options = V;
        }
      }, defaults: { min: null, max: null, endOnly: !1, enabled: !1 } }, "restrictSize"), Qs = { start: function(b) {
        var y, k = b.interaction, D = b.interactable, z = b.element, V = b.rect, U = b.state, Z = b.startOffset, se = U.options, we = se.offsetWithOrigin ? (function(Te) {
          var Ye = Te.interaction.element, Qe = _e(ge(Te.state.options.origin, null, null, [Ye])), Ze = Qe || He(Te.interactable, Ye, Te.interaction.prepared.name);
          return Ze;
        })(b) : { x: 0, y: 0 };
        if (se.offset === "startCoords") y = { x: k.coords.start.page.x, y: k.coords.start.page.y };
        else {
          var de = ge(se.offset, D, z, [k]);
          (y = _e(de) || { x: 0, y: 0 }).x += we.x, y.y += we.y;
        }
        var Oe = se.relativePoints;
        U.offsets = V && Oe && Oe.length ? Oe.map((function(Te, Ye) {
          return { index: Ye, relativePoint: Te, x: Z.left - V.width * Te.x + y.x, y: Z.top - V.height * Te.y + y.y };
        })) : [{ index: 0, relativePoint: null, x: y.x, y: y.y }];
      }, set: function(b) {
        var y = b.interaction, k = b.coords, D = b.state, z = D.options, V = D.offsets, U = He(y.interactable, y.element, y.prepared.name), Z = ue({}, k), se = [];
        z.offsetWithOrigin || (Z.x -= U.x, Z.y -= U.y);
        for (var we = 0, de = V; we < de.length; we++) for (var Oe = de[we], Te = Z.x - Oe.x, Ye = Z.y - Oe.y, Qe = 0, Ze = z.targets.length; Qe < Ze; Qe++) {
          var lt = z.targets[Qe], st = void 0;
          (st = w.func(lt) ? lt(Te, Ye, y._proxy, Oe, Qe) : lt) && se.push({ x: (w.number(st.x) ? st.x : Te) + Oe.x, y: (w.number(st.y) ? st.y : Ye) + Oe.y, range: w.number(st.range) ? st.range : z.range, source: lt, index: Qe, offset: Oe });
        }
        for (var xt = { target: null, inRange: !1, distance: 0, range: 0, delta: { x: 0, y: 0 } }, Rt = 0; Rt < se.length; Rt++) {
          var Gt = se[Rt], Mt = Gt.range, jt = Gt.x - Z.x, Nn = Gt.y - Z.y, xn = De(jt, Nn), Bn = xn <= Mt;
          Mt === 1 / 0 && xt.inRange && xt.range !== 1 / 0 && (Bn = !1), xt.target && !(Bn ? xt.inRange && Mt !== 1 / 0 ? xn / Mt < xt.distance / xt.range : Mt === 1 / 0 && xt.range !== 1 / 0 || xn < xt.distance : !xt.inRange && xn < xt.distance) || (xt.target = Gt, xt.distance = xn, xt.range = Mt, xt.inRange = Bn, xt.delta.x = jt, xt.delta.y = Nn);
        }
        return xt.inRange && (k.x = xt.target.x, k.y = xt.target.y), D.closest = xt, xt;
      }, defaults: { range: 1 / 0, targets: null, offset: null, offsetWithOrigin: !0, origin: null, relativePoints: null, endOnly: !1, enabled: !1 } }, of = or(Qs, "snap"), Yl = { start: function(b) {
        var y = b.state, k = b.edges, D = y.options;
        if (!k) return null;
        b.state = { options: { targets: null, relativePoints: [{ x: k.left ? 0 : 1, y: k.top ? 0 : 1 }], offset: D.offset || "self", origin: { x: 0, y: 0 }, range: D.range } }, y.targetFields = y.targetFields || [["width", "height"], ["x", "y"]], Qs.start(b), y.offsets = b.state.offsets, b.state = y;
      }, set: function(b) {
        var y = b.interaction, k = b.state, D = b.coords, z = k.options, V = k.offsets, U = { x: D.x - V[0].x, y: D.y - V[0].y };
        k.options = ue({}, z), k.options.targets = [];
        for (var Z = 0, se = z.targets || []; Z < se.length; Z++) {
          var we = se[Z], de = void 0;
          if (de = w.func(we) ? we(U.x, U.y, y) : we) {
            for (var Oe = 0, Te = k.targetFields; Oe < Te.length; Oe++) {
              var Ye = Te[Oe], Qe = Ye[0], Ze = Ye[1];
              if (Qe in de || Ze in de) {
                de.x = de[Qe], de.y = de[Ze];
                break;
              }
            }
            k.options.targets.push(de);
          }
        }
        var lt = Qs.set(b);
        return k.options = z, lt;
      }, defaults: { range: 1 / 0, targets: null, offset: null, endOnly: !1, enabled: !1 } }, yg = or(Yl, "snapSize"), Zs = { aspectRatio: Jd, restrictEdges: wc, restrict: bg, restrictRect: Xs, restrictSize: nf, snapEdges: or({ start: function(b) {
        var y = b.edges;
        return y ? (b.state.targetFields = b.state.targetFields || [[y.left ? "left" : "right", y.top ? "top" : "bottom"]], Yl.start(b)) : null;
      }, set: Yl.set, defaults: ue(ro(Yl.defaults), { targets: void 0, range: void 0, offset: { x: 0, y: 0 } }) }, "snapEdges"), snap: of, snapSize: yg, spring: Bi, avoid: Bi, transform: Bi, rubberband: Bi }, rf = { id: "modifiers", install: function(b) {
        var y = b.interactStatic;
        for (var k in b.usePlugin(ol), b.usePlugin(vg), y.modifiers = Zs, Zs) {
          var D = Zs[k], z = D._defaults, V = D._methods;
          z._methods = V, b.defaults.perAction[k] = z;
        }
      } }, gl = rf, Gl = (function(b) {
        u(k, b);
        var y = p(k);
        function k(D, z, V, U, Z, se) {
          var we;
          if (i(this, k), Ve(f(we = y.call(this, Z)), V), V !== z && Ve(f(we), z), we.timeStamp = se, we.originalEvent = V, we.type = D, we.pointerId = Ce(z), we.pointerType = Be(z), we.target = U, we.currentTarget = null, D === "tap") {
            var de = Z.getPointerIndex(z);
            we.dt = we.timeStamp - Z.pointers[de].downTime;
            var Oe = we.timeStamp - Z.tapTime;
            we.double = !!Z.prevTap && Z.prevTap.type !== "doubletap" && Z.prevTap.target === we.target && Oe < 500;
          } else D === "doubletap" && (we.dt = z.timeStamp - Z.tapTime, we.double = !0);
          return we;
        }
        return l(k, [{ key: "_subtractOrigin", value: function(D) {
          var z = D.x, V = D.y;
          return this.pageX -= z, this.pageY -= V, this.clientX -= z, this.clientY -= V, this;
        } }, { key: "_addOrigin", value: function(D) {
          var z = D.x, V = D.y;
          return this.pageX += z, this.pageY += V, this.clientX += z, this.clientY += V, this;
        } }, { key: "preventDefault", value: function() {
          this.originalEvent.preventDefault();
        } }]), k;
      })(pt), io = { id: "pointer-events/base", before: ["inertia", "modifiers", "auto-start", "actions"], install: function(b) {
        b.pointerEvents = io, b.defaults.actions.pointerEvents = io.defaults, ue(b.actions.phaselessTypes, io.types);
      }, listeners: { "interactions:new": function(b) {
        var y = b.interaction;
        y.prevTap = null, y.tapTime = 0;
      }, "interactions:update-pointer": function(b) {
        var y = b.down, k = b.pointerInfo;
        !y && k.hold || (k.hold = { duration: 1 / 0, timeout: null });
      }, "interactions:move": function(b, y) {
        var k = b.interaction, D = b.pointer, z = b.event, V = b.eventTarget;
        b.duplicate || k.pointerIsDown && !k.pointerWasMoved || (k.pointerIsDown && Js(b), ci({ interaction: k, pointer: D, event: z, eventTarget: V, type: "move" }, y));
      }, "interactions:down": function(b, y) {
        (function(k, D) {
          for (var z = k.interaction, V = k.pointer, U = k.event, Z = k.eventTarget, se = k.pointerIndex, we = z.pointers[se].hold, de = te(Z), Oe = { interaction: z, pointer: V, event: U, eventTarget: Z, type: "hold", targets: [], path: de, node: null }, Te = 0; Te < de.length; Te++) {
            var Ye = de[Te];
            Oe.node = Ye, D.fire("pointerEvents:collect-targets", Oe);
          }
          if (Oe.targets.length) {
            for (var Qe = 1 / 0, Ze = 0, lt = Oe.targets; Ze < lt.length; Ze++) {
              var st = lt[Ze].eventable.options.holdDuration;
              st < Qe && (Qe = st);
            }
            we.duration = Qe, we.timeout = setTimeout((function() {
              ci({ interaction: z, eventTarget: Z, pointer: V, event: U, type: "hold" }, D);
            }), Qe);
          }
        })(b, y), ci(b, y);
      }, "interactions:up": function(b, y) {
        Js(b), ci(b, y), (function(k, D) {
          var z = k.interaction, V = k.pointer, U = k.event, Z = k.eventTarget;
          z.pointerWasMoved || ci({ interaction: z, eventTarget: Z, pointer: V, event: U, type: "tap" }, D);
        })(b, y);
      }, "interactions:cancel": function(b, y) {
        Js(b), ci(b, y);
      } }, PointerEvent: Gl, fire: ci, collectEventTargets: uo, defaults: { holdDuration: 600, ignoreFrom: null, allowFrom: null, origin: { x: 0, y: 0 } }, types: { down: !0, move: !0, up: !0, cancel: !0, tap: !0, doubletap: !0, hold: !0 } };
      function ci(b, y) {
        var k = b.interaction, D = b.pointer, z = b.event, V = b.eventTarget, U = b.type, Z = b.targets, se = Z === void 0 ? uo(b, y) : Z, we = new Gl(U, D, z, V, k, y.now());
        y.fire("pointerEvents:new", { pointerEvent: we });
        for (var de = { interaction: k, pointer: D, event: z, eventTarget: V, targets: se, type: U, pointerEvent: we }, Oe = 0; Oe < se.length; Oe++) {
          var Te = se[Oe];
          for (var Ye in Te.props || {}) we[Ye] = Te.props[Ye];
          var Qe = He(Te.eventable, Te.node);
          if (we._subtractOrigin(Qe), we.eventable = Te.eventable, we.currentTarget = Te.node, Te.eventable.fire(we), we._addOrigin(Qe), we.immediatePropagationStopped || we.propagationStopped && Oe + 1 < se.length && se[Oe + 1].node !== we.currentTarget) break;
        }
        if (y.fire("pointerEvents:fired", de), U === "tap") {
          var Ze = we.double ? ci({ interaction: k, pointer: D, event: z, eventTarget: V, type: "doubletap" }, y) : we;
          k.prevTap = Ze, k.tapTime = Ze.timeStamp;
        }
        return we;
      }
      function uo(b, y) {
        var k = b.interaction, D = b.pointer, z = b.event, V = b.eventTarget, U = b.type, Z = k.getPointerIndex(D), se = k.pointers[Z];
        if (U === "tap" && (k.pointerWasMoved || !se || se.downTarget !== V)) return [];
        for (var we = te(V), de = { interaction: k, pointer: D, event: z, eventTarget: V, type: U, path: we, targets: [], node: null }, Oe = 0; Oe < we.length; Oe++) {
          var Te = we[Oe];
          de.node = Te, y.fire("pointerEvents:collect-targets", de);
        }
        return U === "hold" && (de.targets = de.targets.filter((function(Ye) {
          var Qe, Ze;
          return Ye.eventable.options.holdDuration === ((Qe = k.pointers[Z]) == null || (Ze = Qe.hold) == null ? void 0 : Ze.duration);
        }))), de.targets;
      }
      function Js(b) {
        var y = b.interaction, k = b.pointerIndex, D = y.pointers[k].hold;
        D && D.timeout && (clearTimeout(D.timeout), D.timeout = null);
      }
      var Cc = Object.freeze({ __proto__: null, default: io });
      function Ul(b) {
        var y = b.interaction;
        y.holdIntervalHandle && (clearInterval(y.holdIntervalHandle), y.holdIntervalHandle = null);
      }
      var xg = { id: "pointer-events/holdRepeat", install: function(b) {
        b.usePlugin(io);
        var y = b.pointerEvents;
        y.defaults.holdRepeatInterval = 0, y.types.holdrepeat = b.actions.phaselessTypes.holdrepeat = !0;
      }, listeners: ["move", "up", "cancel", "endall"].reduce((function(b, y) {
        return b["pointerEvents:".concat(y)] = Ul, b;
      }), { "pointerEvents:new": function(b) {
        var y = b.pointerEvent;
        y.type === "hold" && (y.count = (y.count || 0) + 1);
      }, "pointerEvents:fired": function(b, y) {
        var k = b.interaction, D = b.pointerEvent, z = b.eventTarget, V = b.targets;
        if (D.type === "hold" && V.length) {
          var U = V[0].eventable.options.holdRepeatInterval;
          U <= 0 || (k.holdIntervalHandle = setTimeout((function() {
            y.pointerEvents.fire({ interaction: k, eventTarget: z, type: "hold", pointer: D, event: D }, y);
          }), U));
        }
      } }) }, wg = xg, $c = { id: "pointer-events/interactableTargets", install: function(b) {
        var y = b.Interactable;
        y.prototype.pointerEvents = function(D) {
          return ue(this.events.options, D), this;
        };
        var k = y.prototype._backCompatOption;
        y.prototype._backCompatOption = function(D, z) {
          var V = k.call(this, D, z);
          return V === this && (this.events.options[D] = z), V;
        };
      }, listeners: { "pointerEvents:collect-targets": function(b, y) {
        var k = b.targets, D = b.node, z = b.type, V = b.eventTarget;
        y.interactables.forEachMatch(D, (function(U) {
          var Z = U.events, se = Z.options;
          Z.types[z] && Z.types[z].length && U.testIgnoreAllow(se, D, V) && k.push({ node: D, eventable: Z, props: { interactable: U } });
        }));
      }, "interactable:new": function(b) {
        var y = b.interactable;
        y.events.getRect = function(k) {
          return y.getRect(k);
        };
      }, "interactable:set": function(b, y) {
        var k = b.interactable, D = b.options;
        ue(k.events.options, y.pointerEvents.defaults), ue(k.events.options, D.pointerEvents || {});
      } } }, Y = $c, J = { id: "pointer-events", install: function(b) {
        b.usePlugin(Cc), b.usePlugin(wg), b.usePlugin(Y);
      } }, me = J, ye = { id: "reflow", install: function(b) {
        var y = b.Interactable;
        b.actions.phases.reflow = !0, y.prototype.reflow = function(k) {
          return (function(D, z, V) {
            for (var U = D.getAllElements(), Z = V.window.Promise, se = Z ? [] : null, we = function() {
              var Oe = U[de], Te = D.getRect(Oe);
              if (!Te) return 1;
              var Ye, Qe = Ct(V.interactions.list, (function(st) {
                return st.interacting() && st.interactable === D && st.element === Oe && st.prepared.name === z.name;
              }));
              if (Qe) Qe.move(), se && (Ye = Qe._reflowPromise || new Z((function(st) {
                Qe._reflowResolve = st;
              })));
              else {
                var Ze = ze(Te), lt = /* @__PURE__ */ (function(st) {
                  return { coords: st, get page() {
                    return this.coords.page;
                  }, get client() {
                    return this.coords.client;
                  }, get timeStamp() {
                    return this.coords.timeStamp;
                  }, get pageX() {
                    return this.coords.page.x;
                  }, get pageY() {
                    return this.coords.page.y;
                  }, get clientX() {
                    return this.coords.client.x;
                  }, get clientY() {
                    return this.coords.client.y;
                  }, get pointerId() {
                    return this.coords.pointerId;
                  }, get target() {
                    return this.coords.target;
                  }, get type() {
                    return this.coords.type;
                  }, get pointerType() {
                    return this.coords.pointerType;
                  }, get buttons() {
                    return this.coords.buttons;
                  }, preventDefault: function() {
                  } };
                })({ page: { x: Ze.x, y: Ze.y }, client: { x: Ze.x, y: Ze.y }, timeStamp: V.now() });
                Ye = (function(st, xt, Rt, Gt, Mt) {
                  var jt = st.interactions.new({ pointerType: "reflow" }), Nn = { interaction: jt, event: Mt, pointer: Mt, eventTarget: Rt, phase: "reflow" };
                  jt.interactable = xt, jt.element = Rt, jt.prevEvent = Mt, jt.updatePointer(Mt, Mt, Rt, !0), je(jt.coords.delta), An(jt.prepared, Gt), jt._doPhase(Nn);
                  var xn = st.window, Bn = xn.Promise, Yn = Bn ? new Bn((function(co) {
                    jt._reflowResolve = co;
                  })) : void 0;
                  return jt._reflowPromise = Yn, jt.start(Gt, xt, Rt), jt._interacting ? (jt.move(Nn), jt.end(Mt)) : (jt.stop(), jt._reflowResolve()), jt.removePointer(Mt, Mt), Yn;
                })(V, D, Oe, z, lt);
              }
              se && se.push(Ye);
            }, de = 0; de < U.length && !we(); de++) ;
            return se && Z.all(se).then((function() {
              return D;
            }));
          })(this, k, b);
        };
      }, listeners: { "interactions:stop": function(b, y) {
        var k = b.interaction;
        k.pointerType === "reflow" && (k._reflowResolve && k._reflowResolve(), (function(D, z) {
          D.splice(D.indexOf(z), 1);
        })(y.interactions.list, k));
      } } }, Ie = ye;
      if (eo.use(el), eo.use(mc), eo.use(me), eo.use(Ud), eo.use(gl), eo.use(Ja), eo.use(Qn), eo.use(Dn), eo.use(Ie), eo.default = eo, r(e) === "object" && e) try {
        e.exports = eo;
      } catch {
      }
      return eo.default = eo, eo;
    }));
  })(Wc, Wc.exports)), Wc.exports;
}
var Kee = /* @__PURE__ */ Wee();
const rP = /* @__PURE__ */ Oz(Kee), iP = /* @__PURE__ */ be({
  __name: "grid-item",
  props: {
    isDraggable: { type: Boolean, default: void 0 },
    isResizable: { type: Boolean, default: void 0 },
    isBounded: { type: Boolean, default: void 0 },
    static: { type: Boolean, default: !1 },
    minH: { default: 1 },
    minW: { default: 1 },
    maxH: { default: 1 / 0 },
    maxW: { default: 1 / 0 },
    x: {},
    y: {},
    w: {},
    h: {},
    i: {},
    dragIgnoreFrom: { default: "a, button" },
    dragAllowFrom: { default: void 0 },
    resizeIgnoreFrom: { default: "a, button" },
    preserveAspectRatio: { type: Boolean, default: !1 },
    dragOption: { default: () => ({}) },
    resizeOption: { default: () => ({}) }
  },
  emits: ["container-resized", "resize", "resized", "move", "moved"],
  setup(e, { expose: t, emit: n }) {
    const o = e, r = n, i = zt(aE), a = zt(lE);
    if (!i)
      throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");
    const l = $e(null), s = Pn({
      cols: 1,
      containerWidth: 100,
      rowHeight: 30,
      margin: [10, 10],
      maxRows: 1 / 0,
      draggable: void 0,
      resizable: void 0,
      bounded: void 0,
      transformScale: 1,
      useCssTransforms: !0,
      useStyleCursor: !0,
      isDragging: !1,
      dragging: {
        top: -1,
        left: -1
      },
      isResizing: !1,
      resizing: {
        width: -1,
        height: -1
      },
      style: {},
      rtl: !1
    });
    let u = !1, c = !1, d = NaN, f = NaN, p = NaN, v = NaN, g = -1, m = -1, x = -1, S = -1, C = o.x, P = o.y, $ = o.w, I = o.h;
    const w = ce(), _ = Pn({
      i: Kt(o, "i"),
      state: s,
      wrapper: w,
      calcXY: ge
    });
    function M(Pe) {
      Ne(Pe);
    }
    function N() {
      Xe();
    }
    function A(Pe) {
      kr(o.isDraggable) && (s.draggable = Pe);
    }
    function H(Pe) {
      kr(o.isResizable) && (s.resizable = Pe);
    }
    function B(Pe) {
      kr(o.isBounded) && (s.bounded = Pe);
    }
    function F(Pe) {
      s.transformScale = Pe;
    }
    function R(Pe) {
      s.rowHeight = Pe;
    }
    function X(Pe) {
      s.maxRows = Pe;
    }
    function j() {
      s.rtl = nP() === "rtl", Xe();
    }
    function ee(Pe) {
      s.cols = Math.floor(Pe);
    }
    i.increaseItem(_), th(() => {
      s.rtl = nP() === "rtl";
    }), Nt(() => {
      i.responsive && i.lastBreakpoint ? s.cols = fE(i.lastBreakpoint, i.cols) : s.cols = i.colNum, s.rowHeight = i.rowHeight, s.containerWidth = i.width !== null ? i.width : 100, s.margin = i.margin !== void 0 ? i.margin.map(Number) : [10, 10], s.maxRows = i.maxRows, kr(o.isDraggable) ? s.draggable = i.isDraggable : s.draggable = o.isDraggable, kr(o.isResizable) ? s.resizable = i.isResizable : s.resizable = o.isResizable, kr(o.isBounded) ? s.bounded = i.isBounded : s.bounded = o.isBounded, s.transformScale = i.transformScale, s.useCssTransforms = i.useCssTransforms, s.useStyleCursor = i.useStyleCursor, It(() => {
        C = o.x, P = o.y, I = o.h, $ = o.w, rr(re);
      }), a.on("updateWidth", M), a.on("compact", N), a.on("setDraggable", A), a.on("setResizable", H), a.on("setBounded", B), a.on("setTransformScale", F), a.on("setRowHeight", R), a.on("setMaxRows", X), a.on("directionchange", j), a.on("setColNum", ee);
    }), qt(() => {
      a.off("updateWidth", M), a.off("compact", N), a.off("setDraggable", A), a.off("setResizable", H), a.off("setBounded", B), a.off("setTransformScale", F), a.off("setRowHeight", R), a.off("setMaxRows", X), a.off("directionchange", j), a.off("setColNum", ee), l.value && (l.value.unset(), l.value = null), i.decreaseItem(_);
    }), t({ state: s, wrapper: w });
    const W = typeof navigator < "u" ? navigator.userAgent.toLowerCase().includes("android") : !1, K = E(() => s.resizable && !o.static), q = E(() => i.isMirrored ? !s.rtl : s.rtl), G = E(() => (s.draggable || s.resizable) && !o.static), ae = Ree("item"), le = E(() => ({
      [ae.b()]: !0,
      [ae.bm("resizable")]: K.value,
      [ae.bm("static")]: o.static,
      [ae.bm("resizing")]: s.isResizing,
      [ae.bm("dragging")]: s.isDragging,
      [ae.bm("transform")]: s.useCssTransforms,
      [ae.bm("rtl")]: q.value,
      [ae.bm("no-touch")]: W && G.value
    })), ie = E(() => [ae.be("resizer"), q.value && ae.bem("resizer", "rtl")].filter(Boolean));
    ke(
      () => o.isDraggable,
      (Pe) => {
        s.draggable = Pe;
      }
    ), ke(
      () => o.static,
      () => {
        rr(Ve), rr(je);
      }
    ), ke(
      () => s.draggable,
      () => {
        rr(Ve);
      }
    ), ke(
      () => o.isResizable,
      (Pe) => {
        s.resizable = Pe;
      }
    ), ke(
      () => o.isBounded,
      (Pe) => {
        s.bounded = Pe;
      }
    ), ke(
      () => s.resizable,
      () => {
        rr(je);
      }
    ), ke(
      () => s.rowHeight,
      () => {
        rr(re), rr(te);
      }
    ), ke([() => s.cols, () => s.containerWidth], () => {
      rr(je), rr(re), rr(te);
    }), ke([() => o.minH, () => o.maxH, () => o.minW, () => o.maxW], () => {
      rr(je);
    }), ke(q, () => {
      rr(je), rr(re);
    }), ke([() => i.margin, () => i.margin[0], () => i.margin[1]], () => {
      const Pe = i.margin;
      !Pe || Pe[0] === s.margin[0] && Pe[1] === s.margin[1] || (s.margin = Pe.map(Number), rr(re), rr(te));
    });
    function re() {
      o.x + o.w > s.cols ? (C = 0, $ = o.w > s.cols ? s.cols : o.w) : (C = o.x, $ = o.w);
      const Pe = pe(C, P, $, I);
      s.isDragging && (Pe.top = s.dragging.top, q.value ? Pe.right = s.dragging.left : Pe.left = s.dragging.left), s.isResizing && (Pe.width = s.resizing.width, Pe.height = s.resizing.height);
      let Ge;
      s.useCssTransforms ? q.value ? Ge = Eee(Pe.top, Pe.right, Pe.width, Pe.height) : Ge = Mee(Pe.top, Pe.left, Pe.width, Pe.height) : q.value ? Ge = Aee(Pe.top, Pe.right, Pe.width, Pe.height) : Ge = Dee(Pe.top, Pe.left, Pe.width, Pe.height), s.style = Ge;
    }
    function te() {
      const Pe = {};
      for (const Ge of ["width", "height"]) {
        const Se = s.style[Ge].match(/^(\d+)px$/);
        if (!Se)
          return;
        Pe[Ge] = Se[1];
      }
      r("container-resized", o.i, o.h, o.w, Pe.height, Pe.width);
    }
    function ve(Pe) {
      if (o.static) return;
      const Ge = Pe.type;
      if (Ge === "resizestart" && s.isResizing || Ge !== "resizestart" && !s.isResizing)
        return;
      const Se = eP(Pe);
      if (kr(Se)) return;
      const { x: Ce, y: Ae } = Se, qe = { width: 0, height: 0 };
      let We;
      switch (Ge) {
        case "resizestart": {
          je(), g = $, m = I, We = pe(C, P, $, I), qe.width = We.width, qe.height = We.height, s.resizing = qe, s.isResizing = !0;
          break;
        }
        case "resizemove": {
          !Pe.edges.right && !Pe.edges.left && (p = Ce), !Pe.edges.top && !Pe.edges.bottom && (v = Ae);
          const tt = tP(p, v, Ce, Ae);
          q.value ? qe.width = s.resizing.width - tt.deltaX / s.transformScale : qe.width = s.resizing.width + tt.deltaX / s.transformScale, qe.height = s.resizing.height + tt.deltaY / s.transformScale, s.resizing = qe;
          break;
        }
        case "resizeend": {
          We = pe(C, P, $, I), qe.width = We.width, qe.height = We.height, s.resizing = { width: -1, height: -1 }, s.isResizing = !1;
          break;
        }
      }
      We = He(qe.height, qe.width), We.w < o.minW && (We.w = o.minW), We.w > o.maxW && (We.w = o.maxW), We.h < o.minH && (We.h = o.minH), We.h > o.maxH && (We.h = o.maxH), We.h < 1 && (We.h = 1), We.w < 1 && (We.w = 1), p = Ce, v = Ae, ($ !== We.w || I !== We.h) && r("resize", o.i, We.h, We.w, qe.height, qe.width), Pe.type === "resizeend" && (g !== $ || m !== I) && r("resized", o.i, We.h, We.w, qe.height, qe.width), a.emit("resizeEvent", Pe.type, o.i, C, P, We.h, We.w);
    }
    function ue(Pe) {
      if (o.static || s.isResizing) return;
      const Ge = Pe.type;
      if (Ge === "dragstart" && s.isDragging || Ge !== "dragstart" && !s.isDragging)
        return;
      const Se = eP(Pe);
      if (kr(Se)) return;
      const { x: Ce, y: Ae } = Se, qe = Pe.target;
      if (!qe.offsetParent) return;
      const We = { top: 0, left: 0 };
      switch (Ge) {
        case "dragstart": {
          x = C, S = P;
          const Ee = qe.offsetParent.getBoundingClientRect(), Re = qe.getBoundingClientRect(), Be = Re.left / s.transformScale, ot = Ee.left / s.transformScale, pt = Re.right / s.transformScale, at = Ee.right / s.transformScale, dt = Re.top / s.transformScale, wt = Ee.top / s.transformScale;
          q.value ? We.left = (pt - at) * -1 : We.left = Be - ot, We.top = dt - wt, s.dragging = We, s.isDragging = !0;
          break;
        }
        case "dragmove": {
          const Ee = tP(d, f, Ce, Ae);
          if (q.value ? We.left = s.dragging.left - Ee.deltaX / s.transformScale : We.left = s.dragging.left + Ee.deltaX / s.transformScale, We.top = s.dragging.top + Ee.deltaY / s.transformScale, s.bounded) {
            const Re = qe.offsetParent.clientHeight - ze(o.h, s.rowHeight, s.margin[1]);
            We.top = Ke(We.top, 0, Re);
            const Be = _e(), ot = s.containerWidth - ze(o.w, Be, s.margin[0]);
            We.left = Ke(We.left, 0, ot);
          }
          s.dragging = We;
          break;
        }
        case "dragend": {
          const Ee = qe.offsetParent.getBoundingClientRect(), Re = qe.getBoundingClientRect(), Be = Re.left / s.transformScale, ot = Ee.left / s.transformScale, pt = Re.right / s.transformScale, at = Ee.right / s.transformScale, dt = Re.top / s.transformScale, wt = Ee.top / s.transformScale;
          q.value ? We.left = (pt - at) * -1 : We.left = Be - ot, We.top = dt - wt, s.dragging = { top: -1, left: -1 }, s.isDragging = !1;
          break;
        }
      }
      let tt;
      q.value, tt = ge(We.top, We.left), d = Ce, f = Ae, (C !== tt.x || P !== tt.y) && r("move", o.i, tt.x, tt.y), Pe.type === "dragend" && (x !== C || S !== P) && r("moved", o.i, tt.x, tt.y), a.emit("dragEvent", Pe.type, o.i, tt.x, tt.y, I, $);
    }
    function pe(Pe, Ge, Se, Ce) {
      const Ae = _e();
      let qe;
      return q.value ? qe = {
        right: Math.round(Ae * Pe + (Pe + 1) * s.margin[0]),
        top: Math.round(s.rowHeight * Ge + (Ge + 1) * s.margin[1]),
        // 0 * Infinity === NaN, which causes problems with resize constraints;
        // Fix this if it occurs.
        // Note we do it here rather than later because Math.round(Infinity) causes depot
        width: Se === 1 / 0 ? Se : Math.round(Ae * Se + Math.max(0, Se - 1) * s.margin[0]),
        height: Ce === 1 / 0 ? Ce : Math.round(s.rowHeight * Ce + Math.max(0, Ce - 1) * s.margin[1])
      } : qe = {
        left: Math.round(Ae * Pe + (Pe + 1) * s.margin[0]),
        top: Math.round(s.rowHeight * Ge + (Ge + 1) * s.margin[1]),
        // 0 * Infinity === NaN, which causes problems with resize constraints;
        // Fix this if it occurs.
        // Note we do it here rather than later because Math.round(Infinity) causes depot
        width: Se === 1 / 0 ? Se : Math.round(Ae * Se + Math.max(0, Se - 1) * s.margin[0]),
        height: Ce === 1 / 0 ? Ce : Math.round(s.rowHeight * Ce + Math.max(0, Ce - 1) * s.margin[1])
      }, qe;
    }
    function ge(Pe, Ge) {
      const Se = _e();
      let Ce = Math.round((Ge - s.margin[0]) / (Se + s.margin[0])), Ae = Math.round((Pe - s.margin[1]) / (s.rowHeight + s.margin[1]));
      return Ce = Math.max(Math.min(Ce, s.cols - $), 0), Ae = Math.max(Math.min(Ae, s.maxRows - I), 0), { x: Ce, y: Ae };
    }
    function _e() {
      return (s.containerWidth - s.margin[0] * (s.cols + 1)) / s.cols;
    }
    function ze(Pe, Ge, Se) {
      return Number.isFinite(Pe) ? Math.round(Ge * Pe + Math.max(0, Pe - 1) * Se) : Pe;
    }
    function Ke(Pe, Ge, Se) {
      return Math.max(Math.min(Pe, Se), Ge);
    }
    function He(Pe, Ge, Se = !1) {
      const Ce = _e();
      let Ae = Math.round((Ge + s.margin[0]) / (Ce + s.margin[0])), qe = 0;
      return Se ? qe = Math.ceil((Pe + s.margin[1]) / (s.rowHeight + s.margin[1])) : qe = Math.round((Pe + s.margin[1]) / (s.rowHeight + s.margin[1])), Ae = Math.max(Math.min(Ae, s.cols - C), 0), qe = Math.max(Math.min(qe, s.maxRows - P), 0), { w: Ae, h: qe };
    }
    function Ne(Pe, Ge) {
      s.containerWidth = Pe;
    }
    function Xe() {
      re();
    }
    function De() {
      !l.value && w.value && (l.value = rP(w.value), s.useStyleCursor || l.value.styleCursor(!1));
    }
    const Fe = Q$(ue);
    function Ve() {
      if (De(), !!l.value)
        if (s.draggable && !o.static) {
          const Pe = {
            ignoreFrom: o.dragIgnoreFrom,
            allowFrom: o.dragAllowFrom,
            ...o.dragOption
          };
          l.value.draggable(Pe), u || (u = !0, l.value.on("dragstart dragmove dragend", (Ge) => {
            Ge.type === "dragmove" ? Fe(Ge) : ue(Ge);
          }));
        } else
          l.value.draggable({ enabled: !1 });
    }
    const nt = Q$(ve);
    function je() {
      if (De(), !!l.value)
        if (s.resizable && !o.static) {
          const Pe = pe(0, 0, o.maxW, o.maxH), Ge = pe(0, 0, o.minW, o.minH), Se = {
            edges: {
              left: q.value ? `.${ie.value[0]}` : !1,
              right: q.value ? !1 : `.${ie.value[0]}`,
              bottom: `.${ie.value[0]}`,
              top: !1
            },
            ignoreFrom: o.resizeIgnoreFrom,
            restrictSize: {
              min: {
                height: Ge.height * s.transformScale,
                width: Ge.width * s.transformScale
              },
              max: {
                height: Pe.height * s.transformScale,
                width: Pe.width * s.transformScale
              }
            },
            ...o.resizeOption
          };
          o.preserveAspectRatio && (Se.modifiers = [rP.modifiers.aspectRatio({ ratio: "preserve" })]), l.value.resizable(Se), c || (c = !0, l.value.on("resizestart resizemove resizeend", (Ce) => {
            Ce.type === "resizemove" ? nt(Ce) : ve(Ce);
          }));
        } else
          l.value.resizable({ enabled: !1 });
    }
    return (Pe, Ge) => (ne(), xe("section", {
      ref_key: "wrapper",
      ref: w,
      class: Pt(le.value),
      style: Bt(s.style)
    }, [
      Ra(Pe.$slots, "default"),
      K.value ? (ne(), xe("span", {
        key: 0,
        class: Pt(ie.value)
      }, null, 2)) : rt("", !0)
    ], 6));
  }
}), Ws = typeof window < "u";
var aP;
Ws && (aP = window?.navigator) != null && aP.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function lP(e) {
  return e != null;
}
function sP() {
}
const qee = Object.freeze({
  aliceblue: "f0f8ff",
  antiquewhite: "faebd7",
  aqua: "0ff",
  aquamarine: "7fffd4",
  azure: "f0ffff",
  beige: "f5f5dc",
  bisque: "ffe4c4",
  black: "000",
  blanchedalmond: "ffebcd",
  blue: "00f",
  blueviolet: "8a2be2",
  brown: "a52a2a",
  burlywood: "deb887",
  burntsienna: "ea7e5d",
  cadetblue: "5f9ea0",
  chartreuse: "7fff00",
  chocolate: "d2691e",
  coral: "ff7f50",
  cornflowerblue: "6495ed",
  cornsilk: "fff8dc",
  crimson: "dc143c",
  cyan: "0ff",
  darkblue: "00008b",
  darkcyan: "008b8b",
  darkgoldenrod: "b8860b",
  darkgray: "a9a9a9",
  darkgreen: "006400",
  darkgrey: "a9a9a9",
  darkkhaki: "bdb76b",
  darkmagenta: "8b008b",
  darkolivegreen: "556b2f",
  darkorange: "ff8c00",
  darkorchid: "9932cc",
  darkred: "8b0000",
  darksalmon: "e9967a",
  darkseagreen: "8fbc8f",
  darkslateblue: "483d8b",
  darkslategray: "2f4f4f",
  darkslategrey: "2f4f4f",
  darkturquoise: "00ced1",
  darkviolet: "9400d3",
  deeppink: "ff1493",
  deepskyblue: "00bfff",
  dimgray: "696969",
  dimgrey: "696969",
  dodgerblue: "1e90ff",
  firebrick: "b22222",
  floralwhite: "fffaf0",
  forestgreen: "228b22",
  fuchsia: "f0f",
  gainsboro: "dcdcdc",
  ghostwhite: "f8f8ff",
  gold: "ffd700",
  goldenrod: "daa520",
  gray: "808080",
  green: "008000",
  greenyellow: "adff2f",
  grey: "808080",
  honeydew: "f0fff0",
  hotpink: "ff69b4",
  indianred: "cd5c5c",
  indigo: "4b0082",
  ivory: "fffff0",
  khaki: "f0e68c",
  lavender: "e6e6fa",
  lavenderblush: "fff0f5",
  lawngreen: "7cfc00",
  lemonchiffon: "fffacd",
  lightblue: "add8e6",
  lightcoral: "f08080",
  lightcyan: "e0ffff",
  lightgoldenrodyellow: "fafad2",
  lightgray: "d3d3d3",
  lightgreen: "90ee90",
  lightgrey: "d3d3d3",
  lightpink: "ffb6c1",
  lightsalmon: "ffa07a",
  lightseagreen: "20b2aa",
  lightskyblue: "87cefa",
  lightslategray: "789",
  lightslategrey: "789",
  lightsteelblue: "b0c4de",
  lightyellow: "ffffe0",
  lime: "0f0",
  limegreen: "32cd32",
  linen: "faf0e6",
  magenta: "f0f",
  maroon: "800000",
  mediumaquamarine: "66cdaa",
  mediumblue: "0000cd",
  mediumorchid: "ba55d3",
  mediumpurple: "9370db",
  mediumseagreen: "3cb371",
  mediumslateblue: "7b68ee",
  mediumspringgreen: "00fa9a",
  mediumturquoise: "48d1cc",
  mediumvioletred: "c71585",
  midnightblue: "191970",
  mintcream: "f5fffa",
  mistyrose: "ffe4e1",
  moccasin: "ffe4b5",
  navajowhite: "ffdead",
  navy: "000080",
  oldlace: "fdf5e6",
  olive: "808000",
  olivedrab: "6b8e23",
  orange: "ffa500",
  orangered: "ff4500",
  orchid: "da70d6",
  palegoldenrod: "eee8aa",
  palegreen: "98fb98",
  paleturquoise: "afeeee",
  palevioletred: "db7093",
  papayawhip: "ffefd5",
  peachpuff: "ffdab9",
  peru: "cd853f",
  pink: "ffc0cb",
  plum: "dda0dd",
  powderblue: "b0e0e6",
  purple: "800080",
  rebeccapurple: "663399",
  red: "f00",
  rosybrown: "bc8f8f",
  royalblue: "4169e1",
  saddlebrown: "8b4513",
  salmon: "fa8072",
  sandybrown: "f4a460",
  seagreen: "2e8b57",
  seashell: "fff5ee",
  sienna: "a0522d",
  silver: "c0c0c0",
  skyblue: "87ceeb",
  slateblue: "6a5acd",
  slategray: "708090",
  slategrey: "708090",
  snow: "fffafa",
  springgreen: "00ff7f",
  steelblue: "4682b4",
  tan: "d2b48c",
  teal: "008080",
  thistle: "d8bfd8",
  tomato: "ff6347",
  turquoise: "40e0d0",
  violet: "ee82ee",
  wheat: "f5deb3",
  white: "fff",
  whitesmoke: "f5f5f5",
  yellow: "ff0",
  yellowgreen: "9acd32"
});
Object.freeze(new Set(Object.keys(qee)));
const Yee = Ws && ("ontouchstart" in window || Gee() > 0), uP = Yee ? "pointerdown" : "click";
function Gee() {
  return typeof navigator < "u" && (navigator.maxTouchPoints || navigator.msMaxTouchPoints) || 0;
}
function Uee(e, t, n = window.Event) {
  const { type: o, bubbles: r = !1, cancelable: i = !1, ...a } = t;
  if (!lP(o) || o === "") return !1;
  let l;
  return lP(n) ? l = new n(o, { bubbles: r, cancelable: i }) : (l = document.createEvent("HTMLEvents"), l.initEvent(o, r, i)), Object.assign(l, a), e.dispatchEvent(l);
}
const Xee = "clickoutside", Qee = /* @__PURE__ */ new Set();
let Gv = null;
function Zee(e, t) {
  return e instanceof Node ? t === e || t.contains(e) || !!t.__transferElement && (t.__transferElement === e || t.__transferElement.contains(e)) : !1;
}
Ws && (uP === "click" && document.addEventListener(
  "pointerdown",
  (e) => {
    Gv = e.target;
  },
  !0
), document.addEventListener(
  uP,
  (e) => {
    const t = Gv;
    Gv = null, Qee.forEach((n) => {
      if (t && Zee(t, n))
        return;
      const o = e.target, r = e.composedPath && e.composedPath();
      n !== o && (r ? !r.includes(n) : !n.contains(o)) && (!n.__transferElement || n.__transferElement !== o && !n.__transferElement.contains(o)) && Uee(n, { type: Xee });
    });
  },
  !0
));
const Jee = [
  [
    "requestFullscreen",
    "exitFullscreen",
    "fullscreenElement",
    "fullscreenEnabled",
    "fullscreenchange",
    "fullscreenerror"
  ],
  // New WebKit
  [
    "webkitRequestFullscreen",
    "webkitExitFullscreen",
    "webkitFullscreenElement",
    "webkitFullscreenEnabled",
    "webkitfullscreenchange",
    "webkitfullscreenerror"
  ],
  // Old WebKit
  [
    "webkitRequestFullScreen",
    "webkitCancelFullScreen",
    "webkitCurrentFullScreenElement",
    "webkitCancelFullScreen",
    "webkitfullscreenchange",
    "webkitfullscreenerror"
  ],
  [
    "mozRequestFullScreen",
    "mozCancelFullScreen",
    "mozFullScreenElement",
    "mozFullScreenEnabled",
    "mozfullscreenchange",
    "mozfullscreenerror"
  ],
  [
    "msRequestFullscreen",
    "msExitFullscreen",
    "msFullscreenElement",
    "msFullscreenEnabled",
    "MSFullscreenChange",
    "MSFullscreenError"
  ]
];
let mp;
if (Ws) {
  for (const e of Jee)
    if (e[1] in document) {
      mp = e;
      break;
    }
}
E(() => !1);
const ete = /* @__PURE__ */ new Set(), tte = /* @__PURE__ */ new WeakMap();
if (Ws && mp) {
  const e = mp[2], t = mp[4];
  document.addEventListener(
    t,
    () => {
      if (ete.forEach((n) => {
        n.value = !1;
      }), document[e]) {
        const n = tte.get(document[e]);
        n && (n.value = !0);
      }
    },
    !1
  );
}
const hE = /* @__PURE__ */ new Map();
hE.set("x", 0);
hE.set("y", 0);
var Os = [], nte = function() {
  return Os.some(function(e) {
    return e.activeTargets.length > 0;
  });
}, ote = function() {
  return Os.some(function(e) {
    return e.skippedTargets.length > 0;
  });
}, cP = "ResizeObserver loop completed with undelivered notifications.", rte = function() {
  var e;
  typeof ErrorEvent == "function" ? e = new ErrorEvent("error", {
    message: cP
  }) : (e = document.createEvent("Event"), e.initEvent("error", !1, !1), e.message = cP), window.dispatchEvent(e);
}, $d;
(function(e) {
  e.BORDER_BOX = "border-box", e.CONTENT_BOX = "content-box", e.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
})($d || ($d = {}));
var ks = function(e) {
  return Object.freeze(e);
}, ite = /* @__PURE__ */ (function() {
  function e(t, n) {
    this.inlineSize = t, this.blockSize = n, ks(this);
  }
  return e;
})(), gE = (function() {
  function e(t, n, o, r) {
    return this.x = t, this.y = n, this.width = o, this.height = r, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, ks(this);
  }
  return e.prototype.toJSON = function() {
    var t = this, n = t.x, o = t.y, r = t.top, i = t.right, a = t.bottom, l = t.left, s = t.width, u = t.height;
    return { x: n, y: o, top: r, right: i, bottom: a, left: l, width: s, height: u };
  }, e.fromRect = function(t) {
    return new e(t.x, t.y, t.width, t.height);
  }, e;
})(), Kx = function(e) {
  return e instanceof SVGElement && "getBBox" in e;
}, vE = function(e) {
  if (Kx(e)) {
    var t = e.getBBox(), n = t.width, o = t.height;
    return !n && !o;
  }
  var r = e, i = r.offsetWidth, a = r.offsetHeight;
  return !(i || a || e.getClientRects().length);
}, dP = function(e) {
  var t;
  if (e instanceof Element)
    return !0;
  var n = (t = e?.ownerDocument) === null || t === void 0 ? void 0 : t.defaultView;
  return !!(n && e instanceof n.Element);
}, ate = function(e) {
  switch (e.tagName) {
    case "INPUT":
      if (e.type !== "image")
        break;
    case "VIDEO":
    case "AUDIO":
    case "EMBED":
    case "OBJECT":
    case "CANVAS":
    case "IFRAME":
    case "IMG":
      return !0;
  }
  return !1;
}, id = typeof window < "u" ? window : {}, zf = /* @__PURE__ */ new WeakMap(), fP = /auto|scroll/, lte = /^tb|vertical/, ste = /msie|trident/i.test(id.navigator && id.navigator.userAgent), Vi = function(e) {
  return parseFloat(e || "0");
}, zu = function(e, t, n) {
  return e === void 0 && (e = 0), t === void 0 && (t = 0), n === void 0 && (n = !1), new ite((n ? t : e) || 0, (n ? e : t) || 0);
}, pP = ks({
  devicePixelContentBoxSize: zu(),
  borderBoxSize: zu(),
  contentBoxSize: zu(),
  contentRect: new gE(0, 0, 0, 0)
}), mE = function(e, t) {
  if (t === void 0 && (t = !1), zf.has(e) && !t)
    return zf.get(e);
  if (vE(e))
    return zf.set(e, pP), pP;
  var n = getComputedStyle(e), o = Kx(e) && e.ownerSVGElement && e.getBBox(), r = !ste && n.boxSizing === "border-box", i = lte.test(n.writingMode || ""), a = !o && fP.test(n.overflowY || ""), l = !o && fP.test(n.overflowX || ""), s = o ? 0 : Vi(n.paddingTop), u = o ? 0 : Vi(n.paddingRight), c = o ? 0 : Vi(n.paddingBottom), d = o ? 0 : Vi(n.paddingLeft), f = o ? 0 : Vi(n.borderTopWidth), p = o ? 0 : Vi(n.borderRightWidth), v = o ? 0 : Vi(n.borderBottomWidth), g = o ? 0 : Vi(n.borderLeftWidth), m = d + u, x = s + c, S = g + p, C = f + v, P = l ? e.offsetHeight - C - e.clientHeight : 0, $ = a ? e.offsetWidth - S - e.clientWidth : 0, I = r ? m + S : 0, w = r ? x + C : 0, _ = o ? o.width : Vi(n.width) - I - $, M = o ? o.height : Vi(n.height) - w - P, N = _ + m + $ + S, A = M + x + P + C, H = ks({
    devicePixelContentBoxSize: zu(Math.round(_ * devicePixelRatio), Math.round(M * devicePixelRatio), i),
    borderBoxSize: zu(N, A, i),
    contentBoxSize: zu(_, M, i),
    contentRect: new gE(d, s, _, M)
  });
  return zf.set(e, H), H;
}, bE = function(e, t, n) {
  var o = mE(e, n), r = o.borderBoxSize, i = o.contentBoxSize, a = o.devicePixelContentBoxSize;
  switch (t) {
    case $d.DEVICE_PIXEL_CONTENT_BOX:
      return a;
    case $d.BORDER_BOX:
      return r;
    default:
      return i;
  }
}, ute = /* @__PURE__ */ (function() {
  function e(t) {
    var n = mE(t);
    this.target = t, this.contentRect = n.contentRect, this.borderBoxSize = ks([n.borderBoxSize]), this.contentBoxSize = ks([n.contentBoxSize]), this.devicePixelContentBoxSize = ks([n.devicePixelContentBoxSize]);
  }
  return e;
})(), yE = function(e) {
  if (vE(e))
    return 1 / 0;
  for (var t = 0, n = e.parentNode; n; )
    t += 1, n = n.parentNode;
  return t;
}, cte = function() {
  var e = 1 / 0, t = [];
  Os.forEach(function(i) {
    if (i.activeTargets.length !== 0) {
      var a = [];
      i.activeTargets.forEach(function(l) {
        var s = new ute(l.target), u = yE(l.target);
        a.push(s), l.lastReportedSize = bE(l.target, l.observedBox), u < e && (e = u);
      }), t.push(function() {
        i.callback.call(i.observer, a, i.observer);
      }), i.activeTargets.splice(0, i.activeTargets.length);
    }
  });
  for (var n = 0, o = t; n < o.length; n++) {
    var r = o[n];
    r();
  }
  return e;
}, hP = function(e) {
  Os.forEach(function(t) {
    t.activeTargets.splice(0, t.activeTargets.length), t.skippedTargets.splice(0, t.skippedTargets.length), t.observationTargets.forEach(function(n) {
      n.isActive() && (yE(n.target) > e ? t.activeTargets.push(n) : t.skippedTargets.push(n));
    });
  });
}, dte = function() {
  var e = 0;
  for (hP(e); nte(); )
    e = cte(), hP(e);
  return ote() && rte(), e > 0;
}, Uv, xE = [], fte = function() {
  return xE.splice(0).forEach(function(e) {
    return e();
  });
}, pte = function(e) {
  if (!Uv) {
    var t = 0, n = document.createTextNode(""), o = { characterData: !0 };
    new MutationObserver(function() {
      return fte();
    }).observe(n, o), Uv = function() {
      n.textContent = "".concat(t ? t-- : t++);
    };
  }
  xE.push(e), Uv();
}, hte = function(e) {
  pte(function() {
    requestAnimationFrame(e);
  });
}, bp = 0, gte = function() {
  return !!bp;
}, vte = 250, mte = { attributes: !0, characterData: !0, childList: !0, subtree: !0 }, gP = [
  "resize",
  "load",
  "transitionend",
  "animationend",
  "animationstart",
  "animationiteration",
  "keyup",
  "keydown",
  "mouseup",
  "mousedown",
  "mouseover",
  "mouseout",
  "blur",
  "focus"
], vP = function(e) {
  return e === void 0 && (e = 0), Date.now() + e;
}, Xv = !1, bte = (function() {
  function e() {
    var t = this;
    this.stopped = !0, this.listener = function() {
      return t.schedule();
    };
  }
  return e.prototype.run = function(t) {
    var n = this;
    if (t === void 0 && (t = vte), !Xv) {
      Xv = !0;
      var o = vP(t);
      hte(function() {
        var r = !1;
        try {
          r = dte();
        } finally {
          if (Xv = !1, t = o - vP(), !gte())
            return;
          r ? n.run(1e3) : t > 0 ? n.run(t) : n.start();
        }
      });
    }
  }, e.prototype.schedule = function() {
    this.stop(), this.run();
  }, e.prototype.observe = function() {
    var t = this, n = function() {
      return t.observer && t.observer.observe(document.body, mte);
    };
    document.body ? n() : id.addEventListener("DOMContentLoaded", n);
  }, e.prototype.start = function() {
    var t = this;
    this.stopped && (this.stopped = !1, this.observer = new MutationObserver(this.listener), this.observe(), gP.forEach(function(n) {
      return id.addEventListener(n, t.listener, !0);
    }));
  }, e.prototype.stop = function() {
    var t = this;
    this.stopped || (this.observer && this.observer.disconnect(), gP.forEach(function(n) {
      return id.removeEventListener(n, t.listener, !0);
    }), this.stopped = !0);
  }, e;
})(), ny = new bte(), mP = function(e) {
  !bp && e > 0 && ny.start(), bp += e, !bp && ny.stop();
}, yte = function(e) {
  return !Kx(e) && !ate(e) && getComputedStyle(e).display === "inline";
}, xte = (function() {
  function e(t, n) {
    this.target = t, this.observedBox = n || $d.CONTENT_BOX, this.lastReportedSize = {
      inlineSize: 0,
      blockSize: 0
    };
  }
  return e.prototype.isActive = function() {
    var t = bE(this.target, this.observedBox, !0);
    return yte(this.target) && (this.lastReportedSize = t), this.lastReportedSize.inlineSize !== t.inlineSize || this.lastReportedSize.blockSize !== t.blockSize;
  }, e;
})(), wte = /* @__PURE__ */ (function() {
  function e(t, n) {
    this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = t, this.callback = n;
  }
  return e;
})(), Ff = /* @__PURE__ */ new WeakMap(), bP = function(e, t) {
  for (var n = 0; n < e.length; n += 1)
    if (e[n].target === t)
      return n;
  return -1;
}, Bf = (function() {
  function e() {
  }
  return e.connect = function(t, n) {
    var o = new wte(t, n);
    Ff.set(t, o);
  }, e.observe = function(t, n, o) {
    var r = Ff.get(t), i = r.observationTargets.length === 0;
    bP(r.observationTargets, n) < 0 && (i && Os.push(r), r.observationTargets.push(new xte(n, o && o.box)), mP(1), ny.schedule());
  }, e.unobserve = function(t, n) {
    var o = Ff.get(t), r = bP(o.observationTargets, n), i = o.observationTargets.length === 1;
    r >= 0 && (i && Os.splice(Os.indexOf(o), 1), o.observationTargets.splice(r, 1), mP(-1));
  }, e.disconnect = function(t) {
    var n = this, o = Ff.get(t);
    o.observationTargets.slice().forEach(function(r) {
      return n.unobserve(t, r.target);
    }), o.activeTargets.splice(0, o.activeTargets.length);
  }, e;
})(), Ste = (function() {
  function e(t) {
    if (arguments.length === 0)
      throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
    if (typeof t != "function")
      throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
    Bf.connect(this, t);
  }
  return e.prototype.observe = function(t, n) {
    if (arguments.length === 0)
      throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
    if (!dP(t))
      throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
    Bf.observe(this, t, n);
  }, e.prototype.unobserve = function(t) {
    if (arguments.length === 0)
      throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
    if (!dP(t))
      throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
    Bf.unobserve(this, t);
  }, e.prototype.disconnect = function() {
    Bf.disconnect(this);
  }, e.toString = function() {
    return "function ResizeObserver () { [polyfill code] }";
  }, e;
})();
const Jp = /* @__PURE__ */ new WeakMap();
function Cte(e) {
  var t;
  for (let n = 0, o = e.length; n < o; ++n) {
    const r = e[n], i = Jp.get(r.target);
    if (typeof i == "function") {
      const { inlineSize: a, blockSize: l } = ((t = r.borderBoxSize) == null ? void 0 : t[0]) ?? {}, { offsetWidth: s, offsetHeight: u } = r.target;
      i(
        Object.assign(r, {
          offsetWidth: s,
          offsetHeight: u,
          width: a ?? s,
          height: l ?? u
        })
      );
    }
  }
}
const wE = new (Ws && window.ResizeObserver || Ste)(
  Cte
);
function yP(e, t) {
  Jp.set(e, t), wE.observe(e);
}
function xP(e) {
  Jp.has(e) && (wE.unobserve(e), Jp.delete(e));
}
function $te(e = {}) {
  let t = sP;
  const n = ke(
    () => T(e.target),
    (r) => {
      t(), !(!r || typeof e.onResize != "function") && (yP(r, e.onResize), t = () => {
        xP(r), t = sP;
      });
    },
    { immediate: !0 }
  ), o = () => {
    n(), t();
  };
  return WP() && KP(o), {
    /**
     * @deprecated Will be removed in next major version, please directly use `observeResize` from imports.
     */
    observeResize: yP,
    /**
     * @deprecated Will be removed in next major version, please directly use `unobserveResize` from imports.
     */
    unobserveResize: xP,
    unobserve: o
  };
}
const Pte = ce(!1);
E(() => Pte.value);
const wP = "__theme_style__", Qv = "__theme_observer__", SP = Pn(/* @__PURE__ */ new Map()), CP = /* @__PURE__ */ new Map();
ke(SP, () => {
  if (!Ws) return;
  CP.clear();
  const e = document.head.querySelector(`#${wP}`);
  e && document.head.removeChild(e);
  const t = document.createElement("style");
  let n = `.${Qv} { width: 1px }`, o = 1;
  for (const [r, [i, a]] of SP.entries())
    n += ` html.${i} .${Qv}, .${a} .${Qv} { width: ${++o}px }`, CP.set(o, r);
  t.textContent = n, t.id = wP, document.head.appendChild(t);
});
const Ote = /* @__PURE__ */ be({
  __name: "grid-layout",
  props: {
    autoSize: { type: Boolean, default: !0 },
    colNum: { default: 12 },
    rowHeight: { default: 150 },
    maxRows: { default: 1 / 0 },
    margin: { default: () => [10, 10] },
    isDraggable: { type: Boolean, default: !0 },
    isResizable: { type: Boolean, default: !0 },
    isMirrored: { type: Boolean, default: !1 },
    isBounded: { type: Boolean, default: !1 },
    useCssTransforms: { type: Boolean, default: !0 },
    verticalCompact: { type: Boolean, default: !0 },
    restoreOnDrag: { type: Boolean, default: !1 },
    layout: {},
    responsive: { type: Boolean, default: !1 },
    responsiveLayouts: { default: () => ({}) },
    transformScale: { default: 1 },
    breakpoints: { default: () => ({ lg: 1200, md: 996, sm: 768, xs: 480, xxs: 0 }) },
    cols: { default: () => ({ lg: 12, md: 10, sm: 6, xs: 4, xxs: 2 }) },
    preventCollision: { type: Boolean, default: !1 },
    useStyleCursor: { type: Boolean, default: !0 }
  },
  emits: [
    "layout-before-mount",
    "layout-mounted",
    "layout-updated",
    "breakpoint-changed",
    "update:layout",
    "layout-ready"
  ],
  setup(e, { expose: t, emit: n }) {
    const o = e, r = n, i = Pn({
      width: -1,
      mergedStyle: {},
      lastLayoutLength: 0,
      isDragging: !1,
      placeholder: {
        x: 0,
        y: 0,
        w: 0,
        h: 0,
        i: ""
      },
      layouts: {},
      // array to store all layouts from different breakpoints
      lastBreakpoint: null,
      // store last active breakpoint
      originalLayout: null
      // store original Layout
    }), a = /* @__PURE__ */ new Map(), l = ce(o.layout), s = ce(), { observeResize: u, unobserveResize: c } = $te(), d = $ee();
    d.on("resizeEvent", f), d.on("dragEvent", p), th(() => {
      r("layout-before-mount", l.value);
    }), Nt(() => {
      r("layout-mounted", l.value), Yt(() => {
        Nee(l.value), i.originalLayout = l.value, Yt(() => {
          M(), s.value && u(s.value, Pee(C, 16)), mu(l.value, o.verticalCompact), r("layout-updated", l.value), S(), C();
        });
      });
    }), qt(() => {
      d.clearAll(), s.value && c(s.value);
    });
    function f(A, H, B, F, R, X) {
      w(A, H, B, F, R, X);
    }
    function p(A, H, B, F, R, X) {
      I(A, H, B, F, R, X);
    }
    ke(
      () => i.width,
      (A, H) => {
        Yt(() => {
          d.emit("updateWidth", A), H === -1 && Yt(() => {
            r("layout-ready", l.value);
          }), S();
        });
      }
    ), ke(
      () => [o.layout, o.layout.length],
      () => {
        l.value = o.layout, x();
      }
    ), ke(
      () => o.colNum,
      (A) => {
        d.emit("setColNum", A);
      }
    ), ke(
      () => o.rowHeight,
      (A) => {
        d.emit("setRowHeight", A);
      }
    ), ke(
      () => o.isDraggable,
      (A) => {
        d.emit("setDraggable", A);
      }
    ), ke(
      () => o.isResizable,
      (A) => {
        d.emit("setResizable", A);
      }
    ), ke(
      () => o.isBounded,
      (A) => {
        d.emit("setBounded", A);
      }
    ), ke(
      () => o.transformScale,
      (A) => {
        d.emit("setTransformScale", A);
      }
    ), ke(
      () => o.responsive,
      (A) => {
        A || (r("update:layout", i.originalLayout), d.emit("setColNum", o.colNum)), C();
      }
    ), ke(
      () => o.maxRows,
      (A) => {
        d.emit("setMaxRows", A);
      }
    ), ke([() => o.margin, () => o.margin[1]], S), Ft(
      aE,
      Pn({
        ...ys(o),
        ...ys(i),
        increaseItem: v,
        decreaseItem: g
      })
    ), Ft(lE, d), t({ state: i, getItem: m, resizeEvent: w, dragEvent: I, layoutUpdate: x });
    function v(A) {
      a.set(A.i, A);
    }
    function g(A) {
      a.delete(A.i);
    }
    function m(A) {
      return a.get(A);
    }
    function x() {
      if (!kr(l.value) && !kr(i.originalLayout)) {
        if (l.value.length !== i.originalLayout.length) {
          const A = N(l.value, i.originalLayout);
          if (A.length > 0)
            if (l.value.length > i.originalLayout.length)
              i.originalLayout = i.originalLayout.concat(A);
            else {
              const H = new Set(A.map((B) => B.i));
              i.originalLayout = i.originalLayout.filter((B) => !H.has(B.i));
            }
          i.lastLayoutLength = l.value.length, M();
        }
        mu(l.value, o.verticalCompact), d.emit("updateWidth", i.width), S(), r("layout-updated", l.value);
      }
    }
    function S() {
      i.mergedStyle = {
        height: P()
      };
    }
    function C() {
      s.value && (i.width = s.value.offsetWidth), d.emit("resizeEvent");
    }
    function P() {
      if (!o.autoSize) return;
      const A = parseFloat(o.margin[1]);
      return kee(l.value) * (o.rowHeight + A) + A + "px";
    }
    let $;
    function I(A, H, B, F, R, X) {
      let j = Z$(l.value, H);
      kr(j) && (j = { h: 0, w: 0, x: 0, y: 0, i: "" }), A === "dragstart" && !o.verticalCompact && ($ = l.value.reduce(
        (ee, { i: W, x: K, y: q }) => ({
          ...ee,
          [W]: { x: K, y: q }
        }),
        {}
      )), A === "dragmove" || A === "dragstart" ? (i.placeholder.i = H, i.placeholder.x = j.x, i.placeholder.y = j.y, i.placeholder.w = X, i.placeholder.h = R, Yt(() => {
        i.isDragging = !0;
      }), d.emit("updateWidth", i.width)) : Yt(() => {
        i.isDragging = !1;
      }), l.value = ty(l.value, j, B, F, !0, o.preventCollision), o.restoreOnDrag ? (j.static = !0, mu(l.value, o.verticalCompact, $), j.static = !1) : mu(l.value, o.verticalCompact), d.emit("compact"), S(), A === "dragend" && ($ = void 0, r("layout-updated", l.value));
    }
    function w(A, H, B, F, R, X) {
      let j = Z$(l.value, H);
      kr(j) && (j = { h: 0, w: 0, x: 0, y: 0, i: "" });
      let ee;
      if (o.preventCollision) {
        const W = uE(l.value, { ...j, w: X, h: R }).filter(
          (K) => K.i !== j.i
        );
        if (ee = W.length > 0, ee) {
          let K = 1 / 0, q = 1 / 0;
          W.forEach((G) => {
            G.x > j.x && (K = Math.min(K, G.x)), G.y > j.y && (q = Math.min(q, G.y));
          }), Number.isFinite(K) && (j.w = K - j.x), Number.isFinite(q) && (j.h = q - j.y);
        }
      }
      ee || (j.w = X, j.h = R), A === "resizestart" || A === "resizemove" ? (i.placeholder.i = H, i.placeholder.x = B, i.placeholder.y = F, i.placeholder.w = j.w, i.placeholder.h = j.h, Yt(() => {
        i.isDragging = !0;
      }), d.emit("updateWidth", i.width)) : A && Yt(() => {
        i.isDragging = !1;
      }), o.responsive && _(), mu(l.value, o.verticalCompact), d.emit("compact"), S(), A === "resizeend" && r("layout-updated", l.value);
    }
    function _() {
      const A = Bee(o.breakpoints, i.width);
      if (A === i.lastBreakpoint)
        return;
      const H = fE(A, o.cols);
      !kr(i.lastBreakpoint) && !i.layouts[i.lastBreakpoint] && (i.layouts[i.lastBreakpoint] = ey(l.value));
      const B = Lee(
        i.originalLayout,
        i.layouts,
        o.breakpoints,
        A,
        i.lastBreakpoint,
        H,
        o.verticalCompact
      );
      i.layouts[A] = B, i.lastBreakpoint !== A && r("breakpoint-changed", A, B), l.value = B, r("update:layout", B), i.lastBreakpoint = A, d.emit("setColNum", H);
    }
    function M() {
      i.layouts = Object.assign({}, o.responsiveLayouts);
    }
    function N(A, H) {
      const B = new Set(H.map((j) => j.i)), F = new Set(A.map((j) => j.i)), R = A.filter((j) => !B.has(j.i)), X = H.filter((j) => !F.has(j.i));
      return R.concat(X);
    }
    return (A, H) => (ne(), xe("div", {
      ref_key: "wrapper",
      ref: s,
      class: "vgl-layout",
      style: Bt(i.mergedStyle)
    }, [
      A.$slots.default ? Ra(A.$slots, "default", { key: 0 }) : (ne(!0), xe(Je, { key: 1 }, Ut(l.value, (B) => (ne(), ft(iP, HE({
        key: B.i,
        ref_for: !0
      }, B), {
        default: he(() => [
          Ra(A.$slots, "item", { item: B })
        ]),
        _: 2
      }, 1040))), 128)),
      ti(h(iP, {
        class: "vgl-item--placeholder",
        x: i.placeholder.x,
        y: i.placeholder.y,
        w: i.placeholder.w,
        h: i.placeholder.h,
        i: i.placeholder.i
      }, null, 8, ["x", "y", "w", "h", "i"]), [
        [Oi, i.isDragging]
      ])
    ], 4));
  }
});
(function() {
  try {
    if (typeof document < "u") {
      var e = document.createElement("style");
      e.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')), document.head.appendChild(e);
    }
  } catch (t) {
    console.error("vite-plugin-css-injected-by-js", t);
  }
})();
function SE(e, t, n = 1e3, o) {
  const r = ce(null), i = ce(!1), a = ce(null), { config: l } = nc(), s = _s(), u = E(() => s.resolveAll()), c = E(() => {
    const v = e();
    return [
      JSON.stringify(v.map((g) => g.dataSource)),
      JSON.stringify(u.value),
      o?.() ?? 0
    ].join("|");
  });
  let d = !1;
  async function f() {
    const v = e().filter((P) => P.enabled !== !1);
    if (v.length === 0) {
      r.value = null, i.value = !1;
      return;
    }
    const g = t(), m = Math.max(
      Math.ceil((g.to - g.from) / n),
      1e3
    ), x = { from: g.from, to: g.to }, S = l.value.datasourceConfig ?? [], C = new Map(S.map((P) => [P.uid, P]));
    d = !1, i.value = !0, a.value = null;
    try {
      const P = [];
      for (const $ of v) {
        const I = $.dataSource, w = Pp(I.type);
        if (!w)
          continue;
        const _ = "datasourceId" in I ? C.get(I.datasourceId ?? "") : void 0, M = await w.query({
          requestId: $.id,
          range: x,
          intervalMs: m,
          maxDataPoints: n,
          targets: [I],
          scopedVars: u.value,
          _dsCfg: _,
          _variableStates: s.variables
        });
        P.push(...M.data);
      }
      d || (r.value = { data: P, state: "Done" }, a.value = null);
    } catch (P) {
      d || (a.value = P?.message ?? String(P));
    } finally {
      d || (i.value = !1);
    }
  }
  ke(c, f, { immediate: !0 }), ke(
    () => {
      const v = t();
      return `${v.from}|${v.to}`;
    },
    f
  );
  function p() {
    d = !0;
  }
  return { response: r, loading: i, error: a, abort: p };
}
const CE = Symbol("panelEditor");
function kte(e) {
  Ft(CE, e);
}
function vc() {
  const e = zt(CE);
  if (!e)
    throw new Error("usePanelEditor must be used within a PanelEditorProvider");
  return e;
}
function Ite(e, t, { signal: n, edges: o } = {}) {
  let r, i = null;
  const a = o != null && o.includes("leading"), l = o == null || o.includes("trailing"), s = () => {
    i !== null && (e.apply(r, i), r = void 0, i = null);
  }, u = () => {
    l && s(), p();
  };
  let c = null;
  const d = () => {
    c != null && clearTimeout(c), c = setTimeout(() => {
      c = null, u();
    }, t);
  }, f = () => {
    c !== null && (clearTimeout(c), c = null);
  }, p = () => {
    f(), r = void 0, i = null;
  }, v = () => {
    s();
  }, g = function(...m) {
    if (n?.aborted)
      return;
    r = this, i = m;
    const x = c == null;
    d(), a && x && s();
  };
  return g.schedule = d, g.cancel = p, g.flush = v, n?.addEventListener("abort", p, { once: !0 }), g;
}
function _te() {
}
function mi(e, t, n) {
  return n == null ? Math.min(e, t) : Math.min(Math.max(e, t), n);
}
function $P(e) {
  return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
}
function PP(e) {
  return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
}
const Tte = "[object RegExp]", Mte = "[object String]", Ete = "[object Number]", Dte = "[object Boolean]", OP = "[object Arguments]", Ate = "[object Symbol]", Nte = "[object Date]", Rte = "[object Map]", zte = "[object Set]", Fte = "[object Array]", Bte = "[object Function]", Lte = "[object ArrayBuffer]", Zv = "[object Object]", Hte = "[object Error]", Vte = "[object DataView]", jte = "[object Uint8Array]", Wte = "[object Uint8ClampedArray]", Kte = "[object Uint16Array]", qte = "[object Uint32Array]", Yte = "[object BigUint64Array]", Gte = "[object Int8Array]", Ute = "[object Int16Array]", Xte = "[object Int32Array]", Qte = "[object BigInt64Array]", Zte = "[object Float32Array]", Jte = "[object Float64Array]";
function kP(e) {
  if (!e || typeof e != "object")
    return !1;
  const t = Object.getPrototypeOf(e);
  return t === null || t === Object.prototype || Object.getPrototypeOf(t) === null ? Object.prototype.toString.call(e) === "[object Object]" : !1;
}
function ene(e, t) {
  return e === t || Number.isNaN(e) && Number.isNaN(t);
}
function tne(e, t, n) {
  return Kc(e, t, void 0, void 0, void 0, void 0, n);
}
function Kc(e, t, n, o, r, i, a) {
  const l = a(e, t, n, o, r, i);
  if (l !== void 0)
    return l;
  if (typeof e == typeof t)
    switch (typeof e) {
      case "bigint":
      case "string":
      case "boolean":
      case "symbol":
      case "undefined":
        return e === t;
      case "number":
        return e === t || Object.is(e, t);
      case "function":
        return e === t;
      case "object":
        return ad(e, t, i, a);
    }
  return ad(e, t, i, a);
}
function ad(e, t, n, o) {
  if (Object.is(e, t))
    return !0;
  let r = PP(e), i = PP(t);
  if (r === OP && (r = Zv), i === OP && (i = Zv), r !== i)
    return !1;
  switch (r) {
    case Mte:
      return e.toString() === t.toString();
    case Ete: {
      const s = e.valueOf(), u = t.valueOf();
      return ene(s, u);
    }
    case Dte:
    case Nte:
    case Ate:
      return Object.is(e.valueOf(), t.valueOf());
    case Tte:
      return e.source === t.source && e.flags === t.flags;
    case Bte:
      return e === t;
  }
  n = n ?? /* @__PURE__ */ new Map();
  const a = n.get(e), l = n.get(t);
  if (a != null && l != null)
    return a === t;
  n.set(e, t), n.set(t, e);
  try {
    switch (r) {
      case Rte: {
        if (e.size !== t.size)
          return !1;
        for (const [s, u] of e.entries())
          if (!t.has(s) || !Kc(u, t.get(s), s, e, t, n, o))
            return !1;
        return !0;
      }
      case zte: {
        if (e.size !== t.size)
          return !1;
        const s = Array.from(e.values()), u = Array.from(t.values());
        for (let c = 0; c < s.length; c++) {
          const d = s[c], f = u.findIndex((p) => Kc(d, p, void 0, e, t, n, o));
          if (f === -1)
            return !1;
          u.splice(f, 1);
        }
        return !0;
      }
      case Fte:
      case jte:
      case Wte:
      case Kte:
      case qte:
      case Yte:
      case Gte:
      case Ute:
      case Xte:
      case Qte:
      case Zte:
      case Jte: {
        if (typeof Buffer < "u" && Buffer.isBuffer(e) !== Buffer.isBuffer(t) || e.length !== t.length)
          return !1;
        for (let s = 0; s < e.length; s++)
          if (!Kc(e[s], t[s], s, e, t, n, o))
            return !1;
        return !0;
      }
      case Lte:
        return e.byteLength !== t.byteLength ? !1 : ad(new Uint8Array(e), new Uint8Array(t), n, o);
      case Vte:
        return e.byteLength !== t.byteLength || e.byteOffset !== t.byteOffset ? !1 : ad(new Uint8Array(e), new Uint8Array(t), n, o);
      case Hte:
        return e.name === t.name && e.message === t.message;
      case Zv: {
        if (!(ad(e.constructor, t.constructor, n, o) || kP(e) && kP(t)))
          return !1;
        const s = [...Object.keys(e), ...$P(e)], u = [...Object.keys(t), ...$P(t)];
        if (s.length !== u.length)
          return !1;
        for (let c = 0; c < s.length; c++) {
          const d = s[c], f = e[d];
          if (!Object.hasOwn(t, d))
            return !1;
          const p = t[d];
          if (!Kc(f, p, d, e, t, n, o))
            return !1;
        }
        return !0;
      }
      default:
        return !1;
    }
  } finally {
    n.delete(e), n.delete(t);
  }
}
function nne(e, t) {
  return tne(e, t, _te);
}
const one = "_splitView_pzp7c_6", rne = "_sashContainer_pzp7c_13", ine = "_sash_pzp7c_13", ane = "_splitViewContainer_pzp7c_24", lne = "_splitViewView_pzp7c_31", sne = "_vertical_pzp7c_37", une = "_horizontal_pzp7c_41", cne = "_separatorBorder_pzp7c_45", xl = {
  splitView: one,
  sashContainer: rne,
  sash: ine,
  splitViewContainer: ane,
  splitViewView: lne,
  vertical: sne,
  horizontal: une,
  separatorBorder: cne
};
let $E = !1, PE = !1, Nc;
typeof navigator == "object" && (Nc = navigator.userAgent, PE = Nc.includes("Macintosh"), $E = (Nc.includes("Macintosh") || Nc.includes("iPad") || Nc.includes("iPhone")) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0);
const OE = $E, dne = PE;
class fne {
  _size;
  getSize() {
    return this._size;
  }
  setSize(t) {
    this._size = t;
  }
}
function Lf(e, t) {
  const n = e.length, o = n - t.length;
  return o >= 0 && e.slice(o, n) === t;
}
function pne(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var IP = { exports: {} }, _P;
function hne() {
  return _P || (_P = 1, (function(e) {
    var t = Object.prototype.hasOwnProperty, n = "~";
    function o() {
    }
    Object.create && (o.prototype = /* @__PURE__ */ Object.create(null), new o().__proto__ || (n = !1));
    function r(s, u, c) {
      this.fn = s, this.context = u, this.once = c || !1;
    }
    function i(s, u, c, d, f) {
      if (typeof c != "function")
        throw new TypeError("The listener must be a function");
      var p = new r(c, d || s, f), v = n ? n + u : u;
      return s._events[v] ? s._events[v].fn ? s._events[v] = [s._events[v], p] : s._events[v].push(p) : (s._events[v] = p, s._eventsCount++), s;
    }
    function a(s, u) {
      --s._eventsCount === 0 ? s._events = new o() : delete s._events[u];
    }
    function l() {
      this._events = new o(), this._eventsCount = 0;
    }
    l.prototype.eventNames = function() {
      var s = [], u, c;
      if (this._eventsCount === 0) return s;
      for (c in u = this._events)
        t.call(u, c) && s.push(n ? c.slice(1) : c);
      return Object.getOwnPropertySymbols ? s.concat(Object.getOwnPropertySymbols(u)) : s;
    }, l.prototype.listeners = function(s) {
      var u = n ? n + s : s, c = this._events[u];
      if (!c) return [];
      if (c.fn) return [c.fn];
      for (var d = 0, f = c.length, p = new Array(f); d < f; d++)
        p[d] = c[d].fn;
      return p;
    }, l.prototype.listenerCount = function(s) {
      var u = n ? n + s : s, c = this._events[u];
      return c ? c.fn ? 1 : c.length : 0;
    }, l.prototype.emit = function(s, u, c, d, f, p) {
      var v = n ? n + s : s;
      if (!this._events[v]) return !1;
      var g = this._events[v], m = arguments.length, x, S;
      if (g.fn) {
        switch (g.once && this.removeListener(s, g.fn, void 0, !0), m) {
          case 1:
            return g.fn.call(g.context), !0;
          case 2:
            return g.fn.call(g.context, u), !0;
          case 3:
            return g.fn.call(g.context, u, c), !0;
          case 4:
            return g.fn.call(g.context, u, c, d), !0;
          case 5:
            return g.fn.call(g.context, u, c, d, f), !0;
          case 6:
            return g.fn.call(g.context, u, c, d, f, p), !0;
        }
        for (S = 1, x = new Array(m - 1); S < m; S++)
          x[S - 1] = arguments[S];
        g.fn.apply(g.context, x);
      } else {
        var C = g.length, P;
        for (S = 0; S < C; S++)
          switch (g[S].once && this.removeListener(s, g[S].fn, void 0, !0), m) {
            case 1:
              g[S].fn.call(g[S].context);
              break;
            case 2:
              g[S].fn.call(g[S].context, u);
              break;
            case 3:
              g[S].fn.call(g[S].context, u, c);
              break;
            case 4:
              g[S].fn.call(g[S].context, u, c, d);
              break;
            default:
              if (!x) for (P = 1, x = new Array(m - 1); P < m; P++)
                x[P - 1] = arguments[P];
              g[S].fn.apply(g[S].context, x);
          }
      }
      return !0;
    }, l.prototype.on = function(s, u, c) {
      return i(this, s, u, c, !1);
    }, l.prototype.once = function(s, u, c) {
      return i(this, s, u, c, !0);
    }, l.prototype.removeListener = function(s, u, c, d) {
      var f = n ? n + s : s;
      if (!this._events[f]) return this;
      if (!u)
        return a(this, f), this;
      var p = this._events[f];
      if (p.fn)
        p.fn === u && (!d || p.once) && (!c || p.context === c) && a(this, f);
      else {
        for (var v = 0, g = [], m = p.length; v < m; v++)
          (p[v].fn !== u || d && !p[v].once || c && p[v].context !== c) && g.push(p[v]);
        g.length ? this._events[f] = g.length === 1 ? g[0] : g : a(this, f);
      }
      return this;
    }, l.prototype.removeAllListeners = function(s) {
      var u;
      return s ? (u = n ? n + s : s, this._events[u] && a(this, u)) : (this._events = new o(), this._eventsCount = 0), this;
    }, l.prototype.off = l.prototype.removeListener, l.prototype.addListener = l.prototype.on, l.prefixed = n, l.EventEmitter = l, e.exports = l;
  })(IP)), IP.exports;
}
var gne = hne();
const qx = /* @__PURE__ */ pne(gne);
function TP(e, t) {
  const n = e.indexOf(t);
  n !== -1 && (e.splice(n, 1), e.unshift(t));
}
function Jv(e, t) {
  const n = e.indexOf(t);
  n !== -1 && (e.splice(n, 1), e.push(t));
}
function qr(e, t, n = 1) {
  const o = Math.max(0, Math.ceil((t - e) / n)), r = Array.from({ length: o });
  let i = -1;
  for (; ++i < o; )
    r[i] = e + i * n;
  return r;
}
const vne = "_sash_j5cmb_7", mne = "_disabled_j5cmb_15", bne = "_mac_j5cmb_19", yne = "_vertical_j5cmb_19", xne = "_minimum_j5cmb_23", wne = "_maximum_j5cmb_27", Sne = "_horizontal_j5cmb_31", Cne = "_hover_j5cmb_126", $ne = "_active_j5cmb_127", ir = {
  sash: vne,
  disabled: mne,
  mac: bne,
  vertical: yne,
  minimum: xne,
  maximum: wne,
  horizontal: Sne,
  hover: Cne,
  active: $ne
};
var yi = /* @__PURE__ */ ((e) => (e[e.Vertical = 0] = "Vertical", e[e.Horizontal = 1] = "Horizontal", e))(yi || {}), ss = /* @__PURE__ */ ((e) => (e[e.Disabled = 0] = "Disabled", e[e.Minimum = 1] = "Minimum", e[e.Maximum = 2] = "Maximum", e[e.Enabled = 3] = "Enabled", e))(ss || {});
let kE = OE ? 20 : 8;
const IE = new qx();
function Pne(e) {
  kE = e, IE.emit("onDidChangeGlobalSize", e);
}
class MP extends qx {
  el;
  layoutProvider;
  orientation;
  size;
  hoverDelay = 300;
  hoverDelayerFunc = (t) => t.classList.add("sash-hover", ir.hover);
  hoverDelayer = Ite(
    this.hoverDelayerFunc,
    this.hoverDelay
  );
  _state = 3;
  get state() {
    return this._state;
  }
  /**
   * The state of a sash defines whether it can be interacted with by the user
   * as well as what mouse cursor to use, when hovered.
   */
  set state(t) {
    this._state !== t && (this.el.classList.toggle(
      ir.disabled,
      t === 0
      /* Disabled */
    ), this.el.classList.toggle(
      "sash-disabled",
      t === 0
      /* Disabled */
    ), this.el.classList.toggle(
      ir.minimum,
      t === 1
      /* Minimum */
    ), this.el.classList.toggle(
      "sash-minimum",
      t === 1
      /* Minimum */
    ), this.el.classList.toggle(
      ir.maximum,
      t === 2
      /* Maximum */
    ), this.el.classList.toggle(
      "sash-maximum",
      t === 2
      /* Maximum */
    ), this._state = t, this.emit("enablementChange", t));
  }
  constructor(t, n, o) {
    super(), this.el = document.createElement("div"), this.el.classList.add("sash", ir.sash), this.el.dataset.testid = "sash", t.append(this.el), dne && this.el.classList.add("sash-mac", ir.mac), this.el.addEventListener("pointerdown", this.onPointerStart), this.el.addEventListener("dblclick", this.onPointerDoublePress), this.el.addEventListener("mouseenter", this.onMouseEnter), this.el.addEventListener("mouseleave", this.onMouseLeave), typeof o.size == "number" ? (this.size = o.size, o.orientation === 0 ? this.el.style.width = `${this.size}px` : this.el.style.height = `${this.size}px`) : (this.size = kE, IE.on("onDidChangeGlobalSize", (r) => {
      this.size = r, this.layout();
    })), this.layoutProvider = n, this.orientation = o.orientation ?? 0, this.orientation === 1 ? (this.el.classList.add("sash-horizontal", ir.horizontal), this.el.classList.remove("sash-vertical", ir.vertical)) : (this.el.classList.remove("sash-horizontal", ir.horizontal), this.el.classList.add("sash-vertical", ir.vertical)), o.skipInitialLayout || this.layout();
  }
  onPointerStart = (t) => {
    const n = t.pageX, o = t.pageY, r = {
      startX: n,
      currentX: n,
      startY: o,
      currentY: o
    };
    this.el.classList.add("sash-active", ir.active), this.emit("start", r), this.el.setPointerCapture(t.pointerId);
    const i = (l) => {
      l.preventDefault();
      const s = {
        startX: n,
        currentX: l.pageX,
        startY: o,
        currentY: l.pageY
      };
      this.emit("change", s);
    }, a = (l) => {
      l.preventDefault(), this.el.classList.remove("sash-active", ir.active), this.hoverDelayer.cancel(), this.emit("end"), this.el.releasePointerCapture(l.pointerId), globalThis.removeEventListener("pointermove", i), globalThis.removeEventListener("pointerup", a);
    };
    globalThis.addEventListener("pointermove", i), globalThis.addEventListener("pointerup", a);
  };
  onPointerDoublePress = () => {
    this.emit("reset");
  };
  onMouseEnter = () => {
    this.el.classList.contains(ir.active) ? (this.hoverDelayer.cancel(), this.el.classList.add("sash-hover", ir.hover)) : this.hoverDelayer(this.el);
  };
  onMouseLeave = () => {
    this.hoverDelayer.cancel(), this.el.classList.remove("sash-hover", ir.hover);
  };
  /**
   * Layout the sash. The sash will size and position itself
   * based on its provided {@link SashLayoutProvider layout provider}.
   */
  layout() {
    if (this.orientation === 0) {
      const t = this.layoutProvider;
      this.el.style.left = `${t.getVerticalSashLeft(this) - this.size / 2}px`, t.getVerticalSashTop && (this.el.style.top = `${t.getVerticalSashTop(this)}px`), t.getVerticalSashHeight && (this.el.style.height = `${t.getVerticalSashHeight(this)}px`);
    } else {
      const t = this.layoutProvider;
      this.el.style.top = `${t.getHorizontalSashTop(this) - this.size / 2}px`, t.getHorizontalSashLeft && (this.el.style.left = `${t.getHorizontalSashLeft(this)}px`), t.getHorizontalSashWidth && (this.el.style.width = `${t.getHorizontalSashWidth(this)}px`);
    }
  }
  dispose() {
    this.el.removeEventListener("pointerdown", this.onPointerStart), this.el.removeEventListener("dblclick", this.onPointerDoublePress), this.el.removeEventListener("mouseenter", this.onMouseEnter), this.el.removeEventListener("mouseleave", this.onMouseLeave), this.el.remove();
  }
}
const _E = {
  /**
   * When adding or removing views, distribute the delta space among
   * all other views.
   */
  Distribute: { type: "distribute" },
  /**
   * When adding or removing views, split the delta space with another
   * specific view, indexed by the provided `index`.
   */
  Split: (e) => ({ type: "split", index: e }),
  /**
   * When adding or removing views, assume the view is invisible.
   */
  Invisible: (e) => ({ type: "invisible", cachedVisibleSize: e })
};
var eh = /* @__PURE__ */ ((e) => (e[e.Normal = 0] = "Normal", e[e.Low = 1] = "Low", e[e.High = 2] = "High", e))(eh || {});
class TE {
  container;
  view;
  _size;
  _cachedVisibleSize = void 0;
  constructor(t, n, o) {
    this.container = t, this.view = n, this.container.classList.add("split-view-view", xl.splitViewView), this.container.dataset.testid = "split-view-view", typeof o == "number" ? (this._size = o, this._cachedVisibleSize = void 0, t.classList.add("split-view-view-visible")) : (this._size = 0, this._cachedVisibleSize = o.cachedVisibleSize);
  }
  set size(t) {
    this._size = t;
  }
  get size() {
    return this._size;
  }
  get priority() {
    return this.view.priority;
  }
  get snap() {
    return !!this.view.snap;
  }
  get visible() {
    return this._cachedVisibleSize === void 0;
  }
  setVisible(t, n) {
    t !== this.visible && (t ? (this.size = mi(
      this._cachedVisibleSize ?? 0,
      this.view.minimumSize,
      this.view.maximumSize
    ), this._cachedVisibleSize = void 0) : (this._cachedVisibleSize = typeof n == "number" ? n : this.size, this.size = 0), this.container.classList.toggle("split-view-view-visible", t), this.view.setVisible && this.view.setVisible(t));
  }
  get minimumSize() {
    return this.visible ? this.view.minimumSize : 0;
  }
  get maximumSize() {
    return this.visible ? this.view.maximumSize : 0;
  }
  get cachedVisibleSize() {
    return this._cachedVisibleSize;
  }
}
class One extends TE {
  layout(t) {
    if (!this.visible) {
      this.container.style.height = "0px", this.container.style.top = `${t}px`, this.container.style.left = "0px", this.container.style.width = "100%";
      return;
    }
    this.container.style.top = `${t}px`, this.container.style.height = `${this.size}px`, this.container.style.left = "0px", this.container.style.width = "100%", this.view.layout(this.size, t);
  }
}
class kne extends TE {
  layout(t) {
    if (!this.visible) {
      this.container.style.width = "0px", this.container.style.left = `${t}px`, this.container.style.top = "0px", this.container.style.height = "100%";
      return;
    }
    this.container.style.left = `${t}px`, this.container.style.width = `${this.size}px`, this.container.style.top = "0px", this.container.style.height = "100%", this.view.layout(this.size, t);
  }
}
class Ine extends qx {
  onDidChange;
  onDidDragStart;
  onDidDragEnd;
  _orientation;
  get orientation() {
    return this._orientation;
  }
  set orientation(t) {
    this._orientation = t;
  }
  sashContainer;
  size = 0;
  contentSize = 0;
  proportions = void 0;
  viewItems = [];
  sashItems = [];
  sashDragState;
  _proportionalLayout;
  get proportionalLayout() {
    return this._proportionalLayout;
  }
  set proportionalLayout(t) {
    this._proportionalLayout = t;
  }
  getSashOrthogonalSize;
  _startSnappingEnabled = !0;
  get startSnappingEnabled() {
    return this._startSnappingEnabled;
  }
  set startSnappingEnabled(t) {
    this._startSnappingEnabled !== t && (this._startSnappingEnabled = t, this.updateSashEnablement());
  }
  _endSnappingEnabled = !0;
  get endSnappingEnabled() {
    return this._endSnappingEnabled;
  }
  set endSnappingEnabled(t) {
    this._endSnappingEnabled !== t && (this._endSnappingEnabled = t, this.updateSashEnablement());
  }
  /** Create a new {@link SplitView} instance. */
  constructor(t, n = {}, o, r, i) {
    if (super(), this._orientation = n.orientation ?? yi.Vertical, this._proportionalLayout = n.proportionalLayout ?? !0, this.getSashOrthogonalSize = n.getSashOrthogonalSize, o && (this.onDidChange = o), r && (this.onDidDragStart = r), i && (this.onDidDragEnd = i), this.sashContainer = document.createElement("div"), this.sashContainer.classList.add("sash-container", xl.sashContainer), t.prepend(this.sashContainer), n.descriptor) {
      this.size = n.descriptor.size;
      for (const [a, l] of n.descriptor.views.entries()) {
        const s = l.size, u = l.container, c = l.view;
        this.addView(u, c, s, a, !0);
      }
      this.contentSize = this.viewItems.reduce((a, l) => a + l.size, 0), this.saveProportions();
    }
  }
  addView(t, n, o, r = this.viewItems.length, i) {
    let a;
    typeof o == "number" ? a = o : o.type === "split" ? a = this.getViewSize(o.index) / 2 : o.type === "invisible" ? a = { cachedVisibleSize: o.cachedVisibleSize } : a = n.minimumSize;
    const l = this.orientation === yi.Vertical ? new One(t, n, a) : new kne(t, n, a);
    if (this.viewItems.splice(r, 0, l), this.viewItems.length > 1) {
      const s = this.orientation === yi.Vertical ? new MP(
        this.sashContainer,
        {
          getHorizontalSashTop: (d) => this.getSashPosition(d),
          getHorizontalSashWidth: this.getSashOrthogonalSize
        },
        { orientation: yi.Horizontal }
      ) : new MP(
        this.sashContainer,
        {
          getVerticalSashLeft: (d) => this.getSashPosition(d),
          getVerticalSashHeight: this.getSashOrthogonalSize
        },
        { orientation: yi.Vertical }
      ), u = this.orientation === yi.Vertical ? (d) => ({
        sash: s,
        start: d.startY,
        current: d.currentY
      }) : (d) => ({
        sash: s,
        start: d.startX,
        current: d.currentX
      });
      s.on("start", (d) => {
        this.emit("sashDragStart"), this.onSashStart(u(d));
        const f = this.viewItems.map((p) => p.size);
        this.onDidDragStart?.(f);
      }), s.on("change", (d) => this.onSashChange(u(d))), s.on("end", () => {
        this.emit("sashDragEnd");
        let d = this.sashItems.findIndex((p) => p.sash === s);
        if (d === -1) {
          const p = s.el;
          p && (d = this.sashItems.findIndex((v) => v.sash.el === p));
        }
        this.onSashEnd(d);
        const f = this.viewItems.map((p) => p.size);
        this.onDidDragEnd?.(f);
      }), s.on("reset", () => {
        let d = this.sashItems.findIndex((m) => m.sash === s);
        if (d === -1) {
          const m = s.el;
          m && (d = this.sashItems.findIndex((x) => x.sash.el === m));
        }
        const f = qr(d, -1, -1), p = qr(d + 1, this.viewItems.length), v = this.findFirstSnapIndex(f), g = this.findFirstSnapIndex(p);
        typeof v == "number" && !this.viewItems[v].visible || typeof g == "number" && !this.viewItems[g].visible || this.emit("sashreset", d);
      });
      const c = { sash: s };
      this.sashItems.splice(r - 1, 0, c);
    }
    i || this.relayout(), !i && typeof o != "number" && o.type === "distribute" && this.distributeViewSizes();
  }
  removeView(t, n) {
    if (t < 0 || t >= this.viewItems.length)
      throw new Error("Index out of bounds");
    const o = this.viewItems.splice(t, 1)[0].view;
    if (this.viewItems.length > 0) {
      const r = Math.max(t - 1, 0);
      this.sashItems.splice(r, 1)[0].sash.dispose();
    }
    return this.relayout(), n && n.type === "distribute" && this.distributeViewSizes(), o;
  }
  moveView(t, n, o) {
    const r = this.getViewCachedVisibleSize(n), i = r === void 0 ? this.getViewSize(n) : _E.Invisible(r), a = this.removeView(n);
    this.addView(t, a, i, o);
  }
  getViewCachedVisibleSize(t) {
    if (t < 0 || t >= this.viewItems.length)
      throw new Error("Index out of bounds");
    return this.viewItems[t].cachedVisibleSize;
  }
  layout(t = this.size) {
    if (this.viewItems.length === 0)
      return;
    const n = Math.max(this.size, this.contentSize);
    if (this.size = t, this.proportions)
      for (let o = 0; o < this.viewItems.length; o++) {
        const r = this.viewItems[o];
        r && this.proportions[o] !== void 0 && (r.size = mi(
          Math.round(this.proportions[o] * t),
          r.minimumSize,
          r.maximumSize
        ));
      }
    else {
      const o = qr(0, this.viewItems.length), r = o.filter(
        (a) => this.viewItems[a] && this.viewItems[a].priority === 1
        /* Low */
      ), i = o.filter(
        (a) => this.viewItems[a] && this.viewItems[a].priority === 2
        /* High */
      );
      this.resize(
        this.viewItems.length - 1,
        t - n,
        void 0,
        r,
        i
      );
    }
    this.distributeEmptySpace(), this.layoutViews();
  }
  resizeView(t, n) {
    if (t < 0 || t >= this.viewItems.length)
      return;
    const o = qr(0, this.viewItems.length).filter((l) => l !== t), r = [
      ...o.filter(
        (l) => this.viewItems[l].priority === 1
        /* Low */
      ),
      t
    ], i = o.filter(
      (l) => this.viewItems[l].priority === 2
      /* High */
    ), a = this.viewItems[t];
    n = Math.round(n), n = mi(n, a.minimumSize, Math.min(a.maximumSize, this.size)), a.size = n, this.relayout(r, i);
  }
  resizeViews(t) {
    for (let [n, o] of t.entries()) {
      const r = this.viewItems[n];
      o = Math.round(o), o = mi(
        o,
        r.minimumSize,
        Math.min(r.maximumSize, this.size)
      ), r.size = o;
    }
    this.contentSize = this.viewItems.reduce((n, o) => n + o.size, 0), this.saveProportions(), this.layout(this.size);
  }
  getViewSize(t) {
    return t < 0 || t >= this.viewItems.length ? -1 : this.viewItems[t].size;
  }
  isViewVisible(t) {
    if (t < 0 || t >= this.viewItems.length)
      throw new Error("Index out of bounds");
    return this.viewItems[t].visible;
  }
  setViewVisible(t, n) {
    if (t < 0 || t >= this.viewItems.length)
      throw new Error("Index out of bounds");
    this.viewItems[t].setVisible(n), this.emit("sashchange", t), this.distributeEmptySpace(), this.layoutViews(), this.saveProportions();
  }
  distributeViewSizes() {
    const t = [];
    let n = 0;
    for (const l of this.viewItems)
      l.maximumSize - l.minimumSize > 0 && (t.push(l), n += l.size);
    const o = Math.floor(n / t.length);
    for (const l of t)
      l.size = mi(o, l.minimumSize, l.maximumSize);
    const r = qr(0, this.viewItems.length), i = r.filter(
      (l) => this.viewItems[l].priority === 1
      /* Low */
    ), a = r.filter(
      (l) => this.viewItems[l].priority === 2
      /* High */
    );
    this.relayout(i, a);
  }
  dispose() {
    for (const t of this.sashItems) t.sash.dispose();
    this.sashItems = [], this.viewItems = [], this.sashContainer && this.sashContainer.parentElement && this.sashContainer.remove();
  }
  onSashStart({ sash: t, start: n, current: o }) {
    let r = this.sashItems.findIndex((v) => v.sash === t);
    if (r === -1) {
      const v = t.el;
      v && (r = this.sashItems.findIndex((g) => g.sash.el === v));
    }
    const i = this.viewItems.map((v) => v.size), a = qr(r, -1, -1), l = qr(r + 1, this.viewItems.length), s = this.getMinDelta(a, l, i), u = this.getMaxDelta(a, l, i);
    let c, d;
    const f = this.findFirstSnapIndex(a), p = this.findFirstSnapIndex(l);
    if (typeof f == "number") {
      const v = this.viewItems[f], g = Math.floor(v.minimumSize / 2);
      c = {
        index: f,
        limitDelta: v.visible ? s - g : s + g,
        size: v.size
      };
    }
    if (typeof p == "number") {
      const v = this.viewItems[p], g = Math.floor(v.minimumSize / 2);
      d = {
        index: p,
        limitDelta: v.visible ? u + g : u - g,
        size: v.size
      };
    }
    this.sashDragState = {
      index: r,
      start: n,
      current: o,
      sizes: i,
      minDelta: s,
      maxDelta: u,
      snapBefore: c,
      snapAfter: d
    };
  }
  onSashChange({ current: t }) {
    const { index: n, start: o, sizes: r, minDelta: i, maxDelta: a, snapBefore: l, snapAfter: s } = this.sashDragState, u = t - o;
    this.resize(n, u, r, void 0, void 0, i, a, l, s), this.distributeEmptySpace(), this.layoutViews();
  }
  onSashEnd(t) {
    this.emit("sashchange", t), this.sashDragState = void 0, this.saveProportions();
    const n = this.viewItems.map((o) => o.size);
    this.onDidChange?.(n);
  }
  getMinDelta(t, n, o) {
    const r = t.reduce(
      (a, l) => a + (this.viewItems[l].minimumSize - o[l]),
      0
    ), i = n.reduce(
      (a, l) => a + (o[l] - this.viewItems[l].maximumSize),
      0
    );
    return Math.max(r, i);
  }
  getMaxDelta(t, n, o) {
    const r = t.reduce(
      (a, l) => a + (this.viewItems[l].maximumSize - o[l]),
      0
    ), i = n.reduce(
      (a, l) => a + (o[l] - this.viewItems[l].minimumSize),
      0
    );
    return Math.min(i, r);
  }
  resize(t, n, o, r, i, a = Number.NEGATIVE_INFINITY, l = Number.POSITIVE_INFINITY, s, u) {
    if (t < 0 || t >= this.viewItems.length || this.viewItems.length === 0)
      return 0;
    const c = qr(t, -1, -1), d = qr(t + 1, this.viewItems.length);
    if (i)
      for (const _ of i)
        TP(c, _), TP(d, _);
    if (r)
      for (const _ of r)
        Jv(c, _), Jv(d, _);
    const f = o ?? this.viewItems.map((_) => _?.size || 0), p = c.map((_) => this.viewItems[_]), v = c.map((_) => f[_]), g = d.map((_) => this.viewItems[_]), m = d.map((_) => f[_]), x = c.reduce(
      (_, M) => _ + (this.viewItems[M].minimumSize - f[M]),
      0
    ), S = c.reduce(
      (_, M) => _ + (this.viewItems[M].maximumSize - f[M]),
      0
    ), C = d.length === 0 ? Number.POSITIVE_INFINITY : d.reduce(
      (_, M) => _ + (f[M] - this.viewItems[M].minimumSize),
      0
    ), P = d.length === 0 ? Number.NEGATIVE_INFINITY : d.reduce(
      (_, M) => _ + (f[M] - this.viewItems[M].maximumSize),
      0
    ), $ = Math.max(x, P, a), I = Math.min(C, S, l);
    let w = !1;
    if (s) {
      const _ = this.viewItems[s.index], M = n >= s.limitDelta;
      w = M !== _.visible, _.setVisible(M, s.size);
    }
    if (!w && u) {
      const _ = this.viewItems[u.index], M = n < u.limitDelta;
      w = M !== _.visible, _.setVisible(M, u.size);
    }
    if (w)
      return this.resize(
        t,
        n,
        o,
        r,
        i,
        a,
        l
      );
    n = mi(n, $, I);
    for (let _ = 0, M = n; _ < p.length; _++) {
      const N = p[_];
      if (!N)
        continue;
      const A = mi(
        v[_] + M,
        N.minimumSize,
        N.maximumSize
      ), H = A - v[_];
      M -= H, N.size = A;
    }
    for (let _ = 0, M = n; _ < g.length; _++) {
      const N = g[_];
      if (!N)
        continue;
      const A = mi(
        m[_] - M,
        N.minimumSize,
        N.maximumSize
      ), H = A - m[_];
      M += H, N.size = A;
    }
    return n;
  }
  distributeEmptySpace(t) {
    if (this.viewItems.length === 0)
      return;
    const n = this.viewItems.reduce((u, c) => u + c.size, 0);
    let o = this.size - n;
    const r = qr(0, this.viewItems.length), i = [], a = r.filter(
      (u) => this.viewItems[u].priority === 1
      /* Low */
    ), l = r.filter(
      (u) => this.viewItems[u].priority === 0
      /* Normal */
    ), s = r.filter(
      (u) => this.viewItems[u].priority === 2
      /* High */
    );
    i.push(
      ...s,
      ...l,
      ...a
    ), typeof t == "number" && Jv(i, t);
    for (let u = 0; o !== 0 && u < i.length; u++) {
      const c = this.viewItems[i[u]];
      if (!c)
        continue;
      const d = mi(
        c.size + o,
        c.minimumSize,
        c.maximumSize
      ), f = d - c.size;
      o -= f, c.size = d;
    }
    this.contentSize = this.viewItems.reduce((u, c) => u + c.size, 0);
  }
  layoutViews() {
    this.contentSize = this.viewItems.reduce((n, o) => n + o.size, 0);
    let t = 0;
    for (const n of this.viewItems)
      n && (n.layout(t), t += n.size);
    for (const n of this.sashItems) n.sash.layout();
    this.updateSashEnablement();
  }
  saveProportions() {
    this.proportionalLayout && this.contentSize > 0 && (this.proportions = this.viewItems.map((t) => t.size / this.contentSize));
  }
  relayout(t, n) {
    const o = this.viewItems.reduce((r, i) => r + i.size, 0);
    this.resize(
      this.viewItems.length - 1,
      this.size - o,
      void 0,
      t,
      n,
      Number.NEGATIVE_INFINITY,
      Number.POSITIVE_INFINITY
    ), this.distributeEmptySpace(), this.layoutViews(), this.saveProportions();
  }
  getSashPosition(t) {
    let n = -1;
    for (let r = 0; r < this.sashItems.length; r++)
      if (this.sashItems[r].sash === t) {
        n = r;
        break;
      }
    if (n === -1) {
      const r = t.el || t;
      if (r) {
        for (let i = 0; i < this.sashItems.length; i++)
          if ((this.sashItems[i].sash.el || this.sashItems[i].sash) === r) {
            n = i;
            break;
          }
      }
    }
    if (n === -1)
      return 0;
    let o = 0;
    for (let r = 0; r <= n; r++)
      this.viewItems[r] && (o += this.viewItems[r].size);
    return o;
  }
  findFirstSnapIndex(t) {
    for (const n of t) {
      const o = this.viewItems[n];
      if (o.visible && o.snap)
        return n;
    }
    for (const n of t) {
      const o = this.viewItems[n];
      if (o.visible && o.maximumSize - o.minimumSize > 0)
        return;
      if (!o.visible && o.snap)
        return n;
    }
  }
  updateSashEnablement() {
    let t = !1;
    const n = this.viewItems.map(
      (s) => t = s.size - s.minimumSize > 0 || t
    );
    t = !1;
    const o = this.viewItems.map(
      (s) => t = s.maximumSize - s.size > 0 || t
    ), r = [...this.viewItems].toReversed();
    t = !1;
    const i = r.map((s) => t = s.size - s.minimumSize > 0 || t).toReversed();
    t = !1;
    const a = r.map((s) => t = s.maximumSize - s.size > 0 || t).toReversed();
    let l = 0;
    for (let s = 0; s < this.sashItems.length; s++) {
      const { sash: u } = this.sashItems[s], c = this.viewItems[s];
      l += c.size;
      const d = !(n[s] && a[s + 1]), f = !(o[s] && i[s + 1]);
      if (d && f) {
        const p = qr(s, -1, -1), v = qr(s + 1, this.viewItems.length), g = this.findFirstSnapIndex(p), m = this.findFirstSnapIndex(v), x = typeof g == "number" && !this.viewItems[g].visible, S = typeof m == "number" && !this.viewItems[m].visible;
        x && i[s] && (l > 0 || this.startSnappingEnabled) ? u.state = ss.Minimum : S && n[s] && (l < this.contentSize || this.endSnappingEnabled) ? u.state = ss.Maximum : u.state = ss.Disabled;
      } else d && !f ? u.state = ss.Minimum : !d && f ? u.state = ss.Maximum : u.state = ss.Enabled;
    }
  }
}
class du {
  size;
  constructor(t) {
    this.size = t;
  }
  getPreferredSize() {
    return this.size;
  }
}
class EP {
  proportion;
  layoutService;
  constructor(t, n) {
    this.proportion = t, this.layoutService = n;
  }
  getPreferredSize() {
    return this.proportion * this.layoutService.getSize();
  }
}
class Hf {
  getPreferredSize() {
  }
}
class DP {
  minimumSize = 0;
  maximumSize = Number.POSITIVE_INFINITY;
  element;
  priority;
  snap;
  layoutService;
  layoutStrategy;
  get preferredSize() {
    return this.layoutStrategy.getPreferredSize();
  }
  set preferredSize(t) {
    if (typeof t == "number")
      this.layoutStrategy = new du(t);
    else if (typeof t == "string") {
      const n = t.trim();
      if (Lf(n, "%")) {
        const o = Number(n.slice(0, -1)) / 100;
        this.layoutStrategy = new EP(
          o,
          this.layoutService
        );
      } else if (Lf(n, "px")) {
        const o = Number(n.slice(0, -2));
        this.layoutStrategy = new du(o);
      } else if (typeof Number.parseFloat(n) == "number") {
        const o = Number.parseFloat(n);
        this.layoutStrategy = new du(o);
      } else
        this.layoutStrategy = new Hf();
    } else
      this.layoutStrategy = new Hf();
  }
  constructor(t, n) {
    if (this.layoutService = t, this.element = n.element, this.snap = typeof n.snap == "boolean" ? n.snap : !1, this.minimumSize = this.snap ? 0 : typeof n.minimumSize == "number" ? n.minimumSize : 30, this.maximumSize = typeof n.maximumSize == "number" ? n.maximumSize : Number.POSITIVE_INFINITY, typeof n.preferredSize == "number")
      this.layoutStrategy = new du(n.preferredSize);
    else if (typeof n.preferredSize == "string") {
      const o = n.preferredSize.trim();
      if (Lf(o, "%")) {
        const r = Number(o.slice(0, -1)) / 100;
        this.layoutStrategy = new EP(
          r,
          this.layoutService
        );
      } else if (Lf(o, "px")) {
        const r = Number(o.slice(0, -2));
        this.layoutStrategy = new du(r);
      } else if (typeof Number.parseFloat(o) == "number") {
        const r = Number.parseFloat(o);
        this.layoutStrategy = new du(r);
      } else
        this.layoutStrategy = new Hf();
    } else
      this.layoutStrategy = new Hf();
    this.priority = n.priority ?? eh.Normal;
  }
  layout(t) {
  }
}
function _ne(e) {
  const t = mi(e, 4, 20), n = mi(e, 1, 8);
  document.documentElement.style.setProperty("--sash-size", `${t}px`), document.documentElement.style.setProperty(
    "--sash-hover-size",
    `${n}px`
  ), Pne(t);
}
const Tne = ["id"], Mne = /* @__PURE__ */ be({
  __name: "Allotment",
  props: {
    className: { default: "" },
    defaultSizes: {},
    id: {},
    maxSize: { default: 1 / 0 },
    minSize: { default: 30 },
    proportionalLayout: { type: Boolean, default: !0 },
    separator: { type: Boolean, default: !0 },
    snap: { type: Boolean, default: !1 },
    sizes: {},
    vertical: { type: Boolean, default: !1 }
  },
  emits: ["change", "reset", "visibleChange", "dragStart", "dragEnd"],
  setup(e, { expose: t, emit: n }) {
    const o = e, r = n, i = ce(), a = ce(), l = ce(!1), s = ce(null), u = Pn(/* @__PURE__ */ new Map()), c = Pn(/* @__PURE__ */ new Map()), d = ce(new fne()), f = ce([]), p = ce([]), v = ce(null), g = VE();
    Ft("allotment", {
      registerPane: (w, _, M) => {
        u.set(w, _), c.set(w, M), l.value && Yt(() => {
          $();
        });
      },
      unregisterPane: (w) => {
        u.delete(w), c.delete(w);
      },
      registerNonPane: (w, _) => {
        u.set(w, _), c.set(w, {});
      }
    });
    const m = E(() => {
      const w = g.default?.({}) || [], _ = (M) => {
        const N = [];
        for (const A of M)
          Array.isArray(A.children) ? N.push(..._(A.children)) : A.type && N.push(A);
        return N;
      };
      return _(w);
    });
    function x(w) {
      const _ = f.value?.[w];
      return typeof _?.preferredSize != "number" ? !1 : (s.value?.resizeView(w, Math.round(_.preferredSize)), !0);
    }
    function S() {
      if (r("reset"), !!s.value) {
        s.value.distributeViewSizes();
        for (let w = 0; w < f.value.length; w++)
          x(w);
      }
    }
    function C(w) {
      s.value?.resizeViews(w);
    }
    t({
      reset: S,
      resize: C
    });
    function P() {
      if (!i.value)
        return;
      let w = !0;
      o.defaultSizes && u.size !== o.defaultSizes.length && (w = !1, console.warn(
        `Expected ${o.defaultSizes.length} children based on defaultSizes but found ${u.size}`
      ));
      const _ = o.vertical ? i.value.clientHeight : i.value.clientWidth;
      d.value.setSize(_);
      let M = o.defaultSizes;
      if (!o.defaultSizes && u.size > 0) {
        const A = Math.floor(_ / u.size);
        M = Array.from({ length: u.size }, () => A), M[M.length - 1] += _ - A * u.size, w = !0, p.value = m.value.map(
          (H) => H.key
        );
      } else if (o.defaultSizes) {
        const A = o.defaultSizes.reduce((H, B) => H + B, 0);
        if (_ > 0 && A > 0 && Math.abs(_ - A) > 1) {
          const H = _ / A;
          M = o.defaultSizes.map((B) => Math.round(B * H));
        }
        p.value = m.value.map(
          (H) => H.key
        );
      }
      f.value = [];
      const N = {
        orientation: o.vertical ? yi.Vertical : yi.Horizontal,
        proportionalLayout: o.proportionalLayout,
        ...w && M && {
          descriptor: {
            size: M.reduce((A, H) => A + H, 0),
            views: M.map((A, H) => {
              const B = [...u.keys()][H], F = c.get(B), R = new DP(d.value, {
                element: document.createElement("div"),
                minimumSize: F?.minSize ?? o.minSize,
                maximumSize: F?.maxSize ?? o.maxSize,
                priority: F?.priority ?? eh.Normal,
                ...F?.preferredSize && {
                  preferredSize: F?.preferredSize
                },
                snap: F?.snap ?? o.snap
              });
              return f.value.push(R), {
                container: [...u.values()][H],
                size: A,
                view: R
              };
            })
          }
        }
      };
      if (s.value = new Ine(
        i.value,
        N,
        (A) => r("change", A),
        (A) => r("dragStart", A),
        (A) => r("dragEnd", A)
      ), s.value.on("sashDragStart", () => {
        i.value?.classList.add("split-view-sash-dragging");
      }), s.value.on("sashDragEnd", () => {
        i.value?.classList.remove("split-view-sash-dragging");
      }), s.value.on("sashchange", (A) => {
        if (s.value) {
          const H = m.value.map((B) => B.key);
          for (const [B, F] of H.entries()) {
            const R = c.get(F);
            R?.visible !== void 0 && R.visible !== s.value.isViewVisible(B) && r("visibleChange", B, s.value.isViewVisible(B));
          }
        }
      }), s.value?.on("sashreset", (A) => {
        r("reset"), !x(A) && (x(A + 1) || s.value?.distributeViewSizes());
      }), _ > 0) {
        s.value.layout(_);
        for (let A = 0; A < f.value.length; A++)
          x(A);
      }
    }
    function $() {
      if (!l.value || !s.value)
        return;
      const w = m.value.map((H) => H.key), _ = [...p.value], M = w.filter((H) => !p.value.includes(H)), N = w.filter((H) => p.value.includes(H)), A = p.value.map((H, B) => ({ key: H, index: B, shouldExit: !w.includes(H) }));
      for (let H = A.length - 1; H >= 0; H--)
        A[H].shouldExit && (s.value.removeView(A[H].index), _.splice(A[H].index, 1), f.value.splice(A[H].index, 1));
      for (const H of M) {
        const B = c.get(H), F = new DP(d.value, {
          element: document.createElement("div"),
          minimumSize: B?.minSize ?? o.minSize,
          maximumSize: B?.maxSize ?? o.maxSize,
          priority: B?.priority ?? eh.Normal,
          ...B?.preferredSize && {
            preferredSize: B?.preferredSize
          },
          snap: B?.snap ?? o.snap
        }), R = w.indexOf(H);
        s.value.addView(
          u.get(H),
          F,
          _E.Distribute,
          R
        ), _.splice(R, 0, H), f.value.splice(R, 0, F);
      }
      for (; !nne(w, _); )
        for (const [H, B] of w.entries()) {
          const F = _.indexOf(B);
          if (F !== H) {
            s.value.moveView(
              u.get(B),
              F,
              H
            );
            const R = _[F];
            _.splice(F, 1), _.splice(H, 0, R);
            const X = f.value[F];
            f.value.splice(F, 1), f.value.splice(H, 0, X);
            break;
          }
        }
      for (const H of [...M, ...N]) {
        const B = c.get(H), F = w.indexOf(H);
        if (B) {
          B.visible !== void 0 && s.value.isViewVisible(F) !== B.visible && s.value.setViewVisible(F, B.visible), B.preferredSize !== void 0 && f.value[F].preferredSize !== B.preferredSize && (f.value[F].preferredSize = B.preferredSize, x(F));
          let R = !1;
          B.minSize !== void 0 && f.value[F].minimumSize !== B.minSize && (f.value[F].minimumSize = B.minSize, R = !0), B.maxSize !== void 0 && f.value[F].maximumSize !== B.maxSize && (f.value[F].maximumSize = B.maxSize, R = !0), R && s.value.layout();
        }
      }
      (M.length > 0 || A.some((H) => H.shouldExit)) && (p.value = w);
    }
    function I() {
      i.value && (v.value = new ResizeObserver(() => {
        if (i.value) {
          const w = o.vertical ? i.value.clientHeight : i.value.clientWidth;
          w > 0 && (s.value?.layout(w), d.value.setSize(w), l.value || (l.value = !0));
        }
      }), v.value.observe(i.value));
    }
    return Nt(() => {
      OE && _ne(20), Yt(() => {
        P(), I(), setTimeout(() => {
          if (i.value && s.value) {
            const w = o.vertical ? i.value.clientHeight : i.value.clientWidth;
            w > 0 && s.value.layout(w);
          }
        }, 50);
      });
    }), ke(m, () => {
      Yt(() => {
        $();
      });
    }, { deep: !0 }), ke(() => o.vertical, (w) => {
      s.value && (s.value.orientation = w ? yi.Vertical : yi.Horizontal, s.value.layout());
    }), ke(() => o.proportionalLayout, (w) => {
      s.value && (s.value.proportionalLayout = w);
    }), jo(() => {
      v.value?.disconnect(), s.value?.dispose();
    }), (w, _) => (ne(), xe("div", {
      id: w.id,
      ref_key: "containerRef",
      ref: i,
      class: Pt(["split-view", [
        w.vertical ? "split-view-vertical" : "split-view-horizontal",
        { "split-view-separator-border": w.separator },
        T(xl).splitView,
        w.vertical ? T(xl).vertical : T(xl).horizontal,
        { [T(xl).separatorBorder]: w.separator },
        w.className
      ]])
    }, [
      L("div", {
        ref_key: "splitViewContainerRef",
        ref: a,
        class: Pt(["split-view-container", [T(xl).splitViewContainer]])
      }, [
        Ra(w.$slots, "default", {}, void 0, !0)
      ], 2)
    ], 10, Tne));
  }
}), Ene = (e, t) => {
  const n = e.__vccOpts || e;
  for (const [o, r] of t)
    n[o] = r;
  return n;
}, AP = /* @__PURE__ */ Ene(Mne, [["__scopeId", "data-v-e77a1ca4"]]), Vf = /* @__PURE__ */ be({
  __name: "Pane",
  props: {
    className: { default: "" },
    maxSize: {},
    minSize: {},
    snap: { type: Boolean, default: !1 },
    preferredSize: {},
    priority: {},
    visible: { type: Boolean, default: !0 }
  },
  setup(e, { expose: t }) {
    const n = e, o = ce(), r = fr(), i = zt("allotment");
    function a() {
      return r?.vnode.key || `pane-${Math.random().toString(36).slice(2, 11)}`;
    }
    const l = a();
    return Nt(() => {
      i && o.value && i.registerPane(l, o.value, {
        minSize: n.minSize,
        maxSize: n.maxSize,
        preferredSize: n.preferredSize,
        priority: n.priority,
        snap: n.snap,
        visible: n.visible
      });
    }), ke(() => n, (s) => {
      i && o.value && i.registerPane(l, o.value, {
        minSize: s.minSize,
        maxSize: s.maxSize,
        preferredSize: s.preferredSize,
        priority: s.priority,
        snap: s.snap,
        visible: s.visible
      });
    }, { deep: !0 }), jo(() => {
      i && i.unregisterPane(l);
    }), t({
      element: o
    }), (s, u) => (ne(), xe("div", {
      ref_key: "paneRef",
      ref: o,
      class: Pt(["split-view-view", [
        s.visible && "split-view-view-visible",
        T(xl).splitViewView,
        s.className
      ]])
    }, [
      Ra(s.$slots, "default")
    ], 2));
  }
}), Dne = { class: "flex flex-col gap-3" }, Ane = { class: "text-xs text-secondary mb-1" }, Nne = { class: "text-xs text-secondary mb-1" }, Rne = { class: "text-xs text-secondary mb-1" }, zne = { class: "text-xs text-secondary mb-1" }, Fne = { class: "text-xs text-secondary mb-1" }, Bne = { class: "text-xs text-secondary mb-1" }, Lne = ["value"], Hne = { class: "text-xs text-secondary mb-1" }, Vne = { class: "text-xs text-secondary mb-1" }, jne = { class: "text-xs text-secondary mb-1" }, Wne = { class: "text-xs text-secondary mb-1" }, Kne = { class: "text-xs text-secondary mb-1" }, qne = { class: "text-xs text-secondary mb-1" }, Yne = ["value"], Gne = { class: "text-xs text-secondary mb-1" }, Une = { class: "text-xs text-secondary mb-1" }, Xne = { key: 0 }, Qne = { class: "text-xs text-secondary mb-1" }, Zne = ["value"], Jne = { class: "text-xs text-secondary mb-1" }, eoe = /* @__PURE__ */ be({
  __name: "AxesSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = sn();
    return (n, o) => {
      const r = yn("a-radio-button"), i = yn("a-radio-group"), a = yn("a-switch");
      return ne(), xe("div", Dne, [
        L("div", null, [
          L("div", Ane, oe(T(t)("config.field.axisPlacement")), 1),
          h(i, {
            size: "small",
            value: e.panel.axisPlacement ?? "left",
            onChange: o[0] || (o[0] = (l) => e.onChange({ axisPlacement: l.target.value }))
          }, {
            default: he(() => [
              h(r, { value: "left" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.placement.left")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "right" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.placement.right")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "hidden" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.placement.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        L("div", null, [
          L("div", Nne, oe(T(t)("config.field.axisLabel")), 1),
          h(T(kt), {
            size: "small",
            value: e.panel.axisLabel ?? "",
            placeholder: T(t)("config.axis.label.placeholder"),
            onChange: o[1] || (o[1] = (l) => e.onChange({ axisLabel: l.target.value }))
          }, null, 8, ["value", "placeholder"])
        ]),
        L("div", null, [
          L("div", Rne, oe(T(t)("config.field.axisName")), 1),
          h(T(kt), {
            size: "small",
            value: e.panel.axisName ?? "",
            placeholder: T(t)("config.axis.name.placeholder"),
            onChange: o[2] || (o[2] = (l) => e.onChange({ axisName: l.target.value }))
          }, null, 8, ["value", "placeholder"])
        ]),
        L("div", null, [
          L("div", zne, oe(T(t)("config.field.axisWidth")), 1),
          h(T(To), {
            size: "small",
            value: e.panel.axisWidth ?? void 0,
            min: 20,
            max: 300,
            style: { width: "100%" },
            onChange: o[3] || (o[3] = (l) => e.onChange({ axisWidth: l }))
          }, null, 8, ["value"])
        ]),
        L("div", null, [
          L("div", Fne, oe(T(t)("config.field.showGridLines")), 1),
          h(i, {
            size: "small",
            value: e.panel.showGridLines ?? "all",
            onChange: o[4] || (o[4] = (l) => e.onChange({ showGridLines: l.target.value }))
          }, {
            default: he(() => [
              h(r, { value: "all" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.grid.all")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "x" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.grid.x")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "y" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.grid.y")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "hidden" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.grid.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        L("div", null, [
          L("div", Bne, oe(T(t)("config.field.gridColor")), 1),
          L("input", {
            type: "color",
            value: e.panel.gridColor ?? "#e8e8e8",
            onInput: o[5] || (o[5] = (l) => e.onChange({ gridColor: l.target.value }))
          }, null, 40, Lne)
        ]),
        L("div", null, [
          L("div", Hne, oe(T(t)("config.field.scaleDistribution")), 1),
          h(i, {
            size: "small",
            value: e.panel.scaleDistribution ?? "linear",
            onChange: o[6] || (o[6] = (l) => e.onChange({ scaleDistribution: l.target.value }))
          }, {
            default: he(() => [
              h(r, { value: "linear" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.scale.linear")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "logarithmic" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.scale.logarithmic")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        L("div", null, [
          L("div", Vne, oe(T(t)("config.field.softMin")), 1),
          h(T(To), {
            size: "small",
            value: e.panel.softMin ?? void 0,
            style: { width: "100%" },
            onChange: o[7] || (o[7] = (l) => e.onChange({ softMin: l }))
          }, null, 8, ["value"])
        ]),
        L("div", null, [
          L("div", jne, oe(T(t)("config.field.softMax")), 1),
          h(T(To), {
            size: "small",
            value: e.panel.softMax ?? void 0,
            style: { width: "100%" },
            onChange: o[8] || (o[8] = (l) => e.onChange({ softMax: l }))
          }, null, 8, ["value"])
        ]),
        L("div", null, [
          L("div", Wne, oe(T(t)("config.field.centeredZero")), 1),
          h(a, {
            size: "small",
            checked: e.panel.centeredZero,
            onChange: o[9] || (o[9] = (l) => e.onChange({ centeredZero: l }))
          }, null, 8, ["checked"])
        ]),
        L("div", null, [
          L("div", Kne, oe(T(t)("config.field.axisLine")), 1),
          h(i, {
            size: "small",
            value: e.panel.axisLabel ?? "all",
            onChange: o[10] || (o[10] = (l) => e.onChange({ axisLabel: l.target.value }))
          }, {
            default: he(() => [
              h(r, { value: "all" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.grid.all")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "x" }, {
                default: he(() => [...o[16] || (o[16] = [
                  Le(" X ", -1)
                ])]),
                _: 1
              }),
              h(r, { value: "y" }, {
                default: he(() => [...o[17] || (o[17] = [
                  Le(" Y ", -1)
                ])]),
                _: 1
              }),
              h(r, { value: "hidden" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.grid.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        L("div", null, [
          L("div", qne, oe(T(t)("config.field.axisLineColor")), 1),
          L("input", {
            type: "color",
            value: e.panel.axisLabelColor ?? "#666666",
            onInput: o[11] || (o[11] = (l) => e.onChange({ axisLabelColor: l.target.value }))
          }, null, 40, Yne)
        ]),
        L("div", null, [
          L("div", Gne, oe(T(t)("config.field.axisTickShow")), 1),
          h(i, {
            size: "small",
            value: e.panel.axisTick ?? "hidden",
            onChange: o[12] || (o[12] = (l) => e.onChange({ axisTick: l.target.value }))
          }, {
            default: he(() => [
              h(r, { value: "all" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.grid.all")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "x" }, {
                default: he(() => [...o[18] || (o[18] = [
                  Le(" X ", -1)
                ])]),
                _: 1
              }),
              h(r, { value: "y" }, {
                default: he(() => [...o[19] || (o[19] = [
                  Le(" Y ", -1)
                ])]),
                _: 1
              }),
              h(r, { value: "hidden" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.grid.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        L("div", null, [
          L("div", Une, oe(T(t)("config.field.axisBorder")), 1),
          h(i, {
            size: "small",
            value: e.panel.axisBorder ?? "hidden",
            onChange: o[13] || (o[13] = (l) => e.onChange({ axisBorder: l.target.value }))
          }, {
            default: he(() => [
              h(r, { value: "all" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.grid.all")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "x" }, {
                default: he(() => [...o[20] || (o[20] = [
                  Le(" X ", -1)
                ])]),
                _: 1
              }),
              h(r, { value: "y" }, {
                default: he(() => [...o[21] || (o[21] = [
                  Le(" Y ", -1)
                ])]),
                _: 1
              }),
              h(r, { value: "hidden" }, {
                default: he(() => [
                  Le(oe(T(t)("config.axis.grid.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        e.panel.axisBorder && e.panel.axisBorder !== "hidden" ? (ne(), xe("div", Xne, [
          L("div", Qne, oe(T(t)("config.field.axisBorderColor")), 1),
          L("input", {
            type: "color",
            value: e.panel.axisBorderColor ?? "#cccccc",
            onInput: o[14] || (o[14] = (l) => e.onChange({ axisBorderColor: l.target.value }))
          }, null, 40, Zne)
        ])) : rt("", !0),
        L("div", null, [
          L("div", Jne, oe(T(t)("config.field.logScale")), 1),
          h(a, {
            size: "small",
            checked: e.panel.scaleDistribution === "logarithmic",
            onChange: o[15] || (o[15] = (l) => e.onChange({ scaleDistribution: l ? "logarithmic" : "linear" }))
          }, null, 8, ["checked"])
        ])
      ]);
    };
  }
}), toe = { class: "flex flex-col gap-3" }, noe = { class: "text-xs text-secondary mb-1" }, ooe = { class: "text-xs text-secondary mb-1" }, roe = { class: "text-xs text-secondary mb-1" }, ioe = { class: "text-xs text-secondary mb-1" }, aoe = { class: "text-xs text-secondary mb-1" }, loe = { class: "text-xs text-secondary mb-1" }, soe = { class: "text-xs text-secondary mb-1" }, uoe = /* @__PURE__ */ be({
  __name: "BarStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = sn();
    return (n, o) => {
      const r = yn("a-radio-button"), i = yn("a-radio-group"), a = yn("a-switch"), l = yn("a-input-number");
      return ne(), xe("div", toe, [
        L("div", null, [
          L("div", noe, oe(T(t)("config.field.barShowValues")), 1),
          h(i, {
            size: "small",
            value: e.panel.barShowValues ?? "auto",
            onChange: o[0] || (o[0] = (s) => e.onChange({ barShowValues: s.target.value }))
          }, {
            default: he(() => [
              h(r, { value: "auto" }, {
                default: he(() => [
                  Le(oe(T(t)("config.showValues.auto")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "always" }, {
                default: he(() => [
                  Le(oe(T(t)("config.showValues.always")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "never" }, {
                default: he(() => [
                  Le(oe(T(t)("config.showValues.never")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        L("div", null, [
          L("div", ooe, oe(T(t)("config.field.barGroupWidth")), 1),
          h(T(br), {
            min: 0.1,
            max: 1,
            step: 0.05,
            value: e.panel.barGroupWidth ?? 0.7,
            onChange: o[1] || (o[1] = (s) => e.onChange({ barGroupWidth: s }))
          }, null, 8, ["value"])
        ]),
        L("div", null, [
          L("div", roe, oe(T(t)("config.field.barWidth")), 1),
          h(T(br), {
            min: 0.1,
            max: 1,
            step: 0.05,
            value: e.panel.barWidth ?? 1,
            onChange: o[2] || (o[2] = (s) => e.onChange({ barWidth: s }))
          }, null, 8, ["value"])
        ]),
        L("div", null, [
          L("div", ioe, oe(T(t)("config.field.stacked")), 1),
          h(a, {
            size: "small",
            checked: e.panel.stacked,
            onChange: o[3] || (o[3] = (s) => e.onChange({ stacked: s }))
          }, null, 8, ["checked"])
        ]),
        L("div", null, [
          L("div", aoe, oe(T(t)("config.field.lineWidth")), 1),
          h(l, {
            size: "small",
            min: 0,
            max: 10,
            value: e.panel.lineWidth,
            style: { width: "100%" },
            onChange: o[4] || (o[4] = (s) => e.onChange({ lineWidth: s ?? 1 }))
          }, null, 8, ["value"])
        ]),
        L("div", null, [
          L("div", loe, oe(T(t)("config.field.fillOpacity")), 1),
          h(T(br), {
            min: 0,
            max: 100,
            value: e.panel.fillOpacity,
            onChange: o[5] || (o[5] = (s) => e.onChange({ fillOpacity: s }))
          }, null, 8, ["value"])
        ]),
        L("div", null, [
          L("div", soe, oe(T(t)("config.field.xTickRotation")), 1),
          h(a, {
            size: "small",
            checked: e.panel.barXTickRotation ?? !1,
            onChange: o[6] || (o[6] = (s) => e.onChange({ barXTickRotation: s }))
          }, null, 8, ["checked"])
        ])
      ]);
    };
  }
}), coe = { class: "flex flex-col gap-3" }, doe = { class: "text-xs text-secondary mb-1" }, foe = { class: "text-xs text-secondary mb-1" }, poe = { class: "text-xs text-secondary mb-1" }, hoe = ["value"], goe = { class: "text-xs text-secondary mb-1" }, voe = { class: "text-xs text-secondary mb-1" }, moe = { class: "text-xs text-secondary mb-1" }, boe = { class: "text-xs text-secondary mb-1" }, yoe = { class: "text-xs text-secondary mb-1" }, xoe = { key: 0 }, woe = { class: "text-xs text-secondary mb-1" }, Soe = ["value"], Coe = { class: "text-xs text-secondary mb-1" }, $oe = { class: "text-xs text-secondary mb-1" }, Poe = { class: "text-xs text-secondary mb-1" }, Ooe = { class: "text-xs text-secondary mb-1" }, koe = { class: "text-xs text-secondary mb-1" }, Ioe = { class: "text-xs text-secondary mb-1" }, _oe = /* @__PURE__ */ be({
  __name: "GaugeStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = sn();
    return (n, o) => {
      const r = yn("a-switch"), i = yn("a-radio-button"), a = yn("a-radio-group");
      return ne(), xe("div", coe, [
        L("div", null, [
          L("div", doe, oe(T(t)("config.gauge.fillWidth")), 1),
          h(T(br), {
            min: 1,
            max: 100,
            value: e.panel.gaugeFillWidth ?? T(Gn).fillWidth,
            onChange: o[0] || (o[0] = (l) => e.onChange({ gaugeFillWidth: l }))
          }, null, 8, ["value"])
        ]),
        L("div", null, [
          L("div", foe, oe(T(t)("config.gauge.trackWidth")), 1),
          h(T(br), {
            min: 1,
            max: 100,
            value: e.panel.gaugeTrackWidth ?? T(Gn).trackWidth,
            onChange: o[1] || (o[1] = (l) => e.onChange({ gaugeTrackWidth: l }))
          }, null, 8, ["value"])
        ]),
        L("div", null, [
          L("div", poe, oe(T(t)("config.gauge.trackColor")), 1),
          L("input", {
            type: "color",
            value: e.panel.gaugeTrackColor ?? "#222222",
            onInput: o[2] || (o[2] = (l) => e.onChange({ gaugeTrackColor: l.target.value }))
          }, null, 40, hoe)
        ]),
        L("div", null, [
          L("div", goe, oe(T(t)("config.gauge.arcSweep")), 1),
          h(T(br), {
            min: 30,
            max: 360,
            value: e.panel.sweepAngle ?? T(Gn).sweepAngle,
            onChange: o[3] || (o[3] = (l) => e.onChange({ sweepAngle: l }))
          }, null, 8, ["value"])
        ]),
        L("div", null, [
          L("div", voe, oe(T(t)("config.gauge.paddingX")), 1),
          h(T(br), {
            min: 0,
            max: 0.5,
            step: 0.01,
            value: e.panel.gaugePaddingX ?? 0.05,
            onChange: o[4] || (o[4] = (l) => e.onChange({ gaugePaddingX: l }))
          }, null, 8, ["value"])
        ]),
        L("div", null, [
          L("div", moe, oe(T(t)("config.gauge.paddingY")), 1),
          h(T(br), {
            min: 0,
            max: 0.5,
            step: 0.01,
            value: e.panel.gaugePaddingY ?? 0.1,
            onChange: o[5] || (o[5] = (l) => e.onChange({ gaugePaddingY: l }))
          }, null, 8, ["value"])
        ]),
        L("div", null, [
          L("div", boe, oe(T(t)("config.gauge.capRound")), 1),
          h(r, {
            size: "small",
            checked: e.panel.gaugeCapRound ?? T(Gn).capRound,
            onChange: o[6] || (o[6] = (l) => e.onChange({ gaugeCapRound: l }))
          }, null, 8, ["checked"])
        ]),
        L("div", null, [
          L("div", yoe, oe(T(t)("config.gauge.valueVisible")), 1),
          h(r, {
            size: "small",
            checked: e.panel.gaugeValueVisible ?? T(Gn).valueVisible,
            onChange: o[7] || (o[7] = (l) => e.onChange({ gaugeValueVisible: l }))
          }, null, 8, ["checked"])
        ]),
        e.panel.gaugeValueVisible !== !1 ? (ne(), xe("div", xoe, [
          L("div", woe, oe(T(t)("config.gauge.valueColor")), 1),
          L("input", {
            type: "color",
            value: e.panel.gaugeValueColor ?? "#ffffff",
            onInput: o[8] || (o[8] = (l) => e.onChange({ gaugeValueColor: l.target.value }))
          }, null, 40, Soe)
        ])) : rt("", !0),
        L("div", null, [
          L("div", Coe, oe(T(t)("config.gauge.valueSize")), 1),
          h(T(To), {
            size: "small",
            min: 8,
            max: 80,
            value: e.panel.gaugeValueSize ?? T(Gn).valueSize,
            suffix: "px",
            style: { width: "100%" },
            onChange: o[9] || (o[9] = (l) => e.onChange({ gaugeValueSize: l ?? T(Gn).valueSize }))
          }, null, 8, ["value"])
        ]),
        L("div", null, [
          L("div", $oe, oe(T(t)("config.gauge.valueOffsetY")), 1),
          h(T(To), {
            size: "small",
            min: -50,
            max: 50,
            value: e.panel.gaugeValueOffsetY ?? T(Gn).valueOffsetY,
            suffix: "px",
            style: { width: "100%" },
            onChange: o[10] || (o[10] = (l) => e.onChange({ gaugeValueOffsetY: l ?? T(Gn).valueOffsetY }))
          }, null, 8, ["value"])
        ]),
        L("div", null, [
          L("div", Poe, oe(T(t)("config.gauge.colorFromScheme")), 1),
          h(r, {
            size: "small",
            checked: e.panel.gaugeColorFromScheme ?? !1,
            onChange: o[11] || (o[11] = (l) => e.onChange({ gaugeColorFromScheme: l }))
          }, null, 8, ["checked"])
        ]),
        L("div", null, [
          L("div", Ooe, oe(T(t)("config.gauge.thresholdDisplay")), 1),
          h(a, {
            size: "small",
            value: e.panel.gaugeThresholdDisplay ?? T(Gn).thresholdDisplay,
            onChange: o[12] || (o[12] = (l) => e.onChange({ gaugeThresholdDisplay: l.target.value }))
          }, {
            default: he(() => [
              h(i, { value: "none" }, {
                default: he(() => [
                  Le(oe(T(t)("config.gauge.thresholdDisplayNone")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "marker" }, {
                default: he(() => [
                  Le(oe(T(t)("config.gauge.thresholdDisplayMarker")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "track" }, {
                default: he(() => [
                  Le(oe(T(t)("config.gauge.thresholdDisplayTrack")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        L("div", null, [
          L("div", koe, oe(T(t)("config.gauge.thresholdLabelDisplay")), 1),
          h(a, {
            size: "small",
            value: e.panel.gaugeThresholdLabelDisplay ?? "none",
            onChange: o[13] || (o[13] = (l) => e.onChange({ gaugeThresholdLabelDisplay: l.target.value }))
          }, {
            default: he(() => [
              h(i, { value: "none" }, {
                default: he(() => [
                  Le(oe(T(t)("config.gauge.thresholdLabelNone")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "label" }, {
                default: he(() => [
                  Le(oe(T(t)("config.gauge.thresholdLabelLabel")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "value" }, {
                default: he(() => [
                  Le(oe(T(t)("config.gauge.thresholdLabelValue")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "both" }, {
                default: he(() => [
                  Le(oe(T(t)("config.gauge.thresholdLabelBoth")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        L("div", null, [
          L("div", Ioe, oe(T(t)("config.gauge.orientation")), 1),
          h(a, {
            size: "small",
            value: e.panel.gaugeOrientation ?? T(Gn).orientation,
            onChange: o[14] || (o[14] = (l) => e.onChange({ gaugeOrientation: l.target.value }))
          }, {
            default: he(() => [
              h(i, { value: "auto" }, {
                default: he(() => [
                  Le(oe(T(t)("config.gauge.orientationAuto")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "horizontal" }, {
                default: he(() => [
                  Le(oe(T(t)("config.gauge.orientationHorizontal")), 1)
                ]),
                _: 1
              }),
              h(i, { value: "vertical" }, {
                default: he(() => [
                  Le(oe(T(t)("config.gauge.orientationVertical")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])
      ]);
    };
  }
}), bt = {
  // Actions
  edit: "i-carbon:edit",
  delete: "i-carbon:trash-can",
  clone: "i-carbon:stickies ",
  plus: "i-carbon:add-large",
  save: "i-mdi-content-save",
  cancel: "i-mdi-cancel",
  refresh: "i-carbon:renew",
  download: "i-carbon:download",
  upload: "i-carbon:upload",
  export: "i-carbon:export",
  import: "i-carbon:document-import",
  search: "i-mdi-magnify",
  settings: "i-carbon:settings",
  config: "i-carbon:settings-adjust",
  link: "i-mdi-link",
  // Navigation
  fullscreen: "i-carbon:center-to-fit",
  chevronDown: "i-carbon:chevron-down",
  chevronRight: "i-carbon:chevron-right",
  dotsVertical: "i-mdi-dots-vertical",
  dragVertical: "i-carbon:draggable",
  closeCircle: "i-mdi-close-circle",
  chevronLeft: "i-carbon:chevron-left",
  // Info
  info: "i-carbon:information",
  // view
  view: "i-carbon:view",
  viewOff: "i-carbon:view-off",
  // Theme
  sun: "i-mdi-white-balance-sunny",
  moon: "i-mdi-weather-night",
  // Panel types
  chartLine: "i-mdi-chart-line",
  chartBar: "i-mdi-chart-bar",
  chartArea: "i-mdi-chart-areaspline",
  chartPie: "i-mdi-chart-pie",
  stat: "i-mdi-format-list-numbered",
  gauge: "i-mdi-alarm-panel",
  table: "i-mdi-table",
  databaseOff: "i-mdi-database-off"
}, Toe = { class: "inline-flex gap-0.5 items-center" }, Moe = /* @__PURE__ */ be({
  __name: "PaletteSwatches",
  props: {
    colors: {}
  },
  setup(e) {
    return (t, n) => (ne(), xe("span", Toe, [
      (ne(!0), xe(Je, null, Ut(e.colors, (o, r) => (ne(), xe("span", {
        key: `${o}-${r}`,
        class: "inline-block rounded-sm flex-shrink-0",
        style: Bt({ width: "12px", height: "12px", background: o })
      }, null, 4))), 128))
    ]));
  }
}), Eoe = [
  { value: "classic", colors: Il.slice(0, 8) },
  { value: "tableau10", colors: Yr.tableau10.slice(0, 8) },
  { value: "grafana-classic", colors: Yr["grafana-classic"].slice(0, 8) },
  { value: "green-yellow-red", colors: Yr["green-yellow-red"] },
  { value: "red-yellow-green", colors: Yr["red-yellow-green"] },
  { value: "blue-yellow-red", colors: Yr["blue-yellow-red"] },
  { value: "blue-purple", colors: Yr["blue-purple"] },
  { value: "yellow-blue", colors: Yr["yellow-blue"] },
  { value: "blues", colors: Yr.blues },
  { value: "reds", colors: Yr.reds },
  { value: "GrYlRd", colors: Yr.GrYlRd },
  { value: "purple-orange", colors: Yr["purple-orange"] },
  { value: "fixed", colors: [] },
  { value: "thresholds", colors: [] }
], Doe = { class: "flex flex-col gap-3" }, Aoe = { class: "text-xs text-secondary mb-1" }, Noe = { class: "text-xs text-secondary mb-1" }, Roe = { class: "text-xs text-secondary mb-1" }, zoe = { class: "inline-flex items-center gap-1.5" }, Foe = { key: 0 }, Boe = { class: "text-xs text-secondary mb-1" }, Loe = ["value"], Hoe = { key: 1 }, Voe = { class: "text-xs text-secondary mb-1" }, joe = { class: "text-xs text-secondary mb-1" }, Woe = { class: "flex gap-1 items-center" }, Koe = { class: "flex items-center gap-1" }, qoe = { class: "text-xs text-secondary" }, NP = /* @__PURE__ */ be({
  __name: "GeneralSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = sn(), o = Eoe.map((l) => ({
      value: l.value,
      label: n(`config.scheme.${l.value}`),
      colors: l.colors
    }));
    function r() {
      const l = [...t.panel.links ?? [], { title: "", url: "", newTab: !0 }];
      t.onChange({ links: l });
    }
    function i(l) {
      const s = (t.panel.links ?? []).filter((u, c) => c !== l);
      t.onChange({ links: s });
    }
    function a(l, s) {
      const u = (t.panel.links ?? []).map((c, d) => d === l ? { ...c, ...s } : c);
      t.onChange({ links: u });
    }
    return (l, s) => {
      const u = yn("a-switch");
      return ne(), xe("div", Doe, [
        L("div", null, [
          L("div", Aoe, oe(T(n)("config.field.title")), 1),
          h(T(kt), {
            size: "small",
            value: e.panel.title,
            onChange: s[0] || (s[0] = (c) => e.onChange({ title: c.target.value }))
          }, null, 8, ["value"])
        ]),
        L("div", null, [
          L("div", Noe, oe(T(n)("config.field.description")), 1),
          h(T(kt), {
            size: "small",
            value: e.panel.description,
            onChange: s[1] || (s[1] = (c) => e.onChange({ description: c.target.value }))
          }, null, 8, ["value"])
        ]),
        L("div", null, [
          L("div", Roe, oe(T(n)("config.field.colorScheme")), 1),
          h(T(Dt), {
            size: "small",
            value: e.panel.colorScheme ?? "classic",
            "option-label-prop": "children",
            style: { width: "100%" },
            onChange: s[2] || (s[2] = (c) => e.onChange({ colorScheme: c }))
          }, {
            default: he(() => [
              (ne(!0), xe(Je, null, Ut(T(o), (c) => (ne(), ft(T(Dt).Option, {
                key: c.value,
                value: c.value
              }, {
                default: he(() => [
                  L("span", zoe, [
                    c.colors.length ? (ne(), ft(Moe, {
                      key: 0,
                      colors: c.colors
                    }, null, 8, ["colors"])) : rt("", !0),
                    L("span", null, oe(c.label), 1)
                  ])
                ]),
                _: 2
              }, 1032, ["value"]))), 128))
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        e.panel.colorScheme === "fixed" ? (ne(), xe("div", Foe, [
          L("div", Boe, oe(T(n)("config.field.colorSingle")), 1),
          L("input", {
            type: "color",
            value: e.panel.colorSingleValue ?? "#4096ff",
            onInput: s[3] || (s[3] = (c) => e.onChange({ colorSingleValue: c.target.value }))
          }, null, 40, Loe)
        ])) : rt("", !0),
        e.panel.colorScheme && e.panel.colorScheme !== "fixed" && e.panel.colorScheme !== "thresholds" ? (ne(), xe("div", Hoe, [
          L("div", Voe, oe(T(n)("config.field.colorDistribution")), 1),
          h(T(Dt), {
            size: "small",
            value: e.panel.colorDistribution ?? "sequential",
            options: [
              { value: "sequential", label: T(n)("config.colorDist.sequential") },
              { value: "distributed", label: T(n)("config.colorDist.distributed") }
            ],
            style: { width: "100%" },
            onChange: s[4] || (s[4] = (c) => e.onChange({ colorDistribution: c }))
          }, null, 8, ["value", "options"])
        ])) : rt("", !0),
        L("div", null, [
          L("div", joe, oe(T(n)("config.section.links", { n: (e.panel.links ?? []).length })), 1),
          (ne(!0), xe(Je, null, Ut(e.panel.links ?? [], (c, d) => (ne(), xe("div", {
            key: d,
            class: "mb-2 flex flex-col gap-1"
          }, [
            L("div", Woe, [
              h(T(kt), {
                size: "small",
                value: c.title,
                placeholder: "Title",
                style: { flex: "1" },
                onChange: (f) => a(d, { title: f.target.value })
              }, null, 8, ["value", "onChange"]),
              h(T(Lt), {
                type: "text",
                danger: "",
                size: "small",
                onClick: (f) => i(d)
              }, {
                default: he(() => [
                  L("span", {
                    class: Pt(T(bt).delete)
                  }, null, 2)
                ]),
                _: 1
              }, 8, ["onClick"])
            ]),
            h(T(kt), {
              size: "small",
              value: c.url,
              placeholder: "https://",
              onChange: (f) => a(d, { url: f.target.value })
            }, null, 8, ["value", "onChange"]),
            L("div", Koe, [
              h(u, {
                size: "small",
                checked: c.newTab,
                onChange: (f) => a(d, { newTab: f })
              }, null, 8, ["checked", "onChange"]),
              L("span", qoe, oe(T(n)("config.link.newTab")), 1)
            ])
          ]))), 128)),
          h(T(Lt), {
            type: "dashed",
            size: "small",
            block: "",
            onClick: r
          }, {
            default: he(() => [
              L("span", {
                class: Pt([T(bt).plus, "mr-1"])
              }, null, 2),
              Le(oe(T(n)("config.link.add")), 1)
            ]),
            _: 1
          })
        ])
      ]);
    };
  }
}), Yoe = { class: "flex flex-col gap-3" }, Goe = { class: "text-xs text-secondary mb-1" }, Uoe = { class: "text-xs text-secondary mb-1" }, Xoe = { class: "text-xs text-secondary mb-1" }, Qoe = { class: "text-xs text-secondary mb-1" }, Zoe = { class: "text-xs text-secondary mb-1" }, Joe = { class: "text-xs text-secondary mb-1" }, ere = /* @__PURE__ */ be({
  __name: "HistogramStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = sn();
    return (n, o) => {
      const r = yn("a-input-number"), i = yn("a-switch");
      return ne(), xe("div", Yoe, [
        L("div", null, [
          L("div", Goe, oe(T(t)("config.field.histBucketCount")), 1),
          h(r, {
            size: "small",
            min: 1,
            max: 500,
            value: e.panel.histBucketCount ?? 30,
            style: { width: "100%" },
            onChange: o[0] || (o[0] = (a) => e.onChange({ histBucketCount: a ?? 30 }))
          }, null, 8, ["value"])
        ]),
        L("div", null, [
          L("div", Uoe, oe(T(t)("config.field.histBucketSize")), 1),
          h(r, {
            size: "small",
            min: 0,
            value: e.panel.histBucketSize,
            placeholder: T(t)("config.hist.bucketSizePlaceholder"),
            style: { width: "100%" },
            onChange: o[1] || (o[1] = (a) => e.onChange({ histBucketSize: a }))
          }, null, 8, ["value", "placeholder"])
        ]),
        L("div", null, [
          L("div", Xoe, oe(T(t)("config.field.histBucketOffset")), 1),
          h(r, {
            size: "small",
            min: 0,
            value: e.panel.histBucketOffset ?? 0,
            style: { width: "100%" },
            onChange: o[2] || (o[2] = (a) => e.onChange({ histBucketOffset: a ?? 0 }))
          }, null, 8, ["value"])
        ]),
        L("div", null, [
          L("div", Qoe, oe(T(t)("config.field.histCombineSeries")), 1),
          h(i, {
            size: "small",
            checked: e.panel.histCombineSeries ?? !1,
            onChange: o[3] || (o[3] = (a) => e.onChange({ histCombineSeries: a }))
          }, null, 8, ["checked"])
        ]),
        L("div", null, [
          L("div", Zoe, oe(T(t)("config.field.lineWidth")), 1),
          h(r, {
            size: "small",
            min: 0,
            max: 10,
            value: e.panel.lineWidth,
            style: { width: "100%" },
            onChange: o[4] || (o[4] = (a) => e.onChange({ lineWidth: a ?? 1 }))
          }, null, 8, ["value"])
        ]),
        L("div", null, [
          L("div", Joe, oe(T(t)("config.field.fillOpacity")), 1),
          h(T(br), {
            min: 0,
            max: 100,
            value: e.panel.fillOpacity,
            onChange: o[5] || (o[5] = (a) => e.onChange({ fillOpacity: a }))
          }, null, 8, ["value"])
        ])
      ]);
    };
  }
}), tre = { class: "flex flex-col gap-3" }, nre = { class: "override-rule-header" }, ore = { class: "override-props" }, rre = /* @__PURE__ */ be({
  __name: "OverridesSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = sn(), o = [
      { value: "byName", label: "Field name" },
      { value: "byType", label: "Field type" },
      { value: "byRegexp", label: "Field name by regex" }
    ], r = [
      { value: "displayName", label: "Display name" },
      { value: "unit", label: "Unit" },
      { value: "decimals", label: "Decimals" },
      { value: "color", label: "Color" },
      { value: "thresholds", label: "Thresholds" },
      { value: "min", label: "Min" },
      { value: "max", label: "Max" },
      { value: "noValue", label: "No value" }
    ], i = E(() => t.panel.fieldConfigOverrides ?? []);
    function a() {
      const f = {
        id: crypto.randomUUID(),
        matcher: { id: "byName", options: "" },
        properties: []
      };
      t.onChange({ fieldConfigOverrides: [...i.value, f] });
    }
    function l(f) {
      t.onChange({
        fieldConfigOverrides: i.value.filter((p) => p.id !== f)
      });
    }
    function s(f, p) {
      t.onChange({
        fieldConfigOverrides: i.value.map(
          (v) => v.id === f ? { ...v, matcher: { ...v.matcher, ...p } } : v
        )
      });
    }
    function u(f) {
      t.onChange({
        fieldConfigOverrides: i.value.map(
          (p) => p.id === f ? { ...p, properties: [...p.properties, { id: "displayName", value: "" }] } : p
        )
      });
    }
    function c(f, p, v) {
      t.onChange({
        fieldConfigOverrides: i.value.map(
          (g) => g.id === f ? {
            ...g,
            properties: g.properties.map(
              (m, x) => x === p ? { ...m, ...v } : m
            )
          } : g
        )
      });
    }
    function d(f, p) {
      t.onChange({
        fieldConfigOverrides: i.value.map(
          (v) => v.id === f ? { ...v, properties: v.properties.filter((g, m) => m !== p) } : v
        )
      });
    }
    return (f, p) => (ne(), xe("div", tre, [
      (ne(!0), xe(Je, null, Ut(i.value, (v) => (ne(), xe("div", {
        key: v.id,
        class: "override-rule"
      }, [
        L("div", nre, [
          h(T(Dt), {
            size: "small",
            value: v.matcher.id,
            options: o,
            style: { flex: "1" },
            onChange: (g) => s(v.id, { id: g })
          }, null, 8, ["value", "onChange"]),
          h(T(kt), {
            size: "small",
            value: v.matcher.options ?? "",
            placeholder: T(n)("editor.overrides.matcherValue"),
            style: { flex: "1" },
            onChange: (g) => s(v.id, { options: g.target.value })
          }, null, 8, ["value", "placeholder", "onChange"]),
          h(T(Lt), {
            type: "text",
            danger: "",
            size: "small",
            onClick: (g) => l(v.id)
          }, {
            default: he(() => [
              L("span", {
                class: Pt(T(bt).delete)
              }, null, 2)
            ]),
            _: 1
          }, 8, ["onClick"])
        ]),
        L("div", ore, [
          (ne(!0), xe(Je, null, Ut(v.properties, (g, m) => (ne(), xe("div", {
            key: m,
            class: "override-prop-row"
          }, [
            h(T(Dt), {
              size: "small",
              value: g.id,
              options: r,
              style: { width: "140px" },
              onChange: (x) => c(v.id, m, { id: x })
            }, null, 8, ["value", "onChange"]),
            h(T(kt), {
              size: "small",
              value: String(g.value ?? ""),
              placeholder: T(n)("editor.overrides.propValue"),
              style: { flex: "1" },
              onChange: (x) => c(v.id, m, { value: x.target.value })
            }, null, 8, ["value", "placeholder", "onChange"]),
            h(T(Lt), {
              type: "text",
              danger: "",
              size: "small",
              onClick: (x) => d(v.id, m)
            }, {
              default: he(() => [
                L("span", {
                  class: Pt(T(bt).closeCircle)
                }, null, 2)
              ]),
              _: 1
            }, 8, ["onClick"])
          ]))), 128)),
          h(T(Lt), {
            type: "dashed",
            size: "small",
            style: { width: "100%", "margin-top": "4px" },
            onClick: (g) => u(v.id)
          }, {
            default: he(() => [
              L("span", {
                class: Pt([T(bt).plus, "mr-1"])
              }, null, 2),
              Le(" " + oe(T(n)("editor.overrides.addProperty")), 1)
            ]),
            _: 1
          }, 8, ["onClick"])
        ])
      ]))), 128)),
      h(T(Lt), {
        type: "dashed",
        size: "small",
        style: { width: "100%" },
        onClick: a
      }, {
        default: he(() => [
          L("span", {
            class: Pt([T(bt).plus, "mr-1"])
          }, null, 2),
          Le(" " + oe(T(n)("editor.overrides.addOverride")), 1)
        ]),
        _: 1
      })
    ]));
  }
}), wr = (e, t) => {
  const n = e.__vccOpts || e;
  for (const [o, r] of t)
    n[o] = r;
  return n;
}, RP = /* @__PURE__ */ wr(rre, [["__scopeId", "data-v-2396374b"]]), ire = { class: "flex flex-col gap-3" }, are = { class: "text-xs text-secondary mb-1" }, lre = { class: "text-xs text-secondary mb-1" }, sre = { class: "text-xs text-secondary mb-1" }, ure = { class: "flex flex-col gap-1" }, cre = { class: "text-xs" }, dre = { class: "text-xs text-secondary mb-1" }, fre = { key: 0 }, pre = { class: "text-xs text-secondary mb-1" }, hre = { class: "text-xs text-secondary mb-1" }, gre = { class: "text-xs text-secondary mb-1" }, vre = { class: "flex flex-col gap-1" }, mre = { class: "text-xs" }, bre = /* @__PURE__ */ be({
  __name: "PieStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = sn(), o = E(() => t.panel.pieLabels ?? []), r = E(() => t.panel.legendValues ?? []);
    function i(l, s) {
      const u = s ? [...o.value, l] : o.value.filter((c) => c !== l);
      t.onChange({ pieLabels: u });
    }
    function a(l, s) {
      const u = s ? [...r.value, l] : r.value.filter((c) => c !== l);
      t.onChange({ legendValues: u });
    }
    return (l, s) => {
      const u = yn("a-radio-button"), c = yn("a-radio-group"), d = yn("a-checkbox");
      return ne(), xe("div", ire, [
        L("div", null, [
          L("div", are, oe(T(n)("config.field.pieType")), 1),
          h(c, {
            size: "small",
            value: e.panel.pieType ?? "pie",
            onChange: s[0] || (s[0] = (f) => e.onChange({ pieType: f.target.value }))
          }, {
            default: he(() => [
              h(u, { value: "pie" }, {
                default: he(() => [
                  Le(oe(T(n)("config.pieType.pie")), 1)
                ]),
                _: 1
              }),
              h(u, { value: "donut" }, {
                default: he(() => [
                  Le(oe(T(n)("config.pieType.donut")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        L("div", null, [
          L("div", lre, oe(T(n)("config.field.pieSliceSorting")), 1),
          h(c, {
            size: "small",
            value: e.panel.pieSliceSorting ?? "desc",
            onChange: s[1] || (s[1] = (f) => e.onChange({ pieSliceSorting: f.target.value }))
          }, {
            default: he(() => [
              h(u, { value: "desc" }, {
                default: he(() => [
                  Le(oe(T(n)("config.sort.desc")), 1)
                ]),
                _: 1
              }),
              h(u, { value: "asc" }, {
                default: he(() => [
                  Le(oe(T(n)("config.sort.asc")), 1)
                ]),
                _: 1
              }),
              h(u, { value: "none" }, {
                default: he(() => [
                  Le(oe(T(n)("config.sort.none")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        L("div", null, [
          L("div", sre, oe(T(n)("config.field.pieLabels")), 1),
          L("div", ure, [
            (ne(), xe(Je, null, Ut(["name", "percent", "value"], (f) => L("label", {
              key: f,
              class: "flex items-center gap-1"
            }, [
              h(d, {
                checked: o.value.includes(f),
                onChange: (p) => i(f, p.target.checked)
              }, null, 8, ["checked", "onChange"]),
              L("span", cre, oe(T(n)(`config.pieLabel.${f}`)), 1)
            ])), 64))
          ])
        ]),
        L("div", null, [
          L("div", dre, oe(T(n)("config.field.pieShow")), 1),
          h(c, {
            size: "small",
            value: e.panel.pieShow ?? "calculate",
            onChange: s[2] || (s[2] = (f) => e.onChange({ pieShow: f.target.value }))
          }, {
            default: he(() => [
              h(u, { value: "calculate" }, {
                default: he(() => [
                  Le(oe(T(n)("config.pieShow.calculate")), 1)
                ]),
                _: 1
              }),
              h(u, { value: "all" }, {
                default: he(() => [
                  Le(oe(T(n)("config.pieShow.all")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        (e.panel.pieShow ?? "calculate") === "calculate" ? (ne(), xe("div", fre, [
          L("div", pre, oe(T(n)("config.field.reducer")), 1),
          h(T(Dt), {
            size: "small",
            value: e.panel.pieCalculation ?? "lastNotNull",
            options: [
              { value: "lastNotNull", label: T(n)("config.reducer.lastNotNull") },
              { value: "last", label: T(n)("config.reducer.last") },
              { value: "mean", label: T(n)("config.reducer.mean") },
              { value: "min", label: T(n)("config.reducer.min") },
              { value: "max", label: T(n)("config.reducer.max") },
              { value: "sum", label: T(n)("config.reducer.sum") }
            ],
            style: { width: "100%" },
            onChange: s[3] || (s[3] = (f) => e.onChange({ pieCalculation: f }))
          }, null, 8, ["value", "options"])
        ])) : rt("", !0),
        L("div", null, [
          L("div", hre, oe(T(n)("config.field.legendMode")), 1),
          h(c, {
            size: "small",
            value: e.panel.legendMode ?? "list",
            onChange: s[4] || (s[4] = (f) => e.onChange({ legendMode: f.target.value }))
          }, {
            default: he(() => [
              h(u, { value: "list" }, {
                default: he(() => [
                  Le(oe(T(n)("config.legendMode.list")), 1)
                ]),
                _: 1
              }),
              h(u, { value: "table" }, {
                default: he(() => [
                  Le(oe(T(n)("config.legendMode.table")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        L("div", null, [
          L("div", gre, oe(T(n)("config.field.legendValues")), 1),
          L("div", vre, [
            (ne(), xe(Je, null, Ut(["min", "max", "mean", "sum", "last"], (f) => L("label", {
              key: f,
              class: "flex items-center gap-1"
            }, [
              h(d, {
                checked: r.value.includes(f),
                onChange: (p) => a(f, p.target.checked)
              }, null, 8, ["checked", "onChange"]),
              L("span", mre, oe(T(n)(`config.legendValue.${f}`)), 1)
            ])), 64))
          ])
        ])
      ]);
    };
  }
}), yre = { class: "flex flex-col gap-3" }, xre = { class: "text-xs text-secondary mb-1" }, wre = { class: "text-xs text-secondary mb-1" }, Sre = { class: "text-xs text-secondary mb-1" }, Cre = { class: "text-xs text-secondary mb-1" }, $re = /* @__PURE__ */ be({
  __name: "StatStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = sn();
    return (n, o) => {
      const r = yn("a-switch");
      return ne(), xe("div", yre, [
        L("div", null, [
          L("div", xre, oe(T(t)("config.field.orientation")), 1),
          h(T(Dt), {
            size: "small",
            value: e.panel.statOrientation ?? "vertical",
            options: [
              { value: "vertical", label: T(t)("config.orientation.vertical") },
              { value: "horizontal", label: T(t)("config.orientation.horizontal") }
            ],
            style: { width: "100%" },
            onChange: o[0] || (o[0] = (i) => e.onChange({ statOrientation: i }))
          }, null, 8, ["value", "options"])
        ]),
        L("div", null, [
          L("div", wre, oe(T(t)("config.field.textMode")), 1),
          h(T(Dt), {
            size: "small",
            value: e.panel.statTextMode ?? "value_and_name",
            options: [
              { value: "value_and_name", label: T(t)("config.textMode.valueAndName") },
              { value: "value", label: T(t)("config.textMode.value") },
              { value: "name", label: T(t)("config.textMode.name") },
              { value: "none", label: T(t)("config.textMode.none") }
            ],
            style: { width: "100%" },
            onChange: o[1] || (o[1] = (i) => e.onChange({ statTextMode: i }))
          }, null, 8, ["value", "options"])
        ]),
        L("div", null, [
          L("div", Sre, oe(T(t)("config.field.colorMode")), 1),
          h(T(Dt), {
            size: "small",
            value: e.panel.statColorMode ?? "value",
            options: [
              { value: "value", label: T(t)("config.colorMode.value") },
              { value: "background_solid", label: T(t)("config.colorMode.backgroundSolid") },
              { value: "background", label: T(t)("config.colorMode.background") }
            ],
            style: { width: "100%" },
            onChange: o[2] || (o[2] = (i) => e.onChange({ statColorMode: i }))
          }, null, 8, ["value", "options"])
        ]),
        L("div", null, [
          L("div", Cre, oe(T(t)("config.field.percentChange")), 1),
          h(r, {
            size: "small",
            checked: e.panel.showPercentChange ?? !1,
            onChange: o[3] || (o[3] = (i) => e.onChange({ showPercentChange: i }))
          }, null, 8, ["checked"])
        ])
      ]);
    };
  }
}), Pre = { class: "flex flex-col gap-3" }, Ore = { key: 0 }, kre = { class: "text-xs text-secondary mb-1" }, Ire = { key: 1 }, _re = { class: "text-xs text-secondary mb-1" }, Tre = { key: 2 }, Mre = { class: "text-xs text-secondary mb-1" }, Ere = { key: 3 }, Dre = { class: "text-xs text-secondary mb-1" }, Are = { class: "text-xs text-secondary mb-1" }, Nre = { class: "text-xs text-secondary mb-1" }, Rre = { class: "text-xs text-secondary mb-1" }, zre = { class: "flex items-center gap-2" }, Fre = { class: "text-xs text-secondary mb-1" }, Bre = { class: "flex items-center gap-2" }, Lre = { key: 5 }, Hre = { class: "text-xs text-secondary mb-1" }, Vre = { key: 6 }, jre = { class: "text-xs text-secondary mb-1" }, Wre = { class: "text-xs text-secondary mb-1" }, Kre = { key: 7 }, qre = { class: "text-xs text-secondary mb-1" }, Yre = /* @__PURE__ */ be({
  __name: "StyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = sn(), o = t.panel.type === "timeseries", r = t.panel.drawStyle ?? "lines", i = r === "lines", a = r === "points", l = t.panel.showPointsMode ?? "auto", s = t.panel.spanNulls ?? !1, u = t.panel.insertNulls ?? !1;
    return (c, d) => {
      const f = yn("a-radio-button"), p = yn("a-radio-group"), v = yn("a-input-number"), g = yn("a-switch");
      return ne(), xe("div", Pre, [
        o ? (ne(), xe("div", Ore, [
          L("div", kre, oe(T(n)("config.field.drawStyle")), 1),
          h(p, {
            size: "small",
            value: e.panel.drawStyle ?? "lines",
            onChange: d[0] || (d[0] = (m) => e.onChange({ drawStyle: m.target.value }))
          }, {
            default: he(() => [
              h(f, { value: "lines" }, {
                default: he(() => [
                  Le(oe(T(n)("config.drawStyle.lines")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "bars" }, {
                default: he(() => [
                  Le(oe(T(n)("config.drawStyle.bars")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "points" }, {
                default: he(() => [
                  Le(oe(T(n)("config.drawStyle.points")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])) : rt("", !0),
        a ? rt("", !0) : (ne(), xe("div", Ire, [
          L("div", _re, oe(T(n)("config.field.lineWidth")), 1),
          h(T(br), {
            min: 0.5,
            max: 4,
            step: 0.5,
            value: e.panel.lineWidth,
            onChange: d[1] || (d[1] = (m) => e.onChange({ lineWidth: m }))
          }, null, 8, ["value"])
        ])),
        a ? rt("", !0) : (ne(), xe("div", Tre, [
          L("div", Mre, oe(T(n)("config.field.fillOpacity")), 1),
          h(T(br), {
            min: 0,
            max: 100,
            value: e.panel.fillOpacity,
            onChange: d[2] || (d[2] = (m) => e.onChange({ fillOpacity: m }))
          }, null, 8, ["value"])
        ])),
        a ? rt("", !0) : (ne(), xe("div", Ere, [
          L("div", Dre, oe(T(n)("config.field.gradientMode")), 1),
          h(p, {
            size: "small",
            value: e.panel.gradientMode ?? "none",
            onChange: d[3] || (d[3] = (m) => e.onChange({ gradientMode: m.target.value }))
          }, {
            default: he(() => [
              h(f, { value: "none" }, {
                default: he(() => [
                  Le(oe(T(n)("config.gradient.none")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "opacity" }, {
                default: he(() => [
                  Le(oe(T(n)("config.gradient.opacity")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "hue" }, {
                default: he(() => [
                  Le(oe(T(n)("config.gradient.hue")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "scheme" }, {
                default: he(() => [
                  Le(oe(T(n)("config.gradient.scheme")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])),
        o && i ? (ne(), xe(Je, { key: 4 }, [
          L("div", null, [
            L("div", Are, oe(T(n)("config.field.interpolation")), 1),
            h(p, {
              size: "small",
              value: e.panel.lineInterpolation,
              onChange: d[4] || (d[4] = (m) => e.onChange({ lineInterpolation: m.target.value }))
            }, {
              default: he(() => [
                h(f, { value: "linear" }, {
                  default: he(() => [
                    Le(oe(T(n)("config.interp.linear")), 1)
                  ]),
                  _: 1
                }),
                h(f, { value: "smooth" }, {
                  default: he(() => [
                    Le(oe(T(n)("config.interp.smooth")), 1)
                  ]),
                  _: 1
                }),
                h(f, { value: "step" }, {
                  default: he(() => [
                    Le(oe(T(n)("config.interp.step")), 1)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }, 8, ["value"])
          ]),
          L("div", null, [
            L("div", Nre, oe(T(n)("config.field.lineStyle")), 1),
            h(p, {
              size: "small",
              value: e.panel.lineStyle,
              onChange: d[5] || (d[5] = (m) => e.onChange({ lineStyle: m.target.value }))
            }, {
              default: he(() => [
                h(f, { value: "solid" }, {
                  default: he(() => [
                    Le(oe(T(n)("config.linestyle.solid")), 1)
                  ]),
                  _: 1
                }),
                h(f, { value: "dashed" }, {
                  default: he(() => [
                    Le(oe(T(n)("config.linestyle.dashed")), 1)
                  ]),
                  _: 1
                }),
                h(f, { value: "dotted" }, {
                  default: he(() => [
                    Le(oe(T(n)("config.linestyle.dotted")), 1)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }, 8, ["value"])
          ]),
          L("div", null, [
            L("div", Rre, oe(T(n)("config.field.spanNulls")), 1),
            L("div", zre, [
              h(p, {
                size: "small",
                value: T(s) === !0 ? "always" : typeof T(s) == "number" ? "threshold" : "never",
                onChange: d[6] || (d[6] = (m) => {
                  m.target.value === "never" ? e.onChange({ spanNulls: !1 }) : m.target.value === "always" ? e.onChange({ spanNulls: !0 }) : e.onChange({ spanNulls: 3600 });
                })
              }, {
                default: he(() => [
                  h(f, { value: "never" }, {
                    default: he(() => [
                      Le(oe(T(n)("config.nulls.never")), 1)
                    ]),
                    _: 1
                  }),
                  h(f, { value: "always" }, {
                    default: he(() => [
                      Le(oe(T(n)("config.nulls.always")), 1)
                    ]),
                    _: 1
                  }),
                  h(f, { value: "threshold" }, {
                    default: he(() => [
                      Le(oe(T(n)("config.nulls.threshold")), 1)
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              }, 8, ["value"]),
              typeof T(s) == "number" ? (ne(), ft(v, {
                key: 0,
                size: "small",
                min: 1,
                value: T(s),
                suffix: "s",
                style: { width: "90px" },
                onChange: d[7] || (d[7] = (m) => e.onChange({ spanNulls: m ?? 3600 }))
              }, null, 8, ["value"])) : rt("", !0)
            ])
          ]),
          L("div", null, [
            L("div", Fre, oe(T(n)("config.field.insertNulls")), 1),
            L("div", Bre, [
              h(p, {
                size: "small",
                value: typeof T(u) == "number" ? "threshold" : "never",
                onChange: d[8] || (d[8] = (m) => {
                  m.target.value === "never" ? e.onChange({ insertNulls: !1 }) : e.onChange({ insertNulls: 3600 });
                })
              }, {
                default: he(() => [
                  h(f, { value: "never" }, {
                    default: he(() => [
                      Le(oe(T(n)("config.nulls.never")), 1)
                    ]),
                    _: 1
                  }),
                  h(f, { value: "threshold" }, {
                    default: he(() => [
                      Le(oe(T(n)("config.nulls.threshold")), 1)
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              }, 8, ["value"]),
              typeof T(u) == "number" ? (ne(), ft(v, {
                key: 0,
                size: "small",
                min: 1,
                value: T(u),
                suffix: "s",
                style: { width: "90px" },
                onChange: d[9] || (d[9] = (m) => e.onChange({ insertNulls: m ?? 3600 }))
              }, null, 8, ["value"])) : rt("", !0)
            ])
          ])
        ], 64)) : rt("", !0),
        o && !a ? (ne(), xe("div", Lre, [
          L("div", Hre, oe(T(n)("config.field.showPoints")), 1),
          h(p, {
            size: "small",
            value: T(l),
            onChange: d[10] || (d[10] = (m) => e.onChange({ showPointsMode: m.target.value, showPoints: m.target.value === "always" }))
          }, {
            default: he(() => [
              h(f, { value: "auto" }, {
                default: he(() => [
                  Le(oe(T(n)("config.points.auto")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "always" }, {
                default: he(() => [
                  Le(oe(T(n)("config.points.always")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "never" }, {
                default: he(() => [
                  Le(oe(T(n)("config.points.never")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])) : rt("", !0),
        o ? (ne(), xe("div", Vre, [
          L("div", jre, oe(T(n)("config.field.stackSeries")), 1),
          h(p, {
            size: "small",
            value: e.panel.stackingMode ?? "none",
            onChange: d[11] || (d[11] = (m) => e.onChange({ stackingMode: m.target.value }))
          }, {
            default: he(() => [
              h(f, { value: "none" }, {
                default: he(() => [
                  Le(oe(T(n)("config.stack.none")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "normal" }, {
                default: he(() => [
                  Le(oe(T(n)("config.stack.normal")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "percent" }, {
                default: he(() => [
                  Le(oe(T(n)("config.stack.percent")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])) : rt("", !0),
        L("div", null, [
          L("div", Wre, oe(T(n)("config.field.legendPosition")), 1),
          h(p, {
            size: "small",
            value: e.panel.legendPosition,
            onChange: d[12] || (d[12] = (m) => e.onChange({ legendPosition: m.target.value }))
          }, {
            default: he(() => [
              h(f, { value: "bottom" }, {
                default: he(() => [
                  Le(oe(T(n)("config.legend.bottom")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "right" }, {
                default: he(() => [
                  Le(oe(T(n)("config.legend.right")), 1)
                ]),
                _: 1
              }),
              h(f, { value: "hidden" }, {
                default: he(() => [
                  Le(oe(T(n)("config.legend.hidden")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        e.panel.type === "bar" ? (ne(), xe("div", Kre, [
          L("div", qre, oe(T(n)("config.field.stacked")), 1),
          h(g, {
            size: "small",
            checked: e.panel.stacked,
            onChange: d[13] || (d[13] = (m) => e.onChange({ stacked: m }))
          }, null, 8, ["checked"])
        ])) : rt("", !0)
      ]);
    };
  }
}), Gre = { class: "flex flex-col gap-3" }, Ure = { class: "text-xs text-secondary mb-1" }, Xre = { class: "text-xs text-secondary mb-1" }, Qre = { class: "text-xs text-secondary mb-1" }, Zre = { class: "text-xs text-secondary mb-1" }, Jre = { class: "text-xs text-secondary mb-1" }, eie = { class: "text-xs text-secondary mb-1" }, tie = { key: 0 }, nie = { class: "text-xs text-secondary mb-1" }, oie = { class: "text-xs text-secondary mb-1" }, rie = { key: 1 }, iie = { class: "text-xs text-secondary mb-1" }, aie = { key: 2 }, lie = { class: "text-xs text-secondary mb-1" }, sie = /* @__PURE__ */ be({
  __name: "TableStyleSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = sn();
    function o(r) {
      t.onChange({ tableFooterReducers: r ? [r] : [] });
    }
    return (r, i) => {
      const a = yn("a-switch"), l = yn("a-radio-button"), s = yn("a-radio-group");
      return ne(), xe("div", Gre, [
        L("div", null, [
          L("div", Ure, oe(T(n)("config.field.tableShowHeader")), 1),
          h(a, {
            size: "small",
            checked: e.panel.tableShowHeader ?? !0,
            onChange: i[0] || (i[0] = (u) => e.onChange({ tableShowHeader: u }))
          }, null, 8, ["checked"])
        ]),
        L("div", null, [
          L("div", Xre, oe(T(n)("config.field.tableCellHeight")), 1),
          h(s, {
            size: "small",
            value: e.panel.tableCellHeight ?? "medium",
            onChange: i[1] || (i[1] = (u) => e.onChange({ tableCellHeight: u.target.value }))
          }, {
            default: he(() => [
              h(l, { value: "small" }, {
                default: he(() => [
                  Le(oe(T(n)("config.tableHeight.small")), 1)
                ]),
                _: 1
              }),
              h(l, { value: "medium" }, {
                default: he(() => [
                  Le(oe(T(n)("config.tableHeight.medium")), 1)
                ]),
                _: 1
              }),
              h(l, { value: "large" }, {
                default: he(() => [
                  Le(oe(T(n)("config.tableHeight.large")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        L("div", null, [
          L("div", Qre, oe(T(n)("config.field.tableFrozenColumns")), 1),
          h(T(To), {
            size: "small",
            min: 0,
            max: 10,
            value: e.panel.tableFrozenColumns ?? 0,
            style: { width: "100%" },
            onChange: i[2] || (i[2] = (u) => e.onChange({ tableFrozenColumns: u ?? 0 }))
          }, null, 8, ["value"])
        ]),
        L("div", null, [
          L("div", Zre, oe(T(n)("config.field.tableColumnFilter")), 1),
          h(a, {
            size: "small",
            checked: e.panel.tableColumnFilter ?? !1,
            onChange: i[3] || (i[3] = (u) => e.onChange({ tableColumnFilter: u }))
          }, null, 8, ["checked"])
        ]),
        L("div", null, [
          L("div", Jre, oe(T(n)("config.field.tableWrapText")), 1),
          h(a, {
            size: "small",
            checked: e.panel.tableWrapText ?? !1,
            onChange: i[4] || (i[4] = (u) => e.onChange({ tableWrapText: u }))
          }, null, 8, ["checked"])
        ]),
        L("div", null, [
          L("div", eie, oe(T(n)("config.field.tableEnablePagination")), 1),
          h(a, {
            size: "small",
            checked: e.panel.tableEnablePagination ?? !1,
            onChange: i[5] || (i[5] = (u) => e.onChange({ tableEnablePagination: u }))
          }, null, 8, ["checked"])
        ]),
        e.panel.tableEnablePagination ? (ne(), xe("div", tie, [
          L("div", nie, oe(T(n)("config.field.tablePageSize")), 1),
          h(T(To), {
            size: "small",
            min: 5,
            max: 500,
            value: e.panel.tablePageSize ?? 20,
            style: { width: "100%" },
            onChange: i[6] || (i[6] = (u) => e.onChange({ tablePageSize: u ?? 20 }))
          }, null, 8, ["value"])
        ])) : rt("", !0),
        L("div", null, [
          L("div", oie, oe(T(n)("config.field.tableFooterEnabled")), 1),
          h(a, {
            size: "small",
            checked: e.panel.tableFooterEnabled ?? !1,
            onChange: i[7] || (i[7] = (u) => e.onChange({ tableFooterEnabled: u }))
          }, null, 8, ["checked"])
        ]),
        e.panel.tableFooterEnabled ? (ne(), xe("div", rie, [
          L("div", iie, oe(T(n)("config.field.tableFooterReducers")), 1),
          h(T(Dt), {
            size: "small",
            value: e.panel.tableFooterReducers?.[0],
            options: [
              { value: "min", label: T(n)("config.reducer.min") },
              { value: "max", label: T(n)("config.reducer.max") },
              { value: "mean", label: T(n)("config.reducer.mean") },
              { value: "sum", label: T(n)("config.reducer.sum") },
              { value: "count", label: T(n)("config.reducer.count") }
            ],
            "allow-clear": "",
            style: { width: "100%" },
            onChange: i[8] || (i[8] = (u) => o(u))
          }, null, 8, ["value", "options"])
        ])) : rt("", !0),
        e.panel.tableFooterEnabled && e.panel.tableFooterReducers?.[0] ? (ne(), xe("div", aie, [
          L("div", lie, oe(T(n)("config.field.tableFooterFields")), 1),
          h(T(Dt), {
            size: "small",
            mode: "multiple",
            "allow-clear": "",
            placeholder: T(n)("config.field.tableFooterFieldsPlaceholder"),
            value: e.panel.tableFooterFields ?? [],
            options: (e.numericFieldNames ?? []).map((u) => ({ value: u, label: u })),
            style: { width: "100%" },
            onChange: i[9] || (i[9] = (u) => e.onChange({ tableFooterFields: u.length > 0 ? u : void 0 }))
          }, null, 8, ["placeholder", "value", "options"])
        ])) : rt("", !0)
      ]);
    };
  }
}), uie = { class: "flex flex-col gap-1" }, cie = { class: "mb-2" }, die = { class: "text-xs text-secondary mb-1" }, fie = ["value", "onInput"], pie = { class: "flex items-center gap-1.5 mb-1" }, hie = ["value"], gie = { class: "text-xs text-secondary flex-1" }, vie = /* @__PURE__ */ be({
  __name: "ThresholdsEditor",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = sn(), o = ["#52c41a", "#faad14", "#ff4d4f", "#1677ff", "#722ed1", "#13c2c2", "#fa8c16"], r = ce(t.panel.thresholdMode ?? "absolute"), i = E(() => r.value === "percentage"), a = E(() => [...t.panel.thresholds].sort((f, p) => p.value - f.value));
    function l() {
      const f = [t.panel.thresholdBaseColor, ...t.panel.thresholds.map((p) => p.color)];
      return o.find((p) => !f.includes(p)) ?? "#cccccc";
    }
    function s() {
      const f = t.panel.thresholds.length > 0 ? Math.max(...t.panel.thresholds.map((m) => m.value)) : 0, v = { value: i.value ? Math.min(100, f + 20) : f + 10, color: l(), label: "" }, g = [...t.panel.thresholds, v].sort((m, x) => m.value - x.value);
      t.onChange({ thresholds: g });
    }
    function u(f) {
      t.onChange({ thresholds: t.panel.thresholds.filter((p) => p.value !== f) });
    }
    function c(f, p) {
      const v = t.panel.thresholds.map((g) => g.value === f ? { ...g, ...p } : g).sort((g, m) => g.value - m.value);
      t.onChange({ thresholds: v });
    }
    function d(f) {
      r.value = f, t.onChange({ thresholdMode: f });
    }
    return (f, p) => {
      const v = yn("a-input");
      return ne(), xe("div", uie, [
        L("div", cie, [
          L("div", die, oe(T(n)("config.threshold.mode")), 1),
          h(T(_o).Group, {
            size: "small",
            value: r.value,
            onChange: p[0] || (p[0] = (g) => d(g.target.value))
          }, {
            default: he(() => [
              h(T(_o).Button, { value: "absolute" }, {
                default: he(() => [
                  Le(oe(T(n)("config.threshold.modeAbsolute")), 1)
                ]),
                _: 1
              }),
              h(T(_o).Button, { value: "percentage" }, {
                default: he(() => [
                  Le(oe(T(n)("config.threshold.modePercentage")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        (ne(!0), xe(Je, null, Ut(a.value, (g) => (ne(), xe("div", {
          key: g.value,
          class: "flex items-center gap-1.5 mb-1"
        }, [
          L("input", {
            type: "color",
            class: "w-7 h-7 border border-gray-300 rounded cursor-pointer",
            value: g.color,
            onInput: (m) => c(g.value, { color: m.target.value })
          }, null, 40, fie),
          h(T(To), {
            size: "small",
            value: g.value,
            min: i.value ? 0 : void 0,
            max: i.value ? 100 : void 0,
            style: { width: "80px" },
            onChange: (m) => c(g.value, { value: m ?? 0 })
          }, null, 8, ["value", "min", "max", "onChange"]),
          h(v, {
            size: "small",
            value: g.label,
            placeholder: "Label",
            style: { flex: "1" },
            onChange: (m) => c(g.value, { label: m.target.value })
          }, null, 8, ["value", "onChange"]),
          h(T(Lt), {
            type: "text",
            danger: "",
            size: "small",
            onClick: (m) => u(g.value)
          }, {
            default: he(() => [
              L("span", {
                class: Pt(T(bt).delete)
              }, null, 2)
            ]),
            _: 1
          }, 8, ["onClick"])
        ]))), 128)),
        L("div", pie, [
          L("input", {
            type: "color",
            class: "w-7 h-7 border border-gray-300 rounded cursor-pointer",
            value: e.panel.thresholdBaseColor,
            onInput: p[1] || (p[1] = (g) => e.onChange({ thresholdBaseColor: g.target.value }))
          }, null, 40, hie),
          L("span", gie, oe(T(n)("config.threshold.base")), 1)
        ]),
        h(T(Lt), {
          type: "dashed",
          size: "small",
          block: "",
          onClick: s
        }, {
          default: he(() => [
            L("span", {
              class: Pt([T(bt).plus, "mr-1"])
            }, null, 2),
            Le(" " + oe(T(n)("config.threshold.add")), 1)
          ]),
          _: 1
        })
      ]);
    };
  }
}), mie = { class: "flex flex-col gap-3" }, bie = { class: "text-xs text-secondary mb-1" }, yie = { key: 0 }, xie = { class: "text-xs text-secondary mb-1" }, wie = { key: 1 }, Sie = { class: "text-xs text-secondary mb-1" }, Cie = { class: "text-xs text-secondary mb-1" }, $ie = /* @__PURE__ */ be({
  __name: "TooltipSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const { t } = sn();
    return (n, o) => {
      const r = yn("a-radio-button"), i = yn("a-radio-group"), a = yn("a-switch");
      return ne(), xe("div", mie, [
        L("div", null, [
          L("div", bie, oe(T(t)("config.field.tooltipMode")), 1),
          h(i, {
            size: "small",
            value: e.panel.tooltipMode ?? "multi",
            onChange: o[0] || (o[0] = (l) => e.onChange({ tooltipMode: l.target.value }))
          }, {
            default: he(() => [
              h(r, { value: "single" }, {
                default: he(() => [
                  Le(oe(T(t)("config.tooltip.single")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "multi" }, {
                default: he(() => [
                  Le(oe(T(t)("config.tooltip.multi")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "none" }, {
                default: he(() => [
                  Le(oe(T(t)("config.tooltip.none")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ]),
        (e.panel.tooltipMode ?? "multi") === "multi" ? (ne(), xe("div", yie, [
          L("div", xie, oe(T(t)("config.field.tooltipSort")), 1),
          h(i, {
            size: "small",
            value: e.panel.tooltipSort ?? "none",
            onChange: o[1] || (o[1] = (l) => e.onChange({ tooltipSort: l.target.value }))
          }, {
            default: he(() => [
              h(r, { value: "none" }, {
                default: he(() => [
                  Le(oe(T(t)("config.tooltip.sortNone")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "asc" }, {
                default: he(() => [
                  Le(oe(T(t)("config.tooltip.sortAsc")), 1)
                ]),
                _: 1
              }),
              h(r, { value: "desc" }, {
                default: he(() => [
                  Le(oe(T(t)("config.tooltip.sortDesc")), 1)
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["value"])
        ])) : rt("", !0),
        (e.panel.tooltipMode ?? "multi") === "multi" ? (ne(), xe("div", wie, [
          L("div", Sie, oe(T(t)("config.field.tooltipMaxHeight")), 1),
          h(T(To), {
            size: "small",
            min: 50,
            max: 800,
            value: e.panel.tooltipMaxHeight ?? 600,
            suffix: "px",
            style: { width: "100%" },
            onChange: o[2] || (o[2] = (l) => e.onChange({ tooltipMaxHeight: l ?? 600 }))
          }, null, 8, ["value"])
        ])) : rt("", !0),
        L("div", null, [
          L("div", Cie, oe(T(t)("config.field.axisPointer")), 1),
          h(a, {
            size: "small",
            checked: e.panel.showAxisPointer ?? !0,
            onChange: o[3] || (o[3] = (l) => e.onChange({ showAxisPointer: l }))
          }, null, 8, ["checked"])
        ])
      ]);
    };
  }
}), Pie = { class: "flex items-center gap-2" }, Oie = /* @__PURE__ */ be({
  __name: "SliderInput",
  props: {
    value: {},
    min: {},
    max: {},
    step: { default: 1 },
    shiftMultiplier: { default: 10 },
    unit: {},
    placeholder: {},
    allowClear: { type: Boolean, default: !1 }
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: r } = sn();
    function i(p) {
      return Math.min(n.max, Math.max(n.min, p));
    }
    const a = E(() => n.value ?? n.min), l = E(() => n.placeholder ?? r("common.auto")), s = E(() => {
      const p = n.value !== void 0 ? n.unit ? `${n.value}${n.unit}` : String(n.value) : l.value;
      try {
        const v = document.createElement("canvas").getContext("2d");
        return v ? (v.font = "14px system-ui, -apple-system, sans-serif", `${Math.ceil(v.measureText(p).width) + 24}px`) : "6ch";
      } catch {
        return "6ch";
      }
    });
    function u(p) {
      typeof p == "number" && o("change", i(p));
    }
    function c(p) {
      p != null && o("change", i(Number(p)));
    }
    function d() {
      o("change", void 0);
    }
    function f(p) {
      const v = p.shiftKey, g = n.step * (v ? n.shiftMultiplier : 1);
      p.key === "ArrowRight" || p.key === "ArrowUp" ? (p.preventDefault(), o("change", i(a.value + g))) : (p.key === "ArrowLeft" || p.key === "ArrowDown") && (p.preventDefault(), o("change", i(a.value - g)));
    }
    return (p, v) => (ne(), xe("div", Pie, [
      h(T(br), {
        min: e.min,
        max: e.max,
        step: e.step,
        value: a.value,
        style: { flex: "1" },
        "tooltip-formatter": e.unit ? ((g) => `${g}${e.unit}`) : void 0,
        onChange: u
      }, null, 8, ["min", "max", "step", "value", "tooltip-formatter"]),
      h(T(Qi).Compact, { size: "small" }, {
        default: he(() => [
          h(T(To), {
            size: "small",
            controls: !1,
            min: e.min,
            max: e.max,
            step: e.step,
            value: e.value ?? void 0,
            placeholder: l.value,
            style: Bt({ width: s.value }),
            suffix: e.unit && e.value !== void 0 ? e.unit : void 0,
            onKeydown: f,
            onChange: c
          }, null, 8, ["min", "max", "step", "value", "placeholder", "style", "suffix"]),
          e.allowClear && e.value !== void 0 ? (ne(), ft(T(Lt), {
            key: 0,
            onClick: d
          }, {
            default: he(() => [
              L("span", {
                class: Pt([T(bt).closeCircle, "text-xs text-gray-400 cursor-pointer"])
              }, null, 2)
            ]),
            _: 1
          })) : rt("", !0)
        ]),
        _: 1
      })
    ]));
  }
}), kie = { class: "flex flex-col gap-3" }, Iie = { key: 0 }, _ie = { class: "text-xs text-secondary mb-1" }, Tie = { class: "text-xs text-secondary mb-1" }, Mie = { class: "text-xs text-secondary mb-1" }, Eie = { key: 1 }, Die = { class: "text-xs text-secondary mb-1" }, Aie = { key: 2 }, Nie = { class: "text-xs text-secondary mb-1" }, Rie = /* @__PURE__ */ be({
  __name: "ValueSection",
  props: {
    panel: {},
    onChange: { type: Function },
    numericFieldNames: {},
    allFieldNames: {}
  },
  setup(e) {
    const t = e, { t: n } = sn(), r = ["", "ms", "s", "bytes", "percent", "percentunit", "reqps", "ops", "bps", "Bps"].map((s) => ({
      value: s,
      label: n(s ? `config.unit.${s}` : "config.unit.none")
    })), i = [
      { value: "lastNotNull", label: n("config.reducer.lastNotNull") },
      { value: "last", label: n("config.reducer.last") },
      { value: "firstNotNull", label: n("config.reducer.firstNotNull") },
      { value: "first", label: n("config.reducer.first") },
      { value: "mean", label: n("config.reducer.mean") },
      { value: "min", label: n("config.reducer.min") },
      { value: "max", label: n("config.reducer.max") },
      { value: "sum", label: n("config.reducer.sum") },
      { value: "count", label: n("config.reducer.count") }
    ], a = t.panel.type === "gauge", l = t.panel.type !== "timeseries";
    return (s, u) => (ne(), xe("div", kie, [
      l ? (ne(), xe("div", Iie, [
        L("div", _ie, oe(T(n)("config.field.reducer")), 1),
        h(T(Dt), {
          size: "small",
          value: e.panel.statReducer ?? "lastNotNull",
          options: i,
          style: { width: "100%" },
          onChange: u[0] || (u[0] = (c) => e.onChange({ statReducer: c }))
        }, null, 8, ["value"])
      ])) : rt("", !0),
      L("div", null, [
        L("div", Tie, oe(T(n)("config.field.unit")), 1),
        h(T(Dt), {
          size: "small",
          value: e.panel.unit || "",
          options: T(r),
          style: { width: "100%" },
          onChange: u[1] || (u[1] = (c) => e.onChange({ unit: c }))
        }, null, 8, ["value", "options"])
      ]),
      L("div", null, [
        L("div", Mie, oe(T(n)("config.field.decimals")), 1),
        h(Oie, {
          min: 0,
          max: 15,
          step: 1,
          value: e.panel.decimals,
          "allow-clear": !0,
          onChange: u[2] || (u[2] = (c) => e.onChange({ decimals: c }))
        }, null, 8, ["value"])
      ]),
      a ? (ne(), xe("div", Eie, [
        L("div", Die, oe(T(n)("config.field.min")), 1),
        h(T(To), {
          size: "small",
          value: e.panel.min,
          style: { width: "100%" },
          onChange: u[3] || (u[3] = (c) => e.onChange({ min: c ?? 0 }))
        }, null, 8, ["value"])
      ])) : rt("", !0),
      a ? (ne(), xe("div", Aie, [
        L("div", Nie, oe(T(n)("config.field.max")), 1),
        h(T(To), {
          size: "small",
          value: e.panel.max,
          style: { width: "100%" },
          onChange: u[4] || (u[4] = (c) => e.onChange({ max: c ?? 100 }))
        }, null, 8, ["value"])
      ])) : rt("", !0)
    ]));
  }
}), zie = { class: "h-full flex flex-col overflow-hidden" }, Fie = {
  class: "flex-shrink-0 px-2 bg-primary/10 py-1",
  style: { "border-bottom": "1px solid #eee" }
}, Bie = { class: "flex-1 overflow-y-auto" }, Lie = /* @__PURE__ */ be({
  __name: "OptionsPane",
  setup(e) {
    const t = [
      "timeseries",
      "bar",
      "histogram",
      "stat",
      "gauge",
      "table",
      "pie"
    ], { t: n } = sn(), { panel: o, onChange: r, numericFieldNames: i, allFieldNames: a } = vc(), l = E(
      () => t.map((p) => ({
        value: p,
        label: n(`config.type.${p}`)
      }))
    ), s = ce(""), u = {
      general: NP,
      style: Yre,
      tooltip: $ie,
      axes: eoe,
      value: Rie,
      // timeseries / bar / histogram
      "bar-style": uoe,
      "histogram-style": ere,
      // stat
      "stat-style": $re,
      // gauge
      "gauge-style": _oe,
      // pie
      "pie-style": bre,
      // table
      "table-style": sie,
      // overrides
      overrides: RP
    }, c = E(() => {
      const v = (i4(o.value.type)?.optionCategories ?? []).map((g) => ({
        key: g.key,
        label: n(g.labelKey),
        component: u[g.key] ?? NP
      }));
      return v.push({
        key: "thresholds",
        label: n("config.section.thresholds", { n: o.value.thresholds.length }),
        component: vie
      }), v.push({
        key: "overrides",
        label: n("config.section.overrides"),
        component: RP
      }), v;
    }), d = E(() => {
      if (!s.value.trim())
        return c.value;
      const p = s.value.toLowerCase();
      return c.value.filter(
        (v) => typeof v.label == "string" && v.label.toLowerCase().includes(p)
      );
    }), f = ce(["general"]);
    return (p, v) => (ne(), xe("div", zie, [
      L("div", Fie, [
        h(T(Dt), {
          class: "text-primary",
          bordered: !1,
          value: T(o).type,
          size: "small",
          variant: "filled",
          options: l.value,
          "onUpdate:value": v[0] || (v[0] = (g) => T(r)({ type: g }))
        }, null, 8, ["value", "options"])
      ]),
      L("div", Bie, [
        h(T(_l), {
          "active-key": f.value,
          "onUpdate:activeKey": v[1] || (v[1] = (g) => f.value = g),
          bordered: !1,
          accordion: "",
          size: "small"
        }, {
          default: he(() => [
            (ne(!0), xe(Je, null, Ut(d.value, (g) => (ne(), ft(T(_l).Panel, {
              key: g.key,
              header: g.label
            }, {
              default: he(() => [
                (ne(), ft(YP(g.component), {
                  panel: T(o),
                  "on-change": T(r),
                  "numeric-field-names": T(i),
                  "all-field-names": T(a)
                }, null, 40, ["panel", "on-change", "numeric-field-names", "all-field-names"]))
              ]),
              _: 2
            }, 1032, ["header"]))), 128))
          ]),
          _: 1
        }, 8, ["active-key"])
      ])
    ]));
  }
}), ME = /* @__PURE__ */ be({
  __name: "PanelLinksIcon",
  props: {
    links: {},
    iconColor: {}
  },
  setup(e) {
    const t = e;
    function n(r) {
      r.url && window.open(r.url, r.newTab ? "_blank" : "_self", "noopener,noreferrer");
    }
    const o = E(() => t.links.filter((r) => r.url));
    return (r, i) => o.value.length === 0 ? (ne(), xe(Je, { key: 0 }, [], 64)) : o.value.length === 1 ? (ne(), ft(T(Lo), {
      key: 1,
      title: o.value[0].title || o.value[0].url,
      placement: "bottom"
    }, {
      default: he(() => [
        L("span", {
          class: Pt([T(bt).link, "flex-shrink-0 cursor-pointer text-xs"]),
          style: Bt({ color: e.iconColor }),
          onClick: i[0] || (i[0] = ur((a) => n(o.value[0]), ["stop"]))
        }, null, 6)
      ]),
      _: 1
    }, 8, ["title"])) : (ne(), ft(T(Mr), {
      key: 2,
      trigger: ["hover", "click"],
      placement: "bottomLeft"
    }, {
      overlay: he(() => [
        h(T(fo), null, {
          default: he(() => [
            (ne(!0), xe(Je, null, Ut(o.value, (a, l) => (ne(), ft(T(fo).Item, {
              key: l,
              onClick: (s) => n(a)
            }, {
              default: he(() => [
                Le(oe(a.title || a.url), 1)
              ]),
              _: 2
            }, 1032, ["onClick"]))), 128))
          ]),
          _: 1
        })
      ]),
      default: he(() => [
        L("span", {
          class: Pt([T(bt).link, "flex-shrink-0 cursor-pointer text-xs"]),
          style: Bt({ color: e.iconColor }),
          onClick: i[1] || (i[1] = ur(() => {
          }, ["stop"]))
        }, null, 6)
      ]),
      _: 1
    }));
  }
}), Hie = {
  key: 0,
  class: "legend-search-container"
}, Vie = ["value"], jie = { class: "legend-table-wrap" }, Wie = { class: "legend-table" }, Kie = ["data-legend-item-id"], qie = { class: "legend-table-td legend-table-name-col" }, Yie = ["data-legend-tooltip"], Gie = { class: "legend-label" }, Uie = {
  key: 0,
  class: "legend-search-container"
}, Xie = ["value"], Qie = {
  key: 1,
  class: "legend-empty-state"
}, Zie = { class: "virtuoso-grid-list" }, Jie = ["data-legend-item-id"], eae = ["data-legend-tooltip"], tae = { class: "legend-label" }, nae = {
  key: 0,
  class: "legend-item-values"
}, oae = { class: "legend-item-value-key" }, rae = { class: "legend-item-value-num" }, iae = ["data-legend-tooltip", "onClick"], aae = {
  key: 0,
  width: "12",
  height: "12",
  viewBox: "0 0 24 24",
  fill: "none",
  stroke: "currentColor",
  "stroke-width": "2"
}, lae = {
  key: 1,
  width: "12",
  height: "12",
  viewBox: "0 0 24 24",
  fill: "none",
  stroke: "currentColor",
  "stroke-width": "2"
}, sae = /* @__PURE__ */ be({
  __name: "ChartLegend",
  props: {
    items: {},
    uPlotInstance: {},
    position: { default: "bottom" },
    mode: { default: "list" },
    unit: {},
    decimals: {},
    averageLegendWidth: { default: 40 },
    values: { default: () => [] },
    data: {}
  },
  setup(e) {
    const t = e, n = ce(null), o = ce(""), r = ce(null), i = ce(!1), a = ce(), l = ce({});
    function s(M) {
      const N = {};
      M.series.forEach((A, H) => {
        H !== 0 && (N[H] = A.show ?? !0);
      }), l.value = { ...N };
    }
    function u(M, N, A) {
      !N || typeof A.show != "boolean" || (l.value = { ...l.value, [N]: A.show });
    }
    ke(
      () => t.uPlotInstance,
      (M, N) => {
        if (N && (N.hooks.setSeries = (N.hooks.setSeries ?? []).filter(
          (A) => A.__legendSync !== !0
        )), M) {
          s(M);
          const A = (H, B, F) => u(H, B, F);
          A.__legendSync = !0, M.hooks.setSeries = [...M.hooks.setSeries ?? [], A];
        } else
          l.value = {};
      },
      { immediate: !0 }
    );
    const c = {
      last: "Last *",
      first: "First *",
      min: "Min",
      max: "Max",
      mean: "Avg",
      sum: "Sum"
    };
    function d(M) {
      const N = M.filter(
        (H) => H != null && !Number.isNaN(H)
      );
      if (N.length === 0)
        return { last: null, first: null, min: null, max: null, mean: null, sum: null };
      const A = N.reduce((H, B) => H + B, 0);
      return {
        last: N[N.length - 1],
        first: N[0],
        min: Math.min(...N),
        max: Math.max(...N),
        mean: A / N.length,
        sum: A
      };
    }
    function f(M, N) {
      return M === null ? "—" : Math.abs(M) >= 1e6 ? N !== void 0 ? `${(M / 1e6).toFixed(N)}M` : `${M / 1e6}M` : Math.abs(M) >= 1e3 ? N !== void 0 ? `${(M / 1e3).toFixed(N)}K` : `${M / 1e3}K` : N !== void 0 ? M.toFixed(N) : String(M);
    }
    const p = E(
      () => Object.values(t.items).map((M) => ({
        ...M,
        show: l.value[M.seriesIndex] ?? M.show ?? !0
      }))
    ), v = E(() => {
      if (t.position !== "right" || !o.value.trim())
        return p.value;
      const M = o.value.trim().toLowerCase();
      return p.value.filter((N) => N.label?.toLowerCase().includes(M));
    }), g = E(() => t.position !== "right" || !o.value.trim() ? !1 : v.value.length === 0), m = E(() => {
      if (!t.data || t.values.length === 0)
        return {};
      const M = {};
      return p.value.forEach((N) => {
        const A = t.data[N.seriesIndex];
        M[N.seriesIndex] = d(A ?? []);
      }), M;
    }), { onToggleSeriesOnOff: x, onToggleSeriesVisibility: S } = {
      onToggleSeriesOnOff(M) {
        const N = t.uPlotInstance;
        if (!N)
          return;
        const A = N.series[M];
        A && N.setSeries(M, { show: !A.show });
      },
      onToggleSeriesVisibility(M) {
        const N = t.uPlotInstance;
        if (!N)
          return;
        const A = n.value === M;
        N.series.forEach((H, B) => {
          B !== 0 && N.setSeries(B, { show: A || B === M });
        }), n.value = A ? null : M;
      }
    };
    function C(M) {
      const N = M.target.closest("[data-legend-item-id]");
      if (!N)
        return null;
      const A = Number(N.dataset.legendItemId);
      return Number.isNaN(A) ? null : A;
    }
    function P(M) {
      const N = C(M);
      if (N === null)
        return;
      if (!!M.target.dataset.isLegendMarker) {
        x(N);
        return;
      }
      S(N);
    }
    async function $(M, N) {
      try {
        await navigator.clipboard.writeText(N), r.value = M, setTimeout(() => {
          r.value = null;
        }, 2e3);
      } catch {
      }
    }
    function I(M) {
      const N = M.target;
      o.value = N.value;
    }
    function w() {
      if (!a.value || t.position !== "bottom") {
        i.value = !1;
        return;
      }
      const N = a.value.clientWidth;
      if (N === 0)
        return;
      const A = p.value.length * (t.averageLegendWidth + 16);
      i.value = Math.ceil(A / N) <= 1;
    }
    let _ = null;
    return Nt(() => {
      w(), a.value && t.position === "bottom" && (_ = new ResizeObserver(w), _.observe(a.value));
    }), jo(() => {
      _ && _.disconnect();
    }), ke([() => t.averageLegendWidth, () => p.value.length, () => t.position], () => {
      w();
    }), (M, N) => e.mode === "table" && e.values.length > 0 ? (ne(), xe("div", {
      key: 0,
      ref_key: "legendContainerRef",
      ref: a,
      class: "legend-container legend-table-mode",
      onClick: P
    }, [
      e.position === "right" ? (ne(), xe("div", Hie, [
        L("input", {
          type: "text",
          placeholder: "Search...",
          value: o.value,
          class: "legend-search-input",
          onInput: I
        }, null, 40, Vie)
      ])) : rt("", !0),
      L("div", jie, [
        L("table", Wie, [
          L("thead", null, [
            L("tr", null, [
              N[0] || (N[0] = L("th", { class: "legend-table-th legend-table-name-col" }, " Name ", -1)),
              (ne(!0), xe(Je, null, Ut(e.values, (A) => (ne(), xe("th", {
                key: A,
                class: "legend-table-th legend-table-val-col"
              }, oe(c[A]), 1))), 128))
            ])
          ]),
          L("tbody", null, [
            (ne(!0), xe(Je, null, Ut(v.value, (A) => (ne(), xe("tr", {
              key: A.seriesIndex,
              "data-legend-item-id": A.seriesIndex,
              class: Pt(["legend-table-row", [
                A.show ? "" : "legend-item-off",
                n.value === A.seriesIndex ? "legend-item-focused" : ""
              ]])
            }, [
              L("td", qie, [
                L("div", {
                  class: "legend-item-label-trigger",
                  "data-legend-tooltip": A.label
                }, [
                  L("div", {
                    class: "legend-marker",
                    style: Bt({ borderColor: A.color }),
                    "data-is-legend-marker": !0
                  }, null, 4),
                  L("span", Gie, oe(A.label), 1)
                ], 8, Yie)
              ]),
              (ne(!0), xe(Je, null, Ut(e.values, (H) => (ne(), xe("td", {
                key: H,
                class: "legend-table-td legend-table-val-col"
              }, oe(m.value[A.seriesIndex] ? f(m.value[A.seriesIndex][H], e.decimals) : "—"), 1))), 128))
            ], 10, Kie))), 128))
          ])
        ])
      ])
    ], 512)) : (ne(), xe("div", {
      key: 1,
      ref_key: "legendContainerRef",
      ref: a,
      class: Pt(["legend-container", [e.position === "bottom" ? "legend-container-bottom" : ""]]),
      style: Bt({ "--legend-average-width": `${e.averageLegendWidth + 16}px` }),
      onClick: P
    }, [
      e.position === "right" ? (ne(), xe("div", Uie, [
        L("input", {
          type: "text",
          placeholder: "Search...",
          value: o.value,
          class: "legend-search-input",
          onInput: I
        }, null, 40, Xie)
      ])) : rt("", !0),
      g.value ? (ne(), xe("div", Qie, ' No series found matching "' + oe(o.value) + '" ', 1)) : (ne(), xe("div", {
        key: 2,
        class: Pt(["legend-virtuoso-container", [
          `legend-virtuoso-container-${e.position}`,
          i.value ? "legend-virtuoso-container-single-row" : ""
        ]])
      }, [
        L("div", Zie, [
          (ne(!0), xe(Je, null, Ut(v.value, (A) => (ne(), xe("div", {
            key: A.seriesIndex,
            class: "virtuoso-grid-item"
          }, [
            L("div", {
              "data-legend-item-id": A.seriesIndex,
              class: Pt(["legend-item", [
                `legend-item-${e.position}`,
                A.show ? "" : "legend-item-off",
                n.value === A.seriesIndex ? "legend-item-focused" : ""
              ]])
            }, [
              L("div", {
                class: "legend-item-label-trigger",
                "data-legend-tooltip": A.label
              }, [
                L("div", {
                  class: "legend-marker",
                  style: Bt({ borderColor: A.color }),
                  "data-is-legend-marker": !0
                }, null, 4),
                L("span", tae, oe(A.label), 1)
              ], 8, eae),
              m.value[A.seriesIndex] && e.values.length > 0 ? (ne(), xe("span", nae, [
                (ne(!0), xe(Je, null, Ut(e.values, (H) => (ne(), xe("span", {
                  key: H,
                  class: "legend-item-value-badge"
                }, [
                  L("span", oae, oe(c[H]) + ":", 1),
                  L("span", rae, oe(f(m.value[A.seriesIndex][H], e.decimals)), 1)
                ]))), 128))
              ])) : rt("", !0),
              L("button", {
                type: "button",
                class: "legend-copy-button",
                "data-legend-tooltip": r.value === A.seriesIndex ? "Copied" : "Copy",
                onClick: ur((H) => $(A.seriesIndex, A.label ?? ""), ["stop"])
              }, [
                r.value === A.seriesIndex ? (ne(), xe("svg", aae, [...N[1] || (N[1] = [
                  L("path", { d: "M20 6L9 17l-5-5" }, null, -1)
                ])])) : (ne(), xe("svg", lae, [...N[2] || (N[2] = [
                  L("rect", {
                    x: "9",
                    y: "9",
                    width: "13",
                    height: "13",
                    rx: "2",
                    ry: "2"
                  }, null, -1),
                  L("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)
                ])]))
              ], 8, iae)
            ], 10, Jie)
          ]))), 128))
        ])
      ], 2))
    ], 6));
  }
}), uae = /* @__PURE__ */ wr(sae, [["__scopeId", "data-v-85a1707f"]]), cae = { class: "footer" }, dae = {
  key: 0,
  class: "hint"
}, fae = { class: "kbd active" }, pae = {
  key: 1,
  class: "hint-list"
}, hae = {
  class: "hint",
  "data-active": "false"
}, gae = { class: "kbd" }, vae = /* @__PURE__ */ be({
  __name: "TooltipFooter",
  props: {
    isPinned: { type: Boolean },
    pinKey: { default: "P" }
  },
  emits: ["dismiss"],
  setup(e, { emit: t }) {
    const n = t;
    return (o, r) => (ne(), xe("div", cae, [
      L("div", null, [
        e.isPinned ? (ne(), xe("div", dae, [
          r[1] || (r[1] = L("span", null, "按", -1)),
          L("kbd", fae, oe(e.pinKey), 1),
          r[2] || (r[2] = L("span", null, "或", -1)),
          r[3] || (r[3] = L("kbd", { class: "kbd active" }, "Esc", -1)),
          r[4] || (r[4] = L("span", null, "取消固定", -1))
        ])) : (ne(), xe("div", pae, [
          L("div", hae, [
            r[5] || (r[5] = L("span", null, "按", -1)),
            L("kbd", gae, oe(e.pinKey), 1),
            r[6] || (r[6] = L("span", null, "固定提示框", -1))
          ])
        ]))
      ]),
      e.isPinned ? (ne(), xe("button", {
        key: 0,
        class: "unpin-btn",
        onClick: r[0] || (r[0] = (i) => n("dismiss"))
      }, [...r[7] || (r[7] = [
        L("svg", {
          width: "10",
          height: "10",
          viewBox: "0 0 24 24",
          fill: "none",
          stroke: "currentColor",
          "stroke-width": "2"
        }, [
          L("path", { d: "M18 6L6 18" }),
          L("path", { d: "M6 6l12 12" })
        ], -1),
        L("span", null, "取消固定", -1)
      ])])) : rt("", !0)
    ]));
  }
}), mae = /* @__PURE__ */ wr(vae, [["__scopeId", "data-v-75c52e2f"]]), bae = ["data-is-active"], yae = { class: "tooltip-item-label" }, xae = /* @__PURE__ */ be({
  __name: "TooltipItem",
  props: {
    item: {},
    isItemActive: { type: Boolean }
  },
  setup(e) {
    return (t, n) => (ne(), xe("div", {
      class: "tooltip-item",
      "data-is-active": e.isItemActive
    }, [
      L("div", {
        class: "tooltip-item-marker",
        style: Bt({ borderColor: e.item.color })
      }, null, 4),
      L("div", {
        class: "tooltip-item-content",
        style: Bt({ color: e.item.color })
      }, [
        L("span", yae, oe(e.item.label), 1),
        L("span", {
          class: "tooltip-item-separator",
          style: Bt({ borderColor: e.item.color })
        }, null, 4),
        L("span", null, oe(e.item.tooltipValue), 1)
      ], 4)
    ], 8, bae));
  }
}), EE = /* @__PURE__ */ wr(xae, [["__scopeId", "data-v-3b1d92d5"]]), wae = { class: "header-container" }, Sae = {
  key: 0,
  class: "header-row"
}, Cae = {
  key: 0,
  class: "header-status"
}, $ae = {
  key: 1,
  class: "header-pinned-item"
}, Pae = /* @__PURE__ */ be({
  __name: "TooltipHeader",
  props: {
    uPlotInstance: {},
    showTooltipHeader: { type: Boolean },
    isPinned: { type: Boolean },
    activeItem: {},
    headerTitle: {}
  },
  setup(e) {
    return (t, n) => (ne(), xe("div", wae, [
      e.showTooltipHeader && e.headerTitle ? (ne(), xe("div", Sae, [
        L("span", null, oe(e.headerTitle), 1),
        e.isPinned ? (ne(), xe("div", Cae, [...n[0] || (n[0] = [
          L("svg", {
            width: "12",
            height: "12",
            viewBox: "0 0 24 24",
            fill: "none",
            stroke: "currentColor",
            "stroke-width": "2"
          }, [
            L("path", { d: "M12 2v4" }),
            L("path", { d: "M19 10h-7l-5 5v7h10v-7l-5-5z" })
          ], -1),
          L("span", null, "已固定", -1)
        ])])) : rt("", !0)
      ])) : rt("", !0),
      e.activeItem ? (ne(), xe("div", $ae, [
        h(EE, {
          item: e.activeItem,
          "is-item-active": !0
        }, null, 8, ["item"])
      ])) : rt("", !0)
    ]));
  }
}), Oae = /* @__PURE__ */ wr(Pae, [["__scopeId", "data-v-efb4cf97"]]), kae = /* @__PURE__ */ be({
  __name: "TooltipList",
  props: {
    content: {},
    maxHeight: { default: 300 }
  },
  setup(e) {
    return (t, n) => (ne(), xe("div", {
      class: "tooltip-list",
      style: Bt({ maxHeight: `${e.maxHeight}px`, overflowY: "auto" })
    }, [
      (ne(!0), xe(Je, null, Ut(e.content, (o) => (ne(), ft(EE, {
        key: o.label,
        item: o,
        "is-item-active": !1
      }, null, 8, ["item"]))), 128))
    ], 4));
  }
}), Iae = /* @__PURE__ */ wr(kae, [["__scopeId", "data-v-fa17493a"]]), _ae = {
  key: 1,
  class: "tooltip-divider"
}, Tae = /* @__PURE__ */ be({
  __name: "Tooltip",
  props: {
    uPlotInstance: {},
    content: {},
    headerTitle: {},
    isPinned: { type: Boolean },
    canPinTooltip: { type: Boolean, default: !0 },
    showTooltipHeader: { type: Boolean, default: !0 },
    tooltipMaxHeight: { default: 300 }
  },
  emits: ["dismiss"],
  setup(e, { emit: t }) {
    const n = e, o = t, r = E(() => n.content.find((s) => s.isActive) ?? null), i = E(() => n.showTooltipHeader || r.value != null), a = E(() => n.content.length > 1), l = E(() => a.value && i.value);
    return (s, u) => (ne(), xe("div", {
      class: Pt(["tooltip-container", { pinned: e.isPinned }])
    }, [
      i.value ? (ne(), ft(Oae, {
        key: 0,
        "u-plot-instance": e.uPlotInstance,
        "show-tooltip-header": e.showTooltipHeader,
        "is-pinned": e.isPinned,
        "active-item": r.value,
        "header-title": e.headerTitle
      }, null, 8, ["u-plot-instance", "show-tooltip-header", "is-pinned", "active-item", "header-title"])) : rt("", !0),
      l.value ? (ne(), xe("span", _ae)) : rt("", !0),
      a.value ? (ne(), ft(Iae, {
        key: 2,
        content: e.content,
        "max-height": e.tooltipMaxHeight
      }, null, 8, ["content", "max-height"])) : rt("", !0),
      e.canPinTooltip ? (ne(), ft(mae, {
        key: 3,
        "is-pinned": e.isPinned,
        style: Bt({ pointerEvents: e.isPinned ? "auto" : "none" }),
        onDismiss: u[0] || (u[0] = (c) => o("dismiss"))
      }, null, 8, ["is-pinned", "style"])) : rt("", !0)
    ], 2));
  }
}), Mae = /* @__PURE__ */ wr(Tae, [["__scopeId", "data-v-4b92f289"]]), Eae = /* @__PURE__ */ be({
  __name: "ChartTooltip",
  props: {
    uPlotInstance: {},
    unit: { default: "" },
    decimals: {},
    canPinTooltip: { type: Boolean, default: !0 },
    tooltipMode: { default: "multi" },
    tooltipSort: { default: "none" },
    showTooltipHeader: { type: Boolean, default: !0 },
    tooltipMaxHeight: { default: 300 }
  },
  setup(e) {
    const t = e, n = ce(), o = ce(!1), r = ce(!1), i = ce(""), a = ce([]), l = {
      hoverActive: !1,
      pinned: !1,
      focusedSeriesIndex: null,
      seriesIndexes: [],
      mouseWithinPlot: !1,
      windowWidth: window.innerWidth - 16,
      windowHeight: window.innerHeight - 16,
      tooltipW: 0,
      tooltipH: 0
    };
    let s = null;
    function u() {
      s === null && (s = requestAnimationFrame(() => {
        s = null, g();
      }));
    }
    function c(B, F, R) {
      return typeof B == "function" ? String(B(F, R)) : typeof B == "string" ? B : "#cccccc";
    }
    function d(B, F, R) {
      const X = R !== void 0 ? B.toFixed(R) : String(Math.round(B * 1e3) / 1e3);
      return F ? `${X} ${F}` : X;
    }
    function f(B) {
      if (t.tooltipMode === "none")
        return [];
      const F = B.cursor.idx, R = [];
      for (let X = 1; X < B.series.length; X++) {
        const j = B.series[X];
        if (!j?.show)
          continue;
        let ee = l.seriesIndexes[X] ?? null;
        if (t.tooltipMode === "single") {
          if (X !== l.focusedSeriesIndex)
            continue;
          ee = F ?? ee;
        } else
          ee = ee ?? F ?? null;
        if (ee === null)
          continue;
        const W = B.data[X]?.[ee];
        W == null || !Number.isFinite(W) || R.push({
          label: String(j.label ?? `Series ${X}`),
          value: W,
          tooltipValue: d(W, t.unit, t.decimals),
          color: c(j.stroke, B, X),
          isActive: X === l.focusedSeriesIndex
        });
      }
      return t.tooltipSort === "asc" && R.sort((X, j) => X.value - j.value), t.tooltipSort === "desc" && R.sort((X, j) => j.value - X.value), R;
    }
    function p(B) {
      if (!t.showTooltipHeader)
        return "";
      const F = B.cursor.idx;
      if (F == null)
        return "";
      const R = B.data[0]?.[F];
      return R == null ? "" : B.scales.x?.time ? new Date(R * 1e3).toLocaleString() : String(R);
    }
    function v(B) {
      const F = n.value;
      if (!F)
        return;
      const { left: R = -1, top: X = -1 } = B.cursor;
      if (R < 0 || X < 0)
        return;
      const j = B.rect.left + R, ee = B.rect.top + X, W = F.offsetWidth, K = F.offsetHeight;
      l.tooltipW = W, l.tooltipH = K;
      const q = j + 14 + W > l.windowWidth ? -(W + 14) : 14, G = ee - 8 + K > l.windowHeight ? -(K - 8) : -8;
      F.style.transform = `translate(${j + q}px, ${ee + G}px)`;
    }
    function g() {
      const B = t.uPlotInstance;
      if (!B || !l.hoverActive && !l.pinned) {
        o.value = !1;
        return;
      }
      const F = f(B);
      if (F.length === 0) {
        l.pinned || (o.value = !1);
        return;
      }
      a.value = F, i.value = p(B), r.value = l.pinned, l.pinned || v(B), o.value = !0;
    }
    function m(B) {
      if (l.pinned)
        return;
      const F = B.cursor.idxs;
      F && (l.seriesIndexes = [...F], l.hoverActive = l.seriesIndexes.some((R, X) => X > 0 && R != null) && l.focusedSeriesIndex != null, u());
    }
    function x(B, F, R) {
      !("focus" in R) || l.pinned || (l.focusedSeriesIndex = F ?? null, l.hoverActive = l.focusedSeriesIndex != null, u());
    }
    function S(B) {
      if (l.pinned || !l.hoverActive)
        return;
      const F = n.value;
      if (!F)
        return;
      const { left: R = -1, top: X = -1 } = B.cursor;
      if (R < 0 || X < 0)
        return;
      const j = B.rect.left + R, ee = B.rect.top + X, W = F.offsetWidth, K = F.offsetHeight;
      l.tooltipW = W, l.tooltipH = K;
      const q = j + 14 + W > l.windowWidth ? -(W + 14) : 14, G = ee - 8 + K > l.windowHeight ? -(K - 8) : -8;
      F.style.transform = `translate(${j + q}px, ${ee + G}px)`;
    }
    function C() {
      const B = t.uPlotInstance;
      !B || !l.hoverActive || (l.pinned = !0, B.cursor._lock = !0, r.value = !0, document.addEventListener("mousedown", $, !0));
    }
    function P() {
      const B = t.uPlotInstance;
      l.pinned = !1, l.hoverActive = !1, B && (B.cursor._lock = !1), r.value = !1, o.value = !1, document.removeEventListener("mousedown", $, !0);
    }
    function $(B) {
      n.value && !n.value.contains(B.target) && P();
    }
    function I(B) {
      if (B.key === "Escape") {
        l.pinned && P();
        return;
      }
      B.key.toLowerCase() === "p" && l.mouseWithinPlot && (l.pinned ? P() : C());
    }
    function w() {
      l.mouseWithinPlot = !0;
    }
    function _() {
      l.mouseWithinPlot = !1;
    }
    function M() {
      l.windowWidth = window.innerWidth - 16, l.windowHeight = window.innerHeight - 16, l.pinned || (l.hoverActive = !1);
    }
    let N = [];
    function A(B) {
      const F = (j) => m(j), R = (j, ee, W) => x(j, ee, W), X = (j) => S(j);
      B.hooks.setLegend = [...B.hooks.setLegend ?? [], F], B.hooks.setSeries = [...B.hooks.setSeries ?? [], R], B.hooks.setCursor = [...B.hooks.setCursor ?? [], X], B.root.addEventListener("mouseenter", w), B.root.addEventListener("mouseleave", _), N = [
        () => {
          B.hooks.setLegend = (B.hooks.setLegend ?? []).filter(
            (j) => j !== F
          ), B.hooks.setSeries = (B.hooks.setSeries ?? []).filter(
            (j) => j !== R
          ), B.hooks.setCursor = (B.hooks.setCursor ?? []).filter(
            (j) => j !== X
          ), B.root.removeEventListener("mouseenter", w), B.root.removeEventListener("mouseleave", _);
        }
      ];
    }
    function H() {
      N.forEach((B) => B()), N = [], document.removeEventListener("mousedown", $, !0), l.hoverActive = !1, l.pinned = !1, l.focusedSeriesIndex = null, o.value = !1, r.value = !1, s !== null && (cancelAnimationFrame(s), s = null);
    }
    return ke(
      () => t.uPlotInstance,
      (B, F) => {
        F && H(), B && A(B);
      },
      { immediate: !0 }
    ), Nt(() => {
      document.addEventListener("keydown", I, !0), window.addEventListener("resize", M);
    }), jo(() => {
      H(), document.removeEventListener("keydown", I, !0), window.removeEventListener("resize", M);
    }), (B, F) => (ne(), ft(nh, { to: "body" }, [
      ti(L("div", {
        ref_key: "containerRef",
        ref: n,
        style: { position: "fixed", top: "0", left: "0", "z-index": "1070", "pointer-events": "none" }
      }, [
        e.uPlotInstance ? (ne(), ft(Mae, {
          key: 0,
          "u-plot-instance": e.uPlotInstance,
          content: a.value,
          "header-title": i.value,
          "is-pinned": r.value,
          "can-pin-tooltip": e.canPinTooltip,
          "show-tooltip-header": e.showTooltipHeader,
          "tooltip-max-height": e.tooltipMaxHeight,
          onDismiss: P
        }, null, 8, ["u-plot-instance", "content", "header-title", "is-pinned", "can-pin-tooltip", "show-tooltip-header", "tooltip-max-height"])) : rt("", !0)
      ], 512), [
        [Oi, o.value && e.tooltipMode !== "none"]
      ])
    ]));
  }
}), DE = Symbol("plotContext");
function Dae() {
  const e = ce(null), t = ce(""), n = ce(!1);
  let o;
  function r(c) {
    e.value = c.uPlotInstance, c.id !== void 0 && (t.value = c.id), c.shouldSaveSelectionPreference !== void 0 && (n.value = c.shouldSaveSelectionPreference), o = void 0;
  }
  function i() {
    const c = e.value;
    if (!c || !t.value)
      return;
    const d = c.series.map((f) => ({
      label: f.label ?? "",
      show: f.show ?? !0
    }));
    P4(t.value, d);
  }
  function a(c) {
    const d = e.value;
    if (!d)
      return;
    const f = o === c;
    o = f ? void 0 : c, d.batch(() => {
      d.series.forEach((p, v) => {
        v !== 0 && d.setSeries(v, {
          show: f || v === c
        });
      }), t.value && n.value && i();
    });
  }
  function l(c) {
    const d = e.value;
    if (!d)
      return;
    const f = d.series[c];
    f && (d.setSeries(c, { show: !f.show }), t.value && n.value && i());
  }
  function s(c) {
    const d = e.value;
    d && d.batch(() => {
      d.series.forEach((f, p) => {
        p !== 0 && d.setSeries(p, {
          show: c === null || p === c
        });
      });
    });
  }
  const u = {
    uPlotInstance: e,
    id: t,
    shouldSaveSelectionPreference: n,
    setPlotContextInitialState: r,
    onToggleSeriesVisibility: a,
    onToggleSeriesOnOff: l,
    onFocusSeries: s,
    syncSeriesVisibilityToLocalStorage: i
  };
  return Ft(DE, u), u;
}
function Jfe() {
  const e = zt(DE);
  if (!e)
    throw new Error("usePlotContext must be used within a PlotContextProvider");
  return e;
}
const Aae = { style: { position: "relative", overflow: "hidden" } }, Nae = /* @__PURE__ */ be({
  __name: "UPlotChart",
  props: {
    config: {},
    data: {},
    width: {},
    height: {},
    plotRef: {},
    onDestroy: {}
  },
  emits: ["plotReady"],
  setup(e, { expose: t, emit: n }) {
    const o = e, r = n, { setPlotContextInitialState: i } = Dae(), a = ce(), l = ce(null), s = ce(""), u = ce(""), c = ce(0), d = ce(0);
    function f() {
      l.value && (o.onDestroy && o.onDestroy(l.value), l.value.destroy(), l.value = null, i({ uPlotInstance: null }), o.plotRef && o.plotRef(null));
    }
    function p($) {
      if ($ === null || typeof $ != "object")
        return $;
      const I = dr($);
      if (I instanceof Date)
        return new Date(I.getTime());
      if (I instanceof RegExp)
        return new RegExp(I.source, I.flags);
      if (typeof I == "function")
        return I;
      if (Array.isArray(I)) {
        const _ = [];
        for (let M = 0; M < I.length; M++)
          _.push(p(dr(I[M])));
        return _;
      }
      const w = {};
      for (const _ in I)
        Object.prototype.hasOwnProperty.call(I, _) && (w[_] = p(dr(I[_])));
      return w;
    }
    function v() {
      if (f(), !a.value || o.width === 0 || o.height === 0)
        return;
      const $ = o.config.getConfig(), w = p({
        ...$,
        width: Math.floor(o.width),
        height: Math.floor(o.height),
        series: $.series ?? []
      }), _ = m(o.data, o.config), M = new xo(w, _, a.value);
      o.plotRef && o.plotRef(M), i({
        uPlotInstance: M,
        id: o.config.getId(),
        shouldSaveSelectionPreference: o.config.getShouldSaveSelectionPreference()
      }), l.value = M, r("plotReady", M), s.value = JSON.stringify(o.config.getConfig()), u.value = JSON.stringify(o.data), c.value = o.width, d.value = o.height;
    }
    function g($) {
      return JSON.parse(JSON.stringify($));
    }
    function m($, I) {
      const w = g($), _ = I.getSeriesSpanGapsOptions();
      return _.length > 0 ? KF(w, _) : w;
    }
    function x() {
      return o.width === c.value && o.height === d.value;
    }
    function S() {
      return JSON.stringify(o.data) === u.value;
    }
    function C() {
      return JSON.stringify(o.config.getConfig()) === s.value;
    }
    const P = E(() => !!(o.data && o.data[0] && o.data[0].length === 0));
    return ke(P, ($) => {
      $ && f();
    }), It(($) => {
      if ($(() => {
        f(), s.value = "", u.value = "", c.value = 0, d.value = 0;
      }), !a.value || o.width === 0 || o.height === 0)
        return;
      if (!s.value) {
        v();
        return;
      }
      const I = !!l.value && (!a.value || l.value.root.parentElement !== a.value);
      if (!x() && l.value && !I && l.value.setSize({
        width: Math.floor(o.width),
        height: Math.floor(o.height)
      }), !C() || I)
        v();
      else if (!S() && l.value) {
        const w = m(o.data, o.config);
        l.value.setData(w);
      }
    }), qt(() => {
      f();
    }), t({ plotInstance: l }), ($, I) => (ne(), xe("div", Aae, [
      P.value ? (ne(), xe("div", {
        key: 0,
        class: "flex flex-col items-center justify-center not-found",
        style: Bt({
          width: `${e.width}px`,
          height: `${e.height}px`
        })
      }, [
        L("div", {
          class: Pt([T(bt).chartLine, "mb-2"]),
          style: { "font-size": "48px" }
        }, null, 2),
        I[0] || (I[0] = L("div", { class: "text-gray-400 text-sm" }, " No Data ", -1))
      ], 4)) : (ne(), xe("div", {
        key: 1,
        ref_key: "containerRef",
        ref: a,
        class: "w-full h-full"
      }, null, 512)),
      Ra($.$slots, "default")
    ]));
  }
}), Rae = {
  key: 0,
  class: "flex items-center justify-center h-full text-gray-400 select-none"
}, Yx = /* @__PURE__ */ be({
  __name: "AgChart",
  props: {
    data: {},
    unit: {},
    decimals: {},
    colorScheme: {},
    colorSingleValue: {},
    colorDistribution: {},
    thresholds: {},
    thresholdBaseColor: {},
    fillOpacity: { default: 10 },
    lineWidth: { default: 1.5 },
    lineInterpolation: { default: "linear" },
    lineStyle: { default: "solid" },
    drawStyle: { default: "lines" },
    gradientMode: { default: "none" },
    spanNulls: { type: [Boolean, Number], default: !1 },
    showPoints: { type: Boolean, default: !1 },
    showPointsMode: { default: "auto" },
    stackingMode: { default: "none" },
    legendPosition: { default: "bottom" },
    legendMode: { default: "list" },
    legendValues: { default: () => [] },
    syncKey: {},
    panelId: {},
    tooltipMode: { default: "multi" },
    tooltipSort: { default: "none" },
    tooltipMaxHeight: {},
    showAxisPointer: { type: Boolean, default: !0 },
    softMin: {},
    softMax: {},
    axisPlacement: { default: "left" },
    axisName: {},
    axisWidth: {},
    showGridLines: { default: "all" },
    gridColor: {},
    axisLabel: { default: "all" },
    axisLabelColor: {},
    axisTick: { default: "hidden" },
    axisTickColor: {},
    axisBorder: { default: "hidden" },
    axisBorderColor: {},
    scaleDistribution: { default: "linear" },
    centeredZero: { type: Boolean, default: !1 },
    xAxisTime: { type: Boolean, default: !0 },
    barGroupWidth: {},
    barWidth: {}
  },
  setup(e) {
    const t = e, n = ce(), o = ce({ width: 0, height: 0 });
    let r = null;
    function i(m) {
      r = new ResizeObserver((x) => {
        const S = x[0];
        if (S) {
          const { width: C, height: P } = S.contentRect;
          setTimeout(() => {
            o.value = { width: Math.floor(C), height: Math.floor(P) };
          }, 300);
        }
      }), r.observe(m), requestAnimationFrame(() => {
        const { width: x, height: S } = m.getBoundingClientRect();
        o.value = { width: Math.floor(x), height: Math.floor(S) };
      });
    }
    Nt(() => {
      n.value && i(n.value);
    }), ke(n, (m) => {
      r?.disconnect(), m && i(m);
    }), qt(() => {
      r?.disconnect();
    });
    const a = E(() => {
      const m = new jF({ id: t.panelId ?? "chart" }), x = t.scaleDistribution ?? "linear", S = t.stackingMode !== "none";
      m.addScale({ scaleKey: "x", time: t.xAxisTime }), m.addScale({
        scaleKey: "y",
        distribution: x === "logarithmic" ? ws.Logarithmic : x === "symlog" ? ws.Symlog : ws.Linear,
        softMin: S && t.stackingMode === "percent" ? 0 : t.softMin ?? void 0,
        softMax: S && t.stackingMode === "percent" ? 100 : t.softMax ?? void 0,
        ...t.centeredZero ? {
          range: (pe, ge, _e) => {
            const ze = Math.max(Math.abs(ge), Math.abs(_e));
            return [-ze, ze];
          }
        } : {}
      });
      const C = t.gridColor ?? "#E8E9EA", P = t.showGridLines === "all" || t.showGridLines === "x", $ = t.showGridLines === "all" || t.showGridLines === "y", I = t.axisLabel === "all" || t.axisLabel === "x", w = t.axisLabel === "all" || t.axisLabel === "y", _ = I ? t.axisLabelColor ?? "#666666" : "transparent", M = w ? t.axisLabelColor ?? "#666666" : "transparent", N = t.axisTick === "all" || t.axisTick === "x", A = t.axisTick === "all" || t.axisTick === "y", H = N ? t.axisTickColor ?? "#666666" : "transparent", B = A ? t.axisTickColor ?? "#666666" : "transparent", F = t.axisBorder === "all" || t.axisBorder === "x", R = t.axisBorder === "all" || t.axisBorder === "y", X = t.axisBorderColor ?? "#666666";
      m.addAxis({
        scaleKey: "x",
        side: 2,
        size: 28,
        stroke: _,
        grid: { show: P, stroke: C },
        ticks: { show: N, stroke: H, width: 0.5 },
        border: { show: F, stroke: X }
      });
      const j = t.axisPlacement === "right" ? 1 : 3, ee = t.axisPlacement !== "hidden", W = (() => {
        if (t.axisWidth !== void 0 && t.axisWidth !== null)
          return t.axisWidth;
        const pe = t.data.series.reduce((He, Ne) => He.concat(Ne.values.filter((Xe) => Xe !== null && Number.isFinite(Xe))), []);
        if (pe.length === 0)
          return 56;
        const ge = pe.reduce((He, Ne) => Math.max(He, Math.abs(Ne)), 0), _e = t.decimals === void 0 || t.decimals === null ? void 0 : t.decimals <= 15 ? t.decimals : 15, Ke = ((He) => {
          if (Math.abs(He) >= 1e6) {
            const Xe = _e !== void 0 ? (He / 1e6).toFixed(_e) : String(He / 1e6);
            return t.unit ? `${Xe}M ${t.unit}` : `${Xe}M`;
          }
          if (Math.abs(He) >= 1e3) {
            const Xe = _e !== void 0 ? (He / 1e3).toFixed(_e) : String(He / 1e3);
            return t.unit ? `${Xe}K ${t.unit}` : `${Xe}K`;
          }
          const Ne = _e !== void 0 ? He.toFixed(_e) : String(Math.round(He * 100) / 100);
          return t.unit ? `${Ne} ${t.unit}` : Ne;
        })(ge);
        try {
          const He = document.createElement("canvas").getContext("2d");
          if (!He)
            return 56;
          He.font = "12px system-ui, sans-serif";
          const Ne = He.measureText(Ke).width;
          return Math.ceil(Ne) + 14;
        } catch {
          return 56;
        }
      })(), K = t.decimals === void 0 || t.decimals === null ? void 0 : t.decimals <= 15 ? t.decimals : 15;
      m.addAxis({
        scaleKey: "y",
        side: j,
        show: ee,
        label: t.axisName || void 0,
        size: W,
        stroke: M,
        grid: { show: $, stroke: C },
        ticks: { show: A, stroke: B, width: 0.5 },
        border: { show: R, stroke: X },
        isDarkMode: !0,
        yAxisUnit: t.unit,
        decimalPrecision: K,
        isLogScale: x === "logarithmic" || x === "symlog"
      });
      const q = t4(
        t.colorScheme,
        t.data.series.length,
        t.colorDistribution ?? "sequential",
        t.colorSingleValue
      ), G = t.drawStyle === "bars", ae = t.drawStyle === "points", le = t.data.series.length, ie = t.barGroupWidth ?? 0.7, re = t.barWidth ?? (t.stackingMode !== "none" ? 1 : 1 / Math.max(le, 1)), te = G ? ie * re : void 0, ve = ae || t.showPointsMode === "always" ? !0 : t.showPointsMode === "never" ? !1 : t.showPoints, ue = S ? "none" : t.fillOpacity > 0 ? t.gradientMode !== "none" ? "gradient" : "solid" : "none";
      if (t.data.series.forEach((pe, ge) => {
        const _e = q[ge] ?? Il[ge % Il.length];
        m.addSeries({
          scaleKey: "y",
          label: pe.label,
          drawStyle: G ? "bars" : ae ? "points" : "lines",
          lineColor: _e,
          lineWidth: t.lineWidth,
          lineInterpolation: t.lineInterpolation,
          lineStyle: t.lineStyle,
          fillColor: _e,
          fillOpacity: t.fillOpacity,
          fillMode: ue,
          showPoints: ve,
          pointSize: ve ? 4 : 0,
          spanGaps: t.spanNulls ?? !1,
          ...te !== void 0 ? { barWidthFactor: te } : {}
        });
      }), S && t.data.series.length > 0 && t.fillOpacity > 0) {
        const pe = q.length > 0 ? q : [...Il], ge = Math.round(Math.min(t.fillOpacity, 100) / 100 * 255).toString(16).padStart?.(2, "0") || Math.round(Math.min(t.fillOpacity, 100) / 100 * 255).toString(16), _e = t.data.series.map((ze, Ke) => ({
          series: [Ke + 1, Ke],
          fill: `${pe[Ke % pe.length]}${ge}`
        }));
        _e.length > 0 && (_e[0] = { series: [1, 0], fill: `${pe[0]}${ge}` }), m.setBands(_e);
      }
      return t.syncKey && m.setCursor({ sync: { key: t.syncKey, setSeries: !0 } }), t.showAxisPointer || m.setCursor({ x: !1, y: !1 }), m.setCursor({
        drag: { setScale: !0 },
        points: {
          one: !0,
          size: (pe, ge) => (pe.series[ge]?.points?.size ?? 0) * 3,
          width: (pe, ge, _e) => _e / 4,
          stroke: (pe, ge) => {
            const _e = pe.series[ge]?.points, ze = typeof _e?.stroke == "function" ? _e.stroke : void 0;
            return `${ze !== void 0 ? ze(pe, ge) : typeof _e?.stroke == "string" ? _e.stroke : ""}90`;
          },
          fill: "#fff"
        },
        focus: {
          prox: 30
        },
        hover: {
          prox: 30,
          bias: 0
        }
      }), m;
    }), l = E(() => {
      const m = t.data?.timestamps ?? [], x = JSON.parse(JSON.stringify(m));
      if (x.length === 0 || !t.data)
        return [[]];
      const S = t.data.series.map((C) => JSON.parse(JSON.stringify(C.values.map((P) => P ?? 0))));
      if (t.stackingMode !== "none" && t.data.series.length > 0) {
        const C = x.length, P = Array.from({ length: C }, () => 0), $ = [];
        for (const I of t.data.series) {
          const w = Array.from({ length: C });
          for (let _ = 0; _ < C; _++) {
            if (t.stackingMode === "percent") {
              let M = 0;
              for (const N of t.data.series)
                M += N.values[_] ?? 0;
              P[_] = P[_] + (I.values[_] ?? 0) / (M || 1) * 100;
            } else
              P[_] = P[_] + (I.values[_] ?? 0);
            w[_] = P[_];
          }
          $.push(w);
        }
        return [x, ...$];
      }
      return [x, ...S];
    }), s = E(() => !t.data || t.data.timestamps.length === 0 || t.data.series.length === 0), u = ce(null);
    function c(m) {
      u.value = m;
    }
    const d = E(() => t.decimals === void 0 || t.decimals === null ? void 0 : t.decimals <= 15 ? t.decimals : 15), f = E(() => t.legendPosition === "right"), p = E(() => t.legendPosition !== "hidden" && t.data.series.length > 0), v = E(() => f.value && p.value ? Math.max(o.value.width - 160, 100) : o.value.width), g = E(() => Math.max(o.value.height, 50));
    return (m, x) => (ne(), xe("div", {
      class: Pt(["w-full h-full flex overflow-hidden relative", f.value ? "flex-row" : "flex-col"])
    }, [
      s.value ? (ne(), xe("div", Rae, [...x[0] || (x[0] = [
        L("span", { class: "text-xs" }, "No data", -1)
      ])])) : rt("", !0),
      L("div", {
        ref_key: "chartAreaRef",
        ref: n,
        class: "flex-1 min-h-0 min-w-0 relative overflow-hidden"
      }, [
        h(Nae, {
          config: a.value,
          data: l.value,
          width: v.value,
          height: g.value,
          onPlotReady: c
        }, {
          default: he(() => [
            h(Eae, {
              "u-plot-instance": u.value,
              unit: t.unit,
              decimals: d.value,
              "can-pin-tooltip": !0,
              "tooltip-mode": t.tooltipMode,
              "tooltip-sort": t.tooltipSort,
              "tooltip-max-height": t.tooltipMaxHeight
            }, null, 8, ["u-plot-instance", "unit", "decimals", "tooltip-mode", "tooltip-sort", "tooltip-max-height"])
          ]),
          _: 1
        }, 8, ["config", "data", "width", "height"])
      ], 512),
      p.value ? (ne(), xe("div", {
        key: 1,
        style: Bt(
          f.value ? { width: "160px", flexShrink: 0, height: "100%", padding: "4px 8px", overflow: "auto", zIndex: 10, position: "relative", pointerEvents: "auto" } : { flexShrink: 0, padding: "2px 4px", overflow: "auto", maxHeight: "140px", zIndex: 10, position: "relative", pointerEvents: "auto" }
        )
      }, [
        h(uae, {
          items: a.value.getLegendItems(),
          "u-plot-instance": u.value,
          position: f.value ? "right" : "bottom",
          mode: t.legendMode ?? "list",
          values: t.legendValues ?? [],
          data: l.value,
          decimals: d.value,
          unit: t.unit
        }, null, 8, ["items", "u-plot-instance", "position", "mode", "values", "data", "decimals", "unit"])
      ], 4)) : rt("", !0)
    ], 2));
  }
}), zae = /* @__PURE__ */ be({
  __name: "BarPanel",
  props: {
    data: {},
    stacked: { type: Boolean, default: !1 },
    colorScheme: {},
    colorSingleValue: {},
    colorDistribution: {},
    barWidth: {},
    barGroupWidth: { default: 0.7 },
    showValues: { default: "auto" },
    unit: {},
    decimals: { default: 0 },
    legendPosition: { default: "bottom" },
    legendMode: { default: "list" },
    legendValues: { default: () => [] },
    tooltipMode: { default: "multi" },
    tooltipSort: { default: "none" }
  },
  setup(e) {
    return (t, n) => (ne(), ft(Yx, {
      data: e.data,
      "draw-style": "bars",
      "stacking-mode": e.stacked ? "normal" : "none",
      "color-scheme": e.colorScheme,
      "color-single-value": e.colorSingleValue,
      "color-distribution": e.colorDistribution,
      unit: e.unit,
      decimals: e.decimals,
      "fill-opacity": 80,
      "bar-group-width": e.barGroupWidth,
      "bar-width": e.barWidth,
      "legend-position": e.legendPosition,
      "legend-mode": e.legendMode,
      "legend-values": e.legendValues,
      "tooltip-mode": e.tooltipMode,
      "tooltip-sort": e.tooltipSort
    }, null, 8, ["data", "stacking-mode", "color-scheme", "color-single-value", "color-distribution", "unit", "decimals", "bar-group-width", "bar-width", "legend-position", "legend-mode", "legend-values", "tooltip-mode", "tooltip-sort"]));
  }
}), Fae = {
  key: 0,
  style: { "text-align": "center", "font-size": "11px", color: "#888", padding: "2px 4px 4px", overflow: "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }
}, em = 2, Bae = /* @__PURE__ */ be({
  __name: "GaugePanel",
  props: {
    series: {},
    value: { default: 0 },
    title: {},
    min: { default: Gn.min },
    max: { default: Gn.max },
    unit: {},
    thresholds: {},
    thresholdBaseColor: {},
    capRound: { type: Boolean, default: Gn.capRound },
    trackWidth: { default: Gn.trackWidth },
    fillWidth: { default: Gn.fillWidth },
    trackColor: { default: Gn.trackColor },
    sweepAngle: { default: Gn.sweepAngle },
    valueColor: { default: Gn.valueColor },
    valueSize: { default: Gn.valueSize },
    valueVisible: { type: Boolean, default: Gn.valueVisible },
    paddingX: { default: Gn.paddingX },
    paddingY: { default: Gn.paddingY },
    activeColorOverride: {},
    thresholdDisplay: { default: Gn.thresholdDisplay },
    thresholdLabelDisplay: { default: Gn.thresholdLabelDisplay },
    valueOffsetY: { default: Gn.valueOffsetY },
    orientation: { default: Gn.orientation }
  },
  setup(e) {
    const t = e, n = ce(), o = ce({ w: 0, h: 0 });
    let r = null;
    function i(S, C, P = 2) {
      const $ = S.toFixed(P);
      return C === "percent" ? `${$}%` : C === "bytes" ? S >= 1024 * 1024 ? `${(S / 1024 / 1024).toFixed(1)} MB` : S >= 1024 ? `${(S / 1024).toFixed(1)} KB` : `${S} B` : C ? `${$} ${C}` : $;
    }
    function a(S, C, P) {
      const $ = [...P].sort((w, _) => w.value - _.value);
      let I = C;
      for (const w of $)
        S >= w.value && (I = w.color);
      return I;
    }
    function l(S, C) {
      const P = S.match(/^#([0-9a-f]{6})([0-9a-f]{2})?$/i);
      if (P) {
        const I = Number.parseInt(P[1].slice(0, 2), 16), w = Number.parseInt(P[1].slice(2, 4), 16), _ = Number.parseInt(P[1].slice(4, 6), 16);
        return `rgba(${I},${w},${_},${C})`;
      }
      const $ = S.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i);
      return $ ? `rgba(${$[1]},${$[2]},${$[3]},${C})` : S;
    }
    function s(S, C, P, $, I, w, _, M, N, A, H, B, F, R, X, j, ee, W, K, q, G, ae) {
      const le = S.getContext("2d");
      if (!le)
        return;
      const ie = window.devicePixelRatio || 1, re = S.clientWidth, te = S.clientHeight;
      if (re === 0 || te === 0)
        return;
      S.width = re * ie, S.height = te * ie, le.scale(ie, ie), le.clearRect(0, 0, re, te);
      const ve = B * Math.PI / 180, ue = (B + F) * Math.PI / 180;
      let pe, ge, _e, ze;
      if (F >= 360)
        pe = -1, ge = 1, _e = -1, ze = 1;
      else {
        pe = Math.cos(ve), ge = Math.cos(ve), _e = Math.sin(ve), ze = Math.sin(ve);
        const yt = (Wt) => {
          pe = Math.min(pe, Math.cos(Wt)), ge = Math.max(ge, Math.cos(Wt)), _e = Math.min(_e, Math.sin(Wt)), ze = Math.max(ze, Math.sin(Wt));
        };
        yt(ue);
        const Ot = [0, 90, 180, 270, 360, 450, 540].map((Wt) => Wt * Math.PI / 180);
        for (const Wt of Ot) {
          const Xt = (En) => (En % (2 * Math.PI) + 2 * Math.PI) % (2 * Math.PI), ln = Xt(ve), pn = Xt(ue), gt = Xt(Wt);
          (ln <= pn ? gt >= ln && gt <= pn : gt >= ln || gt <= pn) && yt(Wt);
        }
      }
      const Ke = ge - pe, He = ze - _e, Ne = Math.min(re, te), Xe = Ne / 300, De = ee * Xe, Fe = W * Xe, Ve = Math.max(0, re - 2 * De), nt = Math.max(0, te - 2 * Fe), je = De, Pe = Fe, Ge = N * Xe, Se = A * Xe, Ce = q === "marker", Ae = q === "track", qe = Ce ? Math.max(2, Ne * 0.04) : 0, We = Ce ? Math.max(Ge, Se) / 2 + 2 + qe : Math.max(Ge, Se) / 2, tt = Math.min((Ve - We * 2) / Ke, (nt - We * 2) / He);
      if (tt < 10)
        return;
      const Ee = je + Ve / 2 - (pe + ge) / 2 * tt, Re = Pe + nt / 2 - (_e + ze) / 2 * tt, Be = $ - P || 1, ot = Math.max(P, Math.min($, C)), pt = (ot - P) / Be, at = ve + pt * (ue - ve), dt = K ?? a(ot, _, w), wt = M ? "round" : "butt";
      le.beginPath(), le.arc(Ee, Re, tt, ve, ue), le.strokeStyle = H, le.lineWidth = Ge, le.lineCap = wt, le.stroke();
      const Ct = [...w].sort((yt, Ot) => yt.value - Ot.value), St = [];
      if (Ct.length === 0)
        St.push({ from: P, to: $, color: _ });
      else {
        St.push({ from: P, to: Ct[0].value, color: _ });
        for (let yt = 0; yt < Ct.length; yt++)
          St.push({ from: Ct[yt].value, to: yt + 1 < Ct.length ? Ct[yt + 1].value : $, color: Ct[yt].color });
      }
      if (Ae) {
        const yt = (ue - ve) / (2 * Math.PI), Ot = le.createConicGradient(ve, Ee, Re);
        for (const Wt of St) {
          const Xt = Math.min(1, (Math.max(P, Wt.from) - P) / Be * yt), ln = Math.min(1, (Math.min($, Wt.to) - P) / Be * yt);
          Ot.addColorStop(Xt, l(Wt.color, 0.25)), Ot.addColorStop(ln, l(Wt.color, 0.25));
        }
        Ot.addColorStop(1, l(St[0].color, 0.25)), le.beginPath(), le.arc(Ee, Re, tt, ve, ue), le.strokeStyle = Ot, le.lineWidth = Ge, le.lineCap = wt, le.stroke();
      }
      if (pt > 0 && (le.beginPath(), le.arc(Ee, Re, tt, ve, at), le.strokeStyle = dt, le.lineWidth = Se, le.lineCap = wt, le.stroke()), Ce && St.length > 0) {
        const yt = tt + Math.max(Ge, Se) / 2 + qe / 2 + 2, Ot = (ue - ve) / (2 * Math.PI), Wt = le.createConicGradient(ve, Ee, Re);
        for (const Xt of St) {
          const ln = Math.min(1, (Math.max(P, Xt.from) - P) / Be * Ot), pn = Math.min(1, (Math.min($, Xt.to) - P) / Be * Ot);
          Wt.addColorStop(ln, Xt.color), Wt.addColorStop(pn, Xt.color);
        }
        Wt.addColorStop(1, St[0].color), le.beginPath(), le.arc(Ee, Re, yt, ve, ue), le.strokeStyle = Wt, le.lineWidth = qe, le.lineCap = wt, le.stroke();
      }
      if (ae !== "none" && w.length > 0) {
        const yt = Math.max(8, 11 * Xe), Ot = tt + Math.max(Ge, Se) / 2 + (Ce ? qe + 4 : 4) + yt * 0.6, Wt = $ - P || 1;
        le.font = `${yt}px system-ui, sans-serif`, le.textBaseline = "middle";
        for (const Xt of w) {
          const ln = (Xt.value - P) / Wt;
          if (ln < 0 || ln > 1)
            continue;
          const pn = ve + ln * (ue - ve), gt = Ee + Math.cos(pn) * Ot, En = Re + Math.sin(pn) * Ot, hn = gt - Ee;
          if (le.textAlign = hn > 1 ? "left" : hn < -1 ? "right" : "center", le.fillStyle = Xt.color, ae === "label" || ae === "both") {
            const Kn = Xt.label || String(Xt.value);
            ae === "both" ? (le.fillText(Kn, gt, En - yt * 0.6), le.fillText(i(Xt.value, I, 1), gt, En + yt * 0.6)) : le.fillText(Kn, gt, En);
          } else
            le.fillText(i(Xt.value, I, 1), gt, En);
        }
      }
      if (j) {
        const yt = Math.max(4, X * Xe), Ot = i(ot, I, 2), Wt = Re + _e * tt - Se / 2, Xt = Re + ze * tt + Se / 2, ln = (Wt + Xt) / 2;
        le.textAlign = "center", le.textBaseline = "middle", le.fillStyle = R, le.font = `600 ${yt}px system-ui, sans-serif`, le.fillText(Ot, Ee, ln + G * Xe);
      }
    }
    function u(S, C, P) {
      const $ = Math.ceil(Math.sqrt(P * S / C));
      return Math.floor($ * C / S) * $ < P ? C / Math.ceil($ * C / S) : S / $;
    }
    function c(S, C, P, $) {
      const I = Math.max(u(S, C, $), u(C, S, $));
      let w = Math.max(1, Math.floor(S / I));
      const _ = Math.ceil($ / w);
      return w = Math.ceil($ / _), { xCount: w, yCount: _, cellW: S / w - P + P / w, cellH: C / _ - P + P / _ };
    }
    const d = E(
      () => t.series && t.series.length > 0 ? t.series : [{ label: t.title ?? "", value: t.value ?? 0, activeColorOverride: t.activeColorOverride }]
    ), f = E(() => d.value.length), p = E(() => t.thresholds && t.thresholds.length > 0 ? t.thresholds : []), v = E(() => t.thresholdBaseColor ?? "#52c41a"), g = E(() => {
      const S = o.value.w, C = o.value.h;
      return S <= 0 || C <= 0 ? { xCount: 1, yCount: 1, cellW: 0, cellH: 0 } : t.orientation === "horizontal" ? { xCount: f.value, yCount: 1, cellW: (S - em * (f.value - 1)) / f.value, cellH: C } : t.orientation === "vertical" ? { xCount: 1, yCount: f.value, cellW: S, cellH: (C - em * (f.value - 1)) / f.value } : c(S, C, em, f.value);
    });
    Nt(() => {
      n.value && (r = new ResizeObserver((S) => {
        const C = S[0].contentRect;
        o.value = { w: C.width, h: C.height };
      }), r.observe(n.value));
    }), jo(() => {
      r?.disconnect();
    });
    const m = ce({});
    function x() {
      Yt(() => {
        for (let S = 0; S < d.value.length; S++) {
          const C = m.value[S];
          if (!C)
            continue;
          const P = d.value[S];
          s(
            C,
            P.value,
            t.min,
            t.max,
            t.unit,
            p.value,
            v.value,
            t.capRound,
            t.trackWidth,
            t.fillWidth,
            t.trackColor,
            270 - t.sweepAngle / 2,
            t.sweepAngle,
            t.valueColor,
            t.valueSize,
            t.valueVisible,
            t.paddingX,
            t.paddingY,
            P.activeColorOverride ?? t.activeColorOverride,
            t.thresholdDisplay,
            t.valueOffsetY,
            t.thresholdLabelDisplay
          );
        }
      });
    }
    return ke(() => [
      d.value,
      t.min,
      t.max,
      t.unit,
      t.thresholds,
      t.thresholdBaseColor,
      t.capRound,
      t.trackWidth,
      t.fillWidth,
      t.trackColor,
      t.sweepAngle,
      t.valueColor,
      t.valueSize,
      t.valueVisible,
      t.paddingX,
      t.paddingY,
      t.thresholdDisplay,
      t.valueOffsetY,
      t.thresholdLabelDisplay,
      o.value
    ], x, { deep: !0, immediate: !0 }), (S, C) => (ne(), xe("div", {
      ref_key: "containerRef",
      ref: n,
      style: Bt([{ width: "100%", height: "100%", display: "grid", gap: "2px" }, {
        gridTemplateColumns: `repeat(${g.value.xCount}, 1fr)`,
        gridTemplateRows: `repeat(${g.value.yCount}, 1fr)`
      }])
    }, [
      (ne(!0), xe(Je, null, Ut(d.value, (P, $) => (ne(), xe("div", {
        key: `${P.label}-${$}`,
        style: { width: "100%", height: "100%", display: "flex", "flex-direction": "column", overflow: "hidden" }
      }, [
        L("canvas", {
          ref_for: !0,
          ref: (I) => {
            I && (m.value[$] = I);
          },
          style: { flex: "1", width: "100%", height: "0", display: "block", "min-height": "0" }
        }, null, 512),
        f.value > 1 && P.label ? (ne(), xe("div", Fae, oe(P.label), 1)) : rt("", !0)
      ]))), 128))
    ], 4));
  }
}), Lae = /* @__PURE__ */ be({
  __name: "HistogramPanel",
  props: {
    seriesValues: {},
    seriesLabels: {},
    bucketSize: {},
    bucketCount: {},
    bucketOffset: {},
    combineSeries: { type: Boolean, default: !1 },
    colorScheme: {},
    colorSingleValue: {},
    colorDistribution: {},
    lineWidth: { default: 1 },
    fillOpacity: { default: 80 },
    unit: {}
  },
  setup(e) {
    const t = e;
    function n(a, l) {
      const s = a.filter((C) => Number.isFinite(C));
      if (s.length === 0)
        return { bucketStarts: [], counts: [] };
      const u = Math.min(...s), c = Math.max(...s), d = c - u || 1, f = l.bucketOffset ?? 0, p = l.bucketCount ?? 30, v = l.bucketSize ?? d / p, g = Math.floor((u - f) / v) * v + f, m = [], x = [];
      let S = g;
      for (; S <= c; )
        m.push(S), x.push(0), S += v;
      for (const C of s) {
        const P = Math.floor((C - g) / v), $ = Math.min(P, x.length - 1);
        $ >= 0 && x[$]++;
      }
      return { bucketStarts: m, counts: x };
    }
    function o(a, l) {
      const s = a.flat();
      return n(s, l);
    }
    const r = E(() => {
      const a = { bucketSize: t.bucketSize, bucketCount: t.bucketCount, bucketOffset: t.bucketOffset };
      if (t.combineSeries || t.seriesValues.length === 0) {
        const { bucketStarts: d, counts: f } = o(t.seriesValues, a);
        return { bucketStarts: d, countSeries: [f], labels: ["combined"] };
      }
      const l = t.seriesValues.flat(), { bucketStarts: s } = n(l, a), u = s.length > 1 ? s[1] - s[0] : void 0, c = t.seriesValues.map((d) => {
        const { counts: f } = n(d, { ...a, bucketSize: u });
        return Array.from({ length: s.length }, (p, v) => f[v] ?? 0);
      });
      return { bucketStarts: s, countSeries: c, labels: t.seriesLabels };
    }), i = E(() => ({
      timestamps: r.value.bucketStarts,
      series: r.value.labels.map((a, l) => ({
        label: a,
        values: r.value.countSeries[l] ?? []
      }))
    }));
    return (a, l) => (ne(), ft(Yx, {
      data: i.value,
      "fill-opacity": e.fillOpacity,
      "line-width": e.lineWidth,
      "draw-style": "bars",
      unit: e.unit,
      "color-scheme": e.colorScheme,
      "color-single-value": e.colorSingleValue,
      "color-distribution": e.colorDistribution,
      "scale-distribution": "linear",
      "show-grid-lines": "y",
      "axis-label": "y",
      "axis-tick": "hidden",
      "axis-border": "hidden",
      "tooltip-mode": "multi",
      "legend-position": !e.combineSeries && r.value.countSeries.length > 1 ? "bottom" : "hidden",
      "legend-mode": "list",
      "stacking-mode": "none",
      "x-axis-time": !1
    }, null, 8, ["data", "fill-opacity", "line-width", "unit", "color-scheme", "color-single-value", "color-distribution", "legend-position"]));
  }
}), Hae = ["width", "height"], Vae = ["d", "fill", "stroke", "opacity", "onMousemove"], jae = ["x", "y"], Wae = ["onClick"], Kae = { style: { width: "100%", "border-collapse": "collapse" } }, qae = ["onClick"], Yae = { class: "flex items-center gap-1" }, Gae = {
  class: "overflow-hidden text-ellipsis whitespace-nowrap",
  style: { "max-width": "80px" }
}, Uae = { class: "flex items-center gap-1.5" }, Xae = /* @__PURE__ */ be({
  __name: "PiePanel",
  props: {
    slices: {},
    pieType: { default: "pie" },
    pieLabels: { default: () => [] },
    unit: {},
    decimals: { default: 2 },
    legendPosition: { default: "bottom" },
    legendMode: { default: "list" },
    legendValues: { default: () => [] },
    tooltipMode: { default: "single" },
    tooltipSort: { default: "none" }
  },
  setup(e) {
    const t = e, n = Fa(), o = ce(), r = ce({ width: 0, height: 0 });
    let i = null;
    Nt(() => {
      if (!o.value)
        return;
      i = new ResizeObserver((q) => {
        const { width: G, height: ae } = q[0].contentRect;
        r.value = { width: Math.floor(G), height: Math.floor(ae) };
      }), i.observe(o.value);
      const { width: W, height: K } = o.value.getBoundingClientRect();
      r.value = { width: Math.floor(W), height: Math.floor(K) };
    }), qt(() => {
      i?.disconnect();
    });
    const a = E(() => n.isDark), l = E(() => a.value ? "#d9d9d9" : "#141414"), s = E(() => a.value ? "#8c8c8c" : "#595959"), u = E(() => a.value ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.08)"), c = E(() => a.value ? "rgba(0,0,0,0.6)" : "rgba(255,255,255,0.8)"), d = E(() => {
      const W = t.legendValues.length > 0;
      return t.legendMode === "table" ? W ? 120 + t.legendValues.length * 64 : 160 : 140;
    }), f = E(
      () => t.legendPosition === "bottom" ? t.legendMode === "table" ? Math.min(t.slices.length * 24 + 28, 120) : 28 : 0
    ), p = E(() => t.legendPosition === "right" ? d.value : 0), v = E(() => Math.max(r.value.width - p.value, 10)), g = E(() => Math.max(r.value.height - f.value, 10)), m = E(() => v.value / 2), x = E(() => g.value / 2), S = E(() => Math.min(m.value, x.value) * 0.85), C = E(() => t.pieType === "donut" ? S.value * 0.55 : 0), P = ce(null), $ = ce({ x: 0, y: 0 }), I = ce(/* @__PURE__ */ new Set()), w = E(() => t.slices.filter((W) => !I.value.has(W.label))), _ = E(() => w.value.reduce((W, K) => W + K.value, 0));
    function M(W, K, q, G) {
      const ae = (G - 90) * Math.PI / 180;
      return { x: W + q * Math.cos(ae), y: K + q * Math.sin(ae) };
    }
    function N(W, K, q, G, ae, le) {
      const ie = Math.min(le - ae, 359.9999), re = ie > 180 ? 1 : 0, te = M(W, K, q, ae), ve = M(W, K, q, ae + ie);
      if (G <= 0)
        return [
          `M ${W} ${K}`,
          `L ${te.x} ${te.y}`,
          `A ${q} ${q} 0 ${re} 1 ${ve.x} ${ve.y}`,
          "Z"
        ].join(" ");
      const ue = M(W, K, G, ae + ie), pe = M(W, K, G, ae);
      return [
        `M ${te.x} ${te.y}`,
        `A ${q} ${q} 0 ${re} 1 ${ve.x} ${ve.y}`,
        `L ${ue.x} ${ue.y}`,
        `A ${G} ${G} 0 ${re} 0 ${pe.x} ${pe.y}`,
        "Z"
      ].join(" ");
    }
    const A = E(() => {
      const W = _.value;
      if (W === 0 || r.value.width === 0)
        return [];
      let K = 0;
      return w.value.map((q) => {
        const G = q.value / W * 360, ae = q.value / W * 100, le = K;
        K += G;
        const ie = K, re = le + G / 2, te = (S.value + C.value) / 2 || S.value * 0.65, ve = M(m.value, x.value, te, re), ue = N(m.value, x.value, S.value, C.value, le, ie);
        return { ...q, angle: G, pct: ae, startAngle: le, endAngle: ie, midAngle: re, labelPos: ve, path: ue };
      });
    });
    function H(W) {
      const K = W.toFixed(t.decimals);
      return t.unit ? `${K} ${t.unit}` : K;
    }
    function B(W, K) {
      return W.rawValues && W.rawValues.length > 0 ? zc(W.rawValues, K) : W.value;
    }
    function F(W) {
      const K = new Set(I.value);
      if (K.has(W))
        K.delete(W);
      else {
        if (t.slices.filter((G) => !K.has(G.label)).length <= 1)
          return;
        K.add(W);
      }
      I.value = K;
    }
    function R(W, K) {
      P.value = K;
      const q = o.value?.getBoundingClientRect();
      q && ($.value = { x: W.clientX - q.left, y: W.clientY - q.top });
    }
    function X() {
      P.value = null;
    }
    const j = E(() => {
      if (!P.value || t.tooltipMode === "none")
        return [];
      const W = _.value;
      if (t.tooltipMode === "single") {
        const q = w.value.find((G) => G.label === P.value);
        return q ? [{ ...q, percent: W > 0 ? q.value / W * 100 : 0 }] : [];
      }
      let K = w.value.map((q) => ({ ...q, percent: W > 0 ? q.value / W * 100 : 0 }));
      return t.tooltipSort === "desc" && (K = [...K].sort((q, G) => G.value - q.value)), t.tooltipSort === "asc" && (K = [...K].sort((q, G) => q.value - G.value)), K;
    }), ee = E(() => {
      const W = t.tooltipMode === "multi" ? 180 : 140, K = t.tooltipMode === "multi" ? j.value.length * 22 + 32 : 72, q = Math.min($.value.x + 14, r.value.width - W - 4), G = Math.min($.value.y - 8, r.value.height - K - 4);
      return { left: Math.max(4, q), top: Math.max(4, G) };
    });
    return (W, K) => (ne(), xe("div", {
      ref_key: "containerRef",
      ref: o,
      class: "w-full h-full relative overflow-hidden",
      style: Bt({
        display: "flex",
        flexDirection: e.legendPosition === "bottom" ? "column" : "row"
      })
    }, [
      r.value.width > 0 ? (ne(), xe("svg", {
        key: 0,
        width: v.value,
        height: g.value,
        style: { "flex-shrink": "0" }
      }, [
        (ne(!0), xe(Je, null, Ut(A.value, (q) => (ne(), xe("g", {
          key: q.label
        }, [
          q.angle > 0.3 ? (ne(), xe("path", {
            key: 0,
            d: q.path,
            fill: q.color,
            stroke: c.value,
            "stroke-width": "1.5",
            opacity: P.value && P.value !== q.label ? 0.6 : 1,
            style: { cursor: "pointer", transition: "opacity 0.15s" },
            onMousemove: (G) => R(G, q.label),
            onMouseleave: X
          }, null, 40, Vae)) : rt("", !0),
          e.pieLabels.length > 0 && q.angle > 20 ? (ne(), xe("text", {
            key: 1,
            x: q.labelPos.x,
            y: q.labelPos.y,
            "text-anchor": "middle",
            "dominant-baseline": "middle",
            fill: "#fff",
            "font-size": "11",
            style: { "pointer-events": "none", "user-select": "none", "text-shadow": "0 1px 2px rgba(0,0,0,0.6)" }
          }, oe([
            e.pieLabels.includes("name") ? q.label : null,
            e.pieLabels.includes("percent") ? `${q.pct.toFixed(1)}%` : null,
            e.pieLabels.includes("value") ? H(q.value) : null
          ].filter(Boolean).join(" ")), 9, jae)) : rt("", !0)
        ]))), 128))
      ], 8, Hae)) : rt("", !0),
      e.legendPosition !== "hidden" && e.legendMode === "list" ? (ne(), xe("div", {
        key: 1,
        style: Bt({
          display: "flex",
          flexDirection: e.legendPosition === "bottom" ? "row" : "column",
          flexWrap: "wrap",
          alignItems: e.legendPosition === "bottom" ? "center" : "flex-start",
          justifyContent: e.legendPosition === "bottom" ? "center" : "flex-start",
          gap: "4px 12px",
          padding: e.legendPosition === "right" ? "8px 4px" : "2px 8px",
          overflowY: e.legendPosition === "right" ? "auto" : "hidden",
          width: e.legendPosition === "right" ? `${p.value}px` : void 0,
          height: e.legendPosition === "bottom" ? `${f.value}px` : void 0
        })
      }, [
        (ne(!0), xe(Je, null, Ut(e.slices, (q) => (ne(), xe("div", {
          key: q.label,
          class: "flex items-center gap-1 text-xs whitespace-nowrap cursor-pointer select-none",
          style: Bt({
            color: l.value,
            opacity: I.value.has(q.label) ? 0.35 : 1,
            textDecoration: I.value.has(q.label) ? "line-through" : "none"
          }),
          onClick: (G) => F(q.label)
        }, [
          L("span", {
            class: "inline-block w-2 h-2 rounded-sm flex-shrink-0",
            style: Bt({ background: q.color })
          }, null, 4),
          L("span", null, oe(q.label), 1),
          e.legendValues.length > 0 ? (ne(), xe("span", {
            key: 0,
            class: "ml-1",
            style: Bt({ color: s.value })
          }, oe(e.legendValues.map((G) => H(B(q, G))).join(" / ")), 5)) : rt("", !0)
        ], 12, Wae))), 128))
      ], 4)) : rt("", !0),
      e.legendPosition !== "hidden" && e.legendMode === "table" ? (ne(), xe("div", {
        key: 2,
        style: Bt({
          width: e.legendPosition === "right" ? `${p.value}px` : void 0,
          height: e.legendPosition === "bottom" ? `${f.value}px` : void 0,
          overflowY: "auto",
          flexShrink: 0,
          fontSize: "11px"
        })
      }, [
        L("table", Kae, [
          L("thead", null, [
            L("tr", null, [
              L("th", {
                style: Bt({ textAlign: "left", padding: "2px 6px", color: s.value, fontWeight: 500, borderBottom: `1px solid ${u.value}` })
              }, " Name ", 4),
              L("th", {
                style: Bt({ textAlign: "right", padding: "2px 6px", color: s.value, fontWeight: 500, borderBottom: `1px solid ${u.value}` })
              }, " Value ", 4),
              (ne(!0), xe(Je, null, Ut(e.legendValues, (q) => (ne(), xe("th", {
                key: q,
                style: Bt({ textAlign: "right", padding: "2px 6px", color: s.value, fontWeight: 500, borderBottom: `1px solid ${u.value}`, minWidth: "56px" })
              }, oe(q.charAt(0).toUpperCase() + q.slice(1)), 5))), 128))
            ])
          ]),
          L("tbody", null, [
            (ne(!0), xe(Je, null, Ut(e.slices, (q) => (ne(), xe("tr", {
              key: q.label,
              class: "cursor-pointer select-none",
              style: Bt({ opacity: I.value.has(q.label) ? 0.35 : 1 }),
              onClick: (G) => F(q.label)
            }, [
              L("td", {
                style: Bt({ padding: "2px 6px", color: l.value })
              }, [
                L("div", Yae, [
                  L("span", {
                    class: "inline-block w-2 h-2 rounded-sm flex-shrink-0",
                    style: Bt({ background: q.color })
                  }, null, 4),
                  L("span", Gae, oe(q.label), 1)
                ])
              ], 4),
              L("td", {
                style: Bt({ textAlign: "right", padding: "2px 6px", color: l.value, fontVariantNumeric: "tabular-nums" })
              }, oe(H(q.value)), 5),
              (ne(!0), xe(Je, null, Ut(e.legendValues, (G) => (ne(), xe("td", {
                key: G,
                style: Bt({ textAlign: "right", padding: "2px 6px", color: s.value, fontVariantNumeric: "tabular-nums" })
              }, oe(H(B(q, G))), 5))), 128))
            ], 12, qae))), 128))
          ])
        ])
      ], 4)) : rt("", !0),
      P.value && e.tooltipMode !== "none" && j.value.length > 0 ? (ne(), xe("div", {
        key: 3,
        class: "absolute z-50 pointer-events-none rounded shadow-lg text-xs",
        style: Bt({
          left: `${ee.value.left}px`,
          top: `${ee.value.top}px`,
          background: a.value ? "#1f1f1f" : "#fff",
          border: a.value ? "1px solid #333" : "1px solid #e8e8e8",
          minWidth: "140px"
        })
      }, [
        L("div", {
          class: "px-2 pt-1.5 pb-0 text-xs font-medium",
          style: Bt({ color: a.value ? "#d9d9d9" : "#141414" })
        }, oe(e.tooltipMode === "multi" ? `${H(_.value)} total` : j.value[0]?.label), 5),
        L("div", {
          class: "border-t my-1",
          style: Bt({ borderColor: a.value ? "#333" : "#e8e8e8" })
        }, null, 4),
        (ne(!0), xe(Je, null, Ut(j.value, (q) => (ne(), xe("div", {
          key: q.label,
          class: "px-2 py-0.5 flex items-center justify-between gap-2"
        }, [
          L("div", Uae, [
            L("span", {
              class: "inline-block w-2 h-2 rounded-sm",
              style: Bt({ background: q.color })
            }, null, 4),
            L("span", {
              style: Bt({ color: a.value ? "#d9d9d9" : "#141414" })
            }, oe(e.tooltipMode === "multi" ? q.label : `${q.percent.toFixed(1)}%`), 5)
          ]),
          L("span", {
            class: "font-mono",
            style: Bt({ color: q.color })
          }, oe(H(q.value)), 5)
        ]))), 128))
      ], 4)) : rt("", !0)
    ], 4));
  }
}), jf = 36, os = 1.2, zP = 1, Qae = /* @__PURE__ */ be({
  __name: "StatPanel",
  props: {
    title: {},
    unit: {},
    series: {},
    trend: {},
    thresholds: {},
    thresholdBaseColor: {},
    orientation: {},
    textMode: {},
    colorMode: {}
  },
  setup(e) {
    const t = e, n = Fa(), o = ce(), r = ce({ w: 0, h: 0 });
    let i = null;
    const a = ["#1677ff", "#52c41a", "#fa8c16", "#f5222d", "#722ed1", "#13c2c2", "#eb2f96", "#faad14"];
    function l(P) {
      return P >= 1e6 ? `${(P / 1e6).toFixed(1)}M` : P >= 1e3 ? `${(P / 1e3).toFixed(1)}K` : P % 1 === 0 ? String(P) : P.toFixed(1);
    }
    function s(P, $, I, w) {
      const _ = I ?? w ?? a[0];
      if ($ && $.length > 0) {
        let M = _;
        for (const N of $)
          P >= N.value && (M = N.color);
        return M;
      }
      return _;
    }
    function u(P, $) {
      if (P.startsWith("rgb("))
        return P.replace("rgb(", "rgba(").replace(")", `, ${$})`);
      if (P.startsWith("rgba("))
        return P.replace(/,\s*[\d.]+\)$/, `, ${$})`);
      const I = P.replace("#", ""), w = I.length === 3 ? I.split("").map((A) => A + A).join("") : I.slice(0, 6), _ = Number.parseInt(w.slice(0, 2), 16), M = Number.parseInt(w.slice(2, 4), 16), N = Number.parseInt(w.slice(4, 6), 16);
      return `rgba(${_}, ${M}, ${N}, ${$})`;
    }
    function c(P, $, I) {
      switch ($) {
        case "background_solid":
          return At(P).toString();
        case "background": {
          const w = I ? 1 : -0.7, _ = At(P).darken(15 * w).spin(8).toRgbString(), M = At(P).darken(5 * w).spin(-8).toRgbString();
          return `linear-gradient(120deg, ${_}, ${M})`;
        }
        default:
          return "transparent";
      }
    }
    function d(P) {
      return At(P).isLight() ? "#1a1a1a" : "#ffffff";
    }
    function f(P, $, I) {
      if (P === 0 || $ === 0)
        return { isWide: !1, showSparkline: !1, valueFontSize: 24, titleFontSize: 12, chartHeight: 0, padding: 8 };
      const w = $ > 100 ? 12 : 8, _ = P - w * 2, M = $ - w * 2, N = P / $ > 2.5, A = I && (N ? $ > 50 : $ > 100), H = Math.max(10, Math.min(13, M * (N ? 0.22 : 0.18)));
      let B, F = 0;
      if (N)
        B = A ? Math.min(M * 0.62, _ * 0.42, jf) : Math.min(M * 0.7, _ * 0.38, jf), A && (F = $ * 0.5);
      else {
        const R = H * os;
        B = Math.min(A ? (M - R) * 0.65 : (M - R) * 0.85, _ * 0.9, jf), A && (F = Math.max(0, Math.min($ - H * os - B * os - w, $ * 0.5)));
      }
      return {
        isWide: N,
        showSparkline: A,
        valueFontSize: Math.max(11, B),
        titleFontSize: H,
        chartHeight: F,
        padding: w
      };
    }
    function p(P, $, I) {
      const w = Math.ceil(Math.sqrt(I * P / $));
      return Math.floor(w * $ / P) * w < I ? $ / Math.ceil(w * $ / P) : P / w;
    }
    function v(P, $, I, w) {
      const _ = Math.max(p(P, $, w), p($, P, w));
      let M = Math.max(1, Math.floor(P / _));
      const N = Math.ceil(w / M);
      return M = Math.ceil(w / N), {
        xCount: M,
        yCount: N,
        cellW: P / M - I + I / M,
        cellH: $ / N - I + I / N
      };
    }
    function g(P, $, I) {
      const w = P.getContext("2d");
      if (!w)
        return;
      const _ = window.devicePixelRatio || 1, M = P.getBoundingClientRect();
      if (M.width === 0 || M.height === 0)
        return;
      P.width = M.width * _, P.height = M.height * _, w.scale(_, _);
      const N = M.width, A = M.height, H = $.reduce((j, ee) => Math.min(j, ee), 1 / 0), F = $.reduce((j, ee) => Math.max(j, ee), -1 / 0) - H || 1;
      w.clearRect(0, 0, N, A);
      const R = w.createLinearGradient(0, 0, 0, A);
      R.addColorStop(0, u(I, 0.25)), R.addColorStop(1, u(I, 0));
      const X = $.map((j, ee) => ({
        x: ee / ($.length - 1) * N,
        y: A - 2 - (j - H) / F * (A - 4)
      }));
      w.beginPath(), X.forEach(({ x: j, y: ee }, W) => W === 0 ? w.moveTo(j, ee) : w.lineTo(j, ee)), w.lineTo(N, A), w.lineTo(0, A), w.fillStyle = R, w.fill(), w.beginPath(), X.forEach(({ x: j, y: ee }, W) => W === 0 ? w.moveTo(j, ee) : w.lineTo(j, ee)), w.strokeStyle = I, w.lineWidth = 1.5, w.stroke();
    }
    const m = E(() => Math.max(t.series.length, 1)), x = E(() => {
      const P = r.value.w, $ = r.value.h;
      return P <= 0 || $ <= 0 ? { xCount: 1, yCount: 1, cellW: 0, cellH: 0 } : t.orientation === "horizontal" ? { xCount: 1, yCount: m.value, cellW: P, cellH: ($ - zP * (m.value - 1)) / m.value } : v(P, $, zP, m.value);
    }), S = E(() => n.isDark ? "#303030" : "#fff");
    Nt(() => {
      o.value && (i = new ResizeObserver((P) => {
        const $ = P[0].contentRect;
        (r.value.w !== $.width || r.value.h !== $.height) && (r.value = { w: $.width, h: $.height });
      }), i.observe(o.value));
    }), jo(() => {
      i?.disconnect();
    });
    const C = be({
      props: {
        label: String,
        value: Number,
        unit: String,
        mappedLabel: String,
        sparkline: Array,
        percentChange: [Number, null],
        textMode: { type: String, default: "value_and_name" },
        colorMode: String,
        color: String,
        width: Number,
        height: Number
      },
      setup(P) {
        const $ = ce(), I = Fa();
        function w() {
          Yt(() => {
            $.value && P.sparkline && P.sparkline.length > 1 && g($.value, P.sparkline, P.color ?? "#1677ff");
          });
        }
        return ke(() => [P.sparkline, P.color, P.width, P.height], w, { immediate: !0 }), () => {
          const _ = P, M = I.isDark, N = _.sparkline != null && _.sparkline.length > 1, A = f(_.width ?? 0, _.height ?? 0, N), H = _.textMode === "value_and_name" || _.textMode === "name", B = _.textMode === "value_and_name" || _.textMode === "value", F = Math.max(10, A.valueFontSize * 0.44), R = _.colorMode === "background_solid" || _.colorMode === "background", X = R ? c(_.color ?? "#1677ff", _.colorMode ?? "value", M) : "transparent", j = R ? d(_.color ?? "#1677ff") : _.color ?? "#d9d9d9", ee = R ? j : "#888", W = R ? j : "#666", K = _.percentChange != null ? (_.percentChange > 0 ? "+" : "") + _.percentChange.toLocaleString(void 0, { style: "percent", minimumFractionDigits: 1, maximumFractionDigits: 2 }) : null, q = _.percentChange != null ? _.percentChange > 0 ? "#52c41a" : _.percentChange < 0 ? "#ff4d4f" : "#888" : "", G = _.percentChange != null ? _.percentChange > 0 ? "↑" : _.percentChange < 0 ? "↓" : "" : "", ae = _.mappedLabel ?? l(_.value ?? 0), le = [
            ko("span", {
              style: {
                color: j,
                fontSize: `${A.valueFontSize}px`,
                fontWeight: 500,
                fontFamily: "monospace",
                lineHeight: os
              }
            }, ae)
          ];
          _.mappedLabel || le.push(ko("span", {
            style: { color: W, fontSize: `${F}px`, lineHeight: os }
          }, _.unit)), K && le.push(ko("span", {
            style: { color: q, fontSize: `${F}px`, marginLeft: "2px", lineHeight: os }
          }, `${G}${K}`));
          const ie = H ? ko("div", {
            style: {
              color: ee,
              fontSize: `${A.titleFontSize}px`,
              lineHeight: os,
              ...A.isWide ? { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" } : { marginBottom: "2px" }
            }
          }, _.label) : null, re = B ? ko("div", {
            style: {
              display: "flex",
              alignItems: "baseline",
              gap: A.isWide ? "3px" : "4px",
              flexWrap: "wrap"
            }
          }, le) : null, te = ko("div", {
            style: A.isWide ? { flex: 1, minWidth: 0, position: "relative", zIndex: 1 } : { position: "relative", zIndex: 1 }
          }, [ie, re]), ve = A.showSparkline ? ko("canvas", {
            ref: (pe) => {
              $.value = pe;
            },
            style: A.isWide ? { position: "absolute", right: 0, bottom: 0, left: 0, width: "100%", height: `${A.chartHeight}px`, opacity: 0.7 } : { position: "absolute", bottom: 0, left: 0, right: 0, width: "100%", height: `${A.chartHeight}px`, opacity: 0.6 }
          }) : null, ue = A.isWide ? {
            width: "100%",
            height: "100%",
            display: "flex",
            alignItems: "center",
            padding: `0 ${A.padding}px`,
            gap: "8px",
            overflow: "hidden",
            position: "relative",
            background: X
          } : {
            width: "100%",
            height: "100%",
            display: "flex",
            flexDirection: "column",
            justifyContent: "center",
            padding: `${A.padding}px`,
            overflow: "hidden",
            position: "relative",
            background: X
          };
          return ko("div", { style: ue }, A.isWide ? [ve, te] : [ve, te]);
        };
      }
    });
    return (P, $) => (ne(), xe("div", {
      ref_key: "containerRef",
      ref: o,
      style: Bt([{ width: "100%", height: "100%", display: "grid", gap: "1px" }, {
        gridTemplateColumns: e.orientation === "horizontal" ? "1fr" : `repeat(${x.value.xCount}, 1fr)`,
        gridTemplateRows: e.orientation === "horizontal" ? `repeat(${m.value}, 1fr)` : `repeat(${x.value.yCount}, 1fr)`,
        background: S.value
      }])
    }, [
      (ne(!0), xe(Je, null, Ut(e.series, (I, w) => (ne(), ft(T(C), {
        key: `${I.label}-${w}`,
        label: m.value === 1 ? e.title : I.label,
        value: I.displayValue ?? (I.values.length > 0 ? I.values[I.values.length - 1] ?? 0 : 0),
        unit: I.units ?? e.unit,
        "mapped-label": I.valueMap !== void 0 ? I.valueMap[String(I.displayValue ?? (I.values.length > 0 ? I.values[I.values.length - 1] ?? 0 : 0))] : void 0,
        sparkline: I.values.length > 1 ? I.values : void 0,
        "percent-change": I.percentChange,
        "text-mode": e.textMode,
        "color-mode": e.colorMode,
        color: s(
          I.displayValue ?? I.values[I.values.length - 1] ?? 0,
          e.thresholds,
          e.thresholdBaseColor,
          a[w % a.length]
        ),
        width: x.value.cellW,
        height: x.value.cellH
      }, null, 8, ["label", "value", "unit", "mapped-label", "sparkline", "percent-change", "text-mode", "color-mode", "color", "width", "height"]))), 128))
    ], 4));
  }
}), Zae = {
  key: 0,
  class: "flex-center h-full text-secondary"
}, Jae = {
  key: 1,
  class: "flex-center h-full"
}, ele = {
  key: 2,
  class: "flex-center h-full text-red-500 text-xs"
}, tle = {
  key: 3,
  class: "w-full h-full relative"
}, nle = {
  key: 0,
  class: "absolute inset-0 z-10 flex items-center justify-center",
  style: { "backdrop-filter": "blur(1px)", "border-radius": "4px" }
}, ole = {
  key: 0,
  class: "w-full h-full"
}, rle = {
  key: 0,
  class: "w-full h-full overflow-auto"
}, oy = /* @__PURE__ */ be({
  __name: "PanelRenderer",
  props: {
    panelId: {},
    panelConfig: { default: void 0 }
  },
  setup(e) {
    const t = e, n = oa(), { t: o } = sn(), r = E(() => t.panelConfig ?? n.panels[t.panelId]);
    let i = null;
    const a = ce(null), l = ["#1677ff", "#52c41a", "#fa8c16", "#f5222d", "#722ed1", "#13c2c2", "#eb2f96", "#faad14"];
    function s($, I) {
      u();
      const w = $.seriesCount ?? 1, _ = XO(
        { from: I.from / 1e3, to: I.to / 1e3 },
        15,
        w,
        $.pattern,
        $.labels
      ), M = Array.from({ length: w }, (A, H) => 20 + (H * 37 + 13) % 60), N = Array.from({ length: w }, (A, H) => 10 + (H * 53 + 7) % 40);
      a.value = {
        timestamps: [..._.timestamps],
        seriesValues: _.series.map((A) => [...A.values])
      }, i = setInterval(() => {
        const A = a.value;
        if (!A)
          return;
        const H = Math.floor(Date.now() / 1e3), B = [...A.timestamps.slice(1), H], F = A.seriesValues.map((R, X) => {
          const j = R[R.length - 1], ee = Zz(j, M[X], N[X] * 0.1, N[X] + M[X] * 1.8);
          return [...R.slice(1), ee];
        });
        a.value = { timestamps: B, seriesValues: F };
      }, 1e3);
    }
    function u() {
      i && (clearInterval(i), i = null), a.value = null;
    }
    jo(u);
    const c = E(() => {
      const $ = r.value;
      return $ ? $.queries.some((I) => I.enabled !== !1 && I.dataSource?.type === "mock" && I.dataSource?.pattern === "live") : !1;
    });
    ke([r, () => n.timeRange], () => {
      const $ = r.value;
      if (!$ || !c.value) {
        u();
        return;
      }
      const I = $.queries.find((w) => w.enabled !== !1 && w.dataSource?.type === "mock" && w.dataSource?.pattern === "live");
      I && s(I.dataSource, n.timeRange);
    }, { immediate: !0, deep: !0 });
    const d = E(() => {
      const $ = r.value;
      return $ ? $.queries.filter((I) => I.enabled !== !1 && !(I.dataSource?.type === "mock" && I.dataSource?.pattern === "live")) : [];
    }), { response: f, loading: p, error: v } = SE(
      () => d.value,
      () => n.timeRange,
      1e3,
      () => n.panelRefreshKeys[t.panelId]
    );
    function g($) {
      return typeof $?.toArray == "function" ? $.toArray() : Array.isArray($) ? $ : [];
    }
    function m($, I) {
      if (!$ || $.data.length === 0)
        return null;
      if (I.type === "timeseries" || I.type === "bar") {
        const w = g($.data[0].fields[0]?.values), _ = $.data.flatMap(
          (M) => M.fields.filter((N) => N.type === "number").map((N) => ({
            label: N.config?.displayNameFromDS ?? N.name,
            values: g(N.values)
          }))
        );
        return { timestamps: w.map((M) => M / 1e3), series: _ };
      }
      if (I.type === "histogram") {
        const w = $.data.flatMap(
          (M) => M.fields.filter((N) => N.type === "number").map((N) => g(N.values))
        ), _ = $.data.flatMap(
          (M) => M.fields.filter((N) => N.type === "number").map((N) => N.config?.displayNameFromDS ?? N.name)
        );
        return { seriesValues: w, seriesLabels: _ };
      }
      if (I.type === "stat" || I.type === "gauge") {
        const w = $.data.flatMap(
          (_) => _.fields.filter((M) => M.type === "number").map((M) => {
            const N = g(M.values);
            return {
              label: M.config?.displayNameFromDS ?? M.name,
              values: N,
              displayValue: zc(N, I.statReducer ?? "lastNotNull"),
              percentChange: I.showPercentChange ? sf(N) : void 0
            };
          })
        );
        return {
          series: w,
          value: w[0]?.values[w[0].values.length - 1] ?? 0,
          values: w.map((_) => _.values[_.values.length - 1] ?? 0),
          unit: I.unit ?? I.statUnit ?? "",
          trend: I.statTrend ?? "flat",
          percentChange: I.showPercentChange ? sf(w[0]?.values ?? []) : void 0
        };
      }
      if (I.type === "pie")
        return $.data.flatMap(
          (w, _) => w.fields.filter((M) => M.type === "number").map((M, N) => ({
            label: M.config?.displayNameFromDS ?? M.name,
            value: zc(g(M.values), I.statReducer ?? "lastNotNull"),
            color: l[(_ + N) % l.length],
            rawValues: g(M.values)
          }))
        );
      if (I.type === "table") {
        const w = $.data[0], _ = w.fields.map((A) => ({
          key: A.name,
          title: A.config?.displayNameFromDS ?? A.name,
          dataIndex: A.name
        })), M = g(w.fields[0]?.values).length, N = Array.from({ length: M }, (A, H) => {
          const B = { key: H };
          return w.fields.forEach((F) => {
            const R = g(F.values)[H];
            B[F.name] = F.type === "time" ? new Date(R).toLocaleString() : R;
          }), B;
        });
        return { columns: _, dataSource: N };
      }
      return null;
    }
    const x = E(() => {
      const $ = r.value;
      return $ ? m(f.value, $) : null;
    }), S = E(() => {
      const $ = a.value, I = r.value;
      return !$ || !I ? null : I.type === "timeseries" ? {
        timestamps: $.timestamps,
        series: $.seriesValues.map((w, _) => ({ label: `series-${_ + 1}`, values: w }))
      } : I.type === "stat" || I.type === "gauge" ? {
        series: $.seriesValues.map((_, M) => ({
          label: `series-${M + 1}`,
          values: _,
          displayValue: zc(_, I.statReducer ?? "lastNotNull"),
          percentChange: I.showPercentChange ? sf(_) : void 0
        })),
        value: $.seriesValues[0]?.[$.seriesValues[0].length - 1] ?? 0,
        values: $.seriesValues.map((_) => _[_.length - 1] ?? 0),
        unit: I.statUnit ?? "",
        trend: I.statTrend ?? "flat",
        percentChange: I.showPercentChange ? sf($.seriesValues[0] ?? []) : void 0
      } : I.type === "pie" ? $.seriesValues.map((w, _) => ({
        label: `series-${_ + 1}`,
        value: zc(w, I.statReducer ?? "lastNotNull"),
        color: l[_ % l.length],
        rawValues: w
      })) : I.type === "histogram" ? {
        seriesValues: $.seriesValues,
        seriesLabels: $.seriesValues.map((w, _) => `series-${_ + 1}`)
      } : null;
    }), C = E(() => S.value ?? x.value), P = be({
      name: "NoDataPlaceholder",
      setup() {
        const { t: $ } = sn();
        return () => ko("div", { class: "flex flex-col items-center justify-center h-full gap-1.5 text-gray-400 select-none" }, [
          ko("span", { class: [bt.databaseOff, "text-7", "opacity-50"] }),
          ko("span", { class: "text-xs" }, $("panel.noData"))
        ]);
      }
    });
    return ($, I) => r.value ? T(p) && !a.value ? (ne(), xe("div", Jae, [
      h(T(Xo))
    ])) : T(v) ? (ne(), xe("div", ele, oe(T(v)), 1)) : (ne(), xe("div", tle, [
      T(p) && a.value ? (ne(), xe("div", nle, [
        h(T(Xo))
      ])) : rt("", !0),
      r.value.type === "timeseries" ? (ne(), xe(Je, { key: 1 }, [
        C.value && C.value.series?.length > 0 ? (ne(), xe("div", ole, [
          h(Yx, {
            data: C.value,
            unit: r.value.unit,
            decimals: r.value.decimals,
            "color-scheme": r.value.colorScheme,
            "color-single-value": r.value.colorSingleValue,
            "color-distribution": r.value.colorDistribution,
            thresholds: r.value.thresholds,
            "threshold-base-color": r.value.thresholdBaseColor,
            "fill-opacity": r.value.fillOpacity,
            "line-width": r.value.lineWidth,
            "line-interpolation": r.value.lineInterpolation,
            "line-style": r.value.lineStyle,
            "draw-style": r.value.drawStyle,
            "gradient-mode": r.value.gradientMode,
            "span-nulls": r.value.spanNulls,
            "show-points": r.value.showPoints,
            "show-points-mode": r.value.showPointsMode,
            "stacking-mode": r.value.stackingMode,
            "legend-position": r.value.legendPosition,
            "legend-mode": r.value.legendMode,
            "legend-values": r.value.legendValues,
            "panel-id": r.value.id,
            "tooltip-mode": r.value.tooltipMode,
            "tooltip-sort": r.value.tooltipSort,
            "tooltip-max-height": r.value.tooltipMaxHeight,
            "show-axis-pointer": r.value.showAxisPointer,
            "soft-min": r.value.softMin,
            "soft-max": r.value.softMax,
            "axis-placement": r.value.axisPlacement,
            "axis-name": r.value.axisName,
            "axis-width": r.value.axisWidth,
            "show-grid-lines": r.value.showGridLines,
            "grid-color": r.value.gridColor,
            "axis-label": r.value.axisLabel,
            "axis-label-color": r.value.axisLabelColor,
            "axis-tick": r.value.axisTick,
            "axis-tick-color": r.value.axisTickColor,
            "axis-border": r.value.axisBorder,
            "axis-border-color": r.value.axisBorderColor,
            "scale-distribution": r.value.scaleDistribution,
            "centered-zero": r.value.centeredZero
          }, null, 8, ["data", "unit", "decimals", "color-scheme", "color-single-value", "color-distribution", "thresholds", "threshold-base-color", "fill-opacity", "line-width", "line-interpolation", "line-style", "draw-style", "gradient-mode", "span-nulls", "show-points", "show-points-mode", "stacking-mode", "legend-position", "legend-mode", "legend-values", "panel-id", "tooltip-mode", "tooltip-sort", "tooltip-max-height", "show-axis-pointer", "soft-min", "soft-max", "axis-placement", "axis-name", "axis-width", "show-grid-lines", "grid-color", "axis-label", "axis-label-color", "axis-tick", "axis-tick-color", "axis-border", "axis-border-color", "scale-distribution", "centered-zero"])
        ])) : (ne(), ft(T(P), { key: 1 }))
      ], 64)) : r.value.type === "bar" ? (ne(), xe(Je, { key: 2 }, [
        C.value && C.value.series?.length > 0 ? (ne(), ft(zae, {
          key: 0,
          data: C.value,
          stacked: r.value.stacked,
          "bar-width": r.value.barWidth,
          "bar-group-width": r.value.barGroupWidth,
          "show-values": r.value.barShowValues,
          unit: r.value.unit,
          decimals: r.value.decimals,
          "color-scheme": r.value.colorScheme,
          "color-single-value": r.value.colorSingleValue,
          "color-distribution": r.value.colorDistribution,
          "legend-position": r.value.legendPosition,
          "legend-mode": r.value.legendMode,
          "legend-values": r.value.legendValues,
          "tooltip-mode": r.value.tooltipMode,
          "tooltip-sort": r.value.tooltipSort
        }, null, 8, ["data", "stacked", "bar-width", "bar-group-width", "show-values", "unit", "decimals", "color-scheme", "color-single-value", "color-distribution", "legend-position", "legend-mode", "legend-values", "tooltip-mode", "tooltip-sort"])) : (ne(), ft(T(P), { key: 1 }))
      ], 64)) : r.value.type === "stat" ? (ne(), xe(Je, { key: 3 }, [
        C.value ? (ne(), ft(Qae, {
          key: 0,
          title: r.value.title,
          unit: C.value.unit,
          series: C.value.series,
          trend: C.value.trend,
          thresholds: r.value.thresholds,
          "threshold-base-color": r.value.thresholdBaseColor,
          orientation: r.value.statOrientation,
          "text-mode": r.value.statTextMode,
          "color-mode": r.value.statColorMode
        }, null, 8, ["title", "unit", "series", "trend", "thresholds", "threshold-base-color", "orientation", "text-mode", "color-mode"])) : (ne(), ft(T(P), { key: 1 }))
      ], 64)) : r.value.type === "gauge" ? (ne(), xe(Je, { key: 4 }, [
        C.value ? (ne(), ft(Bae, {
          key: 0,
          series: C.value.series?.map((w, _) => ({
            label: w.label,
            value: w.displayValue ?? w.values[w.values.length - 1] ?? 0,
            activeColorOverride: l[_ % l.length]
          })),
          title: r.value.title,
          min: r.value.min ?? 0,
          max: r.value.max ?? 100,
          unit: r.value.unit,
          thresholds: r.value.thresholds,
          "threshold-base-color": r.value.thresholdBaseColor,
          "cap-round": r.value.gaugeCapRound,
          "track-width": r.value.gaugeTrackWidth,
          "fill-width": r.value.gaugeFillWidth,
          "track-color": r.value.gaugeTrackColor,
          "sweep-angle": r.value.sweepAngle,
          "value-color": r.value.gaugeValueColor,
          "value-size": r.value.gaugeValueSize,
          "value-visible": r.value.gaugeValueVisible,
          "padding-x": r.value.gaugePaddingX,
          "padding-y": r.value.gaugePaddingY,
          "threshold-display": r.value.gaugeThresholdDisplay,
          "threshold-label-display": r.value.gaugeThresholdLabelDisplay,
          "value-offset-y": r.value.gaugeValueOffsetY,
          orientation: r.value.gaugeOrientation
        }, null, 8, ["series", "title", "min", "max", "unit", "thresholds", "threshold-base-color", "cap-round", "track-width", "fill-width", "track-color", "sweep-angle", "value-color", "value-size", "value-visible", "padding-x", "padding-y", "threshold-display", "threshold-label-display", "value-offset-y", "orientation"])) : (ne(), ft(T(P), { key: 1 }))
      ], 64)) : r.value.type === "table" ? (ne(), xe(Je, { key: 5 }, [
        C.value ? (ne(), xe("div", rle, [
          h(T(uee), {
            columns: C.value.columns,
            "data-source": C.value.dataSource,
            pagination: { pageSize: r.value.tablePageSize ?? 20 },
            size: "small",
            scroll: { y: "100%" },
            "show-header": r.value.tableShowHeader !== !1
          }, null, 8, ["columns", "data-source", "pagination", "show-header"])
        ])) : (ne(), ft(T(P), { key: 1 }))
      ], 64)) : r.value.type === "pie" ? (ne(), xe(Je, { key: 6 }, [
        C.value && C.value.length > 0 ? (ne(), ft(Xae, {
          key: 0,
          slices: C.value,
          "pie-type": r.value.pieType,
          "pie-labels": r.value.pieLabels,
          unit: r.value.unit,
          decimals: r.value.decimals,
          "legend-position": r.value.legendPosition,
          "legend-mode": r.value.legendMode,
          "legend-values": r.value.legendValues,
          "tooltip-mode": r.value.tooltipMode,
          "tooltip-sort": r.value.tooltipSort
        }, null, 8, ["slices", "pie-type", "pie-labels", "unit", "decimals", "legend-position", "legend-mode", "legend-values", "tooltip-mode", "tooltip-sort"])) : (ne(), ft(T(P), { key: 1 }))
      ], 64)) : r.value.type === "histogram" ? (ne(), xe(Je, { key: 7 }, [
        C.value && C.value.seriesValues?.length > 0 ? (ne(), ft(Lae, {
          key: 0,
          "series-values": C.value.seriesValues,
          "series-labels": C.value.seriesLabels,
          "bucket-size": r.value.histBucketSize,
          "bucket-count": r.value.histBucketCount,
          "bucket-offset": r.value.histBucketOffset,
          "combine-series": r.value.histCombineSeries,
          "line-width": r.value.lineWidth,
          "fill-opacity": r.value.fillOpacity,
          unit: r.value.unit
        }, null, 8, ["series-values", "series-labels", "bucket-size", "bucket-count", "bucket-offset", "combine-series", "line-width", "fill-opacity", "unit"])) : (ne(), ft(T(P), { key: 1 }))
      ], 64)) : rt("", !0)
    ])) : (ne(), xe("div", Zae, oe(T(o)("panel.noData")), 1));
  }
}), ile = { class: "w-full h-full flex flex-col" }, ale = { class: "flex-1 min-h-0" }, lle = {
  key: 1,
  class: "flex-center h-full text-secondary text-sm"
}, sle = /* @__PURE__ */ be({
  __name: "ChartPreview",
  setup(e) {
    const { panel: t } = vc(), n = E(() => {
      const o = t.value;
      return [
        o.type,
        JSON.stringify(o.queries),
        o.colorScheme,
        o.statReducer,
        o.unit,
        o.decimals,
        o.lineWidth,
        o.fillOpacity,
        o.stacked,
        o.thresholds?.length,
        o.sweepAngle
      ].join("|");
    });
    return (o, r) => (ne(), xe("div", ile, [
      L("div", ale, [
        T(t).id ? (ne(), ft(oy, {
          key: n.value,
          "panel-id": T(t).id,
          "panel-config": T(t)
        }, null, 8, ["panel-id", "panel-config"])) : (ne(), xe("div", lle, " No preview available "))
      ])
    ]));
  }
}), ule = { class: "w-full h-full flex flex-col" }, cle = { class: "flex-1 min-h-0" }, dle = /* @__PURE__ */ be({
  __name: "PanelChrome",
  setup(e) {
    const t = Fa(), { panel: n } = vc(), o = E(() => t.isDark), r = E(() => o.value ? "#303030" : "#e8e8e8"), i = E(() => o.value ? "#d9d9d9" : "#141414"), a = E(() => o.value ? "#666" : "#bbb");
    return (l, s) => (ne(), xe("div", ule, [
      L("div", {
        class: "flex items-center px-2.5 py-1.5 flex-shrink-0 gap-1.5 h-32px",
        style: Bt({ borderBottom: `1px solid ${r.value}` })
      }, [
        L("span", {
          class: "text-xs font-medium truncate",
          style: Bt({ color: i.value })
        }, oe(T(n).title || "—"), 5),
        T(n).description ? (ne(), ft(T(Lo), {
          key: 0,
          title: T(n).description,
          placement: "bottom"
        }, {
          default: he(() => [
            L("span", {
              class: Pt([T(bt).info, "text-xs"]),
              style: Bt({ color: a.value })
            }, null, 6)
          ]),
          _: 1
        }, 8, ["title"])) : rt("", !0),
        h(ME, {
          links: T(n).links ?? [],
          "icon-color": a.value
        }, null, 8, ["links", "icon-color"])
      ], 4),
      L("div", cle, [
        h(sle)
      ])
    ]));
  }
}), AE = /* @__PURE__ */ be({
  __name: "TimeRangePicker",
  setup(e) {
    const { RangePicker: t } = nU, n = oa(), o = [
      { label: "最近 5 分钟", minutes: 5 },
      { label: "最近 15 分钟", minutes: 15 },
      { label: "最近 30 分钟", minutes: 30 },
      { label: "最近 1 小时", minutes: 60 },
      { label: "最近 3 小时", minutes: 180 },
      { label: "最近 6 小时", minutes: 360 },
      { label: "最近 12 小时", minutes: 720 },
      { label: "最近 24 小时", minutes: 1440 },
      { label: "最近 7 天", minutes: 10080 },
      { label: "最近 30 天", minutes: 43200 },
      { label: "最近 90 天", minutes: 129600 }
    ], r = [
      { label: "关闭", value: 0 },
      { label: "5 秒", value: 5 },
      { label: "10 秒", value: 10 },
      { label: "30 秒", value: 30 },
      { label: "1 分钟", value: 60 },
      { label: "5 分钟", value: 300 }
    ], i = ce(!1), a = Math.round((n.timeRange.to - n.timeRange.from) / 6e4), l = o.find((c) => c.minutes === a);
    function s(c) {
      const d = Date.now();
      n.setTimeRange({ from: d - c * 60 * 1e3, to: d }), i.value = !1;
    }
    function u() {
      const c = Date.now(), d = n.timeRange.to - n.timeRange.from;
      n.setTimeRange({ from: c - d, to: c });
    }
    return (c, d) => (ne(), ft(T(Qi), null, {
      default: he(() => [
        h(T(Qi).Compact, null, {
          default: he(() => [
            i.value ? (ne(), ft(T(t), {
              key: 1,
              "show-time": "",
              "allow-clear": !1,
              style: { width: "320px" },
              value: [T(yo)(T(n).timeRange.from), T(yo)(T(n).timeRange.to)],
              onChange: d[1] || (d[1] = (f) => {
                f?.[0] && f?.[1] && T(n).setTimeRange({ from: f[0].valueOf(), to: f[1].valueOf() });
              })
            }, null, 8, ["value"])) : (ne(), ft(T(Dt), {
              key: 0,
              value: T(l)?.minutes,
              options: o.map((f) => ({ value: f.minutes, label: f.label })),
              "popup-match-select-width": "false",
              placeholder: "快速选择",
              onChange: d[0] || (d[0] = (f) => s(f))
            }, null, 8, ["value", "options"])),
            h(T(Lt), {
              onClick: d[2] || (d[2] = (f) => i.value = !i.value)
            }, {
              default: he(() => [
                Le(oe(i.value ? "收起" : "自定义"), 1)
              ]),
              _: 1
            })
          ]),
          _: 1
        }),
        h(T(Qi).Compact, null, {
          default: he(() => [
            h(T(Lt), { onClick: u }, {
              default: he(() => [
                L("span", {
                  class: Pt([T(bt).refresh, "mr-1"])
                }, null, 2),
                d[4] || (d[4] = Le(" 刷新 ", -1))
              ]),
              _: 1
            }),
            h(T(Dt), {
              value: T(n).autoRefresh,
              options: r,
              "popup-match-select-width": "false",
              onChange: d[3] || (d[3] = (f) => T(n).setAutoRefresh(f))
            }, null, 8, ["value"])
          ]),
          _: 1
        })
      ]),
      _: 1
    }));
  }
}), fle = { class: "font-semibold mb-3" }, ple = /* @__PURE__ */ be({
  __name: "ConstantOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: r } = sn(), i = E(() => n.config.constantValueType ?? "string"), a = E(() => !n.config.constantValue || i.value === "number" && Number.isNaN(Number(n.config.constantValue)) ? "error" : ""), l = E(() => n.config.constantValue ? i.value === "number" && Number.isNaN(Number(n.config.constantValue)) ? r("variable.constant.value.notNumber") : "" : r("variable.constant.value.required"));
    return (s, u) => {
      const c = yn("a-form-item");
      return ne(), xe("div", null, [
        L("div", fle, oe(T(r)("variable.constant.title")), 1),
        h(c, {
          label: T(r)("variable.constant.valueType")
        }, {
          default: he(() => [
            h(T(HT), {
              value: i.value,
              onChange: u[0] || (u[0] = (d) => o("change", { constantValueType: d.target.value }))
            }, {
              default: he(() => [
                h(T(_o), { value: "string" }, {
                  default: he(() => [
                    Le(oe(T(r)("variable.constant.valueType.string")), 1)
                  ]),
                  _: 1
                }),
                h(T(_o), { value: "number" }, {
                  default: he(() => [
                    Le(oe(T(r)("variable.constant.valueType.number")), 1)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }, 8, ["value"])
          ]),
          _: 1
        }, 8, ["label"]),
        h(c, {
          label: T(r)("variable.constant.value"),
          required: "",
          "validate-status": a.value,
          help: l.value
        }, {
          default: he(() => [
            h(T(kt), {
              value: e.config.constantValue ?? "",
              placeholder: i.value === "number" ? "42" : T(r)("variable.constant.value"),
              onChange: u[1] || (u[1] = (d) => o("change", { constantValue: d.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label", "validate-status", "help"]),
        h(T(Eo), {
          checked: e.config.hideFromVariableList ?? !1,
          onChange: u[2] || (u[2] = (d) => o("change", { hideFromVariableList: d.target.checked }))
        }, {
          default: he(() => [
            Le(oe(T(r)("variable.constant.hideFromList")), 1)
          ]),
          _: 1
        }, 8, ["checked"])
      ]);
    };
  }
}), hle = { class: "font-semibold mb-3" }, gle = {
  class: "grid mb-1",
  style: { "grid-template-columns": "1fr 1fr 32px", gap: "4px 8px" }
}, vle = { class: "text-xs text-secondary" }, mle = { class: "text-xs text-secondary" }, ble = { class: "mt-3" }, yle = { class: "mt-1" }, xle = { class: "mt-1" }, wle = { class: "mt-1" }, Sle = /* @__PURE__ */ be({
  __name: "CustomOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: r } = sn();
    function i(a, l, s) {
      const u = (n.config.customOptions ?? []).map(
        (c, d) => d === a ? { ...c, [l]: s } : c
      );
      o("change", { customOptions: u });
    }
    return (a, l) => {
      const s = yn("a-form-item");
      return ne(), xe("div", null, [
        L("div", hle, oe(T(r)("variable.custom.title")), 1),
        L("div", gle, [
          L("div", vle, oe(T(r)("variable.custom.col.text")), 1),
          L("div", mle, oe(T(r)("variable.custom.col.value")), 1),
          l[6] || (l[6] = L("div", null, null, -1)),
          (ne(!0), xe(Je, null, Ut(e.config.customOptions ?? [], (u, c) => (ne(), xe(Je, { key: c }, [
            h(T(kt), {
              size: "small",
              value: u.text,
              placeholder: T(r)("variable.custom.text.placeholder"),
              onChange: (d) => i(c, "text", d.target.value)
            }, null, 8, ["value", "placeholder", "onChange"]),
            h(T(kt), {
              size: "small",
              value: u.value,
              placeholder: T(r)("variable.custom.value.placeholder"),
              onChange: (d) => i(c, "value", d.target.value)
            }, null, 8, ["value", "placeholder", "onChange"]),
            h(T(Lt), {
              type: "text",
              danger: "",
              size: "small",
              onClick: (d) => o("change", { customOptions: (e.config.customOptions ?? []).filter((f, p) => p !== c) })
            }, {
              default: he(() => [
                L("span", {
                  class: Pt(T(bt).delete)
                }, null, 2)
              ]),
              _: 1
            }, 8, ["onClick"])
          ], 64))), 128))
        ]),
        h(T(Lt), {
          type: "dashed",
          size: "small",
          onClick: l[0] || (l[0] = (u) => o("change", { customOptions: [...e.config.customOptions ?? [], { text: "", value: "" }] }))
        }, {
          default: he(() => [
            L("span", {
              class: Pt([T(bt).plus, "mr-1"])
            }, null, 2),
            Le(" " + oe(T(r)("variable.custom.addOption")), 1)
          ]),
          _: 1
        }),
        L("div", ble, [
          h(T(Eo), {
            checked: e.config.multi,
            onChange: l[1] || (l[1] = (u) => o("change", { multi: u.target.checked }))
          }, {
            default: he(() => [
              Le(oe(T(r)("variable.custom.multi")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ]),
        L("div", yle, [
          h(T(Eo), {
            checked: e.config.includeAll,
            onChange: l[2] || (l[2] = (u) => o("change", { includeAll: u.target.checked }))
          }, {
            default: he(() => [
              Le(oe(T(r)("variable.custom.includeAll")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ]),
        e.config.includeAll ? (ne(), ft(s, {
          key: 0,
          label: T(r)("variable.custom.allValue"),
          class: "mt-3"
        }, {
          default: he(() => [
            h(T(kt), {
              value: e.config.allValue ?? "",
              placeholder: T(r)("variable.custom.allValue.placeholder"),
              onChange: l[3] || (l[3] = (u) => o("change", { allValue: u.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"])) : rt("", !0),
        L("div", xle, [
          h(T(Eo), {
            checked: e.config.allowCustomValue ?? !1,
            onChange: l[4] || (l[4] = (u) => o("change", { allowCustomValue: u.target.checked }))
          }, {
            default: he(() => [
              Le(oe(T(r)("variable.custom.allowCustomValue")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ]),
        L("div", wle, [
          h(T(Eo), {
            checked: e.config.allowClear ?? !1,
            onChange: l[5] || (l[5] = (u) => o("change", { allowClear: u.target.checked }))
          }, {
            default: he(() => [
              Le(oe(T(r)("variable.custom.allowClear")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ])
      ]);
    };
  }
}), Cle = { class: "font-semibold mb-3" }, $le = /* @__PURE__ */ be({
  __name: "DataSourceOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = sn(), r = [
      { label: "Zabbix", value: "zabbix" },
      { label: "Prometheus", value: "prometheus" },
      { label: "MySQL", value: "mysql" }
    ];
    return (i, a) => {
      const l = yn("a-form-item");
      return ne(), xe("div", null, [
        L("div", Cle, oe(T(o)("variable.ds.title")), 1),
        h(l, {
          label: T(o)("variable.ds.type")
        }, {
          default: he(() => [
            h(T(Dt), {
              value: e.config.dsType,
              options: r,
              placeholder: T(o)("variable.ds.type.placeholder"),
              onChange: a[0] || (a[0] = (s) => n("change", { dsType: s }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        h(l, {
          label: T(o)("variable.ds.filterRegex")
        }, {
          default: he(() => [
            h(T(kt), {
              value: e.config.instanceFilterRegex ?? "",
              placeholder: "/regex/",
              onChange: a[1] || (a[1] = (s) => n("change", { instanceFilterRegex: s.target.value }))
            }, null, 8, ["value"])
          ]),
          _: 1
        }, 8, ["label"]),
        h(l, null, {
          default: he(() => [
            h(T(Eo), {
              checked: e.config.multi,
              onChange: a[2] || (a[2] = (s) => n("change", { multi: s.target.checked }))
            }, {
              default: he(() => [
                Le(oe(T(o)("variable.ds.multi")), 1)
              ]),
              _: 1
            }, 8, ["checked"])
          ]),
          _: 1
        }),
        h(l, null, {
          default: he(() => [
            h(T(Eo), {
              checked: e.config.includeAll,
              onChange: a[3] || (a[3] = (s) => n("change", { includeAll: s.target.checked }))
            }, {
              default: he(() => [
                Le(oe(T(o)("variable.ds.includeAll")), 1)
              ]),
              _: 1
            }, 8, ["checked"])
          ]),
          _: 1
        })
      ]);
    };
  }
}), Ple = { class: "font-semibold mb-3" }, Ole = { class: "grid grid-cols-2 gap-x-4" }, kle = /* @__PURE__ */ be({
  __name: "GeneralSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = sn(), r = [
      { label: o("variable.type.custom"), value: "custom" },
      { label: o("variable.type.query"), value: "query" },
      { label: o("variable.type.textbox"), value: "textbox" },
      { label: o("variable.type.datasource"), value: "datasource" },
      { label: o("variable.type.constant"), value: "constant" }
    ], i = [
      { label: o("variable.general.showOn.labelAndValue"), value: "label-and-value" },
      { label: o("variable.general.showOn.value"), value: "value" },
      { label: o("variable.general.showOn.nothing"), value: "nothing" }
    ];
    function a(l) {
      n("change", {
        type: l,
        dsType: void 0,
        instanceFilterRegex: void 0,
        targetDsUid: void 0,
        queryType: void 0,
        extractRegex: void 0,
        sortMode: void 0,
        customOptions: void 0,
        allValue: void 0,
        inputWidth: void 0,
        constantValue: void 0,
        hideFromVariableList: void 0
      });
    }
    return (l, s) => {
      const u = yn("a-form-item");
      return ne(), xe("div", null, [
        L("div", Ple, oe(T(o)("variable.general.title")), 1),
        L("div", Ole, [
          h(u, {
            label: T(o)("variable.general.type"),
            required: "",
            "validate-status": e.config.type ? "" : "error",
            help: e.config.type ? "" : T(o)("variable.general.type.required")
          }, {
            default: he(() => [
              h(T(Dt), {
                value: e.config.type,
                options: r,
                style: { width: "100%" },
                onChange: a
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label", "validate-status", "help"]),
          h(u, {
            label: T(o)("variable.general.name"),
            required: "",
            "validate-status": e.config.name ? "" : "error",
            help: e.config.name ? "" : T(o)("variable.general.name.required")
          }, {
            default: he(() => [
              h(T(kt), {
                value: e.config.name,
                placeholder: "variable_name",
                onChange: s[0] || (s[0] = (c) => n("change", { name: c.target.value }))
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label", "validate-status", "help"]),
          h(u, {
            label: T(o)("variable.general.label")
          }, {
            default: he(() => [
              h(T(kt), {
                value: e.config.label,
                placeholder: T(o)("variable.general.label.placeholder"),
                onChange: s[1] || (s[1] = (c) => n("change", { label: c.target.value }))
              }, null, 8, ["value", "placeholder"])
            ]),
            _: 1
          }, 8, ["label"]),
          h(u, {
            label: T(o)("variable.general.showOn")
          }, {
            default: he(() => [
              h(T(Dt), {
                value: e.config.showOnDashboard ?? "label-and-value",
                options: i,
                style: { width: "100%" },
                onChange: s[2] || (s[2] = (c) => n("change", { showOnDashboard: c }))
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label"])
        ]),
        h(u, {
          label: T(o)("variable.general.description")
        }, {
          default: he(() => [
            h(T(kt), {
              value: e.config.description ?? "",
              placeholder: T(o)("variable.general.description.placeholder"),
              onChange: s[3] || (s[3] = (c) => n("change", { description: c.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"])
      ]);
    };
  }
}), Ile = { class: "font-semibold mb-3" }, _le = { class: "grid grid-cols-2 gap-x-4" }, Tle = { class: "mb-2" }, Mle = { class: "mb-2" }, Ele = {
  class: "p-2 text-xs text-secondary rounded",
  style: { background: "var(--ant-color-fill-tertiary)", border: "1px solid var(--ant-color-border-secondary)", "min-height": "32px" }
}, Dle = /* @__PURE__ */ be({
  __name: "QueryOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = sn(), r = [
      { label: o("variable.query.queryType.group"), value: "group" },
      { label: o("variable.query.queryType.host"), value: "host" },
      { label: o("variable.query.queryType.item"), value: "item" },
      { label: o("variable.query.queryType.labelValues"), value: "label_values" }
    ], i = [
      { label: o("variable.query.sort.disabled"), value: "disabled" },
      { label: o("variable.query.sort.alphabetical"), value: "alphabetical" },
      { label: o("variable.query.sort.numeric"), value: "numeric" }
    ], a = [
      { label: o("variable.query.refresh.onLoad"), value: "onLoad" },
      { label: o("variable.query.refresh.onTimeChange"), value: "onTimeChange" }
    ];
    return (l, s) => {
      const u = yn("a-form-item");
      return ne(), xe("div", null, [
        L("div", Ile, oe(T(o)("variable.query.title")), 1),
        h(u, {
          label: T(o)("variable.query.dsUid")
        }, {
          default: he(() => [
            h(T(kt), {
              size: "small",
              value: e.config.targetDsUid ?? "",
              placeholder: T(o)("variable.query.dsUid.placeholder"),
              onChange: s[0] || (s[0] = (c) => n("change", { targetDsUid: c.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        h(u, {
          label: T(o)("variable.query.queryType")
        }, {
          default: he(() => [
            h(T(Dt), {
              size: "small",
              value: e.config.queryType,
              options: r,
              style: { width: "100%" },
              placeholder: T(o)("variable.query.queryType.placeholder"),
              onChange: s[1] || (s[1] = (c) => n("change", { queryType: c }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        h(u, {
          label: T(o)("variable.query.query")
        }, {
          default: he(() => [
            h(T(kt), {
              size: "small",
              value: e.config.query ?? "",
              placeholder: T(o)("variable.query.query.placeholder"),
              onChange: s[2] || (s[2] = (c) => n("change", { query: c.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        h(u, {
          label: T(o)("variable.query.regex")
        }, {
          default: he(() => [
            h(T(kt), {
              size: "small",
              value: e.config.extractRegex ?? "",
              placeholder: T(o)("variable.query.regex.placeholder"),
              onChange: s[3] || (s[3] = (c) => n("change", { extractRegex: c.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        L("div", _le, [
          h(u, {
            label: T(o)("variable.query.sort")
          }, {
            default: he(() => [
              h(T(Dt), {
                size: "small",
                value: e.config.sortMode ?? "disabled",
                options: i,
                style: { width: "100%" },
                onChange: s[4] || (s[4] = (c) => n("change", { sortMode: c }))
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label"]),
          h(u, {
            label: T(o)("variable.query.refresh")
          }, {
            default: he(() => [
              h(T(Dt), {
                size: "small",
                value: e.config.refresh,
                options: a,
                style: { width: "100%" },
                onChange: s[5] || (s[5] = (c) => n("change", { refresh: c }))
              }, null, 8, ["value"])
            ]),
            _: 1
          }, 8, ["label"])
        ]),
        L("div", Tle, [
          h(T(Eo), {
            checked: e.config.multi,
            onChange: s[6] || (s[6] = (c) => n("change", { multi: c.target.checked }))
          }, {
            default: he(() => [
              Le(oe(T(o)("variable.query.multi")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ]),
        L("div", Mle, [
          h(T(Eo), {
            checked: e.config.includeAll,
            onChange: s[7] || (s[7] = (c) => n("change", { includeAll: c.target.checked }))
          }, {
            default: he(() => [
              Le(oe(T(o)("variable.query.includeAll")), 1)
            ]),
            _: 1
          }, 8, ["checked"])
        ]),
        h(u, {
          label: T(o)("variable.query.preview")
        }, {
          default: he(() => [
            L("div", Ele, oe(T(o)("variable.query.preview.placeholder")), 1)
          ]),
          _: 1
        }, 8, ["label"])
      ]);
    };
  }
}), Ale = { class: "font-semibold mb-3" }, Nle = /* @__PURE__ */ be({
  __name: "TextBoxOptionsSection",
  props: {
    config: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = sn();
    return (r, i) => {
      const a = yn("a-form-item");
      return ne(), xe("div", null, [
        L("div", Ale, oe(T(o)("variable.textbox.title")), 1),
        h(a, {
          label: T(o)("variable.textbox.default")
        }, {
          default: he(() => [
            h(T(kt), {
              value: e.config.defaultValue ?? "",
              placeholder: T(o)("variable.textbox.default.placeholder"),
              onChange: i[0] || (i[0] = (l) => n("change", { defaultValue: l.target.value }))
            }, null, 8, ["value", "placeholder"])
          ]),
          _: 1
        }, 8, ["label"]),
        h(a, {
          label: T(o)("variable.textbox.width")
        }, {
          default: he(() => [
            h(T(To), {
              value: e.config.inputWidth,
              min: 60,
              max: 800,
              placeholder: "e.g. 200",
              onChange: i[1] || (i[1] = (l) => n("change", { inputWidth: l ?? void 0 }))
            }, null, 8, ["value"])
          ]),
          _: 1
        }, 8, ["label"])
      ]);
    };
  }
}), Rle = /* @__PURE__ */ be({
  __name: "VariableForm",
  props: {
    draft: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t;
    sn();
    function o(r) {
      n("change", r);
    }
    return (r, i) => (ne(), ft(T(yl), {
      layout: "vertical",
      class: "px-5 py-4 overflow-y-auto flex-1"
    }, {
      default: he(() => [
        h(kle, {
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"]),
        i[0] || (i[0] = L("div", {
          class: "my-4",
          style: { "border-top": "1px solid var(--ant-color-border-secondary)" }
        }, null, -1)),
        e.draft.config.type === "query" ? (ne(), ft(Dle, {
          key: 0,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : rt("", !0),
        e.draft.config.type === "datasource" ? (ne(), ft($le, {
          key: 1,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : rt("", !0),
        e.draft.config.type === "custom" ? (ne(), ft(Sle, {
          key: 2,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : rt("", !0),
        e.draft.config.type === "textbox" ? (ne(), ft(Nle, {
          key: 3,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : rt("", !0),
        e.draft.config.type === "constant" ? (ne(), ft(ple, {
          key: 4,
          config: e.draft.config,
          onChange: o
        }, null, 8, ["config"])) : rt("", !0)
      ]),
      _: 1
    }));
  }
}), zle = {
  class: "w-45 flex flex-col h-full",
  style: { "border-right": "1px solid var(--ant-color-border-secondary)" }
}, Fle = {
  class: "px-3 py-2 text-xs text-secondary",
  style: { "border-bottom": "1px solid var(--ant-color-border-secondary)" }
}, Ble = { class: "flex-1 overflow-y-auto" }, Lle = ["onClick"], Hle = { key: 0 }, Vle = {
  key: 1,
  class: "text-secondary"
}, jle = {
  class: "p-2",
  style: { "border-top": "1px solid var(--ant-color-border-secondary)" }
}, Wle = /* @__PURE__ */ be({
  __name: "VariableNavList",
  props: {
    drafts: {},
    selectedId: {}
  },
  emits: ["select", "add"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = sn();
    return (r, i) => (ne(), xe("div", zle, [
      L("div", Fle, oe(T(o)("variable.nav.count", { n: e.drafts.length })), 1),
      L("div", Ble, [
        (ne(!0), xe(Je, null, Ut(e.drafts, (a) => (ne(), xe("div", {
          key: a.id,
          class: Pt(["px-3 py-2 cursor-pointer text-sm transition-colors", a.id === e.selectedId ? "bg-blue-50 dark:bg-blue-900/30 border-l-3 border-primary" : "border-l-3 border-transparent"]),
          onClick: (l) => n("select", a.id)
        }, [
          a.config.name ? (ne(), xe("span", Hle, oe(a.config.name), 1)) : (ne(), xe("span", Vle, oe(T(o)("variable.nav.unnamed")), 1))
        ], 10, Lle))), 128))
      ]),
      L("div", jle, [
        h(T(Lt), {
          type: "dashed",
          block: "",
          onClick: i[0] || (i[0] = (a) => n("add"))
        }, {
          default: he(() => [
            L("span", {
              class: Pt([T(bt).plus, "mr-1"])
            }, null, 2),
            Le(" " + oe(T(o)("variable.modal.add")), 1)
          ]),
          _: 1
        })
      ])
    ]));
  }
}), Kle = { class: "px-24px py-15px border-b-1px border-solid" }, qle = { class: "flex flex-1 overflow-hidden" }, Yle = { class: "flex-1 overflow-hidden flex flex-col" }, Gle = {
  key: 1,
  class: "flex-1 flex-center text-secondary text-sm"
}, Ule = {
  class: "flex items-center justify-between px-4 py-3",
  style: { "border-top": "1px solid var(--ant-color-border-secondary)" }
}, Xle = { class: "flex gap-2" }, Qle = /* @__PURE__ */ be({
  __name: "VariableConfigModal",
  props: {
    open: { type: Boolean }
  },
  emits: ["close"],
  setup(e, { emit: t }) {
    const n = e, o = t, r = _s(), { t: i } = sn(), a = ce([]), l = ce(""), s = () => `new-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`;
    function u(g) {
      return {
        id: "",
        name: g,
        label: "",
        type: "custom",
        hide: !1,
        refresh: "onLoad",
        multi: !1,
        includeAll: !1,
        showOnDashboard: "label-and-value"
      };
    }
    ke(
      () => n.open,
      (g) => {
        if (g) {
          const m = Object.values(r.variables).map((x) => ({
            id: x.config.id,
            isNew: !1,
            config: JSON.parse(JSON.stringify(x.config))
          }));
          a.value = m, l.value = m[0]?.id ?? "";
        }
      }
    );
    const c = E(
      () => a.value.find((g) => g.id === l.value) ?? null
    );
    function d() {
      const m = `variable_${a.value.length + 1}`, x = s(), S = {
        id: x,
        isNew: !0,
        config: u(m)
      };
      a.value = [...a.value, S], l.value = x;
    }
    function f() {
      if (!c.value)
        return;
      const g = a.value.findIndex((m) => m.id === l.value);
      a.value = a.value.filter((m) => m.id !== l.value), a.value.length > 0 ? l.value = a.value[Math.min(g, a.value.length - 1)].id : l.value = "";
    }
    function p(g) {
      c.value && (a.value = a.value.map(
        (m) => m.id === l.value ? { ...m, config: { ...m.config, ...g } } : m
      ));
    }
    function v() {
      const g = r.variables, m = new Set(a.value.map((S) => S.id)), x = new Set(Object.keys(g));
      for (const S of x)
        m.has(S) || r.removeVariable(S);
      for (const S of a.value) {
        const C = { ...S.config, id: S.id };
        C.hide = C.showOnDashboard === "nothing" || !!C.hideFromVariableList, C.customOptions && (C.customValues = C.customOptions.map((P) => P.value).join(",")), S.isNew || !x.has(S.id) ? r.addVariable(C) : r.updateVariable(S.id, C);
      }
      o("close");
    }
    return (g, m) => (ne(), ft(T(Vo), {
      open: e.open,
      width: 780,
      footer: null,
      class: "no-content-padding-modal",
      "body-style": { padding: 0, height: "480px", display: "flex", flexDirection: "column" },
      onCancel: m[2] || (m[2] = (x) => o("close"))
    }, {
      title: he(() => [
        L("div", Kle, oe(T(i)("variable.modal.title")), 1)
      ]),
      default: he(() => [
        L("div", qle, [
          h(Wle, {
            drafts: a.value,
            "selected-id": l.value,
            onSelect: m[0] || (m[0] = (x) => l.value = x),
            onAdd: d
          }, null, 8, ["drafts", "selected-id"]),
          L("div", Yle, [
            c.value ? (ne(), ft(Rle, {
              key: 0,
              draft: c.value,
              onChange: p
            }, null, 8, ["draft"])) : (ne(), xe("div", Gle, oe(T(i)("variable.modal.placeholder")), 1))
          ])
        ]),
        L("div", Ule, [
          h(T(Lt), {
            danger: "",
            disabled: !c.value,
            onClick: f
          }, {
            default: he(() => [
              Le(oe(T(i)("variable.modal.delete")), 1)
            ]),
            _: 1
          }, 8, ["disabled"]),
          L("div", Xle, [
            h(T(Lt), {
              onClick: m[1] || (m[1] = (x) => o("close"))
            }, {
              default: he(() => [
                Le(oe(T(i)("variable.modal.cancel")), 1)
              ]),
              _: 1
            }),
            h(T(Lt), {
              type: "primary",
              onClick: v
            }, {
              default: he(() => [
                Le(oe(T(i)("variable.modal.save")), 1)
              ]),
              _: 1
            })
          ])
        ])
      ]),
      _: 1
    }, 8, ["open"]));
  }
}), Zle = {
  key: 0,
  class: "flex items-center gap-3 flex-wrap",
  style: { padding: "0 8px" }
}, Jle = {
  key: 0,
  class: "flex items-center gap-1"
}, ese = {
  key: 1,
  class: "flex items-center gap-1"
}, tse = {
  key: 2,
  class: "flex items-center gap-1"
}, NE = /* @__PURE__ */ be({
  __name: "VariableBar",
  setup(e) {
    const t = _s(), n = oa(), o = Fa(), { t: r } = sn(), i = ce(!1), a = E(
      () => Object.entries(t.variables).filter(([, u]) => !u.config.hide).map(([u, c]) => ({ id: u, state: c })).sort((u, c) => u.state.config.name.localeCompare(c.state.config.name))
    ), l = E(() => o.isDark ? "#888" : "#555");
    function s(u, c) {
      console.warn("var", c), t.setValue(u, c);
      const d = t.variables[u];
      if (d) {
        const f = t.getDependents(d.config.name);
        for (const p of f)
          for (const [v, g] of Object.entries(t.variables))
            if (g.config.name === p) {
              t.refreshVariable(v);
              break;
            }
      }
    }
    return (u, c) => a.value.length > 0 || T(n).isEditing ? (ne(), xe("div", Zle, [
      (ne(!0), xe(Je, null, Ut(a.value, (d) => (ne(), xe(Je, {
        key: d.id
      }, [
        d.state.config.type === "textbox" ? (ne(), xe("div", Jle, [
          L("span", {
            class: "text-sm",
            style: Bt({ color: l.value, whiteSpace: "nowrap" })
          }, oe(d.state.config.label), 5),
          h(T(kt), {
            size: "small",
            style: { width: "160px" },
            value: Array.isArray(d.state.current) ? d.state.current[0] || "" : d.state.current,
            placeholder: "Enter value...",
            onChange: (f) => s(d.id, f.target.value)
          }, null, 8, ["value", "onChange"])
        ])) : d.state.config.type === "constant" ? (ne(), xe("div", ese, [
          d.state.config.label ? (ne(), xe("span", {
            key: 0,
            class: "text-sm",
            style: Bt({ color: l.value, whiteSpace: "nowrap" })
          }, oe(d.state.config.label), 5)) : rt("", !0),
          h(T(Pi), { style: { margin: "0", "font-size": "12px" } }, {
            default: he(() => [
              Le(oe(d.state.config.constantValue ?? ""), 1)
            ]),
            _: 2
          }, 1024)
        ])) : (ne(), xe("div", tse, [
          L("span", {
            class: "text-sm",
            style: Bt({ color: l.value, whiteSpace: "nowrap" })
          }, oe(d.state.config.label || d.state.config.name) + ": ", 5),
          h(T(Dt), {
            value: d.state.current,
            mode: d.state.config.allowCustomValue ? d.state.config.multi ? "tags" : "SECRET_COMBOBOX_MODE_DO_NOT_USE" : d.state.config.multi ? "multiple" : void 0,
            loading: d.state.loading,
            style: { minWidth: "120px" },
            size: "small",
            "show-search": "",
            "allow-clear": d.state.config.allowClear ?? !1,
            "filter-option": (f, p) => (p?.label ?? "").toLowerCase().includes(f.toLowerCase()),
            placeholder: `Select ${d.state.config.label || d.state.config.name}`,
            onChange: (f) => s(d.id, f)
          }, {
            default: he(() => [
              (ne(!0), xe(Je, null, Ut(d.state.options, (f) => (ne(), ft(T(Mj), {
                key: f.value,
                value: f.value,
                label: f.label === "$__all" ? T(r)("common.all") : f.label
              }, {
                default: he(() => [
                  Le(oe(f.label === "$__all" ? T(r)("common.all") : f.label), 1)
                ]),
                _: 2
              }, 1032, ["value", "label"]))), 128))
            ]),
            _: 2
          }, 1032, ["value", "mode", "loading", "allow-clear", "filter-option", "placeholder", "onChange"]),
          d.state.error ? (ne(), ft(T(Pi), {
            key: 0,
            color: "red",
            style: { "font-size": "10px", margin: "0" }
          }, {
            default: he(() => [
              Le(oe(d.state.error), 1)
            ]),
            _: 2
          }, 1024)) : rt("", !0)
        ]))
      ], 64))), 128)),
      T(n).isEditing ? (ne(), ft(T(Lt), {
        key: 0,
        size: "small",
        type: "text",
        class: "ml-auto",
        onClick: c[0] || (c[0] = (d) => i.value = !0)
      }, {
        default: he(() => [
          L("span", {
            class: Pt([T(bt).settings, "text-base"])
          }, null, 2)
        ]),
        _: 1
      })) : rt("", !0),
      h(Qle, {
        open: i.value,
        onClose: c[1] || (c[1] = (d) => i.value = !1)
      }, null, 8, ["open"])
    ])) : rt("", !0);
  }
}), nse = /* @__PURE__ */ be({
  __name: "DatasourceSelect",
  props: {
    value: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { config: o } = nc(), r = E(() => {
      const l = [{ value: "mock", label: "Mock", type: "mock", uid: "" }], s = o.value.datasourceConfig ?? [];
      return s.filter((u) => u.type === "zabbix").forEach((u, c) => {
        const d = u.uid || String(c);
        l.push({ value: `zabbix:${d}`, label: `${u.name}`, type: "zabbix", uid: d });
      }), s.filter((u) => u.type === "argus").forEach((u, c) => {
        const d = u.uid || String(c);
        l.push({ value: `argus:${d}`, label: `${u.name}`, type: "argus", uid: d });
      }), l;
    }), i = E(
      () => r.value.map((l) => ({ value: l.value, label: l.label }))
    );
    function a(l) {
      const s = r.value.find((u) => u.value === l);
      s && n("change", s);
    }
    return (l, s) => (ne(), ft(T(Dt), {
      size: "small",
      style: { "min-width": "140px" },
      value: e.value,
      options: i.value,
      onChange: a
    }, null, 8, ["value", "options"]));
  }
}), ose = {
  key: 0,
  class: ""
}, rse = {
  key: 1,
  class: "pt-2 px-2 text-xs text-secondary"
}, ise = /* @__PURE__ */ be({
  __name: "QueryEditorRow",
  props: {
    entry: {},
    index: {},
    isChart: { type: Boolean },
    canDelete: { type: Boolean }
  },
  emits: ["update", "remove"],
  setup(e, { emit: t }) {
    const n = e, o = t, r = E(() => "ABCDEFGHIJKLMNOPQRSTUVWXYZ"[n.index] ?? String(n.index + 1)), i = E(() => Pp(n.entry.dataSource.type)), a = E(() => i.value?.QueryEditor ?? null), l = E(() => {
      const c = n.entry.dataSource;
      if (c.type === "mock")
        return "mock";
      const d = "datasourceId" in c ? c.datasourceId : "";
      return d ? `${c.type}:${d}` : c.type;
    });
    function s(c) {
      const d = Pp(c.type);
      if (!d?.defaultQuery)
        return;
      const f = { ...d.defaultQuery(), ...c.uid ? { datasourceId: c.uid } : {} };
      o("update", { dataSource: f });
    }
    function u(c) {
      o("update", { dataSource: c });
    }
    return (c, d) => (ne(), ft(T(_l), {
      size: "small",
      collapsible: "icon",
      bordered: !0,
      "default-active-key": [e.entry.id]
    }, {
      default: he(() => [
        (ne(), ft(T(_l).Panel, {
          key: e.entry.id
        }, {
          header: he(() => [
            L("div", {
              class: "flex items-center gap-2",
              onClick: d[3] || (d[3] = ur(() => {
              }, ["stop"]))
            }, [
              h(T(Pi), {
                color: "blue",
                style: { "font-size": "12px", "font-weight": "600", margin: "0", "min-width": "24px", "text-align": "center", "line-height": "20px" }
              }, {
                default: he(() => [
                  Le(oe(r.value), 1)
                ]),
                _: 1
              }),
              h(T(Sa), {
                size: "small",
                checked: e.entry.enabled,
                onChange: d[0] || (d[0] = (f) => o("update", { enabled: f })),
                onClick: d[1] || (d[1] = ur(() => {
                }, ["stop"]))
              }, null, 8, ["checked"]),
              d[5] || (d[5] = L("div", { class: "flex-1" }, null, -1)),
              d[6] || (d[6] = L("span", { style: { "font-size": "11px", color: "var(--ant-color-text-secondary)" } }, "数据源", -1)),
              h(nse, {
                value: l.value,
                onClick: d[2] || (d[2] = ur(() => {
                }, ["stop"])),
                onChange: s
              }, null, 8, ["value"])
            ])
          ]),
          extra: he(() => [
            e.canDelete ? (ne(), ft(T(Lt), {
              key: 0,
              type: "text",
              danger: "",
              size: "small",
              onClick: d[4] || (d[4] = ur((f) => o("remove"), ["stop"]))
            }, {
              default: he(() => [
                L("span", {
                  class: Pt(T(bt).delete)
                }, null, 2)
              ]),
              _: 1
            })) : rt("", !0)
          ]),
          default: he(() => [
            e.entry.enabled && a.value ? (ne(), xe("div", ose, [
              (ne(), ft(YP(a.value), {
                query: e.entry.dataSource,
                "datasource-id": "datasourceId" in e.entry.dataSource ? e.entry.dataSource.datasourceId : "",
                "is-chart": e.isChart,
                onChange: u
              }, null, 40, ["query", "datasource-id", "is-chart"]))
            ])) : e.entry.enabled && !a.value ? (ne(), xe("div", rse, " No query editor available for datasource type: " + oe(e.entry.dataSource.type), 1)) : rt("", !0)
          ]),
          _: 1
        }))
      ]),
      _: 1
    }, 8, ["default-active-key"]));
  }
}), ase = {
  class: "px-4 py-3 flex flex-col gap-2",
  style: { "min-width": "300px" }
}, lse = { class: "flex items-center gap-2" }, sse = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, use = { class: "flex items-center gap-2" }, cse = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, dse = { class: "flex items-center gap-2" }, fse = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, pse = {
  class: "text-xs",
  style: { color: "var(--ant-color-text-quaternary)" }
}, hse = { class: "flex items-center gap-2" }, gse = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, vse = { class: "flex items-center gap-2" }, mse = {
  class: "text-xs text-secondary flex-shrink-0",
  style: { width: "120px" }
}, FP = 1e3, bse = /* @__PURE__ */ be({
  __name: "QueryOptionsPanel",
  setup(e) {
    const { t } = sn(), { panel: n, onChange: o } = vc(), r = oa();
    function i(u) {
      return u >= 36e5 ? `${Math.round(u / 36e5)}h` : u >= 6e4 ? `${Math.round(u / 6e4)}m` : u >= 1e3 ? `${Math.round(u / 1e3)}s` : `${u}ms`;
    }
    function a(u) {
      const c = u.trim().match(/^(\d+(?:\.\d+)?)(ms|[smh])?$/i);
      if (!c)
        return;
      const d = Number.parseFloat(c[1]), f = (c[2] ?? "s").toLowerCase();
      return f === "ms" ? d : f === "s" ? d * 1e3 : f === "m" ? d * 6e4 : d * 36e5;
    }
    const l = E(() => {
      const u = n.value.queryOptions?.maxDataPoints ?? FP, c = r.timeRange, d = c.to - c.from;
      return Math.max(Math.ceil(d / u), 1e3);
    }), s = E(() => {
      const u = n.value.queryOptions?.minIntervalMs;
      return u != null ? i(u) : "";
    });
    return (u, c) => (ne(), xe("div", ase, [
      L("div", lse, [
        L("span", sse, [
          h(T(Lo), {
            title: T(t)("qb.queryOptions.maxDataPoints")
          }, {
            default: he(() => [
              L("span", {
                class: Pt([T(bt).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Le(" " + oe(T(t)("qb.queryOptions.maxDataPoints")), 1)
        ]),
        h(T(To), {
          size: "small",
          style: { width: "100px" },
          min: 1,
          value: T(n).queryOptions?.maxDataPoints,
          placeholder: String(FP),
          onChange: c[0] || (c[0] = (d) => T(o)({ queryOptions: { ...T(n).queryOptions, maxDataPoints: d ?? void 0 } }))
        }, null, 8, ["value", "placeholder"])
      ]),
      L("div", use, [
        L("span", cse, [
          h(T(Lo), {
            title: T(t)("qb.queryOptions.minInterval")
          }, {
            default: he(() => [
              L("span", {
                class: Pt([T(bt).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Le(" " + oe(T(t)("qb.queryOptions.minInterval")), 1)
        ]),
        h(T(kt), {
          size: "small",
          style: { width: "100px" },
          value: s.value,
          placeholder: T(t)("qb.queryOptions.minIntervalPlaceholder"),
          onChange: c[1] || (c[1] = (d) => {
            const f = d.target.value.trim();
            if (!f) {
              T(o)({ queryOptions: { ...T(n).queryOptions, minIntervalMs: void 0 } });
              return;
            }
            const p = a(f);
            p !== void 0 && T(o)({ queryOptions: { ...T(n).queryOptions, minIntervalMs: p } });
          })
        }, null, 8, ["value", "placeholder"])
      ]),
      L("div", dse, [
        L("span", fse, [
          h(T(Lo), {
            title: T(t)("qb.queryOptions.interval")
          }, {
            default: he(() => [
              L("span", {
                class: Pt([T(bt).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Le(" " + oe(T(t)("qb.queryOptions.interval")), 1)
        ]),
        h(T(kt), {
          size: "small",
          style: { width: "100px" },
          value: i(l.value),
          readonly: ""
        }, null, 8, ["value"]),
        L("span", pse, " = " + oe(T(t)("qb.queryOptions.intervalHint")), 1)
      ]),
      L("div", hse, [
        L("span", gse, [
          h(T(Lo), {
            title: T(t)("qb.queryOptions.relativeTime")
          }, {
            default: he(() => [
              L("span", {
                class: Pt([T(bt).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Le(" " + oe(T(t)("qb.queryOptions.relativeTime")), 1)
        ]),
        h(T(kt), {
          size: "small",
          style: { width: "100px" },
          placeholder: "1h",
          value: T(n).queryOptions?.relativeTime ?? "",
          onChange: c[2] || (c[2] = (d) => T(o)({ queryOptions: { ...T(n).queryOptions, relativeTime: d.target.value || void 0 } }))
        }, null, 8, ["value"])
      ]),
      L("div", vse, [
        L("span", mse, [
          h(T(Lo), {
            title: T(t)("qb.queryOptions.timeShift")
          }, {
            default: he(() => [
              L("span", {
                class: Pt([T(bt).info, "mr-1 opacity-50 text-xs"])
              }, null, 2)
            ]),
            _: 1
          }, 8, ["title"]),
          Le(" " + oe(T(t)("qb.queryOptions.timeShift")), 1)
        ]),
        h(T(kt), {
          size: "small",
          style: { width: "100px" },
          placeholder: "1h",
          value: T(n).queryOptions?.timeShift ?? "",
          onChange: c[3] || (c[3] = (d) => T(o)({ queryOptions: { ...T(n).queryOptions, timeShift: d.target.value || void 0 } }))
        }, null, 8, ["value"])
      ])
    ]));
  }
}), yse = { class: "flex flex-col h-full" }, xse = {
  class: "flex items-center gap-2 px-3 py-1.5 flex-shrink-0 flex-wrap",
  style: { "border-bottom": "1px solid var(--ant-color-border-secondary)" }
}, wse = { class: "flex-1 overflow-y-auto px-3 py-2 flex flex-col gap-2" }, Sse = {
  key: 0,
  class: "text-center text-secondary text-sm py-8"
}, Cse = /* @__PURE__ */ be({
  __name: "QueryEditorPane",
  setup(e) {
    const { t } = sn(), { panel: n, onChange: o } = vc(), r = E(() => ["timeseries", "bar", "histogram"].includes(n.value.type)), i = E(() => n.value.queries ?? []), a = ce(!1), l = ce("mock");
    function s(d, f) {
      o({ queries: i.value.map((p, v) => v === d ? { ...p, ...f } : p) });
    }
    function u(d) {
      o({ queries: i.value.filter((f, p) => p !== d) });
    }
    function c() {
      if (i.value.length >= 26)
        return;
      const d = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"[i.value.length] ?? String(i.value.length + 1), [f, p = ""] = l.value.split(":"), v = Pp(f);
      if (!v?.defaultQuery)
        return;
      const g = {
        ...v.defaultQuery(),
        ...p ? { datasourceId: p } : {},
        // Non-chart types: each query = 1 series; seriesCount controlled by query count
        ...!r.value && "seriesCount" in v.defaultQuery() ? { seriesCount: 1 } : {}
      };
      o({
        queries: [...i.value, { id: d, enabled: !0, dataSource: g }]
      });
    }
    return (d, f) => (ne(), xe("div", yse, [
      L("div", xse, [
        h(NE),
        f[1] || (f[1] = L("div", { class: "flex-1" }, null, -1)),
        h(AE),
        h(T(lU), {
          type: "vertical",
          style: { margin: "0" }
        }),
        h(T(Qi).Compact, null, {
          default: he(() => [
            h(T(Lt), {
              type: "primary",
              disabled: i.value.length >= 26,
              onClick: c
            }, {
              default: he(() => [
                L("span", {
                  class: Pt([T(bt).plus, "mr-1"])
                }, null, 2),
                Le(" " + oe(T(t)("qb.addQuery")), 1)
              ]),
              _: 1
            }, 8, ["disabled"]),
            h(T(hW), {
              open: a.value,
              "onUpdate:open": f[0] || (f[0] = (p) => a.value = p),
              trigger: "click",
              placement: "bottomRight",
              "overlay-inner-style": { padding: 0, minWidth: "320px" }
            }, {
              content: he(() => [
                h(bse)
              ]),
              default: he(() => [
                h(T(Lt), { class: "text-12px cursor-pointer hover:op-90 active:op-80 underline" }, {
                  default: he(() => [
                    Le(oe(T(t)("qb.queryOptions")) + " ", 1),
                    L("span", {
                      class: Pt([T(bt).chevronDown, ""])
                    }, null, 2)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }, 8, ["open"])
          ]),
          _: 1
        })
      ]),
      L("div", wse, [
        (ne(!0), xe(Je, null, Ut(i.value, (p, v) => (ne(), ft(ise, {
          key: p.id,
          entry: p,
          index: v,
          "is-chart": r.value,
          "can-delete": i.value.length > 1,
          onUpdate: (g) => s(v, g),
          onRemove: () => u(v)
        }, null, 8, ["entry", "index", "is-chart", "can-delete", "onUpdate", "onRemove"]))), 128)),
        i.value.length === 0 ? (ne(), xe("div", Sse, ' No queries. Click "' + oe(T(t)("qb.addQuery")) + '" to start. ', 1)) : rt("", !0)
      ])
    ]));
  }
}), $se = { class: "w-full h-full" }, Pse = { class: "w-full h-full" }, Ose = /* @__PURE__ */ be({
  __name: "PanelEditorLayout",
  setup(e) {
    const n = Fa().isDark ? "#303030" : "#e8e8e8";
    return (o, r) => (ne(), ft(T(AP), { style: { height: "100%" } }, {
      default: he(() => [
        h(T(Vf), { "min-size": 200 }, {
          default: he(() => [
            h(T(AP), {
              vertical: "",
              "default-sizes": [100, 200]
            }, {
              default: he(() => [
                h(T(Vf), { "min-size": 100 }, {
                  default: he(() => [
                    L("div", $se, [
                      h(dle)
                    ])
                  ]),
                  _: 1
                }),
                h(T(Vf), { "min-size": 60 }, {
                  default: he(() => [
                    L("div", Pse, [
                      h(Cse)
                    ])
                  ]),
                  _: 1
                })
              ]),
              _: 1
            })
          ]),
          _: 1
        }),
        h(T(Vf), {
          "preferred-size": "35%",
          "min-size": 200
        }, {
          default: he(() => [
            L("div", {
              class: "w-full h-full overflow-y-auto",
              style: Bt({ borderLeft: `1px solid ${T(n)}` })
            }, [
              h(Lie)
            ], 4)
          ]),
          _: 1
        })
      ]),
      _: 1
    }));
  }
}), kse = { class: "flex items-center gap-2" }, Ise = { class: "font-medium text-sm" }, _se = { class: "flex justify-end gap-2 py-1" }, Tse = /* @__PURE__ */ be({
  __name: "PanelEditorModal",
  setup(e) {
    const t = oa(), { t: n } = sn(), o = ce(null), r = E(() => {
      const v = t.editingPanelId;
      return v ? t.panels[v] : null;
    }), i = E(() => o.value ?? r.value), { response: a } = SE(
      () => i.value?.queries ?? [],
      () => t.timeRange,
      800
    ), l = E(() => {
      const v = a.value?.data?.[0];
      return v ? v.fields.filter((g) => g.type === "number").map((g) => g.name) : [];
    }), s = E(() => {
      const v = a.value?.data?.[0];
      return v ? v.fields.map((g) => g.config?.displayNameFromDS ?? g.name) : [];
    });
    function u(v) {
      i.value && (o.value = { ...i.value, ...v });
    }
    function c() {
      o.value && t.editingPanelId && t.updatePanel(t.editingPanelId, o.value), o.value = null, t.setEditingPanel(null);
    }
    function d() {
      o.value = null, t.setEditingPanel(null);
    }
    ke(() => t.editingPanelId, (v) => {
      v || (o.value = null);
    });
    const f = E(() => !!t.editingPanelId && !!r.value), p = ce(!1);
    return ke(f, (v) => {
      v && !p.value && setTimeout(() => {
        p.value = !0;
      }, 0);
    }), kte({
      panel: E(() => i.value),
      onChange: u,
      previewData: a,
      numericFieldNames: l,
      allFieldNames: s
    }), (v, g) => (ne(), ft(T(SU), {
      open: f.value,
      closable: !0,
      mask: !1,
      placement: "right",
      width: "71vw",
      "body-style": { padding: 0 },
      "destroy-on-close": !1,
      onClose: d
    }, {
      title: he(() => [
        L("div", kse, [
          L("span", Ise, "Edit: " + oe(i.value?.title ?? ""), 1)
        ])
      ]),
      footer: he(() => [
        L("div", _se, [
          h(T(Lt), { onClick: d }, {
            default: he(() => [
              Le(oe(T(n)("dashboard.cancel")), 1)
            ]),
            _: 1
          }),
          h(T(Lt), {
            type: "primary",
            onClick: c
          }, {
            default: he(() => [
              Le(oe(T(n)("dashboard.save")), 1)
            ]),
            _: 1
          })
        ])
      ]),
      default: he(() => [
        i.value && p.value ? (ne(), ft(Ose, { key: 0 })) : rt("", !0)
      ]),
      _: 1
    }, 8, ["open"]));
  }
}), Mse = {
  key: 0,
  class: "panel-container w-full h-full flex flex-col rounded-lg overflow-hidden bg-white dark:bg-[#1f1f1f] border border-[#e8e8e8] dark:border-[#303030]"
}, Ese = { class: "flex items-center gap-2 min-w-0 lh-1 flex-1 text-[#666] dark:text-[#666]" }, Dse = {
  key: 0,
  class: "drag-handle flex-shrink-0 cursor-grab"
}, Ase = { class: "text-sm truncate text-[#141414] dark:text-[#d9d9d9]" }, Nse = { class: "panel-actions flex items-center gap-10px lh-1 flex-shrink-0 text-[#444] dark:text-[#666]" }, Rse = { class: "panel-content flex-1 overflow-hidden" }, zse = { class: "w-full h-full flex flex-col rounded-lg overflow-hidden bg-white dark:bg-[#1f1f1f]" }, Fse = { class: "panel-content flex-1 overflow-hidden" }, Bse = /* @__PURE__ */ be({
  __name: "PanelContainer",
  props: {
    panelId: {},
    menuMode: { default: "inline" }
  },
  setup(e) {
    const t = e, n = oa(), o = Fa(), { t: r } = sn(), i = ce(!1), a = ce(!1), l = E(() => n.panels[t.panelId]), s = E(() => o.isDark), u = E(() => s.value ? "#666" : "#bbb"), c = E(() => {
      const v = (g) => ko("span", { class: g });
      return n.isEditing ? [
        { key: "edit", label: r("panel.menu.edit"), icon: () => v(bt.edit) },
        { key: "clone", label: r("panel.menu.clone"), icon: () => v(bt.clone) },
        { key: "fullscreen", label: r("panel.menu.fullscreen"), icon: () => v(bt.fullscreen) },
        { type: "divider" },
        { key: "remove", label: r("panel.menu.remove"), icon: () => v(bt.delete), danger: !0 }
      ] : [
        { key: "fullscreen", label: r("panel.menu.fullscreen"), icon: () => v(bt.fullscreen) }
      ];
    });
    function d(v) {
      switch (v) {
        case "edit":
          n.setEditingPanel(t.panelId);
          break;
        case "clone":
          n.clonePanel(t.panelId);
          break;
        case "remove":
          Vo.confirm({
            title: r("panel.remove.title", { title: l.value?.title ?? "" }),
            content: r("panel.remove.content"),
            okText: r("panel.remove.ok"),
            okButtonProps: { danger: !0 },
            onOk: () => n.removePanel(t.panelId)
          });
          break;
        case "fullscreen":
          i.value = !0;
          break;
      }
    }
    function f(v) {
      a.value = !1, d(String(v.key));
    }
    function p(v) {
      v.stopPropagation(), n.refreshPanel(t.panelId);
    }
    return (v, g) => (ne(), xe(Je, null, [
      l.value && !i.value ? (ne(), xe("div", Mse, [
        L("div", {
          class: "panel-header flex items-center px-3 py-2 flex-shrink-0 border-b border-[#e8e8e8] dark:border-[#303030]",
          onDblclick: g[6] || (g[6] = (m) => T(n).isEditing && T(n).setEditingPanel(t.panelId))
        }, [
          L("div", Ese, [
            T(n).isEditing ? (ne(), xe("span", Dse, [
              L("span", {
                class: Pt(T(bt).dragVertical)
              }, null, 2)
            ])) : rt("", !0),
            L("span", Ase, oe(l.value.title), 1),
            l.value.description ? (ne(), ft(T(Lo), {
              key: 1,
              title: l.value.description,
              placement: "bottom"
            }, {
              default: he(() => [
                L("span", {
                  class: Pt([T(bt).info, "flex-shrink-0"])
                }, null, 2)
              ]),
              _: 1
            }, 8, ["title"])) : rt("", !0),
            h(ME, {
              links: l.value.links ?? [],
              "icon-color": u.value
            }, null, 8, ["links", "icon-color"])
          ]),
          L("div", Nse, [
            h(T(Lo), {
              title: T(r)("panel.menu.refresh")
            }, {
              default: he(() => [
                L("span", {
                  class: Pt([T(bt).refresh, "panel-refresh-btn cursor-pointer"]),
                  onMousedown: g[0] || (g[0] = ur(() => {
                  }, ["stop"])),
                  onClick: p
                }, null, 34)
              ]),
              _: 1
            }, 8, ["title"]),
            t.menuMode === "inline" ? (ne(), xe(Je, { key: 0 }, [
              T(n).isEditing ? (ne(), ft(T(Lo), {
                key: 0,
                title: T(r)("panel.menu.edit")
              }, {
                default: he(() => [
                  L("span", {
                    class: Pt([T(bt).edit, "cursor-pointer"]),
                    onClick: g[1] || (g[1] = (m) => d("edit"))
                  }, null, 2)
                ]),
                _: 1
              }, 8, ["title"])) : rt("", !0),
              T(n).isEditing ? (ne(), ft(T(Lo), {
                key: 1,
                title: T(r)("panel.menu.clone")
              }, {
                default: he(() => [
                  L("span", {
                    class: Pt([T(bt).clone, "cursor-pointer"]),
                    onClick: g[2] || (g[2] = (m) => d("clone"))
                  }, null, 2)
                ]),
                _: 1
              }, 8, ["title"])) : rt("", !0),
              T(n).isEditing ? (ne(), ft(T(Lo), {
                key: 2,
                title: T(r)("panel.menu.remove")
              }, {
                default: he(() => [
                  L("span", {
                    class: Pt([T(bt).delete, "cursor-pointer text-red-500"]),
                    onClick: g[3] || (g[3] = (m) => d("remove"))
                  }, null, 2)
                ]),
                _: 1
              }, 8, ["title"])) : rt("", !0)
            ], 64)) : (ne(), ft(T(Mr), {
              key: 1,
              open: a.value,
              "onUpdate:open": g[5] || (g[5] = (m) => a.value = m),
              trigger: "click"
            }, {
              overlay: he(() => [
                h(T(fo), {
                  items: c.value,
                  onClick: f
                }, null, 8, ["items"])
              ]),
              default: he(() => [
                L("span", {
                  class: "cursor-pointer p-[2px_4px]",
                  onClick: g[4] || (g[4] = ur(() => {
                  }, ["prevent"]))
                }, [
                  L("span", {
                    class: Pt(T(bt).dotsVertical)
                  }, null, 2)
                ])
              ]),
              _: 1
            }, 8, ["open"]))
          ])
        ], 32),
        L("div", Rse, [
          Ra(v.$slots, "default", {}, void 0, !0)
        ])
      ])) : rt("", !0),
      i.value ? (ne(), ft(T(Vo), {
        key: 1,
        open: !0,
        title: l.value?.title,
        footer: null,
        width: "92vw",
        "body-style": { height: "82vh", padding: 0 },
        closable: !1,
        onCancel: g[7] || (g[7] = (m) => i.value = !1)
      }, {
        default: he(() => [
          L("div", zse, [
            L("div", Fse, [
              Ra(v.$slots, "default", {}, void 0, !0)
            ])
          ])
        ]),
        _: 3
      }, 8, ["title"])) : rt("", !0)
    ], 64));
  }
}), BP = /* @__PURE__ */ wr(Bse, [["__scopeId", "data-v-2c616ca4"]]), Lse = { class: "font-medium text-sm" }, Hse = { class: "text-xs text-secondary mt-1" }, Vse = /* @__PURE__ */ be({
  __name: "AddPanelModal",
  setup(e) {
    const t = oa(), { t: n } = sn(), o = [
      { type: "timeseries", icon: bt.chartLine, descKey: "panel.type.desc.timeseries" },
      { type: "bar", icon: bt.chartBar, descKey: "panel.type.desc.bar" },
      { type: "histogram", icon: bt.chartArea, descKey: "panel.type.desc.histogram" },
      { type: "stat", icon: bt.stat, descKey: "panel.type.desc.stat" },
      { type: "gauge", icon: bt.gauge, descKey: "panel.type.desc.gauge" },
      { type: "table", icon: bt.table, descKey: "panel.type.desc.table" },
      { type: "pie", icon: bt.chartPie, descKey: "panel.type.desc.pie" }
    ];
    function r(i) {
      t.addPanel(i);
    }
    return (i, a) => (ne(), ft(T(Vo), {
      open: T(t).addPanelModalOpen,
      title: T(n)("dashboard.addPanel"),
      footer: null,
      onCancel: a[0] || (a[0] = (l) => T(t).addPanelModalOpen = !1)
    }, {
      default: he(() => [
        h(T(wQ), {
          gutter: [16, 16],
          class: "mt-4"
        }, {
          default: he(() => [
            (ne(), xe(Je, null, Ut(o, (l) => h(T(FY), {
              key: l.type,
              span: 8
            }, {
              default: he(() => [
                h(T(Eu), {
                  hoverable: "",
                  class: "text-center cursor-pointer",
                  onClick: (s) => r(l.type)
                }, {
                  default: he(() => [
                    L("div", {
                      class: Pt(["text-2xl mb-2", l.icon])
                    }, null, 2),
                    L("div", Lse, oe(T(n)(`config.type.${l.type}`)), 1),
                    L("div", Hse, oe(T(n)(l.descKey)), 1)
                  ]),
                  _: 2
                }, 1032, ["onClick"])
              ]),
              _: 2
            }, 1024)), 64))
          ]),
          _: 1
        })
      ]),
      _: 1
    }, 8, ["open", "title"]));
  }
}), jse = { style: { display: "flex", "align-items": "center", "flex-wrap": "wrap", gap: "8px", padding: "0 4px" } }, Wse = { class: "" }, Kse = { style: { margin: "0" } }, qse = { style: { margin: "0" } }, Yse = /* @__PURE__ */ be({
  __name: "DashboardHeader",
  setup(e) {
    const t = oa(), { t: n } = sn(), { config: o } = nc(), { message: r } = Ru.useApp(), i = ce(!1), a = ce(!1), l = ce(null);
    function s() {
      t.confirmSave(o.value.onSave);
    }
    function u() {
      t.isDirty ? i.value = !0 : t.discardChanges();
    }
    function c() {
      i.value = !1, t.discardChanges();
    }
    function d() {
      const S = t.exportJSON(), C = new Blob([S], { type: "application/json" }), P = URL.createObjectURL(C), $ = document.createElement("a");
      $.href = P, $.download = "dashboard.json", $.click(), URL.revokeObjectURL(P), r.success(n("dashboard.exportSuccess"));
    }
    function f() {
      l.value?.click();
    }
    function p(S) {
      const C = S.target.files?.[0];
      C && (C.text().then((P) => {
        t.importJSON(P) ? r.success(n("dashboard.importSuccess")) : r.error(n("dashboard.importError"));
      }), S.target.value = "");
    }
    function v(S) {
      t.importJSON(S) ? r.success(n("dashboard.importSuccess")) : r.error(n("dashboard.importError"));
    }
    const g = E(() => {
      const S = r4(), C = (o.value.presets ?? []).map((P) => ({ label: P.label, value: P.config }));
      return [{ label: "内置模板", value: S }, ...C];
    }), m = E(() => [
      { key: "export", label: n("dashboard.export"), icon: bt.export },
      { key: "import", label: n("dashboard.import"), icon: bt.import },
      { type: "divider" },
      { key: "clear", label: n("dashboard.clearPanels"), icon: bt.delete, danger: !0 }
    ]);
    function x(S) {
      S === "export" ? d() : S === "import" ? f() : S === "clear" && (a.value = !0);
    }
    return (S, C) => (ne(), xe("div", jse, [
      T(t).isEditing ? (ne(), xe(Je, { key: 0 }, [
        h(T(Qi).Compact, null, {
          default: he(() => [
            h(T(Lt), {
              onClick: C[0] || (C[0] = (P) => T(t).addPanelModalOpen = !0)
            }, {
              default: he(() => [
                L("span", {
                  class: Pt([T(bt).plus, "mr-1"])
                }, null, 2),
                Le(" " + oe(T(n)("dashboard.addPanel")), 1)
              ]),
              _: 1
            }),
            h(T(Dt), {
              placeholder: "预设",
              "popup-match-select-width": !1,
              options: g.value,
              style: { "min-width": "80px" },
              onSelect: C[1] || (C[1] = (P) => v(P))
            }, null, 8, ["options"]),
            L("input", {
              ref_key: "fileInputRef",
              ref: l,
              type: "file",
              accept: ".json",
              style: { display: "none" },
              onChange: p
            }, null, 544),
            h(T(Mr), { trigger: ["click"] }, {
              overlay: he(() => [
                h(T(fo), {
                  onClick: C[2] || (C[2] = ({ key: P }) => x(P))
                }, {
                  default: he(() => [
                    (ne(!0), xe(Je, null, Ut(m.value, (P) => (ne(), xe(Je, {
                      key: P.key ?? P.type
                    }, [
                      P.type === "divider" ? (ne(), ft(T(fo).Divider, { key: 0 })) : (ne(), ft(T(fo).Item, {
                        key: P.key,
                        danger: P.danger
                      }, {
                        default: he(() => [
                          L("span", {
                            class: Pt([P.icon, "mr-1"])
                          }, null, 2),
                          Le(oe(P.label), 1)
                        ]),
                        _: 2
                      }, 1032, ["danger"]))
                    ], 64))), 128))
                  ]),
                  _: 1
                })
              ]),
              default: he(() => [
                h(T(Lt), null, {
                  default: he(() => [
                    L("span", {
                      class: Pt(T(bt).dotsVertical)
                    }, null, 2)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            })
          ]),
          _: 1
        }),
        h(T(Lt), {
          type: "primary",
          ghost: "",
          onClick: s
        }, {
          default: he(() => [
            L("span", {
              class: Pt([T(bt).save, "mr-1"])
            }, null, 2),
            Le(" " + oe(T(n)("dashboard.save")), 1)
          ]),
          _: 1
        }),
        h(T(Lt), {
          danger: T(t).isDirty,
          onClick: u
        }, {
          default: he(() => [
            L("span", {
              class: Pt([T(bt).cancel, "mr-1"])
            }, null, 2),
            Le(" " + oe(T(n)("dashboard.cancel")), 1)
          ]),
          _: 1
        }, 8, ["danger"])
      ], 64)) : (ne(), ft(T(Lt), {
        key: 1,
        onClick: T(t).startEditing
      }, {
        default: he(() => [
          L("span", {
            class: Pt([T(bt).edit, "mr-1"])
          }, null, 2),
          L("span", Wse, oe(T(n)("dashboard.edit")), 1)
        ]),
        _: 1
      }, 8, ["onClick"])),
      h(T(Vo), {
        open: i.value,
        "onUpdate:open": C[3] || (C[3] = (P) => i.value = P),
        title: T(n)("dashboard.cancelConfirmTitle"),
        "ok-text": T(n)("dashboard.cancelConfirmOk"),
        "cancel-text": T(n)("dashboard.cancelConfirmCancel"),
        "ok-button-props": { danger: !0 },
        onOk: c,
        onCancel: C[4] || (C[4] = (P) => i.value = !1)
      }, {
        default: he(() => [
          L("p", Kse, oe(T(n)("dashboard.cancelConfirmTitle")), 1)
        ]),
        _: 1
      }, 8, ["open", "title", "ok-text", "cancel-text"]),
      h(T(Vo), {
        open: a.value,
        "onUpdate:open": C[5] || (C[5] = (P) => a.value = P),
        title: T(n)("dashboard.clearConfirmTitle"),
        "ok-text": T(n)("dashboard.clearConfirmOk"),
        "ok-button-props": { danger: !0 },
        onOk: C[6] || (C[6] = () => {
          T(t).clearPanels(), a.value = !1;
        }),
        onCancel: C[7] || (C[7] = (P) => a.value = !1)
      }, {
        default: he(() => [
          L("p", qse, oe(T(n)("dashboard.clearConfirmTitle")), 1)
        ]),
        _: 1
      }, 8, ["open", "title", "ok-text"])
    ]));
  }
}), Gse = { class: "w-full min-h-screen flex flex-col" }, Use = {
  key: 1,
  class: "p-2"
}, Xse = {
  key: 1,
  class: "flex-center h-64"
}, Qse = { class: "text-center text-secondary" }, Zse = { class: "text-sm mt-2" }, Jse = 30, tm = 8, eue = 768, tue = /* @__PURE__ */ be({
  __name: "DashboardPage",
  setup(e) {
    const { t } = sn(), n = oa(), o = Fa(), { config: r } = nc(), i = E(() => r.value.canEdit !== !1), a = $e([...n.layouts]);
    ke(
      () => n.layouts,
      (g) => {
        const m = a.value;
        m.length === g.length && m.every(
          (x, S) => x.i === g[S].i && x.x === g[S].x && x.y === g[S].y && x.w === g[S].w && x.h === g[S].h
        ) || (a.value = [...g]);
      }
    );
    function l(g) {
      a.value = g, n.setLayouts(g);
    }
    const s = ce(), u = ce(0), c = E(() => u.value > 0 && u.value < eue);
    let d = null;
    Nt(() => {
      s.value && (d = new ResizeObserver((g) => {
        u.value = g[0].contentRect.width;
      }), d.observe(s.value), u.value = s.value.getBoundingClientRect().width);
    }), jo(() => {
      d?.disconnect();
    });
    let f = null;
    function p() {
      v(), n.autoRefresh > 0 && (f = setInterval(() => {
        n.refresh();
      }, n.autoRefresh * 1e3));
    }
    function v() {
      f && (clearInterval(f), f = null);
    }
    return ke(() => n.autoRefresh, p), (g, m) => (ne(), xe("div", Gse, [
      L("div", {
        class: "flex items-center gap-2 flex-wrap px-2 sticky top-0 z-10",
        style: Bt({
          background: T(o).isDark ? "#1a1a1a" : "#f5f5f5",
          border: `1px solid ${T(o).isDark ? "#303030" : "#e8e8e8"}`,
          height: "42px"
        })
      }, [
        h(NE),
        m[0] || (m[0] = L("div", { class: "flex-1" }, null, -1)),
        h(AE),
        i.value ? (ne(), ft(Yse, { key: 0 })) : rt("", !0)
      ], 4),
      L("div", {
        ref_key: "containerRef",
        ref: s,
        class: "flex-1 overflow-auto"
      }, [
        c.value ? (ne(), xe("div", {
          key: 0,
          class: "flex flex-col",
          style: Bt({ gap: `${tm}px`, padding: "8px" })
        }, [
          (ne(!0), xe(Je, null, Ut(Object.keys(T(n).panels), (x) => (ne(), xe("div", { key: x }, [
            h(BP, { "panel-id": x }, {
              default: he(() => [
                h(oy, { "panel-id": x }, null, 8, ["panel-id"])
              ]),
              _: 2
            }, 1032, ["panel-id"])
          ]))), 128))
        ], 4)) : (ne(), xe("div", Use, [
          u.value > 0 ? (ne(), ft(T(Ote), {
            key: 0,
            layout: a.value,
            "col-num": 12,
            "row-height": Jse,
            margin: [tm, tm],
            "is-draggable": i.value && T(n).isEditing,
            "is-resizable": i.value && T(n).isEditing,
            "vertical-compact": !0,
            onLayoutUpdated: l
          }, {
            item: he(({ item: x }) => [
              h(BP, {
                "panel-id": String(x.i)
              }, {
                default: he(() => [
                  h(oy, {
                    "panel-id": String(x.i)
                  }, null, 8, ["panel-id"])
                ]),
                _: 2
              }, 1032, ["panel-id"])
            ]),
            _: 1
          }, 8, ["layout", "margin", "is-draggable", "is-resizable"])) : rt("", !0),
          Object.keys(T(n).panels).length === 0 ? (ne(), xe("div", Xse, [
            L("div", Qse, [
              m[1] || (m[1] = L("div", { class: "text-4xl mb-4" }, [
                L("div", { class: "i-carbon:chart-combo-stacked" })
              ], -1)),
              L("div", null, oe(T(t)("dashboard.empty")), 1),
              L("div", Zse, oe(T(t)("dashboard.emptyHint")), 1)
            ])
          ])) : rt("", !0)
        ]))
      ], 512),
      h(Vse),
      h(Tse)
    ]));
  }
}), nue = { class: "flex justify-between items-center gap-2" }, oue = { style: { "font-size": "12px" } }, rue = { style: { "font-size": "10px", color: "var(--ant-color-text-quaternary)" } }, nm = /* @__PURE__ */ be({
  __name: "ArgusGroupBy",
  props: {
    groupBy: {},
    cfg: {},
    signal: {},
    metricName: {},
    disabled: { type: Boolean, default: !1 }
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, r = ce(""), i = ce([]), a = ce(!1), l = ce(!1);
    let s = null;
    ke(
      [r, l, () => n.cfg?.url, () => n.cfg?.token, () => n.signal, () => n.metricName],
      () => {
        !n.cfg || !l.value || (s && clearTimeout(s), s = setTimeout(async () => {
          a.value = !0;
          try {
            const f = new Set(n.groupBy.map((v) => v.name)), p = await uD(n.cfg, {
              signal: n.signal,
              metricName: n.metricName,
              search: r.value
            });
            i.value = p.filter((v) => !f.has(v.name));
          } catch {
            i.value = [];
          } finally {
            a.value = !1;
          }
        }, 300));
      }
    );
    const u = E(() => n.groupBy.map((f) => f.name));
    function c(f) {
      const v = (Array.isArray(f) ? f : [f]).map((g) => {
        const m = i.value.find((S) => S.name === g), x = n.groupBy.find((S) => S.name === g);
        return m ?? x ?? { name: g, fieldDataType: "string", fieldContext: "tag" };
      });
      o("change", v);
    }
    const d = E(() => a.value ? ko(Xo, { size: "small" }) : null);
    return (f, p) => (ne(), ft(T(Dt), {
      mode: "tags",
      size: "small",
      style: { flex: "1", "min-width": "160px" },
      placeholder: "不分组（全量汇总）",
      value: u.value,
      disabled: e.disabled,
      "filter-option": !1,
      "not-found-content": d.value,
      onSearch: p[0] || (p[0] = (v) => r.value = v),
      onFocus: p[1] || (p[1] = () => l.value = !0),
      onBlur: p[2] || (p[2] = () => {
        l.value = !1, r.value = "";
      }),
      onChange: c
    }, {
      default: he(() => [
        (ne(!0), xe(Je, null, Ut(i.value, (v) => (ne(), ft(T(Dt).Option, {
          key: v.name,
          value: v.name
        }, {
          default: he(() => [
            L("div", nue, [
              L("span", oue, oe(v.name), 1),
              L("span", rue, oe([v.fieldContext, v.fieldDataType].filter(Boolean).join(" · ")), 1)
            ])
          ]),
          _: 2
        }, 1032, ["value"]))), 128))
      ]),
      _: 1
    }, 8, ["value", "disabled", "not-found-content"]));
  }
}), iue = { class: "flex flex-wrap gap-1 items-center" }, aue = { class: "font-medium" }, LP = /* @__PURE__ */ be({
  __name: "ArgusQueryFunctions",
  props: {
    functions: {},
    signal: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, r = [
      { value: "cutOffMin", label: "Cut Off Min" },
      { value: "cutOffMax", label: "Cut Off Max" },
      { value: "clampMin", label: "Clamp Min" },
      { value: "clampMax", label: "Clamp Max" },
      { value: "absolute", label: "Absolute" },
      { value: "runningDiff", label: "Running Diff" },
      { value: "log2", label: "Log2" },
      { value: "log10", label: "Log10" },
      { value: "cumulativeSum", label: "Cumulative Sum" },
      { value: "ewma3", label: "EWMA 3" },
      { value: "ewma5", label: "EWMA 5" },
      { value: "ewma7", label: "EWMA 7" },
      { value: "median3", label: "Median 3" },
      { value: "median5", label: "Median 5" },
      { value: "median7", label: "Median 7" },
      { value: "timeShift", label: "Time Shift" },
      { value: "fillZero", label: "Fill Zero" }
    ], i = [{ value: "timeShift", label: "Time Shift" }], a = {
      cutOffMin: { showInput: !0, placeholder: "阈值" },
      cutOffMax: { showInput: !0, placeholder: "阈值" },
      clampMin: { showInput: !0, placeholder: "阈值" },
      clampMax: { showInput: !0, placeholder: "阈值" },
      absolute: { showInput: !1 },
      runningDiff: { showInput: !1 },
      log2: { showInput: !1 },
      log10: { showInput: !1 },
      cumulativeSum: { showInput: !1 },
      ewma3: { showInput: !0, placeholder: "Alpha" },
      ewma5: { showInput: !0, placeholder: "Alpha" },
      ewma7: { showInput: !0, placeholder: "Alpha" },
      median3: { showInput: !1 },
      median5: { showInput: !1 },
      median7: { showInput: !1 },
      timeShift: { showInput: !0, placeholder: "如 -1h" },
      fillZero: { showInput: !1 }
    }, l = E(
      () => n.signal === "logs" || n.signal === "traces" ? i : r
    );
    function s(d) {
      const f = a[d];
      o("change", [...n.functions, { name: d, args: f?.showInput ? [{ value: "" }] : [] }]);
    }
    function u(d) {
      o("change", n.functions.filter((f, p) => p !== d));
    }
    function c(d, f) {
      o("change", n.functions.map((p, v) => v === d ? { ...p, args: [{ value: f }] } : p));
    }
    return (d, f) => (ne(), xe("div", iue, [
      (ne(!0), xe(Je, null, Ut(e.functions, (p, v) => (ne(), xe("div", {
        key: v,
        class: "inline-flex items-center gap-1 rounded px-1.5",
        style: { background: "#eee", "font-size": "12px" }
      }, [
        L("span", aue, oe(p.name) + "(", 1),
        a[p.name]?.showInput ? (ne(), ft(T(kt), {
          key: 0,
          class: "text-center",
          size: "small",
          bordered: !1,
          variant: "borderless",
          style: { width: "40px", padding: "0 2px", height: "20px" },
          placeholder: a[p.name]?.placeholder ?? "value",
          value: p.args[0]?.value ?? "",
          onChange: (g) => c(v, g.target.value)
        }, null, 8, ["placeholder", "value", "onChange"])) : rt("", !0),
        f[1] || (f[1] = L("span", null, ")", -1)),
        h(T(Lt), {
          class: "p-0!",
          type: "link",
          size: "small",
          danger: "",
          onClick: (g) => u(v)
        }, {
          default: he(() => [
            L("span", {
              class: Pt(T(bt).delete)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["onClick"])
      ]))), 128)),
      h(T(Mr), { trigger: "click" }, {
        overlay: he(() => [
          h(T(fo), {
            onClick: f[0] || (f[0] = ({ key: p }) => s(String(p)))
          }, {
            default: he(() => [
              (ne(!0), xe(Je, null, Ut(l.value, (p) => (ne(), ft(T(fo).Item, {
                key: p.value
              }, {
                default: he(() => [
                  Le(oe(p.label), 1)
                ]),
                _: 2
              }, 1024))), 128))
            ]),
            _: 1
          })
        ]),
        default: he(() => [
          h(T(Lt), {
            size: "small",
            type: "dashed"
          }, {
            default: he(() => [
              L("span", {
                class: Pt([T(bt).plus, "mr-0.5"])
              }, null, 2),
              f[2] || (f[2] = Le("函数 ", -1))
            ]),
            _: 1
          })
        ]),
        _: 1
      })
    ]));
  }
}), lue = {
  class: "bg-white p-2",
  style: { border: "1px solid #eee", "border-radius": "6px", "margin-bottom": "6px" }
}, sue = { class: "flex items-center gap-1 select-none" }, uue = { class: "flex gap-2 ml-1" }, cue = {
  key: 0,
  style: { "border-top": "1px solid var(--ant-color-border)" }
}, due = {
  key: 0,
  class: "flex flex-col gap-2 p-2"
}, fue = { class: "flex flex-col gap-0.5" }, pue = { class: "flex items-center gap-1.5" }, hue = { class: "flex flex-col gap-0.5" }, gue = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr 1fr" }
}, vue = { class: "flex flex-col gap-0.5" }, mue = { class: "flex flex-col gap-0.5" }, bue = { class: "flex flex-col gap-0.5" }, yue = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr 1fr" }
}, xue = { class: "flex flex-col gap-0.5" }, wue = { class: "flex items-center gap-1" }, Sue = { class: "flex flex-col gap-0.5" }, Cue = { class: "flex items-center gap-1" }, $ue = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr auto" }
}, Pue = { class: "flex flex-col gap-0.5" }, Oue = { class: "flex flex-col gap-0.5" }, kue = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr 1fr" }
}, Iue = { class: "flex flex-col gap-0.5" }, _ue = { class: "flex flex-col gap-0.5" }, Tue = {
  key: 1,
  class: "flex flex-col gap-2 p-2"
}, Mue = { class: "flex flex-col gap-0.5" }, Eue = { class: "flex flex-col gap-0.5" }, Due = { class: "flex flex-col gap-1" }, Aue = { class: "flex flex-col gap-0.5" }, Nue = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr auto" }
}, Rue = { class: "flex flex-col gap-0.5" }, zue = { class: "flex flex-col gap-0.5" }, Fue = { class: "flex flex-col gap-0.5" }, Bue = {
  key: 2,
  class: "flex flex-col gap-1.5 p-2"
}, Lue = { class: "flex items-center gap-1.5" }, Hue = {
  key: 3,
  class: "flex flex-col gap-2 p-2"
}, Vue = { class: "flex flex-col gap-0.5" }, jue = {
  class: "grid gap-2",
  style: { "grid-template-columns": "1fr auto" }
}, Wue = { class: "flex flex-col gap-0.5" }, Kue = { class: "flex flex-col gap-0.5" }, que = /* @__PURE__ */ be({
  __name: "QueryItemRow",
  props: {
    item: {},
    cfg: {},
    collapsed: { type: Boolean },
    canDelete: { type: Boolean }
  },
  emits: ["toggleCollapse", "toggleDisabled", "delete", "change"],
  setup(e, { emit: t }) {
    const n = e, o = t, r = E(() => n.item.type === "builder_formula"), i = E(() => n.item.spec.disabled), a = E(() => n.item.spec.name), l = ce(
      n.item.type === "builder_query" ? n.item.queryType ?? "builder" : "builder"
    ), s = [
      { label: "查询构建器", value: "builder" },
      { label: "PromQL", value: "promql" },
      { label: "ClickHouse SQL", value: "clickhouse_sql" }
    ], u = [
      { value: "metrics", label: "指标" },
      { value: "logs", label: "日志" },
      { value: "traces", label: "链路" }
    ];
    function c(B) {
      o("change", B);
    }
    function d(B) {
      if (n.item.type !== "builder_query")
        return;
      const F = B === "metrics" ? [{ metricName: "", metricType: "", timeAggregation: "rate", spaceAggregation: "sum" }] : [{ expression: "count()" }];
      c({ ...n.item, spec: { ...n.item.spec, signal: B, aggregations: F } });
    }
    function f(B) {
      n.item.type === "builder_query" && (l.value = B, c({ ...n.item, queryType: B }));
    }
    const p = ce([]), v = ce(!1);
    ke(
      [() => n.cfg?.url, () => n.cfg?.token],
      async ([B, F]) => {
        v.value = !0;
        try {
          p.value = await sD({ url: B ?? "", token: F ?? "" });
        } catch {
          p.value = [];
        } finally {
          v.value = !1;
        }
      },
      { immediate: !0 }
    );
    const g = E(
      () => n.item.type === "builder_query" ? n.item.spec : null
    ), m = E(
      () => g.value?.aggregations?.[0] ?? { metricName: "", metricType: "", timeAggregation: "rate", spaceAggregation: "sum" }
    ), x = E(
      () => m.value.metricType === "histogram" || m.value.metricType === "exponential_histogram"
    ), S = E(
      () => x.value ? [{ value: "p50", label: "P50" }, { value: "p75", label: "P75" }, { value: "p90", label: "P90" }, { value: "p95", label: "P95" }, { value: "p99", label: "P99" }] : [{ value: "sum", label: "Sum" }, { value: "avg", label: "Avg" }, { value: "min", label: "Min" }, { value: "max", label: "Max" }]
    ), C = E(() => x.value ? [] : m.value.metricType === "gauge" ? [{ value: "latest", label: "Latest" }, { value: "sum", label: "Sum" }, { value: "avg", label: "Avg" }, { value: "min", label: "Min" }, { value: "max", label: "Max" }, { value: "count", label: "Count" }, { value: "count_distinct", label: "Count Distinct" }] : [{ value: "increase", label: "Increase" }, { value: "rate", label: "Rate" }]);
    function P(B, F) {
      g.value && c({ ...n.item, spec: { ...g.value, [B]: F } });
    }
    function $(B) {
      g.value && P("aggregations", [{ ...m.value, ...B }]);
    }
    function I(B) {
      const R = p.value.find((X) => X.metricName === B)?.type ?? "";
      $({
        metricName: B,
        metricType: R,
        timeAggregation: R === "" ? "" : R === "gauge" ? "latest" : "rate",
        spaceAggregation: R === "histogram" || R === "exponential_histogram" ? "p99" : "sum"
      });
    }
    const w = E(
      () => g.value?.aggregations ?? []
    );
    function _() {
      g.value && P("aggregations", [...w.value, { expression: "count()" }]);
    }
    function M(B) {
      g.value && P("aggregations", w.value.filter((F, R) => R !== B));
    }
    function N(B, F) {
      g.value && P("aggregations", w.value.map((R, X) => X === B ? { expression: F } : R));
    }
    function A(B) {
      if (!B) {
        P("order", []);
        return;
      }
      const F = B.split(" "), R = F[F.length - 1], j = { key: { name: F.slice(0, -1).join(" ") }, direction: R };
      P("order", [j]);
    }
    function H(B) {
      n.item.type === "builder_formula" && o("change", { ...n.item, spec: { ...n.item.spec, ...B } });
    }
    return (B, F) => (ne(), xe("div", lue, [
      L("div", sue, [
        L("span", {
          class: "flex items-center gap-1.5 flex-1 cursor-pointer",
          onClick: F[2] || (F[2] = (R) => o("toggleCollapse"))
        }, [
          L("span", {
            class: Pt([e.collapsed ? T(bt).chevronRight : T(bt).chevronDown, "text-16px"])
          }, null, 2),
          h(T(Pi), {
            color: r.value ? "purple" : "cyan",
            style: { margin: "0", "font-weight": "600", "font-size": "12px", "line-height": "18px", padding: "0 6px" }
          }, {
            default: he(() => [
              Le(oe(a.value), 1)
            ]),
            _: 1
          }, 8, ["color"]),
          r.value ? rt("", !0) : (ne(), xe(Je, { key: 0 }, [
            L("div", uue, [
              (ne(), xe(Je, null, Ut(s, (R) => h(T(Lt), {
                key: R.value,
                size: "small",
                type: l.value === R.value ? "primary" : "default",
                style: { "font-size": "12px", height: "22px" },
                onClick: ur((X) => f(R.value), ["stop"])
              }, {
                default: he(() => [
                  Le(oe(R.label), 1)
                ]),
                _: 2
              }, 1032, ["type", "onClick"])), 64))
            ]),
            l.value === "builder" ? (ne(), ft(T(Dt), {
              key: 0,
              size: "small",
              style: { width: "80px" },
              value: e.item.spec.signal,
              options: u,
              onClick: F[0] || (F[0] = ur(() => {
              }, ["stop"])),
              onChange: F[1] || (F[1] = (R) => d(R))
            }, null, 8, ["value"])) : rt("", !0),
            F[32] || (F[32] = L("div", { class: "flex-1" }, null, -1))
          ], 64))
        ]),
        h(T(Lt), {
          class: "p-0!",
          size: "small",
          type: "link",
          onClick: F[3] || (F[3] = ur((R) => o("toggleDisabled"), ["stop"]))
        }, {
          default: he(() => [
            L("span", {
              class: Pt(i.value ? T(bt).viewOff : T(bt).view)
            }, null, 2)
          ]),
          _: 1
        }),
        h(T(Lt), {
          class: "p-0!",
          size: "small",
          type: "link",
          danger: "",
          disabled: !e.canDelete,
          onClick: F[4] || (F[4] = (R) => o("delete"))
        }, {
          default: he(() => [
            L("span", {
              class: Pt(T(bt).delete)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["disabled"])
      ]),
      e.collapsed ? rt("", !0) : (ne(), xe("div", cue, [
        e.item.type === "builder_query" && l.value === "builder" && e.item.spec.signal === "metrics" && g.value ? (ne(), xe("div", due, [
          L("div", fue, [
            F[33] || (F[33] = L("span", { class: "text-xs text-secondary" }, "指标名称", -1)),
            L("div", pue, [
              Le(oe(v.value) + " ", 1),
              h(T(Dt), {
                "show-search": "",
                "allow-clear": "",
                loading: v.value,
                size: "small",
                style: { flex: "1" },
                placeholder: "指标名称",
                value: m.value.metricName || void 0,
                options: p.value.map((R) => ({
                  value: R.metricName,
                  label: R.metricName
                })),
                "filter-option": (R, X) => String(X?.value ?? "").toLowerCase().includes(R.toLowerCase()),
                onChange: F[5] || (F[5] = (R) => I(R)),
                onClear: F[6] || (F[6] = () => $({
                  metricName: "",
                  metricType: "",
                  timeAggregation: "rate",
                  spaceAggregation: "sum"
                }))
              }, null, 8, ["loading", "value", "options", "filter-option"]),
              m.value.metricType ? (ne(), ft(T(Pi), {
                key: 0,
                style: { "font-size": "10px", margin: "0" }
              }, {
                default: he(() => [
                  Le(oe(m.value.metricType), 1)
                ]),
                _: 1
              })) : rt("", !0)
            ])
          ]),
          L("div", hue, [
            F[34] || (F[34] = L("span", { class: "text-xs text-secondary" }, "源数据筛选", -1)),
            h(T(kt), {
              size: "small",
              placeholder: "如 host.name = 'my-host'",
              value: g.value.filter.expression,
              onChange: F[7] || (F[7] = (R) => P("filter", { expression: R.target.value }))
            }, null, 8, ["value"])
          ]),
          x.value ? (ne(), xe(Je, { key: 0 }, [
            L("div", gue, [
              L("div", vue, [
                F[35] || (F[35] = L("span", { class: "text-xs text-secondary" }, "跨时序聚合", -1)),
                h(T(Dt), {
                  size: "small",
                  value: m.value.spaceAggregation || void 0,
                  options: S.value,
                  disabled: !m.value.metricType,
                  onChange: F[8] || (F[8] = (R) => $({ spaceAggregation: R }))
                }, null, 8, ["value", "options", "disabled"])
              ]),
              L("div", mue, [
                F[36] || (F[36] = L("span", { class: "text-xs text-secondary" }, "分组", -1)),
                h(nm, {
                  "group-by": g.value.groupBy,
                  cfg: e.cfg,
                  signal: "metrics",
                  "metric-name": m.value.metricName,
                  disabled: !m.value.metricName,
                  onChange: F[9] || (F[9] = (R) => P("groupBy", R))
                }, null, 8, ["group-by", "cfg", "metric-name", "disabled"])
              ])
            ]),
            L("div", bue, [
              F[37] || (F[37] = L("span", { class: "text-xs text-secondary" }, "步长（秒）", -1)),
              h(T(To), {
                size: "small",
                style: { width: "100%" },
                placeholder: "自动",
                value: g.value.stepInterval ?? void 0,
                min: 1,
                onChange: F[10] || (F[10] = (R) => P("stepInterval", R ?? null))
              }, null, 8, ["value"])
            ])
          ], 64)) : (ne(), xe(Je, { key: 1 }, [
            L("div", yue, [
              L("div", xue, [
                F[40] || (F[40] = L("span", { class: "text-xs text-secondary" }, "时序内聚合", -1)),
                L("div", wue, [
                  h(T(Dt), {
                    size: "small",
                    style: { flex: "1" },
                    value: m.value.timeAggregation || void 0,
                    options: C.value,
                    disabled: !m.value.metricType,
                    onChange: F[11] || (F[11] = (R) => $({ timeAggregation: R }))
                  }, null, 8, ["value", "options", "disabled"]),
                  F[38] || (F[38] = L("span", { class: "text-xs text-secondary whitespace-nowrap" }, "每隔", -1)),
                  h(T(To), {
                    size: "small",
                    style: { width: "60px" },
                    placeholder: "自动",
                    value: g.value.stepInterval ?? void 0,
                    min: 1,
                    onChange: F[12] || (F[12] = (R) => P("stepInterval", R ?? null))
                  }, null, 8, ["value"]),
                  F[39] || (F[39] = L("span", { class: "text-xs text-secondary" }, "秒", -1))
                ])
              ]),
              L("div", Sue, [
                F[41] || (F[41] = L("span", { class: "text-xs text-secondary" }, "跨时序聚合", -1)),
                L("div", Cue, [
                  h(T(Dt), {
                    size: "small",
                    style: { width: "80px" },
                    value: m.value.spaceAggregation || void 0,
                    options: S.value,
                    disabled: !m.value.metricType,
                    onChange: F[13] || (F[13] = (R) => $({ spaceAggregation: R }))
                  }, null, 8, ["value", "options", "disabled"]),
                  h(nm, {
                    "group-by": g.value.groupBy,
                    cfg: e.cfg,
                    signal: "metrics",
                    "metric-name": m.value.metricName,
                    disabled: !m.value.metricName,
                    onChange: F[14] || (F[14] = (R) => P("groupBy", R))
                  }, null, 8, ["group-by", "cfg", "metric-name", "disabled"])
                ])
              ])
            ]),
            L("div", $ue, [
              L("div", Pue, [
                F[42] || (F[42] = L("span", { class: "text-xs text-secondary" }, "聚合结果筛选", -1)),
                h(T(kt), {
                  size: "small",
                  placeholder: "如 sum > 100",
                  value: g.value.having?.expression ?? "",
                  onChange: F[15] || (F[15] = (R) => P("having", { expression: R.target.value }))
                }, null, 8, ["value"])
              ]),
              L("div", Oue, [
                F[43] || (F[43] = L("span", { class: "text-xs text-secondary" }, "条数", -1)),
                h(T(To), {
                  size: "small",
                  style: { width: "80px" },
                  placeholder: "∞",
                  value: g.value.limit ?? void 0,
                  min: 1,
                  onChange: F[16] || (F[16] = (R) => P("limit", R ?? void 0))
                }, null, 8, ["value"])
              ])
            ]),
            L("div", kue, [
              L("div", Iue, [
                F[44] || (F[44] = L("span", { class: "text-xs text-secondary" }, "排序", -1)),
                h(T(Dt), {
                  size: "small",
                  "allow-clear": "",
                  placeholder: "字段 升序/降序",
                  value: g.value.order[0] ? `${g.value.order[0].key.name} ${g.value.order[0].direction}` : void 0,
                  options: [
                    { value: "value asc", label: "值 升序" },
                    { value: "value desc", label: "值 降序" }
                  ],
                  onChange: F[17] || (F[17] = (R) => A(R)),
                  onClear: F[18] || (F[18] = () => P("order", []))
                }, null, 8, ["value"])
              ]),
              L("div", _ue, [
                F[45] || (F[45] = L("span", { class: "text-xs text-secondary" }, "图例", -1)),
                h(T(kt), {
                  size: "small",
                  placeholder: "{{label}}",
                  value: g.value.legend,
                  onChange: F[19] || (F[19] = (R) => P("legend", R.target.value))
                }, null, 8, ["value"])
              ])
            ])
          ], 64)),
          h(LP, {
            functions: g.value.functions,
            signal: g.value.signal,
            onChange: F[20] || (F[20] = (R) => P("functions", R))
          }, null, 8, ["functions", "signal"])
        ])) : e.item.type === "builder_query" && l.value === "builder" && g.value ? (ne(), xe("div", Tue, [
          L("div", Mue, [
            F[46] || (F[46] = L("span", { class: "text-xs text-secondary" }, "过滤条件", -1)),
            h(T(kt), {
              size: "small",
              placeholder: "过滤表达式",
              value: g.value.filter.expression,
              onChange: F[21] || (F[21] = (R) => P("filter", { expression: R.target.value }))
            }, null, 8, ["value"])
          ]),
          L("div", Eue, [
            F[49] || (F[49] = L("span", { class: "text-xs text-secondary" }, "聚合表达式", -1)),
            L("div", Due, [
              (ne(!0), xe(Je, null, Ut(w.value, (R, X) => (ne(), xe("div", {
                key: X,
                class: "flex items-center gap-1"
              }, [
                h(T(kt), {
                  size: "small",
                  style: { flex: "1" },
                  placeholder: "如 count() / avg(body)",
                  value: R.expression,
                  onChange: (j) => N(X, j.target.value)
                }, null, 8, ["value", "onChange"]),
                w.value.length > 1 ? (ne(), ft(T(Lt), {
                  key: 0,
                  size: "small",
                  type: "text",
                  danger: "",
                  onClick: (j) => M(X)
                }, {
                  default: he(() => [...F[47] || (F[47] = [
                    Le(" × ", -1)
                  ])]),
                  _: 1
                }, 8, ["onClick"])) : rt("", !0)
              ]))), 128)),
              h(T(Lt), {
                size: "small",
                type: "dashed",
                style: { "align-self": "flex-start" },
                onClick: _
              }, {
                default: he(() => [
                  L("span", {
                    class: Pt([T(bt).plus, "mr-0.5"])
                  }, null, 2),
                  F[48] || (F[48] = Le("添加聚合 ", -1))
                ]),
                _: 1
              })
            ])
          ]),
          L("div", Aue, [
            F[50] || (F[50] = L("span", { class: "text-xs text-secondary" }, "分组", -1)),
            h(nm, {
              "group-by": g.value.groupBy,
              cfg: e.cfg,
              signal: g.value.signal,
              onChange: F[22] || (F[22] = (R) => P("groupBy", R))
            }, null, 8, ["group-by", "cfg", "signal"])
          ]),
          L("div", Nue, [
            L("div", Rue, [
              F[51] || (F[51] = L("span", { class: "text-xs text-secondary" }, "聚合结果筛选", -1)),
              h(T(kt), {
                size: "small",
                placeholder: "如 count > 100",
                value: g.value.having?.expression ?? "",
                onChange: F[23] || (F[23] = (R) => P("having", { expression: R.target.value }))
              }, null, 8, ["value"])
            ]),
            L("div", zue, [
              F[52] || (F[52] = L("span", { class: "text-xs text-secondary" }, "条数", -1)),
              h(T(To), {
                size: "small",
                style: { width: "80px" },
                placeholder: "∞",
                value: g.value.limit ?? void 0,
                min: 1,
                onChange: F[24] || (F[24] = (R) => P("limit", R ?? void 0))
              }, null, 8, ["value"])
            ])
          ]),
          L("div", Fue, [
            F[53] || (F[53] = L("span", { class: "text-xs text-secondary" }, "图例", -1)),
            h(T(kt), {
              size: "small",
              placeholder: "{{label}}",
              value: g.value.legend,
              onChange: F[25] || (F[25] = (R) => P("legend", R.target.value))
            }, null, 8, ["value"])
          ]),
          h(LP, {
            functions: g.value.functions,
            signal: g.value.signal,
            onChange: F[26] || (F[26] = (R) => P("functions", R))
          }, null, 8, ["functions", "signal"])
        ])) : e.item.type === "builder_query" && l.value !== "builder" ? (ne(), xe("div", Bue, [
          h(T(kt).TextArea, {
            rows: 4,
            placeholder: l.value === "promql" ? "输入 PromQL 查询语句…" : "输入 ClickHouse SQL 查询语句…",
            value: e.item.rawQuery ?? "",
            style: { "font-family": "monospace", "font-size": "12px" },
            onChange: F[27] || (F[27] = (R) => o("change", { ...e.item, rawQuery: R.target.value }))
          }, null, 8, ["placeholder", "value"]),
          L("div", Lue, [
            F[54] || (F[54] = L("span", { class: "text-xs text-secondary whitespace-nowrap" }, "图例格式", -1)),
            h(T(kt), {
              size: "small",
              style: { flex: "1" },
              placeholder: "{{label}}",
              value: e.item.rawLegend ?? "",
              onChange: F[28] || (F[28] = (R) => o("change", { ...e.item, rawLegend: R.target.value }))
            }, null, 8, ["value"])
          ])
        ])) : e.item.type === "builder_formula" ? (ne(), xe("div", Hue, [
          L("div", Vue, [
            F[55] || (F[55] = L("span", { class: "text-xs text-secondary" }, "表达式", -1)),
            h(T(kt), {
              size: "small",
              placeholder: "如 A + B",
              value: e.item.spec.expression,
              onChange: F[29] || (F[29] = (R) => o("change", {
                ...e.item,
                spec: { ...e.item.spec, expression: R.target.value }
              }))
            }, null, 8, ["value"])
          ]),
          L("div", jue, [
            L("div", Wue, [
              F[56] || (F[56] = L("span", { class: "text-xs text-secondary" }, "图例", -1)),
              h(T(kt), {
                size: "small",
                placeholder: "图例格式",
                value: e.item.spec.legend,
                onChange: F[30] || (F[30] = (R) => H({ legend: R.target.value }))
              }, null, 8, ["value"])
            ]),
            L("div", Kue, [
              F[57] || (F[57] = L("span", { class: "text-xs text-secondary" }, "条数", -1)),
              h(T(To), {
                size: "small",
                style: { width: "80px" },
                placeholder: "∞",
                value: e.item.spec.limit ?? void 0,
                min: 1,
                onChange: F[31] || (F[31] = (R) => H({ limit: R ?? void 0 }))
              }, null, 8, ["value"])
            ])
          ])
        ])) : rt("", !0)
      ]))
    ]));
  }
}), Yue = { class: "flex flex-col gap-2 p-1" }, Gue = {
  key: 0,
  class: "flex items-center gap-2 mb-1"
}, Uue = { class: "flex gap-1.5 mt-1" }, Xue = "ABCDEFGHIJKLMNOPQRSTUVWXYZ", Que = /* @__PURE__ */ be({
  __name: "ArgusQueryEditor",
  props: {
    query: {},
    datasourceId: {},
    isChart: { type: Boolean }
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { config: r } = nc(), i = E(
      () => (r.value.datasourceConfig ?? []).filter((x) => x.type === "argus")
    ), a = ce(/* @__PURE__ */ new Set());
    function l(x) {
      return {
        name: x,
        signal: "metrics",
        stepInterval: null,
        disabled: !1,
        filter: { expression: "" },
        having: { expression: "" },
        groupBy: [],
        order: [],
        legend: "",
        functions: [],
        aggregations: [{ metricName: "", metricType: "", timeAggregation: "rate", spaceAggregation: "sum" }]
      };
    }
    function s(x) {
      return { name: x, expression: "", disabled: !1, legend: "", order: [] };
    }
    function u(x, S) {
      o("change", { ...n.query, [x]: S });
    }
    function c() {
      const x = n.query.queries.filter((P) => P.type === "builder_query"), S = Xue[x.length] ?? `Q${x.length}`, C = { type: "builder_query", spec: l(S) };
      o("change", { ...n.query, queries: [...n.query.queries, C] });
    }
    function d() {
      const S = `F${n.query.queries.filter((P) => P.type === "builder_formula").length + 1}`, C = { type: "builder_formula", spec: s(S) };
      o("change", { ...n.query, queries: [...n.query.queries, C] });
    }
    function f(x) {
      o("change", { ...n.query, queries: n.query.queries.filter((S) => S.spec.name !== x) });
    }
    function p(x) {
      o("change", {
        ...n.query,
        queries: n.query.queries.map((S) => S.spec.name === x.spec.name ? x : S)
      });
    }
    function v(x) {
      const S = new Set(a.value);
      S.has(x) ? S.delete(x) : S.add(x), a.value = S;
    }
    function g(x) {
      p({ ...x, spec: { ...x.spec, disabled: !x.spec.disabled } });
    }
    const m = E(() => {
      const x = (r.value.datasourceConfig ?? []).filter((C) => C.type === "argus");
      if (!x.length)
        return null;
      const S = x.find((C) => C.uid === n.datasourceId) ?? x.find((C) => C.default) ?? x[0];
      return { url: S.url, token: S.token };
    });
    return (x, S) => (ne(), xe("div", Yue, [
      i.value.length > 1 ? (ne(), xe("div", Gue, [
        S[1] || (S[1] = L("span", { class: "text-xs text-secondary whitespace-nowrap" }, "数据源", -1)),
        h(T(Dt), {
          size: "small",
          style: { width: "180px" },
          value: e.query.datasourceId,
          options: i.value.map((C) => ({ value: C.uid, label: C.name })),
          onChange: S[0] || (S[0] = (C) => u("datasourceId", C))
        }, null, 8, ["value", "options"])
      ])) : rt("", !0),
      (ne(!0), xe(Je, null, Ut(e.query.queries, (C) => (ne(), ft(que, {
        key: C.spec.name,
        item: C,
        cfg: m.value,
        collapsed: a.value.has(C.spec.name),
        "can-delete": e.query.queries.length > 1,
        onToggleCollapse: () => v(C.spec.name),
        onToggleDisabled: () => g(C),
        onDelete: () => f(C.spec.name),
        onChange: p
      }, null, 8, ["item", "cfg", "collapsed", "can-delete", "onToggleCollapse", "onToggleDisabled", "onDelete"]))), 128)),
      L("div", Uue, [
        h(T(Lt), {
          size: "small",
          type: "dashed",
          onClick: c
        }, {
          default: he(() => [
            L("span", {
              class: Pt([T(bt).plus, "mr-1"])
            }, null, 2),
            S[2] || (S[2] = Le("基础查询 ", -1))
          ]),
          _: 1
        }),
        h(T(Lt), {
          size: "small",
          type: "dashed",
          onClick: d
        }, {
          default: he(() => [
            L("span", {
              class: Pt([T(bt).plus, "mr-1"])
            }, null, 2),
            S[3] || (S[3] = Le("衍生算式 ", -1))
          ]),
          _: 1
        })
      ])
    ]));
  }
}), Zue = { style: { "padding-top": "6px" } }, Jue = { class: "inline-flex items-center gap-1.5 mb-2" }, ece = { class: "text-xs text-secondary" }, tce = {
  key: 0,
  class: "inline-flex items-center gap-1.5 mb-0 ml-2"
}, nce = { class: "text-xs text-secondary" }, oce = {
  key: 1,
  class: "inline-flex items-center gap-1.5 mb-0 ml-2"
}, rce = { class: "text-xs text-secondary" }, ice = {
  class: "text-xs text-secondary",
  style: { "min-width": "28px" }
}, ace = /* @__PURE__ */ be({
  __name: "MockQueryEditor",
  props: {
    query: {},
    datasourceId: {},
    isChart: { type: Boolean }
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = t, { t: o } = sn(), r = E(() => [
      { value: "sine", label: o("qb.pattern.sine") },
      { value: "spike", label: o("qb.pattern.spike") },
      { value: "step", label: o("qb.pattern.step") },
      { value: "sawtooth", label: o("qb.pattern.sawtooth") },
      { value: "noise", label: o("qb.pattern.noise") },
      { value: "trend-up", label: o("qb.pattern.trendUp") },
      { value: "trend-down", label: o("qb.pattern.trendDown") },
      { value: "plateau", label: o("qb.pattern.plateau") },
      { value: "random-walk", label: o("qb.pattern.randomWalk") },
      { value: "live", label: o("qb.pattern.live") }
    ]);
    return (i, a) => (ne(), xe("div", Zue, [
      L("div", Jue, [
        L("span", ece, oe(T(o)("qb.pattern")), 1),
        h(T(Dt), {
          size: "small",
          style: { width: "140px" },
          value: e.query.pattern,
          options: r.value,
          onChange: a[0] || (a[0] = (l) => n("change", { ...e.query, pattern: l }))
        }, null, 8, ["value", "options"])
      ]),
      e.isChart ? (ne(), xe("div", tce, [
        L("span", nce, oe(T(o)("qb.seriesCount")), 1),
        h(T(br), {
          min: 1,
          max: 8,
          value: e.query.seriesCount ?? 1,
          style: { width: "200px" },
          onChange: a[1] || (a[1] = (l) => n("change", { ...e.query, seriesCount: l }))
        }, null, 8, ["value"])
      ])) : rt("", !0),
      e.query.pattern === "live" ? (ne(), xe("div", oce, [
        L("span", rce, oe(T(o)("qb.liveAmplitude")), 1),
        h(T(br), {
          min: 0.1,
          max: 5,
          step: 0.1,
          value: e.query.liveAmplitude ?? 1,
          style: { width: "160px" },
          onChange: a[2] || (a[2] = (l) => n("change", { ...e.query, liveAmplitude: l }))
        }, null, 8, ["value"]),
        L("span", ice, oe((e.query.liveAmplitude ?? 1).toFixed(1)) + "x ", 1)
      ])) : rt("", !0)
    ]));
  }
}), rs = /* @__PURE__ */ be({
  __name: "ComboSelect",
  props: {
    value: {},
    displayValue: {},
    placeholder: {},
    groups: {},
    allowCustom: { type: Boolean, default: !0 },
    loading: { type: Boolean, default: !1 },
    disabled: { type: Boolean, default: !1 }
  },
  emits: ["change", "clear"],
  setup(e, { emit: t }) {
    const n = e, o = t, r = ce(n.displayValue ?? n.value ?? "");
    ke(
      [() => n.value, () => n.displayValue],
      ([s, u]) => {
        r.value = u ?? s ?? "";
      }
    );
    function i(s, u) {
      return s.toLowerCase().includes(u.toLowerCase());
    }
    const a = E(() => {
      const s = r.value, u = n.groups.flatMap((f) => f.options), c = n.allowCustom && s && !u.some((f) => f.value === s || f.label === s) ? [{ label: "── 自定义 ──", options: [{ value: s, label: s }] }] : [], d = s ? n.groups.map((f) => ({ ...f, options: f.options.filter((p) => i(p.label, s)) })).filter((f) => f.options.length > 0) : n.groups;
      return [...c, ...d];
    }), l = E(
      () => a.value.map((s) => ({
        label: s.label,
        options: s.options
      }))
    );
    return (s, u) => (ne(), ft(T(Dt), {
      size: "small",
      style: { width: "100%" },
      "show-search": "",
      "allow-clear": "",
      "filter-option": !1,
      value: e.value || void 0,
      "search-value": r.value,
      placeholder: e.placeholder,
      loading: e.loading,
      disabled: e.disabled,
      options: l.value,
      onFocus: u[0] || (u[0] = () => {
        r.value = e.displayValue ?? e.value ?? "";
      }),
      onSearch: u[1] || (u[1] = (c) => {
        r.value = c;
      }),
      onChange: u[2] || (u[2] = (c) => {
        r.value = String(c ?? ""), o("change", String(c));
      }),
      onClear: u[3] || (u[3] = () => {
        r.value = "", o("clear");
      })
    }, null, 8, ["value", "search-value", "placeholder", "loading", "disabled", "options"]));
  }
}), lce = { class: "flex flex-wrap items-center gap-1.5 mt-1" }, sce = { class: "text-xs text-secondary" }, uce = { class: "font-medium text-blue lh-1" }, cce = /* @__PURE__ */ be({
  __name: "FunctionsEditor",
  props: {
    functions: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: r } = sn();
    function i(p, v) {
      return v.length === 0 ? `${p.name}()` : `${p.name}(${v.join(", ")})`;
    }
    function a(p) {
      return { def: p, params: [...p.defaultParams], text: i(p, p.defaultParams) };
    }
    function l(p) {
      const v = p.filter((m) => m.def.category === "Alias");
      return [...p.filter((m) => m.def.category !== "Alias"), ...v];
    }
    function s(p) {
      const v = o1.find((m) => m.name === p);
      if (!v)
        return;
      const g = a(v);
      o("change", l([...n.functions, g]));
    }
    function u(p, v, g) {
      const m = n.functions.map((x, S) => {
        if (S !== p)
          return x;
        const C = [...x.params];
        return C[v] = g, { ...x, params: C, text: i(x.def, C) };
      });
      o("change", m);
    }
    function c(p) {
      o("change", n.functions.filter((v, g) => g !== p));
    }
    function d(p, v) {
      const g = p + v;
      if (g < 0 || g >= n.functions.length)
        return;
      const m = [...n.functions];
      [m[p], m[g]] = [m[g], m[p]], o("change", m);
    }
    const f = E(
      () => $B.map((p) => ({
        key: p,
        label: p,
        children: o1.filter((v) => v.category === p).map((v) => ({ key: v.name, label: v.name }))
      }))
    );
    return (p, v) => (ne(), xe("div", lce, [
      L("span", sce, oe(T(r)("qb.functions")), 1),
      (ne(!0), xe(Je, null, Ut(e.functions, (g, m) => (ne(), xe("div", {
        key: m,
        class: "inline-flex items-center gap-0.5 rounded px-1",
        style: { background: "#eee", "font-size": "12px" }
      }, [
        h(T(Lt), {
          type: "text",
          size: "small",
          class: "p-0!",
          disabled: m === 0,
          onClick: (x) => d(m, -1)
        }, {
          default: he(() => [
            L("span", {
              class: Pt(T(bt).chevronLeft)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["disabled", "onClick"]),
        L("span", uce, oe(g.def.name), 1),
        v[1] || (v[1] = L("span", { class: "text-yellow" }, "(", -1)),
        (ne(!0), xe(Je, null, Ut(g.def.params, (x, S) => (ne(), xe(Je, { key: S }, [
          x.options ? (ne(), ft(T(Dt), {
            key: 0,
            size: "small",
            value: String(g.params[S] ?? x.options[0]),
            options: x.options.map((C) => ({ value: String(C), label: String(C) })),
            "popup-match-select-width": "false",
            bordered: !1,
            variant: "borderless",
            style: { "min-width": "60px" },
            onChange: (C) => u(m, S, C)
          }, null, 8, ["value", "options", "onChange"])) : (ne(), ft(T(kt), {
            key: 1,
            class: "text-green text-center",
            size: "small",
            bordered: !1,
            value: String(g.params[S] ?? ""),
            style: { width: "40px", padding: "0 4px", height: "20px" },
            variant: "borderless",
            onChange: (C) => u(m, S, C.target.value)
          }, null, 8, ["value", "onChange"]))
        ], 64))), 128)),
        v[2] || (v[2] = L("span", { class: "text-yellow font-medium" }, ")", -1)),
        h(T(Lt), {
          type: "text",
          size: "small",
          class: "p-0!",
          disabled: m === e.functions.length - 1,
          onClick: (x) => d(m, 1)
        }, {
          default: he(() => [
            L("span", {
              class: Pt(T(bt).chevronRight)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["disabled", "onClick"]),
        h(T(Lt), {
          type: "text",
          size: "small",
          class: "p-0!",
          danger: "",
          onClick: (x) => c(m)
        }, {
          default: he(() => [
            L("span", {
              class: Pt(T(bt).delete)
            }, null, 2)
          ]),
          _: 1
        }, 8, ["onClick"])
      ]))), 128)),
      h(T(Mr), { trigger: ["click"] }, {
        overlay: he(() => [
          h(T(fo), {
            onClick: v[0] || (v[0] = ({ key: g }) => s(String(g)))
          }, {
            default: he(() => [
              (ne(!0), xe(Je, null, Ut(f.value, (g) => (ne(), ft(T(fo).SubMenu, {
                key: g.key,
                title: g.label
              }, {
                default: he(() => [
                  (ne(!0), xe(Je, null, Ut(g.children, (m) => (ne(), ft(T(fo).Item, {
                    key: m.key
                  }, {
                    default: he(() => [
                      Le(oe(m.label), 1)
                    ]),
                    _: 2
                  }, 1024))), 128))
                ]),
                _: 2
              }, 1032, ["title"]))), 128))
            ]),
            _: 1
          })
        ]),
        default: he(() => [
          h(T(Lt), {
            size: "small",
            type: "dashed"
          }, {
            default: he(() => [
              Le(" + " + oe(T(r)("qb.functions.add")), 1)
            ]),
            _: 1
          })
        ]),
        _: 1
      })
    ]));
  }
}), dce = { class: "flex flex-wrap items-center gap-0 mt-3" }, fce = { class: "text-xs text-secondary font-medium" }, pce = { class: "text-xs" }, hce = { class: "inline-flex items-center gap-1.5 mr-3" }, gce = { class: "text-xs text-secondary whitespace-nowrap" }, vce = { class: "inline-flex items-center gap-1.5 mr-3" }, mce = { class: "text-xs text-secondary whitespace-nowrap" }, bce = { class: "inline-flex items-center gap-1.5 mr-3" }, yce = { class: "text-xs text-secondary whitespace-nowrap" }, xce = { class: "inline-flex items-center gap-1.5 mr-3" }, wce = { class: "text-xs text-secondary whitespace-nowrap" }, Sce = {
  key: 1,
  class: "inline-flex items-center gap-1.5 mr-3"
}, Cce = { class: "text-xs text-secondary whitespace-nowrap" }, $ce = { class: "inline-flex items-center gap-1.5 mr-3" }, Pce = { class: "text-xs text-secondary whitespace-nowrap" }, Oce = { class: "inline-flex items-center gap-1.5 mr-3" }, kce = { class: "text-xs text-secondary whitespace-nowrap" }, Ice = { class: "inline-flex items-center gap-1.5 mr-3" }, _ce = { class: "text-xs text-secondary whitespace-nowrap" }, Tce = { class: "inline-flex items-center gap-1.5 mr-3" }, Mce = { class: "text-xs text-secondary whitespace-nowrap" }, Ece = { class: "inline-flex items-center gap-1.5 mr-3" }, Dce = { class: "text-xs text-secondary whitespace-nowrap" }, Ace = { class: "inline-flex items-center gap-1.5 mr-3" }, Nce = { class: "text-xs text-secondary whitespace-nowrap" }, Rce = { class: "inline-flex items-center gap-1.5 mr-3" }, zce = { class: "text-xs text-secondary whitespace-nowrap" }, Fce = { class: "inline-flex items-center gap-1.5 mr-3" }, Bce = { class: "text-xs text-secondary whitespace-nowrap" }, Lce = /* @__PURE__ */ be({
  __name: "OptionsEditor",
  props: {
    queryType: {},
    options: {}
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: r } = sn(), i = ce(!0);
    function a(c) {
      o("change", { ...n.options, ...c });
    }
    const l = [
      { value: 2, label: r("qb.ack.all") },
      { value: 0, label: r("qb.ack.unack") },
      { value: 1, label: r("qb.ack.ack") }
    ], s = [
      { value: "default", label: r("qb.sort.default") },
      { value: "lastchange", label: r("qb.sort.lastchange") },
      { value: "severity", label: r("qb.sort.severity") }
    ], u = [
      { value: "default", label: r("qb.trends.default") },
      { value: "true", label: r("qb.trends.true") },
      { value: "false", label: r("qb.trends.false") }
    ];
    return (c, d) => (ne(), xe("div", dce, [
      L("div", {
        class: "inline-flex items-center gap-1.5 cursor-pointer py-1 mr-2 select-none flex-shrink-0",
        onClick: d[0] || (d[0] = (f) => i.value = !i.value)
      }, [
        L("span", fce, oe(T(r)("qb.options")), 1),
        L("span", pce, oe(i.value ? "▸" : "▾"), 1)
      ]),
      L("div", {
        class: "flex flex-wrap items-center overflow-hidden transition-all",
        style: Bt({ maxHeight: i.value ? "200px" : "0" })
      }, [
        e.queryType === "metrics" || e.queryType === "itemid" || e.queryType === "services" ? (ne(), xe(Je, { key: 0 }, [
          L("div", hce, [
            L("span", gce, oe(T(r)("qb.options.trends")), 1),
            h(T(Dt), {
              size: "small",
              style: { width: "100px" },
              value: e.options.useTrends ?? "default",
              options: u,
              onChange: d[1] || (d[1] = (f) => a({ useTrends: f }))
            }, null, 8, ["value"])
          ]),
          L("div", vce, [
            L("span", mce, oe(T(r)("qb.options.showDisabled")), 1),
            h(T(Sa), {
              size: "small",
              checked: !!e.options.showDisabledItems,
              onChange: d[2] || (d[2] = (f) => a({ showDisabledItems: f }))
            }, null, 8, ["checked"])
          ]),
          L("div", bce, [
            L("span", yce, oe(T(r)("qb.options.valueMapping")), 1),
            h(T(Sa), {
              size: "small",
              checked: !!e.options.useZabbixValueMapping,
              onChange: d[3] || (d[3] = (f) => a({ useZabbixValueMapping: f }))
            }, null, 8, ["checked"])
          ]),
          L("div", xce, [
            L("span", wce, oe(T(r)("qb.options.disableAlignment")), 1),
            h(T(Sa), {
              size: "small",
              checked: !!e.options.disableDataAlignment,
              onChange: d[4] || (d[4] = (f) => a({ disableDataAlignment: f }))
            }, null, 8, ["checked"])
          ])
        ], 64)) : rt("", !0),
        e.queryType === "text" ? (ne(), xe("div", Sce, [
          L("span", Cce, oe(T(r)("qb.options.showDisabled")), 1),
          h(T(Sa), {
            size: "small",
            checked: !!e.options.showDisabledItems,
            onChange: d[5] || (d[5] = (f) => a({ showDisabledItems: f }))
          }, null, 8, ["checked"])
        ])) : rt("", !0),
        e.queryType === "problems" ? (ne(), xe(Je, { key: 2 }, [
          L("div", $ce, [
            L("span", Pce, oe(T(r)("qb.options.acknowledged")), 1),
            h(T(Dt), {
              size: "small",
              style: { width: "140px" },
              value: e.options.acknowledged ?? 2,
              options: l,
              onChange: d[6] || (d[6] = (f) => a({ acknowledged: f }))
            }, null, 8, ["value"])
          ]),
          L("div", Oce, [
            L("span", kce, oe(T(r)("qb.options.sortBy")), 1),
            h(T(Dt), {
              size: "small",
              style: { width: "120px" },
              value: e.options.sortProblems ?? "default",
              options: s,
              onChange: d[7] || (d[7] = (f) => a({ sortProblems: f }))
            }, null, 8, ["value"])
          ]),
          L("div", Ice, [
            L("span", _ce, oe(T(r)("qb.options.useTimeRange")), 1),
            h(T(Sa), {
              size: "small",
              checked: !!e.options.useTimeRange,
              onChange: d[8] || (d[8] = (f) => a({ useTimeRange: f }))
            }, null, 8, ["checked"])
          ]),
          L("div", Tce, [
            L("span", Mce, oe(T(r)("qb.options.hostsInMaintenance")), 1),
            h(T(Sa), {
              size: "small",
              checked: !!e.options.hostsInMaintenance,
              onChange: d[9] || (d[9] = (f) => a({ hostsInMaintenance: f }))
            }, null, 8, ["checked"])
          ]),
          L("div", Ece, [
            L("span", Dce, oe(T(r)("qb.options.hostProxy")), 1),
            h(T(Sa), {
              size: "small",
              checked: !!e.options.hostProxy,
              onChange: d[10] || (d[10] = (f) => a({ hostProxy: f }))
            }, null, 8, ["checked"])
          ]),
          L("div", Ace, [
            L("span", Nce, oe(T(r)("qb.options.limit")), 1),
            h(T(kt), {
              size: "small",
              type: "number",
              style: { width: "80px" },
              value: e.options.limit ?? 100,
              onChange: d[11] || (d[11] = (f) => a({ limit: Number(f.target.value) }))
            }, null, 8, ["value"])
          ])
        ], 64)) : rt("", !0),
        e.queryType === "triggers" ? (ne(), xe(Je, { key: 3 }, [
          L("div", Rce, [
            L("span", zce, oe(T(r)("qb.options.acknowledged")), 1),
            h(T(Dt), {
              size: "small",
              style: { width: "140px" },
              value: e.options.acknowledged ?? 2,
              options: l,
              onChange: d[12] || (d[12] = (f) => a({ acknowledged: f }))
            }, null, 8, ["value"])
          ]),
          L("div", Fce, [
            L("span", Bce, oe(T(r)("qb.options.useTimeRange")), 1),
            h(T(Sa), {
              size: "small",
              checked: !!e.options.useTimeRange,
              onChange: d[13] || (d[13] = (f) => a({ useTimeRange: f }))
            }, null, 8, ["checked"])
          ])
        ], 64)) : rt("", !0)
      ], 4)
    ]));
  }
});
function RE(e) {
  const t = _s();
  return E(() => {
    const n = e();
    if (!n)
      return [];
    if (!n.startsWith("$"))
      return [n];
    const o = n.slice(1), r = Object.values(t.variables).find(
      (l) => l.config.name === o
    );
    if (!r)
      return [];
    const i = r.current, a = Array.isArray(i) ? i : [i];
    return a.includes("$__all") ? r.options.map((l) => l.value).filter((l) => l !== "$__all") : a.filter(Boolean);
  });
}
function Hce(e, t) {
  const n = ce([]), o = ce([]), r = ce(!1), i = ce(!1), a = RE(() => e().groupId);
  return ke(
    () => ({ url: t().url, token: t().token }),
    async ({ url: l, token: s }) => {
      if (l) {
        r.value = !0, n.value = [];
        try {
          n.value = await dB({ url: l, token: s });
        } catch {
        } finally {
          r.value = !1;
        }
      }
    },
    { immediate: !0, deep: !0 }
  ), ke(
    [a, () => t().url, () => t().token],
    async ([l, s, u]) => {
      if (!s || l.length === 0) {
        o.value = [];
        return;
      }
      i.value = !0, o.value = [];
      try {
        o.value = await fB(l, void 0, { url: s, token: u });
      } catch {
      } finally {
        i.value = !1;
      }
    },
    { immediate: !0 }
  ), { groups: n, hosts: o, loadingGroups: r, loadingHosts: i, resolvedGroupIds: a };
}
function Vce(e) {
  const { config: t } = nc(), n = E(() => (t.value.datasourceConfig ?? []).filter((a) => a.type === "zabbix").map((a, l) => ({
    uid: a.uid || String(l),
    name: a.name,
    url: a.url,
    token: a.token,
    isDefault: !!a.default
  }))), o = E(() => {
    const i = jE(e);
    return n.value.find((l) => l.uid === i) ?? n.value[0] ?? { url: "", token: "" };
  }), r = E(
    () => n.value.find((i) => i.isDefault)?.uid ?? n.value[0]?.uid ?? ""
  );
  return { sources: n, cfg: o, defaultUid: r };
}
const jce = {
  class: "flex flex-col gap-3 p-2",
  style: { "font-size": "12px" }
}, Wce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Kce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, qce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Yce = { key: 0 }, Gce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Uce = {
  key: 1,
  style: { "max-width": "400px" }
}, Xce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Qce = {
  class: "grid gap-3",
  style: { "grid-template-columns": "1fr 1fr" }
}, Zce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, Jce = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, ede = { class: "flex items-center gap-2" }, tde = {
  class: "text-secondary",
  style: { "font-size": "11px" }
}, nde = { key: 3 }, ode = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, rde = { key: 4 }, ide = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, ade = {
  class: "grid gap-3",
  style: { "grid-template-columns": "1fr 1fr 1fr" }
}, lde = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, sde = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, ude = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, cde = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, dde = { class: "flex flex-wrap gap-1" }, fde = {
  key: 6,
  class: "grid gap-3",
  style: { "grid-template-columns": "1fr 1fr 1fr" }
}, pde = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, hde = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, gde = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, vde = { key: 7 }, mde = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, bde = {
  key: 8,
  class: "grid gap-3",
  style: { "grid-template-columns": "1fr 1fr" }
}, yde = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, xde = {
  class: "text-secondary mb-1",
  style: { "font-size": "11px" }
}, wde = /* @__PURE__ */ be({
  __name: "ZabbixQueryEditor",
  props: {
    query: {},
    datasourceId: {},
    isChart: { type: Boolean }
  },
  emits: ["change"],
  setup(e, { emit: t }) {
    const n = e, o = t, { t: r } = sn(), { cfg: i } = Vce(() => n.datasourceId), a = _s();
    function l(ie) {
      o("change", { ...n.query, ...ie });
    }
    const s = E(
      () => Object.values(a.variables).map((ie) => ({
        value: `$${ie.config.name}`,
        label: `$${ie.config.name}`
      }))
    );
    function u(ie, re) {
      const te = [];
      return s.value.length > 0 && te.push({ label: "── 变量 ──", options: s.value }), te.push({ label: ie, options: re }), te;
    }
    function c(ie) {
      return typeof ie == "string" && ie.startsWith("$");
    }
    const { groups: d, hosts: f, loadingGroups: p, loadingHosts: v } = Hce(
      () => n.query,
      () => i.value
    ), g = RE(() => n.query.hostId), m = E(
      () => d.value.map((ie) => ({ value: ie.groupid, label: ie.name }))
    ), x = E(
      () => f.value.map((ie) => ({ value: ie.hostid, label: ie.name || ie.host }))
    ), S = ce([]), C = ce(!1);
    ke(
      [
        g,
        () => i.value.url,
        () => i.value.token,
        () => n.query.queryType
      ],
      async ([ie, re, te, ve]) => {
        if (ve !== "metrics") {
          S.value = [];
          return;
        }
        if (!ie.length || !re) {
          S.value = [];
          return;
        }
        C.value = !0;
        try {
          S.value = (await Promise.all(
            ie.map(
              (ue) => Lk([ue], void 0, void 0, { url: re, token: te })
            )
          )).flat();
        } catch {
          S.value = [];
        } finally {
          C.value = !1;
        }
      },
      { immediate: !0 }
    );
    const P = E(() => {
      const ie = /* @__PURE__ */ new Set();
      return S.value.flatMap(
        (re) => (re.tags ?? []).map((te) => gB(te))
      ).filter((re) => ie.has(re) ? !1 : (ie.add(re), !0)).map((re) => ({ value: re, label: re }));
    }), $ = E(() => {
      if (!n.query.itemTagsFilter)
        return S.value;
      const [ie, re] = n.query.itemTagsFilter.split(":").map((te) => te.trim());
      return S.value.filter(
        (te) => (te.tags ?? []).some(
          (ve) => ve.tag === ie && (re ? ve.value === re : !0)
        )
      );
    }), I = E(() => {
      const ie = /* @__PURE__ */ new Set();
      return $.value.map((re) => re.name).filter((re) => ie.has(re) ? !1 : (ie.add(re), !0)).map((re) => ({ value: re, label: re }));
    }), w = ce([]), _ = ce(!1);
    ke(
      [
        () => n.query.hostId,
        () => i.value.url,
        () => i.value.token,
        () => n.query.queryType
      ],
      async ([ie, re, te, ve]) => {
        if (ve !== "text" || !ie || !re) {
          w.value = [];
          return;
        }
        _.value = !0;
        try {
          w.value = await vB([ie], void 0, { url: re, token: te });
        } catch {
          w.value = [];
        } finally {
          _.value = !1;
        }
      },
      { immediate: !0 }
    );
    const M = E(() => {
      const ie = /* @__PURE__ */ new Set();
      return w.value.map((re) => re.name).filter((re) => ie.has(re) ? !1 : (ie.add(re), !0)).map((re) => ({ value: re, label: re }));
    }), N = ce([]), A = ce(!1);
    ke(
      [() => i.value.url, () => i.value.token, () => n.query.queryType],
      async ([ie, re, te]) => {
        if (!(te !== "services" || !ie)) {
          A.value = !0;
          try {
            N.value = await bB({ url: ie, token: re });
          } catch {
            N.value = [];
          } finally {
            A.value = !1;
          }
        }
      },
      { immediate: !0 }
    );
    const H = ce([]), B = ce(!1);
    ke(
      [
        () => n.query.hostId,
        () => i.value.url,
        () => i.value.token,
        () => n.query.queryType
      ],
      async ([ie, re, te, ve]) => {
        if (ve !== "macros" || !ie || !re) {
          H.value = [];
          return;
        }
        B.value = !0;
        try {
          H.value = await mB([ie], { url: re, token: te });
        } catch {
          H.value = [];
        } finally {
          B.value = !1;
        }
      },
      { immediate: !0 }
    );
    const F = ce([]), R = ce(!1), X = ce([]), j = ce(!1);
    ke(
      [
        () => n.query.hostId,
        () => i.value.url,
        () => i.value.token,
        () => n.query.queryType
      ],
      async ([ie, re, te, ve]) => {
        if (ve !== "lld" || !ie || ie.startsWith("$") || !re) {
          F.value = [];
          return;
        }
        R.value = !0;
        try {
          F.value = await xB([ie], { url: re, token: te });
        } catch {
          F.value = [];
        } finally {
          R.value = !1;
        }
      },
      { immediate: !0 }
    ), ke(
      [() => n.query.lldRuleId, () => i.value.url, () => i.value.token],
      async ([ie, re, te]) => {
        if (!ie || !re) {
          X.value = [];
          return;
        }
        j.value = !0;
        try {
          const ve = /* @__PURE__ */ new Set();
          X.value = (await Hk(ie, { url: re, token: te })).map((ue) => {
            const pe = ue.key_.includes("[") ? ue.key_.slice(0, ue.key_.indexOf("[")) : ue.key_;
            return { value: pe, label: `${ue.name} (${pe})` };
          }).filter((ue) => ve.has(ue.value) ? !1 : (ve.add(ue.value), !0));
        } catch {
          X.value = [];
        } finally {
          j.value = !1;
        }
      },
      { immediate: !0 }
    );
    const ee = [
      "metrics",
      "text",
      "services",
      "itemid",
      "triggers",
      "problems",
      "macros",
      "lld"
    ], W = [
      "problems",
      "recent",
      "history"
    ], K = {
      problems: "Problems",
      recent: "Recent problems",
      history: "History"
    }, q = [
      { value: 0, label: "Not classified", color: "#97aab3" },
      { value: 1, label: "Information", color: "#7499ff" },
      { value: 2, label: "Warning", color: "#ffc859" },
      { value: 3, label: "Average", color: "#ffa059" },
      { value: 4, label: "High", color: "#e97659" },
      { value: 5, label: "Disaster", color: "#e45959" }
    ], G = [
      { value: "status", label: "Status" },
      { value: "sli", label: "SLI" },
      { value: "uptime", label: "Uptime" },
      { value: "downtime", label: "Downtime" },
      { value: "error_budget", label: "Error budget" }
    ], ae = [
      { value: "none", label: "No interval" },
      { value: "auto", label: "Auto" },
      { value: "1h", label: "1 hour" },
      { value: "12h", label: "12 hours" },
      { value: "1d", label: "24 hours" },
      { value: "1w", label: "1 week" },
      { value: "1M", label: "1 month" }
    ], le = E(
      () => ["metrics", "text", "triggers", "problems", "macros", "lld"].includes(
        n.query.queryType
      )
    );
    return (ie, re) => (ne(), xe("div", jce, [
      L("div", null, [
        L("div", Wce, oe(T(r)("qb.queryType")), 1),
        h(T(Dt), {
          size: "small",
          style: { width: "100%" },
          value: e.query.queryType,
          options: ee.map((te) => ({
            value: te,
            label: T(r)(`qb.queryType.${te}`)
          })),
          onChange: re[0] || (re[0] = (te) => l({ queryType: te, itemIds: [], itemNames: [], itemids: "" }))
        }, null, 8, ["value", "options"])
      ]),
      le.value ? (ne(), xe("div", {
        key: 0,
        class: "grid gap-3",
        style: Bt({ gridTemplateColumns: e.query.queryType === "metrics" ? "repeat(3, 1fr)" : "repeat(2, 1fr)" })
      }, [
        L("div", null, [
          L("div", Kce, oe(T(r)("panel.group")), 1),
          h(T(Xo), {
            spinning: T(p),
            size: "small"
          }, {
            default: he(() => [
              h(rs, {
                value: e.query.groupId || void 0,
                "display-value": e.query.groupName || void 0,
                placeholder: T(r)("panel.group.placeholder"),
                groups: u("── 主机组 ──", m.value),
                onChange: re[1] || (re[1] = (te) => l({ groupId: te, groupName: c(te) ? te : T(d).find((ve) => ve.groupid === te)?.name ?? te, hostId: "", hostName: "", itemIds: [], itemNames: [] })),
                onClear: re[2] || (re[2] = () => l({ groupId: "", groupName: "", hostId: "", hostName: "", itemIds: [], itemNames: [] }))
              }, null, 8, ["value", "display-value", "placeholder", "groups"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ]),
        L("div", null, [
          L("div", qce, oe(T(r)("panel.host")), 1),
          h(T(Xo), {
            spinning: T(v),
            size: "small"
          }, {
            default: he(() => [
              h(rs, {
                value: e.query.hostId || void 0,
                "display-value": e.query.hostName || void 0,
                placeholder: T(r)("panel.host.placeholder"),
                groups: u("── 主机 ──", x.value),
                onChange: re[3] || (re[3] = (te) => l({ hostId: te, hostName: c(te) ? te : T(f).find((ve) => ve.hostid === te)?.name ?? te, itemIds: [], itemNames: [] })),
                onClear: re[4] || (re[4] = () => l({ hostId: "", hostName: "", itemIds: [], itemNames: [] }))
              }, null, 8, ["value", "display-value", "placeholder", "groups"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ]),
        e.query.queryType === "metrics" ? (ne(), xe("div", Yce, [
          L("div", Gce, oe(T(r)("panel.itemTag")), 1),
          h(T(Xo), {
            spinning: C.value,
            size: "small"
          }, {
            default: he(() => [
              h(rs, {
                value: e.query.itemTagsFilter || void 0,
                placeholder: T(r)("panel.itemTag.placeholder"),
                groups: u("── 标签 ──", P.value),
                onChange: re[5] || (re[5] = (te) => l({ itemTagsFilter: te ?? "", itemIds: [], itemNames: [] })),
                onClear: re[6] || (re[6] = () => l({ itemTagsFilter: "", itemIds: [], itemNames: [] }))
              }, null, 8, ["value", "placeholder", "groups"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ])) : rt("", !0)
      ], 4)) : rt("", !0),
      e.query.queryType === "metrics" ? (ne(), xe("div", Uce, [
        L("div", Xce, oe(T(r)("panel.items")), 1),
        h(rs, {
          value: e.query.itemNames[0] || void 0,
          placeholder: T(r)("panel.items.placeholder"),
          groups: u("── 监控项 ──", I.value),
          onChange: re[7] || (re[7] = (te) => l({ itemNames: [te], itemIds: [] })),
          onClear: re[8] || (re[8] = () => l({ itemNames: [], itemIds: [] }))
        }, null, 8, ["value", "placeholder", "groups"])
      ])) : rt("", !0),
      e.query.queryType === "text" ? (ne(), xe(Je, { key: 2 }, [
        L("div", Qce, [
          L("div", null, [
            L("div", Zce, oe(T(r)("panel.items")), 1),
            h(T(Xo), {
              spinning: _.value,
              size: "small"
            }, {
              default: he(() => [
                h(rs, {
                  value: e.query.itemNames[0] || void 0,
                  placeholder: T(r)("panel.items.placeholder"),
                  disabled: !e.query.hostId,
                  groups: u("── 监控项 ──", M.value),
                  onChange: re[9] || (re[9] = (te) => l({ itemNames: [te], itemIds: [] })),
                  onClear: re[10] || (re[10] = () => l({ itemNames: [], itemIds: [] }))
                }, null, 8, ["value", "placeholder", "disabled", "groups"])
              ]),
              _: 1
            }, 8, ["spinning"])
          ]),
          L("div", null, [
            L("div", Jce, oe(T(r)("qb.textFilter")), 1),
            h(T(kt), {
              size: "small",
              style: { width: "100%" },
              value: e.query.textFilter,
              onChange: re[11] || (re[11] = (te) => l({ textFilter: te.target.value }))
            }, null, 8, ["value"])
          ])
        ]),
        L("div", ede, [
          h(T(Eo), {
            checked: e.query.useCaptureGroups,
            onChange: re[12] || (re[12] = (te) => l({ useCaptureGroups: te.target.checked }))
          }, null, 8, ["checked"]),
          L("span", tde, oe(T(r)("qb.useCaptureGroups")), 1)
        ])
      ], 64)) : rt("", !0),
      e.query.queryType === "itemid" ? (ne(), xe("div", nde, [
        L("div", ode, oe(T(r)("qb.itemIds")), 1),
        h(T(kt), {
          size: "small",
          style: { width: "100%" },
          value: e.query.itemids,
          placeholder: T(r)("qb.itemIds.placeholder"),
          onChange: re[13] || (re[13] = (te) => l({ itemids: te.target.value }))
        }, null, 8, ["value", "placeholder"])
      ])) : rt("", !0),
      e.query.queryType === "triggers" ? (ne(), xe("div", rde, [
        L("div", ide, oe(T(r)("qb.triggerFilter")), 1),
        h(T(kt), {
          size: "small",
          style: { width: "100%" },
          value: e.query.triggerFilter,
          onChange: re[14] || (re[14] = (te) => l({ triggerFilter: te.target.value }))
        }, null, 8, ["value"])
      ])) : rt("", !0),
      e.query.queryType === "problems" ? (ne(), xe(Je, { key: 5 }, [
        L("div", ade, [
          L("div", null, [
            L("div", lde, oe(T(r)("qb.problemName")), 1),
            h(T(kt), {
              size: "small",
              style: { width: "100%" },
              value: e.query.triggerFilter,
              onChange: re[15] || (re[15] = (te) => l({ triggerFilter: te.target.value }))
            }, null, 8, ["value"])
          ]),
          L("div", null, [
            L("div", sde, oe(T(r)("qb.tags")), 1),
            h(T(kt), {
              size: "small",
              style: { width: "100%" },
              value: e.query.tagsFilter,
              onChange: re[16] || (re[16] = (te) => l({ tagsFilter: te.target.value }))
            }, null, 8, ["value"])
          ]),
          L("div", null, [
            L("div", ude, oe(T(r)("qb.show")), 1),
            h(T(Dt), {
              size: "small",
              style: { width: "100%" },
              value: e.query.showProblems,
              options: W.map((te) => ({ value: te, label: K[te] })),
              onChange: re[17] || (re[17] = (te) => l({ showProblems: te }))
            }, null, 8, ["value", "options"])
          ])
        ]),
        L("div", null, [
          L("div", cde, oe(T(r)("qb.severity")), 1),
          L("div", dde, [
            (ne(), xe(Je, null, Ut(q, (te) => h(T(Pi), {
              key: te.value,
              color: e.query.severities.includes(te.value) ? te.color : void 0,
              class: "cursor-pointer select-none",
              style: Bt({ opacity: e.query.severities.includes(te.value) ? 1 : 0.4 }),
              onClick: () => l({ severities: e.query.severities.includes(te.value) ? e.query.severities.filter((ve) => ve !== te.value) : [...e.query.severities, te.value] })
            }, {
              default: he(() => [
                Le(oe(te.label), 1)
              ]),
              _: 2
            }, 1032, ["color", "style", "onClick"])), 64))
          ])
        ])
      ], 64)) : rt("", !0),
      e.query.queryType === "services" ? (ne(), xe("div", fde, [
        L("div", null, [
          L("div", pde, oe(T(r)("qb.itService")), 1),
          h(T(Xo), {
            spinning: A.value,
            size: "small"
          }, {
            default: he(() => [
              h(rs, {
                value: e.query.itServiceFilter || void 0,
                placeholder: T(r)("qb.itService.placeholder"),
                groups: u("── 服务 ──", N.value.map((te) => ({ value: te.name, label: te.name }))),
                onChange: re[18] || (re[18] = (te) => l({ itServiceFilter: te })),
                onClear: re[19] || (re[19] = () => l({ itServiceFilter: "" }))
              }, null, 8, ["value", "placeholder", "groups"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ]),
        L("div", null, [
          L("div", hde, oe(T(r)("qb.slaProperty")), 1),
          h(T(Dt), {
            size: "small",
            style: { width: "100%" },
            value: e.query.slaProperty,
            options: G,
            onChange: re[20] || (re[20] = (te) => l({ slaProperty: te }))
          }, null, 8, ["value"])
        ]),
        L("div", null, [
          L("div", gde, oe(T(r)("qb.slaInterval")), 1),
          h(T(Dt), {
            size: "small",
            style: { width: "100%" },
            value: e.query.slaInterval,
            options: ae,
            onChange: re[21] || (re[21] = (te) => l({ slaInterval: te }))
          }, null, 8, ["value"])
        ])
      ])) : rt("", !0),
      e.query.queryType === "macros" ? (ne(), xe("div", vde, [
        L("div", mde, oe(T(r)("qb.macroFilter")), 1),
        h(T(Xo), {
          spinning: B.value,
          size: "small"
        }, {
          default: he(() => [
            h(rs, {
              value: e.query.macroFilter || void 0,
              placeholder: "{$MACRO_NAME}",
              disabled: !e.query.hostId,
              groups: [{ label: "── 宏 ──", options: H.value.map((te) => ({ value: te.macro, label: `${te.macro} = ${te.value}` })) }],
              onChange: re[22] || (re[22] = (te) => l({ macroFilter: te })),
              onClear: re[23] || (re[23] = () => l({ macroFilter: "" }))
            }, null, 8, ["value", "disabled", "groups"])
          ]),
          _: 1
        }, 8, ["spinning"])
      ])) : rt("", !0),
      e.query.queryType === "lld" ? (ne(), xe("div", bde, [
        L("div", null, [
          L("div", yde, oe(T(r)("qb.lld.rule")), 1),
          h(T(Xo), {
            spinning: R.value,
            size: "small"
          }, {
            default: he(() => [
              h(T(Dt), {
                size: "small",
                style: { width: "100%" },
                "allow-clear": "",
                "show-search": "",
                value: e.query.lldRuleId || void 0,
                placeholder: T(r)("qb.lld.rule.placeholder"),
                options: F.value.map((te) => ({ value: te.itemid, label: te.name })),
                onChange: re[24] || (re[24] = (te) => l({ lldRuleId: te, lldRuleName: F.value.find((ve) => ve.itemid === te)?.name ?? te, lldItemKeys: [] })),
                onClear: re[25] || (re[25] = () => l({ lldRuleId: "", lldRuleName: "", lldItemKeys: [] }))
              }, null, 8, ["value", "placeholder", "options"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ]),
        L("div", null, [
          L("div", xde, oe(T(r)("qb.lld.itemKeys")), 1),
          h(T(Xo), {
            spinning: j.value,
            size: "small"
          }, {
            default: he(() => [
              h(T(Dt), {
                size: "small",
                style: { width: "100%" },
                mode: "multiple",
                "allow-clear": "",
                value: e.query.lldItemKeys ?? [],
                options: X.value,
                onChange: re[26] || (re[26] = (te) => l({ lldItemKeys: te }))
              }, null, 8, ["value", "options"])
            ]),
            _: 1
          }, 8, ["spinning"])
        ])
      ])) : rt("", !0),
      ["metrics", "itemid", "services"].includes(e.query.queryType) ? (ne(), ft(cce, {
        key: 9,
        functions: e.query.functions ?? [],
        onChange: re[27] || (re[27] = (te) => l({ functions: te }))
      }, null, 8, ["functions"])) : rt("", !0),
      ["macros", "lld"].includes(e.query.queryType) ? rt("", !0) : (ne(), ft(Lce, {
        key: 10,
        "query-type": e.query.queryType,
        options: e.query.options ?? {},
        onChange: re[28] || (re[28] = (te) => l({ options: te }))
      }, null, 8, ["query-type", "options"]))
    ]));
  }
});
class Sde {
  type = "argus";
  meta = { type: "argus", displayName: "Argus", icon: "📊" };
  QueryEditor = Que;
  defaultQuery = () => ({
    type: "argus",
    datasourceId: "",
    queries: [
      {
        type: "builder_query",
        spec: {
          name: "A",
          signal: "metrics",
          stepInterval: null,
          disabled: !1,
          filter: { expression: "" },
          having: { expression: "" },
          groupBy: [],
          order: [],
          legend: "",
          functions: [],
          aggregations: [{ metricName: "", metricType: "", timeAggregation: "rate", spaceAggregation: "sum" }]
        }
      }
    ]
  });
  async query() {
    return { data: [], state: "Done" };
  }
}
class Cde {
  type = "zabbix";
  meta = { type: "zabbix", displayName: "Zabbix", icon: "" };
  QueryEditor = wde;
  defaultQuery = () => ({
    type: "zabbix",
    datasourceId: "",
    queryType: "metrics",
    groupId: "",
    groupName: "",
    hostId: "",
    hostName: "",
    appId: "",
    appName: "",
    itemIds: [],
    itemNames: [],
    textFilter: "",
    useCaptureGroups: !1,
    itemTagsFilter: "",
    itemids: "",
    triggerFilter: "",
    tagsFilter: "",
    showProblems: "problems",
    severities: [],
    itServiceFilter: "",
    slaFilter: "",
    slaProperty: "sli",
    slaInterval: "none",
    macroFilter: "",
    lldRuleId: "",
    lldRuleName: "",
    lldItemKeys: [],
    functions: [],
    options: {
      useTrends: "default",
      showDisabledItems: !1,
      useZabbixValueMapping: !1,
      disableDataAlignment: !1,
      acknowledged: 2,
      sortProblems: "default",
      useTimeRange: !1,
      hostsInMaintenance: !1,
      hostProxy: !1,
      limit: 100
    }
  });
  async query(t) {
    const { range: n, targets: o, maxDataPoints: r, scopedVars: i, _dsCfg: a } = t;
    if (!a)
      return { data: [], state: "Done" };
    const l = { url: a.url, token: a.token }, s = Math.floor(n.from / 1e3), u = Math.ceil(n.to / 1e3), c = i ?? {}, d = t._variableStates ?? {}, f = [];
    for (const p of o) {
      const v = OB(p, c, d);
      let g = [];
      if (v.queryType === "itemid" && v.itemids?.trim()) {
        const B = v.itemids.split(",").map((F) => F.trim()).filter(Boolean);
        g = await pB(B, l);
      } else if (v.hostIds.length > 0 && p.itemNames.length > 0) {
        const B = (await Promise.all(
          v.hostIds.map(
            (R) => Lk([R], void 0, void 0, l, v.itemTagsFilter || void 0)
          )
        )).flat(), F = new Set(p.itemNames.filter((R) => !R.startsWith("$")));
        g = B.filter((R) => F.has(R.name));
      }
      if (g.length === 0)
        continue;
      const [m, x] = await Promise.all([
        (await import("./index-C07AU7Op.js")).getHistory(
          g.map((B) => B.itemid),
          s,
          u,
          l
        ),
        p.options?.useZabbixValueMapping ? yB(l) : Promise.resolve([])
      ]);
      if (m.length === 0)
        continue;
      const S = /* @__PURE__ */ new Map();
      for (const B of x) {
        const F = {};
        for (const R of B.mappings)
          F[R.value] = R.newvalue;
        S.set(B.valuemapid, F);
      }
      const C = wB(m, g.map((B) => B.itemid)), P = Math.max(Math.ceil((u - s) / r), 60), $ = new Map(
        Array.from(C.entries()).map(([B, F]) => [
          B,
          F.length > r ? CB(F, P * 1e3) : F
        ])
      ), I = new Map(
        Array.from($.entries()).map(([B, F]) => [
          B,
          UF(F, s, u, P)
        ])
      ), w = (I.get(g[0].itemid) ?? []).map((B) => B.ts / 1e3), _ = {
        timestamps: w,
        series: g.map((B) => {
          const F = I.get(B.itemid) ?? [];
          return { label: B.name, values: F.map((R) => R.value) };
        })
      }, M = sB(_, p.functions ?? []), N = /* @__PURE__ */ new Map();
      M.series.forEach((B, F) => {
        const R = g[F];
        R && N.set(
          R.itemid,
          B.values.map((X, j) => ({ ts: w[j] * 1e3, value: X }))
        );
      });
      const A = g.slice(0, M.series.length), H = uB(N, A, S, p.datasourceId || "A");
      M.series.forEach((B, F) => {
        const R = H.fields[F + 1];
        R?.config && (R.config.displayNameFromDS = B.label);
      }), f.push(H);
    }
    return { data: f, state: "Done" };
  }
}
let HP = !1;
function $de() {
  if (HP)
    return;
  HP = !0, p4();
  const e = new Jz();
  e.QueryEditor = ace, Mg(e), Mg(new Sde()), Mg(new Cde());
}
const epe = /* @__PURE__ */ be({
  __name: "ArgusBoard",
  props: {
    hideHeader: { type: Boolean, default: !1 },
    canEdit: { type: Boolean, default: !0 },
    theme: { default: null },
    lang: { default: null },
    isEditing: { type: [Boolean, null], default: null },
    initialEditingPanelId: { default: null },
    datasourceConfig: { default: null },
    initialConfig: {},
    renderDefaultDashboard: { type: Boolean },
    presets: {}
  },
  emits: ["save"],
  setup(e, { emit: t }) {
    const n = e, o = t;
    console.warn(
      "%c ArgusBoard %c v1.0.0 %c 2026/7/7 19:24:40",
      "background:#4096ff;color:#fff;padding:2px 4px;border-radius:3px 0 0 3px;font-weight:bold",
      "background:#1f1f1f;color:#4096ff;padding:2px 4px;font-weight:bold",
      "background:#1f1f1f;color:#888;padding:2px 4px;border-radius:0 3px 3px 0"
    ), $de(), lD(() => ({
      hideHeader: n.hideHeader,
      canEdit: n.canEdit,
      theme: n.theme ?? null,
      lang: n.lang ?? null,
      isEditing: n.isEditing ?? null,
      initialEditingPanelId: n.initialEditingPanelId ?? null,
      datasourceConfig: n.datasourceConfig ?? null,
      initialConfig: n.initialConfig,
      renderDefaultDashboard: n.renderDefaultDashboard,
      presets: n.presets,
      onSave: (f) => o("save", f)
    }));
    const r = Fa();
    n.theme && r.setTheme(n.theme);
    const i = E(() => n.theme ?? r.theme);
    ke(i, (f) => {
      document.documentElement.dataset.theme = f, document.body.dataset.theme = f;
    }, { immediate: !0 });
    const a = ce(n.lang ?? "zh");
    iD(a), ke(() => n.lang, (f) => {
      f && (a.value = f);
    });
    const l = oa();
    function s(f) {
      f ? l.importJSON(
        typeof f == "string" ? f : JSON.stringify(f)
      ) : n.renderDefaultDashboard === !1 && l.importJSON(JSON.stringify({ title: "", panels: {}, layouts: [] }));
    }
    Nt(() => {
      n.canEdit === !1 ? l.setEditing(!1) : n.isEditing !== null && l.setEditing(n.isEditing ?? !0), s(n.initialConfig), n.initialEditingPanelId && l.setEditingPanel(n.initialEditingPanelId);
    }), ke(() => n.initialConfig, (f) => {
      s(f);
    });
    const u = E(() => ({
      algorithm: i.value === "dark" ? U$.darkAlgorithm : U$.defaultAlgorithm,
      token: { colorPrimary: "#1677ff", borderRadius: 4 },
      getPopupContainer: () => document.body
    })), c = E(() => i.value === "dark"), d = E(() => c.value ? "#141414" : "#f0f2f5");
    return (f, p) => (ne(), ft(T(Ps), { theme: u.value }, {
      default: he(() => [
        h(T(Ru), null, {
          default: he(() => [
            h(T(a$), {
              style: Bt({ minHeight: "100%", background: d.value })
            }, {
              default: he(() => [
                h(T(a$).Content, { style: { padding: 0, flex: 1, minHeight: 0 } }, {
                  default: he(() => [
                    h(tue)
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }, 8, ["style"])
          ]),
          _: 1
        })
      ]),
      _: 1
    }, 8, ["theme"]));
  }
}), Pde = { class: "log-toolbar" }, Ode = { class: "log-scroller" }, kde = { class: "log-time" }, Ide = { class: "log-message" }, _de = {
  key: 0,
  class: "log-empty"
}, Tde = /* @__PURE__ */ be({
  __name: "LogViewer",
  props: {
    logs: {},
    maxHeight: { default: 400 }
  },
  setup(e) {
    const t = e, n = ce(""), o = ce([]), r = E(() => t.logs.filter((a) => !(o.value.length > 0 && !o.value.includes(a.level) || n.value && !a.message.toLowerCase().includes(n.value.toLowerCase())))), i = {
      error: "#ff4d4f",
      warn: "#faad14",
      info: "#52c41a",
      debug: "#8c8c8c"
    };
    return (a, l) => {
      const s = yn("a-input"), u = yn("a-select");
      return ne(), xe("div", {
        class: "log-viewer",
        style: Bt({ maxHeight: `${e.maxHeight}px` })
      }, [
        L("div", Pde, [
          h(s, {
            value: n.value,
            "onUpdate:value": l[0] || (l[0] = (c) => n.value = c),
            size: "small",
            placeholder: "Search logs...",
            "allow-clear": "",
            style: { flex: "1" }
          }, null, 8, ["value"]),
          h(u, {
            value: o.value,
            "onUpdate:value": l[1] || (l[1] = (c) => o.value = c),
            mode: "multiple",
            size: "small",
            placeholder: "Level",
            style: { "min-width": "160px" },
            options: [
              { value: "error", label: "Error" },
              { value: "warn", label: "Warn" },
              { value: "info", label: "Info" },
              { value: "debug", label: "Debug" }
            ]
          }, null, 8, ["value"])
        ]),
        L("div", Ode, [
          (ne(!0), xe(Je, null, Ut(r.value, (c) => (ne(), xe("div", {
            key: c.id,
            class: "log-entry"
          }, [
            L("span", kde, oe(new Date(c.timestamp).toLocaleTimeString()), 1),
            L("span", {
              class: "log-level",
              style: Bt({ color: i[c.level] })
            }, oe(c.level.toUpperCase()), 5),
            L("span", Ide, oe(c.message), 1)
          ]))), 128))
        ]),
        r.value.length === 0 ? (ne(), xe("div", _de, " No log entries ")) : rt("", !0)
      ], 4);
    };
  }
}), tpe = /* @__PURE__ */ wr(Tde, [["__scopeId", "data-v-22a0d40d"]]), Mde = {
  key: 0,
  class: "topology-empty"
}, Ede = ["width", "height"], Dde = { class: "edges" }, Ade = ["x1", "y1", "x2", "y2"], Nde = ["cx", "cy", "fill", "stroke"], Rde = ["x", "y"], zde = ["x", "y"], Fde = /* @__PURE__ */ be({
  __name: "ServiceTopology",
  props: {
    nodes: { default: () => [] },
    edges: { default: () => [] },
    width: { default: 800 },
    height: { default: 500 }
  },
  setup(e) {
    const t = e, n = ce(), o = ce({});
    function r() {
      if (t.nodes.length === 0)
        return;
      const a = Math.ceil(Math.sqrt(t.nodes.length)), l = t.width / a, s = t.height / Math.ceil(t.nodes.length / a), u = {};
      t.nodes.forEach((c, d) => {
        const f = d % a, p = Math.floor(d / a);
        u[c.id] = {
          x: f * l + l / 2,
          y: p * s + s / 2
        };
      }), o.value = u;
    }
    Nt(r);
    function i(a) {
      return a ? a > 0.05 ? "#ff4d4f" : a > 0.01 ? "#faad14" : "#52c41a" : "#52c41a";
    }
    return (a, l) => (ne(), xe("div", {
      class: "service-topology",
      style: Bt({ width: `${e.width}px`, height: `${e.height}px` })
    }, [
      e.nodes.length === 0 ? (ne(), xe("div", Mde, " No topology data ")) : (ne(), xe("svg", {
        key: 1,
        ref_key: "svgRef",
        ref: n,
        width: e.width,
        height: e.height
      }, [
        L("g", Dde, [
          (ne(!0), xe(Je, null, Ut(e.edges, (s) => (ne(), xe("line", {
            key: `${s.source}-${s.target}`,
            x1: o.value[s.source]?.x ?? 0,
            y1: o.value[s.source]?.y ?? 0,
            x2: o.value[s.target]?.x ?? 0,
            y2: o.value[s.target]?.y ?? 0,
            stroke: "var(--ant-color-border)",
            "stroke-width": "1.5",
            "marker-end": "url(#arrowhead)"
          }, null, 8, Ade))), 128))
        ]),
        l[0] || (l[0] = L("defs", null, [
          L("marker", {
            id: "arrowhead",
            markerWidth: "10",
            markerHeight: "7",
            refX: "10",
            refY: "3.5",
            orient: "auto"
          }, [
            L("polygon", {
              points: "0 0, 10 3.5, 0 7",
              fill: "var(--ant-color-border)"
            })
          ])
        ], -1)),
        (ne(!0), xe(Je, null, Ut(e.nodes, (s) => (ne(), xe("g", {
          key: s.id,
          class: "topology-node"
        }, [
          L("circle", {
            cx: o.value[s.id]?.x ?? 0,
            cy: o.value[s.id]?.y ?? 0,
            r: "24",
            fill: i(s.errorRate),
            "fill-opacity": "0.15",
            stroke: i(s.errorRate),
            "stroke-width": "2"
          }, null, 8, Nde),
          L("text", {
            x: o.value[s.id]?.x ?? 0,
            y: (o.value[s.id]?.y ?? 0) + 4,
            "text-anchor": "middle",
            "font-size": "10",
            fill: "var(--ant-color-text)"
          }, oe(s.name), 9, Rde),
          s.latency !== void 0 ? (ne(), xe("text", {
            key: 0,
            x: o.value[s.id]?.x ?? 0,
            y: (o.value[s.id]?.y ?? 0) + 36,
            "text-anchor": "middle",
            "font-size": "9",
            fill: "var(--ant-color-text-secondary)"
          }, oe(s.latency) + "ms ", 9, zde)) : rt("", !0)
        ]))), 128))
      ], 8, Ede))
    ], 4));
  }
}), npe = /* @__PURE__ */ wr(Fde, [["__scopeId", "data-v-da85d863"]]), Bde = { class: "trace-waterfall" }, Lde = {
  key: 0,
  class: "trace-empty"
}, Hde = { class: "trace-name-col" }, Vde = { class: "trace-service" }, jde = { class: "trace-op" }, Wde = { class: "trace-bar-col" }, Kde = { class: "trace-dur-col" }, qde = /* @__PURE__ */ be({
  __name: "TraceWaterfall",
  props: {
    spans: { default: () => [] },
    startTime: {},
    endTime: {}
  },
  setup(e) {
    const t = e, n = E(() => t.startTime ?? Math.min(...t.spans.map((u) => u.startTime))), o = E(() => t.endTime ?? Math.max(...t.spans.map((u) => u.startTime + u.duration))), r = E(() => o.value - n.value);
    function i(u) {
      return (u.startTime - n.value) / r.value * 100;
    }
    function a(u) {
      return Math.max(u.duration / r.value * 100, 0.5);
    }
    function l(u) {
      return u >= 1e6 ? `${(u / 1e6).toFixed(2)}s` : u >= 1e3 ? `${(u / 1e3).toFixed(2)}ms` : `${u}μs`;
    }
    const s = {
      ok: "#52c41a",
      error: "#ff4d4f",
      unset: "#1677ff"
    };
    return (u, c) => (ne(), xe("div", Bde, [
      e.spans.length === 0 ? (ne(), xe("div", Lde, " No trace data ")) : (ne(), xe(Je, { key: 1 }, [
        c[0] || (c[0] = L("div", { class: "trace-header" }, [
          L("div", { class: "trace-name-col" }, " Operation "),
          L("div", { class: "trace-bar-col" }, " Timeline "),
          L("div", { class: "trace-dur-col" }, " Duration ")
        ], -1)),
        (ne(!0), xe(Je, null, Ut(e.spans, (d) => (ne(), xe("div", {
          key: d.spanId,
          class: "trace-row"
        }, [
          L("div", Hde, [
            L("span", Vde, oe(d.serviceName), 1),
            L("span", jde, oe(d.operationName), 1)
          ]),
          L("div", Wde, [
            L("div", {
              class: "trace-bar",
              style: Bt({
                left: `${i(d)}%`,
                width: `${a(d)}%`,
                background: s[d.status ?? "unset"]
              })
            }, null, 4)
          ]),
          L("div", Kde, oe(l(d.duration)), 1)
        ]))), 128))
      ], 64))
    ]));
  }
}), ope = /* @__PURE__ */ wr(qde, [["__scopeId", "data-v-0212681c"]]), rpe = /* @__PURE__ */ be({
  __name: "SimpleChart",
  props: {
    options: {},
    data: {}
  },
  setup(e) {
    const t = e, n = ce(), o = ce(null), r = ce({ width: 0, height: 0 });
    let i = null;
    function a() {
      o.value && (o.value.destroy(), o.value = null);
    }
    return qt(() => {
      i?.disconnect(), a();
    }), It((l) => {
      n.value && (i = new ResizeObserver((s) => {
        const { width: u, height: c } = s[0].contentRect;
        u > 0 && c > 0 && (r.value = { width: Math.floor(u), height: Math.floor(c) });
      }), i.observe(n.value), r.value = {
        width: Math.floor(n.value.getBoundingClientRect().width),
        height: Math.floor(n.value.getBoundingClientRect().height)
      }, l(() => {
        i?.disconnect();
      }));
    }), It((l) => {
      !n.value || r.value.width <= 0 || r.value.height <= 0 || (a(), o.value = new xo(
        { ...t.options, width: r.value.width, height: r.value.height },
        t.data,
        n.value
      ), l(() => {
        a();
      }));
    }), (l, s) => (ne(), xe("div", {
      ref_key: "containerRef",
      ref: n,
      class: "w-full h-full"
    }, null, 512));
  }
}), Yde = { class: "kbd-key" }, Gde = /* @__PURE__ */ be({
  __name: "Kbd",
  props: {
    char: {}
  },
  setup(e) {
    return (t, n) => (ne(), xe("kbd", Yde, [
      Ra(t.$slots, "default", {}, () => [
        Le(oe(e.char), 1)
      ], !0)
    ]));
  }
}), ipe = /* @__PURE__ */ wr(Gde, [["__scopeId", "data-v-94fb4749"]]), Ude = ["href", "target"], Xde = {
  key: 1,
  class: "panel-links-icon",
  style: { cursor: "pointer" }
}, Qde = { style: { "font-size": "10px", "margin-left": "2px" } }, Zde = /* @__PURE__ */ be({
  __name: "PanelLinksIcon",
  props: {
    panel: {}
  },
  setup(e) {
    return (t, n) => e.panel.links && e.panel.links.length > 0 ? (ne(), ft(T(Lo), {
      key: 0,
      title: e.panel.links.map((o) => o.title ?? o.url).join(", ")
    }, {
      default: he(() => [
        e.panel.links.length === 1 ? (ne(), xe("a", {
          key: 0,
          href: e.panel.links[0].url,
          target: e.panel.links[0].newTab ? "_blank" : "_self",
          class: "panel-links-icon",
          onClick: n[0] || (n[0] = ur(() => {
          }, ["stop"]))
        }, [...n[1] || (n[1] = [
          L("span", {
            class: "i-mdi-link",
            style: { "font-size": "14px" }
          }, null, -1)
        ])], 8, Ude)) : (ne(), xe("span", Xde, [
          n[2] || (n[2] = L("span", {
            class: "i-mdi-link-variant",
            style: { "font-size": "14px" }
          }, null, -1)),
          L("span", Qde, oe(e.panel.links.length), 1)
        ]))
      ]),
      _: 1
    }, 8, ["title"])) : rt("", !0);
  }
}), ape = /* @__PURE__ */ wr(Zde, [["__scopeId", "data-v-6925a5a2"]]), Jde = { class: "viz-picker" }, efe = { class: "viz-picker-title" }, tfe = { class: "viz-picker-grid" }, nfe = ["onClick"], ofe = { class: "viz-picker-label" }, rfe = /* @__PURE__ */ be({
  __name: "VizPickerPane",
  setup(e) {
    const { t } = sn(), { panel: n, onChange: o } = vc(), r = [
      { type: "timeseries", icon: bt.chartLine, labelKey: "config.type.timeseries" },
      { type: "bar", icon: bt.chartBar, labelKey: "config.type.bar" },
      { type: "stat", icon: bt.stat, labelKey: "config.type.stat" },
      { type: "gauge", icon: bt.gauge, labelKey: "config.type.gauge" },
      { type: "pie", icon: bt.chartPie, labelKey: "config.type.pie" },
      { type: "table", icon: bt.table, labelKey: "config.type.table" },
      { type: "histogram", icon: bt.chartArea, labelKey: "config.type.histogram" }
    ];
    return (i, a) => (ne(), xe("div", Jde, [
      L("div", efe, oe(T(t)("editor.vizPicker.title")), 1),
      L("div", tfe, [
        (ne(), xe(Je, null, Ut(r, (l) => L("button", {
          key: l.type,
          class: Pt(["viz-picker-item", { "viz-picker-item--active": T(n).type === l.type }]),
          onClick: (s) => T(o)({ type: l.type })
        }, [
          L("span", {
            class: Pt(["viz-picker-icon", [l.icon]])
          }, null, 2),
          L("span", ofe, oe(T(t)(l.labelKey)), 1)
        ], 10, nfe)), 64))
      ])
    ]));
  }
}), lpe = /* @__PURE__ */ wr(rfe, [["__scopeId", "data-v-1d0d144f"]]);
export {
  Zfe as $,
  UO as A,
  ZO as B,
  Il as C,
  ws as D,
  QO as E,
  $B as F,
  Gn as G,
  Afe as H,
  Vfe as I,
  CB as J,
  zfe as K,
  Uf as L,
  Jz as M,
  YF as N,
  fm as O,
  jfe as P,
  XO as Q,
  Bfe as R,
  pm as S,
  Lfe as T,
  m4 as U,
  GF as V,
  Wfe as W,
  Gfe as X,
  uD as Y,
  Pp as Z,
  r4 as _,
  Oz as a,
  xB as a0,
  Rfe as a1,
  Nfe as a2,
  dB as a3,
  fB as a4,
  bB as a5,
  Hk as a6,
  Lk as a7,
  pB as a8,
  mB as a9,
  Yx as aA,
  epe as aB,
  Que as aC,
  Yse as aD,
  tue as aE,
  ipe as aF,
  tpe as aG,
  ace as aH,
  BP as aI,
  Ose as aJ,
  Tse as aK,
  ape as aL,
  oy as aM,
  npe as aN,
  rpe as aO,
  AE as aP,
  ope as aQ,
  Nae as aR,
  NE as aS,
  Qle as aT,
  lpe as aU,
  lD as aV,
  Dae as aW,
  $de as aX,
  nc as aY,
  Jfe as aZ,
  sD as aa,
  e4 as ab,
  i4 as ac,
  Xfe as ad,
  $4 as ae,
  vB as af,
  Ffe as ag,
  Ufe as ah,
  yB as ai,
  wB as aj,
  ma as ak,
  nu as al,
  JO as am,
  gB as an,
  Yfe as ao,
  Kfe as ap,
  kfe as aq,
  Zz as ar,
  p4 as as,
  Mg as at,
  Ql as au,
  t4 as av,
  OB as aw,
  Dfe as ax,
  P4 as ay,
  Vse as az,
  Tfe as b,
  fz as c,
  Mfe as d,
  Qfe as e,
  Yr as f,
  Efe as g,
  gh as h,
  o1 as i,
  Xf as j,
  jF as k,
  Pa as l,
  Ife as m,
  hm as n,
  DF as o,
  LF as p,
  SB as q,
  UF as r,
  sB as s,
  _fe as t,
  zc as u,
  KF as v,
  uB as w,
  sf as x,
  Hfe as y,
  qfe as z
};
