import { p as t, H as i, c as e, h as n, t as s } from './p-BfLQgzDX.js';
import { c as a } from './p-D7YaJBkB.js';
import { g as r, r as o } from './p-Dpaq_7dX.js';
import { r as l } from './p-_JFHEL-E.js';
import { g as h } from './p-BDMnqEGL.js';
import { d as u } from './p-f9tCETeY.js';
import { d as c } from './p-BpML1w-i.js';
import { d } from './p-C6qt54JA.js';
import { v as p } from './p-CK3_k8jD.js';
import { i as f } from './p-DzS7aqZe.js';
var b = 'undefined' != typeof window ? window : 'undefined' != typeof global ? global : 'undefined' != typeof self ? self : {},
  k = function (t, i, e, n, s, a, r, o, l, h) {
    var u = this;
    ((u.numeralDecimalMark = t || '.'),
      (u.numeralIntegerScale = i > 0 ? i : 0),
      (u.numeralDecimalScale = e >= 0 ? e : 2),
      (u.numeralThousandsGroupStyle = n || k.groupStyle.thousand),
      (u.numeralPositiveOnly = !!s),
      (u.stripLeadingZeroes = !1 !== a),
      (u.prefix = r || '' === r ? r : ''),
      (u.signBeforePrefix = !!o),
      (u.tailPrefix = !!l),
      (u.delimiter = h || '' === h ? h : ','),
      (u.delimiterRE = h ? new RegExp('\\' + h, 'g') : ''));
  };
((k.groupStyle = { thousand: 'thousand', lakh: 'lakh', wan: 'wan', none: 'none' }),
  (k.prototype = {
    getRawValue: function (t) {
      return t.replace(this.delimiterRE, '').replace(this.numeralDecimalMark, '.');
    },
    format: function (t) {
      var i,
        e,
        n,
        s,
        a = this,
        r = '';
      switch (
        ((t = t
          .replace(/[A-Za-z]/g, '')
          .replace(a.numeralDecimalMark, 'M')
          .replace(/[^\dM-]/g, '')
          .replace(/^\-/, 'N')
          .replace(/\-/g, '')
          .replace('N', a.numeralPositiveOnly ? '' : '-')
          .replace('M', a.numeralDecimalMark)),
        a.stripLeadingZeroes && (t = t.replace(/^(-)?0+(?=\d)/, '$1')),
        (e = '-' === t.slice(0, 1) ? '-' : ''),
        (n = void 0 !== a.prefix ? (a.signBeforePrefix ? e + a.prefix : a.prefix + e) : e),
        (s = t),
        t.indexOf(a.numeralDecimalMark) >= 0 && ((s = (i = t.split(a.numeralDecimalMark))[0]), (r = a.numeralDecimalMark + i[1].slice(0, a.numeralDecimalScale))),
        '-' === e && (s = s.slice(1)),
        a.numeralIntegerScale > 0 && (s = s.slice(0, a.numeralIntegerScale)),
        a.numeralThousandsGroupStyle)
      ) {
        case k.groupStyle.lakh:
          s = s.replace(/(\d)(?=(\d\d)+\d$)/g, '$1' + a.delimiter);
          break;
        case k.groupStyle.wan:
          s = s.replace(/(\d)(?=(\d{4})+$)/g, '$1' + a.delimiter);
          break;
        case k.groupStyle.thousand:
          s = s.replace(/(\d)(?=(\d{3})+$)/g, '$1' + a.delimiter);
      }
      return a.tailPrefix ? e + s.toString() + (a.numeralDecimalScale > 0 ? r.toString() : '') + a.prefix : n + s.toString() + (a.numeralDecimalScale > 0 ? r.toString() : '');
    },
  }));
var m = k,
  v = function (t, i, e) {
    var n = this;
    ((n.date = []),
      (n.blocks = []),
      (n.datePattern = t),
      (n.dateMin = i
        .split('-')
        .reverse()
        .map(function (t) {
          return parseInt(t, 10);
        })),
      2 === n.dateMin.length && n.dateMin.unshift(0),
      (n.dateMax = e
        .split('-')
        .reverse()
        .map(function (t) {
          return parseInt(t, 10);
        })),
      2 === n.dateMax.length && n.dateMax.unshift(0),
      n.initBlocks());
  };
v.prototype = {
  initBlocks: function () {
    var t = this;
    t.datePattern.forEach(function (i) {
      t.blocks.push('Y' === i ? 4 : 2);
    });
  },
  getISOFormatDate: function () {
    var t = this,
      i = t.date;
    return i[2] ? i[2] + '-' + t.addLeadingZero(i[1]) + '-' + t.addLeadingZero(i[0]) : '';
  },
  getBlocks: function () {
    return this.blocks;
  },
  getValidatedDate: function (t) {
    var i = this,
      e = '';
    return (
      (t = t.replace(/[^\d]/g, '')),
      i.blocks.forEach(function (n, s) {
        if (t.length > 0) {
          var a = t.slice(0, n),
            r = a.slice(0, 1),
            o = t.slice(n);
          switch (i.datePattern[s]) {
            case 'd':
              '00' === a ? (a = '01') : parseInt(r, 10) > 3 ? (a = '0' + r) : parseInt(a, 10) > 31 && (a = '31');
              break;
            case 'm':
              '00' === a ? (a = '01') : parseInt(r, 10) > 1 ? (a = '0' + r) : parseInt(a, 10) > 12 && (a = '12');
          }
          ((e += a), (t = o));
        }
      }),
      this.getFixedDateString(e)
    );
  },
  getFixedDateString: function (t) {
    var i,
      e,
      n,
      s = this,
      a = s.datePattern,
      r = [],
      o = 0,
      l = 0,
      h = 0,
      u = 0,
      c = 0,
      d = 0,
      p = !1;
    return (
      4 === t.length &&
        'y' !== a[0].toLowerCase() &&
        'y' !== a[1].toLowerCase() &&
        ((c = 2 - (u = 'd' === a[0] ? 0 : 2)), (i = parseInt(t.slice(u, u + 2), 10)), (e = parseInt(t.slice(c, c + 2), 10)), (r = this.getFixedDate(i, e, 0))),
      8 === t.length &&
        (a.forEach(function (t, i) {
          switch (t) {
            case 'd':
              o = i;
              break;
            case 'm':
              l = i;
              break;
            default:
              h = i;
          }
        }),
        (d = 2 * h),
        (u = o <= h ? 2 * o : 2 * o + 2),
        (c = l <= h ? 2 * l : 2 * l + 2),
        (i = parseInt(t.slice(u, u + 2), 10)),
        (e = parseInt(t.slice(c, c + 2), 10)),
        (n = parseInt(t.slice(d, d + 4), 10)),
        (p = 4 === t.slice(d, d + 4).length),
        (r = this.getFixedDate(i, e, n))),
      4 !== t.length ||
        ('y' !== a[0] && 'y' !== a[1]) ||
        ((d = 2 - (c = 'm' === a[0] ? 0 : 2)), (e = parseInt(t.slice(c, c + 2), 10)), (n = parseInt(t.slice(d, d + 2), 10)), (p = 2 === t.slice(d, d + 2).length), (r = [0, e, n])),
      6 !== t.length ||
        ('Y' !== a[0] && 'Y' !== a[1]) ||
        ((d = 2 - 0.5 * (c = 'm' === a[0] ? 0 : 4)),
        (e = parseInt(t.slice(c, c + 2), 10)),
        (n = parseInt(t.slice(d, d + 4), 10)),
        (p = 4 === t.slice(d, d + 4).length),
        (r = [0, e, n])),
      (r = s.getRangeFixedDate(r)),
      (s.date = r),
      0 === r.length
        ? t
        : a.reduce(function (t, i) {
            switch (i) {
              case 'd':
                return t + (0 === r[0] ? '' : s.addLeadingZero(r[0]));
              case 'm':
                return t + (0 === r[1] ? '' : s.addLeadingZero(r[1]));
              case 'y':
                return t + (p ? s.addLeadingZeroForYear(r[2], !1) : '');
              case 'Y':
                return t + (p ? s.addLeadingZeroForYear(r[2], !0) : '');
            }
          }, '')
    );
  },
  getRangeFixedDate: function (t) {
    var i = this,
      e = i.dateMin || [],
      n = i.dateMax || [];
    return !t.length ||
      (e.length < 3 && n.length < 3) ||
      (i.datePattern.find(function (t) {
        return 'y' === t.toLowerCase();
      }) &&
        0 === t[2])
      ? t
      : n.length && (n[2] < t[2] || (n[2] === t[2] && (n[1] < t[1] || (n[1] === t[1] && n[0] < t[0]))))
        ? n
        : e.length && (e[2] > t[2] || (e[2] === t[2] && (e[1] > t[1] || (e[1] === t[1] && e[0] > t[0]))))
          ? e
          : t;
  },
  getFixedDate: function (t, i, e) {
    return (
      (t = Math.min(t, 31)),
      (i = Math.min(i, 12)),
      (e = parseInt(e || 0, 10)),
      ((i < 7 && i % 2 == 0) || (i > 8 && i % 2 == 1)) && (t = Math.min(t, 2 === i ? (this.isLeapYear(e) ? 29 : 28) : 30)),
      [t, i, e]
    );
  },
  isLeapYear: function (t) {
    return (t % 4 == 0 && t % 100 != 0) || t % 400 == 0;
  },
  addLeadingZero: function (t) {
    return (t < 10 ? '0' : '') + t;
  },
  addLeadingZeroForYear: function (t, i) {
    return i ? (t < 10 ? '000' : t < 100 ? '00' : t < 1e3 ? '0' : '') + t : (t < 10 ? '0' : '') + t;
  },
};
var g = v,
  y = function (t, i) {
    var e = this;
    ((e.time = []), (e.blocks = []), (e.timePattern = t), (e.timeFormat = i), e.initBlocks());
  };
