monowind 0.2.6 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cdn.js CHANGED
@@ -17,24 +17,24 @@ Only valid data types are: ${an.map(e=>`"${e}"`).join(`, `)}.
17
17
  ${je([e])}
18
18
  Relies on:
19
19
 
20
- ${je([r])}`)}l.add(e);for(let t of a.get(e))for(let r of o.get(t))n.push(e),u(r,n),n.pop();s.add(e),l.delete(e),c.push(e)}}for(let e of i)u(e);for(let e of c)`nodes`in e&&P(e.nodes,e=>{if(e.kind!==`at-rule`||e.name!==`@apply`)return;let n=e.params.split(/(\s+)/g),r={},i=[],a=[],o=0;for(let[e,t]of n.entries())e%2==0&&(t[0]===`-`&&t[1]===`-`?a.push(t):i.push(t),r[t]=o),o+=t.length;if(a.length){if(i.length===0)return N.Skip;let e=a.join(` `);throw Error(`You cannot use \`@apply\` with both mixins and utilities. Please move \`@apply ${e}\` into a separate rule.`)}if(e.nodes.length>0&&i.length){let e=i.join(` `);throw Error(`The rule \`@apply ${e}\` must not have a body.`)}{let n=Kn(Object.keys(r),t,{respectImportant:!1,onInvalidCandidate:e=>{if(t.theme.prefix&&!e.startsWith(t.theme.prefix))throw Error(`Cannot apply unprefixed utility class \`${e}\`. Did you mean \`${t.theme.prefix}:${e}\`?`);if(t.invalidCandidates.has(e))throw Error(`Cannot apply utility class \`${e}\` because it has been explicitly disabled: https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-excluding-classes`);let n=A(e,`:`);if(n.length>1){let r=n.pop();if(t.candidatesToCss([r])[0]){let r=t.candidatesToCss(n.map(e=>`${e}:[--tw-variant-check:1]`)),i=n.filter((e,t)=>r[t]===null);if(i.length>0){if(i.length===1)throw Error(`Cannot apply utility class \`${e}\` because the ${i.map(e=>`\`${e}\``)} variant does not exist.`);{let t=new Intl.ListFormat(`en`,{style:`long`,type:`conjunction`});throw Error(`Cannot apply utility class \`${e}\` because the ${t.format(i.map(e=>`\`${e}\``))} variants do not exist.`)}}}}throw t.theme.size===0?Error(`Cannot apply unknown utility class \`${e}\`. Are you using CSS modules or similar and missing \`@reference\`? https://tailwindcss.com/docs/functions-and-directives#reference-directive`):Error(`Cannot apply unknown utility class \`${e}\``)}}),i=e.src,a=n.astNodes.map(e=>{let t=n.nodeSorting.get(e)?.candidate,a=t?r[t]:void 0;if(e=Te(e),!i||!t||a===void 0)return P([e],e=>{e.src=i}),e;let o=[i[0],i[1],i[2]];return o[1]+=7+a,o[2]=o[1]+t.length,P([e],e=>{e.src=o}),e}),o=[];for(let e of a)if(e.kind===`rule`)for(let t of e.nodes)o.push(t);else o.push(e);return N.Replace(o)}});return n}function*er(e,t){for(let n of e.params.split(/\s+/g))for(let e of t.parseCandidate(n))switch(e.kind){case`arbitrary`:break;case`static`:case`functional`:yield e.root}}async function tr(e,t,n,r=0,i=!1){let a=0,o=[];return P(e,e=>{if(e.kind===`at-rule`&&(e.name===`@import`||e.name===`@reference`)){let s=nr(M(e.params));if(s===null)return;e.name===`@reference`&&(s.media=`reference`),a|=2;let{uri:c,layer:l,media:u,supports:d}=s;if(c.startsWith(`data:`)||c.startsWith(`http://`)||c.startsWith(`https://`))return;let f=we({},[]);return o.push((async()=>{if(r>100)throw Error(`Exceeded maximum recursion depth while resolving \`${c}\` in \`${t}\`)`);let a=await n(c,t),o=y(a.content,{from:i?a.path:void 0});await tr(o,a.base,n,r+1,i),f.nodes=rr(e,[we({base:a.base},o)],l,u,d)})()),N.ReplaceSkip(f)}}),o.length>0&&await Promise.all(o),a}function nr(e){let t,n=null,r=null,i=null;for(let a=0;a<e.length;a++){let o=e[a];if(o.kind!==`separator`){if(o.kind===`word`&&!t){if(!o.value||o.value[0]!==`"`&&o.value[0]!==`'`)return null;t=o.value.slice(1,-1);continue}if(o.kind===`function`&&o.value.toLowerCase()===`url`||!t)return null;if((o.kind===`word`||o.kind===`function`)&&o.value.toLowerCase()===`layer`){if(n)return null;if(i)throw Error("`layer(…)` in an `@import` should come before any other functions or conditions");n=`nodes`in o?j(o.nodes):``;continue}if(o.kind===`function`&&o.value.toLowerCase()===`supports`){if(i)return null;i=j(o.nodes);continue}r=j(e.slice(a));break}}return t?{uri:t,layer:n,media:r,supports:i}:null}function rr(e,t,n,r,i){let a=t;if(n!==null){let t=I(`@layer`,n,a);t.src=e.src,a=[t]}if(r!==null){let t=I(`@media`,r,a);t.src=e.src,a=[t]}if(i!==null){let t=I(`@supports`,i[0]===`(`?i:`(${i})`,a);t.src=e.src,a=[t]}return a}function ir(e,t=null){return Array.isArray(e)&&e.length===2&&typeof e[1]==`object`&&typeof e[1]!==null?t?e[1][t]??null:e[0]:Array.isArray(e)&&t===null?e.join(`, `):typeof e==`string`&&t===null?e:null}function ar(e,{theme:t},n){for(let t of n){let n=ur([t]);n&&e.theme.clearNamespace(`--${n}`,4)}for(let[n,r]of or(t)){if(typeof r!=`string`&&typeof r!=`number`)continue;if(typeof r==`string`&&(r=r.replace(/<alpha-value>/g,`1`)),n[0]===`opacity`&&(typeof r==`number`||typeof r==`string`)){let e=typeof r==`string`?parseFloat(r):r;e>=0&&e<=1&&(r=e*100+`%`)}let t=ur(n);t&&e.theme.add(`--${t}`,``+r,7)}if(Object.hasOwn(t,`fontFamily`)){{let n=ir(t.fontFamily.sans);n&&e.theme.hasDefault(`--font-sans`)&&(e.theme.add(`--default-font-family`,n,5),e.theme.add(`--default-font-feature-settings`,ir(t.fontFamily.sans,`fontFeatureSettings`)??`normal`,5),e.theme.add(`--default-font-variation-settings`,ir(t.fontFamily.sans,`fontVariationSettings`)??`normal`,5))}{let n=ir(t.fontFamily.mono);n&&e.theme.hasDefault(`--font-mono`)&&(e.theme.add(`--default-mono-font-family`,n,5),e.theme.add(`--default-mono-font-feature-settings`,ir(t.fontFamily.mono,`fontFeatureSettings`)??`normal`,5),e.theme.add(`--default-mono-font-variation-settings`,ir(t.fontFamily.mono,`fontVariationSettings`)??`normal`,5))}}return t}function or(e){let t=[];return pr(e,[],(e,n)=>{if(dr(e))return t.push([n,e]),1;if(fr(e)){t.push([n,e[0]]);for(let r of Reflect.ownKeys(e[1]))t.push([[...n,`-${r}`],e[1][r]]);return 1}if(Array.isArray(e)&&e.every(e=>typeof e==`string`))return n[0]===`fontSize`?(t.push([n,e[0]]),e.length>=2&&t.push([[...n,`-line-height`],e[1]])):t.push([n,e.join(`, `)]),1}),t}var sr={borderWidth:`border-width`,outlineWidth:`outline-width`,ringColor:`ring-color`,ringWidth:`ring-width`,transitionDuration:`transition-duration`,transitionTimingFunction:`transition-timing-function`},cr={animation:`animate`,aspectRatio:`aspect`,borderRadius:`radius`,boxShadow:`shadow`,colors:`color`,containers:`container`,fontFamily:`font`,fontSize:`text`,letterSpacing:`tracking`,lineHeight:`leading`,maxWidth:`container`,screens:`breakpoint`,transitionTimingFunction:`ease`},lr=/^[a-zA-Z0-9-_%/.]+$/;function ur(e){let t=sr[e[0]];if(t&&e[1]===`DEFAULT`)return`default-${t}`;if(e[0]===`container`)return null;for(let t of e)if(!lr.test(t))return null;let n=cr[e[0]];return n&&(e=e.slice(),e[0]=n),e.map((e,t,n)=>e===`1`&&t!==n.length-1?``:e).map((e,t)=>(e=e.replaceAll(`.`,`_`),(t===0||e.startsWith(`-`)||e===`lineHeight`)&&(e=e.replace(/([a-z])([A-Z])/g,(e,t,n)=>`${t}-${n.toLowerCase()}`)),e)).filter((t,n)=>t!==`DEFAULT`||n!==e.length-1).join(`-`)}function dr(e){return typeof e==`number`||typeof e==`string`}function fr(e){if(!Array.isArray(e)||e.length!==2||typeof e[0]!=`string`&&typeof e[0]!=`number`||e[1]===void 0||e[1]===null||typeof e[1]!=`object`)return!1;for(let t of Reflect.ownKeys(e[1]))if(typeof t!=`string`||typeof e[1][t]!=`string`&&typeof e[1][t]!=`number`)return!1;return!0}function pr(e,t=[],n){for(let r of Reflect.ownKeys(e)){let i=e[r];if(i==null)continue;let a=[...t,r],o=n(i,a)??0;if(o!==1&&(o===2||(Array.isArray(i)||typeof i==`object`)&&pr(i,a,n)===2))return 2}}function mr(e){let t=[];for(let n of A(e,`.`)){if(!n.includes(`[`)){t.push(n);continue}let e=0;for(;;){let r=n.indexOf(`[`,e),i=n.indexOf(`]`,r);if(r===-1||i===-1)break;r>e&&t.push(n.slice(e,r)),t.push(n.slice(r+1,i)),e=i+1}e<=n.length-1&&t.push(n.slice(e))}return t}function hr(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function gr(e,t,n,r=[]){for(let i of t)if(i!=null)for(let t of Reflect.ownKeys(i)){r.push(t);let a=n(e[t],i[t],r);e[t]=a===void 0?!hr(e[t])||!hr(i[t])?i[t]:gr({},[e[t],i[t]],n,r):a,r.pop()}return e}function _r(e,t,n){return function(r,i){let a=r.lastIndexOf(`/`),o=null;a!==-1&&(o=r.slice(a+1).trim(),r=r.slice(0,a).trim());let s=(()=>{let i=mr(r),[a,o]=vr(e.theme,i),s=n(yr(t()??{},i)??null);if(typeof s==`string`&&(s=s.replace(`<alpha-value>`,`1`)),typeof a!=`object`)return typeof o!=`object`&&o&4?s??a:a;if(typeof s==`object`&&s&&!Array.isArray(s)){let e=gr({},[s],(e,t)=>t);if(a===null&&Object.hasOwn(s,`__CSS_VALUES__`)){let t={};for(let n in s.__CSS_VALUES__)t[n]=s[n],delete e[n];a=t}for(let t in a)t!==`__CSS_VALUES__`&&(s?.__CSS_VALUES__?.[t]&4&&yr(e,t.split(`-`))!==void 0||(e[w(t)]=a[t]));return e}if(Array.isArray(a)&&Array.isArray(o)&&Array.isArray(s)){let e=a[0],t=a[1];o[0]&4&&(e=s[0]??e);for(let e of Object.keys(t))o[1][e]&4&&(t[e]=s[1][e]??t[e]);return[e,t]}return typeof a==`object`&&a&&!Array.isArray(a)&&`DEFAULT`in a?a.DEFAULT:a??s})();return o&&typeof s==`string`&&(s=W(s,o)),s??i}}function vr(e,t){if(t.length===1&&t[0].startsWith(`--`))return[e.get([t[0]]),e.getOptions(t[0])];let n=ur(t),r=new Map,i=new O(()=>new Map),a=e.namespace(`--${n}`);if(a.size===0)return[null,0];let o=new Map;for(let[t,s]of a){if(!t||!t.includes(`--`)){r.set(t,s),o.set(t,e.getOptions(t?`--${n}-${t}`:`--${n}`));continue}let a=t.indexOf(`--`),c=t.slice(0,a),l=t.slice(a+2);l=l.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()),i.get(c===``?null:c).set(l,[s,e.getOptions(`--${n}${t}`)])}let s=e.getOptions(`--${n}`);for(let[e,t]of i){let n=r.get(e);if(typeof n!=`string`)continue;let i={},a={};for(let[e,[n,r]]of t)i[e]=n,a[e]=r;r.set(e,[n,i]),o.set(e,[s,a])}let c={},l={};for(let[e,t]of r)br(c,[e??`DEFAULT`],t);for(let[e,t]of o)br(l,[e??`DEFAULT`],t);return t[t.length-1]===`DEFAULT`?[c?.DEFAULT??null,l.DEFAULT??0]:`DEFAULT`in c&&Object.keys(c).length===1?[c.DEFAULT,l.DEFAULT??0]:(c.__CSS_VALUES__=l,[c,l])}function yr(e,t){for(let n=0;n<t.length;++n){let r=t[n];if(typeof e!=`object`||!e||!Object.hasOwn(e,r)){if(t[n+1]===void 0)return;t[n+1]=`${r}-${t[n+1]}`;continue}e=e[r]}return e}function br(e,t,n){for(let n of t.slice(0,-1))e[n]===void 0&&(e[n]={}),e=e[n];e[t[t.length-1]]=n}var xr=/^[a-z@][a-zA-Z0-9/%._-]*$/;function Sr({designSystem:e,ast:t,resolvedConfig:n,featuresRef:r,referenceMode:i,src:a}){let o={addBase(n){if(i)return;let o=Cr(n);r.current|=On(o,e);let s=I(`@layer`,`base`,o);P([s],e=>{e.src=a}),t.push(s)},addVariant(t,n){if(!In.test(t))throw Error(`\`addVariant('${t}')\` defines an invalid variant name. Variants should only contain alphanumeric, dashes, or underscore characters and start with a lowercase letter or number.`);if(typeof n==`string`){if(n.includes(`:merge(`))return}else if(Array.isArray(n)){if(n.some(e=>e.includes(`:merge(`)))return}else if(typeof n==`object`){let e=function(t,n){return Object.entries(t).some(([t,r])=>t.includes(n)||typeof r==`object`&&e(r,n))};if(e(n,`:merge(`))return}typeof n==`string`||Array.isArray(n)?e.variants.static(t,e=>{e.nodes=wr(n,e.nodes)},{compounds:Rn(typeof n==`string`?[n]:n)}):typeof n==`object`&&e.variants.fromAst(t,Cr(n),e)},matchVariant(t,n,r){function i(e,t,r){return wr(n(e,{modifier:t?.value??null}),r)}try{let e=n(`a`,{modifier:null});if(typeof e==`string`&&e.includes(`:merge(`)||Array.isArray(e)&&e.some(e=>e.includes(`:merge(`)))return}catch{}let a=Object.keys(r?.values??{});e.variants.group(()=>{e.variants.functional(t,(e,t)=>{if(!t.value){if(r?.values&&`DEFAULT`in r.values){e.nodes=i(r.values.DEFAULT,t.modifier,e.nodes);return}return null}if(t.value.kind===`arbitrary`)e.nodes=i(t.value.value,t.modifier,e.nodes);else if(t.value.kind===`named`&&r?.values){if(!Object.hasOwn(r.values,t.value.value))return null;let n=r.values[t.value.value];if(typeof n!=`string`)return null;e.nodes=i(n,t.modifier,e.nodes)}else return null})},(e,t)=>{if(e.kind!==`functional`||t.kind!==`functional`)return 0;let n=e.value?e.value.value:`DEFAULT`,i=t.value?t.value.value:`DEFAULT`,o=(r?.values&&Object.hasOwn(r.values,n)?r.values[n]:void 0)??n,s=(r?.values&&Object.hasOwn(r.values,i)?r.values[i]:void 0)??i;if(r&&typeof r.sort==`function`)return r.sort({value:o,modifier:e.modifier?.value??null},{value:s,modifier:t.modifier?.value??null});let c=a.indexOf(n),l=a.indexOf(i);return c=c===-1?a.length:c,l=l===-1?a.length:l,c===l?o<s?-1:1:c-l}),e.variants.suggest(t,()=>Object.keys(r?.values??{}).filter(e=>e!==`DEFAULT`))},addUtilities(n){n=Array.isArray(n)?n:[n];let o=n.flatMap(e=>Object.entries(e));o=o.flatMap(([e,t])=>A(e,`,`).map(e=>[e.trim(),t]));let s=new O(()=>[]);for(let[e,n]of o){if(e.startsWith(`@keyframes `)){if(!i){let r=L(e,Cr(n));P([r],e=>{e.src=a}),t.push(r)}continue}let r=g(e),o=!1;if(P(r,e=>{if(e.kind===`selector`&&e.value[0]===`.`&&xr.test(e.value.slice(1))){let t=e.value;e.value=`&`;let i=l(r),a=t.slice(1),c=i===`&`?Cr(n):[L(i,Cr(n))];s.get(a).push(...c),o=!0,e.value=t;return}if(e.kind===`function`&&(e.value===`:not`||e.value===`:nth-child`||e.value===`:nth-last-child`))return N.Skip}),!o)throw Error(`\`addUtilities({ '${e}' : \u2026 })\` defines an invalid utility selector. Utilities must be a single class name and start with a lowercase letter, eg. \`.scrollbar-none\`.`)}for(let[t,n]of s)e.theme.prefix&&P(n,t=>{if(t.kind===`rule`){let n=g(t.selector);P(n,t=>{t.kind===`selector`&&t.value[0]===`.`&&(t.value=`.${e.theme.prefix}\\:${t.value.slice(1)}`)}),t.selector=l(n)}}),e.utilities.static(t,i=>{let a=n.map(Te);return Tr(a,t,i.raw),r.current|=$n(a,e),a})},matchUtilities(t,n){let i=n?.type?Array.isArray(n?.type)?n.type:[n.type]:[`any`];for(let[a,o]of Object.entries(t)){let t=function({negative:t}){return s=>{if(s.value?.kind===`arbitrary`&&i.length>0&&!i.includes(`any`)&&(s.value.dataType&&!i.includes(s.value.dataType)||!s.value.dataType&&!V(s.value.value,i)))return;let c=i.includes(`color`),l=null,u=!1;{let e=n?.values??{};c&&(e=Object.assign({inherit:`inherit`,transparent:`transparent`,current:`currentcolor`},e)),s.value?s.value.kind===`arbitrary`?l=s.value.value:s.value.fraction&&Object.hasOwn(e,s.value.fraction)?(l=e[s.value.fraction],u=!0):Object.hasOwn(e,s.value.value)?l=e[s.value.value]:e.__BARE_VALUE__&&(l=e.__BARE_VALUE__(s.value)??null,u=(s.value.fraction!==null&&l?.includes(`/`))??!1):l=e.DEFAULT??null}if(l===null)return;let d;{let e=n?.modifiers??null;d=s.modifier?e===`any`||s.modifier.kind===`arbitrary`?s.modifier.value:e&&Object.hasOwn(e,s.modifier.value)?e[s.modifier.value]:c&&!Number.isNaN(Number(s.modifier.value))?`${s.modifier.value}%`:null:null}if(s.modifier&&d===null&&!u)return s.value?.kind===`arbitrary`?null:void 0;c&&d!==null&&(l=W(l,d)),t&&(l=`calc(${l} * -1)`);let f=Cr(o(l,{modifier:d}));return Tr(f,a,s.raw),r.current|=$n(f,e),f}};if(!xr.test(a))throw Error(`\`matchUtilities({ '${a}' : \u2026 })\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter, eg. \`scrollbar\`.`);n?.supportsNegativeValues&&e.utilities.functional(`-${a}`,t({negative:!0}),{types:i}),e.utilities.functional(a,t({negative:!1}),{types:i}),e.utilities.suggest(a,()=>{let e=n?.values??{},t=new Set(Object.keys(e));t.delete(`__BARE_VALUE__`),t.delete(`__CSS_VALUES__`),t.has(`DEFAULT`)&&(t.delete(`DEFAULT`),t.add(null));let r=n?.modifiers??{},i=r===`any`?[]:Object.keys(r);return[{supportsNegative:n?.supportsNegativeValues??!1,values:Array.from(t),modifiers:i}]})}},addComponents(e,t){this.addUtilities(e,t)},matchComponents(e,t){this.matchUtilities(e,t)},theme:_r(e,()=>n.theme??{},e=>e),prefix(e){return e},config(e,t){let r=n;if(!e)return r;let i=mr(e);for(let e=0;e<i.length;++e){let n=i[e];if(r[n]===void 0)return t;r=r[n]}return r??t}};return o.addComponents=o.addComponents.bind(o),o.matchComponents=o.matchComponents.bind(o),o}function Cr(e){let t=[];e=Array.isArray(e)?e:[e];let n=e.flatMap(e=>Object.entries(e));for(let[e,r]of n)if(r!=null&&r!==!1){if(typeof r!=`object`){if(!e.startsWith(`--`)){if(r===`@slot`){t.push(L(e,[I(`@slot`)]));continue}e=e.replace(/([A-Z])/g,`-$1`).toLowerCase()}t.push(R(e,String(r)))}else if(Array.isArray(r))for(let n of r)typeof n==`string`?t.push(R(e,n)):t.push(L(e,Cr(n)));else t.push(L(e,Cr(r)))}return t}function wr(e,t){return(typeof e==`string`?[e]:e).flatMap(e=>{if(e.trim().endsWith(`}`)){let n=y(e.replace(`}`,`{@slot}}`));return Vn(n,t),n}return L(e,t)})}function Tr(e,t,n){P(e,e=>{if(e.kind===`rule`){let r=g(e.selector);P(r,e=>{e.kind===`selector`&&e.value===`.${t}`&&(e.value=`.${C(n)}`)}),e.selector=l(r)}})}function Er(e,t){for(let n of Dr(t))e.theme.addKeyframes(n)}function Dr(e){let t=[];if(`keyframes`in e.theme)for(let[n,r]of Object.entries(e.theme.keyframes))t.push(I(`@keyframes`,n,Cr(r)));return t}var Or={inherit:`inherit`,current:`currentcolor`,transparent:`transparent`,black:`#000`,white:`#fff`,slate:{50:`oklch(98.4% 0.003 247.858)`,100:`oklch(96.8% 0.007 247.896)`,200:`oklch(92.9% 0.013 255.508)`,300:`oklch(86.9% 0.022 252.894)`,400:`oklch(70.4% 0.04 256.788)`,500:`oklch(55.4% 0.046 257.417)`,600:`oklch(44.6% 0.043 257.281)`,700:`oklch(37.2% 0.044 257.287)`,800:`oklch(27.9% 0.041 260.031)`,900:`oklch(20.8% 0.042 265.755)`,950:`oklch(12.9% 0.042 264.695)`},gray:{50:`oklch(98.5% 0.002 247.839)`,100:`oklch(96.7% 0.003 264.542)`,200:`oklch(92.8% 0.006 264.531)`,300:`oklch(87.2% 0.01 258.338)`,400:`oklch(70.7% 0.022 261.325)`,500:`oklch(55.1% 0.027 264.364)`,600:`oklch(44.6% 0.03 256.802)`,700:`oklch(37.3% 0.034 259.733)`,800:`oklch(27.8% 0.033 256.848)`,900:`oklch(21% 0.034 264.665)`,950:`oklch(13% 0.028 261.692)`},zinc:{50:`oklch(98.5% 0 none)`,100:`oklch(96.7% 0.001 286.375)`,200:`oklch(92% 0.004 286.32)`,300:`oklch(87.1% 0.006 286.286)`,400:`oklch(70.5% 0.015 286.067)`,500:`oklch(55.2% 0.016 285.938)`,600:`oklch(44.2% 0.017 285.786)`,700:`oklch(37% 0.013 285.805)`,800:`oklch(27.4% 0.006 286.033)`,900:`oklch(21% 0.006 285.885)`,950:`oklch(14.1% 0.005 285.823)`},neutral:{50:`oklch(98.5% 0 none)`,100:`oklch(97% 0 none)`,200:`oklch(92.2% 0 none)`,300:`oklch(87% 0 none)`,400:`oklch(70.8% 0 none)`,500:`oklch(55.6% 0 none)`,600:`oklch(43.9% 0 none)`,700:`oklch(37.1% 0 none)`,800:`oklch(26.9% 0 none)`,900:`oklch(20.5% 0 none)`,950:`oklch(14.5% 0 none)`},stone:{50:`oklch(98.5% 0.001 106.423)`,100:`oklch(97% 0.001 106.424)`,200:`oklch(92.3% 0.003 48.717)`,300:`oklch(86.9% 0.005 56.366)`,400:`oklch(70.9% 0.01 56.259)`,500:`oklch(55.3% 0.013 58.071)`,600:`oklch(44.4% 0.011 73.639)`,700:`oklch(37.4% 0.01 67.558)`,800:`oklch(26.8% 0.007 34.298)`,900:`oklch(21.6% 0.006 56.043)`,950:`oklch(14.7% 0.004 49.25)`},mauve:{50:`oklch(98.5% 0 none)`,100:`oklch(96% 0.003 325.6)`,200:`oklch(92.2% 0.005 325.62)`,300:`oklch(86.5% 0.012 325.68)`,400:`oklch(71.1% 0.019 323.02)`,500:`oklch(54.2% 0.034 322.5)`,600:`oklch(43.5% 0.029 321.78)`,700:`oklch(36.4% 0.029 323.89)`,800:`oklch(26.3% 0.024 320.12)`,900:`oklch(21.2% 0.019 322.12)`,950:`oklch(14.5% 0.008 326)`},olive:{50:`oklch(98.8% 0.003 106.5)`,100:`oklch(96.6% 0.005 106.5)`,200:`oklch(93% 0.007 106.5)`,300:`oklch(88% 0.011 106.6)`,400:`oklch(73.7% 0.021 106.9)`,500:`oklch(58% 0.031 107.3)`,600:`oklch(46.6% 0.025 107.3)`,700:`oklch(39.4% 0.023 107.4)`,800:`oklch(28.6% 0.016 107.4)`,900:`oklch(22.8% 0.013 107.4)`,950:`oklch(15.3% 0.006 107.1)`},mist:{50:`oklch(98.7% 0.002 197.1)`,100:`oklch(96.3% 0.002 197.1)`,200:`oklch(92.5% 0.005 214.3)`,300:`oklch(87.2% 0.007 219.6)`,400:`oklch(72.3% 0.014 214.4)`,500:`oklch(56% 0.021 213.5)`,600:`oklch(45% 0.017 213.2)`,700:`oklch(37.8% 0.015 216)`,800:`oklch(27.5% 0.011 216.9)`,900:`oklch(21.8% 0.008 223.9)`,950:`oklch(14.8% 0.004 228.8)`},taupe:{50:`oklch(98.6% 0.002 67.8)`,100:`oklch(96% 0.002 17.2)`,200:`oklch(92.2% 0.005 34.3)`,300:`oklch(86.8% 0.007 39.5)`,400:`oklch(71.4% 0.014 41.2)`,500:`oklch(54.7% 0.021 43.1)`,600:`oklch(43.8% 0.017 39.3)`,700:`oklch(36.7% 0.016 35.7)`,800:`oklch(26.8% 0.011 36.5)`,900:`oklch(21.4% 0.009 43.1)`,950:`oklch(14.7% 0.004 49.3)`},red:{50:`oklch(97.1% 0.013 17.38)`,100:`oklch(93.6% 0.032 17.717)`,200:`oklch(88.5% 0.062 18.334)`,300:`oklch(80.8% 0.114 19.571)`,400:`oklch(70.4% 0.191 22.216)`,500:`oklch(63.7% 0.237 25.331)`,600:`oklch(57.7% 0.245 27.325)`,700:`oklch(50.5% 0.213 27.518)`,800:`oklch(44.4% 0.177 26.899)`,900:`oklch(39.6% 0.141 25.723)`,950:`oklch(25.8% 0.092 26.042)`},orange:{50:`oklch(98% 0.016 73.684)`,100:`oklch(95.4% 0.038 75.164)`,200:`oklch(90.1% 0.076 70.697)`,300:`oklch(83.7% 0.128 66.29)`,400:`oklch(75% 0.183 55.934)`,500:`oklch(70.5% 0.213 47.604)`,600:`oklch(64.6% 0.222 41.116)`,700:`oklch(55.3% 0.195 38.402)`,800:`oklch(47% 0.157 37.304)`,900:`oklch(40.8% 0.123 38.172)`,950:`oklch(26.6% 0.079 36.259)`},amber:{50:`oklch(98.7% 0.022 95.277)`,100:`oklch(96.2% 0.059 95.617)`,200:`oklch(92.4% 0.12 95.746)`,300:`oklch(87.9% 0.169 91.605)`,400:`oklch(82.8% 0.189 84.429)`,500:`oklch(76.9% 0.188 70.08)`,600:`oklch(66.6% 0.179 58.318)`,700:`oklch(55.5% 0.163 48.998)`,800:`oklch(47.3% 0.137 46.201)`,900:`oklch(41.4% 0.112 45.904)`,950:`oklch(27.9% 0.077 45.635)`},yellow:{50:`oklch(98.7% 0.026 102.212)`,100:`oklch(97.3% 0.071 103.193)`,200:`oklch(94.5% 0.129 101.54)`,300:`oklch(90.5% 0.182 98.111)`,400:`oklch(85.2% 0.199 91.936)`,500:`oklch(79.5% 0.184 86.047)`,600:`oklch(68.1% 0.162 75.834)`,700:`oklch(55.4% 0.135 66.442)`,800:`oklch(47.6% 0.114 61.907)`,900:`oklch(42.1% 0.095 57.708)`,950:`oklch(28.6% 0.066 53.813)`},lime:{50:`oklch(98.6% 0.031 120.757)`,100:`oklch(96.7% 0.067 122.328)`,200:`oklch(93.8% 0.127 124.321)`,300:`oklch(89.7% 0.196 126.665)`,400:`oklch(84.1% 0.238 128.85)`,500:`oklch(76.8% 0.233 130.85)`,600:`oklch(64.8% 0.2 131.684)`,700:`oklch(53.2% 0.157 131.589)`,800:`oklch(45.3% 0.124 130.933)`,900:`oklch(40.5% 0.101 131.063)`,950:`oklch(27.4% 0.072 132.109)`},green:{50:`oklch(98.2% 0.018 155.826)`,100:`oklch(96.2% 0.044 156.743)`,200:`oklch(92.5% 0.084 155.995)`,300:`oklch(87.1% 0.15 154.449)`,400:`oklch(79.2% 0.209 151.711)`,500:`oklch(72.3% 0.219 149.579)`,600:`oklch(62.7% 0.194 149.214)`,700:`oklch(52.7% 0.154 150.069)`,800:`oklch(44.8% 0.119 151.328)`,900:`oklch(39.3% 0.095 152.535)`,950:`oklch(26.6% 0.065 152.934)`},emerald:{50:`oklch(97.9% 0.021 166.113)`,100:`oklch(95% 0.052 163.051)`,200:`oklch(90.5% 0.093 164.15)`,300:`oklch(84.5% 0.143 164.978)`,400:`oklch(76.5% 0.177 163.223)`,500:`oklch(69.6% 0.17 162.48)`,600:`oklch(59.6% 0.145 163.225)`,700:`oklch(50.8% 0.118 165.612)`,800:`oklch(43.2% 0.095 166.913)`,900:`oklch(37.8% 0.077 168.94)`,950:`oklch(26.2% 0.051 172.552)`},teal:{50:`oklch(98.4% 0.014 180.72)`,100:`oklch(95.3% 0.051 180.801)`,200:`oklch(91% 0.096 180.426)`,300:`oklch(85.5% 0.138 181.071)`,400:`oklch(77.7% 0.152 181.912)`,500:`oklch(70.4% 0.14 182.503)`,600:`oklch(60% 0.118 184.704)`,700:`oklch(51.1% 0.096 186.391)`,800:`oklch(43.7% 0.078 188.216)`,900:`oklch(38.6% 0.063 188.416)`,950:`oklch(27.7% 0.046 192.524)`},cyan:{50:`oklch(98.4% 0.019 200.873)`,100:`oklch(95.6% 0.045 203.388)`,200:`oklch(91.7% 0.08 205.041)`,300:`oklch(86.5% 0.127 207.078)`,400:`oklch(78.9% 0.154 211.53)`,500:`oklch(71.5% 0.143 215.221)`,600:`oklch(60.9% 0.126 221.723)`,700:`oklch(52% 0.105 223.128)`,800:`oklch(45% 0.085 224.283)`,900:`oklch(39.8% 0.07 227.392)`,950:`oklch(30.2% 0.056 229.695)`},sky:{50:`oklch(97.7% 0.013 236.62)`,100:`oklch(95.1% 0.026 236.824)`,200:`oklch(90.1% 0.058 230.902)`,300:`oklch(82.8% 0.111 230.318)`,400:`oklch(74.6% 0.16 232.661)`,500:`oklch(68.5% 0.169 237.323)`,600:`oklch(58.8% 0.158 241.966)`,700:`oklch(50% 0.134 242.749)`,800:`oklch(44.3% 0.11 240.79)`,900:`oklch(39.1% 0.09 240.876)`,950:`oklch(29.3% 0.066 243.157)`},blue:{50:`oklch(97% 0.014 254.604)`,100:`oklch(93.2% 0.032 255.585)`,200:`oklch(88.2% 0.059 254.128)`,300:`oklch(80.9% 0.105 251.813)`,400:`oklch(70.7% 0.165 254.624)`,500:`oklch(62.3% 0.214 259.815)`,600:`oklch(54.6% 0.245 262.881)`,700:`oklch(48.8% 0.243 264.376)`,800:`oklch(42.4% 0.199 265.638)`,900:`oklch(37.9% 0.146 265.522)`,950:`oklch(28.2% 0.091 267.935)`},indigo:{50:`oklch(96.2% 0.018 272.314)`,100:`oklch(93% 0.034 272.788)`,200:`oklch(87% 0.065 274.039)`,300:`oklch(78.5% 0.115 274.713)`,400:`oklch(67.3% 0.182 276.935)`,500:`oklch(58.5% 0.233 277.117)`,600:`oklch(51.1% 0.262 276.966)`,700:`oklch(45.7% 0.24 277.023)`,800:`oklch(39.8% 0.195 277.366)`,900:`oklch(35.9% 0.144 278.697)`,950:`oklch(25.7% 0.09 281.288)`},violet:{50:`oklch(96.9% 0.016 293.756)`,100:`oklch(94.3% 0.029 294.588)`,200:`oklch(89.4% 0.057 293.283)`,300:`oklch(81.1% 0.111 293.571)`,400:`oklch(70.2% 0.183 293.541)`,500:`oklch(60.6% 0.25 292.717)`,600:`oklch(54.1% 0.281 293.009)`,700:`oklch(49.1% 0.27 292.581)`,800:`oklch(43.2% 0.232 292.759)`,900:`oklch(38% 0.189 293.745)`,950:`oklch(28.3% 0.141 291.089)`},purple:{50:`oklch(97.7% 0.014 308.299)`,100:`oklch(94.6% 0.033 307.174)`,200:`oklch(90.2% 0.063 306.703)`,300:`oklch(82.7% 0.119 306.383)`,400:`oklch(71.4% 0.203 305.504)`,500:`oklch(62.7% 0.265 303.9)`,600:`oklch(55.8% 0.288 302.321)`,700:`oklch(49.6% 0.265 301.924)`,800:`oklch(43.8% 0.218 303.724)`,900:`oklch(38.1% 0.176 304.987)`,950:`oklch(29.1% 0.149 302.717)`},fuchsia:{50:`oklch(97.7% 0.017 320.058)`,100:`oklch(95.2% 0.037 318.852)`,200:`oklch(90.3% 0.076 319.62)`,300:`oklch(83.3% 0.145 321.434)`,400:`oklch(74% 0.238 322.16)`,500:`oklch(66.7% 0.295 322.15)`,600:`oklch(59.1% 0.293 322.896)`,700:`oklch(51.8% 0.253 323.949)`,800:`oklch(45.2% 0.211 324.591)`,900:`oklch(40.1% 0.17 325.612)`,950:`oklch(29.3% 0.136 325.661)`},pink:{50:`oklch(97.1% 0.014 343.198)`,100:`oklch(94.8% 0.028 342.258)`,200:`oklch(89.9% 0.061 343.231)`,300:`oklch(82.3% 0.12 346.018)`,400:`oklch(71.8% 0.202 349.761)`,500:`oklch(65.6% 0.241 354.308)`,600:`oklch(59.2% 0.249 0.584)`,700:`oklch(52.5% 0.223 3.958)`,800:`oklch(45.9% 0.187 3.815)`,900:`oklch(40.8% 0.153 2.432)`,950:`oklch(28.4% 0.109 3.907)`},rose:{50:`oklch(96.9% 0.015 12.422)`,100:`oklch(94.1% 0.03 12.58)`,200:`oklch(89.2% 0.058 10.001)`,300:`oklch(81% 0.117 11.638)`,400:`oklch(71.2% 0.194 13.428)`,500:`oklch(64.5% 0.246 16.439)`,600:`oklch(58.6% 0.253 17.585)`,700:`oklch(51.4% 0.222 16.935)`,800:`oklch(45.5% 0.188 13.697)`,900:`oklch(41% 0.159 10.272)`,950:`oklch(27.1% 0.105 12.094)`}};function kr(e){return{__BARE_VALUE__:e}}var Ar=kr(e=>{if(H(e.value))return e.value}),Z=kr(e=>{if(H(e.value))return`${e.value}%`}),jr=kr(e=>{if(H(e.value))return`${e.value}px`}),Mr=kr(e=>{if(H(e.value))return`${e.value}ms`}),Nr=kr(e=>{if(H(e.value))return`${e.value}deg`}),Pr=kr(e=>{if(e.fraction===null)return;let[t,n]=A(e.fraction,`/`);if(H(t)&&H(n))return e.fraction}),Fr=kr(e=>{if(H(Number(e.value)))return`repeat(${e.value}, minmax(0, 1fr))`}),Ir={accentColor:({theme:e})=>e(`colors`),animation:{none:`none`,spin:`spin 1s linear infinite`,ping:`ping 1s cubic-bezier(0, 0, 0.2, 1) infinite`,pulse:`pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite`,bounce:`bounce 1s infinite`},aria:{busy:`busy="true"`,checked:`checked="true"`,disabled:`disabled="true"`,expanded:`expanded="true"`,hidden:`hidden="true"`,pressed:`pressed="true"`,readonly:`readonly="true"`,required:`required="true"`,selected:`selected="true"`},aspectRatio:{auto:`auto`,square:`1 / 1`,video:`16 / 9`,...Pr},backdropBlur:({theme:e})=>e(`blur`),backdropBrightness:({theme:e})=>({...e(`brightness`),...Z}),backdropContrast:({theme:e})=>({...e(`contrast`),...Z}),backdropGrayscale:({theme:e})=>({...e(`grayscale`),...Z}),backdropHueRotate:({theme:e})=>({...e(`hueRotate`),...Nr}),backdropInvert:({theme:e})=>({...e(`invert`),...Z}),backdropOpacity:({theme:e})=>({...e(`opacity`),...Z}),backdropSaturate:({theme:e})=>({...e(`saturate`),...Z}),backdropSepia:({theme:e})=>({...e(`sepia`),...Z}),backgroundColor:({theme:e})=>e(`colors`),backgroundImage:{none:`none`,"gradient-to-t":`linear-gradient(to top, var(--tw-gradient-stops))`,"gradient-to-tr":`linear-gradient(to top right, var(--tw-gradient-stops))`,"gradient-to-r":`linear-gradient(to right, var(--tw-gradient-stops))`,"gradient-to-br":`linear-gradient(to bottom right, var(--tw-gradient-stops))`,"gradient-to-b":`linear-gradient(to bottom, var(--tw-gradient-stops))`,"gradient-to-bl":`linear-gradient(to bottom left, var(--tw-gradient-stops))`,"gradient-to-l":`linear-gradient(to left, var(--tw-gradient-stops))`,"gradient-to-tl":`linear-gradient(to top left, var(--tw-gradient-stops))`},backgroundOpacity:({theme:e})=>e(`opacity`),backgroundPosition:{bottom:`bottom`,center:`center`,left:`left`,"left-bottom":`left bottom`,"left-top":`left top`,right:`right`,"right-bottom":`right bottom`,"right-top":`right top`,top:`top`},backgroundSize:{auto:`auto`,cover:`cover`,contain:`contain`},blur:{0:`0`,none:``,sm:`4px`,DEFAULT:`8px`,md:`12px`,lg:`16px`,xl:`24px`,"2xl":`40px`,"3xl":`64px`},borderColor:({theme:e})=>({DEFAULT:`currentcolor`,...e(`colors`)}),borderOpacity:({theme:e})=>e(`opacity`),borderRadius:{none:`0px`,sm:`0.125rem`,DEFAULT:`0.25rem`,md:`0.375rem`,lg:`0.5rem`,xl:`0.75rem`,"2xl":`1rem`,"3xl":`1.5rem`,full:`9999px`},borderSpacing:({theme:e})=>e(`spacing`),borderWidth:{DEFAULT:`1px`,0:`0px`,2:`2px`,4:`4px`,8:`8px`,...jr},boxShadow:{sm:`0 1px 2px 0 rgb(0 0 0 / 0.05)`,DEFAULT:`0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)`,md:`0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)`,lg:`0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)`,xl:`0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)`,"2xl":`0 25px 50px -12px rgb(0 0 0 / 0.25)`,inner:`inset 0 2px 4px 0 rgb(0 0 0 / 0.05)`,none:`none`},boxShadowColor:({theme:e})=>e(`colors`),brightness:{0:`0`,50:`.5`,75:`.75`,90:`.9`,95:`.95`,100:`1`,105:`1.05`,110:`1.1`,125:`1.25`,150:`1.5`,200:`2`,...Z},caretColor:({theme:e})=>e(`colors`),colors:()=>({...Or}),columns:{auto:`auto`,1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,7:`7`,8:`8`,9:`9`,10:`10`,11:`11`,12:`12`,"3xs":`16rem`,"2xs":`18rem`,xs:`20rem`,sm:`24rem`,md:`28rem`,lg:`32rem`,xl:`36rem`,"2xl":`42rem`,"3xl":`48rem`,"4xl":`56rem`,"5xl":`64rem`,"6xl":`72rem`,"7xl":`80rem`,...Ar},container:{},content:{none:`none`},contrast:{0:`0`,50:`.5`,75:`.75`,100:`1`,125:`1.25`,150:`1.5`,200:`2`,...Z},cursor:{auto:`auto`,default:`default`,pointer:`pointer`,wait:`wait`,text:`text`,move:`move`,help:`help`,"not-allowed":`not-allowed`,none:`none`,"context-menu":`context-menu`,progress:`progress`,cell:`cell`,crosshair:`crosshair`,"vertical-text":`vertical-text`,alias:`alias`,copy:`copy`,"no-drop":`no-drop`,grab:`grab`,grabbing:`grabbing`,"all-scroll":`all-scroll`,"col-resize":`col-resize`,"row-resize":`row-resize`,"n-resize":`n-resize`,"e-resize":`e-resize`,"s-resize":`s-resize`,"w-resize":`w-resize`,"ne-resize":`ne-resize`,"nw-resize":`nw-resize`,"se-resize":`se-resize`,"sw-resize":`sw-resize`,"ew-resize":`ew-resize`,"ns-resize":`ns-resize`,"nesw-resize":`nesw-resize`,"nwse-resize":`nwse-resize`,"zoom-in":`zoom-in`,"zoom-out":`zoom-out`},divideColor:({theme:e})=>e(`borderColor`),divideOpacity:({theme:e})=>e(`borderOpacity`),divideWidth:({theme:e})=>({...e(`borderWidth`),...jr}),dropShadow:{sm:`0 1px 1px rgb(0 0 0 / 0.05)`,DEFAULT:[`0 1px 2px rgb(0 0 0 / 0.1)`,`0 1px 1px rgb(0 0 0 / 0.06)`],md:[`0 4px 3px rgb(0 0 0 / 0.07)`,`0 2px 2px rgb(0 0 0 / 0.06)`],lg:[`0 10px 8px rgb(0 0 0 / 0.04)`,`0 4px 3px rgb(0 0 0 / 0.1)`],xl:[`0 20px 13px rgb(0 0 0 / 0.03)`,`0 8px 5px rgb(0 0 0 / 0.08)`],"2xl":`0 25px 25px rgb(0 0 0 / 0.15)`,none:`0 0 #0000`},fill:({theme:e})=>e(`colors`),flex:{1:`1 1 0%`,auto:`1 1 auto`,initial:`0 1 auto`,none:`none`},flexBasis:({theme:e})=>({auto:`auto`,"1/2":`50%`,"1/3":`33.333333%`,"2/3":`66.666667%`,"1/4":`25%`,"2/4":`50%`,"3/4":`75%`,"1/5":`20%`,"2/5":`40%`,"3/5":`60%`,"4/5":`80%`,"1/6":`16.666667%`,"2/6":`33.333333%`,"3/6":`50%`,"4/6":`66.666667%`,"5/6":`83.333333%`,"1/12":`8.333333%`,"2/12":`16.666667%`,"3/12":`25%`,"4/12":`33.333333%`,"5/12":`41.666667%`,"6/12":`50%`,"7/12":`58.333333%`,"8/12":`66.666667%`,"9/12":`75%`,"10/12":`83.333333%`,"11/12":`91.666667%`,full:`100%`,...e(`spacing`)}),flexGrow:{0:`0`,DEFAULT:`1`,...Ar},flexShrink:{0:`0`,DEFAULT:`1`,...Ar},fontFamily:{sans:[`-apple-system`,`BlinkMacSystemFont`,`"Segoe UI"`,`Roboto`,`"Helvetica Neue"`,`"Noto Sans"`,`Arial`,`sans-serif`,`"Apple Color Emoji"`,`"Segoe UI Emoji"`,`"Segoe UI Symbol"`,`"Noto Color Emoji"`],serif:[`ui-serif`,`Georgia`,`Cambria`,`"Times New Roman"`,`Times`,`serif`],mono:[`ui-monospace`,`SFMono-Regular`,`Menlo`,`Monaco`,`Consolas`,`"Liberation Mono"`,`"Courier New"`,`monospace`]},fontSize:{xs:[`0.75rem`,{lineHeight:`1rem`}],sm:[`0.875rem`,{lineHeight:`1.25rem`}],base:[`1rem`,{lineHeight:`1.5rem`}],lg:[`1.125rem`,{lineHeight:`1.75rem`}],xl:[`1.25rem`,{lineHeight:`1.75rem`}],"2xl":[`1.5rem`,{lineHeight:`2rem`}],"3xl":[`1.875rem`,{lineHeight:`2.25rem`}],"4xl":[`2.25rem`,{lineHeight:`2.5rem`}],"5xl":[`3rem`,{lineHeight:`1`}],"6xl":[`3.75rem`,{lineHeight:`1`}],"7xl":[`4.5rem`,{lineHeight:`1`}],"8xl":[`6rem`,{lineHeight:`1`}],"9xl":[`8rem`,{lineHeight:`1`}]},fontWeight:{thin:`100`,extralight:`200`,light:`300`,normal:`400`,medium:`500`,semibold:`600`,bold:`700`,extrabold:`800`,black:`900`},gap:({theme:e})=>e(`spacing`),gradientColorStops:({theme:e})=>e(`colors`),gradientColorStopPositions:{"0%":`0%`,"5%":`5%`,"10%":`10%`,"15%":`15%`,"20%":`20%`,"25%":`25%`,"30%":`30%`,"35%":`35%`,"40%":`40%`,"45%":`45%`,"50%":`50%`,"55%":`55%`,"60%":`60%`,"65%":`65%`,"70%":`70%`,"75%":`75%`,"80%":`80%`,"85%":`85%`,"90%":`90%`,"95%":`95%`,"100%":`100%`,...Z},grayscale:{0:`0`,DEFAULT:`100%`,...Z},gridAutoColumns:{auto:`auto`,min:`min-content`,max:`max-content`,fr:`minmax(0, 1fr)`},gridAutoRows:{auto:`auto`,min:`min-content`,max:`max-content`,fr:`minmax(0, 1fr)`},gridColumn:{auto:`auto`,"span-1":`span 1 / span 1`,"span-2":`span 2 / span 2`,"span-3":`span 3 / span 3`,"span-4":`span 4 / span 4`,"span-5":`span 5 / span 5`,"span-6":`span 6 / span 6`,"span-7":`span 7 / span 7`,"span-8":`span 8 / span 8`,"span-9":`span 9 / span 9`,"span-10":`span 10 / span 10`,"span-11":`span 11 / span 11`,"span-12":`span 12 / span 12`,"span-full":`1 / -1`},gridColumnEnd:{auto:`auto`,1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,7:`7`,8:`8`,9:`9`,10:`10`,11:`11`,12:`12`,13:`13`,...Ar},gridColumnStart:{auto:`auto`,1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,7:`7`,8:`8`,9:`9`,10:`10`,11:`11`,12:`12`,13:`13`,...Ar},gridRow:{auto:`auto`,"span-1":`span 1 / span 1`,"span-2":`span 2 / span 2`,"span-3":`span 3 / span 3`,"span-4":`span 4 / span 4`,"span-5":`span 5 / span 5`,"span-6":`span 6 / span 6`,"span-7":`span 7 / span 7`,"span-8":`span 8 / span 8`,"span-9":`span 9 / span 9`,"span-10":`span 10 / span 10`,"span-11":`span 11 / span 11`,"span-12":`span 12 / span 12`,"span-full":`1 / -1`},gridRowEnd:{auto:`auto`,1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,7:`7`,8:`8`,9:`9`,10:`10`,11:`11`,12:`12`,13:`13`,...Ar},gridRowStart:{auto:`auto`,1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,7:`7`,8:`8`,9:`9`,10:`10`,11:`11`,12:`12`,13:`13`,...Ar},gridTemplateColumns:{none:`none`,subgrid:`subgrid`,1:`repeat(1, minmax(0, 1fr))`,2:`repeat(2, minmax(0, 1fr))`,3:`repeat(3, minmax(0, 1fr))`,4:`repeat(4, minmax(0, 1fr))`,5:`repeat(5, minmax(0, 1fr))`,6:`repeat(6, minmax(0, 1fr))`,7:`repeat(7, minmax(0, 1fr))`,8:`repeat(8, minmax(0, 1fr))`,9:`repeat(9, minmax(0, 1fr))`,10:`repeat(10, minmax(0, 1fr))`,11:`repeat(11, minmax(0, 1fr))`,12:`repeat(12, minmax(0, 1fr))`,...Fr},gridTemplateRows:{none:`none`,subgrid:`subgrid`,1:`repeat(1, minmax(0, 1fr))`,2:`repeat(2, minmax(0, 1fr))`,3:`repeat(3, minmax(0, 1fr))`,4:`repeat(4, minmax(0, 1fr))`,5:`repeat(5, minmax(0, 1fr))`,6:`repeat(6, minmax(0, 1fr))`,7:`repeat(7, minmax(0, 1fr))`,8:`repeat(8, minmax(0, 1fr))`,9:`repeat(9, minmax(0, 1fr))`,10:`repeat(10, minmax(0, 1fr))`,11:`repeat(11, minmax(0, 1fr))`,12:`repeat(12, minmax(0, 1fr))`,...Fr},height:({theme:e})=>({auto:`auto`,"1/2":`50%`,"1/3":`33.333333%`,"2/3":`66.666667%`,"1/4":`25%`,"2/4":`50%`,"3/4":`75%`,"1/5":`20%`,"2/5":`40%`,"3/5":`60%`,"4/5":`80%`,"1/6":`16.666667%`,"2/6":`33.333333%`,"3/6":`50%`,"4/6":`66.666667%`,"5/6":`83.333333%`,full:`100%`,screen:`100vh`,svh:`100svh`,lvh:`100lvh`,dvh:`100dvh`,min:`min-content`,max:`max-content`,fit:`fit-content`,...e(`spacing`)}),hueRotate:{0:`0deg`,15:`15deg`,30:`30deg`,60:`60deg`,90:`90deg`,180:`180deg`,...Nr},inset:({theme:e})=>({auto:`auto`,"1/2":`50%`,"1/3":`33.333333%`,"2/3":`66.666667%`,"1/4":`25%`,"2/4":`50%`,"3/4":`75%`,full:`100%`,...e(`spacing`)}),invert:{0:`0`,DEFAULT:`100%`,...Z},keyframes:{spin:{to:{transform:`rotate(360deg)`}},ping:{"75%, 100%":{transform:`scale(2)`,opacity:`0`}},pulse:{"50%":{opacity:`.5`}},bounce:{"0%, 100%":{transform:`translateY(-25%)`,animationTimingFunction:`cubic-bezier(0.8,0,1,1)`},"50%":{transform:`none`,animationTimingFunction:`cubic-bezier(0,0,0.2,1)`}}},letterSpacing:{tighter:`-0.05em`,tight:`-0.025em`,normal:`0em`,wide:`0.025em`,wider:`0.05em`,widest:`0.1em`},lineHeight:{none:`1`,tight:`1.25`,snug:`1.375`,normal:`1.5`,relaxed:`1.625`,loose:`2`,3:`.75rem`,4:`1rem`,5:`1.25rem`,6:`1.5rem`,7:`1.75rem`,8:`2rem`,9:`2.25rem`,10:`2.5rem`},listStyleType:{none:`none`,disc:`disc`,decimal:`decimal`},listStyleImage:{none:`none`},margin:({theme:e})=>({auto:`auto`,...e(`spacing`)}),lineClamp:{1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,...Ar},maxHeight:({theme:e})=>({none:`none`,full:`100%`,screen:`100vh`,svh:`100svh`,lvh:`100lvh`,dvh:`100dvh`,min:`min-content`,max:`max-content`,fit:`fit-content`,...e(`spacing`)}),maxWidth:({theme:e})=>({none:`none`,xs:`20rem`,sm:`24rem`,md:`28rem`,lg:`32rem`,xl:`36rem`,"2xl":`42rem`,"3xl":`48rem`,"4xl":`56rem`,"5xl":`64rem`,"6xl":`72rem`,"7xl":`80rem`,full:`100%`,min:`min-content`,max:`max-content`,fit:`fit-content`,prose:`65ch`,...e(`spacing`)}),minHeight:({theme:e})=>({full:`100%`,screen:`100vh`,svh:`100svh`,lvh:`100lvh`,dvh:`100dvh`,min:`min-content`,max:`max-content`,fit:`fit-content`,...e(`spacing`)}),minWidth:({theme:e})=>({full:`100%`,min:`min-content`,max:`max-content`,fit:`fit-content`,...e(`spacing`)}),objectPosition:{bottom:`bottom`,center:`center`,left:`left`,"left-bottom":`left bottom`,"left-top":`left top`,right:`right`,"right-bottom":`right bottom`,"right-top":`right top`,top:`top`},opacity:{0:`0`,5:`0.05`,10:`0.1`,15:`0.15`,20:`0.2`,25:`0.25`,30:`0.3`,35:`0.35`,40:`0.4`,45:`0.45`,50:`0.5`,55:`0.55`,60:`0.6`,65:`0.65`,70:`0.7`,75:`0.75`,80:`0.8`,85:`0.85`,90:`0.9`,95:`0.95`,100:`1`,...Z},order:{first:`-9999`,last:`9999`,none:`0`,1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,7:`7`,8:`8`,9:`9`,10:`10`,11:`11`,12:`12`,...Ar},outlineColor:({theme:e})=>e(`colors`),outlineOffset:{0:`0px`,1:`1px`,2:`2px`,4:`4px`,8:`8px`,...jr},outlineWidth:{0:`0px`,1:`1px`,2:`2px`,4:`4px`,8:`8px`,...jr},padding:({theme:e})=>e(`spacing`),placeholderColor:({theme:e})=>e(`colors`),placeholderOpacity:({theme:e})=>e(`opacity`),ringColor:({theme:e})=>({DEFAULT:`currentcolor`,...e(`colors`)}),ringOffsetColor:({theme:e})=>e(`colors`),ringOffsetWidth:{0:`0px`,1:`1px`,2:`2px`,4:`4px`,8:`8px`,...jr},ringOpacity:({theme:e})=>({DEFAULT:`0.5`,...e(`opacity`)}),ringWidth:{DEFAULT:`3px`,0:`0px`,1:`1px`,2:`2px`,4:`4px`,8:`8px`,...jr},rotate:{0:`0deg`,1:`1deg`,2:`2deg`,3:`3deg`,6:`6deg`,12:`12deg`,45:`45deg`,90:`90deg`,180:`180deg`,...Nr},saturate:{0:`0`,50:`.5`,100:`1`,150:`1.5`,200:`2`,...Z},scale:{0:`0`,50:`.5`,75:`.75`,90:`.9`,95:`.95`,100:`1`,105:`1.05`,110:`1.1`,125:`1.25`,150:`1.5`,...Z},screens:{sm:`40rem`,md:`48rem`,lg:`64rem`,xl:`80rem`,"2xl":`96rem`},scrollMargin:({theme:e})=>e(`spacing`),scrollPadding:({theme:e})=>e(`spacing`),sepia:{0:`0`,DEFAULT:`100%`,...Z},skew:{0:`0deg`,1:`1deg`,2:`2deg`,3:`3deg`,6:`6deg`,12:`12deg`,...Nr},space:({theme:e})=>e(`spacing`),spacing:{px:`1px`,0:`0px`,.5:`0.125rem`,1:`0.25rem`,1.5:`0.375rem`,2:`0.5rem`,2.5:`0.625rem`,3:`0.75rem`,3.5:`0.875rem`,4:`1rem`,5:`1.25rem`,6:`1.5rem`,7:`1.75rem`,8:`2rem`,9:`2.25rem`,10:`2.5rem`,11:`2.75rem`,12:`3rem`,14:`3.5rem`,16:`4rem`,20:`5rem`,24:`6rem`,28:`7rem`,32:`8rem`,36:`9rem`,40:`10rem`,44:`11rem`,48:`12rem`,52:`13rem`,56:`14rem`,60:`15rem`,64:`16rem`,72:`18rem`,80:`20rem`,96:`24rem`},stroke:({theme:e})=>({none:`none`,...e(`colors`)}),strokeWidth:{0:`0`,1:`1`,2:`2`,...Ar},supports:{},data:{},textColor:({theme:e})=>e(`colors`),textDecorationColor:({theme:e})=>e(`colors`),textDecorationThickness:{auto:`auto`,"from-font":`from-font`,0:`0px`,1:`1px`,2:`2px`,4:`4px`,8:`8px`,...jr},textIndent:({theme:e})=>e(`spacing`),textOpacity:({theme:e})=>e(`opacity`),textUnderlineOffset:{auto:`auto`,0:`0px`,1:`1px`,2:`2px`,4:`4px`,8:`8px`,...jr},transformOrigin:{center:`center`,top:`top`,"top-right":`top right`,right:`right`,"bottom-right":`bottom right`,bottom:`bottom`,"bottom-left":`bottom left`,left:`left`,"top-left":`top left`},transitionDelay:{0:`0s`,75:`75ms`,100:`100ms`,150:`150ms`,200:`200ms`,300:`300ms`,500:`500ms`,700:`700ms`,1e3:`1000ms`,...Mr},transitionDuration:{DEFAULT:`150ms`,0:`0s`,75:`75ms`,100:`100ms`,150:`150ms`,200:`200ms`,300:`300ms`,500:`500ms`,700:`700ms`,1e3:`1000ms`,...Mr},transitionProperty:{none:`none`,all:`all`,DEFAULT:`color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter`,colors:`color, background-color, border-color, outline-color, text-decoration-color, fill, stroke`,opacity:`opacity`,shadow:`box-shadow`,transform:`transform`},transitionTimingFunction:{DEFAULT:`cubic-bezier(0.4, 0, 0.2, 1)`,linear:`linear`,in:`cubic-bezier(0.4, 0, 1, 1)`,out:`cubic-bezier(0, 0, 0.2, 1)`,"in-out":`cubic-bezier(0.4, 0, 0.2, 1)`},translate:({theme:e})=>({"1/2":`50%`,"1/3":`33.333333%`,"2/3":`66.666667%`,"1/4":`25%`,"2/4":`50%`,"3/4":`75%`,full:`100%`,...e(`spacing`)}),size:({theme:e})=>({auto:`auto`,"1/2":`50%`,"1/3":`33.333333%`,"2/3":`66.666667%`,"1/4":`25%`,"2/4":`50%`,"3/4":`75%`,"1/5":`20%`,"2/5":`40%`,"3/5":`60%`,"4/5":`80%`,"1/6":`16.666667%`,"2/6":`33.333333%`,"3/6":`50%`,"4/6":`66.666667%`,"5/6":`83.333333%`,"1/12":`8.333333%`,"2/12":`16.666667%`,"3/12":`25%`,"4/12":`33.333333%`,"5/12":`41.666667%`,"6/12":`50%`,"7/12":`58.333333%`,"8/12":`66.666667%`,"9/12":`75%`,"10/12":`83.333333%`,"11/12":`91.666667%`,full:`100%`,min:`min-content`,max:`max-content`,fit:`fit-content`,...e(`spacing`)}),width:({theme:e})=>({auto:`auto`,"1/2":`50%`,"1/3":`33.333333%`,"2/3":`66.666667%`,"1/4":`25%`,"2/4":`50%`,"3/4":`75%`,"1/5":`20%`,"2/5":`40%`,"3/5":`60%`,"4/5":`80%`,"1/6":`16.666667%`,"2/6":`33.333333%`,"3/6":`50%`,"4/6":`66.666667%`,"5/6":`83.333333%`,"1/12":`8.333333%`,"2/12":`16.666667%`,"3/12":`25%`,"4/12":`33.333333%`,"5/12":`41.666667%`,"6/12":`50%`,"7/12":`58.333333%`,"8/12":`66.666667%`,"9/12":`75%`,"10/12":`83.333333%`,"11/12":`91.666667%`,full:`100%`,screen:`100vw`,svw:`100svw`,lvw:`100lvw`,dvw:`100dvw`,min:`min-content`,max:`max-content`,fit:`fit-content`,...e(`spacing`)}),willChange:{auto:`auto`,scroll:`scroll-position`,contents:`contents`,transform:`transform`},zIndex:{auto:`auto`,0:`0`,10:`10`,20:`20`,30:`30`,40:`40`,50:`50`,...Ar}};function Lr(e){return{theme:{...Ir,colors:({theme:e})=>e(`color`,{}),extend:{fontSize:({theme:e})=>({...e(`text`,{})}),boxShadow:({theme:e})=>({...e(`shadow`,{})}),animation:({theme:e})=>({...e(`animate`,{})}),aspectRatio:({theme:e})=>({...e(`aspect`,{})}),borderRadius:({theme:e})=>({...e(`radius`,{})}),screens:({theme:e})=>({...e(`breakpoint`,{})}),letterSpacing:({theme:e})=>({...e(`tracking`,{})}),lineHeight:({theme:e})=>({...e(`leading`,{})}),transitionDuration:{DEFAULT:e.get([`--default-transition-duration`])??null},transitionTimingFunction:{DEFAULT:e.get([`--default-transition-timing-function`])??null},maxWidth:({theme:e})=>({...e(`container`,{})})}}}}var Rr={blocklist:[],future:{},experimental:{},prefix:``,important:!1,darkMode:null,theme:{},plugins:[],content:{files:[]}};function zr(e,t){let n={design:e,configs:[],plugins:[],content:{files:[]},theme:{},extend:{},result:structuredClone(Rr)};for(let e of t)Vr(n,e);for(let e of n.configs)`darkMode`in e&&e.darkMode!==void 0&&(n.result.darkMode=e.darkMode??null),`prefix`in e&&e.prefix!==void 0&&(n.result.prefix=e.prefix??``),`blocklist`in e&&e.blocklist!==void 0&&(n.result.blocklist=e.blocklist??[]),`important`in e&&e.important!==void 0&&(n.result.important=e.important??!1);let r=Hr(n);return{resolvedConfig:{...n.result,content:n.content,theme:n.theme,plugins:n.plugins},replacedThemeKeys:r}}function Br(e,t){if(Array.isArray(e)&&hr(e[0]))return e.concat(t);if(Array.isArray(t)&&hr(t[0])&&hr(e))return[e,...t];if(Array.isArray(t))return t}function Vr(e,{config:t,base:n,path:r,reference:i,src:a}){let o=[];for(let e of t.plugins??[])`__isOptionsFunction`in e?o.push({...e(),reference:i,src:a}):`handler`in e?o.push({...e,reference:i,src:a}):o.push({handler:e,reference:i,src:a});if(Array.isArray(t.presets)&&t.presets.length===0)throw Error("Error in the config file/plugin/preset. An empty preset (`preset: []`) is not currently supported.");for(let o of t.presets??[])Vr(e,{path:r,base:n,config:o,reference:i,src:a});for(let t of o)e.plugins.push(t),t.config&&Vr(e,{path:r,base:n,config:t.config,reference:!!t.reference,src:t.src??a});let s=t.content??[],c=Array.isArray(s)?s:s.files;for(let t of c)e.content.files.push(typeof t==`object`?t:{base:n,pattern:t});e.configs.push(t)}function Hr(e){let t=new Set,n=_r(e.design,()=>e.theme,i),r=Object.assign(n,{theme:n,colors:Or});function i(e){return typeof e==`function`?e(r)??null:e??null}for(let n of e.configs){let r=n.theme??{},i=r.extend??{};for(let e in r)e!==`extend`&&t.add(e);Object.assign(e.theme,r);for(let t in i)e.extend[t]??=[],e.extend[t].push(i[t])}delete e.theme.extend;for(let t in e.extend){let n=[e.theme[t],...e.extend[t]];e.theme[t]=()=>gr({},n.map(i),Br)}for(let t in e.theme)e.theme[t]=i(e.theme[t]);if(e.theme.screens&&typeof e.theme.screens==`object`)for(let t of Object.keys(e.theme.screens)){let n=e.theme.screens[t];n&&typeof n==`object`&&(`raw`in n||`max`in n||`min`in n&&(e.theme.screens[t]=n.min))}return t}function Ur(e,t){let n=e.theme.container||{};if(typeof n!=`object`||!n)return;let r=Wr(n,t);r.length!==0&&t.utilities.static(`container`,()=>r.map(Te))}function Wr({center:e,padding:t,screens:n},r){let i=[],a=null;if(e&&i.push(R(`margin-inline`,`auto`)),(typeof t==`string`||typeof t==`object`&&t&&`DEFAULT`in t)&&i.push(R(`padding-inline`,typeof t==`string`?t:t.DEFAULT)),typeof n==`object`&&n){a=new Map;let e=Array.from(r.theme.namespace(`--breakpoint`).entries());if(e.sort((e,t)=>ut(e[1],t[1],`asc`)),e.length>0){let[t]=e[0];i.push(I(`@media`,`(width >= --theme(--breakpoint-${t}))`,[R(`max-width`,`none`)]))}for(let[e,t]of Object.entries(n)){if(typeof t==`object`){if(`min`in t)t=t.min;else continue}a.set(e,I(`@media`,`(width >= ${t})`,[R(`max-width`,t)]))}}if(typeof t==`object`&&t){let e=Object.entries(t).filter(([e])=>e!==`DEFAULT`).map(([e,t])=>[e,r.theme.resolveValue(e,[`--breakpoint`]),t]).filter(Boolean);e.sort((e,t)=>ut(e[1],t[1],`asc`));for(let[t,,n]of e)if(a&&a.has(t))a.get(t).nodes.push(R(`padding-inline`,n));else{if(a)continue;i.push(I(`@media`,`(width >= theme(--breakpoint-${t}))`,[R(`padding-inline`,n)]))}}if(a)for(let[,e]of a)i.push(e);return i}function Gr({addVariant:e,config:t}){let n=t(`darkMode`,null),[r,i=`.dark`]=Array.isArray(n)?n:[n];if(r===`variant`){let e;if(Array.isArray(i)||typeof i==`function`?e=i:typeof i==`string`&&(e=[i]),Array.isArray(e))for(let t of e)t===`.dark`?(r=!1,console.warn('When using `variant` for `darkMode`, you must provide a selector.\nExample: `darkMode: ["variant", ".your-selector &"]`')):t.includes(`&`)||(r=!1,console.warn('When using `variant` for `darkMode`, your selector must contain `&`.\nExample `darkMode: ["variant", ".your-selector &"]`'));i=e}r===null||(r===`selector`?e(`dark`,`&:where(${i}, ${i} *)`):r===`media`?e(`dark`,`@media (prefers-color-scheme: dark)`):r===`variant`?e(`dark`,i):r===`class`&&e(`dark`,`&:is(${i} *)`))}function Kr(e){for(let[t,n]of[[`t`,`top`],[`tr`,`top right`],[`r`,`right`],[`br`,`bottom right`],[`b`,`bottom`],[`bl`,`bottom left`],[`l`,`left`],[`tl`,`top left`]])e.utilities.suggest(`bg-gradient-to-${t}`,()=>[]),e.utilities.static(`bg-gradient-to-${t}`,()=>[R(`--tw-gradient-position`,`to ${n} in oklab`),R(`background-image`,`linear-gradient(var(--tw-gradient-stops))`)]);e.utilities.suggest(`bg-left-top`,()=>[]),e.utilities.static(`bg-left-top`,()=>[R(`background-position`,`left top`)]),e.utilities.suggest(`bg-right-top`,()=>[]),e.utilities.static(`bg-right-top`,()=>[R(`background-position`,`right top`)]),e.utilities.suggest(`bg-left-bottom`,()=>[]),e.utilities.static(`bg-left-bottom`,()=>[R(`background-position`,`left bottom`)]),e.utilities.suggest(`bg-right-bottom`,()=>[]),e.utilities.static(`bg-right-bottom`,()=>[R(`background-position`,`right bottom`)]),e.utilities.suggest(`object-left-top`,()=>[]),e.utilities.static(`object-left-top`,()=>[R(`object-position`,`left top`)]),e.utilities.suggest(`object-right-top`,()=>[]),e.utilities.static(`object-right-top`,()=>[R(`object-position`,`right top`)]),e.utilities.suggest(`object-left-bottom`,()=>[]),e.utilities.static(`object-left-bottom`,()=>[R(`object-position`,`left bottom`)]),e.utilities.suggest(`object-right-bottom`,()=>[]),e.utilities.static(`object-right-bottom`,()=>[R(`object-position`,`right bottom`)]),e.utilities.suggest(`max-w-screen`,()=>[]),e.utilities.functional(`max-w-screen`,t=>{if(!t.value||t.value.kind===`arbitrary`)return;let n=e.theme.resolve(t.value.value,[`--breakpoint`]);if(n)return[R(`max-width`,n)]}),e.utilities.suggest(`overflow-ellipsis`,()=>[]),e.utilities.static(`overflow-ellipsis`,()=>[R(`text-overflow`,`ellipsis`)]),e.utilities.suggest(`decoration-slice`,()=>[]),e.utilities.static(`decoration-slice`,()=>[R(`-webkit-box-decoration-break`,`slice`),R(`box-decoration-break`,`slice`)]),e.utilities.suggest(`decoration-clone`,()=>[]),e.utilities.static(`decoration-clone`,()=>[R(`-webkit-box-decoration-break`,`clone`),R(`box-decoration-break`,`clone`)]),e.utilities.suggest(`flex-shrink`,()=>[]),e.utilities.functional(`flex-shrink`,e=>{if(!e.modifier){if(!e.value)return[R(`flex-shrink`,`1`)];if(e.value.kind===`arbitrary`||H(e.value.value))return[R(`flex-shrink`,e.value.value)]}}),e.utilities.suggest(`flex-grow`,()=>[]),e.utilities.functional(`flex-grow`,e=>{if(!e.modifier){if(!e.value)return[R(`flex-grow`,`1`)];if(e.value.kind===`arbitrary`||H(e.value.value))return[R(`flex-grow`,e.value.value)]}}),e.utilities.suggest(`order-none`,()=>[]),e.utilities.static(`order-none`,()=>[R(`order`,`0`)]),e.utilities.suggest(`break-words`,()=>[]),e.utilities.static(`break-words`,()=>[R(`overflow-wrap`,`break-word`)]);for(let[t,n]of[[`start`,`inset-inline-start`],[`end`,`inset-inline-end`]]){let r=function({negative:t}){return r=>{if(r.value===null)return;if(r.value.kind===`arbitrary`){if(r.modifier)return;let e=r.value.value;return[R(n,t?`calc(${e} * -1)`:e)]}let i=e.theme.resolve(r.value.fraction??r.value.value,[`--inset`,`--spacing`]);if(i===null&&r.value.fraction){let[e,t]=A(r.value.fraction,`/`);if(!H(e)||!H(t))return;i=`calc(${r.value.fraction} * 100%)`}if(i===null&&t){let t=e.theme.resolve(null,[`--spacing`]);if(t&&Gt(r.value.value)&&(i=`calc(${t} * -${r.value.value})`,i!==null))return[R(n,i)]}if(i===null){let t=e.theme.resolve(null,[`--spacing`]);t&&Gt(r.value.value)&&(i=`calc(${t} * ${r.value.value})`)}if(i!==null)return[R(n,t?`calc(${i} * -1)`:i)]}};e.utilities.static(`${t}-auto`,()=>[R(n,`auto`)]),e.utilities.static(`${t}-full`,()=>[R(n,`100%`)]),e.utilities.static(`-${t}-full`,()=>[R(n,`-100%`)]),e.utilities.static(`${t}-px`,()=>[R(n,`1px`)]),e.utilities.static(`-${t}-px`,()=>[R(n,`-1px`)]),e.utilities.functional(`-${t}`,r({negative:!0})),e.utilities.functional(t,r({negative:!1}))}}function Q(e,t){let n=e.theme.screens||{},r=t.variants.get(`min`)?.order??0,i=[];for(let[e,a]of Object.entries(n)){let n=function(n){t.variants.static(e,e=>{e.nodes=[I(`@media`,l,e.nodes)]},{order:n})},o=t.variants.get(e),s=t.theme.resolveValue(e,[`--breakpoint`]);if(o&&s&&!t.theme.hasDefault(`--breakpoint-${e}`))continue;let c=!0;typeof a==`string`&&(c=!1);let l=qr(a);c?i.push(n):n(r)}if(i.length!==0){for(let[,e]of t.variants.variants)e.order>r&&(e.order+=i.length);t.variants.compareFns=new Map(Array.from(t.variants.compareFns).map(([e,t])=>(e>r&&(e+=i.length),[e,t])));for(let[e,t]of i.entries())t(r+e+1)}}function qr(e){return(Array.isArray(e)?e:[e]).map(e=>typeof e==`string`?{min:e}:e&&typeof e==`object`?e:null).map(e=>{if(e===null)return null;if(`raw`in e)return e.raw;let t=``;return e.max!==void 0&&(t+=`${e.max} >= `),t+=`width`,e.min!==void 0&&(t+=` >= ${e.min}`),`(${t})`}).filter(Boolean).join(`, `)}function Jr(e,t){let n=e.theme.aria||{},r=e.theme.supports||{},i=e.theme.data||{};if(Object.keys(n).length>0){let e=t.variants.get(`aria`),r=e?.applyFn,i=e?.compounds;t.variants.functional(`aria`,(e,t)=>{let i=t.value;return i&&i.kind===`named`&&i.value in n?r?.(e,{...t,value:{kind:`arbitrary`,value:n[i.value]}}):r?.(e,t)},{compounds:i})}if(Object.keys(r).length>0){let e=t.variants.get(`supports`),n=e?.applyFn,i=e?.compounds;t.variants.functional(`supports`,(e,t)=>{let i=t.value;return i&&i.kind===`named`&&i.value in r?n?.(e,{...t,value:{kind:`arbitrary`,value:r[i.value]}}):n?.(e,t)},{compounds:i})}if(Object.keys(i).length>0){let e=t.variants.get(`data`),n=e?.applyFn,r=e?.compounds;t.variants.functional(`data`,(e,t)=>{let r=t.value;return r&&r.kind===`named`&&r.value in i?n?.(e,{...t,value:{kind:`arbitrary`,value:i[r.value]}}):n?.(e,t)},{compounds:r})}}var Yr=/^[a-z]+$/;async function Xr({designSystem:e,base:t,ast:n,loadModule:r,sources:i}){let a=0,o=[],s=[];P(n,(e,t)=>{if(e.kind!==`at-rule`)return;let n=Ee(t);if(e.name===`@plugin`){if(n.parent!==null)throw Error("`@plugin` cannot be nested.");let t=e.params.slice(1,-1);if(t.length===0)throw Error("`@plugin` must have a path.");let r={};for(let t of e.nodes??[]){if(t.kind!==`declaration`)throw Error(`Unexpected \`@plugin\` option:
20
+ ${je([r])}`)}l.add(e);for(let t of a.get(e))for(let r of o.get(t))n.push(e),u(r,n),n.pop();s.add(e),l.delete(e),c.push(e)}}for(let e of i)u(e);for(let e of c)`nodes`in e&&P(e.nodes,e=>{if(e.kind!==`at-rule`||e.name!==`@apply`)return;let n=e.params.split(/(\s+)/g),r={},i=[],a=[],o=0;for(let[e,t]of n.entries())e%2==0&&(t[0]===`-`&&t[1]===`-`?a.push(t):i.push(t),r[t]=o),o+=t.length;if(a.length){if(i.length===0)return N.Skip;let e=a.join(` `);throw Error(`You cannot use \`@apply\` with both mixins and utilities. Please move \`@apply ${e}\` into a separate rule.`)}if(e.nodes.length>0&&i.length){let e=i.join(` `);throw Error(`The rule \`@apply ${e}\` must not have a body.`)}{let n=Kn(Object.keys(r),t,{respectImportant:!1,onInvalidCandidate:e=>{if(t.theme.prefix&&!e.startsWith(t.theme.prefix))throw Error(`Cannot apply unprefixed utility class \`${e}\`. Did you mean \`${t.theme.prefix}:${e}\`?`);if(t.invalidCandidates.has(e))throw Error(`Cannot apply utility class \`${e}\` because it has been explicitly disabled: https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-excluding-classes`);let n=A(e,`:`);if(n.length>1){let r=n.pop();if(t.candidatesToCss([r])[0]){let r=t.candidatesToCss(n.map(e=>`${e}:[--tw-variant-check:1]`)),i=n.filter((e,t)=>r[t]===null);if(i.length>0){if(i.length===1)throw Error(`Cannot apply utility class \`${e}\` because the ${i.map(e=>`\`${e}\``)} variant does not exist.`);{let t=new Intl.ListFormat(`en`,{style:`long`,type:`conjunction`});throw Error(`Cannot apply utility class \`${e}\` because the ${t.format(i.map(e=>`\`${e}\``))} variants do not exist.`)}}}}throw t.theme.size===0?Error(`Cannot apply unknown utility class \`${e}\`. Are you using CSS modules or similar and missing \`@reference\`? https://tailwindcss.com/docs/functions-and-directives#reference-directive`):Error(`Cannot apply unknown utility class \`${e}\``)}}),i=e.src,a=n.astNodes.map(e=>{let t=n.nodeSorting.get(e)?.candidate,a=t?r[t]:void 0;if(e=Te(e),!i||!t||a===void 0)return P([e],e=>{e.src=i}),e;let o=[i[0],i[1],i[2]];return o[1]+=7+a,o[2]=o[1]+t.length,P([e],e=>{e.src=o}),e}),o=[];for(let e of a)if(e.kind===`rule`)for(let t of e.nodes)o.push(t);else o.push(e);return N.Replace(o)}});return n}function*er(e,t){for(let n of e.params.split(/\s+/g))for(let e of t.parseCandidate(n))switch(e.kind){case`arbitrary`:break;case`static`:case`functional`:yield e.root}}async function tr(e,t,n,r=0,i=!1){let a=0,o=[];return P(e,e=>{if(e.kind===`at-rule`&&(e.name===`@import`||e.name===`@reference`)){let s=nr(M(e.params));if(s===null)return;e.name===`@reference`&&(s.media=`reference`),a|=2;let{uri:c,layer:l,media:u,supports:d}=s;if(c.startsWith(`data:`)||c.startsWith(`http://`)||c.startsWith(`https://`))return;let f=we({},[]);return o.push((async()=>{if(r>100)throw Error(`Exceeded maximum recursion depth while resolving \`${c}\` in \`${t}\`)`);let a=await n(c,t),o=y(a.content,{from:i?a.path:void 0});await tr(o,a.base,n,r+1,i),f.nodes=rr(e,[we({base:a.base},o)],l,u,d)})()),N.ReplaceSkip(f)}}),o.length>0&&await Promise.all(o),a}function nr(e){let t,n=null,r=null,i=null;for(let a=0;a<e.length;a++){let o=e[a];if(o.kind!==`separator`){if(o.kind===`word`&&!t){if(!o.value||o.value[0]!==`"`&&o.value[0]!==`'`)return null;t=o.value.slice(1,-1);continue}if(o.kind===`function`&&o.value.toLowerCase()===`url`||!t)return null;if((o.kind===`word`||o.kind===`function`)&&o.value.toLowerCase()===`layer`){if(n)return null;if(i)throw Error("`layer(…)` in an `@import` should come before any other functions or conditions");n=`nodes`in o?j(o.nodes):``;continue}if(o.kind===`function`&&o.value.toLowerCase()===`supports`){if(i)return null;i=j(o.nodes);continue}r=j(e.slice(a));break}}return t?{uri:t,layer:n,media:r,supports:i}:null}function rr(e,t,n,r,i){let a=t;if(n!==null){let t=I(`@layer`,n,a);t.src=e.src,a=[t]}if(r!==null){let t=I(`@media`,r,a);t.src=e.src,a=[t]}if(i!==null){let t=I(`@supports`,i[0]===`(`?i:`(${i})`,a);t.src=e.src,a=[t]}return a}function ir(e,t=null){return Array.isArray(e)&&e.length===2&&typeof e[1]==`object`&&typeof e[1]!==null?t?e[1][t]??null:e[0]:Array.isArray(e)&&t===null?e.join(`, `):typeof e==`string`&&t===null?e:null}function ar(e,{theme:t},n){for(let t of n){let n=ur([t]);n&&e.theme.clearNamespace(`--${n}`,4)}for(let[n,r]of or(t)){if(typeof r!=`string`&&typeof r!=`number`)continue;if(typeof r==`string`&&(r=r.replace(/<alpha-value>/g,`1`)),n[0]===`opacity`&&(typeof r==`number`||typeof r==`string`)){let e=typeof r==`string`?parseFloat(r):r;e>=0&&e<=1&&(r=e*100+`%`)}let t=ur(n);t&&e.theme.add(`--${t}`,``+r,7)}if(Object.hasOwn(t,`fontFamily`)){{let n=ir(t.fontFamily.sans);n&&e.theme.hasDefault(`--font-sans`)&&(e.theme.add(`--default-font-family`,n,5),e.theme.add(`--default-font-feature-settings`,ir(t.fontFamily.sans,`fontFeatureSettings`)??`normal`,5),e.theme.add(`--default-font-variation-settings`,ir(t.fontFamily.sans,`fontVariationSettings`)??`normal`,5))}{let n=ir(t.fontFamily.mono);n&&e.theme.hasDefault(`--font-mono`)&&(e.theme.add(`--default-mono-font-family`,n,5),e.theme.add(`--default-mono-font-feature-settings`,ir(t.fontFamily.mono,`fontFeatureSettings`)??`normal`,5),e.theme.add(`--default-mono-font-variation-settings`,ir(t.fontFamily.mono,`fontVariationSettings`)??`normal`,5))}}return t}function or(e){let t=[];return pr(e,[],(e,n)=>{if(dr(e))return t.push([n,e]),1;if(fr(e)){t.push([n,e[0]]);for(let r of Reflect.ownKeys(e[1]))t.push([[...n,`-${r}`],e[1][r]]);return 1}if(Array.isArray(e)&&e.every(e=>typeof e==`string`))return n[0]===`fontSize`?(t.push([n,e[0]]),e.length>=2&&t.push([[...n,`-line-height`],e[1]])):t.push([n,e.join(`, `)]),1}),t}var sr={borderWidth:`border-width`,outlineWidth:`outline-width`,ringColor:`ring-color`,ringWidth:`ring-width`,transitionDuration:`transition-duration`,transitionTimingFunction:`transition-timing-function`},cr={animation:`animate`,aspectRatio:`aspect`,borderRadius:`radius`,boxShadow:`shadow`,colors:`color`,containers:`container`,fontFamily:`font`,fontSize:`text`,letterSpacing:`tracking`,lineHeight:`leading`,maxWidth:`container`,screens:`breakpoint`,transitionTimingFunction:`ease`},lr=/^[a-zA-Z0-9-_%/.]+$/;function ur(e){let t=sr[e[0]];if(t&&e[1]===`DEFAULT`)return`default-${t}`;if(e[0]===`container`)return null;for(let t of e)if(!lr.test(t))return null;let n=cr[e[0]];return n&&(e=e.slice(),e[0]=n),e.map((e,t,n)=>e===`1`&&t!==n.length-1?``:e).map((e,t)=>(e=e.replaceAll(`.`,`_`),(t===0||e.startsWith(`-`)||e===`lineHeight`)&&(e=e.replace(/([a-z])([A-Z])/g,(e,t,n)=>`${t}-${n.toLowerCase()}`)),e)).filter((t,n)=>t!==`DEFAULT`||n!==e.length-1).join(`-`)}function dr(e){return typeof e==`number`||typeof e==`string`}function fr(e){if(!Array.isArray(e)||e.length!==2||typeof e[0]!=`string`&&typeof e[0]!=`number`||e[1]===void 0||e[1]===null||typeof e[1]!=`object`)return!1;for(let t of Reflect.ownKeys(e[1]))if(typeof t!=`string`||typeof e[1][t]!=`string`&&typeof e[1][t]!=`number`)return!1;return!0}function pr(e,t=[],n){for(let r of Reflect.ownKeys(e)){let i=e[r];if(i==null)continue;let a=[...t,r],o=n(i,a)??0;if(o!==1&&(o===2||(Array.isArray(i)||typeof i==`object`)&&pr(i,a,n)===2))return 2}}function mr(e){let t=[];for(let n of A(e,`.`)){if(!n.includes(`[`)){t.push(n);continue}let e=0;for(;;){let r=n.indexOf(`[`,e),i=n.indexOf(`]`,r);if(r===-1||i===-1)break;r>e&&t.push(n.slice(e,r)),t.push(n.slice(r+1,i)),e=i+1}e<=n.length-1&&t.push(n.slice(e))}return t}function hr(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function gr(e,t,n,r=[]){for(let i of t)if(i!=null)for(let t of Reflect.ownKeys(i)){r.push(t);let a=n(e[t],i[t],r);e[t]=a===void 0?!hr(e[t])||!hr(i[t])?i[t]:gr({},[e[t],i[t]],n,r):a,r.pop()}return e}function _r(e,t,n){return function(r,i){let a=r.lastIndexOf(`/`),o=null;a!==-1&&(o=r.slice(a+1).trim(),r=r.slice(0,a).trim());let s=(()=>{let i=mr(r),[a,o]=vr(e.theme,i),s=n(yr(t()??{},i)??null);if(typeof s==`string`&&(s=s.replace(`<alpha-value>`,`1`)),typeof a!=`object`)return typeof o!=`object`&&o&4?s??a:a;if(typeof s==`object`&&s&&!Array.isArray(s)){let e=gr({},[s],(e,t)=>t);if(a===null&&Object.hasOwn(s,`__CSS_VALUES__`)){let t={};for(let n in s.__CSS_VALUES__)t[n]=s[n],delete e[n];a=t}for(let t in a)t!==`__CSS_VALUES__`&&(s?.__CSS_VALUES__?.[t]&4&&yr(e,t.split(`-`))!==void 0||(e[w(t)]=a[t]));return e}if(Array.isArray(a)&&Array.isArray(o)&&Array.isArray(s)){let e=a[0],t=a[1];o[0]&4&&(e=s[0]??e);for(let e of Object.keys(t))o[1][e]&4&&(t[e]=s[1][e]??t[e]);return[e,t]}return typeof a==`object`&&a&&!Array.isArray(a)&&`DEFAULT`in a?a.DEFAULT:a??s})();return o&&typeof s==`string`&&(s=W(s,o)),s??i}}function vr(e,t){if(t.length===1&&t[0].startsWith(`--`))return[e.get([t[0]]),e.getOptions(t[0])];let n=ur(t),r=new Map,i=new O(()=>new Map),a=e.namespace(`--${n}`);if(a.size===0)return[null,0];let o=new Map;for(let[t,s]of a){if(!t||!t.includes(`--`)){r.set(t,s),o.set(t,e.getOptions(t?`--${n}-${t}`:`--${n}`));continue}let a=t.indexOf(`--`),c=t.slice(0,a),l=t.slice(a+2);l=l.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()),i.get(c===``?null:c).set(l,[s,e.getOptions(`--${n}${t}`)])}let s=e.getOptions(`--${n}`);for(let[e,t]of i){let n=r.get(e);if(typeof n!=`string`)continue;let i={},a={};for(let[e,[n,r]]of t)i[e]=n,a[e]=r;r.set(e,[n,i]),o.set(e,[s,a])}let c={},l={};for(let[e,t]of r)br(c,[e??`DEFAULT`],t);for(let[e,t]of o)br(l,[e??`DEFAULT`],t);return t[t.length-1]===`DEFAULT`?[c?.DEFAULT??null,l.DEFAULT??0]:`DEFAULT`in c&&Object.keys(c).length===1?[c.DEFAULT,l.DEFAULT??0]:(c.__CSS_VALUES__=l,[c,l])}function yr(e,t){for(let n=0;n<t.length;++n){let r=t[n];if(typeof e!=`object`||!e||!Object.hasOwn(e,r)){if(t[n+1]===void 0)return;t[n+1]=`${r}-${t[n+1]}`;continue}e=e[r]}return e}function br(e,t,n){for(let n of t.slice(0,-1))e[n]===void 0&&(e[n]={}),e=e[n];e[t[t.length-1]]=n}var xr=/^[a-z@][a-zA-Z0-9/%._-]*$/;function Sr({designSystem:e,ast:t,resolvedConfig:n,featuresRef:r,referenceMode:i,src:a}){let o={addBase(n){if(i)return;let o=Cr(n);r.current|=On(o,e);let s=I(`@layer`,`base`,o);P([s],e=>{e.src=a}),t.push(s)},addVariant(t,n){if(!In.test(t))throw Error(`\`addVariant('${t}')\` defines an invalid variant name. Variants should only contain alphanumeric, dashes, or underscore characters and start with a lowercase letter or number.`);if(typeof n==`string`){if(n.includes(`:merge(`))return}else if(Array.isArray(n)){if(n.some(e=>e.includes(`:merge(`)))return}else if(typeof n==`object`){let e=function(t,n){return Object.entries(t).some(([t,r])=>t.includes(n)||typeof r==`object`&&e(r,n))};if(e(n,`:merge(`))return}typeof n==`string`||Array.isArray(n)?e.variants.static(t,e=>{e.nodes=wr(n,e.nodes)},{compounds:Rn(typeof n==`string`?[n]:n)}):typeof n==`object`&&e.variants.fromAst(t,Cr(n),e)},matchVariant(t,n,r){function i(e,t,r){return wr(n(e,{modifier:t?.value??null}),r)}try{let e=n(`a`,{modifier:null});if(typeof e==`string`&&e.includes(`:merge(`)||Array.isArray(e)&&e.some(e=>e.includes(`:merge(`)))return}catch{}let a=Object.keys(r?.values??{});e.variants.group(()=>{e.variants.functional(t,(e,t)=>{if(!t.value){if(r?.values&&`DEFAULT`in r.values){e.nodes=i(r.values.DEFAULT,t.modifier,e.nodes);return}return null}if(t.value.kind===`arbitrary`)e.nodes=i(t.value.value,t.modifier,e.nodes);else if(t.value.kind===`named`&&r?.values){if(!Object.hasOwn(r.values,t.value.value))return null;let n=r.values[t.value.value];if(typeof n!=`string`)return null;e.nodes=i(n,t.modifier,e.nodes)}else return null})},(e,t)=>{if(e.kind!==`functional`||t.kind!==`functional`)return 0;let n=e.value?e.value.value:`DEFAULT`,i=t.value?t.value.value:`DEFAULT`,o=(r?.values&&Object.hasOwn(r.values,n)?r.values[n]:void 0)??n,s=(r?.values&&Object.hasOwn(r.values,i)?r.values[i]:void 0)??i;if(r&&typeof r.sort==`function`)return r.sort({value:o,modifier:e.modifier?.value??null},{value:s,modifier:t.modifier?.value??null});let c=a.indexOf(n),l=a.indexOf(i);return c=c===-1?a.length:c,l=l===-1?a.length:l,c===l?o<s?-1:1:c-l}),e.variants.suggest(t,()=>Object.keys(r?.values??{}).filter(e=>e!==`DEFAULT`))},addUtilities(n){n=Array.isArray(n)?n:[n];let o=n.flatMap(e=>Object.entries(e));o=o.flatMap(([e,t])=>A(e,`,`).map(e=>[e.trim(),t]));let s=new O(()=>[]);for(let[e,n]of o){if(e.startsWith(`@keyframes `)){if(!i){let r=L(e,Cr(n));P([r],e=>{e.src=a}),t.push(r)}continue}let r=g(e),o=!1;if(P(r,e=>{if(e.kind===`selector`&&e.value[0]===`.`&&xr.test(e.value.slice(1))){let t=e.value;e.value=`&`;let i=l(r),a=t.slice(1),c=i===`&`?Cr(n):[L(i,Cr(n))];s.get(a).push(...c),o=!0,e.value=t;return}if(e.kind===`function`&&(e.value===`:not`||e.value===`:nth-child`||e.value===`:nth-last-child`))return N.Skip}),!o)throw Error(`\`addUtilities({ '${e}' : \u2026 })\` defines an invalid utility selector. Utilities must be a single class name and start with a lowercase letter, eg. \`.scrollbar-none\`.`)}for(let[t,n]of s)e.theme.prefix&&P(n,t=>{if(t.kind===`rule`){let n=g(t.selector);P(n,t=>{t.kind===`selector`&&t.value[0]===`.`&&(t.value=`.${e.theme.prefix}\\:${t.value.slice(1)}`)}),t.selector=l(n)}}),e.utilities.static(t,i=>{let a=n.map(Te);return Tr(a,t,i.raw),r.current|=$n(a,e),a})},matchUtilities(t,n){let i=n?.type?Array.isArray(n?.type)?n.type:[n.type]:[`any`];for(let[a,o]of Object.entries(t)){let t=function({negative:t}){return s=>{if(s.value?.kind===`arbitrary`&&i.length>0&&!i.includes(`any`)&&(s.value.dataType&&!i.includes(s.value.dataType)||!s.value.dataType&&!V(s.value.value,i)))return;let c=i.includes(`color`),l=null,u=!1;{let e=n?.values??{};c&&(e=Object.assign({inherit:`inherit`,transparent:`transparent`,current:`currentcolor`},e)),s.value?s.value.kind===`arbitrary`?l=s.value.value:s.value.fraction&&Object.hasOwn(e,s.value.fraction)?(l=e[s.value.fraction],u=!0):Object.hasOwn(e,s.value.value)?l=e[s.value.value]:e.__BARE_VALUE__&&(l=e.__BARE_VALUE__(s.value)??null,u=(s.value.fraction!==null&&l?.includes(`/`))??!1):l=e.DEFAULT??null}if(l===null)return;let d;{let e=n?.modifiers??null;d=s.modifier?e===`any`||s.modifier.kind===`arbitrary`?s.modifier.value:e&&Object.hasOwn(e,s.modifier.value)?e[s.modifier.value]:c&&!Number.isNaN(Number(s.modifier.value))?`${s.modifier.value}%`:null:null}if(s.modifier&&d===null&&!u)return s.value?.kind===`arbitrary`?null:void 0;c&&d!==null&&(l=W(l,d)),t&&(l=`calc(${l} * -1)`);let f=Cr(o(l,{modifier:d}));return Tr(f,a,s.raw),r.current|=$n(f,e),f}};if(!xr.test(a))throw Error(`\`matchUtilities({ '${a}' : \u2026 })\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter, eg. \`scrollbar\`.`);n?.supportsNegativeValues&&e.utilities.functional(`-${a}`,t({negative:!0}),{types:i}),e.utilities.functional(a,t({negative:!1}),{types:i}),e.utilities.suggest(a,()=>{let e=n?.values??{},t=new Set(Object.keys(e));t.delete(`__BARE_VALUE__`),t.delete(`__CSS_VALUES__`),t.has(`DEFAULT`)&&(t.delete(`DEFAULT`),t.add(null));let r=n?.modifiers??{},i=r===`any`?[]:Object.keys(r);return[{supportsNegative:n?.supportsNegativeValues??!1,values:Array.from(t),modifiers:i}]})}},addComponents(e,t){this.addUtilities(e,t)},matchComponents(e,t){this.matchUtilities(e,t)},theme:_r(e,()=>n.theme??{},e=>e),prefix(e){return e},config(e,t){let r=n;if(!e)return r;let i=mr(e);for(let e=0;e<i.length;++e){let n=i[e];if(r[n]===void 0)return t;r=r[n]}return r??t}};return o.addComponents=o.addComponents.bind(o),o.matchComponents=o.matchComponents.bind(o),o}function Cr(e){let t=[];e=Array.isArray(e)?e:[e];let n=e.flatMap(e=>Object.entries(e));for(let[e,r]of n)if(r!=null&&r!==!1){if(typeof r!=`object`){if(!e.startsWith(`--`)){if(r===`@slot`){t.push(L(e,[I(`@slot`)]));continue}e=e.replace(/([A-Z])/g,`-$1`).toLowerCase()}t.push(R(e,String(r)))}else if(Array.isArray(r))for(let n of r)typeof n==`string`?t.push(R(e,n)):t.push(L(e,Cr(n)));else t.push(L(e,Cr(r)))}return t}function wr(e,t){return(typeof e==`string`?[e]:e).flatMap(e=>{if(e.trim().endsWith(`}`)){let n=y(e.replace(`}`,`{@slot}}`));return Vn(n,t),n}return L(e,t)})}function Tr(e,t,n){P(e,e=>{if(e.kind===`rule`){let r=g(e.selector);P(r,e=>{e.kind===`selector`&&e.value===`.${t}`&&(e.value=`.${C(n)}`)}),e.selector=l(r)}})}function Er(e,t){for(let n of Dr(t))e.theme.addKeyframes(n)}function Dr(e){let t=[];if(`keyframes`in e.theme)for(let[n,r]of Object.entries(e.theme.keyframes))t.push(I(`@keyframes`,n,Cr(r)));return t}var Or={inherit:`inherit`,current:`currentcolor`,transparent:`transparent`,black:`#000`,white:`#fff`,slate:{50:`oklch(98.4% 0.003 247.858)`,100:`oklch(96.8% 0.007 247.896)`,200:`oklch(92.9% 0.013 255.508)`,300:`oklch(86.9% 0.022 252.894)`,400:`oklch(70.4% 0.04 256.788)`,500:`oklch(55.4% 0.046 257.417)`,600:`oklch(44.6% 0.043 257.281)`,700:`oklch(37.2% 0.044 257.287)`,800:`oklch(27.9% 0.041 260.031)`,900:`oklch(20.8% 0.042 265.755)`,950:`oklch(12.9% 0.042 264.695)`},gray:{50:`oklch(98.5% 0.002 247.839)`,100:`oklch(96.7% 0.003 264.542)`,200:`oklch(92.8% 0.006 264.531)`,300:`oklch(87.2% 0.01 258.338)`,400:`oklch(70.7% 0.022 261.325)`,500:`oklch(55.1% 0.027 264.364)`,600:`oklch(44.6% 0.03 256.802)`,700:`oklch(37.3% 0.034 259.733)`,800:`oklch(27.8% 0.033 256.848)`,900:`oklch(21% 0.034 264.665)`,950:`oklch(13% 0.028 261.692)`},zinc:{50:`oklch(98.5% 0 none)`,100:`oklch(96.7% 0.001 286.375)`,200:`oklch(92% 0.004 286.32)`,300:`oklch(87.1% 0.006 286.286)`,400:`oklch(70.5% 0.015 286.067)`,500:`oklch(55.2% 0.016 285.938)`,600:`oklch(44.2% 0.017 285.786)`,700:`oklch(37% 0.013 285.805)`,800:`oklch(27.4% 0.006 286.033)`,900:`oklch(21% 0.006 285.885)`,950:`oklch(14.1% 0.005 285.823)`},neutral:{50:`oklch(98.5% 0 none)`,100:`oklch(97% 0 none)`,200:`oklch(92.2% 0 none)`,300:`oklch(87% 0 none)`,400:`oklch(70.8% 0 none)`,500:`oklch(55.6% 0 none)`,600:`oklch(43.9% 0 none)`,700:`oklch(37.1% 0 none)`,800:`oklch(26.9% 0 none)`,900:`oklch(20.5% 0 none)`,950:`oklch(14.5% 0 none)`},stone:{50:`oklch(98.5% 0.001 106.423)`,100:`oklch(97% 0.001 106.424)`,200:`oklch(92.3% 0.003 48.717)`,300:`oklch(86.9% 0.005 56.366)`,400:`oklch(70.9% 0.01 56.259)`,500:`oklch(55.3% 0.013 58.071)`,600:`oklch(44.4% 0.011 73.639)`,700:`oklch(37.4% 0.01 67.558)`,800:`oklch(26.8% 0.007 34.298)`,900:`oklch(21.6% 0.006 56.043)`,950:`oklch(14.7% 0.004 49.25)`},mauve:{50:`oklch(98.5% 0 none)`,100:`oklch(96% 0.003 325.6)`,200:`oklch(92.2% 0.005 325.62)`,300:`oklch(86.5% 0.012 325.68)`,400:`oklch(71.1% 0.019 323.02)`,500:`oklch(54.2% 0.034 322.5)`,600:`oklch(43.5% 0.029 321.78)`,700:`oklch(36.4% 0.029 323.89)`,800:`oklch(26.3% 0.024 320.12)`,900:`oklch(21.2% 0.019 322.12)`,950:`oklch(14.5% 0.008 326)`},olive:{50:`oklch(98.8% 0.003 106.5)`,100:`oklch(96.6% 0.005 106.5)`,200:`oklch(93% 0.007 106.5)`,300:`oklch(88% 0.011 106.6)`,400:`oklch(73.7% 0.021 106.9)`,500:`oklch(58% 0.031 107.3)`,600:`oklch(46.6% 0.025 107.3)`,700:`oklch(39.4% 0.023 107.4)`,800:`oklch(28.6% 0.016 107.4)`,900:`oklch(22.8% 0.013 107.4)`,950:`oklch(15.3% 0.006 107.1)`},mist:{50:`oklch(98.7% 0.002 197.1)`,100:`oklch(96.3% 0.002 197.1)`,200:`oklch(92.5% 0.005 214.3)`,300:`oklch(87.2% 0.007 219.6)`,400:`oklch(72.3% 0.014 214.4)`,500:`oklch(56% 0.021 213.5)`,600:`oklch(45% 0.017 213.2)`,700:`oklch(37.8% 0.015 216)`,800:`oklch(27.5% 0.011 216.9)`,900:`oklch(21.8% 0.008 223.9)`,950:`oklch(14.8% 0.004 228.8)`},taupe:{50:`oklch(98.6% 0.002 67.8)`,100:`oklch(96% 0.002 17.2)`,200:`oklch(92.2% 0.005 34.3)`,300:`oklch(86.8% 0.007 39.5)`,400:`oklch(71.4% 0.014 41.2)`,500:`oklch(54.7% 0.021 43.1)`,600:`oklch(43.8% 0.017 39.3)`,700:`oklch(36.7% 0.016 35.7)`,800:`oklch(26.8% 0.011 36.5)`,900:`oklch(21.4% 0.009 43.1)`,950:`oklch(14.7% 0.004 49.3)`},red:{50:`oklch(97.1% 0.013 17.38)`,100:`oklch(93.6% 0.032 17.717)`,200:`oklch(88.5% 0.062 18.334)`,300:`oklch(80.8% 0.114 19.571)`,400:`oklch(70.4% 0.191 22.216)`,500:`oklch(63.7% 0.237 25.331)`,600:`oklch(57.7% 0.245 27.325)`,700:`oklch(50.5% 0.213 27.518)`,800:`oklch(44.4% 0.177 26.899)`,900:`oklch(39.6% 0.141 25.723)`,950:`oklch(25.8% 0.092 26.042)`},orange:{50:`oklch(98% 0.016 73.684)`,100:`oklch(95.4% 0.038 75.164)`,200:`oklch(90.1% 0.076 70.697)`,300:`oklch(83.7% 0.128 66.29)`,400:`oklch(75% 0.183 55.934)`,500:`oklch(70.5% 0.213 47.604)`,600:`oklch(64.6% 0.222 41.116)`,700:`oklch(55.3% 0.195 38.402)`,800:`oklch(47% 0.157 37.304)`,900:`oklch(40.8% 0.123 38.172)`,950:`oklch(26.6% 0.079 36.259)`},amber:{50:`oklch(98.7% 0.022 95.277)`,100:`oklch(96.2% 0.059 95.617)`,200:`oklch(92.4% 0.12 95.746)`,300:`oklch(87.9% 0.169 91.605)`,400:`oklch(82.8% 0.189 84.429)`,500:`oklch(76.9% 0.188 70.08)`,600:`oklch(66.6% 0.179 58.318)`,700:`oklch(55.5% 0.163 48.998)`,800:`oklch(47.3% 0.137 46.201)`,900:`oklch(41.4% 0.112 45.904)`,950:`oklch(27.9% 0.077 45.635)`},yellow:{50:`oklch(98.7% 0.026 102.212)`,100:`oklch(97.3% 0.071 103.193)`,200:`oklch(94.5% 0.129 101.54)`,300:`oklch(90.5% 0.182 98.111)`,400:`oklch(85.2% 0.199 91.936)`,500:`oklch(79.5% 0.184 86.047)`,600:`oklch(68.1% 0.162 75.834)`,700:`oklch(55.4% 0.135 66.442)`,800:`oklch(47.6% 0.114 61.907)`,900:`oklch(42.1% 0.095 57.708)`,950:`oklch(28.6% 0.066 53.813)`},lime:{50:`oklch(98.6% 0.031 120.757)`,100:`oklch(96.7% 0.067 122.328)`,200:`oklch(93.8% 0.127 124.321)`,300:`oklch(89.7% 0.196 126.665)`,400:`oklch(84.1% 0.238 128.85)`,500:`oklch(76.8% 0.233 130.85)`,600:`oklch(64.8% 0.2 131.684)`,700:`oklch(53.2% 0.157 131.589)`,800:`oklch(45.3% 0.124 130.933)`,900:`oklch(40.5% 0.101 131.063)`,950:`oklch(27.4% 0.072 132.109)`},green:{50:`oklch(98.2% 0.018 155.826)`,100:`oklch(96.2% 0.044 156.743)`,200:`oklch(92.5% 0.084 155.995)`,300:`oklch(87.1% 0.15 154.449)`,400:`oklch(79.2% 0.209 151.711)`,500:`oklch(72.3% 0.219 149.579)`,600:`oklch(62.7% 0.194 149.214)`,700:`oklch(52.7% 0.154 150.069)`,800:`oklch(44.8% 0.119 151.328)`,900:`oklch(39.3% 0.095 152.535)`,950:`oklch(26.6% 0.065 152.934)`},emerald:{50:`oklch(97.9% 0.021 166.113)`,100:`oklch(95% 0.052 163.051)`,200:`oklch(90.5% 0.093 164.15)`,300:`oklch(84.5% 0.143 164.978)`,400:`oklch(76.5% 0.177 163.223)`,500:`oklch(69.6% 0.17 162.48)`,600:`oklch(59.6% 0.145 163.225)`,700:`oklch(50.8% 0.118 165.612)`,800:`oklch(43.2% 0.095 166.913)`,900:`oklch(37.8% 0.077 168.94)`,950:`oklch(26.2% 0.051 172.552)`},teal:{50:`oklch(98.4% 0.014 180.72)`,100:`oklch(95.3% 0.051 180.801)`,200:`oklch(91% 0.096 180.426)`,300:`oklch(85.5% 0.138 181.071)`,400:`oklch(77.7% 0.152 181.912)`,500:`oklch(70.4% 0.14 182.503)`,600:`oklch(60% 0.118 184.704)`,700:`oklch(51.1% 0.096 186.391)`,800:`oklch(43.7% 0.078 188.216)`,900:`oklch(38.6% 0.063 188.416)`,950:`oklch(27.7% 0.046 192.524)`},cyan:{50:`oklch(98.4% 0.019 200.873)`,100:`oklch(95.6% 0.045 203.388)`,200:`oklch(91.7% 0.08 205.041)`,300:`oklch(86.5% 0.127 207.078)`,400:`oklch(78.9% 0.154 211.53)`,500:`oklch(71.5% 0.143 215.221)`,600:`oklch(60.9% 0.126 221.723)`,700:`oklch(52% 0.105 223.128)`,800:`oklch(45% 0.085 224.283)`,900:`oklch(39.8% 0.07 227.392)`,950:`oklch(30.2% 0.056 229.695)`},sky:{50:`oklch(97.7% 0.013 236.62)`,100:`oklch(95.1% 0.026 236.824)`,200:`oklch(90.1% 0.058 230.902)`,300:`oklch(82.8% 0.111 230.318)`,400:`oklch(74.6% 0.16 232.661)`,500:`oklch(68.5% 0.169 237.323)`,600:`oklch(58.8% 0.158 241.966)`,700:`oklch(50% 0.134 242.749)`,800:`oklch(44.3% 0.11 240.79)`,900:`oklch(39.1% 0.09 240.876)`,950:`oklch(29.3% 0.066 243.157)`},blue:{50:`oklch(97% 0.014 254.604)`,100:`oklch(93.2% 0.032 255.585)`,200:`oklch(88.2% 0.059 254.128)`,300:`oklch(80.9% 0.105 251.813)`,400:`oklch(70.7% 0.165 254.624)`,500:`oklch(62.3% 0.214 259.815)`,600:`oklch(54.6% 0.245 262.881)`,700:`oklch(48.8% 0.243 264.376)`,800:`oklch(42.4% 0.199 265.638)`,900:`oklch(37.9% 0.146 265.522)`,950:`oklch(28.2% 0.091 267.935)`},indigo:{50:`oklch(96.2% 0.018 272.314)`,100:`oklch(93% 0.034 272.788)`,200:`oklch(87% 0.065 274.039)`,300:`oklch(78.5% 0.115 274.713)`,400:`oklch(67.3% 0.182 276.935)`,500:`oklch(58.5% 0.233 277.117)`,600:`oklch(51.1% 0.262 276.966)`,700:`oklch(45.7% 0.24 277.023)`,800:`oklch(39.8% 0.195 277.366)`,900:`oklch(35.9% 0.144 278.697)`,950:`oklch(25.7% 0.09 281.288)`},violet:{50:`oklch(96.9% 0.016 293.756)`,100:`oklch(94.3% 0.029 294.588)`,200:`oklch(89.4% 0.057 293.283)`,300:`oklch(81.1% 0.111 293.571)`,400:`oklch(70.2% 0.183 293.541)`,500:`oklch(60.6% 0.25 292.717)`,600:`oklch(54.1% 0.281 293.009)`,700:`oklch(49.1% 0.27 292.581)`,800:`oklch(43.2% 0.232 292.759)`,900:`oklch(38% 0.189 293.745)`,950:`oklch(28.3% 0.141 291.089)`},purple:{50:`oklch(97.7% 0.014 308.299)`,100:`oklch(94.6% 0.033 307.174)`,200:`oklch(90.2% 0.063 306.703)`,300:`oklch(82.7% 0.119 306.383)`,400:`oklch(71.4% 0.203 305.504)`,500:`oklch(62.7% 0.265 303.9)`,600:`oklch(55.8% 0.288 302.321)`,700:`oklch(49.6% 0.265 301.924)`,800:`oklch(43.8% 0.218 303.724)`,900:`oklch(38.1% 0.176 304.987)`,950:`oklch(29.1% 0.149 302.717)`},fuchsia:{50:`oklch(97.7% 0.017 320.058)`,100:`oklch(95.2% 0.037 318.852)`,200:`oklch(90.3% 0.076 319.62)`,300:`oklch(83.3% 0.145 321.434)`,400:`oklch(74% 0.238 322.16)`,500:`oklch(66.7% 0.295 322.15)`,600:`oklch(59.1% 0.293 322.896)`,700:`oklch(51.8% 0.253 323.949)`,800:`oklch(45.2% 0.211 324.591)`,900:`oklch(40.1% 0.17 325.612)`,950:`oklch(29.3% 0.136 325.661)`},pink:{50:`oklch(97.1% 0.014 343.198)`,100:`oklch(94.8% 0.028 342.258)`,200:`oklch(89.9% 0.061 343.231)`,300:`oklch(82.3% 0.12 346.018)`,400:`oklch(71.8% 0.202 349.761)`,500:`oklch(65.6% 0.241 354.308)`,600:`oklch(59.2% 0.249 0.584)`,700:`oklch(52.5% 0.223 3.958)`,800:`oklch(45.9% 0.187 3.815)`,900:`oklch(40.8% 0.153 2.432)`,950:`oklch(28.4% 0.109 3.907)`},rose:{50:`oklch(96.9% 0.015 12.422)`,100:`oklch(94.1% 0.03 12.58)`,200:`oklch(89.2% 0.058 10.001)`,300:`oklch(81% 0.117 11.638)`,400:`oklch(71.2% 0.194 13.428)`,500:`oklch(64.5% 0.246 16.439)`,600:`oklch(58.6% 0.253 17.585)`,700:`oklch(51.4% 0.222 16.935)`,800:`oklch(45.5% 0.188 13.697)`,900:`oklch(41% 0.159 10.272)`,950:`oklch(27.1% 0.105 12.094)`}};function kr(e){return{__BARE_VALUE__:e}}var Ar=kr(e=>{if(H(e.value))return e.value}),jr=kr(e=>{if(H(e.value))return`${e.value}%`}),Mr=kr(e=>{if(H(e.value))return`${e.value}px`}),Nr=kr(e=>{if(H(e.value))return`${e.value}ms`}),Pr=kr(e=>{if(H(e.value))return`${e.value}deg`}),Fr=kr(e=>{if(e.fraction===null)return;let[t,n]=A(e.fraction,`/`);if(H(t)&&H(n))return e.fraction}),Ir=kr(e=>{if(H(Number(e.value)))return`repeat(${e.value}, minmax(0, 1fr))`}),Lr={accentColor:({theme:e})=>e(`colors`),animation:{none:`none`,spin:`spin 1s linear infinite`,ping:`ping 1s cubic-bezier(0, 0, 0.2, 1) infinite`,pulse:`pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite`,bounce:`bounce 1s infinite`},aria:{busy:`busy="true"`,checked:`checked="true"`,disabled:`disabled="true"`,expanded:`expanded="true"`,hidden:`hidden="true"`,pressed:`pressed="true"`,readonly:`readonly="true"`,required:`required="true"`,selected:`selected="true"`},aspectRatio:{auto:`auto`,square:`1 / 1`,video:`16 / 9`,...Fr},backdropBlur:({theme:e})=>e(`blur`),backdropBrightness:({theme:e})=>({...e(`brightness`),...jr}),backdropContrast:({theme:e})=>({...e(`contrast`),...jr}),backdropGrayscale:({theme:e})=>({...e(`grayscale`),...jr}),backdropHueRotate:({theme:e})=>({...e(`hueRotate`),...Pr}),backdropInvert:({theme:e})=>({...e(`invert`),...jr}),backdropOpacity:({theme:e})=>({...e(`opacity`),...jr}),backdropSaturate:({theme:e})=>({...e(`saturate`),...jr}),backdropSepia:({theme:e})=>({...e(`sepia`),...jr}),backgroundColor:({theme:e})=>e(`colors`),backgroundImage:{none:`none`,"gradient-to-t":`linear-gradient(to top, var(--tw-gradient-stops))`,"gradient-to-tr":`linear-gradient(to top right, var(--tw-gradient-stops))`,"gradient-to-r":`linear-gradient(to right, var(--tw-gradient-stops))`,"gradient-to-br":`linear-gradient(to bottom right, var(--tw-gradient-stops))`,"gradient-to-b":`linear-gradient(to bottom, var(--tw-gradient-stops))`,"gradient-to-bl":`linear-gradient(to bottom left, var(--tw-gradient-stops))`,"gradient-to-l":`linear-gradient(to left, var(--tw-gradient-stops))`,"gradient-to-tl":`linear-gradient(to top left, var(--tw-gradient-stops))`},backgroundOpacity:({theme:e})=>e(`opacity`),backgroundPosition:{bottom:`bottom`,center:`center`,left:`left`,"left-bottom":`left bottom`,"left-top":`left top`,right:`right`,"right-bottom":`right bottom`,"right-top":`right top`,top:`top`},backgroundSize:{auto:`auto`,cover:`cover`,contain:`contain`},blur:{0:`0`,none:``,sm:`4px`,DEFAULT:`8px`,md:`12px`,lg:`16px`,xl:`24px`,"2xl":`40px`,"3xl":`64px`},borderColor:({theme:e})=>({DEFAULT:`currentcolor`,...e(`colors`)}),borderOpacity:({theme:e})=>e(`opacity`),borderRadius:{none:`0px`,sm:`0.125rem`,DEFAULT:`0.25rem`,md:`0.375rem`,lg:`0.5rem`,xl:`0.75rem`,"2xl":`1rem`,"3xl":`1.5rem`,full:`9999px`},borderSpacing:({theme:e})=>e(`spacing`),borderWidth:{DEFAULT:`1px`,0:`0px`,2:`2px`,4:`4px`,8:`8px`,...Mr},boxShadow:{sm:`0 1px 2px 0 rgb(0 0 0 / 0.05)`,DEFAULT:`0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)`,md:`0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)`,lg:`0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)`,xl:`0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)`,"2xl":`0 25px 50px -12px rgb(0 0 0 / 0.25)`,inner:`inset 0 2px 4px 0 rgb(0 0 0 / 0.05)`,none:`none`},boxShadowColor:({theme:e})=>e(`colors`),brightness:{0:`0`,50:`.5`,75:`.75`,90:`.9`,95:`.95`,100:`1`,105:`1.05`,110:`1.1`,125:`1.25`,150:`1.5`,200:`2`,...jr},caretColor:({theme:e})=>e(`colors`),colors:()=>({...Or}),columns:{auto:`auto`,1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,7:`7`,8:`8`,9:`9`,10:`10`,11:`11`,12:`12`,"3xs":`16rem`,"2xs":`18rem`,xs:`20rem`,sm:`24rem`,md:`28rem`,lg:`32rem`,xl:`36rem`,"2xl":`42rem`,"3xl":`48rem`,"4xl":`56rem`,"5xl":`64rem`,"6xl":`72rem`,"7xl":`80rem`,...Ar},container:{},content:{none:`none`},contrast:{0:`0`,50:`.5`,75:`.75`,100:`1`,125:`1.25`,150:`1.5`,200:`2`,...jr},cursor:{auto:`auto`,default:`default`,pointer:`pointer`,wait:`wait`,text:`text`,move:`move`,help:`help`,"not-allowed":`not-allowed`,none:`none`,"context-menu":`context-menu`,progress:`progress`,cell:`cell`,crosshair:`crosshair`,"vertical-text":`vertical-text`,alias:`alias`,copy:`copy`,"no-drop":`no-drop`,grab:`grab`,grabbing:`grabbing`,"all-scroll":`all-scroll`,"col-resize":`col-resize`,"row-resize":`row-resize`,"n-resize":`n-resize`,"e-resize":`e-resize`,"s-resize":`s-resize`,"w-resize":`w-resize`,"ne-resize":`ne-resize`,"nw-resize":`nw-resize`,"se-resize":`se-resize`,"sw-resize":`sw-resize`,"ew-resize":`ew-resize`,"ns-resize":`ns-resize`,"nesw-resize":`nesw-resize`,"nwse-resize":`nwse-resize`,"zoom-in":`zoom-in`,"zoom-out":`zoom-out`},divideColor:({theme:e})=>e(`borderColor`),divideOpacity:({theme:e})=>e(`borderOpacity`),divideWidth:({theme:e})=>({...e(`borderWidth`),...Mr}),dropShadow:{sm:`0 1px 1px rgb(0 0 0 / 0.05)`,DEFAULT:[`0 1px 2px rgb(0 0 0 / 0.1)`,`0 1px 1px rgb(0 0 0 / 0.06)`],md:[`0 4px 3px rgb(0 0 0 / 0.07)`,`0 2px 2px rgb(0 0 0 / 0.06)`],lg:[`0 10px 8px rgb(0 0 0 / 0.04)`,`0 4px 3px rgb(0 0 0 / 0.1)`],xl:[`0 20px 13px rgb(0 0 0 / 0.03)`,`0 8px 5px rgb(0 0 0 / 0.08)`],"2xl":`0 25px 25px rgb(0 0 0 / 0.15)`,none:`0 0 #0000`},fill:({theme:e})=>e(`colors`),flex:{1:`1 1 0%`,auto:`1 1 auto`,initial:`0 1 auto`,none:`none`},flexBasis:({theme:e})=>({auto:`auto`,"1/2":`50%`,"1/3":`33.333333%`,"2/3":`66.666667%`,"1/4":`25%`,"2/4":`50%`,"3/4":`75%`,"1/5":`20%`,"2/5":`40%`,"3/5":`60%`,"4/5":`80%`,"1/6":`16.666667%`,"2/6":`33.333333%`,"3/6":`50%`,"4/6":`66.666667%`,"5/6":`83.333333%`,"1/12":`8.333333%`,"2/12":`16.666667%`,"3/12":`25%`,"4/12":`33.333333%`,"5/12":`41.666667%`,"6/12":`50%`,"7/12":`58.333333%`,"8/12":`66.666667%`,"9/12":`75%`,"10/12":`83.333333%`,"11/12":`91.666667%`,full:`100%`,...e(`spacing`)}),flexGrow:{0:`0`,DEFAULT:`1`,...Ar},flexShrink:{0:`0`,DEFAULT:`1`,...Ar},fontFamily:{sans:[`-apple-system`,`BlinkMacSystemFont`,`"Segoe UI"`,`Roboto`,`"Helvetica Neue"`,`"Noto Sans"`,`Arial`,`sans-serif`,`"Apple Color Emoji"`,`"Segoe UI Emoji"`,`"Segoe UI Symbol"`,`"Noto Color Emoji"`],serif:[`ui-serif`,`Georgia`,`Cambria`,`"Times New Roman"`,`Times`,`serif`],mono:[`ui-monospace`,`SFMono-Regular`,`Menlo`,`Monaco`,`Consolas`,`"Liberation Mono"`,`"Courier New"`,`monospace`]},fontSize:{xs:[`0.75rem`,{lineHeight:`1rem`}],sm:[`0.875rem`,{lineHeight:`1.25rem`}],base:[`1rem`,{lineHeight:`1.5rem`}],lg:[`1.125rem`,{lineHeight:`1.75rem`}],xl:[`1.25rem`,{lineHeight:`1.75rem`}],"2xl":[`1.5rem`,{lineHeight:`2rem`}],"3xl":[`1.875rem`,{lineHeight:`2.25rem`}],"4xl":[`2.25rem`,{lineHeight:`2.5rem`}],"5xl":[`3rem`,{lineHeight:`1`}],"6xl":[`3.75rem`,{lineHeight:`1`}],"7xl":[`4.5rem`,{lineHeight:`1`}],"8xl":[`6rem`,{lineHeight:`1`}],"9xl":[`8rem`,{lineHeight:`1`}]},fontWeight:{thin:`100`,extralight:`200`,light:`300`,normal:`400`,medium:`500`,semibold:`600`,bold:`700`,extrabold:`800`,black:`900`},gap:({theme:e})=>e(`spacing`),gradientColorStops:({theme:e})=>e(`colors`),gradientColorStopPositions:{"0%":`0%`,"5%":`5%`,"10%":`10%`,"15%":`15%`,"20%":`20%`,"25%":`25%`,"30%":`30%`,"35%":`35%`,"40%":`40%`,"45%":`45%`,"50%":`50%`,"55%":`55%`,"60%":`60%`,"65%":`65%`,"70%":`70%`,"75%":`75%`,"80%":`80%`,"85%":`85%`,"90%":`90%`,"95%":`95%`,"100%":`100%`,...jr},grayscale:{0:`0`,DEFAULT:`100%`,...jr},gridAutoColumns:{auto:`auto`,min:`min-content`,max:`max-content`,fr:`minmax(0, 1fr)`},gridAutoRows:{auto:`auto`,min:`min-content`,max:`max-content`,fr:`minmax(0, 1fr)`},gridColumn:{auto:`auto`,"span-1":`span 1 / span 1`,"span-2":`span 2 / span 2`,"span-3":`span 3 / span 3`,"span-4":`span 4 / span 4`,"span-5":`span 5 / span 5`,"span-6":`span 6 / span 6`,"span-7":`span 7 / span 7`,"span-8":`span 8 / span 8`,"span-9":`span 9 / span 9`,"span-10":`span 10 / span 10`,"span-11":`span 11 / span 11`,"span-12":`span 12 / span 12`,"span-full":`1 / -1`},gridColumnEnd:{auto:`auto`,1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,7:`7`,8:`8`,9:`9`,10:`10`,11:`11`,12:`12`,13:`13`,...Ar},gridColumnStart:{auto:`auto`,1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,7:`7`,8:`8`,9:`9`,10:`10`,11:`11`,12:`12`,13:`13`,...Ar},gridRow:{auto:`auto`,"span-1":`span 1 / span 1`,"span-2":`span 2 / span 2`,"span-3":`span 3 / span 3`,"span-4":`span 4 / span 4`,"span-5":`span 5 / span 5`,"span-6":`span 6 / span 6`,"span-7":`span 7 / span 7`,"span-8":`span 8 / span 8`,"span-9":`span 9 / span 9`,"span-10":`span 10 / span 10`,"span-11":`span 11 / span 11`,"span-12":`span 12 / span 12`,"span-full":`1 / -1`},gridRowEnd:{auto:`auto`,1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,7:`7`,8:`8`,9:`9`,10:`10`,11:`11`,12:`12`,13:`13`,...Ar},gridRowStart:{auto:`auto`,1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,7:`7`,8:`8`,9:`9`,10:`10`,11:`11`,12:`12`,13:`13`,...Ar},gridTemplateColumns:{none:`none`,subgrid:`subgrid`,1:`repeat(1, minmax(0, 1fr))`,2:`repeat(2, minmax(0, 1fr))`,3:`repeat(3, minmax(0, 1fr))`,4:`repeat(4, minmax(0, 1fr))`,5:`repeat(5, minmax(0, 1fr))`,6:`repeat(6, minmax(0, 1fr))`,7:`repeat(7, minmax(0, 1fr))`,8:`repeat(8, minmax(0, 1fr))`,9:`repeat(9, minmax(0, 1fr))`,10:`repeat(10, minmax(0, 1fr))`,11:`repeat(11, minmax(0, 1fr))`,12:`repeat(12, minmax(0, 1fr))`,...Ir},gridTemplateRows:{none:`none`,subgrid:`subgrid`,1:`repeat(1, minmax(0, 1fr))`,2:`repeat(2, minmax(0, 1fr))`,3:`repeat(3, minmax(0, 1fr))`,4:`repeat(4, minmax(0, 1fr))`,5:`repeat(5, minmax(0, 1fr))`,6:`repeat(6, minmax(0, 1fr))`,7:`repeat(7, minmax(0, 1fr))`,8:`repeat(8, minmax(0, 1fr))`,9:`repeat(9, minmax(0, 1fr))`,10:`repeat(10, minmax(0, 1fr))`,11:`repeat(11, minmax(0, 1fr))`,12:`repeat(12, minmax(0, 1fr))`,...Ir},height:({theme:e})=>({auto:`auto`,"1/2":`50%`,"1/3":`33.333333%`,"2/3":`66.666667%`,"1/4":`25%`,"2/4":`50%`,"3/4":`75%`,"1/5":`20%`,"2/5":`40%`,"3/5":`60%`,"4/5":`80%`,"1/6":`16.666667%`,"2/6":`33.333333%`,"3/6":`50%`,"4/6":`66.666667%`,"5/6":`83.333333%`,full:`100%`,screen:`100vh`,svh:`100svh`,lvh:`100lvh`,dvh:`100dvh`,min:`min-content`,max:`max-content`,fit:`fit-content`,...e(`spacing`)}),hueRotate:{0:`0deg`,15:`15deg`,30:`30deg`,60:`60deg`,90:`90deg`,180:`180deg`,...Pr},inset:({theme:e})=>({auto:`auto`,"1/2":`50%`,"1/3":`33.333333%`,"2/3":`66.666667%`,"1/4":`25%`,"2/4":`50%`,"3/4":`75%`,full:`100%`,...e(`spacing`)}),invert:{0:`0`,DEFAULT:`100%`,...jr},keyframes:{spin:{to:{transform:`rotate(360deg)`}},ping:{"75%, 100%":{transform:`scale(2)`,opacity:`0`}},pulse:{"50%":{opacity:`.5`}},bounce:{"0%, 100%":{transform:`translateY(-25%)`,animationTimingFunction:`cubic-bezier(0.8,0,1,1)`},"50%":{transform:`none`,animationTimingFunction:`cubic-bezier(0,0,0.2,1)`}}},letterSpacing:{tighter:`-0.05em`,tight:`-0.025em`,normal:`0em`,wide:`0.025em`,wider:`0.05em`,widest:`0.1em`},lineHeight:{none:`1`,tight:`1.25`,snug:`1.375`,normal:`1.5`,relaxed:`1.625`,loose:`2`,3:`.75rem`,4:`1rem`,5:`1.25rem`,6:`1.5rem`,7:`1.75rem`,8:`2rem`,9:`2.25rem`,10:`2.5rem`},listStyleType:{none:`none`,disc:`disc`,decimal:`decimal`},listStyleImage:{none:`none`},margin:({theme:e})=>({auto:`auto`,...e(`spacing`)}),lineClamp:{1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,...Ar},maxHeight:({theme:e})=>({none:`none`,full:`100%`,screen:`100vh`,svh:`100svh`,lvh:`100lvh`,dvh:`100dvh`,min:`min-content`,max:`max-content`,fit:`fit-content`,...e(`spacing`)}),maxWidth:({theme:e})=>({none:`none`,xs:`20rem`,sm:`24rem`,md:`28rem`,lg:`32rem`,xl:`36rem`,"2xl":`42rem`,"3xl":`48rem`,"4xl":`56rem`,"5xl":`64rem`,"6xl":`72rem`,"7xl":`80rem`,full:`100%`,min:`min-content`,max:`max-content`,fit:`fit-content`,prose:`65ch`,...e(`spacing`)}),minHeight:({theme:e})=>({full:`100%`,screen:`100vh`,svh:`100svh`,lvh:`100lvh`,dvh:`100dvh`,min:`min-content`,max:`max-content`,fit:`fit-content`,...e(`spacing`)}),minWidth:({theme:e})=>({full:`100%`,min:`min-content`,max:`max-content`,fit:`fit-content`,...e(`spacing`)}),objectPosition:{bottom:`bottom`,center:`center`,left:`left`,"left-bottom":`left bottom`,"left-top":`left top`,right:`right`,"right-bottom":`right bottom`,"right-top":`right top`,top:`top`},opacity:{0:`0`,5:`0.05`,10:`0.1`,15:`0.15`,20:`0.2`,25:`0.25`,30:`0.3`,35:`0.35`,40:`0.4`,45:`0.45`,50:`0.5`,55:`0.55`,60:`0.6`,65:`0.65`,70:`0.7`,75:`0.75`,80:`0.8`,85:`0.85`,90:`0.9`,95:`0.95`,100:`1`,...jr},order:{first:`-9999`,last:`9999`,none:`0`,1:`1`,2:`2`,3:`3`,4:`4`,5:`5`,6:`6`,7:`7`,8:`8`,9:`9`,10:`10`,11:`11`,12:`12`,...Ar},outlineColor:({theme:e})=>e(`colors`),outlineOffset:{0:`0px`,1:`1px`,2:`2px`,4:`4px`,8:`8px`,...Mr},outlineWidth:{0:`0px`,1:`1px`,2:`2px`,4:`4px`,8:`8px`,...Mr},padding:({theme:e})=>e(`spacing`),placeholderColor:({theme:e})=>e(`colors`),placeholderOpacity:({theme:e})=>e(`opacity`),ringColor:({theme:e})=>({DEFAULT:`currentcolor`,...e(`colors`)}),ringOffsetColor:({theme:e})=>e(`colors`),ringOffsetWidth:{0:`0px`,1:`1px`,2:`2px`,4:`4px`,8:`8px`,...Mr},ringOpacity:({theme:e})=>({DEFAULT:`0.5`,...e(`opacity`)}),ringWidth:{DEFAULT:`3px`,0:`0px`,1:`1px`,2:`2px`,4:`4px`,8:`8px`,...Mr},rotate:{0:`0deg`,1:`1deg`,2:`2deg`,3:`3deg`,6:`6deg`,12:`12deg`,45:`45deg`,90:`90deg`,180:`180deg`,...Pr},saturate:{0:`0`,50:`.5`,100:`1`,150:`1.5`,200:`2`,...jr},scale:{0:`0`,50:`.5`,75:`.75`,90:`.9`,95:`.95`,100:`1`,105:`1.05`,110:`1.1`,125:`1.25`,150:`1.5`,...jr},screens:{sm:`40rem`,md:`48rem`,lg:`64rem`,xl:`80rem`,"2xl":`96rem`},scrollMargin:({theme:e})=>e(`spacing`),scrollPadding:({theme:e})=>e(`spacing`),sepia:{0:`0`,DEFAULT:`100%`,...jr},skew:{0:`0deg`,1:`1deg`,2:`2deg`,3:`3deg`,6:`6deg`,12:`12deg`,...Pr},space:({theme:e})=>e(`spacing`),spacing:{px:`1px`,0:`0px`,.5:`0.125rem`,1:`0.25rem`,1.5:`0.375rem`,2:`0.5rem`,2.5:`0.625rem`,3:`0.75rem`,3.5:`0.875rem`,4:`1rem`,5:`1.25rem`,6:`1.5rem`,7:`1.75rem`,8:`2rem`,9:`2.25rem`,10:`2.5rem`,11:`2.75rem`,12:`3rem`,14:`3.5rem`,16:`4rem`,20:`5rem`,24:`6rem`,28:`7rem`,32:`8rem`,36:`9rem`,40:`10rem`,44:`11rem`,48:`12rem`,52:`13rem`,56:`14rem`,60:`15rem`,64:`16rem`,72:`18rem`,80:`20rem`,96:`24rem`},stroke:({theme:e})=>({none:`none`,...e(`colors`)}),strokeWidth:{0:`0`,1:`1`,2:`2`,...Ar},supports:{},data:{},textColor:({theme:e})=>e(`colors`),textDecorationColor:({theme:e})=>e(`colors`),textDecorationThickness:{auto:`auto`,"from-font":`from-font`,0:`0px`,1:`1px`,2:`2px`,4:`4px`,8:`8px`,...Mr},textIndent:({theme:e})=>e(`spacing`),textOpacity:({theme:e})=>e(`opacity`),textUnderlineOffset:{auto:`auto`,0:`0px`,1:`1px`,2:`2px`,4:`4px`,8:`8px`,...Mr},transformOrigin:{center:`center`,top:`top`,"top-right":`top right`,right:`right`,"bottom-right":`bottom right`,bottom:`bottom`,"bottom-left":`bottom left`,left:`left`,"top-left":`top left`},transitionDelay:{0:`0s`,75:`75ms`,100:`100ms`,150:`150ms`,200:`200ms`,300:`300ms`,500:`500ms`,700:`700ms`,1e3:`1000ms`,...Nr},transitionDuration:{DEFAULT:`150ms`,0:`0s`,75:`75ms`,100:`100ms`,150:`150ms`,200:`200ms`,300:`300ms`,500:`500ms`,700:`700ms`,1e3:`1000ms`,...Nr},transitionProperty:{none:`none`,all:`all`,DEFAULT:`color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter`,colors:`color, background-color, border-color, outline-color, text-decoration-color, fill, stroke`,opacity:`opacity`,shadow:`box-shadow`,transform:`transform`},transitionTimingFunction:{DEFAULT:`cubic-bezier(0.4, 0, 0.2, 1)`,linear:`linear`,in:`cubic-bezier(0.4, 0, 1, 1)`,out:`cubic-bezier(0, 0, 0.2, 1)`,"in-out":`cubic-bezier(0.4, 0, 0.2, 1)`},translate:({theme:e})=>({"1/2":`50%`,"1/3":`33.333333%`,"2/3":`66.666667%`,"1/4":`25%`,"2/4":`50%`,"3/4":`75%`,full:`100%`,...e(`spacing`)}),size:({theme:e})=>({auto:`auto`,"1/2":`50%`,"1/3":`33.333333%`,"2/3":`66.666667%`,"1/4":`25%`,"2/4":`50%`,"3/4":`75%`,"1/5":`20%`,"2/5":`40%`,"3/5":`60%`,"4/5":`80%`,"1/6":`16.666667%`,"2/6":`33.333333%`,"3/6":`50%`,"4/6":`66.666667%`,"5/6":`83.333333%`,"1/12":`8.333333%`,"2/12":`16.666667%`,"3/12":`25%`,"4/12":`33.333333%`,"5/12":`41.666667%`,"6/12":`50%`,"7/12":`58.333333%`,"8/12":`66.666667%`,"9/12":`75%`,"10/12":`83.333333%`,"11/12":`91.666667%`,full:`100%`,min:`min-content`,max:`max-content`,fit:`fit-content`,...e(`spacing`)}),width:({theme:e})=>({auto:`auto`,"1/2":`50%`,"1/3":`33.333333%`,"2/3":`66.666667%`,"1/4":`25%`,"2/4":`50%`,"3/4":`75%`,"1/5":`20%`,"2/5":`40%`,"3/5":`60%`,"4/5":`80%`,"1/6":`16.666667%`,"2/6":`33.333333%`,"3/6":`50%`,"4/6":`66.666667%`,"5/6":`83.333333%`,"1/12":`8.333333%`,"2/12":`16.666667%`,"3/12":`25%`,"4/12":`33.333333%`,"5/12":`41.666667%`,"6/12":`50%`,"7/12":`58.333333%`,"8/12":`66.666667%`,"9/12":`75%`,"10/12":`83.333333%`,"11/12":`91.666667%`,full:`100%`,screen:`100vw`,svw:`100svw`,lvw:`100lvw`,dvw:`100dvw`,min:`min-content`,max:`max-content`,fit:`fit-content`,...e(`spacing`)}),willChange:{auto:`auto`,scroll:`scroll-position`,contents:`contents`,transform:`transform`},zIndex:{auto:`auto`,0:`0`,10:`10`,20:`20`,30:`30`,40:`40`,50:`50`,...Ar}};function Rr(e){return{theme:{...Lr,colors:({theme:e})=>e(`color`,{}),extend:{fontSize:({theme:e})=>({...e(`text`,{})}),boxShadow:({theme:e})=>({...e(`shadow`,{})}),animation:({theme:e})=>({...e(`animate`,{})}),aspectRatio:({theme:e})=>({...e(`aspect`,{})}),borderRadius:({theme:e})=>({...e(`radius`,{})}),screens:({theme:e})=>({...e(`breakpoint`,{})}),letterSpacing:({theme:e})=>({...e(`tracking`,{})}),lineHeight:({theme:e})=>({...e(`leading`,{})}),transitionDuration:{DEFAULT:e.get([`--default-transition-duration`])??null},transitionTimingFunction:{DEFAULT:e.get([`--default-transition-timing-function`])??null},maxWidth:({theme:e})=>({...e(`container`,{})})}}}}var zr={blocklist:[],future:{},experimental:{},prefix:``,important:!1,darkMode:null,theme:{},plugins:[],content:{files:[]}};function Br(e,t){let n={design:e,configs:[],plugins:[],content:{files:[]},theme:{},extend:{},result:structuredClone(zr)};for(let e of t)Hr(n,e);for(let e of n.configs)`darkMode`in e&&e.darkMode!==void 0&&(n.result.darkMode=e.darkMode??null),`prefix`in e&&e.prefix!==void 0&&(n.result.prefix=e.prefix??``),`blocklist`in e&&e.blocklist!==void 0&&(n.result.blocklist=e.blocklist??[]),`important`in e&&e.important!==void 0&&(n.result.important=e.important??!1);let r=Ur(n);return{resolvedConfig:{...n.result,content:n.content,theme:n.theme,plugins:n.plugins},replacedThemeKeys:r}}function Vr(e,t){if(Array.isArray(e)&&hr(e[0]))return e.concat(t);if(Array.isArray(t)&&hr(t[0])&&hr(e))return[e,...t];if(Array.isArray(t))return t}function Hr(e,{config:t,base:n,path:r,reference:i,src:a}){let o=[];for(let e of t.plugins??[])`__isOptionsFunction`in e?o.push({...e(),reference:i,src:a}):`handler`in e?o.push({...e,reference:i,src:a}):o.push({handler:e,reference:i,src:a});if(Array.isArray(t.presets)&&t.presets.length===0)throw Error("Error in the config file/plugin/preset. An empty preset (`preset: []`) is not currently supported.");for(let o of t.presets??[])Hr(e,{path:r,base:n,config:o,reference:i,src:a});for(let t of o)e.plugins.push(t),t.config&&Hr(e,{path:r,base:n,config:t.config,reference:!!t.reference,src:t.src??a});let s=t.content??[],c=Array.isArray(s)?s:s.files;for(let t of c)e.content.files.push(typeof t==`object`?t:{base:n,pattern:t});e.configs.push(t)}function Ur(e){let t=new Set,n=_r(e.design,()=>e.theme,i),r=Object.assign(n,{theme:n,colors:Or});function i(e){return typeof e==`function`?e(r)??null:e??null}for(let n of e.configs){let r=n.theme??{},i=r.extend??{};for(let e in r)e!==`extend`&&t.add(e);Object.assign(e.theme,r);for(let t in i)e.extend[t]??=[],e.extend[t].push(i[t])}delete e.theme.extend;for(let t in e.extend){let n=[e.theme[t],...e.extend[t]];e.theme[t]=()=>gr({},n.map(i),Vr)}for(let t in e.theme)e.theme[t]=i(e.theme[t]);if(e.theme.screens&&typeof e.theme.screens==`object`)for(let t of Object.keys(e.theme.screens)){let n=e.theme.screens[t];n&&typeof n==`object`&&(`raw`in n||`max`in n||`min`in n&&(e.theme.screens[t]=n.min))}return t}function Wr(e,t){let n=e.theme.container||{};if(typeof n!=`object`||!n)return;let r=Gr(n,t);r.length!==0&&t.utilities.static(`container`,()=>r.map(Te))}function Gr({center:e,padding:t,screens:n},r){let i=[],a=null;if(e&&i.push(R(`margin-inline`,`auto`)),(typeof t==`string`||typeof t==`object`&&t&&`DEFAULT`in t)&&i.push(R(`padding-inline`,typeof t==`string`?t:t.DEFAULT)),typeof n==`object`&&n){a=new Map;let e=Array.from(r.theme.namespace(`--breakpoint`).entries());if(e.sort((e,t)=>ut(e[1],t[1],`asc`)),e.length>0){let[t]=e[0];i.push(I(`@media`,`(width >= --theme(--breakpoint-${t}))`,[R(`max-width`,`none`)]))}for(let[e,t]of Object.entries(n)){if(typeof t==`object`){if(`min`in t)t=t.min;else continue}a.set(e,I(`@media`,`(width >= ${t})`,[R(`max-width`,t)]))}}if(typeof t==`object`&&t){let e=Object.entries(t).filter(([e])=>e!==`DEFAULT`).map(([e,t])=>[e,r.theme.resolveValue(e,[`--breakpoint`]),t]).filter(Boolean);e.sort((e,t)=>ut(e[1],t[1],`asc`));for(let[t,,n]of e)if(a&&a.has(t))a.get(t).nodes.push(R(`padding-inline`,n));else{if(a)continue;i.push(I(`@media`,`(width >= theme(--breakpoint-${t}))`,[R(`padding-inline`,n)]))}}if(a)for(let[,e]of a)i.push(e);return i}function Kr({addVariant:e,config:t}){let n=t(`darkMode`,null),[r,i=`.dark`]=Array.isArray(n)?n:[n];if(r===`variant`){let e;if(Array.isArray(i)||typeof i==`function`?e=i:typeof i==`string`&&(e=[i]),Array.isArray(e))for(let t of e)t===`.dark`?(r=!1,console.warn('When using `variant` for `darkMode`, you must provide a selector.\nExample: `darkMode: ["variant", ".your-selector &"]`')):t.includes(`&`)||(r=!1,console.warn('When using `variant` for `darkMode`, your selector must contain `&`.\nExample `darkMode: ["variant", ".your-selector &"]`'));i=e}r===null||(r===`selector`?e(`dark`,`&:where(${i}, ${i} *)`):r===`media`?e(`dark`,`@media (prefers-color-scheme: dark)`):r===`variant`?e(`dark`,i):r===`class`&&e(`dark`,`&:is(${i} *)`))}function qr(e){for(let[t,n]of[[`t`,`top`],[`tr`,`top right`],[`r`,`right`],[`br`,`bottom right`],[`b`,`bottom`],[`bl`,`bottom left`],[`l`,`left`],[`tl`,`top left`]])e.utilities.suggest(`bg-gradient-to-${t}`,()=>[]),e.utilities.static(`bg-gradient-to-${t}`,()=>[R(`--tw-gradient-position`,`to ${n} in oklab`),R(`background-image`,`linear-gradient(var(--tw-gradient-stops))`)]);e.utilities.suggest(`bg-left-top`,()=>[]),e.utilities.static(`bg-left-top`,()=>[R(`background-position`,`left top`)]),e.utilities.suggest(`bg-right-top`,()=>[]),e.utilities.static(`bg-right-top`,()=>[R(`background-position`,`right top`)]),e.utilities.suggest(`bg-left-bottom`,()=>[]),e.utilities.static(`bg-left-bottom`,()=>[R(`background-position`,`left bottom`)]),e.utilities.suggest(`bg-right-bottom`,()=>[]),e.utilities.static(`bg-right-bottom`,()=>[R(`background-position`,`right bottom`)]),e.utilities.suggest(`object-left-top`,()=>[]),e.utilities.static(`object-left-top`,()=>[R(`object-position`,`left top`)]),e.utilities.suggest(`object-right-top`,()=>[]),e.utilities.static(`object-right-top`,()=>[R(`object-position`,`right top`)]),e.utilities.suggest(`object-left-bottom`,()=>[]),e.utilities.static(`object-left-bottom`,()=>[R(`object-position`,`left bottom`)]),e.utilities.suggest(`object-right-bottom`,()=>[]),e.utilities.static(`object-right-bottom`,()=>[R(`object-position`,`right bottom`)]),e.utilities.suggest(`max-w-screen`,()=>[]),e.utilities.functional(`max-w-screen`,t=>{if(!t.value||t.value.kind===`arbitrary`)return;let n=e.theme.resolve(t.value.value,[`--breakpoint`]);if(n)return[R(`max-width`,n)]}),e.utilities.suggest(`overflow-ellipsis`,()=>[]),e.utilities.static(`overflow-ellipsis`,()=>[R(`text-overflow`,`ellipsis`)]),e.utilities.suggest(`decoration-slice`,()=>[]),e.utilities.static(`decoration-slice`,()=>[R(`-webkit-box-decoration-break`,`slice`),R(`box-decoration-break`,`slice`)]),e.utilities.suggest(`decoration-clone`,()=>[]),e.utilities.static(`decoration-clone`,()=>[R(`-webkit-box-decoration-break`,`clone`),R(`box-decoration-break`,`clone`)]),e.utilities.suggest(`flex-shrink`,()=>[]),e.utilities.functional(`flex-shrink`,e=>{if(!e.modifier){if(!e.value)return[R(`flex-shrink`,`1`)];if(e.value.kind===`arbitrary`||H(e.value.value))return[R(`flex-shrink`,e.value.value)]}}),e.utilities.suggest(`flex-grow`,()=>[]),e.utilities.functional(`flex-grow`,e=>{if(!e.modifier){if(!e.value)return[R(`flex-grow`,`1`)];if(e.value.kind===`arbitrary`||H(e.value.value))return[R(`flex-grow`,e.value.value)]}}),e.utilities.suggest(`order-none`,()=>[]),e.utilities.static(`order-none`,()=>[R(`order`,`0`)]),e.utilities.suggest(`break-words`,()=>[]),e.utilities.static(`break-words`,()=>[R(`overflow-wrap`,`break-word`)]);for(let[t,n]of[[`start`,`inset-inline-start`],[`end`,`inset-inline-end`]]){let r=function({negative:t}){return r=>{if(r.value===null)return;if(r.value.kind===`arbitrary`){if(r.modifier)return;let e=r.value.value;return[R(n,t?`calc(${e} * -1)`:e)]}let i=e.theme.resolve(r.value.fraction??r.value.value,[`--inset`,`--spacing`]);if(i===null&&r.value.fraction){let[e,t]=A(r.value.fraction,`/`);if(!H(e)||!H(t))return;i=`calc(${r.value.fraction} * 100%)`}if(i===null&&t){let t=e.theme.resolve(null,[`--spacing`]);if(t&&Gt(r.value.value)&&(i=`calc(${t} * -${r.value.value})`,i!==null))return[R(n,i)]}if(i===null){let t=e.theme.resolve(null,[`--spacing`]);t&&Gt(r.value.value)&&(i=`calc(${t} * ${r.value.value})`)}if(i!==null)return[R(n,t?`calc(${i} * -1)`:i)]}};e.utilities.static(`${t}-auto`,()=>[R(n,`auto`)]),e.utilities.static(`${t}-full`,()=>[R(n,`100%`)]),e.utilities.static(`-${t}-full`,()=>[R(n,`-100%`)]),e.utilities.static(`${t}-px`,()=>[R(n,`1px`)]),e.utilities.static(`-${t}-px`,()=>[R(n,`-1px`)]),e.utilities.functional(`-${t}`,r({negative:!0})),e.utilities.functional(t,r({negative:!1}))}}function Jr(e,t){let n=e.theme.screens||{},r=t.variants.get(`min`)?.order??0,i=[];for(let[e,a]of Object.entries(n)){let n=function(n){t.variants.static(e,e=>{e.nodes=[I(`@media`,l,e.nodes)]},{order:n})},o=t.variants.get(e),s=t.theme.resolveValue(e,[`--breakpoint`]);if(o&&s&&!t.theme.hasDefault(`--breakpoint-${e}`))continue;let c=!0;typeof a==`string`&&(c=!1);let l=Yr(a);c?i.push(n):n(r)}if(i.length!==0){for(let[,e]of t.variants.variants)e.order>r&&(e.order+=i.length);t.variants.compareFns=new Map(Array.from(t.variants.compareFns).map(([e,t])=>(e>r&&(e+=i.length),[e,t])));for(let[e,t]of i.entries())t(r+e+1)}}function Yr(e){return(Array.isArray(e)?e:[e]).map(e=>typeof e==`string`?{min:e}:e&&typeof e==`object`?e:null).map(e=>{if(e===null)return null;if(`raw`in e)return e.raw;let t=``;return e.max!==void 0&&(t+=`${e.max} >= `),t+=`width`,e.min!==void 0&&(t+=` >= ${e.min}`),`(${t})`}).filter(Boolean).join(`, `)}function Xr(e,t){let n=e.theme.aria||{},r=e.theme.supports||{},i=e.theme.data||{};if(Object.keys(n).length>0){let e=t.variants.get(`aria`),r=e?.applyFn,i=e?.compounds;t.variants.functional(`aria`,(e,t)=>{let i=t.value;return i&&i.kind===`named`&&i.value in n?r?.(e,{...t,value:{kind:`arbitrary`,value:n[i.value]}}):r?.(e,t)},{compounds:i})}if(Object.keys(r).length>0){let e=t.variants.get(`supports`),n=e?.applyFn,i=e?.compounds;t.variants.functional(`supports`,(e,t)=>{let i=t.value;return i&&i.kind===`named`&&i.value in r?n?.(e,{...t,value:{kind:`arbitrary`,value:r[i.value]}}):n?.(e,t)},{compounds:i})}if(Object.keys(i).length>0){let e=t.variants.get(`data`),n=e?.applyFn,r=e?.compounds;t.variants.functional(`data`,(e,t)=>{let r=t.value;return r&&r.kind===`named`&&r.value in i?n?.(e,{...t,value:{kind:`arbitrary`,value:i[r.value]}}):n?.(e,t)},{compounds:r})}}var Zr=/^[a-z]+$/;async function Qr({designSystem:e,base:t,ast:n,loadModule:r,sources:i}){let a=0,o=[],s=[];P(n,(e,t)=>{if(e.kind!==`at-rule`)return;let n=Ee(t);if(e.name===`@plugin`){if(n.parent!==null)throw Error("`@plugin` cannot be nested.");let t=e.params.slice(1,-1);if(t.length===0)throw Error("`@plugin` must have a path.");let r={};for(let t of e.nodes??[]){if(t.kind!==`declaration`)throw Error(`Unexpected \`@plugin\` option:
21
21
 
22
22
  ${je([t])}
23
23
 
24
24
  \`@plugin\` options must be a flat list of declarations.`);if(t.value===void 0)continue;let e=t.value,n=A(e,`,`).map(e=>{if(e=e.trim(),e===`null`)return null;if(e===`true`)return!0;if(e===`false`)return!1;if(Number.isNaN(Number(e))){if(e[0]===`"`&&e[e.length-1]===`"`||e[0]===`'`&&e[e.length-1]===`'`)return e.slice(1,-1);if(e[0]===`{`&&e[e.length-1]===`}`)throw Error(`Unexpected \`@plugin\` option: Value of declaration \`${je([t]).trim()}\` is not supported.
25
25
 
26
- Using an object as a plugin option is currently only supported in JavaScript configuration files.`)}else return Number(e);return e});r[t.property]=n.length===1?n[0]:n}return o.push([{id:t,base:n.context.base,reference:!!n.context.reference,src:e.src},Object.keys(r).length>0?r:null]),a|=4,N.Replace([])}if(e.name===`@config`){if(e.nodes.length>0)throw Error("`@config` cannot have a body.");if(n.parent!==null)throw Error("`@config` cannot be nested.");return s.push({id:e.params.slice(1,-1),base:n.context.base,reference:!!n.context.reference,src:e.src}),a|=4,N.Replace([])}}),Kr(e);let c=e.resolveThemeValue;if(e.resolveThemeValue=function(r,o){return r.startsWith(`--`)?c(r,o):(a|=Zr({designSystem:e,base:t,ast:n,sources:i,configs:[],pluginDetails:[]}),e.resolveThemeValue(r,o))},!o.length&&!s.length)return 0;let[l,u]=await Promise.all([Promise.all(s.map(async({id:e,base:t,reference:n,src:i})=>{let a=await r(e,t,`config`);return{path:e,base:a.base,config:a.module,reference:n,src:i}})),Promise.all(o.map(async([{id:e,base:t,reference:n,src:i},a])=>{let o=await r(e,t,`plugin`);return{path:e,base:o.base,plugin:o.module,options:a,reference:n,src:i}}))]);return a|=Zr({designSystem:e,base:t,ast:n,sources:i,configs:l,pluginDetails:u}),a}function Zr({designSystem:e,base:t,ast:n,sources:r,configs:i,pluginDetails:a}){let o=0,s=[...a.map(e=>{if(!e.options)return{config:{plugins:[e.plugin]},base:e.base,reference:e.reference,src:e.src};if(`__isOptionsFunction`in e.plugin)return{config:{plugins:[e.plugin(e.options)]},base:e.base,reference:e.reference,src:e.src};throw Error(`The plugin "${e.path}" does not accept options`)}),...i],{resolvedConfig:c}=zr(e,[{config:Lr(e.theme),base:t,reference:!0,src:void 0},...s,{config:{plugins:[Gr]},base:t,reference:!0,src:void 0}]),{resolvedConfig:l,replacedThemeKeys:u}=zr(e,s),d={designSystem:e,ast:n,resolvedConfig:c,featuresRef:{set current(e){o|=e}}},f=Sr({...d,referenceMode:!1,src:void 0}),p=e.resolveThemeValue;e.resolveThemeValue=function(e,t){if(e[0]===`-`&&e[1]===`-`)return p(e,t);let n=f.theme(e,void 0);if(Array.isArray(n)&&n.length===2)return n[0];if(Array.isArray(n))return n.join(`, `);if(typeof n==`object`&&n&&`DEFAULT`in n)return n.DEFAULT;if(typeof n==`string`)return n};for(let{handler:e,reference:t,src:n}of c.plugins)e(Sr({...d,referenceMode:t??!1,src:n}));if(ar(e,l,u),Er(e,l),Jr(l,e),Q(l,e),Ur(l,e),!e.theme.prefix&&c.prefix){if(c.prefix.endsWith(`-`)&&(c.prefix=c.prefix.slice(0,-1),console.warn(`The prefix "${c.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only and is written as a variant before all utilities. We have fixed up the prefix for you. Remove the trailing \`-\` to silence this warning.`)),!Yr.test(c.prefix))throw Error(`The prefix "${c.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only.`);e.theme.prefix=c.prefix}if(!e.important&&c.important===!0&&(e.important=!0),typeof c.important==`string`){let e=c.important;P(n,(t,n)=>{if(t.kind!==`at-rule`||t.name!==`@tailwind`||t.params!==`utilities`)return;let r=Ee(n);return r.parent?.kind===`rule`&&r.parent.selector===e?N.Stop:N.ReplaceStop(F(e,[t]))})}for(let t of c.blocklist)e.invalidCandidates.add(t);for(let e of c.content.files){if(`raw`in e)throw Error(`Error in the config file/plugin/preset. The \`content\` key contains a \`raw\` entry:
26
+ Using an object as a plugin option is currently only supported in JavaScript configuration files.`)}else return Number(e);return e});r[t.property]=n.length===1?n[0]:n}return o.push([{id:t,base:n.context.base,reference:!!n.context.reference,src:e.src},Object.keys(r).length>0?r:null]),a|=4,N.Replace([])}if(e.name===`@config`){if(e.nodes.length>0)throw Error("`@config` cannot have a body.");if(n.parent!==null)throw Error("`@config` cannot be nested.");return s.push({id:e.params.slice(1,-1),base:n.context.base,reference:!!n.context.reference,src:e.src}),a|=4,N.Replace([])}}),qr(e);let c=e.resolveThemeValue;if(e.resolveThemeValue=function(r,o){return r.startsWith(`--`)?c(r,o):(a|=$r({designSystem:e,base:t,ast:n,sources:i,configs:[],pluginDetails:[]}),e.resolveThemeValue(r,o))},!o.length&&!s.length)return 0;let[l,u]=await Promise.all([Promise.all(s.map(async({id:e,base:t,reference:n,src:i})=>{let a=await r(e,t,`config`);return{path:e,base:a.base,config:a.module,reference:n,src:i}})),Promise.all(o.map(async([{id:e,base:t,reference:n,src:i},a])=>{let o=await r(e,t,`plugin`);return{path:e,base:o.base,plugin:o.module,options:a,reference:n,src:i}}))]);return a|=$r({designSystem:e,base:t,ast:n,sources:i,configs:l,pluginDetails:u}),a}function $r({designSystem:e,base:t,ast:n,sources:r,configs:i,pluginDetails:a}){let o=0,s=[...a.map(e=>{if(!e.options)return{config:{plugins:[e.plugin]},base:e.base,reference:e.reference,src:e.src};if(`__isOptionsFunction`in e.plugin)return{config:{plugins:[e.plugin(e.options)]},base:e.base,reference:e.reference,src:e.src};throw Error(`The plugin "${e.path}" does not accept options`)}),...i],{resolvedConfig:c}=Br(e,[{config:Rr(e.theme),base:t,reference:!0,src:void 0},...s,{config:{plugins:[Kr]},base:t,reference:!0,src:void 0}]),{resolvedConfig:l,replacedThemeKeys:u}=Br(e,s),d={designSystem:e,ast:n,resolvedConfig:c,featuresRef:{set current(e){o|=e}}},f=Sr({...d,referenceMode:!1,src:void 0}),p=e.resolveThemeValue;e.resolveThemeValue=function(e,t){if(e[0]===`-`&&e[1]===`-`)return p(e,t);let n=f.theme(e,void 0);if(Array.isArray(n)&&n.length===2)return n[0];if(Array.isArray(n))return n.join(`, `);if(typeof n==`object`&&n&&`DEFAULT`in n)return n.DEFAULT;if(typeof n==`string`)return n};for(let{handler:e,reference:t,src:n}of c.plugins)e(Sr({...d,referenceMode:t??!1,src:n}));if(ar(e,l,u),Er(e,l),Xr(l,e),Jr(l,e),Wr(l,e),!e.theme.prefix&&c.prefix){if(c.prefix.endsWith(`-`)&&(c.prefix=c.prefix.slice(0,-1),console.warn(`The prefix "${c.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only and is written as a variant before all utilities. We have fixed up the prefix for you. Remove the trailing \`-\` to silence this warning.`)),!Zr.test(c.prefix))throw Error(`The prefix "${c.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only.`);e.theme.prefix=c.prefix}if(!e.important&&c.important===!0&&(e.important=!0),typeof c.important==`string`){let e=c.important;P(n,(t,n)=>{if(t.kind!==`at-rule`||t.name!==`@tailwind`||t.params!==`utilities`)return;let r=Ee(n);return r.parent?.kind===`rule`&&r.parent.selector===e?N.Stop:N.ReplaceStop(F(e,[t]))})}for(let t of c.blocklist)e.invalidCandidates.add(t);for(let e of c.content.files){if(`raw`in e)throw Error(`Error in the config file/plugin/preset. The \`content\` key contains a \`raw\` entry:
27
27
 
28
28
  ${JSON.stringify(e,null,2)}
29
29
 
30
- This feature is not currently supported.`);let t=!1;e.pattern[0]==`!`&&(t=!0,e.pattern=e.pattern.slice(1)),r.push({...e,negated:t})}return o}function Qr({ast:e}){let t=new O(e=>_(e.code)),n=new O(e=>({url:e.file,content:e.code,ignore:!1})),r={file:null,sources:[],mappings:[]};P(e,e=>{if(!e.src||!e.dst)return;let i=n.get(e.src[0]);if(!i.content)return;let a=t.get(e.src[0]),o=t.get(e.dst[0]),s=i.content.slice(e.src[1],e.src[2]),c=0;for(let t of s.split(`
31
- `)){if(t.trim()!==``){let t=a.find(e.src[1]+c),n=o.find(e.dst[1]);r.mappings.push({name:null,originalPosition:{source:i,...t},generatedPosition:n})}c+=t.length,c+=1}let l=a.find(e.src[2]),u=o.find(e.dst[2]);r.mappings.push({name:null,originalPosition:{source:i,...l},generatedPosition:u})});for(let e of t.keys())r.sources.push(n.get(e));return r.mappings.sort((e,t)=>e.generatedPosition.line-t.generatedPosition.line||e.generatedPosition.column-t.generatedPosition.column||(e.originalPosition?.line??0)-(t.originalPosition?.line??0)||(e.originalPosition?.column??0)-(t.originalPosition?.column??0)),r}var $r=/^(-?\d+)\.\.(-?\d+)(?:\.\.(-?\d+))?$/;function ei(e){let t=e.indexOf(`{`);if(t===-1)return[e];let n=[],r=e.slice(0,t),i=e.slice(t),a=0,o=i.lastIndexOf(`}`);for(let e=0;e<i.length;e++){let t=i[e];if(t===`{`)a++;else if(t===`}`&&(a--,a===0)){o=e;break}}if(o===-1)throw Error(`The pattern \`${e}\` is not balanced.`);let s=i.slice(1,o),c=i.slice(o+1),l;l=ti(s)?ni(s):A(s,`,`),l=l.flatMap(e=>ei(e));let u=ei(c);for(let e of u)for(let t of l)n.push(r+t+e);return n}function ti(e){return $r.test(e)}function ni(e){let t=e.match($r);if(!t)return[e];let[,n,r,i]=t,a=i?parseInt(i,10):void 0,o=[];if(/^-?\d+$/.test(n)&&/^-?\d+$/.test(r)){let e=parseInt(n,10),t=parseInt(r,10);if(a===void 0&&(a=e<=t?1:-1),a===0)throw Error(`Step cannot be zero in sequence expansion.`);let i=e<t;i&&a<0&&(a=-a),!i&&a>0&&(a=-a);for(let n=e;i?n<=t:n>=t;n+=a)o.push(n.toString())}return o}function ri(e,t){let n=new Set,r=new Set,i=[];function a(o,s=[]){if(e.has(o)&&!n.has(o)){r.has(o)&&t.onCircularDependency?.(s,o),r.add(o);for(let t of e.get(o)??[])s.push(o),a(t,s),s.pop();n.add(o),r.delete(o),i.push(o)}}for(let t of e.keys())a(t);return i}var ii=/^[a-z]+$/;function ai(){throw Error("No `loadModule` function provided to `compile`")}function oi(){throw Error("No `loadStylesheet` function provided to `compile`")}function si(e){let t=0,n=null;for(let r of A(e,` `))r===`reference`?t|=2:r===`inline`?t|=1:r==="default"?t|=4:r===`static`?t|=8:r.startsWith(`prefix(`)&&r.endsWith(`)`)&&(n=r.slice(7,-1));return[t,n]}async function ci(e,{base:t=``,from:n,loadModule:r=ai,loadStylesheet:i=oi}={}){let a=0;e=[we({base:t},e)],a|=await tr(e,t,i,0,n!==void 0);let o=null,s=new D,c=new Map,l=new Map,u=[],d=null,f=null,p=[],m=[],h=[],g=[],_=null;P(e,(e,t)=>{if(e.kind!==`at-rule`)return;let n=Ee(t);if(e.name===`@tailwind`&&(e.params===`utilities`||e.params.startsWith(`utilities`))){if(f!==null||n.context.reference)return N.Replace([]);let t=A(e.params,` `);for(let e of t)if(e.startsWith(`source(`)){let t=e.slice(7,-1);if(t===`none`){_=t;continue}if(t[0]===`"`&&t[t.length-1]!==`"`||t[0]===`'`&&t[t.length-1]!==`'`||t[0]!==`'`&&t[0]!==`"`)throw Error("`source(…)` paths must be quoted.");_={base:n.context.sourceBase??n.context.base,pattern:t.slice(1,-1)}}f=e,a|=16}if(e.name===`@utility`){if(n.parent!==null)throw Error("`@utility` cannot be nested.");if(e.nodes.length===0)throw Error(`\`@utility ${e.params}\` is empty. Utilities should include at least one property.`);let t=on(e);if(t===null){if(!e.params.endsWith(`-*`)){if(e.params.endsWith(`*`))throw Error(`\`@utility ${e.params}\` defines an invalid utility name. A functional utility must end in \`-*\`.`);if(e.params.includes(`*`))throw Error(`\`@utility ${e.params}\` defines an invalid utility name. The dynamic portion marked by \`-*\` must appear once at the end.`)}throw Error(`\`@utility ${e.params}\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter.`)}u.push(t)}if(e.name===`@source`){if(e.nodes.length>0)throw Error("`@source` cannot have a body.");if(n.parent!==null)throw Error("`@source` cannot be nested.");let t=!1,r=!1,i=e.params;if(i[0]===`n`&&i.startsWith(`not `)&&(t=!0,i=i.slice(4)),i[0]===`i`&&i.startsWith(`inline(`)&&(r=!0,i=i.slice(7,-1).trim()),i[0]===`"`&&i[i.length-1]!==`"`||i[0]===`'`&&i[i.length-1]!==`'`||i[0]!==`'`&&i[0]!==`"`)throw Error("`@source` paths must be quoted.");let a=i.slice(1,-1);if(r){let e=t?g:h,n=A(a,` `);for(let t of n)for(let n of ei(t))e.push(n)}else m.push({base:n.context.base,pattern:a,negated:t});return N.ReplaceSkip([])}if(e.name===`@variant`&&(n.parent===null?e.nodes.length===0?e.name=`@custom-variant`:(P(e.nodes,t=>{if(t.kind===`at-rule`&&t.name===`@slot`)return e.name=`@custom-variant`,N.Stop}),e.name===`@variant`&&p.push(e)):p.push(e)),e.name===`@custom-variant`){if(n.parent!==null)throw Error("`@custom-variant` cannot be nested.");let[t,r]=A(e.params,` `);if(!In.test(t))throw Error(`\`@custom-variant ${t}\` defines an invalid variant name. Variants should only contain alphanumeric, dashes, or underscore characters and start with a lowercase letter or number.`);if(e.nodes.length>0&&r)throw Error(`\`@custom-variant ${t}\` cannot have both a selector and a body.`);if(e.nodes.length===0){if(!r)throw Error(`\`@custom-variant ${t}\` has no selector or body.`);let e=A(r.slice(1,-1),`,`);if(e.length===0||e.some(e=>e.trim()===``))throw Error(`\`@custom-variant ${t} (${e.join(`,`)})\` selector is invalid.`);let n=[],i=[];for(let t of e)t=t.trim(),t[0]===`@`?n.push(t):i.push(t);c.set(t,e=>{e.variants.static(t,e=>{let t=[];i.length>0&&t.push(F(i.join(`, `),e.nodes));for(let r of n)t.push(L(r,e.nodes));e.nodes=t},{compounds:Rn([...i,...n])})}),l.set(t,new Set)}else{let n=new Set;P(e.nodes,e=>{e.kind===`at-rule`&&e.name===`@variant`&&n.add(e.params)}),c.set(t,n=>{n.variants.fromAst(t,e.nodes,n)}),l.set(t,n)}return N.ReplaceSkip([])}if(e.name===`@media`){let t=A(e.params,` `),r=[];for(let i of t)if(i.startsWith(`source(`)){let t=i.slice(7,-1);P(e.nodes,e=>{if(e.kind===`at-rule`&&e.name===`@tailwind`&&e.params===`utilities`)return e.params+=` source(${t})`,N.ReplaceStop([we({sourceBase:n.context.base},[e])])})}else if(i.startsWith(`theme(`)){let t=i.slice(6,-1),n=t.includes(`reference`);P(e.nodes,e=>{if(e.kind!==`context`){if(e.kind!==`at-rule`){if(n)throw Error('Files imported with `@import "…" theme(reference)` must only contain `@theme` blocks.\nUse `@reference "…";` instead.');return N.Continue}if(e.name===`@theme`)return e.params+=` `+t,N.Skip}})}else if(i.startsWith(`prefix(`)){let t=i.slice(7,-1);P(e.nodes,e=>{if(e.kind===`at-rule`&&e.name===`@theme`)return e.params+=` prefix(${t})`,N.Skip})}else i===`important`?o=!0:i===`reference`?e.nodes=[we({reference:!0},e.nodes)]:r.push(i);if(r.length>0)e.params=r.join(` `);else if(t.length>0)return N.Replace(e.nodes);return N.Continue}if(e.name===`@theme`){let[t,r]=si(e.params);if(a|=64,n.context.reference&&(t|=2),r){if(!ii.test(r))throw Error(`The prefix "${r}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only.`);s.prefix=r}return P(e.nodes,n=>{if(n.kind===`at-rule`&&n.name===`@keyframes`)return s.addKeyframes(n),N.Skip;if(n.kind===`comment`)return;if(n.kind===`declaration`&&n.property.startsWith(`--`)){s.add(w(n.property),n.value??``,t,n.src);return}let r=je([I(e.name,e.params,[n])]).split(`
30
+ This feature is not currently supported.`);let t=!1;e.pattern[0]==`!`&&(t=!0,e.pattern=e.pattern.slice(1)),r.push({...e,negated:t})}return o}function ei({ast:e}){let t=new O(e=>_(e.code)),n=new O(e=>({url:e.file,content:e.code,ignore:!1})),r={file:null,sources:[],mappings:[]};P(e,e=>{if(!e.src||!e.dst)return;let i=n.get(e.src[0]);if(!i.content)return;let a=t.get(e.src[0]),o=t.get(e.dst[0]),s=i.content.slice(e.src[1],e.src[2]),c=0;for(let t of s.split(`
31
+ `)){if(t.trim()!==``){let t=a.find(e.src[1]+c),n=o.find(e.dst[1]);r.mappings.push({name:null,originalPosition:{source:i,...t},generatedPosition:n})}c+=t.length,c+=1}let l=a.find(e.src[2]),u=o.find(e.dst[2]);r.mappings.push({name:null,originalPosition:{source:i,...l},generatedPosition:u})});for(let e of t.keys())r.sources.push(n.get(e));return r.mappings.sort((e,t)=>e.generatedPosition.line-t.generatedPosition.line||e.generatedPosition.column-t.generatedPosition.column||(e.originalPosition?.line??0)-(t.originalPosition?.line??0)||(e.originalPosition?.column??0)-(t.originalPosition?.column??0)),r}var ti=/^(-?\d+)\.\.(-?\d+)(?:\.\.(-?\d+))?$/;function ni(e){let t=e.indexOf(`{`);if(t===-1)return[e];let n=[],r=e.slice(0,t),i=e.slice(t),a=0,o=i.lastIndexOf(`}`);for(let e=0;e<i.length;e++){let t=i[e];if(t===`{`)a++;else if(t===`}`&&(a--,a===0)){o=e;break}}if(o===-1)throw Error(`The pattern \`${e}\` is not balanced.`);let s=i.slice(1,o),c=i.slice(o+1),l;l=ri(s)?ii(s):A(s,`,`),l=l.flatMap(e=>ni(e));let u=ni(c);for(let e of u)for(let t of l)n.push(r+t+e);return n}function ri(e){return ti.test(e)}function ii(e){let t=e.match(ti);if(!t)return[e];let[,n,r,i]=t,a=i?parseInt(i,10):void 0,o=[];if(/^-?\d+$/.test(n)&&/^-?\d+$/.test(r)){let e=parseInt(n,10),t=parseInt(r,10);if(a===void 0&&(a=e<=t?1:-1),a===0)throw Error(`Step cannot be zero in sequence expansion.`);let i=e<t;i&&a<0&&(a=-a),!i&&a>0&&(a=-a);for(let n=e;i?n<=t:n>=t;n+=a)o.push(n.toString())}return o}function ai(e,t){let n=new Set,r=new Set,i=[];function a(o,s=[]){if(e.has(o)&&!n.has(o)){r.has(o)&&t.onCircularDependency?.(s,o),r.add(o);for(let t of e.get(o)??[])s.push(o),a(t,s),s.pop();n.add(o),r.delete(o),i.push(o)}}for(let t of e.keys())a(t);return i}var oi=/^[a-z]+$/;function si(){throw Error("No `loadModule` function provided to `compile`")}function Z(){throw Error("No `loadStylesheet` function provided to `compile`")}function ci(e){let t=0,n=null;for(let r of A(e,` `))r===`reference`?t|=2:r===`inline`?t|=1:r==="default"?t|=4:r===`static`?t|=8:r.startsWith(`prefix(`)&&r.endsWith(`)`)&&(n=r.slice(7,-1));return[t,n]}async function Q(e,{base:t=``,from:n,loadModule:r=si,loadStylesheet:i=Z}={}){let a=0;e=[we({base:t},e)],a|=await tr(e,t,i,0,n!==void 0);let o=null,s=new D,c=new Map,l=new Map,u=[],d=null,f=null,p=[],m=[],h=[],g=[],_=null;P(e,(e,t)=>{if(e.kind!==`at-rule`)return;let n=Ee(t);if(e.name===`@tailwind`&&(e.params===`utilities`||e.params.startsWith(`utilities`))){if(f!==null||n.context.reference)return N.Replace([]);let t=A(e.params,` `);for(let e of t)if(e.startsWith(`source(`)){let t=e.slice(7,-1);if(t===`none`){_=t;continue}if(t[0]===`"`&&t[t.length-1]!==`"`||t[0]===`'`&&t[t.length-1]!==`'`||t[0]!==`'`&&t[0]!==`"`)throw Error("`source(…)` paths must be quoted.");_={base:n.context.sourceBase??n.context.base,pattern:t.slice(1,-1)}}f=e,a|=16}if(e.name===`@utility`){if(n.parent!==null)throw Error("`@utility` cannot be nested.");if(e.nodes.length===0)throw Error(`\`@utility ${e.params}\` is empty. Utilities should include at least one property.`);let t=on(e);if(t===null){if(!e.params.endsWith(`-*`)){if(e.params.endsWith(`*`))throw Error(`\`@utility ${e.params}\` defines an invalid utility name. A functional utility must end in \`-*\`.`);if(e.params.includes(`*`))throw Error(`\`@utility ${e.params}\` defines an invalid utility name. The dynamic portion marked by \`-*\` must appear once at the end.`)}throw Error(`\`@utility ${e.params}\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter.`)}u.push(t)}if(e.name===`@source`){if(e.nodes.length>0)throw Error("`@source` cannot have a body.");if(n.parent!==null)throw Error("`@source` cannot be nested.");let t=!1,r=!1,i=e.params;if(i[0]===`n`&&i.startsWith(`not `)&&(t=!0,i=i.slice(4)),i[0]===`i`&&i.startsWith(`inline(`)&&(r=!0,i=i.slice(7,-1).trim()),i[0]===`"`&&i[i.length-1]!==`"`||i[0]===`'`&&i[i.length-1]!==`'`||i[0]!==`'`&&i[0]!==`"`)throw Error("`@source` paths must be quoted.");let a=i.slice(1,-1);if(r){let e=t?g:h,n=A(a,` `);for(let t of n)for(let n of ni(t))e.push(n)}else m.push({base:n.context.base,pattern:a,negated:t});return N.ReplaceSkip([])}if(e.name===`@variant`&&(n.parent===null?e.nodes.length===0?e.name=`@custom-variant`:(P(e.nodes,t=>{if(t.kind===`at-rule`&&t.name===`@slot`)return e.name=`@custom-variant`,N.Stop}),e.name===`@variant`&&p.push(e)):p.push(e)),e.name===`@custom-variant`){if(n.parent!==null)throw Error("`@custom-variant` cannot be nested.");let[t,r]=A(e.params,` `);if(!In.test(t))throw Error(`\`@custom-variant ${t}\` defines an invalid variant name. Variants should only contain alphanumeric, dashes, or underscore characters and start with a lowercase letter or number.`);if(e.nodes.length>0&&r)throw Error(`\`@custom-variant ${t}\` cannot have both a selector and a body.`);if(e.nodes.length===0){if(!r)throw Error(`\`@custom-variant ${t}\` has no selector or body.`);let e=A(r.slice(1,-1),`,`);if(e.length===0||e.some(e=>e.trim()===``))throw Error(`\`@custom-variant ${t} (${e.join(`,`)})\` selector is invalid.`);let n=[],i=[];for(let t of e)t=t.trim(),t[0]===`@`?n.push(t):i.push(t);c.set(t,e=>{e.variants.static(t,e=>{let t=[];i.length>0&&t.push(F(i.join(`, `),e.nodes));for(let r of n)t.push(L(r,e.nodes));e.nodes=t},{compounds:Rn([...i,...n])})}),l.set(t,new Set)}else{let n=new Set;P(e.nodes,e=>{e.kind===`at-rule`&&e.name===`@variant`&&n.add(e.params)}),c.set(t,n=>{n.variants.fromAst(t,e.nodes,n)}),l.set(t,n)}return N.ReplaceSkip([])}if(e.name===`@media`){let t=A(e.params,` `),r=[];for(let i of t)if(i.startsWith(`source(`)){let t=i.slice(7,-1);P(e.nodes,e=>{if(e.kind===`at-rule`&&e.name===`@tailwind`&&e.params===`utilities`)return e.params+=` source(${t})`,N.ReplaceStop([we({sourceBase:n.context.base},[e])])})}else if(i.startsWith(`theme(`)){let t=i.slice(6,-1),n=t.includes(`reference`);P(e.nodes,e=>{if(e.kind!==`context`){if(e.kind!==`at-rule`){if(n)throw Error('Files imported with `@import "…" theme(reference)` must only contain `@theme` blocks.\nUse `@reference "…";` instead.');return N.Continue}if(e.name===`@theme`)return e.params+=` `+t,N.Skip}})}else if(i.startsWith(`prefix(`)){let t=i.slice(7,-1);P(e.nodes,e=>{if(e.kind===`at-rule`&&e.name===`@theme`)return e.params+=` prefix(${t})`,N.Skip})}else i===`important`?o=!0:i===`reference`?e.nodes=[we({reference:!0},e.nodes)]:r.push(i);if(r.length>0)e.params=r.join(` `);else if(t.length>0)return N.Replace(e.nodes);return N.Continue}if(e.name===`@theme`){let[t,r]=ci(e.params);if(a|=64,n.context.reference&&(t|=2),r){if(!oi.test(r))throw Error(`The prefix "${r}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only.`);s.prefix=r}return P(e.nodes,n=>{if(n.kind===`at-rule`&&n.name===`@keyframes`)return s.addKeyframes(n),N.Skip;if(n.kind===`comment`)return;if(n.kind===`declaration`&&n.property.startsWith(`--`)){s.add(w(n.property),n.value??``,t,n.src);return}let r=je([I(e.name,e.params,[n])]).split(`
32
32
  `).map((e,t,n)=>`${t===0||t>=n.length-2?` `:`>`} ${e}`).join(`
33
33
  `);throw Error(`\`@theme\` blocks must only contain custom properties or \`@keyframes\`.
34
34
 
35
- ${r}`)}),d?N.ReplaceSkip([]):(d=F(`:root, :host`,[]),d.src=e.src,N.ReplaceSkip(d))}});let v=Un(s,f?.src);if(o&&(v.important=o),g.length>0)for(let e of g)v.invalidCandidates.add(e);a|=await Xr({designSystem:v,base:t,ast:e,loadModule:r,sources:m});for(let e of c.keys())v.variants.static(e,()=>{});for(let e of ri(l,{onCircularDependency(e,t){let n=je(e.map((n,r)=>I(`@custom-variant`,n,[I(`@variant`,e[r+1]??t,[])]))).replaceAll(`;`,` { … }`).replace(`@custom-variant ${t} {`,`@custom-variant ${t} { /* \u2190 */`);throw Error(`Circular dependency detected in custom variants:
35
+ ${r}`)}),d?N.ReplaceSkip([]):(d=F(`:root, :host`,[]),d.src=e.src,N.ReplaceSkip(d))}});let v=Un(s,f?.src);if(o&&(v.important=o),g.length>0)for(let e of g)v.invalidCandidates.add(e);a|=await Qr({designSystem:v,base:t,ast:e,loadModule:r,sources:m});for(let e of c.keys())v.variants.static(e,()=>{});for(let e of ai(l,{onCircularDependency(e,t){let n=je(e.map((n,r)=>I(`@custom-variant`,n,[I(`@variant`,e[r+1]??t,[])]))).replaceAll(`;`,` { … }`).replace(`@custom-variant ${t} {`,`@custom-variant ${t} { /* \u2190 */`);throw Error(`Circular dependency detected in custom variants:
36
36
 
37
- ${n}`)}}))c.get(e)?.(v);for(let e of u)e(v);if(d){let t=[];for(let[e,n]of v.theme.entries()){if(n.options&2)continue;let r=R(C(e),n.value);r.src=n.src,t.push(r)}let n=v.theme.getKeyframes();for(let t of n)e.push(we({theme:!0},[z([t])]));d.nodes=[we({theme:!0},t)]}if(a|=Hn(e,v),a|=On(e,v),a|=$n(e,v),f){let e=f;e.kind=`context`,e.context={}}return P(e,e=>{if(e.kind===`at-rule`)return e.name===`@utility`?N.Replace([]):N.Skip}),{designSystem:v,ast:e,sources:m,root:_,utilitiesNode:f,features:a,inlineCandidates:h}}async function li(e,t={}){let{designSystem:n,ast:r,sources:i,root:a,utilitiesNode:o,features:s,inlineCandidates:c}=await ci(e,t);r.unshift(Ce(`! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com `));function l(e){n.invalidCandidates.add(e)}let u=new Set,d=null,f=0,p=!1;for(let e of c)n.invalidCandidates.has(e)||(u.add(e),p=!0);return{sources:i,root:a,features:s,build(i){if(s===0)return e;if(!o)return d??=De(r,n,t.polyfills),d;let a=p,c=!1;p=!1;let m=u.size;for(let e of i)if(!n.invalidCandidates.has(e)){if(e[0]===`-`&&e[1]===`-`){let t=n.theme.markUsedVariable(e);a||=t,c||=t}else u.add(e),a||=u.size!==m}if(!a)return d??=De(r,n,t.polyfills),d;let h=Kn(u,n,{onInvalidCandidate:l}).astNodes;return t.from&&P(h,e=>{e.src??=o.src}),!c&&f===h.length?(d??=De(r,n,t.polyfills),d):(f=h.length,o.nodes=h,d=De(r,n,t.polyfills),d)}}}async function ui(e,t={}){let n=y(e,{from:t.from}),r=await li(n,t),i=n,a=e;return{...r,build(e){let n=r.build(e);return n===i||(a=je(n,!!t.from),i=n),a},buildSourceMap(){return Qr({ast:i})}}}var di={index:`@layer theme, base, components, utilities;
37
+ ${n}`)}}))c.get(e)?.(v);for(let e of u)e(v);if(d){let t=[];for(let[e,n]of v.theme.entries()){if(n.options&2)continue;let r=R(C(e),n.value);r.src=n.src,t.push(r)}let n=v.theme.getKeyframes();for(let t of n)e.push(we({theme:!0},[z([t])]));d.nodes=[we({theme:!0},t)]}if(a|=Hn(e,v),a|=On(e,v),a|=$n(e,v),f){let e=f;e.kind=`context`,e.context={}}return P(e,e=>{if(e.kind===`at-rule`)return e.name===`@utility`?N.Replace([]):N.Skip}),{designSystem:v,ast:e,sources:m,root:_,utilitiesNode:f,features:a,inlineCandidates:h}}async function li(e,t={}){let{designSystem:n,ast:r,sources:i,root:a,utilitiesNode:o,features:s,inlineCandidates:c}=await Q(e,t);r.unshift(Ce(`! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com `));function l(e){n.invalidCandidates.add(e)}let u=new Set,d=null,f=0,p=!1;for(let e of c)n.invalidCandidates.has(e)||(u.add(e),p=!0);return{sources:i,root:a,features:s,build(i){if(s===0)return e;if(!o)return d??=De(r,n,t.polyfills),d;let a=p,c=!1;p=!1;let m=u.size;for(let e of i)if(!n.invalidCandidates.has(e)){if(e[0]===`-`&&e[1]===`-`){let t=n.theme.markUsedVariable(e);a||=t,c||=t}else u.add(e),a||=u.size!==m}if(!a)return d??=De(r,n,t.polyfills),d;let h=Kn(u,n,{onInvalidCandidate:l}).astNodes;return t.from&&P(h,e=>{e.src??=o.src}),!c&&f===h.length?(d??=De(r,n,t.polyfills),d):(f=h.length,o.nodes=h,d=De(r,n,t.polyfills),d)}}}async function ui(e,t={}){let n=y(e,{from:t.from}),r=await li(n,t),i=n,a=e;return{...r,build(e){let n=r.build(e);return n===i||(a=je(n,!!t.from),i=n),a},buildSourceMap(){return ei({ast:i})}}}var di={index:`@layer theme, base, components, utilities;
38
38
 
39
39
  @import './theme.css' layer(theme);
40
40
  @import './preflight.css' layer(base);
@@ -952,34 +952,39 @@ input:where([type='button'], [type='reset'], [type='submit']),
952
952
  `;if(t.includes(`@import`)||(t=`@import "tailwindcss";${t}`),$.end(`Reading Stylesheets`,{size:t.length,changed:gi!==t}),gi!==t){gi=t,$.start(`Compile CSS`);try{mi=await ui(t,{base:`/`,loadStylesheet:xi,loadModule:Si})}finally{$.end(`Compile CSS`),$.end(`Create compiler`)}hi.clear()}}async function xi(e,t){function n(){if(e===`tailwindcss`)return{path:`virtual:tailwindcss/index.css`,base:t,content:di.index};if(e===`tailwindcss/preflight`||e===`tailwindcss/preflight.css`||e===`./preflight.css`)return{path:`virtual:tailwindcss/preflight.css`,base:t,content:di.preflight};if(e===`tailwindcss/theme`||e===`tailwindcss/theme.css`||e===`./theme.css`)return{path:`virtual:tailwindcss/theme.css`,base:t,content:di.theme};if(e===`tailwindcss/utilities`||e===`tailwindcss/utilities.css`||e===`./utilities.css`)return{path:`virtual:tailwindcss/utilities.css`,base:t,content:di.utilities};throw Error(`The browser build does not support @import for "${e}"`)}try{let r=n();return $.hit(`Loaded stylesheet`,{id:e,base:t,size:r.content.length}),r}catch(n){throw $.hit(`Failed to load stylesheet`,{id:e,base:t,error:n.message??n}),n}}async function Si(){throw Error(`The browser build does not support plugins or config files.`)}async function Ci(e){if(!mi)return;let t=new Set;$.start(`Collect classes`);for(let e of document.querySelectorAll(`[class]`))for(let n of e.classList)hi.has(n)||(hi.add(n),t.add(n));$.end(`Collect classes`,{count:t.size}),(t.size!==0||e!==`incremental`)&&($.start(`Build utilities`),_i.textContent=mi.build(Array.from(t)),$.end(`Build utilities`))}function wi(e){async function t(){if(!mi&&e!==`full`)return;let t=yi++;$.start(`Build #${t} (${e})`),e===`full`&&await bi(),$.start(`Build`),await Ci(e),$.end(`Build`),$.end(`Build #${t} (${e})`)}vi=vi.then(t).catch(e=>$.error(e))}var Ti=new MutationObserver(()=>wi(`full`));function Ei(e){Ti.observe(e,{attributes:!0,attributeFilter:[`type`],characterData:!0,subtree:!0,childList:!0})}new MutationObserver(e=>{let t=0,n=0;for(let r of e){for(let e of r.addedNodes)e.nodeType===Node.ELEMENT_NODE&&e.tagName===`STYLE`&&e.getAttribute(`type`)===pi&&(Ei(e),t++);for(let e of r.addedNodes)e.nodeType===1&&e!==_i&&n++;r.type===`attributes`&&n++}if(t>0)return wi(`full`);if(n>0)return wi(`incremental`)}).observe(document.documentElement,{attributes:!0,attributeFilter:[`class`],childList:!0,subtree:!0}),wi(`full`),document.head.append(_i)})();var e=new WeakMap;function t(t,r){let i=e.get(t);i||e.set(t,i=new Set),!i.has(r)&&(i.add(r),console.warn(`[monowind] ${r}`,n(t)))}function n(e){if(!globalThis.process?.versions?.node)return e;let t=e.id?`#${e.id}`:``,n=e.classList.length?`.${Array.from(e.classList).join(`.`)}`:``;return`<${e.tagName.toLowerCase()}${t}${n}>`}var r=new Map,i=new Set;function a(e){let t=e.tag.toLowerCase();if(!t.includes(`-`)){console.warn(`[monowind] registerLeafRenderer: "${e.tag}" is not a custom-element tag name (needs a hyphen); ignored.`);return}r.has(t)&&console.warn(`[monowind] registerLeafRenderer: replacing existing renderer for <${t}> (last registration wins).`),r.set(t,{...e,tag:t}),d()}function o(){d()}function s(e){return r.get(e.toLowerCase())}function c(){let e=new Set;for(let t of r.values())for(let n of t.observedAttributes??[])e.add(n.toLowerCase());return[...e]}function l(e){return i.add(e),()=>i.delete(e)}function u(e,n){try{return e.render(n)}catch(r){return t(n,`<${e.tag}> renderer threw; rendering nothing. ${String(r)}`),null}}function d(){for(let e of i)e()}var f=new WeakMap,p=[],m=new Map;function h(e,t,n){let r=f.get(e);f.set(e,t);let i=m.get(e);if(i){if(t!==i.toValue){let n=v(i);return m.delete(e),p.push({el:e,from:n,to:t}),n}let n=v(i);return n===i.toValue&&m.delete(e),n}return r!==void 0&&r!==t&&n.transitionDuration.split(`,`).some(e=>parseFloat(e)>0)?(p.push({el:e,from:r,to:t}),r):t}function g(e){let t=!1;for(let n=p.length-1;n>=0;n--){let{el:r,from:i,to:a}=p[n];if(!r.isConnected){p.splice(n,1);continue}if(!e.contains(r))continue;p.splice(n,1),t=!0;let o=b(getComputedStyle(r),`background-color`),s=w(i),c=w(a);o&&s&&c&&m.set(r,{from:s,to:c,toValue:a,start:performance.now()+o.delay,duration:o.duration,easing:o.easing})}return t}function _(){let e=performance.now();for(let[t,n]of m)(!t.isConnected||e>=n.start+n.duration)&&m.delete(t);return m.size>0}function v(e){let t=(performance.now()-e.start)/e.duration;if(t>=1)return e.toValue;let n=t<=0?0:e.easing(t);return E(T(e.from,e.to,n))}var y={ease:[.25,.1,.25,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]};function b(e,t){let n=e.transitionProperty.split(`,`).map(e=>e.trim()),r=-1;for(let e=0;e<n.length;e++)(n[e]===t||n[e]===`all`)&&(r=e);if(r<0)return null;let i=e=>{let t=e.split(`,`).map(e=>e.trim());return t[r%t.length]??``},a=x(i(e.transitionDuration));return a<=0?null:{duration:a*1e3,delay:x(i(e.transitionDelay))*1e3,easing:S(i(e.transitionTimingFunction))}}function x(e){let t=parseFloat(e);return Number.isFinite(t)?e.endsWith(`ms`)?t/1e3:t:0}function S(e){if(e===`linear`)return e=>e;let t=y[e];if(t)return C(...t);let n=e.match(/^cubic-bezier\(([^)]+)\)$/);if(n){let[e,t,r,i]=n[1].split(`,`).map(e=>parseFloat(e));if([e,t,r,i].every(e=>Number.isFinite(e)))return C(e,t,r,i)}return e=>e}function C(e,t,n,r){let i=(e,t,n)=>3*e*n*(1-n)*(1-n)+3*t*n*n*(1-n)+n*n*n;return a=>{let o=0,s=1;for(let t=0;t<24;t++){let t=(o+s)/2;i(e,n,t)<a?o=t:s=t}return i(t,r,(o+s)/2)}}function w(e){if(e===``||e===`transparent`)return{r:0,g:0,b:0,a:0,legacy:!0};let t=e.match(/^rgba?\(([^)]+)\)$/);if(t){let e=t[1].split(/[\s,/]+/).map(e=>parseFloat(e));return e.length<3||e.some(e=>!Number.isFinite(e))?null:{r:e[0]/255,g:e[1]/255,b:e[2]/255,a:e[3]??1,legacy:!0}}if(t=e.match(/^color\(srgb ([^)]+)\)$/),t){let e=t[1].split(/[\s/]+/).map(e=>parseFloat(e));return e.length<3||e.slice(0,3).some(e=>!Number.isFinite(e))?null:{r:e[0],g:e[1],b:e[2],a:e[3]??1,legacy:!1}}if(t=e.match(/^okl(ch|ab)\(([^)]+)\)$/),t){let e=t[1]===`ch`,n=t[2].replaceAll(`none`,`0`).split(/[\s/]+/).map(e=>parseFloat(e));if(n.length<3||n.some(e=>!Number.isFinite(e)))return null;let[r,i,a]=n;return{...A(r,e?i*Math.cos(a*Math.PI/180):i,e?i*Math.sin(a*Math.PI/180):a),a:n[3]??1,legacy:!1}}return null}function T(e,t,n){let r=e.a+(t.a-e.a)*n,i=(i,a)=>{let o=i*e.a+(a*t.a-i*e.a)*n;return r===0?0:o/r};if(e.legacy&&t.legacy)return{r:i(e.r,t.r),g:i(e.g,t.g),b:i(e.b,t.b),a:r,legacy:!0};let a=k(e.r,e.g,e.b),o=k(t.r,t.g,t.b);return{...A(i(a.l,o.l),i(a.a,o.a),i(a.b,o.b)),a:r,legacy:!1}}function E(e){let t=e=>Math.round(Math.min(1,Math.max(0,e))*255),n=Math.round(Math.min(1,Math.max(0,e.a))*1e3)/1e3;return`rgba(${t(e.r)}, ${t(e.g)}, ${t(e.b)}, ${n})`}function D(e){return e<=.04045?e/12.92:((e+.055)/1.055)**2.4}function O(e){return e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055}function k(e,t,n){let r=D(e),i=D(t),a=D(n),o=Math.cbrt(.4122214708*r+.5363325363*i+.0514459929*a),s=Math.cbrt(.2119034982*r+.6806995451*i+.1073969566*a),c=Math.cbrt(.0883024619*r+.2817188376*i+.6299787005*a);return{l:.2104542553*o+.793617785*s-.0040720468*c,a:1.9779984951*o-2.428592205*s+.4505937099*c,b:.0259040371*o+.7827717662*s-.808675766*c}}function A(e,t,n){let r=(e+.3963377774*t+.2158037573*n)**3,i=(e-.1055613458*t-.0638541728*n)**3,a=(e-.0894841775*t-1.291485548*n)**3;return{r:O(4.0767416621*r-3.3077115913*i+.2309699292*a),g:O(-1.2684380046*r+2.6097574011*i-.3413193965*a),b:O(-.0041960863*r-.7034186147*i+1.707614701*a)}}var ee=new Map,te=new Set;function ne(e,t){let n=e.toLowerCase().trim();ee.has(n)&&console.warn(`[monowind] registerBorderGlyphs: replacing "${n}" (last registration wins).`),ee.set(n,t);for(let e of te)e()}function j(e){if(e)return ee.get(e.toLowerCase().trim())}function re(e){return te.add(e),()=>te.delete(e)}function ie(e){switch(e){case 1:case 2:case 3:return`h`;case 4:case 8:case 12:return`v`;case 5:return`tl`;case 6:return`tr`;case 9:return`bl`;case 10:return`br`;case 7:return`teeDown`;case 11:return`teeUp`;case 13:return`teeRight`;case 14:return`teeLeft`;case 15:return`cross`;default:return null}}var ae=[` `,`─`,`─`,`─`,`│`,`┌`,`┐`,`┬`,`│`,`└`,`┘`,`┴`,`│`,`├`,`┤`,`┼`],oe=[` `,`═`,`═`,`═`,`║`,`╔`,`╗`,`╦`,`║`,`╚`,`╝`,`╩`,`║`,`╠`,`╣`,`╬`];function se(e){let t={};for(let n=1;n<16;n++){let r=ie(n);r&&!(r in t)&&(t[r]=e[n])}return t}var ce=e=>se(Array.from({length:16},()=>e));ne(`default`,{}),ne(`rounded`,{solid:{tl:`╭`,tr:`╮`,bl:`╰`,br:`╯`}});var le={...ce(`+`),h:`-`,v:`|`};ne(`ascii`,{solid:{...le,scrollTrack:`|`,scrollThumb:`#`},double:{...le,h:`=`},dashed:le,dotted:{...le,h:`.`,v:`:`}});var ue=se(ae);ne(`single`,{double:ue,dashed:ue,dotted:ue}),ne(`cp437`,{dashed:ue,dotted:ue});function de(e){return{track:e?.solid?.scrollTrack??`░`,thumb:e?.solid?.scrollThumb??`█`}}ne(`blocks`,{solid:ce(`█`),double:ce(`█`),dashed:ce(`▒`),dotted:ce(`░`)});function fe(e,t,n){let r=e.border;if(r.top===0&&r.right===0&&r.bottom===0&&r.left===0)return;let i=Math.max(r.top,r.right,r.bottom,r.left);for(let a=0;a<i;a++){let i={top:a<r.top,right:a<r.right,bottom:a<r.bottom,left:a<r.left},o={x:t.x+(i.left?a:0),y:t.y+(i.top?a:0),width:t.width-(i.left?a:0)-(i.right?a:0),height:t.height-(i.top?a:0)-(i.bottom?a:0)};o.width<=0||o.height<=0||pe(n,e.borderStyle,e.borderColor,o,i,j(e.glyphSet))}}function pe(e,t,n,r,i,a){let o=_e(t.top,a),s=_e(t.right,a),c=_e(t.bottom,a),l=_e(t.left,a),u=(e,t,n)=>n(_e(e===t?e:`solid`,a)),{x:d,y:f,width:p,height:m}=r,h=p>=2&&m>=2,g=d+ +!!i.left,_=d+p-+!!i.right,v=f+ +!!i.top,y=f+m-+!!i.bottom;if(i.top&&_>g&&e.push({glyph:o.h,x:g,y:f,length:_-g,color:n.top}),i.bottom&&m>+!!i.top&&_>g&&e.push({glyph:c.h,x:g,y:f+m-1,length:_-g,color:n.bottom}),i.left)for(let t=v;t<y;t++)e.push({glyph:l.v,x:d,y:t,length:1,color:n.left});if(i.right&&p>+!!i.left)for(let t=v;t<y;t++)e.push({glyph:s.v,x:d+p-1,y:t,length:1,color:n.right});h&&(i.top&&i.left&&e.push({glyph:u(t.top,t.left,e=>e.tl),x:d,y:f,length:1,color:n.top}),i.top&&i.right&&e.push({glyph:u(t.top,t.right,e=>e.tr),x:d+p-1,y:f,length:1,color:n.top}),i.bottom&&i.left&&e.push({glyph:u(t.bottom,t.left,e=>e.bl),x:d,y:f+m-1,length:1,color:n.bottom}),i.bottom&&i.right&&e.push({glyph:u(t.bottom,t.right,e=>e.br),x:d+p-1,y:f+m-1,length:1,color:n.bottom}))}function me(e,t){return e.style.position!==`static`||(t.style.display===`flex`||t.style.display===`grid`)&&e.style.zIndex!==null}function he(e){if(e.children.length<=1)return e.children;let t=null,n=null,r=null,i=null;for(let a of e.children)me(a,e)?(a.style.zIndex??0)<0?(t??=[]).push(a):(i??=[]).push(a):a.inlineBox?(r??=[]).push(a):(n??=[]).push(a);return t&&t.length>1&&t.sort((e,t)=>(e.style.zIndex??0)-(t.style.zIndex??0)),i&&i.length>1&&i.sort((e,t)=>(e.style.zIndex??0)-(t.style.zIndex??0)),!t&&n&&!r&&!i?n:!t&&!n&&r&&!i?r:!t&&!n&&!r&&i?i:[...t??[],...n??[],...r??[],...i??[]]}function ge(e,t,n){let r=_e(e,n);return t===`h`?r.h:r.v}function M(e,t,n,r,i,a){let o=(t?8:0)|(n?4:0)|(r?2:0)|!!i;if(a){let t=ie(o),n=t&&a[e]?.[t];if(n)return n}return(e===`double`?oe:ae)[o]}function _e(e,t){let n=(n,r,i,a)=>M(e,n,r,i,a,t),r={h:n(!1,!1,!0,!0),v:n(!0,!0,!1,!1),tl:n(!1,!0,!1,!0),tr:n(!1,!0,!0,!1),bl:n(!0,!1,!1,!0),br:n(!0,!1,!0,!1)};return e===`dashed`?{h:`╌`,v:`╎`,...N(r),...P(t,e)}:e===`dotted`?{h:`┄`,v:`┊`,...N(r),...P(t,e)}:r}function N(e){let{h:t,v:n,...r}=e;return r}function P(e,t){let n=e?.[t],r={};return n?.h&&(r.h=n.h),n?.v&&(r.v=n.v),r}function ve(e,t,n,r){let i=e.map(e=>e.spanned?!1:n===`between`?e.beforeOccupied&&e.afterOccupied:n!==`around`||e.beforeOccupied||e.afterOccupied),a=[];for(let n=0;n<e.length;n++)if(a.push({start:e[n].start,end:e[n].end,covered:i[n]}),n+1<e.length){let r=t===`intersection`?!1:t===`none`?i[n]||i[n+1]:i[n]&&i[n+1];a.push({start:e[n].end,end:e[n+1].start,covered:r})}let o=[];for(let e of a){if(!e.covered)continue;let t=o[o.length-1];t&&t.end===e.start?t.end=e.end:o.push({start:e.start,end:e.end})}if(r===`overlap-join`){let t=new Map,n=new Map;for(let r=0;r+1<e.length;r++){let i=e[r].end,a=e[r+1].start-i;a<=0||(n.set(i,i+Math.ceil(a/2)),t.set(e[r+1].start,i+Math.floor(a/2)))}return o.map(e=>{let r=t.get(e.start),i=n.get(e.end);return{start:r??e.start,end:i??e.end,startHalf:r!==void 0,endHalf:i!==void 0}})}return o.map(e=>({start:e.start+r,end:e.end-r})).filter(e=>e.end>e.start)}function ye(e){let t=[],n=e.border.left+e.padding.left,r=e.border.top+e.padding.top,i=(e,t)=>({line:t.bandStart+Math.floor((t.bandSize-e.width)/2),start:t.start,end:t.end,startHalf:t.startHalf===!0,endHalf:t.endHalf===!0}),a=e.ruleX?e.vertical.map(t=>i(e.ruleX,t)):[],o=e.ruleY?e.horizontal.map(t=>i(e.ruleY,t)):[],s=e.ruleX?.width??0,c=e.ruleY?.width??0,l=(e,t,n,r)=>e.some(e=>n>=e.line&&n<e.line+t&&(e.start<r&&e.end>r||e.end===r&&!e.endHalf||e.start===r&&!e.startHalf)),u=(e,t)=>o.some(n=>t>=n.line&&t<n.line+c&&e>=n.start&&e<n.end);if(e.ruleX){let i=ge(e.ruleX.style,`v`,e.glyphs);for(let o of a){for(let a=0;a<s;a++)for(let s=o.start;s<o.end;s++)u(o.line+a,s)||t.push({glyph:i,x:n+o.line+a,y:r+s,length:1,color:e.ruleX.color});be(e,t,`x`,o.line,o.start,o.end)}}if(e.ruleY){let i=e.ruleY.style===`double`&&e.ruleX?.style===`double`;for(let u of o){for(let d=0;d<c;d++){let f=u.line+d;for(let d=u.start;d<u.end;d++){let u=l(a,s,d,f),p=l(a,s,d,f+1);t.push({glyph:u||p?M(i?`double`:`solid`,u,p,l(o,c,f,d),l(o,c,f,d+1),e.glyphs):ge(e.ruleY.style,`h`,e.glyphs),x:n+d,y:r+f,length:1,color:e.ruleY.color})}}be(e,t,`y`,u.line,u.start,u.end)}}return t}function be(e,t,n,r,i,a){let o=n===`x`?e.ruleX:e.ruleY,s=e.border.left+e.padding.left,c=e.border.top+e.padding.top,l=s+e.contentWidth+e.padding.right+e.border.right,u=c+e.contentHeight+e.padding.bottom+e.border.bottom,d=(n,r,i,a,s,c,l,u)=>{let d=o.style===`double`&&i===`double`?`double`:`solid`;t.push({glyph:M(d,s,c,l,u,e.glyphs),x:n,y:r,length:1,color:a})};if(n===`x`)for(let t=0;t<o.width;t++){let n=s+r+t;i<=0&&e.padding.top===0&&e.border.top>0&&d(n,e.border.top-1,e.borderStyle.top,e.borderColor.top,!1,!0,!0,!0),a>=e.contentHeight&&e.padding.bottom===0&&e.border.bottom>0&&d(n,u-e.border.bottom,e.borderStyle.bottom,e.borderColor.bottom,!0,!1,!0,!0)}else for(let t=0;t<o.width;t++){let n=c+r+t;i<=0&&e.padding.left===0&&e.border.left>0&&d(e.border.left-1,n,e.borderStyle.left,e.borderColor.left,!0,!0,!1,!0),a>=e.contentWidth&&e.padding.right===0&&e.border.right>0&&d(l-e.border.right,n,e.borderStyle.right,e.borderColor.right,!0,!0,!0,!1)}}function xe(e){return(e>=0?Math.floor(e+.5):-Math.floor(-e+.5))||0}function Se(e,t){return t<=0?0:xe(e/(.25*t))}function F(e,t){return xe(t*e/100)}function I(e,t){let n=t.getBoundingClientRect(),r=parseFloat(getComputedStyle(e).letterSpacing)||0,i=t.ownerDocument.createRange();i.selectNodeContents(t);let a=Math.max(0,i.getBoundingClientRect().height-n.height);return{width:n.width/100,height:n.height,letterSpacing:r,inkOverhang:a}}function L(){return parseFloat(getComputedStyle(document.documentElement).fontSize)||16}function R(e,t,n={}){return z(e,t,n).length}function Ce(e,t){return t.endsWith(`
953
953
  `)&&e.pop(),e}function we(e){let t=[],n=0;for(let r=0;r<=e.length;r++)(r===e.length||e[r]===`
954
954
  `)&&(t.push({start:n,end:r}),n=r+1);return Ce(t,e)}function z(e,t,n={}){if(!/[^ \t\r\f]/.test(e))return[];let r=[],i=0,a=n.firstLineIndent??0;for(let o=0;o<=e.length;o++)(o===e.length||e[o]===`
955
- `)&&(r.push(...Ne(e,i,o,t,n,a)),a=0,i=o+1);return Ce(r,e)}function Te(e,t,n){if(!n)return t-e;let r=0;for(let i=e;i<t;i++)r+=n[i]??1;return r}function Ee(e,t,n,r=0){return t<=e?0:Te(e,t,n)-Math.min(r,De(t-1,n))}function De(e,t){return t?(t[e]??1)-1:0}function Oe(e,t={}){let{advances:n,tracking:r=0}=t,i=0;for(let t of Me(e,0,e.length))for(let a of Ae(e,t.start,t.end))i=Math.max(i,Ee(a.start,a.end,n,r));return i}function ke(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===``&&(t(r,n),n++)}function Ae(e,t,n){let r=[],i=t;for(let a=t;a<n;a++){if(e[a]===``){a>i&&r.push({start:i,end:a}),r.push({start:a,end:a+1}),i=a+1;continue}if(e[a]!==`-`)continue;let o=a===t;for(;a+1<n&&e[a+1]===`-`;)a++;let s=a+1;!o&&s<n&&(r.push({start:i,end:s}),i=s)}return r.push({start:i,end:n}),r}var je=/[ \t\r\n\f]/;function Me(e,t,n){let r=[],i=t;for(;i<n;){for(;i<n&&je.test(e[i]);)i++;if(i>=n)break;let t=i;for(;i<n&&!je.test(e[i]);)i++;r.push({start:t,end:i})}return r}function Ne(e,t,n,r,{advances:i,tracking:a=0},o=0){let s=Me(e,t,n);if(s.length===0)return[{start:t,end:t}];if(r<=0)return[{start:s[0].start,end:s[s.length-1].end}];let c=[],l=null,u=0,d=Math.max(0,o),f=()=>r-d;for(let t of s){let n=!1;for(let r of Ae(e,t.start,t.end)){let e=r.start,t=r.end,o=l!==null&&!n?e-1:e,s=u+Te(o,t,i),p=Math.min(a,De(t-1,i));if(l!==null&&s-p<=f())l.end=t,u=s;else{for(l!==null&&(c.push(l),d=0);;){let n=e;for(;n<t&&Ee(e,n+1,i,a)<=f();)n++;if(n===t||n===e)break;c.push({start:e,end:n}),d=0,e=n}l={start:e,end:t},u=Te(e,t,i)}n=!0}}return l!==null&&c.push(l),c}function Pe(e,t){let n=e.row.map(e=>e.node.localRect).sort((e,t)=>e.x-t.x),r=[];for(let e=1;e<n.length;e++){let i=n[e-1].x+n[e-1].width-t,a=n[e].x-t;a>i&&r.push({start:i,end:a})}return r}function Fe(e,t,n,r,i){if(e.style.ruleBreak!==`intersection`)return[{start:0,end:i}];let a=[t[n-1],t[n]].flatMap(e=>Pe(e,r)).sort((e,t)=>e.start-t.start),o=(e,t)=>({start:e,end:t,spanned:!1,beforeOccupied:!0,afterOccupied:!0}),s=[],c=0;for(let e of a)e.start>c&&s.push(o(c,e.start)),c=Math.max(c,e.end);return c<i&&s.push(o(c,i)),ve(s,`intersection`,`all`,e.style.ruleInset===`overlap-join`?`overlap-join`:0)}function Ie(e,t){return typeof t!=`number`||t<=0?e:e.map(e=>({...e,start:e.start+t,end:e.end-t})).filter(e=>e.end>e.start)}function Le(e,t,n,r,i,a,o){let s=Fn(e.style,`x`,t),c=Fn(e.style,`y`,n),l=qe(e).map(e=>{let n=X(e.style.margin,t);return{node:e,base:Ke(e,t,o),grow:e.style.flexGrow,shrink:e.style.flexShrink,min:Xe(e,t,o),max:Ln(e.style.maxWidth,t),margin:n}}),u=[];if(e.style.flexWrap===`wrap`){let n=[],r=0;for(let e of l){let i=Math.max(0,An(e.base,e.min,e.max))+(e.margin.left??0)+(e.margin.right??0),a=n.length===0?i:r+s+i;n.length>0&&a>t&&(u.push(n),n=[],r=0),n.push(e),r=n.length===1?i:r+s+i}n.length>0&&u.push(n),e.style.wrapReverse&&u.reverse()}else u.push(l);let d=i.left+a.left,f=i.top+a.top,p=u.map(e=>{let n=s*Math.max(0,e.length-1),i=e.reduce((e,t)=>e+(t.margin.left??0)+(t.margin.right??0),0),a=Math.max(0,t-n-i),c=e.some(e=>e.margin.left===null||e.margin.right===null),l=e.reduce((e,t)=>e+t.base,0),u=c&&l<=a?e.map(e=>Math.max(0,An(e.base,e.min,e.max))):Ue(e,a);for(let n=0;n<e.length;n++)J(e[n].node,t,r,0,0,`fill`,o,{width:u[n]});return{row:e,widths:u,availableForItems:a,height:e.reduce((e,t)=>Math.max(e,t.node.localRect.height),0)}}),m=p.map(e=>e.height),h=c*Math.max(0,p.length-1),g;if(e.style.flexWrap===`nowrap`)r===void 0?Number.isFinite(n)&&(m[0]=Math.max(n,m[0]??0)):m[0]=r,g=[0];else{let t=m.reduce((e,t)=>e+t,0),r=Number.isFinite(n)?Math.max(0,n-t-h):0,i=Je(e.style);if(i===`stretch`&&r>0){let e=B(Array.from({length:p.length},()=>1),r);for(let t=0;t<m.length;t++)m[t]+=e[t];g=He(`start`,m,0)}else g=He(i===`stretch`?`start`:i,m,r)}for(let i=0;i<p.length;i++){let{row:a,widths:l,availableForItems:u}=p[i],h=m[i],_=g[i]+i*c;for(let i=0;i<a.length;i++){let s=a[i].node,c=We(s,e),u=a[i].margin,d=u.top===null||u.bottom===null,f=s.style.height!==void 0&&s.style.height.kind!==`auto`;if(c===`stretch`&&!d&&!f&&h!==s.localRect.height){let e=u.top??0,a=u.bottom??0,c=Number.isFinite(n)?n:void 0,d=An(Math.max(0,h-e-a),Ln(s.style.minHeight,c)??0,Ln(s.style.maxHeight,c));if(d===s.localRect.height)continue;J(s,t,r,0,0,`fill`,o,{width:l[i],height:d})}}let v=l.reduce((e,t)=>e+t,0),y=Math.max(0,u-v),b=a.reduce((e,t)=>e+ +(t.margin.left===null)+ +(t.margin.right===null),0),x=Array.from({length:a.length},()=>0),S=Array.from({length:a.length},()=>0),C;if(b>0&&y>0){let e=B(Array.from({length:b},()=>1),y),t=0;for(let n=0;n<a.length;n++)a[n].margin.left===null&&(x[n]=e[t++]),a[n].margin.right===null&&(S[n]=e[t++]);C=He(`start`,l,0)}else C=He(Ye(e.style),l,y);let w=0;for(let t=0;t<a.length;t++){let n=a[t],r=n.node,i=n.margin.left??0,o=n.margin.right??0;w+=x[t]+i,r.localRect={...r.localRect,x:d+C[t]+t*s+w,y:f+_+Be(r,e.style.alignItems,h,n.margin)},w+=S[t]+o}}let _=m.reduce((e,t)=>e+t,0)+h,v=Number.isFinite(n)?Math.max(n,_):_;if(e.style.ruleX||e.style.ruleY){let n=[],r=[];for(let i=0;i<p.length;i++){let a=g[i]+i*c;for(let e of Pe(p[i],d))n.push({bandStart:e.start,bandSize:e.end-e.start,start:a,end:a+m[i]});if(i>0){let n=g[i-1]+(i-1)*c+m[i-1];if(a>n)for(let o of Fe(e,p,i,d,t))r.push({bandStart:n,bandSize:a-n,...o})}}e.decorationRuns=ye({glyphs:j(e.style.glyphSet),ruleX:e.style.ruleX,ruleY:e.style.ruleY,vertical:Ie(n,e.style.ruleInset),horizontal:Ie(r,e.style.ruleInset),contentWidth:t,contentHeight:v,border:i,borderStyle:e.style.borderStyle,borderColor:e.style.borderColor,padding:a})}return Re(e,i,a,t,v),v}function Re(e,t,n,r,i){for(let a of e.children)q(a.style)&&(a.staticSlot={kind:`flex`,direction:e.style.flexDirection,originX:t.left+n.left,originY:t.top+n.top,innerWidth:r,innerHeight:i})}function ze(e,t,n,r,i,a,o){let s=Fn(e.style,`y`,n),c=qe(e).map(i=>{let a=X(i.style.margin,t),s=Math.max(0,t-(a.left??0)-(a.right??0)),c=We(i,e)===`stretch`;J(i,s,r&&Number.isFinite(n)?n:void 0,0,0,c?`fill`:`shrink`,o);let l=Number.isFinite(n)?n:void 0,u=i.style.flexBasis,d=u===void 0||u.kind===`auto`?i.unclampedHeight:u.kind===`cells`?u.value:u.kind===`percent`&&l!==void 0?F(u.value,l):i.unclampedHeight,f=i.style.minHeight===`auto`?i.style.overflow.y===`visible`?i.localRect.height:0:void 0;return{node:i,base:d,grow:i.style.flexGrow,shrink:i.style.flexShrink,min:f??Ln(i.style.minHeight,l)??0,max:Ln(i.style.maxHeight,l),margin:a}}),l=s*Math.max(0,c.length-1),u=c.reduce((e,t)=>e+(t.margin.top??0)+(t.margin.bottom??0),0),d=Number.isFinite(n),f=c.reduce((e,t)=>e+t.base,0),p=d?Math.max(0,n-l-u):f,m=r?p:Math.max(p,f),h=c.some(e=>e.margin.top===null||e.margin.bottom===null),g=d&&!(d&&h&&f<=m)?Ue(c,m):c.map(e=>Math.max(0,An(e.base,e.min,e.max)));for(let n=0;n<c.length;n++)if(g[n]!==c[n].node.localRect.height){let r=c[n],i=Math.max(0,t-(r.margin.left??0)-(r.margin.right??0)),a=We(r.node,e)===`stretch`;J(r.node,i,g[n],0,0,a?`fill`:`shrink`,o,{height:g[n]})}let _=g.reduce((e,t)=>e+t,0),v=Math.max(0,m-_),y=c.reduce((e,t)=>e+ +(t.margin.top===null)+ +(t.margin.bottom===null),0),b=Array.from({length:c.length},()=>0),x=Array.from({length:c.length},()=>0),S;if(y>0&&v>0){let e=B(Array.from({length:y},()=>1),v),t=0;for(let n=0;n<c.length;n++)c[n].margin.top===null&&(b[n]=e[t++]),c[n].margin.bottom===null&&(x[n]=e[t++]);S=He(`start`,g,0)}else S=He(Ye(e.style),g,v);let C=i.left+a.left,w=i.top+a.top,T=0;for(let n=0;n<c.length;n++){let r=c[n],i=r.node,a=r.margin.top??0,o=r.margin.bottom??0;T+=b[n]+a,i.localRect={...i.localRect,x:C+Ve(i,e.style.alignItems,t,r.margin),y:w+S[n]+n*s+T},T+=x[n]+o}let E=_+l+u,D=d?Math.max(n,E):E;if(e.style.ruleY&&c.length>1){let n=[],r=c.map(e=>e.node.localRect).slice().sort((e,t)=>e.y-t.y);for(let e=1;e<r.length;e++){let i=r[e-1].y+r[e-1].height-w,a=r[e].y-w-i;a>0&&n.push({bandStart:i,bandSize:a,start:0,end:t})}e.decorationRuns=ye({glyphs:j(e.style.glyphSet),ruleX:null,ruleY:e.style.ruleY,vertical:[],horizontal:Ie(n,e.style.ruleInset),contentWidth:t,contentHeight:D,border:i,borderStyle:e.style.borderStyle,borderColor:e.style.borderColor,padding:a})}return Re(e,i,a,t,D),D}function Be(e,t,n,r){let i=e.style.alignSelf===`auto`?t:e.style.alignSelf,a=r.top??0,o=r.bottom??0,s=n-e.localRect.height,c=r.top===null&&r.bottom===null,l=r.top===null&&r.bottom!==null,u=r.bottom===null&&r.top!==null;return c?Math.floor(s/2):l?s-o:u?a:a+Ge(i,n,e.localRect.height)}function Ve(e,t,n,r){let i=e.style.alignSelf===`auto`?t:e.style.alignSelf,a=r.left??0,o=r.right??0,s=n-e.localRect.width,c=r.left===null&&r.right===null,l=r.left===null&&r.right!==null,u=r.right===null&&r.left!==null;return c?Math.floor(s/2):l?s-o:u?a:a+Ge(i,n,e.localRect.width)}function He(e,t,n){let r=t.length;if(r===0)return[];let i=[],a=0;if(e===`space-between`&&r>1){let e=Math.floor(n/(r-1)),o=n-e*(r-1);for(let n=0;n<r;n++)i.push(a),a+=t[n]+e+ +(n<o);return i}if((e===`space-around`||e===`space-evenly`)&&n>0){let o=B(Array.from({length:r+1},(t,n)=>e===`space-evenly`||n===0||n===r?1:2),n);for(let e=0;e<r;e++)a+=o[e],i.push(a),a+=t[e];return i}e===`center`?a=Math.floor(n/2):e===`end`&&(a=n);for(let e=0;e<r;e++)i.push(a),a+=t[e];return i}function Ue(e,t){let n=e.length,r=(t,n)=>Math.max(0,An(t,e[n].min??0,e[n].max)),i=e.map(e=>e.base),a=t>=i.reduce((e,t,n)=>e+r(t,n),0),o=Array.from({length:n},()=>0),s=Array.from({length:n},()=>!1);for(let t=0;t<n;t++){let n=r(i[t],t);((a?e[t].grow:e[t].shrink)===0||a&&i[t]>n||!a&&i[t]<n)&&(o[t]=n,s[t]=!0)}for(;;){let c=[];for(let e=0;e<n;e++)s[e]||c.push(e);if(c.length===0)break;let l=o.reduce((e,t,n)=>s[n]?e+t:e,0),u=c.reduce((e,t)=>e+i[t],0),d=t-l-u,f=a?Math.max(0,d):Math.max(0,-d),p=B(c.map(t=>a?e[t].grow:i[t]*e[t].shrink),f),m=c.map((e,t)=>i[e]+(a?p[t]:-p[t])),h=c.map((e,t)=>r(m[t],e)),g=h.reduce((e,t,n)=>e+(t-m[n]),0);if(g===0){for(let e=0;e<c.length;e++)o[c[e]]=h[e];break}for(let e=0;e<c.length;e++){let t=h[e]-m[e];(g>0?t>0:t<0)&&(o[c[e]]=h[e],s[c[e]]=!0)}}return o}function B(e,t){let n=e.reduce((e,t)=>e+t,0);if(n===0||t<=0)return e.map(()=>0);let r=e.map(e=>e/n*t),i=r.map(Math.floor),a=t-i.reduce((e,t)=>e+t,0);if(a>0){let e=r.map((e,t)=>[t,e-Math.floor(e)]).sort((e,t)=>t[1]===e[1]?e[0]-t[0]:t[1]-e[1]);for(let[t]of e){if(a<=0)break;i[t]+=1,--a}}return i}function We(e,t){return e.style.alignSelf===`auto`?t.style.alignItems:e.style.alignSelf}function Ge(e,t,n){return e===`center`?Math.max(0,Math.floor((t-n)/2)):e===`end`?Math.max(0,t-n):0}function Ke(e,t,n){let r=e.style.flexBasis,i=e.style.width;return r!==void 0&&r.kind!==`auto`?qn(r,t,e,n):i!==void 0&&i.kind!==`auto`?qn(i,t,e,n):Jn(e,n)}function qe(e){let t=e.children.filter(e=>!q(e.style)).sort((e,t)=>e.style.order-t.style.order);return e.style.flexReverse&&t.reverse(),t}function Je(e){return e.wrapReverse?e.alignContent===`start`?`end`:e.alignContent===`end`?`start`:e.alignContent:e.alignContent}function Ye(e){let t=e.justifyContent===`stretch`?`start`:e.justifyContent;return e.flexReverse?t===`start`?`end`:t===`end`?`start`:t:t}function Xe(e,t,n){return e.style.minWidth===`auto`?e.style.overflow.x===`visible`?Zn(e,n):0:Ln(e.style.minWidth,t)??0}function Ze(e){return e===`auto`||e===`scroll`}function Qe(e){return e.children.filter(e=>e.inlineBox)}function $e(e){return{right:e.scrollbarSize.y+e.scrollbarInset.x,bottom:e.scrollbarSize.x+e.scrollbarInset.y}}function et(e){if(e.scrollbarWidth===`none`)return{right:0,bottom:0};let t=$e(e);return{right:e.overflow.y===`scroll`?t.right:0,bottom:e.overflow.x===`scroll`?t.bottom:0}}function tt(){return{display:`block`,flexDirection:`row`,flexReverse:!1,flexWrap:`nowrap`,wrapReverse:!1,flexGrow:0,flexShrink:0,flexBasis:void 0,order:0,justifyContent:`stretch`,alignContent:`stretch`,alignItems:`stretch`,alignSelf:`auto`,justifyItems:`stretch`,justifySelf:`auto`,gridTemplateColumns:{kind:`none`},gridTemplateRows:{kind:`none`},gridAutoColumns:[rt()],gridAutoRows:[rt()],gridAutoFlow:{direction:`row`,dense:!1},gridTemplateAreas:null,gridColumnStart:{kind:`auto`},gridColumnEnd:{kind:`auto`},gridRowStart:{kind:`auto`},gridRowEnd:{kind:`auto`},width:void 0,height:void 0,minWidth:`auto`,minHeight:`auto`,maxWidth:void 0,maxHeight:void 0,padding:nt(),margin:{top:0,right:0,bottom:0,left:0},position:`static`,insets:{top:null,right:null,bottom:null,left:null},gapX:0,gapY:0,border:nt(),borderStyle:{top:`solid`,right:`solid`,bottom:`solid`,left:`solid`},overflow:{x:`visible`,y:`visible`},scrollbarWidth:`auto`,scrollbarSize:{x:1,y:1},scrollbarInset:{x:0,y:0},overscroll:{x:!0,y:!0},scrollbarColor:null,whiteSpace:`normal`,tabSize:8,lineGap:0,tracking:0,textOverflow:`clip`,color:void 0,backgroundColor:void 0,backgroundClear:!1,fontWeight:`400`,fontStyle:`normal`,textDecorationLine:`none`,borderColor:{top:void 0,right:void 0,bottom:void 0,left:void 0},textAlignBlocked:!1,textAlign:`start`,textIndent:0,tableRole:`none`,tableLayout:`auto`,borderCollapse:!1,borderSpacingX:0,borderSpacingY:0,captionSide:`top`,verticalAlign:`start`,glyphSet:null,opacity:1,zIndex:null,latticeBorder:null,ruleX:null,ruleY:null,ruleBreak:`normal`,ruleInset:0,ruleVisibilityItems:`normal`,columnCount:null,columnWidth:null,columnFill:`balance`,columnSpan:!1,breakBeforeColumn:!1,breakAfterColumn:!1,breakInsideAvoid:!1}}function nt(){return{top:0,right:0,bottom:0,left:0}}function rt(){return{min:{kind:`auto`},max:{kind:`auto`}}}function it(e,t,n,r,i,a){let o=e.style,s=Number.isFinite(n)?n:void 0,c=e.subgrid?.cols,l=e.subgrid?.rows,u=c?c.gap:Fn(o,`x`,t),d=l?l.gap:Fn(o,`y`,s),f=mt(e,t,s,u,d,e.subgrid?{col:e.subgrid.colSpan,row:e.subgrid.rowSpan}:void 0),{children:p,placed:m,colLines:h,rowLines:g,colTracks:_,rowTracks:v,colCollapsed:y,rowCollapsed:b}=f,x=p.map(e=>X(e.style.margin,t)),S=p.map(e=>e.style.justifySelf===`auto`?o.justifyItems:e.style.justifySelf),C=p.map(at),w=c?st(c):Ot(_,y,ct(f,C,x,a),t,u,o.justifyContent===`stretch`),T=c?c.positions:kt(w,t,o.justifyContent),E=[];for(let e=0;e<p.length;e++){let t=p[e],n=m.items[e],r=jt(T,w.sizes,n.col.start,n.col.span),i=x[e],o=Math.max(0,r-V(i)),s=C[e];if(s.cols||s.rows){let e=s.cols?ot(T,w,u,n.col.start,n.col.span,ut(t,`cols`,i,r)):void 0;t.subgrid={colSpan:n.col.span,rowSpan:n.row.span,cols:e,rows:void 0}}else t.subgrid=void 0;let c=S[e],l=i.left===null||i.right===null,d=t.style.width!==void 0&&t.style.width.kind!==`auto`;s.cols?J(t,r,void 0,0,0,`fill`,a,{width:o}):c===`stretch`&&!l&&!d?J(t,r,void 0,0,0,`fill`,a,{width:An(o,t.style.minWidth===`auto`?t.style.overflow.x===`visible`?Zn(t,a):0:Ln(t.style.minWidth,r)??0,Rn(t.style.maxWidth,r,t,a))}):J(t,o,void 0,0,0,`shrink`,a),E.push(t.localRect.width)}let D=l?st(l):Ot(v,b,lt(f,C,x),s??`max-content`,d,o.alignContent===`stretch`),O=At(D),k=l?l.positions:kt(D,s??O,o.alignContent),A=r.left+i.left,ee=r.top+i.top;for(let t=0;t<p.length;t++){let n=p[t],r=m.items[t],i=x[t],o=jt(T,w.sizes,r.col.start,r.col.span),s=jt(k,D.sizes,r.row.start,r.row.span),c=Math.max(0,s-vt(i)),l=We(n,e),u=i.top===null||i.bottom===null,f=n.style.height!==void 0&&n.style.height.kind!==`auto`;if(C[t].rows)n.subgrid.rows=ot(k,D,d,r.row.start,r.row.span,ut(n,`rows`,i,o)),J(n,o,s,0,0,`fill`,a,{width:E[t],height:c});else if(l===`stretch`&&!u&&!f){let e=An(c,n.style.minHeight===`auto`?n.style.overflow.y===`visible`?n.localRect.height:0:Ln(n.style.minHeight,s)??0,Ln(n.style.maxHeight,s));e!==n.localRect.height&&J(n,o,s,0,0,`fill`,a,{width:E[t],height:e})}else n.style.height?.kind===`percent`&&J(n,o,s,0,0,`fill`,a,{width:E[t]});n.localRect={...n.localRect,x:A+T[r.col.start]+Mt(S[t],i.left,i.right,o,n.localRect.width),y:ee+k[r.row.start]+Mt(l,i.top,i.bottom,s,n.localRect.height)}}let te=Number.isFinite(n)?Math.max(n,O):O;if(o.ruleX||o.ruleY){let n=w.sizes.length,a=D.sizes.length,s=Array.from({length:n},()=>Array.from({length:a},()=>!1)),c=Array.from({length:Math.max(0,n-1)},()=>Array.from({length:a},()=>!1)),l=Array.from({length:Math.max(0,a-1)},()=>Array.from({length:n},()=>!1));for(let e of m.items)for(let t=e.col.start;t<e.col.start+e.col.span&&t<n;t++)for(let r=e.row.start;r<e.row.start+e.row.span&&r<a;r++)s[t][r]=!0,t+1<e.col.start+e.col.span&&t<n-1&&(c[t][r]=!0),r+1<e.row.start+e.row.span&&r<a-1&&(l[r][t]=!0);let u=(e,t,n,r,i,a)=>t.map((t,o)=>({start:t,end:t+n[o],spanned:r[e]?.[o]??!1,beforeOccupied:i(o),afterOccupied:a(o)})),d=(e,t,n)=>{let r=[];for(let i=1;i<e.length;i++){let a=e[i-1]+t[i-1],s=e[i]-a;if(!(s<=0))for(let e of ve(n(i-1),o.ruleBreak,o.ruleVisibilityItems,o.ruleInset))r.push({bandStart:a,bandSize:s,...e})}return r},f=d(T,w.sizes,e=>u(e,k,D.sizes,c,t=>s[e]?.[t]??!1,t=>s[e+1]?.[t]??!1)),p=d(k,D.sizes,e=>u(e,T,w.sizes,l,t=>s[t]?.[e]??!1,t=>s[t]?.[e+1]??!1));e.decorationRuns=ye({glyphs:j(o.glyphSet),ruleX:o.ruleX,ruleY:o.ruleY,vertical:f,horizontal:p,contentWidth:t,contentHeight:te,border:r,borderStyle:o.borderStyle,borderColor:o.borderColor,padding:i})}let ne=e.children.filter(e=>q(e.style));if(ne.length>0){let e=q(o)?{x:r.left,y:r.top,width:i.left+t+i.right,height:i.top+te+i.bottom}:{x:A,y:ee,width:t,height:te};for(let n of ne){let r=ft(n.style.gridColumnStart,n.style.gridColumnEnd,h,m.colOrigin,T,w.sizes,-i.left,t+i.right),a=ft(n.style.gridRowStart,n.style.gridRowEnd,g,m.rowOrigin,k,D.sizes,-i.top,te+i.bottom);n.staticSlot={kind:`grid`,area:{x:A+r.start,y:ee+a.start,width:Math.max(0,r.end-r.start),height:Math.max(0,a.end-a.start)},staticArea:e}}}return te}function at(e){let t=e.style.display===`grid`;return{cols:t&&e.style.gridTemplateColumns.kind===`subgrid`,rows:t&&e.style.gridTemplateRows.kind===`subgrid`}}function ot(e,t,n,r,i,a){let o=e[r]+a.start,s=t.sizes.slice(r,r+i);return s[0]=Math.max(0,s[0]-a.start),s[i-1]=Math.max(0,s[i-1]-a.end),{positions:Array.from({length:i},(t,n)=>n===0?0:e[r+n]-o),sizes:s,gapBefore:Array.from({length:i},(e,n)=>n===0?0:t.gapBefore[r+n]),gap:n}}function st(e){return{sizes:e.sizes,gapBefore:e.gapBefore,limits:e.sizes}}function ct(e,t,n,r){let i=[];return e.children.forEach((a,o)=>{let s=e.placed.items[o],c=n[o];if(t[o].cols){let e=ut(a,`cols`,c,0);for(let t of dt(a,`cols`,s,e,r))i.push({...t,start:t.start+s.col.start});return}i.push({start:s.col.start,span:s.col.span,min:Xn(a,`min`,r)+V(c),max:Xn(a,`max`,r)+V(c)})}),i}function lt(e,t,n){let r=[];return e.children.forEach((i,a)=>{let o=e.placed.items[a],s=n[a];if(t[a].rows){let e=ut(i,`rows`,s,0);for(let t of dt(i,`rows`,o,e))r.push({...t,start:t.start+o.row.start});return}let c=i.localRect.height+vt(s),l=i.style.minHeight===`auto`&&i.style.overflow.y!==`visible`?vt(s):c;r.push({start:o.row.start,span:o.row.span,min:l,max:c})}),r}function ut(e,t,n,r){let{border:i,padding:a}=e.style;return t===`cols`?{start:(n.left??0)+i.left+Y(a.left,r),end:(n.right??0)+i.right+Y(a.right,r)}:{start:(n.top??0)+i.top+Y(a.top,r),end:(n.bottom??0)+i.bottom+Y(a.bottom,r)}}function dt(e,t,n,r,i){let a=t===`cols`?n.col.span:n.row.span,o=mt(e,void 0,void 0,0,0,{col:n.col.span,row:n.row.span}),s=[];if(o.children.forEach((e,n)=>{let c=o.placed.items[n],l=t===`cols`?c.col:c.row,u=l.start===0,d=l.start+l.span===a,f=(u?r.start:0)+(d?r.end:0),p=X(e.style.margin,0);if(at(e)[t]){let n=ut(e,t,p,0),a=dt(e,t,c,{start:n.start+(u?r.start:0),end:n.end+(d?r.end:0)},i);for(let e of a)s.push({...e,start:e.start+l.start});return}if(t===`cols`)s.push({start:l.start,span:l.span,min:Xn(e,`min`,i)+V(p)+f,max:Xn(e,`max`,i)+V(p)+f});else{let t=e.localRect.height+vt(p)+f;s.push({start:l.start,span:l.span,min:t,max:t})}}),s.length===0){let e=r.start+r.end;s.push({start:0,span:a,min:e,max:e})}return s}function ft(e,t,n,r,i,a,o,s){let c=wt(e,`start`,n),l=wt(t,`end`,n);c!==null&&l!==null?c>l?[c,l]=[l,c]:c===l&&(l=null):c!==null&&t.kind===`span`?l=Tt(c,t,1,n):l!==null&&e.kind===`span`&&(c=Tt(l,e,-1,n));let u=i.length,d=e=>{if(e===null)return;let t=e-r;return t<0||t>u||u===0?void 0:t},f=e=>e===u?i[u-1]+a[u-1]:i[e],p=e=>e===0?i[0]:i[e-1]+a[e-1],m=d(c),h=d(l);return{start:m===void 0?o:f(m),end:h===void 0?s:p(h)}}function pt(e,t){let n=t.gridIntrinsic.get(e);if(n!==void 0)return n;let r=e.style,i=Math.max(typeof r.gapX==`number`?r.gapX:0,r.ruleX?.width??0),a=mt(e,void 0,void 0,i,0,e.subgrid?{col:e.subgrid.colSpan,row:e.subgrid.rowSpan}:void 0),o=a.children.map(at),s=a.children.map(e=>X(e.style.margin,0)),c=Ot(a.colTracks,a.colCollapsed,ct(a,o,s,t),`min-content`,i,!1),l=c.gapBefore.reduce((e,t)=>e+t,0),u={min:c.sizes.reduce((e,t)=>e+t,0)+l,max:c.limits.reduce((e,t)=>e+t,0)+l};return t.gridIntrinsic.set(e,u),u}function mt(e,t,n,r,i,a){let o=e.style,s=_t(e),c=o.gridTemplateColumns.kind===`subgrid`&&a!==void 0,l=o.gridTemplateRows.kind===`subgrid`&&a!==void 0,u=c?ht(a.col):yt(o.gridTemplateColumns,t,r),d=l?ht(a.row):yt(o.gridTemplateRows,n,i),f=o.gridTemplateAreas,p=[...u.tracks],m=[...d.tracks];if(f){c||xt(p,u.lineNames,f.columns,o.gridAutoColumns),l||xt(m,d.lineNames,f.rows,o.gridAutoRows);for(let[e,t]of f.areas)u.lineNames[Math.min(t.colStart,p.length)].push(`${e}-start`),u.lineNames[Math.min(t.colEnd,p.length)].push(`${e}-end`),d.lineNames[Math.min(t.rowStart,m.length)].push(`${e}-start`),d.lineNames[Math.min(t.rowEnd,m.length)].push(`${e}-end`)}let h={explicitCount:p.length,names:u.lineNames},g={explicitCount:m.length,names:d.lineNames},_=Dt(s.map(e=>({col:Et(e.style.gridColumnStart,e.style.gridColumnEnd,h),row:Et(e.style.gridRowStart,e.style.gridRowEnd,g)})),p.length,m.length,o.gridAutoFlow);return c&&gt(_,`col`,p.length),l&&gt(_,`row`,m.length),{children:s,placed:_,colLines:h,rowLines:g,colTracks:St(p,_.colOrigin,_.colCount,o.gridAutoColumns),rowTracks:St(m,_.rowOrigin,_.rowCount,o.gridAutoRows),colCollapsed:Ct(u,_.colOrigin,_.colCount,_.items.map(e=>e.col)),rowCollapsed:Ct(d,_.rowOrigin,_.rowCount,_.items.map(e=>e.row))}}function ht(e){return{tracks:Array.from({length:e},()=>rt()),lineNames:Array.from({length:e+1},()=>[])}}function gt(e,t,n){let r=t===`col`?e.colOrigin:e.rowOrigin;for(let i of e.items){let e=i[t],a=Math.min(Math.max(e.start+r,0),n-1),o=Math.min(Math.max(e.start+r+e.span,a+1),n);e.start=a,e.span=o-a}t===`col`?(e.colOrigin=0,e.colCount=n):(e.rowOrigin=0,e.rowCount=n)}function _t(e){return e.children.filter(e=>!q(e.style)&&!e.inlineBox).sort((e,t)=>e.style.order-t.style.order)}function V(e){return(e.left??0)+(e.right??0)}function vt(e){return(e.top??0)+(e.bottom??0)}function yt(e,t,n){if(e.kind!==`tracks`)return{tracks:[],lineNames:[[]]};let r=(e.lineNames??Array.from({length:e.tracks.length+1},()=>[])).map(e=>[...e]);if(!e.autoRepeat)return{tracks:e.tracks,lineNames:r};let{index:i,tracks:a,mode:o}=e.autoRepeat,s=1;if(t!==void 0){let e=a.reduce((e,n)=>{let r=bt(n.min,t)??bt(n.max,t)??1;return e+Math.max(1,r)},0);s=Math.max(1,Math.floor((t+n)/(e+n*a.length)))}let c=[];for(let e=0;e<s;e++)c.push(...a);let l=[...e.tracks.slice(0,i),...c,...e.tracks.slice(i)],u=e.autoRepeat.lineNames??Array.from({length:a.length+1},()=>[]),d=r.slice(0,i),f=[...e.autoRepeat.leadingNames??[]];for(let e=0;e<s;e++){f.push(...u[0]);for(let e=0;e<a.length;e++)d.push(f),f=[...u[e+1]]}return d.push([...f,...r[i]]),d.push(...r.slice(i+1)),o===`auto-fit`?{tracks:l,lineNames:d,autoFit:{start:i,end:i+c.length}}:{tracks:l,lineNames:d}}function bt(e,t){if(e.kind===`cells`)return e.value;if(e.kind===`percent`&&t!==void 0)return F(e.value,t);if(e.kind===`math`){let n=[];for(let r of e.args){let e=bt(r,t);if(e===void 0)return;n.push(e)}return e.fn===`min`?Math.min(...n):Math.max(...n)}}function xt(e,t,n,r){for(let i=e.length;i<n;i++)e.push(r[(i-e.length)%r.length]),t.push([])}function St(e,t,n,r){let i=[];for(let a=0;a<n;a++){let n=a+t;if(n>=0&&n<e.length)i.push(e[n]);else{let t=n<0?n:n-e.length;i.push(r[(t%r.length+r.length)%r.length])}}return i}function Ct(e,t,n,r){let i=Array.from({length:n},()=>!1);if(!e.autoFit)return i;for(let a=e.autoFit.start;a<e.autoFit.end;a++){let e=a-t;e<0||e>=n||r.some(t=>e>=t.start&&e<t.start+t.span)||(i[e]=!0)}return i}function wt(e,t,n){if(e.kind===`line`)return e.value>0?e.value-1:n.explicitCount+1+e.value;if(e.kind!==`name`)return null;if(e.nth===void 0){let r=`${e.name}-${t}`,i=n.names.findIndex(e=>e.includes(r));if(i!==-1)return i}let r=e.nth??1,i=n.explicitCount,a=0;if(r>0){for(let t=0;t<=i;t++)if(n.names[t].includes(e.name)&&++a===r)return t;return i+(r-a)}for(let t=i;t>=0;t--)if(n.names[t].includes(e.name)&&++a===-r)return t;return-(-r-a)}function Tt(e,t,n,r){if(t.name===void 0)return e+n*t.value;let i=t.value,a=e;for(;i>0;)a+=n,(!(a>=0&&a<=r.explicitCount)||r.names[a].includes(t.name))&&i--;return a}function Et(e,t,n){let r=wt(e,`start`,n),i=wt(t,`end`,n);if(r!==null&&i!==null)return r===i?{start:r,span:1}:{start:Math.min(r,i),span:Math.abs(i-r)};if(r!==null)return{start:r,span:(t.kind===`span`?Tt(r,t,1,n):r+1)-r};if(i!==null){let t=e.kind===`span`?Tt(i,e,-1,n):i-1;return{start:t,span:i-t}}return{start:null,span:e.kind===`span`?e.value:t.kind===`span`?t.value:1}}function Dt(e,t,n,r){let i=r.direction===`row`,a=e.map(e=>i?e.row:e.col),o=e.map(e=>i?e.col:e.row),s=i?t:n,c=i?n:t,l=0,u=Math.max(s,1);for(let t=0;t<e.length;t++){let e=o[t];e.start!==null&&(l=Math.min(l,e.start),u=Math.max(u,e.start+e.span))}for(let t=0;t<e.length;t++){let e=o[t];e.start===null&&(u=Math.max(u,l+e.span))}let d=0;for(let t=0;t<e.length;t++){let e=a[t];e.start!==null&&(d=Math.min(d,e.start))}let f=new Set,p=(e,t,n,r)=>{for(let i=e;i<e+n;i++)for(let e=t;e<t+r;e++)if(f.has(`${i}:${e}`))return!1;return!0},m=(e,t,n,r)=>{for(let i=e;i<e+n;i++)for(let e=t;e<t+r;e++)f.add(`${i}:${e}`)},h=e.map(()=>null);for(let t=0;t<e.length;t++){let e=a[t],n=o[t];e.start!==null&&n.start!==null&&(h[t]={major:e.start,minor:n.start},m(e.start,n.start,e.span,n.span))}let g=new Map;for(let t=0;t<e.length;t++){let e=a[t],n=o[t];if(e.start===null||n.start!==null)continue;let i=r.dense?l:Math.max(l,g.get(e.start)??l);for(;!p(e.start,i,e.span,n.span);)i++;h[t]={major:e.start,minor:i},m(e.start,i,e.span,n.span),r.dense||g.set(e.start,i+n.span),u=Math.max(u,i+n.span)}let _=d,v=l;for(let t=0;t<e.length;t++){if(h[t]!==null)continue;let e=a[t],n=o[t];if(r.dense&&(_=d,v=l),n.start!==null){for(n.start<v&&_++;!p(_,n.start,e.span,n.span);)_++;h[t]={major:_,minor:n.start},m(_,n.start,e.span,n.span),v=n.start+n.span}else{let r=_,i=v;for(;;){if(i+n.span>u){r++,i=l;continue}if(p(r,i,e.span,n.span))break;i++}h[t]={major:r,minor:i},m(r,i,e.span,n.span),_=r,v=i+n.span}}let y=Math.max(c,d);for(let t=0;t<e.length;t++)y=Math.max(y,h[t].major+a[t].span);let b=e.map((e,t)=>{let n={start:h[t].major-d,span:a[t].span},r={start:h[t].minor-l,span:o[t].span};return i?{col:r,row:n}:{col:n,row:r}}),x=y-d,S=u-l;return i?{items:b,colOrigin:l,colCount:S,rowOrigin:d,rowCount:x}:{items:b,colOrigin:d,colCount:x,rowOrigin:l,rowCount:S}}function Ot(e,t,n,r,i,a){let o=typeof r==`number`?r:void 0,s=e.map((e,n)=>{if(t[n])return{base:0,limit:0,baseIntrinsic:!1,limitKind:`fixed`,frFactor:0,collapsed:!0};let r=bt(e.min,o),i=r??0,a=r===void 0,s=e.max;if(s.kind===`fr`)return{base:i,limit:null,baseIntrinsic:a,limitKind:`fr`,frFactor:s.value,collapsed:!1};let c=bt(s,o);return c===void 0?{base:i,limit:null,baseIntrinsic:a,limitKind:s.kind===`min-content`?`intrinsic-min`:`intrinsic-max`,frFactor:0,collapsed:!1}:{base:i,limit:c,baseIntrinsic:a,limitKind:`fixed`,frFactor:0,collapsed:!1}}),c=s.map((e,t)=>t===0||e.collapsed?0:s.slice(0,t).some(e=>!e.collapsed)?i:0),l=(e,t)=>{let n=0;for(let r=e+1;r<e+t;r++)n+=c[r];return n},u=e=>e.collapsed?0:e.limitKind===`fixed`?e.limit:Math.max(e.base,e.limit??e.base),d=[...n].sort((e,t)=>e.span-t.span);for(let e of d){let t=[],n=!1;for(let r=e.start;r<e.start+e.span;r++){let e=s[r];e!==void 0&&(e.limitKind===`fr`&&(n=!0),t.push(e))}if(t.length===0)continue;let r=l(e.start,e.span);if(n){let n=t.filter(e=>e.limitKind===`fr`&&e.baseIntrinsic&&!e.collapsed);if(n.length===0)continue;let i=t.reduce((e,t)=>e+t.base,0)+r,a=e.min-i;if(a>0){let e=n.reduce((e,t)=>e+t.frFactor,0),t=B(n.map(t=>e>0?t.frFactor:1),a);n.forEach((e,n)=>{e.base+=t[n]})}continue}let i=t.filter(e=>e.baseIntrinsic&&!e.collapsed);if(i.length>0){let n=t.reduce((e,t)=>e+t.base,0)+r,a=e.min-n;if(a>0){let e=B(i.map(()=>1),a);i.forEach((t,n)=>{t.base+=e[n]})}}for(let[n,i]of[[`intrinsic-min`,e.min],[`intrinsic-max`,e.max]]){let e=t.filter(e=>e.limitKind===n&&!e.collapsed);if(e.length===0)continue;let a=i-(t.reduce((e,t)=>e+u(t),0)+r);if(a>0){let t=B(e.map(()=>1),a);e.forEach((e,n)=>{e.limit=u(e)+t[n]})}}}for(let e of s)e.collapsed||(e.limitKind===`fixed`?e.base=Math.min(e.base,e.limit):e.limitKind!==`fr`&&(e.limit=Math.max(e.base,e.limit??e.base)));if(o===void 0){let e=s.filter(e=>e.limitKind===`fr`&&!e.collapsed);if(e.length>0){let t=0;for(let n of e)n.frFactor>0&&(t=Math.max(t,n.base/n.frFactor));for(let e of n){let n=0,r=l(e.start,e.span);for(let t=e.start;t<e.start+e.span;t++){let e=s[t];e===void 0||e.collapsed||(e.limitKind===`fr`?n+=e.frFactor:r+=u(e))}n<=0||(t=Math.max(t,(e.max-r)/Math.max(n,1)))}for(let n of e){let e=Math.max(n.base,xe(n.frFactor*t));n.limit=e,r===`max-content`&&(n.base=e)}}if(r===`max-content`)for(let e of s)!e.collapsed&&e.limitKind!==`fr`&&(e.base=u(e))}else{let e=c.reduce((e,t)=>e+t,0),t=o-e-s.reduce((e,t)=>e+t.base,0);for(;!(t<=0);){let e=s.filter(e=>!e.collapsed&&e.limitKind!==`fr`&&e.base<u(e));if(e.length===0)break;let n=B(e.map(()=>1),t),r=0;if(e.forEach((e,t)=>{let i=Math.min(n[t],u(e)-e.base);e.base+=i,r+=i}),t-=r,r===0)break}let n=s.filter(e=>e.limitKind===`fr`);if(n.length>0){let t=Math.max(0,o-e-s.reduce((e,t)=>e+(t.limitKind===`fr`?0:t.base),0)),r=n,i=t,a=n.reduce((e,t)=>e+t.frFactor,0);for(a<1&&(i=Math.floor(i*a));;){let e=B(r.map(e=>e.frFactor),i),t=r.filter((t,n)=>e[n]<t.base);if(t.length===0){r.forEach((t,n)=>{t.base=Math.max(t.base,e[n])});break}for(let e of t)i-=e.base;if(i=Math.max(0,i),r=r.filter(e=>!t.includes(e)),r.length===0)break}}if(a){let t=o-e-s.reduce((e,t)=>e+t.base,0),n=s.filter(e=>!e.collapsed&&e.limitKind===`intrinsic-max`);if(t>0&&n.length>0){let e=B(n.map(()=>1),t);n.forEach((t,n)=>{t.base+=e[n]})}}}return{sizes:s.map(e=>e.base),gapBefore:c,limits:s.map(e=>u(e))}}function kt(e,t,n){let{sizes:r,gapBefore:i}=e,a=Math.max(0,t-At(e)),o=He(n===`stretch`?`start`:n,r,a),s=[],c=0;for(let e=0;e<r.length;e++)c+=i[e],s.push(o[e]+c);return s}function At(e){return e.sizes.reduce((e,t)=>e+t,0)+e.gapBefore.reduce((e,t)=>e+t,0)}function jt(e,t,n,r){let i=n+r-1;return e[n]===void 0||e[i]===void 0?0:e[i]+t[i]-e[n]}function Mt(e,t,n,r,i){let a=t??0,o=n??0,s=r-i;return t===null&&n===null?Math.floor(s/2):t===null?s-o:n===null?a:a+Ge(e,r,i+a+o)}function Nt(e,t,n){let r=e.columnWidth===null?null:Math.max(1,Math.floor((t+n)/(e.columnWidth+n)));return e.columnCount!==null&&r!==null?Math.max(1,Math.min(e.columnCount,r)):r===null?Math.max(1,e.columnCount??1):r}function Pt(e,t,n){let r=Nt(e,t,n),i=Math.max(1,Math.floor((t-(r-1)*n)/r)),a=Math.max(0,t-(r*i+(r-1)*n));return Array.from({length:r},(e,t)=>i+ +(t<a))}function Ft(e,t){let n=Math.max(typeof e.gapX==`number`?e.gapX:0,e.ruleX?.width??0);return e.columnCount===null?Math.max(e.columnWidth??1,t):e.columnCount*t+(e.columnCount-1)*n}function It(e,t){return e===void 0?t:t===void 0?e:Math.min(e,t)}function Lt(e,t,n){for(;e<t;){let r=e+t>>1;n(r)?t=r:e=r+1}return e}function Rt(e,t,n){let r=Nt(e,t,n),i=Math.max(1,Math.floor((t-(r-1)*n)/r));return{count:r,width:i,leftover:Math.max(0,t-(r*i+(r-1)*n))}}function zt(e,t,n){return e===`all`?!0:e===`around`?t||n:t&&n}function Bt(e,t,n,r){let i=Nn(e,Math.max(1,t.width-e.style.tracking)),{heights:a,textOffsets:o}=Pn(e,i),s=e.style.lineGap,c=Ht(a.map(e=>e+s)),l;if(e.style.columnFill===`auto`&&r!==void 0)l=Math.max(1,r);else{let e=Lt(c.reduce((e,t)=>Math.max(e,t.rows-s),1),Math.max(1,c.reduce((e,t)=>e+t.rows,0)-s),e=>Vt(c,s,e).columns<=t.count);l=r===void 0?e:Math.max(1,Math.min(e,r))}let u=Vt(c,s,l);return{spans:i,lineY:u.top,textY:u.top.map((e,t)=>e+o[t]),lineX:u.column.map(e=>e*(t.width+n)),totalRows:u.maxUsed,columnCount:t.count,columnWidth:t.width,gap:n,columnsUsed:i.length>0?u.columns:0}}function Vt(e,t,n,r=`truncate`){let i=0,a=0,o=0,s=[],c=[];for(let l=0;l<e.length;l++){let u=e[l],d=r===`glue`||l===0||a>0?u.pre:0;a>0&&(u.forced||a+d+u.rows+u.post-t>n)&&(r===`truncate`&&(d=0),i+=1,a=0);let f=u.rows/u.lines;if(u.lines>1&&u.rows-t>n){for(let e=0;e<u.lines;e++)a>0&&a+d+f-t>n&&(r===`truncate`&&(d=0),i+=1,a=0),s.push(i),c.push(a+d),a+=d+f,d=0,o=Math.max(o,a-t);a+=u.post,u.post>0&&(o=Math.max(o,a));continue}for(let e=0;e<u.lines;e++)s.push(i),c.push(a+d+e*f);a+=d+u.rows+u.post,o=Math.max(o,a-(u.post>0?0:t))}return{columns:i+1,maxUsed:o,column:s,top:c}}function Ht(e){return e.map(e=>({rows:e,pre:0,post:0,forced:!1,lines:1}))}var Ut=null;function H(){if(Ut!==null)return Ut;let e=document.createElement(`div`);e.style.cssText=`position:absolute;left:-9999px;visibility:hidden;columns:2;column-gap:0;column-fill:balance;width:200px;font:10px/20px monospace;orphans:1;widows:1`,e.innerHTML=`<div style="margin:0;padding:0 0 20px 0">aaaaaa aaaaaa aaaaaa</div><div style="margin:0"><span>bbbbbb</span> bbbbbb</div>`,document.body.appendChild(e);let t=e.getBoundingClientRect().top,n=e.querySelector(`span`).getBoundingClientRect();return e.remove(),Ut=!(n.width>0&&n.top-t>=10),Ut}function Wt(e,t,n,r){let i=e.style;if(!i.ruleX)return;let a=t.columnCount*t.columnWidth+(t.columnCount-1)*t.gap,o=t.ruleSegments??[{start:0,end:t.totalRows,columns:t.columnsUsed}],s=[];for(let e of o){let n=Math.min(e.columns,t.columnCount);for(let r=0;r<t.columnCount-1;r++)zt(i.ruleVisibilityItems,r<n,r+1<n)&&s.push({bandStart:(r+1)*t.columnWidth+r*t.gap,bandSize:t.gap,start:e.start,end:e.end})}e.decorationRuns=ye({glyphs:j(i.glyphSet),ruleX:i.ruleX,ruleY:null,vertical:Ie(s,i.ruleInset),horizontal:[],contentWidth:a,contentHeight:t.totalRows,border:n,borderStyle:i.borderStyle,borderColor:i.borderColor,padding:r})}function Gt(e,t){let n=e.style,r=n.padding;return e.text!==``&&e.children.length===0&&n.display===`block`&&n.position===`static`&&!n.columnSpan&&n.whiteSpace===`normal`&&n.lineGap===t.lineGap&&n.border.top===0&&n.border.right===0&&n.border.bottom===0&&n.border.left===0&&r.top===0&&r.right===0&&r.bottom===0&&r.left===0&&n.backgroundColor===void 0&&!n.backgroundClear&&n.overflow.x===`visible`&&n.overflow.y===`visible`&&(n.width===void 0||n.width.kind===`auto`)&&(n.height===void 0||n.height.kind===`auto`)&&(n.minWidth===`auto`||n.minWidth===0||n.minWidth===void 0)&&(n.minHeight===`auto`||n.minHeight===0||n.minHeight===void 0)&&n.maxWidth===void 0&&n.maxHeight===void 0}function Kt(e,t,n,r,i,a,o){let s=e.style,c=Fn(s,`x`,n),l=Rt(s,n,c);a.right+=l.leftover;let u=s.lineGap,d=i.left+a.left,f=i.top+a.top,p=n-l.leftover,m=[[]],h=[];for(let e of t)e.style.columnSpan?(h[m.length-1]=e,m.push([])):m[m.length-1].push(e);let g=m.length>1,_=g?`glue`:`truncate`,v=[],y=0,b=0;for(let e=0;e<m.length;e++){let t=m[e],n=0;if(t.length>0){let i=t.map(e=>({node:e,spans:Nn(e,Math.max(1,l.width-e.style.tracking)),margin:X(e.style.margin,l.width),pre:0,post:0})),a=[],o=null,h=null,x=!1;for(let e of i){let{node:t,spans:n,margin:r}=e,i=o===null?r.top??0:Vn(o,r.top??0),s=i;_===`glue`&&h!==null?(s=0,h.post=i,a[a.length-1].post=i):e.pre=i;let c=x||t.style.breakBeforeColumn;if(t.style.breakInsideAvoid&&n.length>0)a.push({rows:n.length*(1+u),pre:s,post:0,forced:c,lines:n.length});else for(let e=0;e<n.length;e++)a.push({rows:1+u,pre:e>0?0:s,post:0,forced:e===0&&c,lines:1});n.length>0&&(o=r.bottom??0,h=e),x=t.style.breakAfterColumn}n=o??0;let S;if(s.columnFill===`auto`&&r!==void 0)S=Math.max(1,r);else{let e=Lt(1,Math.max(1,Vt(a,u,1/0,_).maxUsed),e=>Vt(a,u,e,_).columns<=l.count);S=r===void 0?e:Math.max(1,Math.min(e,r))}let C=Vt(a,u,S,_);for(let e=0,t=0;e<i.length;e++){let{node:n,spans:r,margin:a,pre:o,post:s}=i[e],u=[],m=[];for(let e=0;e<r.length;e++,t++)u.push(y+C.top[t]),m.push(C.column[t]*(l.width+c));delete n.decorationRuns,n.multicolGeometry={spans:r,lineY:u,textY:u,lineX:m,totalRows:y+C.maxUsed,columnCount:l.count,columnWidth:l.width,gap:c,columnsUsed:C.columns},n.multicolFlow=g?{top:o,right:a.right,bottom:s,left:a.left}:a,n.localRect={x:d,y:f,width:p,height:C.maxUsed},n.resolvedPadding={top:0,right:0,bottom:0,left:0}}a.length>0&&(v.push({start:y,end:y+C.maxUsed,columns:C.columns}),b=Math.max(b,C.columns),y+=C.maxUsed+(e<m.length-1?u:0))}let i=h[e];if(i){let e=X(i.style.margin,p),t=(e.left??0)+(e.right??0);J(i,Math.max(0,p-t),void 0,0,0,`fill`,o);let r=Bn(e,p,i.localRect.width),a=(e.top??0)+n;y+=a,i.localRect={...i.localRect,x:d+r,y:f+y},i.multicolFlowSpan={top:a,right:0,bottom:e.bottom??0,left:r},y+=i.localRect.height+(e.bottom??0)}}let x=y;for(let t of e.children){if(!q(t.style))continue;let e=X(t.style.margin,n);t.staticSlot={kind:`block`,x:d+(e.left??0),y:f+(e.top??0)}}return e.multicolGeometry={spans:[],lineY:[],textY:[],lineX:[],totalRows:x,columnCount:l.count,columnWidth:l.width,gap:c,columnsUsed:b,...g?{ruleSegments:v,nativeBalance:!0}:{}},x}function qt(e,t,n,r,i,a,o){let s=e.style,c=It(n,r),l=e.children.filter(e=>!q(e.style)),u=l.filter(e=>!e.style.columnSpan),d=l.reduce((e,t,n)=>!t.style.columnSpan&&(n===0||l[n-1].style.columnSpan)?e+1:e,0);if(u.length>0&&u.every(e=>Gt(e,s))&&(u.length===l.length||s.columnFill===`balance`&&c===void 0&&(H()||d<=1&&u.every(e=>(e.style.margin.top===0||e.style.margin.top===null)&&(e.style.margin.bottom===0||e.style.margin.bottom===null)))))return Kt(e,l,t,c,i,a,o);let f=Fn(s,`x`,t),p=Pt(s,t,f),m=p.length,h=[];{let e=0;for(let t of p)h.push(e),e+=t+f}let g=e=>e<m?h[e]:h[m-1]+(e-m+1)*(p[m-1]+f),_=e=>p[Math.min(e,m-1)],v=p[m-1],y=i.left+a.left,b=i.top+a.top,x=[],S=0,C=[],w=[],T=!1,E=(e,t)=>{let r=0,i=0,a=null,s=0,c=e=>{if(t)for(let t of w){if(t.index!==e)continue;let n=a===null?t.margin.top??0:Vn(a,t.margin.top??0);t.child.staticSlot={kind:`block`,x:y+g(r)+(t.margin.left??0),y:b+S+i+n}}};for(let l=0;l<C.length;l++){let u=C[l];c(l);let d=a===null?l===0?u.margin.top??0:0:Vn(a,u.margin.top??0),f=u.node.localRect.height;if(a!==null&&(u.breakBefore||i+d+f>e)&&(r+=1,i=0,a=null,d=0),t){let e=u.node,t=_(r);if(t!==v){let r=(u.margin.left??0)+(u.margin.right??0);J(e,Math.max(0,t-r),n,0,0,`fill`,o)}e.localRect={...e.localRect,x:y+g(r)+Bn(u.margin,t,e.localRect.width),y:b+S+i+d}}i+=d+u.node.localRect.height,s=Math.max(s,i),a=u.margin.bottom??0}return c(C.length),{columns:r+1,maxUsed:s}},D=()=>{if(C.length===0){for(let e of w)e.child.staticSlot={kind:`block`,x:y+(e.margin.left??0),y:b+S+(e.margin.top??0)};w=[];return}let e=c===void 0?void 0:Math.max(1,c-S),t=s.columnFill===`auto`&&e!==void 0,r;if(t)r=e;else{let t=Lt(1,E(1/0,!1).maxUsed,e=>E(e,!1).columns<=m);r=e===void 0?t:Math.min(t,e)}let i=E(r,!0),a=t&&n!==void 0?Math.max(i.maxUsed,r):i.maxUsed;if(s.ruleX)for(let e=0;e<m-1;e++){let t=Math.min(i.columns,m);zt(s.ruleVisibilityItems,e<t,e+1<t)&&x.push({bandStart:h[e]+p[e],bandSize:f,start:S,end:S+a})}S+=a,C=[],w=[]};for(let r of e.children){if(q(r.style)){w.push({child:r,margin:X(r.style.margin,t),index:C.length});continue}if(r.style.columnSpan){D(),T=!1;let e=X(r.style.margin,t),i=(e.left??0)+(e.right??0);J(r,Math.max(0,t-i),n,0,0,`fill`,o),S+=e.top??0,r.localRect={...r.localRect,x:y+Bn(e,t,r.localRect.width),y:b+S},S+=r.localRect.height+(e.bottom??0);continue}let e=X(r.style.margin,v),i=(e.left??0)+(e.right??0);J(r,Math.max(0,v-i),n,0,0,`fill`,o),C.push({node:r,margin:e,breakBefore:T||r.style.breakBeforeColumn}),T=r.style.breakAfterColumn}return D(),s.ruleX&&x.length>0&&(e.decorationRuns=ye({glyphs:j(s.glyphSet),ruleX:s.ruleX,ruleY:null,vertical:Ie(x,s.ruleInset),horizontal:[],contentWidth:t,contentHeight:S,border:i,borderStyle:s.borderStyle,borderColor:s.borderColor,padding:a})),S}function Jt(e,n){e.hidden.push(n),n.style.tableRole!==`column`&&n.style.tableRole!==`column-group`&&t(n.source,`Table content outside the expected structure (rows in tables, cells in rows) can't be laid out and was hidden — no anonymous table boxes (specs/table.md).`)}function Yt(e,t){let n=Number.parseInt(e.getAttribute(t)??``,10);return Number.isNaN(n)?1:t===`colspan`?Math.min(1e3,Math.max(1,n)):Math.min(65534,Math.max(0,n))}function Xt(e,t,n){let r=(t,r)=>{let i=t.style.width,a=i&&i.kind!==`auto`&&i.kind!==`percent`?qn(i,0,t,n):void 0,o=i&&i.kind===`percent`?i.value:void 0;for(let t=0;t<r;t++)e.colFixed.push(a),e.colPercent.push(o)};if(t.style.tableRole===`column`){r(t,Zt(t.source));return}let i=t.children.filter(e=>e.style.tableRole===`column`);if(i.length===0)r(t,Zt(t.source));else for(let e of i)r(e,Zt(e.source));for(let n of t.children)n.style.tableRole!==`column`&&Jt(e,n)}function Zt(e){let t=Number.parseInt(e.getAttribute(`span`)??``,10);return Number.isNaN(t)?1:Math.min(1e3,Math.max(1,t))}function Qt(e,t){let n={caption:null,rows:[],rowGroups:[],groupEnds:[],cells:[],columnCount:0,colFixed:[],colPercent:[],hidden:[]},r=[],i=[],a=[];for(let o of e.children){if(q(o.style))continue;let e=o.style.tableRole;if(e===`row`)i.push({row:o,group:null});else if(e===`header-group`||e===`row-group`||e===`footer-group`){let t=e===`header-group`?r:e===`footer-group`?a:i;for(let e of o.children)q(e.style)||(e.style.tableRole===`row`?t.push({row:e,group:o}):Jt(n,e))}else e===`caption`?n.caption===null?n.caption=o:Jt(n,o):e===`column`||e===`column-group`?(Xt(n,o,t),n.hidden.push(o)):Jt(n,o)}let o=[...r,...i,...a],s=0;for(let e=0;e<o.length;e++){n.rows.push(o[e].row),n.rowGroups.push(o[e].group);let t=o[e+1]?.group;if(!(e+1<o.length&&(o[e].group===t||o[e].group===null&&t===null))){for(let t=s;t<=e;t++)n.groupEnds.push(e+1);s=e+1}}return $t(n),n}function $t(e){let t=[];for(let n=0;n<e.rows.length;n++){let r=e.rows[n],i=0;for(let a of r.children){if(q(a.style))continue;if(a.style.tableRole!==`cell`){Jt(e,a);continue}for(;(t[i]??0)>n;)i++;let o=Yt(a.source,`colspan`),s=Yt(a.source,`rowspan`),c=e.groupEnds[n],l=Math.max(1,Math.min(s===0?c-n:s,c-n));for(let e=i;e<i+o;e++)t[e]=Math.max(t[e]??0,n+l);e.cells.push({node:a,rowNode:r,row:n,col:i,rowSpan:l,colSpan:o}),i+=o}}e.columnCount=Math.max(t.length,e.colFixed.length)}function en(e,t,n){let r=e.style,i=Zn(e,n),a;if(t===`min`)a=i;else{let t=r.width!==void 0&&r.width.kind!==`auto`&&r.width.kind!==`percent`?qn(r.width,0,e,n):void 0;a=t===void 0?Jn(e,n):Math.max(i,t)}let o=typeof r.minWidth==`number`?r.minWidth:0,s=typeof r.maxWidth==`number`?r.maxWidth:void 0;return Math.max(0,An(a,o,s))}function U(e){let t=e.style.width;return t&&t.kind===`percent`?t.value:void 0}function W(e,t,n){let r=e.columnCount,i=Array.from({length:r},()=>0),a=Array.from({length:r},()=>0),o=Array.from({length:r},()=>void 0);for(let t=0;t<r;t++)e.colFixed[t]!==void 0&&(a[t]=e.colFixed[t]),o[t]=e.colPercent[t];let s=[];for(let t of e.cells){if(t.colSpan>1){s.push(t);continue}i[t.col]=Math.max(i[t.col],en(t.node,`min`,n)),a[t.col]=Math.max(a[t.col],en(t.node,`max`,n));let e=U(t.node);e!==void 0&&(o[t.col]=Math.max(o[t.col]??0,e))}s.sort((e,t)=>e.colSpan-t.colSpan);for(let e of s){let r=e.col,o=e.col+e.colSpan,s=on(t,r,o),c=a.slice(r,o);for(let t of[`min`,`max`]){let l=t===`min`?i:a,u=l.slice(r,o).reduce((e,t)=>e+t,0)+s,d=en(e.node,t,n)-u;if(d<=0)continue;let f=B(c.some(e=>e>0)?c:c.map(()=>1),d);for(let e=r;e<o;e++)l[e]+=f[e-r]}}for(let e=0;e<r;e++)a[e]=Math.max(a[e],i[e]);return{min:i,max:a,percent:o}}function tn(e,t){let n=e.min.length,r=e.min.slice(),i=[],a=[];for(let t=0;t<n;t++)(e.percent[t]===void 0?a:i).push(t);if(i.length>0){let n=i.reduce((t,n)=>t+e.percent[n],0),o=Math.max(100,n);for(let n of i){let i=Math.round(t*e.percent[n]/o);r[n]=Math.max(e.min[n],i)}let s=a.reduce((t,n)=>t+e.min[n],0),c=i.reduce((e,t)=>e+r[t],0)-(t-s);if(c>0){let t=i.map(t=>r[t]-e.min[t]),n=B(t,Math.min(c,t.reduce((e,t)=>e+t,0)));i.forEach((e,t)=>r[e]-=n[t])}}let o=t-r.reduce((e,t)=>e+t,0);if(o>0&&a.length>0){let t=a.map(t=>e.max[t]-e.min[t]),n=t.reduce((e,t)=>e+t,0),i=B(t,Math.min(o,n));a.forEach((e,t)=>r[e]+=i[t]),o-=Math.min(o,n)}if(o>0){let t=a.length>0?a:i;if(t.length>0){let n=t.map(t=>e.max[t]),i=B(n.some(e=>e>0)?n:n.map(()=>1),o);t.forEach((e,t)=>r[e]+=i[t])}}return r}function G(e,t,n){let r=e.columnCount,i=Array.from({length:r},()=>void 0);for(let n=0;n<r;n++)e.colFixed[n]===void 0?e.colPercent[n]!==void 0&&(i[n]=Math.max(0,Math.round(t*e.colPercent[n]/100))):i[n]=e.colFixed[n];for(let r of e.cells){if(r.row!==0)continue;let e=r.node.style,a;if(e.width&&e.width.kind===`percent`?a=Math.max(0,Math.round(t*e.width.value/100)):e.width&&e.width.kind!==`auto`&&(a=qn(e.width,0,r.node,n)),a===void 0)continue;let o=B(Array.from({length:r.colSpan},()=>1),a);for(let e=0;e<r.colSpan;e++){let t=r.col+e;i[t]===void 0&&(i[t]=o[e])}}let a=i.reduce((e,t)=>e+(t??0),0),o=i.filter(e=>e===void 0).length;if(o>0){let e=B(Array.from({length:o},()=>1),Math.max(0,t-a)),n=0;for(let t=0;t<r;t++)i[t]===void 0&&(i[t]=e[n++])}return i.map(e=>e??0)}var K={double:3,solid:2,dashed:1,dotted:0};function nn(e){for(let{border:t,side:n}of e)if(t?.hidden[n])return null;let t=null;for(let{border:n,side:r}of e){if(!n)continue;let e=n.width[r];if(e<=0)continue;let i=n.style[r];(t===null||e>t.width||e===t.width&&K[i]>K[t.style])&&(t={width:e,style:i,color:n.color[r]})}return t}function rn(e,t){let n=t.columnCount,r=t.rows.length,i=e.style.borderCollapse,a={collapsed:i,vLines:Array.from({length:n+1},()=>0),hLines:Array.from({length:r+1},()=>0),spacingX:i?0:e.style.borderSpacingX,spacingY:i?0:e.style.borderSpacingY,vSegments:[],hSegments:[]};if(!i||n===0||r===0)return a;let o=Array.from({length:r},()=>Array.from({length:n},()=>void 0));for(let e of t.cells)for(let t=e.row;t<e.row+e.rowSpan;t++)for(let n=e.col;n<e.col+e.colSpan;n++)o[t][n]=e;let s=e.style.latticeBorder;for(let e=0;e<=n;e++){let i=[];for(let a=0;a<r;a++){let r=e>0?o[a][e-1]:void 0,c=e<n?o[a][e]:void 0;if(r!==void 0&&r===c){i.push(null);continue}let l=[];r&&r.col+r.colSpan===e&&l.push({border:r.node.style.latticeBorder,side:`right`}),c&&c.col===e&&l.push({border:c.node.style.latticeBorder,side:`left`});let u=e===0?`left`:e===n?`right`:null;if(u){l.push({border:t.rows[a].style.latticeBorder,side:u});let e=t.rowGroups[a];e&&l.push({border:e.style.latticeBorder,side:u}),l.push({border:s,side:u})}i.push(nn(l))}a.vSegments.push(i),a.vLines[e]=i.reduce((e,t)=>Math.max(e,t?.width??0),0)}for(let e=0;e<=r;e++){let i=[];for(let a=0;a<n;a++){let n=e>0?o[e-1][a]:void 0,c=e<r?o[e][a]:void 0;if(n!==void 0&&n===c){i.push(null);continue}let l=[];n&&n.row+n.rowSpan===e&&l.push({border:n.node.style.latticeBorder,side:`bottom`}),c&&c.row===e&&l.push({border:c.node.style.latticeBorder,side:`top`}),e>0&&l.push({border:t.rows[e-1].style.latticeBorder,side:`bottom`}),e<r&&l.push({border:t.rows[e].style.latticeBorder,side:`top`});let u=e>0?t.rowGroups[e-1]:null,d=e<r?t.rowGroups[e]:null;u&&u!==d&&l.push({border:u.style.latticeBorder,side:`bottom`}),d&&d!==u&&l.push({border:d.style.latticeBorder,side:`top`}),e===0&&l.push({border:s,side:`top`}),e===r&&l.push({border:s,side:`bottom`}),i.push(nn(l))}a.hSegments.push(i),a.hLines[e]=i.reduce((e,t)=>Math.max(e,t?.width??0),0)}return a}function an(e,t){return e.collapsed?e.vLines.reduce((e,t)=>e+t,0):(t+1)*e.spacingX}function on(e,t,n){if(!e.collapsed)return e.spacingX*(n-t-1);let r=0;for(let i=t+1;i<n;i++)r+=e.vLines[i];return r}function sn(e,t,n){if(!e.collapsed)return e.spacingY*(n-t-1);let r=0;for(let i=t+1;i<n;i++)r+=e.hLines[i];return r}function cn(e,t){let n=t.tableData.get(e);if(n)return n;let r=Qt(e,t),i=rn(e,r),a={structure:r,chrome:i,bounds:W(r,i,t),chromeX:an(i,r.columnCount)};return t.tableData.set(e,a),a}function ln(e,t){let{structure:n,bounds:r,chromeX:i}=cn(e,t),a=r.min.reduce((e,t)=>e+t,0)+i,o=r.max.reduce((e,t)=>e+t,0)+i;return n.caption&&(a=Math.max(a,Zn(n.caption,t)),o=Math.max(o,Jn(n.caption,t))),{min:a,max:o}}function un(e,t,n){let r=e.style,{bounds:i,chromeX:a}=cn(e,n),{min:o,max:s}=ln(e,n),c=r.border.left+r.border.right+Y(r.padding.left,t)+Y(r.padding.right,t)+et(r).right,l=i.max.reduce((e,t)=>e+t,0),u=0,d=0;for(let e=0;e<i.max.length;e++){let t=i.percent[e];t===void 0?d+=i.max[e]:u+=t}if(u>=100)l=1/0;else if(u>0){for(let e=0;e<i.max.length;e++){let t=i.percent[e];t!==void 0&&t>0&&(l=Math.max(l,Math.ceil(i.max[e]*100/t)))}l=Math.max(l,Math.ceil(d*100/(100-u)))}let f=Math.max(l+a,s)+c;return Math.max(o+c,Math.min(f,t))}function dn(e,t,n,r,i,a){let{structure:o,chrome:s,bounds:c}=cn(e,a),l=o.columnCount,u=o.rows.length,d=r.left+i.left,f=r.top+i.top;for(let e of o.hidden)e.tableHidden=!0,e.localRect={x:0,y:0,width:0,height:0},e.resolvedPadding={top:0,right:0,bottom:0,left:0},e.unclampedHeight=0;let p=Math.max(0,t-an(s,l)),m=e.style,h=m.tableLayout===`fixed`&&m.width!==void 0&&m.width.kind!==`auto`?G(o,p,a):tn(c,p),g=[],_=0;for(let e=0;e<l;e++)_+=s.collapsed?s.vLines[e]:s.spacingX,g.push(_),_+=h[e];let v=_+(s.collapsed?s.vLines[l]??0:s.spacingX),y=0;o.caption&&(J(o.caption,t,void 0,d,f,`fill`,a),y=o.caption.localRect.height);let b=new Map,x=new Map;for(let e of o.cells){let t=e.col+e.colSpan,n=h.slice(e.col,t).reduce((e,t)=>e+t,0)+on(s,e.col,t);x.set(e,n),J(e.node,n,void 0,0,0,`fill`,a,{width:n}),b.set(e,e.node.localRect.height)}let S=s.collapsed?s.hLines.reduce((e,t)=>e+t,0):(u+1)*s.spacingY,C=n===void 0?void 0:Math.max(0,n-y-S),w=e=>e!==void 0&&e.kind===`percent`&&C!==void 0?F(e.value,C):0,T=Array.from({length:u},()=>0),E=Array.from({length:u},()=>!1);for(let e=0;e<u;e++){let t=o.rows[e].style.height;t!==void 0&&t.kind===`cells`&&(T[e]=t.value);let n=w(t);n>0&&(T[e]=Math.max(T[e],n),E[e]=!0)}for(let e of o.cells)if(e.rowSpan===1){let t=w(e.node.style.height);t>0&&(E[e.row]=!0),T[e.row]=Math.max(T[e.row],b.get(e),t)}let D=o.cells.filter(e=>e.rowSpan>1).sort((e,t)=>e.rowSpan-t.rowSpan);for(let e of D){let t=e.row+e.rowSpan,n=T.slice(e.row,t).reduce((e,t)=>e+t,0)+sn(s,e.row,t),r=b.get(e)-n;if(r<=0)continue;let i=B(Array.from({length:e.rowSpan},()=>1),r);for(let n=e.row;n<t;n++)T[n]+=i[n-e.row]}if(n!==void 0&&u>0){let e=n-y-S-T.reduce((e,t)=>e+t,0);if(e>0){let t=[];for(let e=0;e<u;e++)E[e]||t.push(e);let n=t.length>0?t:Array.from({length:u},(e,t)=>t),r=B(n.map(()=>1),e);n.forEach((e,t)=>T[e]+=r[t])}}let O=o.caption&&e.style.captionSide===`top`?y:0,k=[],A=O;for(let e=0;e<u;e++)A+=s.collapsed?s.hLines[e]:s.spacingY,k.push(A),A+=T[e];let ee=u>0?A+(s.collapsed?s.hLines[u]??0:s.spacingY):O,te=new Map;for(let e=0;e<u;e++){let t=o.rowGroups[e];t&&!te.has(t)&&te.set(t,k[e])}for(let[e,t]of te){let n=t;for(let t=0;t<u;t++)o.rowGroups[t]===e&&(n=k[t]+T[t]);e.localRect={x:d,y:f+t,width:v,height:n-t},e.resolvedPadding={top:0,right:0,bottom:0,left:0},e.unclampedHeight=n-t}for(let e=0;e<u;e++){let t=o.rows[e],n=o.rowGroups[e],r=n?te.get(n):void 0;t.localRect={x:r===void 0?d:0,y:r===void 0?f+k[e]:k[e]-r,width:v,height:T[e]},t.resolvedPadding={top:0,right:0,bottom:0,left:0},t.unclampedHeight=T[e]}for(let e of o.cells){let t=e.row+e.rowSpan,n=T.slice(e.row,t).reduce((e,t)=>e+t,0)+sn(s,e.row,t);e.node.children.some(e=>!q(e.style)&&e.style.height?.kind===`percent`)&&n!==b.get(e)&&J(e.node,x.get(e),n,0,0,`fill`,a,{width:x.get(e),height:n}),fn(e.node,n-(e.node.naturalContentHeight??e.node.localRect.height)),e.node.localRect={x:g[e.col],y:0,width:e.node.localRect.width,height:n}}for(let t of e.children)q(t.style)&&(t.staticSlot={kind:`block`,x:d,y:f});return o.caption&&e.style.captionSide===`bottom`&&(o.caption.localRect.y=f+ee),s.collapsed&&l>0&&u>0&&(e.decorationRuns=pn(s,o,h,T,g,k,d,f,j(e.style.glyphSet))),e.style.captionSide===`bottom`?ee+y:ee}function fn(e,t){if(t<=0)return;let n=e.style.verticalAlign,r=n===`center`?Math.floor(t/2):n===`end`?t:0;if(!e.children.some(e=>!q(e.style)&&!e.inlineBox)){e.resolvedPadding.top+=r,e.resolvedPadding.bottom+=t-r;return}if(!(r<=0))for(let t of e.children)t.inlineBox||(q(t.style)?t.staticSlot?.kind===`block`&&(t.staticSlot.y+=r):t.localRect.y+=r)}function pn(e,t,n,r,i,a,o,s,c){let l=t.columnCount,u=t.rows.length,d=[],f=t=>t<l?i[t]-e.vLines[t]:i[l-1]+n[l-1],p=t=>t<u?a[t]-e.hLines[t]:a[u-1]+r[u-1];for(let t=0;t<=l;t++){let n=e.vSegments[t];for(let e=0;e<u;e++){let i=n[e];if(!i)continue;let l=ge(i.style,`v`,c);for(let n=0;n<i.width;n++)for(let c=a[e];c<a[e]+r[e];c++)d.push({glyph:l,x:o+f(t)+n,y:s+c,length:1,color:i.color})}}for(let t=0;t<=u;t++){let r=e.hSegments[t];for(let e=0;e<l;e++){let a=r[e];if(!a)continue;let l=ge(a.style,`h`,c);for(let r=0;r<a.width;r++)d.push({glyph:l,x:o+i[e],y:s+p(t)+r,length:n[e],color:a.color})}}for(let t=0;t<=l;t++)if(!(e.vLines[t]<=0))for(let n=0;n<=u;n++){if(e.hLines[n]<=0)continue;let r=n>0?e.vSegments[t][n-1]:null,i=n<u?e.vSegments[t][n]:null,a=t>0?e.hSegments[n][t-1]:null,m=t<l?e.hSegments[n][t]:null,h=[r,i,a,m].filter(e=>e!==null);if(h.length===0)continue;let g=h.every(e=>e.style===`double`)?`double`:`solid`,_=h.reduce((e,t)=>t.width>e.width||t.width===e.width&&K[t.style]>K[e.style]?t:e),v=M(g,r!==null,i!==null,a!==null,m!==null,c);for(let r=0;r<e.vLines[t];r++)for(let i=0;i<e.hLines[n];i++)d.push({glyph:v,x:o+f(t)+r,y:s+p(n)+i,length:1,color:_.color})}return d}function mn(e){return e.position===`absolute`||e.position===`fixed`?`absolute`:e.position===`relative`||e.position===`sticky`?`relative`:`static`}function hn(e,t,n,r,i){for(let a of e.children){let o=mn(a.style);if(o===`relative`){let t=e.localRect.width-e.style.border.left-e.style.border.right-e.resolvedPadding.left-e.resolvedPadding.right,n=e.localRect.height-e.style.border.top-e.style.border.bottom-e.resolvedPadding.top-e.resolvedPadding.bottom;a.localRect.x+=gn(a.style.insets.left,a.style.insets.right,t),a.localRect.y+=gn(a.style.insets.top,a.style.insets.bottom,n)}else o===`absolute`&&vn(a,e,t,n,r,i);hn(a,t+a.localRect.x,n+a.localRect.y,[...r,{node:a,absX:t+a.localRect.x,absY:n+a.localRect.y}],i)}}function gn(e,t,n){return e===null?t===null?0:-Y(t,n):Y(e,n)}function _n(e,t){if(!t)for(let t=e.length-1;t>0;t--){let n=e[t];if(!En(n.node.style))continue;let r=n.node.style.border;return{x:n.absX+r.left,y:n.absY+r.top,width:Math.max(0,n.node.localRect.width-r.left-r.right),height:Math.max(0,n.node.localRect.height-r.top-r.bottom)}}let n=e[0];return{x:n.absX,y:n.absY,width:n.node.localRect.width,height:n.node.localRect.height}}function vn(e,t,n,r,i,a){let o=e.style,s=o.position===`fixed`,c=e.staticSlot,l=c?.kind===`grid`&&!s&&En(t.style)?{x:n+c.area.x,y:r+c.area.y,width:c.area.width,height:c.area.height}:_n(i,s),u=o.insets.left===null?null:Y(o.insets.left,l.width),d=o.insets.right===null?null:Y(o.insets.right,l.width),f=o.insets.top===null?null:Y(o.insets.top,l.height),p=o.insets.bottom===null?null:Y(o.insets.bottom,l.height),m=X(o.margin,l.width),h=m.left??0,g=m.right??0,_=m.top??0,v=m.bottom??0,y=o.width===void 0||o.width.kind===`auto`,b=o.height===void 0||o.height.kind===`auto`,x=Rn(o.minWidth,l.width,e,a)??0,S=Rn(o.maxWidth,l.width,e,a),C={};if(!y)C.width=An(qn(o.width,l.width,e,a),x,S);else if(u!==null&&d!==null)C.width=An(Math.max(0,l.width-u-d-h-g),x,S);else{let t=Math.max(0,l.width-(u??0)-(d??0)-h-g);C.width=An(Math.min(Jn(e,a),Math.max(Zn(e,a),t)),x,S)}f!==null&&p!==null&&b&&(C.height=An(Math.max(0,l.height-f-p-_-v),Ln(o.minHeight,l.height)??0,Ln(o.maxHeight,l.height))),J(e,l.width,l.height,0,0,`shrink`,a,C);let w=e.localRect.width,T=e.localRect.height,E;if(u!==null&&d!==null){let e=Math.max(0,l.width-u-d-w-h-g),t=m.left===null&&m.right===null;E=l.x+u+h+(t?Math.floor(e/2):m.left===null?e:0)}else E=u===null?d===null?Cn(e,t,n,w):l.x+l.width-d-w-g:l.x+u+h;let D;if(f!==null&&p!==null){let e=Math.max(0,l.height-f-p-T-_-v),t=m.top===null&&m.bottom===null;D=l.y+f+_+(t?Math.floor(e/2):m.top===null?e:0)}else D=f===null?p===null?wn(e,t,r,T):l.y+l.height-p-T-v:l.y+f+_;e.localRect={...e.localRect,x:E-n,y:D-r}}function yn(e,t,n){return He(e,[n],Math.max(0,t-n))[0]}function bn(e,t,n,r){return Ge(We(e,t),n,r)}function xn(e,t,n,r,i){let a=X(e.style.margin,n.innerWidth),[o,s,c,l]=r===`x`?[a.left??0,a.right??0,n.innerWidth,n.direction===`row`]:[a.top??0,a.bottom??0,n.innerHeight,n.direction===`column`],u=i+o+s;return(l?yn(Ye(t.style),c,u):bn(e,t,c,u))+o}function Sn(e,t,n,r,i){let a=X(e.style.margin,n.width),o=e.style.justifySelf===`auto`?t.style.justifyItems:e.style.justifySelf,[s,c,l,u]=r===`x`?[a.left??0,a.right??0,n.width,o]:[a.top??0,a.bottom??0,n.height,We(e,t)];return Ge(u,l,i+s+c)+s}function Cn(e,t,n,r){let i=e.staticSlot;return i===void 0?n:i.kind===`block`?n+i.x:i.kind===`grid`?n+i.staticArea.x+Sn(e,t,i.staticArea,`x`,r):n+i.originX+xn(e,t,i,`x`,r)}function wn(e,t,n,r){let i=e.staticSlot;return i===void 0?n:i.kind===`block`?n+i.y:i.kind===`grid`?n+i.staticArea.y+Sn(e,t,i.staticArea,`y`,r):n+i.originY+xn(e,t,i,`y`,r)}function Tn(e,t){let n=Dn();J(e,t,void 0,0,0,`fill`,n),hn(e,0,0,[{node:e,absX:0,absY:0}],n);let r=e.localRect.height,i=Un(e);return e.localRect.width=Math.max(e.localRect.width,i.x),e.localRect.height=Math.max(r,i.y),{height:r}}function q(e){return e.position===`absolute`||e.position===`fixed`}function En(e){return e.position!==`static`}function Dn(){return{maxContent:new WeakMap,minContent:new WeakMap,gridIntrinsic:new WeakMap,tableData:new WeakMap}}function J(e,t,n,r,i,a,o,s){let c=e.style,l=s?.height;delete e.decorationRuns,delete e.multicolGeometry,delete e.multicolFlow,delete e.multicolFlowSpan,delete e.textExtent;let u=Rn(c.minWidth,t,e,o)??0,d=Rn(c.maxWidth,t,e,o),f=Ln(c.minHeight,n)??0,p=Ln(c.maxHeight,n),m=et(c),h=$e(c);s?.gutter?.right&&(m.right=h.right),s?.gutter?.bottom&&(m.bottom=h.bottom);let g={top:Y(c.padding.top,t),right:Y(c.padding.right,t)+m.right,bottom:Y(c.padding.bottom,t)+m.bottom,left:Y(c.padding.left,t)};e.resolvedPadding=g;let _=s?.width??An(Hn(c,t,a,e,o),u,d),v=Kn(c,n),y=$n(_,l??v??(f>0?f:void 0)??1/0,c.border,g),b=l!==void 0||v!==void 0,x=p===void 0?void 0:Math.max(0,p-c.border.top-c.border.bottom-g.top-g.bottom),S=kn(e),C=(t,n)=>{let r=n&&Number.isFinite(t)?t:void 0;return S?On(e,y.width,t,r,x,g,o):c.display===`flex`&&c.flexDirection===`row`?Le(e,y.width,t,r,c.border,g,o):c.display===`flex`?ze(e,y.width,t,n,c.border,g,o):c.display===`grid`?it(e,y.width,t,c.border,g,o):c.display===`table`?dn(e,y.width,r,c.border,g,o):c.display===`multicol`?qt(e,y.width,r,x,c.border,g,o):zn(e,y.width,r,c.border,g,o)},w=C(y.height,b);if(!S&&(c.display===`flex`||c.display===`grid`)&&!b&&p!==void 0){let e=c.border.top+c.border.bottom+g.top+g.bottom,t=An(w+e,f,p)-e;t<w&&(w=C(Math.max(0,t),!0))}let T=w+c.border.top+c.border.bottom+g.top+g.bottom,E=l??v??T;e.unclampedHeight=E,e.naturalContentHeight=T;let D=An(E,f,p),O=e.multicolGeometry;if(O){let t=D-c.border.top-c.border.bottom-g.top-g.bottom;t>O.totalRows&&(g.bottom+=t-O.totalRows),Wt(e,O,c.border,g)}if(e.localRect={x:r,y:i,width:_,height:D},Ze(c.overflow.x)||Ze(c.overflow.y)){let l=Un(e),u=Math.max(0,l.x-c.border.left-g.left),d=Math.max(0,l.y-c.border.top-g.top),f=Math.max(0,_-c.border.left-c.border.right-g.left-g.right),p=Math.max(0,D-c.border.top-c.border.bottom-g.top-g.bottom);if(e.scrollRange={sizeX:u,sizeY:d,maxX:Ze(c.overflow.x)?Math.max(0,u-f):0,maxY:Ze(c.overflow.y)?Math.max(0,d-p):0},c.scrollbarWidth!==`none`){let l=s?.gutter??{right:!1,bottom:!1},u=l.right||c.overflow.y===`auto`&&e.scrollRange.maxY>0,d=l.bottom||c.overflow.x===`auto`&&e.scrollRange.maxX>0;if(u!==l.right||d!==l.bottom){J(e,t,n,r,i,a,o,{...s,gutter:{right:u,bottom:d}});return}}e.scrollGutterCells={right:m.right,bottom:m.bottom}}else delete e.scrollRange,delete e.scrollGutterCells}function On(e,t,n,r,i,a,o){let s=e.style,c;if(e.text){let l=Qe(e);ke(e.text,(n,r)=>{let i=l[r];J(i,t,void 0,0,0,`shrink`,o),e.advances[n]=Math.max(1,i.localRect.width)});let u,d;if(s.display===`multicol`){let n=Fn(s,`x`,t),o=Rt(s,t,n);a.right+=o.leftover;let c=Bt(e,o,n,It(r,i));e.multicolGeometry=c,u=c,d=c.lineX}else u=Mn(e,t);if(c=u.totalRows,e.textExtent={width:u.spans.reduce((t,n)=>Math.max(t,Ee(n.start,n.end,e.advances,s.tracking)),0),rows:u.totalRows},jn(e,u,t,n,a),l.length>0){let t=e=>u.spans.findIndex(t=>e>=t.start&&e<t.end);ke(e.text,(n,r)=>{let i=t(n);if(i===-1)return;let o=u.spans[i];l[r].localRect={...l[r].localRect,x:s.border.left+a.left+(d?.[i]??0)+Te(o.start,n,e.advances),y:s.border.top+a.top+u.lineY[i]}})}}else c=e.intrinsicHeight;for(let n of e.children){if(n.inlineBox)continue;let e=X(n.style.margin,t);n.staticSlot={kind:`block`,x:s.border.left+a.left+(e.left??0),y:s.border.top+a.top+(e.top??0)}}return c}function kn(e){return e.children.some(e=>!q(e.style)&&!e.inlineBox)?!1:e.text!==``||e.style.display!==`flex`&&e.style.display!==`grid`}function An(e,t,n){return Math.max(t,n===void 0?e:Math.min(e,n))}function jn(e,t,n,r,i){let a=e.style;if(a.display!==`flex`&&a.display!==`grid`||t.spans.length===0)return;let o=a.display===`flex`&&a.flexDirection===`column`,s=t.spans.reduce((t,n)=>Math.max(t,Ee(n.start,n.end,e.advances,a.tracking)),0),c=Math.max(0,n-s);if(c>0){let e=a.display===`grid`?Ge(a.justifyItems,n,s):o?Ge(a.alignItems,n,s):He(Ye(a),[s],c)[0];e>0&&(i.left+=e,i.right+=c-e)}if(Number.isFinite(r)){let e=Math.max(0,r-t.totalRows);if(e>0){let n=a.display===`grid`||!o?Ge(a.alignItems,r,t.totalRows):He(Ye(a),[t.totalRows],e)[0];n>0&&(i.top+=n,i.bottom+=e-n)}}}function Mn(e,t){let n=Nn(e,t),{heights:r,textOffsets:i}=Pn(e,n),a=[],o=[],s=0;for(let t=0;t<n.length;t++)a.push(s),o.push(s+i[t]),s+=r[t]+(t<n.length-1?e.style.lineGap:0);return{spans:n,lineY:a,textY:o,totalRows:s}}function Nn(e,t){return e.style.whiteSpace===`normal`?z(e.text,t,{advances:e.advances,tracking:e.style.tracking,firstLineIndent:e.style.textIndent}):we(e.text)}function Pn(e,n){let r=Qe(e),i=[],a=[],o=0;for(let s of n){let n=1,c=0;for(let i=s.start;i<s.end;i++){if(e.text[i]!==``)continue;let a=r[o];n=Math.max(n,a.localRect.height),a.style.verticalAlign===`end`?c=Math.max(c,a.localRect.height-1):a.style.verticalAlign===`center`&&t(a.source,`vertical-align: middle on an inline box can't land on whole rows and behaves as top. Use align-top or align-bottom.`),o++}i.push(n),a.push(Math.min(c,n-1))}return{heights:i,textOffsets:a}}function Fn(e,t,n){let r=Y(t===`x`?e.gapX:e.gapY,n),i=t===`x`?e.ruleX:e.ruleY;return Math.max(r,i?.width??0)}function Y(e,t){return typeof e==`number`?e:t===void 0||!Number.isFinite(t)?0:F(e.percent,t)}function X(e,t){let n=e=>e===null?null:Y(e,t);return{top:n(e.top),right:n(e.right),bottom:n(e.bottom),left:n(e.left)}}function In(e){return typeof e==`number`?e:0}function Ln(e,t){if(e!==void 0&&typeof e!=`string`)return typeof e==`number`?e:t===void 0?void 0:F(e.percent,t)}function Rn(e,t,n,r){return e===`min-content`||e===`max-content`||e===`fit-content`?qn({kind:e},t,n,r):Ln(e,t)}function zn(e,t,n,r,i,a){let o=r.left+i.left,s=r.top+i.top,c=s,l=null;for(let r of e.children){let e=X(r.style.margin,t),i=e.top??0,s=e.bottom??0,u=e.left??0,d=e.right??0;if(q(r.style)){r.staticSlot={kind:`block`,x:o+u,y:c+(l===null?i:Vn(l,i))};continue}J(r,Math.max(0,t-u-d),n,0,0,`fill`,a);let f=Bn(e,t,r.localRect.width);c+=l===null?i:Vn(l,i),r.localRect={...r.localRect,x:o+f,y:c},c+=r.localRect.height,l=s}return l!==null&&(c+=l),c-s}function Bn(e,t,n){let r=t-n;return e.left===null&&e.right===null?Math.floor(r/2):e.left===null?r-(e.right??0):e.left}function Vn(e,t){return e>=0&&t>=0?Math.max(e,t):e<=0&&t<=0?Math.min(e,t):e+t}function Hn(e,t,n,r,i){let a=e.width;if(e.display===`table`){if(!r.children.some(e=>!q(e.style)&&!e.inlineBox))return a!==void 0&&a.kind!==`auto`?qn(a,t,r,i):Math.min(t,Jn(r,i));if(a!==void 0&&a.kind!==`auto`){let e=qn(a,t,r,i);return Math.max(e,Gn(r,t,i))}return un(r,t,i)}return a!==void 0&&a.kind!==`auto`?qn(a,t,r,i):n===`shrink`?Math.min(t,Jn(r,i)):t}function Un(e){let t=0,n=0;for(let r of e.children){if(r.style.position===`fixed`)continue;let e=Wn(r);t=Math.max(t,r.localRect.x+e.x),n=Math.max(n,r.localRect.y+e.y)}if(e.textExtent){let{border:r}=e.style,i=e.resolvedPadding;t=Math.max(t,r.left+i.left+e.textExtent.width),n=Math.max(n,r.top+i.top+e.textExtent.rows)}return{x:t,y:n}}function Wn(e){let{width:t,height:n}=e.localRect,r=e.style.overflow.x!==`visible`,i=e.style.overflow.y!==`visible`;if(r&&i)return{x:t,y:n};let a=Un(e);return{x:r?t:Math.max(t,a.x),y:i?n:Math.max(n,a.y)}}function Gn(e,t,n){let r=e.style;return ln(e,n).min+r.border.left+r.border.right+Y(r.padding.left,t)+Y(r.padding.right,t)+et(r).right}function Kn(e,t){if(e.height?.kind===`cells`)return e.height.value;if(e.height?.kind===`percent`&&t!=null)return F(e.height.value,t)}function qn(e,t,n,r){switch(e.kind){case`cells`:return e.value;case`percent`:return F(e.value,t);case`min-content`:return Zn(n,r);case`max-content`:return Jn(n,r);case`fit-content`:return Math.min(Jn(n,r),Math.max(Zn(n,r),t));case`auto`:return Jn(n,r)}}function Jn(e,t){let n=t.maxContent.get(e);if(n!==void 0)return n;let r=e.style,i=Yn(e,t)+r.border.left+r.border.right+In(r.padding.left)+In(r.padding.right)+et(r).right;return t.maxContent.set(e,i),i}function Yn(e,t){let n=e.children.filter(e=>!q(e.style)&&!e.inlineBox);if(n.length===0)return e.style.display===`multicol`?Ft(e.style,e.intrinsicWidth):e.intrinsicWidth;if(e.style.display===`grid`)return pt(e,t).max;if(e.style.display===`table`)return ln(e,t).max;if(e.style.display===`flex`&&e.style.flexDirection===`row`){let r=Math.max(In(e.style.gapX),e.style.ruleX?.width??0)*Math.max(0,n.length-1);return n.reduce((e,n)=>e+Xn(n,`max`,t),0)+r}let r=n.reduce((e,n)=>Math.max(e,Xn(n,`max`,t)),0);return e.style.display===`multicol`?Ft(e.style,r):r}function Xn(e,t,n){let r=e.style,i;r.width!==void 0&&r.width.kind!==`auto`&&r.width.kind!==`percent`&&(i=qn(r.width,0,e,n)),i===void 0&&(i=t===`min`?Zn(e,n):Jn(e,n));let a=typeof r.minWidth==`number`?r.minWidth:0,o=typeof r.maxWidth==`number`?r.maxWidth:void 0;return Math.max(0,An(i,a,o))}function Zn(e,t){let n=t.minContent.get(e);if(n!==void 0)return n;let r=e.style,i=Qn(e,t)+r.border.left+r.border.right+In(r.padding.left)+In(r.padding.right)+et(r).right;return t.minContent.set(e,i),i}function Qn(e,t){let n=e.children.filter(e=>!q(e.style)&&!e.inlineBox);if(n.length===0)return!e.text||e.style.whiteSpace!==`normal`?e.intrinsicWidth:Oe(e.text,{advances:e.advances,tracking:e.style.tracking});if(e.style.display===`grid`)return pt(e,t).min;if(e.style.display===`table`)return ln(e,t).min;if(e.style.display===`flex`&&e.style.flexDirection===`row`&&e.style.flexWrap===`nowrap`){let r=Math.max(In(e.style.gapX),e.style.ruleX?.width??0)*Math.max(0,n.length-1);return n.reduce((e,n)=>e+Xn(n,`min`,t),0)+r}return n.reduce((e,n)=>Math.max(e,Xn(n,`min`,t)),0)}function $n(e,t,n,r){return{width:Math.max(0,e-n.left-n.right-r.left-r.right),height:Math.max(0,t-n.top-n.bottom-r.top-r.bottom)}}function er(e){return or(e).grid.map(e=>e.join(``).trimEnd()).join(`
956
- `)}function tr(e){let{grid:t,paints:n}=or(e);return t.map((e,t)=>nr(e,n[t]))}function nr(e,t){let n=e.length;for(;n>0&&e[n-1]===` `&&t[n-1]?.backgroundColor===void 0;)n--;let r=[];for(let i=0;i<n;i++){let n=t[i],a=r[r.length-1];a&&rr(a,n)?a.text+=e[i]:r.push({text:e[i],...n})}return r}function rr(e,t){return e.color===t?.color&&e.backgroundColor===t?.backgroundColor&&e.fontWeight===t?.fontWeight&&e.fontStyle===t?.fontStyle&&e.textDecorationLine===t?.textDecorationLine&&e.opacity===t?.opacity}function ir(e,t){e.color!==void 0&&(t.color=e.color),e.backgroundColor!==void 0&&(t.backgroundColor=e.backgroundColor),e.fontWeight!==void 0&&(t.fontWeight=e.fontWeight),e.fontStyle!==void 0&&(t.fontStyle=e.fontStyle),e.textDecorationLine!==void 0&&(t.textDecoration=e.textDecorationLine),e.opacity!==void 0&&(t.opacity=e.opacity)}function ar(e){return e.color===void 0&&e.backgroundColor===void 0&&e.fontWeight===void 0&&e.fontStyle===void 0&&e.textDecorationLine===void 0&&e.opacity===void 0}function or(e){let t=Math.max(0,e.localRect.width),n=Math.max(0,e.localRect.height),r=Array.from({length:n},()=>Array.from({length:t},()=>` `)),i=Array.from({length:n},()=>Array.from({length:t},()=>void 0));return cr(e,0,0,(e,a,o,s)=>{if(e>=0&&e<t&&a>=0&&a<n){r[a][e]=o;let t=i[a][e];i[a][e]=t?{...t,...s}:s}}),{grid:r,paints:i}}function sr(e){let t={};return e.color&&(t.color=e.color),e.backgroundColor&&(t.backgroundColor=e.backgroundColor),e.fontWeight!==`400`&&e.fontWeight!==`normal`&&e.fontWeight!==``&&(t.fontWeight=e.fontWeight),e.fontStyle!==`normal`&&e.fontStyle!==``&&(t.fontStyle=e.fontStyle),e.textDecorationLine!==`none`&&e.textDecorationLine!==``&&(t.textDecorationLine=e.textDecorationLine),t}function cr(e,t,n,r,i=1){if(e.tableHidden)return;let a=t+e.localRect.x,o=n+e.localRect.y,s=e.style,c=e=>i>=1?e:{...e,opacity:String(Math.round(i*1e3)/1e3)};if(s.backgroundColor!==void 0||s.backgroundClear){let t=s.backgroundColor===void 0?{backgroundColor:void 0}:c({backgroundColor:s.backgroundColor});for(let n=0;n<e.localRect.height;n++)for(let i=0;i<e.localRect.width;i++)r(a+i,o+n,` `,t)}let l=[];fe(s,{x:a,y:o,width:e.localRect.width,height:e.localRect.height},l);for(let e of l){let t=c(e.color===void 0?void 0:{color:e.color});for(let n=0;n<e.length;n++)r(e.x+n,e.y,e.glyph,t)}if(e.decorationRuns)for(let t of e.decorationRuns){let e=c(t.color===void 0?void 0:{color:t.color});for(let n=0;n<t.length;n++)r(a+t.x+n,o+t.y,t.glyph,e)}let u=e.scrollGutterCells,d=s.overflow.x!==`visible`,f=s.overflow.y!==`visible`,p=a-(e.scroll?.x??0),m=o-(e.scroll?.y??0),h=r;if(d||f){let t=a+s.border.left,n=o+s.border.top,i=a+e.localRect.width-s.border.right-(u?.right??0),c=o+e.localRect.height-s.border.bottom-(u?.bottom??0);h=(e,a,o,s)=>{d&&(e<t||e>=i)||f&&(a<n||a>=c)||r(e,a,o,s)}}if(!e.children.some(e=>!e.inlineBox&&e.style.position!==`absolute`&&e.style.position!==`fixed`)&&e.text){let t=c(sr(s)),n=e.inlineElements?.map(e=>c(sr(e)));lr(e,p,m,(r,i,a)=>{let o=e.charInline?.[r]??-1,s=o>=0?e.inlineElements[o]:void 0;e.text[r]===`⁠`?s?.backgroundColor&&h(i,a,` `,c({backgroundColor:s.backgroundColor})):h(i,a,e.text[r],s?n[o]:t)},(e,n)=>h(e,n,`…`,t))}for(let t of he(e))cr(t,p,m,h,i*t.style.opacity);let g=e.scrollRange;if(g&&u&&(u.right>0||u.bottom>0)){let{track:t,thumb:n}=de(j(s.glyphSet)),i=e=>c(e?{color:e}:void 0),l=i(s.scrollbarColor?.track??s.color),u=i(s.scrollbarColor?.thumb??s.color),d=fr(e,a,o);if(d.y){let{col:i,row:a,thick:o,len:s}=d.y,{at:c,len:f}=pr(s,g.sizeY,g.maxY,e.scroll?.y??0);for(let e=0;e<o;e++)for(let o=0;o<s;o++){let s=o>=c&&o<c+f;r(i+e,a+o,s?n:t,s?u:l)}}if(d.x){let{col:i,row:a,thick:o,len:s}=d.x,{at:c,len:f}=pr(s,g.sizeX,g.maxX,e.scroll?.x??0);for(let e=0;e<o;e++)for(let o=0;o<s;o++){let s=o>=c&&o<c+f;r(i+o,a+e,s?n:t,s?u:l)}}}}function lr(e,t,n,r,i){let a=e.style,o=e.resolvedPadding,s=t+a.border.left+o.left,c=n+a.border.top+o.top,l=e.localRect.width-a.border.left-a.border.right-o.left-o.right,u=e.multicolGeometry,{spans:d,textY:f}=u??Mn(e,l),p=u?Math.max(1,u.columnWidth-a.tracking):l;for(let t=0;t<d.length;t++){let n=d[t],o=c+f[t],l=t===0?a.textIndent:0,m=a.whiteSpace!==`normal`&&a.overflow.x===`clip`?mr(e.text,n,p-l,e.advances,a):{end:n.end,ellipsis:!1},h=Ee(n.start,n.end,e.advances,a.tracking),g=Math.max(0,p-l-h),_=a.textAlign===`end`?g:a.textAlign===`center`?Math.floor(g/2):0,v=s+(u?.lineX[t]??0)+_+l;for(let t=n.start;t<m.end;t++){let n=Te(t,t+1,e.advances);if(e.text[t]!==``){let i=e.inlineElements?.[e.charInline?.[t]??-1]?.insets,a=i?i.left??(i.right===null?0:-i.right):0,s=i?i.top??(i.bottom===null?0:-i.bottom):0;r(t,v+a,o+s,n)}v+=n}m.ellipsis&&i?.(v,o)}}function ur(e,t,n,r,i){let a=e.multicolGeometry;if(!a)return!1;let o=e.style,s=e.resolvedPadding,c=r-(t+o.border.left+s.left),l=i-(n+o.border.top+s.top),{lineX:u,lineY:d}=a;for(let e=0;e<d.length;e++){if(c<u[e]||c>=u[e]+a.columnWidth)continue;let t=(e+1<d.length&&u[e+1]===u[e]?d[e+1]:void 0)??d[e]+1+o.lineGap;if(l>=d[e]&&l<t)return!0}return!1}function dr(e,t,n,r,i){let a=null;return lr(e,t-(e.scroll?.x??0),n-(e.scroll?.y??0),(e,t,n,o)=>{a===null&&n===i&&r>=t&&r<t+o&&(a=e)}),a}function fr(e,t,n){let r=e.scrollGutterCells;if(!r)return{};let{border:i,scrollbarSize:a,scrollbarInset:o}=e.style,s=n+i.top,c=t+i.left,l=n+e.localRect.height-i.bottom,u=t+e.localRect.width-i.right,d=r.bottom>0?l-r.bottom:l-o.y,f=r.right>0?u-r.right:u-o.x,p={};return r.right>0&&(p.y={col:u-r.right,row:s+o.y,thick:Math.min(a.y,r.right),len:Math.max(0,d-s-o.y)}),r.bottom>0&&(p.x={col:c+o.x,row:l-r.bottom,thick:Math.min(a.x,r.bottom),len:Math.max(0,f-c-o.x)}),p}function pr(e,t,n,r){let i=t>0?Math.min(1,e/t):1,a=Math.max(1,Math.round(i*e));return n>0&&(a=Math.max(1,Math.min(a,e-n))),{at:n>0?Math.round(Math.min(r,n)/n*(e-a)):0,len:a}}function mr(e,t,n,r,i){let{textOverflow:a,tracking:o}=i;if(Ee(t.start,t.end,r,o)<=n)return{end:t.end,ellipsis:!1};let s=a===`ellipsis`?n-1:n,c=t.start;for(;c<t.end&&Ee(t.start,c+1,r,o)<=s;)c++;return{end:c,ellipsis:a===`ellipsis`&&n>0}}function hr(e,t,n){let r=[],i=e,a=e.localRect.x,o=e.localRect.y;for(;;){let e=null;for(let r of he(i)){if(r.tableHidden)continue;let i=a+r.localRect.x,s=o+r.localRect.y;(r.multicolFlow?ur(r,i,s,t,n):t>=i&&t<i+r.localRect.width&&n>=s&&n<s+r.localRect.height)&&(e=r)}if(!e)return r;r.push({node:e,x:a+e.localRect.x,y:o+e.localRect.y}),a+=e.localRect.x-(e.scroll?.x??0),o+=e.localRect.y-(e.scroll?.y??0),i=e}}function gr(e,t,n){return hr(e,t,n).map(e=>e.node.source)}function _r(e,t,n,r){let i=e.ownerDocument,a=i.createRange();a.setStart(e,t),a.collapse(!0);let o=i.createRange();return o.setStart(n,r),o.collapse(!0),a.compareBoundaryPoints(a.START_TO_START,o)}function vr(e,t,n){let r=Qe(e).findIndex(e=>e.source.contains(t));if(r>=0){let t=-1;for(let n=0;n<=r;n++)t=e.text.indexOf(``,t+1);if(t>=0)return t}let i=e.charSource??[],a=0,o=i.length;for(;a<o;){let e=a+o>>1,r=i[e];_r(r.node,r.offset,t,n)<=0?a=e+1:o=e}if(a===0)return 0;let s=i[a-1];return t===s.node&&n<s.offset+s.length?s.index+(n-s.offset):s.index+s.length}function yr(e,t){let n=e.charSource??[],r=0,i=n.length;for(;r<i;){let e=r+i>>1;n[e].index<=t?r=e+1:i=e}let a=n[r-1];if(!a)return null;let o=t-a.index;return o<=a.length?{node:a.node,offset:a.offset+o}:null}function br(e){try{let t=e.ownerDocument.getSelection();if(!t)return null;if(t.getComposedRanges)return t.getComposedRanges({shadowRoots:[e]})[0]??null;let n=e.getSelection?.();return!n||n.rangeCount===0?null:n.getRangeAt(0)}catch{return null}}function xr(e,t,n){let{startContainer:r,endContainer:i}=n;return t.contains(r)&&t.contains(i)?`grid`:e.contains(r)&&e.contains(i)?`light`:`outside`}function Sr(e,t){let n=e.source.ownerDocument.createRange();n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset);let r=[];return Cr(e,n,r),Ar(r)}function Cr(e,t,n){if(e.tableHidden||!t.intersectsNode(e.source))return;let r=Dr(e);if(r&&n.push({breaks:r}),e.style.tableRole===`row`)wr(e,t,n);else if(e.style.display===`table`){let r=Er(e);for(let r of e.children)r.style.tableRole===`row`||Tr(r)||Cr(r,t,n);let i=!1;for(let e of r)t.intersectsNode(e.source)&&(i&&n.push({text:`
957
- `}),Cr(e,t,n),i=!0)}else{Or(e)&&n.push({text:kr(e,t)});for(let r of e.children)r.inlineBox||Cr(r,t,n)}r&&n.push({breaks:r})}function wr(e,t,n){let r=!1;for(let i of e.children)i.style.tableRole!==`cell`||i.tableHidden||t.intersectsNode(i.source)&&(r&&n.push({text:` `}),Cr(i,t,n),r=!0)}function Tr(e){let t=e.style.tableRole;return t===`header-group`||t===`row-group`||t===`footer-group`}function Er(e){let t=[];for(let n of e.children)if(n.style.tableRole===`row`)t.push(n);else if(Tr(n))for(let e of n.children)e.style.tableRole===`row`&&t.push(e);return t}function Dr(e){if(e.inlineBox)return 0;let t=e.style.tableRole;return t===`row`||t===`cell`||Tr(e)||t===`column`||t===`column-group`?0:e.source.tagName===`P`?2:1}function Or(e){return e.text.length!==0&&!e.children.some(e=>!e.inlineBox&&e.style.position!==`absolute`&&e.style.position!==`fixed`)}function kr(e,t){let{text:n}=e,r=0,i=n.length;e.charSource&&(e.source.contains(t.startContainer)&&(r=vr(e,t.startContainer,t.startOffset)),e.source.contains(t.endContainer)&&(i=vr(e,t.endContainer,t.endOffset)));let a=n.slice(r,i);i===n.length&&a.endsWith(`
958
- `)&&(a=a.slice(0,-1));let o=Qe(e),s=n.slice(0,r).split(``).length-1;return a=a.replaceAll(``,()=>{let e=o[s++];if(!e||!t.intersectsNode(e.source))return``;let n=[];return Cr(e,t,n),Ar(n)}),a.replaceAll(`⁠`,``)}function Ar(e){let t=``,n=0;for(let r of e){if(`breaks`in r){n=Math.max(n,r.breaks);continue}r.text.length!==0&&(t.length>0&&n>0&&(t+=`
959
- `.repeat(n)),n=0,t+=r.text)}return t}var Z=new Map;function jr(e,t){let{text:n}=e;if(t<0||t>=n.length||Mr(n[t]))return null;let r=t;for(;r>0&&!Mr(n[r-1]);)r--;let i=t;for(;i<n.length&&!Mr(n[i]);)i++;let a=Nr(e.source.closest?.(`[lang]`)?.getAttribute(`lang`)??``);if(!a)return null;for(let e of a.segment(n.slice(r,i))){let n=r+e.index,i=n+e.segment.length;if(t>=n&&t<i)return{start:n,end:i}}return null}function Mr(e){return e===`
960
- `||e===``||e===`⁠`}function Nr(e){let t=Z.get(e);return t===void 0&&(t=Pr(e)??Pr(``),Z.set(e,t)),t}function Pr(e){if(typeof Intl.Segmenter!=`function`)return null;try{return new Intl.Segmenter(e||void 0,{granularity:`word`})}catch{return null}}var Fr=new WeakMap,Ir=new WeakMap;function Lr(e){return Br(e,!0)!==null}function Rr(e,t,n=!1){let r=tr(e),i=Gr(r);if(Fr.get(t)===i)return!0;let a=Ir.get(t);if(a&&zr(t,a.nodes,r)){Fr.set(t,i);for(let e=0;e<r.length;e++)for(let t=0;t<r[e].length;t++){let n=r[e][t];if(ar(n)||rr(n,a.segments[e][t]))continue;let i=a.nodes[e][t];i.style.cssText=``,ir(n,i.style)}return a.segments=r,!0}if(n&&Lr(t))return!1;Fr.set(t,i);let o=document.createDocumentFragment(),s=[];for(let e=0;e<r.length;e++){e>0&&o.appendChild(document.createTextNode(`
961
- `));let t=[];for(let n of r[e]){if(ar(n)){let e=document.createTextNode(n.text);t.push(e),o.appendChild(e);continue}let e=document.createElement(`span`);ir(n,e.style),e.textContent=n.text,t.push(e),o.appendChild(e)}s.push(t)}Ir.set(t,{nodes:s,segments:r});let c=Br(t,!1);return t.replaceChildren(o),c&&Vr(t,c),!0}function zr(e,t,n){if(t.length!==n.length)return!1;for(let r=0;r<n.length;r++){let i=t[r],a=n[r];if(i.length!==a.length)return!1;for(let t=0;t<a.length;t++){let n=i[t];if(ar(a[t])!==(n.nodeType===Node.TEXT_NODE)||n.textContent!==a[t].text||n.parentNode!==e)return!1}}return!0}function Br(e,t){try{let n=e.ownerDocument.getSelection();if(!n)return null;let r=e.getRootNode();if(!(r instanceof ShadowRoot))return null;let i=br(r);if(!i)return null;let a=Hr(e,i.startContainer,i.startOffset),o=Hr(e,i.endContainer,i.endOffset);return a===null||o===null||a===o&&!t?null:{start:a,end:o,backward:n.direction===`backward`}}catch{return null}}function Vr(e,t){try{let n=Ur(e,t.start),r=Ur(e,t.end);if(!n||!r)return;let i=e.getRootNode().getSelection?.()??e.ownerDocument.getSelection();t.backward?i?.setBaseAndExtent(r[0],r[1],n[0],n[1]):i?.setBaseAndExtent(n[0],n[1],r[0],r[1])}catch{}}function Hr(e,t,n){if(!e.contains(t))return null;let r=e.ownerDocument.createRange();return r.selectNodeContents(e),r.setEnd(t,n),r.toString().length}function Ur(e,t){let n=t,r=null;for(let t of Wr(e)){if(n<=t.data.length)return[t,n];n-=t.data.length,r=[t,t.data.length]}return r}function*Wr(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=t.nextNode();for(;n;)yield n,n=t.nextNode()}function Gr(e){let t=[];for(let n of e){for(let e of n)t.push(e.text,e.color??``,e.backgroundColor??``,e.fontWeight??``,e.fontStyle??``,e.textDecorationLine??``,e.opacity??``);t.push(`
962
- `)}return t.join(``)}function Kr(e){let t=new Set;Yr(e,!0,t);for(let n of Array.from(e.source.querySelectorAll(`[data-mw-inline-inset]`)))if(!t.has(n)){n.removeAttribute(`data-mw-inline-inset`);let e=n.style;for(let t of[`--mw-it`,`--mw-ir`,`--mw-ib`,`--mw-il`])e.removeProperty(t)}}function Q(e,t,n){e.style.getPropertyValue(t)!==n&&e.style.setProperty(t,n)}function qr(e,t){e.style.getPropertyValue(t)!==``&&e.style.removeProperty(t)}function Jr(e,t,n){e.hasAttribute(t)!==n&&(n?e.setAttribute(t,``):e.removeAttribute(t))}function Yr(e,t,n){if(e.inlineElements)for(let{element:t,tracking:r,padLeft:i,padRight:a,insets:o}of e.inlineElements){let e=t;Q(e,`--mw-ls`,String(r)),i>0?Q(e,`--mw-ipl`,String(i)):qr(e,`--mw-ipl`),a>0?Q(e,`--mw-ipr`,String(a)):qr(e,`--mw-ipr`),o&&(n.add(t),Xr(e,o))}if(t||Qr(e),!e.tableHidden)for(let t of he(e)){let r=t.source;t.style.zIndex!==null&&me(t,e)&&!t.inlineBox?Q(r,`--mw-z`,String(t.style.zIndex)):qr(r,`--mw-z`),Yr(t,!1,n)}}function Xr(e,t){Jr(e,`data-mw-inline-inset`,!0);let n=(t,n)=>{n===null?qr(e,t):Q(e,t,String(n))};n(`--mw-it`,t.top),n(`--mw-ir`,t.right),n(`--mw-ib`,t.bottom),n(`--mw-il`,t.left)}function Zr(e){let t=e.style;if(t.textAlign!==`center`||!e.text||e.inlineBox||e.children.length>0)return!1;let n=e.multicolGeometry,r=e.resolvedPadding,i=e.localRect.width-t.border.left-t.border.right-r.left-r.right,a=n?Math.max(1,n.columnWidth-t.tracking):i,o=n?.spans??Nn(e,i);return o.length!==0&&o.every((n,r)=>{let i=r===0?t.textIndent:0,o=a-i-Ee(n.start,n.end,e.advances,t.tracking);return o>0&&o%2==1})}function Qr(e){let t=e.source,n=e.localRect,r=e.resolvedPadding,{border:i,textAlignBlocked:a,overflow:o,whiteSpace:s,tracking:c,lineGap:l}=e.style,u=e.multicolFlow,d=e.multicolFlowSpan;Jr(t,`data-mw-laid-out`,!e.inlineBox&&!u&&!d),Jr(t,`data-mw-inline-box`,!!e.inlineBox),Jr(t,`data-mw-multicol-flow`,!!u),Jr(t,`data-mw-multicol-flow-span`,!!d);let f=u??d;f?(Q(t,`--mw-mt`,String(f.top??0)),Q(t,`--mw-mr`,String(f.right??0)),Q(t,`--mw-mb`,String(f.bottom??0)),Q(t,`--mw-ml`,String(f.left??0))):(qr(t,`--mw-mt`),qr(t,`--mw-mr`),qr(t,`--mw-mb`),qr(t,`--mw-ml`)),Jr(t,`data-mw-vbottom`,!!e.inlineBox&&e.style.verticalAlign===`end`),Q(t,`--mw-ls`,String(c)),Q(t,`--mw-lh`,String(l+1)),Q(t,`--mw-lhs`,String(-l/2)),Jr(t,`data-mw-nowrap`,s!==`normal`);let p=u||d?void 0:e.multicolGeometry;if(Jr(t,`data-mw-multicol`,!!p),Jr(t,`data-mw-multicol-balance`,!!p?.nativeBalance),p?(Q(t,`--mw-colc`,String(p.columnCount)),Q(t,`--mw-colg`,String(p.gap))):(qr(t,`--mw-colc`),qr(t,`--mw-colg`)),Jr(t,`data-mw-pre`,s===`pre`),Q(t,`--mw-x`,String(n.x)),Q(t,`--mw-y`,String(n.y)),Q(t,`--mw-w`,String(n.width)),Q(t,`--mw-h`,String(n.height)),Jr(t,`data-mw-clip`,o.x===`clip`||o.y===`clip`),Jr(t,`data-mw-scroll`,e.scrollRange!==void 0),e.scrollRange){let{maxX:n,maxY:r}=e.scrollRange;Q(t,`--mw-se-x`,String(n>0?n+e.localRect.width:1)),Q(t,`--mw-se-y`,String(r>0?r+e.localRect.height:1))}else qr(t,`--mw-se-x`),qr(t,`--mw-se-y`);Q(t,`--mw-pt`,String(r.top)),Q(t,`--mw-pr`,String(r.right)),Q(t,`--mw-pb`,String(r.bottom)),Q(t,`--mw-pl`,String(r.left)),Q(t,`--mw-bt`,String(i.top)),Q(t,`--mw-br`,String(i.right)),Q(t,`--mw-bb`,String(i.bottom)),Q(t,`--mw-bl`,String(i.left)),Q(t,`--mw-ti`,String(e.style.textIndent)),Jr(t,`data-mw-text-align-blocked`,a),Jr(t,`data-mw-center-nudge`,Zr(e)),Jr(t,`data-mw-dropped-text`,!!e.droppedText),Jr(t,`data-mw-table-hidden`,!!e.tableHidden)}function $r(e,t,n){let r=getComputedStyle(e),i=parseFloat(r.fontSize)||t,a=bi(e)?e.computedStyleMap():null,o=e.getAttribute(`class`)??``,s=e.style;gi(e,o,s);let c=(e,r,i)=>Ri(a,e,r,o,i,s,n,t)??Bi(a,e,r,o,i,s,n,t)??Ai(r,t),l=r.display||pi[e.tagName]||``,u=mi[l]??`none`,d=r.columnCount&&r.columnCount!==`auto`?Math.max(1,Math.floor(Number(r.columnCount)||1)):null,f=r.columnWidth&&r.columnWidth!==`auto`?parseFloat(r.columnWidth):NaN,p=Number.isFinite(f)?Math.max(1,Se(f,t)):null,m=l===`flex`||l===`inline-flex`?`flex`:l===`grid`||l===`inline-grid`?`grid`:l===`table`||l===`inline-table`?`table`:l===`none`||fi(e,r)?`none`:d!==null||p!==null?`multicol`:`block`,h={kind:`none`},g={kind:`none`},_=[rt()],v=[rt()],y={direction:`row`,dense:!1},b=null;if(m===`grid`){if(a)h=Ui(a.get(`grid-template-columns`)?.toString()??``,t),g=Ui(a.get(`grid-template-rows`)?.toString()??``,t);else{e.setAttribute(`data-mw-degrid`,``);try{h=Ui(r.getPropertyValue(`grid-template-columns`),t),g=Ui(r.getPropertyValue(`grid-template-rows`),t)}finally{e.removeAttribute(`data-mw-degrid`)}}_=qi(r.getPropertyValue(`grid-auto-columns`),t),v=qi(r.getPropertyValue(`grid-auto-rows`),t),y=$i(r.getPropertyValue(`grid-auto-flow`)),b=Ki(r.getPropertyValue(`grid-template-areas`))}let x=`auto`,S=!1,C=0,w=0;if(m===`table`&&(x=r.tableLayout===`fixed`?`fixed`:`auto`,S=r.borderCollapse===`collapse`,!S)){let e=r.borderSpacing.split(` `);C=Se(parseFloat(e[0]??``)||0,t),w=Se(parseFloat(e[1]??e[0]??``)||0,t)}let T={display:m,tableRole:u,tableLayout:x,borderCollapse:S,borderSpacingX:C,borderSpacingY:w,captionSide:r.captionSide===`bottom`?`bottom`:`top`,verticalAlign:u===`cell`||l.startsWith(`inline-`)?hi(e,r):`start`,flexDirection:r.flexDirection.startsWith(`column`)?`column`:`row`,flexReverse:r.flexDirection.endsWith(`-reverse`),flexWrap:r.flexWrap.startsWith(`wrap`)?`wrap`:`nowrap`,wrapReverse:r.flexWrap===`wrap-reverse`,flexGrow:Number(r.flexGrow)||0,flexShrink:r.flexShrink===``?1:Number(r.flexShrink)||0,flexBasis:Vi(r.flexBasis,t),order:Number(r.order)||0,justifyContent:xi(r.justifyContent),alignContent:xi(r.alignContent),alignItems:Si(r.alignItems),alignSelf:Ci(r.alignSelf),justifyItems:Si(r.justifyItems),justifySelf:Ci(r.justifySelf),gridTemplateColumns:h,gridTemplateRows:g,gridAutoColumns:_,gridAutoRows:v,gridAutoFlow:y,gridTemplateAreas:b,gridColumnStart:Qi(r.getPropertyValue(`grid-column-start`)),gridColumnEnd:Qi(r.getPropertyValue(`grid-column-end`)),gridRowStart:Qi(r.getPropertyValue(`grid-row-start`)),gridRowEnd:Qi(r.getPropertyValue(`grid-row-end`)),width:Pi(a,r.width,`width`,t,o,s,n),height:Pi(a,r.height,`height`,t,o,s,n),minWidth:c(`min-width`,r.minWidth,`min-w`)??`auto`,minHeight:c(`min-height`,r.minHeight,`min-h`)??`auto`,maxWidth:c(`max-width`,r.maxWidth,`max-w`),maxHeight:c(`max-height`,r.maxHeight,`max-h`),padding:ta(r,t),margin:wi(r,a,o,s,t),position:Di(r.position),insets:Oi(r,a,o,s,t),gapX:ji(r.columnGap===`normal`||r.columnGap===``?m===`multicol`?`${i}px`:`0px`:r.columnGap,t),gapY:ji(r.rowGap===`normal`?`0px`:r.rowGap,t),border:na(r),borderStyle:{top:ki(r.borderTopStyle),right:ki(r.borderRightStyle),bottom:ki(r.borderBottomStyle),left:ki(r.borderLeftStyle)},overflow:di(r),scrollbarWidth:si(e,r),scrollbarColor:ci(r.scrollbarColor),overscroll:{x:(r.overscrollBehaviorX||`auto`)===`auto`,y:(r.overscrollBehaviorY||`auto`)===`auto`},scrollbarSize:{x:li(r.getPropertyValue(`--mw-scrollbar-size-x`)),y:li(r.getPropertyValue(`--mw-scrollbar-size-y`))},scrollbarInset:{x:li(r.getPropertyValue(`--mw-scrollbar-inset-x`),0),y:li(r.getPropertyValue(`--mw-scrollbar-inset-y`),0)},whiteSpace:r.whiteSpace===`pre`?`pre`:r.whiteSpace===`nowrap`?`nowrap`:`normal`,tabSize:Math.max(1,Math.floor(parseFloat(r.tabSize))||8),lineGap:Ei(r.lineHeight,i),tracking:Ti(r.letterSpacing,i,n?.letterSpacing??0),textOverflow:r.textOverflow===`ellipsis`?`ellipsis`:`clip`,color:r.color,fontWeight:r.fontWeight,fontStyle:r.fontStyle,textDecorationLine:r.textDecorationLine,backgroundColor:ni(e,r.backgroundColor,r),backgroundClear:r.getPropertyValue(`--mw-bg-clear`).trim()===`1`,borderColor:{top:r.borderTopColor,right:r.borderRightColor,bottom:r.borderBottomColor,left:r.borderLeftColor},textAlignBlocked:yi(e,r),textAlign:$(e,r),textIndent:Ni(r,t),opacity:Mi(r.opacity),glyphSet:r.getPropertyValue(`--mw-border-glyphs`).trim()||null,zIndex:r.zIndex===`auto`||r.zIndex===``?null:Number(r.zIndex)||0,latticeBorder:null,ruleX:m===`flex`||m===`grid`||m===`multicol`?vi(r,`x`):null,ruleY:m===`flex`||m===`grid`?vi(r,`y`):null,ruleBreak:_i(r,`--mw-rule-break`,[`none`,`intersection`],`normal`),ruleInset:r.getPropertyValue(`--mw-rule-inset`).trim()===`overlap-join`?`overlap-join`:Math.max(0,xe(parseFloat(r.getPropertyValue(`--mw-rule-inset`))||0)),ruleVisibilityItems:_i(r,`--mw-rule-visibility-items`,[`all`,`around`,`between`],`normal`),columnCount:d,columnWidth:p,columnFill:r.columnFill===`auto`?`auto`:`balance`,columnSpan:r.columnSpan===`all`,breakBeforeColumn:r.breakBefore===`column`,breakAfterColumn:r.breakAfter===`column`,breakInsideAvoid:r.breakInside===`avoid`||r.breakInside===`avoid-column`};return ei(T,r),T}function ei(e,t){t.borderCollapse===`collapse`&&(e.display===`table`||e.tableRole===`cell`||e.tableRole===`row`||e.tableRole===`row-group`||e.tableRole===`header-group`||e.tableRole===`footer-group`)&&(e.latticeBorder={width:e.border,style:e.borderStyle,color:e.borderColor,hidden:{top:t.borderTopStyle===`hidden`,right:t.borderRightStyle===`hidden`,bottom:t.borderBottomStyle===`hidden`,left:t.borderLeftStyle===`hidden`}},e.border=nt(),e.display===`table`&&(e.padding=nt()))}function ti(e){if(!e)return!0;let t=e.trim().toLowerCase();return t===``||t===`transparent`||t===`rgba(0, 0, 0, 0)`||t===`currentcolor`}function ni(e,t,n){let r=h(e,ti(t)?``:t,n);return r===``?void 0:r}function ri(e){return e===`hidden`||e===`clip`}var ii=new WeakMap,ai=null;function oi(e){if(ai!==null)return ai;if(!e.body)return!0;let t=e.createElement(`div`);return t.style.cssText=`position: absolute; width: 0; height: 0; overflow: auto`,e.body.appendChild(t),ai=getComputedStyle(t).scrollbarWidth!==`none`,t.remove(),ai}function si(e,t){if(!oi(e.ownerDocument))return`auto`;if(e.hasAttribute(`data-mw-scroll`)){let t=ii.get(e);if(t!==void 0)return t}let n=t.scrollbarWidth===`none`?`none`:`auto`;return ii.set(e,n),n}function ci(e){let t=(e??``).trim();if(!t||t===`auto`)return null;let n=0;for(let e=0;e<t.length;e++){let r=t[e];if(r===`(`)n++;else if(r===`)`)n--;else if(r===` `&&n===0)return{thumb:t.slice(0,e),track:t.slice(e+1).trim()}}return null}function li(e,t=1){return Math.max(t,Math.floor(Number(e)||t))}function ui(e){return ri(e)?`clip`:e===`auto`||e===`scroll`?e:`visible`}function di(e){let t=ui(e.overflowX||e.overflow),n=ui(e.overflowY||e.overflow);return t!==`visible`&&n===`visible`&&(n=`auto`),n!==`visible`&&t===`visible`&&(t=`auto`),{x:t,y:n}}function fi(e,t){if(t.position!==`absolute`&&t.position!==`fixed`)return!1;let n=t.clip.replace(/\s/g,``);return n===`rect(0px,0px,0px,0px)`||n===`rect(0,0,0,0)`||!s(e.tagName)&&(ri(t.overflow)||ri(t.overflowX))&&parseFloat(t.width)<=1&&parseFloat(t.height)<=1}var pi={TABLE:`table`,THEAD:`table-header-group`,TBODY:`table-row-group`,TFOOT:`table-footer-group`,TR:`table-row`,TD:`table-cell`,TH:`table-cell`,CAPTION:`table-caption`,COL:`table-column`,COLGROUP:`table-column-group`},mi={"table-header-group":`header-group`,"table-row-group":`row-group`,"table-footer-group":`footer-group`,"table-row":`row`,"table-cell":`cell`,"table-caption":`caption`,"table-column":`column`,"table-column-group":`column-group`};function hi(e,t){let n=t.verticalAlign||e.getAttribute(`valign`)?.toLowerCase()||(e.tagName===`TD`||e.tagName===`TH`?`middle`:`baseline`);return n===`top`?`start`:n===`middle`?`center`:n===`bottom`?`end`:`start`}function gi(e,n,r){(/(?:^|[\s:.[!])text-(?:xs|sm|base|lg|[2-9]?xl)(?![\w-])/.test(n)||/(?:^|[\s:.[!])text-\[(?:(?:length|size):|[\d.])/.test(n)||r.fontSize!==``)&&t(e,`font-size inside <mono-wind> is ignored — all text shares the host's cell size. Size the <mono-wind> element itself instead.`)}function _i(e,t,n,r){let i=e.getPropertyValue(t).trim();return n.includes(i)?i:r}function vi(e,t){let n=xe(parseFloat(e.getPropertyValue(`--mw-rule-${t}-width`))||0);if(n<=0)return null;let r=e.getPropertyValue(`--mw-rule-${t}-color`).trim();return{width:n,style:ki(e.getPropertyValue(`--mw-rule-${t}-style`).trim()),color:r&&r!==`currentcolor`&&r!==`currentColor`?r:e.color}}function yi(e,t){return t.textAlign===`justify`||e.getAttribute(`align`)?.toLowerCase()===`justify`}function $(e,t){let n=t.textAlign||e.getAttribute(`align`)?.toLowerCase()||``;return n===`right`||n===`end`?`end`:n===`center`||n.endsWith(`-center`)?`center`:`start`}function bi(e){return typeof e.computedStyleMap==`function`}function xi(e){switch(e){case`center`:return`center`;case`flex-end`:case`end`:case`right`:return`end`;case`space-between`:return`space-between`;case`space-around`:return`space-around`;case`space-evenly`:return`space-evenly`;case`normal`:case`stretch`:case``:return`stretch`;default:return`start`}}function Si(e){switch(e){case`center`:return`center`;case`flex-end`:case`end`:return`end`;case`stretch`:case`normal`:case``:return`stretch`;default:return`start`}}function Ci(e){return e===`auto`||e===``||e===`normal`?`auto`:Si(e)}function wi(e,t,n,r,i){let a=(a,o,s)=>{if(t){let e=t.get(a)?.toString().trim();if(e===`auto`||t.get(o)?.toString().trim()===`auto`)return null;if(e?.endsWith(`%`)){let t=parseFloat(e);if(Number.isFinite(t)&&t!==0)return{percent:t}}}else if(s.test(n)||r.getPropertyValue(a)===`auto`)return null;let c=e.getPropertyValue(a);if(c===`auto`)return null;let l=ji(c,i);if(l!==0)return l;let u=e.getPropertyValue(o);return u===`auto`?null:ji(u,i)};return{top:a(`margin-top`,`margin-block-start`,/(?:^|[\s:.[!])(?:m|my|mt)-auto\b/),right:a(`margin-right`,`margin-inline-end`,/(?:^|[\s:.[!])(?:m|mx|mr|me)-auto\b/),bottom:a(`margin-bottom`,`margin-block-end`,/(?:^|[\s:.[!])(?:m|my|mb)-auto\b/),left:a(`margin-left`,`margin-inline-start`,/(?:^|[\s:.[!])(?:m|mx|ml|ms)-auto\b/)}}function Ti(e,t,n){let r=(e===`normal`?0:parseFloat(e)||0)-n;return r<=0?0:Math.floor(r/(.025*t)+1e-6)}function Ei(e,t){if(!e||e===`normal`||t<=0)return 0;let n=parseFloat(e);return Number.isFinite(n)?Math.max(0,Math.floor(n/t+1e-6)-1):0}function Di(e){switch(e){case`relative`:case`absolute`:case`fixed`:case`sticky`:return e;default:return`static`}}function Oi(e,t,n,r,i){let a=(a,o)=>{if(t){let e=t.get(a)?.toString().trim();return!e||e===`auto`?null:ji(e,i)}let s=r[a];if(s)return s===`auto`?null:ji(s,i);if(!o.test(n))return null;let c=e.getPropertyValue(a);return!c||c===`auto`?null:ji(c,i)};return{top:a(`top`,/(?:^|[\s:.[!])-?(?:top|inset|inset-y)-/),right:a(`right`,/(?:^|[\s:.[!])-?(?:right|end|inset|inset-x)-/),bottom:a(`bottom`,/(?:^|[\s:.[!])-?(?:bottom|inset|inset-y)-/),left:a(`left`,/(?:^|[\s:.[!])-?(?:left|start|inset|inset-x)-/)}}function ki(e){switch(e){case`double`:return`double`;case`dashed`:return`dashed`;case`dotted`:return`dotted`;default:return`solid`}}function Ai(e,t){if(!e||e===`none`||e===`auto`)return;if(e===`min-content`||e===`max-content`||e===`fit-content`)return e;if(e.endsWith(`%`)){let t=parseFloat(e);return Number.isFinite(t)?{percent:t}:void 0}let n=parseFloat(e);return Number.isFinite(n)?Se(n,t):void 0}function ji(e,t){if(!e||e===`auto`||e===`none`)return 0;if(e.endsWith(`%`)){let t=parseFloat(e);return Number.isFinite(t)&&t!==0?{percent:t}:0}let n=parseFloat(e);return Number.isFinite(n)?Se(n,t):0}function Mi(e){let t=parseFloat(e);return Number.isFinite(t)?Math.min(1,Math.max(0,t)):1}function Ni(e,t){let n=e.textIndent;if(!n||n.endsWith(`%`))return 0;let r=parseFloat(n);return Number.isFinite(r)?Math.max(0,Se(r,t)):0}function Pi(e,t,n,r,i,a,o){let s=Fi(n===`width`?a.width:a.height);if(s!==null)return{kind:`cells`,value:Li(s,n,o,r)};let c=Ri(e,n,t,i,n===`width`?`w`:`h`,a,o,r);if(c!==void 0)return{kind:`cells`,value:c};let l=Ii(i,n===`width`?`w`:`h`);if(l!==null){let i=parseFloat(e?String(e.get(n)??``):t),a=Number.isFinite(i)&&Math.abs(i-l)<=l*.3;if(a||!Number.isFinite(i))return{kind:`cells`,value:Li(a?i:l,n,o,r)}}if(e){let t=e.get(n);if(t==null)return;let i=t.toString().trim();if(i===`auto`)return{kind:`auto`};let a=Hi(i);if(a)return a;if(i.endsWith(`%`))return{kind:`percent`,value:parseFloat(i)};if(i.endsWith(`px`))return{kind:`cells`,value:Se(parseFloat(i),r)};if(i.endsWith(`rem`))return{kind:`cells`,value:xe(parseFloat(i)/.25)};let s=Fi(i);if(s!==null)return{kind:`cells`,value:Li(s,n,o,r)}}let u=n===`width`?a.width:a.height;if(u){if(u===`auto`)return{kind:`auto`};let e=Hi(u);if(e)return e;if(u.endsWith(`%`))return{kind:`percent`,value:parseFloat(u)};let t=parseFloat(u);if(Number.isFinite(t))return{kind:`cells`,value:Se(t,r)}}let d=n===`width`?`w`:`h`;if(RegExp(`(?:^|[\\s:.[!])${d}-min\\b`).test(i))return{kind:`min-content`};if(RegExp(`(?:^|[\\s:.[!])${d}-max\\b`).test(i))return{kind:`max-content`};if(RegExp(`(?:^|[\\s:.[!])${d}-fit\\b`).test(i))return{kind:`fit-content`};let f=RegExp(`(?:^|[\\s:.[!])${d}-(\\d+)/(\\d+)(?![\\w./])`).exec(i);if(f)return{kind:`percent`,value:100*Number(f[1])/Number(f[2])};if(RegExp(`(?:^|[\\s:.[!])${d}-full(?![\\w-])`).test(i))return{kind:`percent`,value:100};let p=RegExp(`(?:^|[\\s:.[!])${d}-\\[(\\d+(?:\\.\\d+)?)%\\]`).exec(i);if(p)return{kind:`percent`,value:Number(p[1])};let m=RegExp(`(?:^|[\\s:.[!])${d}-(\\d+(?:\\.\\d+)?)(?![\\w-/])`).exec(i);if(m)return{kind:`cells`,value:xe(Number(m[1]))};if(!ea(i,d)||t===`auto`)return{kind:`auto`};if(t.endsWith(`%`))return{kind:`percent`,value:parseFloat(t)};let h=parseFloat(t);if(Number.isFinite(h))return{kind:`cells`,value:Se(h,r)}}function Fi(e){let t=/^(-?[\d.]+)((?:[dsl]?v)(?:h|w|min|max)|vi|vb)$/.exec(e.trim());if(!t||typeof window>`u`)return null;let n=parseFloat(t[1]);if(!Number.isFinite(n))return null;let r=t[2],i=window.innerHeight,a=window.innerWidth,o=r.endsWith(`h`)?i:r.endsWith(`min`)?Math.min(a,i):r.endsWith(`max`)?Math.max(a,i):r===`vb`?i:a;return n/100*o}function Ii(e,t){if(typeof window>`u`)return null;let n=RegExp(`(?:^|[\\s:.[!])${t}-(screen|[dsl]v[hw])(?![\\w-])`).exec(e);if(n){let e=n[1];return e===`screen`?t.includes(`h`)?window.innerHeight:window.innerWidth:e.endsWith(`h`)?window.innerHeight:window.innerWidth}let r=RegExp(`(?:^|[\\s:.[!])${t}-\\[(-?[\\d.]+(?:[dsl]?v(?:h|w|min|max)|vi|vb))\\]`).exec(e);return r?Fi(r[1]):null}function Li(e,t,n,r){let i=t===`width`?n?.width:n?.height;return i&&i>0?Math.max(0,Math.floor(e/i)):Se(e,r)}function Ri(e,t,n,r,i,a,o,s){let c=t.endsWith(`width`)?`width`:`height`,l=a.getPropertyValue(t).trim(),u=l.startsWith(`calc(`);if(!u&&!r.includes(`-[calc(`))return;let d=RegExp(`(?:^|[\\s:.[!])${i}-\\[(calc\\([^\\]]*\\))\\]`).exec(r),f=u?l:d?.[1]?.replaceAll(`_`,` `);if(!f)return;let p=zi(f,c,o,s);if(!p||p.unitless)return;let m=Math.max(0,xe(p.cells));if(u)return m;let h=(e?String(e.get(t)??``):n).trim(),g=parseFloat(h);return(Number.isFinite(g)?Math.abs(g-p.px)<=Math.abs(p.px)*.3:h===``)?m:void 0}function zi(e,t,n,r){let i=e.match(/--spacing\(\s*-?[\d.]+\s*\)|calc|[\d.]+[a-z%]*|[()+\-*/]/g);if(!i||i.join(``).replace(/\s+/g,``)!==e.replace(/\s+/g,``))return null;let a=0,o=()=>i[a],s=()=>i[a++],c=(e,t)=>({cells:e,px:t,unitless:!1}),l=e=>{let i=/^--spacing\(\s*(-?[\d.]+)\s*\)$/.exec(e);if(i){let e=parseFloat(i[1]);return c(e,e*r/4)}let a=/^([\d.]+)([a-z%]*)$/.exec(e);if(!a)return null;let o=parseFloat(a[1]),s=a[2];if(!Number.isFinite(o))return null;if(s===``)return{cells:o,px:o,unitless:!0};if(s===`px`)return c(o/(r/4),o);if(s===`rem`)return c(o*4,o*r);let l=Fi(e);return l===null?null:c(Li(l,t,n,r),l)},u=(e,t,n)=>{if(e===`+`||e===`-`){if(t.unitless!==n.unitless)return null;let r=e===`+`?1:-1;return{cells:t.cells+r*n.cells,px:t.px+r*n.px,unitless:t.unitless}}if(e===`*`){if(!t.unitless&&!n.unitless)return null;let[e,r]=t.unitless?[t,n]:[n,t];return{cells:r.cells*e.cells,px:r.px*e.px,unitless:r.unitless&&e.unitless}}return!n.unitless||n.px===0?null:{cells:t.cells/n.cells,px:t.px/n.px,unitless:t.unitless}},d=()=>{let e=s();if(e===void 0)return null;if(e===`-`){let e=d();return e&&{cells:-e.cells,px:-e.px,unitless:e.unitless}}return e===`calc`?s()===`(`?f():null:e===`(`?f():l(e)},f=()=>{let e=m();return s()===`)`?e:null},p=()=>{let e=d();for(;e&&(o()===`*`||o()===`/`);){let t=s(),n=d();e=n?u(t,e,n):null}return e},m=()=>{let e=p();for(;e&&(o()===`+`||o()===`-`);){let t=s(),n=p();e=n?u(t,e,n):null}return e},h=m();return a===i.length?h:null}function Bi(e,t,n,r,i,a,o,s){let c=t.endsWith(`width`)?`width`:`height`,l=Fi(a.getPropertyValue(t))??Fi(e?.get(t)?.toString().trim()??``);if(l!==null)return Li(l,c,o,s);let u=Ii(r,i);if(u===null)return;let d=(e?String(e.get(t)??``):n).trim(),f=parseFloat(d),p=Number.isFinite(f)&&Math.abs(f-u)<=u*.3;if(p||d===``)return Li(p?f:u,c,o,s)}function Vi(e,t){if(!e||e===`auto`||e===`content`)return;let n=Hi(e);if(n)return n;if(e.endsWith(`%`)){let t=parseFloat(e);return Number.isFinite(t)?{kind:`percent`,value:t}:void 0}let r=parseFloat(e);return Number.isFinite(r)?{kind:`cells`,value:Se(r,t)}:void 0}function Hi(e){if(e===`min-content`)return{kind:`min-content`};if(e===`max-content`)return{kind:`max-content`};if(e===`fit-content`)return{kind:`fit-content`}}function Ui(e,t){let n=e.trim();if(!n||n===`none`)return{kind:`none`};if(n===`subgrid`||n.startsWith(`subgrid `))return{kind:`subgrid`};let r=[],i=[],a=[],o=e=>{i.push(a),a=[],r.push(e)},s;for(let e of Zi(n)){let n=Gi(e);if(n){a.push(...n);continue}let i=e.match(/^repeat\(\s*([^,]+?)\s*,(.*)\)$/s);if(i){let e=Wi(i[2].trim(),t);if(e.tracks.length===0)continue;let n=i[1];if(n===`auto-fill`||n===`auto-fit`){s||(s={index:r.length,tracks:e.tracks,mode:n},e.lineNames.some(e=>e.length>0)&&(s.lineNames=e.lineNames),a.length>0&&(s.leadingNames=a),a=[]);continue}let c=Math.max(0,Math.floor(Number(n)||0));for(let t=0;t<c;t++){a.push(...e.lineNames[0]);for(let t=0;t<e.tracks.length;t++)o(e.tracks[t]),a.push(...e.lineNames[t+1])}continue}o(Ji(e,t))}if(i.push(a),r.length===0&&!s)return{kind:`none`};let c={kind:`tracks`,tracks:r};return i.some(e=>e.length>0)&&(c.lineNames=i),s&&(c.autoRepeat=s),c}function Wi(e,t){let n=[],r=[],i=[];for(let a of Zi(e)){let e=Gi(a);if(e){i.push(...e);continue}r.push(i),i=[],n.push(Ji(a,t))}return r.push(i),{tracks:n,lineNames:r}}function Gi(e){let t=e.match(/^\[(.*)\]$/s);return t?t[1].split(/\s+/).filter(e=>e!==``):null}function Ki(e){let t=[];for(let n of e.matchAll(/"([^"]*)"|'([^']*)'/g)){let e=(n[1]??n[2]??``).trim().split(/\s+/).filter(e=>e!==``);if(e.length===0)return null;t.push(e)}if(t.length===0)return null;let n=t[0].length;if(t.some(e=>e.length!==n))return null;let r=new Map;t.forEach((e,t)=>{e.forEach((e,n)=>{if(/^\.+$/.test(e))return;let i=r.get(e);i?(i.colStart=Math.min(i.colStart,n),i.colEnd=Math.max(i.colEnd,n+1),i.rowStart=Math.min(i.rowStart,t),i.rowEnd=Math.max(i.rowEnd,t+1)):r.set(e,{colStart:n,colEnd:n+1,rowStart:t,rowEnd:t+1})})});for(let[e,n]of r)for(let r=n.rowStart;r<n.rowEnd;r++)for(let i=n.colStart;i<n.colEnd;i++)if(t[r][i]!==e)return null;return{columns:n,rows:t.length,areas:r}}function qi(e,t){let n=Zi(e.trim()).filter(e=>e!==``&&!e.startsWith(`[`)).map(e=>Ji(e,t));return n.length>0?n:[rt()]}function Ji(e,t){let n=e.match(/^minmax\((.*)\)$/s);if(n){let e=Xi(n[1]).map(e=>e.trim());return e.length===2?{min:Yi(e[0],t),max:Yi(e[1],t)}:{min:{kind:`auto`},max:{kind:`auto`}}}let r=Yi(e,t);return r.kind===`fr`?{min:{kind:`auto`},max:r}:{min:r,max:r}}function Yi(e,t){if(e===`auto`||e.startsWith(`fit-content`))return{kind:`auto`};if(e===`min-content`)return{kind:`min-content`};if(e===`max-content`)return{kind:`max-content`};let n=e.match(/^(min|max)\((.*)\)$/s);if(n){let e=Xi(n[2]).map(e=>Yi(e.trim(),t)),r=e.every(e=>e.kind===`cells`||e.kind===`percent`||e.kind===`math`);return e.length>0&&r?{kind:`math`,fn:n[1],args:e}:{kind:`auto`}}if(e.endsWith(`fr`)){let t=parseFloat(e);return Number.isFinite(t)&&t>=0?{kind:`fr`,value:t}:{kind:`auto`}}if(e.endsWith(`%`)){let t=parseFloat(e);return Number.isFinite(t)?{kind:`percent`,value:t}:{kind:`auto`}}let r=parseFloat(e);return Number.isFinite(r)?{kind:`cells`,value:e.endsWith(`rem`)?xe(r/.25):Se(r,t)}:{kind:`auto`}}function Xi(e){let t=[],n=0,r=0;for(let i=0;i<e.length;i++){let a=e[i];a===`(`?n++:a===`)`?n--:a===`,`&&n===0&&(t.push(e.slice(r,i)),r=i+1)}return t.push(e.slice(r)),t.filter(e=>e.trim()!==``)}function Zi(e){let t=[],n=0,r=-1;for(let i=0;i<e.length;i++){let a=e[i];a===`(`||a===`[`?n++:(a===`)`||a===`]`)&&n--,/\s/.test(a)&&n===0?(r!==-1&&t.push(e.slice(r,i)),r=-1):r===-1&&(r=i)}return r!==-1&&t.push(e.slice(r)),t}function Qi(e){let t=e.trim();if(!t||t===`auto`)return{kind:`auto`};let n=!1,r,i;for(let e of t.split(/\s+/))e===`span`?n=!0:/^-?\d+$/.test(e)?r=Number(e):i=e;if(n){let e=r??1;return e<1?{kind:`auto`}:i===void 0?{kind:`span`,value:e}:{kind:`span`,value:e,name:i}}return i===void 0?r!==void 0&&r!==0?{kind:`line`,value:r}:{kind:`auto`}:r===0?{kind:`auto`}:r===void 0?{kind:`name`,name:i}:{kind:`name`,name:i,nth:r}}function $i(e){return{direction:e.includes(`column`)?`column`:`row`,dense:e.includes(`dense`)}}function ea(e,t){return(t===`w`?/(?:^|[\s:.[!])w-/:/(?:^|[\s:.[!])h-/).test(e)}function ta(e,t){return{top:ji(e.getPropertyValue(`padding-top`),t),right:ji(e.getPropertyValue(`padding-right`),t),bottom:ji(e.getPropertyValue(`padding-bottom`),t),left:ji(e.getPropertyValue(`padding-left`),t)}}function na(e){let t=(t,n)=>e.getPropertyValue(n)===`none`?0:xe(parseFloat(e.getPropertyValue(t))||0);return{top:t(`border-top-width`,`border-top-style`),right:t(`border-right-width`,`border-right-style`),bottom:t(`border-bottom-width`,`border-bottom-style`),left:t(`border-left-width`,`border-left-style`)}}function ra(e,t,n,r){let i=$r(e,t,n);if(i.display===`none`)return null;let a=s(e.tagName);if(a)return ia(e,i,a);let o=Array.from(e.children),c=o.map(la),l=e.tagName,u=Sa(l);if(!c.includes(`block`)||u){let a=ua(e,i.tracking,{rootFontSizePx:t,rootLetterSpacingPx:n?.letterSpacing??0,cellMetrics:n,textareaWidths:r,preserve:i.whiteSpace===`pre`,tabSize:i.tabSize}),s=a.chars.join(``);if(a.boxes.length>0){let e=Dn();ke(a.chars,(t,n)=>{a.advances[t]=Math.max(1,Jn(a.boxes[n],e))})}let d=_a(s,a.advances,i.tracking);if(u&&d===0){if(l===`INPUT`)d=Number(e.size)||20;else if(l===`TEXTAREA`)d=Number(e.cols)||20;else{let t=e,n=e=>e?.label||e?.textContent||``,r=getComputedStyle(e).getPropertyValue(`field-sizing`)===`content`?[n(t.selectedOptions[0])]:Array.from(t.options,n);d=Math.max(1,...r.map(e=>e.trim().length))}}let f=s.length>0?va(s):0,p;if(l===`TEXTAREA`){let t=e,n=t.value??``,a=r?.get(t),o=+!!n.endsWith(`
963
- `),s=a!==void 0&&a>0?R(n,a)+o:n===``?0:n.split(/\r\n?|\n/).length,c=getComputedStyle(e).getPropertyValue(`field-sizing`)===`content`?1:Number(t.rows)||2,l=Math.max(c,s);p=l+Math.max(0,l-1)*i.lineGap}else p=u?Math.max(1,f):f;let m=new Map,h=[];for(let t of a.boxes)t.source.parentElement===e?m.set(t.source,t):h.push(t);let g=[];for(let e=0;e<o.length;e++){let i=o[e],a=m.get(i);if(a)g.push(a);else if(c[e]===`out-of-flow`){let e=ra(i,t,n,r);e&&g.push(e)}}h.length>0&&(g.push(...h),g.sort((e,t)=>e.source.compareDocumentPosition(t.source)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1));let _={source:e,style:i,children:g,text:s,intrinsicWidth:d,intrinsicHeight:p,localRect:{x:0,y:0,width:d,height:p},unclampedHeight:0,resolvedPadding:nt()};(a.advances.some(e=>e!==1)||a.boxes.length>0)&&(_.advances=a.advances),a.inlineElements.length>0&&(_.inlineElements=a.inlineElements,_.charInline=a.chars.map((e,t)=>a.inlineIndex[t]??-1));let v=ga(a);return v.length>0&&(_.charSource=v),_}let d=[];for(let e=0;e<o.length;e++){if(c[e]===`none`)continue;let i=ra(o[e],t,n,r);i&&d.push(i)}let f={source:e,style:i,children:d,text:``,intrinsicWidth:0,intrinsicHeight:0,localRect:{x:0,y:0,width:0,height:0},unclampedHeight:0,resolvedPadding:nt()};return Ca(e,f),f}function ia(e,t,n){let r=u(n,e),i=r?.lines??[],a=i.join(`
964
- `);t.whiteSpace=`pre`,(t.width===void 0||t.width.kind===`auto`)&&(t.width={kind:`max-content`});let o=Array.from({length:a.length},()=>1+t.tracking),s=_a(a,o,t.tracking),c=i.length,l={source:e,style:t,children:[],text:a,intrinsicWidth:s,intrinsicHeight:c,localRect:{x:0,y:0,width:s,height:c},unclampedHeight:0,resolvedPadding:nt()};t.tracking>0&&(l.advances=o);let d=r?.runs??[];if(d.length>0&&a.length>0){let t=[0];for(let e of i)t.push(t[t.length-1]+e.length+1);let n=Array.from({length:a.length},()=>-1);l.inlineElements=d.map(t=>({element:e,tracking:0,padLeft:0,padRight:0,insets:null,color:t.paint.color,backgroundColor:t.paint.backgroundColor,fontWeight:t.paint.fontWeight??``,fontStyle:t.paint.fontStyle??``,textDecorationLine:t.paint.textDecorationLine??``})),d.forEach((e,r)=>{let a=i[e.line];if(a===void 0)return;let o=Math.max(0,e.start),s=Math.min(a.length,e.end);for(let i=o;i<s;i++)n[t[e.line]+i]=r}),l.charInline=n}return l}var aa=new Set(`A.ABBR.B.BDI.BDO.BR.CITE.CODE.DATA.DFN.EM.I.KBD.MARK.Q.S.SAMP.SMALL.SPAN.STRONG.SUB.SUP.TIME.U.VAR.WBR`.split(`.`));function oa(e,t){return t||(aa.has(e.tagName)?`inline`:`block`)}function sa(e,t){let n=oa(e,t);return n===`inline`||n===`contents`}function ca(e,t){let n=oa(e,t);return n.startsWith(`inline`)&&n!==`inline`}function la(e){let t=getComputedStyle(e);return t.display===`none`?`none`:t.position===`absolute`||t.position===`fixed`?`out-of-flow`:s(e.tagName)?`block`:sa(e,t.display)||ca(e,t.display)?`inline`:`block`}function ua(e,t,n){let r={chars:[],advances:[],sourceNode:[],sourceOffset:[],inlineIndex:[],inlineElements:[],boxes:[]};return da(e,t,n,r),n.preserve?r:ma(r)}function da(e,t,n,r){let i=()=>{let e=0;for(let t=r.chars.length-1;t>=0&&r.chars[t]!==`
965
- `;t--)e+=r.advances[t];return e};if(!Sa(e.tagName)){for(let a of Array.from(e.childNodes))if(a.nodeType===Node.TEXT_NODE){if(n.preserve){let e=a.textContent??``,o=0;for(let s of e){let c=o;if(o+=s.length,s===`\r`){if(e[o]===`
966
- `)continue;ha(r,`
955
+ `)&&(r.push(...Ne(e,i,o,t,n,a)),a=0,i=o+1);return Ce(r,e)}function Te(e,t,n){if(!n)return t-e;let r=0;for(let i=e;i<t;i++)r+=n[i]??1;return r}function Ee(e,t,n,r=0){return t<=e?0:Te(e,t,n)-Math.min(r,De(t-1,n))}function De(e,t){return t?(t[e]??1)-1:0}function Oe(e,t={}){let{advances:n,tracking:r=0}=t,i=0;for(let t of Me(e,0,e.length))for(let a of Ae(e,t.start,t.end))i=Math.max(i,Ee(a.start,a.end,n,r));return i}function ke(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===``&&(t(r,n),n++)}function Ae(e,t,n){let r=[],i=t;for(let a=t;a<n;a++){if(e[a]===``){a>i&&r.push({start:i,end:a}),r.push({start:a,end:a+1}),i=a+1;continue}if(e[a]!==`-`)continue;let o=a===t;for(;a+1<n&&e[a+1]===`-`;)a++;let s=a+1;!o&&s<n&&(r.push({start:i,end:s}),i=s)}return r.push({start:i,end:n}),r}var je=/[ \t\r\n\f]/;function Me(e,t,n){let r=[],i=t;for(;i<n;){for(;i<n&&je.test(e[i]);)i++;if(i>=n)break;let t=i;for(;i<n&&!je.test(e[i]);)i++;r.push({start:t,end:i})}return r}function Ne(e,t,n,r,{advances:i,tracking:a=0},o=0){let s=Me(e,t,n);if(s.length===0)return[{start:t,end:t}];if(r<=0)return[{start:s[0].start,end:s[s.length-1].end}];let c=[],l=null,u=0,d=Math.max(0,o),f=()=>r-d;for(let t of s){let n=!1;for(let r of Ae(e,t.start,t.end)){let e=r.start,t=r.end,o=l!==null&&!n?e-1:e,s=u+Te(o,t,i),p=Math.min(a,De(t-1,i));if(l!==null&&s-p<=f())l.end=t,u=s;else{for(l!==null&&(c.push(l),d=0);;){let n=e;for(;n<t&&Ee(e,n+1,i,a)<=f();)n++;if(n===t||n===e)break;c.push({start:e,end:n}),d=0,e=n}l={start:e,end:t},u=Te(e,t,i)}n=!0}}return l!==null&&c.push(l),c}function Pe(e,t){let n=e.row.map(e=>e.node.localRect).sort((e,t)=>e.x-t.x),r=[];for(let e=1;e<n.length;e++){let i=n[e-1].x+n[e-1].width-t,a=n[e].x-t;a>i&&r.push({start:i,end:a})}return r}function Fe(e,t,n,r,i){if(e.style.ruleBreak!==`intersection`)return[{start:0,end:i}];let a=[t[n-1],t[n]].flatMap(e=>Pe(e,r)).sort((e,t)=>e.start-t.start),o=(e,t)=>({start:e,end:t,spanned:!1,beforeOccupied:!0,afterOccupied:!0}),s=[],c=0;for(let e of a)e.start>c&&s.push(o(c,e.start)),c=Math.max(c,e.end);return c<i&&s.push(o(c,i)),ve(s,`intersection`,`all`,e.style.ruleInset===`overlap-join`?`overlap-join`:0)}function Ie(e,t){return typeof t!=`number`||t<=0?e:e.map(e=>({...e,start:e.start+t,end:e.end-t})).filter(e=>e.end>e.start)}function Le(e,t,n,r,i,a,o){let s=Fn(e.style,`x`,t),c=Fn(e.style,`y`,n),l=qe(e).map(e=>{let n=X(e.style.margin,t);return{node:e,base:Ke(e,t,o),grow:e.style.flexGrow,shrink:e.style.flexShrink,min:Xe(e,t,o),max:Ln(e.style.maxWidth,t),margin:n}}),u=[];if(e.style.flexWrap===`wrap`){let n=[],r=0;for(let e of l){let i=Math.max(0,An(e.base,e.min,e.max))+(e.margin.left??0)+(e.margin.right??0),a=n.length===0?i:r+s+i;n.length>0&&a>t&&(u.push(n),n=[],r=0),n.push(e),r=n.length===1?i:r+s+i}n.length>0&&u.push(n),e.style.wrapReverse&&u.reverse()}else u.push(l);let d=i.left+a.left,f=i.top+a.top,p=u.map(e=>{let n=s*Math.max(0,e.length-1),i=e.reduce((e,t)=>e+(t.margin.left??0)+(t.margin.right??0),0),a=Math.max(0,t-n-i),c=e.some(e=>e.margin.left===null||e.margin.right===null),l=e.reduce((e,t)=>e+t.base,0),u=c&&l<=a?e.map(e=>Math.max(0,An(e.base,e.min,e.max))):Ue(e,a);for(let n=0;n<e.length;n++)J(e[n].node,t,r,0,0,`fill`,o,{width:u[n]});return{row:e,widths:u,availableForItems:a,height:e.reduce((e,t)=>Math.max(e,t.node.localRect.height),0)}}),m=p.map(e=>e.height),h=c*Math.max(0,p.length-1),g;if(e.style.flexWrap===`nowrap`)r===void 0?Number.isFinite(n)&&(m[0]=Math.max(n,m[0]??0)):m[0]=r,g=[0];else{let t=m.reduce((e,t)=>e+t,0),r=Number.isFinite(n)?Math.max(0,n-t-h):0,i=Je(e.style);if(i===`stretch`&&r>0){let e=B(Array.from({length:p.length},()=>1),r);for(let t=0;t<m.length;t++)m[t]+=e[t];g=He(`start`,m,0)}else g=He(i===`stretch`?`start`:i,m,r)}for(let i=0;i<p.length;i++){let{row:a,widths:l,availableForItems:u}=p[i],h=m[i],_=g[i]+i*c;for(let i=0;i<a.length;i++){let s=a[i].node,c=We(s,e),u=a[i].margin,d=u.top===null||u.bottom===null,f=s.style.height!==void 0&&s.style.height.kind!==`auto`;if(c===`stretch`&&!d&&!f&&h!==s.localRect.height){let e=u.top??0,a=u.bottom??0,c=Number.isFinite(n)?n:void 0,d=An(Math.max(0,h-e-a),Ln(s.style.minHeight,c)??0,Ln(s.style.maxHeight,c));if(d===s.localRect.height)continue;J(s,t,r,0,0,`fill`,o,{width:l[i],height:d})}}let v=l.reduce((e,t)=>e+t,0),y=Math.max(0,u-v),b=a.reduce((e,t)=>e+ +(t.margin.left===null)+ +(t.margin.right===null),0),x=Array.from({length:a.length},()=>0),S=Array.from({length:a.length},()=>0),C;if(b>0&&y>0){let e=B(Array.from({length:b},()=>1),y),t=0;for(let n=0;n<a.length;n++)a[n].margin.left===null&&(x[n]=e[t++]),a[n].margin.right===null&&(S[n]=e[t++]);C=He(`start`,l,0)}else C=He(Ye(e.style),l,y);let w=0;for(let t=0;t<a.length;t++){let n=a[t],r=n.node,i=n.margin.left??0,o=n.margin.right??0;w+=x[t]+i,r.localRect={...r.localRect,x:d+C[t]+t*s+w,y:f+_+Be(r,e.style.alignItems,h,n.margin)},w+=S[t]+o}}let _=m.reduce((e,t)=>e+t,0)+h,v=Number.isFinite(n)?Math.max(n,_):_;if(e.style.ruleX||e.style.ruleY){let n=[],r=[];for(let i=0;i<p.length;i++){let a=g[i]+i*c;for(let e of Pe(p[i],d))n.push({bandStart:e.start,bandSize:e.end-e.start,start:a,end:a+m[i]});if(i>0){let n=g[i-1]+(i-1)*c+m[i-1];if(a>n)for(let o of Fe(e,p,i,d,t))r.push({bandStart:n,bandSize:a-n,...o})}}e.decorationRuns=ye({glyphs:j(e.style.glyphSet),ruleX:e.style.ruleX,ruleY:e.style.ruleY,vertical:Ie(n,e.style.ruleInset),horizontal:Ie(r,e.style.ruleInset),contentWidth:t,contentHeight:v,border:i,borderStyle:e.style.borderStyle,borderColor:e.style.borderColor,padding:a})}return Re(e,i,a,t,v),v}function Re(e,t,n,r,i){for(let a of e.children)q(a.style)&&(a.staticSlot={kind:`flex`,direction:e.style.flexDirection,originX:t.left+n.left,originY:t.top+n.top,innerWidth:r,innerHeight:i})}function ze(e,t,n,r,i,a,o){let s=Fn(e.style,`y`,n),c=qe(e).map(i=>{let a=X(i.style.margin,t),s=Math.max(0,t-(a.left??0)-(a.right??0)),c=We(i,e)===`stretch`;J(i,s,r&&Number.isFinite(n)?n:void 0,0,0,c?`fill`:`shrink`,o);let l=Number.isFinite(n)?n:void 0,u=i.style.flexBasis,d=u===void 0||u.kind===`auto`?i.unclampedHeight:u.kind===`cells`?u.value:u.kind===`percent`&&l!==void 0?F(u.value,l):i.unclampedHeight,f=i.style.minHeight===`auto`?i.style.overflow.y===`visible`?i.localRect.height:0:void 0;return{node:i,base:d,grow:i.style.flexGrow,shrink:i.style.flexShrink,min:f??Ln(i.style.minHeight,l)??0,max:Ln(i.style.maxHeight,l),margin:a}}),l=s*Math.max(0,c.length-1),u=c.reduce((e,t)=>e+(t.margin.top??0)+(t.margin.bottom??0),0),d=Number.isFinite(n),f=c.reduce((e,t)=>e+t.base,0),p=d?Math.max(0,n-l-u):f,m=r?p:Math.max(p,f),h=c.some(e=>e.margin.top===null||e.margin.bottom===null),g=d&&!(d&&h&&f<=m)?Ue(c,m):c.map(e=>Math.max(0,An(e.base,e.min,e.max)));for(let n=0;n<c.length;n++)if(g[n]!==c[n].node.localRect.height){let r=c[n],i=Math.max(0,t-(r.margin.left??0)-(r.margin.right??0)),a=We(r.node,e)===`stretch`;J(r.node,i,g[n],0,0,a?`fill`:`shrink`,o,{height:g[n]})}let _=g.reduce((e,t)=>e+t,0),v=Math.max(0,m-_),y=c.reduce((e,t)=>e+ +(t.margin.top===null)+ +(t.margin.bottom===null),0),b=Array.from({length:c.length},()=>0),x=Array.from({length:c.length},()=>0),S;if(y>0&&v>0){let e=B(Array.from({length:y},()=>1),v),t=0;for(let n=0;n<c.length;n++)c[n].margin.top===null&&(b[n]=e[t++]),c[n].margin.bottom===null&&(x[n]=e[t++]);S=He(`start`,g,0)}else S=He(Ye(e.style),g,v);let C=i.left+a.left,w=i.top+a.top,T=0;for(let n=0;n<c.length;n++){let r=c[n],i=r.node,a=r.margin.top??0,o=r.margin.bottom??0;T+=b[n]+a,i.localRect={...i.localRect,x:C+Ve(i,e.style.alignItems,t,r.margin),y:w+S[n]+n*s+T},T+=x[n]+o}let E=_+l+u,D=d?Math.max(n,E):E;if(e.style.ruleY&&c.length>1){let n=[],r=c.map(e=>e.node.localRect).slice().sort((e,t)=>e.y-t.y);for(let e=1;e<r.length;e++){let i=r[e-1].y+r[e-1].height-w,a=r[e].y-w-i;a>0&&n.push({bandStart:i,bandSize:a,start:0,end:t})}e.decorationRuns=ye({glyphs:j(e.style.glyphSet),ruleX:null,ruleY:e.style.ruleY,vertical:[],horizontal:Ie(n,e.style.ruleInset),contentWidth:t,contentHeight:D,border:i,borderStyle:e.style.borderStyle,borderColor:e.style.borderColor,padding:a})}return Re(e,i,a,t,D),D}function Be(e,t,n,r){let i=e.style.alignSelf===`auto`?t:e.style.alignSelf,a=r.top??0,o=r.bottom??0,s=n-e.localRect.height,c=r.top===null&&r.bottom===null,l=r.top===null&&r.bottom!==null,u=r.bottom===null&&r.top!==null;return c?Math.floor(s/2):l?s-o:u?a:a+Ge(i,n,e.localRect.height)}function Ve(e,t,n,r){let i=e.style.alignSelf===`auto`?t:e.style.alignSelf,a=r.left??0,o=r.right??0,s=n-e.localRect.width,c=r.left===null&&r.right===null,l=r.left===null&&r.right!==null,u=r.right===null&&r.left!==null;return c?Math.floor(s/2):l?s-o:u?a:a+Ge(i,n,e.localRect.width)}function He(e,t,n){let r=t.length;if(r===0)return[];let i=[],a=0;if(e===`space-between`&&r>1){let e=Math.floor(n/(r-1)),o=n-e*(r-1);for(let n=0;n<r;n++)i.push(a),a+=t[n]+e+ +(n<o);return i}if((e===`space-around`||e===`space-evenly`)&&n>0){let o=B(Array.from({length:r+1},(t,n)=>e===`space-evenly`||n===0||n===r?1:2),n);for(let e=0;e<r;e++)a+=o[e],i.push(a),a+=t[e];return i}e===`center`?a=Math.floor(n/2):e===`end`&&(a=n);for(let e=0;e<r;e++)i.push(a),a+=t[e];return i}function Ue(e,t){let n=e.length,r=(t,n)=>Math.max(0,An(t,e[n].min??0,e[n].max)),i=e.map(e=>e.base),a=t>=i.reduce((e,t,n)=>e+r(t,n),0),o=Array.from({length:n},()=>0),s=Array.from({length:n},()=>!1);for(let t=0;t<n;t++){let n=r(i[t],t);((a?e[t].grow:e[t].shrink)===0||a&&i[t]>n||!a&&i[t]<n)&&(o[t]=n,s[t]=!0)}for(;;){let c=[];for(let e=0;e<n;e++)s[e]||c.push(e);if(c.length===0)break;let l=o.reduce((e,t,n)=>s[n]?e+t:e,0),u=c.reduce((e,t)=>e+i[t],0),d=t-l-u,f=a?Math.max(0,d):Math.max(0,-d),p=B(c.map(t=>a?e[t].grow:i[t]*e[t].shrink),f),m=c.map((e,t)=>i[e]+(a?p[t]:-p[t])),h=c.map((e,t)=>r(m[t],e)),g=h.reduce((e,t,n)=>e+(t-m[n]),0);if(g===0){for(let e=0;e<c.length;e++)o[c[e]]=h[e];break}for(let e=0;e<c.length;e++){let t=h[e]-m[e];(g>0?t>0:t<0)&&(o[c[e]]=h[e],s[c[e]]=!0)}}return o}function B(e,t){let n=e.reduce((e,t)=>e+t,0);if(n===0||t<=0)return e.map(()=>0);let r=e.map(e=>e/n*t),i=r.map(Math.floor),a=t-i.reduce((e,t)=>e+t,0);if(a>0){let e=r.map((e,t)=>[t,e-Math.floor(e)]).sort((e,t)=>t[1]===e[1]?e[0]-t[0]:t[1]-e[1]);for(let[t]of e){if(a<=0)break;i[t]+=1,--a}}return i}function We(e,t){return e.style.alignSelf===`auto`?t.style.alignItems:e.style.alignSelf}function Ge(e,t,n){return e===`center`?Math.max(0,Math.floor((t-n)/2)):e===`end`?Math.max(0,t-n):0}function Ke(e,t,n){let r=e.style.flexBasis,i=e.style.width;return r!==void 0&&r.kind!==`auto`?qn(r,t,e,n):i!==void 0&&i.kind!==`auto`?qn(i,t,e,n):Jn(e,n)}function qe(e){let t=e.children.filter(e=>!q(e.style)).sort((e,t)=>e.style.order-t.style.order);return e.style.flexReverse&&t.reverse(),t}function Je(e){return e.wrapReverse?e.alignContent===`start`?`end`:e.alignContent===`end`?`start`:e.alignContent:e.alignContent}function Ye(e){let t=e.justifyContent===`stretch`?`start`:e.justifyContent;return e.flexReverse?t===`start`?`end`:t===`end`?`start`:t:t}function Xe(e,t,n){return e.style.minWidth===`auto`?e.style.overflow.x===`visible`?Zn(e,n):0:Ln(e.style.minWidth,t)??0}function Ze(e){return e===`auto`||e===`scroll`}function Qe(e){return e.children.filter(e=>e.inlineBox)}function $e(e){return{right:e.scrollbarSize.y+e.scrollbarInset.x,bottom:e.scrollbarSize.x+e.scrollbarInset.y}}function et(e){if(e.scrollbarWidth===`none`)return{right:0,bottom:0};let t=$e(e);return{right:e.overflow.y===`scroll`?t.right:0,bottom:e.overflow.x===`scroll`?t.bottom:0}}function tt(){return{display:`block`,flexDirection:`row`,flexReverse:!1,flexWrap:`nowrap`,wrapReverse:!1,flexGrow:0,flexShrink:0,flexBasis:void 0,order:0,justifyContent:`stretch`,alignContent:`stretch`,alignItems:`stretch`,alignSelf:`auto`,justifyItems:`stretch`,justifySelf:`auto`,gridTemplateColumns:{kind:`none`},gridTemplateRows:{kind:`none`},gridAutoColumns:[rt()],gridAutoRows:[rt()],gridAutoFlow:{direction:`row`,dense:!1},gridTemplateAreas:null,gridColumnStart:{kind:`auto`},gridColumnEnd:{kind:`auto`},gridRowStart:{kind:`auto`},gridRowEnd:{kind:`auto`},width:void 0,height:void 0,minWidth:`auto`,minHeight:`auto`,maxWidth:void 0,maxHeight:void 0,padding:nt(),margin:{top:0,right:0,bottom:0,left:0},position:`static`,insets:{top:null,right:null,bottom:null,left:null},gapX:0,gapY:0,border:nt(),borderStyle:{top:`solid`,right:`solid`,bottom:`solid`,left:`solid`},overflow:{x:`visible`,y:`visible`},scrollbarWidth:`auto`,scrollbarSize:{x:1,y:1},scrollbarInset:{x:0,y:0},overscroll:{x:!0,y:!0},scrollbarColor:null,whiteSpace:`normal`,tabSize:8,lineGap:0,tracking:0,textOverflow:`clip`,color:void 0,backgroundColor:void 0,backgroundClear:!1,fontWeight:`400`,fontStyle:`normal`,textDecorationLine:`none`,borderColor:{top:void 0,right:void 0,bottom:void 0,left:void 0},textAlignBlocked:!1,textAlign:`start`,textIndent:0,tableRole:`none`,tableLayout:`auto`,borderCollapse:!1,borderSpacingX:0,borderSpacingY:0,captionSide:`top`,verticalAlign:`start`,glyphSet:null,opacity:1,zIndex:null,latticeBorder:null,ruleX:null,ruleY:null,ruleBreak:`normal`,ruleInset:0,ruleVisibilityItems:`normal`,columnCount:null,columnWidth:null,columnFill:`balance`,columnSpan:!1,breakBeforeColumn:!1,breakAfterColumn:!1,breakInsideAvoid:!1}}function nt(){return{top:0,right:0,bottom:0,left:0}}function rt(){return{min:{kind:`auto`},max:{kind:`auto`}}}function it(e,t,n,r,i,a){let o=e.style,s=Number.isFinite(n)?n:void 0,c=e.subgrid?.cols,l=e.subgrid?.rows,u=c?c.gap:Fn(o,`x`,t),d=l?l.gap:Fn(o,`y`,s),f=mt(e,t,s,u,d,e.subgrid?{col:e.subgrid.colSpan,row:e.subgrid.rowSpan}:void 0),{children:p,placed:m,colLines:h,rowLines:g,colTracks:_,rowTracks:v,colCollapsed:y,rowCollapsed:b}=f,x=p.map(e=>X(e.style.margin,t)),S=p.map(e=>e.style.justifySelf===`auto`?o.justifyItems:e.style.justifySelf),C=p.map(at),w=c?st(c):Ot(_,y,ct(f,C,x,a),t,u,o.justifyContent===`stretch`),T=c?c.positions:kt(w,t,o.justifyContent),E=[];for(let e=0;e<p.length;e++){let t=p[e],n=m.items[e],r=jt(T,w.sizes,n.col.start,n.col.span),i=x[e],o=Math.max(0,r-V(i)),s=C[e];if(s.cols||s.rows){let e=s.cols?ot(T,w,u,n.col.start,n.col.span,ut(t,`cols`,i,r)):void 0;t.subgrid={colSpan:n.col.span,rowSpan:n.row.span,cols:e,rows:void 0}}else t.subgrid=void 0;let c=S[e],l=i.left===null||i.right===null,d=t.style.width!==void 0&&t.style.width.kind!==`auto`;s.cols?J(t,r,void 0,0,0,`fill`,a,{width:o}):c===`stretch`&&!l&&!d?J(t,r,void 0,0,0,`fill`,a,{width:An(o,t.style.minWidth===`auto`?t.style.overflow.x===`visible`?Zn(t,a):0:Ln(t.style.minWidth,r)??0,Rn(t.style.maxWidth,r,t,a))}):J(t,o,void 0,0,0,`shrink`,a),E.push(t.localRect.width)}let D=l?st(l):Ot(v,b,lt(f,C,x),s??`max-content`,d,o.alignContent===`stretch`),O=At(D),k=l?l.positions:kt(D,s??O,o.alignContent),A=r.left+i.left,ee=r.top+i.top;for(let t=0;t<p.length;t++){let n=p[t],r=m.items[t],i=x[t],o=jt(T,w.sizes,r.col.start,r.col.span),s=jt(k,D.sizes,r.row.start,r.row.span),c=Math.max(0,s-vt(i)),l=We(n,e),u=i.top===null||i.bottom===null,f=n.style.height!==void 0&&n.style.height.kind!==`auto`;if(C[t].rows)n.subgrid.rows=ot(k,D,d,r.row.start,r.row.span,ut(n,`rows`,i,o)),J(n,o,s,0,0,`fill`,a,{width:E[t],height:c});else if(l===`stretch`&&!u&&!f){let e=An(c,n.style.minHeight===`auto`?n.style.overflow.y===`visible`?n.localRect.height:0:Ln(n.style.minHeight,s)??0,Ln(n.style.maxHeight,s));e!==n.localRect.height&&J(n,o,s,0,0,`fill`,a,{width:E[t],height:e})}else n.style.height?.kind===`percent`&&J(n,o,s,0,0,`fill`,a,{width:E[t]});n.localRect={...n.localRect,x:A+T[r.col.start]+Mt(S[t],i.left,i.right,o,n.localRect.width),y:ee+k[r.row.start]+Mt(l,i.top,i.bottom,s,n.localRect.height)}}let te=Number.isFinite(n)?Math.max(n,O):O;if(o.ruleX||o.ruleY){let n=w.sizes.length,a=D.sizes.length,s=Array.from({length:n},()=>Array.from({length:a},()=>!1)),c=Array.from({length:Math.max(0,n-1)},()=>Array.from({length:a},()=>!1)),l=Array.from({length:Math.max(0,a-1)},()=>Array.from({length:n},()=>!1));for(let e of m.items)for(let t=e.col.start;t<e.col.start+e.col.span&&t<n;t++)for(let r=e.row.start;r<e.row.start+e.row.span&&r<a;r++)s[t][r]=!0,t+1<e.col.start+e.col.span&&t<n-1&&(c[t][r]=!0),r+1<e.row.start+e.row.span&&r<a-1&&(l[r][t]=!0);let u=(e,t,n,r,i,a)=>t.map((t,o)=>({start:t,end:t+n[o],spanned:r[e]?.[o]??!1,beforeOccupied:i(o),afterOccupied:a(o)})),d=(e,t,n)=>{let r=[];for(let i=1;i<e.length;i++){let a=e[i-1]+t[i-1],s=e[i]-a;if(!(s<=0))for(let e of ve(n(i-1),o.ruleBreak,o.ruleVisibilityItems,o.ruleInset))r.push({bandStart:a,bandSize:s,...e})}return r},f=d(T,w.sizes,e=>u(e,k,D.sizes,c,t=>s[e]?.[t]??!1,t=>s[e+1]?.[t]??!1)),p=d(k,D.sizes,e=>u(e,T,w.sizes,l,t=>s[t]?.[e]??!1,t=>s[t]?.[e+1]??!1));e.decorationRuns=ye({glyphs:j(o.glyphSet),ruleX:o.ruleX,ruleY:o.ruleY,vertical:f,horizontal:p,contentWidth:t,contentHeight:te,border:r,borderStyle:o.borderStyle,borderColor:o.borderColor,padding:i})}let ne=e.children.filter(e=>q(e.style));if(ne.length>0){let e=q(o)?{x:r.left,y:r.top,width:i.left+t+i.right,height:i.top+te+i.bottom}:{x:A,y:ee,width:t,height:te};for(let n of ne){let r=ft(n.style.gridColumnStart,n.style.gridColumnEnd,h,m.colOrigin,T,w.sizes,-i.left,t+i.right),a=ft(n.style.gridRowStart,n.style.gridRowEnd,g,m.rowOrigin,k,D.sizes,-i.top,te+i.bottom);n.staticSlot={kind:`grid`,area:{x:A+r.start,y:ee+a.start,width:Math.max(0,r.end-r.start),height:Math.max(0,a.end-a.start)},staticArea:e}}}return te}function at(e){let t=e.style.display===`grid`;return{cols:t&&e.style.gridTemplateColumns.kind===`subgrid`,rows:t&&e.style.gridTemplateRows.kind===`subgrid`}}function ot(e,t,n,r,i,a){let o=e[r]+a.start,s=t.sizes.slice(r,r+i);return s[0]=Math.max(0,s[0]-a.start),s[i-1]=Math.max(0,s[i-1]-a.end),{positions:Array.from({length:i},(t,n)=>n===0?0:e[r+n]-o),sizes:s,gapBefore:Array.from({length:i},(e,n)=>n===0?0:t.gapBefore[r+n]),gap:n}}function st(e){return{sizes:e.sizes,gapBefore:e.gapBefore,limits:e.sizes}}function ct(e,t,n,r){let i=[];return e.children.forEach((a,o)=>{let s=e.placed.items[o],c=n[o];if(t[o].cols){let e=ut(a,`cols`,c,0);for(let t of dt(a,`cols`,s,e,r))i.push({...t,start:t.start+s.col.start});return}i.push({start:s.col.start,span:s.col.span,min:Xn(a,`min`,r)+V(c),max:Xn(a,`max`,r)+V(c)})}),i}function lt(e,t,n){let r=[];return e.children.forEach((i,a)=>{let o=e.placed.items[a],s=n[a];if(t[a].rows){let e=ut(i,`rows`,s,0);for(let t of dt(i,`rows`,o,e))r.push({...t,start:t.start+o.row.start});return}let c=i.localRect.height+vt(s),l=i.style.minHeight===`auto`&&i.style.overflow.y!==`visible`?vt(s):c;r.push({start:o.row.start,span:o.row.span,min:l,max:c})}),r}function ut(e,t,n,r){let{border:i,padding:a}=e.style;return t===`cols`?{start:(n.left??0)+i.left+Y(a.left,r),end:(n.right??0)+i.right+Y(a.right,r)}:{start:(n.top??0)+i.top+Y(a.top,r),end:(n.bottom??0)+i.bottom+Y(a.bottom,r)}}function dt(e,t,n,r,i){let a=t===`cols`?n.col.span:n.row.span,o=mt(e,void 0,void 0,0,0,{col:n.col.span,row:n.row.span}),s=[];if(o.children.forEach((e,n)=>{let c=o.placed.items[n],l=t===`cols`?c.col:c.row,u=l.start===0,d=l.start+l.span===a,f=(u?r.start:0)+(d?r.end:0),p=X(e.style.margin,0);if(at(e)[t]){let n=ut(e,t,p,0),a=dt(e,t,c,{start:n.start+(u?r.start:0),end:n.end+(d?r.end:0)},i);for(let e of a)s.push({...e,start:e.start+l.start});return}if(t===`cols`)s.push({start:l.start,span:l.span,min:Xn(e,`min`,i)+V(p)+f,max:Xn(e,`max`,i)+V(p)+f});else{let t=e.localRect.height+vt(p)+f;s.push({start:l.start,span:l.span,min:t,max:t})}}),s.length===0){let e=r.start+r.end;s.push({start:0,span:a,min:e,max:e})}return s}function ft(e,t,n,r,i,a,o,s){let c=wt(e,`start`,n),l=wt(t,`end`,n);c!==null&&l!==null?c>l?[c,l]=[l,c]:c===l&&(l=null):c!==null&&t.kind===`span`?l=Tt(c,t,1,n):l!==null&&e.kind===`span`&&(c=Tt(l,e,-1,n));let u=i.length,d=e=>{if(e===null)return;let t=e-r;return t<0||t>u||u===0?void 0:t},f=e=>e===u?i[u-1]+a[u-1]:i[e],p=e=>e===0?i[0]:i[e-1]+a[e-1],m=d(c),h=d(l);return{start:m===void 0?o:f(m),end:h===void 0?s:p(h)}}function pt(e,t){let n=t.gridIntrinsic.get(e);if(n!==void 0)return n;let r=e.style,i=Math.max(typeof r.gapX==`number`?r.gapX:0,r.ruleX?.width??0),a=mt(e,void 0,void 0,i,0,e.subgrid?{col:e.subgrid.colSpan,row:e.subgrid.rowSpan}:void 0),o=a.children.map(at),s=a.children.map(e=>X(e.style.margin,0)),c=Ot(a.colTracks,a.colCollapsed,ct(a,o,s,t),`min-content`,i,!1),l=c.gapBefore.reduce((e,t)=>e+t,0),u={min:c.sizes.reduce((e,t)=>e+t,0)+l,max:c.limits.reduce((e,t)=>e+t,0)+l};return t.gridIntrinsic.set(e,u),u}function mt(e,t,n,r,i,a){let o=e.style,s=_t(e),c=o.gridTemplateColumns.kind===`subgrid`&&a!==void 0,l=o.gridTemplateRows.kind===`subgrid`&&a!==void 0,u=c?ht(a.col):yt(o.gridTemplateColumns,t,r),d=l?ht(a.row):yt(o.gridTemplateRows,n,i),f=o.gridTemplateAreas,p=[...u.tracks],m=[...d.tracks];if(f){c||xt(p,u.lineNames,f.columns,o.gridAutoColumns),l||xt(m,d.lineNames,f.rows,o.gridAutoRows);for(let[e,t]of f.areas)u.lineNames[Math.min(t.colStart,p.length)].push(`${e}-start`),u.lineNames[Math.min(t.colEnd,p.length)].push(`${e}-end`),d.lineNames[Math.min(t.rowStart,m.length)].push(`${e}-start`),d.lineNames[Math.min(t.rowEnd,m.length)].push(`${e}-end`)}let h={explicitCount:p.length,names:u.lineNames},g={explicitCount:m.length,names:d.lineNames},_=Dt(s.map(e=>({col:Et(e.style.gridColumnStart,e.style.gridColumnEnd,h),row:Et(e.style.gridRowStart,e.style.gridRowEnd,g)})),p.length,m.length,o.gridAutoFlow);return c&&gt(_,`col`,p.length),l&&gt(_,`row`,m.length),{children:s,placed:_,colLines:h,rowLines:g,colTracks:St(p,_.colOrigin,_.colCount,o.gridAutoColumns),rowTracks:St(m,_.rowOrigin,_.rowCount,o.gridAutoRows),colCollapsed:Ct(u,_.colOrigin,_.colCount,_.items.map(e=>e.col)),rowCollapsed:Ct(d,_.rowOrigin,_.rowCount,_.items.map(e=>e.row))}}function ht(e){return{tracks:Array.from({length:e},()=>rt()),lineNames:Array.from({length:e+1},()=>[])}}function gt(e,t,n){let r=t===`col`?e.colOrigin:e.rowOrigin;for(let i of e.items){let e=i[t],a=Math.min(Math.max(e.start+r,0),n-1),o=Math.min(Math.max(e.start+r+e.span,a+1),n);e.start=a,e.span=o-a}t===`col`?(e.colOrigin=0,e.colCount=n):(e.rowOrigin=0,e.rowCount=n)}function _t(e){return e.children.filter(e=>!q(e.style)&&!e.inlineBox).sort((e,t)=>e.style.order-t.style.order)}function V(e){return(e.left??0)+(e.right??0)}function vt(e){return(e.top??0)+(e.bottom??0)}function yt(e,t,n){if(e.kind!==`tracks`)return{tracks:[],lineNames:[[]]};let r=(e.lineNames??Array.from({length:e.tracks.length+1},()=>[])).map(e=>[...e]);if(!e.autoRepeat)return{tracks:e.tracks,lineNames:r};let{index:i,tracks:a,mode:o}=e.autoRepeat,s=1;if(t!==void 0){let e=a.reduce((e,n)=>{let r=bt(n.min,t)??bt(n.max,t)??1;return e+Math.max(1,r)},0);s=Math.max(1,Math.floor((t+n)/(e+n*a.length)))}let c=[];for(let e=0;e<s;e++)c.push(...a);let l=[...e.tracks.slice(0,i),...c,...e.tracks.slice(i)],u=e.autoRepeat.lineNames??Array.from({length:a.length+1},()=>[]),d=r.slice(0,i),f=[...e.autoRepeat.leadingNames??[]];for(let e=0;e<s;e++){f.push(...u[0]);for(let e=0;e<a.length;e++)d.push(f),f=[...u[e+1]]}return d.push([...f,...r[i]]),d.push(...r.slice(i+1)),o===`auto-fit`?{tracks:l,lineNames:d,autoFit:{start:i,end:i+c.length}}:{tracks:l,lineNames:d}}function bt(e,t){if(e.kind===`cells`)return e.value;if(e.kind===`percent`&&t!==void 0)return F(e.value,t);if(e.kind===`math`){let n=[];for(let r of e.args){let e=bt(r,t);if(e===void 0)return;n.push(e)}return e.fn===`min`?Math.min(...n):Math.max(...n)}}function xt(e,t,n,r){for(let i=e.length;i<n;i++)e.push(r[(i-e.length)%r.length]),t.push([])}function St(e,t,n,r){let i=[];for(let a=0;a<n;a++){let n=a+t;if(n>=0&&n<e.length)i.push(e[n]);else{let t=n<0?n:n-e.length;i.push(r[(t%r.length+r.length)%r.length])}}return i}function Ct(e,t,n,r){let i=Array.from({length:n},()=>!1);if(!e.autoFit)return i;for(let a=e.autoFit.start;a<e.autoFit.end;a++){let e=a-t;e<0||e>=n||r.some(t=>e>=t.start&&e<t.start+t.span)||(i[e]=!0)}return i}function wt(e,t,n){if(e.kind===`line`)return e.value>0?e.value-1:n.explicitCount+1+e.value;if(e.kind!==`name`)return null;if(e.nth===void 0){let r=`${e.name}-${t}`,i=n.names.findIndex(e=>e.includes(r));if(i!==-1)return i}let r=e.nth??1,i=n.explicitCount,a=0;if(r>0){for(let t=0;t<=i;t++)if(n.names[t].includes(e.name)&&++a===r)return t;return i+(r-a)}for(let t=i;t>=0;t--)if(n.names[t].includes(e.name)&&++a===-r)return t;return-(-r-a)}function Tt(e,t,n,r){if(t.name===void 0)return e+n*t.value;let i=t.value,a=e;for(;i>0;)a+=n,(!(a>=0&&a<=r.explicitCount)||r.names[a].includes(t.name))&&i--;return a}function Et(e,t,n){let r=wt(e,`start`,n),i=wt(t,`end`,n);if(r!==null&&i!==null)return r===i?{start:r,span:1}:{start:Math.min(r,i),span:Math.abs(i-r)};if(r!==null)return{start:r,span:(t.kind===`span`?Tt(r,t,1,n):r+1)-r};if(i!==null){let t=e.kind===`span`?Tt(i,e,-1,n):i-1;return{start:t,span:i-t}}return{start:null,span:e.kind===`span`?e.value:t.kind===`span`?t.value:1}}function Dt(e,t,n,r){let i=r.direction===`row`,a=e.map(e=>i?e.row:e.col),o=e.map(e=>i?e.col:e.row),s=i?t:n,c=i?n:t,l=0,u=Math.max(s,1);for(let t=0;t<e.length;t++){let e=o[t];e.start!==null&&(l=Math.min(l,e.start),u=Math.max(u,e.start+e.span))}for(let t=0;t<e.length;t++){let e=o[t];e.start===null&&(u=Math.max(u,l+e.span))}let d=0;for(let t=0;t<e.length;t++){let e=a[t];e.start!==null&&(d=Math.min(d,e.start))}let f=new Set,p=(e,t,n,r)=>{for(let i=e;i<e+n;i++)for(let e=t;e<t+r;e++)if(f.has(`${i}:${e}`))return!1;return!0},m=(e,t,n,r)=>{for(let i=e;i<e+n;i++)for(let e=t;e<t+r;e++)f.add(`${i}:${e}`)},h=e.map(()=>null);for(let t=0;t<e.length;t++){let e=a[t],n=o[t];e.start!==null&&n.start!==null&&(h[t]={major:e.start,minor:n.start},m(e.start,n.start,e.span,n.span))}let g=new Map;for(let t=0;t<e.length;t++){let e=a[t],n=o[t];if(e.start===null||n.start!==null)continue;let i=r.dense?l:Math.max(l,g.get(e.start)??l);for(;!p(e.start,i,e.span,n.span);)i++;h[t]={major:e.start,minor:i},m(e.start,i,e.span,n.span),r.dense||g.set(e.start,i+n.span),u=Math.max(u,i+n.span)}let _=d,v=l;for(let t=0;t<e.length;t++){if(h[t]!==null)continue;let e=a[t],n=o[t];if(r.dense&&(_=d,v=l),n.start!==null){for(n.start<v&&_++;!p(_,n.start,e.span,n.span);)_++;h[t]={major:_,minor:n.start},m(_,n.start,e.span,n.span),v=n.start+n.span}else{let r=_,i=v;for(;;){if(i+n.span>u){r++,i=l;continue}if(p(r,i,e.span,n.span))break;i++}h[t]={major:r,minor:i},m(r,i,e.span,n.span),_=r,v=i+n.span}}let y=Math.max(c,d);for(let t=0;t<e.length;t++)y=Math.max(y,h[t].major+a[t].span);let b=e.map((e,t)=>{let n={start:h[t].major-d,span:a[t].span},r={start:h[t].minor-l,span:o[t].span};return i?{col:r,row:n}:{col:n,row:r}}),x=y-d,S=u-l;return i?{items:b,colOrigin:l,colCount:S,rowOrigin:d,rowCount:x}:{items:b,colOrigin:d,colCount:x,rowOrigin:l,rowCount:S}}function Ot(e,t,n,r,i,a){let o=typeof r==`number`?r:void 0,s=e.map((e,n)=>{if(t[n])return{base:0,limit:0,baseIntrinsic:!1,limitKind:`fixed`,frFactor:0,collapsed:!0};let r=bt(e.min,o),i=r??0,a=r===void 0,s=e.max;if(s.kind===`fr`)return{base:i,limit:null,baseIntrinsic:a,limitKind:`fr`,frFactor:s.value,collapsed:!1};let c=bt(s,o);return c===void 0?{base:i,limit:null,baseIntrinsic:a,limitKind:s.kind===`min-content`?`intrinsic-min`:`intrinsic-max`,frFactor:0,collapsed:!1}:{base:i,limit:c,baseIntrinsic:a,limitKind:`fixed`,frFactor:0,collapsed:!1}}),c=s.map((e,t)=>t===0||e.collapsed?0:s.slice(0,t).some(e=>!e.collapsed)?i:0),l=(e,t)=>{let n=0;for(let r=e+1;r<e+t;r++)n+=c[r];return n},u=e=>e.collapsed?0:e.limitKind===`fixed`?e.limit:Math.max(e.base,e.limit??e.base),d=[...n].sort((e,t)=>e.span-t.span);for(let e of d){let t=[],n=!1;for(let r=e.start;r<e.start+e.span;r++){let e=s[r];e!==void 0&&(e.limitKind===`fr`&&(n=!0),t.push(e))}if(t.length===0)continue;let r=l(e.start,e.span);if(n){let n=t.filter(e=>e.limitKind===`fr`&&e.baseIntrinsic&&!e.collapsed);if(n.length===0)continue;let i=t.reduce((e,t)=>e+t.base,0)+r,a=e.min-i;if(a>0){let e=n.reduce((e,t)=>e+t.frFactor,0),t=B(n.map(t=>e>0?t.frFactor:1),a);n.forEach((e,n)=>{e.base+=t[n]})}continue}let i=t.filter(e=>e.baseIntrinsic&&!e.collapsed);if(i.length>0){let n=t.reduce((e,t)=>e+t.base,0)+r,a=e.min-n;if(a>0){let e=B(i.map(()=>1),a);i.forEach((t,n)=>{t.base+=e[n]})}}for(let[n,i]of[[`intrinsic-min`,e.min],[`intrinsic-max`,e.max]]){let e=t.filter(e=>e.limitKind===n&&!e.collapsed);if(e.length===0)continue;let a=i-(t.reduce((e,t)=>e+u(t),0)+r);if(a>0){let t=B(e.map(()=>1),a);e.forEach((e,n)=>{e.limit=u(e)+t[n]})}}}for(let e of s)e.collapsed||(e.limitKind===`fixed`?e.base=Math.min(e.base,e.limit):e.limitKind!==`fr`&&(e.limit=Math.max(e.base,e.limit??e.base)));if(o===void 0){let e=s.filter(e=>e.limitKind===`fr`&&!e.collapsed);if(e.length>0){let t=0;for(let n of e)n.frFactor>0&&(t=Math.max(t,n.base/n.frFactor));for(let e of n){let n=0,r=l(e.start,e.span);for(let t=e.start;t<e.start+e.span;t++){let e=s[t];e===void 0||e.collapsed||(e.limitKind===`fr`?n+=e.frFactor:r+=u(e))}n<=0||(t=Math.max(t,(e.max-r)/Math.max(n,1)))}for(let n of e){let e=Math.max(n.base,xe(n.frFactor*t));n.limit=e,r===`max-content`&&(n.base=e)}}if(r===`max-content`)for(let e of s)!e.collapsed&&e.limitKind!==`fr`&&(e.base=u(e))}else{let e=c.reduce((e,t)=>e+t,0),t=o-e-s.reduce((e,t)=>e+t.base,0);for(;!(t<=0);){let e=s.filter(e=>!e.collapsed&&e.limitKind!==`fr`&&e.base<u(e));if(e.length===0)break;let n=B(e.map(()=>1),t),r=0;if(e.forEach((e,t)=>{let i=Math.min(n[t],u(e)-e.base);e.base+=i,r+=i}),t-=r,r===0)break}let n=s.filter(e=>e.limitKind===`fr`);if(n.length>0){let t=Math.max(0,o-e-s.reduce((e,t)=>e+(t.limitKind===`fr`?0:t.base),0)),r=n,i=t,a=n.reduce((e,t)=>e+t.frFactor,0);for(a<1&&(i=Math.floor(i*a));;){let e=B(r.map(e=>e.frFactor),i),t=r.filter((t,n)=>e[n]<t.base);if(t.length===0){r.forEach((t,n)=>{t.base=Math.max(t.base,e[n])});break}for(let e of t)i-=e.base;if(i=Math.max(0,i),r=r.filter(e=>!t.includes(e)),r.length===0)break}}if(a){let t=o-e-s.reduce((e,t)=>e+t.base,0),n=s.filter(e=>!e.collapsed&&e.limitKind===`intrinsic-max`);if(t>0&&n.length>0){let e=B(n.map(()=>1),t);n.forEach((t,n)=>{t.base+=e[n]})}}}return{sizes:s.map(e=>e.base),gapBefore:c,limits:s.map(e=>u(e))}}function kt(e,t,n){let{sizes:r,gapBefore:i}=e,a=Math.max(0,t-At(e)),o=He(n===`stretch`?`start`:n,r,a),s=[],c=0;for(let e=0;e<r.length;e++)c+=i[e],s.push(o[e]+c);return s}function At(e){return e.sizes.reduce((e,t)=>e+t,0)+e.gapBefore.reduce((e,t)=>e+t,0)}function jt(e,t,n,r){let i=n+r-1;return e[n]===void 0||e[i]===void 0?0:e[i]+t[i]-e[n]}function Mt(e,t,n,r,i){let a=t??0,o=n??0,s=r-i;return t===null&&n===null?Math.floor(s/2):t===null?s-o:n===null?a:a+Ge(e,r,i+a+o)}function Nt(e,t,n){let r=e.columnWidth===null?null:Math.max(1,Math.floor((t+n)/(e.columnWidth+n)));return e.columnCount!==null&&r!==null?Math.max(1,Math.min(e.columnCount,r)):r===null?Math.max(1,e.columnCount??1):r}function Pt(e,t,n){let r=Nt(e,t,n),i=Math.max(1,Math.floor((t-(r-1)*n)/r)),a=Math.max(0,t-(r*i+(r-1)*n));return Array.from({length:r},(e,t)=>i+ +(t<a))}function Ft(e,t){let n=Math.max(typeof e.gapX==`number`?e.gapX:0,e.ruleX?.width??0);return e.columnCount===null?Math.max(e.columnWidth??1,t):e.columnCount*t+(e.columnCount-1)*n}function It(e,t){return e===void 0?t:t===void 0?e:Math.min(e,t)}function Lt(e,t,n){for(;e<t;){let r=e+t>>1;n(r)?t=r:e=r+1}return e}function Rt(e,t,n){let r=Nt(e,t,n),i=Math.max(1,Math.floor((t-(r-1)*n)/r));return{count:r,width:i,leftover:Math.max(0,t-(r*i+(r-1)*n))}}function zt(e,t,n){return e===`all`?!0:e===`around`?t||n:t&&n}function Bt(e,t,n,r){let i=Nn(e,Math.max(1,t.width-e.style.tracking)),{heights:a,textOffsets:o}=Pn(e,i),s=e.style.lineGap,c=Ht(a.map(e=>e+s)),l;if(e.style.columnFill===`auto`&&r!==void 0)l=Math.max(1,r);else{let e=Lt(c.reduce((e,t)=>Math.max(e,t.rows-s),1),Math.max(1,c.reduce((e,t)=>e+t.rows,0)-s),e=>Vt(c,s,e).columns<=t.count);l=r===void 0?e:Math.max(1,Math.min(e,r))}let u=Vt(c,s,l);return{spans:i,lineY:u.top,textY:u.top.map((e,t)=>e+o[t]),lineX:u.column.map(e=>e*(t.width+n)),totalRows:u.maxUsed,columnCount:t.count,columnWidth:t.width,gap:n,columnsUsed:i.length>0?u.columns:0}}function Vt(e,t,n,r=`truncate`){let i=0,a=0,o=0,s=[],c=[];for(let l=0;l<e.length;l++){let u=e[l],d=r===`glue`||l===0||a>0?u.pre:0;a>0&&(u.forced||a+d+u.rows+u.post-t>n)&&(r===`truncate`&&(d=0),i+=1,a=0);let f=u.rows/u.lines;if(u.lines>1&&u.rows-t>n){for(let e=0;e<u.lines;e++)a>0&&a+d+f-t>n&&(r===`truncate`&&(d=0),i+=1,a=0),s.push(i),c.push(a+d),a+=d+f,d=0,o=Math.max(o,a-t);a+=u.post,u.post>0&&(o=Math.max(o,a));continue}for(let e=0;e<u.lines;e++)s.push(i),c.push(a+d+e*f);a+=d+u.rows+u.post,o=Math.max(o,a-(u.post>0?0:t))}return{columns:i+1,maxUsed:o,column:s,top:c}}function Ht(e){return e.map(e=>({rows:e,pre:0,post:0,forced:!1,lines:1}))}var Ut=null;function H(){if(Ut!==null)return Ut;let e=document.createElement(`div`);e.style.cssText=`position:absolute;left:-9999px;visibility:hidden;columns:2;column-gap:0;column-fill:balance;width:200px;font:10px/20px monospace;orphans:1;widows:1`,e.innerHTML=`<div style="margin:0;padding:0 0 20px 0">aaaaaa aaaaaa aaaaaa</div><div style="margin:0"><span>bbbbbb</span> bbbbbb</div>`,document.body.appendChild(e);let t=e.getBoundingClientRect().top,n=e.querySelector(`span`).getBoundingClientRect();return e.remove(),Ut=!(n.width>0&&n.top-t>=10),Ut}function Wt(e,t,n,r){let i=e.style;if(!i.ruleX)return;let a=t.columnCount*t.columnWidth+(t.columnCount-1)*t.gap,o=t.ruleSegments??[{start:0,end:t.totalRows,columns:t.columnsUsed}],s=[];for(let e of o){let n=Math.min(e.columns,t.columnCount);for(let r=0;r<t.columnCount-1;r++)zt(i.ruleVisibilityItems,r<n,r+1<n)&&s.push({bandStart:(r+1)*t.columnWidth+r*t.gap,bandSize:t.gap,start:e.start,end:e.end})}e.decorationRuns=ye({glyphs:j(i.glyphSet),ruleX:i.ruleX,ruleY:null,vertical:Ie(s,i.ruleInset),horizontal:[],contentWidth:a,contentHeight:t.totalRows,border:n,borderStyle:i.borderStyle,borderColor:i.borderColor,padding:r})}function Gt(e,t){let n=e.style,r=n.padding;return e.text!==``&&e.children.length===0&&n.display===`block`&&n.position===`static`&&!n.columnSpan&&n.whiteSpace===`normal`&&n.lineGap===t.lineGap&&n.border.top===0&&n.border.right===0&&n.border.bottom===0&&n.border.left===0&&r.top===0&&r.right===0&&r.bottom===0&&r.left===0&&n.backgroundColor===void 0&&!n.backgroundClear&&n.overflow.x===`visible`&&n.overflow.y===`visible`&&(n.width===void 0||n.width.kind===`auto`)&&(n.height===void 0||n.height.kind===`auto`)&&(n.minWidth===`auto`||n.minWidth===0||n.minWidth===void 0)&&(n.minHeight===`auto`||n.minHeight===0||n.minHeight===void 0)&&n.maxWidth===void 0&&n.maxHeight===void 0}function Kt(e,t,n,r,i,a,o){let s=e.style,c=Fn(s,`x`,n),l=Rt(s,n,c);a.right+=l.leftover;let u=s.lineGap,d=i.left+a.left,f=i.top+a.top,p=n-l.leftover,m=[[]],h=[];for(let e of t)e.style.columnSpan?(h[m.length-1]=e,m.push([])):m[m.length-1].push(e);let g=m.length>1,_=g?`glue`:`truncate`,v=[],y=0,b=0;for(let e=0;e<m.length;e++){let t=m[e],n=0;if(t.length>0){let i=t.map(e=>({node:e,spans:Nn(e,Math.max(1,l.width-e.style.tracking)),margin:X(e.style.margin,l.width),pre:0,post:0})),a=[],o=null,h=null,x=!1;for(let e of i){let{node:t,spans:n,margin:r}=e,i=o===null?r.top??0:Vn(o,r.top??0),s=i;_===`glue`&&h!==null?(s=0,h.post=i,a[a.length-1].post=i):e.pre=i;let c=x||t.style.breakBeforeColumn;if(t.style.breakInsideAvoid&&n.length>0)a.push({rows:n.length*(1+u),pre:s,post:0,forced:c,lines:n.length});else for(let e=0;e<n.length;e++)a.push({rows:1+u,pre:e>0?0:s,post:0,forced:e===0&&c,lines:1});n.length>0&&(o=r.bottom??0,h=e),x=t.style.breakAfterColumn}n=o??0;let S;if(s.columnFill===`auto`&&r!==void 0)S=Math.max(1,r);else{let e=Lt(1,Math.max(1,Vt(a,u,1/0,_).maxUsed),e=>Vt(a,u,e,_).columns<=l.count);S=r===void 0?e:Math.max(1,Math.min(e,r))}let C=Vt(a,u,S,_);for(let e=0,t=0;e<i.length;e++){let{node:n,spans:r,margin:a,pre:o,post:s}=i[e],u=[],m=[];for(let e=0;e<r.length;e++,t++)u.push(y+C.top[t]),m.push(C.column[t]*(l.width+c));delete n.decorationRuns,n.multicolGeometry={spans:r,lineY:u,textY:u,lineX:m,totalRows:y+C.maxUsed,columnCount:l.count,columnWidth:l.width,gap:c,columnsUsed:C.columns},n.multicolFlow=g?{top:o,right:a.right,bottom:s,left:a.left}:a,n.localRect={x:d,y:f,width:p,height:C.maxUsed},n.resolvedPadding={top:0,right:0,bottom:0,left:0}}a.length>0&&(v.push({start:y,end:y+C.maxUsed,columns:C.columns}),b=Math.max(b,C.columns),y+=C.maxUsed+(e<m.length-1?u:0))}let i=h[e];if(i){let e=X(i.style.margin,p),t=(e.left??0)+(e.right??0);J(i,Math.max(0,p-t),void 0,0,0,`fill`,o);let r=Bn(e,p,i.localRect.width),a=(e.top??0)+n;y+=a,i.localRect={...i.localRect,x:d+r,y:f+y},i.multicolFlowSpan={top:a,right:0,bottom:e.bottom??0,left:r},y+=i.localRect.height+(e.bottom??0)}}let x=y;for(let t of e.children){if(!q(t.style))continue;let e=X(t.style.margin,n);t.staticSlot={kind:`block`,x:d+(e.left??0),y:f+(e.top??0)}}return e.multicolGeometry={spans:[],lineY:[],textY:[],lineX:[],totalRows:x,columnCount:l.count,columnWidth:l.width,gap:c,columnsUsed:b,...g?{ruleSegments:v,nativeBalance:!0}:{}},x}function qt(e,t,n,r,i,a,o){let s=e.style,c=It(n,r),l=e.children.filter(e=>!q(e.style)),u=l.filter(e=>!e.style.columnSpan),d=l.reduce((e,t,n)=>!t.style.columnSpan&&(n===0||l[n-1].style.columnSpan)?e+1:e,0);if(u.length>0&&u.every(e=>Gt(e,s))&&(u.length===l.length||s.columnFill===`balance`&&c===void 0&&(H()||d<=1&&u.every(e=>(e.style.margin.top===0||e.style.margin.top===null)&&(e.style.margin.bottom===0||e.style.margin.bottom===null)))))return Kt(e,l,t,c,i,a,o);let f=Fn(s,`x`,t),p=Pt(s,t,f),m=p.length,h=[];{let e=0;for(let t of p)h.push(e),e+=t+f}let g=e=>e<m?h[e]:h[m-1]+(e-m+1)*(p[m-1]+f),_=e=>p[Math.min(e,m-1)],v=p[m-1],y=i.left+a.left,b=i.top+a.top,x=[],S=0,C=[],w=[],T=!1,E=(e,t)=>{let r=0,i=0,a=null,s=0,c=e=>{if(t)for(let t of w){if(t.index!==e)continue;let n=a===null?t.margin.top??0:Vn(a,t.margin.top??0);t.child.staticSlot={kind:`block`,x:y+g(r)+(t.margin.left??0),y:b+S+i+n}}};for(let l=0;l<C.length;l++){let u=C[l];c(l);let d=a===null?l===0?u.margin.top??0:0:Vn(a,u.margin.top??0),f=u.node.localRect.height;if(a!==null&&(u.breakBefore||i+d+f>e)&&(r+=1,i=0,a=null,d=0),t){let e=u.node,t=_(r);if(t!==v){let r=(u.margin.left??0)+(u.margin.right??0);J(e,Math.max(0,t-r),n,0,0,`fill`,o)}e.localRect={...e.localRect,x:y+g(r)+Bn(u.margin,t,e.localRect.width),y:b+S+i+d}}i+=d+u.node.localRect.height,s=Math.max(s,i),a=u.margin.bottom??0}return c(C.length),{columns:r+1,maxUsed:s}},D=()=>{if(C.length===0){for(let e of w)e.child.staticSlot={kind:`block`,x:y+(e.margin.left??0),y:b+S+(e.margin.top??0)};w=[];return}let e=c===void 0?void 0:Math.max(1,c-S),t=s.columnFill===`auto`&&e!==void 0,r;if(t)r=e;else{let t=Lt(1,E(1/0,!1).maxUsed,e=>E(e,!1).columns<=m);r=e===void 0?t:Math.min(t,e)}let i=E(r,!0),a=t&&n!==void 0?Math.max(i.maxUsed,r):i.maxUsed;if(s.ruleX)for(let e=0;e<m-1;e++){let t=Math.min(i.columns,m);zt(s.ruleVisibilityItems,e<t,e+1<t)&&x.push({bandStart:h[e]+p[e],bandSize:f,start:S,end:S+a})}S+=a,C=[],w=[]};for(let r of e.children){if(q(r.style)){w.push({child:r,margin:X(r.style.margin,t),index:C.length});continue}if(r.style.columnSpan){D(),T=!1;let e=X(r.style.margin,t),i=(e.left??0)+(e.right??0);J(r,Math.max(0,t-i),n,0,0,`fill`,o),S+=e.top??0,r.localRect={...r.localRect,x:y+Bn(e,t,r.localRect.width),y:b+S},S+=r.localRect.height+(e.bottom??0);continue}let e=X(r.style.margin,v),i=(e.left??0)+(e.right??0);J(r,Math.max(0,v-i),n,0,0,`fill`,o),C.push({node:r,margin:e,breakBefore:T||r.style.breakBeforeColumn}),T=r.style.breakAfterColumn}return D(),s.ruleX&&x.length>0&&(e.decorationRuns=ye({glyphs:j(s.glyphSet),ruleX:s.ruleX,ruleY:null,vertical:Ie(x,s.ruleInset),horizontal:[],contentWidth:t,contentHeight:S,border:i,borderStyle:s.borderStyle,borderColor:s.borderColor,padding:a})),S}function Jt(e,n){e.hidden.push(n),n.style.tableRole!==`column`&&n.style.tableRole!==`column-group`&&t(n.source,`Table content outside the expected structure (rows in tables, cells in rows) can't be laid out and was hidden — no anonymous table boxes (specs/table.md).`)}function Yt(e,t){let n=Number.parseInt(e.getAttribute(t)??``,10);return Number.isNaN(n)?1:t===`colspan`?Math.min(1e3,Math.max(1,n)):Math.min(65534,Math.max(0,n))}function Xt(e,t,n){let r=(t,r)=>{let i=t.style.width,a=i&&i.kind!==`auto`&&i.kind!==`percent`?qn(i,0,t,n):void 0,o=i&&i.kind===`percent`?i.value:void 0;for(let t=0;t<r;t++)e.colFixed.push(a),e.colPercent.push(o)};if(t.style.tableRole===`column`){r(t,Zt(t.source));return}let i=t.children.filter(e=>e.style.tableRole===`column`);if(i.length===0)r(t,Zt(t.source));else for(let e of i)r(e,Zt(e.source));for(let n of t.children)n.style.tableRole!==`column`&&Jt(e,n)}function Zt(e){let t=Number.parseInt(e.getAttribute(`span`)??``,10);return Number.isNaN(t)?1:Math.min(1e3,Math.max(1,t))}function Qt(e,t){let n={caption:null,rows:[],rowGroups:[],groupEnds:[],cells:[],columnCount:0,colFixed:[],colPercent:[],hidden:[]},r=[],i=[],a=[];for(let o of e.children){if(q(o.style))continue;let e=o.style.tableRole;if(e===`row`)i.push({row:o,group:null});else if(e===`header-group`||e===`row-group`||e===`footer-group`){let t=e===`header-group`?r:e===`footer-group`?a:i;for(let e of o.children)q(e.style)||(e.style.tableRole===`row`?t.push({row:e,group:o}):Jt(n,e))}else e===`caption`?n.caption===null?n.caption=o:Jt(n,o):e===`column`||e===`column-group`?(Xt(n,o,t),n.hidden.push(o)):Jt(n,o)}let o=[...r,...i,...a],s=0;for(let e=0;e<o.length;e++){n.rows.push(o[e].row),n.rowGroups.push(o[e].group);let t=o[e+1]?.group;if(!(e+1<o.length&&(o[e].group===t||o[e].group===null&&t===null))){for(let t=s;t<=e;t++)n.groupEnds.push(e+1);s=e+1}}return $t(n),n}function $t(e){let t=[];for(let n=0;n<e.rows.length;n++){let r=e.rows[n],i=0;for(let a of r.children){if(q(a.style))continue;if(a.style.tableRole!==`cell`){Jt(e,a);continue}for(;(t[i]??0)>n;)i++;let o=Yt(a.source,`colspan`),s=Yt(a.source,`rowspan`),c=e.groupEnds[n],l=Math.max(1,Math.min(s===0?c-n:s,c-n));for(let e=i;e<i+o;e++)t[e]=Math.max(t[e]??0,n+l);e.cells.push({node:a,rowNode:r,row:n,col:i,rowSpan:l,colSpan:o}),i+=o}}e.columnCount=Math.max(t.length,e.colFixed.length)}function en(e,t,n){let r=e.style,i=Zn(e,n),a;if(t===`min`)a=i;else{let t=r.width!==void 0&&r.width.kind!==`auto`&&r.width.kind!==`percent`?qn(r.width,0,e,n):void 0;a=t===void 0?Jn(e,n):Math.max(i,t)}let o=typeof r.minWidth==`number`?r.minWidth:0,s=typeof r.maxWidth==`number`?r.maxWidth:void 0;return Math.max(0,An(a,o,s))}function U(e){let t=e.style.width;return t&&t.kind===`percent`?t.value:void 0}function W(e,t,n){let r=e.columnCount,i=Array.from({length:r},()=>0),a=Array.from({length:r},()=>0),o=Array.from({length:r},()=>void 0);for(let t=0;t<r;t++)e.colFixed[t]!==void 0&&(a[t]=e.colFixed[t]),o[t]=e.colPercent[t];let s=[];for(let t of e.cells){if(t.colSpan>1){s.push(t);continue}i[t.col]=Math.max(i[t.col],en(t.node,`min`,n)),a[t.col]=Math.max(a[t.col],en(t.node,`max`,n));let e=U(t.node);e!==void 0&&(o[t.col]=Math.max(o[t.col]??0,e))}s.sort((e,t)=>e.colSpan-t.colSpan);for(let e of s){let r=e.col,o=e.col+e.colSpan,s=on(t,r,o),c=a.slice(r,o);for(let t of[`min`,`max`]){let l=t===`min`?i:a,u=l.slice(r,o).reduce((e,t)=>e+t,0)+s,d=en(e.node,t,n)-u;if(d<=0)continue;let f=B(c.some(e=>e>0)?c:c.map(()=>1),d);for(let e=r;e<o;e++)l[e]+=f[e-r]}}for(let e=0;e<r;e++)a[e]=Math.max(a[e],i[e]);return{min:i,max:a,percent:o}}function tn(e,t){let n=e.min.length,r=e.min.slice(),i=[],a=[];for(let t=0;t<n;t++)(e.percent[t]===void 0?a:i).push(t);if(i.length>0){let n=i.reduce((t,n)=>t+e.percent[n],0),o=Math.max(100,n);for(let n of i){let i=Math.round(t*e.percent[n]/o);r[n]=Math.max(e.min[n],i)}let s=a.reduce((t,n)=>t+e.min[n],0),c=i.reduce((e,t)=>e+r[t],0)-(t-s);if(c>0){let t=i.map(t=>r[t]-e.min[t]),n=B(t,Math.min(c,t.reduce((e,t)=>e+t,0)));i.forEach((e,t)=>r[e]-=n[t])}}let o=t-r.reduce((e,t)=>e+t,0);if(o>0&&a.length>0){let t=a.map(t=>e.max[t]-e.min[t]),n=t.reduce((e,t)=>e+t,0),i=B(t,Math.min(o,n));a.forEach((e,t)=>r[e]+=i[t]),o-=Math.min(o,n)}if(o>0){let t=a.length>0?a:i;if(t.length>0){let n=t.map(t=>e.max[t]),i=B(n.some(e=>e>0)?n:n.map(()=>1),o);t.forEach((e,t)=>r[e]+=i[t])}}return r}function G(e,t,n){let r=e.columnCount,i=Array.from({length:r},()=>void 0);for(let n=0;n<r;n++)e.colFixed[n]===void 0?e.colPercent[n]!==void 0&&(i[n]=Math.max(0,Math.round(t*e.colPercent[n]/100))):i[n]=e.colFixed[n];for(let r of e.cells){if(r.row!==0)continue;let e=r.node.style,a;if(e.width&&e.width.kind===`percent`?a=Math.max(0,Math.round(t*e.width.value/100)):e.width&&e.width.kind!==`auto`&&(a=qn(e.width,0,r.node,n)),a===void 0)continue;let o=B(Array.from({length:r.colSpan},()=>1),a);for(let e=0;e<r.colSpan;e++){let t=r.col+e;i[t]===void 0&&(i[t]=o[e])}}let a=i.reduce((e,t)=>e+(t??0),0),o=i.filter(e=>e===void 0).length;if(o>0){let e=B(Array.from({length:o},()=>1),Math.max(0,t-a)),n=0;for(let t=0;t<r;t++)i[t]===void 0&&(i[t]=e[n++])}return i.map(e=>e??0)}var K={double:3,solid:2,dashed:1,dotted:0};function nn(e){for(let{border:t,side:n}of e)if(t?.hidden[n])return null;let t=null;for(let{border:n,side:r}of e){if(!n)continue;let e=n.width[r];if(e<=0)continue;let i=n.style[r];(t===null||e>t.width||e===t.width&&K[i]>K[t.style])&&(t={width:e,style:i,color:n.color[r]})}return t}function rn(e,t){let n=t.columnCount,r=t.rows.length,i=e.style.borderCollapse,a={collapsed:i,vLines:Array.from({length:n+1},()=>0),hLines:Array.from({length:r+1},()=>0),spacingX:i?0:e.style.borderSpacingX,spacingY:i?0:e.style.borderSpacingY,vSegments:[],hSegments:[]};if(!i||n===0||r===0)return a;let o=Array.from({length:r},()=>Array.from({length:n},()=>void 0));for(let e of t.cells)for(let t=e.row;t<e.row+e.rowSpan;t++)for(let n=e.col;n<e.col+e.colSpan;n++)o[t][n]=e;let s=e.style.latticeBorder;for(let e=0;e<=n;e++){let i=[];for(let a=0;a<r;a++){let r=e>0?o[a][e-1]:void 0,c=e<n?o[a][e]:void 0;if(r!==void 0&&r===c){i.push(null);continue}let l=[];r&&r.col+r.colSpan===e&&l.push({border:r.node.style.latticeBorder,side:`right`}),c&&c.col===e&&l.push({border:c.node.style.latticeBorder,side:`left`});let u=e===0?`left`:e===n?`right`:null;if(u){l.push({border:t.rows[a].style.latticeBorder,side:u});let e=t.rowGroups[a];e&&l.push({border:e.style.latticeBorder,side:u}),l.push({border:s,side:u})}i.push(nn(l))}a.vSegments.push(i),a.vLines[e]=i.reduce((e,t)=>Math.max(e,t?.width??0),0)}for(let e=0;e<=r;e++){let i=[];for(let a=0;a<n;a++){let n=e>0?o[e-1][a]:void 0,c=e<r?o[e][a]:void 0;if(n!==void 0&&n===c){i.push(null);continue}let l=[];n&&n.row+n.rowSpan===e&&l.push({border:n.node.style.latticeBorder,side:`bottom`}),c&&c.row===e&&l.push({border:c.node.style.latticeBorder,side:`top`}),e>0&&l.push({border:t.rows[e-1].style.latticeBorder,side:`bottom`}),e<r&&l.push({border:t.rows[e].style.latticeBorder,side:`top`});let u=e>0?t.rowGroups[e-1]:null,d=e<r?t.rowGroups[e]:null;u&&u!==d&&l.push({border:u.style.latticeBorder,side:`bottom`}),d&&d!==u&&l.push({border:d.style.latticeBorder,side:`top`}),e===0&&l.push({border:s,side:`top`}),e===r&&l.push({border:s,side:`bottom`}),i.push(nn(l))}a.hSegments.push(i),a.hLines[e]=i.reduce((e,t)=>Math.max(e,t?.width??0),0)}return a}function an(e,t){return e.collapsed?e.vLines.reduce((e,t)=>e+t,0):(t+1)*e.spacingX}function on(e,t,n){if(!e.collapsed)return e.spacingX*(n-t-1);let r=0;for(let i=t+1;i<n;i++)r+=e.vLines[i];return r}function sn(e,t,n){if(!e.collapsed)return e.spacingY*(n-t-1);let r=0;for(let i=t+1;i<n;i++)r+=e.hLines[i];return r}function cn(e,t){let n=t.tableData.get(e);if(n)return n;let r=Qt(e,t),i=rn(e,r),a={structure:r,chrome:i,bounds:W(r,i,t),chromeX:an(i,r.columnCount)};return t.tableData.set(e,a),a}function ln(e,t){let{structure:n,bounds:r,chromeX:i}=cn(e,t),a=r.min.reduce((e,t)=>e+t,0)+i,o=r.max.reduce((e,t)=>e+t,0)+i;return n.caption&&(a=Math.max(a,Zn(n.caption,t)),o=Math.max(o,Jn(n.caption,t))),{min:a,max:o}}function un(e,t,n){let r=e.style,{bounds:i,chromeX:a}=cn(e,n),{min:o,max:s}=ln(e,n),c=r.border.left+r.border.right+Y(r.padding.left,t)+Y(r.padding.right,t)+et(r).right,l=i.max.reduce((e,t)=>e+t,0),u=0,d=0;for(let e=0;e<i.max.length;e++){let t=i.percent[e];t===void 0?d+=i.max[e]:u+=t}if(u>=100)l=1/0;else if(u>0){for(let e=0;e<i.max.length;e++){let t=i.percent[e];t!==void 0&&t>0&&(l=Math.max(l,Math.ceil(i.max[e]*100/t)))}l=Math.max(l,Math.ceil(d*100/(100-u)))}let f=Math.max(l+a,s)+c;return Math.max(o+c,Math.min(f,t))}function dn(e,t,n,r,i,a){let{structure:o,chrome:s,bounds:c}=cn(e,a),l=o.columnCount,u=o.rows.length,d=r.left+i.left,f=r.top+i.top;for(let e of o.hidden)e.tableHidden=!0,e.localRect={x:0,y:0,width:0,height:0},e.resolvedPadding={top:0,right:0,bottom:0,left:0},e.unclampedHeight=0;let p=Math.max(0,t-an(s,l)),m=e.style,h=m.tableLayout===`fixed`&&m.width!==void 0&&m.width.kind!==`auto`?G(o,p,a):tn(c,p),g=[],_=0;for(let e=0;e<l;e++)_+=s.collapsed?s.vLines[e]:s.spacingX,g.push(_),_+=h[e];let v=_+(s.collapsed?s.vLines[l]??0:s.spacingX),y=0;o.caption&&(J(o.caption,t,void 0,d,f,`fill`,a),y=o.caption.localRect.height);let b=new Map,x=new Map;for(let e of o.cells){let t=e.col+e.colSpan,n=h.slice(e.col,t).reduce((e,t)=>e+t,0)+on(s,e.col,t);x.set(e,n),J(e.node,n,void 0,0,0,`fill`,a,{width:n}),b.set(e,e.node.localRect.height)}let S=s.collapsed?s.hLines.reduce((e,t)=>e+t,0):(u+1)*s.spacingY,C=n===void 0?void 0:Math.max(0,n-y-S),w=e=>e!==void 0&&e.kind===`percent`&&C!==void 0?F(e.value,C):0,T=Array.from({length:u},()=>0),E=Array.from({length:u},()=>!1);for(let e=0;e<u;e++){let t=o.rows[e].style.height;t!==void 0&&t.kind===`cells`&&(T[e]=t.value);let n=w(t);n>0&&(T[e]=Math.max(T[e],n),E[e]=!0)}for(let e of o.cells)if(e.rowSpan===1){let t=w(e.node.style.height);t>0&&(E[e.row]=!0),T[e.row]=Math.max(T[e.row],b.get(e),t)}let D=o.cells.filter(e=>e.rowSpan>1).sort((e,t)=>e.rowSpan-t.rowSpan);for(let e of D){let t=e.row+e.rowSpan,n=T.slice(e.row,t).reduce((e,t)=>e+t,0)+sn(s,e.row,t),r=b.get(e)-n;if(r<=0)continue;let i=B(Array.from({length:e.rowSpan},()=>1),r);for(let n=e.row;n<t;n++)T[n]+=i[n-e.row]}if(n!==void 0&&u>0){let e=n-y-S-T.reduce((e,t)=>e+t,0);if(e>0){let t=[];for(let e=0;e<u;e++)E[e]||t.push(e);let n=t.length>0?t:Array.from({length:u},(e,t)=>t),r=B(n.map(()=>1),e);n.forEach((e,t)=>T[e]+=r[t])}}let O=o.caption&&e.style.captionSide===`top`?y:0,k=[],A=O;for(let e=0;e<u;e++)A+=s.collapsed?s.hLines[e]:s.spacingY,k.push(A),A+=T[e];let ee=u>0?A+(s.collapsed?s.hLines[u]??0:s.spacingY):O,te=new Map;for(let e=0;e<u;e++){let t=o.rowGroups[e];t&&!te.has(t)&&te.set(t,k[e])}for(let[e,t]of te){let n=t;for(let t=0;t<u;t++)o.rowGroups[t]===e&&(n=k[t]+T[t]);e.localRect={x:d,y:f+t,width:v,height:n-t},e.resolvedPadding={top:0,right:0,bottom:0,left:0},e.unclampedHeight=n-t}for(let e=0;e<u;e++){let t=o.rows[e],n=o.rowGroups[e],r=n?te.get(n):void 0;t.localRect={x:r===void 0?d:0,y:r===void 0?f+k[e]:k[e]-r,width:v,height:T[e]},t.resolvedPadding={top:0,right:0,bottom:0,left:0},t.unclampedHeight=T[e]}for(let e of o.cells){let t=e.row+e.rowSpan,n=T.slice(e.row,t).reduce((e,t)=>e+t,0)+sn(s,e.row,t);e.node.children.some(e=>!q(e.style)&&e.style.height?.kind===`percent`)&&n!==b.get(e)&&J(e.node,x.get(e),n,0,0,`fill`,a,{width:x.get(e),height:n}),fn(e.node,n-(e.node.naturalContentHeight??e.node.localRect.height)),e.node.localRect={x:g[e.col],y:0,width:e.node.localRect.width,height:n}}for(let t of e.children)q(t.style)&&(t.staticSlot={kind:`block`,x:d,y:f});return o.caption&&e.style.captionSide===`bottom`&&(o.caption.localRect.y=f+ee),s.collapsed&&l>0&&u>0&&(e.decorationRuns=pn(s,o,h,T,g,k,d,f,j(e.style.glyphSet))),e.style.captionSide===`bottom`?ee+y:ee}function fn(e,t){if(t<=0)return;let n=e.style.verticalAlign,r=n===`center`?Math.floor(t/2):n===`end`?t:0;if(!e.children.some(e=>!q(e.style)&&!e.inlineBox)){e.resolvedPadding.top+=r,e.resolvedPadding.bottom+=t-r;return}if(!(r<=0))for(let t of e.children)t.inlineBox||(q(t.style)?t.staticSlot?.kind===`block`&&(t.staticSlot.y+=r):t.localRect.y+=r)}function pn(e,t,n,r,i,a,o,s,c){let l=t.columnCount,u=t.rows.length,d=[],f=t=>t<l?i[t]-e.vLines[t]:i[l-1]+n[l-1],p=t=>t<u?a[t]-e.hLines[t]:a[u-1]+r[u-1];for(let t=0;t<=l;t++){let n=e.vSegments[t];for(let e=0;e<u;e++){let i=n[e];if(!i)continue;let l=ge(i.style,`v`,c);for(let n=0;n<i.width;n++)for(let c=a[e];c<a[e]+r[e];c++)d.push({glyph:l,x:o+f(t)+n,y:s+c,length:1,color:i.color})}}for(let t=0;t<=u;t++){let r=e.hSegments[t];for(let e=0;e<l;e++){let a=r[e];if(!a)continue;let l=ge(a.style,`h`,c);for(let r=0;r<a.width;r++)d.push({glyph:l,x:o+i[e],y:s+p(t)+r,length:n[e],color:a.color})}}for(let t=0;t<=l;t++)if(!(e.vLines[t]<=0))for(let n=0;n<=u;n++){if(e.hLines[n]<=0)continue;let r=n>0?e.vSegments[t][n-1]:null,i=n<u?e.vSegments[t][n]:null,a=t>0?e.hSegments[n][t-1]:null,m=t<l?e.hSegments[n][t]:null,h=[r,i,a,m].filter(e=>e!==null);if(h.length===0)continue;let g=h.every(e=>e.style===`double`)?`double`:`solid`,_=h.reduce((e,t)=>t.width>e.width||t.width===e.width&&K[t.style]>K[e.style]?t:e),v=M(g,r!==null,i!==null,a!==null,m!==null,c);for(let r=0;r<e.vLines[t];r++)for(let i=0;i<e.hLines[n];i++)d.push({glyph:v,x:o+f(t)+r,y:s+p(n)+i,length:1,color:_.color})}return d}function mn(e){return e.position===`absolute`||e.position===`fixed`?`absolute`:e.position===`relative`||e.position===`sticky`?`relative`:`static`}function hn(e,t,n,r,i){for(let a of e.children){let o=mn(a.style);if(o===`relative`){let t=e.localRect.width-e.style.border.left-e.style.border.right-e.resolvedPadding.left-e.resolvedPadding.right,n=e.localRect.height-e.style.border.top-e.style.border.bottom-e.resolvedPadding.top-e.resolvedPadding.bottom;a.localRect.x+=gn(a.style.insets.left,a.style.insets.right,t),a.localRect.y+=gn(a.style.insets.top,a.style.insets.bottom,n)}else o===`absolute`&&vn(a,e,t,n,r,i);hn(a,t+a.localRect.x,n+a.localRect.y,[...r,{node:a,absX:t+a.localRect.x,absY:n+a.localRect.y}],i)}}function gn(e,t,n){return e===null?t===null?0:-Y(t,n):Y(e,n)}function _n(e,t){if(!t)for(let t=e.length-1;t>0;t--){let n=e[t];if(!En(n.node.style))continue;let r=n.node.style.border;return{x:n.absX+r.left,y:n.absY+r.top,width:Math.max(0,n.node.localRect.width-r.left-r.right),height:Math.max(0,n.node.localRect.height-r.top-r.bottom)}}let n=e[0];return{x:n.absX,y:n.absY,width:n.node.localRect.width,height:n.node.localRect.height}}function vn(e,t,n,r,i,a){let o=e.style,s=o.position===`fixed`,c=e.staticSlot,l=c?.kind===`grid`&&!s&&En(t.style)?{x:n+c.area.x,y:r+c.area.y,width:c.area.width,height:c.area.height}:_n(i,s),u=o.insets.left===null?null:Y(o.insets.left,l.width),d=o.insets.right===null?null:Y(o.insets.right,l.width),f=o.insets.top===null?null:Y(o.insets.top,l.height),p=o.insets.bottom===null?null:Y(o.insets.bottom,l.height),m=X(o.margin,l.width),h=m.left??0,g=m.right??0,_=m.top??0,v=m.bottom??0,y=o.width===void 0||o.width.kind===`auto`,b=o.height===void 0||o.height.kind===`auto`,x=Rn(o.minWidth,l.width,e,a)??0,S=Rn(o.maxWidth,l.width,e,a),C={};if(!y)C.width=An(qn(o.width,l.width,e,a),x,S);else if(u!==null&&d!==null)C.width=An(Math.max(0,l.width-u-d-h-g),x,S);else{let t=Math.max(0,l.width-(u??0)-(d??0)-h-g);C.width=An(Math.min(Jn(e,a),Math.max(Zn(e,a),t)),x,S)}f!==null&&p!==null&&b&&(C.height=An(Math.max(0,l.height-f-p-_-v),Ln(o.minHeight,l.height)??0,Ln(o.maxHeight,l.height))),J(e,l.width,l.height,0,0,`shrink`,a,C);let w=e.localRect.width,T=e.localRect.height,E;if(u!==null&&d!==null){let e=Math.max(0,l.width-u-d-w-h-g),t=m.left===null&&m.right===null;E=l.x+u+h+(t?Math.floor(e/2):m.left===null?e:0)}else E=u===null?d===null?Cn(e,t,n,w):l.x+l.width-d-w-g:l.x+u+h;let D;if(f!==null&&p!==null){let e=Math.max(0,l.height-f-p-T-_-v),t=m.top===null&&m.bottom===null;D=l.y+f+_+(t?Math.floor(e/2):m.top===null?e:0)}else D=f===null?p===null?wn(e,t,r,T):l.y+l.height-p-T-v:l.y+f+_;e.localRect={...e.localRect,x:E-n,y:D-r}}function yn(e,t,n){return He(e,[n],Math.max(0,t-n))[0]}function bn(e,t,n,r){return Ge(We(e,t),n,r)}function xn(e,t,n,r,i){let a=X(e.style.margin,n.innerWidth),[o,s,c,l]=r===`x`?[a.left??0,a.right??0,n.innerWidth,n.direction===`row`]:[a.top??0,a.bottom??0,n.innerHeight,n.direction===`column`],u=i+o+s;return(l?yn(Ye(t.style),c,u):bn(e,t,c,u))+o}function Sn(e,t,n,r,i){let a=X(e.style.margin,n.width),o=e.style.justifySelf===`auto`?t.style.justifyItems:e.style.justifySelf,[s,c,l,u]=r===`x`?[a.left??0,a.right??0,n.width,o]:[a.top??0,a.bottom??0,n.height,We(e,t)];return Ge(u,l,i+s+c)+s}function Cn(e,t,n,r){let i=e.staticSlot;return i===void 0?n:i.kind===`block`?n+i.x:i.kind===`grid`?n+i.staticArea.x+Sn(e,t,i.staticArea,`x`,r):n+i.originX+xn(e,t,i,`x`,r)}function wn(e,t,n,r){let i=e.staticSlot;return i===void 0?n:i.kind===`block`?n+i.y:i.kind===`grid`?n+i.staticArea.y+Sn(e,t,i.staticArea,`y`,r):n+i.originY+xn(e,t,i,`y`,r)}function Tn(e,t){let n=Dn();J(e,t,void 0,0,0,`fill`,n),hn(e,0,0,[{node:e,absX:0,absY:0}],n);let r=e.localRect.height,i=Un(e),{overflow:a}=e.style;return a.x===`visible`&&(e.localRect.width=Math.max(e.localRect.width,i.x)),a.y===`visible`&&(e.localRect.height=Math.max(r,i.y)),{height:r}}function q(e){return e.position===`absolute`||e.position===`fixed`}function En(e){return e.position!==`static`}function Dn(){return{maxContent:new WeakMap,minContent:new WeakMap,gridIntrinsic:new WeakMap,tableData:new WeakMap}}function J(e,t,n,r,i,a,o,s){let c=e.style,l=s?.height;delete e.decorationRuns,delete e.multicolGeometry,delete e.multicolFlow,delete e.multicolFlowSpan,delete e.textExtent;let u=Rn(c.minWidth,t,e,o)??0,d=Rn(c.maxWidth,t,e,o),f=Ln(c.minHeight,n)??0,p=Ln(c.maxHeight,n),m=et(c),h=$e(c);s?.gutter?.right&&(m.right=h.right),s?.gutter?.bottom&&(m.bottom=h.bottom);let g={top:Y(c.padding.top,t),right:Y(c.padding.right,t)+m.right,bottom:Y(c.padding.bottom,t)+m.bottom,left:Y(c.padding.left,t)};e.resolvedPadding=g;let _=s?.width??An(Hn(c,t,a,e,o),u,d),v=Kn(c,n),y=$n(_,l??v??(f>0?f:void 0)??1/0,c.border,g),b=l!==void 0||v!==void 0,x=p===void 0?void 0:Math.max(0,p-c.border.top-c.border.bottom-g.top-g.bottom),S=kn(e),C=(t,n)=>{let r=n&&Number.isFinite(t)?t:void 0;return S?On(e,y.width,t,r,x,g,o):c.display===`flex`&&c.flexDirection===`row`?Le(e,y.width,t,r,c.border,g,o):c.display===`flex`?ze(e,y.width,t,n,c.border,g,o):c.display===`grid`?it(e,y.width,t,c.border,g,o):c.display===`table`?dn(e,y.width,r,c.border,g,o):c.display===`multicol`?qt(e,y.width,r,x,c.border,g,o):zn(e,y.width,r,c.border,g,o)},w=C(y.height,b);if(!S&&(c.display===`flex`||c.display===`grid`)&&!b&&p!==void 0){let e=c.border.top+c.border.bottom+g.top+g.bottom,t=An(w+e,f,p)-e;t<w&&(w=C(Math.max(0,t),!0))}let T=w+c.border.top+c.border.bottom+g.top+g.bottom,E=l??v??T;e.unclampedHeight=E,e.naturalContentHeight=T;let D=An(E,f,p),O=e.multicolGeometry;if(O){let t=D-c.border.top-c.border.bottom-g.top-g.bottom;t>O.totalRows&&(g.bottom+=t-O.totalRows),Wt(e,O,c.border,g)}if(e.localRect={x:r,y:i,width:_,height:D},Ze(c.overflow.x)||Ze(c.overflow.y)){let l=Un(e),u=Math.max(0,l.x-c.border.left-g.left),d=Math.max(0,l.y-c.border.top-g.top),f=Math.max(0,_-c.border.left-c.border.right-g.left-g.right),p=Math.max(0,D-c.border.top-c.border.bottom-g.top-g.bottom);if(e.scrollRange={sizeX:u,sizeY:d,maxX:Ze(c.overflow.x)?Math.max(0,u-f):0,maxY:Ze(c.overflow.y)?Math.max(0,d-p):0},c.scrollbarWidth!==`none`){let l=s?.gutter??{right:!1,bottom:!1},u=l.right||c.overflow.y===`auto`&&e.scrollRange.maxY>0,d=l.bottom||c.overflow.x===`auto`&&e.scrollRange.maxX>0;if(u!==l.right||d!==l.bottom){J(e,t,n,r,i,a,o,{...s,gutter:{right:u,bottom:d}});return}}e.scrollGutterCells={right:m.right,bottom:m.bottom}}else delete e.scrollRange,delete e.scrollGutterCells}function On(e,t,n,r,i,a,o){let s=e.style,c;if(e.text){let l=Qe(e);ke(e.text,(n,r)=>{let i=l[r];J(i,t,void 0,0,0,`shrink`,o),e.advances[n]=Math.max(1,i.localRect.width)});let u,d;if(s.display===`multicol`){let n=Fn(s,`x`,t),o=Rt(s,t,n);a.right+=o.leftover;let c=Bt(e,o,n,It(r,i));e.multicolGeometry=c,u=c,d=c.lineX}else u=Mn(e,t);if(c=u.totalRows,e.textExtent={width:u.spans.reduce((t,n)=>Math.max(t,Ee(n.start,n.end,e.advances,s.tracking)),0),rows:u.totalRows},jn(e,u,t,n,a),l.length>0){let t=e=>u.spans.findIndex(t=>e>=t.start&&e<t.end);ke(e.text,(n,r)=>{let i=t(n);if(i===-1)return;let o=u.spans[i];l[r].localRect={...l[r].localRect,x:s.border.left+a.left+(d?.[i]??0)+Te(o.start,n,e.advances),y:s.border.top+a.top+u.lineY[i]}})}}else c=e.intrinsicHeight;for(let n of e.children){if(n.inlineBox)continue;let e=X(n.style.margin,t);n.staticSlot={kind:`block`,x:s.border.left+a.left+(e.left??0),y:s.border.top+a.top+(e.top??0)}}return c}function kn(e){return e.children.some(e=>!q(e.style)&&!e.inlineBox)?!1:e.text!==``||e.style.display!==`flex`&&e.style.display!==`grid`}function An(e,t,n){return Math.max(t,n===void 0?e:Math.min(e,n))}function jn(e,t,n,r,i){let a=e.style;if(a.display!==`flex`&&a.display!==`grid`||t.spans.length===0)return;let o=a.display===`flex`&&a.flexDirection===`column`,s=t.spans.reduce((t,n)=>Math.max(t,Ee(n.start,n.end,e.advances,a.tracking)),0),c=Math.max(0,n-s);if(c>0){let e=a.display===`grid`?Ge(a.justifyItems,n,s):o?Ge(a.alignItems,n,s):He(Ye(a),[s],c)[0];e>0&&(i.left+=e,i.right+=c-e)}if(Number.isFinite(r)){let e=Math.max(0,r-t.totalRows);if(e>0){let n=a.display===`grid`||!o?Ge(a.alignItems,r,t.totalRows):He(Ye(a),[t.totalRows],e)[0];n>0&&(i.top+=n,i.bottom+=e-n)}}}function Mn(e,t){let n=Nn(e,t),{heights:r,textOffsets:i}=Pn(e,n),a=[],o=[],s=0;for(let t=0;t<n.length;t++)a.push(s),o.push(s+i[t]),s+=r[t]+(t<n.length-1?e.style.lineGap:0);return{spans:n,lineY:a,textY:o,totalRows:s}}function Nn(e,t){return e.style.whiteSpace===`normal`?z(e.text,t,{advances:e.advances,tracking:e.style.tracking,firstLineIndent:e.style.textIndent}):we(e.text)}function Pn(e,n){let r=Qe(e),i=[],a=[],o=0;for(let s of n){let n=1,c=0;for(let i=s.start;i<s.end;i++){if(e.text[i]!==``)continue;let a=r[o];n=Math.max(n,a.localRect.height),a.style.verticalAlign===`end`?c=Math.max(c,a.localRect.height-1):a.style.verticalAlign===`center`&&t(a.source,`vertical-align: middle on an inline box can't land on whole rows and behaves as top. Use align-top or align-bottom.`),o++}i.push(n),a.push(Math.min(c,n-1))}return{heights:i,textOffsets:a}}function Fn(e,t,n){let r=Y(t===`x`?e.gapX:e.gapY,n),i=t===`x`?e.ruleX:e.ruleY;return Math.max(r,i?.width??0)}function Y(e,t){return typeof e==`number`?e:t===void 0||!Number.isFinite(t)?0:F(e.percent,t)}function X(e,t){let n=e=>e===null?null:Y(e,t);return{top:n(e.top),right:n(e.right),bottom:n(e.bottom),left:n(e.left)}}function In(e){return typeof e==`number`?e:0}function Ln(e,t){if(e!==void 0&&typeof e!=`string`)return typeof e==`number`?e:t===void 0?void 0:F(e.percent,t)}function Rn(e,t,n,r){return e===`min-content`||e===`max-content`||e===`fit-content`?qn({kind:e},t,n,r):Ln(e,t)}function zn(e,t,n,r,i,a){let o=r.left+i.left,s=r.top+i.top,c=s,l=null;for(let r of e.children){let e=X(r.style.margin,t),i=e.top??0,s=e.bottom??0,u=e.left??0,d=e.right??0;if(q(r.style)){r.staticSlot={kind:`block`,x:o+u,y:c+(l===null?i:Vn(l,i))};continue}J(r,Math.max(0,t-u-d),n,0,0,`fill`,a);let f=Bn(e,t,r.localRect.width);c+=l===null?i:Vn(l,i),r.localRect={...r.localRect,x:o+f,y:c},c+=r.localRect.height,l=s}return l!==null&&(c+=l),c-s}function Bn(e,t,n){let r=t-n;return e.left===null&&e.right===null?Math.floor(r/2):e.left===null?r-(e.right??0):e.left}function Vn(e,t){return e>=0&&t>=0?Math.max(e,t):e<=0&&t<=0?Math.min(e,t):e+t}function Hn(e,t,n,r,i){let a=e.width;if(e.display===`table`){if(!r.children.some(e=>!q(e.style)&&!e.inlineBox))return a!==void 0&&a.kind!==`auto`?qn(a,t,r,i):Math.min(t,Jn(r,i));if(a!==void 0&&a.kind!==`auto`){let e=qn(a,t,r,i);return Math.max(e,Gn(r,t,i))}return un(r,t,i)}return a!==void 0&&a.kind!==`auto`?qn(a,t,r,i):n===`shrink`?Math.min(t,Jn(r,i)):t}function Un(e){let t=0,n=0;for(let r of e.children){if(r.style.position===`fixed`)continue;let e=Wn(r);t=Math.max(t,r.localRect.x+e.x),n=Math.max(n,r.localRect.y+e.y)}if(e.textExtent){let{border:r}=e.style,i=e.resolvedPadding;t=Math.max(t,r.left+i.left+e.textExtent.width),n=Math.max(n,r.top+i.top+e.textExtent.rows)}return{x:t,y:n}}function Wn(e){let{width:t,height:n}=e.localRect,r=e.style.overflow.x!==`visible`,i=e.style.overflow.y!==`visible`;if(r&&i)return{x:t,y:n};let a=Un(e);return{x:r?t:Math.max(t,a.x),y:i?n:Math.max(n,a.y)}}function Gn(e,t,n){let r=e.style;return ln(e,n).min+r.border.left+r.border.right+Y(r.padding.left,t)+Y(r.padding.right,t)+et(r).right}function Kn(e,t){if(e.height?.kind===`cells`)return e.height.value;if(e.height?.kind===`percent`&&t!=null)return F(e.height.value,t)}function qn(e,t,n,r){switch(e.kind){case`cells`:return e.value;case`percent`:return F(e.value,t);case`min-content`:return Zn(n,r);case`max-content`:return Jn(n,r);case`fit-content`:return Math.min(Jn(n,r),Math.max(Zn(n,r),t));case`auto`:return Jn(n,r)}}function Jn(e,t){let n=t.maxContent.get(e);if(n!==void 0)return n;let r=e.style,i=Yn(e,t)+r.border.left+r.border.right+In(r.padding.left)+In(r.padding.right)+et(r).right;return t.maxContent.set(e,i),i}function Yn(e,t){let n=e.children.filter(e=>!q(e.style)&&!e.inlineBox);if(n.length===0)return e.style.display===`multicol`?Ft(e.style,e.intrinsicWidth):e.intrinsicWidth;if(e.style.display===`grid`)return pt(e,t).max;if(e.style.display===`table`)return ln(e,t).max;if(e.style.display===`flex`&&e.style.flexDirection===`row`){let r=Math.max(In(e.style.gapX),e.style.ruleX?.width??0)*Math.max(0,n.length-1);return n.reduce((e,n)=>e+Xn(n,`max`,t),0)+r}let r=n.reduce((e,n)=>Math.max(e,Xn(n,`max`,t)),0);return e.style.display===`multicol`?Ft(e.style,r):r}function Xn(e,t,n){let r=e.style,i;r.width!==void 0&&r.width.kind!==`auto`&&r.width.kind!==`percent`&&(i=qn(r.width,0,e,n)),i===void 0&&(i=t===`min`?Zn(e,n):Jn(e,n));let a=typeof r.minWidth==`number`?r.minWidth:0,o=typeof r.maxWidth==`number`?r.maxWidth:void 0;return Math.max(0,An(i,a,o))}function Zn(e,t){let n=t.minContent.get(e);if(n!==void 0)return n;let r=e.style,i=Qn(e,t)+r.border.left+r.border.right+In(r.padding.left)+In(r.padding.right)+et(r).right;return t.minContent.set(e,i),i}function Qn(e,t){let n=e.children.filter(e=>!q(e.style)&&!e.inlineBox);if(n.length===0)return!e.text||e.style.whiteSpace!==`normal`?e.intrinsicWidth:Oe(e.text,{advances:e.advances,tracking:e.style.tracking});if(e.style.display===`grid`)return pt(e,t).min;if(e.style.display===`table`)return ln(e,t).min;if(e.style.display===`flex`&&e.style.flexDirection===`row`&&e.style.flexWrap===`nowrap`){let r=Math.max(In(e.style.gapX),e.style.ruleX?.width??0)*Math.max(0,n.length-1);return n.reduce((e,n)=>e+Xn(n,`min`,t),0)+r}return n.reduce((e,n)=>Math.max(e,Xn(n,`min`,t)),0)}function $n(e,t,n,r){return{width:Math.max(0,e-n.left-n.right-r.left-r.right),height:Math.max(0,t-n.top-n.bottom-r.top-r.bottom)}}function er(e){return or(e).grid.map(e=>e.join(``).trimEnd()).join(`
956
+ `)}function tr(e){let{grid:t,paints:n}=or(e);return t.map((e,t)=>nr(e,n[t]))}function nr(e,t){let n=[];for(let r=0;r<e.length;r++){let i=t[r],a=n[n.length-1];a&&rr(a,i)?a.text+=e[r]:n.push({text:e[r],...i})}return n}function rr(e,t){return e.color===t?.color&&e.backgroundColor===t?.backgroundColor&&e.fontWeight===t?.fontWeight&&e.fontStyle===t?.fontStyle&&e.textDecorationLine===t?.textDecorationLine&&e.opacity===t?.opacity}function ir(e,t){e.color!==void 0&&(t.color=e.color),e.backgroundColor!==void 0&&(t.backgroundColor=e.backgroundColor),e.fontWeight!==void 0&&(t.fontWeight=e.fontWeight),e.fontStyle!==void 0&&(t.fontStyle=e.fontStyle),e.textDecorationLine!==void 0&&(t.textDecoration=e.textDecorationLine),e.opacity!==void 0&&(t.opacity=e.opacity)}function ar(e){return e.color===void 0&&e.backgroundColor===void 0&&e.fontWeight===void 0&&e.fontStyle===void 0&&e.textDecorationLine===void 0&&e.opacity===void 0}function or(e){let t=Math.max(0,e.localRect.width),n=Math.max(0,e.localRect.height),r=Array.from({length:n},()=>Array.from({length:t},()=>` `)),i=Array.from({length:n},()=>Array.from({length:t},()=>void 0));return cr(e,0,0,(e,a,o,s)=>{if(e>=0&&e<t&&a>=0&&a<n){r[a][e]=o;let t=i[a][e];i[a][e]=t?{...t,...s}:s}}),{grid:r,paints:i}}function sr(e){let t={};return e.color&&(t.color=e.color),e.backgroundColor&&(t.backgroundColor=e.backgroundColor),e.fontWeight!==`400`&&e.fontWeight!==`normal`&&e.fontWeight!==``&&(t.fontWeight=e.fontWeight),e.fontStyle!==`normal`&&e.fontStyle!==``&&(t.fontStyle=e.fontStyle),e.textDecorationLine!==`none`&&e.textDecorationLine!==``&&(t.textDecorationLine=e.textDecorationLine),t}function cr(e,t,n,r,i=1){if(e.tableHidden)return;let a=t+e.localRect.x,o=n+e.localRect.y,s=e.style,c=e=>i>=1?e:{...e,opacity:String(Math.round(i*1e3)/1e3)};if(s.backgroundColor!==void 0||s.backgroundClear){let t=s.backgroundColor===void 0?{backgroundColor:void 0}:c({backgroundColor:s.backgroundColor});for(let n=0;n<e.localRect.height;n++)for(let i=0;i<e.localRect.width;i++)r(a+i,o+n,` `,t)}let l=[];fe(s,{x:a,y:o,width:e.localRect.width,height:e.localRect.height},l);for(let e of l){let t=c(e.color===void 0?void 0:{color:e.color});for(let n=0;n<e.length;n++)r(e.x+n,e.y,e.glyph,t)}if(e.decorationRuns)for(let t of e.decorationRuns){let e=c(t.color===void 0?void 0:{color:t.color});for(let n=0;n<t.length;n++)r(a+t.x+n,o+t.y,t.glyph,e)}let u=e.scrollGutterCells,d=s.overflow.x!==`visible`,f=s.overflow.y!==`visible`,p=a-(e.scroll?.x??0),m=o-(e.scroll?.y??0),h=r;if(d||f){let t=a+s.border.left,n=o+s.border.top,i=a+e.localRect.width-s.border.right-(u?.right??0),c=o+e.localRect.height-s.border.bottom-(u?.bottom??0);h=(e,a,o,s)=>{d&&(e<t||e>=i)||f&&(a<n||a>=c)||r(e,a,o,s)}}if(!e.children.some(e=>!e.inlineBox&&e.style.position!==`absolute`&&e.style.position!==`fixed`)&&e.text){let t=c(sr(s)),n=e.inlineElements?.map(e=>c(sr(e)));lr(e,p,m,(r,i,a)=>{let o=e.charInline?.[r]??-1,s=o>=0?e.inlineElements[o]:void 0;e.text[r]===`⁠`?s?.backgroundColor&&h(i,a,` `,c({backgroundColor:s.backgroundColor})):h(i,a,e.text[r],s?n[o]:t)},(e,n)=>h(e,n,`…`,t))}for(let t of he(e))cr(t,p,m,h,i*t.style.opacity);let g=e.scrollRange;if(g&&u&&(u.right>0||u.bottom>0)){let{track:t,thumb:n}=de(j(s.glyphSet)),i=e=>c(e?{color:e}:void 0),l=i(s.scrollbarColor?.track??s.color),u=i(s.scrollbarColor?.thumb??s.color),d=pr(e,a,o);if(d.y){let{col:i,row:a,thick:o,len:s}=d.y,{at:c,len:f}=mr(s,g.sizeY,g.maxY,e.scroll?.y??0);for(let e=0;e<o;e++)for(let o=0;o<s;o++){let s=o>=c&&o<c+f;r(i+e,a+o,s?n:t,s?u:l)}}if(d.x){let{col:i,row:a,thick:o,len:s}=d.x,{at:c,len:f}=mr(s,g.sizeX,g.maxX,e.scroll?.x??0);for(let e=0;e<o;e++)for(let o=0;o<s;o++){let s=o>=c&&o<c+f;r(i+o,a+e,s?n:t,s?u:l)}}}}function lr(e,t,n,r,i){let a=e.style,o=e.resolvedPadding,s=t+a.border.left+o.left,c=n+a.border.top+o.top,l=e.localRect.width-a.border.left-a.border.right-o.left-o.right,u=e.multicolGeometry,{spans:d,textY:f}=u??Mn(e,l),p=u?Math.max(1,u.columnWidth-a.tracking):l;for(let t=0;t<d.length;t++){let n=d[t],o=c+f[t],l=t===0?a.textIndent:0,m=a.whiteSpace!==`normal`&&a.overflow.x===`clip`?hr(e.text,n,p-l,e.advances,a):{end:n.end,ellipsis:!1},h=Ee(n.start,n.end,e.advances,a.tracking),g=Math.max(0,p-l-h),_=a.textAlign===`end`?g:a.textAlign===`center`?Math.floor(g/2):0,v=s+(u?.lineX[t]??0)+_+l;for(let t=n.start;t<m.end;t++){let n=Te(t,t+1,e.advances);if(e.text[t]!==``){let i=e.inlineElements?.[e.charInline?.[t]??-1]?.insets,a=i?i.left??(i.right===null?0:-i.right):0,s=i?i.top??(i.bottom===null?0:-i.bottom):0;r(t,v+a,o+s,n)}v+=n}m.ellipsis&&i?.(v,o)}}function ur(e,t,n,r,i){let a=e.multicolGeometry;if(!a)return!1;let o=e.style,s=e.resolvedPadding,c=r-(t+o.border.left+s.left),l=i-(n+o.border.top+s.top),{lineX:u,lineY:d}=a;for(let e=0;e<d.length;e++){if(c<u[e]||c>=u[e]+a.columnWidth)continue;let t=(e+1<d.length&&u[e+1]===u[e]?d[e+1]:void 0)??d[e]+1+o.lineGap;if(l>=d[e]&&l<t)return!0}return!1}function dr(e,t,n,r,i){let a=null;return lr(e,t-(e.scroll?.x??0),n-(e.scroll?.y??0),(e,t,n,o)=>{a===null&&n===i&&r>=t&&r<t+o&&(a=e)}),a}function fr(e,t,n){let r=e.inlineElements;if(!r||!e.charInline)return[];let i=r.map((e,t)=>r.flatMap((n,r)=>r===t||n.element.contains(e.element)?[r]:[])),a=r.map(()=>new Map);return lr(e,t-(e.scroll?.x??0),n-(e.scroll?.y??0),(t,n,r,o)=>{let s=e.charInline[t]??-1;if(!(s<0))for(let e of i[s]){let t=a[e].get(r);t?(t.x0=Math.min(t.x0,n),t.x1=Math.max(t.x1,n+o)):a[e].set(r,{x0:n,x1:n+o})}}),r.flatMap((e,t)=>[...a[t]].sort(([e],[t])=>e-t).map(([t,n])=>({element:e.element,rect:{x:n.x0,y:t,width:n.x1-n.x0,height:1}})))}function pr(e,t,n){let r=e.scrollGutterCells;if(!r)return{};let{border:i,scrollbarSize:a,scrollbarInset:o}=e.style,s=n+i.top,c=t+i.left,l=n+e.localRect.height-i.bottom,u=t+e.localRect.width-i.right,d=r.bottom>0?l-r.bottom:l-o.y,f=r.right>0?u-r.right:u-o.x,p={};return r.right>0&&(p.y={col:u-r.right,row:s+o.y,thick:Math.min(a.y,r.right),len:Math.max(0,d-s-o.y)}),r.bottom>0&&(p.x={col:c+o.x,row:l-r.bottom,thick:Math.min(a.x,r.bottom),len:Math.max(0,f-c-o.x)}),p}function mr(e,t,n,r){let i=t>0?Math.min(1,e/t):1,a=Math.max(1,Math.round(i*e));return n>0&&(a=Math.max(1,Math.min(a,e-n))),{at:n>0?Math.round(Math.min(r,n)/n*(e-a)):0,len:a}}function hr(e,t,n,r,i){let{textOverflow:a,tracking:o}=i;if(Ee(t.start,t.end,r,o)<=n)return{end:t.end,ellipsis:!1};let s=a===`ellipsis`?n-1:n,c=t.start;for(;c<t.end&&Ee(t.start,c+1,r,o)<=s;)c++;return{end:c,ellipsis:a===`ellipsis`&&n>0}}function gr(e,t,n){let r=[],i=e,a=e.localRect.x,o=e.localRect.y;for(;;){let e=null;for(let r of he(i)){if(r.tableHidden)continue;let i=a+r.localRect.x,s=o+r.localRect.y;(r.multicolFlow?ur(r,i,s,t,n):t>=i&&t<i+r.localRect.width&&n>=s&&n<s+r.localRect.height)&&(e=r)}if(!e)return r;r.push({node:e,x:a+e.localRect.x,y:o+e.localRect.y}),a+=e.localRect.x-(e.scroll?.x??0),o+=e.localRect.y-(e.scroll?.y??0),i=e}}function _r(e){return e.closest?.(`[inert]`)!=null}function vr(e,t,n){let r=[];for(let i of gr(e,t,n)){if(_r(i.node.source))break;r.push(i.node.source)}return r}var yr={ArrowUp:`up`,ArrowDown:`down`,ArrowLeft:`left`,ArrowRight:`right`};function br(e){return yr[e]??null}function xr(e,t,n){let r=null,i=null;for(let a of n){let n=Cr(e,t,a.rect);n&&(!i||Sr(n,i))&&(r=a,i=n)}return r?.element??null}function Sr(e,t){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return e[n]<t[n];return!1}function Cr(e,t,n){let r=e===`up`||e===`down`,[i,a,o]=r?[`y`,`x`,`height`]:[`x`,`y`,`width`],s=t[i]+t[o],c=n[i]+n[o],l=e===`down`||e===`right`?n[i]-s:t[i]-c;if(l<0)return null;let u=r?`width`:`height`,d=Math.min(t[a]+t[u],n[a]+n[u])-Math.max(t[a],n[a]);return d>0?[0,l,0]:[1,l,-d]}function wr(e){let t=[],n=(e,r,i,a)=>{if(e.tableHidden)return;let o=r+e.localRect.x,s=i+e.localRect.y;!a&&Er(e.source)&&t.push({element:e.source,rect:{x:o,y:s,width:e.localRect.width,height:e.localRect.height}});for(let n of fr(e,o,s))Er(n.element)&&t.push(n);let c=e.scroll?.x??0,l=e.scroll?.y??0;for(let t of e.children)n(t,o-c,s-l,!1)};return n(e,0,0,!0),t}function Tr(e,t){let n=null;for(let{element:r,rect:i}of e)if(r===t){if(!n)n={...i};else{let e=Math.max(n.x+n.width,i.x+i.width),t=Math.max(n.y+n.height,i.y+i.height);n.x=Math.min(n.x,i.x),n.y=Math.min(n.y,i.y),n.width=e-n.x,n.height=t-n.y}}return n}function Er(e){let t=e.tabIndex;return typeof t!=`number`||t<0?!1:!e.matches(`:disabled`)&&!_r(e)}var Dr=new Set([`text`,`search`,`url`,`tel`,`email`,`password`]),Or=new Set([`checkbox`,`button`,`submit`,`reset`,`image`,`file`]);function kr(e,t,n=!1){let r=e.tagName;if(r===`TEXTAREA`||e.closest(`[contenteditable]:not([contenteditable='false'])`))return!0;if(r===`INPUT`){let n=e.type;return n===`radio`?!0:Dr.has(n)?t===`ArrowLeft`||t===`ArrowRight`:!Or.has(n)}if(r===`SELECT`){let t=e,r=Number(t.size)||Number(t.getAttribute(`size`))||0;return t.multiple||r>1||n}return!1}function Ar(e,t,n,r){let i=e.ownerDocument,a=i.createRange();a.setStart(e,t),a.collapse(!0);let o=i.createRange();return o.setStart(n,r),o.collapse(!0),a.compareBoundaryPoints(a.START_TO_START,o)}function jr(e,t,n){let r=Qe(e).findIndex(e=>e.source.contains(t));if(r>=0){let t=-1;for(let n=0;n<=r;n++)t=e.text.indexOf(``,t+1);if(t>=0)return t}let i=e.charSource??[],a=0,o=i.length;for(;a<o;){let e=a+o>>1,r=i[e];Ar(r.node,r.offset,t,n)<=0?a=e+1:o=e}if(a===0)return 0;let s=i[a-1];return t===s.node&&n<s.offset+s.length?s.index+(n-s.offset):s.index+s.length}function Mr(e,t){let n=e.charSource??[],r=0,i=n.length;for(;r<i;){let e=r+i>>1;n[e].index<=t?r=e+1:i=e}let a=n[r-1];if(!a)return null;let o=t-a.index;return o<=a.length?{node:a.node,offset:a.offset+o}:null}function Nr(e){try{let t=e.ownerDocument.getSelection();if(!t)return null;if(t.getComposedRanges)return t.getComposedRanges({shadowRoots:[e]})[0]??null;let n=e.getSelection?.();return!n||n.rangeCount===0?null:n.getRangeAt(0)}catch{return null}}function Pr(e,t,n){let{startContainer:r,endContainer:i}=n;return t.contains(r)&&t.contains(i)?`grid`:e.contains(r)&&e.contains(i)?`light`:`outside`}function Fr(e,t){let n=e.source.ownerDocument.createRange();n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset);let r=[];return Ir(e,n,r),Wr(r)}function Ir(e,t,n){if(e.tableHidden||!t.intersectsNode(e.source))return;let r=Br(e);if(r&&n.push({breaks:r}),e.style.tableRole===`row`)Lr(e,t,n);else if(e.style.display===`table`){let r=zr(e);for(let r of e.children)r.style.tableRole===`row`||Rr(r)||Ir(r,t,n);let i=!1;for(let e of r)t.intersectsNode(e.source)&&(i&&n.push({text:`
957
+ `}),Ir(e,t,n),i=!0)}else{Hr(e)&&n.push({text:Ur(e,t)});for(let r of e.children)r.inlineBox||Ir(r,t,n)}r&&n.push({breaks:r})}function Lr(e,t,n){let r=!1;for(let i of e.children)i.style.tableRole!==`cell`||i.tableHidden||t.intersectsNode(i.source)&&(r&&n.push({text:` `}),Ir(i,t,n),r=!0)}function Rr(e){let t=e.style.tableRole;return t===`header-group`||t===`row-group`||t===`footer-group`}function zr(e){let t=[];for(let n of e.children)if(n.style.tableRole===`row`)t.push(n);else if(Rr(n))for(let e of n.children)e.style.tableRole===`row`&&t.push(e);return t}function Br(e){if(e.inlineBox)return 0;let t=e.style.tableRole;return t===`row`||t===`cell`||Rr(e)||t===`column`||t===`column-group`?0:e.source.tagName===`P`?2:1}function Vr(e){let t=[],n=e.charSource??[];if(n.length>0){let e=n[0],r=n[n.length-1];t.push({start:{node:e.node,offset:e.offset},end:{node:r.node,offset:r.offset+r.length}})}for(let n of Qe(e)){let e=n.source.parentNode;if(!e)continue;let r=Array.prototype.indexOf.call(e.childNodes,n.source);t.push({start:{node:e,offset:r},end:{node:e,offset:r+1}})}if(t.length===0)return null;let r=(e,t)=>Ar(e.node,e.offset,t.node,t.offset)<0,{start:i,end:a}=t[0];for(let e of t.slice(1))r(e.start,i)&&(i=e.start),r(a,e.end)&&(a=e.end);return{start:i,end:a}}function Hr(e){return e.text.length!==0&&!e.children.some(e=>!e.inlineBox&&e.style.position!==`absolute`&&e.style.position!==`fixed`)}function Ur(e,t){let{text:n}=e,r=0,i=n.length;e.charSource&&(e.source.contains(t.startContainer)&&(r=jr(e,t.startContainer,t.startOffset)),e.source.contains(t.endContainer)&&(i=jr(e,t.endContainer,t.endOffset)));let a=n.slice(r,i);i===n.length&&a.endsWith(`
958
+ `)&&(a=a.slice(0,-1));let o=Qe(e),s=n.slice(0,r).split(``).length-1;return a=a.replaceAll(``,()=>{let e=o[s++];if(!e||!t.intersectsNode(e.source))return``;let n=[];return Ir(e,t,n),Wr(n)}),a.replaceAll(`⁠`,``)}function Wr(e){let t=``,n=0;for(let r of e){if(`breaks`in r){n=Math.max(n,r.breaks);continue}r.text.length!==0&&(t.length>0&&n>0&&(t+=`
959
+ `.repeat(n)),n=0,t+=r.text)}return t}var Gr=new Map;function Kr(e,t){let{text:n}=e;if(t<0||t>=n.length||qr(n[t]))return null;let r=t;for(;r>0&&!qr(n[r-1]);)r--;let i=t;for(;i<n.length&&!qr(n[i]);)i++;let a=Jr(e.source.closest?.(`[lang]`)?.getAttribute(`lang`)??``);if(!a)return null;for(let e of a.segment(n.slice(r,i))){let n=r+e.index,i=n+e.segment.length;if(t>=n&&t<i)return{start:n,end:i}}return null}function qr(e){return e===`
960
+ `||e===``||e===`⁠`}function Jr(e){let t=Gr.get(e);return t===void 0&&(t=Yr(e)??Yr(``),Gr.set(e,t)),t}function Yr(e){if(typeof Intl.Segmenter!=`function`)return null;try{return new Intl.Segmenter(e||void 0,{granularity:`word`})}catch{return null}}var Xr=new WeakMap,Zr=new WeakMap;function Qr(e){return ti(e,!0)!==null}function $r(e,t,n=!1){let r=tr(e),i=oi(r);if(Xr.get(t)===i)return!0;let a=Zr.get(t);if(a&&ei(t,a.nodes,r)){Xr.set(t,i);for(let e=0;e<r.length;e++)for(let t=0;t<r[e].length;t++){let n=r[e][t];if(ar(n)||rr(n,a.segments[e][t]))continue;let i=a.nodes[e][t];i.style.cssText=``,ir(n,i.style)}return a.segments=r,!0}if(n&&Qr(t))return!1;Xr.set(t,i);let o=document.createDocumentFragment(),s=[];for(let e=0;e<r.length;e++){e>0&&o.appendChild(document.createTextNode(`
961
+ `));let t=[];for(let n of r[e]){if(ar(n)){let e=document.createTextNode(n.text);t.push(e),o.appendChild(e);continue}let e=document.createElement(`span`);ir(n,e.style),e.textContent=n.text,t.push(e),o.appendChild(e)}s.push(t)}Zr.set(t,{nodes:s,segments:r});let c=ti(t,!1);return t.replaceChildren(o),c&&ni(t,c),!0}function ei(e,t,n){if(t.length!==n.length)return!1;for(let r=0;r<n.length;r++){let i=t[r],a=n[r];if(i.length!==a.length)return!1;for(let t=0;t<a.length;t++){let n=i[t];if(ar(a[t])!==(n.nodeType===Node.TEXT_NODE)||n.textContent!==a[t].text||n.parentNode!==e)return!1}}return!0}function ti(e,t){try{let n=e.ownerDocument.getSelection();if(!n)return null;let r=e.getRootNode();if(!(r instanceof ShadowRoot))return null;let i=Nr(r);if(!i)return null;let a=ri(e,i.startContainer,i.startOffset),o=ri(e,i.endContainer,i.endOffset);return a===null||o===null||a===o&&!t?null:{start:a,end:o,backward:n.direction===`backward`}}catch{return null}}function ni(e,t){try{let n=ii(e,t.start),r=ii(e,t.end);if(!n||!r)return;let i=e.getRootNode().getSelection?.()??e.ownerDocument.getSelection();t.backward?i?.setBaseAndExtent(r[0],r[1],n[0],n[1]):i?.setBaseAndExtent(n[0],n[1],r[0],r[1])}catch{}}function ri(e,t,n){if(!e.contains(t))return null;let r=e.ownerDocument.createRange();return r.selectNodeContents(e),r.setEnd(t,n),r.toString().length}function ii(e,t){let n=t,r=null;for(let t of ai(e)){if(n<=t.data.length)return[t,n];n-=t.data.length,r=[t,t.data.length]}return r}function*ai(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=t.nextNode();for(;n;)yield n,n=t.nextNode()}function oi(e){let t=[];for(let n of e){for(let e of n)t.push(e.text,e.color??``,e.backgroundColor??``,e.fontWeight??``,e.fontStyle??``,e.textDecorationLine??``,e.opacity??``);t.push(`
962
+ `)}return t.join(``)}function si(e){let t=new Set;li(e,!0,t);for(let n of Array.from(e.source.querySelectorAll(`[data-mw-inline-inset]`)))if(!t.has(n)){n.removeAttribute(`data-mw-inline-inset`);let e=n.style;for(let t of[`--mw-it`,`--mw-ir`,`--mw-ib`,`--mw-il`])e.removeProperty(t)}}function Z(e,t,n){e.style.getPropertyValue(t)!==n&&e.style.setProperty(t,n)}function ci(e,t){e.style.getPropertyValue(t)!==``&&e.style.removeProperty(t)}function Q(e,t,n){e.hasAttribute(t)!==n&&(n?e.setAttribute(t,``):e.removeAttribute(t))}function li(e,t,n){if(e.inlineElements)for(let{element:t,tracking:r,padLeft:i,padRight:a,insets:o}of e.inlineElements){let e=t;Z(e,`--mw-ls`,String(r)),i>0?Z(e,`--mw-ipl`,String(i)):ci(e,`--mw-ipl`),a>0?Z(e,`--mw-ipr`,String(a)):ci(e,`--mw-ipr`),o&&(n.add(t),di(e,o))}if(t?ui(e):pi(e),!e.tableHidden)for(let t of he(e)){let r=t.source;t.style.zIndex!==null&&me(t,e)&&!t.inlineBox?Z(r,`--mw-z`,String(t.style.zIndex)):ci(r,`--mw-z`),li(t,!1,n)}}function ui(e){let t=e.source,n=e.text.length>0,{whiteSpace:r,textAlignBlocked:i,textIndent:a}=e.style;Q(t,`data-mw-leaf`,n),Q(t,`data-mw-nowrap`,n&&r!==`normal`),Q(t,`data-mw-pre`,n&&r===`pre`),Q(t,`data-mw-text-align-blocked`,n&&i),n?Z(t,`--mw-ti`,String(a)):ci(t,`--mw-ti`)}function di(e,t){Q(e,`data-mw-inline-inset`,!0);let n=(t,n)=>{n===null?ci(e,t):Z(e,t,String(n))};n(`--mw-it`,t.top),n(`--mw-ir`,t.right),n(`--mw-ib`,t.bottom),n(`--mw-il`,t.left)}function fi(e){let t=e.style;if(t.textAlign!==`center`||!e.text||e.inlineBox||e.children.length>0)return!1;let n=e.multicolGeometry,r=e.resolvedPadding,i=e.localRect.width-t.border.left-t.border.right-r.left-r.right,a=n?Math.max(1,n.columnWidth-t.tracking):i,o=n?.spans??Nn(e,i);return o.length!==0&&o.every((n,r)=>{let i=r===0?t.textIndent:0,o=a-i-Ee(n.start,n.end,e.advances,t.tracking);return o>0&&o%2==1})}function pi(e){let t=e.source,n=e.localRect,r=e.resolvedPadding,{border:i,textAlignBlocked:a,overflow:o,whiteSpace:s,tracking:c,lineGap:l}=e.style,u=e.multicolFlow,d=e.multicolFlowSpan;Q(t,`data-mw-laid-out`,!e.inlineBox&&!u&&!d),Q(t,`data-mw-inline-box`,!!e.inlineBox),Q(t,`data-mw-multicol-flow`,!!u),Q(t,`data-mw-multicol-flow-span`,!!d);let f=u??d;f?(Z(t,`--mw-mt`,String(f.top??0)),Z(t,`--mw-mr`,String(f.right??0)),Z(t,`--mw-mb`,String(f.bottom??0)),Z(t,`--mw-ml`,String(f.left??0))):(ci(t,`--mw-mt`),ci(t,`--mw-mr`),ci(t,`--mw-mb`),ci(t,`--mw-ml`)),Q(t,`data-mw-vbottom`,!!e.inlineBox&&e.style.verticalAlign===`end`),Z(t,`--mw-ls`,String(c)),Z(t,`--mw-lh`,String(l+1)),Z(t,`--mw-lhs`,String(-l/2)),Q(t,`data-mw-nowrap`,s!==`normal`);let p=u||d?void 0:e.multicolGeometry;if(Q(t,`data-mw-multicol`,!!p),Q(t,`data-mw-multicol-balance`,!!p?.nativeBalance),p?(Z(t,`--mw-colc`,String(p.columnCount)),Z(t,`--mw-colg`,String(p.gap))):(ci(t,`--mw-colc`),ci(t,`--mw-colg`)),Q(t,`data-mw-pre`,s===`pre`),Z(t,`--mw-x`,String(n.x)),Z(t,`--mw-y`,String(n.y)),Z(t,`--mw-w`,String(n.width)),Z(t,`--mw-h`,String(n.height)),Q(t,`data-mw-clip`,o.x===`clip`||o.y===`clip`),Q(t,`data-mw-scroll`,e.scrollRange!==void 0),e.scrollRange){let{maxX:n,maxY:r}=e.scrollRange;Z(t,`--mw-se-x`,String(n>0?n+e.localRect.width:1)),Z(t,`--mw-se-y`,String(r>0?r+e.localRect.height:1))}else ci(t,`--mw-se-x`),ci(t,`--mw-se-y`);Z(t,`--mw-pt`,String(r.top)),Z(t,`--mw-pr`,String(r.right)),Z(t,`--mw-pb`,String(r.bottom)),Z(t,`--mw-pl`,String(r.left)),Z(t,`--mw-bt`,String(i.top)),Z(t,`--mw-br`,String(i.right)),Z(t,`--mw-bb`,String(i.bottom)),Z(t,`--mw-bl`,String(i.left)),Z(t,`--mw-ti`,String(e.style.textIndent)),Q(t,`data-mw-text-align-blocked`,a),Q(t,`data-mw-center-nudge`,fi(e)),Q(t,`data-mw-dropped-text`,!!e.droppedText),Q(t,`data-mw-table-hidden`,!!e.tableHidden)}function mi(e,t,n){let r=getComputedStyle(e),i=parseFloat(r.fontSize)||t,a=Ii(e)?e.computedStyleMap():null,o=e.getAttribute(`class`)??``,s=e.style;ji(e,o,s);let c=(e,r,i)=>ea(a,e,r,o,i,s,n,t)??na(a,e,r,o,i,s,n,t)??Ki(r,t),l=r.display||Di[e.tagName]||``,u=Oi[l]??`none`,d=r.columnCount&&r.columnCount!==`auto`?Math.max(1,Math.floor(Number(r.columnCount)||1)):null,f=r.columnWidth&&r.columnWidth!==`auto`?parseFloat(r.columnWidth):NaN,p=Number.isFinite(f)?Math.max(1,Se(f,t)):null,m=l===`flex`||l===`inline-flex`?`flex`:l===`grid`||l===`inline-grid`?`grid`:l===`table`||l===`inline-table`?`table`:l===`none`||Ei(e,r)?`none`:d!==null||p!==null?`multicol`:`block`,h={kind:`none`},g={kind:`none`},_=[rt()],v=[rt()],y={direction:`row`,dense:!1},b=null;if(m===`grid`){if(a)h=aa(a.get(`grid-template-columns`)?.toString()??``,t),g=aa(a.get(`grid-template-rows`)?.toString()??``,t);else{e.setAttribute(`data-mw-degrid`,``);try{h=aa(r.getPropertyValue(`grid-template-columns`),t),g=aa(r.getPropertyValue(`grid-template-rows`),t)}finally{e.removeAttribute(`data-mw-degrid`)}}_=la(r.getPropertyValue(`grid-auto-columns`),t),v=la(r.getPropertyValue(`grid-auto-rows`),t),y=ha(r.getPropertyValue(`grid-auto-flow`)),b=ca(r.getPropertyValue(`grid-template-areas`))}let x=`auto`,S=!1,C=0,w=0;if(m===`table`&&(x=r.tableLayout===`fixed`?`fixed`:`auto`,S=r.borderCollapse===`collapse`,!S)){let e=r.borderSpacing.split(` `);C=Se(parseFloat(e[0]??``)||0,t),w=Se(parseFloat(e[1]??e[0]??``)||0,t)}let T={display:m,tableRole:u,tableLayout:x,borderCollapse:S,borderSpacingX:C,borderSpacingY:w,captionSide:r.captionSide===`bottom`?`bottom`:`top`,verticalAlign:u===`cell`||l.startsWith(`inline-`)?ki(e,r):`start`,flexDirection:r.flexDirection.startsWith(`column`)?`column`:`row`,flexReverse:r.flexDirection.endsWith(`-reverse`),flexWrap:r.flexWrap.startsWith(`wrap`)?`wrap`:`nowrap`,wrapReverse:r.flexWrap===`wrap-reverse`,flexGrow:Number(r.flexGrow)||0,flexShrink:r.flexShrink===``?1:Number(r.flexShrink)||0,flexBasis:ra(r.flexBasis,t),order:Number(r.order)||0,justifyContent:Li(r.justifyContent),alignContent:Li(r.alignContent),alignItems:Ri(r.alignItems),alignSelf:zi(r.alignSelf),justifyItems:Ri(r.justifyItems),justifySelf:zi(r.justifySelf),gridTemplateColumns:h,gridTemplateRows:g,gridAutoColumns:_,gridAutoRows:v,gridAutoFlow:y,gridTemplateAreas:b,gridColumnStart:ma(r.getPropertyValue(`grid-column-start`)),gridColumnEnd:ma(r.getPropertyValue(`grid-column-end`)),gridRowStart:ma(r.getPropertyValue(`grid-row-start`)),gridRowEnd:ma(r.getPropertyValue(`grid-row-end`)),width:Xi(a,r.width,`width`,t,o,s,n),height:Xi(a,r.height,`height`,t,o,s,n),minWidth:c(`min-width`,r.minWidth,`min-w`)??`auto`,minHeight:c(`min-height`,r.minHeight,`min-h`)??`auto`,maxWidth:c(`max-width`,r.maxWidth,`max-w`),maxHeight:c(`max-height`,r.maxHeight,`max-h`),padding:_a(r,t),margin:Bi(r,a,o,s,t),position:Ui(r.position),insets:Wi(r,a,o,s,t),gapX:qi(r.columnGap===`normal`||r.columnGap===``?m===`multicol`?`${i}px`:`0px`:r.columnGap,t),gapY:qi(r.rowGap===`normal`?`0px`:r.rowGap,t),border:va(r),borderStyle:{top:Gi(r.borderTopStyle),right:Gi(r.borderRightStyle),bottom:Gi(r.borderBottomStyle),left:Gi(r.borderLeftStyle)},overflow:Ti(r),scrollbarWidth:xi(e,r),scrollbarColor:Si(r.scrollbarColor),overscroll:{x:(r.overscrollBehaviorX||`auto`)===`auto`,y:(r.overscrollBehaviorY||`auto`)===`auto`},scrollbarSize:{x:Ci(r.getPropertyValue(`--mw-scrollbar-size-x`)),y:Ci(r.getPropertyValue(`--mw-scrollbar-size-y`))},scrollbarInset:{x:Ci(r.getPropertyValue(`--mw-scrollbar-inset-x`),0),y:Ci(r.getPropertyValue(`--mw-scrollbar-inset-y`),0)},...Ai(e,r,t),lineGap:Hi(r.lineHeight,i),tracking:Vi(r.letterSpacing,i,n?.letterSpacing??0),color:r.color,fontWeight:r.fontWeight,fontStyle:r.fontStyle,backgroundColor:_i(e,r.backgroundColor,r),backgroundClear:r.getPropertyValue(`--mw-bg-clear`).trim()===`1`,borderColor:{top:r.borderTopColor,right:r.borderRightColor,bottom:r.borderBottomColor,left:r.borderLeftColor},opacity:Ji(r.opacity),glyphSet:r.getPropertyValue(`--mw-border-glyphs`).trim()||null,zIndex:r.zIndex===`auto`||r.zIndex===``?null:Number(r.zIndex)||0,latticeBorder:null,ruleX:m===`flex`||m===`grid`||m===`multicol`?Ni(r,`x`):null,ruleY:m===`flex`||m===`grid`?Ni(r,`y`):null,ruleBreak:Mi(r,`--mw-rule-break`,[`none`,`intersection`],`normal`),ruleInset:r.getPropertyValue(`--mw-rule-inset`).trim()===`overlap-join`?`overlap-join`:Math.max(0,xe(parseFloat(r.getPropertyValue(`--mw-rule-inset`))||0)),ruleVisibilityItems:Mi(r,`--mw-rule-visibility-items`,[`all`,`around`,`between`],`normal`),columnCount:d,columnWidth:p,columnFill:r.columnFill===`auto`?`auto`:`balance`,columnSpan:r.columnSpan===`all`,breakBeforeColumn:r.breakBefore===`column`,breakAfterColumn:r.breakAfter===`column`,breakInsideAvoid:r.breakInside===`avoid`||r.breakInside===`avoid-column`};return hi(T,r),T}function hi(e,t){t.borderCollapse===`collapse`&&(e.display===`table`||e.tableRole===`cell`||e.tableRole===`row`||e.tableRole===`row-group`||e.tableRole===`header-group`||e.tableRole===`footer-group`)&&(e.latticeBorder={width:e.border,style:e.borderStyle,color:e.borderColor,hidden:{top:t.borderTopStyle===`hidden`,right:t.borderRightStyle===`hidden`,bottom:t.borderBottomStyle===`hidden`,left:t.borderLeftStyle===`hidden`}},e.border=nt(),e.display===`table`&&(e.padding=nt()))}function gi(e){if(!e)return!0;let t=e.trim().toLowerCase();return t===``||t===`transparent`||t===`rgba(0, 0, 0, 0)`||t===`currentcolor`}function _i(e,t,n){let r=h(e,gi(t)?``:t,n);return r===``?void 0:r}function vi(e){return e===`hidden`||e===`clip`}var yi=new WeakMap,$=null;function bi(e){if($!==null)return $;if(!e.body)return!0;let t=e.createElement(`div`);return t.style.cssText=`position: absolute; width: 0; height: 0; overflow: auto`,e.body.appendChild(t),$=getComputedStyle(t).scrollbarWidth!==`none`,t.remove(),$}function xi(e,t){if(!bi(e.ownerDocument))return`auto`;if(e.hasAttribute(`data-mw-scroll`)){let t=yi.get(e);if(t!==void 0)return t}let n=t.scrollbarWidth===`none`?`none`:`auto`;return yi.set(e,n),n}function Si(e){let t=(e??``).trim();if(!t||t===`auto`)return null;let n=0;for(let e=0;e<t.length;e++){let r=t[e];if(r===`(`)n++;else if(r===`)`)n--;else if(r===` `&&n===0)return{thumb:t.slice(0,e),track:t.slice(e+1).trim()}}return null}function Ci(e,t=1){return Math.max(t,Math.floor(Number(e)||t))}function wi(e){return vi(e)?`clip`:e===`auto`||e===`scroll`?e:`visible`}function Ti(e){let t=wi(e.overflowX||e.overflow),n=wi(e.overflowY||e.overflow);return t!==`visible`&&n===`visible`&&(n=`auto`),n!==`visible`&&t===`visible`&&(t=`auto`),{x:t,y:n}}function Ei(e,t){if(t.position!==`absolute`&&t.position!==`fixed`)return!1;let n=t.clip.replace(/\s/g,``);return n===`rect(0px,0px,0px,0px)`||n===`rect(0,0,0,0)`||!s(e.tagName)&&(vi(t.overflow)||vi(t.overflowX))&&parseFloat(t.width)<=1&&parseFloat(t.height)<=1}var Di={TABLE:`table`,THEAD:`table-header-group`,TBODY:`table-row-group`,TFOOT:`table-footer-group`,TR:`table-row`,TD:`table-cell`,TH:`table-cell`,CAPTION:`table-caption`,COL:`table-column`,COLGROUP:`table-column-group`},Oi={"table-header-group":`header-group`,"table-row-group":`row-group`,"table-footer-group":`footer-group`,"table-row":`row`,"table-cell":`cell`,"table-caption":`caption`,"table-column":`column`,"table-column-group":`column-group`};function ki(e,t){let n=t.verticalAlign||e.getAttribute(`valign`)?.toLowerCase()||(e.tagName===`TD`||e.tagName===`TH`?`middle`:`baseline`);return n===`top`?`start`:n===`middle`?`center`:n===`bottom`?`end`:`start`}function Ai(e,t,n){return{whiteSpace:t.whiteSpace===`pre`?`pre`:t.whiteSpace===`nowrap`?`nowrap`:`normal`,tabSize:Math.max(1,Math.floor(parseFloat(t.tabSize))||8),textOverflow:t.textOverflow===`ellipsis`?`ellipsis`:`clip`,textDecorationLine:t.textDecorationLine,textAlignBlocked:Pi(e,t),textAlign:Fi(e,t),textIndent:Yi(t,n)}}function ji(e,n,r){(/(?:^|[\s:.[!])text-(?:xs|sm|base|lg|[2-9]?xl)(?![\w-])/.test(n)||/(?:^|[\s:.[!])text-\[(?:(?:length|size):|[\d.])/.test(n)||r.fontSize!==``)&&t(e,`font-size inside <mono-wind> is ignored — all text shares the host's cell size. Size the <mono-wind> element itself instead.`)}function Mi(e,t,n,r){let i=e.getPropertyValue(t).trim();return n.includes(i)?i:r}function Ni(e,t){let n=xe(parseFloat(e.getPropertyValue(`--mw-rule-${t}-width`))||0);if(n<=0)return null;let r=e.getPropertyValue(`--mw-rule-${t}-color`).trim();return{width:n,style:Gi(e.getPropertyValue(`--mw-rule-${t}-style`).trim()),color:r&&r!==`currentcolor`&&r!==`currentColor`?r:e.color}}function Pi(e,t){return t.textAlign===`justify`||e.getAttribute(`align`)?.toLowerCase()===`justify`}function Fi(e,t){let n=t.textAlign||e.getAttribute(`align`)?.toLowerCase()||``;return n===`right`||n===`end`?`end`:n===`center`||n.endsWith(`-center`)?`center`:`start`}function Ii(e){return typeof e.computedStyleMap==`function`}function Li(e){switch(e){case`center`:return`center`;case`flex-end`:case`end`:case`right`:return`end`;case`space-between`:return`space-between`;case`space-around`:return`space-around`;case`space-evenly`:return`space-evenly`;case`normal`:case`stretch`:case``:return`stretch`;default:return`start`}}function Ri(e){switch(e){case`center`:return`center`;case`flex-end`:case`end`:return`end`;case`stretch`:case`normal`:case``:return`stretch`;default:return`start`}}function zi(e){return e===`auto`||e===``||e===`normal`?`auto`:Ri(e)}function Bi(e,t,n,r,i){let a=(a,o,s)=>{if(t){let e=t.get(a)?.toString().trim();if(e===`auto`||t.get(o)?.toString().trim()===`auto`)return null;if(e?.endsWith(`%`)){let t=parseFloat(e);if(Number.isFinite(t)&&t!==0)return{percent:t}}}else if(s.test(n)||r.getPropertyValue(a)===`auto`)return null;let c=e.getPropertyValue(a);if(c===`auto`)return null;let l=qi(c,i);if(l!==0)return l;let u=e.getPropertyValue(o);return u===`auto`?null:qi(u,i)};return{top:a(`margin-top`,`margin-block-start`,/(?:^|[\s:.[!])(?:m|my|mt)-auto\b/),right:a(`margin-right`,`margin-inline-end`,/(?:^|[\s:.[!])(?:m|mx|mr|me)-auto\b/),bottom:a(`margin-bottom`,`margin-block-end`,/(?:^|[\s:.[!])(?:m|my|mb)-auto\b/),left:a(`margin-left`,`margin-inline-start`,/(?:^|[\s:.[!])(?:m|mx|ml|ms)-auto\b/)}}function Vi(e,t,n){let r=(e===`normal`?0:parseFloat(e)||0)-n;return r<=0?0:Math.floor(r/(.025*t)+1e-6)}function Hi(e,t){if(!e||e===`normal`||t<=0)return 0;let n=parseFloat(e);return Number.isFinite(n)?Math.max(0,Math.floor(n/t+1e-6)-1):0}function Ui(e){switch(e){case`relative`:case`absolute`:case`fixed`:case`sticky`:return e;default:return`static`}}function Wi(e,t,n,r,i){let a=(a,o)=>{if(t){let e=t.get(a)?.toString().trim();return!e||e===`auto`?null:qi(e,i)}let s=r[a];if(s)return s===`auto`?null:qi(s,i);if(!o.test(n))return null;let c=e.getPropertyValue(a);return!c||c===`auto`?null:qi(c,i)};return{top:a(`top`,/(?:^|[\s:.[!])-?(?:top|inset|inset-y)-/),right:a(`right`,/(?:^|[\s:.[!])-?(?:right|end|inset|inset-x)-/),bottom:a(`bottom`,/(?:^|[\s:.[!])-?(?:bottom|inset|inset-y)-/),left:a(`left`,/(?:^|[\s:.[!])-?(?:left|start|inset|inset-x)-/)}}function Gi(e){switch(e){case`double`:return`double`;case`dashed`:return`dashed`;case`dotted`:return`dotted`;default:return`solid`}}function Ki(e,t){if(!e||e===`none`||e===`auto`)return;if(e===`min-content`||e===`max-content`||e===`fit-content`)return e;if(e.endsWith(`%`)){let t=parseFloat(e);return Number.isFinite(t)?{percent:t}:void 0}let n=parseFloat(e);return Number.isFinite(n)?Se(n,t):void 0}function qi(e,t){if(!e||e===`auto`||e===`none`)return 0;if(e.endsWith(`%`)){let t=parseFloat(e);return Number.isFinite(t)&&t!==0?{percent:t}:0}let n=parseFloat(e);return Number.isFinite(n)?Se(n,t):0}function Ji(e){let t=parseFloat(e);return Number.isFinite(t)?Math.min(1,Math.max(0,t)):1}function Yi(e,t){let n=e.textIndent;if(!n||n.endsWith(`%`))return 0;let r=parseFloat(n);return Number.isFinite(r)?Math.max(0,Se(r,t)):0}function Xi(e,t,n,r,i,a,o){let s=Zi(n===`width`?a.width:a.height);if(s!==null)return{kind:`cells`,value:$i(s,n,o,r)};let c=ea(e,n,t,i,n===`width`?`w`:`h`,a,o,r);if(c!==void 0)return{kind:`cells`,value:c};let l=Qi(i,n===`width`?`w`:`h`);if(l!==null){let i=parseFloat(e?String(e.get(n)??``):t),a=Number.isFinite(i)&&Math.abs(i-l)<=l*.3;if(a||!Number.isFinite(i))return{kind:`cells`,value:$i(a?i:l,n,o,r)}}if(e){let t=e.get(n);if(t==null)return;let i=t.toString().trim();if(i===`auto`)return{kind:`auto`};let a=ia(i);if(a)return a;if(i.endsWith(`%`))return{kind:`percent`,value:parseFloat(i)};if(i.endsWith(`px`))return{kind:`cells`,value:Se(parseFloat(i),r)};if(i.endsWith(`rem`))return{kind:`cells`,value:xe(parseFloat(i)/.25)};let s=Zi(i);if(s!==null)return{kind:`cells`,value:$i(s,n,o,r)}}let u=n===`width`?a.width:a.height;if(u){if(u===`auto`)return{kind:`auto`};let e=ia(u);if(e)return e;if(u.endsWith(`%`))return{kind:`percent`,value:parseFloat(u)};let t=parseFloat(u);if(Number.isFinite(t))return{kind:`cells`,value:Se(t,r)}}let d=n===`width`?`w`:`h`;if(RegExp(`(?:^|[\\s:.[!])${d}-min\\b`).test(i))return{kind:`min-content`};if(RegExp(`(?:^|[\\s:.[!])${d}-max\\b`).test(i))return{kind:`max-content`};if(RegExp(`(?:^|[\\s:.[!])${d}-fit\\b`).test(i))return{kind:`fit-content`};let f=RegExp(`(?:^|[\\s:.[!])${d}-(\\d+)/(\\d+)(?![\\w./])`).exec(i);if(f)return{kind:`percent`,value:100*Number(f[1])/Number(f[2])};if(RegExp(`(?:^|[\\s:.[!])${d}-full(?![\\w-])`).test(i))return{kind:`percent`,value:100};let p=RegExp(`(?:^|[\\s:.[!])${d}-\\[(\\d+(?:\\.\\d+)?)%\\]`).exec(i);if(p)return{kind:`percent`,value:Number(p[1])};let m=RegExp(`(?:^|[\\s:.[!])${d}-(\\d+(?:\\.\\d+)?)(?![\\w-/])`).exec(i);if(m)return{kind:`cells`,value:xe(Number(m[1]))};if(!ga(i,d)||t===`auto`)return{kind:`auto`};if(t.endsWith(`%`))return{kind:`percent`,value:parseFloat(t)};let h=parseFloat(t);if(Number.isFinite(h))return{kind:`cells`,value:Se(h,r)}}function Zi(e){let t=/^(-?[\d.]+)((?:[dsl]?v)(?:h|w|min|max)|vi|vb)$/.exec(e.trim());if(!t||typeof window>`u`)return null;let n=parseFloat(t[1]);if(!Number.isFinite(n))return null;let r=t[2],i=window.innerHeight,a=window.innerWidth,o=r.endsWith(`h`)?i:r.endsWith(`min`)?Math.min(a,i):r.endsWith(`max`)?Math.max(a,i):r===`vb`?i:a;return n/100*o}function Qi(e,t){if(typeof window>`u`)return null;let n=RegExp(`(?:^|[\\s:.[!])${t}-(screen|[dsl]v[hw])(?![\\w-])`).exec(e);if(n){let e=n[1];return e===`screen`?t.includes(`h`)?window.innerHeight:window.innerWidth:e.endsWith(`h`)?window.innerHeight:window.innerWidth}let r=RegExp(`(?:^|[\\s:.[!])${t}-\\[(-?[\\d.]+(?:[dsl]?v(?:h|w|min|max)|vi|vb))\\]`).exec(e);return r?Zi(r[1]):null}function $i(e,t,n,r){let i=t===`width`?n?.width:n?.height;return i&&i>0?Math.max(0,Math.floor(e/i)):Se(e,r)}function ea(e,t,n,r,i,a,o,s){let c=t.endsWith(`width`)?`width`:`height`,l=a.getPropertyValue(t).trim(),u=l.startsWith(`calc(`);if(!u&&!r.includes(`-[calc(`))return;let d=RegExp(`(?:^|[\\s:.[!])${i}-\\[(calc\\([^\\]]*\\))\\]`).exec(r),f=u?l:d?.[1]?.replaceAll(`_`,` `);if(!f)return;let p=ta(f,c,o,s);if(!p||p.unitless)return;let m=Math.max(0,xe(p.cells));if(u)return m;let h=(e?String(e.get(t)??``):n).trim(),g=parseFloat(h);return(Number.isFinite(g)?Math.abs(g-p.px)<=Math.abs(p.px)*.3:h===``)?m:void 0}function ta(e,t,n,r){let i=e.match(/--spacing\(\s*-?[\d.]+\s*\)|calc|[\d.]+[a-z%]*|[()+\-*/]/g);if(!i||i.join(``).replace(/\s+/g,``)!==e.replace(/\s+/g,``))return null;let a=0,o=()=>i[a],s=()=>i[a++],c=(e,t)=>({cells:e,px:t,unitless:!1}),l=e=>{let i=/^--spacing\(\s*(-?[\d.]+)\s*\)$/.exec(e);if(i){let e=parseFloat(i[1]);return c(e,e*r/4)}let a=/^([\d.]+)([a-z%]*)$/.exec(e);if(!a)return null;let o=parseFloat(a[1]),s=a[2];if(!Number.isFinite(o))return null;if(s===``)return{cells:o,px:o,unitless:!0};if(s===`px`)return c(o/(r/4),o);if(s===`rem`)return c(o*4,o*r);let l=Zi(e);return l===null?null:c($i(l,t,n,r),l)},u=(e,t,n)=>{if(e===`+`||e===`-`){if(t.unitless!==n.unitless)return null;let r=e===`+`?1:-1;return{cells:t.cells+r*n.cells,px:t.px+r*n.px,unitless:t.unitless}}if(e===`*`){if(!t.unitless&&!n.unitless)return null;let[e,r]=t.unitless?[t,n]:[n,t];return{cells:r.cells*e.cells,px:r.px*e.px,unitless:r.unitless&&e.unitless}}return!n.unitless||n.px===0?null:{cells:t.cells/n.cells,px:t.px/n.px,unitless:t.unitless}},d=()=>{let e=s();if(e===void 0)return null;if(e===`-`){let e=d();return e&&{cells:-e.cells,px:-e.px,unitless:e.unitless}}return e===`calc`?s()===`(`?f():null:e===`(`?f():l(e)},f=()=>{let e=m();return s()===`)`?e:null},p=()=>{let e=d();for(;e&&(o()===`*`||o()===`/`);){let t=s(),n=d();e=n?u(t,e,n):null}return e},m=()=>{let e=p();for(;e&&(o()===`+`||o()===`-`);){let t=s(),n=p();e=n?u(t,e,n):null}return e},h=m();return a===i.length?h:null}function na(e,t,n,r,i,a,o,s){let c=t.endsWith(`width`)?`width`:`height`,l=Zi(a.getPropertyValue(t))??Zi(e?.get(t)?.toString().trim()??``);if(l!==null)return $i(l,c,o,s);let u=Qi(r,i);if(u===null)return;let d=(e?String(e.get(t)??``):n).trim(),f=parseFloat(d),p=Number.isFinite(f)&&Math.abs(f-u)<=u*.3;if(p||d===``)return $i(p?f:u,c,o,s)}function ra(e,t){if(!e||e===`auto`||e===`content`)return;let n=ia(e);if(n)return n;if(e.endsWith(`%`)){let t=parseFloat(e);return Number.isFinite(t)?{kind:`percent`,value:t}:void 0}let r=parseFloat(e);return Number.isFinite(r)?{kind:`cells`,value:Se(r,t)}:void 0}function ia(e){if(e===`min-content`)return{kind:`min-content`};if(e===`max-content`)return{kind:`max-content`};if(e===`fit-content`)return{kind:`fit-content`}}function aa(e,t){let n=e.trim();if(!n||n===`none`)return{kind:`none`};if(n===`subgrid`||n.startsWith(`subgrid `))return{kind:`subgrid`};let r=[],i=[],a=[],o=e=>{i.push(a),a=[],r.push(e)},s;for(let e of pa(n)){let n=sa(e);if(n){a.push(...n);continue}let i=e.match(/^repeat\(\s*([^,]+?)\s*,(.*)\)$/s);if(i){let e=oa(i[2].trim(),t);if(e.tracks.length===0)continue;let n=i[1];if(n===`auto-fill`||n===`auto-fit`){s||(s={index:r.length,tracks:e.tracks,mode:n},e.lineNames.some(e=>e.length>0)&&(s.lineNames=e.lineNames),a.length>0&&(s.leadingNames=a),a=[]);continue}let c=Math.max(0,Math.floor(Number(n)||0));for(let t=0;t<c;t++){a.push(...e.lineNames[0]);for(let t=0;t<e.tracks.length;t++)o(e.tracks[t]),a.push(...e.lineNames[t+1])}continue}o(ua(e,t))}if(i.push(a),r.length===0&&!s)return{kind:`none`};let c={kind:`tracks`,tracks:r};return i.some(e=>e.length>0)&&(c.lineNames=i),s&&(c.autoRepeat=s),c}function oa(e,t){let n=[],r=[],i=[];for(let a of pa(e)){let e=sa(a);if(e){i.push(...e);continue}r.push(i),i=[],n.push(ua(a,t))}return r.push(i),{tracks:n,lineNames:r}}function sa(e){let t=e.match(/^\[(.*)\]$/s);return t?t[1].split(/\s+/).filter(e=>e!==``):null}function ca(e){let t=[];for(let n of e.matchAll(/"([^"]*)"|'([^']*)'/g)){let e=(n[1]??n[2]??``).trim().split(/\s+/).filter(e=>e!==``);if(e.length===0)return null;t.push(e)}if(t.length===0)return null;let n=t[0].length;if(t.some(e=>e.length!==n))return null;let r=new Map;t.forEach((e,t)=>{e.forEach((e,n)=>{if(/^\.+$/.test(e))return;let i=r.get(e);i?(i.colStart=Math.min(i.colStart,n),i.colEnd=Math.max(i.colEnd,n+1),i.rowStart=Math.min(i.rowStart,t),i.rowEnd=Math.max(i.rowEnd,t+1)):r.set(e,{colStart:n,colEnd:n+1,rowStart:t,rowEnd:t+1})})});for(let[e,n]of r)for(let r=n.rowStart;r<n.rowEnd;r++)for(let i=n.colStart;i<n.colEnd;i++)if(t[r][i]!==e)return null;return{columns:n,rows:t.length,areas:r}}function la(e,t){let n=pa(e.trim()).filter(e=>e!==``&&!e.startsWith(`[`)).map(e=>ua(e,t));return n.length>0?n:[rt()]}function ua(e,t){let n=e.match(/^minmax\((.*)\)$/s);if(n){let e=fa(n[1]).map(e=>e.trim());return e.length===2?{min:da(e[0],t),max:da(e[1],t)}:{min:{kind:`auto`},max:{kind:`auto`}}}let r=da(e,t);return r.kind===`fr`?{min:{kind:`auto`},max:r}:{min:r,max:r}}function da(e,t){if(e===`auto`||e.startsWith(`fit-content`))return{kind:`auto`};if(e===`min-content`)return{kind:`min-content`};if(e===`max-content`)return{kind:`max-content`};let n=e.match(/^(min|max)\((.*)\)$/s);if(n){let e=fa(n[2]).map(e=>da(e.trim(),t)),r=e.every(e=>e.kind===`cells`||e.kind===`percent`||e.kind===`math`);return e.length>0&&r?{kind:`math`,fn:n[1],args:e}:{kind:`auto`}}if(e.endsWith(`fr`)){let t=parseFloat(e);return Number.isFinite(t)&&t>=0?{kind:`fr`,value:t}:{kind:`auto`}}if(e.endsWith(`%`)){let t=parseFloat(e);return Number.isFinite(t)?{kind:`percent`,value:t}:{kind:`auto`}}let r=parseFloat(e);return Number.isFinite(r)?{kind:`cells`,value:e.endsWith(`rem`)?xe(r/.25):Se(r,t)}:{kind:`auto`}}function fa(e){let t=[],n=0,r=0;for(let i=0;i<e.length;i++){let a=e[i];a===`(`?n++:a===`)`?n--:a===`,`&&n===0&&(t.push(e.slice(r,i)),r=i+1)}return t.push(e.slice(r)),t.filter(e=>e.trim()!==``)}function pa(e){let t=[],n=0,r=-1;for(let i=0;i<e.length;i++){let a=e[i];a===`(`||a===`[`?n++:(a===`)`||a===`]`)&&n--,/\s/.test(a)&&n===0?(r!==-1&&t.push(e.slice(r,i)),r=-1):r===-1&&(r=i)}return r!==-1&&t.push(e.slice(r)),t}function ma(e){let t=e.trim();if(!t||t===`auto`)return{kind:`auto`};let n=!1,r,i;for(let e of t.split(/\s+/))e===`span`?n=!0:/^-?\d+$/.test(e)?r=Number(e):i=e;if(n){let e=r??1;return e<1?{kind:`auto`}:i===void 0?{kind:`span`,value:e}:{kind:`span`,value:e,name:i}}return i===void 0?r!==void 0&&r!==0?{kind:`line`,value:r}:{kind:`auto`}:r===0?{kind:`auto`}:r===void 0?{kind:`name`,name:i}:{kind:`name`,name:i,nth:r}}function ha(e){return{direction:e.includes(`column`)?`column`:`row`,dense:e.includes(`dense`)}}function ga(e,t){return(t===`w`?/(?:^|[\s:.[!])w-/:/(?:^|[\s:.[!])h-/).test(e)}function _a(e,t){return{top:qi(e.getPropertyValue(`padding-top`),t),right:qi(e.getPropertyValue(`padding-right`),t),bottom:qi(e.getPropertyValue(`padding-bottom`),t),left:qi(e.getPropertyValue(`padding-left`),t)}}function va(e){let t=(t,n)=>e.getPropertyValue(n)===`none`?0:xe(parseFloat(e.getPropertyValue(t))||0);return{top:t(`border-top-width`,`border-top-style`),right:t(`border-right-width`,`border-right-style`),bottom:t(`border-bottom-width`,`border-bottom-style`),left:t(`border-left-width`,`border-left-style`)}}function ya(e,t,n,r){let i=mi(e,t,n);if(i.display===`none`)return null;let a=s(e.tagName);if(a)return Ca(e,i,a);let o=Array.from(e.children),c=o.map(Oa),l={rootFontSizePx:t,cellMetrics:n,textareaWidths:r};if(!c.includes(`block`)||Ha(e.tagName))return Sa(e,i,o,c,l);let u=[];for(let e=0;e<o.length;e++){if(c[e]===`none`)continue;let i=ya(o[e],t,n,r);i&&u.push(i)}let d={source:e,style:i,children:u,text:``,intrinsicWidth:0,intrinsicHeight:0,localRect:{x:0,y:0,width:0,height:0},unclampedHeight:0,resolvedPadding:nt()};return Ua(e,d),d}function ba(e,t,n,r){let i=Array.from(e.childNodes).filter(e=>!(e instanceof Element&&e.hasAttribute(`data-mw-probe`))),a=i.filter(e=>e instanceof Element),o=a.map(Oa);return o.includes(`block`)||!Ba(e)&&!o.includes(`inline`)?null:Sa(e,xa(e,t),a,o,{rootFontSizePx:t,cellMetrics:n,textareaWidths:r},i)}function xa(e,t){let n=getComputedStyle(e),r={...tt(),...Ai(e,n,t)};return Ti(n).x===`clip`&&(r.overflow={...r.overflow,x:`clip`}),r}function Sa(e,t,n,r,i,a){let{rootFontSizePx:o,cellMetrics:s,textareaWidths:c}=i,l=e.tagName,u=Ha(l),d=ka(e,t.tracking,{rootFontSizePx:o,rootLetterSpacingPx:s?.letterSpacing??0,cellMetrics:s,textareaWidths:c,preserve:t.whiteSpace===`pre`,tabSize:t.tabSize},a),f=d.chars.join(``);if(d.boxes.length>0){let e=Dn();ke(d.chars,(t,n)=>{d.advances[t]=Math.max(1,Jn(d.boxes[n],e))})}let p=La(f,d.advances,t.tracking);if(u&&p===0){if(l===`INPUT`)p=Number(e.size)||20;else if(l===`TEXTAREA`)p=Number(e.cols)||20;else{let t=e,n=e=>e?.label||e?.textContent||``,r=getComputedStyle(e).getPropertyValue(`field-sizing`)===`content`?[n(t.selectedOptions[0])]:Array.from(t.options,n);p=Math.max(1,...r.map(e=>e.trim().length))}}let m=f.length>0?Ra(f):0,h;if(l===`TEXTAREA`){let n=e,r=n.value??``,i=c?.get(n),a=+!!r.endsWith(`
963
+ `),o=i!==void 0&&i>0?R(r,i)+a:r===``?0:r.split(/\r\n?|\n/).length,s=getComputedStyle(e).getPropertyValue(`field-sizing`)===`content`?1:Number(n.rows)||2,l=Math.max(s,o);h=l+Math.max(0,l-1)*t.lineGap}else h=u?Math.max(1,m):m;let g=new Map,_=[];for(let t of d.boxes)t.source.parentElement===e?g.set(t.source,t):_.push(t);let v=[];for(let e=0;e<n.length;e++){let t=n[e],i=g.get(t);if(i)v.push(i);else if(r[e]===`out-of-flow`){let e=ya(t,o,s,c);e&&v.push(e)}}_.length>0&&(v.push(..._),v.sort((e,t)=>e.source.compareDocumentPosition(t.source)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1));let y={source:e,style:t,children:v,text:f,intrinsicWidth:p,intrinsicHeight:h,localRect:{x:0,y:0,width:p,height:h},unclampedHeight:0,resolvedPadding:nt()};(d.advances.some(e=>e!==1)||d.boxes.length>0)&&(y.advances=d.advances),d.inlineElements.length>0&&(y.inlineElements=d.inlineElements,y.charInline=d.chars.map((e,t)=>d.inlineIndex[t]??-1));let b=Ia(d);return b.length>0&&(y.charSource=b),y}function Ca(e,t,n){let r=u(n,e),i=r?.lines??[],a=i.join(`
964
+ `);t.whiteSpace=`pre`,(t.width===void 0||t.width.kind===`auto`)&&(t.width={kind:`max-content`});let o=Array.from({length:a.length},()=>1+t.tracking),s=La(a,o,t.tracking),c=i.length,l={source:e,style:t,children:[],text:a,intrinsicWidth:s,intrinsicHeight:c,localRect:{x:0,y:0,width:s,height:c},unclampedHeight:0,resolvedPadding:nt()};t.tracking>0&&(l.advances=o);let d=r?.runs??[];if(d.length>0&&a.length>0){let t=[0];for(let e of i)t.push(t[t.length-1]+e.length+1);let n=Array.from({length:a.length},()=>-1);l.inlineElements=d.map(t=>({element:e,tracking:0,padLeft:0,padRight:0,insets:null,color:t.paint.color,backgroundColor:t.paint.backgroundColor,fontWeight:t.paint.fontWeight??``,fontStyle:t.paint.fontStyle??``,textDecorationLine:t.paint.textDecorationLine??``})),d.forEach((e,r)=>{let a=i[e.line];if(a===void 0)return;let o=Math.max(0,e.start),s=Math.min(a.length,e.end);for(let i=o;i<s;i++)n[t[e.line]+i]=r}),l.charInline=n}return l}var wa=new Set(`A.ABBR.B.BDI.BDO.BR.CITE.CODE.DATA.DFN.EM.I.KBD.MARK.Q.S.SAMP.SMALL.SPAN.STRONG.SUB.SUP.TIME.U.VAR.WBR`.split(`.`));function Ta(e,t){return t||(wa.has(e.tagName)?`inline`:`block`)}function Ea(e,t){let n=Ta(e,t);return n===`inline`||n===`contents`}function Da(e,t){let n=Ta(e,t);return n.startsWith(`inline`)&&n!==`inline`}function Oa(e){let t=getComputedStyle(e);return t.display===`none`?`none`:t.position===`absolute`||t.position===`fixed`?`out-of-flow`:s(e.tagName)?`block`:Ea(e,t.display)||Da(e,t.display)?`inline`:`block`}function ka(e,t,n,r){let i={chars:[],advances:[],sourceNode:[],sourceOffset:[],inlineIndex:[],inlineElements:[],boxes:[]};return r?ja(r,t,n,i):Aa(e,t,n,i),n.preserve?i:Pa(i)}function Aa(e,t,n,r){Ha(e.tagName)||ja(Array.from(e.childNodes),t,n,r)}function ja(e,t,n,r){let i=()=>{let e=0;for(let t=r.chars.length-1;t>=0&&r.chars[t]!==`
965
+ `;t--)e+=r.advances[t];return e};for(let a of e)if(a.nodeType===Node.TEXT_NODE){if(n.preserve){let e=a.textContent??``,o=0;for(let s of e){let c=o;if(o+=s.length,s===`\r`){if(e[o]===`
966
+ `)continue;Fa(r,`
967
967
  `,0,a,c)}else if(s===`
968
- `)ha(r,`
969
- `,0,a,c);else if(s===` `){let e=(Math.floor(i()/n.tabSize)+1)*n.tabSize;for(let t=i();t<e;t++)ha(r,` `,1,a,c)}else ha(r,s,1+t,a,c)}}else{let e=0,n=!1;for(let i of a.textContent??``){let o=i===` `||i===` `||i===`\r`||i===`
970
- `||i===`\f`;o?n||ha(r,` `,1+t,a,e):ha(r,i,1+t,a,e),n=o,e+=i.length}}}else if(a.nodeType===Node.ELEMENT_NODE){let e=a;if(e.tagName===`BR`){ha(r,`
971
- `,0,null,-1);continue}let t=getComputedStyle(e);if(t.display===`none`||t.position===`absolute`||t.position===`fixed`)continue;if(ca(e,t.display)){let t=ra(e,n.rootFontSizePx,n.cellMetrics,n.textareaWidths);t&&(t.inlineBox=!0,ha(r,``,1,null,-1),r.boxes.push(t));continue}if(!sa(e,t.display)){ya(e);continue}let i=Ti(t.letterSpacing,parseFloat(t.fontSize)||n.rootFontSizePx,n.rootLetterSpacingPx),o=fa(t.paddingLeft,n.rootFontSizePx),s=fa(t.paddingRight,n.rootFontSizePx);r.inlineElements.push({element:e,tracking:i,padLeft:o,padRight:s,insets:t.position===`static`?null:pa(t,n.rootFontSizePx),color:t.color,backgroundColor:ti(t.backgroundColor)?void 0:t.backgroundColor,fontWeight:t.fontWeight,fontStyle:t.fontStyle,textDecorationLine:t.textDecorationLine});let c=r.inlineElements.length-1;for(let e=0;e<o;e++)r.inlineIndex[r.chars.length]=c,ha(r,`⁠`,1,null,-1);let l=r.chars.length;da(e,i,n,r);for(let e=l;e<r.chars.length;e++)r.inlineIndex[e]===void 0&&(r.inlineIndex[e]=c);for(let e=0;e<s;e++)r.inlineIndex[r.chars.length]=c,ha(r,`⁠`,1,null,-1)}}}function fa(e,t){if(!e||e.endsWith(`%`))return 0;let n=parseFloat(e);return Number.isFinite(n)?Math.max(0,Se(n,t)):0}function pa(e,t){let n=e=>{if(!e||e===`auto`||e.endsWith(`%`))return null;let n=parseFloat(e);return Number.isFinite(n)?Se(n,t):null};return{top:n(e.top),right:n(e.right),bottom:n(e.bottom),left:n(e.left)}}function ma(e){let t=[],n=[],r=[],i=[],a=[],o=()=>{let e=t.length;for(;e>0&&t[e-1]!==`
968
+ `)Fa(r,`
969
+ `,0,a,c);else if(s===` `){let e=(Math.floor(i()/n.tabSize)+1)*n.tabSize;for(let t=i();t<e;t++)Fa(r,` `,1,a,c)}else Fa(r,s,1+t,a,c)}}else{let e=0,n=!1;for(let i of a.textContent??``){let o=i===` `||i===` `||i===`\r`||i===`
970
+ `||i===`\f`;o?n||Fa(r,` `,1+t,a,e):Fa(r,i,1+t,a,e),n=o,e+=i.length}}}else if(a.nodeType===Node.ELEMENT_NODE){let e=a;if(e.tagName===`BR`){Fa(r,`
971
+ `,0,null,-1);continue}let t=getComputedStyle(e);if(t.display===`none`||t.position===`absolute`||t.position===`fixed`)continue;if(Da(e,t.display)){let t=ya(e,n.rootFontSizePx,n.cellMetrics,n.textareaWidths);t&&(t.inlineBox=!0,Fa(r,``,1,null,-1),r.boxes.push(t));continue}if(!Ea(e,t.display)){za(e);continue}let i=Vi(t.letterSpacing,parseFloat(t.fontSize)||n.rootFontSizePx,n.rootLetterSpacingPx),o=Ma(t.paddingLeft,n.rootFontSizePx),s=Ma(t.paddingRight,n.rootFontSizePx);r.inlineElements.push({element:e,tracking:i,padLeft:o,padRight:s,insets:t.position===`static`?null:Na(t,n.rootFontSizePx),color:t.color,backgroundColor:gi(t.backgroundColor)?void 0:t.backgroundColor,fontWeight:t.fontWeight,fontStyle:t.fontStyle,textDecorationLine:t.textDecorationLine});let c=r.inlineElements.length-1;for(let e=0;e<o;e++)r.inlineIndex[r.chars.length]=c,Fa(r,`⁠`,1,null,-1);let l=r.chars.length;Aa(e,i,n,r);for(let e=l;e<r.chars.length;e++)r.inlineIndex[e]===void 0&&(r.inlineIndex[e]=c);for(let e=0;e<s;e++)r.inlineIndex[r.chars.length]=c,Fa(r,`⁠`,1,null,-1)}}function Ma(e,t){if(!e||e.endsWith(`%`))return 0;let n=parseFloat(e);return Number.isFinite(n)?Math.max(0,Se(n,t)):0}function Na(e,t){let n=e=>{if(!e||e===`auto`||e.endsWith(`%`))return null;let n=parseFloat(e);return Number.isFinite(n)?Se(n,t):null};return{top:n(e.top),right:n(e.right),bottom:n(e.bottom),left:n(e.left)}}function Pa(e){let t=[],n=[],r=[],i=[],a=[],o=()=>{let e=t.length;for(;e>0&&t[e-1]!==`
972
972
  `;)e--;return e},s=()=>{for(;t.length>o()&&t[t.length-1]===` `;)t.pop(),n.pop(),r.pop(),i.pop(),a.pop()};for(let o=0;o<e.chars.length;o++){let c=e.chars[o];if(c===` `){let e=t.length-1;for(;e>=0&&t[e]===`⁠`;)e--;if(e<0||t[e]===`
973
973
  `||t[e]===` `)continue}else c===`
974
- `&&s();t.push(c),n.push(e.advances[o]),r.push(e.sourceNode[o]??null),i.push(e.sourceOffset[o]??-1),a.push(e.inlineIndex[o]??-1)}return s(),{chars:t,advances:n,sourceNode:r,sourceOffset:i,inlineIndex:a,inlineElements:e.inlineElements,boxes:e.boxes}}function ha(e,t,n,r,i){e.chars.push(t),e.advances.push(n),e.sourceNode.push(r),e.sourceOffset.push(i)}function ga(e){let t=[],n=0;for(let r=0;r<e.chars.length;r++){let i=e.chars[r],a=e.sourceNode[r],o=e.sourceOffset[r],s=t[t.length-1];a&&(s&&s.node===a&&s.offset+s.length===o?s.length+=i.length:t.push({index:n,length:i.length,node:a,offset:o})),n+=i.length}return t}function _a(e,t,n){let r=0,i=0;for(let a=0;a<=e.length;a++)(a===e.length||e[a]===`
975
- `)&&(r=Math.max(r,Ee(i,a,t,n)),i=a+1);return r}function va(e){return we(e).length}function ya(e){t(e,`A block-level element nested inside a text run can't be laid out and was skipped. Give it its own place in the layout instead.`)}function ba(e){return Array.from(e.childNodes).some(e=>e.nodeType===Node.TEXT_NODE&&/[^ \t\r\n\f]/.test(e.textContent??``))}var xa=`Direct text next to block-level children can't be laid out and was hidden. Wrap each text segment in its own element (e.g. a <div>).`;function Sa(e){return e===`INPUT`||e===`SELECT`||e===`TEXTAREA`}function Ca(e,n){ba(e)&&(n.droppedText=!0,t(e,xa))}var wa=`
974
+ `&&s();t.push(c),n.push(e.advances[o]),r.push(e.sourceNode[o]??null),i.push(e.sourceOffset[o]??-1),a.push(e.inlineIndex[o]??-1)}return s(),{chars:t,advances:n,sourceNode:r,sourceOffset:i,inlineIndex:a,inlineElements:e.inlineElements,boxes:e.boxes}}function Fa(e,t,n,r,i){e.chars.push(t),e.advances.push(n),e.sourceNode.push(r),e.sourceOffset.push(i)}function Ia(e){let t=[],n=0;for(let r=0;r<e.chars.length;r++){let i=e.chars[r],a=e.sourceNode[r],o=e.sourceOffset[r],s=t[t.length-1];a&&(s&&s.node===a&&s.offset+s.length===o?s.length+=i.length:t.push({index:n,length:i.length,node:a,offset:o})),n+=i.length}return t}function La(e,t,n){let r=0,i=0;for(let a=0;a<=e.length;a++)(a===e.length||e[a]===`
975
+ `)&&(r=Math.max(r,Ee(i,a,t,n)),i=a+1);return r}function Ra(e){return we(e).length}function za(e){t(e,`A block-level element nested inside a text run can't be laid out and was skipped. Give it its own place in the layout instead.`)}function Ba(e){return Array.from(e.childNodes).some(e=>e.nodeType===Node.TEXT_NODE&&/[^ \t\r\n\f]/.test(e.textContent??``))}var Va=`Direct text next to block-level children can't be laid out and was hidden. Wrap each text segment in its own element (e.g. a <div>).`;function Ha(e){return e===`INPUT`||e===`SELECT`||e===`TEXTAREA`}function Ua(e,n){Ba(e)&&(n.droppedText=!0,t(e,Va))}var Wa=`
976
976
  <style>
977
977
  :host { display: block; position: relative; contain: layout style; }
978
978
  #viewport { position: relative; width: 100%; height: 100%; background: inherit; }
979
- /* When the host hides its own dropped direct text (visibility, see
980
- * styles.css), the render layer must not sink with it. Scoped to that
981
- * state so an authored 'invisible' on the host stays intact. */
982
- :host([data-mw-dropped-text]) #viewport { visibility: visible; }
979
+ /* The slot as a positioned box: the light DOM paints ABOVE the grid
980
+ * (the elements are absolute; the host's own in-flow text, specs/host-leaf.md,
981
+ * would otherwise sit under the <pre> and lose its selection ink) and
982
+ * laid-out elements position against it — the same origin as #viewport. */
983
+ slot { display: block; position: relative; }
984
+ /* The host's own dropped direct text (specs/cell-model.md deviation 7)
985
+ * hides through the slot; laid-out children re-declare visible in
986
+ * styles.css. */
987
+ :host([data-mw-dropped-text]) slot { visibility: hidden; }
983
988
  /* The unified grid: one <pre> with same-paint-run spans, cell-precise
984
989
  * (one monospace character = one cell). In select="grid" (the
985
990
  * default, reflected onto the attribute — see DEFAULT_SELECT) the
@@ -994,7 +999,10 @@ input:where([type='button'], [type='reset'], [type='submit']),
994
999
  * document's overflow — inherited through #viewport, the shadow
995
1000
  * parent. (A translucent host background paints repeatedly inside
996
1001
  * the box.) */
997
- #grid { position: absolute; top: 0; left: 0; margin: 0; background: inherit; font: inherit; line-height: inherit; letter-spacing: inherit; white-space: pre; pointer-events: none; user-select: none; -webkit-user-select: none; }
1002
+ /* The text-fill reset: the host's own invisibility lock (specs/host-leaf.md)
1003
+ * inherits across the shadow boundary; currentColor stays a keyword
1004
+ * at computed time, so every run keeps its own color. */
1005
+ #grid { position: absolute; top: 0; left: 0; margin: 0; background: inherit; font: inherit; line-height: inherit; letter-spacing: inherit; white-space: pre; pointer-events: none; user-select: none; -webkit-user-select: none; -webkit-text-fill-color: currentColor; }
998
1006
  :host([select="grid"]) #grid { pointer-events: auto; user-select: text; -webkit-user-select: text; }
999
1007
  :host([select="grid"]) slot { pointer-events: none; user-select: none; -webkit-user-select: none; }
1000
1008
  /* A live semantic selection (specs/semantic-selection.md) lifts the
@@ -1008,8 +1016,8 @@ input:where([type='button'], [type='reset'], [type='submit']),
1008
1016
  <pre id="grid" aria-hidden="true"></pre>
1009
1017
  <slot></slot>
1010
1018
  </div>
1011
- `,Ta=`grid`,Ea=`data-mw-semantic-selection`,Da=`a, button, input, select, textarea, label, [tabindex], [role='button']`,Oa=[`pointerover`,`pointerleave`,`pointerdown`,`pointerup`,`pointercancel`,`keydown`,`keyup`,`focusin`,`focusout`,`input`,`change`],ka=/^(color|opacity|border-(top|right|bottom|left)-color|border-color)$/,Aa=3e4,ja=200,Ma=3,Na=4,Pa=8,Fa=100,Ia=160,La=typeof HTMLElement>`u`?class{}:HTMLElement,Ra=class e extends La{static observedAttributes=[`select`];static#e=new Set;static#t=null;static#n=()=>{for(let t of e.#e)t.#Me()};static#r(t){t instanceof HTMLLinkElement&&t.rel===`stylesheet`&&!t.sheet&&t.addEventListener(`load`,e.#n,{once:!0})}static#i(t){if(e.#e.add(t),e.#t)return;for(let t of document.querySelectorAll(`link[rel=stylesheet]`))e.#r(t);let n=new MutationObserver(t=>{for(let n of t)for(let t of n.addedNodes)e.#r(t);e.#n()});n.observe(document.head,{childList:!0,subtree:!0,characterData:!0}),e.#t=n}static#a(t){e.#e.delete(t),e.#e.size===0&&(e.#t?.disconnect(),e.#t=null)}#o;#s;#c;#l=null;#u=null;#d=!1;#f=null;#p=null;#m=null;#h=null;#g=!1;#_=[];#v=new Map;#y=new WeakMap;#b=null;#x=null;#S=``;#C=null;#w=null;#T=!1;#E=[];#D(){this.#u?.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`class`,`style`,`colspan`,`rowspan`,`span`,...c()]})}constructor(){super(),this.#o=this.attachShadow({mode:`open`}),this.#o.innerHTML=wa,this.#s=this.#o.getElementById(`grid`),this.#c=document.createElement(`span`),this.#c.setAttribute(`aria-hidden`,`true`),this.#c.setAttribute(`data-mw-probe`,``),this.#c.style.cssText=`position:absolute!important;top:0!important;left:0!important;visibility:hidden!important;pointer-events:none!important;user-select:none!important;white-space:pre!important;overflow-wrap:normal!important;padding:0!important;margin:0!important;border:0!important;`,this.#c.textContent=`M`.repeat(100)}connectedCallback(){this.hasAttribute(`select`)||this.setAttribute(`select`,Ta),this.#c.parentNode!==this&&this.appendChild(this.#c),this.#l=new ResizeObserver(()=>this.#Me()),this.#l.observe(this),this.#Y(),this.#l.observe(this.#c),window.addEventListener(`resize`,this.#Oe),this.#u=new MutationObserver(()=>this.#Me()),this.#D(),this.#m=l(()=>{this.#D(),this.#Me()}),this.#h=re(()=>this.#Me()),document.fonts?.ready.then(this.#ke).catch(e=>{console.warn(`[monowind] document.fonts.ready failed:`,e)}),document.fonts?.addEventListener(`loadingdone`,this.#ke);for(let e of Oa)this.addEventListener(e,this.#De);this.addEventListener(`transitionrun`,this.#we),this.addEventListener(`transitionend`,this.#Te),this.addEventListener(`transitioncancel`,this.#Te),this.addEventListener(`pointermove`,this.#Q),this.addEventListener(`pointerleave`,this.#he),this.addEventListener(`pointerdown`,this.#ge),this.addEventListener(`scroll`,this.#W,{capture:!0,passive:!0}),this.addEventListener(`scrollend`,this.#G,{capture:!0}),this.addEventListener(`wheel`,this.#q,{passive:!1}),this.addEventListener(`copy`,this.#$),this.addEventListener(`mousedown`,this.#ee),document.addEventListener(`selectionchange`,this.#me),window.addEventListener(`pointerup`,this.#_e),window.addEventListener(`pointercancel`,this.#_e),document.addEventListener(`scroll`,this.#ve,{capture:!0,passive:!0}),e.#i(this),this.#Me()}disconnectedCallback(){window.removeEventListener(`resize`,this.#Oe),this.#l?.disconnect(),this.#u?.disconnect(),this.#l=null,this.#u=null,this.#m?.(),this.#m=null,this.#h?.(),this.#h=null,document.fonts?.removeEventListener(`loadingdone`,this.#ke);for(let e of Oa)this.removeEventListener(e,this.#De);this.removeEventListener(`transitionrun`,this.#we),this.removeEventListener(`transitionend`,this.#Te),this.removeEventListener(`transitioncancel`,this.#Te),this.#xe=0,this.removeEventListener(`pointermove`,this.#Q),this.removeEventListener(`pointerleave`,this.#he),this.removeEventListener(`pointerdown`,this.#ge),this.removeEventListener(`scroll`,this.#W,{capture:!0}),this.removeEventListener(`scrollend`,this.#G,{capture:!0}),this.removeEventListener(`wheel`,this.#q),this.removeEventListener(`copy`,this.#$),this.removeEventListener(`mousedown`,this.#ee),document.removeEventListener(`selectionchange`,this.#me);for(let e of this.#v.values())clearTimeout(e);this.#v.clear(),this.#x=null,this.#b=null,window.removeEventListener(`pointerup`,this.#_e),window.removeEventListener(`pointercancel`,this.#_e),document.removeEventListener(`scroll`,this.#ve,{capture:!0}),this.#N=null,this.#A=null,this.#j=!1,this.#M=!1,this.#ye(),e.#a(this)}#O=new Set;#k=new Set;#A=null;#j=!1;#M=!1;#N=null;#P=NaN;#F=NaN;#I=null;static#L=typeof matchMedia>`u`?null:matchMedia(`(hover: hover)`);#R(){if(this.#g||this.#d)return;this.#g=!0;let e=!1,t=()=>{if(e)return;e=!0,this.#g=!1;let t=this.#f;this.isConnected&&this.#p&&t&&(this.#z(t),this.#M=!Rr(this.#p,this.#s,this.#ne()),this.#ye())};requestAnimationFrame(t),setTimeout(t,50)}#z(e,t){for(let n of this.#_){let r=n.source,{maxX:i,maxY:a}=n.scrollRange,o=t?.get(r);n.scroll=o?{x:o.pinX?i:Math.min(o.x,i),y:o.pinY?a:Math.min(o.y,a)}:this.#B(n,e)}}#B(e,t){let n=e.source,{maxX:r,maxY:i}=e.scrollRange,a=e.scroll??{x:0,y:0};return{x:Ba(n,`x`,t.width,r,a.x),y:Ba(n,`y`,t.height,i,a.y)}}#V(){let e=new Map,t=this.#f;if(!t)return e;for(let n of this.#_){let r=n.source,{maxX:i,maxY:a}=n.scrollRange,{x:o,y:s}=this.#B(n,t);e.set(r,{top:r.scrollTop,left:r.scrollLeft,x:o,y:s,pinX:i>0&&o>=i,pinY:a>0&&s>=a})}return e}#H(e){for(let t of this.#_){let n=t.source,r=e.get(n);r&&(n.scrollTop,n.scrollLeft,n.scrollTop=r.pinY?n.scrollHeight:r.top,n.scrollLeft=r.pinX?n.scrollWidth:r.left)}}#U(e,t){clearTimeout(this.#v.get(e)),this.#v.set(e,setTimeout(()=>this.#K(e),t))}#W=e=>{let t=e.target;t instanceof HTMLElement&&t!==this&&t.hasAttribute(`data-mw-scroll`)&&(this.#R(),!(Date.now()-(this.#y.get(t)??0)<ja)&&(clearTimeout(this.#v.get(t)),`onscrollend`in window||this.#U(t,Ia)))};#G=e=>{let t=e.target;t instanceof HTMLElement&&t!==this&&t.hasAttribute(`data-mw-scroll`)&&(Date.now()-(this.#y.get(t)??0)<ja||this.#U(t,Fa))};#K(e){if(this.#x?.el===e)return;this.#R();let t=this.#f,n=this.#_.find(t=>t.source===e);if(!t||!n)return;let r=n.scrollRange,i=n.scroll??this.#B(n,t),a=i.y===r.maxY?e.scrollHeight-e.clientHeight:i.y*t.height,o=i.x===r.maxX?e.scrollWidth-e.clientWidth:i.x*t.width;(Math.abs(e.scrollTop-a)>.5||Math.abs(e.scrollLeft-o)>.5)&&e.scrollTo({top:a,left:o,behavior:`instant`})}#q=e=>{if(this.getAttribute(`select`)!==`grid`)return;let t=this.#p,n=this.#f;if(!t||!n||this.#_.length===0)return;let r=e,i=r.deltaMode===1?n.height:r.deltaMode===2?this.clientHeight:1,a=r.deltaX*i,o=r.deltaY*i;if(!r.cancelable&&this.#J(a,o))return;let{col:s,row:c}=this.#X(r.clientX,r.clientY,n),l=Date.now(),u=Math.abs(a)+Math.abs(o);if(u===0){this.#b=null,r.preventDefault();return}let d=e=>{let t=e.scrollRange,n=e.source;return o!==0&&t.maxY>0&&(o>0&&n.scrollTop<n.scrollHeight-n.clientHeight-.5||o<0&&n.scrollTop>.5)||a!==0&&t.maxX>0&&(a>0&&n.scrollLeft<n.scrollWidth-n.clientWidth-.5||a<0&&n.scrollLeft>.5)},f=this.#b,p=Math.abs(a)>=Math.abs(o)?`x`:`y`,m=f!==null&&u>f.mag*1.25+1,h=f!==null&&(Math.abs(r.clientX-f.x)>Ma||Math.abs(r.clientY-f.y)>Ma),g=f!==null&&f.decayed>=Pa,_=f!==null&&l-f.at<ja&&p===f.axis&&(h?u<=f.mag:!(g&&m)),v=null;if(_){if(f.decayed=u<=f.mag&&u>=f.mag*.5?f.decayed+1:g?f.decayed:0,f.mag=u,f.at=l,!f.el)return;v=this.#_.find(e=>e.source===f.el)??null}if(!v){let e=hr(t,s,c);for(let t=e.length-1;t>=0;t--){let n=e[t].node;if(!n.scrollRange)continue;if(d(n)){v=n;break}let r=n.style.overscroll;if(o!==0&&!r.y||a!==0&&!r.x){v=n;break}}if(!v&&u<Na){r.preventDefault();return}this.#b={el:v?v.source:null,x:r.clientX,y:r.clientY,axis:p,at:l,mag:u,decayed:0}}if(!v||(r.preventDefault(),!d(v)))return;let y=v.source,b=v.scrollRange,x={behavior:`instant`};o!==0&&b.maxY>0&&(x.top=o),a!==0&&b.maxX>0&&(x.left=a),y.scrollBy(x),this.#y.set(y,l),this.#U(y,ja)};#J(e,t){return this.#E.some(n=>t>0&&n.scrollTop<n.scrollHeight-n.clientHeight-.5||t<0&&n.scrollTop>.5||e>0&&n.scrollLeft<n.scrollWidth-n.clientWidth-.5||e<0&&n.scrollLeft>.5)}#Y(){let e=this.parentElement;if(e&&this.#l){this.#l.observe(e);for(let t of e.children)t!==this&&this.#l.observe(t)}}#X(e,t,n){if(!this.#I){let e=this.#s.getBoundingClientRect();this.#I={left:e.left,top:e.top}}return{col:Math.floor((e-this.#I.left)/n.width),row:Math.floor((t-this.#I.top)/n.height)}}#Z(e,t){let n=this.#p,r=this.#f;if(!n||!r||this.#_.length===0)return null;let{col:i,row:a}=this.#X(e,t,r),o=hr(n,i,a);for(let n=o.length-1;n>=0;n--){let{node:s,x:c,y:l}=o[n],u=s.scrollRange;if(!u)continue;let d=s.source,{y:f,x:p}=fr(s,c,l);if(f&&u.maxY>0&&i>=f.col&&i<f.col+f.thick&&a>=f.row&&a<f.row+f.len){let e=pr(f.len,u.sizeY,u.maxY,0).len,n=Math.max(1,(f.len-e)*r.height);return{el:d,axis:`y`,startClient:t,startPx:d.scrollTop,factor:u.maxY*r.height/n}}if(p&&u.maxX>0&&a>=p.row&&a<p.row+p.thick&&i>=p.col&&i<p.col+p.len){let t=pr(p.len,u.sizeX,u.maxX,0).len,n=Math.max(1,(p.len-t)*r.width);return{el:d,axis:`x`,startClient:e,startPx:d.scrollLeft,factor:u.maxX*r.width/n}}}return null}#Q=e=>{if(Ha(e))return;let{clientX:t,clientY:n}=e,r=this.#x;if(r){let e=(r.axis===`y`?n:t)-r.startClient,i=r.startPx+e*r.factor;r.axis===`y`?r.el.scrollTop=i:r.el.scrollLeft=i;return}let i=!!(e.buttons&1);i&&this.#C&&this.#ce(this.#C,t,n),i&&this.#w&&this.#se(this.#w,t,n),i&&this.#T&&!this.hasAttribute(`data-mw-dragging`)&&this.setAttribute(`data-mw-dragging`,``),this.#N={x:t,y:n};let a=this.#f;if(a){let{col:e,row:r}=this.#X(t,n,a);if(e===this.#P&&r===this.#F)return}this.#ye()};#$=e=>{let{clipboardData:t}=e,n=this.#p,r=this.#pe();t&&n&&r&&(t.setData(`text/plain`,Sr(n,r)),e.preventDefault())};#ee=e=>{let t=e;if(t.button!==0||this.getAttribute(`select`)!==`grid`)return;let n=t.composedPath().includes(this.#s);if(!n&&!this.#re(t.target))return;let r=this.#S===`mouse`||this.#S===`pen`;if(t.detail<=1){if(t.detail!==1)return;this.removeAttribute(Ea);let e=this.#te();r&&(!n||e)&&(e?.blur(),this.#oe(t));return}if(!r)return;let i=t.detail===2?`word`:`paragraph`,a=document.getSelection(),o=this.#p,s=this.#f;if(!a||!o||!s)return;let{col:c,row:l}=this.#X(t.clientX,t.clientY,s),u=this.#ue(c,l,i);if(!u){this.removeAttribute(Ea),this.#C=null;return}t.preventDefault(),this.#te()?.blur(),this.#fe(u);let d=t.shiftKey&&a.anchorNode&&this.#pe()?Wa({node:a.anchorNode,offset:a.anchorOffset}):u;this.#le(a,d,u),this.#C={unit:i,anchor:d}};#te(){let e=document.activeElement;return e instanceof HTMLElement&&e!==document.body&&this.contains(e)?e:null}#ne(){return this.#j&&!this.#w}#re(e){return e instanceof Element&&e!==this&&this.contains(e)&&!e.matches(Da)}#ie(e,t){let n=this.#s.textContent.split(`
1012
- `),r=Math.max(0,Math.min(t,n.length-1)),i=0;for(let e=0;e<r;e++)i+=n[e].length+1;return i+Math.max(0,Math.min(e,n[r]?.length??0))}#ae(e,t){let n=this.#f;if(!n)return null;let{col:r,row:i}=this.#X(e,t,n),a=this.#ie(r,i),o=Ur(this.#s,a);return o&&{offset:a,at:o}}#oe(e){let t=this.#ae(e.clientX,e.clientY);t&&(e.preventDefault(),document.getSelection()?.setBaseAndExtent(...t.at,...t.at),this.#w={anchor:t.offset})}#se(e,t,n){let r=Ur(this.#s,e.anchor),i=this.#ae(t,n);r&&i&&document.getSelection()?.setBaseAndExtent(...r,...i.at)}#ce(e,t,n){let r=this.#f,i=document.getSelection();if(!r||!i)return;let{col:a,row:o}=this.#X(t,n,r),s=this.#ue(a,o,e.unit);s&&this.#le(i,e.anchor,s)}#le(e,t,n){if(Ka(t,n)){Ga(e,n.start,n.end);return}let r=this.#de(t),i=this.#de(n);_r(r.start.node,r.start.offset,i.start.node,i.start.offset)<=0?Ga(e,r.start,i.end):Ga(e,r.end,i.start)}#ue(e,t,n){let r=this.#p;if(!r)return null;let i=hr(r,e,t);for(let r=i.length-1;r>=0;r--){let{node:a,x:o,y:c}=i[r];if(!Or(a))continue;let l=dr(a,o,c,e,t);if(l===null)return null;let u=s(a.source.tagName)?.selectionTarget?.(a.source);if(n===`word`&&!u){let e=jr(a,l),t=e&&yr(a,e.start),n=e&&yr(a,e.end);if(t&&n)return{start:t,end:n}}let d=u??a.source;return{start:{node:d,offset:0},end:{node:d,offset:d.childNodes.length}}}return null}#de(e){let t=e.start.node.getRootNode();if(!(t instanceof ShadowRoot)||t===this.#s.getRootNode())return e;let n=t.host,r=n.parentNode;if(!r)return e;let i=Array.prototype.indexOf.call(r.childNodes,n),a=n.previousSibling,o=n.nextSibling;return{start:Ua(a)?{node:a,offset:a instanceof Text?a.length:a.childNodes.length}:{node:r,offset:i},end:Ua(o)?{node:o,offset:0}:{node:r,offset:i+1}}}#fe(e){this.setAttribute(Ea,``);let t=e.start.node,n=t instanceof Element?t:t.parentElement;n&&getComputedStyle(n).userSelect}#pe(){let e=br(this.#s.getRootNode());return!e||xr(this,this.#s,e)!==`light`||e.startContainer===e.endContainer&&e.startOffset===e.endOffset?null:e}#me=()=>{this.hasAttribute(Ea)&&(this.#pe()||this.removeAttribute(Ea))};#he=()=>{this.#N=null,this.#ye()};#ge=e=>{let t=e;if(!t.isPrimary||t.button!==0||(this.#S=t.pointerType,Ha(t)))return;let n=this.#Z(t.clientX,t.clientY);if(n){this.#x=n,t.preventDefault(),t.isTrusted&&this.setPointerCapture(t.pointerId);return}this.#N={x:t.clientX,y:t.clientY},this.#j=!0,this.#T=t.composedPath().includes(this.#s),this.#ye(!0)};#_e=e=>{if(e.isPrimary){if(this.#C=null,this.#w=null,this.#T=!1,this.removeAttribute(`data-mw-dragging`),this.#x){this.#K(this.#x.el),this.#x=null;return}(this.#j||this.#A)&&(this.#j=!1,this.#A=null,this.#ye(),this.#M&&this.#Me())}};#ve=e=>{if(!this.#N)return;let t=e.target;t instanceof HTMLElement&&t.hasAttribute(`data-mw-scroll`)||(this.#I=null,this.#ye())};#ye(t=!1){let n=this.#p,r=this.#f,i=[];if(this.#N&&n&&r&&this.isConnected&&this.getAttribute(`select`)===`grid`&&(this.#j||e.#L?.matches)){let{col:e,row:t}=this.#X(this.#N.x,this.#N.y,r);this.#P=e,this.#F=t,i=gr(n,e,t)}else this.#P=NaN,this.#F=NaN;let a=i.at(-1)??null;t&&(this.#A=a);let o=e.#L?.matches?i:[],s=this.#A?i.indexOf(this.#A):-1,c=s>=0?i.slice(0,s+1):[],l=this.#be(`data-mw-hover`,this.#O,o);l=this.#be(`data-mw-active`,this.#k,c)||l;let u=a?getComputedStyle(a).cursor:``;this.#s.style.cursor=u===`auto`?``:u,l&&this.isConnected&&this.#Me()}#be(e,t,n){let r=!1,i=new Set(n);for(let n of t)i.has(n)||(n.removeAttribute(e),r=!0);for(let n of i)t.has(n)||(n.setAttribute(e,``),r=!0);t.clear();for(let e of i)t.add(e);return r}#xe=0;#Se=!1;#Ce=0;#we=e=>{ka.test(e.propertyName)&&(this.#xe++,this.#Ce=performance.now(),this.#Ee())};#Te=e=>{ka.test(e.propertyName)&&(this.#xe=Math.max(0,this.#xe-1))};#Ee(){if(this.#Se)return;this.#Se=!0;let e=()=>{if(!this.isConnected||this.#xe===0&&!_()||performance.now()-this.#Ce>Aa){this.#Se=!1,this.#xe=0,this.#Me();return}this.#je(),requestAnimationFrame(e)};requestAnimationFrame(e)}#De=e=>{if(!Ha(e)){if((e.type===`focusin`||e.type===`focusout`)&&e.target instanceof HTMLSelectElement){this.#je();return}this.#Me()}};attributeChangedCallback(e,t,r){if(e===`select`&&r!==`text`&&r!==`grid`){r!==null&&console.warn(`[monowind] Ignoring unrecognized select="${r}". Expected "grid" (default) or "text".`,n(this)),this.setAttribute(`select`,Ta);return}e===`select`&&this.#ye(),this.#Me()}toPlainText(){return this.#d&&this.#Ne(),this.#p?er(this.#p):``}#Oe=()=>{this.#Me()};#ke=()=>{requestAnimationFrame(()=>this.#Me())};#Ae(){let e=document.activeElement;if(!(e instanceof HTMLSelectElement)||!this.contains(e))return!1;try{return e.matches(`:open`)}catch{return!1}}#je(){try{this.#Ne()}catch(e){console.error(`[monowind] layout failed:`,e)}}#Me(){this.#d||(this.#d=!0,requestAnimationFrame(()=>{if(this.#d=!1,this.#Ae()){this.#Me();return}this.#je()}))}#Ne(){if(!this.isConnected)return;let e=this.#V(),t=new Map,r=getComputedStyle(this).getPropertyValue(`--mw-cw`).trim(),i=parseFloat(r);if(Number.isFinite(i)&&i>0)for(let e of this.querySelectorAll(`textarea`)){let n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0);t.set(e,Math.max(0,Math.round(r/i)))}this.setAttribute(`measuring`,``);try{this.#c.parentNode!==this&&this.appendChild(this.#c);let r=I(this,this.#c),i=this.#f;(i===null||i.width!==r.width||i.height!==r.height||i.letterSpacing!==r.letterSpacing||i.inkOverhang!==r.inkOverhang)&&(this.style.setProperty(`--mw-cw`,`${r.width}px`),this.style.setProperty(`--mw-ch`,`${r.height}px`),this.style.setProperty(`--mw-rls`,`${r.letterSpacing}px`),this.style.setProperty(`--mw-ink`,`${r.inkOverhang??0}px`)),this.#f=r;let a=getComputedStyle(this),o=(parseFloat(a.paddingLeft)||0)+(parseFloat(a.paddingRight)||0),s=Math.max(0,Math.floor((this.clientWidth-o)/r.width));if(s===0)return;let c=L(),l=[];for(let e of Array.from(this.children)){if(e===this.#c)continue;let n=ra(e,c,r,t);n&&l.push(n)}if(ba(this)?(this.hasAttribute(`data-mw-dropped-text`)||console.warn(`[monowind] ${xa}`,n(this)),this.setAttribute(`data-mw-dropped-text`,``)):this.removeAttribute(`data-mw-dropped-text`),l.length===0){this.#s.replaceChildren(),this.#p=null,this.setAttribute(`data-mw-ready`,``);return}let u={source:this,style:tt(),children:l,text:``,intrinsicWidth:0,intrinsicHeight:0,localRect:{x:0,y:0,width:0,height:0},unclampedHeight:0,resolvedPadding:nt()},{height:d}=Tn(u,s);Kr(u),this.#_=qa(u),this.#z(r,e),this.#M=!Rr(u,this.#s,this.#ne()),this.#p=u;let f=`${u.localRect.width*r.width}px`,p=`${u.localRect.height*r.height}px`;this.#s.style.width!==f&&(this.#s.style.width=f),this.#s.style.height!==p&&(this.#s.style.height=p);let m=a.boxSizing===`border-box`?(parseFloat(a.paddingTop)||0)+(parseFloat(a.paddingBottom)||0)+(parseFloat(a.borderTopWidth)||0)+(parseFloat(a.borderBottomWidth)||0):0,h=`${d*r.height+m}px`;this.style.height!==h&&(this.style.height=h);let g=a.boxSizing===`border-box`?o+(parseFloat(a.borderLeftWidth)||0)+(parseFloat(a.borderRightWidth)||0):0,_=`${s*r.width+g}px`;this.style.getPropertyValue(`--mw-host-w`)!==_&&this.style.setProperty(`--mw-host-w`,_),this.hasAttribute(`data-mw-ready`)||this.setAttribute(`data-mw-ready`,``)}finally{this.setAttribute(`settling`,``),this.removeAttribute(`measuring`),getComputedStyle(this).transitionProperty,this.removeAttribute(`settling`),this.#H(e),this.#u?.takeRecords(),g(this)&&(_()?(this.#Ce=performance.now(),this.#Ee()):this.#Me()),this.#Y(),this.#E=[];let t=document.scrollingElement??document.documentElement;for(let e=this.parentElement;e;e=e.parentElement)(e===t||/auto|scroll/.test(getComputedStyle(e).overflow))&&this.#E.push(e);this.#I=null,this.#N&&this.#ye()}}};function za(){typeof customElements>`u`||customElements.get(`mono-wind`)||customElements.define(`mono-wind`,Ra)}function Ba(e,t,n,r,i){return Va(t===`y`?e.scrollTop:e.scrollLeft,t===`y`?e.scrollHeight-e.clientHeight:e.scrollWidth-e.clientWidth,n,r,i)}function Va(e,t,n,r,i){if(r>0&&e>0&&e>=t-1)return r;let a=e/n-i,o=Math.abs(a)<=.5?i:i+Math.sign(a)*Math.round(Math.abs(a));return Math.min(Math.max(0,o),r)}function Ha(e){return e instanceof PointerEvent&&e.pointerType===`touch`&&e.type!==`pointerup`}function Ua(e){return e!==null&&!(e instanceof Element&&e.shadowRoot)}function Wa(e){return{start:e,end:e}}function Ga(e,t,n){e.setBaseAndExtent(t.node,t.offset,n.node,n.offset)}function Ka(e,t){return e.start.node===t.start.node&&e.start.offset===t.start.offset&&e.end.node===t.end.node&&e.end.offset===t.end.offset}function qa(e){let t=[],n=e=>{e.scrollRange&&t.push(e);for(let t of e.children)n(t)};return n(e),t}var Ja=`/* Gap decorations (specs/gap-decorations.md): css-gaps-1 rules for flex
1019
+ `,Ga=`grid`,Ka=`tab`,qa=`data-mw-semantic-selection`,Ja=`a, button, input, select, textarea, label, [tabindex], [role='button']`,Ya=[`pointerover`,`pointerleave`,`pointerdown`,`pointerup`,`pointercancel`,`keydown`,`keyup`,`focusin`,`focusout`,`input`,`change`],Xa=/^(color|opacity|border-(top|right|bottom|left)-color|border-color)$/,Za=3e4,Qa=200,$a=3,eo=4,to=8,no=100,ro=160,io=typeof HTMLElement>`u`?class{}:HTMLElement,ao=class e extends io{static observedAttributes=[`select`,`focus`];static#e=new Set;static#t=null;static#n=()=>{for(let t of e.#e)t.#Fe()};static#r(t){t instanceof HTMLLinkElement&&t.rel===`stylesheet`&&!t.sheet&&t.addEventListener(`load`,e.#n,{once:!0})}static#i(t){if(e.#e.add(t),e.#t)return;for(let t of document.querySelectorAll(`link[rel=stylesheet]`))e.#r(t);let n=new MutationObserver(t=>{for(let n of t)for(let t of n.addedNodes)e.#r(t);e.#n()});n.observe(document.head,{childList:!0,subtree:!0,characterData:!0}),e.#t=n}static#a(t){e.#e.delete(t),e.#e.size===0&&(e.#t?.disconnect(),e.#t=null)}#o;#s;#c;#l=null;#u=null;#d=!1;#f=null;#p=null;#m=null;#h=null;#g=!1;#_=[];#v=new Map;#y=new WeakMap;#b=null;#x=null;#S=``;#C=null;#w=null;#T=!1;#E=[];#D(){this.#u?.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`class`,`style`,`colspan`,`rowspan`,`span`,...c()]})}constructor(){super(),this.#o=this.attachShadow({mode:`open`}),this.#o.innerHTML=Wa,this.#s=this.#o.getElementById(`grid`),this.#c=document.createElement(`span`),this.#c.setAttribute(`aria-hidden`,`true`),this.#c.setAttribute(`data-mw-probe`,``),this.#c.style.cssText=`position:absolute!important;top:0!important;left:0!important;visibility:hidden!important;pointer-events:none!important;user-select:none!important;white-space:pre!important;overflow-wrap:normal!important;padding:0!important;margin:0!important;border:0!important;`,this.#c.textContent=`M`.repeat(100)}connectedCallback(){this.hasAttribute(`select`)||this.setAttribute(`select`,Ga),this.hasAttribute(`focus`)||this.setAttribute(`focus`,Ka),this.#c.parentNode!==this&&this.appendChild(this.#c),this.#l=new ResizeObserver(()=>this.#Fe()),this.#l.observe(this),this.#Y(),this.#l.observe(this.#c),window.addEventListener(`resize`,this.#je),this.#u=new MutationObserver(()=>this.#Fe()),this.#D(),this.#m=l(()=>{this.#D(),this.#Fe()}),this.#h=re(()=>this.#Fe()),document.fonts?.ready.then(this.#Me).catch(e=>{console.warn(`[monowind] document.fonts.ready failed:`,e)}),document.fonts?.addEventListener(`loadingdone`,this.#Me);for(let e of Ya)this.addEventListener(e,this.#Ae);this.addEventListener(`transitionrun`,this.#De),this.addEventListener(`transitionend`,this.#Oe),this.addEventListener(`transitioncancel`,this.#Oe),this.addEventListener(`pointermove`,this.#Q),this.addEventListener(`pointerleave`,this.#ve),this.addEventListener(`pointerdown`,this.#ye),this.addEventListener(`scroll`,this.#W,{capture:!0,passive:!0}),this.addEventListener(`scrollend`,this.#G,{capture:!0}),this.addEventListener(`wheel`,this.#q,{passive:!1}),this.addEventListener(`copy`,this.#$),this.addEventListener(`mousedown`,this.#ee),this.addEventListener(`keydown`,this.#te),document.addEventListener(`selectionchange`,this.#_e),window.addEventListener(`pointerup`,this.#be),window.addEventListener(`pointercancel`,this.#be),document.addEventListener(`scroll`,this.#xe,{capture:!0,passive:!0}),e.#i(this),this.#Fe()}disconnectedCallback(){window.removeEventListener(`resize`,this.#je),this.#l?.disconnect(),this.#u?.disconnect(),this.#l=null,this.#u=null,this.#m?.(),this.#m=null,this.#h?.(),this.#h=null,document.fonts?.removeEventListener(`loadingdone`,this.#Me);for(let e of Ya)this.removeEventListener(e,this.#Ae);this.removeEventListener(`transitionrun`,this.#De),this.removeEventListener(`transitionend`,this.#Oe),this.removeEventListener(`transitioncancel`,this.#Oe),this.#we=0,this.removeEventListener(`pointermove`,this.#Q),this.removeEventListener(`pointerleave`,this.#ve),this.removeEventListener(`pointerdown`,this.#ye),this.removeEventListener(`scroll`,this.#W,{capture:!0}),this.removeEventListener(`scrollend`,this.#G,{capture:!0}),this.removeEventListener(`wheel`,this.#q),this.removeEventListener(`copy`,this.#$),this.removeEventListener(`keydown`,this.#te),this.removeEventListener(`mousedown`,this.#ee),document.removeEventListener(`selectionchange`,this.#_e);for(let e of this.#v.values())clearTimeout(e);this.#v.clear(),this.#x=null,this.#b=null,window.removeEventListener(`pointerup`,this.#be),window.removeEventListener(`pointercancel`,this.#be),document.removeEventListener(`scroll`,this.#xe,{capture:!0}),this.#N=null,this.#A=null,this.#j=!1,this.#M=!1,this.#Se(),e.#a(this)}#O=new Set;#k=new Set;#A=null;#j=!1;#M=!1;#N=null;#P=NaN;#F=NaN;#I=null;static#L=typeof matchMedia>`u`?null:matchMedia(`(hover: hover)`);#R(){if(this.#g||this.#d)return;this.#g=!0;let e=!1,t=()=>{if(e)return;e=!0,this.#g=!1;let t=this.#f;this.isConnected&&this.#p&&t&&(this.#z(t),this.#M=!$r(this.#p,this.#s,this.#ie()),this.#Se())};requestAnimationFrame(t),setTimeout(t,50)}#z(e,t){for(let n of this.#_){let r=n.source,{maxX:i,maxY:a}=n.scrollRange,o=t?.get(r);n.scroll=o?{x:o.pinX?i:Math.min(o.x,i),y:o.pinY?a:Math.min(o.y,a)}:this.#B(n,e)}}#B(e,t){let n=e.source,{maxX:r,maxY:i}=e.scrollRange,a=e.scroll??{x:0,y:0};return{x:so(n,`x`,t.width,r,a.x),y:so(n,`y`,t.height,i,a.y)}}#V(){let e=new Map,t=this.#f;if(!t)return e;for(let n of this.#_){let r=n.source,{maxX:i,maxY:a}=n.scrollRange,{x:o,y:s}=this.#B(n,t);e.set(r,{top:r.scrollTop,left:r.scrollLeft,x:o,y:s,pinX:i>0&&o>=i,pinY:a>0&&s>=a})}return e}#H(e){for(let t of this.#_){let n=t.source,r=e.get(n);r&&(n.scrollTop,n.scrollLeft,n.scrollTop=r.pinY?n.scrollHeight:r.top,n.scrollLeft=r.pinX?n.scrollWidth:r.left)}}#U(e,t){clearTimeout(this.#v.get(e)),this.#v.set(e,setTimeout(()=>this.#K(e),t))}#W=e=>{let t=e.target;t instanceof HTMLElement&&t!==this&&t.hasAttribute(`data-mw-scroll`)&&(this.#R(),!(Date.now()-(this.#y.get(t)??0)<Qa)&&(clearTimeout(this.#v.get(t)),`onscrollend`in window||this.#U(t,ro)))};#G=e=>{let t=e.target;t instanceof HTMLElement&&t!==this&&t.hasAttribute(`data-mw-scroll`)&&(Date.now()-(this.#y.get(t)??0)<Qa||this.#U(t,no))};#K(e){if(this.#x?.el===e)return;this.#R();let t=this.#f,n=this.#_.find(t=>t.source===e);if(!t||!n)return;let r=n.scrollRange,i=n.scroll??this.#B(n,t),a=i.y===r.maxY?e.scrollHeight-e.clientHeight:i.y*t.height,o=i.x===r.maxX?e.scrollWidth-e.clientWidth:i.x*t.width;(Math.abs(e.scrollTop-a)>.5||Math.abs(e.scrollLeft-o)>.5)&&e.scrollTo({top:a,left:o,behavior:`instant`})}#q=e=>{if(this.getAttribute(`select`)!==`grid`)return;let t=this.#p,n=this.#f;if(!t||!n||this.#_.length===0)return;let r=e,i=r.deltaMode===1?n.height:r.deltaMode===2?this.clientHeight:1,a=r.deltaX*i,o=r.deltaY*i;if(!r.cancelable&&this.#J(a,o))return;let{col:s,row:c}=this.#X(r.clientX,r.clientY,n),l=Date.now(),u=Math.abs(a)+Math.abs(o);if(u===0){this.#b=null,r.preventDefault();return}let d=e=>{let t=e.scrollRange,n=e.source;return o!==0&&t.maxY>0&&(o>0&&n.scrollTop<n.scrollHeight-n.clientHeight-.5||o<0&&n.scrollTop>.5)||a!==0&&t.maxX>0&&(a>0&&n.scrollLeft<n.scrollWidth-n.clientWidth-.5||a<0&&n.scrollLeft>.5)},f=this.#b,p=Math.abs(a)>=Math.abs(o)?`x`:`y`,m=f!==null&&u>f.mag*1.25+1,h=f!==null&&(Math.abs(r.clientX-f.x)>$a||Math.abs(r.clientY-f.y)>$a),g=f!==null&&f.decayed>=to,_=f!==null&&l-f.at<Qa&&p===f.axis&&(h?u<=f.mag:!(g&&m)),v=null;if(_){if(f.decayed=u<=f.mag&&u>=f.mag*.5?f.decayed+1:g?f.decayed:0,f.mag=u,f.at=l,!f.el)return;v=this.#_.find(e=>e.source===f.el)??null}if(!v){let e=gr(t,s,c);for(let t=e.length-1;t>=0;t--){let n=e[t].node;if(!n.scrollRange||_r(n.source))continue;if(d(n)){v=n;break}let r=n.style.overscroll;if(o!==0&&!r.y||a!==0&&!r.x){v=n;break}}if(!v&&u<eo){r.preventDefault();return}this.#b={el:v?v.source:null,x:r.clientX,y:r.clientY,axis:p,at:l,mag:u,decayed:0}}if(!v||(r.preventDefault(),!d(v)))return;let y=v.source,b=v.scrollRange,x={behavior:`instant`};o!==0&&b.maxY>0&&(x.top=o),a!==0&&b.maxX>0&&(x.left=a),y.scrollBy(x),this.#y.set(y,l),this.#U(y,Qa)};#J(e,t){return this.#E.some(n=>t>0&&n.scrollTop<n.scrollHeight-n.clientHeight-.5||t<0&&n.scrollTop>.5||e>0&&n.scrollLeft<n.scrollWidth-n.clientWidth-.5||e<0&&n.scrollLeft>.5)}#Y(){let e=this.parentElement;if(e&&this.#l){this.#l.observe(e);for(let t of e.children)t!==this&&this.#l.observe(t)}}#X(e,t,n){if(!this.#I){let e=this.#s.getBoundingClientRect();this.#I={left:e.left,top:e.top}}return{col:Math.floor((e-this.#I.left)/n.width),row:Math.floor((t-this.#I.top)/n.height)}}#Z(e,t){let n=this.#p,r=this.#f;if(!n||!r||this.#_.length===0)return null;let{col:i,row:a}=this.#X(e,t,r),o=gr(n,i,a);for(let n=o.length-1;n>=0;n--){let{node:s,x:c,y:l}=o[n],u=s.scrollRange;if(!u||_r(s.source))continue;let d=s.source,{y:f,x:p}=pr(s,c,l);if(f&&u.maxY>0&&i>=f.col&&i<f.col+f.thick&&a>=f.row&&a<f.row+f.len){let e=mr(f.len,u.sizeY,u.maxY,0).len,n=Math.max(1,(f.len-e)*r.height);return{el:d,axis:`y`,startClient:t,startPx:d.scrollTop,factor:u.maxY*r.height/n}}if(p&&u.maxX>0&&a>=p.row&&a<p.row+p.thick&&i>=p.col&&i<p.col+p.len){let t=mr(p.len,u.sizeX,u.maxX,0).len,n=Math.max(1,(p.len-t)*r.width);return{el:d,axis:`x`,startClient:e,startPx:d.scrollLeft,factor:u.maxX*r.width/n}}}return null}#Q=e=>{if(lo(e))return;let{clientX:t,clientY:n}=e,r=this.#x;if(r){let e=(r.axis===`y`?n:t)-r.startClient,i=r.startPx+e*r.factor;r.axis===`y`?r.el.scrollTop=i:r.el.scrollLeft=i;return}let i=!!(e.buttons&1);i&&this.#C&&this.#ue(this.#C,t,n),i&&this.#w&&this.#le(this.#w,t,n),i&&this.#T&&!this.hasAttribute(`data-mw-dragging`)&&this.setAttribute(`data-mw-dragging`,``),this.#N={x:t,y:n};let a=this.#f;if(a){let{col:e,row:r}=this.#X(t,n,a);if(e===this.#P&&r===this.#F)return}this.#Se()};#$=e=>{let{clipboardData:t}=e,n=this.#p,r=this.#ge();t&&n&&r&&(t.setData(`text/plain`,Fr(n,r)),e.preventDefault())};#ee=e=>{let t=e;if(t.button!==0||this.getAttribute(`select`)!==`grid`)return;let n=t.composedPath().includes(this.#s);if(!n&&!this.#ae(t.target))return;let r=this.#S===`mouse`||this.#S===`pen`;if(t.detail<=1){if(t.detail!==1)return;this.removeAttribute(qa);let e=this.#re();r&&(!n||e)&&(e?.blur(),this.#ce(t));return}if(!r)return;let i=t.detail===2?`word`:`paragraph`,a=document.getSelection(),o=this.#p,s=this.#f;if(!a||!o||!s)return;let{col:c,row:l}=this.#X(t.clientX,t.clientY,s),u=this.#fe(c,l,i);if(!u){this.removeAttribute(qa),this.#C=null;return}t.preventDefault(),this.#re()?.blur(),this.#he(u);let d=t.shiftKey&&a.anchorNode&&this.#ge()?fo({node:a.anchorNode,offset:a.anchorOffset}):u;this.#de(a,d,u),this.#C={unit:i,anchor:d}};#te=e=>{let t=e;if(this.getAttribute(`focus`)!==`arrows`)return;let n=br(t.key);if(!n||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)return;let r=this.#p,i=t.target;if(!r||!(i instanceof Element)||i===this||kr(i,t.key,this.#Ne()))return;let a=wr(r),o=Tr(a,i);if(!o)return;let s=xr(n,o,a.filter(e=>e.element!==i));s&&(t.preventDefault(),s.focus({preventScroll:!0}),s.scrollIntoView({block:`nearest`,inline:`nearest`}))};#ne(e,t,r){let i=[];for(let n of Array.from(this.children)){if(n===this.#c)continue;let a=ya(n,e,t,r);a&&i.push(a)}return Ba(this)?(this.hasAttribute(`data-mw-dropped-text`)||console.warn(`[monowind] ${Va}`,n(this)),this.setAttribute(`data-mw-dropped-text`,``)):this.removeAttribute(`data-mw-dropped-text`),{source:this,style:tt(),children:i,text:``,intrinsicWidth:0,intrinsicHeight:0,localRect:{x:0,y:0,width:0,height:0},unclampedHeight:0,resolvedPadding:nt()}}#re(){let e=document.activeElement;return e instanceof HTMLElement&&e!==document.body&&this.contains(e)?e:null}#ie(){return this.#j&&!this.#w}#ae(e){return e instanceof Element&&e!==this&&this.contains(e)&&!e.matches(Ja)}#oe(e,t){let n=this.#s.textContent.split(`
1020
+ `),r=n[0]?.length??0;return Math.max(0,Math.min(t,n.length-1))*(r+1)+Math.max(0,Math.min(e,r))}#se(e,t){let n=this.#f;if(!n)return null;let{col:r,row:i}=this.#X(e,t,n),a=this.#oe(r,i),o=ii(this.#s,a);return o&&{offset:a,at:o}}#ce(e){let t=this.#se(e.clientX,e.clientY);t&&(e.preventDefault(),document.getSelection()?.setBaseAndExtent(...t.at,...t.at),this.#w={anchor:t.offset})}#le(e,t,n){let r=ii(this.#s,e.anchor),i=this.#se(t,n);r&&i&&document.getSelection()?.setBaseAndExtent(...r,...i.at)}#ue(e,t,n){let r=this.#f,i=document.getSelection();if(!r||!i)return;let{col:a,row:o}=this.#X(t,n,r),s=this.#fe(a,o,e.unit);s&&this.#de(i,e.anchor,s)}#de(e,t,n){if(mo(t,n)){po(e,n.start,n.end);return}let r=this.#me(t),i=this.#me(n);Ar(r.start.node,r.start.offset,i.start.node,i.start.offset)<=0?po(e,r.start,i.end):po(e,r.end,i.start)}#fe(e,t,n){let r=this.#p;if(!r)return null;let i=gr(r,e,t);for(let r=i.length-1;r>=0;r--){let{node:a,x:o,y:s}=i[r];if(Hr(a))return _r(a.source)?null:this.#pe(a,o,s,e,t,n)}return Hr(r)?this.#pe(r,0,0,e,t,n):null}#pe(e,t,n,r,i,a){let o=dr(e,t,n,r,i);if(o===null)return null;let c=s(e.source.tagName)?.selectionTarget?.(e.source);if(a===`word`&&!c){let t=Kr(e,o),n=t&&Mr(e,t.start),r=t&&Mr(e,t.end);if(n&&r)return{start:n,end:r}}if(e===this.#p)return Vr(e);let l=c??e.source;return{start:{node:l,offset:0},end:{node:l,offset:l.childNodes.length}}}#me(e){let t=e.start.node.getRootNode();if(!(t instanceof ShadowRoot)||t===this.#s.getRootNode())return e;let n=t.host,r=n.parentNode;if(!r)return e;let i=Array.prototype.indexOf.call(r.childNodes,n),a=n.previousSibling,o=n.nextSibling;return{start:uo(a)?{node:a,offset:a instanceof Text?a.length:a.childNodes.length}:{node:r,offset:i},end:uo(o)?{node:o,offset:0}:{node:r,offset:i+1}}}#he(e){this.setAttribute(qa,``);let t=e.start.node,n=t instanceof Element?t:t.parentElement;n&&getComputedStyle(n).userSelect}#ge(){let e=Nr(this.#s.getRootNode());return!e||Pr(this,this.#s,e)!==`light`||e.startContainer===e.endContainer&&e.startOffset===e.endOffset?null:e}#_e=()=>{this.hasAttribute(qa)&&(this.#ge()||this.removeAttribute(qa))};#ve=()=>{this.#N=null,this.#Se()};#ye=e=>{let t=e;if(!t.isPrimary||t.button!==0||(this.#S=t.pointerType,lo(t)))return;let n=this.#Z(t.clientX,t.clientY);if(n){this.#x=n,t.preventDefault(),t.isTrusted&&this.setPointerCapture(t.pointerId);return}this.#N={x:t.clientX,y:t.clientY},this.#j=!0,this.#T=t.composedPath().includes(this.#s),this.#Se(!0)};#be=e=>{if(e.isPrimary){if(this.#C=null,this.#w=null,this.#T=!1,this.removeAttribute(`data-mw-dragging`),this.#x){this.#K(this.#x.el),this.#x=null;return}(this.#j||this.#A)&&(this.#j=!1,this.#A=null,this.#Se(),this.#M&&this.#Fe())}};#xe=e=>{if(!this.#N)return;let t=e.target;t instanceof HTMLElement&&t.hasAttribute(`data-mw-scroll`)||(this.#I=null,this.#Se())};#Se(t=!1){let n=this.#p,r=this.#f,i=[];if(this.#N&&n&&r&&this.isConnected&&this.getAttribute(`select`)===`grid`&&(this.#j||e.#L?.matches)){let{col:e,row:t}=this.#X(this.#N.x,this.#N.y,r);this.#P=e,this.#F=t,i=vr(n,e,t)}else this.#P=NaN,this.#F=NaN;let a=i.at(-1)??null;t&&(this.#A=a);let o=e.#L?.matches?i:[],s=this.#A?i.indexOf(this.#A):-1,c=s>=0?i.slice(0,s+1):[],l=this.#Ce(`data-mw-hover`,this.#O,o);l=this.#Ce(`data-mw-active`,this.#k,c)||l;let u=a?getComputedStyle(a).cursor:``;this.#s.style.cursor=u===`auto`?``:u,l&&this.isConnected&&this.#Fe()}#Ce(e,t,n){let r=!1,i=new Set(n);for(let n of t)i.has(n)||(n.removeAttribute(e),r=!0);for(let n of i)t.has(n)||(n.setAttribute(e,``),r=!0);t.clear();for(let e of i)t.add(e);return r}#we=0;#Te=!1;#Ee=0;#De=e=>{Xa.test(e.propertyName)&&(this.#we++,this.#Ee=performance.now(),this.#ke())};#Oe=e=>{Xa.test(e.propertyName)&&(this.#we=Math.max(0,this.#we-1))};#ke(){if(this.#Te)return;this.#Te=!0;let e=()=>{if(!this.isConnected||this.#we===0&&!_()||performance.now()-this.#Ee>Za){this.#Te=!1,this.#we=0,this.#Fe();return}this.#Pe(),requestAnimationFrame(e)};requestAnimationFrame(e)}#Ae=e=>{if(!lo(e)){if((e.type===`focusin`||e.type===`focusout`)&&e.target instanceof HTMLSelectElement){this.#Pe();return}this.#Fe()}};attributeChangedCallback(e,t,r){if(e===`focus`){r!==`tab`&&r!==`arrows`&&(r!==null&&console.warn(`[monowind] Ignoring unrecognized focus="${r}". Expected "tab" (default) or "arrows".`,n(this)),this.setAttribute(`focus`,Ka));return}if(e===`select`&&r!==`text`&&r!==`grid`){r!==null&&console.warn(`[monowind] Ignoring unrecognized select="${r}". Expected "grid" (default) or "text".`,n(this)),this.setAttribute(`select`,Ga);return}e===`select`&&this.#Se(),this.#Fe()}toPlainText(){return this.#d&&this.#Ie(),this.#p?er(this.#p):``}#je=()=>{this.#Fe()};#Me=()=>{requestAnimationFrame(()=>this.#Fe())};#Ne(){let e=document.activeElement;if(!(e instanceof HTMLSelectElement)||!this.contains(e))return!1;try{return e.matches(`:open`)}catch{return!1}}#Pe(){try{this.#Ie()}catch(e){console.error(`[monowind] layout failed:`,e)}}#Fe(){this.#d||(this.#d=!0,requestAnimationFrame(()=>{if(this.#d=!1,this.#Ne()){this.#Fe();return}this.#Pe()}))}#Ie(){if(!this.isConnected)return;let e=this.#V(),t=new Map,n=getComputedStyle(this).getPropertyValue(`--mw-cw`).trim(),r=parseFloat(n);if(Number.isFinite(r)&&r>0)for(let e of this.querySelectorAll(`textarea`)){let n=getComputedStyle(e),i=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0);t.set(e,Math.max(0,Math.round(i/r)))}this.setAttribute(`measuring`,``);try{this.#c.parentNode!==this&&this.appendChild(this.#c);let n=I(this,this.#c),r=this.#f;(r===null||r.width!==n.width||r.height!==n.height||r.letterSpacing!==n.letterSpacing||r.inkOverhang!==n.inkOverhang)&&(this.style.setProperty(`--mw-cw`,`${n.width}px`),this.style.setProperty(`--mw-ch`,`${n.height}px`),this.style.setProperty(`--mw-rls`,`${n.letterSpacing}px`),this.style.setProperty(`--mw-ink`,`${n.inkOverhang??0}px`)),this.#f=n;let i=getComputedStyle(this),a=(parseFloat(i.paddingLeft)||0)+(parseFloat(i.paddingRight)||0),o=Math.max(0,Math.floor((this.clientWidth-a)/n.width));if(o===0)return;let s=L(),c=ba(this,s,n,t)??this.#ne(s,n,t),{height:l}=Tn(c,o);si(c),this.#_=ho(c),this.#z(n,e),this.#M=!$r(c,this.#s,this.#ie()),this.#p=c;let u=`${c.localRect.width*n.width}px`,d=`${c.localRect.height*n.height}px`;this.#s.style.width!==u&&(this.#s.style.width=u),this.#s.style.height!==d&&(this.#s.style.height=d);let f=i.boxSizing===`border-box`?(parseFloat(i.paddingTop)||0)+(parseFloat(i.paddingBottom)||0)+(parseFloat(i.borderTopWidth)||0)+(parseFloat(i.borderBottomWidth)||0):0,p=`${l*n.height+f}px`;this.style.height!==p&&(this.style.height=p);let m=i.boxSizing===`border-box`?a+(parseFloat(i.borderLeftWidth)||0)+(parseFloat(i.borderRightWidth)||0):0,h=`${o*n.width+m}px`;this.style.getPropertyValue(`--mw-host-w`)!==h&&this.style.setProperty(`--mw-host-w`,h),this.hasAttribute(`data-mw-ready`)||this.setAttribute(`data-mw-ready`,``)}finally{this.setAttribute(`settling`,``),this.removeAttribute(`measuring`),getComputedStyle(this).transitionProperty,this.removeAttribute(`settling`),this.#H(e),this.#u?.takeRecords(),g(this)&&(_()?(this.#Ee=performance.now(),this.#ke()):this.#Fe()),this.#Y(),this.#E=[];let t=document.scrollingElement??document.documentElement;for(let e=this.parentElement;e;e=e.parentElement)(e===t||/auto|scroll/.test(getComputedStyle(e).overflow))&&this.#E.push(e);this.#I=null,this.#N&&this.#Se()}}};function oo(){typeof customElements>`u`||customElements.get(`mono-wind`)||customElements.define(`mono-wind`,ao)}function so(e,t,n,r,i){return co(t===`y`?e.scrollTop:e.scrollLeft,t===`y`?e.scrollHeight-e.clientHeight:e.scrollWidth-e.clientWidth,n,r,i)}function co(e,t,n,r,i){if(r>0&&e>0&&e>=t-1)return r;let a=e/n-i,o=Math.abs(a)<=.5?i:i+Math.sign(a)*Math.round(Math.abs(a));return Math.min(Math.max(0,o),r)}function lo(e){return e instanceof PointerEvent&&e.pointerType===`touch`&&e.type!==`pointerup`}function uo(e){return e!==null&&!(e instanceof Element&&e.shadowRoot)}function fo(e){return{start:e,end:e}}function po(e,t,n){e.setBaseAndExtent(t.node,t.offset,n.node,n.offset)}function mo(e,t){return e.start.node===t.start.node&&e.start.offset===t.start.offset&&e.end.node===t.end.node&&e.end.offset===t.end.offset}function ho(e){let t=[],n=e=>{e.scrollRange&&t.push(e);for(let t of e.children)n(t)};return n(e),t}var go=`/* Gap decorations (specs/gap-decorations.md): css-gaps-1 rules for flex
1013
1021
  * and grid gaps, engine-painted as glyph runs. The utilities set the
1014
1022
  * real CSS properties (forward-compat; unknown ones drop harmlessly)
1015
1023
  * AND the --mw-* mirrors the engine reads — compiled by the consumer's
@@ -1237,7 +1245,7 @@ input:where([type='button'], [type='reset'], [type='submit']),
1237
1245
  inherits: false;
1238
1246
  initial-value: 0;
1239
1247
  }
1240
- `,Ya=`/* monowind companion stylesheet — loaded into the light DOM by the app.
1248
+ `,_o=`/* monowind companion stylesheet — loaded into the light DOM by the app.
1241
1249
  * The shadow root has its own baked-in styles; this file targets the light-DOM
1242
1250
  * subtree the host owns.
1243
1251
  *
@@ -1670,9 +1678,13 @@ mono-wind[select="grid"][data-mw-dragging]
1670
1678
  * would select it. Lifted with a semantic selection
1671
1679
  * (specs/semantic-selection.md). Editable controls keep their own
1672
1680
  * selection (Firefox honors an explicit \`none\` on a text field's
1673
- * value; the slot's inherited value never reached it). */
1674
- mono-wind[select="grid"]:not([data-mw-semantic-selection])
1675
- :not(input, textarea, [contenteditable], [contenteditable] *) {
1681
+ * value; the slot's inherited value never reached it). \`:where()\` keeps
1682
+ * the rule at base specificity so the coarse-pointer rule below wins.
1683
+ * The host's own text (specs/host-leaf.md) takes the host's value in
1684
+ * Firefox, so the leaf host is locked too. */
1685
+ mono-wind[select="grid"]:where(:not([data-mw-semantic-selection]))[data-mw-leaf],
1686
+ mono-wind[select="grid"]:where(:not([data-mw-semantic-selection]))
1687
+ :where(:not(input, textarea, [contenteditable], [contenteditable] *)) {
1676
1688
  user-select: none;
1677
1689
  -webkit-user-select: none;
1678
1690
  }
@@ -1750,6 +1762,7 @@ mono-wind:not([data-mw-ready]) {
1750
1762
  * draws the glyph copy that \`color\` draws in other engines (where the
1751
1763
  * identical-color shadow hides beneath it). Native copy still yields
1752
1764
  * the real text (the DOM the browser reads). */
1765
+ mono-wind:not([measuring])[data-mw-leaf]::selection,
1753
1766
  mono-wind:not([measuring]) *::selection {
1754
1767
  color: var(--mw-bg, canvas) !important;
1755
1768
  text-shadow: 0 0 0 var(--mw-bg, canvas) !important;
@@ -1854,7 +1867,11 @@ mono-wind:not([measuring]) * {
1854
1867
  * the ink while computed \`color\` stays LIVE — authored transitions run
1855
1868
  * on it for real and the engine samples true mid-fade values (the
1856
1869
  * animation loop, element.ts). Decoration ink follows \`color\`, so it
1857
- * needs its own transparent lock (the grid paints decorations). */
1870
+ * needs its own transparent lock (the grid paints decorations).
1871
+ * \`[data-mw-leaf]\` is the host with its own text as the root leaf
1872
+ * (specs/host-leaf.md): every rule that shapes a leaf's native text
1873
+ * carries this host variant — render.ts writes the host's flags. */
1874
+ mono-wind:not([measuring])[data-mw-leaf],
1858
1875
  mono-wind:not([measuring]) *:not(input):not(textarea):not(select) {
1859
1876
  -webkit-text-fill-color: transparent !important;
1860
1877
  text-decoration-color: transparent !important;
@@ -1873,6 +1890,7 @@ mono-wind:not([measuring]) select {
1873
1890
  /* Author-requested \`white-space: nowrap\` (or \`pre\`) — the engine sized this
1874
1891
  * box for unwrapped hard lines, so the browser must not wrap either. Wins
1875
1892
  * over the lock above on specificity. */
1893
+ mono-wind:not([measuring])[data-mw-nowrap],
1876
1894
  mono-wind:not([measuring]) [data-mw-nowrap] {
1877
1895
  white-space: nowrap !important;
1878
1896
  }
@@ -1882,6 +1900,8 @@ mono-wind:not([measuring]) [data-mw-nowrap] {
1882
1900
  * them too — on the leaf AND its inline descendants (the lock above would
1883
1901
  * collapse text inside nested spans). Later than the nowrap rule, so it
1884
1902
  * wins on the leaf itself at equal specificity. */
1903
+ mono-wind:not([measuring])[data-mw-pre],
1904
+ mono-wind:not([measuring])[data-mw-pre] *,
1885
1905
  mono-wind:not([measuring]) [data-mw-pre],
1886
1906
  mono-wind:not([measuring]) [data-mw-pre] * {
1887
1907
  white-space: pre !important;
@@ -2085,6 +2105,7 @@ mono-wind:not([measuring]) [data-mw-multicol-flow] {
2085
2105
  * root font size, not the cell width, so the transparent light-DOM
2086
2106
  * text drifts out from under the grid's paint. Rewrite it in cells so
2087
2107
  * the two agree — selection ranges land exactly where the glyphs are. */
2108
+ mono-wind:not([measuring])[data-mw-leaf],
2088
2109
  mono-wind:not([measuring]) [data-mw-laid-out],
2089
2110
  mono-wind:not([measuring]) [data-mw-multicol-flow] {
2090
2111
  text-indent: calc(var(--mw-ti, 0) * var(--mw-cw, 1px)) !important;
@@ -2169,11 +2190,11 @@ mono-wind:not([measuring]) [data-mw-inline-inset] {
2169
2190
 
2170
2191
  /* A container whose direct text was dropped (mixed text + block children,
2171
2192
  * cell-model deviation): the browser would paint that text unpositioned
2172
- * over the laid-out children, so hide it. \`visibility\` is inherited AND
2173
- * resettable, so the container's laid-out children come back — only in
2174
- * this warned state, which is why the reset may also override an authored
2175
- * \`invisible\` utility there. */
2176
- mono-wind:not([measuring])[data-mw-dropped-text],
2193
+ * over the laid-out children, so hide it the host's own through its
2194
+ * shadow slot (element.ts), a nested container's through itself.
2195
+ * \`visibility\` is inherited AND resettable, so the laid-out children come
2196
+ * back only in this warned state, which is why the reset may also
2197
+ * override an authored \`invisible\` utility there. */
2177
2198
  mono-wind:not([measuring]) [data-mw-dropped-text] {
2178
2199
  visibility: hidden !important;
2179
2200
  }
@@ -2191,10 +2212,11 @@ mono-wind:not([measuring]) [data-mw-table-hidden] {
2191
2212
  /* Force off-grid text alignments back to \`start\`. \`text-left\`/\`right\`/\`start\`/
2192
2213
  * \`end\` all land on whole cells (offset = (W - N) × cell width); \`center\` and
2193
2214
  * \`justify\` produce fractional per-line offsets we can't snap to the grid. */
2215
+ mono-wind:not([measuring])[data-mw-text-align-blocked],
2194
2216
  mono-wind:not([measuring]) [data-mw-text-align-blocked] {
2195
2217
  text-align: start !important;
2196
2218
  }
2197
- `,Xa=`/* Synthesized pointer states (specs/cell-model.md "Pointer states"):
2219
+ `,vo=`/* Synthesized pointer states (specs/cell-model.md "Pointer states"):
2198
2220
  * under select="grid" the light DOM is pointer-events: none, so
2199
2221
  * :hover/:active never match — the engine hit-tests the pointer's
2200
2222
  * cell and marks the chain with data-mw-hover / data-mw-active. These
@@ -2211,5 +2233,5 @@ mono-wind:not([measuring]) [data-mw-text-align-blocked] {
2211
2233
  }
2212
2234
  }
2213
2235
  @custom-variant active (&:is(:active, [data-mw-active]));
2214
- `,Za=document.createElement(`style`);Za.setAttribute(`data-monowind`,``),Za.textContent=Ya,document.head.appendChild(Za);var Qa=document.createElement(`style`);Qa.setAttribute(`type`,`text/tailwindcss`),Qa.setAttribute(`data-monowind-rules`,``),Qa.textContent=`${Ja}\n${Xa}`,document.head.appendChild(Qa),za(),Object.assign(globalThis,{monowind:{...globalThis.monowind,version:`0.2.6`,registerLeafRenderer:a,invalidateLeaves:o}})})();
2236
+ `,yo=document.createElement(`style`);yo.setAttribute(`data-monowind`,``),yo.textContent=_o,document.head.appendChild(yo);var bo=document.createElement(`style`);bo.setAttribute(`type`,`text/tailwindcss`),bo.setAttribute(`data-monowind-rules`,``),bo.textContent=`${go}\n${vo}`,document.head.appendChild(bo),oo(),Object.assign(globalThis,{monowind:{...globalThis.monowind,version:`0.2.7`,registerLeafRenderer:a,invalidateLeaves:o}})})();
2215
2237
  //# sourceMappingURL=cdn.js.map