"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index.cjs456.js"),m=require("./index.cjs457.js"),h=require("./index.cjs426.js"),b=require("./index.cjs458.js"),d=require("./index.cjs459.js"),y=require("./index.cjs460.js"),q=require("./index.cjs451.js"),u=require("./index.cjs455.js"),g={name:[[`	
\f\r &/=>`.split(""),`	
\f\r "&'/=>\``.split("")],[`\0	
\f\r "&'/<=>`.split(""),`\0	
\f\r "&'/<=>\``.split("")]],unquoted:[[`	
\f\r &>`.split(""),`\0	
\f\r "&'<=>\``.split("")],[`\0	
\f\r "&'<=>\``.split(""),`\0	
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function A(e,o,t,i){const s=i.schema,r=s.space==="svg"?!1:i.settings.omitOptionalTags;let c=s.space==="svg"?i.settings.closeEmptyElements:i.settings.voids.includes(e.tagName.toLowerCase());const n=[];let l;s.space==="html"&&e.tagName==="svg"&&(i.schema=h.svg);const f=N(i,e.properties),a=i.all(s.space==="html"&&e.tagName==="template"?e.content:e);return i.schema=s,a&&(c=!1),(f||!r||!y.opening(e,o,t))&&(n.push("<",e.tagName,f?" "+f:""),c&&(s.space==="svg"||i.settings.closeSelfClosing)&&(l=f.charAt(f.length-1),(!i.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&n.push(" "),n.push("/")),n.push(">")),n.push(a),!c&&(!r||!d.closing(e,o,t))&&n.push("</"+e.tagName+">"),n.join("")}function N(e,o){const t=[];let i=-1,s;if(o){for(s in o)if(o[s]!==null&&o[s]!==void 0){const r=S(e,s,o[s]);r&&t.push(r)}}for(;++i<t.length;){const r=e.settings.tightAttributes?t[i].charAt(t[i].length-1):void 0;i!==t.length-1&&r!=='"'&&r!=="'"&&(t[i]+=" ")}return t.join("")}function S(e,o,t){const i=q.find(e.schema,o),s=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,r=e.settings.allowDangerousCharacters?0:1;let c=e.quote,n;if(i.overloadedBoolean&&(t===i.attribute||t==="")?t=!0:(i.boolean||i.overloadedBoolean)&&(typeof t!="string"||t===i.attribute||t==="")&&(t=!!t),t==null||t===!1||typeof t=="number"&&Number.isNaN(t))return"";const l=u.stringifyEntities(i.attribute,Object.assign({},e.settings.characterReferences,{subset:g.name[s][r]}));return t===!0||(t=Array.isArray(t)?(i.commaSeparated?m.stringify:b.stringify)(t,{padLeft:!e.settings.tightCommaSeparatedLists}):String(t),e.settings.collapseEmptyAttributes&&!t)?l:(e.settings.preferUnquoted&&(n=u.stringifyEntities(t,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:g.unquoted[s][r]}))),n!==t&&(e.settings.quoteSmart&&p.ccount(t,c)>p.ccount(t,e.alternative)&&(c=e.alternative),n=c+u.stringifyEntities(t,Object.assign({},e.settings.characterReferences,{subset:(c==="'"?g.single:g.double)[s][r],attribute:!0}))+c),l+(n&&"="+n))}exports.element=A;
//# sourceMappingURL=index.cjs438.js.map
