import{N as v,ay as E,az as O,af as T,aA as I,M as j,aB as C}from"./DaF1Dxyz.js";function S(r){var t,i,f="";if(typeof r=="string"||typeof r=="number")f+=r;else if(typeof r=="object")if(Array.isArray(r)){var s=r.length;for(t=0;t<s;t++)r[t]&&(i=S(r[t]))&&(f&&(f+=" "),f+=i)}else for(i in r)r[i]&&(f&&(f+=" "),f+=i);return f}function B(){for(var r,t,i=0,f="",s=arguments.length;i<s;i++)(r=arguments[i])&&(t=S(r))&&(f&&(f+=" "),f+=t);return f}function D(r){return typeof r=="object"?B(r):r??""}const p=[...` 	
\r\f \v\uFEFF`];function H(r,t,i){var f=r==null?"":""+r;if(t&&(f=f?f+" "+t:t),i){for(var s in i)if(i[s])f=f?f+" "+s:s;else if(f.length)for(var o=s.length,a=0;(a=f.indexOf(s,a))>=0;){var u=a+o;(a===0||p.includes(f[a-1]))&&(u===f.length||p.includes(f[u]))?f=(a===0?"":f.substring(0,a))+f.substring(u+1):a=u}}return f===""?null:f}function b(r,t=!1){var i=t?" !important;":";",f="";for(var s in r){var o=r[s];o!=null&&o!==""&&(f+=" "+s+": "+o+i)}return f}function h(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function G(r,t){if(t){var i="",f,s;if(Array.isArray(t)?(f=t[0],s=t[1]):f=t,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,a=0,u=!1,n=[];f&&n.push(...Object.keys(f).map(h)),s&&n.push(...Object.keys(s).map(h));var g=0,l=-1;const A=r.length;for(var c=0;c<A;c++){var e=r[c];if(u?e==="/"&&r[c-1]==="*"&&(u=!1):o?o===e&&(o=!1):e==="/"&&r[c+1]==="*"?u=!0:e==='"'||e==="'"?o=e:e==="("?a++:e===")"&&a--,!u&&o===!1&&a===0){if(e===":"&&l===-1)l=c;else if(e===";"||c===A-1){if(l!==-1){var L=h(r.substring(g,l).trim());if(!n.includes(L)){e!==";"&&c++;var M=r.substring(g,c).trim();i+=" "+M+";"}}g=c+1,l=-1}}}}return f&&(i+=b(f)),s&&(i+=b(s,!0)),i=i.trim(),i===""?null:i}return r==null?null:String(r)}function K(r,t,i,f,s,o){var a=r.__className;if(v||a!==i||a===void 0){var u=H(i,f,o);(!v||u!==r.getAttribute("class"))&&(u==null?r.removeAttribute("class"):t?r.className=u:r.setAttribute("class",u)),r.__className=i}else if(o&&s!==o)for(var n in o){var g=!!o[n];(s==null||g!==!!s[n])&&r.classList.toggle(n,g)}return o}const R=Symbol("is custom element"),U=Symbol("is html");function P(r){if(v){var t=!1,i=()=>{if(!t){if(t=!0,r.hasAttribute("value")){var f=r.value;N(r,"value",null),r.value=f}if(r.hasAttribute("checked")){var s=r.checked;N(r,"checked",null),r.checked=s}}};r.__on_r=i,j(i),C()}}function N(r,t,i,f){var s=k(r);v&&(s[t]=r.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&r.nodeName==="LINK")||s[t]!==(s[t]=i)&&(t==="loading"&&(r[E]=i),i==null?r.removeAttribute(t):typeof i!="string"&&q(r).includes(t)?r[t]=i:r.setAttribute(t,i))}function k(r){return r.__attributes??={[R]:r.nodeName.includes("-"),[U]:r.namespaceURI===O}}var d=new Map;function q(r){var t=r.getAttribute("is")||r.nodeName,i=d.get(t);if(i)return i;d.set(t,i=[]);for(var f,s=r,o=Element.prototype;o!==s;){f=I(s);for(var a in f)f[a].set&&i.push(a);s=T(s)}return i}export{K as a,D as c,P as r,N as s,G as t};
