%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
| Server IP : 54.36.91.62 / Your IP : 216.73.217.162 Web Server : Apache System : Linux webm002.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : wellingtpa ( 97533) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/wellingtpa/www/wp-content/themes/kata/includes/kirki/kirki-packages/settings/src/ |
Upload File : |
export const emptyElement = (el: HTMLElement) => {
while (el.firstChild) {
el.removeChild(el.firstChild);
}
};
export const getClosest = (
el: HTMLElement,
selector: string,
depth?: number
): HTMLElement | undefined => {
if (el.matches(selector)) {
return el;
}
if (el.tagName === "BODY" || el.tagName === "HTML") {
return undefined;
}
let closest = undefined;
depth = depth ? depth : 20;
for (let i = 0; i < depth; i++) {
const parentNode = el.parentNode as HTMLElement;
if (
!parentNode ||
parentNode.tagName === "BODY" ||
parentNode.tagName === "HTML"
) {
break;
}
if (parentNode.matches(selector)) {
return parentNode;
}
el = parentNode;
}
return closest;
};
export const startLoading = (button: HTMLButtonElement | HTMLElement) => {
button.classList.add("is-loading");
};
export const stopLoading = (button: HTMLButtonElement | HTMLElement) => {
button.classList.remove("is-loading");
};