bitboss-ui 0.2.52 → 0.2.54

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 (142) hide show
  1. package/dist/index101.js +2 -2
  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 +3 -3
  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/index125.js +1 -1
  12. package/dist/index126.js +1 -1
  13. package/dist/index127.js +1 -1
  14. package/dist/index131.js +2 -2
  15. package/dist/index15.js +8 -8
  16. package/dist/index17.js +9 -9
  17. package/dist/index19.js +3 -3
  18. package/dist/index197.js +5 -2
  19. package/dist/index197.js.map +1 -1
  20. package/dist/index198.js +16 -4
  21. package/dist/index198.js.map +1 -1
  22. package/dist/index199.js +16 -3
  23. package/dist/index199.js.map +1 -1
  24. package/dist/index200.js +19 -35
  25. package/dist/index200.js.map +1 -1
  26. package/dist/index201.js +20 -6
  27. package/dist/index201.js.map +1 -1
  28. package/dist/index202.js +29 -3
  29. package/dist/index202.js.map +1 -1
  30. package/dist/index203.js +8 -3
  31. package/dist/index203.js.map +1 -1
  32. package/dist/index204.js +2 -368
  33. package/dist/index204.js.map +1 -1
  34. package/dist/index205.js +3 -134
  35. package/dist/index205.js.map +1 -1
  36. package/dist/index206.js +35 -5
  37. package/dist/index206.js.map +1 -1
  38. package/dist/index207.js +6 -19
  39. package/dist/index207.js.map +1 -1
  40. package/dist/index208.js +2 -2
  41. package/dist/index208.js.map +1 -1
  42. package/dist/index209.js +4 -2
  43. package/dist/index209.js.map +1 -1
  44. package/dist/index21.js +2 -2
  45. package/dist/index210.js +226 -165
  46. package/dist/index210.js.map +1 -1
  47. package/dist/index211.js +368 -23
  48. package/dist/index211.js.map +1 -1
  49. package/dist/index212.js +126 -365
  50. package/dist/index212.js.map +1 -1
  51. package/dist/index213.js +2 -10
  52. package/dist/index213.js.map +1 -1
  53. package/dist/index214.js +174 -2
  54. package/dist/index214.js.map +1 -1
  55. package/dist/index215.js +23 -2
  56. package/dist/index215.js.map +1 -1
  57. package/dist/index216.js +363 -225
  58. package/dist/index216.js.map +1 -1
  59. package/dist/index217.js +10 -16
  60. package/dist/index217.js.map +1 -1
  61. package/dist/index218.js +2 -16
  62. package/dist/index218.js.map +1 -1
  63. package/dist/index219.js +3 -20
  64. package/dist/index219.js.map +1 -1
  65. package/dist/index220.js +3 -29
  66. package/dist/index220.js.map +1 -1
  67. package/dist/index221.js +2 -8
  68. package/dist/index221.js.map +1 -1
  69. package/dist/index223.js +4 -4
  70. package/dist/index224.js +79 -6
  71. package/dist/index224.js.map +1 -1
  72. package/dist/index225.js +6 -17
  73. package/dist/index225.js.map +1 -1
  74. package/dist/index226.js +17 -4
  75. package/dist/index226.js.map +1 -1
  76. package/dist/index227.js +294 -78
  77. package/dist/index227.js.map +1 -1
  78. package/dist/index228.js +5 -434
  79. package/dist/index228.js.map +1 -1
  80. package/dist/index229.js +2 -89
  81. package/dist/index229.js.map +1 -1
  82. package/dist/index230.js +2 -200
  83. package/dist/index230.js.map +1 -1
  84. package/dist/index231.js +2 -2
  85. package/dist/index231.js.map +1 -1
  86. package/dist/index232.js +2 -224
  87. package/dist/index232.js.map +1 -1
  88. package/dist/index233.js +2 -258
  89. package/dist/index233.js.map +1 -1
  90. package/dist/index234.js +2 -6
  91. package/dist/index234.js.map +1 -1
  92. package/dist/index235.js +2 -2
  93. package/dist/index235.js.map +1 -1
  94. package/dist/index236.js +431 -291
  95. package/dist/index236.js.map +1 -1
  96. package/dist/index237.js +89 -2
  97. package/dist/index237.js.map +1 -1
  98. package/dist/index238.js +4 -2
  99. package/dist/index238.js.map +1 -1
  100. package/dist/index239.js +199 -116
  101. package/dist/index239.js.map +1 -1
  102. package/dist/index240.js +5 -106
  103. package/dist/index240.js.map +1 -1
  104. package/dist/index241.js +61 -152
  105. package/dist/index241.js.map +1 -1
  106. package/dist/index242.js +162 -1
  107. package/dist/index242.js.map +1 -1
  108. package/dist/index243.js +1 -71
  109. package/dist/index243.js.map +1 -1
  110. package/dist/index244.js +2 -5
  111. package/dist/index244.js.map +1 -1
  112. package/dist/index245.js +2 -15
  113. package/dist/index245.js.map +1 -1
  114. package/dist/index246.js +117 -2
  115. package/dist/index246.js.map +1 -1
  116. package/dist/index247.js +106 -2
  117. package/dist/index247.js.map +1 -1
  118. package/dist/index248.js +224 -2
  119. package/dist/index248.js.map +1 -1
  120. package/dist/index249.js +258 -2
  121. package/dist/index249.js.map +1 -1
  122. package/dist/index25.js +2 -2
  123. package/dist/index250.js +15 -2
  124. package/dist/index250.js.map +1 -1
  125. package/dist/index254.js +1 -1
  126. package/dist/index255.js +2 -2
  127. package/dist/index29.js +3 -3
  128. package/dist/index31.js +123 -123
  129. package/dist/index31.js.map +1 -1
  130. package/dist/index33.js +1 -1
  131. package/dist/index35.js +2 -2
  132. package/dist/index47.js +1 -1
  133. package/dist/index49.js +1 -1
  134. package/dist/index65.js +3 -3
  135. package/dist/index69.js +13 -13
  136. package/dist/index69.js.map +1 -1
  137. package/dist/index72.js +1 -1
  138. package/dist/index75.js +1 -1
  139. package/dist/index77.js +1 -1
  140. package/dist/index79.js +3 -3
  141. package/dist/style.css +1 -1
  142. package/package.json +1 -1
