mancha 0.20.2 → 0.20.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/browser.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as StoreState, i as IRenderer, n as RenderParams, r as RendererPlugin, t as ParserParams } from "./interfaces-BnxInboi.js";
1
+ import { a as StoreState, i as IRenderer, n as RenderParams, r as RendererPlugin, t as ParserParams } from "./interfaces-VzZkcmCK.js";
2
2
  import { SafeStyleSheet } from "safevalues";
3
3
 
4
4
  //#region src/css_gen_basic.d.ts
package/dist/browser.js CHANGED
@@ -1,4 +1,4 @@
1
- import{n as e,t}from"./renderer-gpXY5UCp.js";import{safeStyleEl as n}from"safevalues/dom";import{concatStyleSheets as r,safeStyleSheet as i}from"safevalues";function a(){return r([i`*,::before,::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}`,i`html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}`,i`body{margin:0;line-height:inherit}`,i`hr{height:0;color:inherit;border-top-width:1px}`,i`abbr:where([title]){text-decoration:underline dotted}`,i`b,strong{font-weight:bolder}`,i`code,kbd,samp,pre{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:1em}`,i`small{font-size:80%}`,i`sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}`,i`sub{bottom:-0.25em}`,i`sup{top:-0.5em}`,i`button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}`,i`button,select{text-transform:none}`,i`button,[type='button'],[type='reset'],[type='submit']{-webkit-appearance:button;background-color:transparent;background-image:none;cursor:pointer}`,i`:-moz-focusring{outline:auto}`,i`:-moz-ui-invalid{box-shadow:none}`,i`progress{vertical-align:baseline}`,i`::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}`,i`[type='search']{-webkit-appearance:textfield;outline-offset:-2px}`,i`::-webkit-search-decoration{-webkit-appearance:none}`,i`::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}`,i`summary{display:list-item}`,i`blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}`,i`fieldset{margin:0;padding:0}`,i`legend{padding:0}`,i`ol,ul,menu{list-style:none;margin:0;padding:0}`,i`textarea{resize:vertical}`,i`::placeholder{opacity:1;color:#9ca3af}`,i`button,[role="button"]{cursor:pointer}`,i`:disabled{cursor:default;pointer-events:none;opacity:0.75}`,i`img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}`,i`img,video{max-width:100%;height:auto}`,i`[hidden]{display:none}`,i`dialog{padding:0}`,i`dialog::backdrop{background:rgba(0,0,0,0.5)}`])}function o(){return r([i`html{`,i`max-width: 70ch;`,i`padding: 2em 1em;`,i`margin: auto;`,i`line-height: 1.75;`,i`font-size: 1.25em;`,i`font-family: sans-serif;`,i`}`,i`h1,h2,h3,h4,h5,h6{`,i`margin: 1em 0 0.5em;`,i`}`,i`p,ul,ol{`,i`margin-bottom: 1em;`,i`color: #1d1d1d;`,i`}`])}const s={sm:640,md:768,lg:1024,xl:1280},c=Object.entries(s),l=.25,u=[...Array(15)].map((e,t)=>t+1),d=[16,20,24,28,32,36,40,48,56,64],f=[72,80,96,128,160,192,256,320,384,512],p=[...u,...d,...f,...Object.values(s)],m=Array.from({length:20},(e,t)=>(t+1)*5),h=[0,10,20,30,40,50,60,70,80,90,100],g=[25,50,75,100,150,200,300,500,700,1e3],_=[`hover`,`focus`,`disabled`],v={margin:`m`,padding:`p`},y={width:`w`,height:`h`},b={top:`top`,right:`right`,bottom:`bottom`,left:`left`},x={"min-width":`min-w`,"min-height":`min-h`,"max-width":`max-w`,"max-height":`max-h`},S={"font-mono":{"font-family":`monospace`},"font-sans":{"font-family":`sans-serif`},"font-serif":{"font-family":`serif`},"font-cursive":{"font-family":`cursive`},"text-xs":{"font-size":`.75rem`,"line-height":`calc(1 / 0.75)`},"text-sm":{"font-size":`.875rem`,"line-height":`calc(1.25 / 0.875)`},"text-base":{"font-size":`1rem`,"line-height":`calc(1.5 / 1)`},"text-lg":{"font-size":`1.125rem`,"line-height":`calc(1.75 / 1.125)`},"text-xl":{"font-size":`1.25rem`,"line-height":`calc(1.75 / 1.25)`},"text-2xl":{"font-size":`1.5rem`,"line-height":`calc(2 / 1.5)`},"text-3xl":{"font-size":`1.875rem`,"line-height":`calc(2.25 / 1.875)`},"text-4xl":{"font-size":`2.25rem`,"line-height":`calc(2.5 / 2.25)`},"text-5xl":{"font-size":`3rem`,"line-height":`1`},"text-6xl":{"font-size":`3.75rem`,"line-height":`1`},"text-7xl":{"font-size":`4.5rem`,"line-height":`1`},"font-thin":{"font-weight":100},"font-extralight":{"font-weight":200},"font-light":{"font-weight":300},"font-normal":{"font-weight":400},"font-medium":{"font-weight":500},"font-semibold":{"font-weight":600},"font-bold":{"font-weight":700},"font-extrabold":{"font-weight":800},"font-black":{"font-weight":900},italic:{"font-style":`italic`},"not-italic":{"font-style":`normal`},"w-max":{width:`max-content`},"w-min":{width:`min-content`},"w-fit":{width:`fit-content`},"h-max":{height:`max-content`},"h-min":{height:`min-content`},"h-fit":{height:`fit-content`},"size-auto":{width:`auto`,height:`auto`},"size-px":{width:`1px`,height:`1px`},"size-full":{width:`100%`,height:`100%`},"size-dvw":{width:`100dvw`,height:`100dvw`},"size-dvh":{width:`100dvh`,height:`100dvh`},"size-lvw":{width:`100lvw`,height:`100lvw`},"size-lvh":{width:`100lvh`,height:`100lvh`},"size-svw":{width:`100svw`,height:`100svw`},"size-svh":{width:`100svh`,height:`100svh`},"size-min":{width:`min-content`,height:`min-content`},"size-max":{width:`max-content`,height:`max-content`},"size-fit":{width:`fit-content`,height:`fit-content`},"tracking-tighter":{"letter-spacing":`-0.05em`},"tracking-tight":{"letter-spacing":`-0.025em`},"tracking-normal":{"letter-spacing":`0`},"tracking-wide":{"letter-spacing":`0.025em`},"tracking-wider":{"letter-spacing":`0.05em`},"tracking-widest":{"letter-spacing":`0.1em`},"leading-none":{"line-height":`1`},"leading-tight":{"line-height":`1.25`},"leading-snug":{"line-height":`1.375`},"leading-normal":{"line-height":`1.5`},"leading-relaxed":{"line-height":`1.625`},"leading-loose":{"line-height":`2`},"text-left":{"text-align":`left`},"text-right":{"text-align":`right`},"text-center":{"text-align":`center`},"text-justify":{"text-align":`justify`},underline:{"text-decoration":`underline`},"no-underline":{"text-decoration":`none`},"decoration-none":{"text-decoration":`none`},"line-through":{"text-decoration":`line-through`},uppercase:{"text-transform":`uppercase`},lowercase:{"text-transform":`lowercase`},capitalize:{"text-transform":`capitalize`},truncate:{"white-space":`nowrap`,overflow:`hidden`,"text-overflow":`ellipsis`},"text-elipsis":{"text-overflow":`ellipsis`},"text-clip":{"text-overflow":`clip`},"text-wrap":{"text-wrap":`wrap`},"text-nowrap":{"text-wrap":`nowrap`},"text-balance":{"text-wrap":`balance`},"text-pretty":{"text-wrap":`pretty`},"whitespace-normal":{"white-space":`normal`},"whitespace-nowrap":{"white-space":`nowrap`},"whitespace-pre":{"white-space":`pre`},"whitespace-pre-line":{"white-space":`pre-line`},"whitespace-pre-wrap":{"white-space":`pre-wrap`},"whitespace-break-spaces":{"white-space":`break-spaces`},relative:{position:`relative`},fixed:{position:`fixed`},absolute:{position:`absolute`},sticky:{position:`sticky`},"object-contain":{"object-fit":`contain`},"object-cover":{"object-fit":`cover`},"object-fill":{"object-fit":`fill`},"object-none":{"object-fit":`none`},block:{display:`block`},contents:{display:`contents`},hidden:{display:`none`},inline:{display:`inline`},"inline-block":{display:`inline-block`},visible:{visibility:`visible`},invisible:{visibility:`hidden`},collapse:{visibility:`collapse`},"list-none":{"list-style-type":`none`},"list-disc":{"list-style-type":`disc`},"list-decimal":{"list-style-type":`decimal`},flex:{display:`flex`},grid:{display:`grid`},"flex-1":{flex:`1 1 0%`},"flex-inline":{display:`inline-flex`},"flex-row":{"flex-direction":`row`},"flex-col":{"flex-direction":`column`},"flex-row-reverse":{"flex-direction":`row-reverse`},"flex-col-reverse":{"flex-direction":`column-reverse`},"flex-wrap":{"flex-wrap":`wrap`},"flex-wrap-reverse":{"flex-wrap":`wrap-reverse`},"flex-nowrap":{"flex-wrap":`nowrap`},"justify-start":{"justify-content":`flex-start`},"justify-end":{"justify-content":`flex-end`},"justify-center":{"justify-content":`center`},"justify-between":{"justify-content":`space-between`},"justify-around":{"justify-content":`space-around`},"justify-evenly":{"justify-content":`space-evenly`},"justify-stretch":{"justify-content":`stretch`},"items-start":{"align-items":`flex-start`},"items-end":{"align-items":`flex-end`},"items-center":{"align-items":`center`},"items-stretch":{"align-items":`stretch`},"flex-grow":{"flex-grow":1},"flex-shrink":{"flex-shrink":1},"align-baseline":{"vertical-align":`baseline`},"align-top":{"vertical-align":`top`},"align-middle":{"vertical-align":`middle`},"align-bottom":{"vertical-align":`bottom`},"align-text-top":{"vertical-align":`text-top`},"align-text-bottom":{"vertical-align":`text-bottom`},"overflow-auto":{overflow:`auto`},"overflow-x-auto":{"overflow-x":`auto`},"overflow-y-auto":{"overflow-y":`auto`},"overflow-hidden":{overflow:`hidden`},"overflow-x-hidden":{"overflow-x":`hidden`},"overflow-y-hidden":{"overflow-y":`hidden`},"overflow-visible":{overflow:`visible`},"overscroll-auto":{"overscroll-behavior":`auto`},"overscroll-contain":{"overscroll-behavior":`contain`},"overscroll-none":{"overscroll-behavior":`none`},"overscroll-x-auto":{"overscroll-behavior-x":`auto`},"overscroll-x-contain":{"overscroll-behavior-x":`contain`},"overscroll-x-none":{"overscroll-behavior-x":`none`},"overscroll-y-auto":{"overscroll-behavior-y":`auto`},"overscroll-y-contain":{"overscroll-behavior-y":`contain`},"overscroll-y-none":{"overscroll-behavior-y":`none`},"z-auto":{"z-index":`auto`},"cursor-pointer":{cursor:`pointer`},"cursor-wait":{cursor:`wait`},"cursor-not-allowed":{cursor:`not-allowed`},"select-none":{"user-select":`none`},"select-all":{"user-select":`all`},"pointer-events-auto":{"pointer-events":`auto`},"pointer-events-none":{"pointer-events":`none`},"box-border":{"box-sizing":`border-box`},"box-content":{"box-sizing":`content-box`},resize:{resize:`both`},"resize-x":{resize:`horizontal`},"resize-y":{resize:`vertical`},"resize-none":{resize:`none`},"appearance-none":{appearance:`none`,"-webkit-appearance":`none`,"-moz-appearance":`none`},border:{border:`1px solid`},"border-none":{border:`none`},"border-solid":{"border-style":`solid`},"border-dashed":{"border-style":`dashed`},"border-dotted":{"border-style":`dotted`},"border-collapse":{"border-collapse":`collapse`},"rounded-none":{"border-radius":`0`},rounded:{"border-radius":`.25rem`},"rounded-sm":{"border-radius":`.125rem`},"rounded-md":{"border-radius":`.375rem`},"rounded-lg":{"border-radius":`.5rem`},"rounded-xl":{"border-radius":`.75rem`},"rounded-full":{"border-radius":`9999px`},"shadow-2xs":{"box-shadow":`0 1px rgb(0 0 0 / 0.05)`},"shadow-xs":{"box-shadow":`0 1px 2px 0 rgb(0 0 0 / 0.05)`},shadow:{"box-shadow":`0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)`},"shadow-sm":{"box-shadow":`0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)`},"shadow-md":{"box-shadow":`0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)`},"shadow-lg":{"box-shadow":`0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)`},"shadow-xl":{"box-shadow":`0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)`},"shadow-2xl":{"box-shadow":`0 25px 50px -12px rgb(0 0 0 / 0.25)`},"shadow-inner":{"box-shadow":`inset 0 2px 4px 0 rgb(0 0 0 / 0.05)`},"shadow-none":{"box-shadow":`0 0 #0000`},ring:{"box-shadow":`var(--ring-inset, ) 0 0 0 3px rgb(59 130 246 / 0.5)`},"ring-0":{"box-shadow":`var(--ring-inset, ) 0 0 0 0px rgb(59 130 246 / 0.5)`},"ring-1":{"box-shadow":`var(--ring-inset, ) 0 0 0 1px rgb(59 130 246 / 0.5)`},"ring-2":{"box-shadow":`var(--ring-inset, ) 0 0 0 2px rgb(59 130 246 / 0.5)`},"ring-4":{"box-shadow":`var(--ring-inset, ) 0 0 0 4px rgb(59 130 246 / 0.5)`},"ring-8":{"box-shadow":`var(--ring-inset, ) 0 0 0 8px rgb(59 130 246 / 0.5)`},"ring-inset":{"--ring-inset":`inset`},outline:{"outline-style":`solid`},"outline-none":{outline:`2px solid transparent`,"outline-offset":`2px`},"outline-dashed":{"outline-style":`dashed`},"outline-dotted":{"outline-style":`dotted`},"outline-double":{"outline-style":`double`},"outline-0":{"outline-width":`0px`},"outline-1":{"outline-width":`1px`},"outline-2":{"outline-width":`2px`},"outline-4":{"outline-width":`4px`},"outline-8":{"outline-width":`8px`},"outline-offset-0":{"outline-offset":`0px`},"outline-offset-1":{"outline-offset":`1px`},"outline-offset-2":{"outline-offset":`2px`},"outline-offset-4":{"outline-offset":`4px`},"outline-offset-8":{"outline-offset":`8px`},"aspect-auto":{"aspect-ratio":`auto`},"aspect-square":{"aspect-ratio":`1 / 1`},"aspect-video":{"aspect-ratio":`16 / 9`},"backdrop-blur-none":{"backdrop-filter":`blur(0)`},"backdrop-blur-sm":{"backdrop-filter":`blur(4px)`},"backdrop-blur":{"backdrop-filter":`blur(8px)`},"backdrop-blur-md":{"backdrop-filter":`blur(12px)`},"backdrop-blur-lg":{"backdrop-filter":`blur(16px)`},"backdrop-blur-xl":{"backdrop-filter":`blur(24px)`},"backdrop-blur-2xl":{"backdrop-filter":`blur(40px)`},"backdrop-blur-3xl":{"backdrop-filter":`blur(64px)`},"transition-none":{transition:`none`},transition:{"transition-property":`all`,"transition-timing-function":`ease-in-out`,"transition-duration":`var(--transition-duration, 150ms)`},"animate-none":{animation:`none`},"animate-spin":{animation:`spin 1s linear infinite`},"animate-ping":{animation:`ping 1s cubic-bezier(0, 0, 0.2, 1) infinite`},"animate-pulse":{animation:`pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite`},"bg-auto":{"background-size":`auto`},"bg-cover":{"background-size":`cover`},"bg-contain":{"background-size":`contain`},"bg-no-repeat":{"background-repeat":`no-repeat`},"bg-fixed":{"background-attachment":`fixed`},"bg-local":{"background-attachment":`local`},"bg-scroll":{"background-attachment":`scroll`},"min-h-screen":{"min-height":`100vh`},"max-h-screen":{"max-height":`100vh`},"min-w-screen":{"min-width":`100vw`},"h-dvh":{height:`100dvh`},"h-svh":{height:`100svh`},"h-lvh":{height:`100lvh`},"w-dvw":{width:`100dvw`},"w-svw":{width:`100svw`},"w-lvw":{width:`100lvw`},"min-h-dvh":{"min-height":`100dvh`},"min-h-svh":{"min-height":`100svh`},"min-h-lvh":{"min-height":`100lvh`},"flex-none":{flex:`none`},"flex-auto":{flex:`1 1 auto`},"flex-initial":{flex:`0 1 auto`},grow:{"flex-grow":`1`},"grow-0":{"flex-grow":`0`},shrink:{"flex-shrink":`1`},"shrink-0":{"flex-shrink":`0`},"self-auto":{"align-self":`auto`},"self-start":{"align-self":`flex-start`},"self-end":{"align-self":`flex-end`},"self-center":{"align-self":`center`},"self-stretch":{"align-self":`stretch`},"self-baseline":{"align-self":`baseline`},"content-normal":{"align-content":`normal`},"content-start":{"align-content":`flex-start`},"content-end":{"align-content":`flex-end`},"content-center":{"align-content":`center`},"content-between":{"align-content":`space-between`},"content-around":{"align-content":`space-around`},"content-evenly":{"align-content":`space-evenly`},"content-stretch":{"align-content":`stretch`},"items-baseline":{"align-items":`baseline`},"inset-0":{inset:`0`},"inset-auto":{inset:`auto`},"inset-x-0":{left:`0`,right:`0`},"inset-y-0":{top:`0`,bottom:`0`},"inset-x-auto":{left:`auto`,right:`auto`},"inset-y-auto":{top:`auto`,bottom:`auto`},"sr-only":{position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,"white-space":`nowrap`,"border-width":`0`},"not-sr-only":{position:`static`,width:`auto`,height:`auto`,padding:`0`,margin:`0`,overflow:`visible`,clip:`auto`,"white-space":`normal`}},C=[`@keyframes spin {
1
+ import{n as e,t}from"./renderer-Cpl4GpyW.js";import{safeStyleEl as n}from"safevalues/dom";import{concatStyleSheets as r,safeStyleSheet as i}from"safevalues";function a(){return r([i`*,::before,::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}`,i`html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}`,i`body{margin:0;line-height:inherit}`,i`hr{height:0;color:inherit;border-top-width:1px}`,i`abbr:where([title]){text-decoration:underline dotted}`,i`b,strong{font-weight:bolder}`,i`code,kbd,samp,pre{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:1em}`,i`small{font-size:80%}`,i`sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}`,i`sub{bottom:-0.25em}`,i`sup{top:-0.5em}`,i`button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}`,i`button,select{text-transform:none}`,i`button,[type='button'],[type='reset'],[type='submit']{-webkit-appearance:button;background-color:transparent;background-image:none;cursor:pointer}`,i`:-moz-focusring{outline:auto}`,i`:-moz-ui-invalid{box-shadow:none}`,i`progress{vertical-align:baseline}`,i`::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}`,i`[type='search']{-webkit-appearance:textfield;outline-offset:-2px}`,i`::-webkit-search-decoration{-webkit-appearance:none}`,i`::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}`,i`summary{display:list-item}`,i`blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}`,i`fieldset{margin:0;padding:0}`,i`legend{padding:0}`,i`ol,ul,menu{list-style:none;margin:0;padding:0}`,i`textarea{resize:vertical}`,i`::placeholder{opacity:1;color:#9ca3af}`,i`button,[role="button"]{cursor:pointer}`,i`:disabled{cursor:default;pointer-events:none;opacity:0.75}`,i`img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}`,i`img,video{max-width:100%;height:auto}`,i`[hidden]{display:none}`,i`dialog{padding:0}`,i`dialog::backdrop{background:rgba(0,0,0,0.5)}`])}function o(){return r([i`html{`,i`max-width: 70ch;`,i`padding: 2em 1em;`,i`margin: auto;`,i`line-height: 1.75;`,i`font-size: 1.25em;`,i`font-family: sans-serif;`,i`}`,i`h1,h2,h3,h4,h5,h6{`,i`margin: 1em 0 0.5em;`,i`}`,i`p,ul,ol{`,i`margin-bottom: 1em;`,i`color: #1d1d1d;`,i`}`])}const s={sm:640,md:768,lg:1024,xl:1280},c=Object.entries(s),l=.25,u=[...Array(15)].map((e,t)=>t+1),d=[16,20,24,28,32,36,40,48,56,64],f=[72,80,96,128,160,192,256,320,384,512],p=[...u,...d,...f,...Object.values(s)],m=Array.from({length:20},(e,t)=>(t+1)*5),h=[0,10,20,30,40,50,60,70,80,90,100],g=[25,50,75,100,150,200,300,500,700,1e3],_=[`hover`,`focus`,`disabled`],v={margin:`m`,padding:`p`},y={width:`w`,height:`h`},b={top:`top`,right:`right`,bottom:`bottom`,left:`left`},x={"min-width":`min-w`,"min-height":`min-h`,"max-width":`max-w`,"max-height":`max-h`},S={"font-mono":{"font-family":`monospace`},"font-sans":{"font-family":`sans-serif`},"font-serif":{"font-family":`serif`},"font-cursive":{"font-family":`cursive`},"text-xs":{"font-size":`.75rem`,"line-height":`calc(1 / 0.75)`},"text-sm":{"font-size":`.875rem`,"line-height":`calc(1.25 / 0.875)`},"text-base":{"font-size":`1rem`,"line-height":`calc(1.5 / 1)`},"text-lg":{"font-size":`1.125rem`,"line-height":`calc(1.75 / 1.125)`},"text-xl":{"font-size":`1.25rem`,"line-height":`calc(1.75 / 1.25)`},"text-2xl":{"font-size":`1.5rem`,"line-height":`calc(2 / 1.5)`},"text-3xl":{"font-size":`1.875rem`,"line-height":`calc(2.25 / 1.875)`},"text-4xl":{"font-size":`2.25rem`,"line-height":`calc(2.5 / 2.25)`},"text-5xl":{"font-size":`3rem`,"line-height":`1`},"text-6xl":{"font-size":`3.75rem`,"line-height":`1`},"text-7xl":{"font-size":`4.5rem`,"line-height":`1`},"font-thin":{"font-weight":100},"font-extralight":{"font-weight":200},"font-light":{"font-weight":300},"font-normal":{"font-weight":400},"font-medium":{"font-weight":500},"font-semibold":{"font-weight":600},"font-bold":{"font-weight":700},"font-extrabold":{"font-weight":800},"font-black":{"font-weight":900},italic:{"font-style":`italic`},"not-italic":{"font-style":`normal`},"w-max":{width:`max-content`},"w-min":{width:`min-content`},"w-fit":{width:`fit-content`},"h-max":{height:`max-content`},"h-min":{height:`min-content`},"h-fit":{height:`fit-content`},"size-auto":{width:`auto`,height:`auto`},"size-px":{width:`1px`,height:`1px`},"size-full":{width:`100%`,height:`100%`},"size-dvw":{width:`100dvw`,height:`100dvw`},"size-dvh":{width:`100dvh`,height:`100dvh`},"size-lvw":{width:`100lvw`,height:`100lvw`},"size-lvh":{width:`100lvh`,height:`100lvh`},"size-svw":{width:`100svw`,height:`100svw`},"size-svh":{width:`100svh`,height:`100svh`},"size-min":{width:`min-content`,height:`min-content`},"size-max":{width:`max-content`,height:`max-content`},"size-fit":{width:`fit-content`,height:`fit-content`},"tracking-tighter":{"letter-spacing":`-0.05em`},"tracking-tight":{"letter-spacing":`-0.025em`},"tracking-normal":{"letter-spacing":`0`},"tracking-wide":{"letter-spacing":`0.025em`},"tracking-wider":{"letter-spacing":`0.05em`},"tracking-widest":{"letter-spacing":`0.1em`},"leading-none":{"line-height":`1`},"leading-tight":{"line-height":`1.25`},"leading-snug":{"line-height":`1.375`},"leading-normal":{"line-height":`1.5`},"leading-relaxed":{"line-height":`1.625`},"leading-loose":{"line-height":`2`},"text-left":{"text-align":`left`},"text-right":{"text-align":`right`},"text-center":{"text-align":`center`},"text-justify":{"text-align":`justify`},underline:{"text-decoration":`underline`},"no-underline":{"text-decoration":`none`},"decoration-none":{"text-decoration":`none`},"line-through":{"text-decoration":`line-through`},uppercase:{"text-transform":`uppercase`},lowercase:{"text-transform":`lowercase`},capitalize:{"text-transform":`capitalize`},truncate:{"white-space":`nowrap`,overflow:`hidden`,"text-overflow":`ellipsis`},"text-elipsis":{"text-overflow":`ellipsis`},"text-clip":{"text-overflow":`clip`},"text-wrap":{"text-wrap":`wrap`},"text-nowrap":{"text-wrap":`nowrap`},"text-balance":{"text-wrap":`balance`},"text-pretty":{"text-wrap":`pretty`},"whitespace-normal":{"white-space":`normal`},"whitespace-nowrap":{"white-space":`nowrap`},"whitespace-pre":{"white-space":`pre`},"whitespace-pre-line":{"white-space":`pre-line`},"whitespace-pre-wrap":{"white-space":`pre-wrap`},"whitespace-break-spaces":{"white-space":`break-spaces`},relative:{position:`relative`},fixed:{position:`fixed`},absolute:{position:`absolute`},sticky:{position:`sticky`},"object-contain":{"object-fit":`contain`},"object-cover":{"object-fit":`cover`},"object-fill":{"object-fit":`fill`},"object-none":{"object-fit":`none`},block:{display:`block`},contents:{display:`contents`},hidden:{display:`none`},inline:{display:`inline`},"inline-block":{display:`inline-block`},visible:{visibility:`visible`},invisible:{visibility:`hidden`},collapse:{visibility:`collapse`},"list-none":{"list-style-type":`none`},"list-disc":{"list-style-type":`disc`},"list-decimal":{"list-style-type":`decimal`},flex:{display:`flex`},grid:{display:`grid`},"flex-1":{flex:`1 1 0%`},"flex-inline":{display:`inline-flex`},"flex-row":{"flex-direction":`row`},"flex-col":{"flex-direction":`column`},"flex-row-reverse":{"flex-direction":`row-reverse`},"flex-col-reverse":{"flex-direction":`column-reverse`},"flex-wrap":{"flex-wrap":`wrap`},"flex-wrap-reverse":{"flex-wrap":`wrap-reverse`},"flex-nowrap":{"flex-wrap":`nowrap`},"justify-start":{"justify-content":`flex-start`},"justify-end":{"justify-content":`flex-end`},"justify-center":{"justify-content":`center`},"justify-between":{"justify-content":`space-between`},"justify-around":{"justify-content":`space-around`},"justify-evenly":{"justify-content":`space-evenly`},"justify-stretch":{"justify-content":`stretch`},"items-start":{"align-items":`flex-start`},"items-end":{"align-items":`flex-end`},"items-center":{"align-items":`center`},"items-stretch":{"align-items":`stretch`},"flex-grow":{"flex-grow":1},"flex-shrink":{"flex-shrink":1},"align-baseline":{"vertical-align":`baseline`},"align-top":{"vertical-align":`top`},"align-middle":{"vertical-align":`middle`},"align-bottom":{"vertical-align":`bottom`},"align-text-top":{"vertical-align":`text-top`},"align-text-bottom":{"vertical-align":`text-bottom`},"overflow-auto":{overflow:`auto`},"overflow-x-auto":{"overflow-x":`auto`},"overflow-y-auto":{"overflow-y":`auto`},"overflow-hidden":{overflow:`hidden`},"overflow-x-hidden":{"overflow-x":`hidden`},"overflow-y-hidden":{"overflow-y":`hidden`},"overflow-visible":{overflow:`visible`},"overscroll-auto":{"overscroll-behavior":`auto`},"overscroll-contain":{"overscroll-behavior":`contain`},"overscroll-none":{"overscroll-behavior":`none`},"overscroll-x-auto":{"overscroll-behavior-x":`auto`},"overscroll-x-contain":{"overscroll-behavior-x":`contain`},"overscroll-x-none":{"overscroll-behavior-x":`none`},"overscroll-y-auto":{"overscroll-behavior-y":`auto`},"overscroll-y-contain":{"overscroll-behavior-y":`contain`},"overscroll-y-none":{"overscroll-behavior-y":`none`},"z-auto":{"z-index":`auto`},"cursor-pointer":{cursor:`pointer`},"cursor-wait":{cursor:`wait`},"cursor-not-allowed":{cursor:`not-allowed`},"select-none":{"user-select":`none`},"select-all":{"user-select":`all`},"pointer-events-auto":{"pointer-events":`auto`},"pointer-events-none":{"pointer-events":`none`},"box-border":{"box-sizing":`border-box`},"box-content":{"box-sizing":`content-box`},resize:{resize:`both`},"resize-x":{resize:`horizontal`},"resize-y":{resize:`vertical`},"resize-none":{resize:`none`},"appearance-none":{appearance:`none`,"-webkit-appearance":`none`,"-moz-appearance":`none`},border:{border:`1px solid`},"border-none":{border:`none`},"border-solid":{"border-style":`solid`},"border-dashed":{"border-style":`dashed`},"border-dotted":{"border-style":`dotted`},"border-collapse":{"border-collapse":`collapse`},"rounded-none":{"border-radius":`0`},rounded:{"border-radius":`.25rem`},"rounded-sm":{"border-radius":`.125rem`},"rounded-md":{"border-radius":`.375rem`},"rounded-lg":{"border-radius":`.5rem`},"rounded-xl":{"border-radius":`.75rem`},"rounded-full":{"border-radius":`9999px`},"shadow-2xs":{"box-shadow":`0 1px rgb(0 0 0 / 0.05)`},"shadow-xs":{"box-shadow":`0 1px 2px 0 rgb(0 0 0 / 0.05)`},shadow:{"box-shadow":`0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)`},"shadow-sm":{"box-shadow":`0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)`},"shadow-md":{"box-shadow":`0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)`},"shadow-lg":{"box-shadow":`0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)`},"shadow-xl":{"box-shadow":`0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)`},"shadow-2xl":{"box-shadow":`0 25px 50px -12px rgb(0 0 0 / 0.25)`},"shadow-inner":{"box-shadow":`inset 0 2px 4px 0 rgb(0 0 0 / 0.05)`},"shadow-none":{"box-shadow":`0 0 #0000`},ring:{"box-shadow":`var(--ring-inset, ) 0 0 0 3px rgb(59 130 246 / 0.5)`},"ring-0":{"box-shadow":`var(--ring-inset, ) 0 0 0 0px rgb(59 130 246 / 0.5)`},"ring-1":{"box-shadow":`var(--ring-inset, ) 0 0 0 1px rgb(59 130 246 / 0.5)`},"ring-2":{"box-shadow":`var(--ring-inset, ) 0 0 0 2px rgb(59 130 246 / 0.5)`},"ring-4":{"box-shadow":`var(--ring-inset, ) 0 0 0 4px rgb(59 130 246 / 0.5)`},"ring-8":{"box-shadow":`var(--ring-inset, ) 0 0 0 8px rgb(59 130 246 / 0.5)`},"ring-inset":{"--ring-inset":`inset`},outline:{"outline-style":`solid`},"outline-none":{outline:`2px solid transparent`,"outline-offset":`2px`},"outline-dashed":{"outline-style":`dashed`},"outline-dotted":{"outline-style":`dotted`},"outline-double":{"outline-style":`double`},"outline-0":{"outline-width":`0px`},"outline-1":{"outline-width":`1px`},"outline-2":{"outline-width":`2px`},"outline-4":{"outline-width":`4px`},"outline-8":{"outline-width":`8px`},"outline-offset-0":{"outline-offset":`0px`},"outline-offset-1":{"outline-offset":`1px`},"outline-offset-2":{"outline-offset":`2px`},"outline-offset-4":{"outline-offset":`4px`},"outline-offset-8":{"outline-offset":`8px`},"aspect-auto":{"aspect-ratio":`auto`},"aspect-square":{"aspect-ratio":`1 / 1`},"aspect-video":{"aspect-ratio":`16 / 9`},"backdrop-blur-none":{"backdrop-filter":`blur(0)`},"backdrop-blur-sm":{"backdrop-filter":`blur(4px)`},"backdrop-blur":{"backdrop-filter":`blur(8px)`},"backdrop-blur-md":{"backdrop-filter":`blur(12px)`},"backdrop-blur-lg":{"backdrop-filter":`blur(16px)`},"backdrop-blur-xl":{"backdrop-filter":`blur(24px)`},"backdrop-blur-2xl":{"backdrop-filter":`blur(40px)`},"backdrop-blur-3xl":{"backdrop-filter":`blur(64px)`},"transition-none":{transition:`none`},transition:{"transition-property":`all`,"transition-timing-function":`ease-in-out`,"transition-duration":`var(--transition-duration, 150ms)`},"animate-none":{animation:`none`},"animate-spin":{animation:`spin 1s linear infinite`},"animate-ping":{animation:`ping 1s cubic-bezier(0, 0, 0.2, 1) infinite`},"animate-pulse":{animation:`pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite`},"bg-auto":{"background-size":`auto`},"bg-cover":{"background-size":`cover`},"bg-contain":{"background-size":`contain`},"bg-no-repeat":{"background-repeat":`no-repeat`},"bg-fixed":{"background-attachment":`fixed`},"bg-local":{"background-attachment":`local`},"bg-scroll":{"background-attachment":`scroll`},"min-h-screen":{"min-height":`100vh`},"max-h-screen":{"max-height":`100vh`},"min-w-screen":{"min-width":`100vw`},"h-dvh":{height:`100dvh`},"h-svh":{height:`100svh`},"h-lvh":{height:`100lvh`},"w-dvw":{width:`100dvw`},"w-svw":{width:`100svw`},"w-lvw":{width:`100lvw`},"min-h-dvh":{"min-height":`100dvh`},"min-h-svh":{"min-height":`100svh`},"min-h-lvh":{"min-height":`100lvh`},"flex-none":{flex:`none`},"flex-auto":{flex:`1 1 auto`},"flex-initial":{flex:`0 1 auto`},grow:{"flex-grow":`1`},"grow-0":{"flex-grow":`0`},shrink:{"flex-shrink":`1`},"shrink-0":{"flex-shrink":`0`},"self-auto":{"align-self":`auto`},"self-start":{"align-self":`flex-start`},"self-end":{"align-self":`flex-end`},"self-center":{"align-self":`center`},"self-stretch":{"align-self":`stretch`},"self-baseline":{"align-self":`baseline`},"content-normal":{"align-content":`normal`},"content-start":{"align-content":`flex-start`},"content-end":{"align-content":`flex-end`},"content-center":{"align-content":`center`},"content-between":{"align-content":`space-between`},"content-around":{"align-content":`space-around`},"content-evenly":{"align-content":`space-evenly`},"content-stretch":{"align-content":`stretch`},"items-baseline":{"align-items":`baseline`},"inset-0":{inset:`0`},"inset-auto":{inset:`auto`},"inset-x-0":{left:`0`,right:`0`},"inset-y-0":{top:`0`,bottom:`0`},"inset-x-auto":{left:`auto`,right:`auto`},"inset-y-auto":{top:`auto`,bottom:`auto`},"sr-only":{position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,"white-space":`nowrap`,"border-width":`0`},"not-sr-only":{position:`static`,width:`auto`,height:`auto`,padding:`0`,margin:`0`,overflow:`visible`,clip:`auto`,"white-space":`normal`}},C=[`@keyframes spin {
2
2
  from { transform: rotate(0deg) }
3
3
  to { transform: rotate(360deg) }
4
4
  }`,`@keyframes ping {
@@ -162,9 +162,29 @@ declare abstract class IRenderer<T extends StoreState = StoreState> extends Sign
162
162
  */
163
163
  private shouldLog;
164
164
  /**
165
- * Resets performance data. Called at the start of mount().
165
+ * Clears accumulated performance data. Called automatically at the start of `mount()`.
166
+ *
167
+ * Use this to reset performance tracking before measuring a specific user flow.
168
+ * After clearing, only effects and lifecycle events from subsequent operations
169
+ * will be included in the next `getPerformanceReport()` call.
170
+ *
171
+ * @example
172
+ * ```js
173
+ * // Setup phase
174
+ * $.debug('lifecycle');
175
+ * await $.mount(document.body);
176
+ *
177
+ * // Clear to start fresh measurement
178
+ * $.clearPerformanceReport();
179
+ *
180
+ * // Perform user flow to measure
181
+ * $.items = generateLargeList();
182
+ *
183
+ * // Get report for just this flow
184
+ * const report = $.getPerformanceReport();
185
+ * ```
166
186
  */
167
- private resetPerfData;
187
+ clearPerformanceReport(): void;
168
188
  /**
169
189
  * Generates a DOM path for an element (e.g., "html>body>div>ul>li:nth-child(2)").
170
190
  */
@@ -180,7 +200,7 @@ declare abstract class IRenderer<T extends StoreState = StoreState> extends Sign
180
200
  /**
181
201
  * Returns a structured performance report.
182
202
  */
183
- performanceReport(): PerformanceReport;
203
+ getPerformanceReport(): PerformanceReport;
184
204
  /**
185
205
  * Override effect() to add performance tracking.
186
206
  * Tracks effect execution time and logs slow effects (>16ms).
package/dist/mancha.js CHANGED
@@ -39,10 +39,10 @@ let Ce=new Set([`this`,`typeof`]),we=new Set([`in`]),Te=new Set([`+`,`-`,`!`,`ty
39
39
  * Portions Copyright (c) 2013, the Dart project authors.
40
40
  */
41
41
  let Ae=new Set([`==`,`!=`,`<=`,`>=`,`||`,`&&`,`??`,`?.`]),je=new Set([`===`,`!==`]),F=function(e){return e[e.STRING=1]=`STRING`,e[e.IDENTIFIER=2]=`IDENTIFIER`,e[e.DOT=3]=`DOT`,e[e.COMMA=4]=`COMMA`,e[e.COLON=5]=`COLON`,e[e.INTEGER=6]=`INTEGER`,e[e.DECIMAL=7]=`DECIMAL`,e[e.OPERATOR=8]=`OPERATOR`,e[e.GROUPER=9]=`GROUPER`,e[e.KEYWORD=10]=`KEYWORD`,e[e.ARROW=11]=`ARROW`,e[e.OPTIONAL_DOT=12]=`OPTIONAL_DOT`,e[e.SPREAD=13]=`SPREAD`,e}({}),I=(e,t,n=0)=>({kind:e,value:t,precedence:n}),Me=e=>e===9||e===10||e===13||e===32,Ne=e=>{if(e===95||e===36)return!0;let t=e&-33;return 65<=t&&t<=90},Pe=e=>Ne(e)||L(e),Fe=e=>Ce.has(e),Ie=e=>e===34||e===39,L=e=>48<=e&&e<=57,Le=e=>e===43||e===45||e===42||e===47||e===33||e===38||e===37||e===60||e===61||e===62||e===63||e===94||e===124,Re=e=>e===40||e===41||e===91||e===93||e===123||e===125,ze=e=>e.replace(/\\(.)/g,(e,t)=>{switch(t){case`n`:return`
42
- `;case`r`:return`\r`;case`t`:return` `;case`b`:return`\b`;case`f`:return`\f`;default:return t}});var Be=class{_input;_index=-1;_tokenStart=0;_next;constructor(e){this._input=e,this._advance()}nextToken(){for(;Me(this._next??-1);)this._advance(!0);if(Ie(this._next??-1))return this._tokenizeString();if(Ne(this._next??-1))return this._tokenizeIdentOrKeyword();if(L(this._next??-1))return this._tokenizeNumber();if(this._next===46)return this._tokenizeDot();if(this._next===44)return this._tokenizeComma();if(this._next===58)return this._tokenizeColon();if(Le(this._next??-1))return this._tokenizeOperator();if(Re(this._next??-1))return this._tokenizeGrouper();if(this._advance(),this._next!==void 0)throw Error(`Expected end of input, got ${this._next}`)}_advance(e){this._index++,this._index<this._input.length?(this._next=this._input.charCodeAt(this._index),e===!0&&(this._tokenStart=this._index)):this._next=void 0}_getValue(e=0){let t=this._input.substring(this._tokenStart,this._index+e);return e===0&&this._clearValue(),t}_clearValue(){this._tokenStart=this._index}_tokenizeString(){let e=this._next;for(this._advance(!0);this._next!==e;){if(this._next===void 0||this._next===92&&(this._advance(),this._next===void 0))throw Error(`unterminated string`);this._advance()}let t=I(F.STRING,ze(this._getValue()));return this._advance(),t}_tokenizeIdentOrKeyword(){do this._advance();while(Pe(this._next??-1));let e=this._getValue();return I(Fe(e)?F.KEYWORD:we.has(e)?F.OPERATOR:F.IDENTIFIER,e,P[e]??0)}_tokenizeNumber(){do this._advance();while(L(this._next??-1));return this._next===46?this._tokenizeDot():I(F.INTEGER,this._getValue())}_tokenizeDot(){if(this._advance(),L(this._next??-1))return this._tokenizeFraction();if(this._next===46){if(this._advance(),this._next===46)return this._advance(),this._clearValue(),I(F.SPREAD,`...`);throw Error(`Unexpected token ..`)}return this._clearValue(),I(F.DOT,`.`,13)}_tokenizeComma(){return this._advance(!0),I(F.COMMA,`,`)}_tokenizeColon(){return this._advance(!0),I(F.COLON,`:`)}_tokenizeFraction(){do this._advance();while(L(this._next??-1));return I(F.DECIMAL,this._getValue())}_tokenizeOperator(){this._advance();let e=this._getValue(2);if(je.has(e))this._advance(),this._advance();else{if(e=this._getValue(1),e===`=>`)return this._advance(),I(F.ARROW,e);Ae.has(e)&&this._advance()}return e=this._getValue(),e===`?.`?I(F.OPTIONAL_DOT,e,13):I(F.OPERATOR,e,P[e])}_tokenizeGrouper(){let e=String.fromCharCode(this._next??0),t=I(F.GROUPER,e,P[e]);return this._advance(!0),t}};let Ve=(e,t)=>new He(e,t).parse();var He=class{_kind;_tokenizer;_ast;_token;_value;constructor(e,t){this._tokenizer=new Be(e),this._ast=t}parse(){this._advance();let e=this._parseExpression();if(this._token)throw Error(`Unexpected token: ${this._token.value}`);return e}_advance(e,t){if(!this._matches(e,t))throw Error(`Expected kind ${e} (${t}), was ${this._token?.kind} (${this._token?.value})`);let n=this._tokenizer.nextToken();this._token=n,this._kind=n?.kind,this._value=n?.value}_matches(e,t){return!(e&&this._kind!==e||t&&this._value!==t)}_parseExpression(){if(!this._token)return this._ast.empty();let e=this._parseUnary();return e===void 0?void 0:this._parsePrecedence(e,0)}_parsePrecedence(e,t){if(e===void 0)throw Error(`Expected left to be defined.`);for(;this._token;)if(this._matches(F.GROUPER,`(`)){let t=this._parseArguments();e=this._ast.invoke(e,void 0,t)}else if(this._matches(F.GROUPER,`[`)){let t=this._parseIndex();e=this._ast.index(e,t)}else if(this._matches(F.DOT)||this._matches(F.OPTIONAL_DOT)){let t=this._kind===F.OPTIONAL_DOT;if(this._advance(),t&&this._matches(F.GROUPER,`[`)){let t=this._parseIndex();e=this._ast.index(e,t,!0)}else if(t&&this._matches(F.GROUPER,`(`)){let t=this._parseArguments();e=this._ast.invoke(e,void 0,t,!0)}else{let n=this._parseUnary();e=this._makeInvokeOrGetter(e,n,t)}}else if(this._matches(F.KEYWORD))break;else if(this._matches(F.OPERATOR)&&this._token.precedence>=t)e=this._value===`?`?this._parseTernary(e):this._parseBinary(e,this._token);else break;return e}_makeInvokeOrGetter(e,t,n){if(t===void 0)throw Error(`expected identifier`);if(t.type===`ID`)return this._ast.getter(e,t.value,n);if(t.type===`Invoke`&&t.receiver.type===`ID`){let r=t.receiver;return this._ast.invoke(e,r.value,t.arguments,n)}else throw Error(`expected identifier: ${t}`)}_parseBinary(e,t){if(!Ee.has(t.value))throw Error(`unknown operator: ${t.value}`);this._advance();let n=this._parseUnary();for(;(this._kind===F.OPERATOR||this._kind===F.DOT||this._kind===F.GROUPER)&&this._token&&(this._token.precedence??0)>t.precedence;)n=this._parsePrecedence(n,this._token?.precedence??0);if(n===void 0)throw Error(`Expected expression after ${t.value}`);return this._ast.binary(e,t.value,n)}_parseUnary(){if(this._matches(F.KEYWORD,`typeof`)){this._advance();let e=this._parsePrecedence(this._parsePrimary(),13);return this._ast.unary(`typeof`,e)}if(this._matches(F.OPERATOR)){let e=this._value;if(this._advance(),e===`+`||e===`-`){if(this._matches(F.INTEGER))return this._parseInteger(e);if(this._matches(F.DECIMAL))return this._parseDecimal(e)}if(!e||!Te.has(e))throw Error(`unexpected token: ${e}`);let t=this._parsePrecedence(this._parsePrimary(),13);return this._ast.unary(e,t)}return this._parsePrimary()}_parseTernary(e){this._advance(F.OPERATOR,`?`);let t=this._parseExpression();this._advance(F.COLON);let n=this._parseExpression();return this._ast.ternary(e,t,n)}_parsePrimary(){switch(this._kind){case F.KEYWORD:{let e=this._value??``;if(e===`this`)return this._advance(),this._ast.id(e);throw Ce.has(e)?Error(`unexpected keyword: ${e}`):Error(`unrecognized keyword: ${e}`)}case F.IDENTIFIER:return this._parseInvokeOrIdentifier();case F.STRING:return this._parseString();case F.INTEGER:return this._parseInteger();case F.DECIMAL:return this._parseDecimal();case F.GROUPER:return this._value===`(`?this._parseParenOrFunction():this._value===`{`?this._parseMap():this._value===`[`?this._parseList():void 0;case F.COLON:throw Error(`unexpected token ":"`);default:return}}_parseList(){let e=[];do{if(this._advance(),this._matches(F.GROUPER,`]`))break;if(this._matches(F.SPREAD)){this._advance();let t=this._parseExpression();t&&e.push(this._ast.spreadElement(t))}else e.push(this._parseExpression())}while(this._matches(F.COMMA));return this._advance(F.GROUPER,`]`),this._ast.list(e)}_parseMap(){let e=[];do{if(this._advance(),this._matches(F.GROUPER,`}`))break;if(this._matches(F.SPREAD)){this._advance();let t=this._parseExpression();t&&e.push(this._ast.spreadProperty(t))}else{let t=this._value??``;if((this._matches(F.STRING)||this._matches(F.IDENTIFIER))&&this._advance(),this._matches(F.COLON)){this._advance(F.COLON);let n=this._parseExpression();n&&e.push(this._ast.property(t,n))}else e.push(this._ast.property(t,this._ast.id(t)))}}while(this._matches(F.COMMA));return this._advance(F.GROUPER,`}`),this._ast.map(e)}_parseInvokeOrIdentifier(){let e=this._value;if(e===`true`)return this._advance(),this._ast.literal(!0);if(e===`false`)return this._advance(),this._ast.literal(!1);if(e===`null`)return this._advance(),this._ast.literal(null);if(e===`undefined`)return this._advance(),this._ast.literal(void 0);let t=this._parseIdentifier(),n=this._parseArguments();return n?this._ast.invoke(t,void 0,n):t}_parseIdentifier(){if(!this._matches(F.IDENTIFIER))throw Error(`expected identifier: ${this._value}`);let e=this._value;return this._advance(),this._ast.id(e??``)}_parseArguments(){if(!this._matches(F.GROUPER,`(`))return;let e=[];do{if(this._advance(),this._matches(F.GROUPER,`)`))break;if(this._matches(F.SPREAD)){this._advance();let t=this._parseExpression();t&&e.push(this._ast.spreadElement(t))}else{let t=this._parseExpression();e.push(t)}}while(this._matches(F.COMMA));return this._advance(F.GROUPER,`)`),e}_parseIndex(){this._advance();let e=this._parseExpression();return this._advance(F.GROUPER,`]`),e}_parseParenOrFunction(){let e=this._parseArguments();if(this._matches(F.ARROW)){this._advance();let t=this._parseExpression(),n=e?.map(e=>e.value)??[];return this._ast.arrowFunction(n,t)}else return this._ast.paren(e?.[0])}_parseString(){let e=this._ast.literal(this._value??``);return this._advance(),e}_parseInteger(e=``){let t=this._ast.literal(parseInt(`${e}${this._value}`,10));return this._advance(),t}_parseDecimal(e=``){let t=this._ast.literal(parseFloat(`${e}${this._value}`));return this._advance(),t}},Ue=class{timeouts=new Map;debounce(e,t){return new Promise((n,r)=>{let i=this.timeouts.get(t);i&&clearTimeout(i),this.timeouts.set(t,setTimeout(()=>{try{n(t()),this.timeouts.delete(t)}catch(e){r(e)}},e))})}};let We=new ke,R=`__is_proxy__`;function Ge(e){return e instanceof Je||e[R]===!0}function Ke(e,t){let n=e?._store;if(n?.has(t))return n.get(t);if(n?.has(`$parent`))return Ke(n.get(`$parent`),t)}function z(e,t){let n=e?._store;return n?.has(t)?e:n?.has(`$parent`)?z(n.get(`$parent`),t):null}function qe(e,t,n){let r=z(e,t);r?r._store.set(t,n):e._store.set(t,n)}var Je=class e extends Ue{evalkeys=[`$elem`,`$event`];expressionCache=new Map;observers=new Map;keyHandlers=new Map;_store=new Map;_lock=Promise.resolve();constructor(e){super();for(let[t,n]of Object.entries(e||{}))this.set(t,n)}wrapObject(e,t){return e==null||Ge(e)||e.constructor!==Object&&!Array.isArray(e)?e:new Proxy(e,{deleteProperty:(e,n)=>typeof n==`string`&&n in e?(delete e[n],t(),!0):!1,set:(e,n,r,i)=>{if(Reflect.get(e,n,i)===r)return!0;typeof r==`object`&&r&&(r=this.wrapObject(r,t));let a=Reflect.set(e,n,r,i);return t(),a},get:(e,t,n)=>t===R?!0:Reflect.get(e,t,n)})}watch(e,t){let n=z(this,e);if(!n)throw Error(`Cannot watch key "${e}" as it does not exist in the store.`);n.observers.has(e)||n.observers.set(e,new Set),Array.from(n.observers.get(e)||[]).some(e=>e.observer===t)||n.observers.get(e)?.add({observer:t,store:this})}addKeyHandler(e,t){this.keyHandlers.has(e)||this.keyHandlers.set(e,new Set),this.keyHandlers.get(e)?.add(t)}async notify(e,t=10){let n=z(this,e),r=Array.from(n?.observers.get(e)||[]);await this.debounce(t,()=>Promise.all(r.map(e=>e.observer.call(e.store.proxify(e.observer)))))}get(e,t){return t&&this.watch(e,t),Ke(this,e)}async set(e,t){if(this._store.has(e)&&t===this._store.get(e))return;let n=()=>this.notify(e);t&&typeof t==`object`&&(t=this.wrapObject(t,n)),qe(this,e,t);for(let[n,r]of this.keyHandlers.entries())if(n.test(e))for(let n of r)await Promise.resolve(n.call(this.$,e,t));await n()}async del(e){await this.set(e,null),this._store.delete(e),this.observers.delete(e)}keys(){return Array.from(this._store.keys())}has(e){return this._store.has(e)}getObserverStats(){let e={},t=0;for(let[n,r]of this.observers)e[n]=r.size,t+=r.size;return{totalKeys:this.observers.size,totalObservers:t,byKey:e}}effect(e,t){return e.call(this.proxify(e))}proxify(t){let n=Array.from(this._store.entries()).map(([e])=>e),r=Object.fromEntries(n.map(e=>[e,null])),i=(e,t,n)=>typeof e==`function`&&t!==`constructor`?(...t)=>e.call(n,...t):e;return new Proxy(r,{has:(e,t)=>typeof t==`string`&&(z(this,t)||Reflect.has(this,t))?!0:Reflect.has(r,t),get:(n,r,a)=>{if(typeof r==`string`){if(z(this,r)){let n=this.get(r,t);return t&&n instanceof e?n.proxify(t):i(n,r,a)}if(t&&r!==R&&!Reflect.has(this,r))return this.set(r,void 0),this.get(r,t)}return r===`$`?this.proxify(t):i(Reflect.get(this,r,a),r,a)},set:(e,t,n,r)=>(typeof t!=`string`||t in this?Reflect.set(this,t,n,r):this.set(t,n),!0)})}get $(){return this.proxify()}makeEvalFunction(e){return(t,n)=>{let r=Ve(e,We),i=new Proxy(n,{has(e,n){return n in e||n in t||n in globalThis},get(e,n){if(typeof n==`string`)return n in e?e[n]:n in t?t[n]:n in globalThis?globalThis[n]:t[n]},set(e,n,r){return typeof n==`string`?n in e?(e[n]=r,!0):(t[n]=r,!0):!1}});return r?.evaluate(i)}}cachedExpressionFunction(e){e=e.trim(),this.expressionCache.has(e)||this.expressionCache.set(e,this.makeEvalFunction(e));let t=this.expressionCache.get(e);if(!t)throw Error(`Failed to retrieve cached expression: ${e}`);return t}eval(e,t={}){let n=this.$;if(this._store.has(e))return n[e];{let r=this.cachedExpressionFunction(e);try{return r(n,t)}catch(t){return console.error(`Failed to evaluate expression: ${e}`),console.error(t),null}}}$resolve(e,t){let n={$pending:!0,$result:null,$error:null};return Promise.resolve().then(()=>e(t)).then(e=>{n.$result=e}).catch(e=>{n.$error=e instanceof Error?e:Error(String(e))}).finally(()=>{n.$pending=!1}),n}},Ye=class e extends Je{_debugLevel=`off`;dirpath=``;_perfData={lifecycle:{},effects:new Map};static DEBUG_LEVELS=[`off`,`lifecycle`,`effects`,`verbose`];_skipNodes=new Set;_customElements=new Map;_pendingValueRetries=[];debug(e){return typeof e==`boolean`?this._debugLevel=e?`lifecycle`:`off`:this._debugLevel=e,this}get debugging(){return this._debugLevel!==`off`}shouldLog(t){return e.DEBUG_LEVELS.indexOf(this._debugLevel)>=e.DEBUG_LEVELS.indexOf(t)}resetPerfData(){this._perfData={lifecycle:{},effects:new Map}}getNodePath(e){let t=[],n=e;for(;n?.tagName;){let e=n.tagName.toLowerCase(),r=n.parentElement;if(r){let i=Array.from(r.children).filter(t=>t.tagName.toLowerCase()===e);if(i.length>1){let r=i.indexOf(n)+1;t.unshift(`${e}:nth-child(${r})`)}else t.unshift(e)}else t.unshift(e);n=r}return t.join(`>`)}buildEffectId(e){let t=e?.directive??`unknown`,n=O(e?.expression??``,32),r=e?.element;return`${t}:${r?r.dataset?.perfid??r.id??r.dataset?.testid??this.getNodePath(r):`unknown`}:${n}`}recordEffectExecution(e,t){let n=this.buildEffectId(e),r=this._perfData.effects.get(n)??{count:0,totalTime:0};r.count++,r.totalTime+=t,this._perfData.effects.set(n,r)}performanceReport(){let e=Array.from(this._perfData.effects.entries()),t={};for(let[n,r]of e){let e=n.split(`:`)[0];t[e]||(t[e]={count:0,totalTime:0}),t[e].count+=r.count,t[e].totalTime+=r.totalTime}let n=e.map(([e,t])=>({id:e,executionCount:t.count,totalTime:t.totalTime,avgTime:t.count>0?t.totalTime/t.count:0})).sort((e,t)=>t.totalTime-e.totalTime).slice(0,10);return{lifecycle:this._perfData.lifecycle,effects:{total:e.length,byDirective:t,slowest:n},observers:this.getObserverStats()}}effect(e,t){if(!this.shouldLog(`lifecycle`))return super.effect(e,t);let n=performance.now(),r=super.effect(e,t),i=performance.now()-n;return t&&this.recordEffectExecution(t,i),i>16&&console.warn(`Slow effect (${i.toFixed(1)}ms):`,this.buildEffectId(t)),this.shouldLog(`effects`)&&console.debug(`Effect (${i.toFixed(2)}ms):`,this.buildEffectId(t)),r}async fetchRemote(e,t){return fetch(e,{cache:t?.cache??`default`}).then(e=>e.text())}async fetchLocal(e,t){return this.fetchRemote(e,t)}async preprocessString(e,t){this.log(`Preprocessing string content with params:
42
+ `;case`r`:return`\r`;case`t`:return` `;case`b`:return`\b`;case`f`:return`\f`;default:return t}});var Be=class{_input;_index=-1;_tokenStart=0;_next;constructor(e){this._input=e,this._advance()}nextToken(){for(;Me(this._next??-1);)this._advance(!0);if(Ie(this._next??-1))return this._tokenizeString();if(Ne(this._next??-1))return this._tokenizeIdentOrKeyword();if(L(this._next??-1))return this._tokenizeNumber();if(this._next===46)return this._tokenizeDot();if(this._next===44)return this._tokenizeComma();if(this._next===58)return this._tokenizeColon();if(Le(this._next??-1))return this._tokenizeOperator();if(Re(this._next??-1))return this._tokenizeGrouper();if(this._advance(),this._next!==void 0)throw Error(`Expected end of input, got ${this._next}`)}_advance(e){this._index++,this._index<this._input.length?(this._next=this._input.charCodeAt(this._index),e===!0&&(this._tokenStart=this._index)):this._next=void 0}_getValue(e=0){let t=this._input.substring(this._tokenStart,this._index+e);return e===0&&this._clearValue(),t}_clearValue(){this._tokenStart=this._index}_tokenizeString(){let e=this._next;for(this._advance(!0);this._next!==e;){if(this._next===void 0||this._next===92&&(this._advance(),this._next===void 0))throw Error(`unterminated string`);this._advance()}let t=I(F.STRING,ze(this._getValue()));return this._advance(),t}_tokenizeIdentOrKeyword(){do this._advance();while(Pe(this._next??-1));let e=this._getValue();return I(Fe(e)?F.KEYWORD:we.has(e)?F.OPERATOR:F.IDENTIFIER,e,P[e]??0)}_tokenizeNumber(){do this._advance();while(L(this._next??-1));return this._next===46?this._tokenizeDot():I(F.INTEGER,this._getValue())}_tokenizeDot(){if(this._advance(),L(this._next??-1))return this._tokenizeFraction();if(this._next===46){if(this._advance(),this._next===46)return this._advance(),this._clearValue(),I(F.SPREAD,`...`);throw Error(`Unexpected token ..`)}return this._clearValue(),I(F.DOT,`.`,13)}_tokenizeComma(){return this._advance(!0),I(F.COMMA,`,`)}_tokenizeColon(){return this._advance(!0),I(F.COLON,`:`)}_tokenizeFraction(){do this._advance();while(L(this._next??-1));return I(F.DECIMAL,this._getValue())}_tokenizeOperator(){this._advance();let e=this._getValue(2);if(je.has(e))this._advance(),this._advance();else{if(e=this._getValue(1),e===`=>`)return this._advance(),I(F.ARROW,e);Ae.has(e)&&this._advance()}return e=this._getValue(),e===`?.`?I(F.OPTIONAL_DOT,e,13):I(F.OPERATOR,e,P[e])}_tokenizeGrouper(){let e=String.fromCharCode(this._next??0),t=I(F.GROUPER,e,P[e]);return this._advance(!0),t}};let Ve=(e,t)=>new He(e,t).parse();var He=class{_kind;_tokenizer;_ast;_token;_value;constructor(e,t){this._tokenizer=new Be(e),this._ast=t}parse(){this._advance();let e=this._parseExpression();if(this._token)throw Error(`Unexpected token: ${this._token.value}`);return e}_advance(e,t){if(!this._matches(e,t))throw Error(`Expected kind ${e} (${t}), was ${this._token?.kind} (${this._token?.value})`);let n=this._tokenizer.nextToken();this._token=n,this._kind=n?.kind,this._value=n?.value}_matches(e,t){return!(e&&this._kind!==e||t&&this._value!==t)}_parseExpression(){if(!this._token)return this._ast.empty();let e=this._parseUnary();return e===void 0?void 0:this._parsePrecedence(e,0)}_parsePrecedence(e,t){if(e===void 0)throw Error(`Expected left to be defined.`);for(;this._token;)if(this._matches(F.GROUPER,`(`)){let t=this._parseArguments();e=this._ast.invoke(e,void 0,t)}else if(this._matches(F.GROUPER,`[`)){let t=this._parseIndex();e=this._ast.index(e,t)}else if(this._matches(F.DOT)||this._matches(F.OPTIONAL_DOT)){let t=this._kind===F.OPTIONAL_DOT;if(this._advance(),t&&this._matches(F.GROUPER,`[`)){let t=this._parseIndex();e=this._ast.index(e,t,!0)}else if(t&&this._matches(F.GROUPER,`(`)){let t=this._parseArguments();e=this._ast.invoke(e,void 0,t,!0)}else{let n=this._parseUnary();e=this._makeInvokeOrGetter(e,n,t)}}else if(this._matches(F.KEYWORD))break;else if(this._matches(F.OPERATOR)&&this._token.precedence>=t)e=this._value===`?`?this._parseTernary(e):this._parseBinary(e,this._token);else break;return e}_makeInvokeOrGetter(e,t,n){if(t===void 0)throw Error(`expected identifier`);if(t.type===`ID`)return this._ast.getter(e,t.value,n);if(t.type===`Invoke`&&t.receiver.type===`ID`){let r=t.receiver;return this._ast.invoke(e,r.value,t.arguments,n)}else throw Error(`expected identifier: ${t}`)}_parseBinary(e,t){if(!Ee.has(t.value))throw Error(`unknown operator: ${t.value}`);this._advance();let n=this._parseUnary();for(;(this._kind===F.OPERATOR||this._kind===F.DOT||this._kind===F.GROUPER)&&this._token&&(this._token.precedence??0)>t.precedence;)n=this._parsePrecedence(n,this._token?.precedence??0);if(n===void 0)throw Error(`Expected expression after ${t.value}`);return this._ast.binary(e,t.value,n)}_parseUnary(){if(this._matches(F.KEYWORD,`typeof`)){this._advance();let e=this._parsePrecedence(this._parsePrimary(),13);return this._ast.unary(`typeof`,e)}if(this._matches(F.OPERATOR)){let e=this._value;if(this._advance(),e===`+`||e===`-`){if(this._matches(F.INTEGER))return this._parseInteger(e);if(this._matches(F.DECIMAL))return this._parseDecimal(e)}if(!e||!Te.has(e))throw Error(`unexpected token: ${e}`);let t=this._parsePrecedence(this._parsePrimary(),13);return this._ast.unary(e,t)}return this._parsePrimary()}_parseTernary(e){this._advance(F.OPERATOR,`?`);let t=this._parseExpression();this._advance(F.COLON);let n=this._parseExpression();return this._ast.ternary(e,t,n)}_parsePrimary(){switch(this._kind){case F.KEYWORD:{let e=this._value??``;if(e===`this`)return this._advance(),this._ast.id(e);throw Ce.has(e)?Error(`unexpected keyword: ${e}`):Error(`unrecognized keyword: ${e}`)}case F.IDENTIFIER:return this._parseInvokeOrIdentifier();case F.STRING:return this._parseString();case F.INTEGER:return this._parseInteger();case F.DECIMAL:return this._parseDecimal();case F.GROUPER:return this._value===`(`?this._parseParenOrFunction():this._value===`{`?this._parseMap():this._value===`[`?this._parseList():void 0;case F.COLON:throw Error(`unexpected token ":"`);default:return}}_parseList(){let e=[];do{if(this._advance(),this._matches(F.GROUPER,`]`))break;if(this._matches(F.SPREAD)){this._advance();let t=this._parseExpression();t&&e.push(this._ast.spreadElement(t))}else e.push(this._parseExpression())}while(this._matches(F.COMMA));return this._advance(F.GROUPER,`]`),this._ast.list(e)}_parseMap(){let e=[];do{if(this._advance(),this._matches(F.GROUPER,`}`))break;if(this._matches(F.SPREAD)){this._advance();let t=this._parseExpression();t&&e.push(this._ast.spreadProperty(t))}else{let t=this._value??``;if((this._matches(F.STRING)||this._matches(F.IDENTIFIER))&&this._advance(),this._matches(F.COLON)){this._advance(F.COLON);let n=this._parseExpression();n&&e.push(this._ast.property(t,n))}else e.push(this._ast.property(t,this._ast.id(t)))}}while(this._matches(F.COMMA));return this._advance(F.GROUPER,`}`),this._ast.map(e)}_parseInvokeOrIdentifier(){let e=this._value;if(e===`true`)return this._advance(),this._ast.literal(!0);if(e===`false`)return this._advance(),this._ast.literal(!1);if(e===`null`)return this._advance(),this._ast.literal(null);if(e===`undefined`)return this._advance(),this._ast.literal(void 0);let t=this._parseIdentifier(),n=this._parseArguments();return n?this._ast.invoke(t,void 0,n):t}_parseIdentifier(){if(!this._matches(F.IDENTIFIER))throw Error(`expected identifier: ${this._value}`);let e=this._value;return this._advance(),this._ast.id(e??``)}_parseArguments(){if(!this._matches(F.GROUPER,`(`))return;let e=[];do{if(this._advance(),this._matches(F.GROUPER,`)`))break;if(this._matches(F.SPREAD)){this._advance();let t=this._parseExpression();t&&e.push(this._ast.spreadElement(t))}else{let t=this._parseExpression();e.push(t)}}while(this._matches(F.COMMA));return this._advance(F.GROUPER,`)`),e}_parseIndex(){this._advance();let e=this._parseExpression();return this._advance(F.GROUPER,`]`),e}_parseParenOrFunction(){let e=this._parseArguments();if(this._matches(F.ARROW)){this._advance();let t=this._parseExpression(),n=e?.map(e=>e.value)??[];return this._ast.arrowFunction(n,t)}else return this._ast.paren(e?.[0])}_parseString(){let e=this._ast.literal(this._value??``);return this._advance(),e}_parseInteger(e=``){let t=this._ast.literal(parseInt(`${e}${this._value}`,10));return this._advance(),t}_parseDecimal(e=``){let t=this._ast.literal(parseFloat(`${e}${this._value}`));return this._advance(),t}},Ue=class{timeouts=new Map;debounce(e,t){return new Promise((n,r)=>{let i=this.timeouts.get(t);i&&clearTimeout(i),this.timeouts.set(t,setTimeout(()=>{try{n(t()),this.timeouts.delete(t)}catch(e){r(e)}},e))})}};let We=new ke,R=`__is_proxy__`;function Ge(e){return e instanceof Je||e[R]===!0}function Ke(e,t){let n=e?._store;if(n?.has(t))return n.get(t);if(n?.has(`$parent`))return Ke(n.get(`$parent`),t)}function z(e,t){let n=e?._store;return n?.has(t)?e:n?.has(`$parent`)?z(n.get(`$parent`),t):null}function qe(e,t,n){let r=z(e,t);r?r._store.set(t,n):e._store.set(t,n)}var Je=class e extends Ue{evalkeys=[`$elem`,`$event`];expressionCache=new Map;observers=new Map;keyHandlers=new Map;_store=new Map;_lock=Promise.resolve();constructor(e){super();for(let[t,n]of Object.entries(e||{}))this.set(t,n)}wrapObject(e,t){return e==null||Ge(e)||e.constructor!==Object&&!Array.isArray(e)?e:new Proxy(e,{deleteProperty:(e,n)=>typeof n==`string`&&n in e?(delete e[n],t(),!0):!1,set:(e,n,r,i)=>{if(Reflect.get(e,n,i)===r)return!0;typeof r==`object`&&r&&(r=this.wrapObject(r,t));let a=Reflect.set(e,n,r,i);return t(),a},get:(e,t,n)=>t===R?!0:Reflect.get(e,t,n)})}watch(e,t){let n=z(this,e);if(!n)throw Error(`Cannot watch key "${e}" as it does not exist in the store.`);n.observers.has(e)||n.observers.set(e,new Set),Array.from(n.observers.get(e)||[]).some(e=>e.observer===t)||n.observers.get(e)?.add({observer:t,store:this})}addKeyHandler(e,t){this.keyHandlers.has(e)||this.keyHandlers.set(e,new Set),this.keyHandlers.get(e)?.add(t)}async notify(e,t=10){let n=z(this,e),r=Array.from(n?.observers.get(e)||[]);await this.debounce(t,()=>Promise.all(r.map(e=>e.observer.call(e.store.proxify(e.observer)))))}get(e,t){return t&&this.watch(e,t),Ke(this,e)}async set(e,t){if(this._store.has(e)&&t===this._store.get(e))return;let n=()=>this.notify(e);t&&typeof t==`object`&&(t=this.wrapObject(t,n)),qe(this,e,t);for(let[n,r]of this.keyHandlers.entries())if(n.test(e))for(let n of r)await Promise.resolve(n.call(this.$,e,t));await n()}async del(e){await this.set(e,null),this._store.delete(e),this.observers.delete(e)}keys(){return Array.from(this._store.keys())}has(e){return this._store.has(e)}getObserverStats(){let e={},t=0;for(let[n,r]of this.observers)e[n]=r.size,t+=r.size;return{totalKeys:this.observers.size,totalObservers:t,byKey:e}}effect(e,t){return e.call(this.proxify(e))}proxify(t){let n=Array.from(this._store.entries()).map(([e])=>e),r=Object.fromEntries(n.map(e=>[e,null])),i=(e,t,n)=>typeof e==`function`&&t!==`constructor`?(...t)=>e.call(n,...t):e;return new Proxy(r,{has:(e,t)=>typeof t==`string`&&(z(this,t)||Reflect.has(this,t))?!0:Reflect.has(r,t),get:(n,r,a)=>{if(typeof r==`string`){if(z(this,r)){let n=this.get(r,t);return t&&n instanceof e?n.proxify(t):i(n,r,a)}if(t&&r!==R&&!Reflect.has(this,r))return this.set(r,void 0),this.get(r,t)}return r===`$`?this.proxify(t):i(Reflect.get(this,r,a),r,a)},set:(e,t,n,r)=>(typeof t!=`string`||t in this?Reflect.set(this,t,n,r):this.set(t,n),!0)})}get $(){return this.proxify()}makeEvalFunction(e){return(t,n)=>{let r=Ve(e,We),i=new Proxy(n,{has(e,n){return n in e||n in t||n in globalThis},get(e,n){if(typeof n==`string`)return n in e?e[n]:n in t?t[n]:n in globalThis?globalThis[n]:t[n]},set(e,n,r){return typeof n==`string`?n in e?(e[n]=r,!0):(t[n]=r,!0):!1}});return r?.evaluate(i)}}cachedExpressionFunction(e){e=e.trim(),this.expressionCache.has(e)||this.expressionCache.set(e,this.makeEvalFunction(e));let t=this.expressionCache.get(e);if(!t)throw Error(`Failed to retrieve cached expression: ${e}`);return t}eval(e,t={}){let n=this.$;if(this._store.has(e))return n[e];{let r=this.cachedExpressionFunction(e);try{return r(n,t)}catch(t){return console.error(`Failed to evaluate expression: ${e}`),console.error(t),null}}}$resolve(e,t){let n={$pending:!0,$result:null,$error:null};return Promise.resolve().then(()=>e(t)).then(e=>{n.$result=e}).catch(e=>{n.$error=e instanceof Error?e:Error(String(e))}).finally(()=>{n.$pending=!1}),n}},Ye=class e extends Je{_debugLevel=`off`;dirpath=``;_perfData={lifecycle:{},effects:new Map};static DEBUG_LEVELS=[`off`,`lifecycle`,`effects`,`verbose`];_skipNodes=new Set;_customElements=new Map;_pendingValueRetries=[];debug(e){return typeof e==`boolean`?this._debugLevel=e?`lifecycle`:`off`:this._debugLevel=e,this}get debugging(){return this._debugLevel!==`off`}shouldLog(t){return e.DEBUG_LEVELS.indexOf(this._debugLevel)>=e.DEBUG_LEVELS.indexOf(t)}clearPerformanceReport(){this._perfData={lifecycle:{},effects:new Map}}getNodePath(e){let t=[],n=e;for(;n?.tagName;){let e=n.tagName.toLowerCase(),r=n.parentElement;if(r){let i=Array.from(r.children).filter(t=>t.tagName.toLowerCase()===e);if(i.length>1){let r=i.indexOf(n)+1;t.unshift(`${e}:nth-child(${r})`)}else t.unshift(e)}else t.unshift(e);n=r}return t.join(`>`)}buildEffectId(e){let t=e?.directive??`unknown`,n=O(e?.expression??``,32),r=e?.element;return`${t}:${r?r.dataset?.perfid??r.id??r.dataset?.testid??this.getNodePath(r):`unknown`}:${n}`}recordEffectExecution(e,t){let n=this.buildEffectId(e),r=this._perfData.effects.get(n)??{count:0,totalTime:0};r.count++,r.totalTime+=t,this._perfData.effects.set(n,r)}getPerformanceReport(){let e=Array.from(this._perfData.effects.entries()),t={};for(let[n,r]of e){let e=n.split(`:`)[0];t[e]||(t[e]={count:0,totalTime:0}),t[e].count+=r.count,t[e].totalTime+=r.totalTime}let n=e.map(([e,t])=>({id:e,executionCount:t.count,totalTime:t.totalTime,avgTime:t.count>0?t.totalTime/t.count:0})).sort((e,t)=>t.totalTime-e.totalTime).slice(0,10);return{lifecycle:this._perfData.lifecycle,effects:{total:e.length,byDirective:t,slowest:n},observers:this.getObserverStats()}}effect(e,t){if(!this.shouldLog(`lifecycle`))return super.effect(e,t);let n=performance.now(),r=super.effect(e,t),i=performance.now()-n;return t&&this.recordEffectExecution(t,i),i>16&&console.warn(`Slow effect (${i.toFixed(1)}ms):`,this.buildEffectId(t)),this.shouldLog(`effects`)&&console.debug(`Effect (${i.toFixed(2)}ms):`,this.buildEffectId(t)),r}async fetchRemote(e,t){return fetch(e,{cache:t?.cache??`default`}).then(e=>e.text())}async fetchLocal(e,t){return this.fetchRemote(e,t)}async preprocessString(e,t){this.log(`Preprocessing string content with params:
43
43
  `,t);let n=this.parseHTML(e,t);return await this.preprocessNode(n,t),n}async preprocessRemote(e,t){let n={};t?.cache&&(n.cache=t.cache);let r=await fetch(e,n).then(e=>e.text());return this.preprocessString(r,{...t,dirpath:A(e),rootDocument:t?.rootDocument??!e.endsWith(`.tpl.html`)})}async preprocessLocal(e,t){let n=await this.fetchLocal(e,t);return this.preprocessString(n,{...t,dirpath:A(e),rootDocument:t?.rootDocument??!e.endsWith(`.tpl.html`)})}subrenderer(){let e=new this.constructor().debug(this.debugging);return e._store.set(`$parent`,this),e._store.set(`$rootRenderer`,this.get(`$rootRenderer`)??this),e._customElements=this._customElements,e}log(...e){this.shouldLog(`verbose`)&&console.debug(...e)}async preprocessNode(e,t){let n=this.shouldLog(`lifecycle`)?performance.now():0;t={dirpath:this.dirpath,maxdepth:10,...t};let r=new j(m(e,this._skipNodes)).map(async e=>{this.log(`Preprocessing node:
44
44
  `,k(e,128)),await M.resolveIncludes.call(this,e,t),await M.rebaseRelativePaths.call(this,e,t),await M.registerCustomElements.call(this,e,t),await M.resolveCustomElements.call(this,e,t)});return await Promise.all(r.generator()),n&&(this._perfData.lifecycle.preprocessTime=(this._perfData.lifecycle.preprocessTime??0)+(performance.now()-n)),e}async renderNode(e,t){let n=this.shouldLog(`lifecycle`)?performance.now():0;for(let n of m(e,this._skipNodes))this.log(`Rendering node:
45
- `,k(n,128)),await M.resolveForAttribute.call(this,n,t),await M.resolveRenderAttribute.call(this,n,t),await M.resolveDataAttribute.call(this,n,t),await M.resolveTextAttributes.call(this,n,t),await M.resolveHtmlAttribute.call(this,n,t),await M.resolveIfAttribute.call(this,n,t),await M.resolveShowAttribute.call(this,n,t),await M.resolveClassAttribute.call(this,n,t),await M.resolveBindAttribute.call(this,n,t),await M.resolveEventAttributes.call(this,n,t),await M.resolveTextNodeExpressions.call(this,n,t),await M.resolveCustomAttribute.call(this,n,t),await M.resolveCustomProperty.call(this,n,t),await M.stripTypes.call(this,n,t);for(let e of this._pendingValueRetries.splice(0))e();return n&&(this._perfData.lifecycle.renderTime=(this._perfData.lifecycle.renderTime??0)+(performance.now()-n)),e}async mount(e,t){let n=this.shouldLog(`lifecycle`)?performance.now():0;n&&this.resetPerfData(),t={...t,rootNode:e},S(e,`renderer`,this),this._store.set(`$rootNode`,e),this.has(`$rootRenderer`)||this._store.set(`$rootRenderer`,this),this.get(`$rootRenderer`)===this&&await Se(this),await this.preprocessNode(e,t),await this.renderNode(e,t),n&&(this._perfData.lifecycle.mountTime=performance.now()-n)}};function Xe(){return oe([p`*,::before,::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}`,p`html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}`,p`body{margin:0;line-height:inherit}`,p`hr{height:0;color:inherit;border-top-width:1px}`,p`abbr:where([title]){text-decoration:underline dotted}`,p`b,strong{font-weight:bolder}`,p`code,kbd,samp,pre{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:1em}`,p`small{font-size:80%}`,p`sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}`,p`sub{bottom:-0.25em}`,p`sup{top:-0.5em}`,p`button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}`,p`button,select{text-transform:none}`,p`button,[type='button'],[type='reset'],[type='submit']{-webkit-appearance:button;background-color:transparent;background-image:none;cursor:pointer}`,p`:-moz-focusring{outline:auto}`,p`:-moz-ui-invalid{box-shadow:none}`,p`progress{vertical-align:baseline}`,p`::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}`,p`[type='search']{-webkit-appearance:textfield;outline-offset:-2px}`,p`::-webkit-search-decoration{-webkit-appearance:none}`,p`::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}`,p`summary{display:list-item}`,p`blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}`,p`fieldset{margin:0;padding:0}`,p`legend{padding:0}`,p`ol,ul,menu{list-style:none;margin:0;padding:0}`,p`textarea{resize:vertical}`,p`::placeholder{opacity:1;color:#9ca3af}`,p`button,[role="button"]{cursor:pointer}`,p`:disabled{cursor:default;pointer-events:none;opacity:0.75}`,p`img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}`,p`img,video{max-width:100%;height:auto}`,p`[hidden]{display:none}`,p`dialog{padding:0}`,p`dialog::backdrop{background:rgba(0,0,0,0.5)}`])}function Ze(){return oe([p`html{`,p`max-width: 70ch;`,p`padding: 2em 1em;`,p`margin: auto;`,p`line-height: 1.75;`,p`font-size: 1.25em;`,p`font-family: sans-serif;`,p`}`,p`h1,h2,h3,h4,h5,h6{`,p`margin: 1em 0 0.5em;`,p`}`,p`p,ul,ol{`,p`margin-bottom: 1em;`,p`color: #1d1d1d;`,p`}`])}let Qe={sm:640,md:768,lg:1024,xl:1280},$e=Object.entries(Qe),B=.25,V=[...Array(15)].map((e,t)=>t+1),et=[16,20,24,28,32,36,40,48,56,64],tt=[72,80,96,128,160,192,256,320,384,512],H=[...V,...et,...tt,...Object.values(Qe)],U=Array.from({length:20},(e,t)=>(t+1)*5),nt=[0,10,20,30,40,50,60,70,80,90,100],rt=[25,50,75,100,150,200,300,500,700,1e3],it=[`hover`,`focus`,`disabled`],W={margin:`m`,padding:`p`},at={width:`w`,height:`h`},ot={top:`top`,right:`right`,bottom:`bottom`,left:`left`},st={"min-width":`min-w`,"min-height":`min-h`,"max-width":`max-w`,"max-height":`max-h`},ct={"font-mono":{"font-family":`monospace`},"font-sans":{"font-family":`sans-serif`},"font-serif":{"font-family":`serif`},"font-cursive":{"font-family":`cursive`},"text-xs":{"font-size":`.75rem`,"line-height":`calc(1 / 0.75)`},"text-sm":{"font-size":`.875rem`,"line-height":`calc(1.25 / 0.875)`},"text-base":{"font-size":`1rem`,"line-height":`calc(1.5 / 1)`},"text-lg":{"font-size":`1.125rem`,"line-height":`calc(1.75 / 1.125)`},"text-xl":{"font-size":`1.25rem`,"line-height":`calc(1.75 / 1.25)`},"text-2xl":{"font-size":`1.5rem`,"line-height":`calc(2 / 1.5)`},"text-3xl":{"font-size":`1.875rem`,"line-height":`calc(2.25 / 1.875)`},"text-4xl":{"font-size":`2.25rem`,"line-height":`calc(2.5 / 2.25)`},"text-5xl":{"font-size":`3rem`,"line-height":`1`},"text-6xl":{"font-size":`3.75rem`,"line-height":`1`},"text-7xl":{"font-size":`4.5rem`,"line-height":`1`},"font-thin":{"font-weight":100},"font-extralight":{"font-weight":200},"font-light":{"font-weight":300},"font-normal":{"font-weight":400},"font-medium":{"font-weight":500},"font-semibold":{"font-weight":600},"font-bold":{"font-weight":700},"font-extrabold":{"font-weight":800},"font-black":{"font-weight":900},italic:{"font-style":`italic`},"not-italic":{"font-style":`normal`},"w-max":{width:`max-content`},"w-min":{width:`min-content`},"w-fit":{width:`fit-content`},"h-max":{height:`max-content`},"h-min":{height:`min-content`},"h-fit":{height:`fit-content`},"size-auto":{width:`auto`,height:`auto`},"size-px":{width:`1px`,height:`1px`},"size-full":{width:`100%`,height:`100%`},"size-dvw":{width:`100dvw`,height:`100dvw`},"size-dvh":{width:`100dvh`,height:`100dvh`},"size-lvw":{width:`100lvw`,height:`100lvw`},"size-lvh":{width:`100lvh`,height:`100lvh`},"size-svw":{width:`100svw`,height:`100svw`},"size-svh":{width:`100svh`,height:`100svh`},"size-min":{width:`min-content`,height:`min-content`},"size-max":{width:`max-content`,height:`max-content`},"size-fit":{width:`fit-content`,height:`fit-content`},"tracking-tighter":{"letter-spacing":`-0.05em`},"tracking-tight":{"letter-spacing":`-0.025em`},"tracking-normal":{"letter-spacing":`0`},"tracking-wide":{"letter-spacing":`0.025em`},"tracking-wider":{"letter-spacing":`0.05em`},"tracking-widest":{"letter-spacing":`0.1em`},"leading-none":{"line-height":`1`},"leading-tight":{"line-height":`1.25`},"leading-snug":{"line-height":`1.375`},"leading-normal":{"line-height":`1.5`},"leading-relaxed":{"line-height":`1.625`},"leading-loose":{"line-height":`2`},"text-left":{"text-align":`left`},"text-right":{"text-align":`right`},"text-center":{"text-align":`center`},"text-justify":{"text-align":`justify`},underline:{"text-decoration":`underline`},"no-underline":{"text-decoration":`none`},"decoration-none":{"text-decoration":`none`},"line-through":{"text-decoration":`line-through`},uppercase:{"text-transform":`uppercase`},lowercase:{"text-transform":`lowercase`},capitalize:{"text-transform":`capitalize`},truncate:{"white-space":`nowrap`,overflow:`hidden`,"text-overflow":`ellipsis`},"text-elipsis":{"text-overflow":`ellipsis`},"text-clip":{"text-overflow":`clip`},"text-wrap":{"text-wrap":`wrap`},"text-nowrap":{"text-wrap":`nowrap`},"text-balance":{"text-wrap":`balance`},"text-pretty":{"text-wrap":`pretty`},"whitespace-normal":{"white-space":`normal`},"whitespace-nowrap":{"white-space":`nowrap`},"whitespace-pre":{"white-space":`pre`},"whitespace-pre-line":{"white-space":`pre-line`},"whitespace-pre-wrap":{"white-space":`pre-wrap`},"whitespace-break-spaces":{"white-space":`break-spaces`},relative:{position:`relative`},fixed:{position:`fixed`},absolute:{position:`absolute`},sticky:{position:`sticky`},"object-contain":{"object-fit":`contain`},"object-cover":{"object-fit":`cover`},"object-fill":{"object-fit":`fill`},"object-none":{"object-fit":`none`},block:{display:`block`},contents:{display:`contents`},hidden:{display:`none`},inline:{display:`inline`},"inline-block":{display:`inline-block`},visible:{visibility:`visible`},invisible:{visibility:`hidden`},collapse:{visibility:`collapse`},"list-none":{"list-style-type":`none`},"list-disc":{"list-style-type":`disc`},"list-decimal":{"list-style-type":`decimal`},flex:{display:`flex`},grid:{display:`grid`},"flex-1":{flex:`1 1 0%`},"flex-inline":{display:`inline-flex`},"flex-row":{"flex-direction":`row`},"flex-col":{"flex-direction":`column`},"flex-row-reverse":{"flex-direction":`row-reverse`},"flex-col-reverse":{"flex-direction":`column-reverse`},"flex-wrap":{"flex-wrap":`wrap`},"flex-wrap-reverse":{"flex-wrap":`wrap-reverse`},"flex-nowrap":{"flex-wrap":`nowrap`},"justify-start":{"justify-content":`flex-start`},"justify-end":{"justify-content":`flex-end`},"justify-center":{"justify-content":`center`},"justify-between":{"justify-content":`space-between`},"justify-around":{"justify-content":`space-around`},"justify-evenly":{"justify-content":`space-evenly`},"justify-stretch":{"justify-content":`stretch`},"items-start":{"align-items":`flex-start`},"items-end":{"align-items":`flex-end`},"items-center":{"align-items":`center`},"items-stretch":{"align-items":`stretch`},"flex-grow":{"flex-grow":1},"flex-shrink":{"flex-shrink":1},"align-baseline":{"vertical-align":`baseline`},"align-top":{"vertical-align":`top`},"align-middle":{"vertical-align":`middle`},"align-bottom":{"vertical-align":`bottom`},"align-text-top":{"vertical-align":`text-top`},"align-text-bottom":{"vertical-align":`text-bottom`},"overflow-auto":{overflow:`auto`},"overflow-x-auto":{"overflow-x":`auto`},"overflow-y-auto":{"overflow-y":`auto`},"overflow-hidden":{overflow:`hidden`},"overflow-x-hidden":{"overflow-x":`hidden`},"overflow-y-hidden":{"overflow-y":`hidden`},"overflow-visible":{overflow:`visible`},"overscroll-auto":{"overscroll-behavior":`auto`},"overscroll-contain":{"overscroll-behavior":`contain`},"overscroll-none":{"overscroll-behavior":`none`},"overscroll-x-auto":{"overscroll-behavior-x":`auto`},"overscroll-x-contain":{"overscroll-behavior-x":`contain`},"overscroll-x-none":{"overscroll-behavior-x":`none`},"overscroll-y-auto":{"overscroll-behavior-y":`auto`},"overscroll-y-contain":{"overscroll-behavior-y":`contain`},"overscroll-y-none":{"overscroll-behavior-y":`none`},"z-auto":{"z-index":`auto`},"cursor-pointer":{cursor:`pointer`},"cursor-wait":{cursor:`wait`},"cursor-not-allowed":{cursor:`not-allowed`},"select-none":{"user-select":`none`},"select-all":{"user-select":`all`},"pointer-events-auto":{"pointer-events":`auto`},"pointer-events-none":{"pointer-events":`none`},"box-border":{"box-sizing":`border-box`},"box-content":{"box-sizing":`content-box`},resize:{resize:`both`},"resize-x":{resize:`horizontal`},"resize-y":{resize:`vertical`},"resize-none":{resize:`none`},"appearance-none":{appearance:`none`,"-webkit-appearance":`none`,"-moz-appearance":`none`},border:{border:`1px solid`},"border-none":{border:`none`},"border-solid":{"border-style":`solid`},"border-dashed":{"border-style":`dashed`},"border-dotted":{"border-style":`dotted`},"border-collapse":{"border-collapse":`collapse`},"rounded-none":{"border-radius":`0`},rounded:{"border-radius":`.25rem`},"rounded-sm":{"border-radius":`.125rem`},"rounded-md":{"border-radius":`.375rem`},"rounded-lg":{"border-radius":`.5rem`},"rounded-xl":{"border-radius":`.75rem`},"rounded-full":{"border-radius":`9999px`},"shadow-2xs":{"box-shadow":`0 1px rgb(0 0 0 / 0.05)`},"shadow-xs":{"box-shadow":`0 1px 2px 0 rgb(0 0 0 / 0.05)`},shadow:{"box-shadow":`0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)`},"shadow-sm":{"box-shadow":`0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)`},"shadow-md":{"box-shadow":`0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)`},"shadow-lg":{"box-shadow":`0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)`},"shadow-xl":{"box-shadow":`0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)`},"shadow-2xl":{"box-shadow":`0 25px 50px -12px rgb(0 0 0 / 0.25)`},"shadow-inner":{"box-shadow":`inset 0 2px 4px 0 rgb(0 0 0 / 0.05)`},"shadow-none":{"box-shadow":`0 0 #0000`},ring:{"box-shadow":`var(--ring-inset, ) 0 0 0 3px rgb(59 130 246 / 0.5)`},"ring-0":{"box-shadow":`var(--ring-inset, ) 0 0 0 0px rgb(59 130 246 / 0.5)`},"ring-1":{"box-shadow":`var(--ring-inset, ) 0 0 0 1px rgb(59 130 246 / 0.5)`},"ring-2":{"box-shadow":`var(--ring-inset, ) 0 0 0 2px rgb(59 130 246 / 0.5)`},"ring-4":{"box-shadow":`var(--ring-inset, ) 0 0 0 4px rgb(59 130 246 / 0.5)`},"ring-8":{"box-shadow":`var(--ring-inset, ) 0 0 0 8px rgb(59 130 246 / 0.5)`},"ring-inset":{"--ring-inset":`inset`},outline:{"outline-style":`solid`},"outline-none":{outline:`2px solid transparent`,"outline-offset":`2px`},"outline-dashed":{"outline-style":`dashed`},"outline-dotted":{"outline-style":`dotted`},"outline-double":{"outline-style":`double`},"outline-0":{"outline-width":`0px`},"outline-1":{"outline-width":`1px`},"outline-2":{"outline-width":`2px`},"outline-4":{"outline-width":`4px`},"outline-8":{"outline-width":`8px`},"outline-offset-0":{"outline-offset":`0px`},"outline-offset-1":{"outline-offset":`1px`},"outline-offset-2":{"outline-offset":`2px`},"outline-offset-4":{"outline-offset":`4px`},"outline-offset-8":{"outline-offset":`8px`},"aspect-auto":{"aspect-ratio":`auto`},"aspect-square":{"aspect-ratio":`1 / 1`},"aspect-video":{"aspect-ratio":`16 / 9`},"backdrop-blur-none":{"backdrop-filter":`blur(0)`},"backdrop-blur-sm":{"backdrop-filter":`blur(4px)`},"backdrop-blur":{"backdrop-filter":`blur(8px)`},"backdrop-blur-md":{"backdrop-filter":`blur(12px)`},"backdrop-blur-lg":{"backdrop-filter":`blur(16px)`},"backdrop-blur-xl":{"backdrop-filter":`blur(24px)`},"backdrop-blur-2xl":{"backdrop-filter":`blur(40px)`},"backdrop-blur-3xl":{"backdrop-filter":`blur(64px)`},"transition-none":{transition:`none`},transition:{"transition-property":`all`,"transition-timing-function":`ease-in-out`,"transition-duration":`var(--transition-duration, 150ms)`},"animate-none":{animation:`none`},"animate-spin":{animation:`spin 1s linear infinite`},"animate-ping":{animation:`ping 1s cubic-bezier(0, 0, 0.2, 1) infinite`},"animate-pulse":{animation:`pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite`},"bg-auto":{"background-size":`auto`},"bg-cover":{"background-size":`cover`},"bg-contain":{"background-size":`contain`},"bg-no-repeat":{"background-repeat":`no-repeat`},"bg-fixed":{"background-attachment":`fixed`},"bg-local":{"background-attachment":`local`},"bg-scroll":{"background-attachment":`scroll`},"min-h-screen":{"min-height":`100vh`},"max-h-screen":{"max-height":`100vh`},"min-w-screen":{"min-width":`100vw`},"h-dvh":{height:`100dvh`},"h-svh":{height:`100svh`},"h-lvh":{height:`100lvh`},"w-dvw":{width:`100dvw`},"w-svw":{width:`100svw`},"w-lvw":{width:`100lvw`},"min-h-dvh":{"min-height":`100dvh`},"min-h-svh":{"min-height":`100svh`},"min-h-lvh":{"min-height":`100lvh`},"flex-none":{flex:`none`},"flex-auto":{flex:`1 1 auto`},"flex-initial":{flex:`0 1 auto`},grow:{"flex-grow":`1`},"grow-0":{"flex-grow":`0`},shrink:{"flex-shrink":`1`},"shrink-0":{"flex-shrink":`0`},"self-auto":{"align-self":`auto`},"self-start":{"align-self":`flex-start`},"self-end":{"align-self":`flex-end`},"self-center":{"align-self":`center`},"self-stretch":{"align-self":`stretch`},"self-baseline":{"align-self":`baseline`},"content-normal":{"align-content":`normal`},"content-start":{"align-content":`flex-start`},"content-end":{"align-content":`flex-end`},"content-center":{"align-content":`center`},"content-between":{"align-content":`space-between`},"content-around":{"align-content":`space-around`},"content-evenly":{"align-content":`space-evenly`},"content-stretch":{"align-content":`stretch`},"items-baseline":{"align-items":`baseline`},"inset-0":{inset:`0`},"inset-auto":{inset:`auto`},"inset-x-0":{left:`0`,right:`0`},"inset-y-0":{top:`0`,bottom:`0`},"inset-x-auto":{left:`auto`,right:`auto`},"inset-y-auto":{top:`auto`,bottom:`auto`},"sr-only":{position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,"white-space":`nowrap`,"border-width":`0`},"not-sr-only":{position:`static`,width:`auto`,height:`auto`,padding:`0`,margin:`0`,overflow:`visible`,clip:`auto`,"white-space":`normal`}},lt=[`@keyframes spin {
45
+ `,k(n,128)),await M.resolveForAttribute.call(this,n,t),await M.resolveRenderAttribute.call(this,n,t),await M.resolveDataAttribute.call(this,n,t),await M.resolveTextAttributes.call(this,n,t),await M.resolveHtmlAttribute.call(this,n,t),await M.resolveIfAttribute.call(this,n,t),await M.resolveShowAttribute.call(this,n,t),await M.resolveClassAttribute.call(this,n,t),await M.resolveBindAttribute.call(this,n,t),await M.resolveEventAttributes.call(this,n,t),await M.resolveTextNodeExpressions.call(this,n,t),await M.resolveCustomAttribute.call(this,n,t),await M.resolveCustomProperty.call(this,n,t),await M.stripTypes.call(this,n,t);for(let e of this._pendingValueRetries.splice(0))e();return n&&(this._perfData.lifecycle.renderTime=(this._perfData.lifecycle.renderTime??0)+(performance.now()-n)),e}async mount(e,t){let n=this.shouldLog(`lifecycle`)?performance.now():0;n&&this.clearPerformanceReport(),t={...t,rootNode:e},S(e,`renderer`,this),this._store.set(`$rootNode`,e),this.has(`$rootRenderer`)||this._store.set(`$rootRenderer`,this),this.get(`$rootRenderer`)===this&&await Se(this),await this.preprocessNode(e,t),await this.renderNode(e,t),n&&(this._perfData.lifecycle.mountTime=performance.now()-n)}};function Xe(){return oe([p`*,::before,::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}`,p`html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}`,p`body{margin:0;line-height:inherit}`,p`hr{height:0;color:inherit;border-top-width:1px}`,p`abbr:where([title]){text-decoration:underline dotted}`,p`b,strong{font-weight:bolder}`,p`code,kbd,samp,pre{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:1em}`,p`small{font-size:80%}`,p`sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}`,p`sub{bottom:-0.25em}`,p`sup{top:-0.5em}`,p`button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}`,p`button,select{text-transform:none}`,p`button,[type='button'],[type='reset'],[type='submit']{-webkit-appearance:button;background-color:transparent;background-image:none;cursor:pointer}`,p`:-moz-focusring{outline:auto}`,p`:-moz-ui-invalid{box-shadow:none}`,p`progress{vertical-align:baseline}`,p`::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}`,p`[type='search']{-webkit-appearance:textfield;outline-offset:-2px}`,p`::-webkit-search-decoration{-webkit-appearance:none}`,p`::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}`,p`summary{display:list-item}`,p`blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}`,p`fieldset{margin:0;padding:0}`,p`legend{padding:0}`,p`ol,ul,menu{list-style:none;margin:0;padding:0}`,p`textarea{resize:vertical}`,p`::placeholder{opacity:1;color:#9ca3af}`,p`button,[role="button"]{cursor:pointer}`,p`:disabled{cursor:default;pointer-events:none;opacity:0.75}`,p`img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}`,p`img,video{max-width:100%;height:auto}`,p`[hidden]{display:none}`,p`dialog{padding:0}`,p`dialog::backdrop{background:rgba(0,0,0,0.5)}`])}function Ze(){return oe([p`html{`,p`max-width: 70ch;`,p`padding: 2em 1em;`,p`margin: auto;`,p`line-height: 1.75;`,p`font-size: 1.25em;`,p`font-family: sans-serif;`,p`}`,p`h1,h2,h3,h4,h5,h6{`,p`margin: 1em 0 0.5em;`,p`}`,p`p,ul,ol{`,p`margin-bottom: 1em;`,p`color: #1d1d1d;`,p`}`])}let Qe={sm:640,md:768,lg:1024,xl:1280},$e=Object.entries(Qe),B=.25,V=[...Array(15)].map((e,t)=>t+1),et=[16,20,24,28,32,36,40,48,56,64],tt=[72,80,96,128,160,192,256,320,384,512],H=[...V,...et,...tt,...Object.values(Qe)],U=Array.from({length:20},(e,t)=>(t+1)*5),nt=[0,10,20,30,40,50,60,70,80,90,100],rt=[25,50,75,100,150,200,300,500,700,1e3],it=[`hover`,`focus`,`disabled`],W={margin:`m`,padding:`p`},at={width:`w`,height:`h`},ot={top:`top`,right:`right`,bottom:`bottom`,left:`left`},st={"min-width":`min-w`,"min-height":`min-h`,"max-width":`max-w`,"max-height":`max-h`},ct={"font-mono":{"font-family":`monospace`},"font-sans":{"font-family":`sans-serif`},"font-serif":{"font-family":`serif`},"font-cursive":{"font-family":`cursive`},"text-xs":{"font-size":`.75rem`,"line-height":`calc(1 / 0.75)`},"text-sm":{"font-size":`.875rem`,"line-height":`calc(1.25 / 0.875)`},"text-base":{"font-size":`1rem`,"line-height":`calc(1.5 / 1)`},"text-lg":{"font-size":`1.125rem`,"line-height":`calc(1.75 / 1.125)`},"text-xl":{"font-size":`1.25rem`,"line-height":`calc(1.75 / 1.25)`},"text-2xl":{"font-size":`1.5rem`,"line-height":`calc(2 / 1.5)`},"text-3xl":{"font-size":`1.875rem`,"line-height":`calc(2.25 / 1.875)`},"text-4xl":{"font-size":`2.25rem`,"line-height":`calc(2.5 / 2.25)`},"text-5xl":{"font-size":`3rem`,"line-height":`1`},"text-6xl":{"font-size":`3.75rem`,"line-height":`1`},"text-7xl":{"font-size":`4.5rem`,"line-height":`1`},"font-thin":{"font-weight":100},"font-extralight":{"font-weight":200},"font-light":{"font-weight":300},"font-normal":{"font-weight":400},"font-medium":{"font-weight":500},"font-semibold":{"font-weight":600},"font-bold":{"font-weight":700},"font-extrabold":{"font-weight":800},"font-black":{"font-weight":900},italic:{"font-style":`italic`},"not-italic":{"font-style":`normal`},"w-max":{width:`max-content`},"w-min":{width:`min-content`},"w-fit":{width:`fit-content`},"h-max":{height:`max-content`},"h-min":{height:`min-content`},"h-fit":{height:`fit-content`},"size-auto":{width:`auto`,height:`auto`},"size-px":{width:`1px`,height:`1px`},"size-full":{width:`100%`,height:`100%`},"size-dvw":{width:`100dvw`,height:`100dvw`},"size-dvh":{width:`100dvh`,height:`100dvh`},"size-lvw":{width:`100lvw`,height:`100lvw`},"size-lvh":{width:`100lvh`,height:`100lvh`},"size-svw":{width:`100svw`,height:`100svw`},"size-svh":{width:`100svh`,height:`100svh`},"size-min":{width:`min-content`,height:`min-content`},"size-max":{width:`max-content`,height:`max-content`},"size-fit":{width:`fit-content`,height:`fit-content`},"tracking-tighter":{"letter-spacing":`-0.05em`},"tracking-tight":{"letter-spacing":`-0.025em`},"tracking-normal":{"letter-spacing":`0`},"tracking-wide":{"letter-spacing":`0.025em`},"tracking-wider":{"letter-spacing":`0.05em`},"tracking-widest":{"letter-spacing":`0.1em`},"leading-none":{"line-height":`1`},"leading-tight":{"line-height":`1.25`},"leading-snug":{"line-height":`1.375`},"leading-normal":{"line-height":`1.5`},"leading-relaxed":{"line-height":`1.625`},"leading-loose":{"line-height":`2`},"text-left":{"text-align":`left`},"text-right":{"text-align":`right`},"text-center":{"text-align":`center`},"text-justify":{"text-align":`justify`},underline:{"text-decoration":`underline`},"no-underline":{"text-decoration":`none`},"decoration-none":{"text-decoration":`none`},"line-through":{"text-decoration":`line-through`},uppercase:{"text-transform":`uppercase`},lowercase:{"text-transform":`lowercase`},capitalize:{"text-transform":`capitalize`},truncate:{"white-space":`nowrap`,overflow:`hidden`,"text-overflow":`ellipsis`},"text-elipsis":{"text-overflow":`ellipsis`},"text-clip":{"text-overflow":`clip`},"text-wrap":{"text-wrap":`wrap`},"text-nowrap":{"text-wrap":`nowrap`},"text-balance":{"text-wrap":`balance`},"text-pretty":{"text-wrap":`pretty`},"whitespace-normal":{"white-space":`normal`},"whitespace-nowrap":{"white-space":`nowrap`},"whitespace-pre":{"white-space":`pre`},"whitespace-pre-line":{"white-space":`pre-line`},"whitespace-pre-wrap":{"white-space":`pre-wrap`},"whitespace-break-spaces":{"white-space":`break-spaces`},relative:{position:`relative`},fixed:{position:`fixed`},absolute:{position:`absolute`},sticky:{position:`sticky`},"object-contain":{"object-fit":`contain`},"object-cover":{"object-fit":`cover`},"object-fill":{"object-fit":`fill`},"object-none":{"object-fit":`none`},block:{display:`block`},contents:{display:`contents`},hidden:{display:`none`},inline:{display:`inline`},"inline-block":{display:`inline-block`},visible:{visibility:`visible`},invisible:{visibility:`hidden`},collapse:{visibility:`collapse`},"list-none":{"list-style-type":`none`},"list-disc":{"list-style-type":`disc`},"list-decimal":{"list-style-type":`decimal`},flex:{display:`flex`},grid:{display:`grid`},"flex-1":{flex:`1 1 0%`},"flex-inline":{display:`inline-flex`},"flex-row":{"flex-direction":`row`},"flex-col":{"flex-direction":`column`},"flex-row-reverse":{"flex-direction":`row-reverse`},"flex-col-reverse":{"flex-direction":`column-reverse`},"flex-wrap":{"flex-wrap":`wrap`},"flex-wrap-reverse":{"flex-wrap":`wrap-reverse`},"flex-nowrap":{"flex-wrap":`nowrap`},"justify-start":{"justify-content":`flex-start`},"justify-end":{"justify-content":`flex-end`},"justify-center":{"justify-content":`center`},"justify-between":{"justify-content":`space-between`},"justify-around":{"justify-content":`space-around`},"justify-evenly":{"justify-content":`space-evenly`},"justify-stretch":{"justify-content":`stretch`},"items-start":{"align-items":`flex-start`},"items-end":{"align-items":`flex-end`},"items-center":{"align-items":`center`},"items-stretch":{"align-items":`stretch`},"flex-grow":{"flex-grow":1},"flex-shrink":{"flex-shrink":1},"align-baseline":{"vertical-align":`baseline`},"align-top":{"vertical-align":`top`},"align-middle":{"vertical-align":`middle`},"align-bottom":{"vertical-align":`bottom`},"align-text-top":{"vertical-align":`text-top`},"align-text-bottom":{"vertical-align":`text-bottom`},"overflow-auto":{overflow:`auto`},"overflow-x-auto":{"overflow-x":`auto`},"overflow-y-auto":{"overflow-y":`auto`},"overflow-hidden":{overflow:`hidden`},"overflow-x-hidden":{"overflow-x":`hidden`},"overflow-y-hidden":{"overflow-y":`hidden`},"overflow-visible":{overflow:`visible`},"overscroll-auto":{"overscroll-behavior":`auto`},"overscroll-contain":{"overscroll-behavior":`contain`},"overscroll-none":{"overscroll-behavior":`none`},"overscroll-x-auto":{"overscroll-behavior-x":`auto`},"overscroll-x-contain":{"overscroll-behavior-x":`contain`},"overscroll-x-none":{"overscroll-behavior-x":`none`},"overscroll-y-auto":{"overscroll-behavior-y":`auto`},"overscroll-y-contain":{"overscroll-behavior-y":`contain`},"overscroll-y-none":{"overscroll-behavior-y":`none`},"z-auto":{"z-index":`auto`},"cursor-pointer":{cursor:`pointer`},"cursor-wait":{cursor:`wait`},"cursor-not-allowed":{cursor:`not-allowed`},"select-none":{"user-select":`none`},"select-all":{"user-select":`all`},"pointer-events-auto":{"pointer-events":`auto`},"pointer-events-none":{"pointer-events":`none`},"box-border":{"box-sizing":`border-box`},"box-content":{"box-sizing":`content-box`},resize:{resize:`both`},"resize-x":{resize:`horizontal`},"resize-y":{resize:`vertical`},"resize-none":{resize:`none`},"appearance-none":{appearance:`none`,"-webkit-appearance":`none`,"-moz-appearance":`none`},border:{border:`1px solid`},"border-none":{border:`none`},"border-solid":{"border-style":`solid`},"border-dashed":{"border-style":`dashed`},"border-dotted":{"border-style":`dotted`},"border-collapse":{"border-collapse":`collapse`},"rounded-none":{"border-radius":`0`},rounded:{"border-radius":`.25rem`},"rounded-sm":{"border-radius":`.125rem`},"rounded-md":{"border-radius":`.375rem`},"rounded-lg":{"border-radius":`.5rem`},"rounded-xl":{"border-radius":`.75rem`},"rounded-full":{"border-radius":`9999px`},"shadow-2xs":{"box-shadow":`0 1px rgb(0 0 0 / 0.05)`},"shadow-xs":{"box-shadow":`0 1px 2px 0 rgb(0 0 0 / 0.05)`},shadow:{"box-shadow":`0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)`},"shadow-sm":{"box-shadow":`0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)`},"shadow-md":{"box-shadow":`0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)`},"shadow-lg":{"box-shadow":`0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)`},"shadow-xl":{"box-shadow":`0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)`},"shadow-2xl":{"box-shadow":`0 25px 50px -12px rgb(0 0 0 / 0.25)`},"shadow-inner":{"box-shadow":`inset 0 2px 4px 0 rgb(0 0 0 / 0.05)`},"shadow-none":{"box-shadow":`0 0 #0000`},ring:{"box-shadow":`var(--ring-inset, ) 0 0 0 3px rgb(59 130 246 / 0.5)`},"ring-0":{"box-shadow":`var(--ring-inset, ) 0 0 0 0px rgb(59 130 246 / 0.5)`},"ring-1":{"box-shadow":`var(--ring-inset, ) 0 0 0 1px rgb(59 130 246 / 0.5)`},"ring-2":{"box-shadow":`var(--ring-inset, ) 0 0 0 2px rgb(59 130 246 / 0.5)`},"ring-4":{"box-shadow":`var(--ring-inset, ) 0 0 0 4px rgb(59 130 246 / 0.5)`},"ring-8":{"box-shadow":`var(--ring-inset, ) 0 0 0 8px rgb(59 130 246 / 0.5)`},"ring-inset":{"--ring-inset":`inset`},outline:{"outline-style":`solid`},"outline-none":{outline:`2px solid transparent`,"outline-offset":`2px`},"outline-dashed":{"outline-style":`dashed`},"outline-dotted":{"outline-style":`dotted`},"outline-double":{"outline-style":`double`},"outline-0":{"outline-width":`0px`},"outline-1":{"outline-width":`1px`},"outline-2":{"outline-width":`2px`},"outline-4":{"outline-width":`4px`},"outline-8":{"outline-width":`8px`},"outline-offset-0":{"outline-offset":`0px`},"outline-offset-1":{"outline-offset":`1px`},"outline-offset-2":{"outline-offset":`2px`},"outline-offset-4":{"outline-offset":`4px`},"outline-offset-8":{"outline-offset":`8px`},"aspect-auto":{"aspect-ratio":`auto`},"aspect-square":{"aspect-ratio":`1 / 1`},"aspect-video":{"aspect-ratio":`16 / 9`},"backdrop-blur-none":{"backdrop-filter":`blur(0)`},"backdrop-blur-sm":{"backdrop-filter":`blur(4px)`},"backdrop-blur":{"backdrop-filter":`blur(8px)`},"backdrop-blur-md":{"backdrop-filter":`blur(12px)`},"backdrop-blur-lg":{"backdrop-filter":`blur(16px)`},"backdrop-blur-xl":{"backdrop-filter":`blur(24px)`},"backdrop-blur-2xl":{"backdrop-filter":`blur(40px)`},"backdrop-blur-3xl":{"backdrop-filter":`blur(64px)`},"transition-none":{transition:`none`},transition:{"transition-property":`all`,"transition-timing-function":`ease-in-out`,"transition-duration":`var(--transition-duration, 150ms)`},"animate-none":{animation:`none`},"animate-spin":{animation:`spin 1s linear infinite`},"animate-ping":{animation:`ping 1s cubic-bezier(0, 0, 0.2, 1) infinite`},"animate-pulse":{animation:`pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite`},"bg-auto":{"background-size":`auto`},"bg-cover":{"background-size":`cover`},"bg-contain":{"background-size":`contain`},"bg-no-repeat":{"background-repeat":`no-repeat`},"bg-fixed":{"background-attachment":`fixed`},"bg-local":{"background-attachment":`local`},"bg-scroll":{"background-attachment":`scroll`},"min-h-screen":{"min-height":`100vh`},"max-h-screen":{"max-height":`100vh`},"min-w-screen":{"min-width":`100vw`},"h-dvh":{height:`100dvh`},"h-svh":{height:`100svh`},"h-lvh":{height:`100lvh`},"w-dvw":{width:`100dvw`},"w-svw":{width:`100svw`},"w-lvw":{width:`100lvw`},"min-h-dvh":{"min-height":`100dvh`},"min-h-svh":{"min-height":`100svh`},"min-h-lvh":{"min-height":`100lvh`},"flex-none":{flex:`none`},"flex-auto":{flex:`1 1 auto`},"flex-initial":{flex:`0 1 auto`},grow:{"flex-grow":`1`},"grow-0":{"flex-grow":`0`},shrink:{"flex-shrink":`1`},"shrink-0":{"flex-shrink":`0`},"self-auto":{"align-self":`auto`},"self-start":{"align-self":`flex-start`},"self-end":{"align-self":`flex-end`},"self-center":{"align-self":`center`},"self-stretch":{"align-self":`stretch`},"self-baseline":{"align-self":`baseline`},"content-normal":{"align-content":`normal`},"content-start":{"align-content":`flex-start`},"content-end":{"align-content":`flex-end`},"content-center":{"align-content":`center`},"content-between":{"align-content":`space-between`},"content-around":{"align-content":`space-around`},"content-evenly":{"align-content":`space-evenly`},"content-stretch":{"align-content":`stretch`},"items-baseline":{"align-items":`baseline`},"inset-0":{inset:`0`},"inset-auto":{inset:`auto`},"inset-x-0":{left:`0`,right:`0`},"inset-y-0":{top:`0`,bottom:`0`},"inset-x-auto":{left:`auto`,right:`auto`},"inset-y-auto":{top:`auto`,bottom:`auto`},"sr-only":{position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,"white-space":`nowrap`,"border-width":`0`},"not-sr-only":{position:`static`,width:`auto`,height:`auto`,padding:`0`,margin:`0`,overflow:`visible`,clip:`auto`,"white-space":`normal`}},lt=[`@keyframes spin {
46
46
  from { transform: rotate(0deg) }
47
47
  to { transform: rotate(360deg) }
48
48
  }`,`@keyframes ping {
@@ -24,7 +24,7 @@ const R=new Set([`this`,`typeof`]),ne=new Set([`in`]),re=new Set([`+`,`-`,`!`,`t
24
24
  * Portions Copyright (c) 2013, the Dart project authors.
25
25
  */
26
26
  const U=new Set([`==`,`!=`,`<=`,`>=`,`||`,`&&`,`??`,`?.`]),W=new Set([`===`,`!==`]);let G=function(e){return e[e.STRING=1]=`STRING`,e[e.IDENTIFIER=2]=`IDENTIFIER`,e[e.DOT=3]=`DOT`,e[e.COMMA=4]=`COMMA`,e[e.COLON=5]=`COLON`,e[e.INTEGER=6]=`INTEGER`,e[e.DECIMAL=7]=`DECIMAL`,e[e.OPERATOR=8]=`OPERATOR`,e[e.GROUPER=9]=`GROUPER`,e[e.KEYWORD=10]=`KEYWORD`,e[e.ARROW=11]=`ARROW`,e[e.OPTIONAL_DOT=12]=`OPTIONAL_DOT`,e[e.SPREAD=13]=`SPREAD`,e}({});const K=(e,t,n=0)=>({kind:e,value:t,precedence:n}),q=e=>e===9||e===10||e===13||e===32,J=e=>{if(e===95||e===36)return!0;let t=e&-33;return 65<=t&&t<=90},ae=e=>J(e)||Y(e),oe=e=>R.has(e),se=e=>e===34||e===39,Y=e=>48<=e&&e<=57,ce=e=>e===43||e===45||e===42||e===47||e===33||e===38||e===37||e===60||e===61||e===62||e===63||e===94||e===124,le=e=>e===40||e===41||e===91||e===93||e===123||e===125,ue=e=>e.replace(/\\(.)/g,(e,t)=>{switch(t){case`n`:return`
27
- `;case`r`:return`\r`;case`t`:return` `;case`b`:return`\b`;case`f`:return`\f`;default:return t}});var de=class{_input;_index=-1;_tokenStart=0;_next;constructor(e){this._input=e,this._advance()}nextToken(){for(;q(this._next??-1);)this._advance(!0);if(se(this._next??-1))return this._tokenizeString();if(J(this._next??-1))return this._tokenizeIdentOrKeyword();if(Y(this._next??-1))return this._tokenizeNumber();if(this._next===46)return this._tokenizeDot();if(this._next===44)return this._tokenizeComma();if(this._next===58)return this._tokenizeColon();if(ce(this._next??-1))return this._tokenizeOperator();if(le(this._next??-1))return this._tokenizeGrouper();if(this._advance(),this._next!==void 0)throw Error(`Expected end of input, got ${this._next}`)}_advance(e){this._index++,this._index<this._input.length?(this._next=this._input.charCodeAt(this._index),e===!0&&(this._tokenStart=this._index)):this._next=void 0}_getValue(e=0){let t=this._input.substring(this._tokenStart,this._index+e);return e===0&&this._clearValue(),t}_clearValue(){this._tokenStart=this._index}_tokenizeString(){let e=this._next;for(this._advance(!0);this._next!==e;){if(this._next===void 0||this._next===92&&(this._advance(),this._next===void 0))throw Error(`unterminated string`);this._advance()}let t=K(G.STRING,ue(this._getValue()));return this._advance(),t}_tokenizeIdentOrKeyword(){do this._advance();while(ae(this._next??-1));let e=this._getValue();return K(oe(e)?G.KEYWORD:ne.has(e)?G.OPERATOR:G.IDENTIFIER,e,z[e]??0)}_tokenizeNumber(){do this._advance();while(Y(this._next??-1));return this._next===46?this._tokenizeDot():K(G.INTEGER,this._getValue())}_tokenizeDot(){if(this._advance(),Y(this._next??-1))return this._tokenizeFraction();if(this._next===46){if(this._advance(),this._next===46)return this._advance(),this._clearValue(),K(G.SPREAD,`...`);throw Error(`Unexpected token ..`)}return this._clearValue(),K(G.DOT,`.`,13)}_tokenizeComma(){return this._advance(!0),K(G.COMMA,`,`)}_tokenizeColon(){return this._advance(!0),K(G.COLON,`:`)}_tokenizeFraction(){do this._advance();while(Y(this._next??-1));return K(G.DECIMAL,this._getValue())}_tokenizeOperator(){this._advance();let e=this._getValue(2);if(W.has(e))this._advance(),this._advance();else{if(e=this._getValue(1),e===`=>`)return this._advance(),K(G.ARROW,e);U.has(e)&&this._advance()}return e=this._getValue(),e===`?.`?K(G.OPTIONAL_DOT,e,13):K(G.OPERATOR,e,z[e])}_tokenizeGrouper(){let e=String.fromCharCode(this._next??0),t=K(G.GROUPER,e,z[e]);return this._advance(!0),t}};const fe=(e,t)=>new pe(e,t).parse();var pe=class{_kind;_tokenizer;_ast;_token;_value;constructor(e,t){this._tokenizer=new de(e),this._ast=t}parse(){this._advance();let e=this._parseExpression();if(this._token)throw Error(`Unexpected token: ${this._token.value}`);return e}_advance(e,t){if(!this._matches(e,t))throw Error(`Expected kind ${e} (${t}), was ${this._token?.kind} (${this._token?.value})`);let n=this._tokenizer.nextToken();this._token=n,this._kind=n?.kind,this._value=n?.value}_matches(e,t){return!(e&&this._kind!==e||t&&this._value!==t)}_parseExpression(){if(!this._token)return this._ast.empty();let e=this._parseUnary();return e===void 0?void 0:this._parsePrecedence(e,0)}_parsePrecedence(e,t){if(e===void 0)throw Error(`Expected left to be defined.`);for(;this._token;)if(this._matches(G.GROUPER,`(`)){let t=this._parseArguments();e=this._ast.invoke(e,void 0,t)}else if(this._matches(G.GROUPER,`[`)){let t=this._parseIndex();e=this._ast.index(e,t)}else if(this._matches(G.DOT)||this._matches(G.OPTIONAL_DOT)){let t=this._kind===G.OPTIONAL_DOT;if(this._advance(),t&&this._matches(G.GROUPER,`[`)){let t=this._parseIndex();e=this._ast.index(e,t,!0)}else if(t&&this._matches(G.GROUPER,`(`)){let t=this._parseArguments();e=this._ast.invoke(e,void 0,t,!0)}else{let n=this._parseUnary();e=this._makeInvokeOrGetter(e,n,t)}}else if(this._matches(G.KEYWORD))break;else if(this._matches(G.OPERATOR)&&this._token.precedence>=t)e=this._value===`?`?this._parseTernary(e):this._parseBinary(e,this._token);else break;return e}_makeInvokeOrGetter(e,t,n){if(t===void 0)throw Error(`expected identifier`);if(t.type===`ID`)return this._ast.getter(e,t.value,n);if(t.type===`Invoke`&&t.receiver.type===`ID`){let r=t.receiver;return this._ast.invoke(e,r.value,t.arguments,n)}else throw Error(`expected identifier: ${t}`)}_parseBinary(e,t){if(!ie.has(t.value))throw Error(`unknown operator: ${t.value}`);this._advance();let n=this._parseUnary();for(;(this._kind===G.OPERATOR||this._kind===G.DOT||this._kind===G.GROUPER)&&this._token&&(this._token.precedence??0)>t.precedence;)n=this._parsePrecedence(n,this._token?.precedence??0);if(n===void 0)throw Error(`Expected expression after ${t.value}`);return this._ast.binary(e,t.value,n)}_parseUnary(){if(this._matches(G.KEYWORD,`typeof`)){this._advance();let e=this._parsePrecedence(this._parsePrimary(),13);return this._ast.unary(`typeof`,e)}if(this._matches(G.OPERATOR)){let e=this._value;if(this._advance(),e===`+`||e===`-`){if(this._matches(G.INTEGER))return this._parseInteger(e);if(this._matches(G.DECIMAL))return this._parseDecimal(e)}if(!e||!re.has(e))throw Error(`unexpected token: ${e}`);let t=this._parsePrecedence(this._parsePrimary(),13);return this._ast.unary(e,t)}return this._parsePrimary()}_parseTernary(e){this._advance(G.OPERATOR,`?`);let t=this._parseExpression();this._advance(G.COLON);let n=this._parseExpression();return this._ast.ternary(e,t,n)}_parsePrimary(){switch(this._kind){case G.KEYWORD:{let e=this._value??``;if(e===`this`)return this._advance(),this._ast.id(e);throw R.has(e)?Error(`unexpected keyword: ${e}`):Error(`unrecognized keyword: ${e}`)}case G.IDENTIFIER:return this._parseInvokeOrIdentifier();case G.STRING:return this._parseString();case G.INTEGER:return this._parseInteger();case G.DECIMAL:return this._parseDecimal();case G.GROUPER:return this._value===`(`?this._parseParenOrFunction():this._value===`{`?this._parseMap():this._value===`[`?this._parseList():void 0;case G.COLON:throw Error(`unexpected token ":"`);default:return}}_parseList(){let e=[];do{if(this._advance(),this._matches(G.GROUPER,`]`))break;if(this._matches(G.SPREAD)){this._advance();let t=this._parseExpression();t&&e.push(this._ast.spreadElement(t))}else e.push(this._parseExpression())}while(this._matches(G.COMMA));return this._advance(G.GROUPER,`]`),this._ast.list(e)}_parseMap(){let e=[];do{if(this._advance(),this._matches(G.GROUPER,`}`))break;if(this._matches(G.SPREAD)){this._advance();let t=this._parseExpression();t&&e.push(this._ast.spreadProperty(t))}else{let t=this._value??``;if((this._matches(G.STRING)||this._matches(G.IDENTIFIER))&&this._advance(),this._matches(G.COLON)){this._advance(G.COLON);let n=this._parseExpression();n&&e.push(this._ast.property(t,n))}else e.push(this._ast.property(t,this._ast.id(t)))}}while(this._matches(G.COMMA));return this._advance(G.GROUPER,`}`),this._ast.map(e)}_parseInvokeOrIdentifier(){let e=this._value;if(e===`true`)return this._advance(),this._ast.literal(!0);if(e===`false`)return this._advance(),this._ast.literal(!1);if(e===`null`)return this._advance(),this._ast.literal(null);if(e===`undefined`)return this._advance(),this._ast.literal(void 0);let t=this._parseIdentifier(),n=this._parseArguments();return n?this._ast.invoke(t,void 0,n):t}_parseIdentifier(){if(!this._matches(G.IDENTIFIER))throw Error(`expected identifier: ${this._value}`);let e=this._value;return this._advance(),this._ast.id(e??``)}_parseArguments(){if(!this._matches(G.GROUPER,`(`))return;let e=[];do{if(this._advance(),this._matches(G.GROUPER,`)`))break;if(this._matches(G.SPREAD)){this._advance();let t=this._parseExpression();t&&e.push(this._ast.spreadElement(t))}else{let t=this._parseExpression();e.push(t)}}while(this._matches(G.COMMA));return this._advance(G.GROUPER,`)`),e}_parseIndex(){this._advance();let e=this._parseExpression();return this._advance(G.GROUPER,`]`),e}_parseParenOrFunction(){let e=this._parseArguments();if(this._matches(G.ARROW)){this._advance();let t=this._parseExpression(),n=e?.map(e=>e.value)??[];return this._ast.arrowFunction(n,t)}else return this._ast.paren(e?.[0])}_parseString(){let e=this._ast.literal(this._value??``);return this._advance(),e}_parseInteger(e=``){let t=this._ast.literal(parseInt(`${e}${this._value}`,10));return this._advance(),t}_parseDecimal(e=``){let t=this._ast.literal(parseFloat(`${e}${this._value}`));return this._advance(),t}},me=class{timeouts=new Map;debounce(e,t){return new Promise((n,r)=>{let i=this.timeouts.get(t);i&&clearTimeout(i),this.timeouts.set(t,setTimeout(()=>{try{n(t()),this.timeouts.delete(t)}catch(e){r(e)}},e))})}};const he=new H,X=`__is_proxy__`;function ge(e){return e instanceof $||e[X]===!0}function Z(e,t){let n=e?._store;if(n?.has(t))return n.get(t);if(n?.has(`$parent`))return Z(n.get(`$parent`),t)}function Q(e,t){let n=e?._store;return n?.has(t)?e:n?.has(`$parent`)?Q(n.get(`$parent`),t):null}function _e(e,t,n){let r=Q(e,t);r?r._store.set(t,n):e._store.set(t,n)}var $=class e extends me{evalkeys=[`$elem`,`$event`];expressionCache=new Map;observers=new Map;keyHandlers=new Map;_store=new Map;_lock=Promise.resolve();constructor(e){super();for(let[t,n]of Object.entries(e||{}))this.set(t,n)}wrapObject(e,t){return e==null||ge(e)||e.constructor!==Object&&!Array.isArray(e)?e:new Proxy(e,{deleteProperty:(e,n)=>typeof n==`string`&&n in e?(delete e[n],t(),!0):!1,set:(e,n,r,i)=>{if(Reflect.get(e,n,i)===r)return!0;typeof r==`object`&&r&&(r=this.wrapObject(r,t));let a=Reflect.set(e,n,r,i);return t(),a},get:(e,t,n)=>t===X?!0:Reflect.get(e,t,n)})}watch(e,t){let n=Q(this,e);if(!n)throw Error(`Cannot watch key "${e}" as it does not exist in the store.`);n.observers.has(e)||n.observers.set(e,new Set),Array.from(n.observers.get(e)||[]).some(e=>e.observer===t)||n.observers.get(e)?.add({observer:t,store:this})}addKeyHandler(e,t){this.keyHandlers.has(e)||this.keyHandlers.set(e,new Set),this.keyHandlers.get(e)?.add(t)}async notify(e,t=10){let n=Q(this,e),r=Array.from(n?.observers.get(e)||[]);await this.debounce(t,()=>Promise.all(r.map(e=>e.observer.call(e.store.proxify(e.observer)))))}get(e,t){return t&&this.watch(e,t),Z(this,e)}async set(e,t){if(this._store.has(e)&&t===this._store.get(e))return;let n=()=>this.notify(e);t&&typeof t==`object`&&(t=this.wrapObject(t,n)),_e(this,e,t);for(let[n,r]of this.keyHandlers.entries())if(n.test(e))for(let n of r)await Promise.resolve(n.call(this.$,e,t));await n()}async del(e){await this.set(e,null),this._store.delete(e),this.observers.delete(e)}keys(){return Array.from(this._store.keys())}has(e){return this._store.has(e)}getObserverStats(){let e={},t=0;for(let[n,r]of this.observers)e[n]=r.size,t+=r.size;return{totalKeys:this.observers.size,totalObservers:t,byKey:e}}effect(e,t){return e.call(this.proxify(e))}proxify(t){let n=Array.from(this._store.entries()).map(([e])=>e),r=Object.fromEntries(n.map(e=>[e,null])),i=(e,t,n)=>typeof e==`function`&&t!==`constructor`?(...t)=>e.call(n,...t):e;return new Proxy(r,{has:(e,t)=>typeof t==`string`&&(Q(this,t)||Reflect.has(this,t))?!0:Reflect.has(r,t),get:(n,r,a)=>{if(typeof r==`string`){if(Q(this,r)){let n=this.get(r,t);return t&&n instanceof e?n.proxify(t):i(n,r,a)}if(t&&r!==X&&!Reflect.has(this,r))return this.set(r,void 0),this.get(r,t)}return r===`$`?this.proxify(t):i(Reflect.get(this,r,a),r,a)},set:(e,t,n,r)=>(typeof t!=`string`||t in this?Reflect.set(this,t,n,r):this.set(t,n),!0)})}get $(){return this.proxify()}makeEvalFunction(e){return(t,n)=>{let r=fe(e,he),i=new Proxy(n,{has(e,n){return n in e||n in t||n in globalThis},get(e,n){if(typeof n==`string`)return n in e?e[n]:n in t?t[n]:n in globalThis?globalThis[n]:t[n]},set(e,n,r){return typeof n==`string`?n in e?(e[n]=r,!0):(t[n]=r,!0):!1}});return r?.evaluate(i)}}cachedExpressionFunction(e){e=e.trim(),this.expressionCache.has(e)||this.expressionCache.set(e,this.makeEvalFunction(e));let t=this.expressionCache.get(e);if(!t)throw Error(`Failed to retrieve cached expression: ${e}`);return t}eval(e,t={}){let n=this.$;if(this._store.has(e))return n[e];{let r=this.cachedExpressionFunction(e);try{return r(n,t)}catch(t){return console.error(`Failed to evaluate expression: ${e}`),console.error(t),null}}}$resolve(e,t){let n={$pending:!0,$result:null,$error:null};return Promise.resolve().then(()=>e(t)).then(e=>{n.$result=e}).catch(e=>{n.$error=e instanceof Error?e:Error(String(e))}).finally(()=>{n.$pending=!1}),n}},ve=class e extends ${_debugLevel=`off`;dirpath=``;_perfData={lifecycle:{},effects:new Map};static DEBUG_LEVELS=[`off`,`lifecycle`,`effects`,`verbose`];_skipNodes=new Set;_customElements=new Map;_pendingValueRetries=[];debug(e){return typeof e==`boolean`?this._debugLevel=e?`lifecycle`:`off`:this._debugLevel=e,this}get debugging(){return this._debugLevel!==`off`}shouldLog(t){return e.DEBUG_LEVELS.indexOf(this._debugLevel)>=e.DEBUG_LEVELS.indexOf(t)}resetPerfData(){this._perfData={lifecycle:{},effects:new Map}}getNodePath(e){let t=[],n=e;for(;n?.tagName;){let e=n.tagName.toLowerCase(),r=n.parentElement;if(r){let i=Array.from(r.children).filter(t=>t.tagName.toLowerCase()===e);if(i.length>1){let r=i.indexOf(n)+1;t.unshift(`${e}:nth-child(${r})`)}else t.unshift(e)}else t.unshift(e);n=r}return t.join(`>`)}buildEffectId(e){let t=e?.directive??`unknown`,n=T(e?.expression??``,32),r=e?.element;return`${t}:${r?r.dataset?.perfid??r.id??r.dataset?.testid??this.getNodePath(r):`unknown`}:${n}`}recordEffectExecution(e,t){let n=this.buildEffectId(e),r=this._perfData.effects.get(n)??{count:0,totalTime:0};r.count++,r.totalTime+=t,this._perfData.effects.set(n,r)}performanceReport(){let e=Array.from(this._perfData.effects.entries()),t={};for(let[n,r]of e){let e=n.split(`:`)[0];t[e]||(t[e]={count:0,totalTime:0}),t[e].count+=r.count,t[e].totalTime+=r.totalTime}let n=e.map(([e,t])=>({id:e,executionCount:t.count,totalTime:t.totalTime,avgTime:t.count>0?t.totalTime/t.count:0})).sort((e,t)=>t.totalTime-e.totalTime).slice(0,10);return{lifecycle:this._perfData.lifecycle,effects:{total:e.length,byDirective:t,slowest:n},observers:this.getObserverStats()}}effect(e,t){if(!this.shouldLog(`lifecycle`))return super.effect(e,t);let n=performance.now(),r=super.effect(e,t),i=performance.now()-n;return t&&this.recordEffectExecution(t,i),i>16&&console.warn(`Slow effect (${i.toFixed(1)}ms):`,this.buildEffectId(t)),this.shouldLog(`effects`)&&console.debug(`Effect (${i.toFixed(2)}ms):`,this.buildEffectId(t)),r}async fetchRemote(e,t){return fetch(e,{cache:t?.cache??`default`}).then(e=>e.text())}async fetchLocal(e,t){return this.fetchRemote(e,t)}async preprocessString(e,t){this.log(`Preprocessing string content with params:
27
+ `;case`r`:return`\r`;case`t`:return` `;case`b`:return`\b`;case`f`:return`\f`;default:return t}});var de=class{_input;_index=-1;_tokenStart=0;_next;constructor(e){this._input=e,this._advance()}nextToken(){for(;q(this._next??-1);)this._advance(!0);if(se(this._next??-1))return this._tokenizeString();if(J(this._next??-1))return this._tokenizeIdentOrKeyword();if(Y(this._next??-1))return this._tokenizeNumber();if(this._next===46)return this._tokenizeDot();if(this._next===44)return this._tokenizeComma();if(this._next===58)return this._tokenizeColon();if(ce(this._next??-1))return this._tokenizeOperator();if(le(this._next??-1))return this._tokenizeGrouper();if(this._advance(),this._next!==void 0)throw Error(`Expected end of input, got ${this._next}`)}_advance(e){this._index++,this._index<this._input.length?(this._next=this._input.charCodeAt(this._index),e===!0&&(this._tokenStart=this._index)):this._next=void 0}_getValue(e=0){let t=this._input.substring(this._tokenStart,this._index+e);return e===0&&this._clearValue(),t}_clearValue(){this._tokenStart=this._index}_tokenizeString(){let e=this._next;for(this._advance(!0);this._next!==e;){if(this._next===void 0||this._next===92&&(this._advance(),this._next===void 0))throw Error(`unterminated string`);this._advance()}let t=K(G.STRING,ue(this._getValue()));return this._advance(),t}_tokenizeIdentOrKeyword(){do this._advance();while(ae(this._next??-1));let e=this._getValue();return K(oe(e)?G.KEYWORD:ne.has(e)?G.OPERATOR:G.IDENTIFIER,e,z[e]??0)}_tokenizeNumber(){do this._advance();while(Y(this._next??-1));return this._next===46?this._tokenizeDot():K(G.INTEGER,this._getValue())}_tokenizeDot(){if(this._advance(),Y(this._next??-1))return this._tokenizeFraction();if(this._next===46){if(this._advance(),this._next===46)return this._advance(),this._clearValue(),K(G.SPREAD,`...`);throw Error(`Unexpected token ..`)}return this._clearValue(),K(G.DOT,`.`,13)}_tokenizeComma(){return this._advance(!0),K(G.COMMA,`,`)}_tokenizeColon(){return this._advance(!0),K(G.COLON,`:`)}_tokenizeFraction(){do this._advance();while(Y(this._next??-1));return K(G.DECIMAL,this._getValue())}_tokenizeOperator(){this._advance();let e=this._getValue(2);if(W.has(e))this._advance(),this._advance();else{if(e=this._getValue(1),e===`=>`)return this._advance(),K(G.ARROW,e);U.has(e)&&this._advance()}return e=this._getValue(),e===`?.`?K(G.OPTIONAL_DOT,e,13):K(G.OPERATOR,e,z[e])}_tokenizeGrouper(){let e=String.fromCharCode(this._next??0),t=K(G.GROUPER,e,z[e]);return this._advance(!0),t}};const fe=(e,t)=>new pe(e,t).parse();var pe=class{_kind;_tokenizer;_ast;_token;_value;constructor(e,t){this._tokenizer=new de(e),this._ast=t}parse(){this._advance();let e=this._parseExpression();if(this._token)throw Error(`Unexpected token: ${this._token.value}`);return e}_advance(e,t){if(!this._matches(e,t))throw Error(`Expected kind ${e} (${t}), was ${this._token?.kind} (${this._token?.value})`);let n=this._tokenizer.nextToken();this._token=n,this._kind=n?.kind,this._value=n?.value}_matches(e,t){return!(e&&this._kind!==e||t&&this._value!==t)}_parseExpression(){if(!this._token)return this._ast.empty();let e=this._parseUnary();return e===void 0?void 0:this._parsePrecedence(e,0)}_parsePrecedence(e,t){if(e===void 0)throw Error(`Expected left to be defined.`);for(;this._token;)if(this._matches(G.GROUPER,`(`)){let t=this._parseArguments();e=this._ast.invoke(e,void 0,t)}else if(this._matches(G.GROUPER,`[`)){let t=this._parseIndex();e=this._ast.index(e,t)}else if(this._matches(G.DOT)||this._matches(G.OPTIONAL_DOT)){let t=this._kind===G.OPTIONAL_DOT;if(this._advance(),t&&this._matches(G.GROUPER,`[`)){let t=this._parseIndex();e=this._ast.index(e,t,!0)}else if(t&&this._matches(G.GROUPER,`(`)){let t=this._parseArguments();e=this._ast.invoke(e,void 0,t,!0)}else{let n=this._parseUnary();e=this._makeInvokeOrGetter(e,n,t)}}else if(this._matches(G.KEYWORD))break;else if(this._matches(G.OPERATOR)&&this._token.precedence>=t)e=this._value===`?`?this._parseTernary(e):this._parseBinary(e,this._token);else break;return e}_makeInvokeOrGetter(e,t,n){if(t===void 0)throw Error(`expected identifier`);if(t.type===`ID`)return this._ast.getter(e,t.value,n);if(t.type===`Invoke`&&t.receiver.type===`ID`){let r=t.receiver;return this._ast.invoke(e,r.value,t.arguments,n)}else throw Error(`expected identifier: ${t}`)}_parseBinary(e,t){if(!ie.has(t.value))throw Error(`unknown operator: ${t.value}`);this._advance();let n=this._parseUnary();for(;(this._kind===G.OPERATOR||this._kind===G.DOT||this._kind===G.GROUPER)&&this._token&&(this._token.precedence??0)>t.precedence;)n=this._parsePrecedence(n,this._token?.precedence??0);if(n===void 0)throw Error(`Expected expression after ${t.value}`);return this._ast.binary(e,t.value,n)}_parseUnary(){if(this._matches(G.KEYWORD,`typeof`)){this._advance();let e=this._parsePrecedence(this._parsePrimary(),13);return this._ast.unary(`typeof`,e)}if(this._matches(G.OPERATOR)){let e=this._value;if(this._advance(),e===`+`||e===`-`){if(this._matches(G.INTEGER))return this._parseInteger(e);if(this._matches(G.DECIMAL))return this._parseDecimal(e)}if(!e||!re.has(e))throw Error(`unexpected token: ${e}`);let t=this._parsePrecedence(this._parsePrimary(),13);return this._ast.unary(e,t)}return this._parsePrimary()}_parseTernary(e){this._advance(G.OPERATOR,`?`);let t=this._parseExpression();this._advance(G.COLON);let n=this._parseExpression();return this._ast.ternary(e,t,n)}_parsePrimary(){switch(this._kind){case G.KEYWORD:{let e=this._value??``;if(e===`this`)return this._advance(),this._ast.id(e);throw R.has(e)?Error(`unexpected keyword: ${e}`):Error(`unrecognized keyword: ${e}`)}case G.IDENTIFIER:return this._parseInvokeOrIdentifier();case G.STRING:return this._parseString();case G.INTEGER:return this._parseInteger();case G.DECIMAL:return this._parseDecimal();case G.GROUPER:return this._value===`(`?this._parseParenOrFunction():this._value===`{`?this._parseMap():this._value===`[`?this._parseList():void 0;case G.COLON:throw Error(`unexpected token ":"`);default:return}}_parseList(){let e=[];do{if(this._advance(),this._matches(G.GROUPER,`]`))break;if(this._matches(G.SPREAD)){this._advance();let t=this._parseExpression();t&&e.push(this._ast.spreadElement(t))}else e.push(this._parseExpression())}while(this._matches(G.COMMA));return this._advance(G.GROUPER,`]`),this._ast.list(e)}_parseMap(){let e=[];do{if(this._advance(),this._matches(G.GROUPER,`}`))break;if(this._matches(G.SPREAD)){this._advance();let t=this._parseExpression();t&&e.push(this._ast.spreadProperty(t))}else{let t=this._value??``;if((this._matches(G.STRING)||this._matches(G.IDENTIFIER))&&this._advance(),this._matches(G.COLON)){this._advance(G.COLON);let n=this._parseExpression();n&&e.push(this._ast.property(t,n))}else e.push(this._ast.property(t,this._ast.id(t)))}}while(this._matches(G.COMMA));return this._advance(G.GROUPER,`}`),this._ast.map(e)}_parseInvokeOrIdentifier(){let e=this._value;if(e===`true`)return this._advance(),this._ast.literal(!0);if(e===`false`)return this._advance(),this._ast.literal(!1);if(e===`null`)return this._advance(),this._ast.literal(null);if(e===`undefined`)return this._advance(),this._ast.literal(void 0);let t=this._parseIdentifier(),n=this._parseArguments();return n?this._ast.invoke(t,void 0,n):t}_parseIdentifier(){if(!this._matches(G.IDENTIFIER))throw Error(`expected identifier: ${this._value}`);let e=this._value;return this._advance(),this._ast.id(e??``)}_parseArguments(){if(!this._matches(G.GROUPER,`(`))return;let e=[];do{if(this._advance(),this._matches(G.GROUPER,`)`))break;if(this._matches(G.SPREAD)){this._advance();let t=this._parseExpression();t&&e.push(this._ast.spreadElement(t))}else{let t=this._parseExpression();e.push(t)}}while(this._matches(G.COMMA));return this._advance(G.GROUPER,`)`),e}_parseIndex(){this._advance();let e=this._parseExpression();return this._advance(G.GROUPER,`]`),e}_parseParenOrFunction(){let e=this._parseArguments();if(this._matches(G.ARROW)){this._advance();let t=this._parseExpression(),n=e?.map(e=>e.value)??[];return this._ast.arrowFunction(n,t)}else return this._ast.paren(e?.[0])}_parseString(){let e=this._ast.literal(this._value??``);return this._advance(),e}_parseInteger(e=``){let t=this._ast.literal(parseInt(`${e}${this._value}`,10));return this._advance(),t}_parseDecimal(e=``){let t=this._ast.literal(parseFloat(`${e}${this._value}`));return this._advance(),t}},me=class{timeouts=new Map;debounce(e,t){return new Promise((n,r)=>{let i=this.timeouts.get(t);i&&clearTimeout(i),this.timeouts.set(t,setTimeout(()=>{try{n(t()),this.timeouts.delete(t)}catch(e){r(e)}},e))})}};const he=new H,X=`__is_proxy__`;function ge(e){return e instanceof $||e[X]===!0}function Z(e,t){let n=e?._store;if(n?.has(t))return n.get(t);if(n?.has(`$parent`))return Z(n.get(`$parent`),t)}function Q(e,t){let n=e?._store;return n?.has(t)?e:n?.has(`$parent`)?Q(n.get(`$parent`),t):null}function _e(e,t,n){let r=Q(e,t);r?r._store.set(t,n):e._store.set(t,n)}var $=class e extends me{evalkeys=[`$elem`,`$event`];expressionCache=new Map;observers=new Map;keyHandlers=new Map;_store=new Map;_lock=Promise.resolve();constructor(e){super();for(let[t,n]of Object.entries(e||{}))this.set(t,n)}wrapObject(e,t){return e==null||ge(e)||e.constructor!==Object&&!Array.isArray(e)?e:new Proxy(e,{deleteProperty:(e,n)=>typeof n==`string`&&n in e?(delete e[n],t(),!0):!1,set:(e,n,r,i)=>{if(Reflect.get(e,n,i)===r)return!0;typeof r==`object`&&r&&(r=this.wrapObject(r,t));let a=Reflect.set(e,n,r,i);return t(),a},get:(e,t,n)=>t===X?!0:Reflect.get(e,t,n)})}watch(e,t){let n=Q(this,e);if(!n)throw Error(`Cannot watch key "${e}" as it does not exist in the store.`);n.observers.has(e)||n.observers.set(e,new Set),Array.from(n.observers.get(e)||[]).some(e=>e.observer===t)||n.observers.get(e)?.add({observer:t,store:this})}addKeyHandler(e,t){this.keyHandlers.has(e)||this.keyHandlers.set(e,new Set),this.keyHandlers.get(e)?.add(t)}async notify(e,t=10){let n=Q(this,e),r=Array.from(n?.observers.get(e)||[]);await this.debounce(t,()=>Promise.all(r.map(e=>e.observer.call(e.store.proxify(e.observer)))))}get(e,t){return t&&this.watch(e,t),Z(this,e)}async set(e,t){if(this._store.has(e)&&t===this._store.get(e))return;let n=()=>this.notify(e);t&&typeof t==`object`&&(t=this.wrapObject(t,n)),_e(this,e,t);for(let[n,r]of this.keyHandlers.entries())if(n.test(e))for(let n of r)await Promise.resolve(n.call(this.$,e,t));await n()}async del(e){await this.set(e,null),this._store.delete(e),this.observers.delete(e)}keys(){return Array.from(this._store.keys())}has(e){return this._store.has(e)}getObserverStats(){let e={},t=0;for(let[n,r]of this.observers)e[n]=r.size,t+=r.size;return{totalKeys:this.observers.size,totalObservers:t,byKey:e}}effect(e,t){return e.call(this.proxify(e))}proxify(t){let n=Array.from(this._store.entries()).map(([e])=>e),r=Object.fromEntries(n.map(e=>[e,null])),i=(e,t,n)=>typeof e==`function`&&t!==`constructor`?(...t)=>e.call(n,...t):e;return new Proxy(r,{has:(e,t)=>typeof t==`string`&&(Q(this,t)||Reflect.has(this,t))?!0:Reflect.has(r,t),get:(n,r,a)=>{if(typeof r==`string`){if(Q(this,r)){let n=this.get(r,t);return t&&n instanceof e?n.proxify(t):i(n,r,a)}if(t&&r!==X&&!Reflect.has(this,r))return this.set(r,void 0),this.get(r,t)}return r===`$`?this.proxify(t):i(Reflect.get(this,r,a),r,a)},set:(e,t,n,r)=>(typeof t!=`string`||t in this?Reflect.set(this,t,n,r):this.set(t,n),!0)})}get $(){return this.proxify()}makeEvalFunction(e){return(t,n)=>{let r=fe(e,he),i=new Proxy(n,{has(e,n){return n in e||n in t||n in globalThis},get(e,n){if(typeof n==`string`)return n in e?e[n]:n in t?t[n]:n in globalThis?globalThis[n]:t[n]},set(e,n,r){return typeof n==`string`?n in e?(e[n]=r,!0):(t[n]=r,!0):!1}});return r?.evaluate(i)}}cachedExpressionFunction(e){e=e.trim(),this.expressionCache.has(e)||this.expressionCache.set(e,this.makeEvalFunction(e));let t=this.expressionCache.get(e);if(!t)throw Error(`Failed to retrieve cached expression: ${e}`);return t}eval(e,t={}){let n=this.$;if(this._store.has(e))return n[e];{let r=this.cachedExpressionFunction(e);try{return r(n,t)}catch(t){return console.error(`Failed to evaluate expression: ${e}`),console.error(t),null}}}$resolve(e,t){let n={$pending:!0,$result:null,$error:null};return Promise.resolve().then(()=>e(t)).then(e=>{n.$result=e}).catch(e=>{n.$error=e instanceof Error?e:Error(String(e))}).finally(()=>{n.$pending=!1}),n}},ve=class e extends ${_debugLevel=`off`;dirpath=``;_perfData={lifecycle:{},effects:new Map};static DEBUG_LEVELS=[`off`,`lifecycle`,`effects`,`verbose`];_skipNodes=new Set;_customElements=new Map;_pendingValueRetries=[];debug(e){return typeof e==`boolean`?this._debugLevel=e?`lifecycle`:`off`:this._debugLevel=e,this}get debugging(){return this._debugLevel!==`off`}shouldLog(t){return e.DEBUG_LEVELS.indexOf(this._debugLevel)>=e.DEBUG_LEVELS.indexOf(t)}clearPerformanceReport(){this._perfData={lifecycle:{},effects:new Map}}getNodePath(e){let t=[],n=e;for(;n?.tagName;){let e=n.tagName.toLowerCase(),r=n.parentElement;if(r){let i=Array.from(r.children).filter(t=>t.tagName.toLowerCase()===e);if(i.length>1){let r=i.indexOf(n)+1;t.unshift(`${e}:nth-child(${r})`)}else t.unshift(e)}else t.unshift(e);n=r}return t.join(`>`)}buildEffectId(e){let t=e?.directive??`unknown`,n=T(e?.expression??``,32),r=e?.element;return`${t}:${r?r.dataset?.perfid??r.id??r.dataset?.testid??this.getNodePath(r):`unknown`}:${n}`}recordEffectExecution(e,t){let n=this.buildEffectId(e),r=this._perfData.effects.get(n)??{count:0,totalTime:0};r.count++,r.totalTime+=t,this._perfData.effects.set(n,r)}getPerformanceReport(){let e=Array.from(this._perfData.effects.entries()),t={};for(let[n,r]of e){let e=n.split(`:`)[0];t[e]||(t[e]={count:0,totalTime:0}),t[e].count+=r.count,t[e].totalTime+=r.totalTime}let n=e.map(([e,t])=>({id:e,executionCount:t.count,totalTime:t.totalTime,avgTime:t.count>0?t.totalTime/t.count:0})).sort((e,t)=>t.totalTime-e.totalTime).slice(0,10);return{lifecycle:this._perfData.lifecycle,effects:{total:e.length,byDirective:t,slowest:n},observers:this.getObserverStats()}}effect(e,t){if(!this.shouldLog(`lifecycle`))return super.effect(e,t);let n=performance.now(),r=super.effect(e,t),i=performance.now()-n;return t&&this.recordEffectExecution(t,i),i>16&&console.warn(`Slow effect (${i.toFixed(1)}ms):`,this.buildEffectId(t)),this.shouldLog(`effects`)&&console.debug(`Effect (${i.toFixed(2)}ms):`,this.buildEffectId(t)),r}async fetchRemote(e,t){return fetch(e,{cache:t?.cache??`default`}).then(e=>e.text())}async fetchLocal(e,t){return this.fetchRemote(e,t)}async preprocessString(e,t){this.log(`Preprocessing string content with params:
28
28
  `,t);let n=this.parseHTML(e,t);return await this.preprocessNode(n,t),n}async preprocessRemote(e,t){let n={};t?.cache&&(n.cache=t.cache);let r=await fetch(e,n).then(e=>e.text());return this.preprocessString(r,{...t,dirpath:D(e),rootDocument:t?.rootDocument??!e.endsWith(`.tpl.html`)})}async preprocessLocal(e,t){let n=await this.fetchLocal(e,t);return this.preprocessString(n,{...t,dirpath:D(e),rootDocument:t?.rootDocument??!e.endsWith(`.tpl.html`)})}subrenderer(){let e=new this.constructor().debug(this.debugging);return e._store.set(`$parent`,this),e._store.set(`$rootRenderer`,this.get(`$rootRenderer`)??this),e._customElements=this._customElements,e}log(...e){this.shouldLog(`verbose`)&&console.debug(...e)}async preprocessNode(e,t){let n=this.shouldLog(`lifecycle`)?performance.now():0;t={dirpath:this.dirpath,maxdepth:10,...t};let r=new k(a(e,this._skipNodes)).map(async e=>{this.log(`Preprocessing node:
29
29
  `,E(e,128)),await A.resolveIncludes.call(this,e,t),await A.rebaseRelativePaths.call(this,e,t),await A.registerCustomElements.call(this,e,t),await A.resolveCustomElements.call(this,e,t)});return await Promise.all(r.generator()),n&&(this._perfData.lifecycle.preprocessTime=(this._perfData.lifecycle.preprocessTime??0)+(performance.now()-n)),e}async renderNode(e,t){let n=this.shouldLog(`lifecycle`)?performance.now():0;for(let n of a(e,this._skipNodes))this.log(`Rendering node:
30
- `,E(n,128)),await A.resolveForAttribute.call(this,n,t),await A.resolveRenderAttribute.call(this,n,t),await A.resolveDataAttribute.call(this,n,t),await A.resolveTextAttributes.call(this,n,t),await A.resolveHtmlAttribute.call(this,n,t),await A.resolveIfAttribute.call(this,n,t),await A.resolveShowAttribute.call(this,n,t),await A.resolveClassAttribute.call(this,n,t),await A.resolveBindAttribute.call(this,n,t),await A.resolveEventAttributes.call(this,n,t),await A.resolveTextNodeExpressions.call(this,n,t),await A.resolveCustomAttribute.call(this,n,t),await A.resolveCustomProperty.call(this,n,t),await A.stripTypes.call(this,n,t);for(let e of this._pendingValueRetries.splice(0))e();return n&&(this._perfData.lifecycle.renderTime=(this._perfData.lifecycle.renderTime??0)+(performance.now()-n)),e}async mount(e,t){let n=this.shouldLog(`lifecycle`)?performance.now():0;n&&this.resetPerfData(),t={...t,rootNode:e},m(e,`renderer`,this),this._store.set(`$rootNode`,e),this.has(`$rootRenderer`)||this._store.set(`$rootRenderer`,this),this.get(`$rootRenderer`)===this&&await te(this),await this.preprocessNode(e,t),await this.renderNode(e,t),n&&(this._perfData.lifecycle.mountTime=performance.now()-n)}};export{D as n,ve as t};
30
+ `,E(n,128)),await A.resolveForAttribute.call(this,n,t),await A.resolveRenderAttribute.call(this,n,t),await A.resolveDataAttribute.call(this,n,t),await A.resolveTextAttributes.call(this,n,t),await A.resolveHtmlAttribute.call(this,n,t),await A.resolveIfAttribute.call(this,n,t),await A.resolveShowAttribute.call(this,n,t),await A.resolveClassAttribute.call(this,n,t),await A.resolveBindAttribute.call(this,n,t),await A.resolveEventAttributes.call(this,n,t),await A.resolveTextNodeExpressions.call(this,n,t),await A.resolveCustomAttribute.call(this,n,t),await A.resolveCustomProperty.call(this,n,t),await A.stripTypes.call(this,n,t);for(let e of this._pendingValueRetries.splice(0))e();return n&&(this._perfData.lifecycle.renderTime=(this._perfData.lifecycle.renderTime??0)+(performance.now()-n)),e}async mount(e,t){let n=this.shouldLog(`lifecycle`)?performance.now():0;n&&this.clearPerformanceReport(),t={...t,rootNode:e},m(e,`renderer`,this),this._store.set(`$rootNode`,e),this.has(`$rootRenderer`)||this._store.set(`$rootRenderer`,this),this.get(`$rootRenderer`)===this&&await te(this),await this.preprocessNode(e,t),await this.renderNode(e,t),n&&(this._perfData.lifecycle.mountTime=performance.now()-n)}};export{D as n,ve as t};
@@ -54,9 +54,29 @@ export declare abstract class IRenderer<T extends StoreState = StoreState> exten
54
54
  */
55
55
  private shouldLog;
56
56
  /**
57
- * Resets performance data. Called at the start of mount().
57
+ * Clears accumulated performance data. Called automatically at the start of `mount()`.
58
+ *
59
+ * Use this to reset performance tracking before measuring a specific user flow.
60
+ * After clearing, only effects and lifecycle events from subsequent operations
61
+ * will be included in the next `getPerformanceReport()` call.
62
+ *
63
+ * @example
64
+ * ```js
65
+ * // Setup phase
66
+ * $.debug('lifecycle');
67
+ * await $.mount(document.body);
68
+ *
69
+ * // Clear to start fresh measurement
70
+ * $.clearPerformanceReport();
71
+ *
72
+ * // Perform user flow to measure
73
+ * $.items = generateLargeList();
74
+ *
75
+ * // Get report for just this flow
76
+ * const report = $.getPerformanceReport();
77
+ * ```
58
78
  */
59
- private resetPerfData;
79
+ clearPerformanceReport(): void;
60
80
  /**
61
81
  * Generates a DOM path for an element (e.g., "html>body>div>ul>li:nth-child(2)").
62
82
  */
@@ -72,7 +92,7 @@ export declare abstract class IRenderer<T extends StoreState = StoreState> exten
72
92
  /**
73
93
  * Returns a structured performance report.
74
94
  */
75
- performanceReport(): PerformanceReport;
95
+ getPerformanceReport(): PerformanceReport;
76
96
  /**
77
97
  * Override effect() to add performance tracking.
78
98
  * Tracks effect execution time and logs slow effects (>16ms).
package/dist/renderer.js CHANGED
@@ -61,9 +61,29 @@ export class IRenderer extends SignalStore {
61
61
  return (IRenderer.DEBUG_LEVELS.indexOf(this._debugLevel) >= IRenderer.DEBUG_LEVELS.indexOf(level));
62
62
  }
63
63
  /**
64
- * Resets performance data. Called at the start of mount().
64
+ * Clears accumulated performance data. Called automatically at the start of `mount()`.
65
+ *
66
+ * Use this to reset performance tracking before measuring a specific user flow.
67
+ * After clearing, only effects and lifecycle events from subsequent operations
68
+ * will be included in the next `getPerformanceReport()` call.
69
+ *
70
+ * @example
71
+ * ```js
72
+ * // Setup phase
73
+ * $.debug('lifecycle');
74
+ * await $.mount(document.body);
75
+ *
76
+ * // Clear to start fresh measurement
77
+ * $.clearPerformanceReport();
78
+ *
79
+ * // Perform user flow to measure
80
+ * $.items = generateLargeList();
81
+ *
82
+ * // Get report for just this flow
83
+ * const report = $.getPerformanceReport();
84
+ * ```
65
85
  */
66
- resetPerfData() {
86
+ clearPerformanceReport() {
67
87
  this._perfData = { lifecycle: {}, effects: new Map() };
68
88
  }
69
89
  /**
@@ -117,7 +137,7 @@ export class IRenderer extends SignalStore {
117
137
  /**
118
138
  * Returns a structured performance report.
119
139
  */
120
- performanceReport() {
140
+ getPerformanceReport() {
121
141
  const effects = Array.from(this._perfData.effects.entries());
122
142
  const byDirective = {};
123
143
  for (const [id, stats] of effects) {
@@ -358,7 +378,7 @@ export class IRenderer extends SignalStore {
358
378
  const startTime = this.shouldLog("lifecycle") ? performance.now() : 0;
359
379
  // Reset performance data for this mount cycle.
360
380
  if (startTime)
361
- this.resetPerfData();
381
+ this.clearPerformanceReport();
362
382
  params = { ...params, rootNode: root };
363
383
  // Attach ourselves to the HTML node.
364
384
  setProperty(root, "renderer", this);
@@ -1 +1 @@
1
- {"version":3,"file":"renderer.js","sourceRoot":"","sources":["../src/renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAQpF,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAIzC;;;;;GAKG;AACH,MAAM,OAAgB,SAA6C,SAAQ,WAAc;IAEhF,WAAW,GAAe,KAAK,CAAC;IACrB,OAAO,GAAW,EAAE,CAAC;IAExC,0EAA0E;IAClE,SAAS,GAGb,EAAE,SAAS,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC;IAE1C,2CAA2C;IACnC,MAAM,CAAU,YAAY,GAAiB,CAAC,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IACvF,UAAU,GAAc,IAAI,GAAG,EAAE,CAAC;IAClC,eAAe,GAAsB,IAAI,GAAG,EAAE,CAAC;IAExD;;;;;;;;;;;;;OAaG;IACM,oBAAoB,GAAsB,EAAE,CAAC;IAOtD;;;;;OAKG;IACH,KAAK,CAAC,IAA0B;QAC/B,IAAI,OAAO,IAAI,KAAK,SAAS,EAAE,CAAC;YAC/B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,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C,CAAC;QAED,8DAA8D;QAC9D,IAAI,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,KAAK,IAAI,EAAE,CAAC;YACxC,MAAM,uBAAuB,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;QAED,iDAAiD;QACjD,MAAM,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAExC,sDAAsD;QACtD,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAEpC,uBAAuB;QACvB,IAAI,SAAS,EAAE,CAAC;YACf,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;QACpE,CAAC;IACF,CAAC"}
@@ -1,4 +1,4 @@
1
- import { a as StoreState, i as IRenderer, n as RenderParams, t as ParserParams } from "./interfaces-BnxInboi.js";
1
+ import { a as StoreState, i as IRenderer, n as RenderParams, t as ParserParams } from "./interfaces-VzZkcmCK.js";
2
2
 
3
3
  //#region src/safe_browser.d.ts
4
4
  declare class Renderer<T extends StoreState = StoreState> extends IRenderer<T> {
@@ -1 +1 @@
1
- import{n as e,t}from"./renderer-gpXY5UCp.js";import{safeDomParser as n}from"safevalues/dom";import{HtmlSanitizerBuilder as r}from"safevalues";const i=`:data,:for,:text,:html,:show,:if,:class,:bind,:render,:on:click,:on:click.prevent,:on:input,:on:input.prevent,:on:change,:on:change.prevent,:on:submit,:on:submit.prevent,:attr:src,:attr:href,:attr:title,:attr:data-testid,:prop:src,:prop:href,:prop:checked,:prop:selected,:prop:disabled`.split(`,`),a=e=>`data-${e.slice(1).replace(`:`,`-`)}`,o=i.map(e=>a(e)),s=[`data-testid`,`data-perfid`],c=[...o,...s];var l=class extends t{impl=`safe_browser`;dirpath=e(globalThis.location?.href??`http://localhost/`);parseHTML(e,t={rootDocument:!1}){for(let t of i)e=e.replace(RegExp(`\\s:${t.slice(1)}=`,`g`),` data-${t.slice(1).replace(`:`,`-`)}=`);e=e.replace(/<include(.*) src="([^"]+)"(.*)><\/include>/g,`<link $1 rel="subresource" href="$2" $3>`),e=e.replace(/<template is="([^"]+)">([\s\S]*)<\/template>/g,`<div role="template" alt="$1">$2</div>`),e=e.replace(/<(\w+)-(\w+)(.*)>([\s\S]*)<\/(\w+)-(\w+)>/g,`<div role="$1-$2" $3>$4</div>`);let a=new r().allowDataAttributes(c).allowClassAttributes().allowStyleAttributes().build();if(this.log(`parseHTML`,e),this.log(`sanitized`,String(a.sanitize(e))),t.rootDocument){let t=new DOMParser;return n.parseFromString(t,a.sanitize(e),`text/html`)}else return a.sanitizeToFragment(e)}serializeHTML(e){return new XMLSerializer().serializeToString(e).replace(/\s?xmlns="[^"]+"/gm,``)}preprocessLocal(e,t){return this.preprocessRemote(e,t)}createElement(e,t){return(t||document).createElement(e)}createComment(e,t){return(t||document).createComment(e)}textContent(e,t){e.textContent=t}};const u=new l;export{u as Mancha,l as Renderer};
1
+ import{n as e,t}from"./renderer-Cpl4GpyW.js";import{safeDomParser as n}from"safevalues/dom";import{HtmlSanitizerBuilder as r}from"safevalues";const i=`:data,:for,:text,:html,:show,:if,:class,:bind,:render,:on:click,:on:click.prevent,:on:input,:on:input.prevent,:on:change,:on:change.prevent,:on:submit,:on:submit.prevent,:attr:src,:attr:href,:attr:title,:attr:data-testid,:prop:src,:prop:href,:prop:checked,:prop:selected,:prop:disabled`.split(`,`),a=e=>`data-${e.slice(1).replace(`:`,`-`)}`,o=i.map(e=>a(e)),s=[`data-testid`,`data-perfid`],c=[...o,...s];var l=class extends t{impl=`safe_browser`;dirpath=e(globalThis.location?.href??`http://localhost/`);parseHTML(e,t={rootDocument:!1}){for(let t of i)e=e.replace(RegExp(`\\s:${t.slice(1)}=`,`g`),` data-${t.slice(1).replace(`:`,`-`)}=`);e=e.replace(/<include(.*) src="([^"]+)"(.*)><\/include>/g,`<link $1 rel="subresource" href="$2" $3>`),e=e.replace(/<template is="([^"]+)">([\s\S]*)<\/template>/g,`<div role="template" alt="$1">$2</div>`),e=e.replace(/<(\w+)-(\w+)(.*)>([\s\S]*)<\/(\w+)-(\w+)>/g,`<div role="$1-$2" $3>$4</div>`);let a=new r().allowDataAttributes(c).allowClassAttributes().allowStyleAttributes().build();if(this.log(`parseHTML`,e),this.log(`sanitized`,String(a.sanitize(e))),t.rootDocument){let t=new DOMParser;return n.parseFromString(t,a.sanitize(e),`text/html`)}else return a.sanitizeToFragment(e)}serializeHTML(e){return new XMLSerializer().serializeToString(e).replace(/\s?xmlns="[^"]+"/gm,``)}preprocessLocal(e,t){return this.preprocessRemote(e,t)}createElement(e,t){return(t||document).createElement(e)}createComment(e,t){return(t||document).createComment(e)}textContent(e,t){e.textContent=t}};const u=new l;export{u as Mancha,l as Renderer};
@@ -33,7 +33,7 @@ $.debug('off');
33
33
  | `effects` | Same as lifecycle | Above + individual effect timings |
34
34
  | `verbose` | Same as lifecycle | Above + all internal logging |
35
35
 
36
- The `lifecycle` level is the recommended default for performance analysis. It tracks all the data needed for `performanceReport()` while keeping console output minimal.
36
+ The `lifecycle` level is the recommended default for performance analysis. It tracks all the data needed for `getPerformanceReport()` while keeping console output minimal.
37
37
 
38
38
  ## Performance Reports
39
39
 
@@ -44,7 +44,7 @@ const { $ } = Mancha;
44
44
  $.debug('lifecycle');
45
45
  await $.mount(document.body);
46
46
 
47
- const report = $.performanceReport();
47
+ const report = $.getPerformanceReport();
48
48
  console.log(report);
49
49
  ```
50
50
 
@@ -85,6 +85,28 @@ console.log(report);
85
85
  }
86
86
  ```
87
87
 
88
+ ## Measuring Specific User Flows
89
+
90
+ By default, performance data resets on each `mount()` call. To measure a specific user flow (like a button click or data update) after the initial mount, use `clearPerformanceReport()`:
91
+
92
+ ```js
93
+ const { $ } = Mancha;
94
+ $.debug('lifecycle');
95
+ await $.mount(document.body);
96
+
97
+ // Setup is complete. Now measure a specific user flow.
98
+ $.clearPerformanceReport();
99
+
100
+ // Perform the user flow you want to measure.
101
+ $.items = await fetchLargeDataset();
102
+
103
+ // Get the report for just this flow.
104
+ const report = $.getPerformanceReport();
105
+ console.log('User flow effects:', report.effects.slowest);
106
+ ```
107
+
108
+ This is useful for optimizing specific interactions without the noise of initial mount timing.
109
+
88
110
  ## Effect Identification
89
111
 
90
112
  Each effect is identified by a unique ID composed of the directive name, element identifier, and expression. The element identifier is determined by the following priority:
@@ -127,7 +149,7 @@ This helps identify render bottlenecks without needing to analyze the full perfo
127
149
 
128
150
  ### 1. Profile Before Optimizing
129
151
 
130
- Always measure before making changes. Enable debugging, interact with your application, then check `performanceReport()`:
152
+ Always measure before making changes. Enable debugging, interact with your application, then check `getPerformanceReport()`:
131
153
 
132
154
  ```js
133
155
  $.debug('lifecycle');
@@ -135,7 +157,7 @@ await $.mount(document.body);
135
157
 
136
158
  // Interact with your application...
137
159
 
138
- console.table($.performanceReport().effects.slowest);
160
+ console.table($.getPerformanceReport().effects.slowest);
139
161
  ```
140
162
 
141
163
  ### 2. Add data-perfid to Critical Elements
@@ -155,7 +177,7 @@ For elements in loops or those with complex expressions, add `data-perfid` for c
155
177
  High observer counts on a single key can indicate performance issues:
156
178
 
157
179
  ```js
158
- const report = $.performanceReport();
180
+ const report = $.getPerformanceReport();
159
181
  for (const [key, count] of Object.entries(report.observers.byKey)) {
160
182
  if (count > 50) {
161
183
  console.warn(`Key "${key}" has ${count} observers - consider restructuring`);
@@ -171,10 +193,10 @@ Performance data automatically resets when `mount()` is called. This means each
171
193
  $.debug('lifecycle');
172
194
 
173
195
  await $.mount(element1);
174
- console.log($.performanceReport()); // Data for element1
196
+ console.log($.getPerformanceReport()); // Data for element1
175
197
 
176
198
  await $.mount(element2);
177
- console.log($.performanceReport()); // Fresh data for element2 only
199
+ console.log($.getPerformanceReport()); // Fresh data for element2 only
178
200
  ```
179
201
 
180
202
  ### 5. Disable in Production
@@ -201,7 +223,7 @@ if (process.env.NODE_ENV !== 'production') {
201
223
  Mancha.debug('lifecycle');
202
224
  await Mancha.mount(document.body);
203
225
 
204
- const report = Mancha.performanceReport();
226
+ const report = Mancha.getPerformanceReport();
205
227
 
206
228
  // Check which directives are slowest
207
229
  console.log('By directive:', report.effects.byDirective);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mancha",
3
- "version": "0.20.2",
3
+ "version": "0.20.3",
4
4
  "description": "Javscript HTML rendering engine",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",