"use strict";
(window.talentlyftOrigin = "https://widget.talentlyft.com"),
  (window.talentlyftWidget = (function (e, t) {
    var a,
      n,
      l,
      i,
      o,
      s,
      r = "https://widget.talentlyft.com/public/jswidget/",
      c = "https://api.talentlyft.com/public/convert/",
      d = { googleRecaptchaEnabled: d },
      p = "6Le_EDsrAAAAANlJi4X-j1Flty3IxtDkb_W0c9vs",
      u = window.talentlyftOrigin + "/css/JsWidget/talentlyftWidget.min.css",
      m = window.talentlyftOrigin + "/js/JsWidget/address-autocomplete.min.js",
      g = window.talentlyftOrigin + "/js/JsWidget/naive-bijective-functions.js",
      f = window.talentlyftOrigin + "/assets/images/talentlyft_loader.svg",
      y = window.talentlyftOrigin + "/dist/application-form-bundle.min.js",
      v =
        "https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.10/js/select2.min.js",
      h =
        "https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.10/css/select2.min.css",
      b = null,
      S = [],
      A = 1,
      _ = 0,
      L = [],
      w = [],
      j = [],
      F = "",
      E = null,
      C = "#000000",
      k = "az",
      q = 10,
      x = document.createElement("div");
    x.classList.add("tl-loader-container");
    var N = document.createElement("style");
    N.appendChild(
      document.createTextNode(
        ".tl-loader-container { display: flex; justify-content: center; }.tl-loader-image { height: 50px; }"
      )
    ),
      document.head.appendChild(N);
    var T = document.createElement("img");
    (T.src = f),
      T.classList.add("tl-loader-image"),
      x.appendChild(T),
      document.body.appendChild(x);
    var W = {};
    function P() {
      var t;
      (t = e.settings.language),
        $.get(r + i + "/languages/" + t, function (t) {
          for (var a = 0; a < t.length; ++a) {
            var n = t[a];
            W[n.Label] = n.Value;
          }
          var l = document.getElementsByTagName("head")[0];
          le(g, l, "script", B),
            (function (t) {
              if (e.settings && e.settings.translations) {
                var a = e.settings.translations;
                for (var n in a) {
                  var l = a[n];
                  l && t[n]
                    ? (t[n] = l)
                    : l &&
                      !t[n] &&
                      console.error(
                        'Translation key "' +
                          n +
                          '" does not exist. Please check your settings for spelling errors.'
                      );
                }
              }
            })(W);
        }).fail(function (e) {
          e && e.responseJSON
            ? console.error(
                "GET language request failed with following message: " +
                  e.responseJSON.Message
              )
            : console.error("GET language request failed");
        });
    }
    function I() {
      var n =
        "?companyId=" +
        i +
        "&languageCode=" +
        e.settings.language +
        "&contains=" +
        F +
        "&sort=" +
        e.settings.sort +
        "&page=" +
        A +
        "&perPage=" +
        e.settings.pageSize;
      if (e.settings.status && e.settings.status.length > 0)
        for (var l = 0; l < e.settings.status.length; ++l)
          n += "&status=" + e.settings.status[l];
      if (L.length > 0) for (l = 0; l < L.length; ++l) n += "&d=" + L[l];
      if (w.length > 0)
        for (l = 0; l < w.length; ++l) n += "&l=" + t.encodeURIComponent(w[l]);
      if (j.length > 0)
        for (l = 0; l < j.length; ++l) n += "&ti=" + t.encodeURIComponent(j[l]);
      $.get(c + "job_ads" + n, function (n) {
        (_ = n.Count),
          O((S = n.Results)),
          (function () {
            $(".paging-container", a).length > 0 &&
              $(".paging-container", a).remove();
            var n = 3,
              l = Math.ceil(_ / e.settings.pageSize),
              i = A > 1,
              o = A < l,
              s = 1,
              r = l;
            if (1 === l) return;
            var c = $("<ul>", { class: "paging-container" });
            l > n &&
              (i
                ? (c.append($('<li class="page" data-page="<<"><<</li>')),
                  c.append($('<li class="page" data-page="<"><</li>')))
                : (c.append(
                    $('<li class="page disabled" data-page="<<"><<</li>')
                  ),
                  c.append(
                    $('<li class="page disabled" data-page="<"><</li>')
                  )),
              (r = (s = A - Math.floor((n - 1) / 2)) + n - 1),
              s < 1
                ? ((r += Math.abs(1 - s)), (s = 1))
                : r > l && ((s -= Math.abs(r - l)), (r = l)));
            for (var d = s - 1; d < r; ++d)
              d === A - 1
                ? c.append(
                    $(
                      '<li class="page active" style="background-color: ' +
                        (t.talentlyftWidget.settings.color || "#000000") +
                        ';" data-page="' +
                        (d + 1) +
                        '">' +
                        (d + 1) +
                        "</li>"
                    )
                  )
                : c.append(
                    $(
                      '<li class="page" data-page="' +
                        (d + 1) +
                        '">' +
                        (d + 1) +
                        "</li>"
                    )
                  );
            l > n &&
              (o
                ? (c.append($('<li class="page" data-page=">">></li>')),
                  c.append($('<li class="page" data-page=">>">>></li>')))
                : (c.append(
                    $('<li class="page disabled" data-page=">">></li>')
                  ),
                  c.append(
                    $('<li class="page disabled" data-page=">>">>></li>')
                  )));
            t.location.hash.length > 1 && c.hide();
            a.appendChild(c[0]),
              $(".paging-container .page:not(.disabled)").on(
                "click",
                function () {
                  var e = $(this).attr("data-page");
                  "<<" === e
                    ? (A = 1)
                    : "<" === e
                    ? A--
                    : ">" === e
                    ? A++
                    : ">>" === e
                    ? (A = l)
                    : ((e = t.parseInt(e, 10)), (A = e)),
                    I();
                }
              );
          })();
      }).fail(function (e) {
        e && e.responseJSON
          ? console.error(
              "GET jobs request failed with following message: " +
                e.responseJSON.Message
            )
          : console.error("GET jobs request failed");
      });
    }
    function R(a) {
      $.get(
        r + i + "/jobs/" + a + "/form?language=" + e.settings.language,
        function (e) {
          ae(),
            (e = (function (e, t) {
              if (!e.IsPrepared) {
                ee(e.Questions, "Answers"),
                  ee(e.CustomFields, "CustomFieldAnswers"),
                  (e.FormFields = e.FormFields.concat(
                    e.CustomFields.filter(function (e) {
                      return (
                        "PersonalData" === e.FieldLocationType ||
                        "ProfessionalData" === e.FieldLocationType
                      );
                    })
                  )),
                  (e.Questions = e.Questions.concat(
                    e.CustomFields.filter(function (e) {
                      return "ScreeningQuestions" === e.FieldLocationType;
                    })
                  )),
                  e.FormFields.sort((e, t) =>
                    e.Position > t.Position ? 1 : -1
                  ),
                  e.Questions.sort((e, t) =>
                    e.Position > t.Position ? 1 : -1
                  );
                for (var a = 0; a < e.FormFields.length; a++) {
                  var n = e.FormFields[a];
                  if (
                    ((n.Label = null !== n.Label ? t[n.Label] : n.Body),
                    (n.NameKey =
                      null === n.NameKey || void 0 === n.NameKey
                        ? n.Key
                        : n.NameKey),
                    "select" === n.Type && null !== n.Choices && Y(n, t),
                    n.Fields && n.Fields.length > 0)
                  )
                    for (var l = 0; l < n.Fields.length; l++) {
                      var i = n.Fields[l];
                      (i.Label = null !== i.Label ? t[i.Label] : i.Body),
                        (i.NameKey =
                          null === i.NameKey || void 0 === i.NameKey
                            ? i.Key
                            : i.NameKey),
                        "select" === i.Type && null !== i.Choices && Y(i, t);
                    }
                }
                var o = e.FormFields.filter(function (e) {
                  return e.Fields && e.Fields.length > 0;
                });
                for (a = 0; a < o.length; a++) {
                  var s = o[a];
                  for (
                    s.NameKey = s.Key + "[{index}]", l = 0;
                    l < s.Fields.length;
                    l++
                  ) {
                    var r = s.Fields[l];
                    "date-select" === r.Type
                      ? (r.NameKey = s.Key + "[{index}]")
                      : (r.NameKey = s.Key + "[{index}]." + r.Key);
                  }
                }
                return (
                  (e.Name = e.FormFields.filter(function (e) {
                    return (
                      "Salutation" === e.Key ||
                      "FirstName" === e.Key ||
                      "LastName" === e.Key
                    );
                  })),
                  (e.Personal = e.FormFields.filter(function (e) {
                    return (
                      "PersonalData" === e.FieldLocationType &&
                      "Salutation" !== e.Key &&
                      "FirstName" !== e.Key &&
                      "LastName" !== e.Key
                    );
                  })),
                  (e.Profile = e.FormFields.filter(function (e) {
                    return "ProfessionalData" === e.FieldLocationType;
                  })),
                  (e.IsPrepared = !0),
                  e
                );
              }
            })(e, W));
          var a = document.getElementById("applyForm");
          if (
            (t.renderApplicationFormHtml(a, { form: e, lang: W }),
            t.talentlyftWidget.settings.color &&
              $("#btnSubmit").css(
                "background-color",
                t.talentlyftWidget.settings.color
              ),
            $("#btnSubmit")[0].style.setProperty("color", C, "important"),
            ((n =
              document.getElementsByClassName(
                "application-form"
              )[0]).style.display = "block"),
            (n.style.visibility = "visible"),
            document.getElementById("btnSubmit").removeAttribute("disabled"),
            !0 === d)
          ) {
            var l = document.createElement("div");
            l.classList.add("talentlyft", "grecaptcha-branding"),
              (l.id = "grecaptcha-disclaimer"),
              (l.innerHTML = W.Footer_ReCaptcha_Notification),
              document.getElementById("btnSubmit").parentNode.appendChild(l);
          }
          flatpickr("[data-fv-date]", { dateFormat: "m/d/Y" });
          for (
            var i = t.document.querySelectorAll(".gaddress"), o = 0;
            o < i.length;
            o++
          ) {
            var s = i[o];
            s && t.initAddressAutocomplete(s, t);
          }
          !(function () {
            var e = t.document.getElementById("application-form");
            if (e) {
              var a,
                n,
                l = e.querySelector("#avatar-placeholder-img"),
                i = e.querySelector("#inputAvatar"),
                o = e.querySelector("#avatar-img"),
                s = e.querySelector("#Avatar"),
                r = e.querySelector("#AvatarName"),
                c = e.querySelector("#AvatarType"),
                d = e.querySelector("#btn-crop-avatar"),
                p = e.querySelector("#btn-cancel-avatar"),
                u = e.querySelector("#btn-upload-avatar"),
                m = e.querySelector("#avatar-editor-controls");
              t.talentlyftWidget.settings.color &&
                ($(d).css(
                  "background-color",
                  t.talentlyftWidget.settings.color
                ),
                $(p).css("background-color", t.talentlyftWidget.settings.color),
                $(u).css(
                  "background-color",
                  t.talentlyftWidget.settings.color
                ));
              var g = $(d),
                f = $(p),
                y = $(u);
              g.length > 0 && g[0].style.setProperty("color", C, "important"),
                f.length > 0 && f[0].style.setProperty("color", C, "important"),
                y.length > 0 && y[0].style.setProperty("color", C, "important"),
                i &&
                  (i.addEventListener("change", function (e) {
                    (o.style.display = "inline"),
                      (l.style.display = "none"),
                      (m.style.display = "inline-block"),
                      (u.style.display = "none");
                    var t,
                      s,
                      r = e.target.files,
                      c = function (e, t, l) {
                        (i.value = ""),
                          (o.src = e),
                          (a = t),
                          (n = l),
                          b && (b.destroy(), (b = null)),
                          (b = new Cropper(o, { aspectRatio: 1, viewMode: 3 }));
                      };
                    r &&
                      r.length > 0 &&
                      ((s = r[0]),
                      URL
                        ? c(URL.createObjectURL(s), s.name, s.type)
                        : FileReader &&
                          (((t = new FileReader()).onload = function (e) {
                            c(t.result, s.name, s.type);
                          }),
                          t.readAsDataURL(s)));
                  }),
                  l.addEventListener("click", function (e) {
                    i.click();
                  }),
                  d.addEventListener("click", function (e) {
                    var t = b
                      .getCroppedCanvas({ width: 200, height: 200 })
                      .toDataURL("image/jpeg", 1);
                    (s.value = t.substring(t.indexOf(",") + 1)),
                      (r.value = a),
                      (c.value = n),
                      (l.src = t),
                      (o.style.display = "none"),
                      (l.style.display = "inline"),
                      b.destroy(),
                      (b = null),
                      (m.style.display = "none"),
                      (u.style.display = "inline-block");
                  }),
                  p.addEventListener("click", function (e) {
                    b.destroy(),
                      (b = null),
                      (o.style.display = "none"),
                      (l.style.display = "inline"),
                      (m.style.display = "none"),
                      (u.style.display = "inline-block");
                  }));
            }
          })();
          var r = t.document.querySelectorAll("input[type=file]");
          for (o = 0; o < r.length; ++o)
            "inputAvatar" !== r[o].id && r[o].addEventListener("change", J);
          document.querySelector(
            "#talentlyftPrivacyPolicyModal .tl-modal-content p"
          ).innerHTML = e.Gdpr.PrivacyPolicy;
          var c = document.getElementById("btnPrivacyPolicy");
          c &&
            ((c.onclick = function () {
              (document.getElementById(
                "talentlyftPrivacyPolicyModal"
              ).style.display = "block"),
                $("body").css("overflow", "hidden");
            }),
            c.removeAttribute("data-target"),
            c.removeAttribute("data-toggle"));
        }
      ).fail(function (e) {
        e && e.responseJSON
          ? console.error(
              "GET job form request failed with following message: " +
                e.responseJSON.Message
            )
          : console.error("GET job form request failed");
      });
    }
    function M() {
      var n = "?language=" + e.settings.language;
      if (e.settings.status && e.settings.status.length > 0)
        for (var l = 0; l < e.settings.status.length; ++l)
          n += "&status=" + e.settings.status[l];
      if (e.settings.departments && e.settings.departments.length > 0)
        for (l = 0; l < e.settings.departments.length; ++l)
          n += "&d=" + e.settings.departments[l];
      if (e.settings.locations && e.settings.locations.length > 0)
        for (l = 0; l < e.settings.locations.length; ++l)
          n += "&l=" + t.encodeURIComponent(e.settings.locations[l]);
      if (e.settings.tags && e.settings.tags.length > 0)
        for (l = 0; l < e.settings.tags.length; ++l)
          n += "&tid=" + t.encodeURIComponent(e.settings.tags[l]);
      $.get(r + i + "/jobs_filters" + n, function (n) {
        var l = (function (e) {
          var t = [];
          t.push(e);
          for (var a = []; t.length > 0; ) {
            var n,
              l = t.pop();
            a.push({ Level: l.Level, Value: l.Value, Name: l.Name });
            for (var i = l.Children.length - 1; i >= 0; i--)
              ((n = l.Children[i]).Level = l.Level + 1), t.push(n);
          }
          return a.splice(0, 1), a;
        })({ Children: n.Departments, Name: "Root", Value: null, Level: 0 });
        (s = { departments: l, locations: n.Locations }),
          (function () {
            if (t.document.querySelector(".job-filters")) return;
            var n = $('<div class="clearfix job-filters">');
            t.talentlyftWidget.settings.fontFamily &&
              n.css("font-family", t.talentlyftWidget.settings.fontFamily);
            t.talentlyftWidget.settings.fontSize &&
              n.css("font-size", t.talentlyftWidget.settings.fontSize);
            t.talentlyftWidget.settings.color &&
              n.css("background-color", t.talentlyftWidget.settings.color);
            for (
              var l = $(
                  '<div class="col col-md-6 job-search-wrapper"><input type ="text" value="" placeholder="' +
                    W.Label_CareerSite_FilterJobs +
                    '"></div>'
                ),
                i =
                  '<div class="col col-md-3 job-department-dropdown-wrapper"><select class="job-department-dropdown" data-placeholder="' +
                  W.Label_JobFilter_ChooseDepartment +
                  '" data-language--noResults="' +
                  W.Label_JobFilter_NoResults +
                  '"><option></option>',
                o = 0;
              o < s.departments.length;
              ++o
            ) {
              var r = s.departments[o];
              i +=
                '<option value="' +
                r.Value +
                '" title="' +
                r.Name +
                '" class="lvl' +
                r.Level +
                '">' +
                r.Name +
                "</option>";
            }
            i += "</select></div>";
            var c =
              '<div class="col col-md-3 job-location-dropdown-wrapper"><select class="job-location-dropdown" data-placeholder="' +
              W.Label_JobFilter_ChooseLocation +
              '" data-language--noResults="' +
              W.Label_JobFilter_NoResults +
              '"><option></option>';
            for (o = 0; o < s.locations.length; ++o)
              c +=
                '<option value="' +
                (r = s.locations[o]).Value +
                '" title="' +
                r.Name +
                '">' +
                r.Name +
                "</option>";
            (c += "</select></div>"),
              n.append(l),
              n.append($(i)),
              n.append($(c)),
              t.location.hash.length > 1 && n.hide();
            $(a).prepend(n),
              $(".job-search-wrapper input").keyup(function (e) {
                t.clearTimeout(E),
                  (F = this.value),
                  (E = t.setTimeout(function () {
                    var e;
                    (e = F), (F = window.encodeURIComponent(e)), (A = 1), I();
                  }, 1e3));
              }),
              (function () {
                var t = $(".job-department-dropdown"),
                  a = $(".job-location-dropdown");
                void 0 === t.data("select2") &&
                  (t.select2({
                    templateResult: function (e) {
                      if (!e.element) return e.text;
                      var t = $(e.element),
                        a = $("<span></span>");
                      return a.addClass(t[0].className), a.text(e.text), a;
                    },
                    width: "100%",
                    allowClear: !0,
                  }),
                  t.on("select2:select", function (e) {
                    var t;
                    (t = e.params.data.id), (L = [t]), (A = 1), I();
                  }),
                  t.on("select2:clear", function (t) {
                    var a;
                    (a = e.settings.departments), (L = [...a]), (A = 1), I();
                  }));
                void 0 === a.data("select2") &&
                  (a.select2({ width: "100%", allowClear: !0 }),
                  a.on("select2:select", function (e) {
                    var t;
                    (t = e.params.data.id), (w = [t]), (A = 1), I();
                  }),
                  a.on("select2:clear", function (t) {
                    var a;
                    (a = e.settings.locations), (w = [...a]), (A = 1), I();
                  }));
              })();
          })();
      }).fail(function (e) {
        e && e.responseJSON
          ? console.error(
              "GET job filters request failed with following message: " +
                e.responseJSON.Message
            )
          : console.error("GET job filters request failed");
      });
    }
    function B() {
      I();
      var e = document.getElementsByTagName("head")[0];
      le(v, e, "script", M), le(h, e, "link");
    }
    function O(n) {
      var l = n,
        i = t.document.getElementsByClassName("application-form")[0];
      i && (i.style.display = "none"),
        a.classList.add("talentlyftWidget", "talentlyft");
      var o = t.document.querySelector(".tl-jobs");
      if (t.location.hash.length > 1) {
        var s = t.location.hash.replace("#", "");
        K(s);
        var r = document.querySelector("#item" + s);
        r &&
          t.scrollTo(
            0,
            r.getBoundingClientRect().top + document.body.scrollTop
          );
      }
      var c = "",
        d = function (e) {
          return (
            '<li class="tl-job" onclick="talentlyftWidget.showJobDesc(\'' +
            e.FriendlyUrl +
            '\')"><a class="tl-title clearfix" href="javascript:;"><span class="tl-title-text">' +
            e.Title +
            '</span><span class="tl-address"><i><img src="https://cdn.talentlyft.com/images/jswidget/map-marker-alt.svg" /></i> <span>' +
            e.Location.CityCountry +
            "</span></span></a></li>"
          );
        };
      "careerSite" === e.settings.applicationFormOn &&
        (d = function (e) {
          return (
            '<li class="tl-job"><a class="tl-title clearfix" target="_blank" href="' +
            e.AbsoluteUrl +
            '"><span class="tl-title-text">' +
            e.Title +
            '</span><span class="tl-address"><i><img src="https://cdn.talentlyft.com/images/jswidget/map-marker-alt.svg" /></i><span>' +
            e.Location.CityCountry +
            "</span></span></a></li>"
          );
        }),
        l.forEach(function (e) {
          c += d(e);
        }),
        o
          ? (o.innerHTML = c)
          : $(a).append(
              '<ul class="tl-jobs" style="display: none">' + c + "</ul>"
            ),
        ie(
          ".talentlyftWidget .tl-title, .talentlyftWidget .tl-job",
          !0,
          !0,
          !0
        ),
        ae(),
        (0 !== t.location.hash.length && "#" !== t.location.hash) ||
          $(".job-filters, .tl-jobs, .paging-container").show();
    }
    function z(n) {
      var l;
      o = n;
      var i = W.CareerSite_Label_BackToOpenings,
        s = W.CareerSite_Label_ApplyForThisJob,
        r = $(".job-description-container", a);
      0 === r.length &&
        ((r = $('<div class="job-description-container"></div>')),
        $(a).append(r)),
        (l =
          '<a class="tl-back" onclick="talentlyftWidget.backToJobList()"><i><img src="https://cdn.talentlyft.com/images/jswidget/long-arrow-alt-left.svg" /></i><span>' +
          i +
          "</span></a>"),
        (l += '<span id="item' + n.FriendlyUrl + '"></span>'),
        (l +=
          '<div class="tl-desc-title">' +
          n.Title +
          ' <small class="tl-desc-title-address">- ' +
          n.Location.CityCountry +
          "</small></div>"),
        (l += "<hr>"),
        (l += n.Description),
        "Published" === n.Status || "Internal" === n.Status
          ? (l +=
              '<button type="button" class="btn btn-primary brandColor btnApply" onclick="talentlyftWidget.openApplicationForm(' +
              n.Id +
              ", " +
              n.Location.Id +
              ')">' +
              s +
              "</button>")
          : "en" === e.settings.language
          ? (l +=
              '<div style="color:red; font-size:15px; margin-top:30px;">Unfortunately the job is not active</div>')
          : "hr" === e.settings.language &&
            (l +=
              '<div style="color:red; font-size:15px; margin-top:30px;">Nazalost ovaj posao nije aktivan</div>'),
        r.html(l),
        ie(".talentlyftWidget", !0, !0, !1),
        ie(".talentlyftWidget a", !0, !0, !0),
        ("Published" !== n.Status && "Internal" !== n.Status) ||
          ($(".btnApply").css(
            "background-color",
            t.talentlyftWidget.settings.color
          ),
          $(".btnApply")[0].style.setProperty("color", C, "important")),
        history.pushState(null, null, "#" + n.FriendlyUrl);
    }
    function K(t) {
      "" != t
        ? (function (t) {
            $(".job-description-container").empty(),
              $(".job-filters, .tl-jobs, .paging-container").hide(),
              $(".job-description-container").show(),
              o && o.FriendlyUrl === t
                ? z(o)
                : (te(),
                  $.get(
                    r +
                      i +
                      "/job_ads/" +
                      t +
                      "?language=" +
                      e.settings.language,
                    function (e) {
                      z(e), ae();
                    }
                  ).fail(function (e) {
                    404 === e.status &&
                      $(".job-filters, .tl-jobs, .paging-container").show(),
                      e && e.responseJSON
                        ? console.error(
                            "GET job request failed with following message: " +
                              e.responseJSON.Message
                          )
                        : console.error("GET job request failed");
                  }));
          })(t)
        : history.pushState(null, null, "#");
    }
    function D(e) {
      for (
        var t = se(this, "application-entry"),
          a = this.querySelectorAll(".datepicker-date input"),
          n = 0;
        n < a.length;
        ++n
      ) {
        var l = flatpickr(a[n], {});
        l && l.destroy();
      }
      t.parentElement.removeChild(t);
    }
    function J(e) {
      var a = e.target,
        n = a.files[0];
      !(function (e, a, n) {
        t.formFiles || (t.formFiles = new Object());
        t.fileStack || (t.fileStack = new Array());
        if (!a)
          return void (function (e) {
            t && t.formFiles && t.formFiles[e] && delete t.formFiles[e];
          })(e);
        t.fileStack.push(1);
        var l = new FileReader();
        (l.onload = function () {
          try {
            var n = {
              data: this.result.replace(/^data:.+;base64,/, ""),
              name: a.name,
              type: a.type,
              size: a.size,
            };
            t.formFiles[e] = n;
            var l = t.document.querySelector('[name="' + e + '"]');
            l.setAttribute("data-file-conversion-success", !0),
              l.setAttribute("data-file-has-file", !0),
              l.setAttribute(
                "data-file-extension",
                a.name.substr(a.name.lastIndexOf(".") + 1)
              ),
              l.setAttribute("data-file-type", a.type),
              l.setAttribute("data-file-size", a.size),
              fileStack.pop();
          } catch (a) {
            (l = t.document.querySelector(
              '[name="' + e + '"]'
            )).removeAttribute("data-file-has-file"),
              l.removeAttribute("data-file-extension"),
              l.removeAttribute("data-file-type"),
              l.removeAttribute("data-file-size"),
              fileStack.pop();
          }
        }),
          (l.onerror = function () {
            var a = t.document.querySelector('[name="' + e + '"]');
            a.removeAttribute("data-file-has-file"),
              a.removeAttribute("data-file-extension"),
              a.removeAttribute("data-file-type"),
              a.removeAttribute("data-file-size"),
              fileStack.pop();
          }),
          l.readAsDataURL(a);
      })(a.name, n);
    }
    function H() {
      t.fileStack && t.fileStack.length > 0
        ? t.setTimeout(function () {
            H();
          }, 200)
        : ((function () {
            for (var e in t.formFiles) {
              var a = t.formFiles[e];
              t.formData.delete(e),
                t.formData.append(e + ".Content", a.data),
                t.formData.append(e + ".FileName", a.name),
                t.formData.append(e + ".ContentType", a.type);
            }
          })(),
          (function (t) {
            try {
              var n = new XMLHttpRequest();
              (n.onload = function () {
                try {
                  if (
                    (l.parentElement.removeChild(l),
                    n.responseText && n.responseText.length > 0)
                  )
                    try {
                      JSON.parse(n.responseText);
                    } catch (e) {
                      return;
                    }
                  var t = JSON.parse(n.responseText);
                  if (t && t.ApplicationId) {
                    var i =
                        W.General_Label_AllDone +
                        "! <br />" +
                        W.ApplicationForm_Label_ApplicationSubmitedSuccessfully.replace(
                          "{0}",
                          o.Title
                        ),
                      s = $(
                        '<div class="job-applied tl-message"><div class="container"><div class="row"><div class="col-md-12"><div class="text-center successfully-msg"><img style="width: 50px;" src="https://cdn.talentlyft.com/images/jswidget/check-circle.svg" /><br /><h4 class="text-center">' +
                          i +
                          "</h4></div><hr /></div></div></div></div>"
                      )[0];
                    (s.style.color = "#" + (e.settings.color || "#000000")),
                      a.appendChild(s);
                  }
                } catch (e) {
                  console.log(e);
                }
              }),
                (n.onerror = function () {}),
                (n.upload.onprogress = function (e) {
                  if (e.lengthComputable) e.loaded, e.total;
                  else console.log("Unable to calculate percentage");
                });
              var s = document.getElementById("jobId").value;
              n.open("POST", r + i + "/jobs/" + s + "/candidate"),
                n.setRequestHeader("X-Requested-With", "XMLHttpRequest"),
                !0 === d
                  ? grecaptcha.enterprise.ready(async () => {
                      const e = await grecaptcha.enterprise
                        .execute(p, { action: "job_form_submit_widget" })
                        .catch(function (e) {
                          throw e;
                        });
                      n.setRequestHeader("X-ReCaptcha-Token", e),
                        n.setRequestHeader(
                          "X-ReCaptcha-Action",
                          "job_form_submit_widget"
                        ),
                        n.send(t);
                    })
                  : n.send(t);
            } catch (e) {
              requestAnimationFrame(function () {});
            }
          })(t.formData));
    }
    function U(e, t, a, n, l, i) {
      for (var o = 0, s = null, r = 0; r < e.length; ++r) {
        if (((s = e[r]), t)) {
          var c = s.name.split(".");
          if (((c = c[c.length - 1]), !t.split(",").contains(c))) return !1;
        }
        if (s.type && a && !a.split(",").contains(s.type)) return !1;
        o += s.size;
      }
      return !(n && o > n) && !(i && e.length < i) && !(l && e.length > l);
    }
    function G(t) {
      if ("" === t) return !0;
      var a = e.settings.decimalSeparator;
      return new RegExp("^\\-?(?:\\d+)(?:\\" + a + "\\d+)?$").test(t);
    }
    function V(e, t) {
      if (parseInt(t, 10) < 1) return !0;
      for (
        var a = e.name,
          n = document.querySelectorAll('[name="' + a + '"]'),
          l = 0;
        l < n.length;
        ++l
      )
        if (!0 === n[l].checked) return !0;
      return !1;
    }
    function Z(e) {
      var t = $(e).parent().parent();
      return 0 !== $(".application-entry:not(.template)", t).length;
    }
    function Q(e, t, a) {
      a && (e = e.replace("%s", a));
      var n = document.createElement("LI");
      n.appendChild(document.createTextNode(e)), t.appendChild(n);
    }
    function X(e) {
      -1 === e.className.indexOf("tl-error") &&
        (e.className = e.className ? e.className + " tl-error" : "tl-error");
    }
    function Y(e, t) {
      if (e.Choices && e.Choices.length > 0)
        for (var a = 0; a < e.Choices.length; a++) {
          var n = e.Choices[a];
          (n.OriginalBody = n.Body),
            t["ApplicationForm_Dropdown_" + n.Body]
              ? (n.Body = t["ApplicationForm_Dropdown_" + n.Body])
              : t["ApplicationForm_" + n.Body] &&
                (n.Body = t["ApplicationForm_" + n.Body]);
        }
    }
    function ee(e, t) {
      for (var a = 0; a < e.length; ++a) {
        var n = e[a];
        (n.IdKey = t + "[" + a + "].Id"),
          "file" == n.Type
            ? (n.NameKey = t + "[" + a + "].File")
            : null !== n.Choices && n.Choices.length > 0
            ? (n.NameKey = t + "[" + a + "].Choices")
            : (n.NameKey = t + "[" + a + "].Body");
      }
    }
    function te() {
      a.appendChild(l);
    }
    function ae() {
      l.parentElement && l.parentElement.removeChild(l);
    }
    function ne() {
      if ((n = document.getElementsByClassName("application-form")[0]))
        for (var e = n.querySelectorAll(".tl-error"), t = 0; t < e.length; ++t)
          e[t].className = e[t].className.replace(/tl-error/g, "").trim();
      var a = document.getElementById("talentlyftValidationSummary"),
        l = document.getElementById("btnSubmit"),
        i = se(l, "bnt-submit-container");
      l &&
        !a &&
        (i
          ? i.insertAdjacentHTML(
              "beforebegin",
              '<ul id="talentlyftValidationSummary"></ul>'
            )
          : l.insertAdjacentHTML(
              "beforebegin",
              '<ul id="talentlyftValidationSummary"></ul>'
            ),
        (a = document.getElementById("talentlyftValidationSummary"))),
        $(a).html(""),
        $(a).hide();
    }
    function le(e, t, a, n) {
      var l = document.createElement(a);
      switch (a) {
        case "script":
          l.src = e;
          break;
        case "link":
          l.setAttribute("rel", "stylesheet"), (l.href = e);
      }
      n && (l.onload = n), t.appendChild(l);
    }
    function ie(e, a, n, l) {
      for (var i = document.querySelectorAll(e), o = 0; o < i.length; o++)
        a &&
          t.talentlyftWidget.settings.fontFamily &&
          (i[o].style.fontFamily = t.talentlyftWidget.settings.fontFamily),
          n &&
            t.talentlyftWidget.settings.fontSize &&
            (i[o].style.fontSize = t.talentlyftWidget.settings.fontSize),
          l &&
            t.talentlyftWidget.settings.color &&
            (i[o].style.color = t.talentlyftWidget.settings.color);
    }
    function oe(e) {
      return (
        null !==
        e.match(
          /(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g
        )
      );
    }
    function se(e, t) {
      if (e && e.parentElement)
        return e.parentElement &&
          (e.parentElement.classList.contains(t) ||
            e.parentElement.tagName.toLowerCase() === t)
          ? e.parentElement
          : se(e.parentElement, t);
    }
    return (
      (Array.prototype.contains = function (e) {
        for (var t in this) if (this[t] === e) return !0;
        return !1;
      }),
      (e.render = function (n) {
        n = (function (e) {
          if (e) {
            if (
              (e.sort || (e.sort = k),
              e.pageSize || (e.pageSize = q),
              e.departments)
            )
              for (var t = e.departments.length - 1; t >= 0; --t) {
                var a = e.departments[t];
                "number" != typeof a &&
                  (console.error(
                    'Departments filter value must be a number: "' +
                      a +
                      '". Value was removed from settings.'
                  ),
                  e.departments.splice(t, 1));
              }
            else e.departments = [];
            e.locations || (e.locations = []),
              e.tags || (e.tags = []),
              e.status || (e.status = ["Published"]),
              e.language || (e.language = "en"),
              e.applicationFormOn || (e.applicationFormOn = "widget"),
              e.color &&
                (C = (function (e) {
                  e = e.substring(1);
                  var t = parseInt(e, 16);
                  return (
                    0.2126 * ((t >> 16) & 255) +
                      0.7152 * ((t >> 8) & 255) +
                      0.0722 * ((t >> 0) & 255) <
                    100
                  );
                })(e.color)
                  ? "#ffffff"
                  : "#000000");
          }
          return e;
        })(n);
        var o = document.getElementsByTagName("head")[0];
        n.fontUrl && le(n.fontUrl, o, "link"),
          (L = n.departments),
          (w = n.locations),
          (j = n.tags),
          (l = x),
          (a = document.getElementById(n.elementId)),
          (i = n.companyId),
          (function (e) {
            if (t && t.Intl && t.Intl.NumberFormat && e && e.language) {
              var a = t.Intl.NumberFormat(e.language)
                .formatToParts(123.45)
                .find(function (e) {
                  return "decimal" === e.type;
                }).value;
              e.decimalSeparator = a;
            } else e.decimalSeparator = ".";
          })(n),
          (e.settings = n),
          t.jQuery
            ? ((t.$ = t.jQuery), P())
            : le("https://code.jquery.com/jquery-3.5.1.min.js", o, "script", P),
          "widget" === e.settings.applicationFormOn &&
            (t.renderApplicationFormHtml || le(y, o, "script"),
            le("https://unpkg.com/formdata-polyfill", o, "script"),
            le(
              "https://cdn.jsdelivr.net/npm/flatpickr@4.6.9/dist/flatpickr.min.js",
              o,
              "script"
            ),
            le(
              "https://cdn.jsdelivr.net/npm/flatpickr@4.6.9/dist/plugins/monthSelect/index.min.js",
              o,
              "script"
            ),
            n.language &&
              "en" !== n.language &&
              le(
                "https://cdn.jsdelivr.net/npm/flatpickr@4.6.9/dist/l10n/{0}.min.js".replace(
                  "{0}",
                  n.language
                ),
                o,
                "script"
              ),
            le(
              "https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js",
              o,
              "script"
            ),
            le(m, o, "script"),
            le(
              "https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.5.6/cropper.min.js",
              o,
              "script"
            ),
            le(
              "https://cdn.jsdelivr.net/npm/flatpickr@4.6.9/dist/flatpickr.min.css",
              o,
              "link"
            ),
            le(
              "https://cdn.jsdelivr.net/npm/flatpickr@4.6.9/dist/plugins/monthSelect/style.min.css",
              o,
              "link"
            ),
            le(
              "https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.5.6/cropper.min.css",
              o,
              "link"
            ),
            !0 === d &&
              le(
                "https://www.google.com/recaptcha/enterprise.js?render=" + p,
                o,
                "script"
              )),
          le(u, o, "link");
        var s = document.createElement("style");
        (s.type = "text/css"),
          t.talentlyftWidget.settings.color &&
            (s.innerHTML =
              ".brandColor { background-color: #" + e.settings.color + "; }"),
          o.appendChild(s),
          (function () {
            var e = document.createElement("FORM");
            (e.id = "applyForm"),
              (e.method = "POST"),
              e.classList.add("talentlyft"),
              e.classList.add("talentlyftv2"),
              e.classList.add("talentlyft-clearfix");
            var n = document.createElement("input");
            (n.type = "hidden"), (n.name = "jobId"), (n.id = "jobId");
            var l = document.createElement("input");
            (l.type = "hidden"),
              (l.name = "jobApplicationLocationId"),
              (l.id = "jobApplicationLocationId"),
              (e.innerHTML += n.outerHTML),
              (e.innerHTML += l.outerHTML),
              a.insertAdjacentHTML("afterend", e.outerHTML),
              ie("#applyForm", !0, !1, !1),
              (function () {
                if (
                  null !==
                  document.querySelector("#talentlyftPrivacyPolicyModal")
                )
                  return;
                var e = document.createElement("div");
                e.classList.add("tl-modal"),
                  (e.style.display = "none"),
                  (e.id = "talentlyftPrivacyPolicyModal");
                var a = document.createElement("span");
                a.classList.add("close"),
                  (a.innerHTML =
                    '<img src="https://cdn.talentlyft.com/images/jswidget/times.svg" />'),
                  (a.onclick = function () {
                    (document.getElementById(
                      "talentlyftPrivacyPolicyModal"
                    ).style.display = "none"),
                      $("body").css("overflow", "auto");
                  });
                var n = document.createElement("p"),
                  l = document.createElement("div");
                l.classList.add("tl-modal-content"),
                  l.appendChild(a),
                  l.appendChild(n),
                  e.appendChild(l),
                  document.querySelector("body").appendChild(e),
                  (t.onclick = function (e) {
                    var t = document.getElementById(
                      "talentlyftPrivacyPolicyModal"
                    );
                    e.target === t &&
                      ((t.style.display = "none"),
                      $("body").css("overflow", "auto"));
                  });
              })();
          })();
      }),
      (e.renderJobList = O),
      (e.openApplicationForm = function (a, n) {
        t.location.hash.replace("#", ""),
          te(),
          $("#" + e.settings.elementId + " button.btn").hide(),
          (document.getElementById("jobId").value = a),
          (document.getElementById("jobApplicationLocationId").value = n),
          R(a);
      }),
      (e.showJobDesc = K),
      (e.backToJobList = function () {
        history.pushState(null, null, "#"),
          ne(),
          $("#grecaptcha-disclaimer").remove(),
          $("#applyForm")[0].reset(),
          $(".job-description-container").hide(),
          $(".job-filters, .tl-jobs, .paging-container").show(),
          $("#application-form").empty(),
          $(".job-applied").remove(),
          S || I();
      }),
      (e.validateForm = function () {
        ne();
        for (
          var i,
            o,
            s,
            r,
            c,
            d,
            p,
            u,
            m,
            g,
            f,
            y,
            v,
            h,
            b,
            S,
            A,
            _,
            L,
            w,
            j,
            F,
            E = document.getElementById("talentlyftValidationSummary"),
            C = !0,
            k = n.querySelectorAll(
              'input:not([type=hidden]), textarea, select, input[data-fv-complex-not-empty="true"]'
            ),
            q = [],
            x = 0;
          x < k.length;
          ++x
        )
          -1 === k[x].name.indexOf("{index}") && q.push(k[x]);
        for (x = 0; x < q.length; ++x) {
          const e = (F = q[x]).previousElementSibling;
          if (
            F.classList.contains("form-control") &&
            F.classList.contains("input-sm") &&
            (F.name.startsWith("Educations") ||
              F.name.startsWith("Experiences") ||
              F.name.startsWith("Projects") ||
              F.name.startsWith("SocialNetworks") ||
              e?.name?.startsWith("Educations") ||
              e?.name?.startsWith("Experiences") ||
              e?.name?.startsWith("Projects") ||
              e?.name?.startsWith("SocialNetworks"))
          ) {
            if (!F.value && !F.hasAttribute("data-fv-not-empty") && !F.disabled)
              if (
                (F.setAttribute("data-fv-not-empty", !0),
                F.setAttribute(
                  "data-fv-not-empty___message",
                  W.ErrorMessage_Label_FieldRequired
                ),
                e.classList.contains("flatpickr-input"))
              ) {
                const e = F.parentElement.previousElementSibling;
                if (e && e.classList.contains("date-type")) {
                  const t = e.querySelector(".control-label"),
                    a = document.createElement("span");
                  a.classList.add("required"),
                    (a.textContent = " (required)"),
                    t.appendChild(a);
                }
              } else {
                const t = document.createElement("span");
                t.classList.add("required"),
                  (t.textContent = " (required)"),
                  e.appendChild(t);
              }
            if (F.value && F.hasAttribute("data-fv-not-empty")) {
              F.removeAttribute("data-fv-not-empty"),
                F.removeAttribute("data-fv-not-empty___message");
              const e = F.previousElementSibling;
              if (e.classList.contains("flatpickr-input")) {
                const e = F.parentElement.previousElementSibling;
                if (e && e.classList.contains("date-type")) {
                  e
                    .querySelector(".control-label")
                    .querySelector(".required").style.display = "none";
                }
              } else {
                e.querySelector(".required").style.display = "none";
              }
            }
          }
          if (
            "select" === F.tagName.toLowerCase() &&
            F.name.startsWith("Languages")
          ) {
            if (!F.value && !F.hasAttribute("data-fv-not-empty")) {
              F.setAttribute("data-fv-not-empty", !0),
                F.setAttribute(
                  "data-fv-not-empty___message",
                  W.ErrorMessage_Label_FieldRequired
                );
              const e = F.previousElementSibling,
                t = document.createElement("span");
              t.classList.add("required"),
                (t.textContent = " (required)"),
                e.appendChild(t);
            }
            if (F.value && F.hasAttribute("data-fv-not-empty")) {
              F.removeAttribute("data-fv-not-empty"),
                F.removeAttribute("data-fv-not-empty___message");
              F.previousElementSibling.querySelector(
                ".required"
              ).style.display = "none";
            }
          }
          switch (
            ((o = F.type),
            (s = !1),
            (r = F.getAttribute("data-fv-string-length___max")),
            (c = F.getAttribute("data-fv-string-length___message")),
            (d = F.getAttribute("data-fv-not-empty")),
            (p = F.getAttribute("data-fv-not-empty___message")),
            (u = F.getAttribute("data-fv-uri___message")),
            (m = F.getAttribute("data-fv-file___extension")),
            (g = F.getAttribute("data-fv-file___type")),
            (f = F.getAttribute("data-fv-file___max-total-size")),
            (y = F.getAttribute("data-fv-file___max-files")),
            (v = F.getAttribute("data-fv-file___min-files")),
            (h = F.getAttribute("data-fv-file___message")),
            (b = F.getAttribute("data-fv-regexp___message")),
            (S = F.getAttribute("data-fv-choice")),
            (A = F.getAttribute("data-fv-choice___min")),
            (_ = F.getAttribute("data-fv-choice___message")),
            (L = F.getAttribute("data-fv-numeric___message")),
            (w = F.getAttribute("data-fv-complex-not-empty___message")),
            (j = F.getAttribute("placeholder")) && (p = p + ": " + j),
            L ? (o = "decimal") : w && ((o = "complex"), (s = !0)),
            o)
          ) {
            case "text":
            case "email":
            case "url":
            case "textarea":
            case "select-one":
            case "file":
            case "radio":
            case "decimal":
            case "tel":
              (s = !0), (i = F.value);
              break;
            case "checkbox":
              var N;
              (N = se(F, "checkbox-type")),
                (s = !0),
                (i = F.value),
                N ||
                  ((F.value = F.checked),
                  "true" === (i = F.value)
                    ? (i = !0)
                    : "false" === i && (i = !1));
          }
          if (s) {
            if (
              (r && i.length > r && ((C = !1), Q(c, E, r), X(F)),
              d && !i && ((C = !1), Q(p, E), X(F)),
              "url" === o && i && !oe(i) && ((C = !1), Q(u, E), X(F)),
              "file" === o &&
                i &&
                !U(F.files, m, g, f, y, v) &&
                ((C = !1), Q(h, E), X(F)),
              ("checkbox" === o || "radio" === o) &&
                S &&
                "true" === S &&
                !V(F, A))
            )
              (C = !1), Q(_, E), X(se(F, "form-group"));
            if (
              ("decimal" !== o || G(i) || ((C = !1), Q(L, E), X(F)),
              "Email" === F.name &&
                i &&
                !i.match(
                  "^(?!.*[._\\-]{2})[_\\-+a-zA-Z0-9]+([._\\-+][a-zA-Z0-9]+)*@[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*(\\.[-a-zA-Z]{2,})+$"
                ) &&
                ((C = !1), Q(b, E), X(F)),
              "complex" === o && !Z(F))
            ) {
              (C = !1), Q(w, E);
              var T = $(F).parent().parent();
              X($(".control-label", T)[0]);
            }
          }
        }
        C
          ? (!(function () {
              try {
                for (
                  var a = document.querySelectorAll(
                      "#applyForm .application-entry.template"
                    ),
                    n = 0;
                  n < a.length;
                  ++n
                ) {
                  var l = a[n],
                    i = l.parentNode;
                  i && i.removeChild(l);
                }
                var o = t.document.querySelector("#applyForm"),
                  s = new FormData(o);
                if (
                  (s.has("RetentionConsent") &&
                    "true" === s.get("RetentionConsent") &&
                    (s.delete("RetentionConsent"),
                    s.append("Compliance.Gdpr.RetentionConsent", !0)),
                  s.has("PrivacyPolicyConsent") &&
                    (s.delete("PrivacyPolicyConsent"),
                    s.append("Compliance.Gdpr.PrivacyPolicyConsent", !0)),
                  s.has("ShareConsent") &&
                    "true" === s.get("ShareConsent") &&
                    (s.delete("ShareConsent"),
                    s.append("Compliance.Gdpr.ShareConsent", !0)),
                  s.has("Location"))
                ) {
                  const e = s.get("Location");
                  s.delete("Location"), s.append("Location.Address", e);
                }
                s.append("buttonClicked", !0),
                  s.append("PreferredLanguage", e.settings.language);
                var r,
                  c,
                  d,
                  p = [];
                for (r = s.keys(); !(c = r.next()).done && (d = c.value); ) {
                  if (
                    (d.indexOf("{index}") > -1 && p.push(d),
                    d.endsWith(".Choices") && (s.get(d) || p.push(d)),
                    (d.startsWith("Educations[") ||
                      d.startsWith("Experiences[") ||
                      d.startsWith("Projects[")) &&
                      (d.endsWith(".From") || d.endsWith(".To")))
                  ) {
                    var u = s.get(d);
                    (u && -1 !== u.indexOf("-")) || p.push(d);
                  }
                  d.startsWith("Avatar") && "" === s.get(d) && p.push(d);
                }
                var m = o.querySelectorAll("input[type=text][data-fv-numeric]");
                for (n = 0; n < m.length; ++n) {
                  var g = m[n].value;
                  if (
                    ((g = g.trim()) || (g = ""),
                    "." !== e.settings.decimalSeparator && g)
                  ) {
                    g = (g = g.replace(/\./g, "")).replace(/\,/g, ".");
                    var f = t.parseFloat(g);
                    s.set(m[n].name, f);
                  } else (f = t.parseFloat(g)), s.set(m[n].name, f);
                }
                for (n = 0; n < p.length; ++n) s.delete(p[n]);
                for (
                  m = o.querySelectorAll("input[type=file]"), n = 0;
                  n < m.length;
                  ++n
                )
                  s.delete(m[n].name);
                (t.formData = s), H();
              } catch (e) {
                requestAnimationFrame(function () {});
              }
            })(),
            (n.style.display = "none"),
            a.appendChild(l))
          : $("#talentlyftValidationSummary").show();
      }),
      (e.addComplexElement = function (a) {
        var n = a.srcElement,
          l = se(n, "add-item-container").getAttribute("data-template-id"),
          i = t.document.querySelector("#" + l),
          o = n.getAttribute("data-key"),
          s = n.parentElement.parentElement,
          r = s.querySelectorAll(".application-entry:not(.template)").length,
          c = i.innerHTML.trim().replace(new RegExp("{index}", "g"), r);
        c = c.replace(new RegExp("key_placeholder", "g"), o);
        var d,
          p,
          u = ((d = c),
          ((p =
            window.document.implementation.createHTMLDocument(
              "Temp doc"
            )).body.innerHTML = d),
          p.body.children)[0];
        u.classList.remove("template");
        for (
          var m = u.querySelectorAll(".datepicker-date input"), g = 0;
          g < m.length;
          ++g
        )
          t.flatpickr(m[g], {
            maxDate: new Date(),
            disableMobile: "true",
            locale: e.settings.language,
            altInput: !0,
            plugins: [
              new monthSelectPlugin({
                shorthand: !0,
                dateFormat: "Z",
                altFormat: "F Y",
              }),
            ],
          });
        u.querySelector(".delete-application-entry a").addEventListener(
          "click",
          D
        );
        var f = u.querySelector(".chbx input");
        f &&
          f.addEventListener("change", function (e) {
            var t =
              e.target.parentElement.parentElement.querySelectorAll(
                ".datepicker-date"
              )[1];
            const a = t.querySelector(".flatpickr-input"),
              n = t.querySelector('input[type="text"]'),
              l = t.previousElementSibling;
            let i;
            if (
              (l &&
                l.classList.contains("date-type") &&
                (i = l.querySelector(".required")),
              e.target.checked)
            )
              t.classList.add("disabled"),
                n.setAttribute("disabled", !0),
                n.classList.remove("tl-error"),
                (n.value = ""),
                n.removeAttribute("data-fv-not-empty"),
                n.removeAttribute("data-fv-not-empty___message"),
                a.removeAttribute("data-fv-not-empty"),
                a.removeAttribute("data-fv-not-empty___message"),
                i && i.remove();
            else if (
              (t.classList.remove("disabled"),
              n.removeAttribute("disabled"),
              n.setAttribute("data-fv-not-empty", !0),
              n.setAttribute(
                "data-fv-not-empty___message",
                W.ErrorMessage_Label_FieldRequired
              ),
              a.setAttribute("data-fv-not-empty", !0),
              a.setAttribute(
                "data-fv-not-empty___message",
                W.ErrorMessage_Label_FieldRequired
              ),
              X(n),
              l && l.classList.contains("date-type"))
            ) {
              const e = l.querySelector(".control-label"),
                t = document.createElement("span");
              t.classList.add("required"),
                (t.textContent = " (required)"),
                e.appendChild(t);
            }
          }),
          s.insertBefore(u, n.parentElement);
      }),
      e
    );
  })(window.talentlyftWidget || {}, window));
var adoptoWidget = (function (e) {
  return (
    (e.render = window.talentlyftWidget.render),
    (e.showHideFormElements = window.talentlyftWidget.showHideFormElements),
    e
  );
})(window.adoptoWidget || {});