package/dist/index206.js CHANGED
@@ -1,8 +1,38 @@
1
- import { getDefaultExportFromCjs as r } from "./index234.js";
2
- import { __require as o } from "./index236.js";
3
- var t = o();
4
- const s = /* @__PURE__ */ r(t);
1
+ import { unrefElement as m } from "./index131.js";
2
+ import { ref as u, watch as l } from "vue";
3
+ import { createFocusTrap as d } from "./index236.js";
4
+ import { tryOnScopeDispose as D } from "./index217.js";
5
+ function O(i, a = {}) {
6
+ let e;
7
+ const { immediate: f, ...n } = a, c = u(!1), s = u(!1), o = (t) => e && e.activate(t), r = (t) => e && e.deactivate(t), v = () => {
8
+ e && (e.pause(), s.value = !0);
9
+ }, p = () => {
10
+ e && (e.unpause(), s.value = !1);
11
+ };
12
+ return l(
13
+ () => m(i),
14
+ (t) => {
15
+ t && (e = d(t, {
16
+ ...n,
17
+ onActivate() {
18
+ c.value = !0, a.onActivate && a.onActivate();
19
+ },
20
+ onDeactivate() {
21
+ c.value = !1, a.onDeactivate && a.onDeactivate();
22
+ }
23
+ }), f && o());
24
+ },
25
+ { flush: "post" }
26
+ ), D(() => r()), {
27
+ hasFocus: c,
28
+ isPaused: s,
29
+ activate: o,
30
+ deactivate: r,
31
+ pause: v,
32
+ unpause: p
33
+ };
34
+ }
5
35
  export {
6
- s as default
36
+ O as useFocusTrap
7
37
  };
8
38
  //# sourceMappingURL=index206.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index206.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"index206.js","sources":["../node_modules/@vueuse/integrations/useFocusTrap.mjs"],"sourcesContent":["import { unrefElement, tryOnScopeDispose } from '@vueuse/core';\nimport { ref, watch } from 'vue-demi';\nimport { createFocusTrap } from 'focus-trap';\n\nfunction useFocusTrap(target, options = {}) {\n let trap;\n const { immediate, ...focusTrapOptions } = options;\n const hasFocus = ref(false);\n const isPaused = ref(false);\n const activate = (opts) => trap && trap.activate(opts);\n const deactivate = (opts) => trap && trap.deactivate(opts);\n const pause = () => {\n if (trap) {\n trap.pause();\n isPaused.value = true;\n }\n };\n const unpause = () => {\n if (trap) {\n trap.unpause();\n isPaused.value = false;\n }\n };\n watch(\n () => unrefElement(target),\n (el) => {\n if (!el)\n return;\n trap = createFocusTrap(el, {\n ...focusTrapOptions,\n onActivate() {\n hasFocus.value = true;\n if (options.onActivate)\n options.onActivate();\n },\n onDeactivate() {\n hasFocus.value = false;\n if (options.onDeactivate)\n options.onDeactivate();\n }\n });\n if (immediate)\n activate();\n },\n { flush: \"post\" }\n );\n tryOnScopeDispose(() => deactivate());\n return {\n hasFocus,\n isPaused,\n activate,\n deactivate,\n pause,\n unpause\n };\n}\n\nexport { useFocusTrap };\n"],"names":["useFocusTrap","target","options","trap","immediate","focusTrapOptions","hasFocus","ref","isPaused","activate","opts","deactivate","pause","unpause","watch","unrefElement","el","createFocusTrap","tryOnScopeDispose"],"mappings":";;;;AAIA,SAASA,EAAaC,GAAQC,IAAU,IAAI;AAC1C,MAAIC;AACJ,QAAM,EAAE,WAAAC,GAAW,GAAGC,EAAgB,IAAKH,GACrCI,IAAWC,EAAI,EAAK,GACpBC,IAAWD,EAAI,EAAK,GACpBE,IAAW,CAACC,MAASP,KAAQA,EAAK,SAASO,CAAI,GAC/CC,IAAa,CAACD,MAASP,KAAQA,EAAK,WAAWO,CAAI,GACnDE,IAAQ,MAAM;AAClB,IAAIT,MACFA,EAAK,MAAK,GACVK,EAAS,QAAQ;AAAA,EAEvB,GACQK,IAAU,MAAM;AACpB,IAAIV,MACFA,EAAK,QAAO,GACZK,EAAS,QAAQ;AAAA,EAEvB;AACE,SAAAM;AAAA,IACE,MAAMC,EAAad,CAAM;AAAA,IACzB,CAACe,MAAO;AACN,MAAKA,MAELb,IAAOc,EAAgBD,GAAI;AAAA,QACzB,GAAGX;AAAA,QACH,aAAa;AACX,UAAAC,EAAS,QAAQ,IACbJ,EAAQ,cACVA,EAAQ,WAAU;AAAA,QACrB;AAAA,QACD,eAAe;AACb,UAAAI,EAAS,QAAQ,IACbJ,EAAQ,gBACVA,EAAQ,aAAY;AAAA,QACvB;AAAA,MACT,CAAO,GACGE,KACFK;IACH;AAAA,IACD,EAAE,OAAO,OAAQ;AAAA,EACrB,GACES,EAAkB,MAAMP,EAAU,CAAE,GAC7B;AAAA,IACL,UAAAL;AAAA,IACA,UAAAE;AAAA,IACA,UAAAC;AAAA,IACA,YAAAE;AAAA,IACA,OAAAC;AAAA,IACA,SAAAC;AAAA,EACJ;AACA;","x_google_ignoreList":[0]}
