bitboss-ui 0.2.7 → 0.2.8

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.
Files changed (132) hide show
  1. package/dist/index101.js +3 -3
  2. package/dist/index103.js +2 -2
  3. package/dist/index109.js +1 -1
  4. package/dist/index11.js +2 -2
  5. package/dist/index111.js +4 -4
  6. package/dist/index113.js +1 -1
  7. package/dist/index116.js +1 -1
  8. package/dist/index117.js +1 -1
  9. package/dist/index118.js +1 -1
  10. package/dist/index119.js +1 -1
  11. package/dist/index121.js +1 -1
  12. package/dist/index125.js +1 -1
  13. package/dist/index126.js +1 -1
  14. package/dist/index128.js +2 -2
  15. package/dist/index15.js +8 -8
  16. package/dist/index17.js +9 -9
  17. package/dist/index19.js +59 -59
  18. package/dist/index19.js.map +1 -1
  19. package/dist/index195.js +2 -3
  20. package/dist/index195.js.map +1 -1
  21. package/dist/index196.js +2 -35
  22. package/dist/index196.js.map +1 -1
  23. package/dist/index197.js +4 -6
  24. package/dist/index197.js.map +1 -1
  25. package/dist/index198.js +3 -2
  26. package/dist/index198.js.map +1 -1
  27. package/dist/index199.js +35 -2
  28. package/dist/index199.js.map +1 -1
  29. package/dist/index200.js +6 -4
  30. package/dist/index200.js.map +1 -1
  31. package/dist/index201.js +324 -208
  32. package/dist/index201.js.map +1 -1
  33. package/dist/index202.js +131 -348
  34. package/dist/index202.js.map +1 -1
  35. package/dist/index203.js +5 -134
  36. package/dist/index203.js.map +1 -1
  37. package/dist/index204.js +19 -5
  38. package/dist/index204.js.map +1 -1
  39. package/dist/index205.js +2 -19
  40. package/dist/index205.js.map +1 -1
  41. package/dist/index206.js +2 -2
  42. package/dist/index206.js.map +1 -1
  43. package/dist/index207.js +186 -2
  44. package/dist/index207.js.map +1 -1
  45. package/dist/index208.js +23 -186
  46. package/dist/index208.js.map +1 -1
  47. package/dist/index209.js +369 -23
  48. package/dist/index209.js.map +1 -1
  49. package/dist/index21.js +2 -2
  50. package/dist/index210.js +3 -369
  51. package/dist/index210.js.map +1 -1
  52. package/dist/index211.js +3 -16
  53. package/dist/index211.js.map +1 -1
  54. package/dist/index212.js +235 -16
  55. package/dist/index212.js.map +1 -1
  56. package/dist/index213.js +2 -20
  57. package/dist/index213.js.map +1 -1
  58. package/dist/index214.js +10 -29
  59. package/dist/index214.js.map +1 -1
  60. package/dist/index215.js +2 -8
  61. package/dist/index215.js.map +1 -1
  62. package/dist/index216.js +16 -3
  63. package/dist/index216.js.map +1 -1
  64. package/dist/index217.js +16 -3
  65. package/dist/index217.js.map +1 -1
  66. package/dist/index218.js +20 -2
  67. package/dist/index218.js.map +1 -1
  68. package/dist/index219.js +29 -2
  69. package/dist/index219.js.map +1 -1
  70. package/dist/index220.js +8 -10
  71. package/dist/index220.js.map +1 -1
  72. package/dist/index222.js +4 -4
  73. package/dist/index223.js +1 -1
  74. package/dist/index225.js +1 -1
  75. package/dist/index226.js +3 -434
  76. package/dist/index226.js.map +1 -1
  77. package/dist/index227.js +428 -82
  78. package/dist/index227.js.map +1 -1
  79. package/dist/index228.js +89 -2
  80. package/dist/index228.js.map +1 -1
  81. package/dist/index229.js +6 -200
  82. package/dist/index229.js.map +1 -1
  83. package/dist/index23.js +1 -1
  84. package/dist/index230.js +2 -4
  85. package/dist/index230.js.map +1 -1
  86. package/dist/index231.js +294 -5
  87. package/dist/index231.js.map +1 -1
  88. package/dist/index232.js +2 -2
  89. package/dist/index233.js +2 -295
  90. package/dist/index233.js.map +1 -1
  91. package/dist/index234.js +117 -2
  92. package/dist/index234.js.map +1 -1
  93. package/dist/index235.js +106 -2
  94. package/dist/index235.js.map +1 -1
  95. package/dist/index236.js +199 -116
  96. package/dist/index236.js.map +1 -1
  97. package/dist/index237.js +2 -106
  98. package/dist/index237.js.map +1 -1
  99. package/dist/index238.js +2 -2
  100. package/dist/index238.js.map +1 -1
  101. package/dist/index239.js +69 -2
  102. package/dist/index239.js.map +1 -1
  103. package/dist/index240.js +162 -2
  104. package/dist/index240.js.map +1 -1
  105. package/dist/index241.js +2 -2
  106. package/dist/index242.js +1 -1
  107. package/dist/index243.js +1 -1
  108. package/dist/index244.js +2 -162
  109. package/dist/index244.js.map +1 -1
  110. package/dist/index245.js +2 -2
  111. package/dist/index246.js +2 -69
  112. package/dist/index246.js.map +1 -1
  113. package/dist/index247.js +2 -2
  114. package/dist/index247.js.map +1 -1
  115. package/dist/index248.js +1 -1
  116. package/dist/index25.js +2 -2
  117. package/dist/index252.js +1 -1
  118. package/dist/index253.js +2 -2
  119. package/dist/index29.js +3 -3
  120. package/dist/index31.js +6 -6
  121. package/dist/index33.js +2 -2
  122. package/dist/index35.js +2 -2
  123. package/dist/index47.js +1 -1
  124. package/dist/index49.js +1 -1
  125. package/dist/index65.js +3 -3
  126. package/dist/index72.js +1 -1
  127. package/dist/index75.js +34 -34
  128. package/dist/index75.js.map +1 -1
  129. package/dist/index79.js +3 -3
  130. package/dist/index81.js +1 -1
  131. package/dist/style.css +1 -1
  132. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index218.js","sources":["../src/utilities/functions/booleanishToBoolean.ts"],"sourcesContent":["/**\n * Accepts a booleanish input and returns a boolean value\n * @param input booleanish input\n * @returns \n */\nexport const booleanishToBoolean = (input: boolean | 'true' | 'false') => {\n if(typeof input === 'boolean') return input;\n else return input === 'true';\n}"],"names":["booleanishToBoolean","input"],"mappings":"AAKa,MAAAA,IAAsB,CAACC,MAC7B,OAAOA,KAAU,YAAkBA,IAC1BA,MAAU;"}