y.prototype = {
  initBlocks: function () {
    var t = this;
    t.timePattern.forEach(function () {
      t.blocks.push(2);
    });
  },
  getISOFormatTime: function () {
    var t = this,
      i = t.time;
    return i[2] ? t.addLeadingZero(i[0]) + ':' + t.addLeadingZero(i[1]) + ':' + t.addLeadingZero(i[2]) : '';
  },
  getBlocks: function () {
    return this.blocks;
  },
  getTimeFormatOptions: function () {
    return '12' === String(this.timeFormat)
      ? { maxHourFirstDigit: 1, maxHours: 12, maxMinutesFirstDigit: 5, maxMinutes: 60 }
      : { maxHourFirstDigit: 2, maxHours: 23, maxMinutesFirstDigit: 5, maxMinutes: 60 };
  },
  getValidatedTime: function (t) {
    var i = this,
      e = '';
    t = t.replace(/[^\d]/g, '');
    var n = i.getTimeFormatOptions();
    return (
      i.blocks.forEach(function (s, a) {
        if (t.length > 0) {
          var r = t.slice(0, s),
            o = r.slice(0, 1),
            l = t.slice(s);
          switch (i.timePattern[a]) {
            case 'h':
              parseInt(o, 10) > n.maxHourFirstDigit ? (r = '0' + o) : parseInt(r, 10) > n.maxHours && (r = n.maxHours + '');
              break;
            case 'm':
            case 's':
              parseInt(o, 10) > n.maxMinutesFirstDigit ? (r = '0' + o) : parseInt(r, 10) > n.maxMinutes && (r = n.maxMinutes + '');
          }
          ((e += r), (t = l));
        }
      }),
      this.getFixedTimeString(e)
    );
  },
  getFixedTimeString: function (t) {
    var i,
      e,
      n,
      s = this,
      a = s.timePattern,
      r = [],
      o = 0,
      l = 0,
      h = 0,
      u = 0,
      c = 0,
      d = 0;
    return (
      6 === t.length &&
        (a.forEach(function (t, i) {
          switch (t) {
            case 's':
              o = 2 * i;
              break;
            case 'm':
              l = 2 * i;
              break;
            case 'h':
              h = 2 * i;
          }
        }),
        (d = h),
        (c = l),
        (u = o),
        (i = parseInt(t.slice(u, u + 2), 10)),
        (e = parseInt(t.slice(c, c + 2), 10)),
        (n = parseInt(t.slice(d, d + 2), 10)),
        (r = this.getFixedTime(n, e, i))),
      4 === t.length &&
        s.timePattern.indexOf('s') < 0 &&
        (a.forEach(function (t, i) {
          switch (t) {
            case 'm':
              l = 2 * i;
              break;
            case 'h':
              h = 2 * i;
          }
        }),
        (d = h),
        (c = l),
        (i = 0),
        (e = parseInt(t.slice(c, c + 2), 10)),
        (n = parseInt(t.slice(d, d + 2), 10)),
        (r = this.getFixedTime(n, e, i))),
      (s.time = r),
      0 === r.length
        ? t
        : a.reduce(function (t, i) {
            switch (i) {
              case 's':
                return t + s.addLeadingZero(r[2]);
              case 'm':
                return t + s.addLeadingZero(r[1]);
              case 'h':
                return t + s.addLeadingZero(r[0]);
            }
          }, '')
    );
  },
  getFixedTime: function (t, i, e) {
    return ((e = Math.min(parseInt(e || 0, 10), 60)), (i = Math.min(i, 60)), [(t = Math.min(t, 60)), i, e]);
  },
  addLeadingZero: function (t) {
    return (t < 10 ? '0' : '') + t;
  },
};
var w = y,
  x = function (t, i) {
    var e = this;
    ((e.delimiter = i || '' === i ? i : ' '), (e.delimiterRE = i ? new RegExp('\\' + i, 'g') : ''), (e.formatter = t));
  };