package/dist/index207.js CHANGED
@@ -1,22 +1,9 @@
1
- import { getDefaultExportFromCjs as i, commonjsGlobal as m } from "./index234.js";
2
- import { __module as _ } from "./index238.js";
3
- import { __require as s } from "./index236.js";
4
- (function(n, d) {
5
- (function(t, o) {
6
- n.exports = o(s());
7
- })(m, function(t) {
8
- function o(e) {
9
- return e && typeof e == "object" && "default" in e ? e : { default: e };
10
- }
11
- var a = o(t), r = { name: "it", weekdays: "domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"), weekdaysShort: "dom_lun_mar_mer_gio_ven_sab".split("_"), weekdaysMin: "do_lu_ma_me_gi_ve_sa".split("_"), months: "gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"), weekStart: 1, monthsShort: "gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"), formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY HH:mm", LLLL: "dddd D MMMM YYYY HH:mm" }, relativeTime: { future: "tra %s", past: "%s fa", s: "qualche secondo", m: "un minuto", mm: "%d minuti", h: "un' ora", hh: "%d ore", d: "un giorno", dd: "%d giorni", M: "un mese", MM: "%d mesi", y: "un anno", yy: "%d anni" }, ordinal: function(e) {
12
- return e + "º";
13
- } };
14
- return a.default.locale(r, null, !0), r;
15
- });
16
- })(_);
17
- var u = _.exports;
18
- const p = /* @__PURE__ */ i(u);
1
+ const o = (e, t = 50) => new Promise((r) => {
2
+ const n = setInterval(() => {
3
+ e() && (clearInterval(n), r());
4
+ }, t);
5
+ });
19
6
  export {
20
- p as default
7
+ o as waitFor
21
8
  };