1
+ {"version":3,"file":"index218.js","sources":["../node_modules/dayjs/plugin/updateLocale.js"],"sourcesContent":["!function(e,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=n():\"function\"==typeof define&&define.amd?define(n):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_updateLocale=n()}(this,(function(){\"use strict\";return function(e,n,t){t.updateLocale=function(e,n){var o=t.Ls[e];if(o)return(n?Object.keys(n):[]).forEach((function(e){o[e]=n[e]})),o}}}));"],"names":["e","n","module","this","t","o"],"mappings":";;;AAAA,GAAC,SAASA,GAAEC,GAAE;AAAsD,IAAAC,EAAe,UAAAD,EAAuI;AAAA,EAAA,GAAEE,GAAM,WAAU;AAAc,WAAO,SAASH,GAAEC,GAAEG,GAAE;AAAC,MAAAA,EAAE,eAAa,SAASJ,GAAEC,GAAE;AAAC,YAAII,IAAED,EAAE,GAAGJ,CAAC;AAAE,YAAGK;AAAE,kBAAOJ,IAAE,OAAO,KAAKA,CAAC,IAAE,CAAA,GAAI,QAAS,SAASD,GAAE;AAAC,YAAAK,EAAEL,CAAC,IAAEC,EAAED,CAAC;AAAA,UAAC,IAAIK;AAAA,MAAC;AAAA,IAAC;AAAA,EAAC;;;;","x_google_ignoreList":[0]}
package/dist/index219.js CHANGED
@@ -1,5 +1,32 @@
1
- const o = (e) => e[0];
1
+ import { getDefaultExportFromCjs as c, commonjsGlobal as k } from "./index229.js";
2
+ import { __module as n } from "./index247.js";
3
+ (function(f, p) {
4
+ (function(r, e) {
5
+ f.exports = e();
6
+ })(k, function() {
7
+ var r = "week", e = "year";
8
+ return function(w, u, a) {
9
+ var o = u.prototype;
10
+ o.week = function(t) {
11
+ if (t === void 0 && (t = null), t !== null)
12
+ return this.add(7 * (t - this.week()), "day");
13
+ var s = this.$locale().yearStart || 1;
14
+ if (this.month() === 11 && this.date() > 25) {
15
+ var l = a(this).startOf(e).add(1, e).date(s), d = a(this).endOf(r);
16
+ if (l.isBefore(d))
17
+ return 1;
18
+ }
19
+ var h = a(this).startOf(e).date(s).startOf(r).subtract(1, "millisecond"), i = this.diff(h, r, !0);
20
+ return i < 0 ? a(this).startOf("week").week() : Math.ceil(i);
21
+ }, o.weeks = function(t) {
22
+ return t === void 0 && (t = null), this.week(t);
23
+ };
24
+ };
25
+ });
26
+ })(n);
27
+ var m = n.exports;
28
+ const x = /* @__PURE__ */ c(m);
2
29
  export {
3
- o as head
30
+ x as default
4
31
  };
5
32
  //# sourceMappingURL=index219.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index219.js","sources":["../src/utilities/functions/head.ts"],"sourcesContent":["/** Takes an array and returns the first item in it */\nexport const head = <T>(arr: T[]) => arr[0]"],"names":["head","arr"],"mappings":"AACO,MAAMA,IAAO,CAAIC,MAAaA,EAAI,CAAC;"}
1
+ {"version":3,"file":"index219.js","sources":["../node_modules/dayjs/plugin/weekOfYear.js"],"sourcesContent":["!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_weekOfYear=t()}(this,(function(){\"use strict\";var e=\"week\",t=\"year\";return function(i,n,r){var f=n.prototype;f.week=function(i){if(void 0===i&&(i=null),null!==i)return this.add(7*(i-this.week()),\"day\");var n=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var f=r(this).startOf(t).add(1,t).date(n),s=r(this).endOf(e);if(f.isBefore(s))return 1}var a=r(this).startOf(t).date(n).startOf(e).subtract(1,\"millisecond\"),o=this.diff(a,e,!0);return o<0?r(this).startOf(\"week\").week():Math.ceil(o)},f.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}));"],"names":["e","t","module","this","i","n","r","f","s","a","o"],"mappings":";;;AAAA,GAAC,SAASA,GAAEC,GAAE;AAAsD,IAAAC,EAAe,UAAAD,EAAqI;AAAA,EAAA,GAAEE,GAAM,WAAU;AAAc,QAAIH,IAAE,QAAOC,IAAE;AAAO,WAAO,SAASG,GAAEC,GAAEC,GAAE;AAAC,UAAIC,IAAEF,EAAE;AAAU,MAAAE,EAAE,OAAK,SAASH,GAAE;AAAC,YAAYA,MAAT,WAAaA,IAAE,OAAaA,MAAP;AAAS,iBAAO,KAAK,IAAI,KAAGA,IAAE,KAAK,KAAI,IAAI,KAAK;AAAE,YAAIC,IAAE,KAAK,QAAO,EAAG,aAAW;AAAE,YAAQ,KAAK,MAAO,MAAjB,MAAmB,KAAK,KAAI,IAAG,IAAG;AAAC,cAAIE,IAAED,EAAE,IAAI,EAAE,QAAQL,CAAC,EAAE,IAAI,GAAEA,CAAC,EAAE,KAAKI,CAAC,GAAEG,IAAEF,EAAE,IAAI,EAAE,MAAMN,CAAC;AAAE,cAAGO,EAAE,SAASC,CAAC;AAAE,mBAAO;AAAA,QAAC;AAAC,YAAIC,IAAEH,EAAE,IAAI,EAAE,QAAQL,CAAC,EAAE,KAAKI,CAAC,EAAE,QAAQL,CAAC,EAAE,SAAS,GAAE,aAAa,GAAEU,IAAE,KAAK,KAAKD,GAAET,GAAE,EAAE;AAAE,eAAOU,IAAE,IAAEJ,EAAE,IAAI,EAAE,QAAQ,MAAM,EAAE,KAAI,IAAG,KAAK,KAAKI,CAAC;AAAA,MAAC,GAAEH,EAAE,QAAM,SAASP,GAAE;AAAC,eAAgBA,MAAT,WAAaA,IAAE,OAAM,KAAK,KAAKA,CAAC;AAAA,MAAC;AAAA,IAAC;AAAA,EAAC;;;;","x_google_ignoreList":[0]}
package/dist/index220.js CHANGED
@@ -1,13 +1,11 @@
1
- import { getCurrentScope as o, onScopeDispose as n, unref as r } from "vue";
2
- function f(e) {
3
- return o() ? (n(e), !0) : !1;
4
- }
5
- function p(e) {
6
- return typeof e == "function" ? e() : r(e);
7
- }
8
- typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
1
+ const s = (t, o) => t.reduce(
2
+ (e, r, u, p) => {
3
+ const n = o(r, u, p);
4
+ return n in e || (e[n] = []), e[n].push(r), e;
5
+ },
6
+ {}
7
+ );
9
8
  export {
10
- p as toValue,
11
- f as tryOnScopeDispose
9
+ s as groupBy
12
10
  };
