Hanzo03's picture
final commit
2f3061f
raw
history blame contribute delete
926 Bytes
import{h as f,N as n,q as d,a as v,L as h,g as u,b as g}from"./0b4uXBGw.js";const l=Symbol("is custom element"),A=Symbol("is html");function y(r){if(f){var s=!1,e=()=>{if(!s){if(s=!0,r.hasAttribute("value")){var a=r.value;_(r,"value",null),r.value=a}if(r.hasAttribute("checked")){var o=r.checked;_(r,"checked",null),r.checked=o}}};r.__on_r=e,d(e),v()}}function _(r,s,e,a){var o=m(r);f&&(o[s]=r.getAttribute(s),s==="src"||s==="srcset"||s==="href"&&r.nodeName==="LINK")||o[s]!==(o[s]=e)&&(s==="loading"&&(r[h]=e),e==null?r.removeAttribute(s):typeof e!="string"&&p(r).includes(s)?r[s]=e:r.setAttribute(s,e))}function m(r){return r.__attributes??={[l]:r.nodeName.includes("-"),[A]:r.namespaceURI===n}}var c=new Map;function p(r){var s=r.getAttribute("is")||r.nodeName,e=c.get(s);if(e)return e;c.set(s,e=[]);for(var a,o=r,i=Element.prototype;i!==o;){a=g(o);for(var t in a)a[t].set&&e.push(t);o=u(o)}return e}export{y as r,_ as s};