bitboss-ui 0.2.64 → 0.2.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index101.js +3 -3
- package/dist/index103.js +2 -2
- package/dist/index109.js +1 -1
- package/dist/index11.js +2 -2
- package/dist/index111.js +4 -4
- package/dist/index113.js +1 -1
- package/dist/index116.js +12 -12
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +1 -1
- package/dist/index118.js +1 -1
- package/dist/index119.js +1 -1
- package/dist/index121.js +1 -1
- package/dist/index125.js +1 -1
- package/dist/index126.js +1 -1
- package/dist/index127.js +1 -1
- package/dist/index131.js +2 -2
- package/dist/index15.js +8 -8
- package/dist/index17.js +9 -9
- package/dist/index19.js +3 -3
- package/dist/index196.js +235 -2
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +10 -2
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +2 -4
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +4 -368
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +5 -134
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +16 -5
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +15 -18
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +19 -2
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +20 -2
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +27 -172
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +8 -23
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +2 -373
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +2 -3
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +3 -35
- package/dist/index209.js.map +1 -1
- package/dist/index21.js +2 -2
- package/dist/index210.js +3 -6
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +121 -3
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +2 -3
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +6 -16
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +366 -14
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +371 -18
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +2 -29
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +2 -8
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +133 -234
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +172 -8
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +23 -121
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +3 -2
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +35 -2
- package/dist/index222.js.map +1 -1
- package/dist/index224.js +79 -6
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +6 -17
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +17 -4
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +2 -6
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +160 -2
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +1 -297
- package/dist/index229.js.map +1 -1
- package/dist/index23.js +1 -1
- package/dist/index230.js +69 -2
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +5 -2
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +2 -117
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +4 -106
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +291 -431
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +5 -88
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +2 -224
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +2 -258
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +2 -79
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +2 -5
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +2 -200
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +2 -160
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +226 -1
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +257 -68
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +15 -2
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +106 -2
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +2 -2
- package/dist/index247.js +117 -2
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +435 -2
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +89 -2
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +2 -2
- package/dist/index250.js +200 -15
- package/dist/index250.js.map +1 -1
- package/dist/index254.js +2 -3
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +3 -2
- package/dist/index255.js.map +1 -1
- package/dist/index29.js +3 -3
- package/dist/index31.js +9 -9
- package/dist/index31.js.map +1 -1
- package/dist/index33.js +2 -2
- package/dist/index35.js +2 -2
- package/dist/index47.js +1 -1
- package/dist/index49.js +1 -1
- package/dist/index65.js +4 -4
- package/dist/index69.js +2 -2
- package/dist/index72.js +1 -1
- package/dist/index75.js +1 -1
- package/dist/index77.js +1 -1
- package/dist/index79.js +4 -4
- package/dist/index81.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index224.js
CHANGED
|
@@ -1,9 +1,82 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { getDefaultExportFromCjs as F, commonjsGlobal as g } from "./index235.js";
|
|
2
|
+
var M = "Expected a function", S = NaN, N = "[object Symbol]", W = /^\s+|\s+$/g, A = /^[-+]0x[0-9a-f]+$/i, B = /^0b[01]+$/i, R = /^0o[0-7]+$/i, _ = parseInt, D = typeof g == "object" && g && g.Object === Object && g, G = typeof self == "object" && self && self.Object === Object && self, P = D || G || Function("return this")(), H = Object.prototype, U = H.toString, X = Math.max, q = Math.min, T = function() {
|
|
3
|
+
return P.Date.now();
|
|
4
|
+
};
|
|
5
|
+
function z(e, t, i) {
|
|
6
|
+
var a, u, l, c, r, f, s = 0, x = !1, d = !1, y = !0;
|
|
7
|
+
if (typeof e != "function")
|
|
8
|
+
throw new TypeError(M);
|
|
9
|
+
t = E(t) || 0, v(i) && (x = !!i.leading, d = "maxWait" in i, l = d ? X(E(i.maxWait) || 0, t) : l, y = "trailing" in i ? !!i.trailing : y);
|
|
10
|
+
function p(n) {
|
|
11
|
+
var o = a, m = u;
|
|
12
|
+
return a = u = void 0, s = n, c = e.apply(m, o), c;
|
|
13
|
+
}
|
|
14
|
+
function k(n) {
|
|
15
|
+
return s = n, r = setTimeout(b, t), x ? p(n) : c;
|
|
16
|
+
}
|
|
17
|
+
function C(n) {
|
|
18
|
+
var o = n - f, m = n - s, h = t - o;
|
|
19
|
+
return d ? q(h, l - m) : h;
|
|
20
|
+
}
|
|
21
|
+
function I(n) {
|
|
22
|
+
var o = n - f, m = n - s;
|
|
23
|
+
return f === void 0 || o >= t || o < 0 || d && m >= l;
|
|
24
|
+
}
|
|
25
|
+
function b() {
|
|
26
|
+
var n = T();
|
|
27
|
+
if (I(n))
|
|
28
|
+
return O(n);
|
|
29
|
+
r = setTimeout(b, C(n));
|
|
30
|
+
}
|
|
31
|
+
function O(n) {
|
|
32
|
+
return r = void 0, y && a ? p(n) : (a = u = void 0, c);
|
|
33
|
+
}
|
|
34
|
+
function L() {
|
|
35
|
+
r !== void 0 && clearTimeout(r), s = 0, a = f = u = r = void 0;
|
|
36
|
+
}
|
|
37
|
+
function $() {
|
|
38
|
+
return r === void 0 ? c : O(T());
|
|
39
|
+
}
|
|
40
|
+
function j() {
|
|
41
|
+
var n = T(), o = I(n);
|
|
42
|
+
if (a = arguments, u = this, f = n, o) {
|
|
43
|
+
if (r === void 0)
|
|
44
|
+
return k(f);
|
|
45
|
+
if (d)
|
|
46
|
+
return r = setTimeout(b, t), p(f);
|
|
47
|
+
}
|
|
48
|
+
return r === void 0 && (r = setTimeout(b, t)), c;
|
|
49
|
+
}
|
|
50
|
+
return j.cancel = L, j.flush = $, j;
|
|
51
|
+
}
|
|
52
|
+
function v(e) {
|
|
53
|
+
var t = typeof e;
|
|
54
|
+
return !!e && (t == "object" || t == "function");
|
|
55
|
+
}
|
|
56
|
+
function J(e) {
|
|
57
|
+
return !!e && typeof e == "object";
|
|
58
|
+
}
|
|
59
|
+
function K(e) {
|
|
60
|
+
return typeof e == "symbol" || J(e) && U.call(e) == N;
|
|
61
|
+
}
|
|
62
|
+
function E(e) {
|
|
63
|
+
if (typeof e == "number")
|
|
64
|
+
return e;
|
|
65
|
+
if (K(e))
|
|
66
|
+
return S;
|
|
67
|
+
if (v(e)) {
|
|
68
|
+
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
69
|
+
e = v(t) ? t + "" : t;
|
|
70
|
+
}
|
|
71
|
+
if (typeof e != "string")
|
|
72
|
+
return e === 0 ? e : +e;
|
|
73
|
+
e = e.replace(W, "");
|
|
74
|
+
var i = B.test(e);
|
|
75
|
+
return i || R.test(e) ? _(e.slice(2), i ? 2 : 8) : A.test(e) ? S : +e;
|
|
76
|
+
}
|
|
77
|
+
var Q = z;
|
|
78
|
+
const Y = /* @__PURE__ */ F(Q);
|
|
5
79
|
export {
|
|
6
|
-
|
|
7
|
-
f as default
|
|
80
|
+
Y as default
|
|
8
81
|
};
|
|
9
82
|
//# sourceMappingURL=index224.js.map
|
package/dist/index224.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index224.js","sources":["../node_modules/mime/dist/src/index.js"],"sourcesContent":["import otherTypes from '../types/other.js';\nimport standardTypes from '../types/standard.js';\nimport Mime from './Mime.js';\nexport { default as Mime } from './Mime.js';\nexport default new Mime(standardTypes, otherTypes)._freeze();\n//# sourceMappingURL=index.js.map"],"names":["index","Mime","standardTypes","otherTypes"],"mappings":";;;AAIA,MAAeA,IAAA,IAAIC,EAAKC,GAAeC,CAAU,EAAE,QAAS;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index224.js","sources":["../node_modules/lodash.debounce/index.js"],"sourcesContent":["/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = debounce;\n"],"names":["FUNC_ERROR_TEXT","NAN","symbolTag","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","freeGlobal","global","freeSelf","root","objectProto","objectToString","nativeMax","nativeMin","now","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","toNumber","isObject","invokeFunc","time","args","thisArg","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","value","type","isObjectLike","isSymbol","other","isBinary","lodash_debounce"],"mappings":";AAUA,IAAIA,IAAkB,uBAGlBC,IAAM,KAGNC,IAAY,mBAGZC,IAAS,cAGTC,IAAa,sBAGbC,IAAa,cAGbC,IAAY,eAGZC,IAAe,UAGfC,IAAa,OAAOC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S,YACpBE,EAAaF,CAAK,KAAKnC,EAAe,KAAKmC,CAAK,KAAK9C;AAC1D;AAyBA,SAAS6B,EAASiB,GAAO;AACvB,MAAI,OAAOA,KAAS;AAClB,WAAOA;AAET,MAAIG,EAASH,CAAK;AAChB,WAAO/C;AAET,MAAI+B,EAASgB,CAAK,GAAG;AACnB,QAAII,IAAQ,OAAOJ,EAAM,WAAW,aAAaA,EAAM,QAAS,IAAGA;AACnE,IAAAA,IAAQhB,EAASoB,CAAK,IAAKA,IAAQ,KAAMA;AAAA,EAC1C;AACD,MAAI,OAAOJ,KAAS;AAClB,WAAOA,MAAU,IAAIA,IAAQ,CAACA;AAEhC,EAAAA,IAAQA,EAAM,QAAQ7C,GAAQ,EAAE;AAChC,MAAIkD,IAAWhD,EAAW,KAAK2C,CAAK;AACpC,SAAQK,KAAY/C,EAAU,KAAK0C,CAAK,IACpCzC,EAAayC,EAAM,MAAM,CAAC,GAAGK,IAAW,IAAI,CAAC,IAC5CjD,EAAW,KAAK4C,CAAK,IAAI/C,IAAM,CAAC+C;AACvC;AAEA,IAAAM,IAAiBrC;;","x_google_ignoreList":[0]}
|
package/dist/index225.js
CHANGED
|
@@ -1,20 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return n;
|
|
6
|
-
if (r in n) {
|
|
7
|
-
const i = e(
|
|
8
|
-
[].concat(n[r]),
|
|
9
|
-
r,
|
|
10
|
-
f
|
|
11
|
-
);
|
|
12
|
-
if (i)
|
|
13
|
-
return i;
|
|
14
|
-
}
|
|
15
|
-
return t;
|
|
16
|
-
}, null);
|
|
1
|
+
import e from "./index251.js";
|
|
2
|
+
import r from "./index252.js";
|
|
3
|
+
import o from "./index253.js";
|
|
4
|
+
const f = new o(r, e)._freeze();
|
|
17
5
|
export {
|
|
18
|
-
|
|
6
|
+
o as Mime,
|
|
7
|
+
f as default
|
|
19
8
|
};
|
|
20
9
|
//# sourceMappingURL=index225.js.map
|
package/dist/index225.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index225.js","sources":["../
|
|
1
|
+
{"version":3,"file":"index225.js","sources":["../node_modules/mime/dist/src/index.js"],"sourcesContent":["import otherTypes from '../types/other.js';\nimport standardTypes from '../types/standard.js';\nimport Mime from './Mime.js';\nexport { default as Mime } from './Mime.js';\nexport default new Mime(standardTypes, otherTypes)._freeze();\n//# sourceMappingURL=index.js.map"],"names":["index","Mime","standardTypes","otherTypes"],"mappings":";;;AAIA,MAAeA,IAAA,IAAIC,EAAKC,GAAeC,CAAU,EAAE,QAAS;","x_google_ignoreList":[0]}
|
package/dist/index226.js
CHANGED
|
@@ -1,7 +1,20 @@
|
|
|
1
|
-
const e =
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const e = (o, r, f) => o.reduce((t, n) => {
|
|
2
|
+
if (t)
|
|
3
|
+
return t;
|
|
4
|
+
if (f(n))
|
|
5
|
+
return n;
|
|
6
|
+
if (r in n) {
|
|
7
|
+
const i = e(
|
|
8
|
+
[].concat(n[r]),
|
|
9
|
+
r,
|
|
10
|
+
f
|
|
11
|
+
);
|
|
12
|
+
if (i)
|
|
13
|
+
return i;
|
|
14
|
+
}
|
|
15
|
+
return t;
|
|
16
|
+
}, null);
|
|
4
17
|
export {
|
|
5
|
-
e as
|
|
18
|
+
e as findInTree
|
|
6
19
|
};
|
|
7
20
|
//# sourceMappingURL=index226.js.map
|
package/dist/index226.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index226.js","sources":["../src/utilities/functions/
|
|
1
|
+
{"version":3,"file":"index226.js","sources":["../src/utilities/functions/findInTree.ts"],"sourcesContent":["/**\n * Find the eleemnt for which iteratee rfeturns true in a tree like structure\n */\nexport const findInTree = <T extends Record<string, any>>(\n\titems: T[],\n\tkeyName: keyof T,\n\titeratee: (item: T) => boolean\n): null | T => {\n\treturn items.reduce((acc: null | T, curr) => {\n\t\tif (acc) return acc;\n\t\tif (iteratee(curr)) {\n\t\t\treturn curr;\n\t\t}\n\n\t\tif (keyName in curr) {\n\t\t\tconst fromChildren = findInTree(\n\t\t\t\t[].concat(curr[keyName]),\n\t\t\t\tkeyName,\n\t\t\t\titeratee\n\t\t\t);\n\t\t\tif (fromChildren) {\n\t\t\t\treturn fromChildren;\n\t\t\t}\n\t\t}\n\t\treturn acc;\n\t}, null);\n};\n"],"names":["findInTree","items","keyName","iteratee","acc","curr","fromChildren"],"mappings":"AAGO,MAAMA,IAAa,CACzBC,GACAC,GACAC,MAEOF,EAAM,OAAO,CAACG,GAAeC,MAAS;AACxC,MAAAD;AAAY,WAAAA;AACZ,MAAAD,EAASE,CAAI;AACT,WAAAA;AAGR,MAAIH,KAAWG,GAAM;AACpB,UAAMC,IAAeN;AAAA,MACpB,CAAA,EAAG,OAAOK,EAAKH,CAAO,CAAC;AAAA,MACvBA;AAAA,MACAC;AAAA,IAAA;AAED,QAAIG;AACI,aAAAA;AAAA,EAET;AACO,SAAAF;GACL,IAAI;"}
|
package/dist/index227.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
function l(e) {
|
|
3
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
-
}
|
|
1
|
+
const t = (d, o) => +d + +o;
|
|
5
2
|
export {
|
|
6
|
-
|
|
7
|
-
l as getDefaultExportFromCjs
|
|
3
|
+
t as add
|
|
8
4
|
};
|
|
9
5
|
//# sourceMappingURL=index227.js.map
|
package/dist/index227.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index227.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index227.js","sources":["../src/utilities/functions/add.ts"],"sourcesContent":["export const add = (a: number | string, b: number | string) => +a + +b;\n"],"names":["add","a","b"],"mappings":"AAAO,MAAMA,IAAM,CAACC,GAAoBC,MAAuB,CAACD,IAAI,CAACC;"}
|
package/dist/index228.js
CHANGED
|
@@ -1,5 +1,163 @@
|
|
|
1
|
-
|
|
1
|
+
import { defineComponent as K, ref as s, computed as y, openBlock as p, createElementBlock as m, normalizeClass as g, renderSlot as v, createElementVNode as k, Fragment as E, renderList as C, toDisplayString as B, createBlock as S, withDirectives as z, mergeProps as H, vModelDynamic as J } from "vue";
|
|
2
|
+
import { clamp as P } from "./index208.js";
|
|
3
|
+
import { drop as q } from "./index256.js";
|
|
4
|
+
import { isNil as R } from "./index120.js";
|
|
5
|
+
import { isNotNil as w } from "./index124.js";
|
|
6
|
+
import { wait as L } from "./index122.js";
|
|
7
|
+
import U from "./index115.js";
|
|
8
|
+
import "./index158.js";
|
|
9
|
+
const j = { class: "bb-base-tag__input-container" }, G = ["id", "autocomplete", "autofocus", "disabled", "placeholder", "readonly"], te = /* @__PURE__ */ K({
|
|
10
|
+
__name: "BaseTag",
|
|
11
|
+
props: {
|
|
12
|
+
autocomplete: {},
|
|
13
|
+
autofocus: {},
|
|
14
|
+
comma: { type: Boolean },
|
|
15
|
+
disabled: { type: Boolean },
|
|
16
|
+
divider: { default: "Enter" },
|
|
17
|
+
hasErrors: { type: Boolean },
|
|
18
|
+
id: {},
|
|
19
|
+
modelValue: {},
|
|
20
|
+
multiple: { type: Boolean, default: !0 },
|
|
21
|
+
name: {},
|
|
22
|
+
placeholder: {},
|
|
23
|
+
readonly: {}
|
|
24
|
+
},
|
|
25
|
+
emits: ["blur", "change", "click", "duplicate", "focus", "inactive", "input", "keydown", "keyup", "update:modelValue"],
|
|
26
|
+
setup(N, { emit: I }) {
|
|
27
|
+
const a = N, u = I;
|
|
28
|
+
if (a.multiple && !Array.isArray(a.modelValue))
|
|
29
|
+
throw new Error('Multiple is set to "true" but modelValue is not an array.');
|
|
30
|
+
const i = s(null), $ = s(null), c = s(null), t = s(""), D = y(() => a.placeholder), o = y(
|
|
31
|
+
() => [].concat(a.modelValue).filter(w)
|
|
32
|
+
), h = y(() => {
|
|
33
|
+
let e = {};
|
|
34
|
+
return o.value.forEach((n, r) => {
|
|
35
|
+
e[JSON.stringify(n)] = r;
|
|
36
|
+
}), {
|
|
37
|
+
get: (n) => e[JSON.stringify(n)]
|
|
38
|
+
};
|
|
39
|
+
}), f = s(!1), l = s(null), A = (e) => {
|
|
40
|
+
if (u("keyup", e), a.readonly || a.disabled) {
|
|
41
|
+
e.preventDefault();
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (e.key === a.divider) {
|
|
45
|
+
if (t.value[t.value.length - 1] === e.key && (t.value = t.value.slice(0, t.value.length - 1)), !t.value)
|
|
46
|
+
return;
|
|
47
|
+
l.value = null;
|
|
48
|
+
const n = h.value.get(t.value);
|
|
49
|
+
R(n) ? F(t.value) : u("duplicate", t.value), t.value = "";
|
|
50
|
+
} else if (e.key === "ArrowLeft")
|
|
51
|
+
l.value === null ? l.value = o.value.length - 1 : l.value === 0 ? l.value = null : l.value--;
|
|
52
|
+
else if (e.key === "ArrowRight")
|
|
53
|
+
l.value === null ? l.value = 1 : l.value === o.value.length - 1 ? l.value = null : l.value++;
|
|
54
|
+
else if (e.key === "Backspace") {
|
|
55
|
+
if (t.value)
|
|
56
|
+
return;
|
|
57
|
+
w(l.value) ? (b(l.value), l.value = P(
|
|
58
|
+
l.value,
|
|
59
|
+
0,
|
|
60
|
+
o.value.length - 2
|
|
61
|
+
), o.value.length === 1 && (l.value = null)) : l.value = o.value.length - 1;
|
|
62
|
+
} else
|
|
63
|
+
(e.key === "Tab" || e.key === "Escape") && (l.value = null);
|
|
64
|
+
}, F = (e) => {
|
|
65
|
+
a.multiple ? u("update:modelValue", a.modelValue.concat(e)) : u("update:modelValue", e);
|
|
66
|
+
}, b = (e) => {
|
|
67
|
+
if (typeof e == "number")
|
|
68
|
+
a.multiple ? u("update:modelValue", q(a.modelValue, 1, e)) : u("update:modelValue", null);
|
|
69
|
+
else {
|
|
70
|
+
const n = h.value.get(t.value);
|
|
71
|
+
b(n);
|
|
72
|
+
}
|
|
73
|
+
}, M = (e) => {
|
|
74
|
+
u("focus", e), f.value = !0, document.addEventListener("click", _), document.addEventListener("focusin", V), c.value instanceof HTMLInputElement && c.value.select();
|
|
75
|
+
}, O = (e) => {
|
|
76
|
+
u("click", e), !(a.disabled || a.readonly) && c.value instanceof HTMLElement && c.value.focus();
|
|
77
|
+
}, _ = (e) => {
|
|
78
|
+
if (e.target instanceof Node && i.value && !i.value.contains(e.target)) {
|
|
79
|
+
u("inactive"), document.removeEventListener("click", _), f.value = !1, a.multiple && L(500).then(() => {
|
|
80
|
+
t.value = "";
|
|
81
|
+
});
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
}, V = (e) => {
|
|
85
|
+
if (e.target instanceof Node && i.value && !i.value.contains(e.target)) {
|
|
86
|
+
u("inactive"), document.removeEventListener("focusin", V), f.value = !1, a.multiple && L(500).then(() => {
|
|
87
|
+
t.value = "";
|
|
88
|
+
});
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
}, T = {
|
|
92
|
+
onBlur: (e) => u("blur", e),
|
|
93
|
+
onChange: (e) => u("change", e),
|
|
94
|
+
onKeydown: (e) => {
|
|
95
|
+
e.key === "Enter" && a.divider === "Enter" && e.preventDefault(), u("keydown", e);
|
|
96
|
+
},
|
|
97
|
+
onInput: (e) => u("input", e)
|
|
98
|
+
};
|
|
99
|
+
return (e, n) => (p(), m("span", {
|
|
100
|
+
ref_key: "outerContainer",
|
|
101
|
+
ref: i,
|
|
102
|
+
class: g({
|
|
103
|
+
"bb-base-tag": !0,
|
|
104
|
+
"bb-base-tag--active": f.value,
|
|
105
|
+
"bb-base-tag--disabled": e.disabled,
|
|
106
|
+
"bb-base-tag--errors": e.hasErrors,
|
|
107
|
+
"bb-base-tag--readonly": e.readonly
|
|
108
|
+
}),
|
|
109
|
+
onClick: O
|
|
110
|
+
}, [
|
|
111
|
+
v(e.$slots, "prepend-outer"),
|
|
112
|
+
k("span", {
|
|
113
|
+
ref_key: "innerContainer",
|
|
114
|
+
ref: $,
|
|
115
|
+
class: "bb-base-tag__inner-container"
|
|
116
|
+
}, [
|
|
117
|
+
v(e.$slots, "prepend"),
|
|
118
|
+
k("span", j, [
|
|
119
|
+
e.comma ? (p(!0), m(E, { key: 0 }, C(o.value, (r, d) => (p(), m("span", {
|
|
120
|
+
key: r,
|
|
121
|
+
class: g({
|
|
122
|
+
"bb-base-tag__selected": !0,
|
|
123
|
+
"bb-base-tag__selected--comma": !0,
|
|
124
|
+
"bb-base-tag__selected--focused": d === l.value
|
|
125
|
+
})
|
|
126
|
+
}, B(r) + B(d < o.value.length - 1 ? "," : ""), 3))), 128)) : (p(!0), m(E, { key: 1 }, C(o.value, (r, d) => (p(), S(U, {
|
|
127
|
+
key: r,
|
|
128
|
+
class: g({
|
|
129
|
+
"bb-base-tag__selected": !0,
|
|
130
|
+
"bb-base-tag__selected--chip": !0,
|
|
131
|
+
"bb-base-tag__selected--focused": d === l.value
|
|
132
|
+
}),
|
|
133
|
+
clearable: !0,
|
|
134
|
+
text: r,
|
|
135
|
+
"onClick:clear": (Q) => b(d)
|
|
136
|
+
}, null, 8, ["class", "text", "onClick:clear"]))), 128)),
|
|
137
|
+
z(k("input", H({ id: e.id }, T, {
|
|
138
|
+
ref_key: "input",
|
|
139
|
+
ref: c,
|
|
140
|
+
"onUpdate:modelValue": n[0] || (n[0] = (r) => t.value = r),
|
|
141
|
+
autocomplete: e.autocomplete,
|
|
142
|
+
autofocus: e.autofocus,
|
|
143
|
+
class: "bb-base-tag__text-input",
|
|
144
|
+
disabled: e.disabled,
|
|
145
|
+
placeholder: D.value,
|
|
146
|
+
readonly: e.readonly,
|
|
147
|
+
type: "text",
|
|
148
|
+
onFocus: M,
|
|
149
|
+
onKeyup: A
|
|
150
|
+
}), null, 16, G), [
|
|
151
|
+
[J, t.value]
|
|
152
|
+
])
|
|
153
|
+
]),
|
|
154
|
+
v(e.$slots, "append")
|
|
155
|
+
], 512),
|
|
156
|
+
v(e.$slots, "append-outer")
|
|
157
|
+
], 2));
|
|
158
|
+
}
|
|
159
|
+
});
|
|
2
160
|
export {
|
|
3
|
-
|
|
161
|
+
te as default
|
|
4
162
|
};
|
|
5
163
|
//# sourceMappingURL=index228.js.map
|
package/dist/index228.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index228.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"index228.js","sources":["../src/components/BaseTag/BaseTag.vue"],"sourcesContent":["<template>\n\t<span\n\t\tref=\"outerContainer\"\n\t\t:class=\"{\n\t\t\t'bb-base-tag': true,\n\t\t\t'bb-base-tag--active': active,\n\t\t\t'bb-base-tag--disabled': disabled,\n\t\t\t'bb-base-tag--errors': hasErrors,\n\t\t\t'bb-base-tag--readonly': readonly,\n\t\t}\"\n\t\t@click=\"onOuterContainerClick\"\n\t>\n\t\t<slot name=\"prepend-outer\"></slot>\n\t\t<span ref=\"innerContainer\" class=\"bb-base-tag__inner-container\">\n\t\t\t<slot name=\"prepend\"></slot>\n\t\t\t<span class=\"bb-base-tag__input-container\">\n\t\t\t\t<template v-if=\"comma\">\n\t\t\t\t\t<span\n\t\t\t\t\t\tv-for=\"(option, index) in modelValueNormalized\"\n\t\t\t\t\t\t:key=\"option\"\n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'bb-base-tag__selected': true,\n\t\t\t\t\t\t\t'bb-base-tag__selected--comma': true,\n\t\t\t\t\t\t\t'bb-base-tag__selected--focused': index === focusedIndex,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t>{{ option\n\t\t\t\t\t\t}}{{ index < modelValueNormalized.length - 1 ? ',' : '' }}</span\n\t\t\t\t\t>\n\t\t\t\t</template>\n\t\t\t\t<template v-else>\n\t\t\t\t\t<BbChip\n\t\t\t\t\t\tv-for=\"(option, index) in modelValueNormalized\"\n\t\t\t\t\t\t:key=\"option\"\n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'bb-base-tag__selected': true,\n\t\t\t\t\t\t\t'bb-base-tag__selected--chip': true,\n\t\t\t\t\t\t\t'bb-base-tag__selected--focused': index === focusedIndex,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t:clearable=\"true\"\n\t\t\t\t\t\t:text=\"option\"\n\t\t\t\t\t\t@click:clear=\"removeValue(index)\"\n\t\t\t\t\t/>\n\t\t\t\t</template>\n\n\t\t\t\t<input\n\t\t\t\t\t:id=\"id\"\n\t\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\t\tref=\"input\"\n\t\t\t\t\tv-model=\"query\"\n\t\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t\t:class=\"'bb-base-tag__text-input'\"\n\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t:placeholder=\"computedPlaceholder\"\n\t\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t\t:type=\"'text'\"\n\t\t\t\t\t@focus=\"onInputFocus\"\n\t\t\t\t\t@keyup=\"onInputKeyup\"\n\t\t\t\t/>\n\t\t\t</span>\n\t\t\t<slot name=\"append\"></slot>\n\t\t</span>\n\t\t<slot name=\"append-outer\"></slot>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { clamp } from '@/utilities/functions/clamp';\nimport { computed, ref } from 'vue';\nimport { drop } from '@/utilities/functions/drop';\nimport { isNil } from '@/utilities/functions/isNil';\nimport { isNotNil } from '@/utilities/functions/isNotNil';\nimport { wait } from '@/utilities/functions/wait';\nimport BbChip from '../BbChip/BbChip.vue';\nimport type { InputHTMLAttributes, HTMLAttributes } from 'vue';\n\nexport type BaseTagProps = {\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Sets the display model for selected values to a list\n\t * of comma separated string. In this mode the user\n\t * cannot deselect an option by pressing the close button.\n\t */\n\tcomma?: boolean;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * The divider key used to separate values from one another. By default it is \"Enter\"\n\t */\n\tdivider?: KeyboardEvent['key'];\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue: any;\n\n\t/**\n\t * Allows the selection of multiple items.\n\t */\n\tmultiple?: boolean;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n};\n\nconst props = withDefaults(defineProps<BaseTagProps>(), {\n\tdivider: 'Enter',\n\tmultiple: true,\n});\n\nexport type BaseTagEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\n\t(e: 'change', event: Event): void;\n\n\t(e: 'click', event: MouseEvent): void;\n\n\t(e: 'duplicate', string: string): void;\n\n\t(e: 'focus', event: FocusEvent): void;\n\n\t(e: 'inactive'): void;\n\n\t(e: 'input', event: Event): void;\n\n\t(e: 'keydown', event: KeyboardEvent): void;\n\n\t(e: 'keyup', event: KeyboardEvent): void;\n\n\t(e: 'update:modelValue', value: any): void;\n};\n\nconst emit = defineEmits<BaseTagEvents>();\n\nexport type BaseTagSlots = {\n\tappend?: (props: object) => any;\n\n\t'append-outer'?: (props: object) => any;\n\n\tprepend?: (props: object) => any;\n\n\t'prepend-outer'?: (props: object) => any;\n};\n\ndefineSlots<BaseTagSlots>();\n\nif (props.multiple && !Array.isArray(props.modelValue)) {\n\tthrow new Error('Multiple is set to \"true\" but modelValue is not an array.');\n}\n\nconst outerContainer = ref<HTMLElement | null>(null);\nconst innerContainer = ref<HTMLElement | null>(null);\nconst input = ref<HTMLElement | null>(null);\nconst query = ref<string>('');\nconst computedPlaceholder = computed(() => {\n\treturn props.placeholder;\n});\n\nconst modelValueNormalized = computed(() =>\n\t[].concat(props.modelValue).filter(isNotNil)\n);\n\n/**\n * Indexes modelValue to a map so when can easily know which values are selected\n */\nconst modelValueIndexed = computed(() => {\n\tlet map: { [key: string]: number } = {};\n\tmodelValueNormalized.value.forEach((value: any, index: number) => {\n\t\tmap[JSON.stringify(value)] = index;\n\t});\n\treturn {\n\t\tget: (value: any) => map[JSON.stringify(value)],\n\t};\n});\n\n/**\n * Applies a class when the user is inside this whole component.\n * We cannot use focus within as it doesn't work for elements that are teleported.\n * Also we cannot use the <input/> if we phisically move focus to the options so\n * we track it manually.\n */\nconst active = ref(false);\n\nconst focusedIndex = ref<null | number>(null);\n\nconst onInputKeyup = (event: KeyboardEvent) => {\n\temit('keyup', event);\n\tif (props.readonly || props.disabled) {\n\t\tevent.preventDefault();\n\t\treturn;\n\t}\n\tif (event.key === props.divider) {\n\t\tif (query.value[query.value.length - 1] === event.key) {\n\t\t\tquery.value = query.value.slice(0, query.value.length - 1);\n\t\t}\n\t\tif (!query.value) return;\n\t\tfocusedIndex.value = null;\n\t\tconst currentIndex = modelValueIndexed.value.get(query.value);\n\t\tif (isNil(currentIndex)) selectValue(query.value);\n\t\telse emit('duplicate', query.value);\n\t\tquery.value = '';\n\t} else if (event.key === 'ArrowLeft') {\n\t\tif (focusedIndex.value === null)\n\t\t\tfocusedIndex.value = modelValueNormalized.value.length - 1;\n\t\telse if (focusedIndex.value === 0) focusedIndex.value = null;\n\t\telse focusedIndex.value--;\n\t} else if (event.key === 'ArrowRight') {\n\t\tif (focusedIndex.value === null) focusedIndex.value = 1;\n\t\telse if (focusedIndex.value === modelValueNormalized.value.length - 1)\n\t\t\tfocusedIndex.value = null;\n\t\telse focusedIndex.value++;\n\t} else if (event.key === 'Backspace') {\n\t\tif (query.value) return;\n\t\tif (isNotNil(focusedIndex.value)) {\n\t\t\tremoveValue(focusedIndex.value);\n\t\t\tfocusedIndex.value = clamp(\n\t\t\t\tfocusedIndex.value,\n\t\t\t\t0,\n\t\t\t\tmodelValueNormalized.value.length - 2\n\t\t\t);\n\t\t\tif (modelValueNormalized.value.length === 1) focusedIndex.value = null;\n\t\t} else focusedIndex.value = modelValueNormalized.value.length - 1;\n\t} else if (event.key === 'Tab' || event.key === 'Escape') {\n\t\tfocusedIndex.value = null;\n\t}\n};\n\nconst selectValue = (text: string) => {\n\tif (props.multiple) emit('update:modelValue', props.modelValue.concat(text));\n\telse emit('update:modelValue', text);\n};\n\nconst removeValue = (indexOrString: number | string) => {\n\tif (typeof indexOrString === 'number') {\n\t\tif (props.multiple)\n\t\t\temit('update:modelValue', drop(props.modelValue, 1, indexOrString));\n\t\telse emit('update:modelValue', null);\n\t} else {\n\t\tconst currentIndex = modelValueIndexed.value.get(query.value);\n\t\tremoveValue(currentIndex);\n\t}\n};\n\nconst onInputFocus = (event: FocusEvent) => {\n\temit('focus', event);\n\tactive.value = true;\n\tdocument.addEventListener('click', onClickOutside);\n\tdocument.addEventListener('focusin', onFocusOutside);\n\tif (input.value instanceof HTMLInputElement) input.value.select();\n};\n\n/**\n * When clicking on the outside container seamlessly move focus to the input and open the panel\n */\nconst onOuterContainerClick = (event: MouseEvent) => {\n\temit('click', event);\n\tif (props.disabled || props.readonly) return;\n\tif (input.value instanceof HTMLElement) {\n\t\tinput.value.focus();\n\t}\n};\n\n/**\n * On click outside of the container close the panel, remove active state.\n * In multiple selection clear query after a timeout\n */\nconst onClickOutside = (event: Event) => {\n\tif (event.target instanceof Node) {\n\t\tif (outerContainer.value) {\n\t\t\tif (!outerContainer.value.contains(event.target)) {\n\t\t\t\temit('inactive');\n\t\t\t\tdocument.removeEventListener('click', onClickOutside);\n\t\t\t\tactive.value = false;\n\t\t\t\tif (props.multiple)\n\t\t\t\t\twait(500).then(() => {\n\t\t\t\t\t\tquery.value = '';\n\t\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst onFocusOutside = (event: FocusEvent) => {\n\tif (event.target instanceof Node) {\n\t\tif (outerContainer.value) {\n\t\t\tif (!outerContainer.value.contains(event.target)) {\n\t\t\t\temit('inactive');\n\t\t\t\tdocument.removeEventListener('focusin', onFocusOutside);\n\t\t\t\tactive.value = false;\n\t\t\t\tif (props.multiple)\n\t\t\t\t\twait(500).then(() => {\n\t\t\t\t\t\tquery.value = '';\n\t\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonKeydown: (event: KeyboardEvent) => {\n\t\tif (event.key === 'Enter' && props.divider === 'Enter') {\n\t\t\tevent.preventDefault();\n\t\t}\n\t\temit('keydown', event);\n\t},\n\tonInput: (event: Event) => emit('input', event),\n};\n</script>\n<style lang=\"postcss\">\n@import '@/assets/css/BaseTag';\n</style>\n"],"names":["props","__props","emit","__emit","outerContainer","ref","innerContainer","input","query","computedPlaceholder","computed","modelValueNormalized","isNotNil","modelValueIndexed","map","value","index","active","focusedIndex","onInputKeyup","event","currentIndex","isNil","selectValue","removeValue","clamp","text","indexOrString","drop","onInputFocus","onClickOutside","onFocusOutside","onOuterContainerClick","wait","eventListeners"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA6IA,UAAMA,IAAQC,GA2BRC,IAAOC;AAcb,QAAIH,EAAM,YAAY,CAAC,MAAM,QAAQA,EAAM,UAAU;AAC9C,YAAA,IAAI,MAAM,2DAA2D;AAGtE,UAAAI,IAAiBC,EAAwB,IAAI,GAC7CC,IAAiBD,EAAwB,IAAI,GAC7CE,IAAQF,EAAwB,IAAI,GACpCG,IAAQH,EAAY,EAAE,GACtBI,IAAsBC,EAAS,MAC7BV,EAAM,WACb,GAEKW,IAAuBD;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