13
11
  //# sourceMappingURL=index220.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index220.js","sources":["../node_modules/@vueuse/shared/index.mjs"],"sourcesContent":["import { shallowRef, watchEffect, readonly, ref, watch, customRef, getCurrentScope, onScopeDispose, effectScope, getCurrentInstance, provide, inject, isVue3, version, isRef, unref, computed, reactive, toRefs as toRefs$1, toRef as toRef$1, isVue2, set as set$1, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, {\n ...options,\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n });\n return readonly(result);\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = typeof fn === \"function\" ? fn : fn.get;\n const set = typeof fn === \"function\" ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get();\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = /* @__PURE__ */ new Set();\n const off = (fn) => {\n fns.delete(fn);\n };\n const on = (fn) => {\n fns.add(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (param) => {\n return Promise.all(Array.from(fns).map((fn) => param ? fn(param) : fn()));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return (...args) => {\n if (!initialized) {\n state = scope.run(() => stateFactory(...args));\n initialized = true;\n }\n return state;\n };\n}\n\nconst localProvidedStateMap = /* @__PURE__ */ new WeakMap();\n\nconst provideLocal = (key, value) => {\n var _a;\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"provideLocal must be called in setup\");\n if (!localProvidedStateMap.has(instance))\n localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null));\n const localProvidedState = localProvidedStateMap.get(instance);\n localProvidedState[key] = value;\n provide(key, value);\n};\n\nconst injectLocal = (...args) => {\n var _a;\n const key = args[0];\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"injectLocal must be called in setup\");\n if (localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance))\n return localProvidedStateMap.get(instance)[key];\n return inject(...args);\n};\n\nfunction createInjectionState(composable, options) {\n const key = (options == null ? void 0 : options.injectionKey) || Symbol(\"InjectionState\");\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provideLocal(key, state);\n return state;\n };\n const useInjectedState = () => injectLocal(key);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] extendRef only works in Vue 2.7 or above.\");\n return;\n }\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return unref(v) != null;\n}\n\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = { ...obj };\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\nfunction toValue(r) {\n return typeof r === \"function\" ? r() : unref(r);\n}\nconst resolveUnref = toValue;\n\nfunction reactify(fn, options) {\n const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : toValue;\n return function(...args) {\n return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n let options;\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n options = optionsOrKeys;\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(\n keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n ];\n })\n );\n}\n\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\nconst isClient = typeof window !== \"undefined\" && typeof document !== \"undefined\";\nconst isWorker = typeof WorkerGlobalScope !== \"undefined\" && globalThis instanceof WorkerGlobalScope;\nconst isDef = (val) => typeof val !== \"undefined\";\nconst notNullish = (val) => val != null;\nconst assert = (condition, ...infos) => {\n if (!condition)\n console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\nconst isIOS = /* @__PURE__ */ getIsIOS();\nfunction getIsIOS() {\n var _a;\n return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /* @__PURE__ */ /iP(ad|hone|od)/.test(window.navigator.userAgent);\n}\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = (timer2) => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n const filter = (invoke) => {\n const duration = toValue(ms);\n const maxDuration = toValue(options.maxWait);\n if (timer)\n _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = null;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n _clearTimeout(timer);\n maxTimer = null;\n resolve(invoke());\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n _clearTimeout(maxTimer);\n maxTimer = null;\n resolve(invoke());\n }, duration);\n });\n };\n return filter;\n}\nfunction throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n let lastRejector = noop;\n let lastValue;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n lastRejector();\n lastRejector = noop;\n }\n };\n const filter = (_invoke) => {\n const duration = toValue(ms);\n const elapsed = Date.now() - lastExec;\n const invoke = () => {\n return lastValue = _invoke();\n };\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n lastValue = new Promise((resolve, reject) => {\n lastRejector = rejectOnCancel ? reject : resolve;\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n resolve(invoke());\n clear();\n }, Math.max(0, duration - elapsed));\n });\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n return lastValue;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n const isActive = ref(true);\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nconst directiveHooks = {\n mounted: isVue3 ? \"mounted\" : \"inserted\",\n updated: isVue3 ? \"updated\" : \"componentUpdated\",\n unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction cacheStringFunction(fn) {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n}\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, \"-$1\").toLowerCase());\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?[0-9]+\\.?[0-9]*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = Number.parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\nfunction objectOmit(obj, keys, omitUndefined = false) {\n return Object.fromEntries(Object.entries(obj).filter(([key, value]) => {\n return (!omitUndefined || value !== void 0) && !keys.includes(key);\n }));\n}\nfunction objectEntries(obj) {\n return Object.entries(obj);\n}\n\nfunction toRef(...args) {\n if (args.length !== 1)\n return toRef$1(...args);\n const r = args[0];\n return typeof r === \"function\" ? readonly(customRef(() => ({ get: r, set: noop }))) : ref(r);\n}\nconst resolveRef = toRef;\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => predicate(toValue(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return customRef((track, trigger) => {\n let value = toValue(defaultValue);\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = toValue(defaultValue);\n trigger();\n }, toValue(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(\n debounceFilter(ms, options),\n fn\n );\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n const debounced = ref(value.value);\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n watch(value, () => updater());\n return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n return computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n return createFilterWrapper(\n throttleFilter(ms, trailing, leading, rejectOnCancel),\n fn\n );\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = ref(value.value);\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n watch(value, () => updater());\n return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(\n ref,\n {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n },\n { enumerable: true }\n );\n}\nconst controlledRef = refWithControl;\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n if (isVue2) {\n set$1(...args);\n } else {\n const [target, key, value] = args;\n target[key] = value;\n }\n }\n}\n\nfunction watchWithFilter(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n return watch(\n source,\n createFilterWrapper(\n eventFilter,\n cb\n ),\n watchOptions\n );\n}\n\nfunction watchPausable(source, cb, options = {}) {\n const {\n eventFilter: filter,\n ...watchOptions\n } = options;\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n const stop = watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter\n }\n );\n return { stop, pause, resume, isActive };\n}\n\nfunction syncRef(left, right, ...[options]) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\",\n transform = {}\n } = options || {};\n const watchers = [];\n const transformLTR = \"ltr\" in transform && transform.ltr || ((v) => v);\n const transformRTL = \"rtl\" in transform && transform.rtl || ((v) => v);\n if (direction === \"both\" || direction === \"ltr\") {\n watchers.push(watchPausable(\n left,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n right.value = transformLTR(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n if (direction === \"both\" || direction === \"rtl\") {\n watchers.push(watchPausable(\n right,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n left.value = transformRTL(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n const stop = () => {\n watchers.forEach((w) => w.stop());\n };\n return stop;\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n if (!Array.isArray(targets))\n targets = [targets];\n return watch(\n source,\n (newValue) => targets.forEach((target) => target.value = newValue),\n { flush, deep, immediate }\n );\n}\n\nfunction toRefs(objectRef, options = {}) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n var _a;\n const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true;\n if (replaceRef) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = { ...objectRef.value, [key]: v };\n Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));\n objectRef.value = newObject;\n }\n } else {\n objectRef.value[key] = v;\n }\n }\n }));\n }\n return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true) {\n if (getCurrentInstance())\n onBeforeMount(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn) {\n if (getCurrentInstance())\n onBeforeUnmount(fn);\n}\n\nfunction tryOnMounted(fn, sync = true) {\n if (getCurrentInstance())\n onMounted(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn) {\n if (getCurrentInstance())\n onUnmounted(fn);\n}\n\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n r,\n (v) => {\n if (condition(v) !== isNot) {\n stop == null ? void 0 : stop();\n resolve(v);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop == null ? void 0 : stop())\n );\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n [r, value],\n ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n stop == null ? void 0 : stop();\n resolve(v1);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {\n stop == null ? void 0 : stop();\n return toValue(r);\n })\n );\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(toValue(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(toValue(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\n\nfunction defaultComparator(value, othVal) {\n return value === othVal;\n}\nfunction useArrayDifference(...args) {\n var _a;\n const list = args[0];\n const values = args[1];\n let compareFn = (_a = args[2]) != null ? _a : defaultComparator;\n if (typeof compareFn === \"string\") {\n const key = compareFn;\n compareFn = (value, othVal) => value[key] === othVal[key];\n }\n return computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1));\n}\n\nfunction useArrayEvery(list, fn) {\n return computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n return computed(() => toValue(\n toValue(list).find((element, index, array) => fn(toValue(element), index, array))\n ));\n}\n\nfunction useArrayFindIndex(list, fn) {\n return computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n let index = arr.length;\n while (index-- > 0) {\n if (cb(arr[index], index, arr))\n return arr[index];\n }\n return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n return computed(() => toValue(\n !Array.prototype.findLast ? findLast(toValue(list), (element, index, array) => fn(toValue(element), index, array)) : toValue(list).findLast((element, index, array) => fn(toValue(element), index, array))\n ));\n}\n\nfunction isArrayIncludesOptions(obj) {\n return isObject(obj) && containsProp(obj, \"formIndex\", \"comparator\");\n}\nfunction useArrayIncludes(...args) {\n var _a;\n const list = args[0];\n const value = args[1];\n let comparator = args[2];\n let formIndex = 0;\n if (isArrayIncludesOptions(comparator)) {\n formIndex = (_a = comparator.fromIndex) != null ? _a : 0;\n comparator = comparator.comparator;\n }\n if (typeof comparator === \"string\") {\n const key = comparator;\n comparator = (element, value2) => element[key] === toValue(value2);\n }\n comparator = comparator != null ? comparator : (element, value2) => element === toValue(value2);\n return computed(() => toValue(list).slice(formIndex).some((element, index, array) => comparator(\n toValue(element),\n toValue(value),\n index,\n toValue(array)\n )));\n}\n\nfunction useArrayJoin(list, separator) {\n return computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n const reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index);\n return computed(() => {\n const resolved = toValue(list);\n return args.length ? resolved.reduce(reduceCallback, toValue(args[0])) : resolved.reduce(reduceCallback);\n });\n}\n\nfunction useArraySome(list, fn) {\n return computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction uniq(array) {\n return Array.from(new Set(array));\n}\nfunction uniqueElementsBy(array, fn) {\n return array.reduce((acc, v) => {\n if (!acc.some((x) => fn(v, x, array)))\n acc.push(v);\n return acc;\n }, []);\n}\nfunction useArrayUnique(list, compareFn) {\n return computed(() => {\n const resolvedList = toValue(list).map((element) => toValue(element));\n return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);\n });\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n let _initialValue = unref(initialValue);\n const count = ref(initialValue);\n const {\n max = Number.POSITIVE_INFINITY,\n min = Number.NEGATIVE_INFINITY\n } = options;\n const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);\n const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);\n const get = () => count.value;\n const set = (val) => count.value = Math.max(min, Math.min(max, val));\n const reset = (val = _initialValue) => {\n _initialValue = val;\n return set(val);\n };\n return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/;\nconst REGEX_FORMAT = /[YMDHhms]o|\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;\nfunction defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {\n let m = hours < 12 ? \"AM\" : \"PM\";\n if (hasPeriod)\n m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n return isLowercase ? m.toLowerCase() : m;\n}\nfunction formatOrdinal(num) {\n const suffixes = [\"th\", \"st\", \"nd\", \"rd\"];\n const v = num % 100;\n return num + (suffixes[(v - 20) % 10] || suffixes[v] || suffixes[0]);\n}\nfunction formatDate(date, formatStr, options = {}) {\n var _a;\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n const matches = {\n Yo: () => formatOrdinal(years),\n YY: () => String(years).slice(-2),\n YYYY: () => years,\n M: () => month + 1,\n Mo: () => formatOrdinal(month + 1),\n MM: () => `${month + 1}`.padStart(2, \"0\"),\n MMM: () => date.toLocaleDateString(options.locales, { month: \"short\" }),\n MMMM: () => date.toLocaleDateString(options.locales, { month: \"long\" }),\n D: () => String(days),\n Do: () => formatOrdinal(days),\n DD: () => `${days}`.padStart(2, \"0\"),\n H: () => String(hours),\n Ho: () => formatOrdinal(hours),\n HH: () => `${hours}`.padStart(2, \"0\"),\n h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n ho: () => formatOrdinal(hours % 12 || 12),\n hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: () => String(minutes),\n mo: () => formatOrdinal(minutes),\n mm: () => `${minutes}`.padStart(2, \"0\"),\n s: () => String(seconds),\n so: () => formatOrdinal(seconds),\n ss: () => `${seconds}`.padStart(2, \"0\"),\n SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n d: () => day,\n dd: () => date.toLocaleDateString(options.locales, { weekday: \"narrow\" }),\n ddd: () => date.toLocaleDateString(options.locales, { weekday: \"short\" }),\n dddd: () => date.toLocaleDateString(options.locales, { weekday: \"long\" }),\n A: () => meridiem(hours, minutes),\n AA: () => meridiem(hours, minutes, false, true),\n a: () => meridiem(hours, minutes, true),\n aa: () => meridiem(hours, minutes, true, true)\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => {\n var _a2, _b;\n return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match;\n });\n}\nfunction normalizeDate(date) {\n if (date === null)\n return new Date(Number.NaN);\n if (date === void 0)\n return /* @__PURE__ */ new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n}\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n return computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = ref(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n const intervalValue = toValue(interval);\n if (intervalValue <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n timer = setInterval(cb, intervalValue);\n }\n if (immediate && isClient)\n resume();\n if (isRef(interval) || typeof interval === \"function\") {\n const stopWatch = watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true,\n callback\n } = options;\n const counter = ref(0);\n const update = () => counter.value += 1;\n const reset = () => {\n counter.value = 0;\n };\n const controls = useIntervalFn(\n callback ? () => {\n update();\n callback(counter.value);\n } : update,\n interval,\n { immediate }\n );\n if (exposeControls) {\n return {\n counter,\n reset,\n ...controls\n };\n } else {\n return counter;\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = ref((_a = options.initialValue) != null ? _a : null);\n watch(\n source,\n () => ms.value = timestamp(),\n options\n );\n return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true\n } = options;\n const isPending = ref(false);\n let timer = null;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = null;\n cb(...args);\n }, toValue(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending: readonly(isPending),\n start,\n stop\n };\n}\n\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n callback\n } = options;\n const controls = useTimeoutFn(\n callback != null ? callback : noop,\n interval,\n options\n );\n const ready = computed(() => !controls.isPending.value);\n if (exposeControls) {\n return {\n ready,\n ...controls\n };\n } else {\n return ready;\n }\n}\n\nfunction useToNumber(value, options = {}) {\n const {\n method = \"parseFloat\",\n radix,\n nanToZero\n } = options;\n return computed(() => {\n let resolved = toValue(value);\n if (typeof resolved === \"string\")\n resolved = Number[method](resolved, radix);\n if (nanToZero && Number.isNaN(resolved))\n resolved = 0;\n return resolved;\n });\n}\n\nfunction useToString(value) {\n return computed(() => `${toValue(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = isRef(initialValue);\n const _value = ref(initialValue);\n function toggle(value) {\n if (arguments.length) {\n _value.value = value;\n return _value.value;\n } else {\n const truthy = toValue(truthyValue);\n _value.value = _value.value === truthy ? toValue(falsyValue) : truthy;\n return _value.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)];\n return watch(source, (newList, _, onCleanup) => {\n const oldListRemains = Array.from({ length: oldList.length });\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nfunction watchAtMost(source, cb, options) {\n const {\n count,\n ...watchOptions\n } = options;\n const current = ref(0);\n const stop = watchWithFilter(\n source,\n (...args) => {\n current.value += 1;\n if (current.value >= toValue(count))\n nextTick(() => stop());\n cb(...args);\n },\n watchOptions\n );\n return { count: current, stop };\n}\n\nfunction watchDebounced(source, cb, options = {}) {\n const {\n debounce = 0,\n maxWait = void 0,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: debounceFilter(debounce, { maxWait })\n }\n );\n}\n\nfunction watchDeep(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n deep: true\n }\n );\n}\n\nfunction watchIgnorable(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n const filteredCb = createFilterWrapper(\n eventFilter,\n cb\n );\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n const ignore = ref(false);\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore.value = true;\n updater();\n ignore.value = false;\n };\n stop = watch(\n source,\n (...args) => {\n if (!ignore.value)\n filteredCb(...args);\n },\n watchOptions\n );\n } else {\n const disposables = [];\n const ignoreCounter = ref(0);\n const syncCounter = ref(0);\n ignorePrevAsyncUpdates = () => {\n ignoreCounter.value = syncCounter.value;\n };\n disposables.push(\n watch(\n source,\n () => {\n syncCounter.value++;\n },\n { ...watchOptions, flush: \"sync\" }\n )\n );\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter.value;\n updater();\n ignoreCounter.value += syncCounter.value - syncCounterPrev;\n };\n disposables.push(\n watch(\n source,\n (...args) => {\n const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n ignoreCounter.value = 0;\n syncCounter.value = 0;\n if (ignore)\n return;\n filteredCb(...args);\n },\n watchOptions\n )\n );\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchImmediate(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n immediate: true\n }\n );\n}\n\nfunction watchOnce(source, cb, options) {\n const stop = watch(source, (...args) => {\n nextTick(() => stop());\n return cb(...args);\n }, options);\n return stop;\n}\n\nfunction watchThrottled(source, cb, options = {}) {\n const {\n throttle = 0,\n trailing = true,\n leading = true,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: throttleFilter(throttle, trailing, leading)\n }\n );\n}\n\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return {\n ...res,\n trigger\n };\n}\nfunction getWatchSources(sources) {\n if (isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => toValue(item));\n return toValue(sources);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n return watch(\n source,\n (v, ov, onInvalidate) => {\n if (v)\n cb(v, ov, onInvalidate);\n },\n options\n );\n}\n\nexport { assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, provideLocal, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n"],"names":["tryOnScopeDispose","fn","getCurrentScope","onScopeDispose","toValue","r","unref"],"mappings":";AAgDA,SAASA,EAAkBC,GAAI;AAC7B,SAAIC,EAAe,KACjBC,EAAeF,CAAE,GACV,MAEF;AACT;AA0JA,SAASG,EAAQC,GAAG;AAClB,SAAO,OAAOA,KAAM,aAAaA,EAAC,IAAKC,EAAMD,CAAC;AAChD;AA6EiB,OAAO,oBAAsB,OAAe,sBAAsB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index220.js","sources":["../src/utilities/functions/groupBy.ts"],"sourcesContent":["/**\n * Creates an object with keys corresponding to the return value of iteratee and values correspond to arrays of items\n */\n\nexport const groupBy = <T>(\n arr: T[],\n iteratee: (item: T, index: number, arr: T[]) => string | number | symbol\n): Record<ReturnType<typeof iteratee>, T[]> => {\n return arr.reduce(\n (acc: { [key: ReturnType<typeof iteratee>]: T[] }, curr, index, arr) => {\n const key = iteratee(curr, index, arr);\n if (!(key in acc)) {\n acc[key] = [];\n }\n acc[key].push(curr);\n return acc;\n },\n {}\n );\n};\n"],"names":["groupBy","arr","iteratee","acc","curr","index","key"],"mappings":"AAIa,MAAAA,IAAU,CACrBC,GACAC,MAEOD,EAAI;AAAA,EACT,CAACE,GAAkDC,GAAMC,GAAOJ,MAAQ;AACtE,UAAMK,IAAMJ,EAASE,GAAMC,GAAOJ,CAAG;AACjC,WAAEK,KAAOH,MACPA,EAAAG,CAAG,IAAI,KAETH,EAAAG,CAAG,EAAE,KAAKF,CAAI,GACXD;AAAA,EACT;AAAA,EACA,CAAC;AAAA;"}
