JSFiddle - React, Tailwind, and code Playground

by raviteja gunda

JavaScript

! function() {
  "use strict";
  var e, t, n = !1;

  function o(o) {
    o.removeAttribute("aria-modal"), o.removeAttribute("role"), n ? (e.focus(), n = !1) : t ? t.focus() : document.querySelector("#container-root")
  }
  Array.from(document.querySelectorAll("[aria-hidden=true]"));
  var i = 'button, a[href], input, select, textarea, [tabindex]:not([tabindex="-1"])';

  function a(e) {
    var t = !1;
    return function(n) {
      t || (window.requestAnimationFrame((function() {
        e(n), t = !1
      })), t = !0)
    }
  }
  var r, l = window.matchMedia("(max-width: 991px)");

  function s() {
    return l.matches
  }

  function c(e, t, n, a, r, l, s) {
    if (void 0 === t && (t = null), void 0 === n && (n = null), void 0 === a && (a = null), void 0 === r && (r = null), void 0 === l && (l = !1), void 0 === s && (s = !1), e) {
      if (s) "drop-down-opened" == a ? console.log("in top if") : console.log("in top else");
      else if (l) {
        document.querySelector(".header");
        document.body.children
      } else document.body.children;
      var c = e && e.querySelectorAll(i)[0],
        u = e && e.querySelectorAll(i),
        m = (u = Array.from(u).filter((function(e) {
          return "true" != e.getAttribute("aria-hidden")
        })))[u.length - 1];
      s || (e.removeAttribute("aria-hidden"), "iOS" !== function() {
        var e = navigator.userAgent || navigator.vendor;
        if (/windows phone/i.test(e)) return "Windows Phone";
        if (/android/i.test(e)) return "Android";
        if (/iPad|iPhone|iPod/.test(e)) return "iOS";
        return "unknown"
      }() && (e.setAttribute("aria-modal", !0), e.setAttribute("role", "dialog"))), l && e.addEventListener("keydown", (function(o) {
        d(o, e, t, n, a, r, l, s) || (o.shiftKey && "Tab" === o.key ? document.activeElement === c && (l ? (n.focus(), o.preventDefault()) : (m.focus(), o.preventDefault())) : "Tab" === o.key && document.activeElement === m && (l ? (n.focus(),...