"use strict";var u=Object.defineProperty;var i=(r,n)=>u(r,"name",{value:n,configurable:!0});const h="class",T="xlink",a="xmlns",w="ref",p={[a]:"http://www.w3.org/2000/xmlns/",[T]:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg"},S=i(r=>r&&typeof r=="object"&&!r.attributes&&!r.type&&!r.children,"isJSXComment"),A=i(r=>r.filter(n=>!S(n)),"filterComments"),x=i(function(r){this.update=r},"onUpdateFn"),C=i((r,n,...t)=>(t=A([].concat.apply([],t)),n={...n},r==="fragment"?A(t):typeof r=="function"?(n.ref&&(n.ref.onUpdate=x.bind(n.ref)),r({children:t,...n})):{type:r,attributes:n,children:t}),"tsx"),g=i(r=>{const n={hasElNamespace:i(t=>t.namespaceURI===p.svg,"hasElNamespace"),hasSvgNamespace:i((t,e)=>n.hasElNamespace(t)&&e!=="STYLE"&&e!=="SCRIPT","hasSvgNamespace"),createElementOrElements:i((t,e)=>Array.isArray(t)?n.createChildElements(t,e):typeof t<"u"?n.createElement(t,e):n.createTextNode("",e),"createElementOrElements"),createElement:i((t,e)=>{let s;return t.type.toUpperCase()==="SVG"||e&&n.hasSvgNamespace(e,t.type.toUpperCase())?s=r.createElementNS(p.svg,t.type):s=r.createElement(t.type),t.attributes&&("dangerouslySetInnerHTML"in t.attributes&&(s.innerHTML=t.attributes.dangerouslySetInnerHTML?.__html,delete t.attributes.dangerouslySetInnerHTML),n.setAttributes(t.attributes,s)),t.children&&n.createChildElements(t.children,s),e&&(e.appendChild(s),typeof s.$onMount=="function"&&s.$onMount()),s},"createElement"),createTextNode:i((t,e)=>{const s=r.createTextNode(t.toString());return e&&e.appendChild(s),s},"createTextNode"),createChildElements:i((t,e)=>{const s=[];for(let f=0;f"u"||c===null?"":c).toString(),e)):s.push(n.createElement(c,e))}return s},"createChildElements"),setAttribute:i((t,e,s)=>{if(typeof e>"u")return;if(t===w&&typeof e!="function"?e.current=s:t===w&&typeof e=="function"&&e(s),t.startsWith("on")&&typeof e=="function"){let c=t.substring(2).toLowerCase();const o=c.indexOf("capture"),y=o>-1;c==="mount"&&(s.$onMount=e),y&&(c=c.substring(0,o)),s.addEventListener(c,e,y);return}t==="className"&&(t=h),t===h&&Array.isArray(e)&&(e=e.join(" "));const f=t.match(/[A-Z]/)?.index;if(n.hasElNamespace(s)&&f){const c=t.substring(0,f).toLowerCase(),o=t.substring(f,t.length).toLowerCase();s.setAttributeNS(p[c],c===T||c=="xmlns"?`${c}:${o}`:t,e)}else if(t==="style"&&typeof e!="string"){const c=Object.keys(e);for(let o=0;o{const s=Object.keys(t);for(let f=0;ftypeof r=="string"?g(t.window.document).createTextNode(r,n):g(t.window.document).createElementOrElements(r,n),"renderIsomorphic"),d=i(r=>r.children,"Fragment");exports.Fragment=d,exports.getRenderer=g,exports.renderIsomorphic=b,exports.tsx=C;