package/dist/index222.js CHANGED
@@ -1,8 +1,8 @@
1
- import { computePosition as F } from "./index202.js";
2
- import { autoUpdate as L, platform as N } from "./index202.js";
1
+ import { computePosition as F } from "./index201.js";
2
+ import { autoUpdate as L, platform as N } from "./index201.js";
3
3
  import { unref as o, computed as u, ref as i, shallowRef as U, watch as g, getCurrentScope as j, onScopeDispose as k, shallowReadonly as a } from "vue";
4
- import { arrow as q } from "./index210.js";
5
- import { detectOverflow as T, flip as W, offset as X, shift as Y } from "./index210.js";
4
+ import { arrow as q } from "./index209.js";
5
+ import { detectOverflow as T, flip as W, offset as X, shift as Y } from "./index209.js";
6
6
  function h(t) {
7
7
  var l;
8
8
  return (l = t == null ? void 0 : t.$el) != null ? l : t;
package/dist/index223.js CHANGED
@@ -1,4 +1,4 @@
1
- import { getDefaultExportFromCjs as f } from "./index231.js";
1
+ import { getDefaultExportFromCjs as f } from "./index229.js";
2
2
  import { M as s } from "./index249.js";
3
3
  import { s as m } from "./index250.js";
4
4
  import { o as p } from "./index251.js";
package/dist/index225.js CHANGED
@@ -1,4 +1,4 @@
1
- import { getDefaultExportFromCjs as F, commonjsGlobal as g } from "./index231.js";
1
+ import { getDefaultExportFromCjs as F, commonjsGlobal as g } from "./index229.js";
2
2
  var M = "Expected a function", S = 0 / 0, 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
3
  return P.Date.now();
4
4
  };