22
9
  //# sourceMappingURL=index207.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index207.js","sources":["../node_modules/dayjs/locale/it.js"],"sourcesContent":["!function(e,o){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=o(require(\"dayjs\")):\"function\"==typeof define&&define.amd?define([\"dayjs\"],o):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_locale_it=o(e.dayjs)}(this,(function(e){\"use strict\";function o(e){return e&&\"object\"==typeof e&&\"default\"in e?e:{default:e}}var t=o(e),n={name:\"it\",weekdays:\"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato\".split(\"_\"),weekdaysShort:\"dom_lun_mar_mer_gio_ven_sab\".split(\"_\"),weekdaysMin:\"do_lu_ma_me_gi_ve_sa\".split(\"_\"),months:\"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre\".split(\"_\"),weekStart:1,monthsShort:\"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic\".split(\"_\"),formats:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd D MMMM YYYY HH:mm\"},relativeTime:{future:\"tra %s\",past:\"%s fa\",s:\"qualche secondo\",m:\"un minuto\",mm:\"%d minuti\",h:\"un' ora\",hh:\"%d ore\",d:\"un giorno\",dd:\"%d giorni\",M:\"un mese\",MM:\"%d mesi\",y:\"un anno\",yy:\"%d anni\"},ordinal:function(e){return e+\"º\"}};return t.default.locale(n,null,!0),n}));"],"names":["e","module","require$$0","this","t","n"],"mappings":";;;;AAAA,GAAC,SAASA,GAAE,GAAE;AAAsD,IAAAC,EAAA,UAAe,EAAEC,EAAgB,CAAA;AAAA,EAA4I,GAAEC,GAAM,SAASH,GAAE;AAAc,aAAS,EAAE,GAAE;AAAC,aAAO,KAAa,OAAO,KAAjB,YAAoB,aAAY,IAAE,IAAE,EAAC,SAAQ,EAAC;AAAA,IAAC;AAAC,QAAII,IAAE,EAAEJ,CAAC,GAAEK,IAAE,EAAC,MAAK,MAAK,UAAS,2DAA2D,MAAM,GAAG,GAAE,eAAc,8BAA8B,MAAM,GAAG,GAAE,aAAY,uBAAuB,MAAM,GAAG,GAAE,QAAO,gGAAgG,MAAM,GAAG,GAAE,WAAU,GAAE,aAAY,kDAAkD,MAAM,GAAG,GAAE,SAAQ,EAAC,IAAG,SAAQ,KAAI,YAAW,GAAE,cAAa,IAAG,eAAc,KAAI,qBAAoB,MAAK,yBAAwB,GAAE,cAAa,EAAC,QAAO,UAAS,MAAK,SAAQ,GAAE,mBAAkB,GAAE,aAAY,IAAG,aAAY,GAAE,WAAU,IAAG,UAAS,GAAE,aAAY,IAAG,aAAY,GAAE,WAAU,IAAG,WAAU,GAAE,WAAU,IAAG,UAAS,GAAE,SAAQ,SAAS,GAAE;AAAC,aAAO,IAAE;AAAA,IAAG,EAAC;AAAE,WAAOD,EAAE,QAAQ,OAAOC,GAAE,MAAK,EAAE,GAAEA;AAAA,EAAC,CAAC;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index207.js","sources":["../src/utilities/functions/waitFor.ts"],"sourcesContent":["/** Wait until iteratee returns true to resolve the promise */\nexport const waitFor: (\n\titeratee: () => boolean,\n\tinterval?: number\n) => Promise<void> = (iteratee, interval = 50) =>\n\tnew Promise((resolve) => {\n\t\tconst i = setInterval(() => {\n\t\t\tif (iteratee()) {\n\t\t\t\tclearInterval(i);\n\t\t\t\tresolve();\n\t\t\t}\n\t\t}, interval);\n\t});\n"],"names":["waitFor","iteratee","interval","resolve","i"],"mappings":"AACa,MAAAA,IAGQ,CAACC,GAAUC,IAAW,OAC1C,IAAI,QAAQ,CAACC,MAAY;AAClB,QAAAC,IAAI,YAAY,MAAM;AAC3B,IAAIH,QACH,cAAcG,CAAC,GACPD;KAEPD,CAAQ;AACZ,CAAC;"}