x.prototype = {
  setFormatter: function (t) {
    this.formatter = t;
  },
  format: function (t) {
    var i = this;
    i.formatter.clear();
    for (
      var e, n = '', s = !1, a = 0, r = (t = (t = (t = t.replace(/[^\d+]/g, '')).replace(/^\+/, 'B').replace(/\+/g, '').replace('B', '+')).replace(i.delimiterRE, '')).length;
      a < r;
      a++
    )
      ((e = i.formatter.inputDigit(t.charAt(a))), /[\s()-]/g.test(e) ? ((n = e), (s = !0)) : s || (n = e));
    return (n = n.replace(/[()]/g, '')).replace(/[\s-]/g, i.delimiter);
  },
};
var I = x,
  j = {
    blocks: {
      uatp: [4, 5, 6],
      amex: [4, 6, 5],
      diners: [4, 6, 4],
      discover: [4, 4, 4, 4],
      mastercard: [4, 4, 4, 4],
      dankort: [4, 4, 4, 4],
      instapayment: [4, 4, 4, 4],
      jcb15: [4, 6, 5],
      jcb: [4, 4, 4, 4],
      maestro: [4, 4, 4, 4],
      visa: [4, 4, 4, 4],
      mir: [4, 4, 4, 4],
      unionPay: [4, 4, 4, 4],
      general: [4, 4, 4, 4],
    },
    re: {
      uatp: /^(?!1800)1\d{0,14}/,
      amex: /^3[47]\d{0,13}/,
      discover: /^(?:6011|65\d{0,2}|64[4-9]\d?)\d{0,12}/,
      diners: /^3(?:0([0-5]|9)|[689]\d?)\d{0,11}/,
      mastercard: /^(5[1-5]\d{0,2}|22[2-9]\d{0,1}|2[3-7]\d{0,2})\d{0,12}/,
      dankort: /^(5019|4175|4571)\d{0,12}/,
      instapayment: /^63[7-9]\d{0,13}/,
      jcb15: /^(?:2131|1800)\d{0,11}/,
      jcb: /^(?:35\d{0,2})\d{0,12}/,
      maestro: /^(?:5[0678]\d{0,2}|6304|67\d{0,2})\d{0,12}/,
      mir: /^220[0-4]\d{0,12}/,
      visa: /^4\d{0,15}/,
      unionPay: /^(62|81)\d{0,14}/,
    },
    getStrictBlocks: function (t) {
      var i = t.reduce(function (t, i) {
        return t + i;
      }, 0);
      return t.concat(19 - i);
    },
    getInfo: function (t, i) {
      var e = j.blocks,
        n = j.re;
      for (var s in ((i = !!i), n))
        if (n[s].test(t)) {
          var a = e[s];
          return { type: s, blocks: i ? this.getStrictBlocks(a) : a };
        }
      return { type: 'unknown', blocks: i ? this.getStrictBlocks(e.general) : e.general };
    },
  },
  F = j,
  z = {
    noop: function () {},
    strip: function (t, i) {
      return t.replace(i, '');
    },
    getPostDelimiter: function (t, i, e) {
      if (0 === e.length) return t.slice(-i.length) === i ? i : '';
      var n = '';
      return (
        e.forEach(function (i) {
          t.slice(-i.length) === i && (n = i);
        }),
        n
      );
    },
    getDelimiterREByDelimiter: function (t) {
      return new RegExp(t.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1'), 'g');
    },
    getNextCursorPosition: function (t, i, e, n, s) {
      return i.length === t ? e.length : t + this.getPositionOffset(t, i, e, n, s);
    },
    getPositionOffset: function (t, i, e, n, s) {
      var a, r, o;
      return ((a = this.stripDelimiters(i.slice(0, t), n, s)), (r = this.stripDelimiters(e.slice(0, t), n, s)), 0 != (o = a.length - r.length) ? o / Math.abs(o) : 0);
    },
    stripDelimiters: function (t, i, e) {
      var n = this;
      if (0 === e.length) {
        var s = i ? n.getDelimiterREByDelimiter(i) : '';
        return t.replace(s, '');
      }
      return (
        e.forEach(function (i) {
          i.split('').forEach(function (i) {
            t = t.replace(n.getDelimiterREByDelimiter(i), '');
          });
        }),
        t
      );
    },
    headStr: function (t, i) {
      return t.slice(0, i);
    },
    getMaxLength: function (t) {
      return t.reduce(function (t, i) {
        return t + i;
      }, 0);
    },
    getPrefixStrippedValue: function (t, i, e, n, s, a, r, o, l) {
      if (0 === e) return t;
      if (t === i && '' !== t) return '';
      if (l && '-' == t.slice(0, 1)) {
        var h = '-' == n.slice(0, 1) ? n.slice(1) : n;
        return '-' + this.getPrefixStrippedValue(t.slice(1), i, e, h, s, a, r, o, l);
      }
      if (n.slice(0, e) !== i && !o) return r && !n && t ? t : '';
      if (n.slice(-e) !== i && o) return r && !n && t ? t : '';
      var u = this.stripDelimiters(n, s, a);
      return t.slice(0, e) === i || o ? (t.slice(-e) !== i && o ? u.slice(0, -e - 1) : o ? t.slice(0, -e) : t.slice(e)) : u.slice(e);
    },
    getFirstDiffIndex: function (t, i) {
      for (var e = 0; t.charAt(e) === i.charAt(e); ) if ('' === t.charAt(e++)) return -1;
      return e;
    },
    getFormattedValue: function (t, i, e, n, s, a) {
      var r = '',
        o = s.length > 0,
        l = '';
      return 0 === e
        ? t
        : (i.forEach(function (i, h) {
            if (t.length > 0) {
              var u = t.slice(0, i),
                c = t.slice(i);
              ((l = o ? s[a ? h - 1 : h] || l : n), a ? (h > 0 && (r += l), (r += u)) : ((r += u), u.length === i && h < e - 1 && (r += l)), (t = c));
            }
          }),
          r);
    },
    fixPrefixCursor: function (t, i, e, n) {
      if (t) {
        var s = t.value;
        if (t.setSelectionRange && i && !(i.length + (e || n[0] || ' ').length <= s.length)) {
          var a = 2 * s.length;
          setTimeout(function () {
            t.setSelectionRange(a, a);
          }, 1);
        }
      }
    },
    checkFullSelection: function (t) {
      try {
        return (window.getSelection() || document.getSelection() || {}).toString().length === t.length;
      } catch (t) {}
      return !1;
    },
    setSelection: function (t, i, e) {
      if (t === this.getActiveElement(e) && !(t && t.value.length <= i))
        if (t.createTextRange) {
          var n = t.createTextRange();
          (n.move('character', i), n.select());
        } else
          try {
            t.setSelectionRange(i, i);
          } catch (t) {
            console.warn('The input element type does not support selection');
          }
    },
    getActiveElement: function (t) {
      var i = t.activeElement;
      return i && i.shadowRoot ? this.getActiveElement(i.shadowRoot) : i;
    },
    isAndroid: function () {
      return navigator && /android/i.test(navigator.userAgent);
    },
    isAndroidBackspaceKeydown: function (t, i) {
      return !!(this.isAndroid() && t && i) && i === t.slice(0, -1);
    },
  },
  S = {
    assign: function (t, i) {
      return (
        ((t = t || {}).creditCard = !!(i = i || {}).creditCard),
        (t.creditCardStrictMode = !!i.creditCardStrictMode),
        (t.creditCardType = ''),
        (t.onCreditCardTypeChanged = i.onCreditCardTypeChanged || function () {}),
        (t.phone = !!i.phone),
        (t.phoneRegionCode = i.phoneRegionCode || 'AU'),
        (t.phoneFormatter = {}),
        (t.time = !!i.time),
        (t.timePattern = i.timePattern || ['h', 'm', 's']),
        (t.timeFormat = i.timeFormat || '24'),
        (t.timeFormatter = {}),
        (t.date = !!i.date),
        (t.datePattern = i.datePattern || ['d', 'm', 'Y']),
        (t.dateMin = i.dateMin || ''),
        (t.dateMax = i.dateMax || ''),
        (t.dateFormatter = {}),
        (t.numeral = !!i.numeral),
        (t.numeralIntegerScale = i.numeralIntegerScale > 0 ? i.numeralIntegerScale : 0),
        (t.numeralDecimalScale = i.numeralDecimalScale >= 0 ? i.numeralDecimalScale : 2),
        (t.numeralDecimalMark = i.numeralDecimalMark || '.'),
        (t.numeralThousandsGroupStyle = i.numeralThousandsGroupStyle || 'thousand'),
        (t.numeralPositiveOnly = !!i.numeralPositiveOnly),
        (t.stripLeadingZeroes = !1 !== i.stripLeadingZeroes),
        (t.signBeforePrefix = !!i.signBeforePrefix),
        (t.tailPrefix = !!i.tailPrefix),
        (t.swapHiddenInput = !!i.swapHiddenInput),
        (t.numericOnly = t.creditCard || t.date || !!i.numericOnly),
        (t.uppercase = !!i.uppercase),
        (t.lowercase = !!i.lowercase),
        (t.prefix = t.creditCard || t.date ? '' : i.prefix || ''),
        (t.noImmediatePrefix = !!i.noImmediatePrefix),
        (t.prefixLength = t.prefix.length),
        (t.rawValueTrimPrefix = !!i.rawValueTrimPrefix),
        (t.copyDelimiter = !!i.copyDelimiter),
        (t.initValue = null != i.initValue ? i.initValue.toString() : ''),
        (t.delimiter = i.delimiter || '' === i.delimiter ? i.delimiter : i.date ? '/' : i.time ? ':' : i.numeral ? ',' : ' '),
        (t.delimiterLength = t.delimiter.length),
        (t.delimiterLazyShow = !!i.delimiterLazyShow),
        (t.delimiters = i.delimiters || []),
        (t.blocks = i.blocks || []),
        (t.blocksLength = t.blocks.length),
        (t.root = 'object' == typeof b && b ? b : window),
        (t.document = i.document || t.root.document),
        (t.maxLength = 0),
        (t.backspace = !1),
        (t.result = ''),
        (t.onValueChanged = i.onValueChanged || function () {}),
        t
      );
    },
  },
  D = function (t, i) {
    var e = this,
      n = !1;
    if (
      ('string' == typeof t
        ? ((e.element = document.querySelector(t)), (n = document.querySelectorAll(t).length > 1))
        : void 0 !== t.length && t.length > 0
          ? ((e.element = t[0]), (n = t.length > 1))
          : (e.element = t),
      !e.element)
    )
      throw new Error('[cleave.js] Please check the element');
    if (n)
      try {
        console.warn('[cleave.js] Multiple input fields matched, cleave.js will only take the first one.');
      } catch (t) {}
    ((i.initValue = e.element.value), (e.properties = D.DefaultProperties.assign({}, i)), e.init());
  };
((D.prototype = {
  init: function () {
    var t = this,
      i = t.properties;
    i.numeral || i.phone || i.creditCard || i.time || i.date || 0 !== i.blocksLength || i.prefix
      ? ((i.maxLength = D.Util.getMaxLength(i.blocks)),
        (t.isAndroid = D.Util.isAndroid()),
        (t.lastInputValue = ''),
        (t.isBackward = ''),
        (t.onChangeListener = t.onChange.bind(t)),
        (t.onKeyDownListener = t.onKeyDown.bind(t)),
        (t.onFocusListener = t.onFocus.bind(t)),
        (t.onCutListener = t.onCut.bind(t)),
        (t.onCopyListener = t.onCopy.bind(t)),
        t.initSwapHiddenInput(),
        t.element.addEventListener('input', t.onChangeListener),
        t.element.addEventListener('keydown', t.onKeyDownListener),
        t.element.addEventListener('focus', t.onFocusListener),
        t.element.addEventListener('cut', t.onCutListener),
        t.element.addEventListener('copy', t.onCopyListener),
        t.initPhoneFormatter(),
        t.initDateFormatter(),
        t.initTimeFormatter(),
        t.initNumeralFormatter(),
        (i.initValue || (i.prefix && !i.noImmediatePrefix)) && t.onInput(i.initValue))
      : t.onInput(i.initValue);
  },
  initSwapHiddenInput: function () {
    var t = this;
    if (t.properties.swapHiddenInput) {
      var i = t.element.cloneNode(!0);
      (t.element.parentNode.insertBefore(i, t.element), (t.elementSwapHidden = t.element), (t.elementSwapHidden.type = 'hidden'), (t.element = i), (t.element.id = ''));
    }
  },
  initNumeralFormatter: function () {
    var t = this.properties;
    t.numeral &&
      (t.numeralFormatter = new D.NumeralFormatter(
        t.numeralDecimalMark,
        t.numeralIntegerScale,
        t.numeralDecimalScale,
        t.numeralThousandsGroupStyle,
        t.numeralPositiveOnly,
        t.stripLeadingZeroes,
        t.prefix,
        t.signBeforePrefix,
        t.tailPrefix,
        t.delimiter,
      ));
  },
  initTimeFormatter: function () {
    var t = this.properties;
    t.time &&
      ((t.timeFormatter = new D.TimeFormatter(t.timePattern, t.timeFormat)),
      (t.blocks = t.timeFormatter.getBlocks()),
      (t.blocksLength = t.blocks.length),
      (t.maxLength = D.Util.getMaxLength(t.blocks)));
  },
  initDateFormatter: function () {
    var t = this.properties;
    t.date &&
      ((t.dateFormatter = new D.DateFormatter(t.datePattern, t.dateMin, t.dateMax)),
      (t.blocks = t.dateFormatter.getBlocks()),
      (t.blocksLength = t.blocks.length),
      (t.maxLength = D.Util.getMaxLength(t.blocks)));
  },
  initPhoneFormatter: function () {
    var t = this.properties;
    if (t.phone)
      try {
        t.phoneFormatter = new D.PhoneFormatter(new t.root.Cleave.AsYouTypeFormatter(t.phoneRegionCode), t.delimiter);
      } catch (t) {
        throw new Error('[cleave.js] Please include phone-type-formatter.{country}.js lib');
      }
  },
  onKeyDown: function (t) {
    var i = this,
      e = t.which || t.keyCode;
    ((i.lastInputValue = i.element.value), (i.isBackward = 8 === e));
  },
  onChange: function (t) {
    var i = this,
      e = i.properties,
      n = D.Util;
    i.isBackward = i.isBackward || 'deleteContentBackward' === t.inputType;
    var s = n.getPostDelimiter(i.lastInputValue, e.delimiter, e.delimiters);
    ((e.postDelimiterBackspace = !(!i.isBackward || !s) && s), this.onInput(this.element.value));
  },
  onFocus: function () {
    var t = this,
      i = t.properties;
    ((t.lastInputValue = t.element.value),
      i.prefix && i.noImmediatePrefix && !t.element.value && this.onInput(i.prefix),
      D.Util.fixPrefixCursor(t.element, i.prefix, i.delimiter, i.delimiters));
  },
  onCut: function (t) {
    D.Util.checkFullSelection(this.element.value) && (this.copyClipboardData(t), this.onInput(''));
  },
  onCopy: function (t) {
    D.Util.checkFullSelection(this.element.value) && this.copyClipboardData(t);
  },
  copyClipboardData: function (t) {
    var i,
      e = this.properties,
      n = this.element.value;
    i = e.copyDelimiter ? n : D.Util.stripDelimiters(n, e.delimiter, e.delimiters);
    try {
      (t.clipboardData ? t.clipboardData.setData('Text', i) : window.clipboardData.setData('Text', i), t.preventDefault());
    } catch (t) {}
  },
  onInput: function (t) {
    var i = this,
      e = i.properties,
      n = D.Util,
      s = n.getPostDelimiter(t, e.delimiter, e.delimiters);
    return (
      e.numeral || !e.postDelimiterBackspace || s || (t = n.headStr(t, t.length - e.postDelimiterBackspace.length)),
      e.phone
        ? ((e.result = !e.prefix || (e.noImmediatePrefix && !t.length) ? e.phoneFormatter.format(t) : e.prefix + e.phoneFormatter.format(t).slice(e.prefix.length)),
          void i.updateValueState())
        : e.numeral
          ? ((e.result = e.prefix && e.noImmediatePrefix && 0 === t.length ? '' : e.numeralFormatter.format(t)), void i.updateValueState())
          : (e.date && (t = e.dateFormatter.getValidatedDate(t)),
            e.time && (t = e.timeFormatter.getValidatedTime(t)),
            (t = n.stripDelimiters(t, e.delimiter, e.delimiters)),
            (t = n.getPrefixStrippedValue(t, e.prefix, e.prefixLength, e.result, e.delimiter, e.delimiters, e.noImmediatePrefix, e.tailPrefix, e.signBeforePrefix)),
            (t = e.numericOnly ? n.strip(t, /[^\d]/g) : t),
            (t = e.uppercase ? t.toUpperCase() : t),
            (t = e.lowercase ? t.toLowerCase() : t),
            e.prefix && (e.tailPrefix ? (t += e.prefix) : (t = e.prefix + t), 0 === e.blocksLength)
              ? ((e.result = t), void i.updateValueState())
              : (e.creditCard && i.updateCreditCardPropsByValue(t),
                (t = n.headStr(t, e.maxLength)),
                (e.result = n.getFormattedValue(t, e.blocks, e.blocksLength, e.delimiter, e.delimiters, e.delimiterLazyShow)),
                void i.updateValueState()))
    );
  },
  updateCreditCardPropsByValue: function (t) {
    var i,
      e = this.properties,
      n = D.Util;
    n.headStr(e.result, 4) !== n.headStr(t, 4) &&
      ((i = D.CreditCardDetector.getInfo(t, e.creditCardStrictMode)),
      (e.blocks = i.blocks),
      (e.blocksLength = e.blocks.length),
      (e.maxLength = n.getMaxLength(e.blocks)),
      e.creditCardType !== i.type && ((e.creditCardType = i.type), e.onCreditCardTypeChanged.call(this, e.creditCardType)));
  },
  updateValueState: function () {
    var t = this,
      i = D.Util,
      e = t.properties;
    if (t.element) {
      var n = t.element.selectionEnd,
        s = e.result;
      ((n = i.getNextCursorPosition(n, t.element.value, s, e.delimiter, e.delimiters)),
        t.isAndroid
          ? window.setTimeout(function () {
              ((t.element.value = s), i.setSelection(t.element, n, e.document, !1), t.callOnValueChanged());
            }, 1)
          : ((t.element.value = s), e.swapHiddenInput && (t.elementSwapHidden.value = t.getRawValue()), i.setSelection(t.element, n, e.document, !1), t.callOnValueChanged()));
    }
  },
  callOnValueChanged: function () {
    var t = this,
      i = t.properties;
    i.onValueChanged.call(t, { target: { name: t.element.name, value: i.result, rawValue: t.getRawValue() } });
  },
  setPhoneRegionCode: function (t) {
    var i = this;
    ((i.properties.phoneRegionCode = t), i.initPhoneFormatter(), i.onChange());
  },
  setRawValue: function (t) {
    var i = this,
      e = i.properties;
    ((t = null != t ? t.toString() : ''), e.numeral && (t = t.replace('.', e.numeralDecimalMark)), (e.postDelimiterBackspace = !1), (i.element.value = t), i.onInput(t));
  },
  getRawValue: function () {
    var t = this.properties,
      i = D.Util,
      e = this.element.value;
    return (
      t.rawValueTrimPrefix &&
        (e = i.getPrefixStrippedValue(e, t.prefix, t.prefixLength, t.result, t.delimiter, t.delimiters, t.noImmediatePrefix, t.tailPrefix, t.signBeforePrefix)),
      t.numeral ? t.numeralFormatter.getRawValue(e) : i.stripDelimiters(e, t.delimiter, t.delimiters)
    );
  },
  getISOFormatDate: function () {
    var t = this.properties;
    return t.date ? t.dateFormatter.getISOFormatDate() : '';
  },
  getISOFormatTime: function () {
    var t = this.properties;
    return t.time ? t.timeFormatter.getISOFormatTime() : '';
  },
  getFormattedValue: function () {
    return this.element.value;
  },
  destroy: function () {
    var t = this;
    (t.element.removeEventListener('input', t.onChangeListener),
      t.element.removeEventListener('keydown', t.onKeyDownListener),
      t.element.removeEventListener('focus', t.onFocusListener),
      t.element.removeEventListener('cut', t.onCutListener),
      t.element.removeEventListener('copy', t.onCopyListener));
  },
  toString: function () {
    return '[Cleave Object]';
  },
}),
  (D.NumeralFormatter = m),
  (D.DateFormatter = g),
  (D.TimeFormatter = w),
  (D.PhoneFormatter = I),
  (D.CreditCardDetector = F),
  (D.Util = z),
  (D.DefaultProperties = S),
  (('object' == typeof b && b ? b : window).Cleave = D));
var C = D;
const M = (t, i) => {
    if (t && i) return i.split('.').reduce((t, i) => (t && null != t[i] ? ('boolean' == typeof t[i] ? t[i].toString() : t[i]) : void 0), t);
  },
  N = t(
    class extends i {
      constructor(t) {
        (super(),
          !1 !== t && this.__registerHost(),
          (this.tkChange = e(this, 'tk-change', 5)),
          (this.tkBlur = e(this, 'tk-blur', 7)),
          (this.tkFocus = e(this, 'tk-focus', 7)),
          (this.tkClearClick = e(this, 'tk-clear-click', 7)),
          (this.internals = this.attachInternals()),
          (this.uniqueId = p()),
          (this.readOnly = !1),
          (this.editable = !0),
          (this.hasFocus = !1),
          (this.isCounter = !1),
          (this.isPassword = !1),
          (this.passwordStrength = 0),
          (this.disabled = !1),
          (this.invalid = !1),
          (this.clearable = !1),
          (this.iconPosition = 'left'),
          (this.readonly = !1),
          (this.size = 'base'),
          (this.showSafetyStatus = !1),
          (this.showAsterisk = !1),
          (this.chipLabelKey = 'label'),
          (this.mode = 'text'),
          (this.loading = !1),
          (this.hidePasswordIcon = !1),
          (this.clampValueByLimit = (t, i) => {
            if (null == t || isNaN(t)) return null;
            const e = Number(t);
            return null != this.min && e < Number(this.min)
              ? 'increment' === i
                ? Number(this.min) + 1
                : Number(this.min)
              : null != this.max && e > Number(this.max)
                ? 'decrement' === i
                  ? Number(this.max) - 1
                  : Number(this.max)
                : e;
          }),
          (this.handleInput = t => {
            var i, e, n;
            if ('chips' != this.mode) {
              const s = t.target;
              let a;
              if (((a = 'number' == this.mode || 'counter' == this.mode ? (s.value ? Number(s.value) : null) : s.value || ''), this.maskOptions))
                if ((null === (i = this.maskOptions) || void 0 === i ? void 0 : i.regex) && 'text' === this.mode) {
                  const t = 'string' == typeof this.maskOptions.regex ? new RegExp(this.maskOptions.regex, 'g') : new RegExp(this.maskOptions.regex.source, 'g'),
                    i = a.match(t);
                  ((a = i ? i.join('') : ''), (s.value = a));
                } else if ((this.maskOptions.letterOnly && ((a = a.replace(/[^a-zA-Z]/g, '')), (s.value = a)), this.cleaveInstance)) {
                  const t = this.cleaveInstance.getRawValue();
                  (null === (e = this.cleaveInstance) || void 0 === e || e.setRawValue(t),
                    (a = null === (n = this.cleaveInstance) || void 0 === n ? void 0 : n.getFormattedValue()));
                }
              f(this.value, a) || ((this.value = a), this.tkChange.emit(a));
            }
            'password' == this.mode && this.showSafetyStatus && (this.passwordStrength = this.calculatePasswordStrength(String(this.value)));
          }),
          (this.handleInputKeyUp = t => {
            var i, e;
            const n = t.target;
            'counter' === this.mode &&
              n &&
              (this.nativeInput.value =
                '' === n.value ? '' : null !== (e = null === (i = this.clampValueByLimit(Number(n.value))) || void 0 === i ? void 0 : i.toString()) && void 0 !== e ? e : '');
          }),
          (this.handleInputBlur = () => {
            ((this.hasFocus = !1), this.validateMinMax(), this.tkBlur.emit());
          }),
          (this.handleInputKeyDown = t => {
            if (this.maskOptions && this.cleaveInstance && 'text' == this.mode && ('Backspace' === t.key || 'Delete' === t.key)) {
              const i = this.nativeInput,
                e = i.value,
                n = i.selectionStart;
              if (n === i.selectionEnd) {
                let s,
                  a = -1;
                if (
                  ('Backspace' === t.key && n > 0 ? ((s = e[n - 1]), (a = n - 1)) : 'Delete' === t.key && n < e.length && ((s = e[n]), (a = n)), this.isMaskDelimiterCharacter(s))
                ) {
                  let n, s;
                  (t.preventDefault(),
                    'Backspace' === t.key ? ((n = e.slice(0, a - 1) + e.slice(a + 1)), (s = a - 1)) : ((n = e.slice(0, a) + e.slice(a + 2)), (s = a)),
                    this.cleaveInstance.setRawValue(n));
                  const r = this.cleaveInstance.getFormattedValue();
                  return (
                    (i.value = r),
                    (this.value = r),
                    this.tkChange.emit(this.value),
                    void setTimeout(() => {
                      i.setSelectionRange(s, s);
                    }, 0)
                  );
                }
              }
            }
            'Enter' != t.key ||
              !this.nativeInput.value.trim() ||
              'chips' != this.mode ||
              (!this.el.classList.contains('allow-custom-value-select') && this.el.classList.contains('tk-select-input')) ||
              (this.value
                ? ((this.value = [...this.value, this.nativeInput.value]), this.tkChange.emit(this.value))
                : ((this.value = [this.nativeInput.value]), this.tkChange.emit([this.nativeInput.value])),
              (this.nativeInput.value = ''));
          }),
          (this.handleClearButtonClick = t => {
            this.readonly || this.disabled || (t.stopPropagation(), this.handleFormReset(), this.tkClearClick.emit());
          }),
          (this.handleClearButtonKeyDown = t => {
            'Enter' === t.key && (t.preventDefault(), t.stopPropagation(), this.handleFormReset(), this.tkClearClick.emit());
          }),
          (this.handleInputFocus = () => {
            ((this.hasFocus = !0), this.tkFocus.emit());
          }),
          (this.handleMouseDown = t => {
            this.visiblePassword(t, !0);
          }),
          (this.handleMouseUp = t => {
            this.visiblePassword(t, !1);
          }),
          (this.handleLabelClick = t => {
            var i;
            (t.preventDefault(), null === (i = this.nativeInput) || void 0 === i || i.focus());
          }));
      }
      maskOptionsChanged(t, i) {
        var e;
        f(t, i) || (null === (e = this.cleaveInstance) || void 0 === e || e.destroy(), (this.cleaveInstance = new C(this.nativeInput, Object.assign({}, this.maskOptions))));
      }
      valueChanged(t, i) {
        f(t, i) || 'chips' === this.mode || (this.nativeInput.value = 'object' == typeof t && 'object' == typeof i ? M(t, this.chipLabelKey) : t);
      }
      componentWillLoad() {
        if (this.el.hasAttribute('tabindex')) {
          const t = this.el.getAttribute('tabindex');
          ((this.tabindex = null !== t ? t : void 0), this.el.removeAttribute('tabindex'));
        }
        'text' == this.mode
          ? (this.inputType = 'text')
          : 'number' == this.mode
            ? (this.inputType = 'number')
            : 'password' == this.mode
              ? ((this.inputType = 'password'), (this.isPassword = !0))
              : 'counter' == this.mode && ((this.inputType = 'number'), (this.isCounter = !0));
      }
      componentDidLoad() {
        var t, i;
        ((this.nativeInput = this.el.querySelector('input')),
          'counter' === this.mode &&
            (this.nativeInput.value = null !== (i = null === (t = this.clampValueByLimit(this.value)) || void 0 === t ? void 0 : t.toString()) && void 0 !== i ? i : ''),
          'text' == this.mode && this.maskOptions && (this.cleaveInstance = new C(this.nativeInput, Object.assign({}, this.maskOptions))));
      }
      componentDidUpdate() {
        var t, i;
        'counter' === this.mode &&
          (this.nativeInput.value = null !== (i = null === (t = this.clampValueByLimit(this.value)) || void 0 === t ? void 0 : t.toString()) && void 0 !== i ? i : '');
      }
      formResetCallback() {
        this.handleFormReset();
      }
      async setFocus() {
        var t;
        null === (t = this.nativeInput) || void 0 === t || t.focus();
      }
      validateMinMax() {
        if (void 0 === this.min && void 0 === this.max) return;
        const t = parseFloat(this.value);
        isNaN(t) ||
          (void 0 !== this.min && t < Number(this.min)
            ? ((this.value = 'counter' === this.mode ? Number(this.min) : this.min.toString()), this.tkChange.emit(this.value))
            : void 0 !== this.max && t > Number(this.max) && ((this.value = 'counter' === this.mode ? Number(this.max) : this.max.toString()), this.tkChange.emit(this.value)));
      }
      visiblePassword(t, i) {
        i ? ((this.nativeInput.type = 'text'), (t.target.innerHTML = 'visibility_off')) : ((this.nativeInput.type = 'password'), (t.target.innerHTML = 'visibility'));
      }
      calculatePasswordStrength(t) {
        let i = 0;
        return (t.length >= 8 && i++, /[A-Z]/.test(t) && i++, /[a-z]/.test(t) && i++, /[0-9]/.test(t) && i++, /[^A-Za-z0-9]/.test(t) && i++, i);
      }
      isMaskDelimiterCharacter(t) {
        var i;
        const e = new Set();
        ('string' == typeof this.maskOptions.delimiter && this.maskOptions.delimiter.length > 0 && e.add(this.maskOptions.delimiter),
          Array.isArray(this.maskOptions.delimiters) &&
            this.maskOptions.delimiters.forEach(t => {
              'string' == typeof t && t.length > 0 && e.add(t);
            }));
        const n = null !== (i = this.maskOptions.numeralDecimalMark) && void 0 !== i ? i : '.',
          s = !!t && e.has(t),
          a = !!t && !!this.maskOptions.numeral && 0 === e.size && /[^0-9]/.test(t) && t !== n;
        return !!t && (s || a) && t !== n;
      }
      handleFormReset() {
        ((this.value = 'chips' === this.mode && this.chipDisabled && Array.isArray(this.value) ? this.value.filter(t => this.chipDisabled(t)) : null),
          this.tkChange.emit(this.value));
      }
      handleMinusButtonClick() {
        if (!this.disabled) {
          const t = Number(this.value) || 0,
            i = this.clampValueByLimit(t - 1, 'decrement');
          null !== i && i !== Number(this.value) && ((this.value = i), this.tkChange.emit(i));
        }
      }
      handlePlusButtonClick() {
        if (!this.disabled) {
          let t;
          t = '' === this.value || null == this.value ? (null != this.min ? Number(this.min) : 0) : Number(this.value);
          const i = this.clampValueByLimit(t + 1, 'increment');
          null !== i && i !== Number(this.value) && ((this.value = i), this.tkChange.emit(i));
        }
      }
      handleChipsRemove(t) {
        if (this.readonly || this.disabled) return;
        const i = [...this.value];
        t >= 0 && t < i.length && (i.splice(t, 1), (this.value = i), this.tkChange.emit(i));
      }
      renderStrengthLines() {
        const t = [];
        for (let i = 0; i < 4; i++) {
          let e = 'line';
          (i < this.passwordStrength && (e += this.passwordStrength < 3 ? ' weak' : this.passwordStrength < 4 ? ' medium' : ' strong'),
            t.push(n('span', { 'class': e, 'data-testid': h(this.dataTestid, 'strength-line', i.toString()) }, ' ')));
        }
        return t;
      }
      renderChips() {
        var t;
        if ('chips' == this.mode && 'object' == typeof this.value && (null === (t = this.value) || void 0 === t ? void 0 : t.length) > 0)
          return this.value.map((t, i) => {
            var e, s, a, r;
            const o = this.chipOptions || {};
            let l;
            l =
              !(null === (e = this.chipDisabled) || void 0 === e ? void 0 : e.call(this, t)) &&
              !this.disabled &&
              ('object' != typeof t || null === t || !t.hasOwnProperty('removable') || t.removable);
            const u = Object.assign(Object.assign({}, o), {
                removable: l,
                key: i,
                autoSelfDestroy: !1,
                value: t,
                variant: null !== (s = o.variant) && void 0 !== s ? s : 'neutral',
                type: null !== (a = o.type) && void 0 !== a ? a : 'outlined',
                size: null !== (r = o.size) && void 0 !== r ? r : 'small',
                disabled: this.disabled,
              }),
              c = 'object' == typeof t && null !== t && t.__isOthersIndicator ? t.label : 'object' == typeof t ? M(t, this.chipLabelKey) : String(t);
            return n('tk-chips', Object.assign({ 'label': c, 'onTk-remove': () => this.handleChipsRemove(i) }, u, { dataTestid: h(this.dataTestid, 'chips', i.toString()) }));
          });
      }
      renderInput() {
        return n('input', {
          'id': this.uniqueId,
          'ref': t => (this.nativeInput = t),
          'disabled': this.disabled,
          'autoComplete': 'off',
          'type': this.inputType,
          'name': this.name,
          'min': this.min,
          'max': this.max,
          'step': this.step,
          'placeholder': this.placeholder || '',
          'readOnly': this.readOnly || !this.editable,
          'tabindex': this.tabindex,
          'value': 'chips' === this.mode ? void 0 : 'object' == typeof this.value && null !== this.value ? M(this.value, this.chipLabelKey) : this.value,
          'onInput': this.handleInput,
          'onBlur': this.handleInputBlur,
          'onFocus': this.handleInputFocus,
          'onKeyDown': this.handleInputKeyDown,
          'onKeyUp': this.handleInputKeyUp,
          'data-testid': h(this.dataTestid, 'native-input'),
        });
      }
      renderLabel() {
        var t;
        let i;
        if ((null === (t = this.label) || void 0 === t ? void 0 : t.length) > 0) {
          const t = n('span', { 'class': 'asterisk', 'data-testid': h(this.dataTestid, 'label-asterisk') }, '*');
          i = n(
            'label',
            { 'htmlFor': this.uniqueId, 'class': 'label', 'onClick': this.handleLabelClick, 'data-testid': h(this.dataTestid, 'label') },
            this.label,
            this.showAsterisk ? t : '',
          );
        }
        return i;
      }
      renderAlignmentButtons() {
        let t, i;
        return (
          this.isCounter &&
            ((t = n(
              'tk-icon',
              Object.assign(
                {},
                r(
                  'remove',
                  { class: a('counter-icon clickable', { disabled: this.disabled || Number(this.value) <= Number(this.min) }), onClick: this.handleMinusButtonClick.bind(this) },
                  void 0,
                  'span',
                ),
                { dataTestid: h(this.dataTestid, 'counter-decrease-icon') },
              ),
            )),
            (i = n(
              'tk-icon',
              Object.assign(
                {},
                r(
                  'add',
                  { class: a('counter-icon clickable', { disabled: this.disabled || Number(this.value) >= Number(this.max) }), onClick: this.handlePlusButtonClick.bind(this) },
                  void 0,
                  'span',
                ),
                { dataTestid: h(this.dataTestid, 'counter-increase-icon') },
              ),
            ))),
          { left: t, right: i }
        );
      }
      renderPasswordIcons() {
        let t, i;
        return (
          'password' == this.inputType &&
            (this.hidePasswordIcon || (t = n('tk-icon', Object.assign({}, r('lock', { color: 'var(--icon-base)' }), { dataTestid: h(this.dataTestid, 'password-lock-icon') }))),
            (i = n(
              'tk-icon',
              Object.assign({}, r('visibility', { class: 'clickable', color: 'var(--icon-base)', onMouseDown: this.handleMouseDown, onMouseUp: this.handleMouseUp }), {
                dataTestid: h(this.dataTestid, 'password-visibility-icon'),
              }),
            ))),
          { left: t, right: i }
        );
      }
      render() {
        var t;
        let i, e, s;
        this.showSafetyStatus &&
          (s = n(
            'div',
            { 'key': 'c24cc9089d371c0154413a0f04d487fce7d2bce6', 'class': 'safety-status', 'data-testid': h(this.dataTestid, 'safety-status') },
            this.renderStrengthLines(),
          ));
        const u = a('tk-input-container', this.size, { focus: this.hasFocus, counter: this.isCounter, chips: 'chips' == this.mode }),
          c = a('tk-input-prefix-container', this.size);
        if (this.icon && !this.isCounter) {
          const { leftIcon: t, rightIcon: n } = o(this.icon, { additionalProps: { color: 'var(--icon-base)' }, dataTestid: this.dataTestid }, this.iconPosition);
          ((i = t), (e = n));
        }
        const d =
          this.clearable &&
          !this.readonly &&
          (('chips' !== this.mode && this.value) || ('chips' === this.mode && (null === (t = this.value) || void 0 === t ? void 0 : t.length) > 0));
        return (
          this.el.classList.contains('tk-select-input')
            ? ((this.readOnly = this.el.classList.contains('readonly-select')), (this.editable = this.el.classList.contains('editable-select')))
            : (this.readOnly = this.readonly),
          n(
            'div',
            {
              'key': '0f96098e6d6da0cecc77898e9c47faf3f8324b82',
              'aria-readonly': this.readonly,
              'aria-disabled': this.disabled,
              'aria-invalid': this.invalid,
              'class': u,
              'data-testid': h(this.dataTestid, 'container'),
            },
            this.renderLabel(),
            n(
              'div',
              { 'key': '0767a2945f3cc4a3e669086108196352bbc9651e', 'class': 'tk-input', 'data-testid': h(this.dataTestid, 'control') },
              this.renderChips(),
              !i && this.renderPasswordIcons().left,
              i,
              this.renderAlignmentButtons().left,
              this.pre &&
                n(
                  'div',
                  { 'key': '5b7acfa827c16c8f5db7107633bcf90059474478', 'class': c, 'data-testid': h(this.dataTestid, 'prefix') },
                  n('span', { 'key': '8c70f2ed181d8772403c8942acb45661c0d74d3b', 'class': 'tk-input-prefix-text', 'data-testid': h(this.dataTestid, 'prefix-text') }, this.pre),
                  n('span', { 'key': '144ddff7c0da91b78ec11ad565cd1e66563c7604', 'class': 'tk-input-divider', 'data-testid': h(this.dataTestid, 'prefix-divider') }),
                ),
              this.renderInput(),
              this.loading &&
                n('tk-spinner', {
                  key: 'e766f1a4d9619c527e2c7c225984a3b2edc0f7ce',
                  size: 'large' === this.size ? 'small' : 'base' === this.size ? 'xsmall' : 'xxsmall',
                  dataTestid: h(this.dataTestid, 'loading-spinner'),
                }),
              d &&
                n(
                  'tk-icon',
                  Object.assign(
                    { key: '43f4efe6390a697b9a8669ae7705f31f34dae594' },
                    r('close', {
                      class: a('tk-input-clear-button clickable', { disabled: this.disabled || this.readonly }),
                      color: 'var(--icon-base)',
                      onClick: this.handleClearButtonClick,
                      onKeyDown: this.handleClearButtonKeyDown,
                      tabindex: this.disabled || this.readonly ? -1 : 0,
                    }),
                    { dataTestid: h(this.dataTestid, 'clear-icon') },
                  ),
                ),
              e,
              !e && this.renderPasswordIcons().right,
              this.renderAlignmentButtons().right,
            ),
            s,
            l(this.hint, this.error, this.invalid, this.dataTestid),
          )
        );
      }
      static get formAssociated() {
        return !0;
      }
      get el() {
        return this;
      }
      static get watchers() {
        return { maskOptions: [{ maskOptionsChanged: 0 }], value: [{ valueChanged: 0 }] };
      }
      static get style() {
        return '@font-face{font-family:"Material Symbols Outlined";src:url("./assets/fonts/material-symbols/Material-Symbols-Outlined.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}.material-symbols-outlined{font-family:"Material Symbols Outlined";font-weight:normal;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.material-symbols-outlined{font-variation-settings:"FILL" 0}.material-symbols-outlined.fill{font-variation-settings:"FILL" 1}@font-face{font-family:"Material Symbols Rounded";src:url("./assets/fonts/material-symbols/Material-Symbols-Rounded.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}.material-symbols-rounded{font-family:"Material Symbols Rounded";font-weight:normal;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.material-symbols-rounded{font-variation-settings:"FILL" 0}.material-symbols-rounded.fill{font-variation-settings:"FILL" 1}@font-face{font-family:"Material Symbols Sharp";src:url("./assets/fonts/material-symbols/Material-Symbols-Sharp.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}.material-symbols-sharp{font-family:"Material Symbols Sharp";font-weight:normal;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.material-symbols-sharp{font-variation-settings:"FILL" 0}.material-symbols-sharp.fill{font-variation-settings:"FILL" 1}tk-input{display:block}tk-input.tk-select-input:not(.editable-select) .tk-input,tk-input.tk-select-input:not(.editable-select) .tk-input input{cursor:pointer}tk-input.tk-table-input .tk-input-container .tk-input{height:20px;padding-top:0px;padding-bottom:0px;border-radius:var(--spacing-xs)}tk-input.tk-table-input .tk-input-container .tk-input input{font-size:var(--desktop-body-s-size);line-height:100%}.tk-input-container{display:flex;align-items:flex-start;flex-direction:column;gap:var(--input-external-label-large-container-gap);width:100%;font-family:var(--family-body)}.tk-input-container .label{color:var(--text-darkest);font-weight:400}.tk-input-container .label .asterisk{color:var(--states-danger-base);font-size:var(--desktop-label-s-size);font-weight:300;line-height:var(--desktop-label-s-line-height)}.tk-input-container .tk-input{display:flex;align-items:center;border:1px solid var(--border-light);border-radius:var(--spacing-m-base);background-color:var(--static-light);box-sizing:border-box;width:-webkit-fill-available}.tk-input-container .tk-input .tk-input-clear-button{margin-left:auto}.tk-input-container .tk-input tk-icon{user-select:none}.tk-input-container .tk-input tk-icon.clickable:not(.disabled){cursor:pointer}.tk-input-container .tk-input .tk-input-prefix-container{display:inline-flex;font-weight:300}.tk-input-container .tk-input .tk-input-prefix-container.large{font-size:var(--desktop-body-m-base-size);line-height:var(--desktop-body-m-base-line-height)}.tk-input-container .tk-input .tk-input-prefix-container.base{font-size:var(--desktop-body-s-size);line-height:var(--desktop-body-s-line-height)}.tk-input-container .tk-input .tk-input-prefix-container.small{font-size:var(--desktop-body-xs-size);line-height:var(--desktop-body-xs-line-height)}.tk-input-container .tk-input .tk-input-prefix-container .tk-input-prefix-text{color:var(--text-sub-base);size:inherit}.tk-input-container .tk-input .tk-input-prefix-container .tk-input-divider{position:relative;display:flex;justify-content:center;min-height:100%;margin:0 8px}.tk-input-container .tk-input .tk-input-prefix-container .tk-input-divider::before{content:"";position:absolute;display:block;height:100%;inset-block-start:0;inset-inline-start:50%;border-inline-start:var(--spacing-px) solid var(--background-light);box-sizing:border-box}.tk-input-container .tk-input input{outline:none;border:none;background-color:transparent;color:var(--text-darkest);padding:0px;width:100%;font-family:var(--desktop-body-m-base-font);line-height:var(--desktop-body-m-base-line-height)}.tk-input-container .tk-input input::placeholder{color:var(--text-sub-base)}.tk-input-container .tk-input:hover:not(.tk-input-container[aria-disabled] .tk-input){background-color:var(--background-lightest)}.tk-input-container .safety-status{display:flex;gap:var(--spacing-xs);width:100%;margin-top:var(--spacing-xxs)}.tk-input-container .safety-status .line{width:25%;height:4px;border-radius:var(--radius-m-base);background-color:var(--background-light)}.tk-input-container .safety-status .line.weak{background-color:var(--states-danger-base)}.tk-input-container .safety-status .line.medium{background-color:var(--states-warning-base)}.tk-input-container .safety-status .line.strong{background-color:var(--states-success-base)}.tk-input-container.large .label{font-size:var(--desktop-label-l-size);line-height:var(--desktop-label-l-line-height);padding:var(--input-external-label-large-label-v-padding) var(--input-external-label-large-label-h-padding)}.tk-input-container.large .tk-input{gap:var(--input-external-label-large-input-gap);height:48px;padding:var(--input-external-label-large-input-v-padding) var(--input-external-label-large-input-h-padding)}.tk-input-container.large .tk-input input{font-size:var(--desktop-body-m-base-size);line-height:var(--desktop-body-m-base-line-height)}.tk-input-container.base .label{font-size:var(--desktop-label-m-base-size);line-height:var(--desktop-label-m-base-line-height);padding:var(--input-external-label-base-label-v-padding) var(--input-external-label-base-label-h-padding)}.tk-input-container.base .tk-input{gap:var(--input-external-label-base-input-gap);height:40px;padding:var(--input-external-label-base-input-v-padding) var(--input-external-label-base-input-h-padding)}.tk-input-container.base .tk-input input{font-size:var(--desktop-body-s-size);line-height:var(--desktop-body-s-line-height)}.tk-input-container.small .label{font-size:var(--desktop-label-s-size);line-height:var(--desktop-label-s-line-height);padding:var(--input-external-label-small-label-v-padding) var(--input-external-label-small-label-h-padding)}.tk-input-container.small .tk-input{gap:var(--input-external-label-small-input-gap);height:32px;padding:var(--input-external-label-small-input-v-padding) var(--input-external-label-small-input-h-padding)}.tk-input-container.small .tk-input input{font-size:var(--desktop-body-xs-size);line-height:var(--desktop-body-xs-line-height)}.tk-input-container.focus .tk-input{border-color:var(--states-info-base)}.tk-input-container[aria-disabled]{pointer-events:none}.tk-input-container[aria-disabled] .label,.tk-input-container[aria-disabled] .tk-input input{color:var(--text-sub-base);pointer-events:none}.tk-input-container[aria-disabled] .tk-input{background-color:var(--background-lightest)}.tk-input-container[aria-readonly] .label{color:var(--text-sub-base)}.tk-input-container[aria-readonly] .tk-input{background-color:var(--background-lightest)}.tk-input-container[aria-invalid] .tk-input{border-color:var(--states-danger-base)}.tk-input-container input[type=number]{appearance:none}.tk-input-container{}.tk-input-container input[type=number]::-webkit-outer-spin-button,.tk-input-container input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tk-input-container.counter input{text-align:center}.tk-input-container.chips .tk-input{flex-wrap:wrap;height:unset}.tk-input-container.chips .tk-input input{flex:1;width:unset;min-width:30px}';
      }
    },
    [
      64,
      'tk-input',
      {
        disabled: [4],
        invalid: [4],
        clearable: [4],
        error: [1],
        hint: [1],
        icon: [1],
        iconPosition: [1, 'icon-position'],
        label: [1],
        pre: [1],
        maskOptions: [16],
        max: [8],
        min: [8],
        name: [1],
        placeholder: [1],
        readonly: [4],
        size: [1],
        showSafetyStatus: [4, 'show-safety-status'],
        showAsterisk: [4, 'show-asterisk'],
        chipLabelKey: [1, 'chip-label-key'],
        chipOptions: [16],
        mode: [1],
        step: [1],
        chipDisabled: [16],
        loading: [4],
        hidePasswordIcon: [4, 'hide-password-icon'],
        value: [1032],
        dataTestid: [513, 'data-testid'],
        hasFocus: [32],
        inputType: [32],
        isCounter: [32],
        isPassword: [32],
        passwordStrength: [32],
        setFocus: [64],
      },
      void 0,
      { maskOptions: [{ maskOptionsChanged: 0 }], value: [{ valueChanged: 0 }] },
    ],
  );
function O() {
  'undefined' != typeof customElements &&
    ['tk-input', 'tk-chips', 'tk-icon', 'tk-spinner'].forEach(t => {
      switch (t) {
        case 'tk-input':
          customElements.get(s(t)) || customElements.define(s(t), N);
          break;
        case 'tk-chips':
          customElements.get(s(t)) || u();
          break;
        case 'tk-icon':
          customElements.get(s(t)) || c();
          break;
        case 'tk-spinner':
          customElements.get(s(t)) || d();
      }
    });
}
export { N as T, O as d, M as g };
