UNPKG

hs-uii

Version:
1,588 lines 1.53 MB
var __defProp2 = Object.defineProperty; var __defProps2 = Object.defineProperties; var __getOwnPropDescs2 = Object.getOwnPropertyDescriptors; var __getOwnPropSymbols2 = Object.getOwnPropertySymbols; var __hasOwnProp2 = Object.prototype.hasOwnProperty; var __propIsEnum2 = Object.prototype.propertyIsEnumerable; var __defNormalProp2 = (obj2, key2, value) => key2 in obj2 ? __defProp2(obj2, key2, { enumerable: true, configurable: true, writable: true, value }) : obj2[key2] = value; var __spreadValues2 = (a10, b10) => { for (var prop in b10 || (b10 = {})) if (__hasOwnProp2.call(b10, prop)) __defNormalProp2(a10, prop, b10[prop]); if (__getOwnPropSymbols2) for (var prop of __getOwnPropSymbols2(b10)) { if (__propIsEnum2.call(b10, prop)) __defNormalProp2(a10, prop, b10[prop]); } return a10; }; var __spreadProps2 = (a10, b10) => __defProps2(a10, __getOwnPropDescs2(b10)); import { defineComponent, computed, resolveComponent, openBlock, createBlock, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, h as h$2, nextTick, createVNode, Comment, Text, inject, reactive, provide, watch, onMounted, onUnmounted, Teleport, ref, TransitionGroup, render, watchEffect, pushScopeId, popScopeId, createElementVNode, createCommentVNode, onBeforeUnmount, toRefs, normalizeClass, normalizeStyle, renderSlot, useCssVars, useSlots, Transition, unref, shallowRef, toRaw, withDirectives, vShow, normalizeProps, guardReactiveProps } from "vue"; var _export_sfc$1 = (sfc, props2) => { const target = sfc.__vccOpts || sfc; for (const [key2, val] of props2) { target[key2] = val; } return target; }; const _sfc_main$d = defineComponent({ name: "hSelect", props: { value: { type: [String, Number, Array, Object], default: null }, placeholder: { type: String, default: "" }, options: { type: Array, default: [] }, fieldNames: { type: Object } }, setup(props2, { emit }) { const modelValue = computed({ get: () => props2.value || void 0, set: (val) => { emit("update:value", val || ""); } }); return { modelValue }; } }); function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) { const _component_a_select_option = resolveComponent("a-select-option"); const _component_a_select = resolveComponent("a-select"); return openBlock(), createBlock(_component_a_select, { value: _ctx.modelValue, "onUpdate:value": _cache[0] || (_cache[0] = ($event) => _ctx.modelValue = $event), allowClear: "", showSearch: "", placeholder: _ctx.placeholder, optionFilterProp: "label" }, { default: withCtx(() => [ _ctx.fieldNames ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.options, (item, index) => { return openBlock(), createBlock(_component_a_select_option, { key: index, value: item[_ctx.fieldNames.value], label: item[_ctx.fieldNames.label], item }, { default: withCtx(() => [ createTextVNode(toDisplayString(item[_ctx.fieldNames.label]), 1) ]), _: 2 }, 1032, ["value", "label", "item"]); }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.options, (item, index) => { return openBlock(), createBlock(_component_a_select_option, { key: index, value: item.value, label: item.label }, { default: withCtx(() => [ createTextVNode(toDisplayString(item.label), 1) ]), _: 2 }, 1032, ["value", "label"]); }), 128)) ]), _: 1 }, 8, ["value", "placeholder"]); } var hSelect = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["render", _sfc_render$c]]); hSelect.install = (app) => { app.component(hSelect.name, hSelect); }; function bound01(n10, max) { if (isOnePointZero(n10)) { n10 = "100%"; } var isPercent = isPercentage(n10); n10 = max === 360 ? n10 : Math.min(max, Math.max(0, parseFloat(n10))); if (isPercent) { n10 = parseInt(String(n10 * max), 10) / 100; } if (Math.abs(n10 - max) < 1e-6) { return 1; } if (max === 360) { n10 = (n10 < 0 ? n10 % max + max : n10 % max) / parseFloat(String(max)); } else { n10 = n10 % max / parseFloat(String(max)); } return n10; } function clamp01(val) { return Math.min(1, Math.max(0, val)); } function isOnePointZero(n10) { return typeof n10 === "string" && n10.indexOf(".") !== -1 && parseFloat(n10) === 1; } function isPercentage(n10) { return typeof n10 === "string" && n10.indexOf("%") !== -1; } function boundAlpha(a10) { a10 = parseFloat(a10); if (isNaN(a10) || a10 < 0 || a10 > 1) { a10 = 1; } return a10; } function convertToPercentage(n10) { if (n10 <= 1) { return "".concat(Number(n10) * 100, "%"); } return n10; } function pad2(c10) { return c10.length === 1 ? "0" + c10 : String(c10); } function rgbToRgb(r10, g10, b10) { return { r: bound01(r10, 255) * 255, g: bound01(g10, 255) * 255, b: bound01(b10, 255) * 255 }; } function rgbToHsl(r10, g10, b10) { r10 = bound01(r10, 255); g10 = bound01(g10, 255); b10 = bound01(b10, 255); var max = Math.max(r10, g10, b10); var min = Math.min(r10, g10, b10); var h10 = 0; var s10 = 0; var l10 = (max + min) / 2; if (max === min) { s10 = 0; h10 = 0; } else { var d10 = max - min; s10 = l10 > 0.5 ? d10 / (2 - max - min) : d10 / (max + min); switch (max) { case r10: h10 = (g10 - b10) / d10 + (g10 < b10 ? 6 : 0); break; case g10: h10 = (b10 - r10) / d10 + 2; break; case b10: h10 = (r10 - g10) / d10 + 4; break; } h10 /= 6; } return { h: h10, s: s10, l: l10 }; } function hue2rgb(p10, q10, t10) { if (t10 < 0) { t10 += 1; } if (t10 > 1) { t10 -= 1; } if (t10 < 1 / 6) { return p10 + (q10 - p10) * (6 * t10); } if (t10 < 1 / 2) { return q10; } if (t10 < 2 / 3) { return p10 + (q10 - p10) * (2 / 3 - t10) * 6; } return p10; } function hslToRgb(h10, s10, l10) { var r10; var g10; var b10; h10 = bound01(h10, 360); s10 = bound01(s10, 100); l10 = bound01(l10, 100); if (s10 === 0) { g10 = l10; b10 = l10; r10 = l10; } else { var q10 = l10 < 0.5 ? l10 * (1 + s10) : l10 + s10 - l10 * s10; var p10 = 2 * l10 - q10; r10 = hue2rgb(p10, q10, h10 + 1 / 3); g10 = hue2rgb(p10, q10, h10); b10 = hue2rgb(p10, q10, h10 - 1 / 3); } return { r: r10 * 255, g: g10 * 255, b: b10 * 255 }; } function rgbToHsv(r10, g10, b10) { r10 = bound01(r10, 255); g10 = bound01(g10, 255); b10 = bound01(b10, 255); var max = Math.max(r10, g10, b10); var min = Math.min(r10, g10, b10); var h10 = 0; var v10 = max; var d10 = max - min; var s10 = max === 0 ? 0 : d10 / max; if (max === min) { h10 = 0; } else { switch (max) { case r10: h10 = (g10 - b10) / d10 + (g10 < b10 ? 6 : 0); break; case g10: h10 = (b10 - r10) / d10 + 2; break; case b10: h10 = (r10 - g10) / d10 + 4; break; } h10 /= 6; } return { h: h10, s: s10, v: v10 }; } function hsvToRgb(h10, s10, v10) { h10 = bound01(h10, 360) * 6; s10 = bound01(s10, 100); v10 = bound01(v10, 100); var i10 = Math.floor(h10); var f10 = h10 - i10; var p10 = v10 * (1 - s10); var q10 = v10 * (1 - f10 * s10); var t10 = v10 * (1 - (1 - f10) * s10); var mod = i10 % 6; var r10 = [v10, q10, p10, p10, t10, v10][mod]; var g10 = [t10, v10, v10, q10, p10, p10][mod]; var b10 = [p10, p10, t10, v10, v10, q10][mod]; return { r: r10 * 255, g: g10 * 255, b: b10 * 255 }; } function rgbToHex(r10, g10, b10, allow3Char) { var hex = [ pad2(Math.round(r10).toString(16)), pad2(Math.round(g10).toString(16)), pad2(Math.round(b10).toString(16)) ]; if (allow3Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1))) { return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); } return hex.join(""); } function rgbaToHex(r10, g10, b10, a10, allow4Char) { var hex = [ pad2(Math.round(r10).toString(16)), pad2(Math.round(g10).toString(16)), pad2(Math.round(b10).toString(16)), pad2(convertDecimalToHex(a10)) ]; if (allow4Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1)) && hex[3].startsWith(hex[3].charAt(1))) { return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0); } return hex.join(""); } function convertDecimalToHex(d10) { return Math.round(parseFloat(d10) * 255).toString(16); } function convertHexToDecimal(h10) { return parseIntFromHex(h10) / 255; } function parseIntFromHex(val) { return parseInt(val, 16); } function numberInputToObject(color) { return { r: color >> 16, g: (color & 65280) >> 8, b: color & 255 }; } var names = { 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 inputToRGB(color) { var rgb = { r: 0, g: 0, b: 0 }; var a10 = 1; var s10 = null; var v10 = null; var l10 = null; var ok2 = false; var format = false; if (typeof color === "string") { color = stringInputToObject(color); } if (typeof color === "object") { if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) { rgb = rgbToRgb(color.r, color.g, color.b); ok2 = true; format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) { s10 = convertToPercentage(color.s); v10 = convertToPercentage(color.v); rgb = hsvToRgb(color.h, s10, v10); ok2 = true; format = "hsv"; } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) { s10 = convertToPercentage(color.s); l10 = convertToPercentage(color.l); rgb = hslToRgb(color.h, s10, l10); ok2 = true; format = "hsl"; } if (Object.prototype.hasOwnProperty.call(color, "a")) { a10 = color.a; } } a10 = boundAlpha(a10); return { ok: ok2, format: color.format || format, r: Math.min(255, Math.max(rgb.r, 0)), g: Math.min(255, Math.max(rgb.g, 0)), b: Math.min(255, Math.max(rgb.b, 0)), a: a10 }; } var CSS_INTEGER = "[-\\+]?\\d+%?"; var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?"; var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")"); var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?"); var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?"); var matchers = { CSS_UNIT: new RegExp(CSS_UNIT), rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), hsva: new RegExp("hsva" + PERMISSIVE_MATCH4), 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 stringInputToObject(color) { color = color.trim().toLowerCase(); if (color.length === 0) { return false; } var named = false; if (names[color]) { color = names[color]; named = true; } else if (color === "transparent") { return { r: 0, g: 0, b: 0, a: 0, format: "name" }; } var match = matchers.rgb.exec(color); if (match) { return { r: match[1], g: match[2], b: match[3] }; } match = matchers.rgba.exec(color); if (match) { return { r: match[1], g: match[2], b: match[3], a: match[4] }; } match = matchers.hsl.exec(color); if (match) { return { h: match[1], s: match[2], l: match[3] }; } match = matchers.hsla.exec(color); if (match) { return { h: match[1], s: match[2], l: match[3], a: match[4] }; } match = matchers.hsv.exec(color); if (match) { return { h: match[1], s: match[2], v: match[3] }; } match = matchers.hsva.exec(color); if (match) { return { h: match[1], s: match[2], v: match[3], a: match[4] }; } match = matchers.hex8.exec(color); if (match) { return { r: parseIntFromHex(match[1]), g: parseIntFromHex(match[2]), b: parseIntFromHex(match[3]), a: convertHexToDecimal(match[4]), format: named ? "name" : "hex8" }; } match = matchers.hex6.exec(color); if (match) { return { r: parseIntFromHex(match[1]), g: parseIntFromHex(match[2]), b: parseIntFromHex(match[3]), format: named ? "name" : "hex" }; } match = matchers.hex4.exec(color); if (match) { return { r: parseIntFromHex(match[1] + match[1]), g: parseIntFromHex(match[2] + match[2]), b: parseIntFromHex(match[3] + match[3]), a: convertHexToDecimal(match[4] + match[4]), format: named ? "name" : "hex8" }; } match = matchers.hex3.exec(color); if (match) { return { r: parseIntFromHex(match[1] + match[1]), g: parseIntFromHex(match[2] + match[2]), b: parseIntFromHex(match[3] + match[3]), format: named ? "name" : "hex" }; } return false; } function isValidCSSUnit(color) { return Boolean(matchers.CSS_UNIT.exec(String(color))); } var TinyColor = function() { function TinyColor2(color, opts) { if (color === void 0) { color = ""; } if (opts === void 0) { opts = {}; } var _a2; if (color instanceof TinyColor2) { return color; } if (typeof color === "number") { color = numberInputToObject(color); } this.originalInput = color; var rgb = inputToRGB(color); this.originalInput = color; this.r = rgb.r; this.g = rgb.g; this.b = rgb.b; this.a = rgb.a; this.roundA = Math.round(100 * this.a) / 100; this.format = (_a2 = opts.format) !== null && _a2 !== void 0 ? _a2 : rgb.format; this.gradientType = opts.gradientType; if (this.r < 1) { this.r = Math.round(this.r); } if (this.g < 1) { this.g = Math.round(this.g); } if (this.b < 1) { this.b = Math.round(this.b); } this.isValid = rgb.ok; } TinyColor2.prototype.isDark = function() { return this.getBrightness() < 128; }; TinyColor2.prototype.isLight = function() { return !this.isDark(); }; TinyColor2.prototype.getBrightness = function() { var rgb = this.toRgb(); return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1e3; }; TinyColor2.prototype.getLuminance = function() { var rgb = this.toRgb(); var R10; var G10; var B10; var RsRGB = rgb.r / 255; var GsRGB = rgb.g / 255; var BsRGB = rgb.b / 255; if (RsRGB <= 0.03928) { R10 = RsRGB / 12.92; } else { R10 = Math.pow((RsRGB + 0.055) / 1.055, 2.4); } if (GsRGB <= 0.03928) { G10 = GsRGB / 12.92; } else { G10 = Math.pow((GsRGB + 0.055) / 1.055, 2.4); } if (BsRGB <= 0.03928) { B10 = BsRGB / 12.92; } else { B10 = Math.pow((BsRGB + 0.055) / 1.055, 2.4); } return 0.2126 * R10 + 0.7152 * G10 + 0.0722 * B10; }; TinyColor2.prototype.getAlpha = function() { return this.a; }; TinyColor2.prototype.setAlpha = function(alpha) { this.a = boundAlpha(alpha); this.roundA = Math.round(100 * this.a) / 100; return this; }; TinyColor2.prototype.toHsv = function() { var hsv = rgbToHsv(this.r, this.g, this.b); return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this.a }; }; TinyColor2.prototype.toHsvString = function() { var hsv = rgbToHsv(this.r, this.g, this.b); var h10 = Math.round(hsv.h * 360); var s10 = Math.round(hsv.s * 100); var v10 = Math.round(hsv.v * 100); return this.a === 1 ? "hsv(".concat(h10, ", ").concat(s10, "%, ").concat(v10, "%)") : "hsva(".concat(h10, ", ").concat(s10, "%, ").concat(v10, "%, ").concat(this.roundA, ")"); }; TinyColor2.prototype.toHsl = function() { var hsl = rgbToHsl(this.r, this.g, this.b); return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this.a }; }; TinyColor2.prototype.toHslString = function() { var hsl = rgbToHsl(this.r, this.g, this.b); var h10 = Math.round(hsl.h * 360); var s10 = Math.round(hsl.s * 100); var l10 = Math.round(hsl.l * 100); return this.a === 1 ? "hsl(".concat(h10, ", ").concat(s10, "%, ").concat(l10, "%)") : "hsla(".concat(h10, ", ").concat(s10, "%, ").concat(l10, "%, ").concat(this.roundA, ")"); }; TinyColor2.prototype.toHex = function(allow3Char) { if (allow3Char === void 0) { allow3Char = false; } return rgbToHex(this.r, this.g, this.b, allow3Char); }; TinyColor2.prototype.toHexString = function(allow3Char) { if (allow3Char === void 0) { allow3Char = false; } return "#" + this.toHex(allow3Char); }; TinyColor2.prototype.toHex8 = function(allow4Char) { if (allow4Char === void 0) { allow4Char = false; } return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char); }; TinyColor2.prototype.toHex8String = function(allow4Char) { if (allow4Char === void 0) { allow4Char = false; } return "#" + this.toHex8(allow4Char); }; TinyColor2.prototype.toRgb = function() { return { r: Math.round(this.r), g: Math.round(this.g), b: Math.round(this.b), a: this.a }; }; TinyColor2.prototype.toRgbString = function() { var r10 = Math.round(this.r); var g10 = Math.round(this.g); var b10 = Math.round(this.b); return this.a === 1 ? "rgb(".concat(r10, ", ").concat(g10, ", ").concat(b10, ")") : "rgba(".concat(r10, ", ").concat(g10, ", ").concat(b10, ", ").concat(this.roundA, ")"); }; TinyColor2.prototype.toPercentageRgb = function() { var fmt = function(x10) { return "".concat(Math.round(bound01(x10, 255) * 100), "%"); }; return { r: fmt(this.r), g: fmt(this.g), b: fmt(this.b), a: this.a }; }; TinyColor2.prototype.toPercentageRgbString = function() { var rnd = function(x10) { return Math.round(bound01(x10, 255) * 100); }; return this.a === 1 ? "rgb(".concat(rnd(this.r), "%, ").concat(rnd(this.g), "%, ").concat(rnd(this.b), "%)") : "rgba(".concat(rnd(this.r), "%, ").concat(rnd(this.g), "%, ").concat(rnd(this.b), "%, ").concat(this.roundA, ")"); }; TinyColor2.prototype.toName = function() { if (this.a === 0) { return "transparent"; } if (this.a < 1) { return false; } var hex = "#" + rgbToHex(this.r, this.g, this.b, false); for (var _i2 = 0, _a2 = Object.entries(names); _i2 < _a2.length; _i2++) { var _b2 = _a2[_i2], key2 = _b2[0], value = _b2[1]; if (hex === value) { return key2; } } return false; }; TinyColor2.prototype.toString = function(format) { var formatSet = Boolean(format); format = format !== null && format !== void 0 ? format : this.format; var formattedString = false; var hasAlpha = this.a < 1 && this.a >= 0; var needsAlphaFormat = !formatSet && hasAlpha && (format.startsWith("hex") || format === "name"); if (needsAlphaFormat) { if (format === "name" && this.a === 0) { return this.toName(); } return this.toRgbString(); } if (format === "rgb") { formattedString = this.toRgbString(); } if (format === "prgb") { formattedString = this.toPercentageRgbString(); } if (format === "hex" || format === "hex6") { formattedString = this.toHexString(); } if (format === "hex3") { formattedString = this.toHexString(true); } if (format === "hex4") { formattedString = this.toHex8String(true); } if (format === "hex8") { formattedString = this.toHex8String(); } if (format === "name") { formattedString = this.toName(); } if (format === "hsl") { formattedString = this.toHslString(); } if (format === "hsv") { formattedString = this.toHsvString(); } return formattedString || this.toHexString(); }; TinyColor2.prototype.toNumber = function() { return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b); }; TinyColor2.prototype.clone = function() { return new TinyColor2(this.toString()); }; TinyColor2.prototype.lighten = function(amount) { if (amount === void 0) { amount = 10; } var hsl = this.toHsl(); hsl.l += amount / 100; hsl.l = clamp01(hsl.l); return new TinyColor2(hsl); }; TinyColor2.prototype.brighten = function(amount) { if (amount === void 0) { amount = 10; } var rgb = this.toRgb(); rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100)))); rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100)))); rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100)))); return new TinyColor2(rgb); }; TinyColor2.prototype.darken = function(amount) { if (amount === void 0) { amount = 10; } var hsl = this.toHsl(); hsl.l -= amount / 100; hsl.l = clamp01(hsl.l); return new TinyColor2(hsl); }; TinyColor2.prototype.tint = function(amount) { if (amount === void 0) { amount = 10; } return this.mix("white", amount); }; TinyColor2.prototype.shade = function(amount) { if (amount === void 0) { amount = 10; } return this.mix("black", amount); }; TinyColor2.prototype.desaturate = function(amount) { if (amount === void 0) { amount = 10; } var hsl = this.toHsl(); hsl.s -= amount / 100; hsl.s = clamp01(hsl.s); return new TinyColor2(hsl); }; TinyColor2.prototype.saturate = function(amount) { if (amount === void 0) { amount = 10; } var hsl = this.toHsl(); hsl.s += amount / 100; hsl.s = clamp01(hsl.s); return new TinyColor2(hsl); }; TinyColor2.prototype.greyscale = function() { return this.desaturate(100); }; TinyColor2.prototype.spin = function(amount) { var hsl = this.toHsl(); var hue2 = (hsl.h + amount) % 360; hsl.h = hue2 < 0 ? 360 + hue2 : hue2; return new TinyColor2(hsl); }; TinyColor2.prototype.mix = function(color, amount) { if (amount === void 0) { amount = 50; } var rgb1 = this.toRgb(); var rgb2 = new TinyColor2(color).toRgb(); var p10 = amount / 100; var rgba = { r: (rgb2.r - rgb1.r) * p10 + rgb1.r, g: (rgb2.g - rgb1.g) * p10 + rgb1.g, b: (rgb2.b - rgb1.b) * p10 + rgb1.b, a: (rgb2.a - rgb1.a) * p10 + rgb1.a }; return new TinyColor2(rgba); }; TinyColor2.prototype.analogous = function(results, slices) { if (results === void 0) { results = 6; } if (slices === void 0) { slices = 30; } var hsl = this.toHsl(); var part = 360 / slices; var ret = [this]; for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results; ) { hsl.h = (hsl.h + part) % 360; ret.push(new TinyColor2(hsl)); } return ret; }; TinyColor2.prototype.complement = function() { var hsl = this.toHsl(); hsl.h = (hsl.h + 180) % 360; return new TinyColor2(hsl); }; TinyColor2.prototype.monochromatic = function(results) { if (results === void 0) { results = 6; } var hsv = this.toHsv(); var h10 = hsv.h; var s10 = hsv.s; var v10 = hsv.v; var res = []; var modification = 1 / results; while (results--) { res.push(new TinyColor2({ h: h10, s: s10, v: v10 })); v10 = (v10 + modification) % 1; } return res; }; TinyColor2.prototype.splitcomplement = function() { var hsl = this.toHsl(); var h10 = hsl.h; return [ this, new TinyColor2({ h: (h10 + 72) % 360, s: hsl.s, l: hsl.l }), new TinyColor2({ h: (h10 + 216) % 360, s: hsl.s, l: hsl.l }) ]; }; TinyColor2.prototype.onBackground = function(background) { var fg2 = this.toRgb(); var bg2 = new TinyColor2(background).toRgb(); return new TinyColor2({ r: bg2.r + (fg2.r - bg2.r) * fg2.a, g: bg2.g + (fg2.g - bg2.g) * fg2.a, b: bg2.b + (fg2.b - bg2.b) * fg2.a }); }; TinyColor2.prototype.triad = function() { return this.polyad(3); }; TinyColor2.prototype.tetrad = function() { return this.polyad(4); }; TinyColor2.prototype.polyad = function(n10) { var hsl = this.toHsl(); var h10 = hsl.h; var result = [this]; var increment = 360 / n10; for (var i10 = 1; i10 < n10; i10++) { result.push(new TinyColor2({ h: (h10 + i10 * increment) % 360, s: hsl.s, l: hsl.l })); } return result; }; TinyColor2.prototype.equals = function(color) { return this.toRgbString() === new TinyColor2(color).toRgbString(); }; return TinyColor2; }(); var hueStep = 2; var saturationStep = 0.16; var saturationStep2 = 0.05; var brightnessStep1 = 0.05; var brightnessStep2 = 0.15; var lightColorCount = 5; var darkColorCount = 4; var darkColorMap = [{ 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 toHsv(_ref) { var r10 = _ref.r, g10 = _ref.g, b10 = _ref.b; var hsv = rgbToHsv(r10, g10, b10); return { h: hsv.h * 360, s: hsv.s, v: hsv.v }; } function toHex(_ref2) { var r10 = _ref2.r, g10 = _ref2.g, b10 = _ref2.b; return "#".concat(rgbToHex(r10, g10, b10, false)); } function mix(rgb1, rgb2, amount) { var p10 = amount / 100; var rgb = { r: (rgb2.r - rgb1.r) * p10 + rgb1.r, g: (rgb2.g - rgb1.g) * p10 + rgb1.g, b: (rgb2.b - rgb1.b) * p10 + rgb1.b }; return rgb; } function getHue(hsv, i10, light) { var hue2; if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) { hue2 = light ? Math.round(hsv.h) - hueStep * i10 : Math.round(hsv.h) + hueStep * i10; } else { hue2 = light ? Math.round(hsv.h) + hueStep * i10 : Math.round(hsv.h) - hueStep * i10; } if (hue2 < 0) { hue2 += 360; } else if (hue2 >= 360) { hue2 -= 360; } return hue2; } function getSaturation(hsv, i10, light) { if (hsv.h === 0 && hsv.s === 0) { return hsv.s; } var saturation; if (light) { saturation = hsv.s - saturationStep * i10; } else if (i10 === darkColorCount) { saturation = hsv.s + saturationStep; } else { saturation = hsv.s + saturationStep2 * i10; } if (saturation > 1) { saturation = 1; } if (light && i10 === lightColorCount && saturation > 0.1) { saturation = 0.1; } if (saturation < 0.06) { saturation = 0.06; } return Number(saturation.toFixed(2)); } function getValue(hsv, i10, light) { var value; if (light) { value = hsv.v + brightnessStep1 * i10; } else { value = hsv.v - brightnessStep2 * i10; } if (value > 1) { value = 1; } return Number(value.toFixed(2)); } function generate$1(color) { var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; var patterns = []; var pColor = inputToRGB(color); for (var i10 = lightColorCount; i10 > 0; i10 -= 1) { var hsv = toHsv(pColor); var colorString = toHex(inputToRGB({ h: getHue(hsv, i10, true), s: getSaturation(hsv, i10, true), v: getValue(hsv, i10, true) })); patterns.push(colorString); } patterns.push(toHex(pColor)); for (var _i2 = 1; _i2 <= darkColorCount; _i2 += 1) { var _hsv = toHsv(pColor); var _colorString = toHex(inputToRGB({ h: getHue(_hsv, _i2), s: getSaturation(_hsv, _i2), v: getValue(_hsv, _i2) })); patterns.push(_colorString); } if (opts.theme === "dark") { return darkColorMap.map(function(_ref3) { var index = _ref3.index, opacity = _ref3.opacity; var darkColorString = toHex(mix(inputToRGB(opts.backgroundColor || "#141414"), inputToRGB(patterns[index]), opacity * 100)); return darkColorString; }); } return patterns; } var presetPrimaryColors = { 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" }; var presetPalettes = {}; var presetDarkPalettes = {}; Object.keys(presetPrimaryColors).forEach(function(key2) { presetPalettes[key2] = generate$1(presetPrimaryColors[key2]); presetPalettes[key2].primary = presetPalettes[key2][5]; presetDarkPalettes[key2] = generate$1(presetPrimaryColors[key2], { theme: "dark", backgroundColor: "#141414" }); presetDarkPalettes[key2].primary = presetDarkPalettes[key2][5]; }); var containers = []; var styleElements = []; var usage = "insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options])."; function createStyleElement() { var styleElement = document.createElement("style"); styleElement.setAttribute("type", "text/css"); return styleElement; } function insertCss(css, options) { options = options || {}; if (css === void 0) { throw new Error(usage); } var position = options.prepend === true ? "prepend" : "append"; var container = options.container !== void 0 ? options.container : document.querySelector("head"); var containerId = containers.indexOf(container); if (containerId === -1) { containerId = containers.push(container) - 1; styleElements[containerId] = {}; } var styleElement; if (styleElements[containerId] !== void 0 && styleElements[containerId][position] !== void 0) { styleElement = styleElements[containerId][position]; } else { styleElement = styleElements[containerId][position] = createStyleElement(); if (position === "prepend") { container.insertBefore(styleElement, container.childNodes[0]); } else { container.appendChild(styleElement); } } if (css.charCodeAt(0) === 65279) { css = css.substr(1, css.length); } if (styleElement.styleSheet) { styleElement.styleSheet.cssText += css; } else { styleElement.textContent += css; } return styleElement; } function _objectSpread$i(target) { for (var i10 = 1; i10 < arguments.length; i10++) { var source2 = arguments[i10] != null ? Object(arguments[i10]) : {}; var ownKeys2 = Object.keys(source2); if (typeof Object.getOwnPropertySymbols === "function") { ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source2).filter(function(sym) { return Object.getOwnPropertyDescriptor(source2, sym).enumerable; })); } ownKeys2.forEach(function(key2) { _defineProperty$j(target, key2, source2[key2]); }); } return target; } function _defineProperty$j(obj2, key2, value) { if (key2 in obj2) { Object.defineProperty(obj2, key2, { value, enumerable: true, configurable: true, writable: true }); } else { obj2[key2] = value; } return obj2; } function warning$2(valid, message2) { } function isIconDefinition(target) { return typeof target === "object" && typeof target.name === "string" && typeof target.theme === "string" && (typeof target.icon === "object" || typeof target.icon === "function"); } function generate(node, key2, rootProps) { if (!rootProps) { return h$2(node.tag, _objectSpread$i({ key: key2 }, node.attrs), (node.children || []).map(function(child, index) { return generate(child, "".concat(key2, "-").concat(node.tag, "-").concat(index)); })); } return h$2(node.tag, _objectSpread$i({ key: key2 }, rootProps, node.attrs), (node.children || []).map(function(child, index) { return generate(child, "".concat(key2, "-").concat(node.tag, "-").concat(index)); })); } function getSecondaryColor(primaryColor) { return generate$1(primaryColor)[0]; } function normalizeTwoToneColors(twoToneColor) { if (!twoToneColor) { return []; } return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor]; } var iconStyles = "\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n"; var cssInjectedFlag = false; var useInsertStyles = function useInsertStyles2() { var styleStr = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : iconStyles; nextTick(function() { if (!cssInjectedFlag) { if (typeof window !== "undefined" && window.document && window.document.documentElement) { insertCss(styleStr, { prepend: true }); } cssInjectedFlag = true; } }); }; var _excluded$1 = ["icon", "primaryColor", "secondaryColor"]; function _objectWithoutProperties$1(source2, excluded) { if (source2 == null) return {}; var target = _objectWithoutPropertiesLoose$1(source2, excluded); var key2, i10; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source2); for (i10 = 0; i10 < sourceSymbolKeys.length; i10++) { key2 = sourceSymbolKeys[i10]; if (excluded.indexOf(key2) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source2, key2)) continue; target[key2] = source2[key2]; } } return target; } function _objectWithoutPropertiesLoose$1(source2, excluded) { if (source2 == null) return {}; var target = {}; var sourceKeys = Object.keys(source2); var key2, i10; for (i10 = 0; i10 < sourceKeys.length; i10++) { key2 = sourceKeys[i10]; if (excluded.indexOf(key2) >= 0) continue; target[key2] = source2[key2]; } return target; } function _objectSpread$h(target) { for (var i10 = 1; i10 < arguments.length; i10++) { var source2 = arguments[i10] != null ? Object(arguments[i10]) : {}; var ownKeys2 = Object.keys(source2); if (typeof Object.getOwnPropertySymbols === "function") { ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source2).filter(function(sym) { return Object.getOwnPropertyDescriptor(source2, sym).enumerable; })); } ownKeys2.forEach(function(key2) { _defineProperty$i(target, key2, source2[key2]); }); } return target; } function _defineProperty$i(obj2, key2, value) { if (key2 in obj2) { Object.defineProperty(obj2, key2, { value, enumerable: true, configurable: true, writable: true }); } else { obj2[key2] = value; } return obj2; } var twoToneColorPalette = { primaryColor: "#333", secondaryColor: "#E6E6E6", calculated: false }; function setTwoToneColors(_ref) { var primaryColor = _ref.primaryColor, secondaryColor = _ref.secondaryColor; twoToneColorPalette.primaryColor = primaryColor; twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor); twoToneColorPalette.calculated = !!secondaryColor; } function getTwoToneColors() { return _objectSpread$h({}, twoToneColorPalette); } var IconBase = function IconBase2(props2, context) { var _props$context$attrs = _objectSpread$h({}, props2, context.attrs), icon = _props$context$attrs.icon, primaryColor = _props$context$attrs.primaryColor, secondaryColor = _props$context$attrs.secondaryColor, restProps = _objectWithoutProperties$1(_props$context$attrs, _excluded$1); var colors = twoToneColorPalette; if (primaryColor) { colors = { primaryColor, secondaryColor: secondaryColor || getSecondaryColor(primaryColor) }; } useInsertStyles(); warning$2(isIconDefinition(icon)); if (!isIconDefinition(icon)) { return null; } var target = icon; if (target && typeof target.icon === "function") { target = _objectSpread$h({}, target, { icon: target.icon(colors.primaryColor, colors.secondaryColor) }); } return generate(target.icon, "svg-".concat(target.name), _objectSpread$h({}, restProps, { "data-icon": target.name, width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true" })); }; IconBase.props = { icon: Object, primaryColor: String, secondaryColor: String, focusable: String }; IconBase.inheritAttrs = false; IconBase.displayName = "IconBase"; IconBase.getTwoToneColors = getTwoToneColors; IconBase.setTwoToneColors = setTwoToneColors; var VueIcon = IconBase; function _slicedToArray$2(arr, i10) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i10) || _unsupportedIterableToArray$2(arr, i10) || _nonIterableRest$2(); } function _nonIterableRest$2() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray$2(o10, minLen) { if (!o10) return; if (typeof o10 === "string") return _arrayLikeToArray$2(o10, minLen); var n10 = Object.prototype.toString.call(o10).slice(8, -1); if (n10 === "Object" && o10.constructor) n10 = o10.constructor.name; if (n10 === "Map" || n10 === "Set") return Array.from(o10); if (n10 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n10)) return _arrayLikeToArray$2(o10, minLen); } function _arrayLikeToArray$2(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i10 = 0, arr2 = new Array(len); i10 < len; i10++) { arr2[i10] = arr[i10]; } return arr2; } function _iterableToArrayLimit$2(arr, i10) { var _i2 = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i2 == null) return; var _arr = []; var _n2 = true; var _d2 = false; var _s2, _e2; try { for (_i2 = _i2.call(arr); !(_n2 = (_s2 = _i2.next()).done); _n2 = true) { _arr.push(_s2.value); if (i10 && _arr.length === i10) break; } } catch (err) { _d2 = true; _e2 = err; } finally { try { if (!_n2 && _i2["return"] != null) _i2["return"](); } finally { if (_d2) throw _e2; } } return _arr; } function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; } function setTwoToneColor(twoToneColor) { var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor), _normalizeTwoToneColo2 = _slicedToArray$2(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1]; return VueIcon.setTwoToneColors({ primaryColor, secondaryColor }); } function getTwoToneColor() { var colors = VueIcon.getTwoToneColors(); if (!colors.calculated) { return colors.primaryColor; } return [colors.primaryColor, colors.secondaryColor]; } var _excluded = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"]; function _slicedToArray$1(arr, i10) { return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i10) || _unsupportedIterableToArray$1(arr, i10) || _nonIterableRest$1(); } function _nonIterableRest$1() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray$1(o10, minLen) { if (!o10) return; if (typeof o10 === "string") return _arrayLikeToArray$1(o10, minLen); var n10 = Object.prototype.toString.call(o10).slice(8, -1); if (n10 === "Object" && o10.constructor) n10 = o10.constructor.name; if (n10 === "Map" || n10 === "Set") return Array.from(o10); if (n10 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n10)) return _arrayLikeToArray$1(o10, minLen); } function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i10 = 0, arr2 = new Array(len); i10 < len; i10++) { arr2[i10] = arr[i10]; } return arr2; } function _iterableToArrayLimit$1(arr, i10) { var _i2 = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i2 == null) return; var _arr = []; var _n2 = true; var _d2 = false; var _s2, _e2; try { for (_i2 = _i2.call(arr); !(_n2 = (_s2 = _i2.next()).done); _n2 = true) { _arr.push(_s2.value); if (i10 && _arr.length === i10) break; } } catch (err) { _d2 = true; _e2 = err; } finally { try { if (!_n2 && _i2["return"] != null) _i2["return"](); } finally { if (_d2) throw _e2; } } return _arr; } function _arrayWithHoles$1(arr) { if (Array.isArray(arr)) return arr; } function _objectSpread$g(target) { for (var i10 = 1; i10 < arguments.length; i10++) { var source2 = arguments[i10] != null ? Object(arguments[i10]) : {}; var ownKeys2 = Object.keys(source2); if (typeof Object.getOwnPropertySymbols === "function") { ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source2).filter(function(sym) { return Object.getOwnPropertyDescriptor(source2, sym).enumerable; })); } ownKeys2.forEach(function(key2) { _defineProperty$h(target, key2, source2[key2]); }); } return target; } function _defineProperty$h(obj2, key2, value) { if (key2 in obj2) { Object.defineProperty(obj2, key2, { value, enumerable: true, configurable: true, writable: true }); } else { obj2[key2] = value; } return obj2; } function _objectWithoutProperties(source2, excluded) { if (source2 == null) return {}; var target = _objectWithoutPropertiesLoose(source2, excluded); var key2, i10; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source2); for (i10 = 0; i10 < sourceSymbolKeys.length; i10++) { key2 = sourceSymbolKeys[i10]; if (excluded.indexOf(key2) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source2, key2)) continue; target[key2] = source2[key2]; } } return target; } function _objectWithoutPropertiesLoose(source2, excluded) { if (source2 == null) return {}; var target = {}; var sourceKeys = Object.keys(source2); var key2, i10; for (i10 = 0; i10 < sourceKeys.length; i10++) { key2 = sourceKeys[i10]; if (excluded.indexOf(key2) >= 0) continue; target[key2] = source2[key2]; } return target; } setTwoToneColor("#1890ff"); var Icon = function Icon2(props2, context) { var _classObj; var _props$context$attrs = _objectSpread$g({}, props2, context.attrs), cls = _props$context$attrs["class"], icon = _props$context$attrs.icon, spin = _props$context$attrs.spin, rotate = _props$context$attrs.rotate, tabindex = _props$context$attrs.tabindex, twoToneColor = _props$context$attrs.twoToneColor, onClick = _props$context$attrs.onClick, restProps = _objectWithoutProperties(_props$context$attrs, _excluded); var classObj = (_classObj = { anticon: true }, _defineProperty$h(_classObj, "anticon-".concat(icon.name), Boolean(icon.name)), _defineProperty$h(_classObj, cls, cls), _classObj); var svgClassString = spin === "" || !!spin || icon.name === "loading" ? "anticon-spin" : ""; var iconTabIndex = tabindex; if (iconTabIndex === void 0 && onClick) { iconTabIndex = -1; restProps.tabindex = iconTabIndex; } var svgStyle = rotate ? { msTransform: "rotate(".concat(rotate, "deg)"), transform: "rotate(".concat(rotate, "deg)") } : void 0; var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor), _normalizeTwoToneColo2 = _slicedToArray$1(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1]; return createVNode("span", _objectSpread$g({ "role": "img", "aria-label": icon.name }, restProps, { "onClick": onClick, "class": classObj }), [createVNode(VueIcon, { "class": svgClassString, "icon": icon, "primaryColor": primaryColor, "secondaryColor": secondaryColor, "style": svgStyle }, null)]); }; Icon.props = { spin: Boolean, rotate: Number, icon: Object, twoToneColor: String }; Icon.displayName = "AntdIcon"; Icon.inheritAttrs = false; Icon.getTwoToneColor = getTwoToneColor; Icon.setTwoToneColor = setTwoToneColor; var AntdIcon = Icon; var AppstoreAddOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" } }] }, "name": "appstore-add", "theme": "outlined" }; var AppstoreAddOutlinedSvg = AppstoreAddOutlined$2; function _objectSpread$f(target) { for (var i10 = 1;