package/dist/index208.js CHANGED
@@ -1,5 +1,5 @@
1
- const e = (t) => t;
1
+ const s = (r) => !!r && !!r.match(/^(#|var\(--|(rgb|hsl)a?\()/);
2
2
  export {
3
- e as identity
3
+ s as isCssColor
4
4
  };
5
5
  //# sourceMappingURL=index208.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index208.js","sources":["../src/utilities/functions/identity.ts"],"sourcesContent":["export const identity = <T>(x: T) => x;\n"],"names":["identity","x"],"mappings":"AAAa,MAAAA,IAAW,CAAIC,MAASA;"}
1
+ {"version":3,"file":"index208.js","sources":["../src/utilities/functions/isCssColor.ts"],"sourcesContent":["/**\n * Taken from vuetify colorable mixin\n * https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/mixins/colorable/index.ts\n */\nexport const isCssColor = (color: string): boolean => {\n\treturn !!color && !!color.match(/^(#|var\\(--|(rgb|hsl)a?\\()/);\n};\n"],"names":["isCssColor","color"],"mappings":"AAIa,MAAAA,IAAa,CAACC,MACnB,CAAC,CAACA,KAAS,CAAC,CAACA,EAAM,MAAM,4BAA4B;"}
package/dist/index209.js CHANGED
@@ -1,5 +1,7 @@
1
- const e = (t) => t[t.length - 1];
1
+ import { curry as e } from "./index238.js";
2
+ const t = (n, o, r) => n(r) ? o(r) : r, s = e(t);
2
3
  export {
3
- e as last
4
+ t as baseWhen,
5
+ s as when
4
6
  };
5
7
  //# sourceMappingURL=index209.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index209.js","sources":["../src/utilities/functions/last.ts"],"sourcesContent":["/** Takes an array and returns the last element of it */\nexport const last = <T>(arr: T[]) => arr[arr.length - 1];\n"],"names":["last","arr"],"mappings":"AACO,MAAMA,IAAO,CAAIC,MAAaA,EAAIA,EAAI,SAAS,CAAC;"}
1
+ {"version":3,"file":"index209.js","sources":["../src/utilities/functions/when.ts"],"sourcesContent":["import { curry } from './curry';\n/**\n * Runs fn on item if iteratee(item) is thruthy\n * @param iteratee The test\n * @param item The item to test\n * @param fn The transformer function\n * @returns\n */\nexport const baseWhen = <T, U>(\n\titeratee: (item: T) => boolean,\n\tfn: (item: T) => U,\n\titem: T\n) => {\n\tif (iteratee(item)) return fn(item);\n\treturn item;\n};\n\nexport const when = curry(baseWhen);\n"],"names":["baseWhen","iteratee","fn","item","when","curry"],"mappings":";AAQO,MAAMA,IAAW,CACvBC,GACAC,GACAC,MAEIF,EAASE,CAAI,IAAUD,EAAGC,CAAI,IAC3BA,GAGKC,IAAOC,EAAML,CAAQ;"}
package/dist/index21.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as $, computed as n, openBlock as i, createElementBlock as b, createBlock as h, resolveDynamicComponent as v, normalizeProps as o, guardReactiveProps as l, withCtx as c, renderSlot as _, createTextVNode as A, toDisplayString as g, createElementVNode as E, unref as z, createVNode as S, Fragment as T, renderList as V } from "vue";
2
- import { deburr as N } from "./index202.js";
2
+ import { deburr as N } from "./index219.js";
3
3
  import { getAsPercentage as P } from "./index121.js";
4
- import { snakeCase as D } from "./index203.js";
4
+ import { snakeCase as D } from "./index220.js";
5
5
  import { useId as I } from "./index7.js";
6
6
  import F from "./index118.js";
7
7
  import "./index183.js";
package/dist/index210.js CHANGED
@@ -1,177 +1,238 @@
1
- /*! maska v2.1.11 | (c) Alexander Shabunevich | Released under the MIT license */
2
- var V = Object.defineProperty, P = (a, t, e) => t in a ? V(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e, g = (a, t, e) => (P(a, typeof t != "symbol" ? t + "" : t, e), e);
3
- const R = {
4
- "#": { pattern: /[0-9]/ },
5
- "@": { pattern: /[a-zA-Z]/ },
6
- "*": { pattern: /[a-zA-Z0-9]/ }
7
- };
8
- class b {
9
- constructor(t = {}) {
10
- g(this, "opts", {}), g(this, "memo", /* @__PURE__ */ new Map());
11
- const e = { ...t };
12
- if (e.tokens != null) {
13
- e.tokens = e.tokensReplace ? { ...e.tokens } : { ...R, ...e.tokens };
14
- for (const s of Object.values(e.tokens))
15
- typeof s.pattern == "string" && (s.pattern = new RegExp(s.pattern));
16
- } else
17
- e.tokens = R;
18
- Array.isArray(e.mask) && (e.mask.length > 1 ? e.mask = [...e.mask].sort((s, n) => s.length - n.length) : e.mask = e.mask[0] ?? ""), e.mask === "" && (e.mask = null), this.opts = e;
19
- }
20
- masked(t) {
21
- return this.process(t, this.findMask(t));
22
- }
23
- unmasked(t) {
24
- return this.process(t, this.findMask(t), !1);
25
- }
26
- isEager() {
27
- return this.opts.eager === !0;
28
- }
29
- isReversed() {
30
- return this.opts.reversed === !0;
31
- }
32
- completed(t) {
33
- const e = this.findMask(t);
34
- if (this.opts.mask == null || e == null)
35
- return !1;
36
- const s = this.process(t, e).length;
37
- return typeof this.opts.mask == "string" ? s >= this.opts.mask.length : typeof this.opts.mask == "function" ? s >= e.length : this.opts.mask.filter((n) => s >= n.length).length === this.opts.mask.length;
38
- }
39
- findMask(t) {
40
- const e = this.opts.mask;
41
- if (e == null)
42
- return null;
43
- if (typeof e == "string")
44
- return e;
45
- if (typeof e == "function")
46
- return e(t);
47
- const s = this.process(t, e.slice(-1).pop() ?? "", !1);
48
- return e.find((n) => this.process(t, n, !1).length >= s.length) ?? "";
49
- }
50
- escapeMask(t) {
51
- const e = [], s = [];
52
- return t.split("").forEach((n, i) => {
53
- n === "!" && t[i - 1] !== "!" ? s.push(i - s.length) : e.push(n);
54
- }), { mask: e.join(""), escaped: s };
55
- }
56
- process(t, e, s = !0) {
57
- if (e == null)
58
- return t;
59
- const n = `value=${t},mask=${e},masked=${s ? 1 : 0}`;
60
- if (this.memo.has(n))
61
- return this.memo.get(n);
62
- const { mask: i, escaped: p } = this.escapeMask(e), o = [], k = this.opts.tokens != null ? this.opts.tokens : {}, l = this.isReversed() ? -1 : 1, m = this.isReversed() ? "unshift" : "push", c = this.isReversed() ? 0 : i.length - 1, T = this.isReversed() ? () => r > -1 && u > -1 : () => r < i.length && u < t.length, S = (d) => !this.isReversed() && d <= c || this.isReversed() && d >= c;
63
- let E, f = -1, r = this.isReversed() ? i.length - 1 : 0, u = this.isReversed() ? t.length - 1 : 0, y = !1;
64
- for (; T(); ) {
65
- const d = i.charAt(r), h = k[d], v = (h == null ? void 0 : h.transform) != null ? h.transform(t.charAt(u)) : t.charAt(u);
66
- if (!p.includes(r) && h != null ? (v.match(h.pattern) != null ? (o[m](v), h.repeated ? (f === -1 ? f = r : r === c && r !== f && (r = f - l), c === f && (r -= l)) : h.multiple && (y = !0, r -= l), r += l) : h.multiple ? y && (r += l, u -= l, y = !1) : v === E ? E = void 0 : h.optional && (r += l, u -= l), u += l) : (s && !this.isEager() && o[m](d), v === d && !this.isEager() ? u += l : E = d, this.isEager() || (r += l)), this.isEager())
67
- for (; S(r) && (k[i.charAt(r)] == null || p.includes(r)); )
68
- s ? o[m](i.charAt(r)) : i.charAt(r) === t.charAt(u) && (u += l), r += l;
1
+ import { commonjsGlobal as f, getDefaultExportFromCjs as $ } from "./index228.js";
2
+ var D = "Expected a function", O = "__lodash_hash_undefined__", j = 1 / 0, F = "[object Function]", N = "[object GeneratorFunction]", H = "[object Symbol]", G = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, R = /^\w*$/, A = /^\./, M = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, K = /[\\^$.*+?()[\]{}|]/g, L = /\\(\\)?/g, z = /^\[object .+?Constructor\]$/, U = typeof f == "object" && f && f.Object === Object && f, q = typeof self == "object" && self && self.Object === Object && self, d = U || q || Function("return this")();
3
+ function J(t, e) {
4
+ return t == null ? void 0 : t[e];
5
+ }
6
+ function V(t) {
7
+ var e = !1;
8
+ if (t != null && typeof t.toString != "function")
9
+ try {
10
+ e = !!(t + "");
11
+ } catch {
69
12
  }
70
- return this.memo.set(n, o.join("")), this.memo.get(n);
71
- }
13
+ return e;
72
14
  }
73
- const O = (a) => JSON.parse(a.replaceAll("'", '"')), w = (a, t = {}) => {
74
- const e = { ...t };
75
- return a.dataset.maska != null && a.dataset.maska !== "" && (e.mask = W(a.dataset.maska)), a.dataset.maskaEager != null && (e.eager = M(a.dataset.maskaEager)), a.dataset.maskaReversed != null && (e.reversed = M(a.dataset.maskaReversed)), a.dataset.maskaTokensReplace != null && (e.tokensReplace = M(a.dataset.maskaTokensReplace)), a.dataset.maskaTokens != null && (e.tokens = j(a.dataset.maskaTokens)), e;
76
- }, M = (a) => a !== "" ? !!JSON.parse(a) : !0, W = (a) => a.startsWith("[") && a.endsWith("]") ? O(a) : a, j = (a) => {
77
- if (a.startsWith("{") && a.endsWith("}"))
78
- return O(a);
79
- const t = {};
80
- return a.split("|").forEach((e) => {
81
- const s = e.split(":");
82
- t[s[0]] = {
83
- pattern: new RegExp(s[1]),
84
- optional: s[2] === "optional",
85
- multiple: s[2] === "multiple",
86
- repeated: s[2] === "repeated"
87
- };
88
- }), t;
89
- };
90
- class L {
91
- constructor(t, e = {}) {
92
- g(this, "items", /* @__PURE__ */ new Map()), g(this, "beforeinputEvent", (s) => {
93
- const n = s.target, i = this.items.get(n);
94
- i.isEager() && "inputType" in s && s.inputType.startsWith("delete") && i.unmasked(n.value).length <= 1 && this.setMaskedValue(n, "");
95
- }), g(this, "inputEvent", (s) => {
96
- if (s instanceof CustomEvent && s.type === "input" && s.detail != null && typeof s.detail == "object" && "masked" in s.detail)
97
- return;
98
- const n = s.target, i = this.items.get(n), p = n.value, o = n.selectionStart, k = n.selectionEnd;
99
- let l = p;
100
- if (i.isEager()) {
101
- const m = i.masked(p), c = i.unmasked(p);
102
- c === "" && "data" in s && s.data != null ? l = s.data : c !== i.unmasked(m) && (l = c);
103
- }
104
- if (this.setMaskedValue(n, l), "inputType" in s && (s.inputType.startsWith("delete") || o != null && o < p.length))
105
- try {
106
- n.setSelectionRange(o, k);
107
- } catch {
108
- }
109
- }), this.options = e, typeof t == "string" ? this.init(
110
- Array.from(document.querySelectorAll(t)),
111
- this.getMaskOpts(e)
112
- ) : this.init(
113
- "length" in t ? Array.from(t) : [t],
114
- this.getMaskOpts(e)
115
- );
116
- }
117
- destroy() {
118
- for (const t of this.items.keys())
119
- t.removeEventListener("input", this.inputEvent), t.removeEventListener("beforeinput", this.beforeinputEvent);
120
- this.items.clear();
15
+ var X = Array.prototype, Y = Function.prototype, w = Object.prototype, l = d["__core-js_shared__"], m = function() {
16
+ var t = /[^.]+$/.exec(l && l.keys && l.keys.IE_PROTO || "");
17
+ return t ? "Symbol(src)_1." + t : "";
18
+ }(), x = Y.toString, _ = w.hasOwnProperty, P = w.toString, B = RegExp(
19
+ "^" + x.call(_).replace(K, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
20
+ ), C = d.Symbol, Q = X.splice, W = T(d, "Map"), u = T(Object, "create"), v = C ? C.prototype : void 0, S = v ? v.toString : void 0;
21
+ function a(t) {
22
+ var e = -1, r = t ? t.length : 0;
23
+ for (this.clear(); ++e < r; ) {
24
+ var n = t[e];
25
+ this.set(n[0], n[1]);
121
26
  }
122
- needUpdateOptions(t, e) {
123
- const s = this.items.get(t), n = new b(w(t, this.getMaskOpts(e)));
124
- return JSON.stringify(s.opts) !== JSON.stringify(n.opts);
27
+ }
28
+ function Z() {
29
+ this.__data__ = u ? u(null) : {};
30
+ }
31
+ function k(t) {
32
+ return this.has(t) && delete this.__data__[t];
33
+ }
34
+ function tt(t) {
35
+ var e = this.__data__;
36
+ if (u) {
37
+ var r = e[t];
38
+ return r === O ? void 0 : r;
125
39
  }
126
- needUpdateValue(t) {
127
- const e = t.dataset.maskaValue;
128
- return e == null && t.value !== "" || e != null && e !== t.value;
40
+ return _.call(e, t) ? e[t] : void 0;
41
+ }
42
+ function et(t) {
43
+ var e = this.__data__;
44
+ return u ? e[t] !== void 0 : _.call(e, t);
45
+ }
46
+ function rt(t, e) {
47
+ var r = this.__data__;
48
+ return r[t] = u && e === void 0 ? O : e, this;
49
+ }
50
+ a.prototype.clear = Z;
51
+ a.prototype.delete = k;
52
+ a.prototype.get = tt;
53
+ a.prototype.has = et;
54
+ a.prototype.set = rt;
55
+ function i(t) {
56
+ var e = -1, r = t ? t.length : 0;
57
+ for (this.clear(); ++e < r; ) {
58
+ var n = t[e];
59
+ this.set(n[0], n[1]);
129
60
  }
130
- getMaskOpts(t) {
131
- const { onMaska: e, preProcess: s, postProcess: n, ...i } = t;
132
- return i;
61
+ }
62
+ function nt() {
63
+ this.__data__ = [];
64
+ }
65
+ function at(t) {
66
+ var e = this.__data__, r = h(e, t);
67
+ if (r < 0)
68
+ return !1;
69
+ var n = e.length - 1;
70
+ return r == n ? e.pop() : Q.call(e, r, 1), !0;
71
+ }
72
+ function ot(t) {
73
+ var e = this.__data__, r = h(e, t);
74
+ return r < 0 ? void 0 : e[r][1];
75
+ }
76
+ function it(t) {
77
+ return h(this.__data__, t) > -1;
78
+ }
79
+ function ct(t, e) {
80
+ var r = this.__data__, n = h(r, t);
81
+ return n < 0 ? r.push([t, e]) : r[n][1] = e, this;
82
+ }
83
+ i.prototype.clear = nt;
84
+ i.prototype.delete = at;
85
+ i.prototype.get = ot;
86
+ i.prototype.has = it;
87
+ i.prototype.set = ct;
88
+ function o(t) {
89
+ var e = -1, r = t ? t.length : 0;
90
+ for (this.clear(); ++e < r; ) {
91
+ var n = t[e];
92
+ this.set(n[0], n[1]);
133
93
  }
134
- init(t, e) {
135
- for (const s of t) {
136
- const n = new b(w(s, e));
137
- this.items.set(s, n), s.value !== "" && this.setMaskedValue(s, s.value), s.addEventListener("input", this.inputEvent), s.addEventListener("beforeinput", this.beforeinputEvent);
94
+ }
95
+ function st() {
96
+ this.__data__ = {
97
+ hash: new a(),
98
+ map: new (W || i)(),
99
+ string: new a()
100
+ };
101
+ }
102
+ function ut(t) {
103
+ return p(this, t).delete(t);
104
+ }
105
+ function ft(t) {
106
+ return p(this, t).get(t);
107
+ }
108
+ function ht(t) {
109
+ return p(this, t).has(t);
110
+ }
111
+ function pt(t, e) {
112
+ return p(this, t).set(t, e), this;
113
+ }
114
+ o.prototype.clear = st;
115
+ o.prototype.delete = ut;
116
+ o.prototype.get = ft;
117
+ o.prototype.has = ht;
118
+ o.prototype.set = pt;
119
+ function h(t, e) {
120
+ for (var r = t.length; r--; )
121
+ if (Ot(t[r][0], e))
122
+ return r;
123
+ return -1;
124
+ }
125
+ function lt(t, e) {
126
+ e = gt(e, t) ? [e] : yt(e);
127
+ for (var r = 0, n = e.length; t != null && r < n; )
128
+ t = t[vt(e[r++])];
129
+ return r && r == n ? t : void 0;
130
+ }
131
+ function dt(t) {
132
+ if (!E(t) || mt(t))
133
+ return !1;
134
+ var e = jt(t) || V(t) ? B : z;
135
+ return e.test(St(t));
136
+ }
137
+ function _t(t) {
138
+ if (typeof t == "string")
139
+ return t;
140
+ if (g(t))
141
+ return S ? S.call(t) : "";
142
+ var e = t + "";
143
+ return e == "0" && 1 / t == -j ? "-0" : e;
144
+ }
145
+ function yt(t) {
146
+ return I(t) ? t : Ct(t);
147
+ }
148
+ function p(t, e) {
149
+ var r = t.__data__;
150
+ return bt(e) ? r[typeof e == "string" ? "string" : "hash"] : r.map;
151
+ }
152
+ function T(t, e) {
153
+ var r = J(t, e);
154
+ return dt(r) ? r : void 0;
155
+ }
156
+ function gt(t, e) {
157
+ if (I(t))
158
+ return !1;
159
+ var r = typeof t;
160
+ return r == "number" || r == "symbol" || r == "boolean" || t == null || g(t) ? !0 : R.test(t) || !G.test(t) || e != null && t in Object(e);
161
+ }
162
+ function bt(t) {
163
+ var e = typeof t;
164
+ return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
165
+ }
166
+ function mt(t) {
167
+ return !!m && m in t;
168
+ }
169
+ var Ct = y(function(t) {
170
+ t = xt(t);
171
+ var e = [];
172
+ return A.test(t) && e.push(""), t.replace(M, function(r, n, c, s) {
173
+ e.push(c ? s.replace(L, "$1") : n || r);
174
+ }), e;
175
+ });
176
+ function vt(t) {
177
+ if (typeof t == "string" || g(t))
178
+ return t;
179
+ var e = t + "";
180
+ return e == "0" && 1 / t == -j ? "-0" : e;
181
+ }
182
+ function St(t) {
183
+ if (t != null) {
184
+ try {
185
+ return x.call(t);
186
+ } catch {
187
+ }
188
+ try {
189
+ return t + "";
190
+ } catch {
138
191
  }
139
192
  }
140
- setMaskedValue(t, e) {
141
- const s = this.items.get(t);
142
- this.options.preProcess != null && (e = this.options.preProcess(e));
143
- const n = s.masked(e), i = s.unmasked(s.isEager() ? n : e), p = s.completed(e), o = { masked: n, unmasked: i, completed: p };
144
- e = n, this.options.postProcess != null && (e = this.options.postProcess(e)), t.value = e, t.dataset.maskaValue = e, this.options.onMaska != null && (Array.isArray(this.options.onMaska) ? this.options.onMaska.forEach((k) => k(o)) : this.options.onMaska(o)), t.dispatchEvent(new CustomEvent("maska", { detail: o })), t.dispatchEvent(new CustomEvent("input", { detail: o }));
145
- }
193
+ return "";
146
194
  }
147
- const A = /* @__PURE__ */ new WeakMap(), C = (a) => {
148
- setTimeout(() => {
149
- var t;
150
- ((t = A.get(a)) == null ? void 0 : t.needUpdateValue(a)) === !0 && a.dispatchEvent(new CustomEvent("input"));
151
- });
152
- }, J = (a, t) => {
153
- const e = a instanceof HTMLInputElement ? a : a.querySelector("input"), s = { ...t.arg };
154
- if (e == null || (e == null ? void 0 : e.type) === "file")
155
- return;
156
- C(e);
157
- const n = A.get(e);
158
- if (n != null) {
159
- if (!n.needUpdateOptions(e, s))
160
- return;
161
- n.destroy();
162
- }
163
- if (t.value != null) {
164
- const i = t.value, p = (o) => {
165
- i.masked = o.masked, i.unmasked = o.unmasked, i.completed = o.completed;
166
- };
167
- s.onMaska = s.onMaska == null ? p : Array.isArray(s.onMaska) ? [...s.onMaska, p] : [s.onMaska, p];
168
- }
169
- A.set(e, new L(e, s));
170
- };
195
+ function y(t, e) {
196
+ if (typeof t != "function" || e && typeof e != "function")
197
+ throw new TypeError(D);
198
+ var r = function() {
199
+ var n = arguments, c = e ? e.apply(this, n) : n[0], s = r.cache;
200
+ if (s.has(c))
201
+ return s.get(c);
202
+ var b = t.apply(this, n);
203
+ return r.cache = s.set(c, b), b;
204
+ };
205
+ return r.cache = new (y.Cache || o)(), r;
206
+ }
207
+ y.Cache = o;
208
+ function Ot(t, e) {
209
+ return t === e || t !== t && e !== e;
210
+ }
211
+ var I = Array.isArray;
212
+ function jt(t) {
213
+ var e = E(t) ? P.call(t) : "";
214
+ return e == F || e == N;
215
+ }
216
+ function E(t) {
217
+ var e = typeof t;
218
+ return !!t && (e == "object" || e == "function");
219
+ }
220
+ function wt(t) {
221
+ return !!t && typeof t == "object";
222
+ }
223
+ function g(t) {
224
+ return typeof t == "symbol" || wt(t) && P.call(t) == H;
225
+ }
226
+ function xt(t) {
227
+ return t == null ? "" : _t(t);
228
+ }
229
+ function Pt(t, e, r) {
230
+ var n = t == null ? void 0 : lt(t, e);
231
+ return n === void 0 ? r : n;
232
+ }
233
+ var Tt = Pt;
234
+ const Et = /* @__PURE__ */ $(Tt);
171
235
  export {
172
- b as Mask,
173
- L as MaskInput,
174
- R as tokens,
175
- J as vMaska
236
+ Et as default
176
237
  };
177
238
  //# sourceMappingURL=index210.js.map