package/dist/index226.js CHANGED
@@ -1,438 +1,7 @@
1
- import { isFocusable as G, tabbable as te, focusable as ae, isTabbable as T, getTabIndex as K } from "./index229.js";
2
- /*!
3
- * focus-trap 7.5.4
4
- * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
5
- */
6
- function z(u, a) {
7
- var o = Object.keys(u);
8
- if (Object.getOwnPropertySymbols) {
9
- var i = Object.getOwnPropertySymbols(u);
10
- a && (i = i.filter(function(m) {
11
- return Object.getOwnPropertyDescriptor(u, m).enumerable;
12
- })), o.push.apply(o, i);
13
- }
14
- return o;
15
- }
16
- function J(u) {
17
- for (var a = 1; a < arguments.length; a++) {
18
- var o = arguments[a] != null ? arguments[a] : {};
19
- a % 2 ? z(Object(o), !0).forEach(function(i) {
20
- ne(u, i, o[i]);
21
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(u, Object.getOwnPropertyDescriptors(o)) : z(Object(o)).forEach(function(i) {
22
- Object.defineProperty(u, i, Object.getOwnPropertyDescriptor(o, i));
23
- });
24
- }
25
- return u;
26
- }
27
- function ne(u, a, o) {
28
- return a = ie(a), a in u ? Object.defineProperty(u, a, {
29
- value: o,
30
- enumerable: !0,
31
- configurable: !0,
32
- writable: !0
33
- }) : u[a] = o, u;
34
- }
35
- function re(u, a) {
36
- if (typeof u != "object" || u === null)
37
- return u;
38
- var o = u[Symbol.toPrimitive];
39
- if (o !== void 0) {
40
- var i = o.call(u, a || "default");
41
- if (typeof i != "object")
42
- return i;
43
- throw new TypeError("@@toPrimitive must return a primitive value.");
44
- }
45
- return (a === "string" ? String : Number)(u);
46
- }
47
- function ie(u) {
48
- var a = re(u, "string");
49
- return typeof a == "symbol" ? a : String(a);
50
- }
51
- var Q = {
52
- activateTrap: function(a, o) {
53
- if (a.length > 0) {
54
- var i = a[a.length - 1];
55
- i !== o && i.pause();
56
- }
57
- var m = a.indexOf(o);
58
- m === -1 || a.splice(m, 1), a.push(o);
59
- },
60
- deactivateTrap: function(a, o) {
61
- var i = a.indexOf(o);
62
- i !== -1 && a.splice(i, 1), a.length > 0 && a[a.length - 1].unpause();
63
- }
64
- }, oe = function(a) {
65
- return a.tagName && a.tagName.toLowerCase() === "input" && typeof a.select == "function";
66
- }, ue = function(a) {
67
- return (a == null ? void 0 : a.key) === "Escape" || (a == null ? void 0 : a.key) === "Esc" || (a == null ? void 0 : a.keyCode) === 27;
68
- }, L = function(a) {
69
- return (a == null ? void 0 : a.key) === "Tab" || (a == null ? void 0 : a.keyCode) === 9;
70
- }, se = function(a) {
71
- return L(a) && !a.shiftKey;
72
- }, ce = function(a) {
73
- return L(a) && a.shiftKey;
74
- }, W = function(a) {
75
- return setTimeout(a, 0);
76
- }, X = function(a, o) {
77
- var i = -1;
78
- return a.every(function(m, s) {
79
- return o(m) ? (i = s, !1) : !0;
80
- }), i;
81
- }, B = function(a) {
82
- for (var o = arguments.length, i = new Array(o > 1 ? o - 1 : 0), m = 1; m < o; m++)
83
- i[m - 1] = arguments[m];
84
- return typeof a == "function" ? a.apply(void 0, i) : a;
85
- }, C = function(a) {
86
- return a.target.shadowRoot && typeof a.composedPath == "function" ? a.composedPath()[0] : a.target;
87
- }, le = [], de = function(a, o) {
88
- var i = (o == null ? void 0 : o.document) || document, m = (o == null ? void 0 : o.trapStack) || le, s = J({
89
- returnFocusOnDeactivate: !0,
90
- escapeDeactivates: !0,
91
- delayInitialFocus: !0,
92
- isKeyForward: se,
93
- isKeyBackward: ce
94
- }, o), n = {
95
- // containers given to createFocusTrap()
96
- // @type {Array<HTMLElement>}
97
- containers: [],
98
- // list of objects identifying tabbable nodes in `containers` in the trap
99
- // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
100
- // is active, but the trap should never get to a state where there isn't at least one group
101
- // with at least one tabbable node in it (that would lead to an error condition that would
102
- // result in an error being thrown)
103
- // @type {Array<{
104
- // container: HTMLElement,
105
- // tabbableNodes: Array<HTMLElement>, // empty if none
106
- // focusableNodes: Array<HTMLElement>, // empty if none
107
- // posTabIndexesFound: boolean,
108
- // firstTabbableNode: HTMLElement|undefined,
109
- // lastTabbableNode: HTMLElement|undefined,
110
- // firstDomTabbableNode: HTMLElement|undefined,
111
- // lastDomTabbableNode: HTMLElement|undefined,
112
- // nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
113
- // }>}
114
- containerGroups: [],
115
- // same order/length as `containers` list
116
- // references to objects in `containerGroups`, but only those that actually have
117
- // tabbable nodes in them
118
- // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__
119
- // the same length
120
- tabbableGroups: [],
121
- nodeFocusedBeforeActivation: null,
122
- mostRecentlyFocusedNode: null,
123
- active: !1,
124
- paused: !1,
125
- // timer ID for when delayInitialFocus is true and initial focus in this trap
126
- // has been delayed during activation
127
- delayInitialFocusTimer: void 0,
128
- // the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
129
- recentNavEvent: void 0
130
- }, g, h = function(t, e, r) {
131
- return t && t[e] !== void 0 ? t[e] : s[r || e];
132
- }, F = function(t, e) {
133
- var r = typeof (e == null ? void 0 : e.composedPath) == "function" ? e.composedPath() : void 0;
134
- return n.containerGroups.findIndex(function(c) {
135
- var l = c.container, d = c.tabbableNodes;
136
- return l.contains(t) || // fall back to explicit tabbable search which will take into consideration any
137
- // web components if the `tabbableOptions.getShadowRoot` option was used for
138
- // the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
139
- // look inside web components even if open)
140
- (r == null ? void 0 : r.includes(l)) || d.find(function(v) {
141
- return v === t;
142
- });
143
- });
144
- }, E = function(t) {
145
- var e = s[t];
146
- if (typeof e == "function") {
147
- for (var r = arguments.length, c = new Array(r > 1 ? r - 1 : 0), l = 1; l < r; l++)
148
- c[l - 1] = arguments[l];
149
- e = e.apply(void 0, c);
150
- }
151
- if (e === !0 && (e = void 0), !e) {
152
- if (e === void 0 || e === !1)
153
- return e;
154
- throw new Error("`".concat(t, "` was specified but was not a node, or did not return a node"));
155
- }
156
- var d = e;
157
- if (typeof e == "string" && (d = i.querySelector(e), !d))
158
- throw new Error("`".concat(t, "` as selector refers to no known node"));
159
- return d;
160
- }, P = function() {
161
- var t = E("initialFocus");
162
- if (t === !1)
163
- return !1;
164
- if (t === void 0 || !G(t, s.tabbableOptions))
165
- if (F(i.activeElement) >= 0)
166
- t = i.activeElement;
167
- else {
168
- var e = n.tabbableGroups[0], r = e && e.firstTabbableNode;
169
- t = r || E("fallbackFocus");
170
- }
171
- if (!t)
172
- throw new Error("Your focus-trap needs to have at least one focusable element");
173
- return t;
174
- }, D = function() {
175
- if (n.containerGroups = n.containers.map(function(t) {
176
- var e = te(t, s.tabbableOptions), r = ae(t, s.tabbableOptions), c = e.length > 0 ? e[0] : void 0, l = e.length > 0 ? e[e.length - 1] : void 0, d = r.find(function(b) {
177
- return T(b);
178
- }), v = r.slice().reverse().find(function(b) {
179
- return T(b);
180
- }), p = !!e.find(function(b) {
181
- return K(b) > 0;
182
- });
183
- return {
184
- container: t,
185
- tabbableNodes: e,
186
- focusableNodes: r,
187
- /** True if at least one node with positive `tabindex` was found in this container. */
188
- posTabIndexesFound: p,
189
- /** First tabbable node in container, __tabindex__ order; `undefined` if none. */
190
- firstTabbableNode: c,
191
- /** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
192
- lastTabbableNode: l,
193
- // NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
194
- // would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
195
- // because that API doesn't work with Shadow DOM as well as it should (@see
196
- // https://github.com/whatwg/dom/issues/320) and since this first/last is only needed, so far,
197
- // to address an edge case related to positive tabindex support, this seems like a much easier,
198
- // "close enough most of the time" alternative for positive tabindexes which should generally
199
- // be avoided anyway...
200
- /** First tabbable node in container, __DOM__ order; `undefined` if none. */
201
- firstDomTabbableNode: d,
202
- /** Last tabbable node in container, __DOM__ order; `undefined` if none. */
203
- lastDomTabbableNode: v,
204
- /**
205
- * Finds the __tabbable__ node that follows the given node in the specified direction,
206
- * in this container, if any.
207
- * @param {HTMLElement} node
208
- * @param {boolean} [forward] True if going in forward tab order; false if going
209
- * in reverse.
210
- * @returns {HTMLElement|undefined} The next tabbable node, if any.
211
- */
212
- nextTabbableNode: function(N) {
213
- var O = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, y = e.indexOf(N);
214
- return y < 0 ? O ? r.slice(r.indexOf(N) + 1).find(function(R) {
215
- return T(R);
216
- }) : r.slice(0, r.indexOf(N)).reverse().find(function(R) {
217
- return T(R);
218
- }) : e[y + (O ? 1 : -1)];
219
- }
220
- };
221
- }), n.tabbableGroups = n.containerGroups.filter(function(t) {
222
- return t.tabbableNodes.length > 0;
223
- }), n.tabbableGroups.length <= 0 && !E("fallbackFocus"))
224
- throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
225
- if (n.containerGroups.find(function(t) {
226
- return t.posTabIndexesFound;
227
- }) && n.containerGroups.length > 1)
228
- throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
229
- }, Z = function f(t) {
230
- var e = t.activeElement;
231
- if (e)
232
- return e.shadowRoot && e.shadowRoot.activeElement !== null ? f(e.shadowRoot) : e;
233
- }, w = function f(t) {
234
- if (t !== !1 && t !== Z(document)) {
235
- if (!t || !t.focus) {
236
- f(P());
237
- return;
238
- }
239
- t.focus({
240
- preventScroll: !!s.preventScroll
241
- }), n.mostRecentlyFocusedNode = t, oe(t) && t.select();
242
- }
243
- }, S = function(t) {
244
- var e = E("setReturnFocus", t);
245
- return e || (e === !1 ? !1 : t);
246
- }, U = function(t) {
247
- var e = t.target, r = t.event, c = t.isBackward, l = c === void 0 ? !1 : c;
248
- e = e || C(r), D();
249
- var d = null;
250
- if (n.tabbableGroups.length > 0) {
251
- var v = F(e, r), p = v >= 0 ? n.containerGroups[v] : void 0;
252
- if (v < 0)
253
- l ? d = n.tabbableGroups[n.tabbableGroups.length - 1].lastTabbableNode : d = n.tabbableGroups[0].firstTabbableNode;
254
- else if (l) {
255
- var b = X(n.tabbableGroups, function(I) {
256
- var x = I.firstTabbableNode;
257
- return e === x;
258
- });
259
- if (b < 0 && (p.container === e || G(e, s.tabbableOptions) && !T(e, s.tabbableOptions) && !p.nextTabbableNode(e, !1)) && (b = v), b >= 0) {
260
- var N = b === 0 ? n.tabbableGroups.length - 1 : b - 1, O = n.tabbableGroups[N];
261
- d = K(e) >= 0 ? O.lastTabbableNode : O.lastDomTabbableNode;
262
- } else
263
- L(r) || (d = p.nextTabbableNode(e, !1));
264
- } else {
265
- var y = X(n.tabbableGroups, function(I) {
266
- var x = I.lastTabbableNode;
267
- return e === x;
268
- });
269
- if (y < 0 && (p.container === e || G(e, s.tabbableOptions) && !T(e, s.tabbableOptions) && !p.nextTabbableNode(e)) && (y = v), y >= 0) {
270
- var R = y === n.tabbableGroups.length - 1 ? 0 : y + 1, $ = n.tabbableGroups[R];
271
- d = K(e) >= 0 ? $.firstTabbableNode : $.firstDomTabbableNode;
272
- } else
273
- L(r) || (d = p.nextTabbableNode(e));
274
- }
275
- } else
276
- d = E("fallbackFocus");
277
- return d;
278
- }, A = function(t) {
279
- var e = C(t);
280
- if (!(F(e, t) >= 0)) {
281
- if (B(s.clickOutsideDeactivates, t)) {
282
- g.deactivate({
283
- // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
284
- // which will result in the outside click setting focus to the node
285
- // that was clicked (and if not focusable, to "nothing"); by setting
286
- // `returnFocus: true`, we'll attempt to re-focus the node originally-focused
287
- // on activation (or the configured `setReturnFocus` node), whether the
288
- // outside click was on a focusable node or not
289
- returnFocus: s.returnFocusOnDeactivate
290
- });
291
- return;
292
- }
293
- B(s.allowOutsideClick, t) || t.preventDefault();
294
- }
295
- }, q = function(t) {
296
- var e = C(t), r = F(e, t) >= 0;
297
- if (r || e instanceof Document)
298
- r && (n.mostRecentlyFocusedNode = e);
299
- else {
300
- t.stopImmediatePropagation();
301
- var c, l = !0;
302
- if (n.mostRecentlyFocusedNode)
303
- if (K(n.mostRecentlyFocusedNode) > 0) {
304
- var d = F(n.mostRecentlyFocusedNode), v = n.containerGroups[d].tabbableNodes;
305
- if (v.length > 0) {
306
- var p = v.findIndex(function(b) {
307
- return b === n.mostRecentlyFocusedNode;
308
- });
309
- p >= 0 && (s.isKeyForward(n.recentNavEvent) ? p + 1 < v.length && (c = v[p + 1], l = !1) : p - 1 >= 0 && (c = v[p - 1], l = !1));
310
- }
311
- } else
312
- n.containerGroups.some(function(b) {
313
- return b.tabbableNodes.some(function(N) {
314
- return K(N) > 0;
315
- });
316
- }) || (l = !1);
317
- else
318
- l = !1;
319
- l && (c = U({
320
- // move FROM the MRU node, not event-related node (which will be the node that is
321
- // outside the trap causing the focus escape we're trying to fix)
322
- target: n.mostRecentlyFocusedNode,
323
- isBackward: s.isKeyBackward(n.recentNavEvent)
324
- })), w(c || n.mostRecentlyFocusedNode || P());
325
- }
326
- n.recentNavEvent = void 0;
327
- }, _ = function(t) {
328
- var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
329
- n.recentNavEvent = t;
330
- var r = U({
331
- event: t,
332
- isBackward: e
333
- });
334
- r && (L(t) && t.preventDefault(), w(r));
335
- }, H = function(t) {
336
- if (ue(t) && B(s.escapeDeactivates, t) !== !1) {
337
- t.preventDefault(), g.deactivate();
338
- return;
339
- }
340
- (s.isKeyForward(t) || s.isKeyBackward(t)) && _(t, s.isKeyBackward(t));
341
- }, M = function(t) {
342
- var e = C(t);
343
- F(e, t) >= 0 || B(s.clickOutsideDeactivates, t) || B(s.allowOutsideClick, t) || (t.preventDefault(), t.stopImmediatePropagation());
344
- }, Y = function() {
345
- if (n.active)
346
- return Q.activateTrap(m, g), n.delayInitialFocusTimer = s.delayInitialFocus ? W(function() {
347
- w(P());
348
- }) : w(P()), i.addEventListener("focusin", q, !0), i.addEventListener("mousedown", A, {
349
- capture: !0,
350
- passive: !1
351
- }), i.addEventListener("touchstart", A, {
352
- capture: !0,
353
- passive: !1
354
- }), i.addEventListener("click", M, {
355
- capture: !0,
356
- passive: !1
357
- }), i.addEventListener("keydown", H, {
358
- capture: !0,
359
- passive: !1
360
- }), g;
361
- }, V = function() {
362
- if (n.active)
363
- return i.removeEventListener("focusin", q, !0), i.removeEventListener("mousedown", A, !0), i.removeEventListener("touchstart", A, !0), i.removeEventListener("click", M, !0), i.removeEventListener("keydown", H, !0), g;
364
- }, ee = function(t) {
365
- var e = t.some(function(r) {
366
- var c = Array.from(r.removedNodes);
367
- return c.some(function(l) {
368
- return l === n.mostRecentlyFocusedNode;
369
- });
370
- });
371
- e && w(P());
372
- }, j = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(ee) : void 0, k = function() {
373
- j && (j.disconnect(), n.active && !n.paused && n.containers.map(function(t) {
374
- j.observe(t, {
375
- subtree: !0,
376
- childList: !0
377
- });
378
- }));
379
- };
380
- return g = {
381
- get active() {
382
- return n.active;
383
- },
384
- get paused() {
385
- return n.paused;
386
- },
387
- activate: function(t) {
388
- if (n.active)
389
- return this;
390
- var e = h(t, "onActivate"), r = h(t, "onPostActivate"), c = h(t, "checkCanFocusTrap");
391
- c || D(), n.active = !0, n.paused = !1, n.nodeFocusedBeforeActivation = i.activeElement, e == null || e();
392
- var l = function() {
393
- c && D(), Y(), k(), r == null || r();
394
- };
395
- return c ? (c(n.containers.concat()).then(l, l), this) : (l(), this);
396
- },
397
- deactivate: function(t) {
398
- if (!n.active)
399
- return this;
400
- var e = J({
401
- onDeactivate: s.onDeactivate,
402
- onPostDeactivate: s.onPostDeactivate,
403
- checkCanReturnFocus: s.checkCanReturnFocus
404
- }, t);
405
- clearTimeout(n.delayInitialFocusTimer), n.delayInitialFocusTimer = void 0, V(), n.active = !1, n.paused = !1, k(), Q.deactivateTrap(m, g);
406
- var r = h(e, "onDeactivate"), c = h(e, "onPostDeactivate"), l = h(e, "checkCanReturnFocus"), d = h(e, "returnFocus", "returnFocusOnDeactivate");
407
- r == null || r();
408
- var v = function() {
409
- W(function() {
410
- d && w(S(n.nodeFocusedBeforeActivation)), c == null || c();
411
- });
412
- };
413
- return d && l ? (l(S(n.nodeFocusedBeforeActivation)).then(v, v), this) : (v(), this);
414
- },
415
- pause: function(t) {
416
- if (n.paused || !n.active)
417
- return this;
418
- var e = h(t, "onPause"), r = h(t, "onPostPause");
419
- return n.paused = !0, e == null || e(), V(), k(), r == null || r(), this;
420
- },
421
- unpause: function(t) {
422
- if (!n.paused || !n.active)
423
- return this;
424
- var e = h(t, "onUnpause"), r = h(t, "onPostUnpause");
425
- return n.paused = !1, e == null || e(), D(), Y(), k(), r == null || r(), this;
426
- },
427
- updateContainerElements: function(t) {
428
- var e = [].concat(t).filter(Boolean);
429
- return n.containers = e.map(function(r) {
430
- return typeof r == "string" ? i.querySelector(r) : r;
431
- }), n.active && D(), k(), this;
432
- }
433
- }, g.updateContainerElements(a), g;
1
+ const e = function(t) {
2
+ return (...n) => n.length >= t.length ? t(...n) : e(t.bind(void 0, ...n));
434
3
  };
435
4
  export {
436
- de as createFocusTrap
5
+ e as curry
437
6
  };
438
7
  //# sourceMappingURL=index226.js.map