'use strict';function a(e){return typeof window!="object"||!window||typeof document=="undefined"||typeof HTMLElement=="undefined"?false:e===document?true:"HTMLElement"in window?!!e&&e instanceof HTMLElement:!!e&&typeof e=="object"&&e.nodeType===1&&!!e.nodeName}function c(){if(typeof document=="undefined"||!document)return 1e3;let e=0;return e=Math.max(e,...Array.from(document.querySelectorAll("body *:not([data-highest]):not(.yetHigher)"),t=>parseFloat(getComputedStyle(t).zIndex)).filter(t=>!isNaN(t))),e}function s(e,t){return !a(e)||!t?false:new RegExp(" "+t+" ").test(" "+e.className+" ")}function u(e,...t){if(a(e))for(let n=0;n<t.length;n++){let o=t[n];o&&!s(e,o)&&(e.className+=" "+o);}}function d(e,...t){if(!(!e||!a(e)))for(let n=0;n<t.length;n++){let o=t[n];if(o&&e.className&&typeof e.className=="string"){let r=new RegExp("(\\s|^)"+o+"(\\s|$)");e.className=e.className.replace(r," "),e.className=e.className.replace(o,"");}}}exports.addClassName=u;exports.getMaxZindex=c;exports.hasClassName=s;exports.isDOMElement=a;exports.removeClassName=d;