Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

uhtml

Package Overview
Dependencies
Maintainers
1
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uhtml - npm Package Compare versions

Comparing version 4.5.0 to 4.5.1

cjs/init-ssr.js

10

cjs/creator.js

@@ -5,13 +5,5 @@ 'use strict';

const { array, hole } = require('./handler.js');
const { empty } = require('./utils.js');
const { empty, find } = require('./utils.js');
const { cache } = require('./literals.js');
/**
* @param {DocumentFragment} content
* @param {number[]} path
* @returns {Element}
*/
const find = (content, path) => path.reduceRight(childNodesIndex, content);
const childNodesIndex = (node, i) => node.childNodes[i];
/** @param {(template: TemplateStringsArray, values: any[]) => import("./parser.js").Resolved} parse */

@@ -18,0 +10,0 @@ module.exports = parse => (

@@ -14,10 +14,10 @@ 'use strict';

const html = tag(false);
exports.html = html;
/** @type {(template: TemplateStringsArray, ...values:Value[]) => Hole} A tag to render SVG content. */
const svg = tag(true);
exports.svg = svg;
exports.Hole = Hole;
exports.render = render;
exports.html = html;
exports.svg = svg;
exports.attr = attr;

@@ -9,3 +9,3 @@ 'use strict';

*/
module.exports = document => (function (exports) {
module.exports = document => (function () {
'use strict';

@@ -208,2 +208,12 @@

/* c8 ignore start */
/**
* @param {DocumentFragment} content
* @param {number[]} path
* @returns {Element}
*/
const find = (content, path) => path.reduceRight(childNodesIndex, content);
const childNodesIndex = (node, i) => node.childNodes[i];
/* c8 ignore stop */
const ELEMENT_NODE = 1;

@@ -303,3 +313,3 @@ const COMMENT_NODE = 8;

valueOf() {
let { firstChild, lastChild, parentNode } = this;
const { parentNode } = this;
if (parentNode === this) {

@@ -319,2 +329,3 @@ if (this.#nodes === empty)

if (parentNode) {
let { firstChild, lastChild } = this;
this.#nodes = [firstChild];

@@ -635,10 +646,2 @@ while (firstChild !== lastChild)

/**
* @param {DocumentFragment} content
* @param {number[]} path
* @returns {Element}
*/
const find = (content, path) => path.reduceRight(childNodesIndex, content);
const childNodesIndex = (node, i) => node.childNodes[i];
/** @param {(template: TemplateStringsArray, values: any[]) => import("./parser.js").Resolved} parse */

@@ -854,4 +857,4 @@ var create = parse => (

const parseHTML = create(parser(false));
const parseSVG = create(parser(true));
const createHTML = create(parser(false));
const createSVG = create(parser(true));

@@ -865,3 +868,3 @@ /**

if (info.a !== t) {
const { b, c } = (s ? parseSVG : parseHTML)(t, v);
const { b, c } = (s ? createSVG : createHTML)(t, v);
info.a = t;

@@ -1010,12 +1013,4 @@ info.b = b;

exports.Hole = Hole;
exports.attr = attr;
exports.html = html;
exports.htmlFor = htmlFor;
exports.render = keyed$1;
exports.svg = svg;
exports.svgFor = svgFor;
return { Hole, attr, html, htmlFor, render: keyed$1, svg, svgFor };
return exports;
})({});
})();

@@ -37,5 +37,7 @@ 'use strict';

const htmlFor = createRef(false);
exports.htmlFor = htmlFor;
/** @type {Bound} Returns a bound tag to render SVG content. */
const svgFor = createRef(true);
exports.svgFor = svgFor;

@@ -46,4 +48,2 @@ exports.Hole = Hole;

exports.svg = svg;
exports.htmlFor = htmlFor;
exports.svgFor = svgFor;
exports.attr = attr;

@@ -13,5 +13,7 @@ 'use strict';

const html = tag(false);
exports.html = html;
/** @type {(template: TemplateStringsArray, ...values:DOMValue[]) => Target} A tag to render SVG content. */
const svg = tag(true);
exports.svg = svg;

@@ -29,6 +31,4 @@ /**

};
exports.render = render;
exports.render = render;
exports.html = html;
exports.svg = svg;
exports.attr = attr;

@@ -55,3 +55,3 @@ 'use strict';

valueOf() {
let { firstChild, lastChild, parentNode } = this;
const { parentNode } = this;
if (parentNode === this) {

@@ -71,2 +71,3 @@ if (this.#nodes === empty)

if (parentNode) {
let { firstChild, lastChild } = this;
this.#nodes = [firstChild];

@@ -73,0 +74,0 @@ while (firstChild !== lastChild)

@@ -7,4 +7,4 @@ 'use strict';

const parseHTML = create(parser(false));
const parseSVG = create(parser(true));
const createHTML = create(parser(false));
const createSVG = create(parser(true));

@@ -18,3 +18,3 @@ /**

if (info.a !== t) {
const { b, c } = (s ? parseSVG : parseHTML)(t, v);
const { b, c } = (s ? createSVG : createHTML)(t, v);
info.a = t;

@@ -21,0 +21,0 @@ info.b = b;

@@ -43,1 +43,12 @@ 'use strict';

exports.gPD = gPD;
/* c8 ignore start */
/**
* @param {DocumentFragment} content
* @param {number[]} path
* @returns {Element}
*/
const find = (content, path) => path.reduceRight(childNodesIndex, content);
exports.find = find;
const childNodesIndex = (node, i) => node.childNodes[i];
/* c8 ignore stop */
import { PersistentFragment } from './persistent-fragment.js';
import { bc, detail } from './literals.js';
import { array, hole } from './handler.js';
import { empty } from './utils.js';
import { empty, find } from './utils.js';
import { cache } from './literals.js';
/**
* @param {DocumentFragment} content
* @param {number[]} path
* @returns {Element}
*/
const find = (content, path) => path.reduceRight(childNodesIndex, content);
const childNodesIndex = (node, i) => node.childNodes[i];
/** @param {(template: TemplateStringsArray, values: any[]) => import("./parser.js").Resolved} parse */

@@ -16,0 +8,0 @@ export default parse => (

@@ -12,7 +12,7 @@ /*! (c) Andrea Giammarchi - MIT */

/** @type {(template: TemplateStringsArray, ...values:Value[]) => Hole} A tag to render HTML content. */
const html = tag(false);
export const html = tag(false);
/** @type {(template: TemplateStringsArray, ...values:Value[]) => Hole} A tag to render SVG content. */
const svg = tag(true);
export const svg = tag(true);
export { Hole, render, html, svg, attr };
export { Hole, render, attr };

@@ -8,3 +8,3 @@

*/
export default document => (function (exports) {
export default document => (function () {
'use strict';

@@ -207,2 +207,12 @@

/* c8 ignore start */
/**
* @param {DocumentFragment} content
* @param {number[]} path
* @returns {Element}
*/
const find = (content, path) => path.reduceRight(childNodesIndex, content);
const childNodesIndex = (node, i) => node.childNodes[i];
/* c8 ignore stop */
const ELEMENT_NODE = 1;

@@ -302,3 +312,3 @@ const COMMENT_NODE = 8;

valueOf() {
let { firstChild, lastChild, parentNode } = this;
const { parentNode } = this;
if (parentNode === this) {

@@ -318,2 +328,3 @@ if (this.#nodes === empty)

if (parentNode) {
let { firstChild, lastChild } = this;
this.#nodes = [firstChild];

@@ -634,10 +645,2 @@ while (firstChild !== lastChild)

/**
* @param {DocumentFragment} content
* @param {number[]} path
* @returns {Element}
*/
const find = (content, path) => path.reduceRight(childNodesIndex, content);
const childNodesIndex = (node, i) => node.childNodes[i];
/** @param {(template: TemplateStringsArray, values: any[]) => import("./parser.js").Resolved} parse */

@@ -853,4 +856,4 @@ var create = parse => (

const parseHTML = create(parser(false));
const parseSVG = create(parser(true));
const createHTML = create(parser(false));
const createSVG = create(parser(true));

@@ -864,3 +867,3 @@ /**

if (info.a !== t) {
const { b, c } = (s ? parseSVG : parseHTML)(t, v);
const { b, c } = (s ? createSVG : createHTML)(t, v);
info.a = t;

@@ -1009,12 +1012,4 @@ info.b = b;

exports.Hole = Hole;
exports.attr = attr;
exports.html = html;
exports.htmlFor = htmlFor;
exports.render = keyed$1;
exports.svg = svg;
exports.svgFor = svgFor;
return { Hole, attr, html, htmlFor, render: keyed$1, svg, svgFor };
return exports;
})({});
})();

@@ -35,7 +35,7 @@ /*! (c) Andrea Giammarchi - MIT */

/** @type {Bound} Returns a bound tag to render HTML content. */
const htmlFor = createRef(false);
export const htmlFor = createRef(false);
/** @type {Bound} Returns a bound tag to render SVG content. */
const svgFor = createRef(true);
export const svgFor = createRef(true);
export { Hole, render, html, svg, htmlFor, svgFor, attr };
export { Hole, render, html, svg, attr };

@@ -11,6 +11,6 @@ /*! (c) Andrea Giammarchi - MIT */

/** @type {(template: TemplateStringsArray, ...values:DOMValue[]) => Target} A tag to render HTML content. */
const html = tag(false);
export const html = tag(false);
/** @type {(template: TemplateStringsArray, ...values:DOMValue[]) => Target} A tag to render SVG content. */
const svg = tag(true);
export const svg = tag(true);

@@ -24,3 +24,3 @@ /**

*/
const render = (where, what) => {
export const render = (where, what) => {
where.replaceChildren(typeof what === 'function' ? what() : what);

@@ -30,2 +30,2 @@ return where;

export { render, html, svg, attr };
export { attr };

@@ -53,3 +53,3 @@ import { DOCUMENT_FRAGMENT_NODE } from 'domconstants/constants';

valueOf() {
let { firstChild, lastChild, parentNode } = this;
const { parentNode } = this;
if (parentNode === this) {

@@ -69,2 +69,3 @@ if (this.#nodes === empty)

if (parentNode) {
let { firstChild, lastChild } = this;
this.#nodes = [firstChild];

@@ -71,0 +72,0 @@ while (firstChild !== lastChild)

@@ -6,4 +6,4 @@ import { array, hole } from './handler.js';

const parseHTML = create(parser(false));
const parseSVG = create(parser(true));
const createHTML = create(parser(false));
const createSVG = create(parser(true));

@@ -17,3 +17,3 @@ /**

if (info.a !== t) {
const { b, c } = (s ? parseSVG : parseHTML)(t, v);
const { b, c } = (s ? createSVG : createHTML)(t, v);
info.a = t;

@@ -20,0 +20,0 @@ info.b = b;

@@ -37,1 +37,11 @@ const { isArray } = Array;

};
/* c8 ignore start */
/**
* @param {DocumentFragment} content
* @param {number[]} path
* @returns {Element}
*/
export const find = (content, path) => path.reduceRight(childNodesIndex, content);
const childNodesIndex = (node, i) => node.childNodes[i];
/* c8 ignore stop */

@@ -1,2 +0,2 @@

const{isArray:e}=Array,{getPrototypeOf:t,getOwnPropertyDescriptor:n}=Object,r=[],s=()=>document.createRange(),l=(e,t,n)=>(e.set(t,n),n),{setPrototypeOf:i}=Object;let o;var c=(e,t,n)=>(o||(o=s()),n?o.setStartAfter(e):o.setStartBefore(e),o.setEndAfter(t),o.deleteContents(),e);const a=({firstChild:e,lastChild:t},n)=>c(e,t,n);let u=!1;const h=(e,t)=>u&&11===e.nodeType?1/t<0?t?a(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e,d=e=>document.createComment(e);class f extends((e=>{function t(e){return i(e,new.target.prototype)}return t.prototype=e.prototype,t})(DocumentFragment)){#e=d("<>");#t=d("</>");#n=r;constructor(e){super(e),this.replaceChildren(this.#e,...e.childNodes,this.#t),u=!0}get firstChild(){return this.#e}get lastChild(){return this.#t}get parentNode(){return this.#e.parentNode}remove(){a(this,!1)}replaceWith(e){a(this,!0).replaceWith(e)}valueOf(){let{firstChild:e,lastChild:t,parentNode:n}=this;if(n===this)this.#n===r&&(this.#n=[...this.childNodes]);else{if(n)for(this.#n=[e];e!==t;)this.#n.push(e=e.nextSibling);this.replaceChildren(...this.#n)}return this}}const p=(e,t,n)=>e.setAttribute(t,n),g=(e,t)=>e.removeAttribute(t);let m;const v=(t,n,r)=>{r=r.slice(1),m||(m=new WeakMap);const s=m.get(t)||l(m,t,{});let i=s[r];return i&&i[0]&&t.removeEventListener(r,...i),i=e(n)?n:[n,!1],s[r]=i,i[0]&&t.addEventListener(r,...i),n},b=(e,t)=>{const{t:n,n:r}=e;let s=!1;switch(typeof t){case"object":if(null!==t){(r||n).replaceWith(e.n=t.valueOf());break}case"undefined":s=!0;default:n.data=s?"":t,r&&(e.n=null,r.replaceWith(n))}return t},C=(e,t,n)=>e[n]=t,x=(e,t,n)=>C(e,t,n.slice(1)),w=(e,t,n)=>null==t?(g(e,n),t):C(e,t,n),$=(e,t)=>("function"==typeof t?t(e):t.current=e,t),y=(e,t,n)=>(null==t?g(e,n):p(e,n,t),t),N=(e,t,n)=>(e.toggleAttribute(n.slice(1),t),t),O=(e,t,n)=>{const{length:s}=t;if(e.data=`[${s}]`,s)return((e,t,n,r,s)=>{const l=n.length;let i=t.length,o=l,c=0,a=0,u=null;for(;c<i||a<o;)if(i===c){const t=o<l?a?r(n[a-1],-0).nextSibling:r(n[o-a],0):s;for(;a<o;)e.insertBefore(r(n[a++],1),t)}else if(o===a)for(;c<i;)u&&u.has(t[c])||e.removeChild(r(t[c],-1)),c++;else if(t[c]===n[a])c++,a++;else if(t[i-1]===n[o-1])i--,o--;else if(t[c]===n[o-1]&&n[a]===t[i-1]){const s=r(t[--i],-1).nextSibling;e.insertBefore(r(n[a++],1),r(t[c++],-1).nextSibling),e.insertBefore(r(n[--o],1),s),t[i]=n[o]}else{if(!u){u=new Map;let e=a;for(;e<o;)u.set(n[e],e++)}if(u.has(t[c])){const s=u.get(t[c]);if(a<s&&s<o){let l=c,h=1;for(;++l<i&&l<o&&u.get(t[l])===s+h;)h++;if(h>s-a){const l=r(t[c],0);for(;a<s;)e.insertBefore(r(n[a++],1),l)}else e.replaceChild(r(n[a++],1),r(t[c++],-1))}else c++}else e.removeChild(r(t[c++],-1))}return n})(e.parentNode,n,t,h,e);switch(n.length){case 1:n[0].remove();case 0:break;default:c(h(n[0],0),h(n.at(-1),-0),!1)}return r},k=new Map([["aria",(e,t)=>{for(const n in t){const r=t[n],s="role"===n?n:`aria-${n}`;null==r?g(e,s):p(e,s,r)}return t}],["class",(e,t)=>w(e,t,null==t?"class":"className")],["data",(e,t)=>{const{dataset:n}=e;for(const e in t)null==t[e]?delete n[e]:n[e]=t[e];return t}],["ref",$],["style",(e,t)=>null==t?w(e,t,"style"):C(e.style,t,"cssText")]]),A=(e,r,s)=>{switch(r[0]){case".":return x;case"?":return N;case"@":return v;default:return s||"ownerSVGElement"in e?"ref"===r?$:y:k.get(r)||(r in e?r.startsWith("on")?C:((e,r)=>{let s;do{s=n(e,r)}while(!s&&(e=t(e)));return s})(e,r)?.set?w:y:y)}},W=(e,t)=>(e.textContent=null==t?"":t,t),M=(e,t,n)=>({a:e,b:t,c:n}),S=()=>M(null,null,r),E=(e,t)=>t.reduceRight(T,e),T=(e,t)=>e.childNodes[t];var B=e=>(t,n)=>{const{a:s,b:l,c:i}=e(t,n),o=document.importNode(s,!0);let c=r;if(l!==r){c=[];for(let e,t,n=0;n<l.length;n++){const{a:s,b:i,c:f}=l[n],p=s===t?e:e=E(o,t=s);c[n]=(a=i,u=p,h=f,d=i===O?[]:i===b?S():null,{v:r,u:a,t:u,n:h,c:d})}}var a,u,h,d;return((e,t)=>({b:e,c:t}))(i?o.firstChild:new f(o),c)};const j=/^(?:plaintext|script|style|textarea|title|xmp)$/i,D=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,L=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,P=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,z=/[\x01\x02]/g;let F,R,Z=document.createElement("template");var G=(e,t)=>{if(t)return F||(F=document.createElementNS("http://www.w3.org/2000/svg","svg"),R=s(),R.selectNodeContents(F)),R.createContextualFragment(e);Z.innerHTML=e;const{content:n}=Z;return Z=Z.cloneNode(!1),n};const H=e=>{const t=[];let n;for(;n=e.parentNode;)t.push(t.indexOf.call(n.childNodes,e)),e=n;return t},V=()=>document.createTextNode(""),_=(t,n,s)=>{const i=G(((e,t,n)=>{let r=0;return e.join("").trim().replace(L,((e,t,r,s)=>`<${t}${r.replace(P,"=$2$1").trimEnd()}${s?n||D.test(t)?" /":`></${t}`:""}>`)).replace(z,(e=>""===e?`\x3c!--${t+r++}--\x3e`:t+r++))})(t,I,s),s),{length:o}=t;let c=r;if(o>1){const t=[],r=document.createTreeWalker(i,129);let l=0,a=`${I}${l++}`;for(c=[];l<o;){const i=r.nextNode();if(8===i.nodeType){if(i.data===a){const r=e(n[l-1])?O:b;r===b&&t.push(i),c.push(M(H(i),r,null)),a=`${I}${l++}`}}else{let e;for(;i.hasAttribute(a);){e||(e=H(i));const t=i.getAttribute(a);c.push(M(e,A(i,t,s),t)),g(i,a),a=`${I}${l++}`}!s&&j.test(i.localName)&&i.textContent.trim()===`\x3c!--${a}--\x3e`&&(c.push(M(e||H(i),W,null)),a=`${I}${l++}`)}}for(l=0;l<t.length;l++)t[l].replaceWith(V())}const{childNodes:a}=i;let{length:u}=a;return u<1?(u=1,i.appendChild(V())):1===u&&1!==o&&1!==a[0].nodeType&&(u=0),l(q,t,M(i,c,1===u))},q=new WeakMap,I="isµ";var J=e=>(t,n)=>q.get(t)||_(t,n,e);const K=B(J(!1)),Q=B(J(!0)),U=(e,{s:t,t:n,v:r})=>{if(e.a!==n){const{b:s,c:l}=(t?Q:K)(n,r);e.a=n,e.b=s,e.c=l}for(let{c:t}=e,n=0;n<t.length;n++){const e=r[n],s=t[n];switch(s.u){case O:s.v=O(s.t,X(s.c,e),s.v);break;case b:const t=e instanceof Y?U(s.c||(s.c=S()),e):(s.c=null,e);t!==s.v&&(s.v=b(s,t));break;default:e!==s.v&&(s.v=s.u(s.t,e,s.n,s.v))}}return e.b},X=(e,t)=>{let n=0,{length:r}=t;for(r<e.length&&e.splice(r);n<r;n++){const r=t[n];r instanceof Y?t[n]=U(e[n]||(e[n]=S()),r):e[n]=null}return t};class Y{constructor(e,t,n){this.s=e,this.t=t,this.v=n}toDOM(e=S()){return U(e,this)}}const ee=new WeakMap;var te=(e,t)=>{const n=ee.get(e)||l(ee,e,S()),{b:r}=n;return r!==("function"==typeof t?t():t).toDOM(n)&&e.replaceChildren(n.b.valueOf()),e};
/*! (c) Andrea Giammarchi - MIT */const ne=e=>(t,...n)=>new Y(e,t,n),re=ne(!1),se=ne(!0);export{Y as Hole,k as attr,re as html,te as render,se as svg};
const{isArray:e}=Array,{getPrototypeOf:t,getOwnPropertyDescriptor:n}=Object,r=[],s=()=>document.createRange(),l=(e,t,n)=>(e.set(t,n),n),i=(e,t)=>t.reduceRight(o,e),o=(e,t)=>e.childNodes[t],{setPrototypeOf:c}=Object;let a;var u=(e,t,n)=>(a||(a=s()),n?a.setStartAfter(e):a.setStartBefore(e),a.setEndAfter(t),a.deleteContents(),e);const h=({firstChild:e,lastChild:t},n)=>u(e,t,n);let d=!1;const f=(e,t)=>d&&11===e.nodeType?1/t<0?t?h(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e,p=e=>document.createComment(e);class g extends((e=>{function t(e){return c(e,new.target.prototype)}return t.prototype=e.prototype,t})(DocumentFragment)){#e=p("<>");#t=p("</>");#n=r;constructor(e){super(e),this.replaceChildren(this.#e,...e.childNodes,this.#t),d=!0}get firstChild(){return this.#e}get lastChild(){return this.#t}get parentNode(){return this.#e.parentNode}remove(){h(this,!1)}replaceWith(e){h(this,!0).replaceWith(e)}valueOf(){const{parentNode:e}=this;if(e===this)this.#n===r&&(this.#n=[...this.childNodes]);else{if(e){let{firstChild:e,lastChild:t}=this;for(this.#n=[e];e!==t;)this.#n.push(e=e.nextSibling)}this.replaceChildren(...this.#n)}return this}}const m=(e,t,n)=>e.setAttribute(t,n),v=(e,t)=>e.removeAttribute(t);let b;const C=(t,n,r)=>{r=r.slice(1),b||(b=new WeakMap);const s=b.get(t)||l(b,t,{});let i=s[r];return i&&i[0]&&t.removeEventListener(r,...i),i=e(n)?n:[n,!1],s[r]=i,i[0]&&t.addEventListener(r,...i),n},x=(e,t)=>{const{t:n,n:r}=e;let s=!1;switch(typeof t){case"object":if(null!==t){(r||n).replaceWith(e.n=t.valueOf());break}case"undefined":s=!0;default:n.data=s?"":t,r&&(e.n=null,r.replaceWith(n))}return t},w=(e,t,n)=>e[n]=t,$=(e,t,n)=>w(e,t,n.slice(1)),y=(e,t,n)=>null==t?(v(e,n),t):w(e,t,n),N=(e,t)=>("function"==typeof t?t(e):t.current=e,t),O=(e,t,n)=>(null==t?v(e,n):m(e,n,t),t),k=(e,t,n)=>(e.toggleAttribute(n.slice(1),t),t),A=(e,t,n)=>{const{length:s}=t;if(e.data=`[${s}]`,s)return((e,t,n,r,s)=>{const l=n.length;let i=t.length,o=l,c=0,a=0,u=null;for(;c<i||a<o;)if(i===c){const t=o<l?a?r(n[a-1],-0).nextSibling:r(n[o-a],0):s;for(;a<o;)e.insertBefore(r(n[a++],1),t)}else if(o===a)for(;c<i;)u&&u.has(t[c])||e.removeChild(r(t[c],-1)),c++;else if(t[c]===n[a])c++,a++;else if(t[i-1]===n[o-1])i--,o--;else if(t[c]===n[o-1]&&n[a]===t[i-1]){const s=r(t[--i],-1).nextSibling;e.insertBefore(r(n[a++],1),r(t[c++],-1).nextSibling),e.insertBefore(r(n[--o],1),s),t[i]=n[o]}else{if(!u){u=new Map;let e=a;for(;e<o;)u.set(n[e],e++)}if(u.has(t[c])){const s=u.get(t[c]);if(a<s&&s<o){let l=c,h=1;for(;++l<i&&l<o&&u.get(t[l])===s+h;)h++;if(h>s-a){const l=r(t[c],0);for(;a<s;)e.insertBefore(r(n[a++],1),l)}else e.replaceChild(r(n[a++],1),r(t[c++],-1))}else c++}else e.removeChild(r(t[c++],-1))}return n})(e.parentNode,n,t,f,e);switch(n.length){case 1:n[0].remove();case 0:break;default:u(f(n[0],0),f(n.at(-1),-0),!1)}return r},W=new Map([["aria",(e,t)=>{for(const n in t){const r=t[n],s="role"===n?n:`aria-${n}`;null==r?v(e,s):m(e,s,r)}return t}],["class",(e,t)=>y(e,t,null==t?"class":"className")],["data",(e,t)=>{const{dataset:n}=e;for(const e in t)null==t[e]?delete n[e]:n[e]=t[e];return t}],["ref",N],["style",(e,t)=>null==t?y(e,t,"style"):w(e.style,t,"cssText")]]),M=(e,r,s)=>{switch(r[0]){case".":return $;case"?":return k;case"@":return C;default:return s||"ownerSVGElement"in e?"ref"===r?N:O:W.get(r)||(r in e?r.startsWith("on")?w:((e,r)=>{let s;do{s=n(e,r)}while(!s&&(e=t(e)));return s})(e,r)?.set?y:O:O)}},S=(e,t)=>(e.textContent=null==t?"":t,t),E=(e,t,n)=>({a:e,b:t,c:n}),T=()=>E(null,null,r);var B=e=>(t,n)=>{const{a:s,b:l,c:o}=e(t,n),c=document.importNode(s,!0);let a=r;if(l!==r){a=[];for(let e,t,n=0;n<l.length;n++){const{a:s,b:o,c:p}=l[n],g=s===t?e:e=i(c,t=s);a[n]=(u=o,h=g,d=p,f=o===A?[]:o===x?T():null,{v:r,u:u,t:h,n:d,c:f})}}var u,h,d,f;return((e,t)=>({b:e,c:t}))(o?c.firstChild:new g(c),a)};const j=/^(?:plaintext|script|style|textarea|title|xmp)$/i,D=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,L=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,P=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,z=/[\x01\x02]/g;let F,R,Z=document.createElement("template");var G=(e,t)=>{if(t)return F||(F=document.createElementNS("http://www.w3.org/2000/svg","svg"),R=s(),R.selectNodeContents(F)),R.createContextualFragment(e);Z.innerHTML=e;const{content:n}=Z;return Z=Z.cloneNode(!1),n};const H=e=>{const t=[];let n;for(;n=e.parentNode;)t.push(t.indexOf.call(n.childNodes,e)),e=n;return t},V=()=>document.createTextNode(""),_=(t,n,s)=>{const i=G(((e,t,n)=>{let r=0;return e.join("").trim().replace(L,((e,t,r,s)=>`<${t}${r.replace(P,"=$2$1").trimEnd()}${s?n||D.test(t)?" /":`></${t}`:""}>`)).replace(z,(e=>""===e?`\x3c!--${t+r++}--\x3e`:t+r++))})(t,I,s),s),{length:o}=t;let c=r;if(o>1){const t=[],r=document.createTreeWalker(i,129);let l=0,a=`${I}${l++}`;for(c=[];l<o;){const i=r.nextNode();if(8===i.nodeType){if(i.data===a){const r=e(n[l-1])?A:x;r===x&&t.push(i),c.push(E(H(i),r,null)),a=`${I}${l++}`}}else{let e;for(;i.hasAttribute(a);){e||(e=H(i));const t=i.getAttribute(a);c.push(E(e,M(i,t,s),t)),v(i,a),a=`${I}${l++}`}!s&&j.test(i.localName)&&i.textContent.trim()===`\x3c!--${a}--\x3e`&&(c.push(E(e||H(i),S,null)),a=`${I}${l++}`)}}for(l=0;l<t.length;l++)t[l].replaceWith(V())}const{childNodes:a}=i;let{length:u}=a;return u<1?(u=1,i.appendChild(V())):1===u&&1!==o&&1!==a[0].nodeType&&(u=0),l(q,t,E(i,c,1===u))},q=new WeakMap,I="isµ";var J=e=>(t,n)=>q.get(t)||_(t,n,e);const K=B(J(!1)),Q=B(J(!0)),U=(e,{s:t,t:n,v:r})=>{if(e.a!==n){const{b:s,c:l}=(t?Q:K)(n,r);e.a=n,e.b=s,e.c=l}for(let{c:t}=e,n=0;n<t.length;n++){const e=r[n],s=t[n];switch(s.u){case A:s.v=A(s.t,X(s.c,e),s.v);break;case x:const t=e instanceof Y?U(s.c||(s.c=T()),e):(s.c=null,e);t!==s.v&&(s.v=x(s,t));break;default:e!==s.v&&(s.v=s.u(s.t,e,s.n,s.v))}}return e.b},X=(e,t)=>{let n=0,{length:r}=t;for(r<e.length&&e.splice(r);n<r;n++){const r=t[n];r instanceof Y?t[n]=U(e[n]||(e[n]=T()),r):e[n]=null}return t};class Y{constructor(e,t,n){this.s=e,this.t=t,this.v=n}toDOM(e=T()){return U(e,this)}}const ee=new WeakMap;var te=(e,t)=>{const n=ee.get(e)||l(ee,e,T()),{b:r}=n;return r!==("function"==typeof t?t():t).toDOM(n)&&e.replaceChildren(n.b.valueOf()),e};
/*! (c) Andrea Giammarchi - MIT */const ne=e=>(t,...n)=>new Y(e,t,n),re=ne(!1),se=ne(!0);export{Y as Hole,W as attr,re as html,te as render,se as svg};

@@ -1,4 +0,4 @@

var e=e=>function(t){const{constructor:n}=e.createDocumentFragment();const{isArray:r}=Array,{getPrototypeOf:s,getOwnPropertyDescriptor:l}=Object,i=[],o=()=>e.createRange(),a=(e,t,n)=>(e.set(t,n),n),{setPrototypeOf:c}=Object;let u;var h=(e,t,n)=>(u||(u=o()),n?u.setStartAfter(e):u.setStartBefore(e),u.setEndAfter(t),u.deleteContents(),e);const d=({firstChild:e,lastChild:t},n)=>h(e,t,n);let f=!1;const p=(e,t)=>f&&11===e.nodeType?1/t<0?t?d(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e,g=t=>e.createComment(t);class v extends((e=>{function t(e){return c(e,new.target.prototype)}return t.prototype=e.prototype,t})(n)){#e=g("<>");#t=g("</>");#n=i;constructor(e){super(e),this.replaceChildren(this.#e,...e.childNodes,this.#t),f=!0}get firstChild(){return this.#e}get lastChild(){return this.#t}get parentNode(){return this.#e.parentNode}remove(){d(this,!1)}replaceWith(e){d(this,!0).replaceWith(e)}valueOf(){let{firstChild:e,lastChild:t,parentNode:n}=this;if(n===this)this.#n===i&&(this.#n=[...this.childNodes]);else{if(n)for(this.#n=[e];e!==t;)this.#n.push(e=e.nextSibling);this.replaceChildren(...this.#n)}return this}}const b=(e,t,n)=>e.setAttribute(t,n),m=(e,t)=>e.removeAttribute(t);let C;const w=(e,t,n)=>{n=n.slice(1),C||(C=new WeakMap);const s=C.get(e)||a(C,e,{});let l=s[n];return l&&l[0]&&e.removeEventListener(n,...l),l=r(t)?t:[t,!1],s[n]=l,l[0]&&e.addEventListener(n,...l),t},x=(e,t)=>{const{t:n,n:r}=e;let s=!1;switch(typeof t){case"object":if(null!==t){(r||n).replaceWith(e.n=t.valueOf());break}case"undefined":s=!0;default:n.data=s?"":t,r&&(e.n=null,r.replaceWith(n))}return t},$=(e,t,n)=>e[n]=t,y=(e,t,n)=>$(e,t,n.slice(1)),N=(e,t,n)=>null==t?(m(e,n),t):$(e,t,n),O=(e,t)=>("function"==typeof t?t(e):t.current=e,t),k=(e,t,n)=>(null==t?m(e,n):b(e,n,t),t),A=(e,t,n)=>(e.toggleAttribute(n.slice(1),t),t),M=(e,t,n)=>{const{length:r}=t;if(e.data=`[${r}]`,r)return((e,t,n,r,s)=>{const l=n.length;let i=t.length,o=l,a=0,c=0,u=null;for(;a<i||c<o;)if(i===a){const t=o<l?c?r(n[c-1],-0).nextSibling:r(n[o-c],0):s;for(;c<o;)e.insertBefore(r(n[c++],1),t)}else if(o===c)for(;a<i;)u&&u.has(t[a])||e.removeChild(r(t[a],-1)),a++;else if(t[a]===n[c])a++,c++;else if(t[i-1]===n[o-1])i--,o--;else if(t[a]===n[o-1]&&n[c]===t[i-1]){const s=r(t[--i],-1).nextSibling;e.insertBefore(r(n[c++],1),r(t[a++],-1).nextSibling),e.insertBefore(r(n[--o],1),s),t[i]=n[o]}else{if(!u){u=new Map;let e=c;for(;e<o;)u.set(n[e],e++)}if(u.has(t[a])){const s=u.get(t[a]);if(c<s&&s<o){let l=a,h=1;for(;++l<i&&l<o&&u.get(t[l])===s+h;)h++;if(h>s-c){const l=r(t[a],0);for(;c<s;)e.insertBefore(r(n[c++],1),l)}else e.replaceChild(r(n[c++],1),r(t[a++],-1))}else a++}else e.removeChild(r(t[a++],-1))}return n})(e.parentNode,n,t,p,e);switch(n.length){case 1:n[0].remove();case 0:break;default:h(p(n[0],0),p(n.at(-1),-0),!1)}return i},W=new Map([["aria",(e,t)=>{for(const n in t){const r=t[n],s="role"===n?n:`aria-${n}`;null==r?m(e,s):b(e,s,r)}return t}],["class",(e,t)=>N(e,t,null==t?"class":"className")],["data",(e,t)=>{const{dataset:n}=e;for(const e in t)null==t[e]?delete n[e]:n[e]=t[e];return t}],["ref",O],["style",(e,t)=>null==t?N(e,t,"style"):$(e.style,t,"cssText")]]),S=(e,t,n)=>{switch(t[0]){case".":return y;case"?":return A;case"@":return w;default:return n||"ownerSVGElement"in e?"ref"===t?O:k:W.get(t)||(t in e?t.startsWith("on")?$:((e,t)=>{let n;do{n=l(e,t)}while(!n&&(e=s(e)));return n})(e,t)?.set?N:k:k)}},E=(e,t)=>(e.textContent=null==t?"":t,t),T=(e,t,n)=>({a:e,b:t,c:n}),B=()=>T(null,null,i),D=(e,t)=>t.reduceRight(j,e),j=(e,t)=>e.childNodes[t];var F=t=>(n,r)=>{const{a:s,b:l,c:o}=t(n,r),a=e.importNode(s,!0);let c=i;if(l!==i){c=[];for(let e,t,n=0;n<l.length;n++){const{a:r,b:s,c:o}=l[n],p=r===t?e:e=D(a,t=r);c[n]=(u=s,h=p,d=o,f=s===M?[]:s===x?B():null,{v:i,u:u,t:h,n:d,c:f})}}var u,h,d,f;return((e,t)=>({b:e,c:t}))(o?a.firstChild:new v(a),c)};const L=/^(?:plaintext|script|style|textarea|title|xmp)$/i,P=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,z=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,H=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,R=/[\x01\x02]/g;let Z,G,V=e.createElement("template");var _=(t,n)=>{if(n)return Z||(Z=e.createElementNS("http://www.w3.org/2000/svg","svg"),G=o(),G.selectNodeContents(Z)),G.createContextualFragment(t);V.innerHTML=t;const{content:r}=V;return V=V.cloneNode(!1),r};const q=e=>{const t=[];let n;for(;n=e.parentNode;)t.push(t.indexOf.call(n.childNodes,e)),e=n;return t},I=()=>e.createTextNode(""),J=(t,n,s)=>{const l=_(((e,t,n)=>{let r=0;return e.join("").trim().replace(z,((e,t,r,s)=>`<${t}${r.replace(H,"=$2$1").trimEnd()}${s?n||P.test(t)?" /":`></${t}`:""}>`)).replace(R,(e=>""===e?`\x3c!--${t+r++}--\x3e`:t+r++))})(t,Q,s),s),{length:o}=t;let c=i;if(o>1){const t=[],i=e.createTreeWalker(l,129);let a=0,u=`${Q}${a++}`;for(c=[];a<o;){const e=i.nextNode();if(8===e.nodeType){if(e.data===u){const s=r(n[a-1])?M:x;s===x&&t.push(e),c.push(T(q(e),s,null)),u=`${Q}${a++}`}}else{let t;for(;e.hasAttribute(u);){t||(t=q(e));const n=e.getAttribute(u);c.push(T(t,S(e,n,s),n)),m(e,u),u=`${Q}${a++}`}!s&&L.test(e.localName)&&e.textContent.trim()===`\x3c!--${u}--\x3e`&&(c.push(T(t||q(e),E,null)),u=`${Q}${a++}`)}}for(a=0;a<t.length;a++)t[a].replaceWith(I())}const{childNodes:u}=l;let{length:h}=u;return h<1?(h=1,l.appendChild(I())):1===h&&1!==o&&1!==u[0].nodeType&&(h=0),a(K,t,T(l,c,1===h))},K=new WeakMap,Q="isµ";var U=e=>(t,n)=>K.get(t)||J(t,n,e);const X=F(U(!1)),Y=F(U(!0)),ee=(e,{s:t,t:n,v:r})=>{if(e.a!==n){const{b:s,c:l}=(t?Y:X)(n,r);e.a=n,e.b=s,e.c=l}for(let{c:t}=e,n=0;n<t.length;n++){const e=r[n],s=t[n];switch(s.u){case M:s.v=M(s.t,te(s.c,e),s.v);break;case x:const t=e instanceof ne?ee(s.c||(s.c=B()),e):(s.c=null,e);t!==s.v&&(s.v=x(s,t));break;default:e!==s.v&&(s.v=s.u(s.t,e,s.n,s.v))}}return e.b},te=(e,t)=>{let n=0,{length:r}=t;for(r<e.length&&e.splice(r);n<r;n++){const r=t[n];r instanceof ne?t[n]=ee(e[n]||(e[n]=B()),r):e[n]=null}return t};class ne{constructor(e,t,n){this.s=e,this.t=t,this.v=n}toDOM(e=B()){return ee(e,this)}}
/*! (c) Andrea Giammarchi - MIT */const re=e=>(t,...n)=>new ne(e,t,n),se=re(!1),le=re(!0),ie=new WeakMap;
var e=e=>function(){const{constructor:t}=e.createDocumentFragment();const{isArray:n}=Array,{getPrototypeOf:r,getOwnPropertyDescriptor:s}=Object,l=[],i=()=>e.createRange(),o=(e,t,n)=>(e.set(t,n),n),a=(e,t)=>t.reduceRight(c,e),c=(e,t)=>e.childNodes[t],{setPrototypeOf:h}=Object;let u;var d=(e,t,n)=>(u||(u=i()),n?u.setStartAfter(e):u.setStartBefore(e),u.setEndAfter(t),u.deleteContents(),e);const f=({firstChild:e,lastChild:t},n)=>d(e,t,n);let p=!1;const g=(e,t)=>p&&11===e.nodeType?1/t<0?t?f(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e,v=t=>e.createComment(t);class b extends((e=>{function t(e){return h(e,new.target.prototype)}return t.prototype=e.prototype,t})(t)){#e=v("<>");#t=v("</>");#n=l;constructor(e){super(e),this.replaceChildren(this.#e,...e.childNodes,this.#t),p=!0}get firstChild(){return this.#e}get lastChild(){return this.#t}get parentNode(){return this.#e.parentNode}remove(){f(this,!1)}replaceWith(e){f(this,!0).replaceWith(e)}valueOf(){const{parentNode:e}=this;if(e===this)this.#n===l&&(this.#n=[...this.childNodes]);else{if(e){let{firstChild:e,lastChild:t}=this;for(this.#n=[e];e!==t;)this.#n.push(e=e.nextSibling)}this.replaceChildren(...this.#n)}return this}}const m=(e,t,n)=>e.setAttribute(t,n),C=(e,t)=>e.removeAttribute(t);let w;const x=(e,t,r)=>{r=r.slice(1),w||(w=new WeakMap);const s=w.get(e)||o(w,e,{});let l=s[r];return l&&l[0]&&e.removeEventListener(r,...l),l=n(t)?t:[t,!1],s[r]=l,l[0]&&e.addEventListener(r,...l),t},$=(e,t)=>{const{t:n,n:r}=e;let s=!1;switch(typeof t){case"object":if(null!==t){(r||n).replaceWith(e.n=t.valueOf());break}case"undefined":s=!0;default:n.data=s?"":t,r&&(e.n=null,r.replaceWith(n))}return t},y=(e,t,n)=>e[n]=t,N=(e,t,n)=>y(e,t,n.slice(1)),O=(e,t,n)=>null==t?(C(e,n),t):y(e,t,n),k=(e,t)=>("function"==typeof t?t(e):t.current=e,t),A=(e,t,n)=>(null==t?C(e,n):m(e,n,t),t),M=(e,t,n)=>(e.toggleAttribute(n.slice(1),t),t),W=(e,t,n)=>{const{length:r}=t;if(e.data=`[${r}]`,r)return((e,t,n,r,s)=>{const l=n.length;let i=t.length,o=l,a=0,c=0,h=null;for(;a<i||c<o;)if(i===a){const t=o<l?c?r(n[c-1],-0).nextSibling:r(n[o-c],0):s;for(;c<o;)e.insertBefore(r(n[c++],1),t)}else if(o===c)for(;a<i;)h&&h.has(t[a])||e.removeChild(r(t[a],-1)),a++;else if(t[a]===n[c])a++,c++;else if(t[i-1]===n[o-1])i--,o--;else if(t[a]===n[o-1]&&n[c]===t[i-1]){const s=r(t[--i],-1).nextSibling;e.insertBefore(r(n[c++],1),r(t[a++],-1).nextSibling),e.insertBefore(r(n[--o],1),s),t[i]=n[o]}else{if(!h){h=new Map;let e=c;for(;e<o;)h.set(n[e],e++)}if(h.has(t[a])){const s=h.get(t[a]);if(c<s&&s<o){let l=a,u=1;for(;++l<i&&l<o&&h.get(t[l])===s+u;)u++;if(u>s-c){const l=r(t[a],0);for(;c<s;)e.insertBefore(r(n[c++],1),l)}else e.replaceChild(r(n[c++],1),r(t[a++],-1))}else a++}else e.removeChild(r(t[a++],-1))}return n})(e.parentNode,n,t,g,e);switch(n.length){case 1:n[0].remove();case 0:break;default:d(g(n[0],0),g(n.at(-1),-0),!1)}return l},S=new Map([["aria",(e,t)=>{for(const n in t){const r=t[n],s="role"===n?n:`aria-${n}`;null==r?C(e,s):m(e,s,r)}return t}],["class",(e,t)=>O(e,t,null==t?"class":"className")],["data",(e,t)=>{const{dataset:n}=e;for(const e in t)null==t[e]?delete n[e]:n[e]=t[e];return t}],["ref",k],["style",(e,t)=>null==t?O(e,t,"style"):y(e.style,t,"cssText")]]),E=(e,t,n)=>{switch(t[0]){case".":return N;case"?":return M;case"@":return x;default:return n||"ownerSVGElement"in e?"ref"===t?k:A:S.get(t)||(t in e?t.startsWith("on")?y:((e,t)=>{let n;do{n=s(e,t)}while(!n&&(e=r(e)));return n})(e,t)?.set?O:A:A)}},T=(e,t)=>(e.textContent=null==t?"":t,t),B=(e,t,n)=>({a:e,b:t,c:n}),D=()=>B(null,null,l);var j=t=>(n,r)=>{const{a:s,b:i,c:o}=t(n,r),c=e.importNode(s,!0);let h=l;if(i!==l){h=[];for(let e,t,n=0;n<i.length;n++){const{a:r,b:s,c:o}=i[n],g=r===t?e:e=a(c,t=r);h[n]=(u=s,d=g,f=o,p=s===W?[]:s===$?D():null,{v:l,u:u,t:d,n:f,c:p})}}var u,d,f,p;return((e,t)=>({b:e,c:t}))(o?c.firstChild:new b(c),h)};const F=/^(?:plaintext|script|style|textarea|title|xmp)$/i,L=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,P=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,z=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,H=/[\x01\x02]/g;let R,Z,G=e.createElement("template");var V=(t,n)=>{if(n)return R||(R=e.createElementNS("http://www.w3.org/2000/svg","svg"),Z=i(),Z.selectNodeContents(R)),Z.createContextualFragment(t);G.innerHTML=t;const{content:r}=G;return G=G.cloneNode(!1),r};const _=e=>{const t=[];let n;for(;n=e.parentNode;)t.push(t.indexOf.call(n.childNodes,e)),e=n;return t},q=()=>e.createTextNode(""),I=(t,r,s)=>{const i=V(((e,t,n)=>{let r=0;return e.join("").trim().replace(P,((e,t,r,s)=>`<${t}${r.replace(z,"=$2$1").trimEnd()}${s?n||L.test(t)?" /":`></${t}`:""}>`)).replace(H,(e=>""===e?`\x3c!--${t+r++}--\x3e`:t+r++))})(t,K,s),s),{length:a}=t;let c=l;if(a>1){const t=[],l=e.createTreeWalker(i,129);let o=0,h=`${K}${o++}`;for(c=[];o<a;){const e=l.nextNode();if(8===e.nodeType){if(e.data===h){const s=n(r[o-1])?W:$;s===$&&t.push(e),c.push(B(_(e),s,null)),h=`${K}${o++}`}}else{let t;for(;e.hasAttribute(h);){t||(t=_(e));const n=e.getAttribute(h);c.push(B(t,E(e,n,s),n)),C(e,h),h=`${K}${o++}`}!s&&F.test(e.localName)&&e.textContent.trim()===`\x3c!--${h}--\x3e`&&(c.push(B(t||_(e),T,null)),h=`${K}${o++}`)}}for(o=0;o<t.length;o++)t[o].replaceWith(q())}const{childNodes:h}=i;let{length:u}=h;return u<1?(u=1,i.appendChild(q())):1===u&&1!==a&&1!==h[0].nodeType&&(u=0),o(J,t,B(i,c,1===u))},J=new WeakMap,K="isµ";var Q=e=>(t,n)=>J.get(t)||I(t,n,e);const U=j(Q(!1)),X=j(Q(!0)),Y=(e,{s:t,t:n,v:r})=>{if(e.a!==n){const{b:s,c:l}=(t?X:U)(n,r);e.a=n,e.b=s,e.c=l}for(let{c:t}=e,n=0;n<t.length;n++){const e=r[n],s=t[n];switch(s.u){case W:s.v=W(s.t,ee(s.c,e),s.v);break;case $:const t=e instanceof te?Y(s.c||(s.c=D()),e):(s.c=null,e);t!==s.v&&(s.v=$(s,t));break;default:e!==s.v&&(s.v=s.u(s.t,e,s.n,s.v))}}return e.b},ee=(e,t)=>{let n=0,{length:r}=t;for(r<e.length&&e.splice(r);n<r;n++){const r=t[n];r instanceof te?t[n]=Y(e[n]||(e[n]=D()),r):e[n]=null}return t};class te{constructor(e,t,n){this.s=e,this.t=t,this.v=n}toDOM(e=D()){return Y(e,this)}}
/*! (c) Andrea Giammarchi - MIT */const ne=e=>(t,...n)=>new te(e,t,n),re=ne(!1),se=ne(!0),le=new WeakMap;
/*! (c) Andrea Giammarchi - MIT */
const oe=new WeakMap,ae=e=>(t,n)=>{const r=oe.get(t)||a(oe,t,new Map);return r.get(n)||a(r,n,function(t,...n){return new ne(e,t,n).toDOM(this)}.bind(B()))},ce=ae(!1),ue=ae(!0);return t.Hole=ne,t.attr=W,t.html=se,t.htmlFor=ce,t.render=(e,t)=>((e,t,n)=>{const r=ie.get(e)||a(ie,e,B()),{b:s}=r,l=n&&"function"==typeof t?t():t,i=l instanceof ne?l.toDOM(r):l;return s!==i&&e.replaceChildren((r.b=i).valueOf()),e})(e,t,!0),t.svg=le,t.svgFor=ue,t}({});export{e as default};
const ie=new WeakMap,oe=e=>(t,n)=>{const r=ie.get(t)||o(ie,t,new Map);return r.get(n)||o(r,n,function(t,...n){return new te(e,t,n).toDOM(this)}.bind(D()))},ae=oe(!1),ce=oe(!0);return{Hole:te,attr:S,html:re,htmlFor:ae,render:(e,t)=>((e,t,n)=>{const r=le.get(e)||o(le,e,D()),{b:s}=r,l=n&&"function"==typeof t?t():t,i=l instanceof te?l.toDOM(r):l;return s!==i&&e.replaceChildren((r.b=i).valueOf()),e})(e,t,!0),svg:se,svgFor:ce}}();export{e as default};

@@ -1,3 +0,3 @@

const{isArray:e}=Array,{getPrototypeOf:t,getOwnPropertyDescriptor:n}=Object,r=[],s=()=>document.createRange(),l=(e,t,n)=>(e.set(t,n),n),{setPrototypeOf:i}=Object;let o;var c=(e,t,n)=>(o||(o=s()),n?o.setStartAfter(e):o.setStartBefore(e),o.setEndAfter(t),o.deleteContents(),e);const a=({firstChild:e,lastChild:t},n)=>c(e,t,n);let u=!1;const h=(e,t)=>u&&11===e.nodeType?1/t<0?t?a(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e,d=e=>document.createComment(e);class f extends((e=>{function t(e){return i(e,new.target.prototype)}return t.prototype=e.prototype,t})(DocumentFragment)){#e=d("<>");#t=d("</>");#n=r;constructor(e){super(e),this.replaceChildren(this.#e,...e.childNodes,this.#t),u=!0}get firstChild(){return this.#e}get lastChild(){return this.#t}get parentNode(){return this.#e.parentNode}remove(){a(this,!1)}replaceWith(e){a(this,!0).replaceWith(e)}valueOf(){let{firstChild:e,lastChild:t,parentNode:n}=this;if(n===this)this.#n===r&&(this.#n=[...this.childNodes]);else{if(n)for(this.#n=[e];e!==t;)this.#n.push(e=e.nextSibling);this.replaceChildren(...this.#n)}return this}}const p=(e,t,n)=>e.setAttribute(t,n),g=(e,t)=>e.removeAttribute(t);let m;const b=(t,n,r)=>{r=r.slice(1),m||(m=new WeakMap);const s=m.get(t)||l(m,t,{});let i=s[r];return i&&i[0]&&t.removeEventListener(r,...i),i=e(n)?n:[n,!1],s[r]=i,i[0]&&t.addEventListener(r,...i),n},v=(e,t)=>{const{t:n,n:r}=e;let s=!1;switch(typeof t){case"object":if(null!==t){(r||n).replaceWith(e.n=t.valueOf());break}case"undefined":s=!0;default:n.data=s?"":t,r&&(e.n=null,r.replaceWith(n))}return t},C=(e,t,n)=>e[n]=t,w=(e,t,n)=>C(e,t,n.slice(1)),x=(e,t,n)=>null==t?(g(e,n),t):C(e,t,n),$=(e,t)=>("function"==typeof t?t(e):t.current=e,t),y=(e,t,n)=>(null==t?g(e,n):p(e,n,t),t),N=(e,t,n)=>(e.toggleAttribute(n.slice(1),t),t),O=(e,t,n)=>{const{length:s}=t;if(e.data=`[${s}]`,s)return((e,t,n,r,s)=>{const l=n.length;let i=t.length,o=l,c=0,a=0,u=null;for(;c<i||a<o;)if(i===c){const t=o<l?a?r(n[a-1],-0).nextSibling:r(n[o-a],0):s;for(;a<o;)e.insertBefore(r(n[a++],1),t)}else if(o===a)for(;c<i;)u&&u.has(t[c])||e.removeChild(r(t[c],-1)),c++;else if(t[c]===n[a])c++,a++;else if(t[i-1]===n[o-1])i--,o--;else if(t[c]===n[o-1]&&n[a]===t[i-1]){const s=r(t[--i],-1).nextSibling;e.insertBefore(r(n[a++],1),r(t[c++],-1).nextSibling),e.insertBefore(r(n[--o],1),s),t[i]=n[o]}else{if(!u){u=new Map;let e=a;for(;e<o;)u.set(n[e],e++)}if(u.has(t[c])){const s=u.get(t[c]);if(a<s&&s<o){let l=c,h=1;for(;++l<i&&l<o&&u.get(t[l])===s+h;)h++;if(h>s-a){const l=r(t[c],0);for(;a<s;)e.insertBefore(r(n[a++],1),l)}else e.replaceChild(r(n[a++],1),r(t[c++],-1))}else c++}else e.removeChild(r(t[c++],-1))}return n})(e.parentNode,n,t,h,e);switch(n.length){case 1:n[0].remove();case 0:break;default:c(h(n[0],0),h(n.at(-1),-0),!1)}return r},k=new Map([["aria",(e,t)=>{for(const n in t){const r=t[n],s="role"===n?n:`aria-${n}`;null==r?g(e,s):p(e,s,r)}return t}],["class",(e,t)=>x(e,t,null==t?"class":"className")],["data",(e,t)=>{const{dataset:n}=e;for(const e in t)null==t[e]?delete n[e]:n[e]=t[e];return t}],["ref",$],["style",(e,t)=>null==t?x(e,t,"style"):C(e.style,t,"cssText")]]),A=(e,r,s)=>{switch(r[0]){case".":return w;case"?":return N;case"@":return b;default:return s||"ownerSVGElement"in e?"ref"===r?$:y:k.get(r)||(r in e?r.startsWith("on")?C:((e,r)=>{let s;do{s=n(e,r)}while(!s&&(e=t(e)));return s})(e,r)?.set?x:y:y)}},M=(e,t)=>(e.textContent=null==t?"":t,t),W=(e,t,n)=>({a:e,b:t,c:n}),S=()=>W(null,null,r),E=(e,t)=>t.reduceRight(T,e),T=(e,t)=>e.childNodes[t];var B=e=>(t,n)=>{const{a:s,b:l,c:i}=e(t,n),o=document.importNode(s,!0);let c=r;if(l!==r){c=[];for(let e,t,n=0;n<l.length;n++){const{a:s,b:i,c:f}=l[n],p=s===t?e:e=E(o,t=s);c[n]=(a=i,u=p,h=f,d=i===O?[]:i===v?S():null,{v:r,u:a,t:u,n:h,c:d})}}var a,u,h,d;return((e,t)=>({b:e,c:t}))(i?o.firstChild:new f(o),c)};const D=/^(?:plaintext|script|style|textarea|title|xmp)$/i,j=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,L=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,P=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,z=/[\x01\x02]/g;let F,R,Z=document.createElement("template");var G=(e,t)=>{if(t)return F||(F=document.createElementNS("http://www.w3.org/2000/svg","svg"),R=s(),R.selectNodeContents(F)),R.createContextualFragment(e);Z.innerHTML=e;const{content:n}=Z;return Z=Z.cloneNode(!1),n};const H=e=>{const t=[];let n;for(;n=e.parentNode;)t.push(t.indexOf.call(n.childNodes,e)),e=n;return t},V=()=>document.createTextNode(""),_=(t,n,s)=>{const i=G(((e,t,n)=>{let r=0;return e.join("").trim().replace(L,((e,t,r,s)=>`<${t}${r.replace(P,"=$2$1").trimEnd()}${s?n||j.test(t)?" /":`></${t}`:""}>`)).replace(z,(e=>""===e?`\x3c!--${t+r++}--\x3e`:t+r++))})(t,I,s),s),{length:o}=t;let c=r;if(o>1){const t=[],r=document.createTreeWalker(i,129);let l=0,a=`${I}${l++}`;for(c=[];l<o;){const i=r.nextNode();if(8===i.nodeType){if(i.data===a){const r=e(n[l-1])?O:v;r===v&&t.push(i),c.push(W(H(i),r,null)),a=`${I}${l++}`}}else{let e;for(;i.hasAttribute(a);){e||(e=H(i));const t=i.getAttribute(a);c.push(W(e,A(i,t,s),t)),g(i,a),a=`${I}${l++}`}!s&&D.test(i.localName)&&i.textContent.trim()===`\x3c!--${a}--\x3e`&&(c.push(W(e||H(i),M,null)),a=`${I}${l++}`)}}for(l=0;l<t.length;l++)t[l].replaceWith(V())}const{childNodes:a}=i;let{length:u}=a;return u<1?(u=1,i.appendChild(V())):1===u&&1!==o&&1!==a[0].nodeType&&(u=0),l(q,t,W(i,c,1===u))},q=new WeakMap,I="isµ";var J=e=>(t,n)=>q.get(t)||_(t,n,e);const K=B(J(!1)),Q=B(J(!0)),U=(e,{s:t,t:n,v:r})=>{if(e.a!==n){const{b:s,c:l}=(t?Q:K)(n,r);e.a=n,e.b=s,e.c=l}for(let{c:t}=e,n=0;n<t.length;n++){const e=r[n],s=t[n];switch(s.u){case O:s.v=O(s.t,X(s.c,e),s.v);break;case v:const t=e instanceof Y?U(s.c||(s.c=S()),e):(s.c=null,e);t!==s.v&&(s.v=v(s,t));break;default:e!==s.v&&(s.v=s.u(s.t,e,s.n,s.v))}}return e.b},X=(e,t)=>{let n=0,{length:r}=t;for(r<e.length&&e.splice(r);n<r;n++){const r=t[n];r instanceof Y?t[n]=U(e[n]||(e[n]=S()),r):e[n]=null}return t};class Y{constructor(e,t,n){this.s=e,this.t=t,this.v=n}toDOM(e=S()){return U(e,this)}}
/*! (c) Andrea Giammarchi - MIT */const ee=e=>(t,...n)=>new Y(e,t,n),te=ee(!1),ne=ee(!0),re=new WeakMap;var se=(e,t)=>((e,t,n)=>{const r=re.get(e)||l(re,e,S()),{b:s}=r,i=n&&"function"==typeof t?t():t,o=i instanceof Y?i.toDOM(r):i;return s!==o&&e.replaceChildren((r.b=o).valueOf()),e})(e,t,!0)
/*! (c) Andrea Giammarchi - MIT */;const le=new WeakMap,ie=e=>(t,n)=>{const r=le.get(t)||l(le,t,new Map);return r.get(n)||l(r,n,function(t,...n){return new Y(e,t,n).toDOM(this)}.bind(S()))},oe=ie(!1),ce=ie(!0);export{Y as Hole,k as attr,te as html,oe as htmlFor,se as render,ne as svg,ce as svgFor};
const{isArray:e}=Array,{getPrototypeOf:t,getOwnPropertyDescriptor:n}=Object,r=[],s=()=>document.createRange(),l=(e,t,n)=>(e.set(t,n),n),i=(e,t)=>t.reduceRight(o,e),o=(e,t)=>e.childNodes[t],{setPrototypeOf:c}=Object;let a;var u=(e,t,n)=>(a||(a=s()),n?a.setStartAfter(e):a.setStartBefore(e),a.setEndAfter(t),a.deleteContents(),e);const h=({firstChild:e,lastChild:t},n)=>u(e,t,n);let d=!1;const f=(e,t)=>d&&11===e.nodeType?1/t<0?t?h(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e,p=e=>document.createComment(e);class g extends((e=>{function t(e){return c(e,new.target.prototype)}return t.prototype=e.prototype,t})(DocumentFragment)){#e=p("<>");#t=p("</>");#n=r;constructor(e){super(e),this.replaceChildren(this.#e,...e.childNodes,this.#t),d=!0}get firstChild(){return this.#e}get lastChild(){return this.#t}get parentNode(){return this.#e.parentNode}remove(){h(this,!1)}replaceWith(e){h(this,!0).replaceWith(e)}valueOf(){const{parentNode:e}=this;if(e===this)this.#n===r&&(this.#n=[...this.childNodes]);else{if(e){let{firstChild:e,lastChild:t}=this;for(this.#n=[e];e!==t;)this.#n.push(e=e.nextSibling)}this.replaceChildren(...this.#n)}return this}}const m=(e,t,n)=>e.setAttribute(t,n),b=(e,t)=>e.removeAttribute(t);let v;const C=(t,n,r)=>{r=r.slice(1),v||(v=new WeakMap);const s=v.get(t)||l(v,t,{});let i=s[r];return i&&i[0]&&t.removeEventListener(r,...i),i=e(n)?n:[n,!1],s[r]=i,i[0]&&t.addEventListener(r,...i),n},w=(e,t)=>{const{t:n,n:r}=e;let s=!1;switch(typeof t){case"object":if(null!==t){(r||n).replaceWith(e.n=t.valueOf());break}case"undefined":s=!0;default:n.data=s?"":t,r&&(e.n=null,r.replaceWith(n))}return t},x=(e,t,n)=>e[n]=t,$=(e,t,n)=>x(e,t,n.slice(1)),y=(e,t,n)=>null==t?(b(e,n),t):x(e,t,n),N=(e,t)=>("function"==typeof t?t(e):t.current=e,t),O=(e,t,n)=>(null==t?b(e,n):m(e,n,t),t),k=(e,t,n)=>(e.toggleAttribute(n.slice(1),t),t),A=(e,t,n)=>{const{length:s}=t;if(e.data=`[${s}]`,s)return((e,t,n,r,s)=>{const l=n.length;let i=t.length,o=l,c=0,a=0,u=null;for(;c<i||a<o;)if(i===c){const t=o<l?a?r(n[a-1],-0).nextSibling:r(n[o-a],0):s;for(;a<o;)e.insertBefore(r(n[a++],1),t)}else if(o===a)for(;c<i;)u&&u.has(t[c])||e.removeChild(r(t[c],-1)),c++;else if(t[c]===n[a])c++,a++;else if(t[i-1]===n[o-1])i--,o--;else if(t[c]===n[o-1]&&n[a]===t[i-1]){const s=r(t[--i],-1).nextSibling;e.insertBefore(r(n[a++],1),r(t[c++],-1).nextSibling),e.insertBefore(r(n[--o],1),s),t[i]=n[o]}else{if(!u){u=new Map;let e=a;for(;e<o;)u.set(n[e],e++)}if(u.has(t[c])){const s=u.get(t[c]);if(a<s&&s<o){let l=c,h=1;for(;++l<i&&l<o&&u.get(t[l])===s+h;)h++;if(h>s-a){const l=r(t[c],0);for(;a<s;)e.insertBefore(r(n[a++],1),l)}else e.replaceChild(r(n[a++],1),r(t[c++],-1))}else c++}else e.removeChild(r(t[c++],-1))}return n})(e.parentNode,n,t,f,e);switch(n.length){case 1:n[0].remove();case 0:break;default:u(f(n[0],0),f(n.at(-1),-0),!1)}return r},M=new Map([["aria",(e,t)=>{for(const n in t){const r=t[n],s="role"===n?n:`aria-${n}`;null==r?b(e,s):m(e,s,r)}return t}],["class",(e,t)=>y(e,t,null==t?"class":"className")],["data",(e,t)=>{const{dataset:n}=e;for(const e in t)null==t[e]?delete n[e]:n[e]=t[e];return t}],["ref",N],["style",(e,t)=>null==t?y(e,t,"style"):x(e.style,t,"cssText")]]),W=(e,r,s)=>{switch(r[0]){case".":return $;case"?":return k;case"@":return C;default:return s||"ownerSVGElement"in e?"ref"===r?N:O:M.get(r)||(r in e?r.startsWith("on")?x:((e,r)=>{let s;do{s=n(e,r)}while(!s&&(e=t(e)));return s})(e,r)?.set?y:O:O)}},S=(e,t)=>(e.textContent=null==t?"":t,t),E=(e,t,n)=>({a:e,b:t,c:n}),T=()=>E(null,null,r);var B=e=>(t,n)=>{const{a:s,b:l,c:o}=e(t,n),c=document.importNode(s,!0);let a=r;if(l!==r){a=[];for(let e,t,n=0;n<l.length;n++){const{a:s,b:o,c:p}=l[n],g=s===t?e:e=i(c,t=s);a[n]=(u=o,h=g,d=p,f=o===A?[]:o===w?T():null,{v:r,u:u,t:h,n:d,c:f})}}var u,h,d,f;return((e,t)=>({b:e,c:t}))(o?c.firstChild:new g(c),a)};const D=/^(?:plaintext|script|style|textarea|title|xmp)$/i,j=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,L=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,P=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,z=/[\x01\x02]/g;let F,R,Z=document.createElement("template");var G=(e,t)=>{if(t)return F||(F=document.createElementNS("http://www.w3.org/2000/svg","svg"),R=s(),R.selectNodeContents(F)),R.createContextualFragment(e);Z.innerHTML=e;const{content:n}=Z;return Z=Z.cloneNode(!1),n};const H=e=>{const t=[];let n;for(;n=e.parentNode;)t.push(t.indexOf.call(n.childNodes,e)),e=n;return t},V=()=>document.createTextNode(""),_=(t,n,s)=>{const i=G(((e,t,n)=>{let r=0;return e.join("").trim().replace(L,((e,t,r,s)=>`<${t}${r.replace(P,"=$2$1").trimEnd()}${s?n||j.test(t)?" /":`></${t}`:""}>`)).replace(z,(e=>""===e?`\x3c!--${t+r++}--\x3e`:t+r++))})(t,I,s),s),{length:o}=t;let c=r;if(o>1){const t=[],r=document.createTreeWalker(i,129);let l=0,a=`${I}${l++}`;for(c=[];l<o;){const i=r.nextNode();if(8===i.nodeType){if(i.data===a){const r=e(n[l-1])?A:w;r===w&&t.push(i),c.push(E(H(i),r,null)),a=`${I}${l++}`}}else{let e;for(;i.hasAttribute(a);){e||(e=H(i));const t=i.getAttribute(a);c.push(E(e,W(i,t,s),t)),b(i,a),a=`${I}${l++}`}!s&&D.test(i.localName)&&i.textContent.trim()===`\x3c!--${a}--\x3e`&&(c.push(E(e||H(i),S,null)),a=`${I}${l++}`)}}for(l=0;l<t.length;l++)t[l].replaceWith(V())}const{childNodes:a}=i;let{length:u}=a;return u<1?(u=1,i.appendChild(V())):1===u&&1!==o&&1!==a[0].nodeType&&(u=0),l(q,t,E(i,c,1===u))},q=new WeakMap,I="isµ";var J=e=>(t,n)=>q.get(t)||_(t,n,e);const K=B(J(!1)),Q=B(J(!0)),U=(e,{s:t,t:n,v:r})=>{if(e.a!==n){const{b:s,c:l}=(t?Q:K)(n,r);e.a=n,e.b=s,e.c=l}for(let{c:t}=e,n=0;n<t.length;n++){const e=r[n],s=t[n];switch(s.u){case A:s.v=A(s.t,X(s.c,e),s.v);break;case w:const t=e instanceof Y?U(s.c||(s.c=T()),e):(s.c=null,e);t!==s.v&&(s.v=w(s,t));break;default:e!==s.v&&(s.v=s.u(s.t,e,s.n,s.v))}}return e.b},X=(e,t)=>{let n=0,{length:r}=t;for(r<e.length&&e.splice(r);n<r;n++){const r=t[n];r instanceof Y?t[n]=U(e[n]||(e[n]=T()),r):e[n]=null}return t};class Y{constructor(e,t,n){this.s=e,this.t=t,this.v=n}toDOM(e=T()){return U(e,this)}}
/*! (c) Andrea Giammarchi - MIT */const ee=e=>(t,...n)=>new Y(e,t,n),te=ee(!1),ne=ee(!0),re=new WeakMap;var se=(e,t)=>((e,t,n)=>{const r=re.get(e)||l(re,e,T()),{b:s}=r,i=n&&"function"==typeof t?t():t,o=i instanceof Y?i.toDOM(r):i;return s!==o&&e.replaceChildren((r.b=o).valueOf()),e})(e,t,!0)
/*! (c) Andrea Giammarchi - MIT */;const le=new WeakMap,ie=e=>(t,n)=>{const r=le.get(t)||l(le,t,new Map);return r.get(n)||l(r,n,function(t,...n){return new Y(e,t,n).toDOM(this)}.bind(T()))},oe=ie(!1),ce=ie(!0);export{Y as Hole,M as attr,te as html,oe as htmlFor,se as render,ne as svg,ce as svgFor};

@@ -1,2 +0,2 @@

const{isArray:e}=Array,{getPrototypeOf:t,getOwnPropertyDescriptor:n}=Object,r=[],s=()=>document.createRange(),l=(e,t,n)=>(e.set(t,n),n),{setPrototypeOf:i}=Object;let o;var c=(e,t,n)=>(o||(o=s()),n?o.setStartAfter(e):o.setStartBefore(e),o.setEndAfter(t),o.deleteContents(),e);const a=({firstChild:e,lastChild:t},n)=>c(e,t,n);let u=!1;const h=(e,t)=>u&&11===e.nodeType?1/t<0?t?a(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e,d=e=>document.createComment(e);class f extends((e=>{function t(e){return i(e,new.target.prototype)}return t.prototype=e.prototype,t})(DocumentFragment)){#e=d("<>");#t=d("</>");#n=r;constructor(e){super(e),this.replaceChildren(this.#e,...e.childNodes,this.#t),u=!0}get firstChild(){return this.#e}get lastChild(){return this.#t}get parentNode(){return this.#e.parentNode}remove(){a(this,!1)}replaceWith(e){a(this,!0).replaceWith(e)}valueOf(){let{firstChild:e,lastChild:t,parentNode:n}=this;if(n===this)this.#n===r&&(this.#n=[...this.childNodes]);else{if(n)for(this.#n=[e];e!==t;)this.#n.push(e=e.nextSibling);this.replaceChildren(...this.#n)}return this}}const p=(e,t,n)=>e.setAttribute(t,n),g=(e,t)=>e.removeAttribute(t);let m;const v=(t,n,r)=>{r=r.slice(1),m||(m=new WeakMap);const s=m.get(t)||l(m,t,{});let i=s[r];return i&&i[0]&&t.removeEventListener(r,...i),i=e(n)?n:[n,!1],s[r]=i,i[0]&&t.addEventListener(r,...i),n},C=(e,t)=>{const{t:n,n:r}=e;let s=!1;switch(typeof t){case"object":if(null!==t){(r||n).replaceWith(e.n=t.valueOf());break}case"undefined":s=!0;default:n.data=s?"":t,r&&(e.n=null,r.replaceWith(n))}return t},b=(e,t,n)=>e[n]=t,x=(e,t,n)=>b(e,t,n.slice(1)),$=(e,t,n)=>null==t?(g(e,n),t):b(e,t,n),w=(e,t)=>("function"==typeof t?t(e):t.current=e,t),y=(e,t,n)=>(null==t?g(e,n):p(e,n,t),t),N=(e,t,n)=>(e.toggleAttribute(n.slice(1),t),t),O=(e,t,n)=>{const{length:s}=t;if(e.data=`[${s}]`,s)return((e,t,n,r,s)=>{const l=n.length;let i=t.length,o=l,c=0,a=0,u=null;for(;c<i||a<o;)if(i===c){const t=o<l?a?r(n[a-1],-0).nextSibling:r(n[o-a],0):s;for(;a<o;)e.insertBefore(r(n[a++],1),t)}else if(o===a)for(;c<i;)u&&u.has(t[c])||e.removeChild(r(t[c],-1)),c++;else if(t[c]===n[a])c++,a++;else if(t[i-1]===n[o-1])i--,o--;else if(t[c]===n[o-1]&&n[a]===t[i-1]){const s=r(t[--i],-1).nextSibling;e.insertBefore(r(n[a++],1),r(t[c++],-1).nextSibling),e.insertBefore(r(n[--o],1),s),t[i]=n[o]}else{if(!u){u=new Map;let e=a;for(;e<o;)u.set(n[e],e++)}if(u.has(t[c])){const s=u.get(t[c]);if(a<s&&s<o){let l=c,h=1;for(;++l<i&&l<o&&u.get(t[l])===s+h;)h++;if(h>s-a){const l=r(t[c],0);for(;a<s;)e.insertBefore(r(n[a++],1),l)}else e.replaceChild(r(n[a++],1),r(t[c++],-1))}else c++}else e.removeChild(r(t[c++],-1))}return n})(e.parentNode,n,t,h,e);switch(n.length){case 1:n[0].remove();case 0:break;default:c(h(n[0],0),h(n.at(-1),-0),!1)}return r},A=new Map([["aria",(e,t)=>{for(const n in t){const r=t[n],s="role"===n?n:`aria-${n}`;null==r?g(e,s):p(e,s,r)}return t}],["class",(e,t)=>$(e,t,null==t?"class":"className")],["data",(e,t)=>{const{dataset:n}=e;for(const e in t)null==t[e]?delete n[e]:n[e]=t[e];return t}],["ref",w],["style",(e,t)=>null==t?$(e,t,"style"):b(e.style,t,"cssText")]]),k=(e,r,s)=>{switch(r[0]){case".":return x;case"?":return N;case"@":return v;default:return s||"ownerSVGElement"in e?"ref"===r?w:y:A.get(r)||(r in e?r.startsWith("on")?b:((e,r)=>{let s;do{s=n(e,r)}while(!s&&(e=t(e)));return s})(e,r)?.set?$:y:y)}},W=(e,t)=>(e.textContent=null==t?"":t,t),S=(e,t,n)=>({a:e,b:t,c:n}),E=()=>S(null,null,r),M=(e,t)=>t.reduceRight(T,e),T=(e,t)=>e.childNodes[t];var B=e=>(t,n)=>{const{a:s,b:l,c:i}=e(t,n),o=document.importNode(s,!0);let c=r;if(l!==r){c=[];for(let e,t,n=0;n<l.length;n++){const{a:s,b:i,c:f}=l[n],p=s===t?e:e=M(o,t=s);c[n]=(a=i,u=p,h=f,d=i===O?[]:i===C?E():null,{v:r,u:a,t:u,n:h,c:d})}}var a,u,h,d;return((e,t)=>({b:e,c:t}))(i?o.firstChild:new f(o),c)};const j=/^(?:plaintext|script|style|textarea|title|xmp)$/i,D=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,L=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,P=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,z=/[\x01\x02]/g;let F,R,Z=document.createElement("template");var G=(e,t)=>{if(t)return F||(F=document.createElementNS("http://www.w3.org/2000/svg","svg"),R=s(),R.selectNodeContents(F)),R.createContextualFragment(e);Z.innerHTML=e;const{content:n}=Z;return Z=Z.cloneNode(!1),n};const H=e=>{const t=[];let n;for(;n=e.parentNode;)t.push(t.indexOf.call(n.childNodes,e)),e=n;return t},V=()=>document.createTextNode(""),_=(t,n,s)=>{const i=G(((e,t,n)=>{let r=0;return e.join("").trim().replace(L,((e,t,r,s)=>`<${t}${r.replace(P,"=$2$1").trimEnd()}${s?n||D.test(t)?" /":`></${t}`:""}>`)).replace(z,(e=>""===e?`\x3c!--${t+r++}--\x3e`:t+r++))})(t,I,s),s),{length:o}=t;let c=r;if(o>1){const t=[],r=document.createTreeWalker(i,129);let l=0,a=`${I}${l++}`;for(c=[];l<o;){const i=r.nextNode();if(8===i.nodeType){if(i.data===a){const r=e(n[l-1])?O:C;r===C&&t.push(i),c.push(S(H(i),r,null)),a=`${I}${l++}`}}else{let e;for(;i.hasAttribute(a);){e||(e=H(i));const t=i.getAttribute(a);c.push(S(e,k(i,t,s),t)),g(i,a),a=`${I}${l++}`}!s&&j.test(i.localName)&&i.textContent.trim()===`\x3c!--${a}--\x3e`&&(c.push(S(e||H(i),W,null)),a=`${I}${l++}`)}}for(l=0;l<t.length;l++)t[l].replaceWith(V())}const{childNodes:a}=i;let{length:u}=a;return u<1?(u=1,i.appendChild(V())):1===u&&1!==o&&1!==a[0].nodeType&&(u=0),l(q,t,S(i,c,1===u))},q=new WeakMap,I="isµ";var J=e=>(t,n)=>q.get(t)||_(t,n,e);const K=B(J(!1)),Q=B(J(!0)),U=(e,{s:t,t:n,v:r})=>{if(e.a!==n){const{b:s,c:l}=(t?Q:K)(n,r);e.a=n,e.b=s,e.c=l}for(let{c:t}=e,n=0;n<t.length;n++){const e=r[n],s=t[n];switch(s.u){case O:s.v=O(s.t,X(s.c,e),s.v);break;case C:const t=e instanceof Y?U(s.c||(s.c=E()),e):(s.c=null,e);t!==s.v&&(s.v=C(s,t));break;default:e!==s.v&&(s.v=s.u(s.t,e,s.n,s.v))}}return e.b},X=(e,t)=>{let n=0,{length:r}=t;for(r<e.length&&e.splice(r);n<r;n++){const r=t[n];r instanceof Y?t[n]=U(e[n]||(e[n]=E()),r):e[n]=null}return t};class Y{constructor(e,t,n){this.s=e,this.t=t,this.v=n}toDOM(e=E()){return U(e,this)}}
/*! (c) Andrea Giammarchi - MIT */const ee=e=>(t,...n)=>new Y(e,t,n).toDOM().valueOf(),te=ee(!1),ne=ee(!0),re=(e,t)=>(e.replaceChildren("function"==typeof t?t():t),e);export{A as attr,te as html,re as render,ne as svg};
const{isArray:e}=Array,{getPrototypeOf:t,getOwnPropertyDescriptor:n}=Object,r=[],s=()=>document.createRange(),l=(e,t,n)=>(e.set(t,n),n),i=(e,t)=>t.reduceRight(o,e),o=(e,t)=>e.childNodes[t],{setPrototypeOf:c}=Object;let a;var u=(e,t,n)=>(a||(a=s()),n?a.setStartAfter(e):a.setStartBefore(e),a.setEndAfter(t),a.deleteContents(),e);const h=({firstChild:e,lastChild:t},n)=>u(e,t,n);let d=!1;const f=(e,t)=>d&&11===e.nodeType?1/t<0?t?h(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e,p=e=>document.createComment(e);class g extends((e=>{function t(e){return c(e,new.target.prototype)}return t.prototype=e.prototype,t})(DocumentFragment)){#e=p("<>");#t=p("</>");#n=r;constructor(e){super(e),this.replaceChildren(this.#e,...e.childNodes,this.#t),d=!0}get firstChild(){return this.#e}get lastChild(){return this.#t}get parentNode(){return this.#e.parentNode}remove(){h(this,!1)}replaceWith(e){h(this,!0).replaceWith(e)}valueOf(){const{parentNode:e}=this;if(e===this)this.#n===r&&(this.#n=[...this.childNodes]);else{if(e){let{firstChild:e,lastChild:t}=this;for(this.#n=[e];e!==t;)this.#n.push(e=e.nextSibling)}this.replaceChildren(...this.#n)}return this}}const m=(e,t,n)=>e.setAttribute(t,n),v=(e,t)=>e.removeAttribute(t);let C;const b=(t,n,r)=>{r=r.slice(1),C||(C=new WeakMap);const s=C.get(t)||l(C,t,{});let i=s[r];return i&&i[0]&&t.removeEventListener(r,...i),i=e(n)?n:[n,!1],s[r]=i,i[0]&&t.addEventListener(r,...i),n},x=(e,t)=>{const{t:n,n:r}=e;let s=!1;switch(typeof t){case"object":if(null!==t){(r||n).replaceWith(e.n=t.valueOf());break}case"undefined":s=!0;default:n.data=s?"":t,r&&(e.n=null,r.replaceWith(n))}return t},$=(e,t,n)=>e[n]=t,w=(e,t,n)=>$(e,t,n.slice(1)),y=(e,t,n)=>null==t?(v(e,n),t):$(e,t,n),N=(e,t)=>("function"==typeof t?t(e):t.current=e,t),O=(e,t,n)=>(null==t?v(e,n):m(e,n,t),t),A=(e,t,n)=>(e.toggleAttribute(n.slice(1),t),t),k=(e,t,n)=>{const{length:s}=t;if(e.data=`[${s}]`,s)return((e,t,n,r,s)=>{const l=n.length;let i=t.length,o=l,c=0,a=0,u=null;for(;c<i||a<o;)if(i===c){const t=o<l?a?r(n[a-1],-0).nextSibling:r(n[o-a],0):s;for(;a<o;)e.insertBefore(r(n[a++],1),t)}else if(o===a)for(;c<i;)u&&u.has(t[c])||e.removeChild(r(t[c],-1)),c++;else if(t[c]===n[a])c++,a++;else if(t[i-1]===n[o-1])i--,o--;else if(t[c]===n[o-1]&&n[a]===t[i-1]){const s=r(t[--i],-1).nextSibling;e.insertBefore(r(n[a++],1),r(t[c++],-1).nextSibling),e.insertBefore(r(n[--o],1),s),t[i]=n[o]}else{if(!u){u=new Map;let e=a;for(;e<o;)u.set(n[e],e++)}if(u.has(t[c])){const s=u.get(t[c]);if(a<s&&s<o){let l=c,h=1;for(;++l<i&&l<o&&u.get(t[l])===s+h;)h++;if(h>s-a){const l=r(t[c],0);for(;a<s;)e.insertBefore(r(n[a++],1),l)}else e.replaceChild(r(n[a++],1),r(t[c++],-1))}else c++}else e.removeChild(r(t[c++],-1))}return n})(e.parentNode,n,t,f,e);switch(n.length){case 1:n[0].remove();case 0:break;default:u(f(n[0],0),f(n.at(-1),-0),!1)}return r},W=new Map([["aria",(e,t)=>{for(const n in t){const r=t[n],s="role"===n?n:`aria-${n}`;null==r?v(e,s):m(e,s,r)}return t}],["class",(e,t)=>y(e,t,null==t?"class":"className")],["data",(e,t)=>{const{dataset:n}=e;for(const e in t)null==t[e]?delete n[e]:n[e]=t[e];return t}],["ref",N],["style",(e,t)=>null==t?y(e,t,"style"):$(e.style,t,"cssText")]]),S=(e,r,s)=>{switch(r[0]){case".":return w;case"?":return A;case"@":return b;default:return s||"ownerSVGElement"in e?"ref"===r?N:O:W.get(r)||(r in e?r.startsWith("on")?$:((e,r)=>{let s;do{s=n(e,r)}while(!s&&(e=t(e)));return s})(e,r)?.set?y:O:O)}},E=(e,t)=>(e.textContent=null==t?"":t,t),M=(e,t,n)=>({a:e,b:t,c:n}),T=()=>M(null,null,r);var B=e=>(t,n)=>{const{a:s,b:l,c:o}=e(t,n),c=document.importNode(s,!0);let a=r;if(l!==r){a=[];for(let e,t,n=0;n<l.length;n++){const{a:s,b:o,c:p}=l[n],g=s===t?e:e=i(c,t=s);a[n]=(u=o,h=g,d=p,f=o===k?[]:o===x?T():null,{v:r,u:u,t:h,n:d,c:f})}}var u,h,d,f;return((e,t)=>({b:e,c:t}))(o?c.firstChild:new g(c),a)};const j=/^(?:plaintext|script|style|textarea|title|xmp)$/i,D=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,L=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,P=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,z=/[\x01\x02]/g;let F,R,Z=document.createElement("template");var G=(e,t)=>{if(t)return F||(F=document.createElementNS("http://www.w3.org/2000/svg","svg"),R=s(),R.selectNodeContents(F)),R.createContextualFragment(e);Z.innerHTML=e;const{content:n}=Z;return Z=Z.cloneNode(!1),n};const H=e=>{const t=[];let n;for(;n=e.parentNode;)t.push(t.indexOf.call(n.childNodes,e)),e=n;return t},V=()=>document.createTextNode(""),_=(t,n,s)=>{const i=G(((e,t,n)=>{let r=0;return e.join("").trim().replace(L,((e,t,r,s)=>`<${t}${r.replace(P,"=$2$1").trimEnd()}${s?n||D.test(t)?" /":`></${t}`:""}>`)).replace(z,(e=>""===e?`\x3c!--${t+r++}--\x3e`:t+r++))})(t,I,s),s),{length:o}=t;let c=r;if(o>1){const t=[],r=document.createTreeWalker(i,129);let l=0,a=`${I}${l++}`;for(c=[];l<o;){const i=r.nextNode();if(8===i.nodeType){if(i.data===a){const r=e(n[l-1])?k:x;r===x&&t.push(i),c.push(M(H(i),r,null)),a=`${I}${l++}`}}else{let e;for(;i.hasAttribute(a);){e||(e=H(i));const t=i.getAttribute(a);c.push(M(e,S(i,t,s),t)),v(i,a),a=`${I}${l++}`}!s&&j.test(i.localName)&&i.textContent.trim()===`\x3c!--${a}--\x3e`&&(c.push(M(e||H(i),E,null)),a=`${I}${l++}`)}}for(l=0;l<t.length;l++)t[l].replaceWith(V())}const{childNodes:a}=i;let{length:u}=a;return u<1?(u=1,i.appendChild(V())):1===u&&1!==o&&1!==a[0].nodeType&&(u=0),l(q,t,M(i,c,1===u))},q=new WeakMap,I="isµ";var J=e=>(t,n)=>q.get(t)||_(t,n,e);const K=B(J(!1)),Q=B(J(!0)),U=(e,{s:t,t:n,v:r})=>{if(e.a!==n){const{b:s,c:l}=(t?Q:K)(n,r);e.a=n,e.b=s,e.c=l}for(let{c:t}=e,n=0;n<t.length;n++){const e=r[n],s=t[n];switch(s.u){case k:s.v=k(s.t,X(s.c,e),s.v);break;case x:const t=e instanceof Y?U(s.c||(s.c=T()),e):(s.c=null,e);t!==s.v&&(s.v=x(s,t));break;default:e!==s.v&&(s.v=s.u(s.t,e,s.n,s.v))}}return e.b},X=(e,t)=>{let n=0,{length:r}=t;for(r<e.length&&e.splice(r);n<r;n++){const r=t[n];r instanceof Y?t[n]=U(e[n]||(e[n]=T()),r):e[n]=null}return t};class Y{constructor(e,t,n){this.s=e,this.t=t,this.v=n}toDOM(e=T()){return U(e,this)}}
/*! (c) Andrea Giammarchi - MIT */const ee=e=>(t,...n)=>new Y(e,t,n).toDOM().valueOf(),te=ee(!1),ne=ee(!0),re=(e,t)=>(e.replaceChildren("function"==typeof t?t():t),e);export{W as attr,te as html,re as render,ne as svg};
{
"name": "uhtml",
"version": "4.5.0",
"version": "4.5.1",
"description": "A micro HTML/SVG render",

@@ -9,11 +9,11 @@ "main": "./cjs/index.js",

"benchmark:dom": "node test/benchmark/linkedom.js --dom; node test/benchmark/linkedom-cached.js --dom; node test/benchmark/dom.js --dom",
"build": "npm run rollup:es && node rollup/init.cjs && npm run rollup:init && rm -rf cjs/* && npm run cjs && rm -rf types && npm run ts && npm run test && npm run size",
"build": "npm run rollup:es && node rollup/ssr.cjs && node rollup/init.cjs && npm run rollup:init && npm run rollup:ssr && rm -rf cjs/* && npm run cjs && npm run test && npm run size",
"cjs": "ascjs --no-default esm cjs",
"rollup:es": "rollup --config rollup/es.config.js",
"rollup:init": "rollup --config rollup/init.config.js",
"rollup:ssr": "rollup --config rollup/ssr.config.js && rm esm/init-ssr.js_ && terser --module esm/init-ssr.js -mc -o ./worker.js",
"server": "npx static-handler .",
"size": "echo \"index $(cat index.js | brotli | wc -c)\";echo \"keyed $(cat keyed.js | brotli | wc -c)\";echo \"reactive $(cat reactive.js | brotli | wc -c)\";echo \"preactive $(cat preactive.js | brotli | wc -c)\";echo \"signal $(cat signal.js | brotli | wc -c)\";echo \"node $(cat node.js | brotli | wc -c)\";",
"size": "echo \"index $(cat index.js | brotli | wc -c)\";echo \"keyed $(cat keyed.js | brotli | wc -c)\";echo \"reactive $(cat reactive.js | brotli | wc -c)\";echo \"preactive $(cat preactive.js | brotli | wc -c)\";echo \"signal $(cat signal.js | brotli | wc -c)\";echo \"node $(cat node.js | brotli | wc -c)\";echo \"worker $(cat worker.js | brotli | wc -c)\";",
"test": "c8 node test/coverage.js && node test/modern.mjs",
"coverage": "mkdir -p ./coverage; c8 report --reporter=text-lcov > ./coverage/lcov.info",
"ts": "tsc -p ."
"coverage": "mkdir -p ./coverage; c8 report --reporter=text-lcov > ./coverage/lcov.info"
},

@@ -32,4 +32,4 @@ "keywords": [

"c8": "^9.1.0",
"rollup": "^4.13.2",
"typescript": "^5.4.3"
"rollup": "^4.14.3",
"terser": "^5.30.3"
},

@@ -40,3 +40,2 @@ "module": "./esm/index.js",

".": {
"types": "./types/index.d.ts",
"import": "./esm/index.js",

@@ -46,3 +45,2 @@ "default": "./cjs/index.js"

"./dom": {
"types": "./types/dom/index.d.ts",
"import": "./esm/dom/index.js",

@@ -52,3 +50,2 @@ "default": "./cjs/dom/index.js"

"./init": {
"types": "./types/init.d.ts",
"import": "./esm/init.js",

@@ -58,3 +55,2 @@ "default": "./cjs/init.js"

"./keyed": {
"types": "./types/keyed.d.ts",
"import": "./esm/keyed.js",

@@ -64,3 +60,2 @@ "default": "./cjs/keyed.js"

"./node": {
"types": "./types/node.d.ts",
"import": "./esm/node.js",

@@ -70,3 +65,2 @@ "default": "./cjs/node.js"

"./reactive": {
"types": "./types/reactive.d.ts",
"import": "./esm/reactive.js",

@@ -76,3 +70,2 @@ "default": "./cjs/reactive.js"

"./preactive": {
"types": "./types/reactive/preact.d.ts",
"import": "./esm/reactive/preact.js",

@@ -82,6 +75,12 @@ "default": "./cjs/reactive/preact.js"

"./signal": {
"types": "./types/reactive/signal.d.ts",
"import": "./esm/reactive/signal.js",
"default": "./cjs/reactive/signal.js"
},
"./ssr": {
"import": "./esm/init-ssr.js",
"default": "./cjs/init-ssr.js"
},
"./worker": {
"import": "./worker.js"
},
"./package.json": "./package.json"

@@ -88,0 +87,0 @@ },

@@ -1,3 +0,3 @@

const t=Symbol.for("preact-signals");function e(){if(s>1)return void s--;let t,e=!1;for(;void 0!==r;){let i=r;for(r=void 0,l++;void 0!==i;){const n=i.o;if(i.o=void 0,i.f&=-3,!(8&i.f)&&a(i))try{i.c()}catch(i){e||(t=i,e=!0)}i=n}}if(l=0,s--,e)throw t}function i(t){if(s>0)return t();s++;try{return t()}finally{e()}}let n,r;function o(t){const e=n;n=void 0;try{return t()}finally{n=e}}let s=0,l=0,c=0;function h(t){if(void 0===n)return;let e=t.n;return void 0===e||e.t!==n?(e={i:0,S:t,p:n.s,n:void 0,t:n,e:void 0,x:void 0,r:e},void 0!==n.s&&(n.s.n=e),n.s=e,t.n=e,32&n.f&&t.S(e),e):-1===e.i?(e.i=0,void 0!==e.n&&(e.n.p=e.p,void 0!==e.p&&(e.p.n=e.n),e.p=n.s,e.n=void 0,n.s.n=e,n.s=e),e):void 0}function f(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}function u(t){return new f(t)}function a(t){for(let e=t.s;void 0!==e;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function d(t){for(let e=t.s;void 0!==e;e=e.n){const i=e.S.n;if(void 0!==i&&(e.r=i),e.S.n=e,e.i=-1,void 0===e.n){t.s=e;break}}}function p(t){let e,i=t.s;for(;void 0!==i;){const t=i.p;-1===i.i?(i.S.U(i),void 0!==t&&(t.n=i.n),void 0!==i.n&&(i.n.p=t)):e=i,i.S.n=i.r,void 0!==i.r&&(i.r=void 0),i=t}t.s=e}function v(t){f.call(this,void 0),this.x=t,this.s=void 0,this.g=c-1,this.f=4}function y(t){return new v(t)}function g(t){const i=t.u;if(t.u=void 0,"function"==typeof i){s++;const r=n;n=void 0;try{i()}catch(e){throw t.f&=-2,t.f|=8,b(t),e}finally{n=r,e()}}}function b(t){for(let e=t.s;void 0!==e;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,g(t)}function w(t){if(n!==this)throw new Error("Out-of-order effect");p(this),n=t,this.f&=-2,8&this.f&&b(this),e()}function m(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}function x(t){const e=new m(t);try{e.c()}catch(t){throw e.d(),t}return e.d.bind(e)}f.prototype.brand=t,f.prototype.h=function(){return!0},f.prototype.S=function(t){this.t!==t&&void 0===t.e&&(t.x=this.t,void 0!==this.t&&(this.t.e=t),this.t=t)},f.prototype.U=function(t){if(void 0!==this.t){const e=t.e,i=t.x;void 0!==e&&(e.x=i,t.e=void 0),void 0!==i&&(i.e=e,t.x=void 0),t===this.t&&(this.t=i)}},f.prototype.subscribe=function(t){return x((()=>{const e=this.value,i=n;n=void 0;try{t(e)}finally{n=i}}))},f.prototype.valueOf=function(){return this.value},f.prototype.toString=function(){return this.value+""},f.prototype.toJSON=function(){return this.value},f.prototype.peek=function(){const t=n;n=void 0;try{return this.value}finally{n=t}},Object.defineProperty(f.prototype,"value",{get(){const t=h(this);return void 0!==t&&(t.i=this.i),this.v},set(t){if(t!==this.v){if(l>100)throw new Error("Cycle detected");this.v=t,this.i++,c++,s++;try{for(let t=this.t;void 0!==t;t=t.x)t.t.N()}finally{e()}}}}),(v.prototype=new f).h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===c)return!0;if(this.g=c,this.f|=1,this.i>0&&!a(this))return this.f&=-2,!0;const t=n;try{d(this),n=this;const t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(t){this.v=t,this.f|=16,this.i++}return n=t,p(this),this.f&=-2,!0},v.prototype.S=function(t){if(void 0===this.t){this.f|=36;for(let t=this.s;void 0!==t;t=t.n)t.S.S(t)}f.prototype.S.call(this,t)},v.prototype.U=function(t){if(void 0!==this.t&&(f.prototype.U.call(this,t),void 0===this.t)){this.f&=-33;for(let t=this.s;void 0!==t;t=t.n)t.S.U(t)}},v.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let t=this.t;void 0!==t;t=t.x)t.t.N()}},Object.defineProperty(v.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const t=h(this);if(this.h(),void 0!==t&&(t.i=this.i),16&this.f)throw this.v;return this.v}}),m.prototype.c=function(){const t=this.S();try{if(8&this.f)return;if(void 0===this.x)return;const t=this.x();"function"==typeof t&&(this.u=t)}finally{t()}},m.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,g(this),d(this),s++;const t=n;return n=this,w.bind(this,t)},m.prototype.N=function(){2&this.f||(this.f|=2,this.o=r,r=this)},m.prototype.d=function(){this.f|=8,1&this.f||b(this)};const{isArray:C}=Array,{getPrototypeOf:S,getOwnPropertyDescriptor:N}=Object,$=[],O=()=>document.createRange(),k=(t,e,i)=>(t.set(e,i),i),{setPrototypeOf:W}=Object;let M;var A=(t,e,i)=>(M||(M=O()),i?M.setStartAfter(t):M.setStartBefore(t),M.setEndAfter(e),M.deleteContents(),t);const E=({firstChild:t,lastChild:e},i)=>A(t,e,i);let j=!1;const T=(t,e)=>j&&11===t.nodeType?1/e<0?e?E(t,!0):t.lastChild:e?t.valueOf():t.firstChild:t,P=t=>document.createComment(t);class U extends((t=>{function e(t){return W(t,new.target.prototype)}return e.prototype=t.prototype,e})(DocumentFragment)){#t=P("<>");#e=P("</>");#i=$;constructor(t){super(t),this.replaceChildren(this.#t,...t.childNodes,this.#e),j=!0}get firstChild(){return this.#t}get lastChild(){return this.#e}get parentNode(){return this.#t.parentNode}remove(){E(this,!1)}replaceWith(t){E(this,!0).replaceWith(t)}valueOf(){let{firstChild:t,lastChild:e,parentNode:i}=this;if(i===this)this.#i===$&&(this.#i=[...this.childNodes]);else{if(i)for(this.#i=[t];t!==e;)this.#i.push(t=t.nextSibling);this.replaceChildren(...this.#i)}return this}}const B=(t,e,i)=>t.setAttribute(e,i),D=(t,e)=>t.removeAttribute(e);let R;const z=(t,e,i)=>{i=i.slice(1),R||(R=new WeakMap);const n=R.get(t)||k(R,t,{});let r=n[i];return r&&r[0]&&t.removeEventListener(i,...r),r=C(e)?e:[e,!1],n[i]=r,r[0]&&t.addEventListener(i,...r),e},F=(t,e)=>{const{t:i,n:n}=t;let r=!1;switch(typeof e){case"object":if(null!==e){(n||i).replaceWith(t.n=e.valueOf());break}case"undefined":r=!0;default:i.data=r?"":e,n&&(t.n=null,n.replaceWith(i))}return e},L=(t,e,i)=>t[i]=e,H=(t,e,i)=>L(t,e,i.slice(1)),Z=(t,e,i)=>null==e?(D(t,i),e):L(t,e,i),G=(t,e)=>("function"==typeof e?e(t):e.current=t,e),J=(t,e,i)=>(null==e?D(t,i):B(t,i,e),e),V=(t,e,i)=>(t.toggleAttribute(i.slice(1),e),e),_=(t,e,i)=>{const{length:n}=e;if(t.data=`[${n}]`,n)return((t,e,i,n,r)=>{const o=i.length;let s=e.length,l=o,c=0,h=0,f=null;for(;c<s||h<l;)if(s===c){const e=l<o?h?n(i[h-1],-0).nextSibling:n(i[l-h],0):r;for(;h<l;)t.insertBefore(n(i[h++],1),e)}else if(l===h)for(;c<s;)f&&f.has(e[c])||t.removeChild(n(e[c],-1)),c++;else if(e[c]===i[h])c++,h++;else if(e[s-1]===i[l-1])s--,l--;else if(e[c]===i[l-1]&&i[h]===e[s-1]){const r=n(e[--s],-1).nextSibling;t.insertBefore(n(i[h++],1),n(e[c++],-1).nextSibling),t.insertBefore(n(i[--l],1),r),e[s]=i[l]}else{if(!f){f=new Map;let t=h;for(;t<l;)f.set(i[t],t++)}if(f.has(e[c])){const r=f.get(e[c]);if(h<r&&r<l){let o=c,u=1;for(;++o<s&&o<l&&f.get(e[o])===r+u;)u++;if(u>r-h){const o=n(e[c],0);for(;h<r;)t.insertBefore(n(i[h++],1),o)}else t.replaceChild(n(i[h++],1),n(e[c++],-1))}else c++}else t.removeChild(n(e[c++],-1))}return i})(t.parentNode,i,e,T,t);switch(i.length){case 1:i[0].remove();case 0:break;default:A(T(i[0],0),T(i.at(-1),-0),!1)}return $},q=new Map([["aria",(t,e)=>{for(const i in e){const n=e[i],r="role"===i?i:`aria-${i}`;null==n?D(t,r):B(t,r,n)}return e}],["class",(t,e)=>Z(t,e,null==e?"class":"className")],["data",(t,e)=>{const{dataset:i}=t;for(const t in e)null==e[t]?delete i[t]:i[t]=e[t];return e}],["ref",G],["style",(t,e)=>null==e?Z(t,e,"style"):L(t.style,e,"cssText")]]),I=(t,e,i)=>{switch(e[0]){case".":return H;case"?":return V;case"@":return z;default:return i||"ownerSVGElement"in t?"ref"===e?G:J:q.get(e)||(e in t?e.startsWith("on")?L:((t,e)=>{let i;do{i=N(t,e)}while(!i&&(t=S(t)));return i})(t,e)?.set?Z:J:J)}},K=(t,e)=>(t.textContent=null==e?"":e,e),Q=(t,e,i)=>({a:t,b:e,c:i}),X=(t,e,i,n)=>({v:$,u:t,t:e,n:i,c:n}),Y=()=>Q(null,null,$),tt=(t,e)=>e.reduceRight(et,t),et=(t,e)=>t.childNodes[e];var it=t=>(e,i)=>{const{a:n,b:r,c:o}=t(e,i),s=document.importNode(n,!0);let l=$;if(r!==$){l=[];for(let t,e,i=0;i<r.length;i++){const{a:n,b:o,c:c}=r[i],h=n===e?t:t=tt(s,e=n);l[i]=X(o,h,c,o===_?[]:o===F?Y():null)}}return((t,e)=>({b:t,c:e}))(o?s.firstChild:new U(s),l)};const nt=/^(?:plaintext|script|style|textarea|title|xmp)$/i,rt=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,ot=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,st=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,lt=/[\x01\x02]/g;let ct,ht,ft=document.createElement("template");var ut=(t,e)=>{if(e)return ct||(ct=document.createElementNS("http://www.w3.org/2000/svg","svg"),ht=O(),ht.selectNodeContents(ct)),ht.createContextualFragment(t);ft.innerHTML=t;const{content:i}=ft;return ft=ft.cloneNode(!1),i};const at=t=>{const e=[];let i;for(;i=t.parentNode;)e.push(e.indexOf.call(i.childNodes,t)),t=i;return e},dt=()=>document.createTextNode(""),pt=(t,e,i)=>{const n=ut(((t,e,i)=>{let n=0;return t.join("").trim().replace(ot,((t,e,n,r)=>`<${e}${n.replace(st,"=$2$1").trimEnd()}${r?i||rt.test(e)?" /":`></${e}`:""}>`)).replace(lt,(t=>""===t?`\x3c!--${e+n++}--\x3e`:e+n++))})(t,yt,i),i),{length:r}=t;let o=$;if(r>1){const t=[],s=document.createTreeWalker(n,129);let l=0,c=`${yt}${l++}`;for(o=[];l<r;){const n=s.nextNode();if(8===n.nodeType){if(n.data===c){const i=C(e[l-1])?_:F;i===F&&t.push(n),o.push(Q(at(n),i,null)),c=`${yt}${l++}`}}else{let t;for(;n.hasAttribute(c);){t||(t=at(n));const e=n.getAttribute(c);o.push(Q(t,I(n,e,i),e)),D(n,c),c=`${yt}${l++}`}!i&&nt.test(n.localName)&&n.textContent.trim()===`\x3c!--${c}--\x3e`&&(o.push(Q(t||at(n),K,null)),c=`${yt}${l++}`)}}for(l=0;l<t.length;l++)t[l].replaceWith(dt())}const{childNodes:s}=n;let{length:l}=s;return l<1?(l=1,n.appendChild(dt())):1===l&&1!==r&&1!==s[0].nodeType&&(l=0),k(vt,t,Q(n,o,1===l))},vt=new WeakMap,yt="isµ";var gt=t=>(e,i)=>vt.get(e)||pt(e,i,t);const bt=it(gt(!1)),wt=it(gt(!0)),mt=(t,{s:e,t:i,v:n})=>{if(t.a!==i){const{b:r,c:o}=(e?wt:bt)(i,n);t.a=i,t.b=r,t.c=o}for(let{c:e}=t,i=0;i<e.length;i++){const t=n[i],r=e[i];switch(r.u){case _:r.v=_(r.t,xt(r.c,t),r.v);break;case F:const e=t instanceof Ct?mt(r.c||(r.c=Y()),t):(r.c=null,t);e!==r.v&&(r.v=F(r,e));break;default:t!==r.v&&(r.v=r.u(r.t,t,r.n,r.v))}}return t.b},xt=(t,e)=>{let i=0,{length:n}=e;for(n<t.length&&t.splice(n);i<n;i++){const n=e[i];n instanceof Ct?e[i]=mt(t[i]||(t[i]=Y()),n):t[i]=null}return e};class Ct{constructor(t,e,i){this.s=t,this.t=e,this.v=i}toDOM(t=Y()){return mt(t,this)}}
/*! (c) Andrea Giammarchi - MIT */const St=t=>(e,...i)=>new Ct(t,e,i),Nt=St(!1),$t=St(!0),Ot=new WeakMap;var kt=(t,e,i)=>{const n=Ot.get(t)||k(Ot,t,Y()),{b:r}=n,o=i&&"function"==typeof e?e():e,s=o instanceof Ct?o.toDOM(n):o;return r!==s&&t.replaceChildren((n.b=s).valueOf()),t};
/*! (c) Andrea Giammarchi - MIT */const Wt=new WeakMap,Mt=t=>(e,i)=>{const n=Wt.get(e)||k(Wt,e,new Map);return n.get(i)||k(n,i,function(e,...i){return new Ct(t,e,i).toDOM(this)}.bind(Y()))},At=Mt(!1),Et=Mt(!0),jt=new FinalizationRegistry((([t,e,i])=>{i&&console.debug(`Held value ${String(e)} not relevant anymore`),t(e)})),Tt=Object.create(null),Pt=new WeakMap,Ut=t=>t();let Bt=!0;const Dt=t=>{const e=Pt.get(t);var i;e&&(Bt&&Pt.delete(t),i=e,jt.unregister(i),e())},Rt=(zt=x,(t,e)=>{if(Bt="function"!=typeof e,Dt(t),Bt)return kt(t,e,!1);Bt=!0;const i=new WeakRef(t),n=zt((()=>{kt(i.deref(),e(),!1)}));return Pt.set(t,n),((t,e,{debug:i,handler:n,return:r,token:o=t}=Tt)=>{const s=r||new Proxy(t,n||Tt),l=[s,[e,t,!!i]];return!1!==o&&l.push(o),jt.register(...l),s})(n,Ut,{return:t})});var zt;export{Ct as Hole,f as Signal,q as attr,i as batch,y as computed,Dt as detach,x as effect,Nt as html,At as htmlFor,Rt as render,u as signal,$t as svg,Et as svgFor,o as untracked};
const t=Symbol.for("preact-signals");function e(){if(s>1)return void s--;let t,e=!1;for(;void 0!==r;){let i=r;for(r=void 0,l++;void 0!==i;){const n=i.o;if(i.o=void 0,i.f&=-3,!(8&i.f)&&a(i))try{i.c()}catch(i){e||(t=i,e=!0)}i=n}}if(l=0,s--,e)throw t}function i(t){if(s>0)return t();s++;try{return t()}finally{e()}}let n,r;function o(t){const e=n;n=void 0;try{return t()}finally{n=e}}let s=0,l=0,c=0;function h(t){if(void 0===n)return;let e=t.n;return void 0===e||e.t!==n?(e={i:0,S:t,p:n.s,n:void 0,t:n,e:void 0,x:void 0,r:e},void 0!==n.s&&(n.s.n=e),n.s=e,t.n=e,32&n.f&&t.S(e),e):-1===e.i?(e.i=0,void 0!==e.n&&(e.n.p=e.p,void 0!==e.p&&(e.p.n=e.n),e.p=n.s,e.n=void 0,n.s.n=e,n.s=e),e):void 0}function f(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}function u(t){return new f(t)}function a(t){for(let e=t.s;void 0!==e;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function d(t){for(let e=t.s;void 0!==e;e=e.n){const i=e.S.n;if(void 0!==i&&(e.r=i),e.S.n=e,e.i=-1,void 0===e.n){t.s=e;break}}}function p(t){let e,i=t.s;for(;void 0!==i;){const t=i.p;-1===i.i?(i.S.U(i),void 0!==t&&(t.n=i.n),void 0!==i.n&&(i.n.p=t)):e=i,i.S.n=i.r,void 0!==i.r&&(i.r=void 0),i=t}t.s=e}function v(t){f.call(this,void 0),this.x=t,this.s=void 0,this.g=c-1,this.f=4}function y(t){return new v(t)}function g(t){const i=t.u;if(t.u=void 0,"function"==typeof i){s++;const r=n;n=void 0;try{i()}catch(e){throw t.f&=-2,t.f|=8,b(t),e}finally{n=r,e()}}}function b(t){for(let e=t.s;void 0!==e;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,g(t)}function w(t){if(n!==this)throw new Error("Out-of-order effect");p(this),n=t,this.f&=-2,8&this.f&&b(this),e()}function m(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}function x(t){const e=new m(t);try{e.c()}catch(t){throw e.d(),t}return e.d.bind(e)}f.prototype.brand=t,f.prototype.h=function(){return!0},f.prototype.S=function(t){this.t!==t&&void 0===t.e&&(t.x=this.t,void 0!==this.t&&(this.t.e=t),this.t=t)},f.prototype.U=function(t){if(void 0!==this.t){const e=t.e,i=t.x;void 0!==e&&(e.x=i,t.e=void 0),void 0!==i&&(i.e=e,t.x=void 0),t===this.t&&(this.t=i)}},f.prototype.subscribe=function(t){return x((()=>{const e=this.value,i=n;n=void 0;try{t(e)}finally{n=i}}))},f.prototype.valueOf=function(){return this.value},f.prototype.toString=function(){return this.value+""},f.prototype.toJSON=function(){return this.value},f.prototype.peek=function(){const t=n;n=void 0;try{return this.value}finally{n=t}},Object.defineProperty(f.prototype,"value",{get(){const t=h(this);return void 0!==t&&(t.i=this.i),this.v},set(t){if(t!==this.v){if(l>100)throw new Error("Cycle detected");this.v=t,this.i++,c++,s++;try{for(let t=this.t;void 0!==t;t=t.x)t.t.N()}finally{e()}}}}),(v.prototype=new f).h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===c)return!0;if(this.g=c,this.f|=1,this.i>0&&!a(this))return this.f&=-2,!0;const t=n;try{d(this),n=this;const t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(t){this.v=t,this.f|=16,this.i++}return n=t,p(this),this.f&=-2,!0},v.prototype.S=function(t){if(void 0===this.t){this.f|=36;for(let t=this.s;void 0!==t;t=t.n)t.S.S(t)}f.prototype.S.call(this,t)},v.prototype.U=function(t){if(void 0!==this.t&&(f.prototype.U.call(this,t),void 0===this.t)){this.f&=-33;for(let t=this.s;void 0!==t;t=t.n)t.S.U(t)}},v.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let t=this.t;void 0!==t;t=t.x)t.t.N()}},Object.defineProperty(v.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const t=h(this);if(this.h(),void 0!==t&&(t.i=this.i),16&this.f)throw this.v;return this.v}}),m.prototype.c=function(){const t=this.S();try{if(8&this.f)return;if(void 0===this.x)return;const t=this.x();"function"==typeof t&&(this.u=t)}finally{t()}},m.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,g(this),d(this),s++;const t=n;return n=this,w.bind(this,t)},m.prototype.N=function(){2&this.f||(this.f|=2,this.o=r,r=this)},m.prototype.d=function(){this.f|=8,1&this.f||b(this)};const{isArray:C}=Array,{getPrototypeOf:S,getOwnPropertyDescriptor:N}=Object,$=[],O=()=>document.createRange(),k=(t,e,i)=>(t.set(e,i),i),W=(t,e)=>e.reduceRight(M,t),M=(t,e)=>t.childNodes[e],{setPrototypeOf:A}=Object;let E;var j=(t,e,i)=>(E||(E=O()),i?E.setStartAfter(t):E.setStartBefore(t),E.setEndAfter(e),E.deleteContents(),t);const T=({firstChild:t,lastChild:e},i)=>j(t,e,i);let P=!1;const U=(t,e)=>P&&11===t.nodeType?1/e<0?e?T(t,!0):t.lastChild:e?t.valueOf():t.firstChild:t,B=t=>document.createComment(t);class D extends((t=>{function e(t){return A(t,new.target.prototype)}return e.prototype=t.prototype,e})(DocumentFragment)){#t=B("<>");#e=B("</>");#i=$;constructor(t){super(t),this.replaceChildren(this.#t,...t.childNodes,this.#e),P=!0}get firstChild(){return this.#t}get lastChild(){return this.#e}get parentNode(){return this.#t.parentNode}remove(){T(this,!1)}replaceWith(t){T(this,!0).replaceWith(t)}valueOf(){const{parentNode:t}=this;if(t===this)this.#i===$&&(this.#i=[...this.childNodes]);else{if(t){let{firstChild:t,lastChild:e}=this;for(this.#i=[t];t!==e;)this.#i.push(t=t.nextSibling)}this.replaceChildren(...this.#i)}return this}}const R=(t,e,i)=>t.setAttribute(e,i),z=(t,e)=>t.removeAttribute(e);let F;const L=(t,e,i)=>{i=i.slice(1),F||(F=new WeakMap);const n=F.get(t)||k(F,t,{});let r=n[i];return r&&r[0]&&t.removeEventListener(i,...r),r=C(e)?e:[e,!1],n[i]=r,r[0]&&t.addEventListener(i,...r),e},H=(t,e)=>{const{t:i,n:n}=t;let r=!1;switch(typeof e){case"object":if(null!==e){(n||i).replaceWith(t.n=e.valueOf());break}case"undefined":r=!0;default:i.data=r?"":e,n&&(t.n=null,n.replaceWith(i))}return e},Z=(t,e,i)=>t[i]=e,G=(t,e,i)=>Z(t,e,i.slice(1)),J=(t,e,i)=>null==e?(z(t,i),e):Z(t,e,i),V=(t,e)=>("function"==typeof e?e(t):e.current=t,e),_=(t,e,i)=>(null==e?z(t,i):R(t,i,e),e),q=(t,e,i)=>(t.toggleAttribute(i.slice(1),e),e),I=(t,e,i)=>{const{length:n}=e;if(t.data=`[${n}]`,n)return((t,e,i,n,r)=>{const o=i.length;let s=e.length,l=o,c=0,h=0,f=null;for(;c<s||h<l;)if(s===c){const e=l<o?h?n(i[h-1],-0).nextSibling:n(i[l-h],0):r;for(;h<l;)t.insertBefore(n(i[h++],1),e)}else if(l===h)for(;c<s;)f&&f.has(e[c])||t.removeChild(n(e[c],-1)),c++;else if(e[c]===i[h])c++,h++;else if(e[s-1]===i[l-1])s--,l--;else if(e[c]===i[l-1]&&i[h]===e[s-1]){const r=n(e[--s],-1).nextSibling;t.insertBefore(n(i[h++],1),n(e[c++],-1).nextSibling),t.insertBefore(n(i[--l],1),r),e[s]=i[l]}else{if(!f){f=new Map;let t=h;for(;t<l;)f.set(i[t],t++)}if(f.has(e[c])){const r=f.get(e[c]);if(h<r&&r<l){let o=c,u=1;for(;++o<s&&o<l&&f.get(e[o])===r+u;)u++;if(u>r-h){const o=n(e[c],0);for(;h<r;)t.insertBefore(n(i[h++],1),o)}else t.replaceChild(n(i[h++],1),n(e[c++],-1))}else c++}else t.removeChild(n(e[c++],-1))}return i})(t.parentNode,i,e,U,t);switch(i.length){case 1:i[0].remove();case 0:break;default:j(U(i[0],0),U(i.at(-1),-0),!1)}return $},K=new Map([["aria",(t,e)=>{for(const i in e){const n=e[i],r="role"===i?i:`aria-${i}`;null==n?z(t,r):R(t,r,n)}return e}],["class",(t,e)=>J(t,e,null==e?"class":"className")],["data",(t,e)=>{const{dataset:i}=t;for(const t in e)null==e[t]?delete i[t]:i[t]=e[t];return e}],["ref",V],["style",(t,e)=>null==e?J(t,e,"style"):Z(t.style,e,"cssText")]]),Q=(t,e,i)=>{switch(e[0]){case".":return G;case"?":return q;case"@":return L;default:return i||"ownerSVGElement"in t?"ref"===e?V:_:K.get(e)||(e in t?e.startsWith("on")?Z:((t,e)=>{let i;do{i=N(t,e)}while(!i&&(t=S(t)));return i})(t,e)?.set?J:_:_)}},X=(t,e)=>(t.textContent=null==e?"":e,e),Y=(t,e,i)=>({a:t,b:e,c:i}),tt=(t,e,i,n)=>({v:$,u:t,t:e,n:i,c:n}),et=()=>Y(null,null,$);var it=t=>(e,i)=>{const{a:n,b:r,c:o}=t(e,i),s=document.importNode(n,!0);let l=$;if(r!==$){l=[];for(let t,e,i=0;i<r.length;i++){const{a:n,b:o,c:c}=r[i],h=n===e?t:t=W(s,e=n);l[i]=tt(o,h,c,o===I?[]:o===H?et():null)}}return((t,e)=>({b:t,c:e}))(o?s.firstChild:new D(s),l)};const nt=/^(?:plaintext|script|style|textarea|title|xmp)$/i,rt=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,ot=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,st=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,lt=/[\x01\x02]/g;let ct,ht,ft=document.createElement("template");var ut=(t,e)=>{if(e)return ct||(ct=document.createElementNS("http://www.w3.org/2000/svg","svg"),ht=O(),ht.selectNodeContents(ct)),ht.createContextualFragment(t);ft.innerHTML=t;const{content:i}=ft;return ft=ft.cloneNode(!1),i};const at=t=>{const e=[];let i;for(;i=t.parentNode;)e.push(e.indexOf.call(i.childNodes,t)),t=i;return e},dt=()=>document.createTextNode(""),pt=(t,e,i)=>{const n=ut(((t,e,i)=>{let n=0;return t.join("").trim().replace(ot,((t,e,n,r)=>`<${e}${n.replace(st,"=$2$1").trimEnd()}${r?i||rt.test(e)?" /":`></${e}`:""}>`)).replace(lt,(t=>""===t?`\x3c!--${e+n++}--\x3e`:e+n++))})(t,yt,i),i),{length:r}=t;let o=$;if(r>1){const t=[],s=document.createTreeWalker(n,129);let l=0,c=`${yt}${l++}`;for(o=[];l<r;){const n=s.nextNode();if(8===n.nodeType){if(n.data===c){const i=C(e[l-1])?I:H;i===H&&t.push(n),o.push(Y(at(n),i,null)),c=`${yt}${l++}`}}else{let t;for(;n.hasAttribute(c);){t||(t=at(n));const e=n.getAttribute(c);o.push(Y(t,Q(n,e,i),e)),z(n,c),c=`${yt}${l++}`}!i&&nt.test(n.localName)&&n.textContent.trim()===`\x3c!--${c}--\x3e`&&(o.push(Y(t||at(n),X,null)),c=`${yt}${l++}`)}}for(l=0;l<t.length;l++)t[l].replaceWith(dt())}const{childNodes:s}=n;let{length:l}=s;return l<1?(l=1,n.appendChild(dt())):1===l&&1!==r&&1!==s[0].nodeType&&(l=0),k(vt,t,Y(n,o,1===l))},vt=new WeakMap,yt="isµ";var gt=t=>(e,i)=>vt.get(e)||pt(e,i,t);const bt=it(gt(!1)),wt=it(gt(!0)),mt=(t,{s:e,t:i,v:n})=>{if(t.a!==i){const{b:r,c:o}=(e?wt:bt)(i,n);t.a=i,t.b=r,t.c=o}for(let{c:e}=t,i=0;i<e.length;i++){const t=n[i],r=e[i];switch(r.u){case I:r.v=I(r.t,xt(r.c,t),r.v);break;case H:const e=t instanceof Ct?mt(r.c||(r.c=et()),t):(r.c=null,t);e!==r.v&&(r.v=H(r,e));break;default:t!==r.v&&(r.v=r.u(r.t,t,r.n,r.v))}}return t.b},xt=(t,e)=>{let i=0,{length:n}=e;for(n<t.length&&t.splice(n);i<n;i++){const n=e[i];n instanceof Ct?e[i]=mt(t[i]||(t[i]=et()),n):t[i]=null}return e};class Ct{constructor(t,e,i){this.s=t,this.t=e,this.v=i}toDOM(t=et()){return mt(t,this)}}
/*! (c) Andrea Giammarchi - MIT */const St=t=>(e,...i)=>new Ct(t,e,i),Nt=St(!1),$t=St(!0),Ot=new WeakMap;var kt=(t,e,i)=>{const n=Ot.get(t)||k(Ot,t,et()),{b:r}=n,o=i&&"function"==typeof e?e():e,s=o instanceof Ct?o.toDOM(n):o;return r!==s&&t.replaceChildren((n.b=s).valueOf()),t};
/*! (c) Andrea Giammarchi - MIT */const Wt=new WeakMap,Mt=t=>(e,i)=>{const n=Wt.get(e)||k(Wt,e,new Map);return n.get(i)||k(n,i,function(e,...i){return new Ct(t,e,i).toDOM(this)}.bind(et()))},At=Mt(!1),Et=Mt(!0),jt=new FinalizationRegistry((([t,e,i])=>{i&&console.debug(`Held value ${String(e)} not relevant anymore`),t(e)})),Tt=Object.create(null),Pt=new WeakMap,Ut=t=>t();let Bt=!0;const Dt=t=>{const e=Pt.get(t);var i;e&&(Bt&&Pt.delete(t),i=e,jt.unregister(i),e())},Rt=(zt=x,(t,e)=>{if(Bt="function"!=typeof e,Dt(t),Bt)return kt(t,e,!1);Bt=!0;const i=new WeakRef(t),n=zt((()=>{kt(i.deref(),e(),!1)}));return Pt.set(t,n),((t,e,{debug:i,handler:n,return:r,token:o=t}=Tt)=>{const s=r||new Proxy(t,n||Tt),l=[s,[e,t,!!i]];return!1!==o&&l.push(o),jt.register(...l),s})(n,Ut,{return:t})});var zt;export{Ct as Hole,f as Signal,K as attr,i as batch,y as computed,Dt as detach,x as effect,Nt as html,At as htmlFor,Rt as render,u as signal,$t as svg,Et as svgFor,o as untracked};

@@ -1,3 +0,3 @@

const{isArray:e}=Array,{getPrototypeOf:t,getOwnPropertyDescriptor:n}=Object,r=[],s=()=>document.createRange(),l=(e,t,n)=>(e.set(t,n),n),{setPrototypeOf:o}=Object;let i;var a=(e,t,n)=>(i||(i=s()),n?i.setStartAfter(e):i.setStartBefore(e),i.setEndAfter(t),i.deleteContents(),e);const c=({firstChild:e,lastChild:t},n)=>a(e,t,n);let u=!1;const d=(e,t)=>u&&11===e.nodeType?1/t<0?t?c(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e,h=e=>document.createComment(e);class f extends((e=>{function t(e){return o(e,new.target.prototype)}return t.prototype=e.prototype,t})(DocumentFragment)){#e=h("<>");#t=h("</>");#n=r;constructor(e){super(e),this.replaceChildren(this.#e,...e.childNodes,this.#t),u=!0}get firstChild(){return this.#e}get lastChild(){return this.#t}get parentNode(){return this.#e.parentNode}remove(){c(this,!1)}replaceWith(e){c(this,!0).replaceWith(e)}valueOf(){let{firstChild:e,lastChild:t,parentNode:n}=this;if(n===this)this.#n===r&&(this.#n=[...this.childNodes]);else{if(n)for(this.#n=[e];e!==t;)this.#n.push(e=e.nextSibling);this.replaceChildren(...this.#n)}return this}}const p=(e,t,n)=>e.setAttribute(t,n),g=(e,t)=>e.removeAttribute(t);let m;const v=(t,n,r)=>{r=r.slice(1),m||(m=new WeakMap);const s=m.get(t)||l(m,t,{});let o=s[r];return o&&o[0]&&t.removeEventListener(r,...o),o=e(n)?n:[n,!1],s[r]=o,o[0]&&t.addEventListener(r,...o),n},b=(e,t)=>{const{t:n,n:r}=e;let s=!1;switch(typeof t){case"object":if(null!==t){(r||n).replaceWith(e.n=t.valueOf());break}case"undefined":s=!0;default:n.data=s?"":t,r&&(e.n=null,r.replaceWith(n))}return t},C=(e,t,n)=>e[n]=t,w=(e,t,n)=>C(e,t,n.slice(1)),x=(e,t,n)=>null==t?(g(e,n),t):C(e,t,n),y=(e,t)=>("function"==typeof t?t(e):t.current=e,t),$=(e,t,n)=>(null==t?g(e,n):p(e,n,t),t),N=(e,t,n)=>(e.toggleAttribute(n.slice(1),t),t),k=(e,t,n)=>{const{length:s}=t;if(e.data=`[${s}]`,s)return((e,t,n,r,s)=>{const l=n.length;let o=t.length,i=l,a=0,c=0,u=null;for(;a<o||c<i;)if(o===a){const t=i<l?c?r(n[c-1],-0).nextSibling:r(n[i-c],0):s;for(;c<i;)e.insertBefore(r(n[c++],1),t)}else if(i===c)for(;a<o;)u&&u.has(t[a])||e.removeChild(r(t[a],-1)),a++;else if(t[a]===n[c])a++,c++;else if(t[o-1]===n[i-1])o--,i--;else if(t[a]===n[i-1]&&n[c]===t[o-1]){const s=r(t[--o],-1).nextSibling;e.insertBefore(r(n[c++],1),r(t[a++],-1).nextSibling),e.insertBefore(r(n[--i],1),s),t[o]=n[i]}else{if(!u){u=new Map;let e=c;for(;e<i;)u.set(n[e],e++)}if(u.has(t[a])){const s=u.get(t[a]);if(c<s&&s<i){let l=a,d=1;for(;++l<o&&l<i&&u.get(t[l])===s+d;)d++;if(d>s-c){const l=r(t[a],0);for(;c<s;)e.insertBefore(r(n[c++],1),l)}else e.replaceChild(r(n[c++],1),r(t[a++],-1))}else a++}else e.removeChild(r(t[a++],-1))}return n})(e.parentNode,n,t,d,e);switch(n.length){case 1:n[0].remove();case 0:break;default:a(d(n[0],0),d(n.at(-1),-0),!1)}return r},O=new Map([["aria",(e,t)=>{for(const n in t){const r=t[n],s="role"===n?n:`aria-${n}`;null==r?g(e,s):p(e,s,r)}return t}],["class",(e,t)=>x(e,t,null==t?"class":"className")],["data",(e,t)=>{const{dataset:n}=e;for(const e in t)null==t[e]?delete n[e]:n[e]=t[e];return t}],["ref",y],["style",(e,t)=>null==t?x(e,t,"style"):C(e.style,t,"cssText")]]),W=(e,r,s)=>{switch(r[0]){case".":return w;case"?":return N;case"@":return v;default:return s||"ownerSVGElement"in e?"ref"===r?y:$:O.get(r)||(r in e?r.startsWith("on")?C:((e,r)=>{let s;do{s=n(e,r)}while(!s&&(e=t(e)));return s})(e,r)?.set?x:$:$)}},M=(e,t)=>(e.textContent=null==t?"":t,t),A=(e,t,n)=>({a:e,b:t,c:n}),S=()=>A(null,null,r),E=(e,t)=>t.reduceRight(T,e),T=(e,t)=>e.childNodes[t];var j=e=>(t,n)=>{const{a:s,b:l,c:o}=e(t,n),i=document.importNode(s,!0);let a=r;if(l!==r){a=[];for(let e,t,n=0;n<l.length;n++){const{a:s,b:o,c:f}=l[n],p=s===t?e:e=E(i,t=s);a[n]=(c=o,u=p,d=f,h=o===k?[]:o===b?S():null,{v:r,u:c,t:u,n:d,c:h})}}var c,u,d,h;return((e,t)=>({b:e,c:t}))(o?i.firstChild:new f(i),a)};const B=/^(?:plaintext|script|style|textarea|title|xmp)$/i,D=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,P=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,R=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,z=/[\x01\x02]/g;let F,L,H=document.createElement("template");var Z=(e,t)=>{if(t)return F||(F=document.createElementNS("http://www.w3.org/2000/svg","svg"),L=s(),L.selectNodeContents(F)),L.createContextualFragment(e);H.innerHTML=e;const{content:n}=H;return H=H.cloneNode(!1),n};const G=e=>{const t=[];let n;for(;n=e.parentNode;)t.push(t.indexOf.call(n.childNodes,e)),e=n;return t},V=()=>document.createTextNode(""),_=(t,n,s)=>{const o=Z(((e,t,n)=>{let r=0;return e.join("").trim().replace(P,((e,t,r,s)=>`<${t}${r.replace(R,"=$2$1").trimEnd()}${s?n||D.test(t)?" /":`></${t}`:""}>`)).replace(z,(e=>""===e?`\x3c!--${t+r++}--\x3e`:t+r++))})(t,I,s),s),{length:i}=t;let a=r;if(i>1){const t=[],r=document.createTreeWalker(o,129);let l=0,c=`${I}${l++}`;for(a=[];l<i;){const o=r.nextNode();if(8===o.nodeType){if(o.data===c){const r=e(n[l-1])?k:b;r===b&&t.push(o),a.push(A(G(o),r,null)),c=`${I}${l++}`}}else{let e;for(;o.hasAttribute(c);){e||(e=G(o));const t=o.getAttribute(c);a.push(A(e,W(o,t,s),t)),g(o,c),c=`${I}${l++}`}!s&&B.test(o.localName)&&o.textContent.trim()===`\x3c!--${c}--\x3e`&&(a.push(A(e||G(o),M,null)),c=`${I}${l++}`)}}for(l=0;l<t.length;l++)t[l].replaceWith(V())}const{childNodes:c}=o;let{length:u}=c;return u<1?(u=1,o.appendChild(V())):1===u&&1!==i&&1!==c[0].nodeType&&(u=0),l(q,t,A(o,a,1===u))},q=new WeakMap,I="isµ";var J=e=>(t,n)=>q.get(t)||_(t,n,e);const K=j(J(!1)),Q=j(J(!0)),U=(e,{s:t,t:n,v:r})=>{if(e.a!==n){const{b:s,c:l}=(t?Q:K)(n,r);e.a=n,e.b=s,e.c=l}for(let{c:t}=e,n=0;n<t.length;n++){const e=r[n],s=t[n];switch(s.u){case k:s.v=k(s.t,X(s.c,e),s.v);break;case b:const t=e instanceof Y?U(s.c||(s.c=S()),e):(s.c=null,e);t!==s.v&&(s.v=b(s,t));break;default:e!==s.v&&(s.v=s.u(s.t,e,s.n,s.v))}}return e.b},X=(e,t)=>{let n=0,{length:r}=t;for(r<e.length&&e.splice(r);n<r;n++){const r=t[n];r instanceof Y?t[n]=U(e[n]||(e[n]=S()),r):e[n]=null}return t};class Y{constructor(e,t,n){this.s=e,this.t=t,this.v=n}toDOM(e=S()){return U(e,this)}}
/*! (c) Andrea Giammarchi - MIT */const ee=e=>(t,...n)=>new Y(e,t,n),te=ee(!1),ne=ee(!0),re=new WeakMap;var se=(e,t,n)=>{const r=re.get(e)||l(re,e,S()),{b:s}=r,o=n&&"function"==typeof t?t():t,i=o instanceof Y?o.toDOM(r):o;return s!==i&&e.replaceChildren((r.b=i).valueOf()),e};
/*! (c) Andrea Giammarchi - MIT */const le=new WeakMap,oe=e=>(t,n)=>{const r=le.get(t)||l(le,t,new Map);return r.get(n)||l(r,n,function(t,...n){return new Y(e,t,n).toDOM(this)}.bind(S()))},ie=oe(!1),ae=oe(!0),ce=new FinalizationRegistry((([e,t,n])=>{n&&console.debug(`Held value ${String(t)} not relevant anymore`),e(t)})),ue=Object.create(null),de=new WeakMap,he=e=>e();let fe=!0;const pe=e=>(t,n)=>{if(fe="function"!=typeof n,ge(t),fe)return se(t,n,!1);fe=!0;const r=new WeakRef(t),s=e((()=>{se(r.deref(),n(),!1)}));return de.set(t,s),((e,t,{debug:n,handler:r,return:s,token:l=e}=ue)=>{const o=s||new Proxy(e,r||ue),i=[o,[t,e,!!n]];return!1!==l&&i.push(l),ce.register(...i),o})(s,he,{return:t})},ge=e=>{const t=de.get(e);var n;t&&(fe&&de.delete(e),n=t,ce.unregister(n),t())};export{Y as Hole,pe as attach,O as attr,ge as detach,te as html,ie as htmlFor,pe as reactive,ne as svg,ae as svgFor};
const{isArray:e}=Array,{getPrototypeOf:t,getOwnPropertyDescriptor:n}=Object,r=[],s=()=>document.createRange(),l=(e,t,n)=>(e.set(t,n),n),o=(e,t)=>t.reduceRight(i,e),i=(e,t)=>e.childNodes[t],{setPrototypeOf:a}=Object;let c;var u=(e,t,n)=>(c||(c=s()),n?c.setStartAfter(e):c.setStartBefore(e),c.setEndAfter(t),c.deleteContents(),e);const d=({firstChild:e,lastChild:t},n)=>u(e,t,n);let h=!1;const f=(e,t)=>h&&11===e.nodeType?1/t<0?t?d(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e,p=e=>document.createComment(e);class g extends((e=>{function t(e){return a(e,new.target.prototype)}return t.prototype=e.prototype,t})(DocumentFragment)){#e=p("<>");#t=p("</>");#n=r;constructor(e){super(e),this.replaceChildren(this.#e,...e.childNodes,this.#t),h=!0}get firstChild(){return this.#e}get lastChild(){return this.#t}get parentNode(){return this.#e.parentNode}remove(){d(this,!1)}replaceWith(e){d(this,!0).replaceWith(e)}valueOf(){const{parentNode:e}=this;if(e===this)this.#n===r&&(this.#n=[...this.childNodes]);else{if(e){let{firstChild:e,lastChild:t}=this;for(this.#n=[e];e!==t;)this.#n.push(e=e.nextSibling)}this.replaceChildren(...this.#n)}return this}}const m=(e,t,n)=>e.setAttribute(t,n),v=(e,t)=>e.removeAttribute(t);let b;const C=(t,n,r)=>{r=r.slice(1),b||(b=new WeakMap);const s=b.get(t)||l(b,t,{});let o=s[r];return o&&o[0]&&t.removeEventListener(r,...o),o=e(n)?n:[n,!1],s[r]=o,o[0]&&t.addEventListener(r,...o),n},w=(e,t)=>{const{t:n,n:r}=e;let s=!1;switch(typeof t){case"object":if(null!==t){(r||n).replaceWith(e.n=t.valueOf());break}case"undefined":s=!0;default:n.data=s?"":t,r&&(e.n=null,r.replaceWith(n))}return t},x=(e,t,n)=>e[n]=t,y=(e,t,n)=>x(e,t,n.slice(1)),$=(e,t,n)=>null==t?(v(e,n),t):x(e,t,n),N=(e,t)=>("function"==typeof t?t(e):t.current=e,t),k=(e,t,n)=>(null==t?v(e,n):m(e,n,t),t),O=(e,t,n)=>(e.toggleAttribute(n.slice(1),t),t),W=(e,t,n)=>{const{length:s}=t;if(e.data=`[${s}]`,s)return((e,t,n,r,s)=>{const l=n.length;let o=t.length,i=l,a=0,c=0,u=null;for(;a<o||c<i;)if(o===a){const t=i<l?c?r(n[c-1],-0).nextSibling:r(n[i-c],0):s;for(;c<i;)e.insertBefore(r(n[c++],1),t)}else if(i===c)for(;a<o;)u&&u.has(t[a])||e.removeChild(r(t[a],-1)),a++;else if(t[a]===n[c])a++,c++;else if(t[o-1]===n[i-1])o--,i--;else if(t[a]===n[i-1]&&n[c]===t[o-1]){const s=r(t[--o],-1).nextSibling;e.insertBefore(r(n[c++],1),r(t[a++],-1).nextSibling),e.insertBefore(r(n[--i],1),s),t[o]=n[i]}else{if(!u){u=new Map;let e=c;for(;e<i;)u.set(n[e],e++)}if(u.has(t[a])){const s=u.get(t[a]);if(c<s&&s<i){let l=a,d=1;for(;++l<o&&l<i&&u.get(t[l])===s+d;)d++;if(d>s-c){const l=r(t[a],0);for(;c<s;)e.insertBefore(r(n[c++],1),l)}else e.replaceChild(r(n[c++],1),r(t[a++],-1))}else a++}else e.removeChild(r(t[a++],-1))}return n})(e.parentNode,n,t,f,e);switch(n.length){case 1:n[0].remove();case 0:break;default:u(f(n[0],0),f(n.at(-1),-0),!1)}return r},M=new Map([["aria",(e,t)=>{for(const n in t){const r=t[n],s="role"===n?n:`aria-${n}`;null==r?v(e,s):m(e,s,r)}return t}],["class",(e,t)=>$(e,t,null==t?"class":"className")],["data",(e,t)=>{const{dataset:n}=e;for(const e in t)null==t[e]?delete n[e]:n[e]=t[e];return t}],["ref",N],["style",(e,t)=>null==t?$(e,t,"style"):x(e.style,t,"cssText")]]),A=(e,r,s)=>{switch(r[0]){case".":return y;case"?":return O;case"@":return C;default:return s||"ownerSVGElement"in e?"ref"===r?N:k:M.get(r)||(r in e?r.startsWith("on")?x:((e,r)=>{let s;do{s=n(e,r)}while(!s&&(e=t(e)));return s})(e,r)?.set?$:k:k)}},S=(e,t)=>(e.textContent=null==t?"":t,t),E=(e,t,n)=>({a:e,b:t,c:n}),T=()=>E(null,null,r);var j=e=>(t,n)=>{const{a:s,b:l,c:i}=e(t,n),a=document.importNode(s,!0);let c=r;if(l!==r){c=[];for(let e,t,n=0;n<l.length;n++){const{a:s,b:i,c:p}=l[n],g=s===t?e:e=o(a,t=s);c[n]=(u=i,d=g,h=p,f=i===W?[]:i===w?T():null,{v:r,u:u,t:d,n:h,c:f})}}var u,d,h,f;return((e,t)=>({b:e,c:t}))(i?a.firstChild:new g(a),c)};const B=/^(?:plaintext|script|style|textarea|title|xmp)$/i,D=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,P=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,R=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,z=/[\x01\x02]/g;let F,L,H=document.createElement("template");var Z=(e,t)=>{if(t)return F||(F=document.createElementNS("http://www.w3.org/2000/svg","svg"),L=s(),L.selectNodeContents(F)),L.createContextualFragment(e);H.innerHTML=e;const{content:n}=H;return H=H.cloneNode(!1),n};const G=e=>{const t=[];let n;for(;n=e.parentNode;)t.push(t.indexOf.call(n.childNodes,e)),e=n;return t},V=()=>document.createTextNode(""),_=(t,n,s)=>{const o=Z(((e,t,n)=>{let r=0;return e.join("").trim().replace(P,((e,t,r,s)=>`<${t}${r.replace(R,"=$2$1").trimEnd()}${s?n||D.test(t)?" /":`></${t}`:""}>`)).replace(z,(e=>""===e?`\x3c!--${t+r++}--\x3e`:t+r++))})(t,I,s),s),{length:i}=t;let a=r;if(i>1){const t=[],r=document.createTreeWalker(o,129);let l=0,c=`${I}${l++}`;for(a=[];l<i;){const o=r.nextNode();if(8===o.nodeType){if(o.data===c){const r=e(n[l-1])?W:w;r===w&&t.push(o),a.push(E(G(o),r,null)),c=`${I}${l++}`}}else{let e;for(;o.hasAttribute(c);){e||(e=G(o));const t=o.getAttribute(c);a.push(E(e,A(o,t,s),t)),v(o,c),c=`${I}${l++}`}!s&&B.test(o.localName)&&o.textContent.trim()===`\x3c!--${c}--\x3e`&&(a.push(E(e||G(o),S,null)),c=`${I}${l++}`)}}for(l=0;l<t.length;l++)t[l].replaceWith(V())}const{childNodes:c}=o;let{length:u}=c;return u<1?(u=1,o.appendChild(V())):1===u&&1!==i&&1!==c[0].nodeType&&(u=0),l(q,t,E(o,a,1===u))},q=new WeakMap,I="isµ";var J=e=>(t,n)=>q.get(t)||_(t,n,e);const K=j(J(!1)),Q=j(J(!0)),U=(e,{s:t,t:n,v:r})=>{if(e.a!==n){const{b:s,c:l}=(t?Q:K)(n,r);e.a=n,e.b=s,e.c=l}for(let{c:t}=e,n=0;n<t.length;n++){const e=r[n],s=t[n];switch(s.u){case W:s.v=W(s.t,X(s.c,e),s.v);break;case w:const t=e instanceof Y?U(s.c||(s.c=T()),e):(s.c=null,e);t!==s.v&&(s.v=w(s,t));break;default:e!==s.v&&(s.v=s.u(s.t,e,s.n,s.v))}}return e.b},X=(e,t)=>{let n=0,{length:r}=t;for(r<e.length&&e.splice(r);n<r;n++){const r=t[n];r instanceof Y?t[n]=U(e[n]||(e[n]=T()),r):e[n]=null}return t};class Y{constructor(e,t,n){this.s=e,this.t=t,this.v=n}toDOM(e=T()){return U(e,this)}}
/*! (c) Andrea Giammarchi - MIT */const ee=e=>(t,...n)=>new Y(e,t,n),te=ee(!1),ne=ee(!0),re=new WeakMap;var se=(e,t,n)=>{const r=re.get(e)||l(re,e,T()),{b:s}=r,o=n&&"function"==typeof t?t():t,i=o instanceof Y?o.toDOM(r):o;return s!==i&&e.replaceChildren((r.b=i).valueOf()),e};
/*! (c) Andrea Giammarchi - MIT */const le=new WeakMap,oe=e=>(t,n)=>{const r=le.get(t)||l(le,t,new Map);return r.get(n)||l(r,n,function(t,...n){return new Y(e,t,n).toDOM(this)}.bind(T()))},ie=oe(!1),ae=oe(!0),ce=new FinalizationRegistry((([e,t,n])=>{n&&console.debug(`Held value ${String(t)} not relevant anymore`),e(t)})),ue=Object.create(null),de=new WeakMap,he=e=>e();let fe=!0;const pe=e=>(t,n)=>{if(fe="function"!=typeof n,ge(t),fe)return se(t,n,!1);fe=!0;const r=new WeakRef(t),s=e((()=>{se(r.deref(),n(),!1)}));return de.set(t,s),((e,t,{debug:n,handler:r,return:s,token:l=e}=ue)=>{const o=s||new Proxy(e,r||ue),i=[o,[t,e,!!n]];return!1!==l&&i.push(l),ce.register(...i),o})(s,he,{return:t})},ge=e=>{const t=de.get(e);var n;t&&(fe&&de.delete(e),n=t,ce.unregister(n),t())};export{Y as Hole,pe as attach,M as attr,ge as detach,te as html,ie as htmlFor,pe as reactive,ne as svg,ae as svgFor};

@@ -25,2 +25,3 @@ # <em>µ</em>html

* **[uhtml/init](https://cdn.jsdelivr.net/npm/uhtml/init.js)** which returns a `document => uhtml/keyed` utility that can be bootstrapped with `uhtml/dom`, [LinkeDOM](https://github.com/WebReflection/linkedom), [JSDOM](https://github.com/jsdom/jsdom) for either *SSR* or *Workers* support
* **uhtml/ssr** which exports an utility that both SSR or Workers can use to parse and serve documents. This export provides same keyed utilities except the keyed feature is implicitly disabled as that's usually not desirable at all for SSR or rendering use cases, actually just an overhead. This might change in the future but for now I want to benchmark and see how competitive is `uhtml/ssr` out there. The `uhtml/dom` is also embedded in this export because the `Comment` class needs an override to produce a super clean output (at least until hydro story is up and running).
* **[uhtml/dom](https://cdn.jsdelivr.net/npm/uhtml/dom.js)** which returns a specialized *uhtml* compliant DOM environment that can be passed to the `uhtml/init` export to have 100% same-thing running on both client or Web Worker / Server. This entry exports `{ Document, DOMParser }` where the former can be used to create a new *document* while the latter one can parse well formed HTML or SVG content and return the document out of the box.

@@ -27,0 +28,0 @@ * **[uhtml/reactive](https://cdn.jsdelivr.net/npm/uhtml/reactive.js)** which allows usage of symbols within the optionally *keyed* render function. The only difference with other exports, beside exporting a `reactive` field instead of `render`, so that `const render = reactive(effect)` creates a reactive render per each library, is that the `render(where, () => what)`, with a function as second argument is mandatory when the rendered stuff has signals in it, otherwise these can't side-effect properly.

/*! (c) Andrea Giammarchi */
let e=null;const t=t=>{let n=e;n||(e=new Set);try{t()}finally{if(!n){[e,n]=[null,e];for(const e of n)e._()}}},n=e=>{const t=[...e];return e.clear(),t};class r extends Set{constructor(e){super()._=e}dispose(){for(const e of n(this))e.delete(this),e.dispose?.()}}let s=null;const l=e=>{const t=new r((()=>{const n=s;s=t;try{e()}finally{s=n}}));return t},o=e=>{let t,n=l((()=>{t?.call?.(),t=e()}));return s&&s.add(n),n._(),()=>(t?.call?.(),n.dispose())},i=e=>{let t,n=s;return s=null,t=e(),s=n,t};class c extends Set{constructor(e){super()._=e}get value(){return s&&s.add(this.add(s)),this._}set value(t){if(this._!==t){this._=t;const r=!e;for(const t of n(this))r?t._():e.add(t)}}peek(){return this._}toJSON(){return this.value}valueOf(){return this.value}toString(){return String(this.value)}}const a=e=>new c(e);class u extends c{constructor(e,t){super(t).f=e,this.e=null}get value(){return this.e||(this.e=l((()=>{super.value=this.f(this._)})))._(),super.value}set value(e){throw new Error("computed is read-only")}}const d=(e,t)=>new u(e,t);const{isArray:h}=Array,{getPrototypeOf:f,getOwnPropertyDescriptor:p}=Object,g=[],v=()=>document.createRange(),m=(e,t,n)=>(e.set(t,n),n),{setPrototypeOf:b}=Object;let w;var C=(e,t,n)=>(w||(w=v()),n?w.setStartAfter(e):w.setStartBefore(e),w.setEndAfter(t),w.deleteContents(),e);const y=({firstChild:e,lastChild:t},n)=>C(e,t,n);let x=!1;const $=(e,t)=>x&&11===e.nodeType?1/t<0?t?y(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e,N=e=>document.createComment(e);class k extends((e=>{function t(e){return b(e,new.target.prototype)}return t.prototype=e.prototype,t})(DocumentFragment)){#e=N("<>");#t=N("</>");#n=g;constructor(e){super(e),this.replaceChildren(this.#e,...e.childNodes,this.#t),x=!0}get firstChild(){return this.#e}get lastChild(){return this.#t}get parentNode(){return this.#e.parentNode}remove(){y(this,!1)}replaceWith(e){y(this,!0).replaceWith(e)}valueOf(){let{firstChild:e,lastChild:t,parentNode:n}=this;if(n===this)this.#n===g&&(this.#n=[...this.childNodes]);else{if(n)for(this.#n=[e];e!==t;)this.#n.push(e=e.nextSibling);this.replaceChildren(...this.#n)}return this}}const O=(e,t,n)=>e.setAttribute(t,n),S=(e,t)=>e.removeAttribute(t);let W;const M=(e,t,n)=>{n=n.slice(1),W||(W=new WeakMap);const r=W.get(e)||m(W,e,{});let s=r[n];return s&&s[0]&&e.removeEventListener(n,...s),s=h(t)?t:[t,!1],r[n]=s,s[0]&&e.addEventListener(n,...s),t},_=(e,t)=>{const{t:n,n:r}=e;let s=!1;switch(typeof t){case"object":if(null!==t){(r||n).replaceWith(e.n=t.valueOf());break}case"undefined":s=!0;default:n.data=s?"":t,r&&(e.n=null,r.replaceWith(n))}return t},A=(e,t,n)=>e[n]=t,E=(e,t,n)=>A(e,t,n.slice(1)),T=(e,t,n)=>null==t?(S(e,n),t):A(e,t,n),j=(e,t)=>("function"==typeof t?t(e):t.current=e,t),B=(e,t,n)=>(null==t?S(e,n):O(e,n,t),t),D=(e,t,n)=>(e.toggleAttribute(n.slice(1),t),t),P=(e,t,n)=>{const{length:r}=t;if(e.data=`[${r}]`,r)return((e,t,n,r,s)=>{const l=n.length;let o=t.length,i=l,c=0,a=0,u=null;for(;c<o||a<i;)if(o===c){const t=i<l?a?r(n[a-1],-0).nextSibling:r(n[i-a],0):s;for(;a<i;)e.insertBefore(r(n[a++],1),t)}else if(i===a)for(;c<o;)u&&u.has(t[c])||e.removeChild(r(t[c],-1)),c++;else if(t[c]===n[a])c++,a++;else if(t[o-1]===n[i-1])o--,i--;else if(t[c]===n[i-1]&&n[a]===t[o-1]){const s=r(t[--o],-1).nextSibling;e.insertBefore(r(n[a++],1),r(t[c++],-1).nextSibling),e.insertBefore(r(n[--i],1),s),t[o]=n[i]}else{if(!u){u=new Map;let e=a;for(;e<i;)u.set(n[e],e++)}if(u.has(t[c])){const s=u.get(t[c]);if(a<s&&s<i){let l=c,d=1;for(;++l<o&&l<i&&u.get(t[l])===s+d;)d++;if(d>s-a){const l=r(t[c],0);for(;a<s;)e.insertBefore(r(n[a++],1),l)}else e.replaceChild(r(n[a++],1),r(t[c++],-1))}else c++}else e.removeChild(r(t[c++],-1))}return n})(e.parentNode,n,t,$,e);switch(n.length){case 1:n[0].remove();case 0:break;default:C($(n[0],0),$(n.at(-1),-0),!1)}return g},R=new Map([["aria",(e,t)=>{for(const n in t){const r=t[n],s="role"===n?n:`aria-${n}`;null==r?S(e,s):O(e,s,r)}return t}],["class",(e,t)=>T(e,t,null==t?"class":"className")],["data",(e,t)=>{const{dataset:n}=e;for(const e in t)null==t[e]?delete n[e]:n[e]=t[e];return t}],["ref",j],["style",(e,t)=>null==t?T(e,t,"style"):A(e.style,t,"cssText")]]),z=(e,t,n)=>{switch(t[0]){case".":return E;case"?":return D;case"@":return M;default:return n||"ownerSVGElement"in e?"ref"===t?j:B:R.get(t)||(t in e?t.startsWith("on")?A:((e,t)=>{let n;do{n=p(e,t)}while(!n&&(e=f(e)));return n})(e,t)?.set?T:B:B)}},F=(e,t)=>(e.textContent=null==t?"":t,t),L=(e,t,n)=>({a:e,b:t,c:n}),H=()=>L(null,null,g),Z=(e,t)=>t.reduceRight(G,e),G=(e,t)=>e.childNodes[t];var J=e=>(t,n)=>{const{a:r,b:s,c:l}=e(t,n),o=document.importNode(r,!0);let i=g;if(s!==g){i=[];for(let e,t,n=0;n<s.length;n++){const{a:r,b:l,c:h}=s[n],f=r===t?e:e=Z(o,t=r);i[n]=(c=l,a=f,u=h,d=l===P?[]:l===_?H():null,{v:g,u:c,t:a,n:u,c:d})}}var c,a,u,d;return((e,t)=>({b:e,c:t}))(l?o.firstChild:new k(o),i)};const V=/^(?:plaintext|script|style|textarea|title|xmp)$/i,q=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,I=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,K=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,Q=/[\x01\x02]/g;let U,X,Y=document.createElement("template");var ee=(e,t)=>{if(t)return U||(U=document.createElementNS("http://www.w3.org/2000/svg","svg"),X=v(),X.selectNodeContents(U)),X.createContextualFragment(e);Y.innerHTML=e;const{content:n}=Y;return Y=Y.cloneNode(!1),n};const te=e=>{const t=[];let n;for(;n=e.parentNode;)t.push(t.indexOf.call(n.childNodes,e)),e=n;return t},ne=()=>document.createTextNode(""),re=(e,t,n)=>{const r=ee(((e,t,n)=>{let r=0;return e.join("").trim().replace(I,((e,t,r,s)=>`<${t}${r.replace(K,"=$2$1").trimEnd()}${s?n||q.test(t)?" /":`></${t}`:""}>`)).replace(Q,(e=>""===e?`\x3c!--${t+r++}--\x3e`:t+r++))})(e,le,n),n),{length:s}=e;let l=g;if(s>1){const e=[],o=document.createTreeWalker(r,129);let i=0,c=`${le}${i++}`;for(l=[];i<s;){const r=o.nextNode();if(8===r.nodeType){if(r.data===c){const n=h(t[i-1])?P:_;n===_&&e.push(r),l.push(L(te(r),n,null)),c=`${le}${i++}`}}else{let e;for(;r.hasAttribute(c);){e||(e=te(r));const t=r.getAttribute(c);l.push(L(e,z(r,t,n),t)),S(r,c),c=`${le}${i++}`}!n&&V.test(r.localName)&&r.textContent.trim()===`\x3c!--${c}--\x3e`&&(l.push(L(e||te(r),F,null)),c=`${le}${i++}`)}}for(i=0;i<e.length;i++)e[i].replaceWith(ne())}const{childNodes:o}=r;let{length:i}=o;return i<1?(i=1,r.appendChild(ne())):1===i&&1!==s&&1!==o[0].nodeType&&(i=0),m(se,e,L(r,l,1===i))},se=new WeakMap,le="isµ";var oe=e=>(t,n)=>se.get(t)||re(t,n,e);const ie=J(oe(!1)),ce=J(oe(!0)),ae=(e,{s:t,t:n,v:r})=>{if(e.a!==n){const{b:s,c:l}=(t?ce:ie)(n,r);e.a=n,e.b=s,e.c=l}for(let{c:t}=e,n=0;n<t.length;n++){const e=r[n],s=t[n];switch(s.u){case P:s.v=P(s.t,ue(s.c,e),s.v);break;case _:const t=e instanceof de?ae(s.c||(s.c=H()),e):(s.c=null,e);t!==s.v&&(s.v=_(s,t));break;default:e!==s.v&&(s.v=s.u(s.t,e,s.n,s.v))}}return e.b},ue=(e,t)=>{let n=0,{length:r}=t;for(r<e.length&&e.splice(r);n<r;n++){const r=t[n];r instanceof de?t[n]=ae(e[n]||(e[n]=H()),r):e[n]=null}return t};class de{constructor(e,t,n){this.s=e,this.t=t,this.v=n}toDOM(e=H()){return ae(e,this)}}
/*! (c) Andrea Giammarchi - MIT */const he=e=>(t,...n)=>new de(e,t,n),fe=he(!1),pe=he(!0),ge=new WeakMap;var ve=(e,t,n)=>{const r=ge.get(e)||m(ge,e,H()),{b:s}=r,l=n&&"function"==typeof t?t():t,o=l instanceof de?l.toDOM(r):l;return s!==o&&e.replaceChildren((r.b=o).valueOf()),e};
/*! (c) Andrea Giammarchi - MIT */const me=new WeakMap,be=e=>(t,n)=>{const r=me.get(t)||m(me,t,new Map);return r.get(n)||m(r,n,function(t,...n){return new de(e,t,n).toDOM(this)}.bind(H()))},we=be(!1),Ce=be(!0),ye=new FinalizationRegistry((([e,t,n])=>{n&&console.debug(`Held value ${String(t)} not relevant anymore`),e(t)})),xe=Object.create(null),$e=new WeakMap,Ne=e=>e();let ke=!0;const Oe=e=>{const t=$e.get(e);var n;t&&(ke&&$e.delete(e),n=t,ye.unregister(n),t())},Se=(e=>(t,n)=>{if(ke="function"!=typeof n,Oe(t),ke)return ve(t,n,!1);ke=!0;const r=new WeakRef(t),s=e((()=>{ve(r.deref(),n(),!1)}));return $e.set(t,s),((e,t,{debug:n,handler:r,return:s,token:l=e}=xe)=>{const o=s||new Proxy(e,r||xe),i=[o,[t,e,!!n]];return!1!==l&&i.push(l),ye.register(...i),o})(s,Ne,{return:t})})(o);export{u as Computed,de as Hole,c as Signal,R as attr,t as batch,d as computed,Oe as detach,o as effect,fe as html,we as htmlFor,Se as render,a as signal,pe as svg,Ce as svgFor,i as untracked};
let e=null;const t=t=>{let n=e;n||(e=new Set);try{t()}finally{if(!n){[e,n]=[null,e];for(const e of n)e._()}}},n=e=>{const t=[...e];return e.clear(),t};class r extends Set{constructor(e){super()._=e}dispose(){for(const e of n(this))e.delete(this),e.dispose?.()}}let s=null;const l=e=>{const t=new r((()=>{const n=s;s=t;try{e()}finally{s=n}}));return t},o=e=>{let t,n=l((()=>{t?.call?.(),t=e()}));return s&&s.add(n),n._(),()=>(t?.call?.(),n.dispose())},i=e=>{let t,n=s;return s=null,t=e(),s=n,t};class c extends Set{constructor(e){super()._=e}get value(){return s&&s.add(this.add(s)),this._}set value(t){if(this._!==t){this._=t;const r=!e;for(const t of n(this))r?t._():e.add(t)}}peek(){return this._}toJSON(){return this.value}valueOf(){return this.value}toString(){return String(this.value)}}const a=e=>new c(e);class u extends c{constructor(e,t){super(t).f=e,this.e=null}get value(){return this.e||(this.e=l((()=>{super.value=this.f(this._)})))._(),super.value}set value(e){throw new Error("computed is read-only")}}const d=(e,t)=>new u(e,t);const{isArray:h}=Array,{getPrototypeOf:f,getOwnPropertyDescriptor:p}=Object,g=[],v=()=>document.createRange(),m=(e,t,n)=>(e.set(t,n),n),b=(e,t)=>t.reduceRight(w,e),w=(e,t)=>e.childNodes[t],{setPrototypeOf:C}=Object;let y;var x=(e,t,n)=>(y||(y=v()),n?y.setStartAfter(e):y.setStartBefore(e),y.setEndAfter(t),y.deleteContents(),e);const $=({firstChild:e,lastChild:t},n)=>x(e,t,n);let N=!1;const k=(e,t)=>N&&11===e.nodeType?1/t<0?t?$(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e,O=e=>document.createComment(e);class S extends((e=>{function t(e){return C(e,new.target.prototype)}return t.prototype=e.prototype,t})(DocumentFragment)){#e=O("<>");#t=O("</>");#n=g;constructor(e){super(e),this.replaceChildren(this.#e,...e.childNodes,this.#t),N=!0}get firstChild(){return this.#e}get lastChild(){return this.#t}get parentNode(){return this.#e.parentNode}remove(){$(this,!1)}replaceWith(e){$(this,!0).replaceWith(e)}valueOf(){const{parentNode:e}=this;if(e===this)this.#n===g&&(this.#n=[...this.childNodes]);else{if(e){let{firstChild:e,lastChild:t}=this;for(this.#n=[e];e!==t;)this.#n.push(e=e.nextSibling)}this.replaceChildren(...this.#n)}return this}}const W=(e,t,n)=>e.setAttribute(t,n),M=(e,t)=>e.removeAttribute(t);let _;const A=(e,t,n)=>{n=n.slice(1),_||(_=new WeakMap);const r=_.get(e)||m(_,e,{});let s=r[n];return s&&s[0]&&e.removeEventListener(n,...s),s=h(t)?t:[t,!1],r[n]=s,s[0]&&e.addEventListener(n,...s),t},E=(e,t)=>{const{t:n,n:r}=e;let s=!1;switch(typeof t){case"object":if(null!==t){(r||n).replaceWith(e.n=t.valueOf());break}case"undefined":s=!0;default:n.data=s?"":t,r&&(e.n=null,r.replaceWith(n))}return t},T=(e,t,n)=>e[n]=t,j=(e,t,n)=>T(e,t,n.slice(1)),B=(e,t,n)=>null==t?(M(e,n),t):T(e,t,n),D=(e,t)=>("function"==typeof t?t(e):t.current=e,t),P=(e,t,n)=>(null==t?M(e,n):W(e,n,t),t),R=(e,t,n)=>(e.toggleAttribute(n.slice(1),t),t),z=(e,t,n)=>{const{length:r}=t;if(e.data=`[${r}]`,r)return((e,t,n,r,s)=>{const l=n.length;let o=t.length,i=l,c=0,a=0,u=null;for(;c<o||a<i;)if(o===c){const t=i<l?a?r(n[a-1],-0).nextSibling:r(n[i-a],0):s;for(;a<i;)e.insertBefore(r(n[a++],1),t)}else if(i===a)for(;c<o;)u&&u.has(t[c])||e.removeChild(r(t[c],-1)),c++;else if(t[c]===n[a])c++,a++;else if(t[o-1]===n[i-1])o--,i--;else if(t[c]===n[i-1]&&n[a]===t[o-1]){const s=r(t[--o],-1).nextSibling;e.insertBefore(r(n[a++],1),r(t[c++],-1).nextSibling),e.insertBefore(r(n[--i],1),s),t[o]=n[i]}else{if(!u){u=new Map;let e=a;for(;e<i;)u.set(n[e],e++)}if(u.has(t[c])){const s=u.get(t[c]);if(a<s&&s<i){let l=c,d=1;for(;++l<o&&l<i&&u.get(t[l])===s+d;)d++;if(d>s-a){const l=r(t[c],0);for(;a<s;)e.insertBefore(r(n[a++],1),l)}else e.replaceChild(r(n[a++],1),r(t[c++],-1))}else c++}else e.removeChild(r(t[c++],-1))}return n})(e.parentNode,n,t,k,e);switch(n.length){case 1:n[0].remove();case 0:break;default:x(k(n[0],0),k(n.at(-1),-0),!1)}return g},F=new Map([["aria",(e,t)=>{for(const n in t){const r=t[n],s="role"===n?n:`aria-${n}`;null==r?M(e,s):W(e,s,r)}return t}],["class",(e,t)=>B(e,t,null==t?"class":"className")],["data",(e,t)=>{const{dataset:n}=e;for(const e in t)null==t[e]?delete n[e]:n[e]=t[e];return t}],["ref",D],["style",(e,t)=>null==t?B(e,t,"style"):T(e.style,t,"cssText")]]),L=(e,t,n)=>{switch(t[0]){case".":return j;case"?":return R;case"@":return A;default:return n||"ownerSVGElement"in e?"ref"===t?D:P:F.get(t)||(t in e?t.startsWith("on")?T:((e,t)=>{let n;do{n=p(e,t)}while(!n&&(e=f(e)));return n})(e,t)?.set?B:P:P)}},H=(e,t)=>(e.textContent=null==t?"":t,t),Z=(e,t,n)=>({a:e,b:t,c:n}),G=()=>Z(null,null,g);var J=e=>(t,n)=>{const{a:r,b:s,c:l}=e(t,n),o=document.importNode(r,!0);let i=g;if(s!==g){i=[];for(let e,t,n=0;n<s.length;n++){const{a:r,b:l,c:h}=s[n],f=r===t?e:e=b(o,t=r);i[n]=(c=l,a=f,u=h,d=l===z?[]:l===E?G():null,{v:g,u:c,t:a,n:u,c:d})}}var c,a,u,d;return((e,t)=>({b:e,c:t}))(l?o.firstChild:new S(o),i)};const V=/^(?:plaintext|script|style|textarea|title|xmp)$/i,q=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,I=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,K=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,Q=/[\x01\x02]/g;let U,X,Y=document.createElement("template");var ee=(e,t)=>{if(t)return U||(U=document.createElementNS("http://www.w3.org/2000/svg","svg"),X=v(),X.selectNodeContents(U)),X.createContextualFragment(e);Y.innerHTML=e;const{content:n}=Y;return Y=Y.cloneNode(!1),n};const te=e=>{const t=[];let n;for(;n=e.parentNode;)t.push(t.indexOf.call(n.childNodes,e)),e=n;return t},ne=()=>document.createTextNode(""),re=(e,t,n)=>{const r=ee(((e,t,n)=>{let r=0;return e.join("").trim().replace(I,((e,t,r,s)=>`<${t}${r.replace(K,"=$2$1").trimEnd()}${s?n||q.test(t)?" /":`></${t}`:""}>`)).replace(Q,(e=>""===e?`\x3c!--${t+r++}--\x3e`:t+r++))})(e,le,n),n),{length:s}=e;let l=g;if(s>1){const e=[],o=document.createTreeWalker(r,129);let i=0,c=`${le}${i++}`;for(l=[];i<s;){const r=o.nextNode();if(8===r.nodeType){if(r.data===c){const n=h(t[i-1])?z:E;n===E&&e.push(r),l.push(Z(te(r),n,null)),c=`${le}${i++}`}}else{let e;for(;r.hasAttribute(c);){e||(e=te(r));const t=r.getAttribute(c);l.push(Z(e,L(r,t,n),t)),M(r,c),c=`${le}${i++}`}!n&&V.test(r.localName)&&r.textContent.trim()===`\x3c!--${c}--\x3e`&&(l.push(Z(e||te(r),H,null)),c=`${le}${i++}`)}}for(i=0;i<e.length;i++)e[i].replaceWith(ne())}const{childNodes:o}=r;let{length:i}=o;return i<1?(i=1,r.appendChild(ne())):1===i&&1!==s&&1!==o[0].nodeType&&(i=0),m(se,e,Z(r,l,1===i))},se=new WeakMap,le="isµ";var oe=e=>(t,n)=>se.get(t)||re(t,n,e);const ie=J(oe(!1)),ce=J(oe(!0)),ae=(e,{s:t,t:n,v:r})=>{if(e.a!==n){const{b:s,c:l}=(t?ce:ie)(n,r);e.a=n,e.b=s,e.c=l}for(let{c:t}=e,n=0;n<t.length;n++){const e=r[n],s=t[n];switch(s.u){case z:s.v=z(s.t,ue(s.c,e),s.v);break;case E:const t=e instanceof de?ae(s.c||(s.c=G()),e):(s.c=null,e);t!==s.v&&(s.v=E(s,t));break;default:e!==s.v&&(s.v=s.u(s.t,e,s.n,s.v))}}return e.b},ue=(e,t)=>{let n=0,{length:r}=t;for(r<e.length&&e.splice(r);n<r;n++){const r=t[n];r instanceof de?t[n]=ae(e[n]||(e[n]=G()),r):e[n]=null}return t};class de{constructor(e,t,n){this.s=e,this.t=t,this.v=n}toDOM(e=G()){return ae(e,this)}}
/*! (c) Andrea Giammarchi - MIT */const he=e=>(t,...n)=>new de(e,t,n),fe=he(!1),pe=he(!0),ge=new WeakMap;var ve=(e,t,n)=>{const r=ge.get(e)||m(ge,e,G()),{b:s}=r,l=n&&"function"==typeof t?t():t,o=l instanceof de?l.toDOM(r):l;return s!==o&&e.replaceChildren((r.b=o).valueOf()),e};
/*! (c) Andrea Giammarchi - MIT */const me=new WeakMap,be=e=>(t,n)=>{const r=me.get(t)||m(me,t,new Map);return r.get(n)||m(r,n,function(t,...n){return new de(e,t,n).toDOM(this)}.bind(G()))},we=be(!1),Ce=be(!0),ye=new FinalizationRegistry((([e,t,n])=>{n&&console.debug(`Held value ${String(t)} not relevant anymore`),e(t)})),xe=Object.create(null),$e=new WeakMap,Ne=e=>e();let ke=!0;const Oe=e=>{const t=$e.get(e);var n;t&&(ke&&$e.delete(e),n=t,ye.unregister(n),t())},Se=(e=>(t,n)=>{if(ke="function"!=typeof n,Oe(t),ke)return ve(t,n,!1);ke=!0;const r=new WeakRef(t),s=e((()=>{ve(r.deref(),n(),!1)}));return $e.set(t,s),((e,t,{debug:n,handler:r,return:s,token:l=e}=xe)=>{const o=s||new Proxy(e,r||xe),i=[o,[t,e,!!n]];return!1!==l&&i.push(l),ye.register(...i),o})(s,Ne,{return:t})})(o);export{u as Computed,de as Hole,c as Signal,F as attr,t as batch,d as computed,Oe as detach,o as effect,fe as html,we as htmlFor,Se as render,a as signal,pe as svg,Ce as svgFor,i as untracked};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc