mancha 0.25.1 → 0.25.2
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.js +24 -24
- package/dist/css_custom.d.ts +2 -0
- package/dist/css_custom.js +41 -3
- package/dist/css_custom.js.map +1 -1
- package/dist/css_gen_utils.js +10 -7
- package/dist/css_gen_utils.js.map +1 -1
- package/dist/mancha.js +16 -16
- package/docs/05_css.md +13 -7
- package/package.json +1 -1
package/dist/browser.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import{safeAnchorEl as e,safeAreaEl as t,safeElement as n,safeStyleEl as r}from"safevalues/dom";import{concatStyleSheets as i,safeAttrPrefix as a,safeStyleSheet as o}from"safevalues";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=[25,50,75,100,150,200,300,500,700,1e3],g={margin:`m`},_={padding:`p`},ee={...g,..._},te={width:`w`,height:`h`},ne={top:`top`,right:`right`,bottom:`bottom`,left:`left`},re={"min-width":`min-w`,"min-height":`min-h`,"max-width":`max-w`,"max-height":`max-h`},v=`transition-timing-function: ease-in-out; transition-duration: var(--transition-duration, 150ms)`,ie={"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; ${v}`,"transition-all":`transition-property: all; ${v}`,"transition-opacity":`transition-property: opacity; ${v}`,"transition-transform":`transition-property: transform; ${v}`,"transition-shadow":`transition-property: box-shadow; ${v}`,"transition-colors":`transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; ${v}`,"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-center":`background-position: center`,"bg-top":`background-position: top`,"bg-bottom":`background-position: bottom`,"bg-left":`background-position: left`,"bg-right":`background-position: right`,"bg-left-top":`background-position: left top`,"bg-left-bottom":`background-position: left bottom`,"bg-right-top":`background-position: right top`,"bg-right-bottom":`background-position: right bottom`,"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`},ae=[`@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}`,`@keyframes ping{75%,100%{transform:scale(2);opacity:0}}`,`@keyframes pulse{0%,100%{opacity:1}50%{opacity:.5}}`],oe=`red pink purple deep-purple indigo blue light-blue cyan teal green light-green lime yellow amber orange deep-orange brown gray blue-gray`.split(` `),se=[50,100,200,300,400,500,600,700,800,900],ce=Object.fromEntries(oe.map((e,t)=>[e,Object.fromEntries(se.map((e,n)=>{let r=(t*se.length+n)*6;return[e,`#${`ffebeeffcdd2ef9a9ae57373ef5350f44336e53935d32f2fc62828b71c1cfce4ecf8bbd0f48fb1f06292ec407ae91e63d81b60c2185bad1457880e4ff3e5f5e1bee7ce93d8ba68c8ab47bc9c27b08e24aa7b1fa26a1b9a4a148cede7f6d1c4e9b39ddb9575cd7e57c2673ab75e35b1512da84527a0311b92e8eaf6c5cae99fa8da7986cb5c6bc03f51b53949ab303f9f2835931a237ee3f2fdbbdefb90caf964b5f642a5f52196f31e88e51976d21565c00d47a1e1f5feb3e5fc81d4fa4fc3f729b6f603a9f4039be50288d10277bd01579be0f7fab2ebf280deea4dd0e126c6da00bcd400acc10097a700838f006064e0f2f1b2dfdb80cbc44db6ac26a69a00968800897b00796b00695c004d40e8f5e9c8e6c9a5d6a781c78466bb6a4caf5043a047388e3c2e7d321b5e20f1f8e9dcedc8c5e1a5aed5819ccc658bc34a7cb342689f38558b2f33691ef9fbe7f0f4c3e6ee9cdce775d4e157cddc39c0ca33afb42b9e9d24827717fffde7fff9c4fff59dfff176ffee58ffeb3bfdd835fbc02df9a825f57f17fff8e1ffecb3ffe082ffd54fffca28ffc107ffb300ffa000ff8f00ff6f00fff3e0ffe0b2ffcc80ffb74dffa726ff9800fb8c00f57c00ef6c00e65100fbe9e7ffccbcffab91ff8a65ff7043ff5722f4511ee64a19d84315bf360cefebe9d7ccc8bcaaa4a1887f8d6e637955486d4c415d40374e342e3e2723fafafaf5f5f5eeeeeee0e0e0bdbdbd9e9e9e757575616161424242212121eceff1cfd8dcb0bec590a4ae78909c607d8b546e7a455a6437474f263238`.slice(r,r+6)}`]}))]));function y(e){return e.map(([e,t])=>`.${e} { ${t} }`)}const le=[``,`-`],b=[``],ue=[[`top`,`t`],[`bottom`,`b`],[`left`,`l`],[`right`,`r`]];function x(e,t,n){let r=(r,i)=>[`${e}${t(r)}`,n(`${e}${i}`)];return[...p.map(e=>r(`${e}`,`${e*l}rem`)),...p.map(e=>r(`${e}px`,`${e}px`)),...m.map(e=>r(`${e}\\%`,`${e}%`))]}function S(e,t=le){return y(Object.entries(e).flatMap(([e,n])=>[[`${n}-0`,`${e}: 0`],[`${n}-screen`,`${e}: 100v${e.includes(`height`)?`h`:`w`}`],[`${n}-full`,`${e}: 100%`],...t.flatMap(t=>x(t,e=>`${n}-${e}`,t=>`${e}: ${t}`)),...c.map(([t,r])=>[`${n}-${t}`,`${e}: ${r}px`])]))}function de(e){return y(Object.entries(e).map(([e,t])=>[`${t}-auto`,`${e}: auto`]))}function fe(e){return y(Object.entries(e).flatMap(([e,t])=>[[`${t}x-auto`,`${e}-left: auto; ${e}-right: auto;`],[`${t}y-auto`,`${e}-top: auto; ${e}-bottom: auto;`],...ue.map(([n,r])=>[`${t}${r}-auto`,`${e}-${n}: auto`])]))}function pe(e){return y(Object.entries(e).flatMap(([e,t])=>[[`${t}x-0`,`${e}-left: 0; ${e}-right: 0;`],[`${t}y-0`,`${e}-top: 0; ${e}-bottom: 0;`],...x(``,e=>`${t}x-${e}`,t=>`${e}-left: ${t}; ${e}-right: ${t};`),...x(``,e=>`${t}y-${e}`,t=>`${e}-top: ${t}; ${e}-bottom: ${t};`)]))}function me(e,t=le){return y(Object.entries(e).flatMap(([e,n])=>[[`${n}t-0`,`${e}-top: 0`],[`${n}b-0`,`${e}-bottom: 0`],[`${n}l-0`,`${e}-left: 0`],[`${n}r-0`,`${e}-right: 0`],...t.flatMap(t=>ue.flatMap(([r,i])=>x(t,e=>`${n}${i}-${e}`,t=>`${e}-${r}: ${t}`)))]))}function he(){return y([[`border`,`border-width: 1px`],[`border-x`,`border-inline-width: 1px`],[`border-y`,`border-block-width: 1px`],...[0,...u].map(e=>[`border-${e}`,`border-width: ${e}px`]),...[0,...u].map(e=>[`border-x-${e}`,`border-inline-width: ${e}px;`]),...[0,...u].map(e=>[`border-y-${e}`,`border-block-width: ${e}px;`]),...ue.flatMap(([e,t])=>[[`border-${t}`,`border-${e}-width: 1px`],...[0,...u].map(n=>[`border-${t}-${n}`,`border-${e}-width: ${n}px`])])])}function ge(){return y(m.map(e=>[`z-${e}`,`z-index: ${e}`]))}function _e(){return y(h.map(e=>[`duration-${e}`,`--transition-duration: ${e}ms; transition-duration: ${e}ms`]))}function ve(){return y([[`space-x-0 > *`,`margin-left: 0`],[`space-y-0 > *`,`margin-top: 0`],...p.map(e=>[`space-x-${e} > :not(:first-child)`,`margin-left: ${e*l}rem`]),...p.map(e=>[`space-y-${e} > :not(:first-child)`,`margin-top: ${e*l}rem`]),...p.map(e=>[`space-x-${e}px > :not(:first-child)`,`margin-left: ${e}px`]),...p.map(e=>[`space-y-${e}px > :not(:first-child)`,`margin-top: ${e}px`]),[`gap-0`,`gap: 0`],...p.map(e=>[`gap-${e}`,`gap: ${e*l}rem`]),...p.map(e=>[`gap-${e}px`,`gap: ${e}px`]),...p.map(e=>[`gap-x-${e}`,`column-gap: ${e*l}rem`]),...p.map(e=>[`gap-y-${e}`,`row-gap: ${e*l}rem`]),...p.map(e=>[`gap-x-${e}px`,`column-gap: ${e}px`]),...p.map(e=>[`gap-y-${e}px`,`row-gap: ${e}px`]),[`divide-x > :not(:last-child)`,`border-inline-end-width: 1px`],[`divide-y > :not(:last-child)`,`border-bottom-width: 1px`],[`divide-x-0 > :not(:last-child)`,`border-inline-end-width: 0px`],[`divide-y-0 > :not(:last-child)`,`border-bottom-width: 0px`],...[2,4,8].map(e=>[`divide-x-${e} > :not(:last-child)`,`border-inline-end-width: ${e}px`]),...[2,4,8].map(e=>[`divide-y-${e} > :not(:last-child)`,`border-bottom-width: ${e}px`]),[`divide-solid > :not(:last-child)`,`border-style: solid`],[`divide-dashed > :not(:last-child)`,`border-style: dashed`],[`divide-dotted > :not(:last-child)`,`border-style: dotted`],[`divide-none > :not(:last-child)`,`border-style: none`]])}function ye(){return y([...Array.from({length:100},(e,t)=>[`text-${t}px`,`font-size: ${t}px`]),...Array.from({length:100},(e,t)=>[`text-${String(t*l).replace(`.`,`\\.`)}rem`,`font-size: ${t*l}rem`])])}function be(){return y([`column`,`row`].flatMap(e=>{let t=e.slice(0,3);return[...Array.from({length:12},(e,t)=>t+1).map(n=>[`grid-${t}s-${n}`,`grid-template-${e}s: repeat(${n}, minmax(0, 1fr))`]),[`grid-${t}s-none`,`grid-template-${e}s: none`],...Array.from({length:12},(e,t)=>t+1).map(n=>[`${t}-span-${n}`,`grid-${e}: span ${n} / span ${n}`]),[`${t}-span-full`,`grid-${e}: 1 / -1`],...Array.from({length:13},(e,t)=>t+1).map(n=>[`${t}-start-${n}`,`grid-${e}-start: ${n}`]),[`${t}-start-auto`,`grid-${e}-start: auto`],...Array.from({length:13},(e,t)=>t+1).map(n=>[`${t}-end-${n}`,`grid-${e}-end: ${n}`]),[`${t}-end-auto`,`grid-${e}-end: auto`]]}))}function xe(){return Object.entries(ie).map(([e,t])=>`.${e} { ${t} }`)}function Se(e){let t=0,n=0,r=0;return e.length===4?(t=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),r=parseInt(e[3]+e[3],16)):e.length===7&&(t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16)),`${t} ${n} ${r}`}function Ce(){let e=(e,t)=>[[`text-${e}`,`color: ${t}`],[`fill-${e}`,`fill: ${t}`],[`bg-${e}`,`background-color: ${t}`],[`border-${e}`,`border-color: ${t}`],[`divide-${e} > :not(:last-child)`,`border-color: ${t}`]];return y([...e(`white`,`#fff`),...e(`black`,`#000`),...e(`transparent`,`transparent`),...Object.entries(ce).flatMap(([t,n])=>[...e(t,n[500]),...Object.entries(n).flatMap(([n,r])=>e(`${t}-${n}`,r))])])}function we(){return y([[`opacity-0`,`opacity: 0`],...m.map(e=>[`opacity-${e}`,`opacity: ${e/100}`])])}let Te=null;function Ee(){return Te===null&&(Te=[...ae,...xe(),...Ce(),...we(),...ge(),..._e(),...S(ne),...S(te,b),...de(te),...S(g),...S(_,b),...de(g),...fe(g),...pe(ee),...me(g),...me(_,b),...ve(),...S(re,b),...he(),...ye(),...be()].join(`
|
|
2
|
-
`)),Te}const De={text:`color`,bg:`background-color`,border:`border-color`,fill:`fill`,divide:`border-color`},Oe=/^(text|bg|border|fill|divide)-([\w-]+)\/(\d+)$/,ke={w:`width`,h:`height`,"min-w":`min-width`,"min-h":`min-height`,"max-w":`max-width`,"max-h":`max-height`,m:`margin`,mt:`margin-top`,mr:`margin-right`,mb:`margin-bottom`,ml:`margin-left`,mx:`margin-inline`,my:`margin-block`,p:`padding`,pt:`padding-top`,pr:`padding-right`,pb:`padding-bottom`,pl:`padding-left`,px:`padding-inline`,py:`padding-block`,top:`top`,right:`right`,bottom:`bottom`,left:`left`,gap:`gap`,"gap-x":`column-gap`,"gap-y":`row-gap`,text:`font-size`,z:`z-index`,bg:`background-color`,border:`border-color`},Ae=/^(-?)([\w-]+)-\[(.+)\]$/,je=/^(hover|focus|disabled|sm|md|lg|xl|dark|landscape|portrait):(.+)$/,Me=[`hover`,`focus`,`disabled`],Ne=[`landscape`,`portrait`],
|
|
3
|
-
`,
|
|
4
|
-
`,
|
|
5
|
-
`,
|
|
6
|
-
`,
|
|
7
|
-
`,
|
|
8
|
-
`,
|
|
9
|
-
`,
|
|
10
|
-
`,
|
|
11
|
-
`,
|
|
12
|
-
`,
|
|
13
|
-
`,
|
|
14
|
-
`,
|
|
15
|
-
`,
|
|
16
|
-
`,
|
|
17
|
-
`,
|
|
18
|
-
`,
|
|
1
|
+
import{safeAnchorEl as e,safeAreaEl as t,safeElement as n,safeStyleEl as r}from"safevalues/dom";import{concatStyleSheets as i,safeAttrPrefix as a,safeStyleSheet as o}from"safevalues";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=[25,50,75,100,150,200,300,500,700,1e3],g={margin:`m`},_={padding:`p`},ee={...g,..._},te={width:`w`,height:`h`},ne={top:`top`,right:`right`,bottom:`bottom`,left:`left`},re={"min-width":`min-w`,"min-height":`min-h`,"max-width":`max-w`,"max-height":`max-h`},v=`transition-timing-function: ease-in-out; transition-duration: var(--transition-duration, 150ms)`,y=`var(--ring-color, rgb(59 130 246 / 0.5))`,ie={"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 ${y}`,"ring-0":`box-shadow: var(--ring-inset, ) 0 0 0 0px ${y}`,"ring-1":`box-shadow: var(--ring-inset, ) 0 0 0 1px ${y}`,"ring-2":`box-shadow: var(--ring-inset, ) 0 0 0 2px ${y}`,"ring-4":`box-shadow: var(--ring-inset, ) 0 0 0 4px ${y}`,"ring-8":`box-shadow: var(--ring-inset, ) 0 0 0 8px ${y}`,"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; ${v}`,"transition-all":`transition-property: all; ${v}`,"transition-opacity":`transition-property: opacity; ${v}`,"transition-transform":`transition-property: transform; ${v}`,"transition-shadow":`transition-property: box-shadow; ${v}`,"transition-colors":`transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; ${v}`,"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-center":`background-position: center`,"bg-top":`background-position: top`,"bg-bottom":`background-position: bottom`,"bg-left":`background-position: left`,"bg-right":`background-position: right`,"bg-left-top":`background-position: left top`,"bg-left-bottom":`background-position: left bottom`,"bg-right-top":`background-position: right top`,"bg-right-bottom":`background-position: right bottom`,"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`},ae=[`@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}`,`@keyframes ping{75%,100%{transform:scale(2);opacity:0}}`,`@keyframes pulse{0%,100%{opacity:1}50%{opacity:.5}}`],oe=`red pink purple deep-purple indigo blue light-blue cyan teal green light-green lime yellow amber orange deep-orange brown gray blue-gray`.split(` `),se=[50,100,200,300,400,500,600,700,800,900],ce=Object.fromEntries(oe.map((e,t)=>[e,Object.fromEntries(se.map((e,n)=>{let r=(t*se.length+n)*6;return[e,`#${`ffebeeffcdd2ef9a9ae57373ef5350f44336e53935d32f2fc62828b71c1cfce4ecf8bbd0f48fb1f06292ec407ae91e63d81b60c2185bad1457880e4ff3e5f5e1bee7ce93d8ba68c8ab47bc9c27b08e24aa7b1fa26a1b9a4a148cede7f6d1c4e9b39ddb9575cd7e57c2673ab75e35b1512da84527a0311b92e8eaf6c5cae99fa8da7986cb5c6bc03f51b53949ab303f9f2835931a237ee3f2fdbbdefb90caf964b5f642a5f52196f31e88e51976d21565c00d47a1e1f5feb3e5fc81d4fa4fc3f729b6f603a9f4039be50288d10277bd01579be0f7fab2ebf280deea4dd0e126c6da00bcd400acc10097a700838f006064e0f2f1b2dfdb80cbc44db6ac26a69a00968800897b00796b00695c004d40e8f5e9c8e6c9a5d6a781c78466bb6a4caf5043a047388e3c2e7d321b5e20f1f8e9dcedc8c5e1a5aed5819ccc658bc34a7cb342689f38558b2f33691ef9fbe7f0f4c3e6ee9cdce775d4e157cddc39c0ca33afb42b9e9d24827717fffde7fff9c4fff59dfff176ffee58ffeb3bfdd835fbc02df9a825f57f17fff8e1ffecb3ffe082ffd54fffca28ffc107ffb300ffa000ff8f00ff6f00fff3e0ffe0b2ffcc80ffb74dffa726ff9800fb8c00f57c00ef6c00e65100fbe9e7ffccbcffab91ff8a65ff7043ff5722f4511ee64a19d84315bf360cefebe9d7ccc8bcaaa4a1887f8d6e637955486d4c415d40374e342e3e2723fafafaf5f5f5eeeeeee0e0e0bdbdbd9e9e9e757575616161424242212121eceff1cfd8dcb0bec590a4ae78909c607d8b546e7a455a6437474f263238`.slice(r,r+6)}`]}))]));function b(e){return e.map(([e,t])=>`.${e} { ${t} }`)}const le=[``,`-`],x=[``],ue=[[`top`,`t`],[`bottom`,`b`],[`left`,`l`],[`right`,`r`]];function S(e,t,n){let r=(r,i)=>[`${e}${t(r)}`,n(`${e}${i}`)];return[...p.map(e=>r(`${e}`,`${e*l}rem`)),...p.map(e=>r(`${e}px`,`${e}px`)),...m.map(e=>r(`${e}\\%`,`${e}%`))]}function C(e,t=le){return b(Object.entries(e).flatMap(([e,n])=>[[`${n}-0`,`${e}: 0`],[`${n}-screen`,`${e}: 100v${e.includes(`height`)?`h`:`w`}`],[`${n}-full`,`${e}: 100%`],...t.flatMap(t=>S(t,e=>`${n}-${e}`,t=>`${e}: ${t}`)),...c.map(([t,r])=>[`${n}-${t}`,`${e}: ${r}px`])]))}function de(e){return b(Object.entries(e).map(([e,t])=>[`${t}-auto`,`${e}: auto`]))}function fe(e){return b(Object.entries(e).flatMap(([e,t])=>[[`${t}x-auto`,`${e}-left: auto; ${e}-right: auto;`],[`${t}y-auto`,`${e}-top: auto; ${e}-bottom: auto;`],...ue.map(([n,r])=>[`${t}${r}-auto`,`${e}-${n}: auto`])]))}function pe(e){return b(Object.entries(e).flatMap(([e,t])=>[[`${t}x-0`,`${e}-left: 0; ${e}-right: 0;`],[`${t}y-0`,`${e}-top: 0; ${e}-bottom: 0;`],...S(``,e=>`${t}x-${e}`,t=>`${e}-left: ${t}; ${e}-right: ${t};`),...S(``,e=>`${t}y-${e}`,t=>`${e}-top: ${t}; ${e}-bottom: ${t};`)]))}function me(e,t=le){return b(Object.entries(e).flatMap(([e,n])=>[[`${n}t-0`,`${e}-top: 0`],[`${n}b-0`,`${e}-bottom: 0`],[`${n}l-0`,`${e}-left: 0`],[`${n}r-0`,`${e}-right: 0`],...t.flatMap(t=>ue.flatMap(([r,i])=>S(t,e=>`${n}${i}-${e}`,t=>`${e}-${r}: ${t}`)))]))}function he(){return b([[`border`,`border-width: 1px`],[`border-x`,`border-inline-width: 1px`],[`border-y`,`border-block-width: 1px`],...[0,...u].map(e=>[`border-${e}`,`border-width: ${e}px`]),...[0,...u].map(e=>[`border-x-${e}`,`border-inline-width: ${e}px;`]),...[0,...u].map(e=>[`border-y-${e}`,`border-block-width: ${e}px;`]),...ue.flatMap(([e,t])=>[[`border-${t}`,`border-${e}-width: 1px`],...[0,...u].map(n=>[`border-${t}-${n}`,`border-${e}-width: ${n}px`])])])}function ge(){return b(m.map(e=>[`z-${e}`,`z-index: ${e}`]))}function _e(){return b(h.map(e=>[`duration-${e}`,`--transition-duration: ${e}ms; transition-duration: ${e}ms`]))}function ve(){return b([[`space-x-0 > *`,`margin-left: 0`],[`space-y-0 > *`,`margin-top: 0`],...p.map(e=>[`space-x-${e} > :not(:first-child)`,`margin-left: ${e*l}rem`]),...p.map(e=>[`space-y-${e} > :not(:first-child)`,`margin-top: ${e*l}rem`]),...p.map(e=>[`space-x-${e}px > :not(:first-child)`,`margin-left: ${e}px`]),...p.map(e=>[`space-y-${e}px > :not(:first-child)`,`margin-top: ${e}px`]),[`gap-0`,`gap: 0`],...p.map(e=>[`gap-${e}`,`gap: ${e*l}rem`]),...p.map(e=>[`gap-${e}px`,`gap: ${e}px`]),...p.map(e=>[`gap-x-${e}`,`column-gap: ${e*l}rem`]),...p.map(e=>[`gap-y-${e}`,`row-gap: ${e*l}rem`]),...p.map(e=>[`gap-x-${e}px`,`column-gap: ${e}px`]),...p.map(e=>[`gap-y-${e}px`,`row-gap: ${e}px`]),[`divide-x > :not(:last-child)`,`border-inline-end-width: 1px`],[`divide-y > :not(:last-child)`,`border-bottom-width: 1px`],[`divide-x-0 > :not(:last-child)`,`border-inline-end-width: 0px`],[`divide-y-0 > :not(:last-child)`,`border-bottom-width: 0px`],...[2,4,8].map(e=>[`divide-x-${e} > :not(:last-child)`,`border-inline-end-width: ${e}px`]),...[2,4,8].map(e=>[`divide-y-${e} > :not(:last-child)`,`border-bottom-width: ${e}px`]),[`divide-solid > :not(:last-child)`,`border-style: solid`],[`divide-dashed > :not(:last-child)`,`border-style: dashed`],[`divide-dotted > :not(:last-child)`,`border-style: dotted`],[`divide-none > :not(:last-child)`,`border-style: none`]])}function ye(){return b([...Array.from({length:100},(e,t)=>[`text-${t}px`,`font-size: ${t}px`]),...Array.from({length:100},(e,t)=>[`text-${String(t*l).replace(`.`,`\\.`)}rem`,`font-size: ${t*l}rem`])])}function be(){return b([`column`,`row`].flatMap(e=>{let t=e.slice(0,3);return[...Array.from({length:12},(e,t)=>t+1).map(n=>[`grid-${t}s-${n}`,`grid-template-${e}s: repeat(${n}, minmax(0, 1fr))`]),[`grid-${t}s-none`,`grid-template-${e}s: none`],...Array.from({length:12},(e,t)=>t+1).map(n=>[`${t}-span-${n}`,`grid-${e}: span ${n} / span ${n}`]),[`${t}-span-full`,`grid-${e}: 1 / -1`],...Array.from({length:13},(e,t)=>t+1).map(n=>[`${t}-start-${n}`,`grid-${e}-start: ${n}`]),[`${t}-start-auto`,`grid-${e}-start: auto`],...Array.from({length:13},(e,t)=>t+1).map(n=>[`${t}-end-${n}`,`grid-${e}-end: ${n}`]),[`${t}-end-auto`,`grid-${e}-end: auto`]]}))}function xe(){return Object.entries(ie).map(([e,t])=>`.${e} { ${t} }`)}function Se(e){let t=0,n=0,r=0;return e.length===4?(t=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),r=parseInt(e[3]+e[3],16)):e.length===7&&(t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16)),`${t} ${n} ${r}`}function Ce(){let e=(e,t)=>[[`text-${e}`,`color: ${t}`],[`fill-${e}`,`fill: ${t}`],[`bg-${e}`,`background-color: ${t}`],[`border-${e}`,`border-color: ${t}`],[`divide-${e} > :not(:last-child)`,`border-color: ${t}`],[`ring-${e}`,`--ring-color: ${t}`]];return b([...e(`white`,`#fff`),...e(`black`,`#000`),...e(`transparent`,`transparent`),...Object.entries(ce).flatMap(([t,n])=>[...e(t,n[500]),...Object.entries(n).flatMap(([n,r])=>e(`${t}-${n}`,r))])])}function we(){return b([[`opacity-0`,`opacity: 0`],...m.map(e=>[`opacity-${e}`,`opacity: ${e/100}`])])}let Te=null;function Ee(){return Te===null&&(Te=[...ae,...xe(),...Ce(),...we(),...ge(),..._e(),...C(ne),...C(te,x),...de(te),...C(g),...C(_,x),...de(g),...fe(g),...pe(ee),...me(g),...me(_,x),...ve(),...C(re,x),...he(),...ye(),...be()].join(`
|
|
2
|
+
`)),Te}const De={text:`color`,bg:`background-color`,border:`border-color`,fill:`fill`,divide:`border-color`,ring:`--ring-color`},Oe=/^(text|bg|border|fill|divide|ring)-([\w-]+)\/(\d+)$/,ke={w:`width`,h:`height`,"min-w":`min-width`,"min-h":`min-height`,"max-w":`max-width`,"max-h":`max-height`,m:`margin`,mt:`margin-top`,mr:`margin-right`,mb:`margin-bottom`,ml:`margin-left`,mx:`margin-inline`,my:`margin-block`,p:`padding`,pt:`padding-top`,pr:`padding-right`,pb:`padding-bottom`,pl:`padding-left`,px:`padding-inline`,py:`padding-block`,top:`top`,right:`right`,bottom:`bottom`,left:`left`,gap:`gap`,"gap-x":`column-gap`,"gap-y":`row-gap`,text:`font-size`,z:`z-index`,bg:`background-color`,border:`border-color`},Ae=/^(-?)([\w-]+)-\[(.+)\]$/,je=/^(hover|focus|disabled|sm|md|lg|xl|dark|landscape|portrait):(.+)$/,Me=[`hover`,`focus`,`disabled`],Ne=[`landscape`,`portrait`],Pe=new Set,w=new Set;let T=-1,E=null;function Fe(){let e=document.styleSheets.length;e!==T&&(w.clear(),T=e)}function Ie(){w.clear(),T=-1}function Le(e){if(typeof document>`u`)return null;let t=`.${Re(e)}`;for(let e of document.styleSheets)try{for(let n of e.cssRules)if(n instanceof CSSStyleRule&&n.selectorText===t)return n.style.cssText}catch{}return null}function D(){return typeof document<`u`&&typeof CSSStyleSheet<`u`&&typeof document.createElement==`function`}function Re(e){let t=globalThis.CSS;return typeof t?.escape==`function`?t.escape(e):e.replace(/[[\]#.:>+~()'"/%,!]/g,`\\$&`)}function ze(){if(!D())return null;if(E&&!E.ownerNode?.isConnected&&(E=null,Pe.clear(),Ie()),E)return E;let e=document.createElement(`style`);return e.setAttribute(`data-mancha`,`custom`),document.head.appendChild(e),e.sheet?(E=e.sheet,E):null}function Be(e){let t=e.match(Ae);if(!t)return null;let[,n,r,i]=t,a=ke[r];if(!a)return null;let o=i.replace(/_/g,` `);return{property:a,value:n?`-${o}`:o}}function Ve(e){let t=e.match(Oe);if(!t)return null;let[,n,r,i]=t,a=De[n];if(!a)return null;let o=Number.parseInt(i,10);if(o<0||o>100)return null;let s=null;if(r===`white`)s=`#fff`;else if(r===`black`)s=`#000`;else{let e=r.lastIndexOf(`-`);if(e>0){let t=r.substring(0,e),n=Number.parseInt(r.substring(e+1),10);s=ce[t]?.[n]??null}s||=ce[r]?.[500]??null}return s?{property:a,value:`rgb(${Se(s)} / ${o/100})`}:null}function He(e,t){let n=t?`${t.name}:${e}`:e,r=ze();if(!r)return!1;if(Pe.has(n))return!0;if(Fe(),w.has(e))return!1;let i=Re(n),a=Be(e)??Ve(e),o=a?`${a.property}: ${a.value};`:Le(e);if(!o)return w.add(e),console.warn(`No CSS rule for class: ${e}`),!1;let c=e.startsWith(`divide-`)?` > :not(:last-child)`:``,l;l=t?t.type===`pseudo`?`.${i}${c}:${t.name} { ${o} }`:t.name===`dark`?`@media (prefers-color-scheme: dark) { .${i}${c} { ${o} } }`:Ne.includes(t.name)?`@media (orientation: ${t.name}) { .${i}${c} { ${o} } }`:`@media (min-width: ${s[t.name]}px) { .${i}${c} { ${o} } }`:`.${i}${c} { ${o} }`;try{let e=r.insertRule(l,r.cssRules.length),i=r.cssRules[e];return(t?.type===`media`?i.cssRules[0]:i)?.style?.length?(Pe.add(n),!0):(r.deleteRule(e),console.warn(`Injected CSS rule had no effect: ${l}`),!1)}catch(e){return console.warn(`Failed to inject CSS rule: ${l}`,e),!1}}function O(e){return e.includes(`[`)||e.includes(`:`)||e.includes(`/`)}function Ue(e){if(!(!e||!O(e)))for(let t of e.trim().split(/\s+/)){let e=t.match(je);if(e){let[,t,n]=e,r=Me.includes(t),i=t in s,a=t===`dark`,o=Ne.includes(t);if(r||i||a||o){He(n,{type:r?`pseudo`:`media`,name:t});continue}}O(t)&&He(t)}}function We(e){if(!D())return;let t=e??document;if(t instanceof Element){let e=t.getAttribute(`class`);e&&Ue(e)}let n=t.querySelectorAll(`[class]`);for(let e of n){let t=e.getAttribute(`class`);t&&Ue(t)}}function Ge(){return D()&&document.querySelector(`style[data-mancha="utils"]`)!==null}function Ke(e){if(!Ge())return;let t=e;typeof t.querySelectorAll==`function`&&We(t)}function qe(e){!e||!O(e)||Ge()&&Ue(e)}function Je(e){let t=e.childNodes;for(let e=0;e<t.length;e++){let n=t[e];n.prev=e>0?t[e-1]:null,n.next=e<t.length-1?t[e+1]:null}}const Ye=[a`:`,a`style`,a`class`];function*k(e,t=new Set){let n=new Set,r=Array.from(e.childNodes).filter(e=>!t.has(e));for(yield e;r.length;){let e=r.shift();n.has(e)||(n.add(e),yield e),e.childNodes&&Array.from(e.childNodes).filter(e=>!t.has(e)).forEach(e=>{r.push(e)})}}function A(e,t){return e?.[t]!==void 0}function j(e,t){return typeof e?.[t]==`function`}function Xe(e){return e.replace(/-./g,e=>e[1].toUpperCase())}function M(e,t){return e.attribs?e.attribs[t]??null:e.getAttribute?.(t)??null}function Ze(e,t){return e.attribs?t in e.attribs:e.hasAttribute?.(t)??!1}function N(e,t,n=``){return M(e,n+t)||M(e,`data-${t}`)||(e.dataset?.[Xe(t)]??null)}function P(e,t,n){e.attribs?e.attribs[t]=n:e.setAttribute?.(t,n)}function F(e,t,r){e.attribs?e.attribs[t]=r:n.setPrefixedAttribute(Ye,e,t,r)}function I(e,t,n){switch(t){case`disabled`:e.disabled=n;return;case`selected`:e.selected=n;return;case`checked`:e.checked=n;return;default:e[t]=n}}function L(e,t){e.attribs?delete e.attribs[t]:e.removeAttribute?.(t)}function Qe(e,t,n,r=``){Ze(e,`${r}${t}`)?P(e,`${r}${t}`,n):Ze(e,`data-${t}`)?P(e,`data-${t}`,n):P(e,`${r}${t}`,n)}function R(e,t,n=``){L(e,`${n}${t}`),L(e,`data-${t}`)}function $e(e,t,n){if(e.attribs&&t.attribs)t.attribs[n]=e.attribs[n];else if(n.startsWith(`data-`)){let r=Xe(n.slice(5));t.dataset&&e.dataset&&(t.dataset[r]=e.dataset[r])}else{let r=e?.getAttribute?.(n);P(t,n,r||``)}}function et(e){return A(e,`firstElementChild`)?e.firstElementChild:Array.from(e.children).find(e=>e.nodeType===1)}function z(e,...t){if(j(e,`replaceWith`)){e.replaceWith(...t);return}else{let n=e,r=n.parentNode;if(!r)return;let i=Array.from(r.childNodes).indexOf(n);n.parentNode=null,t.forEach(e=>{e.parentNode=r}),r.childNodes=[].concat(Array.from(r.childNodes).slice(0,i),t,Array.from(r.childNodes).slice(i+1)),Je(r)}}function tt(e,...t){j(e,`replaceChildren`)?e.replaceChildren(...t):(e.childNodes=t,t.forEach(t=>{t.parentNode=e}),Je(e))}function B(e,t){return j(t,`appendChild`)?e.appendChild(t):(e.childNodes.push(t),t.parentNode=e,Je(e),t)}function V(e,t){return j(t,`removeChild`)?e.removeChild(t):(tt(e,...Array.from(e.childNodes).filter(e=>e!==t)),t)}function H(e,t,n){return n?j(e,`insertBefore`)?e.insertBefore(t,n):(t.parentNode&&V(t.parentNode,t),z(n,t,n),t):B(e,t)}function nt(e,t=0){return e?e.length<=t?e:`${e.slice(0,t-1)}…`:``}function U(e,t=0){return globalThis.DocumentFragment&&e instanceof DocumentFragment?Array.from(e.childNodes).map(e=>U(e,t)).join(``):nt(e.outerHTML||e.nodeValue||String(e),t)}function rt(e){return e.includes(`/`)?e.split(`/`).slice(0,-1).join(`/`):``}function it(e){return!e.includes(`://`)&&!e.startsWith(`/`)&&!e.startsWith(`#`)&&!e.startsWith(`data:`)}var at=class e{iterable;constructor(e){this.iterable=e}filter(t){return new e(e.filterGenerator(t,this.iterable))}map(t){return new e(e.mapGenerator(t,this.iterable))}find(e){for(let t of this.iterable)if(e(t))return t}array(){return Array.from(this.iterable)}*generator(){for(let e of this.iterable)yield e}static*filterGenerator(e,t){for(let n of t)e(n)&&(yield n)}static*mapGenerator(e,t){for(let n of t)yield e(n)}static equals(e,t){let n=e[Symbol.iterator](),r=t[Symbol.iterator](),i=n.next(),a=r.next();for(;!i.done&&!a.done;){if(i.value!==a.value)return!1;i=n.next(),a=r.next()}return i.done===a.done}};let W;(function(n){n.resolveIncludes=async function(e,t){let n=e,r=n.tagName?.toLowerCase();if(![`include`,`link`].includes(r)||r===`link`&&M(n,`rel`)!==`subresource`)return;this.log(`include directive found in:
|
|
3
|
+
`,U(e,128)),this.log(`include params:`,t);let i=n.tagName.toLocaleLowerCase()===`link`?`href`:`src`,a=M(n,i);if(!a)throw Error(`"${i}" attribute missing from ${U(e,128)}.`);let o=[];r===`include`&&o.push(`src`),r===`link`&&o.push(`rel`,`href`);let s=t=>{let r=et(t);for(let e of Array.from(n.attributes))r&&!o.includes(e.name)&&$e(n,r,e.name);z(e,...t.childNodes)},c={...t,rootDocument:!1,maxdepth:(t?.maxdepth??100)-1};if(c.maxdepth===0)throw Error(`Maximum recursion depth reached.`);if(a.includes(`://`)||a.startsWith(`//`))this.log(`Including remote file from absolute path:`,a),await this.preprocessRemote(a,c).then(s);else if(t?.dirpath?.includes(`://`)||t?.dirpath?.startsWith(`//`)){let e=a.startsWith(`/`)?a:`${t.dirpath}/${a}`;this.log(`Including remote file from relative path:`,e),await this.preprocessRemote(e,c).then(s)}else if(a.charAt(0)===`/`)this.log(`Including local file from absolute path:`,a),await this.preprocessLocal(a,c).then(s);else{let e=t?.dirpath&&t?.dirpath!==`.`?`${t?.dirpath}/${a}`:a;this.log(`Including local file from relative path:`,e),await this.preprocessLocal(e,c).then(s)}},n.rebaseRelativePaths=function(n,r){let i=n,a=i.tagName?.toLowerCase();if(!r?.dirpath)return;let o=M(i,`src`),s=M(i,`href`),c=N(i,`render`,`:`),l=o||s||c;if(!l||!it(l))return;let u=`${r.dirpath}/${l}`;this.log(`Rebasing relative path as:`,u),c?Qe(i,`render`,u,`:`):A(i,`attribs`)?F(i,o?`src`:`href`,u):a===`img`?i.src=u:a===`a`?e.setHref(i,u):a===`source`||a===`audio`||a===`video`||a===`track`||a===`input`?i.src=u:a===`area`?t.setHref(i,u):this.log(`Unable to rebase relative path for element:`,a)},n.registerCustomElements=function(e,t){let n=e,r=n.tagName?.toLowerCase(),i=(M(n,`is`)||M(n,`alt`))?.toLowerCase();if([`template`,`div`].includes(r)&&i){if(r===`div`&&M(n,`role`)!==`template`)return;if(!this._customElements.has(i)){this.log(`Registering custom element: ${i}\n`,U(n,128));let e=n.content||n,r=Array.from(k(e));for(let e=1;e<r.length;e++)W.rebaseRelativePaths.call(this,r[e],t);this._customElements.set(i,n),n?.parentNode&&V(n.parentNode,n)}}},n.resolveCustomElements=function(e,t){let n=e,r=n.tagName?.toLowerCase(),i=r;if(i===`div`&&(i=M(n,`role`)?.toLowerCase()||i),i&&this._customElements.has(i)){this.log(`Processing custom element: ${i}\n`,U(n,128));let t=this._customElements.get(i),a=(t.content||t).cloneNode(!0),o=et(a);if(o)for(let e of Array.from(n.attributes))(r!==`div`||e.name!==`role`)&&$e(n,o,e.name);let s=new at(k(a)).find(e=>e.tagName?.toLowerCase()===`slot`);s&&z(s,...n.childNodes),z(e,...a.childNodes)}},n.resolveTextNodeExpressions=function(e,t){let n=e.nodeValue||``;if(e.nodeType!==3||!n?.trim())return;this.log(`Processing node content value:
|
|
4
|
+
`,nt(n,128));let r=new RegExp(/{{ ([^}]+) }}/gm),i=Array.from(n.matchAll(r)).map(e=>e[1]);return this.effect(function(){let t=n;for(let n of i){let r=this.eval(n,{$elem:e});t=t.replace(`{{ ${n} }}`,r==null?``:String(r))}e.nodeValue=t},{directive:`text`,element:e.parentElement??void 0,expression:i.join(`, `)})},n.resolveDataAttribute=async function(e,t){if(this._skipNodes.has(e))return;let n=e,r=N(n,`data`,`:`);if(r){this.log(`:data attribute found in:
|
|
5
|
+
`,U(e,128)),R(n,`data`,`:`);let i;A(e,`renderer`)?(i=e.renderer,this.log(`Reusing existing subrenderer for node:`,U(e,64))):(i=this.subrenderer(),I(e,`renderer`,i),this.log(`Created and attached new subrenderer for node:`,U(e,64)));let a=i.eval(r,{$elem:e});if(await Promise.all(Object.entries(a).map(([e,t])=>e.startsWith(`$$`)?(i._store.get(`$rootRenderer`)||i).set(e,t):i.set(e,t,!0))),i===this)return;for(let t of k(e,this._skipNodes))this._skipNodes.add(t);await i.mount(e,t)}},n.resolveClassAttribute=function(e,t){if(this._skipNodes.has(e))return;let n=e,r=N(n,`class`,`:`);if(r){this.log(`:class attribute found in:
|
|
6
|
+
`,U(e,128)),R(n,`class`,`:`);let t=M(n,`class`)||``;return this.effect(function(){let i=this.eval(r,{$elem:e}),a=(i?`${t} ${i}`:t).trim();F(n,`class`,a),qe(a)},{directive:`class`,element:n,expression:r})}},n.resolveTextAttributes=function(e,t){if(this._skipNodes.has(e))return;let n=e,r=N(n,`text`,`:`);if(r){this.log(`:text attribute found in:
|
|
7
|
+
`,U(e,128)),R(n,`text`,`:`);let t=t=>this.textContent(e,t),i=this.effect(function(){let n=this.eval(r,{$elem:e});t(n==null?``:String(n))},{directive:`:text`,element:n,expression:r});for(let e of Array.from(n.childNodes||[]))this._skipNodes.add(e);return i}},n.resolveHtmlAttribute=async function(e,t){if(this._skipNodes.has(e))return;let n=e,r=N(n,`html`,`:`);if(r){this.log(`:html attribute found in:
|
|
8
|
+
`,U(e,128)),R(n,`html`,`:`);let i=null,a=[];return this.effect(function(){let o=this.eval(r,{$elem:e});return new Promise(e=>{(async()=>{i&&=(i.dispose(),null);let r=this.subrenderer();i=r;let s=await r.preprocessString(o,t);await r.renderNode(s);for(let e of a)this._skipNodes.delete(e);tt(n,s),a=Array.from(n.childNodes||[]);for(let e of a)this._skipNodes.add(e);Ke(n),r._store.set(`$rootNode`,n),e()})()})},{directive:`:html`,element:n,expression:r})}},n.resolveEventAttributes=function(e,t){if(this._skipNodes.has(e))return;let n=e;for(let t of Array.from(n.attributes||[]))if(t.name.startsWith(`:on:`)||t.name.startsWith(`data-on-`)){let r=``,i=[];if(t.name.startsWith(`:on:`)?[r,...i]=t.name.substring(4).split(`.`):t.name.startsWith(`data-on-`)&&([r,...i]=t.name.substring(8).split(`.`)),!r)throw Error(`Invalid event attribute: ${t.name}`);this.log(t.name,`attribute found in:
|
|
9
|
+
`,U(e,128)),R(n,t.name);let a=r===`submit`&&n.tagName.toUpperCase()===`FORM`;e.addEventListener?.(r,n=>((i.includes(`prevent`)||a)&&n.preventDefault(),this.eval(t.value,{$elem:e,$event:n})))}},n.resolveForAttribute=async function(e,t){if(this._skipNodes.has(e))return;let n=e,r=N(n,`for`,`:`)?.trim();if(r){this.log(`:for attribute found in:
|
|
10
|
+
`,U(e,128)),R(n,`for`,`:`);let i=N(n,`key`,`:`);i&&R(n,`key`,`:`);for(let t of k(e,this._skipNodes))this._skipNodes.add(t);let a=e.parentNode;if(!a)return;this.cloakElement(n);let o=this.createElement(`template`,e.ownerDocument);H(a,o,e),V(a,e),`content`in o?B(o.content,e):B(o,e),this.log(`:for template:
|
|
11
|
+
`,U(o,128));let s=r.split(` in `,2);if(s.length!==2)throw Error(`Invalid :for format: \`${r}\`. Expected "{key} in {expression}".`);let c=i?N(n,`data`,`:`):null,l=new Map,u=[],d=[],[f,p]=s;await this.effect(function(){let n=this.eval(p,{$elem:e});if(this.log(`:for list items:`,n),!Array.isArray(n)){console.error(`Expression did not yield a list: \`${p}\` => \`${n}\``);return}let r=o.parentNode;if(r)if(i){let a=new Set,s=new Map,u=[],d=o.nextSibling;for(let o=0;o<n.length;o++){let p=n[o],m=this.eval(i,{[f]:p,$index:o});a.has(m)&&console.warn(`:for duplicate key detected: ${m}. Using last item.`),a.add(m);let h,g,_=l.get(m);if(_){if(h=_.node,g=_.subrenderer,u.push(g.set(f,p,!0)),u.push(g.set(`$index`,o,!0)),c&&A(h,`renderer`)){let e=h.renderer,t=e.eval(c,{$elem:h});u.push(...Object.entries(t).map(([t,n])=>e.set(t,n,!0)))}h===d||h.nextSibling===d||H(r,h,d)}else{g=this.subrenderer(),g.set(f,p,!0),g.set(`$index`,o,!0);let n=e.cloneNode(!0);this.cloakElement(n),H(r,n,d),this._skipNodes.add(n),u.push(g.mount(n,t).then(()=>{this.uncloakElement(n)})),h=n,this.log(`Rendered list child:
|
|
12
|
+
`,U(n,128))}s.set(m,{node:h,subrenderer:g}),d=h.nextSibling}for(let[e,{node:t,subrenderer:n}]of l)a.has(e)||(n.dispose(),t.parentNode&&V(t.parentNode,t),this._skipNodes.delete(t));l.clear();for(let[e,t]of s)l.set(e,t);return Promise.all(u).then(()=>{})}else{d.splice(0,d.length).forEach(e=>{e.dispose()}),u.splice(0,u.length).forEach(e=>{e.parentNode&&V(e.parentNode,e),this._skipNodes.delete(e)});let i=o.nextSibling,a=[];for(let o=0;o<n.length;o++){let s=n[o],c=this.subrenderer();c.set(f,s,!0),c.set(`$index`,o,!0);let l=e.cloneNode(!0);this.cloakElement(l),H(r,l,i),u.push(l),d.push(c),this._skipNodes.add(l),a.push(c.mount(l,t).then(()=>{this.uncloakElement(l)})),this.log(`Rendered list child:
|
|
13
|
+
`,U(l,128))}return Promise.all(a).then(()=>{})}},{directive:`:for`,element:n,expression:r})}},n.resolveBindAttribute=function(e,t){if(this._skipNodes.has(e))return;let n=e,r=N(n,`bind`,`:`);if(r){this.log(`:bind attribute found in:
|
|
14
|
+
`,U(e,128));let t=M(n,`:bind:on`)?.split(`,`)||n.dataset?.bindOn?.split(`,`)||[`change`,`input`];R(n,`bind`,`:`),L(n,`:bind:on`),L(n,`data-bind-on`);let i=M(n,`type`)===`checkbox`?`checked`:`value`;!r.includes(`.`)&&!this.has(r)&&this.set(r,``);let a=this;this.effect(function(){let t=this.eval(r,{$elem:e});i===`checked`?n.checked=!!t:(n.value=t,n.value!==t&&t!=null&&a._pendingValueRetries.push(()=>{n.value=t}))},{directive:`:bind`,element:n,expression:r});let o=`${r} = $elem.${i}`;for(let n of t)e.addEventListener(n,()=>this.eval(o,{$elem:e}))}},n.resolveIfAttribute=function(e,t){if(this._skipNodes.has(e))return;let n=e,r=N(n,`if`,`:`);if(r){this.log(`:if attribute found in:
|
|
15
|
+
`,U(e,128)),R(n,`if`,`:`);let t=this.createComment(` :if placeholder `,e.ownerDocument);this.effect(function(){this.eval(r,{$elem:e})?!n.parentNode&&t.parentNode&&(z(t,n),Ke(n)):n.parentNode&&z(n,t)},{directive:`:if`,element:n,expression:r})}},n.resolveShowAttribute=function(e,t){if(this._skipNodes.has(e))return;let n=e,r=N(n,`show`,`:`);if(r){this.log(`:show attribute found in:
|
|
16
|
+
`,U(e,128)),R(n,`show`,`:`);let t=n.style?.display===`none`?``:n.style?.display??M(n,`style`)?.split(`;`)?.find(e=>e.split(`:`)[0]===`display`)?.split(`:`)?.at(1)?.trim();this.effect(function(){let i=this.eval(r,{$elem:e});n.style?n.style.display=i?t:`none`:F(n,`style`,`display: ${i?t:`none`};`)},{directive:`:show`,element:n,expression:r})}},n.resolveCustomAttribute=function(e,t){if(this._skipNodes.has(e))return;let n=e;for(let t of Array.from(n.attributes||[])){let r=`:attr:`,i=`data-attr-`;if(t.name.startsWith(r)||t.name.startsWith(i)){this.log(t.name,`attribute found in:
|
|
17
|
+
`,U(e,128)),L(n,t.name);let a=(t.name.split(r,2).at(-1)||``).split(i,2).at(-1)??``;this.effect(function(){let r=this.eval(t.value,{$elem:e});P(n,a,r),a===`class`&&qe(String(r??``))},{directive:`:attr:${a}`,element:n,expression:t.value})}}},n.resolveCustomProperty=function(e,t){if(this._skipNodes.has(e))return;let n=e;for(let t of Array.from(n.attributes||[])){let r=`:prop:`,i=`data-prop-`;if(t.name.startsWith(r)||t.name.startsWith(i)){this.log(t.name,`property found in:
|
|
18
|
+
`,U(e,128)),L(n,t.name);let a=Xe((t.name.split(r,2).at(-1)||``).split(i,2).at(-1)??``);this.effect(function(){I(n,a,this.eval(t.value,{$elem:e}))},{directive:`:prop:${a}`,element:n,expression:t.value})}}},n.stripTypes=(e,t)=>{let n=e;M(n,`:types`)&&L(n,`:types`),M(n,`data-types`)&&L(n,`data-types`)},n.resolveRenderAttribute=async function(e,t){if(this._skipNodes.has(e))return;let n=e,r=N(n,`render`,`:`);if(!r)return;this.log(`:render attribute found: ${r}`),R(n,`render`,`:`);let i;A(e,`renderer`)?(i=e.renderer,this.log(`Reusing existing subrenderer for :render:`,U(e,64))):(i=this.subrenderer(),I(n,`renderer`,i)),await i.mount(e,t);for(let t of k(e,this._skipNodes))this._skipNodes.add(t);try{let e=await import(r);typeof e.default==`function`?await e.default(n,i):e.default!==void 0&&console.warn(`Module ${r} default export is not a function`)}catch(e){console.error(`Failed to execute render init from ${r}:`,e)}}})(W||={});function ot(){return new URL(globalThis.window?.location?.href||`http://localhost/`)}function st(e){return e.substring(2)}function ct(e){return`\$\$${e}`}function lt(e){return e.keys().filter(e=>e.startsWith(`$$`))}async function ut(e,t){for(let[n,r]of t.searchParams.entries()){let t=ct(n);e.get(t)!==r&&await e.set(t,r)}}function dt(e,t,n){let r=st(t),i=!1;if(!n)e.searchParams.has(r)&&(e.searchParams.delete(r),i=!0);else{let t=String(n);e.searchParams.get(r)!==t&&(e.searchParams.set(r,t),i=!0)}return i}function ft(e,t){let n=!1;for(let r of lt(t))dt(e,r,t.get(r))&&(n=!0);n&&globalThis.window?.history?.replaceState({},``,e.toString())}function pt(e){return async()=>{let t=ot(),n=new Set;for(let[r,i]of t.searchParams.entries()){let t=ct(r);n.add(t),e.get(t)!==i&&e.set(t,i)}let r=lt(e);for(let t of r)n.has(t)||e.del(t)}}async function mt(e){let t=ot();await ut(e,t),ft(t,e),e.addKeyHandler(/^\$\$/,(e,t)=>{let n=ot();dt(n,e,t)&&globalThis.window?.history?.replaceState({},``,n.toString())}),globalThis.window?.addEventListener(`popstate`,pt(e))}
|
|
19
19
|
/*
|
|
20
20
|
* @license
|
|
21
21
|
* Portions Copyright (c) 2013, the Dart project authors.
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const ht=new Set([`this`,`typeof`]),gt=new Set([`in`]),_t=new Set([`+`,`-`,`!`,`typeof`]),vt=new Set([`=`,`+`,`-`,`*`,`/`,`%`,`^`,`==`,`!=`,`>`,`<`,`>=`,`<=`,`||`,`&&`,`??`,`&`,`===`,`!==`,`|`,`in`]),yt={"!":0,":":0,",":0,")":0,"]":0,"}":0,"?":2,"??":3,"||":4,"&&":5,"|":6,"^":7,"&":8,"!=":9,"==":9,"!==":9,"===":9,">=":10,">":10,"<=":10,"<":10,in:10,"+":11,"-":11,"%":12,"/":12,"*":12,"(":13,"[":13,".":13,"?.":13,"{":13},bt={"+":(e,t)=>e+t,"-":(e,t)=>e-t,"*":(e,t)=>e*t,"/":(e,t)=>e/t,"%":(e,t)=>e%t,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,"===":(e,t)=>e===t,"!==":(e,t)=>e!==t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"||":(e,t)=>e||t,"&&":(e,t)=>e&&t,"??":(e,t)=>e??t,"|":(e,t)=>t(e),in:(e,t)=>e in t},xt={"+":e=>e,"-":e=>-e,"!":e=>!e,typeof:e=>typeof e};var St=class{empty(){return{type:`Empty`,evaluate(e){return e},getIds(e){return e}}}literal(e){return{type:`Literal`,value:e,evaluate(e){return this.value},getIds(e){return e}}}id(e){return{type:`ID`,value:e,evaluate(e){return this.value===`this`?e:e?.[this.value]},getIds(e){return e.push(this.value),e}}}unary(e,t){let n=xt[e];return{type:`Unary`,operator:e,child:t,evaluate(e){return n(this.child.evaluate(e))},getIds(e){return this.child.getIds(e)}}}binary(e,t,n){let r=bt[t];return{type:`Binary`,operator:t,left:e,right:n,evaluate(e){if(this.operator===`=`){if(this.left.type!==`ID`&&this.left.type!==`Getter`&&this.left.type!==`Index`)throw Error(`Invalid assignment target: ${this.left}`);let t=this.right.evaluate(e),n,r;return this.left.type===`Getter`?(n=this.left.receiver.evaluate(e),r=this.left.name):this.left.type===`Index`?(n=this.left.receiver.evaluate(e),r=String(this.left.argument.evaluate(e))):this.left.type===`ID`&&(n=e,r=this.left.value),n===void 0?void 0:(n[r]=t,t)}return r(this.left.evaluate(e),this.right.evaluate(e))},getIds(e){return this.left.getIds(e),this.right.getIds(e),e}}}getter(e,t,n){return{type:`Getter`,receiver:e,name:t,optional:n,evaluate(e){let t=this.receiver.evaluate(e);if(!(this.optional&&t==null))return t?.[this.name]},getIds(e){return this.receiver.getIds(e),e}}}invoke(e,t,n,r){if(t!=null&&typeof t!=`string`)throw Error(`method not a string`);return{type:`Invoke`,receiver:e,method:t,arguments:n,optional:r,evaluate(e){let t=this.receiver.evaluate(e);if(this.optional&&t==null)return;let n=this.method?t:e?.this??e,r=this.method?t?.[this.method]:t,i=this.arguments??[],a=[];for(let t of i)if(t?.type===`SpreadElement`){let n=t.evaluate(e);n&&typeof n[Symbol.iterator]==`function`&&a.push(...n)}else a.push(t?.evaluate(e));return r?.apply?.(n,a)},getIds(e){return this.receiver.getIds(e),this.arguments?.forEach(t=>{t?.getIds(e)}),e}}}paren(e){return e}index(e,t,n){return{type:`Index`,receiver:e,argument:t,optional:n,evaluate(e){let t=this.receiver.evaluate(e);if(this.optional&&t==null)return;let n=this.argument.evaluate(e);return t?.[n]},getIds(e){return this.receiver.getIds(e),e}}}ternary(e,t,n){return{type:`Ternary`,condition:e,trueExpr:t,falseExpr:n,evaluate(e){return this.condition.evaluate(e)?this.trueExpr.evaluate(e):this.falseExpr.evaluate(e)},getIds(e){return this.condition.getIds(e),this.trueExpr.getIds(e),this.falseExpr.getIds(e),e}}}map(e){return{type:`Map`,properties:e,evaluate(t){let n={};if(e&&this.properties)for(let e of this.properties)e.type===`SpreadProperty`?Object.assign(n,e.evaluate(t)):n[e.key]=e.value.evaluate(t);return n},getIds(t){if(e&&this.properties)for(let e of this.properties)e.type===`SpreadProperty`?e.expression.getIds(t):e.value.getIds(t);return t}}}property(e,t){return{type:`Property`,key:e,value:t,evaluate(e){return this.value.evaluate(e)},getIds(e){return this.value.getIds(e)}}}list(e){return{type:`List`,items:e,evaluate(e){if(!this.items)return[];let t=[];for(let n of this.items)if(n?.type===`SpreadElement`){let r=n.evaluate(e);r&&typeof r[Symbol.iterator]==`function`&&t.push(...r)}else t.push(n?.evaluate(e));return t},getIds(e){return this.items?.forEach(t=>{t?.getIds(e)}),e}}}arrowFunction(e,t){return{type:`ArrowFunction`,params:e,body:t,evaluate(e){let t=this.params,n=this.body;return function(...r){let i=Object.fromEntries(t.map((e,t)=>[e,r[t]])),a=this??e??{},o=new Proxy(a,{set(e,t,n){return Object.hasOwn(i,t)&&(i[t]=n),e[t]=n,n},get(e,t){return Object.hasOwn(i,t)?i[t]:e[t]}});return n.evaluate(o)}},getIds(e){return this.body.getIds(e).filter(e=>!this.params.includes(e))}}}spreadProperty(e){return{type:`SpreadProperty`,expression:e,evaluate(e){return this.expression.evaluate(e)},getIds(e){return this.expression.getIds(e)}}}spreadElement(e){return{type:`SpreadElement`,expression:e,evaluate(e){return this.expression.evaluate(e)},getIds(e){return this.expression.getIds(e)}}}};
|
|
24
24
|
/*
|
|
25
25
|
* @license
|
|
26
26
|
* Portions Copyright (c) 2013, the Dart project authors.
|
|
27
27
|
*/
|
|
28
|
-
const
|
|
29
|
-
`;case`r`:return`\r`;case`t`:return` `;case`b`:return`\b`;case`f`:return`\f`;default:return t}});var kt=class{_input;_index=-1;_tokenStart=0;_next;constructor(e){this._input=e,this._advance()}nextToken(){for(;xt(this._next??-1);)this._advance(!0);if(Tt(this._next??-1))return this._tokenizeString();if(St(this._next??-1))return this._tokenizeIdentOrKeyword();if(K(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(Et(this._next??-1))return this._tokenizeOperator();if(Dt(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=G(W.STRING,Ot(this._getValue()));return this._advance(),t}_tokenizeIdentOrKeyword(){do this._advance();while(Ct(this._next??-1));let e=this._getValue();return G(wt(e)?W.KEYWORD:ft.has(e)?W.OPERATOR:W.IDENTIFIER,e,ht[e]??0)}_tokenizeNumber(){do this._advance();while(K(this._next??-1));return this._next===46?this._tokenizeDot():G(W.INTEGER,this._getValue())}_tokenizeDot(){if(this._advance(),K(this._next??-1))return this._tokenizeFraction();if(this._next===46){if(this._advance(),this._next===46)return this._advance(),this._clearValue(),G(W.SPREAD,`...`);throw Error(`Unexpected token ..`)}return this._clearValue(),G(W.DOT,`.`,13)}_tokenizeComma(){return this._advance(!0),G(W.COMMA,`,`)}_tokenizeColon(){return this._advance(!0),G(W.COLON,`:`)}_tokenizeFraction(){do this._advance();while(K(this._next??-1));return G(W.DECIMAL,this._getValue())}_tokenizeOperator(){this._advance();let e=this._getValue(2);if(bt.has(e))this._advance(),this._advance();else{if(e=this._getValue(1),e===`=>`)return this._advance(),G(W.ARROW,e);yt.has(e)&&this._advance()}return e=this._getValue(),e===`?.`?G(W.OPTIONAL_DOT,e,13):G(W.OPERATOR,e,ht[e])}_tokenizeGrouper(){let e=String.fromCharCode(this._next??0),t=G(W.GROUPER,e,ht[e]);return this._advance(!0),t}};const At=(e,t)=>new jt(e,t).parse();var jt=class{_kind;_tokenizer;_ast;_token;_value;constructor(e,t){this._tokenizer=new kt(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(W.GROUPER,`(`)){let t=this._parseArguments();e=this._ast.invoke(e,void 0,t)}else if(this._matches(W.GROUPER,`[`)){let t=this._parseIndex();e=this._ast.index(e,t)}else if(this._matches(W.DOT)||this._matches(W.OPTIONAL_DOT)){let t=this._kind===W.OPTIONAL_DOT;if(this._advance(),t&&this._matches(W.GROUPER,`[`)){let t=this._parseIndex();e=this._ast.index(e,t,!0)}else if(t&&this._matches(W.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(W.KEYWORD))break;else if(this._matches(W.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(!mt.has(t.value))throw Error(`unknown operator: ${t.value}`);this._advance();let n=this._parseUnary();for(;(this._kind===W.OPERATOR||this._kind===W.DOT||this._kind===W.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(W.KEYWORD,`typeof`)){this._advance();let e=this._parsePrecedence(this._parsePrimary(),13);return this._ast.unary(`typeof`,e)}if(this._matches(W.OPERATOR)){let e=this._value;if(this._advance(),e===`+`||e===`-`){if(this._matches(W.INTEGER))return this._parseInteger(e);if(this._matches(W.DECIMAL))return this._parseDecimal(e)}if(!e||!pt.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(W.OPERATOR,`?`);let t=this._parseExpression();this._advance(W.COLON);let n=this._parseExpression();return this._ast.ternary(e,t,n)}_parsePrimary(){switch(this._kind){case W.KEYWORD:{let e=this._value??``;if(e===`this`)return this._advance(),this._ast.id(e);throw dt.has(e)?Error(`unexpected keyword: ${e}`):Error(`unrecognized keyword: ${e}`)}case W.IDENTIFIER:return this._parseInvokeOrIdentifier();case W.STRING:return this._parseString();case W.INTEGER:return this._parseInteger();case W.DECIMAL:return this._parseDecimal();case W.GROUPER:return this._value===`(`?this._parseParenOrFunction():this._value===`{`?this._parseMap():this._value===`[`?this._parseList():void 0;case W.COLON:throw Error(`unexpected token ":"`);default:return}}_parseList(){let e=[];do{if(this._advance(),this._matches(W.GROUPER,`]`))break;if(this._matches(W.SPREAD)){this._advance();let t=this._parseExpression();t&&e.push(this._ast.spreadElement(t))}else e.push(this._parseExpression())}while(this._matches(W.COMMA));return this._advance(W.GROUPER,`]`),this._ast.list(e)}_parseMap(){let e=[];do{if(this._advance(),this._matches(W.GROUPER,`}`))break;if(this._matches(W.SPREAD)){this._advance();let t=this._parseExpression();t&&e.push(this._ast.spreadProperty(t))}else{let t=this._value??``;if((this._matches(W.STRING)||this._matches(W.IDENTIFIER))&&this._advance(),this._matches(W.COLON)){this._advance(W.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(W.COMMA));return this._advance(W.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(W.IDENTIFIER))throw Error(`expected identifier: ${this._value}`);let e=this._value;return this._advance(),this._ast.id(e??``)}_parseArguments(){if(!this._matches(W.GROUPER,`(`))return;let e=[];do{if(this._advance(),this._matches(W.GROUPER,`)`))break;if(this._matches(W.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(W.COMMA));return this._advance(W.GROUPER,`)`),e}_parseIndex(){this._advance();let e=this._parseExpression();return this._advance(W.GROUPER,`]`),e}_parseParenOrFunction(){let e=this._parseArguments();if(this._matches(W.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}};const q=Symbol(`__computed__`);function Mt(e){return typeof e==`object`&&!!e&&q in e&&e[q]===!0}const Nt=new vt,Pt=`__is_proxy__`;function Ft(e){return e instanceof Ht||e[Pt]===!0}const J=new WeakMap;function Y(e){return typeof e==`object`&&!!e}function X(e){return Y(e)?J.get(e):void 0}function It(e){return e.subscribers.size===0&&e.holders.size===0}function Lt(e,t){if(!t.has(e)){t.add(e);for(let n of Array.from(e.holders))It(n)?e.holders.delete(n):Lt(n,t);for(let t of Array.from(e.subscribers))t()}}function Rt(e){Lt(e,new Set)}function zt(e,t){X(e)?.subscribers.add(t)}function Bt(e,t){X(e)?.subscribers.delete(t)}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 Vt(e,t,n){let r=Q(e,t);r?r._store.set(t,n):e._store.set(t,n)}var Ht=class e{evalkeys=[`$elem`,`$event`];expressionCache=new Map;observers=new Map;keyHandlers=new Map;_store=new Map;_lock=Promise.resolve();_pending=new Map;_executing=new Set;_dirty=new Set;_children=new Set;_mutationCallbacks=new Map;_disposed=!1;_computedDepth=0;constructor(e){for(let[t,n]of Object.entries(e||{}))this.set(t,n)}wrapObject(e){if(e==null||Ft(e)||Object.isFrozen(e)||Object.isSealed(e))return e;let t=Object.getPrototypeOf(e);if(!(t===Object.prototype||t===null)&&!Array.isArray(e))return e;let n=J.get(e)??{subscribers:new Set,holders:new Set};J.set(e,n);let r=()=>Rt(n),i=new Proxy(e,{deleteProperty:(e,t)=>typeof t==`string`&&t in e?(delete e[t],r(),!0):!1,set:(e,t,i,a)=>{if(Reflect.get(e,t,a)===i)return!0;Y(i)&&(i=this.wrapObject(i),X(i)?.holders.add(n));let o=Reflect.set(e,t,i,a);return r(),o},get:(e,t,r)=>{if(t===Pt)return!0;let i=Reflect.get(e,t,r);if(!Y(i))return i;let a=this.wrapObject(i);return a!==i&&Reflect.set(e,t,a,r),X(a)?.holders.add(n),a}});return J.set(i,n),i}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)}tagObserversForComputed(e,t){for(let n of this.observers.values())for(let r of n)r.observer===e&&r.store===this&&(r.computedKey=t);let n=this._store.get(`$parent`);for(;n;){for(let r of n.observers.values())for(let n of r)n.observer===e&&n.store===this&&(n.computedKey=t);n=n._store.get(`$parent`)}}markDependentComputedsDirty(e){let t=Q(this,e)?.observers.get(e);if(t){for(let e of t)if(e.computedKey){let t=e.store._store.get(e.computedKey);Mt(t)&&!t.dirty&&(t.dirty=!0,e.store.markDependentComputedsDirty(e.computedKey))}}}runObservers(e){return e.filter(e=>!e.store._disposed).map(e=>e.observer.call(e.store.proxify(e.observer)))}async notify(e,t=10){let n=Q(this,e),r=Array.from(n?.observers.get(e)||[]);if(this._executing.has(e)){this._dirty.add(e);return}let i=this._pending.get(e);if(i){for(let e of r)i.entries.includes(e)||i.entries.push(e);return i.done}let a=new Promise(i=>{setTimeout(async()=>{this._pending.delete(e);try{this._executing.add(e);let t=this.runObservers(r);this._dirty.delete(e),await Promise.all(t)}finally{this._executing.delete(e),this._dirty.delete(e)&&this.notify(e,t)}let a=n?.observers.get(e);if(a)for(let e of r){let t=e.store._store.has(`$parent`),n=e.store._store.get(`$rootNode`);t&&n&&!n.isConnected&&!n.parentNode&&a.delete(e)}i()},t)});return this._pending.set(e,{done:a,entries:r}),a}get(e,t){t&&this.watch(e,t);let n=Z(this,e);if(Mt(n)){if(n.dirty){this._computedDepth++;try{let t=this.proxify(n.effectFn);n.value=n.fn.call(t,t),n.dirty=!1,n.effectFn&&this.tagObserversForComputed(n.effectFn,e),this.markDependentComputedsDirty(e)}finally{this._computedDepth--}}return n.value}return n}setupComputed(e,t){let n=this,r={[q]:!0,fn:t,dirty:!0};this._store.set(e,r);let i=function(){n._computedDepth++;try{let i=t.call(this,this);if(r.value!==i){r.value=i;let t=Q(n,e),a=Array.from(t?.observers.get(e)||[]);for(let e of a)e.observer.call(e.store.proxify(e.observer))}r.dirty=!1}finally{n._computedDepth--}};r.effectFn=i,this.effect(i,{directive:`computed`,id:e}),this.tagObserversForComputed(i,e)}mutationCallback(e){let t=this._mutationCallbacks.get(e);if(t)return t;let n=()=>{this.markDependentComputedsDirty(e),this.notify(e)};return this._mutationCallbacks.set(e,n),n}async set(e,t,n){if(Mt(t)){this.setupComputed(e,t.fn);return}if(this._store.has(e)&&t===this._store.get(e))return;let r=Z(this,e);if(Y(t)&&(t=this.wrapObject(t)),X(t)||Y(r)){let n=this.mutationCallback(e);Bt(r,n),zt(t,n)}if(n?this._store.set(e,t):Vt(this,e,t),!n){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))}this.markDependentComputedsDirty(e),await this.notify(e)}async del(e){await this.set(e,null),this._store.delete(e),this.observers.delete(e),this._mutationCallbacks.delete(e)}disposeSubtree(e){if(!e.has(this)){e.add(this),this._disposed=!0;for(let t of this._children)t.disposeSubtree(e);this._children.clear();for(let[e,t]of this._mutationCallbacks)Bt(Z(this,e),t);this._mutationCallbacks.clear();for(let e of this.observers.values())e.clear();this.observers.clear()}}dispose(){this._store.get(`$parent`)?._children.delete(this);let e=new Set;this.disposeSubtree(e);let t=this._store.get(`$parent`);for(;t;){for(let n of t.observers.values())for(let t of n)e.has(t.store)&&n.delete(t);t=t._store.get(`$parent`)}}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))}$computed(e){return{[q]:!0,fn:e,dirty:!0}}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!==Pt&&!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._computedDepth>0&&console.warn(`[mancha] Computed wrote to '${t}'. Computeds should be pure; use $effect for side effects.`),this.set(t,n)),!0)})}get $(){return this.proxify()}makeEvalFunction(e){return(t,n)=>{let r=At(e,Nt),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}`,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}};const Ut=`data-m-cloak`,Wt=`mancha-runtime-cloak`,Gt=o`[data-m-cloak]{display:none!important}`;var Kt=class e extends Ht{_debugLevel=`off`;dirpath=``;_perfData={lifecycle:{},effects:new Map};static DEBUG_LEVELS=[`off`,`lifecycle`,`effects`,`verbose`];_skipNodes=new Set;_customElements=new Map;_pendingValueRetries=[];cloakElement(e){let t=e.ownerDocument??globalThis.document;if(t?.head&&!t.getElementById(Wt)){let e=t.createElement(`style`);e.id=Wt,r.setTextContent(e,Gt),t.head.appendChild(e)}P(e,Ut,``)}uncloakElement(e){I(e,Ut)}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(`>`)}buildObserverId(e){let t=e?.directive??`unknown`,n=V(e?.expression??``,32),r=e?.element,i=e?.id??(r?r.dataset?.perfid??r.id??r.dataset?.testid??this.getNodePath(r):`unknown`);return n?`${t}:${i}:${n}`:`${t}:${i}`}recordObserverExecution(e,t){let n=this.buildObserverId(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){let n=this;function r(){if(!n.shouldLog(`lifecycle`))return e.call(this);let r=performance.now(),i=e.call(this),a=performance.now()-r;return t&&n.recordObserverExecution(t,a),a>16&&console.warn(`[mancha] Slow observer (${a.toFixed(1)}ms):`,n.buildObserverId(t)),n.shouldLog(`effects`)&&console.debug(`[mancha] Observer (${a.toFixed(2)}ms):`,n.buildObserverId(t)),i}return super.effect(r,t)}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:
|
|
30
|
-
`,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
|
|
31
|
-
`,
|
|
32
|
-
`,
|
|
28
|
+
const Ct=new Set([`==`,`!=`,`<=`,`>=`,`||`,`&&`,`??`,`?.`]),wt=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}),Tt=e=>e===9||e===10||e===13||e===32,Et=e=>{if(e===95||e===36)return!0;let t=e&-33;return 65<=t&&t<=90},Dt=e=>Et(e)||q(e),Ot=e=>ht.has(e),kt=e=>e===34||e===39,q=e=>48<=e&&e<=57,At=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,jt=e=>e===40||e===41||e===91||e===93||e===123||e===125,Mt=e=>e.replace(/\\(.)/g,(e,t)=>{switch(t){case`n`:return`
|
|
29
|
+
`;case`r`:return`\r`;case`t`:return` `;case`b`:return`\b`;case`f`:return`\f`;default:return t}});var Nt=class{_input;_index=-1;_tokenStart=0;_next;constructor(e){this._input=e,this._advance()}nextToken(){for(;Tt(this._next??-1);)this._advance(!0);if(kt(this._next??-1))return this._tokenizeString();if(Et(this._next??-1))return this._tokenizeIdentOrKeyword();if(q(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(At(this._next??-1))return this._tokenizeOperator();if(jt(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,Mt(this._getValue()));return this._advance(),t}_tokenizeIdentOrKeyword(){do this._advance();while(Dt(this._next??-1));let e=this._getValue();return K(Ot(e)?G.KEYWORD:gt.has(e)?G.OPERATOR:G.IDENTIFIER,e,yt[e]??0)}_tokenizeNumber(){do this._advance();while(q(this._next??-1));return this._next===46?this._tokenizeDot():K(G.INTEGER,this._getValue())}_tokenizeDot(){if(this._advance(),q(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(q(this._next??-1));return K(G.DECIMAL,this._getValue())}_tokenizeOperator(){this._advance();let e=this._getValue(2);if(wt.has(e))this._advance(),this._advance();else{if(e=this._getValue(1),e===`=>`)return this._advance(),K(G.ARROW,e);Ct.has(e)&&this._advance()}return e=this._getValue(),e===`?.`?K(G.OPTIONAL_DOT,e,13):K(G.OPERATOR,e,yt[e])}_tokenizeGrouper(){let e=String.fromCharCode(this._next??0),t=K(G.GROUPER,e,yt[e]);return this._advance(!0),t}};const Pt=(e,t)=>new Ft(e,t).parse();var Ft=class{_kind;_tokenizer;_ast;_token;_value;constructor(e,t){this._tokenizer=new Nt(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(!vt.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||!_t.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 ht.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}};const J=Symbol(`__computed__`);function It(e){return typeof e==`object`&&!!e&&J in e&&e[J]===!0}const Lt=new St,Rt=`__is_proxy__`;function zt(e){return e instanceof Kt||e[Rt]===!0}const Y=new WeakMap;function X(e){return typeof e==`object`&&!!e}function Z(e){return X(e)?Y.get(e):void 0}function Bt(e){return e.subscribers.size===0&&e.holders.size===0}function Vt(e,t){if(!t.has(e)){t.add(e);for(let n of Array.from(e.holders))Bt(n)?e.holders.delete(n):Vt(n,t);for(let t of Array.from(e.subscribers))t()}}function Ht(e){Vt(e,new Set)}function Ut(e,t){Z(e)?.subscribers.add(t)}function Wt(e,t){Z(e)?.subscribers.delete(t)}function Q(e,t){let n=e?._store;if(n?.has(t))return n.get(t);if(n?.has(`$parent`))return Q(n.get(`$parent`),t)}function $(e,t){let n=e?._store;return n?.has(t)?e:n?.has(`$parent`)?$(n.get(`$parent`),t):null}function Gt(e,t,n){let r=$(e,t);r?r._store.set(t,n):e._store.set(t,n)}var Kt=class e{evalkeys=[`$elem`,`$event`];expressionCache=new Map;observers=new Map;keyHandlers=new Map;_store=new Map;_lock=Promise.resolve();_pending=new Map;_executing=new Set;_dirty=new Set;_children=new Set;_mutationCallbacks=new Map;_disposed=!1;_computedDepth=0;constructor(e){for(let[t,n]of Object.entries(e||{}))this.set(t,n)}wrapObject(e){if(e==null||zt(e)||Object.isFrozen(e)||Object.isSealed(e))return e;let t=Object.getPrototypeOf(e);if(!(t===Object.prototype||t===null)&&!Array.isArray(e))return e;let n=Y.get(e)??{subscribers:new Set,holders:new Set};Y.set(e,n);let r=()=>Ht(n),i=new Proxy(e,{deleteProperty:(e,t)=>typeof t==`string`&&t in e?(delete e[t],r(),!0):!1,set:(e,t,i,a)=>{if(Reflect.get(e,t,a)===i)return!0;X(i)&&(i=this.wrapObject(i),Z(i)?.holders.add(n));let o=Reflect.set(e,t,i,a);return r(),o},get:(e,t,r)=>{if(t===Rt)return!0;let i=Reflect.get(e,t,r);if(!X(i))return i;let a=this.wrapObject(i);return a!==i&&Reflect.set(e,t,a,r),Z(a)?.holders.add(n),a}});return Y.set(i,n),i}watch(e,t){let n=$(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)}tagObserversForComputed(e,t){for(let n of this.observers.values())for(let r of n)r.observer===e&&r.store===this&&(r.computedKey=t);let n=this._store.get(`$parent`);for(;n;){for(let r of n.observers.values())for(let n of r)n.observer===e&&n.store===this&&(n.computedKey=t);n=n._store.get(`$parent`)}}markDependentComputedsDirty(e){let t=$(this,e)?.observers.get(e);if(t){for(let e of t)if(e.computedKey){let t=e.store._store.get(e.computedKey);It(t)&&!t.dirty&&(t.dirty=!0,e.store.markDependentComputedsDirty(e.computedKey))}}}runObservers(e){return e.filter(e=>!e.store._disposed).map(e=>e.observer.call(e.store.proxify(e.observer)))}async notify(e,t=10){let n=$(this,e),r=Array.from(n?.observers.get(e)||[]);if(this._executing.has(e)){this._dirty.add(e);return}let i=this._pending.get(e);if(i){for(let e of r)i.entries.includes(e)||i.entries.push(e);return i.done}let a=new Promise(i=>{setTimeout(async()=>{this._pending.delete(e);try{this._executing.add(e);let t=this.runObservers(r);this._dirty.delete(e),await Promise.all(t)}finally{this._executing.delete(e),this._dirty.delete(e)&&this.notify(e,t)}let a=n?.observers.get(e);if(a)for(let e of r){let t=e.store._store.has(`$parent`),n=e.store._store.get(`$rootNode`);t&&n&&!n.isConnected&&!n.parentNode&&a.delete(e)}i()},t)});return this._pending.set(e,{done:a,entries:r}),a}get(e,t){t&&this.watch(e,t);let n=Q(this,e);if(It(n)){if(n.dirty){this._computedDepth++;try{let t=this.proxify(n.effectFn);n.value=n.fn.call(t,t),n.dirty=!1,n.effectFn&&this.tagObserversForComputed(n.effectFn,e),this.markDependentComputedsDirty(e)}finally{this._computedDepth--}}return n.value}return n}setupComputed(e,t){let n=this,r={[J]:!0,fn:t,dirty:!0};this._store.set(e,r);let i=function(){n._computedDepth++;try{let i=t.call(this,this);if(r.value!==i){r.value=i;let t=$(n,e),a=Array.from(t?.observers.get(e)||[]);for(let e of a)e.observer.call(e.store.proxify(e.observer))}r.dirty=!1}finally{n._computedDepth--}};r.effectFn=i,this.effect(i,{directive:`computed`,id:e}),this.tagObserversForComputed(i,e)}mutationCallback(e){let t=this._mutationCallbacks.get(e);if(t)return t;let n=()=>{this.markDependentComputedsDirty(e),this.notify(e)};return this._mutationCallbacks.set(e,n),n}async set(e,t,n){if(It(t)){this.setupComputed(e,t.fn);return}if(this._store.has(e)&&t===this._store.get(e))return;let r=Q(this,e);if(X(t)&&(t=this.wrapObject(t)),Z(t)||X(r)){let n=this.mutationCallback(e);Wt(r,n),Ut(t,n)}if(n?this._store.set(e,t):Gt(this,e,t),!n){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))}this.markDependentComputedsDirty(e),await this.notify(e)}async del(e){await this.set(e,null),this._store.delete(e),this.observers.delete(e),this._mutationCallbacks.delete(e)}disposeSubtree(e){if(!e.has(this)){e.add(this),this._disposed=!0;for(let t of this._children)t.disposeSubtree(e);this._children.clear();for(let[e,t]of this._mutationCallbacks)Wt(Q(this,e),t);this._mutationCallbacks.clear();for(let e of this.observers.values())e.clear();this.observers.clear()}}dispose(){this._store.get(`$parent`)?._children.delete(this);let e=new Set;this.disposeSubtree(e);let t=this._store.get(`$parent`);for(;t;){for(let n of t.observers.values())for(let t of n)e.has(t.store)&&n.delete(t);t=t._store.get(`$parent`)}}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))}$computed(e){return{[J]:!0,fn:e,dirty:!0}}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`&&($(this,t)||Reflect.has(this,t))?!0:Reflect.has(r,t),get:(n,r,a)=>{if(typeof r==`string`){if($(this,r)){let n=this.get(r,t);return t&&n instanceof e?n.proxify(t):i(n,r,a)}if(t&&r!==Rt&&!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._computedDepth>0&&console.warn(`[mancha] Computed wrote to '${t}'. Computeds should be pure; use $effect for side effects.`),this.set(t,n)),!0)})}get $(){return this.proxify()}makeEvalFunction(e){return(t,n)=>{let r=Pt(e,Lt),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}`,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}};const qt=`data-m-cloak`,Jt=`mancha-runtime-cloak`,Yt=o`[data-m-cloak]{display:none!important}`;var Xt=class e extends Kt{_debugLevel=`off`;dirpath=``;_perfData={lifecycle:{},effects:new Map};static DEBUG_LEVELS=[`off`,`lifecycle`,`effects`,`verbose`];_skipNodes=new Set;_customElements=new Map;_pendingValueRetries=[];cloakElement(e){let t=e.ownerDocument??globalThis.document;if(t?.head&&!t.getElementById(Jt)){let e=t.createElement(`style`);e.id=Jt,r.setTextContent(e,Yt),t.head.appendChild(e)}P(e,qt,``)}uncloakElement(e){L(e,qt)}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(`>`)}buildObserverId(e){let t=e?.directive??`unknown`,n=nt(e?.expression??``,32),r=e?.element,i=e?.id??(r?r.dataset?.perfid??r.id??r.dataset?.testid??this.getNodePath(r):`unknown`);return n?`${t}:${i}:${n}`:`${t}:${i}`}recordObserverExecution(e,t){let n=this.buildObserverId(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){let n=this;function r(){if(!n.shouldLog(`lifecycle`))return e.call(this);let r=performance.now(),i=e.call(this),a=performance.now()-r;return t&&n.recordObserverExecution(t,a),a>16&&console.warn(`[mancha] Slow observer (${a.toFixed(1)}ms):`,n.buildObserverId(t)),n.shouldLog(`effects`)&&console.debug(`[mancha] Observer (${a.toFixed(2)}ms):`,n.buildObserverId(t)),i}return super.effect(r,t)}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:
|
|
30
|
+
`,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:rt(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:rt(e),rootDocument:t?.rootDocument??!e.endsWith(`.tpl.html`)})}subrenderer(){let e=new this.constructor().debug(this.debugging);return e._store.set(`$parent`,this),this._disposed||this._children.add(e),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 at(k(e,this._skipNodes)).map(async e=>{this.log(`Preprocessing node:
|
|
31
|
+
`,U(e,128)),await W.resolveIncludes.call(this,e,t),await W.rebaseRelativePaths.call(this,e,t),await W.registerCustomElements.call(this,e,t),await W.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 k(e,this._skipNodes))this.log(`Rendering node:
|
|
32
|
+
`,U(n,128)),await W.resolveForAttribute.call(this,n,t),await W.resolveRenderAttribute.call(this,n,t),await W.resolveDataAttribute.call(this,n,t),await W.resolveTextAttributes.call(this,n,t),await W.resolveHtmlAttribute.call(this,n,t),await W.resolveIfAttribute.call(this,n,t),await W.resolveShowAttribute.call(this,n,t),await W.resolveClassAttribute.call(this,n,t),await W.resolveBindAttribute.call(this,n,t),await W.resolveEventAttributes.call(this,n,t),await W.resolveTextNodeExpressions.call(this,n,t),await W.resolveCustomAttribute.call(this,n,t),await W.resolveCustomProperty.call(this,n,t),await W.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},I(e,`renderer`,this),this._store.set(`$rootNode`,e),this.has(`$rootRenderer`)||this._store.set(`$rootRenderer`,this),this.get(`$rootRenderer`)===this&&await mt(this),await this.preprocessNode(e,t),await this.renderNode(e,t),Ke(e),n&&(this._perfData.lifecycle.mountTime=performance.now()-n)}};function Zt(){return i([o`*,::before,::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}`,o`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}`,o`body{margin:0;line-height:inherit}`,o`hr{height:0;color:inherit;border-top-width:1px}`,o`abbr:where([title]){text-decoration:underline dotted}`,o`b,strong{font-weight:bolder}`,o`code,kbd,samp,pre{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:1em}`,o`small{font-size:80%}`,o`sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}`,o`sub{bottom:-0.25em}`,o`sup{top:-0.5em}`,o`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}`,o`button,select{text-transform:none}`,o`button,[type='button'],[type='reset'],[type='submit']{-webkit-appearance:button;background-color:transparent;background-image:none;cursor:pointer}`,o`:-moz-focusring{outline:auto}`,o`:-moz-ui-invalid{box-shadow:none}`,o`progress{vertical-align:baseline}`,o`::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}`,o`[type='search']{-webkit-appearance:textfield;outline-offset:-2px}`,o`::-webkit-search-decoration{-webkit-appearance:none}`,o`::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}`,o`summary{display:list-item}`,o`blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}`,o`fieldset{margin:0;padding:0}`,o`legend{padding:0}`,o`ol,ul,menu{list-style:none;margin:0;padding:0}`,o`textarea{resize:vertical}`,o`::placeholder{opacity:1;color:#9ca3af}`,o`button,[role="button"]{cursor:pointer}`,o`:disabled{cursor:default;pointer-events:none;opacity:0.75}`,o`img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}`,o`img,video{max-width:100%;height:auto}`,o`[hidden]{display:none}`,o`dialog{padding:0}`,o`dialog::backdrop{background:rgba(0,0,0,0.5)}`])}function Qt(){return i([o`html{`,o`max-width: 70ch;`,o`padding: 2em 1em;`,o`margin: auto;`,o`line-height: 1.75;`,o`font-size: 1.25em;`,o`font-family: sans-serif;`,o`}`,o`h1,h2,h3,h4,h5,h6{`,o`margin: 1em 0 0.5em;`,o`}`,o`p,ul,ol{`,o`margin-bottom: 1em;`,o`color: #1d1d1d;`,o`}`])}var $t=class extends Xt{impl=`browser`;dirpath=rt(globalThis.location?.href??`http://localhost/`);parseHTML(e,t={rootDocument:!1}){if(t.rootDocument)return new DOMParser().parseFromString(e,`text/html`);{let t=document.createRange();return t.selectNodeContents(document.body),t.createContextualFragment(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 en=new $t;function tn(e){for(let t of e){t=t.trim();let e=document.createElement(`style`);switch(t){case`minimal`:r.setTextContent(e,Qt());break;case`basic`:case`custom`:continue;case`utils`:{r.setTextContent(e,Zt()),e.setAttribute(`data-mancha`,`basic`),globalThis.document.head.appendChild(e);let t=document.createElement(`style`);t.textContent=Ee(),t.setAttribute(`data-mancha`,`utils`),globalThis.document.head.appendChild(t),We(document);continue}default:console.error(`Unknown style name: "${t}"`);continue}globalThis.document.head.appendChild(e)}}const nn=`mancha-cloak`;function rn(e,t){let n=`${e.join(`, `)} { opacity: 0 !important; ${t>0?`transition: opacity ${t}ms ease-in-out !important;`:``} }`,r=document.getElementById(nn);r||(r=document.createElement(`style`),r.id=nn,document.head.appendChild(r)),r.textContent=n}function an(e){let t=!1;return async()=>{if(t)return;t=!0;let n=document.getElementById(nn);if(n){if(e!==!1){let t=n.sheet;t&&t.cssRules.length>0&&t.cssRules[0].style.setProperty(`opacity`,`1`,`important`),await new Promise(t=>setTimeout(t,e))}typeof globalThis.requestAnimationFrame==`function`&&(await new Promise(e=>globalThis.requestAnimationFrame(e)),await new Promise(e=>globalThis.requestAnimationFrame(e))),n.remove()}}}async function on(e={}){let t;document.documentElement.classList.add(`mancha-loading`);let n=e.cloak?e.cloak===!0?{}:e.cloak:void 0;if(n){let r=e.target?Array.isArray(e.target)?e.target:[e.target]:[`body`],i=n.selector&&(Array.isArray(n.selector)||typeof n.selector==`string`)?Array.isArray(n.selector)?n.selector:[n.selector]:r,a=n.duration??0;rn(i,a),t=an(a>0?a:!1)}else t=an(!1);document.readyState===`loading`&&await new Promise(e=>{window.addEventListener(`DOMContentLoaded`,()=>e(),{once:!0})});let r=e.renderer??new $t;e.css&&e.css.length>0&&tn(e.css),e.debug&&r.debug(!0),e.state&&await Promise.all(Object.entries(e.state).map(([e,t])=>r.set(e,t)));try{if(e.callback)await e.callback(r);else if(e.target){let t=Array.isArray(e.target)?e.target:[e.target];for(let n of t){let t=globalThis.document.querySelector(n);t?await r.mount(t,{cache:e.cache}):console.error(`Target element not found: "${n}"`)}}}finally{document.documentElement.classList.remove(`mancha-loading`),t&&await t()}return r}export{Xt as IRenderer,en as Mancha,$t as Renderer,Zt as basicCssRules,on as initMancha,tn as injectCss,Qt as minimalCssRules,We as scanAndInject,Ee as utilsCssRules};
|
package/dist/css_custom.d.ts
CHANGED
|
@@ -36,3 +36,5 @@ export declare function processRenderedClasses(classString: string): void;
|
|
|
36
36
|
export declare function _resetForTesting(): void;
|
|
37
37
|
/** For testing: get injected rules. */
|
|
38
38
|
export declare function _getInjectedRules(): Set<string>;
|
|
39
|
+
/** For testing: get classes cached as unresolvable. */
|
|
40
|
+
export declare function _getFailedLookups(): Set<string>;
|
package/dist/css_custom.js
CHANGED
|
@@ -6,9 +6,11 @@ const COLOR_PROPERTY_MAP = {
|
|
|
6
6
|
border: "border-color",
|
|
7
7
|
fill: "fill",
|
|
8
8
|
divide: "border-color",
|
|
9
|
+
// Rings take their color from a custom property the width utilities read.
|
|
10
|
+
ring: "--ring-color",
|
|
9
11
|
};
|
|
10
|
-
// Color opacity pattern: (text|bg|border|fill|divide)-(color)(-shade)?/(opacity)
|
|
11
|
-
const COLOR_OPACITY_PATTERN = /^(text|bg|border|fill|divide)-([\w-]+)\/(\d+)$/;
|
|
12
|
+
// Color opacity pattern: (text|bg|border|fill|divide|ring)-(color)(-shade)?/(opacity)
|
|
13
|
+
const COLOR_OPACITY_PATTERN = /^(text|bg|border|fill|divide|ring)-([\w-]+)\/(\d+)$/;
|
|
12
14
|
// Property prefix to CSS property mapping.
|
|
13
15
|
const PROPERTY_MAP = {
|
|
14
16
|
// Sizing.
|
|
@@ -55,7 +57,29 @@ const PSEUDO_STATES = ["hover", "focus", "disabled"];
|
|
|
55
57
|
const ORIENTATIONS = ["landscape", "portrait"];
|
|
56
58
|
// Module state.
|
|
57
59
|
const injectedRules = new Set();
|
|
60
|
+
// Classes that resolved to no declarations, keyed by base class name since
|
|
61
|
+
// resolution does not depend on the variant. Without this a class that matches
|
|
62
|
+
// nothing re-walks every rule of every sheet on each scan, forever.
|
|
63
|
+
const failedLookups = new Set();
|
|
64
|
+
// document.styleSheets.length when failedLookups was last known good. A sheet
|
|
65
|
+
// loading after the first scan can define a class that did not resolve before,
|
|
66
|
+
// so any change to the sheet list drops the negative cache. Rules added to an
|
|
67
|
+
// existing sheet in place are not detected, which no cheap check would catch.
|
|
68
|
+
let failedLookupsSheetCount = -1;
|
|
58
69
|
let styleSheet = null;
|
|
70
|
+
/** Drop the negative cache when the set of stylesheets has changed. */
|
|
71
|
+
function syncFailedLookups() {
|
|
72
|
+
const count = document.styleSheets.length;
|
|
73
|
+
if (count === failedLookupsSheetCount)
|
|
74
|
+
return;
|
|
75
|
+
failedLookups.clear();
|
|
76
|
+
failedLookupsSheetCount = count;
|
|
77
|
+
}
|
|
78
|
+
/** Forget every cached failure, so the next lookup resolves from scratch. */
|
|
79
|
+
function clearFailedLookups() {
|
|
80
|
+
failedLookups.clear();
|
|
81
|
+
failedLookupsSheetCount = -1;
|
|
82
|
+
}
|
|
59
83
|
/** Look up CSS declarations for an existing class from document stylesheets. */
|
|
60
84
|
function findRuleDeclarations(className) {
|
|
61
85
|
if (typeof document === "undefined")
|
|
@@ -103,6 +127,7 @@ function getStyleSheet() {
|
|
|
103
127
|
// The rules that lived in the removed sheet went with it, so forget them:
|
|
104
128
|
// otherwise the dedup cache would suppress re-injecting them forever.
|
|
105
129
|
injectedRules.clear();
|
|
130
|
+
clearFailedLookups();
|
|
106
131
|
}
|
|
107
132
|
if (styleSheet)
|
|
108
133
|
return styleSheet;
|
|
@@ -176,14 +201,22 @@ export function injectCustomClass(className, variant) {
|
|
|
176
201
|
// Already injected.
|
|
177
202
|
if (injectedRules.has(fullClassName))
|
|
178
203
|
return true;
|
|
204
|
+
// Known not to resolve. Checked after the injected cache so a class that was
|
|
205
|
+
// once unresolvable still short-circuits on the cheaper path once it exists.
|
|
206
|
+
syncFailedLookups();
|
|
207
|
+
if (failedLookups.has(className))
|
|
208
|
+
return false;
|
|
179
209
|
const escapedClass = escapeSelector(fullClassName);
|
|
180
210
|
// Resolve CSS declarations: try parsers, then fall back to stylesheet lookup.
|
|
181
211
|
const parsed = parseCustomValueClass(className) ?? parseColorOpacityClass(className);
|
|
182
212
|
const declarations = parsed
|
|
183
213
|
? `${parsed.property}: ${parsed.value};`
|
|
184
214
|
: findRuleDeclarations(className);
|
|
185
|
-
if (!declarations)
|
|
215
|
+
if (!declarations) {
|
|
216
|
+
failedLookups.add(className);
|
|
217
|
+
console.warn(`No CSS rule for class: ${className}`);
|
|
186
218
|
return false;
|
|
219
|
+
}
|
|
187
220
|
// Divide classes need a child selector suffix.
|
|
188
221
|
const selectorSuffix = className.startsWith("divide-") ? " > :not(:last-child)" : "";
|
|
189
222
|
// Build the rule based on variant type.
|
|
@@ -319,6 +352,7 @@ export function processRenderedClasses(classString) {
|
|
|
319
352
|
/** For testing: reset module state. */
|
|
320
353
|
export function _resetForTesting() {
|
|
321
354
|
injectedRules.clear();
|
|
355
|
+
clearFailedLookups();
|
|
322
356
|
if (styleSheet?.ownerNode) {
|
|
323
357
|
styleSheet.ownerNode.remove();
|
|
324
358
|
}
|
|
@@ -328,4 +362,8 @@ export function _resetForTesting() {
|
|
|
328
362
|
export function _getInjectedRules() {
|
|
329
363
|
return injectedRules;
|
|
330
364
|
}
|
|
365
|
+
/** For testing: get classes cached as unresolvable. */
|
|
366
|
+
export function _getFailedLookups() {
|
|
367
|
+
return failedLookups;
|
|
368
|
+
}
|
|
331
369
|
//# sourceMappingURL=css_custom.js.map
|
package/dist/css_custom.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css_custom.js","sourceRoot":"","sources":["../src/css_custom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAE/E,iDAAiD;AACjD,MAAM,kBAAkB,GAA2B;IAClD,IAAI,EAAE,OAAO;IACb,EAAE,EAAE,kBAAkB;I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AC,CAAC;AACjC,CAAC;AAED,uCAAuC;AACvC,MAAM,UAAU,gBAAgB;IAC/B,aAAa,CAAC,KAAK,EAAE,CAAC;IACtB,kBAAkB,EAAE,CAAC;IACrB,IAAI,UAAU,EAAE,SAAS,EAAE,CAAC;QAC1B,UAAU,CAAC,SAAqB,CAAC,MAAM,EAAE,CAAC;IAC5C,CAAC;IACD,UAAU,GAAG,IAAI,CAAC;AACnB,CAAC;AAED,uCAAuC;AACvC,MAAM,UAAU,iBAAiB;IAChC,OAAO,aAAa,CAAC;AACtB,CAAC;AAED,uDAAuD;AACvD,MAAM,UAAU,iBAAiB;IAChC,OAAO,aAAa,CAAC;AACtB,CAAC"}
|
package/dist/css_gen_utils.js
CHANGED
|
@@ -38,6 +38,7 @@ export const PROPS_SIZING_MINMAX = {
|
|
|
38
38
|
// Shared timing-function and duration so every transition helper animates
|
|
39
39
|
// standalone (e.g. `transition-opacity duration-300`) without needing `transition`.
|
|
40
40
|
const TRANSITION_BASE = "transition-timing-function: ease-in-out; transition-duration: var(--transition-duration, 150ms)";
|
|
41
|
+
const RING_COLOR = "var(--ring-color, rgb(59 130 246 / 0.5))";
|
|
41
42
|
export const PROPS_CUSTOM = {
|
|
42
43
|
// Based on https://tailwindcss.com.
|
|
43
44
|
// Font family.
|
|
@@ -255,13 +256,14 @@ export const PROPS_CUSTOM = {
|
|
|
255
256
|
"shadow-2xl": "box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25)",
|
|
256
257
|
"shadow-inner": "box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",
|
|
257
258
|
"shadow-none": "box-shadow: 0 0 #0000",
|
|
258
|
-
// Ring utilities for focus states.
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
"ring-
|
|
262
|
-
"ring-
|
|
263
|
-
"ring-
|
|
264
|
-
"ring-
|
|
259
|
+
// Ring utilities for focus states. The color goes through --ring-color so the
|
|
260
|
+
// generated ring-<color> classes can override it; the fallback is the default.
|
|
261
|
+
ring: `box-shadow: var(--ring-inset, ) 0 0 0 3px ${RING_COLOR}`,
|
|
262
|
+
"ring-0": `box-shadow: var(--ring-inset, ) 0 0 0 0px ${RING_COLOR}`,
|
|
263
|
+
"ring-1": `box-shadow: var(--ring-inset, ) 0 0 0 1px ${RING_COLOR}`,
|
|
264
|
+
"ring-2": `box-shadow: var(--ring-inset, ) 0 0 0 2px ${RING_COLOR}`,
|
|
265
|
+
"ring-4": `box-shadow: var(--ring-inset, ) 0 0 0 4px ${RING_COLOR}`,
|
|
266
|
+
"ring-8": `box-shadow: var(--ring-inset, ) 0 0 0 8px ${RING_COLOR}`,
|
|
265
267
|
"ring-inset": "--ring-inset: inset",
|
|
266
268
|
// Outline utilities.
|
|
267
269
|
outline: "outline-style: solid",
|
|
@@ -596,6 +598,7 @@ function colors() {
|
|
|
596
598
|
[`bg-${color}`, `background-color: ${value}`],
|
|
597
599
|
[`border-${color}`, `border-color: ${value}`],
|
|
598
600
|
[`divide-${color} > :not(:last-child)`, `border-color: ${value}`],
|
|
601
|
+
[`ring-${color}`, `--ring-color: ${value}`],
|
|
599
602
|
];
|
|
600
603
|
return wrap([
|
|
601
604
|
...colorVariants("white", "#fff"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css_gen_utils.js","sourceRoot":"","sources":["../src/css_gen_utils.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;AAC1E,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACxD,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAC;AAC7B,gBAAgB;AAChB,MAAM,QAAQ,GAAG,CAAC,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,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
|
@@ -13,35 +13,35 @@ function a(e,t){let n=r(t);n!==void 0&&(e.href=n)}let o={};var s=class{construct
|
|
|
13
13
|
* @license
|
|
14
14
|
* SPDX-License-Identifier: Apache-2.0
|
|
15
15
|
*/
|
|
16
|
-
function _(e,t){e.textContent=g(t)}let v={sm:640,md:768,lg:1024,xl:1280},ee=Object.entries(v),y=.25,b=[...Array(15)].map((e,t)=>t+1),te=[16,20,24,28,32,36,40,48,56,64],ne=[72,80,96,128,160,192,256,320,384,512],x=[...b,...te,...ne,...Object.values(v)],re=Array.from({length:20},(e,t)=>(t+1)*5),ie=[25,50,75,100,150,200,300,500,700,1e3],S={margin:`m`},ae={padding:`p`},oe={...S,...ae},se={width:`w`,height:`h`},ce={top:`top`,right:`right`,bottom:`bottom`,left:`left`},le={"min-width":`min-w`,"min-height":`min-h`,"max-width":`max-w`,"max-height":`max-h`},C=`transition-timing-function: ease-in-out; transition-duration: var(--transition-duration, 150ms)`,ue={"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; ${C}`,"transition-all":`transition-property: all; ${C}`,"transition-opacity":`transition-property: opacity; ${C}`,"transition-transform":`transition-property: transform; ${C}`,"transition-shadow":`transition-property: box-shadow; ${C}`,"transition-colors":`transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; ${C}`,"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-center":`background-position: center`,"bg-top":`background-position: top`,"bg-bottom":`background-position: bottom`,"bg-left":`background-position: left`,"bg-right":`background-position: right`,"bg-left-top":`background-position: left top`,"bg-left-bottom":`background-position: left bottom`,"bg-right-top":`background-position: right top`,"bg-right-bottom":`background-position: right bottom`,"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`},de=[`@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}`,`@keyframes ping{75%,100%{transform:scale(2);opacity:0}}`,`@keyframes pulse{0%,100%{opacity:1}50%{opacity:.5}}`],fe=`red pink purple deep-purple indigo blue light-blue cyan teal green light-green lime yellow amber orange deep-orange brown gray blue-gray`.split(` `),pe=[50,100,200,300,400,500,600,700,800,900],me=Object.fromEntries(fe.map((e,t)=>[e,Object.fromEntries(pe.map((e,n)=>{let r=(t*pe.length+n)*6;return[e,`#${`ffebeeffcdd2ef9a9ae57373ef5350f44336e53935d32f2fc62828b71c1cfce4ecf8bbd0f48fb1f06292ec407ae91e63d81b60c2185bad1457880e4ff3e5f5e1bee7ce93d8ba68c8ab47bc9c27b08e24aa7b1fa26a1b9a4a148cede7f6d1c4e9b39ddb9575cd7e57c2673ab75e35b1512da84527a0311b92e8eaf6c5cae99fa8da7986cb5c6bc03f51b53949ab303f9f2835931a237ee3f2fdbbdefb90caf964b5f642a5f52196f31e88e51976d21565c00d47a1e1f5feb3e5fc81d4fa4fc3f729b6f603a9f4039be50288d10277bd01579be0f7fab2ebf280deea4dd0e126c6da00bcd400acc10097a700838f006064e0f2f1b2dfdb80cbc44db6ac26a69a00968800897b00796b00695c004d40e8f5e9c8e6c9a5d6a781c78466bb6a4caf5043a047388e3c2e7d321b5e20f1f8e9dcedc8c5e1a5aed5819ccc658bc34a7cb342689f38558b2f33691ef9fbe7f0f4c3e6ee9cdce775d4e157cddc39c0ca33afb42b9e9d24827717fffde7fff9c4fff59dfff176ffee58ffeb3bfdd835fbc02df9a825f57f17fff8e1ffecb3ffe082ffd54fffca28ffc107ffb300ffa000ff8f00ff6f00fff3e0ffe0b2ffcc80ffb74dffa726ff9800fb8c00f57c00ef6c00e65100fbe9e7ffccbcffab91ff8a65ff7043ff5722f4511ee64a19d84315bf360cefebe9d7ccc8bcaaa4a1887f8d6e637955486d4c415d40374e342e3e2723fafafaf5f5f5eeeeeee0e0e0bdbdbd9e9e9e757575616161424242212121eceff1cfd8dcb0bec590a4ae78909c607d8b546e7a455a6437474f263238`.slice(r,r+6)}`]}))]));function w(e){return e.map(([e,t])=>`.${e} { ${t} }`)}let he=[``,`-`],T=[``],ge=[[`top`,`t`],[`bottom`,`b`],[`left`,`l`],[`right`,`r`]];function E(e,t,n){let r=(r,i)=>[`${e}${t(r)}`,n(`${e}${i}`)];return[...x.map(e=>r(`${e}`,`${e*y}rem`)),...x.map(e=>r(`${e}px`,`${e}px`)),...re.map(e=>r(`${e}\\%`,`${e}%`))]}function D(e,t=he){return w(Object.entries(e).flatMap(([e,n])=>[[`${n}-0`,`${e}: 0`],[`${n}-screen`,`${e}: 100v${e.includes(`height`)?`h`:`w`}`],[`${n}-full`,`${e}: 100%`],...t.flatMap(t=>E(t,e=>`${n}-${e}`,t=>`${e}: ${t}`)),...ee.map(([t,r])=>[`${n}-${t}`,`${e}: ${r}px`])]))}function _e(e){return w(Object.entries(e).map(([e,t])=>[`${t}-auto`,`${e}: auto`]))}function ve(e){return w(Object.entries(e).flatMap(([e,t])=>[[`${t}x-auto`,`${e}-left: auto; ${e}-right: auto;`],[`${t}y-auto`,`${e}-top: auto; ${e}-bottom: auto;`],...ge.map(([n,r])=>[`${t}${r}-auto`,`${e}-${n}: auto`])]))}function ye(e){return w(Object.entries(e).flatMap(([e,t])=>[[`${t}x-0`,`${e}-left: 0; ${e}-right: 0;`],[`${t}y-0`,`${e}-top: 0; ${e}-bottom: 0;`],...E(``,e=>`${t}x-${e}`,t=>`${e}-left: ${t}; ${e}-right: ${t};`),...E(``,e=>`${t}y-${e}`,t=>`${e}-top: ${t}; ${e}-bottom: ${t};`)]))}function be(e,t=he){return w(Object.entries(e).flatMap(([e,n])=>[[`${n}t-0`,`${e}-top: 0`],[`${n}b-0`,`${e}-bottom: 0`],[`${n}l-0`,`${e}-left: 0`],[`${n}r-0`,`${e}-right: 0`],...t.flatMap(t=>ge.flatMap(([r,i])=>E(t,e=>`${n}${i}-${e}`,t=>`${e}-${r}: ${t}`)))]))}function xe(){return w([[`border`,`border-width: 1px`],[`border-x`,`border-inline-width: 1px`],[`border-y`,`border-block-width: 1px`],...[0,...b].map(e=>[`border-${e}`,`border-width: ${e}px`]),...[0,...b].map(e=>[`border-x-${e}`,`border-inline-width: ${e}px;`]),...[0,...b].map(e=>[`border-y-${e}`,`border-block-width: ${e}px;`]),...ge.flatMap(([e,t])=>[[`border-${t}`,`border-${e}-width: 1px`],...[0,...b].map(n=>[`border-${t}-${n}`,`border-${e}-width: ${n}px`])])])}function Se(){return w(re.map(e=>[`z-${e}`,`z-index: ${e}`]))}function Ce(){return w(ie.map(e=>[`duration-${e}`,`--transition-duration: ${e}ms; transition-duration: ${e}ms`]))}function we(){return w([[`space-x-0 > *`,`margin-left: 0`],[`space-y-0 > *`,`margin-top: 0`],...x.map(e=>[`space-x-${e} > :not(:first-child)`,`margin-left: ${e*y}rem`]),...x.map(e=>[`space-y-${e} > :not(:first-child)`,`margin-top: ${e*y}rem`]),...x.map(e=>[`space-x-${e}px > :not(:first-child)`,`margin-left: ${e}px`]),...x.map(e=>[`space-y-${e}px > :not(:first-child)`,`margin-top: ${e}px`]),[`gap-0`,`gap: 0`],...x.map(e=>[`gap-${e}`,`gap: ${e*y}rem`]),...x.map(e=>[`gap-${e}px`,`gap: ${e}px`]),...x.map(e=>[`gap-x-${e}`,`column-gap: ${e*y}rem`]),...x.map(e=>[`gap-y-${e}`,`row-gap: ${e*y}rem`]),...x.map(e=>[`gap-x-${e}px`,`column-gap: ${e}px`]),...x.map(e=>[`gap-y-${e}px`,`row-gap: ${e}px`]),[`divide-x > :not(:last-child)`,`border-inline-end-width: 1px`],[`divide-y > :not(:last-child)`,`border-bottom-width: 1px`],[`divide-x-0 > :not(:last-child)`,`border-inline-end-width: 0px`],[`divide-y-0 > :not(:last-child)`,`border-bottom-width: 0px`],...[2,4,8].map(e=>[`divide-x-${e} > :not(:last-child)`,`border-inline-end-width: ${e}px`]),...[2,4,8].map(e=>[`divide-y-${e} > :not(:last-child)`,`border-bottom-width: ${e}px`]),[`divide-solid > :not(:last-child)`,`border-style: solid`],[`divide-dashed > :not(:last-child)`,`border-style: dashed`],[`divide-dotted > :not(:last-child)`,`border-style: dotted`],[`divide-none > :not(:last-child)`,`border-style: none`]])}function Te(){return w([...Array.from({length:100},(e,t)=>[`text-${t}px`,`font-size: ${t}px`]),...Array.from({length:100},(e,t)=>[`text-${String(t*y).replace(`.`,`\\.`)}rem`,`font-size: ${t*y}rem`])])}function Ee(){return w([`column`,`row`].flatMap(e=>{let t=e.slice(0,3);return[...Array.from({length:12},(e,t)=>t+1).map(n=>[`grid-${t}s-${n}`,`grid-template-${e}s: repeat(${n}, minmax(0, 1fr))`]),[`grid-${t}s-none`,`grid-template-${e}s: none`],...Array.from({length:12},(e,t)=>t+1).map(n=>[`${t}-span-${n}`,`grid-${e}: span ${n} / span ${n}`]),[`${t}-span-full`,`grid-${e}: 1 / -1`],...Array.from({length:13},(e,t)=>t+1).map(n=>[`${t}-start-${n}`,`grid-${e}-start: ${n}`]),[`${t}-start-auto`,`grid-${e}-start: auto`],...Array.from({length:13},(e,t)=>t+1).map(n=>[`${t}-end-${n}`,`grid-${e}-end: ${n}`]),[`${t}-end-auto`,`grid-${e}-end: auto`]]}))}function De(){return Object.entries(ue).map(([e,t])=>`.${e} { ${t} }`)}function Oe(e){let t=0,n=0,r=0;return e.length===4?(t=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),r=parseInt(e[3]+e[3],16)):e.length===7&&(t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16)),`${t} ${n} ${r}`}function ke(){let e=(e,t)=>[[`text-${e}`,`color: ${t}`],[`fill-${e}`,`fill: ${t}`],[`bg-${e}`,`background-color: ${t}`],[`border-${e}`,`border-color: ${t}`],[`divide-${e} > :not(:last-child)`,`border-color: ${t}`]];return w([...e(`white`,`#fff`),...e(`black`,`#000`),...e(`transparent`,`transparent`),...Object.entries(me).flatMap(([t,n])=>[...e(t,n[500]),...Object.entries(n).flatMap(([n,r])=>e(`${t}-${n}`,r))])])}function Ae(){return w([[`opacity-0`,`opacity: 0`],...re.map(e=>[`opacity-${e}`,`opacity: ${e/100}`])])}let je=null;function Me(){return je===null&&(je=[...de,...De(),...ke(),...Ae(),...Se(),...Ce(),...D(ce),...D(se,T),..._e(se),...D(S),...D(ae,T),..._e(S),...ve(S),...ye(oe),...be(S),...be(ae,T),...we(),...D(le,T),...xe(),...Te(),...Ee()].join(`
|
|
17
|
-
`)),
|
|
18
|
-
`,H(e,128)),this.log(`include params:`,t);let i=n.tagName.toLocaleLowerCase()===`link`?`href`:`src`,a=N(n,i);if(!a)throw Error(`"${i}" attribute missing from ${H(e,128)}.`);let o=[];r===`include`&&o.push(`src`),r===`link`&&o.push(`rel`,`href`);let s=t=>{let r=
|
|
19
|
-
`,
|
|
16
|
+
function _(e,t){e.textContent=g(t)}let ee={sm:640,md:768,lg:1024,xl:1280},te=Object.entries(ee),v=.25,y=[...Array(15)].map((e,t)=>t+1),ne=[16,20,24,28,32,36,40,48,56,64],re=[72,80,96,128,160,192,256,320,384,512],b=[...y,...ne,...re,...Object.values(ee)],ie=Array.from({length:20},(e,t)=>(t+1)*5),ae=[25,50,75,100,150,200,300,500,700,1e3],x={margin:`m`},oe={padding:`p`},se={...x,...oe},ce={width:`w`,height:`h`},le={top:`top`,right:`right`,bottom:`bottom`,left:`left`},ue={"min-width":`min-w`,"min-height":`min-h`,"max-width":`max-w`,"max-height":`max-h`},S=`transition-timing-function: ease-in-out; transition-duration: var(--transition-duration, 150ms)`,C=`var(--ring-color, rgb(59 130 246 / 0.5))`,de={"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 ${C}`,"ring-0":`box-shadow: var(--ring-inset, ) 0 0 0 0px ${C}`,"ring-1":`box-shadow: var(--ring-inset, ) 0 0 0 1px ${C}`,"ring-2":`box-shadow: var(--ring-inset, ) 0 0 0 2px ${C}`,"ring-4":`box-shadow: var(--ring-inset, ) 0 0 0 4px ${C}`,"ring-8":`box-shadow: var(--ring-inset, ) 0 0 0 8px ${C}`,"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; ${S}`,"transition-all":`transition-property: all; ${S}`,"transition-opacity":`transition-property: opacity; ${S}`,"transition-transform":`transition-property: transform; ${S}`,"transition-shadow":`transition-property: box-shadow; ${S}`,"transition-colors":`transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; ${S}`,"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-center":`background-position: center`,"bg-top":`background-position: top`,"bg-bottom":`background-position: bottom`,"bg-left":`background-position: left`,"bg-right":`background-position: right`,"bg-left-top":`background-position: left top`,"bg-left-bottom":`background-position: left bottom`,"bg-right-top":`background-position: right top`,"bg-right-bottom":`background-position: right bottom`,"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`},fe=[`@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}`,`@keyframes ping{75%,100%{transform:scale(2);opacity:0}}`,`@keyframes pulse{0%,100%{opacity:1}50%{opacity:.5}}`],pe=`red pink purple deep-purple indigo blue light-blue cyan teal green light-green lime yellow amber orange deep-orange brown gray blue-gray`.split(` `),me=[50,100,200,300,400,500,600,700,800,900],he=Object.fromEntries(pe.map((e,t)=>[e,Object.fromEntries(me.map((e,n)=>{let r=(t*me.length+n)*6;return[e,`#${`ffebeeffcdd2ef9a9ae57373ef5350f44336e53935d32f2fc62828b71c1cfce4ecf8bbd0f48fb1f06292ec407ae91e63d81b60c2185bad1457880e4ff3e5f5e1bee7ce93d8ba68c8ab47bc9c27b08e24aa7b1fa26a1b9a4a148cede7f6d1c4e9b39ddb9575cd7e57c2673ab75e35b1512da84527a0311b92e8eaf6c5cae99fa8da7986cb5c6bc03f51b53949ab303f9f2835931a237ee3f2fdbbdefb90caf964b5f642a5f52196f31e88e51976d21565c00d47a1e1f5feb3e5fc81d4fa4fc3f729b6f603a9f4039be50288d10277bd01579be0f7fab2ebf280deea4dd0e126c6da00bcd400acc10097a700838f006064e0f2f1b2dfdb80cbc44db6ac26a69a00968800897b00796b00695c004d40e8f5e9c8e6c9a5d6a781c78466bb6a4caf5043a047388e3c2e7d321b5e20f1f8e9dcedc8c5e1a5aed5819ccc658bc34a7cb342689f38558b2f33691ef9fbe7f0f4c3e6ee9cdce775d4e157cddc39c0ca33afb42b9e9d24827717fffde7fff9c4fff59dfff176ffee58ffeb3bfdd835fbc02df9a825f57f17fff8e1ffecb3ffe082ffd54fffca28ffc107ffb300ffa000ff8f00ff6f00fff3e0ffe0b2ffcc80ffb74dffa726ff9800fb8c00f57c00ef6c00e65100fbe9e7ffccbcffab91ff8a65ff7043ff5722f4511ee64a19d84315bf360cefebe9d7ccc8bcaaa4a1887f8d6e637955486d4c415d40374e342e3e2723fafafaf5f5f5eeeeeee0e0e0bdbdbd9e9e9e757575616161424242212121eceff1cfd8dcb0bec590a4ae78909c607d8b546e7a455a6437474f263238`.slice(r,r+6)}`]}))]));function w(e){return e.map(([e,t])=>`.${e} { ${t} }`)}let ge=[``,`-`],T=[``],_e=[[`top`,`t`],[`bottom`,`b`],[`left`,`l`],[`right`,`r`]];function E(e,t,n){let r=(r,i)=>[`${e}${t(r)}`,n(`${e}${i}`)];return[...b.map(e=>r(`${e}`,`${e*v}rem`)),...b.map(e=>r(`${e}px`,`${e}px`)),...ie.map(e=>r(`${e}\\%`,`${e}%`))]}function D(e,t=ge){return w(Object.entries(e).flatMap(([e,n])=>[[`${n}-0`,`${e}: 0`],[`${n}-screen`,`${e}: 100v${e.includes(`height`)?`h`:`w`}`],[`${n}-full`,`${e}: 100%`],...t.flatMap(t=>E(t,e=>`${n}-${e}`,t=>`${e}: ${t}`)),...te.map(([t,r])=>[`${n}-${t}`,`${e}: ${r}px`])]))}function ve(e){return w(Object.entries(e).map(([e,t])=>[`${t}-auto`,`${e}: auto`]))}function ye(e){return w(Object.entries(e).flatMap(([e,t])=>[[`${t}x-auto`,`${e}-left: auto; ${e}-right: auto;`],[`${t}y-auto`,`${e}-top: auto; ${e}-bottom: auto;`],..._e.map(([n,r])=>[`${t}${r}-auto`,`${e}-${n}: auto`])]))}function be(e){return w(Object.entries(e).flatMap(([e,t])=>[[`${t}x-0`,`${e}-left: 0; ${e}-right: 0;`],[`${t}y-0`,`${e}-top: 0; ${e}-bottom: 0;`],...E(``,e=>`${t}x-${e}`,t=>`${e}-left: ${t}; ${e}-right: ${t};`),...E(``,e=>`${t}y-${e}`,t=>`${e}-top: ${t}; ${e}-bottom: ${t};`)]))}function xe(e,t=ge){return w(Object.entries(e).flatMap(([e,n])=>[[`${n}t-0`,`${e}-top: 0`],[`${n}b-0`,`${e}-bottom: 0`],[`${n}l-0`,`${e}-left: 0`],[`${n}r-0`,`${e}-right: 0`],...t.flatMap(t=>_e.flatMap(([r,i])=>E(t,e=>`${n}${i}-${e}`,t=>`${e}-${r}: ${t}`)))]))}function Se(){return w([[`border`,`border-width: 1px`],[`border-x`,`border-inline-width: 1px`],[`border-y`,`border-block-width: 1px`],...[0,...y].map(e=>[`border-${e}`,`border-width: ${e}px`]),...[0,...y].map(e=>[`border-x-${e}`,`border-inline-width: ${e}px;`]),...[0,...y].map(e=>[`border-y-${e}`,`border-block-width: ${e}px;`]),..._e.flatMap(([e,t])=>[[`border-${t}`,`border-${e}-width: 1px`],...[0,...y].map(n=>[`border-${t}-${n}`,`border-${e}-width: ${n}px`])])])}function Ce(){return w(ie.map(e=>[`z-${e}`,`z-index: ${e}`]))}function we(){return w(ae.map(e=>[`duration-${e}`,`--transition-duration: ${e}ms; transition-duration: ${e}ms`]))}function Te(){return w([[`space-x-0 > *`,`margin-left: 0`],[`space-y-0 > *`,`margin-top: 0`],...b.map(e=>[`space-x-${e} > :not(:first-child)`,`margin-left: ${e*v}rem`]),...b.map(e=>[`space-y-${e} > :not(:first-child)`,`margin-top: ${e*v}rem`]),...b.map(e=>[`space-x-${e}px > :not(:first-child)`,`margin-left: ${e}px`]),...b.map(e=>[`space-y-${e}px > :not(:first-child)`,`margin-top: ${e}px`]),[`gap-0`,`gap: 0`],...b.map(e=>[`gap-${e}`,`gap: ${e*v}rem`]),...b.map(e=>[`gap-${e}px`,`gap: ${e}px`]),...b.map(e=>[`gap-x-${e}`,`column-gap: ${e*v}rem`]),...b.map(e=>[`gap-y-${e}`,`row-gap: ${e*v}rem`]),...b.map(e=>[`gap-x-${e}px`,`column-gap: ${e}px`]),...b.map(e=>[`gap-y-${e}px`,`row-gap: ${e}px`]),[`divide-x > :not(:last-child)`,`border-inline-end-width: 1px`],[`divide-y > :not(:last-child)`,`border-bottom-width: 1px`],[`divide-x-0 > :not(:last-child)`,`border-inline-end-width: 0px`],[`divide-y-0 > :not(:last-child)`,`border-bottom-width: 0px`],...[2,4,8].map(e=>[`divide-x-${e} > :not(:last-child)`,`border-inline-end-width: ${e}px`]),...[2,4,8].map(e=>[`divide-y-${e} > :not(:last-child)`,`border-bottom-width: ${e}px`]),[`divide-solid > :not(:last-child)`,`border-style: solid`],[`divide-dashed > :not(:last-child)`,`border-style: dashed`],[`divide-dotted > :not(:last-child)`,`border-style: dotted`],[`divide-none > :not(:last-child)`,`border-style: none`]])}function Ee(){return w([...Array.from({length:100},(e,t)=>[`text-${t}px`,`font-size: ${t}px`]),...Array.from({length:100},(e,t)=>[`text-${String(t*v).replace(`.`,`\\.`)}rem`,`font-size: ${t*v}rem`])])}function De(){return w([`column`,`row`].flatMap(e=>{let t=e.slice(0,3);return[...Array.from({length:12},(e,t)=>t+1).map(n=>[`grid-${t}s-${n}`,`grid-template-${e}s: repeat(${n}, minmax(0, 1fr))`]),[`grid-${t}s-none`,`grid-template-${e}s: none`],...Array.from({length:12},(e,t)=>t+1).map(n=>[`${t}-span-${n}`,`grid-${e}: span ${n} / span ${n}`]),[`${t}-span-full`,`grid-${e}: 1 / -1`],...Array.from({length:13},(e,t)=>t+1).map(n=>[`${t}-start-${n}`,`grid-${e}-start: ${n}`]),[`${t}-start-auto`,`grid-${e}-start: auto`],...Array.from({length:13},(e,t)=>t+1).map(n=>[`${t}-end-${n}`,`grid-${e}-end: ${n}`]),[`${t}-end-auto`,`grid-${e}-end: auto`]]}))}function Oe(){return Object.entries(de).map(([e,t])=>`.${e} { ${t} }`)}function ke(e){let t=0,n=0,r=0;return e.length===4?(t=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),r=parseInt(e[3]+e[3],16)):e.length===7&&(t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16)),`${t} ${n} ${r}`}function Ae(){let e=(e,t)=>[[`text-${e}`,`color: ${t}`],[`fill-${e}`,`fill: ${t}`],[`bg-${e}`,`background-color: ${t}`],[`border-${e}`,`border-color: ${t}`],[`divide-${e} > :not(:last-child)`,`border-color: ${t}`],[`ring-${e}`,`--ring-color: ${t}`]];return w([...e(`white`,`#fff`),...e(`black`,`#000`),...e(`transparent`,`transparent`),...Object.entries(he).flatMap(([t,n])=>[...e(t,n[500]),...Object.entries(n).flatMap(([n,r])=>e(`${t}-${n}`,r))])])}function je(){return w([[`opacity-0`,`opacity: 0`],...ie.map(e=>[`opacity-${e}`,`opacity: ${e/100}`])])}let Me=null;function Ne(){return Me===null&&(Me=[...fe,...Oe(),...Ae(),...je(),...Ce(),...we(),...D(le),...D(ce,T),...ve(ce),...D(x),...D(oe,T),...ve(x),...ye(x),...be(se),...xe(x),...xe(oe,T),...Te(),...D(ue,T),...Se(),...Ee(),...De()].join(`
|
|
17
|
+
`)),Me}let Pe={text:`color`,bg:`background-color`,border:`border-color`,fill:`fill`,divide:`border-color`,ring:`--ring-color`},Fe=/^(text|bg|border|fill|divide|ring)-([\w-]+)\/(\d+)$/,Ie={w:`width`,h:`height`,"min-w":`min-width`,"min-h":`min-height`,"max-w":`max-width`,"max-h":`max-height`,m:`margin`,mt:`margin-top`,mr:`margin-right`,mb:`margin-bottom`,ml:`margin-left`,mx:`margin-inline`,my:`margin-block`,p:`padding`,pt:`padding-top`,pr:`padding-right`,pb:`padding-bottom`,pl:`padding-left`,px:`padding-inline`,py:`padding-block`,top:`top`,right:`right`,bottom:`bottom`,left:`left`,gap:`gap`,"gap-x":`column-gap`,"gap-y":`row-gap`,text:`font-size`,z:`z-index`,bg:`background-color`,border:`border-color`},Le=/^(-?)([\w-]+)-\[(.+)\]$/,Re=/^(hover|focus|disabled|sm|md|lg|xl|dark|landscape|portrait):(.+)$/,ze=[`hover`,`focus`,`disabled`],Be=[`landscape`,`portrait`],Ve=new Set,He=new Set,Ue=-1,O=null;function We(){let e=document.styleSheets.length;e!==Ue&&(He.clear(),Ue=e)}function Ge(){He.clear(),Ue=-1}function Ke(e){if(typeof document>`u`)return null;let t=`.${Je(e)}`;for(let e of document.styleSheets)try{for(let n of e.cssRules)if(n instanceof CSSStyleRule&&n.selectorText===t)return n.style.cssText}catch{}return null}function qe(){return typeof document<`u`&&typeof CSSStyleSheet<`u`&&typeof document.createElement==`function`}function Je(e){let t=globalThis.CSS;return typeof t?.escape==`function`?t.escape(e):e.replace(/[[\]#.:>+~()'"/%,!]/g,`\\$&`)}function Ye(){if(!qe())return null;if(O&&!O.ownerNode?.isConnected&&(O=null,Ve.clear(),Ge()),O)return O;let e=document.createElement(`style`);return e.setAttribute(`data-mancha`,`custom`),document.head.appendChild(e),e.sheet?(O=e.sheet,O):null}function Xe(e){let t=e.match(Le);if(!t)return null;let[,n,r,i]=t,a=Ie[r];if(!a)return null;let o=i.replace(/_/g,` `);return{property:a,value:n?`-${o}`:o}}function Ze(e){let t=e.match(Fe);if(!t)return null;let[,n,r,i]=t,a=Pe[n];if(!a)return null;let o=Number.parseInt(i,10);if(o<0||o>100)return null;let s=null;if(r===`white`)s=`#fff`;else if(r===`black`)s=`#000`;else{let e=r.lastIndexOf(`-`);if(e>0){let t=r.substring(0,e),n=Number.parseInt(r.substring(e+1),10);s=he[t]?.[n]??null}s||=he[r]?.[500]??null}return s?{property:a,value:`rgb(${ke(s)} / ${o/100})`}:null}function Qe(e,t){let n=t?`${t.name}:${e}`:e,r=Ye();if(!r)return!1;if(Ve.has(n))return!0;if(We(),He.has(e))return!1;let i=Je(n),a=Xe(e)??Ze(e),o=a?`${a.property}: ${a.value};`:Ke(e);if(!o)return He.add(e),console.warn(`No CSS rule for class: ${e}`),!1;let s=e.startsWith(`divide-`)?` > :not(:last-child)`:``,c;c=t?t.type===`pseudo`?`.${i}${s}:${t.name} { ${o} }`:t.name===`dark`?`@media (prefers-color-scheme: dark) { .${i}${s} { ${o} } }`:Be.includes(t.name)?`@media (orientation: ${t.name}) { .${i}${s} { ${o} } }`:`@media (min-width: ${ee[t.name]}px) { .${i}${s} { ${o} } }`:`.${i}${s} { ${o} }`;try{let e=r.insertRule(c,r.cssRules.length),i=r.cssRules[e];return(t?.type===`media`?i.cssRules[0]:i)?.style?.length?(Ve.add(n),!0):(r.deleteRule(e),console.warn(`Injected CSS rule had no effect: ${c}`),!1)}catch(e){return console.warn(`Failed to inject CSS rule: ${c}`,e),!1}}function $e(e){return e.includes(`[`)||e.includes(`:`)||e.includes(`/`)}function et(e){if(!(!e||!$e(e)))for(let t of e.trim().split(/\s+/)){let e=t.match(Re);if(e){let[,t,n]=e,r=ze.includes(t),i=t in ee,a=t===`dark`,o=Be.includes(t);if(r||i||a||o){Qe(n,{type:r?`pseudo`:`media`,name:t});continue}}$e(t)&&Qe(t)}}function tt(e){if(!qe())return;let t=e??document;if(t instanceof Element){let e=t.getAttribute(`class`);e&&et(e)}let n=t.querySelectorAll(`[class]`);for(let e of n){let t=e.getAttribute(`class`);t&&et(t)}}function nt(){return qe()&&document.querySelector(`style[data-mancha="utils"]`)!==null}function rt(e){if(!nt())return;let t=e;typeof t.querySelectorAll==`function`&&tt(t)}function it(e){!e||!$e(e)||nt()&&et(e)}function at(e){return l(e[0].toLowerCase())}function k(e){let t=e[0];return h(t)}function ot(e){return h(e.map(g).join(``))}function st(e){let t=e.childNodes;for(let e=0;e<t.length;e++){let n=t[e];n.prev=e>0?t[e-1]:null,n.next=e<t.length-1?t[e+1]:null}}let ct=[at`:`,at`style`,at`class`];function*A(e,t=new Set){let n=new Set,r=Array.from(e.childNodes).filter(e=>!t.has(e));for(yield e;r.length;){let e=r.shift();n.has(e)||(n.add(e),yield e),e.childNodes&&Array.from(e.childNodes).filter(e=>!t.has(e)).forEach(e=>{r.push(e)})}}function j(e,t){return e?.[t]!==void 0}function M(e,t){return typeof e?.[t]==`function`}function lt(e){return e.replace(/-./g,e=>e[1].toUpperCase())}function N(e,t){return e.attribs?e.attribs[t]??null:e.getAttribute?.(t)??null}function ut(e,t){return e.attribs?t in e.attribs:e.hasAttribute?.(t)??!1}function P(e,t,n=``){return N(e,n+t)||N(e,`data-${t}`)||(e.dataset?.[lt(t)]??null)}function F(e,t,n){e.attribs?e.attribs[t]=n:e.setAttribute?.(t,n)}function dt(e,t,n){e.attribs?e.attribs[t]=n:f(ct,e,t,n)}function I(e,t,n){switch(t){case`disabled`:e.disabled=n;return;case`selected`:e.selected=n;return;case`checked`:e.checked=n;return;default:e[t]=n}}function L(e,t){e.attribs?delete e.attribs[t]:e.removeAttribute?.(t)}function ft(e,t,n,r=``){ut(e,`${r}${t}`)?F(e,`${r}${t}`,n):ut(e,`data-${t}`)?F(e,`data-${t}`,n):F(e,`${r}${t}`,n)}function R(e,t,n=``){L(e,`${n}${t}`),L(e,`data-${t}`)}function pt(e,t,n){if(e.attribs&&t.attribs)t.attribs[n]=e.attribs[n];else if(n.startsWith(`data-`)){let r=lt(n.slice(5));t.dataset&&e.dataset&&(t.dataset[r]=e.dataset[r])}else{let r=e?.getAttribute?.(n);F(t,n,r||``)}}function mt(e){return j(e,`firstElementChild`)?e.firstElementChild:Array.from(e.children).find(e=>e.nodeType===1)}function z(e,...t){if(M(e,`replaceWith`)){e.replaceWith(...t);return}else{let n=e,r=n.parentNode;if(!r)return;let i=Array.from(r.childNodes).indexOf(n);n.parentNode=null,t.forEach(e=>{e.parentNode=r}),r.childNodes=[].concat(Array.from(r.childNodes).slice(0,i),t,Array.from(r.childNodes).slice(i+1)),st(r)}}function ht(e,...t){M(e,`replaceChildren`)?e.replaceChildren(...t):(e.childNodes=t,t.forEach(t=>{t.parentNode=e}),st(e))}function gt(e,t){return M(t,`appendChild`)?e.appendChild(t):(e.childNodes.push(t),t.parentNode=e,st(e),t)}function B(e,t){return M(t,`removeChild`)?e.removeChild(t):(ht(e,...Array.from(e.childNodes).filter(e=>e!==t)),t)}function V(e,t,n){return n?M(e,`insertBefore`)?e.insertBefore(t,n):(t.parentNode&&B(t.parentNode,t),z(n,t,n),t):gt(e,t)}function _t(e,t=0){return e?e.length<=t?e:`${e.slice(0,t-1)}…`:``}function H(e,t=0){return globalThis.DocumentFragment&&e instanceof DocumentFragment?Array.from(e.childNodes).map(e=>H(e,t)).join(``):_t(e.outerHTML||e.nodeValue||String(e),t)}function vt(e){return e.includes(`/`)?e.split(`/`).slice(0,-1).join(`/`):``}function yt(e){return!e.includes(`://`)&&!e.startsWith(`/`)&&!e.startsWith(`#`)&&!e.startsWith(`data:`)}var bt=class e{iterable;constructor(e){this.iterable=e}filter(t){return new e(e.filterGenerator(t,this.iterable))}map(t){return new e(e.mapGenerator(t,this.iterable))}find(e){for(let t of this.iterable)if(e(t))return t}array(){return Array.from(this.iterable)}*generator(){for(let e of this.iterable)yield e}static*filterGenerator(e,t){for(let n of t)e(n)&&(yield n)}static*mapGenerator(e,t){for(let n of t)yield e(n)}static equals(e,t){let n=e[Symbol.iterator](),r=t[Symbol.iterator](),i=n.next(),a=r.next();for(;!i.done&&!a.done;){if(i.value!==a.value)return!1;i=n.next(),a=r.next()}return i.done===a.done}};let U;(function(e){e.resolveIncludes=async function(e,t){let n=e,r=n.tagName?.toLowerCase();if(![`include`,`link`].includes(r)||r===`link`&&N(n,`rel`)!==`subresource`)return;this.log(`include directive found in:
|
|
18
|
+
`,H(e,128)),this.log(`include params:`,t);let i=n.tagName.toLocaleLowerCase()===`link`?`href`:`src`,a=N(n,i);if(!a)throw Error(`"${i}" attribute missing from ${H(e,128)}.`);let o=[];r===`include`&&o.push(`src`),r===`link`&&o.push(`rel`,`href`);let s=t=>{let r=mt(t);for(let e of Array.from(n.attributes))r&&!o.includes(e.name)&&pt(n,r,e.name);z(e,...t.childNodes)},c={...t,rootDocument:!1,maxdepth:(t?.maxdepth??100)-1};if(c.maxdepth===0)throw Error(`Maximum recursion depth reached.`);if(a.includes(`://`)||a.startsWith(`//`))this.log(`Including remote file from absolute path:`,a),await this.preprocessRemote(a,c).then(s);else if(t?.dirpath?.includes(`://`)||t?.dirpath?.startsWith(`//`)){let e=a.startsWith(`/`)?a:`${t.dirpath}/${a}`;this.log(`Including remote file from relative path:`,e),await this.preprocessRemote(e,c).then(s)}else if(a.charAt(0)===`/`)this.log(`Including local file from absolute path:`,a),await this.preprocessLocal(a,c).then(s);else{let e=t?.dirpath&&t?.dirpath!==`.`?`${t?.dirpath}/${a}`:a;this.log(`Including local file from relative path:`,e),await this.preprocessLocal(e,c).then(s)}},e.rebaseRelativePaths=function(e,t){let n=e,r=n.tagName?.toLowerCase();if(!t?.dirpath)return;let o=N(n,`src`),s=N(n,`href`),c=P(n,`render`,`:`),l=o||s||c;if(!l||!yt(l))return;let u=`${t.dirpath}/${l}`;this.log(`Rebasing relative path as:`,u),c?ft(n,`render`,u,`:`):j(n,`attribs`)?dt(n,o?`src`:`href`,u):r===`img`?n.src=u:r===`a`?i(n,u):r===`source`||r===`audio`||r===`video`||r===`track`||r===`input`?n.src=u:r===`area`?a(n,u):this.log(`Unable to rebase relative path for element:`,r)},e.registerCustomElements=function(e,t){let n=e,r=n.tagName?.toLowerCase(),i=(N(n,`is`)||N(n,`alt`))?.toLowerCase();if([`template`,`div`].includes(r)&&i){if(r===`div`&&N(n,`role`)!==`template`)return;if(!this._customElements.has(i)){this.log(`Registering custom element: ${i}\n`,H(n,128));let e=n.content||n,r=Array.from(A(e));for(let e=1;e<r.length;e++)U.rebaseRelativePaths.call(this,r[e],t);this._customElements.set(i,n),n?.parentNode&&B(n.parentNode,n)}}},e.resolveCustomElements=function(e,t){let n=e,r=n.tagName?.toLowerCase(),i=r;if(i===`div`&&(i=N(n,`role`)?.toLowerCase()||i),i&&this._customElements.has(i)){this.log(`Processing custom element: ${i}\n`,H(n,128));let t=this._customElements.get(i),a=(t.content||t).cloneNode(!0),o=mt(a);if(o)for(let e of Array.from(n.attributes))(r!==`div`||e.name!==`role`)&&pt(n,o,e.name);let s=new bt(A(a)).find(e=>e.tagName?.toLowerCase()===`slot`);s&&z(s,...n.childNodes),z(e,...a.childNodes)}},e.resolveTextNodeExpressions=function(e,t){let n=e.nodeValue||``;if(e.nodeType!==3||!n?.trim())return;this.log(`Processing node content value:
|
|
19
|
+
`,_t(n,128));let r=new RegExp(/{{ ([^}]+) }}/gm),i=Array.from(n.matchAll(r)).map(e=>e[1]);return this.effect(function(){let t=n;for(let n of i){let r=this.eval(n,{$elem:e});t=t.replace(`{{ ${n} }}`,r==null?``:String(r))}e.nodeValue=t},{directive:`text`,element:e.parentElement??void 0,expression:i.join(`, `)})},e.resolveDataAttribute=async function(e,t){if(this._skipNodes.has(e))return;let n=e,r=P(n,`data`,`:`);if(r){this.log(`:data attribute found in:
|
|
20
20
|
`,H(e,128)),R(n,`data`,`:`);let i;j(e,`renderer`)?(i=e.renderer,this.log(`Reusing existing subrenderer for node:`,H(e,64))):(i=this.subrenderer(),I(e,`renderer`,i),this.log(`Created and attached new subrenderer for node:`,H(e,64)));let a=i.eval(r,{$elem:e});if(await Promise.all(Object.entries(a).map(([e,t])=>e.startsWith(`$$`)?(i._store.get(`$rootRenderer`)||i).set(e,t):i.set(e,t,!0))),i===this)return;for(let t of A(e,this._skipNodes))this._skipNodes.add(t);await i.mount(e,t)}},e.resolveClassAttribute=function(e,t){if(this._skipNodes.has(e))return;let n=e,r=P(n,`class`,`:`);if(r){this.log(`:class attribute found in:
|
|
21
|
-
`,H(e,128)),R(n,`class`,`:`);let t=N(n,`class`)||``;return this.effect(function(){let i=this.eval(r,{$elem:e}),a=(i?`${t} ${i}`:t).trim();
|
|
21
|
+
`,H(e,128)),R(n,`class`,`:`);let t=N(n,`class`)||``;return this.effect(function(){let i=this.eval(r,{$elem:e}),a=(i?`${t} ${i}`:t).trim();dt(n,`class`,a),it(a)},{directive:`class`,element:n,expression:r})}},e.resolveTextAttributes=function(e,t){if(this._skipNodes.has(e))return;let n=e,r=P(n,`text`,`:`);if(r){this.log(`:text attribute found in:
|
|
22
22
|
`,H(e,128)),R(n,`text`,`:`);let t=t=>this.textContent(e,t),i=this.effect(function(){let n=this.eval(r,{$elem:e});t(n==null?``:String(n))},{directive:`:text`,element:n,expression:r});for(let e of Array.from(n.childNodes||[]))this._skipNodes.add(e);return i}},e.resolveHtmlAttribute=async function(e,t){if(this._skipNodes.has(e))return;let n=e,r=P(n,`html`,`:`);if(r){this.log(`:html attribute found in:
|
|
23
|
-
`,H(e,128)),R(n,`html`,`:`);let i=null,a=[];return this.effect(function(){let o=this.eval(r,{$elem:e});return new Promise(e=>{(async()=>{i&&=(i.dispose(),null);let r=this.subrenderer();i=r;let s=await r.preprocessString(o,t);await r.renderNode(s);for(let e of a)this._skipNodes.delete(e);
|
|
23
|
+
`,H(e,128)),R(n,`html`,`:`);let i=null,a=[];return this.effect(function(){let o=this.eval(r,{$elem:e});return new Promise(e=>{(async()=>{i&&=(i.dispose(),null);let r=this.subrenderer();i=r;let s=await r.preprocessString(o,t);await r.renderNode(s);for(let e of a)this._skipNodes.delete(e);ht(n,s),a=Array.from(n.childNodes||[]);for(let e of a)this._skipNodes.add(e);rt(n),r._store.set(`$rootNode`,n),e()})()})},{directive:`:html`,element:n,expression:r})}},e.resolveEventAttributes=function(e,t){if(this._skipNodes.has(e))return;let n=e;for(let t of Array.from(n.attributes||[]))if(t.name.startsWith(`:on:`)||t.name.startsWith(`data-on-`)){let r=``,i=[];if(t.name.startsWith(`:on:`)?[r,...i]=t.name.substring(4).split(`.`):t.name.startsWith(`data-on-`)&&([r,...i]=t.name.substring(8).split(`.`)),!r)throw Error(`Invalid event attribute: ${t.name}`);this.log(t.name,`attribute found in:
|
|
24
24
|
`,H(e,128)),R(n,t.name);let a=r===`submit`&&n.tagName.toUpperCase()===`FORM`;e.addEventListener?.(r,n=>((i.includes(`prevent`)||a)&&n.preventDefault(),this.eval(t.value,{$elem:e,$event:n})))}},e.resolveForAttribute=async function(e,t){if(this._skipNodes.has(e))return;let n=e,r=P(n,`for`,`:`)?.trim();if(r){this.log(`:for attribute found in:
|
|
25
|
-
`,H(e,128)),R(n,`for`,`:`);let i=P(n,`key`,`:`);i&&R(n,`key`,`:`);for(let t of A(e,this._skipNodes))this._skipNodes.add(t);let a=e.parentNode;if(!a)return;this.cloakElement(n);let o=this.createElement(`template`,e.ownerDocument);V(a,o,e),B(a,e),`content`in o?
|
|
25
|
+
`,H(e,128)),R(n,`for`,`:`);let i=P(n,`key`,`:`);i&&R(n,`key`,`:`);for(let t of A(e,this._skipNodes))this._skipNodes.add(t);let a=e.parentNode;if(!a)return;this.cloakElement(n);let o=this.createElement(`template`,e.ownerDocument);V(a,o,e),B(a,e),`content`in o?gt(o.content,e):gt(o,e),this.log(`:for template:
|
|
26
26
|
`,H(o,128));let s=r.split(` in `,2);if(s.length!==2)throw Error(`Invalid :for format: \`${r}\`. Expected "{key} in {expression}".`);let c=i?P(n,`data`,`:`):null,l=new Map,u=[],d=[],[f,p]=s;await this.effect(function(){let n=this.eval(p,{$elem:e});if(this.log(`:for list items:`,n),!Array.isArray(n)){console.error(`Expression did not yield a list: \`${p}\` => \`${n}\``);return}let r=o.parentNode;if(r)if(i){let a=new Set,s=new Map,u=[],d=o.nextSibling;for(let o=0;o<n.length;o++){let p=n[o],m=this.eval(i,{[f]:p,$index:o});a.has(m)&&console.warn(`:for duplicate key detected: ${m}. Using last item.`),a.add(m);let h,g,_=l.get(m);if(_){if(h=_.node,g=_.subrenderer,u.push(g.set(f,p,!0)),u.push(g.set(`$index`,o,!0)),c&&j(h,`renderer`)){let e=h.renderer,t=e.eval(c,{$elem:h});u.push(...Object.entries(t).map(([t,n])=>e.set(t,n,!0)))}h===d||h.nextSibling===d||V(r,h,d)}else{g=this.subrenderer(),g.set(f,p,!0),g.set(`$index`,o,!0);let n=e.cloneNode(!0);this.cloakElement(n),V(r,n,d),this._skipNodes.add(n),u.push(g.mount(n,t).then(()=>{this.uncloakElement(n)})),h=n,this.log(`Rendered list child:
|
|
27
27
|
`,H(n,128))}s.set(m,{node:h,subrenderer:g}),d=h.nextSibling}for(let[e,{node:t,subrenderer:n}]of l)a.has(e)||(n.dispose(),t.parentNode&&B(t.parentNode,t),this._skipNodes.delete(t));l.clear();for(let[e,t]of s)l.set(e,t);return Promise.all(u).then(()=>{})}else{d.splice(0,d.length).forEach(e=>{e.dispose()}),u.splice(0,u.length).forEach(e=>{e.parentNode&&B(e.parentNode,e),this._skipNodes.delete(e)});let i=o.nextSibling,a=[];for(let o=0;o<n.length;o++){let s=n[o],c=this.subrenderer();c.set(f,s,!0),c.set(`$index`,o,!0);let l=e.cloneNode(!0);this.cloakElement(l),V(r,l,i),u.push(l),d.push(c),this._skipNodes.add(l),a.push(c.mount(l,t).then(()=>{this.uncloakElement(l)})),this.log(`Rendered list child:
|
|
28
28
|
`,H(l,128))}return Promise.all(a).then(()=>{})}},{directive:`:for`,element:n,expression:r})}},e.resolveBindAttribute=function(e,t){if(this._skipNodes.has(e))return;let n=e,r=P(n,`bind`,`:`);if(r){this.log(`:bind attribute found in:
|
|
29
29
|
`,H(e,128));let t=N(n,`:bind:on`)?.split(`,`)||n.dataset?.bindOn?.split(`,`)||[`change`,`input`];R(n,`bind`,`:`),L(n,`:bind:on`),L(n,`data-bind-on`);let i=N(n,`type`)===`checkbox`?`checked`:`value`;!r.includes(`.`)&&!this.has(r)&&this.set(r,``);let a=this;this.effect(function(){let t=this.eval(r,{$elem:e});i===`checked`?n.checked=!!t:(n.value=t,n.value!==t&&t!=null&&a._pendingValueRetries.push(()=>{n.value=t}))},{directive:`:bind`,element:n,expression:r});let o=`${r} = $elem.${i}`;for(let n of t)e.addEventListener(n,()=>this.eval(o,{$elem:e}))}},e.resolveIfAttribute=function(e,t){if(this._skipNodes.has(e))return;let n=e,r=P(n,`if`,`:`);if(r){this.log(`:if attribute found in:
|
|
30
|
-
`,H(e,128)),R(n,`if`,`:`);let t=this.createComment(` :if placeholder `,e.ownerDocument);this.effect(function(){this.eval(r,{$elem:e})?!n.parentNode&&t.parentNode&&(z(t,n),
|
|
31
|
-
`,H(e,128)),R(n,`show`,`:`);let t=n.style?.display===`none`?``:n.style?.display??N(n,`style`)?.split(`;`)?.find(e=>e.split(`:`)[0]===`display`)?.split(`:`)?.at(1)?.trim();this.effect(function(){let i=this.eval(r,{$elem:e});n.style?n.style.display=i?t:`none`:
|
|
32
|
-
`,H(e,128)),L(n,t.name);let a=(t.name.split(r,2).at(-1)||``).split(i,2).at(-1)??``;this.effect(function(){let r=this.eval(t.value,{$elem:e});F(n,a,r),a===`class
|
|
33
|
-
`,H(e,128)),L(n,t.name);let a=
|
|
30
|
+
`,H(e,128)),R(n,`if`,`:`);let t=this.createComment(` :if placeholder `,e.ownerDocument);this.effect(function(){this.eval(r,{$elem:e})?!n.parentNode&&t.parentNode&&(z(t,n),rt(n)):n.parentNode&&z(n,t)},{directive:`:if`,element:n,expression:r})}},e.resolveShowAttribute=function(e,t){if(this._skipNodes.has(e))return;let n=e,r=P(n,`show`,`:`);if(r){this.log(`:show attribute found in:
|
|
31
|
+
`,H(e,128)),R(n,`show`,`:`);let t=n.style?.display===`none`?``:n.style?.display??N(n,`style`)?.split(`;`)?.find(e=>e.split(`:`)[0]===`display`)?.split(`:`)?.at(1)?.trim();this.effect(function(){let i=this.eval(r,{$elem:e});n.style?n.style.display=i?t:`none`:dt(n,`style`,`display: ${i?t:`none`};`)},{directive:`:show`,element:n,expression:r})}},e.resolveCustomAttribute=function(e,t){if(this._skipNodes.has(e))return;let n=e;for(let t of Array.from(n.attributes||[])){let r=`:attr:`,i=`data-attr-`;if(t.name.startsWith(r)||t.name.startsWith(i)){this.log(t.name,`attribute found in:
|
|
32
|
+
`,H(e,128)),L(n,t.name);let a=(t.name.split(r,2).at(-1)||``).split(i,2).at(-1)??``;this.effect(function(){let r=this.eval(t.value,{$elem:e});F(n,a,r),a===`class`&&it(String(r??``))},{directive:`:attr:${a}`,element:n,expression:t.value})}}},e.resolveCustomProperty=function(e,t){if(this._skipNodes.has(e))return;let n=e;for(let t of Array.from(n.attributes||[])){let r=`:prop:`,i=`data-prop-`;if(t.name.startsWith(r)||t.name.startsWith(i)){this.log(t.name,`property found in:
|
|
33
|
+
`,H(e,128)),L(n,t.name);let a=lt((t.name.split(r,2).at(-1)||``).split(i,2).at(-1)??``);this.effect(function(){I(n,a,this.eval(t.value,{$elem:e}))},{directive:`:prop:${a}`,element:n,expression:t.value})}}},e.stripTypes=(e,t)=>{let n=e;N(n,`:types`)&&L(n,`:types`),N(n,`data-types`)&&L(n,`data-types`)},e.resolveRenderAttribute=async function(e,t){if(this._skipNodes.has(e))return;let n=e,r=P(n,`render`,`:`);if(!r)return;this.log(`:render attribute found: ${r}`),R(n,`render`,`:`);let i;j(e,`renderer`)?(i=e.renderer,this.log(`Reusing existing subrenderer for :render:`,H(e,64))):(i=this.subrenderer(),I(n,`renderer`,i)),await i.mount(e,t);for(let t of A(e,this._skipNodes))this._skipNodes.add(t);try{let e=await import(r);typeof e.default==`function`?await e.default(n,i):e.default!==void 0&&console.warn(`Module ${r} default export is not a function`)}catch(e){console.error(`Failed to execute render init from ${r}:`,e)}}})(U||={});function xt(){return new URL(globalThis.window?.location?.href||`http://localhost/`)}function St(e){return e.substring(2)}function Ct(e){return`\$\$${e}`}function wt(e){return e.keys().filter(e=>e.startsWith(`$$`))}async function Tt(e,t){for(let[n,r]of t.searchParams.entries()){let t=Ct(n);e.get(t)!==r&&await e.set(t,r)}}function Et(e,t,n){let r=St(t),i=!1;if(!n)e.searchParams.has(r)&&(e.searchParams.delete(r),i=!0);else{let t=String(n);e.searchParams.get(r)!==t&&(e.searchParams.set(r,t),i=!0)}return i}function Dt(e,t){let n=!1;for(let r of wt(t))Et(e,r,t.get(r))&&(n=!0);n&&globalThis.window?.history?.replaceState({},``,e.toString())}function Ot(e){return async()=>{let t=xt(),n=new Set;for(let[r,i]of t.searchParams.entries()){let t=Ct(r);n.add(t),e.get(t)!==i&&e.set(t,i)}let r=wt(e);for(let t of r)n.has(t)||e.del(t)}}async function kt(e){let t=xt();await Tt(e,t),Dt(t,e),e.addKeyHandler(/^\$\$/,(e,t)=>{let n=xt();Et(n,e,t)&&globalThis.window?.history?.replaceState({},``,n.toString())}),globalThis.window?.addEventListener(`popstate`,Ot(e))}
|
|
34
34
|
/*
|
|
35
35
|
* @license
|
|
36
36
|
* Portions Copyright (c) 2013, the Dart project authors.
|
|
37
37
|
*/
|
|
38
|
-
let
|
|
38
|
+
let At=new Set([`this`,`typeof`]),jt=new Set([`in`]),Mt=new Set([`+`,`-`,`!`,`typeof`]),Nt=new Set([`=`,`+`,`-`,`*`,`/`,`%`,`^`,`==`,`!=`,`>`,`<`,`>=`,`<=`,`||`,`&&`,`??`,`&`,`===`,`!==`,`|`,`in`]),Pt={"!":0,":":0,",":0,")":0,"]":0,"}":0,"?":2,"??":3,"||":4,"&&":5,"|":6,"^":7,"&":8,"!=":9,"==":9,"!==":9,"===":9,">=":10,">":10,"<=":10,"<":10,in:10,"+":11,"-":11,"%":12,"/":12,"*":12,"(":13,"[":13,".":13,"?.":13,"{":13},Ft={"+":(e,t)=>e+t,"-":(e,t)=>e-t,"*":(e,t)=>e*t,"/":(e,t)=>e/t,"%":(e,t)=>e%t,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,"===":(e,t)=>e===t,"!==":(e,t)=>e!==t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"||":(e,t)=>e||t,"&&":(e,t)=>e&&t,"??":(e,t)=>e??t,"|":(e,t)=>t(e),in:(e,t)=>e in t},It={"+":e=>e,"-":e=>-e,"!":e=>!e,typeof:e=>typeof e};var Lt=class{empty(){return{type:`Empty`,evaluate(e){return e},getIds(e){return e}}}literal(e){return{type:`Literal`,value:e,evaluate(e){return this.value},getIds(e){return e}}}id(e){return{type:`ID`,value:e,evaluate(e){return this.value===`this`?e:e?.[this.value]},getIds(e){return e.push(this.value),e}}}unary(e,t){let n=It[e];return{type:`Unary`,operator:e,child:t,evaluate(e){return n(this.child.evaluate(e))},getIds(e){return this.child.getIds(e)}}}binary(e,t,n){let r=Ft[t];return{type:`Binary`,operator:t,left:e,right:n,evaluate(e){if(this.operator===`=`){if(this.left.type!==`ID`&&this.left.type!==`Getter`&&this.left.type!==`Index`)throw Error(`Invalid assignment target: ${this.left}`);let t=this.right.evaluate(e),n,r;return this.left.type===`Getter`?(n=this.left.receiver.evaluate(e),r=this.left.name):this.left.type===`Index`?(n=this.left.receiver.evaluate(e),r=String(this.left.argument.evaluate(e))):this.left.type===`ID`&&(n=e,r=this.left.value),n===void 0?void 0:(n[r]=t,t)}return r(this.left.evaluate(e),this.right.evaluate(e))},getIds(e){return this.left.getIds(e),this.right.getIds(e),e}}}getter(e,t,n){return{type:`Getter`,receiver:e,name:t,optional:n,evaluate(e){let t=this.receiver.evaluate(e);if(!(this.optional&&t==null))return t?.[this.name]},getIds(e){return this.receiver.getIds(e),e}}}invoke(e,t,n,r){if(t!=null&&typeof t!=`string`)throw Error(`method not a string`);return{type:`Invoke`,receiver:e,method:t,arguments:n,optional:r,evaluate(e){let t=this.receiver.evaluate(e);if(this.optional&&t==null)return;let n=this.method?t:e?.this??e,r=this.method?t?.[this.method]:t,i=this.arguments??[],a=[];for(let t of i)if(t?.type===`SpreadElement`){let n=t.evaluate(e);n&&typeof n[Symbol.iterator]==`function`&&a.push(...n)}else a.push(t?.evaluate(e));return r?.apply?.(n,a)},getIds(e){return this.receiver.getIds(e),this.arguments?.forEach(t=>{t?.getIds(e)}),e}}}paren(e){return e}index(e,t,n){return{type:`Index`,receiver:e,argument:t,optional:n,evaluate(e){let t=this.receiver.evaluate(e);if(this.optional&&t==null)return;let n=this.argument.evaluate(e);return t?.[n]},getIds(e){return this.receiver.getIds(e),e}}}ternary(e,t,n){return{type:`Ternary`,condition:e,trueExpr:t,falseExpr:n,evaluate(e){return this.condition.evaluate(e)?this.trueExpr.evaluate(e):this.falseExpr.evaluate(e)},getIds(e){return this.condition.getIds(e),this.trueExpr.getIds(e),this.falseExpr.getIds(e),e}}}map(e){return{type:`Map`,properties:e,evaluate(t){let n={};if(e&&this.properties)for(let e of this.properties)e.type===`SpreadProperty`?Object.assign(n,e.evaluate(t)):n[e.key]=e.value.evaluate(t);return n},getIds(t){if(e&&this.properties)for(let e of this.properties)e.type===`SpreadProperty`?e.expression.getIds(t):e.value.getIds(t);return t}}}property(e,t){return{type:`Property`,key:e,value:t,evaluate(e){return this.value.evaluate(e)},getIds(e){return this.value.getIds(e)}}}list(e){return{type:`List`,items:e,evaluate(e){if(!this.items)return[];let t=[];for(let n of this.items)if(n?.type===`SpreadElement`){let r=n.evaluate(e);r&&typeof r[Symbol.iterator]==`function`&&t.push(...r)}else t.push(n?.evaluate(e));return t},getIds(e){return this.items?.forEach(t=>{t?.getIds(e)}),e}}}arrowFunction(e,t){return{type:`ArrowFunction`,params:e,body:t,evaluate(e){let t=this.params,n=this.body;return function(...r){let i=Object.fromEntries(t.map((e,t)=>[e,r[t]])),a=this??e??{},o=new Proxy(a,{set(e,t,n){return Object.hasOwn(i,t)&&(i[t]=n),e[t]=n,n},get(e,t){return Object.hasOwn(i,t)?i[t]:e[t]}});return n.evaluate(o)}},getIds(e){return this.body.getIds(e).filter(e=>!this.params.includes(e))}}}spreadProperty(e){return{type:`SpreadProperty`,expression:e,evaluate(e){return this.expression.evaluate(e)},getIds(e){return this.expression.getIds(e)}}}spreadElement(e){return{type:`SpreadElement`,expression:e,evaluate(e){return this.expression.evaluate(e)},getIds(e){return this.expression.getIds(e)}}}};
|
|
39
39
|
/*
|
|
40
40
|
* @license
|
|
41
41
|
* Portions Copyright (c) 2013, the Dart project authors.
|
|
42
42
|
*/
|
|
43
|
-
let
|
|
44
|
-
`;case`r`:return`\r`;case`t`:return` `;case`b`:return`\b`;case`f`:return`\f`;default:return t}});var Ut=class{_input;_index=-1;_tokenStart=0;_next;constructor(e){this._input=e,this._advance()}nextToken(){for(;Ft(this._next??-1);)this._advance(!0);if(zt(this._next??-1))return this._tokenizeString();if(It(this._next??-1))return this._tokenizeIdentOrKeyword();if(K(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(Bt(this._next??-1))return this._tokenizeOperator();if(Vt(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=G(W.STRING,Ht(this._getValue()));return this._advance(),t}_tokenizeIdentOrKeyword(){do this._advance();while(Lt(this._next??-1));let e=this._getValue();return G(Rt(e)?W.KEYWORD:Et.has(e)?W.OPERATOR:W.IDENTIFIER,e,kt[e]??0)}_tokenizeNumber(){do this._advance();while(K(this._next??-1));return this._next===46?this._tokenizeDot():G(W.INTEGER,this._getValue())}_tokenizeDot(){if(this._advance(),K(this._next??-1))return this._tokenizeFraction();if(this._next===46){if(this._advance(),this._next===46)return this._advance(),this._clearValue(),G(W.SPREAD,`...`);throw Error(`Unexpected token ..`)}return this._clearValue(),G(W.DOT,`.`,13)}_tokenizeComma(){return this._advance(!0),G(W.COMMA,`,`)}_tokenizeColon(){return this._advance(!0),G(W.COLON,`:`)}_tokenizeFraction(){do this._advance();while(K(this._next??-1));return G(W.DECIMAL,this._getValue())}_tokenizeOperator(){this._advance();let e=this._getValue(2);if(Pt.has(e))this._advance(),this._advance();else{if(e=this._getValue(1),e===`=>`)return this._advance(),G(W.ARROW,e);Nt.has(e)&&this._advance()}return e=this._getValue(),e===`?.`?G(W.OPTIONAL_DOT,e,13):G(W.OPERATOR,e,kt[e])}_tokenizeGrouper(){let e=String.fromCharCode(this._next??0),t=G(W.GROUPER,e,kt[e]);return this._advance(!0),t}};let Wt=(e,t)=>new Gt(e,t).parse();var Gt=class{_kind;_tokenizer;_ast;_token;_value;constructor(e,t){this._tokenizer=new Ut(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(W.GROUPER,`(`)){let t=this._parseArguments();e=this._ast.invoke(e,void 0,t)}else if(this._matches(W.GROUPER,`[`)){let t=this._parseIndex();e=this._ast.index(e,t)}else if(this._matches(W.DOT)||this._matches(W.OPTIONAL_DOT)){let t=this._kind===W.OPTIONAL_DOT;if(this._advance(),t&&this._matches(W.GROUPER,`[`)){let t=this._parseIndex();e=this._ast.index(e,t,!0)}else if(t&&this._matches(W.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(W.KEYWORD))break;else if(this._matches(W.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(!Ot.has(t.value))throw Error(`unknown operator: ${t.value}`);this._advance();let n=this._parseUnary();for(;(this._kind===W.OPERATOR||this._kind===W.DOT||this._kind===W.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(W.KEYWORD,`typeof`)){this._advance();let e=this._parsePrecedence(this._parsePrimary(),13);return this._ast.unary(`typeof`,e)}if(this._matches(W.OPERATOR)){let e=this._value;if(this._advance(),e===`+`||e===`-`){if(this._matches(W.INTEGER))return this._parseInteger(e);if(this._matches(W.DECIMAL))return this._parseDecimal(e)}if(!e||!Dt.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(W.OPERATOR,`?`);let t=this._parseExpression();this._advance(W.COLON);let n=this._parseExpression();return this._ast.ternary(e,t,n)}_parsePrimary(){switch(this._kind){case W.KEYWORD:{let e=this._value??``;if(e===`this`)return this._advance(),this._ast.id(e);throw Tt.has(e)?Error(`unexpected keyword: ${e}`):Error(`unrecognized keyword: ${e}`)}case W.IDENTIFIER:return this._parseInvokeOrIdentifier();case W.STRING:return this._parseString();case W.INTEGER:return this._parseInteger();case W.DECIMAL:return this._parseDecimal();case W.GROUPER:return this._value===`(`?this._parseParenOrFunction():this._value===`{`?this._parseMap():this._value===`[`?this._parseList():void 0;case W.COLON:throw Error(`unexpected token ":"`);default:return}}_parseList(){let e=[];do{if(this._advance(),this._matches(W.GROUPER,`]`))break;if(this._matches(W.SPREAD)){this._advance();let t=this._parseExpression();t&&e.push(this._ast.spreadElement(t))}else e.push(this._parseExpression())}while(this._matches(W.COMMA));return this._advance(W.GROUPER,`]`),this._ast.list(e)}_parseMap(){let e=[];do{if(this._advance(),this._matches(W.GROUPER,`}`))break;if(this._matches(W.SPREAD)){this._advance();let t=this._parseExpression();t&&e.push(this._ast.spreadProperty(t))}else{let t=this._value??``;if((this._matches(W.STRING)||this._matches(W.IDENTIFIER))&&this._advance(),this._matches(W.COLON)){this._advance(W.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(W.COMMA));return this._advance(W.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(W.IDENTIFIER))throw Error(`expected identifier: ${this._value}`);let e=this._value;return this._advance(),this._ast.id(e??``)}_parseArguments(){if(!this._matches(W.GROUPER,`(`))return;let e=[];do{if(this._advance(),this._matches(W.GROUPER,`)`))break;if(this._matches(W.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(W.COMMA));return this._advance(W.GROUPER,`)`),e}_parseIndex(){this._advance();let e=this._parseExpression();return this._advance(W.GROUPER,`]`),e}_parseParenOrFunction(){let e=this._parseArguments();if(this._matches(W.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}};let q=Symbol(`__computed__`);function Kt(e){return typeof e==`object`&&!!e&&q in e&&e[q]===!0}let qt=new Mt,Jt=`__is_proxy__`;function Yt(e){return e instanceof nn||e[Jt]===!0}let J=new WeakMap;function Y(e){return typeof e==`object`&&!!e}function X(e){return Y(e)?J.get(e):void 0}function Xt(e){return e.subscribers.size===0&&e.holders.size===0}function Zt(e,t){if(!t.has(e)){t.add(e);for(let n of Array.from(e.holders))Xt(n)?e.holders.delete(n):Zt(n,t);for(let t of Array.from(e.subscribers))t()}}function Qt(e){Zt(e,new Set)}function $t(e,t){X(e)?.subscribers.add(t)}function en(e,t){X(e)?.subscribers.delete(t)}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 tn(e,t,n){let r=Q(e,t);r?r._store.set(t,n):e._store.set(t,n)}var nn=class e{evalkeys=[`$elem`,`$event`];expressionCache=new Map;observers=new Map;keyHandlers=new Map;_store=new Map;_lock=Promise.resolve();_pending=new Map;_executing=new Set;_dirty=new Set;_children=new Set;_mutationCallbacks=new Map;_disposed=!1;_computedDepth=0;constructor(e){for(let[t,n]of Object.entries(e||{}))this.set(t,n)}wrapObject(e){if(e==null||Yt(e)||Object.isFrozen(e)||Object.isSealed(e))return e;let t=Object.getPrototypeOf(e);if(!(t===Object.prototype||t===null)&&!Array.isArray(e))return e;let n=J.get(e)??{subscribers:new Set,holders:new Set};J.set(e,n);let r=()=>Qt(n),i=new Proxy(e,{deleteProperty:(e,t)=>typeof t==`string`&&t in e?(delete e[t],r(),!0):!1,set:(e,t,i,a)=>{if(Reflect.get(e,t,a)===i)return!0;Y(i)&&(i=this.wrapObject(i),X(i)?.holders.add(n));let o=Reflect.set(e,t,i,a);return r(),o},get:(e,t,r)=>{if(t===Jt)return!0;let i=Reflect.get(e,t,r);if(!Y(i))return i;let a=this.wrapObject(i);return a!==i&&Reflect.set(e,t,a,r),X(a)?.holders.add(n),a}});return J.set(i,n),i}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)}tagObserversForComputed(e,t){for(let n of this.observers.values())for(let r of n)r.observer===e&&r.store===this&&(r.computedKey=t);let n=this._store.get(`$parent`);for(;n;){for(let r of n.observers.values())for(let n of r)n.observer===e&&n.store===this&&(n.computedKey=t);n=n._store.get(`$parent`)}}markDependentComputedsDirty(e){let t=Q(this,e)?.observers.get(e);if(t){for(let e of t)if(e.computedKey){let t=e.store._store.get(e.computedKey);Kt(t)&&!t.dirty&&(t.dirty=!0,e.store.markDependentComputedsDirty(e.computedKey))}}}runObservers(e){return e.filter(e=>!e.store._disposed).map(e=>e.observer.call(e.store.proxify(e.observer)))}async notify(e,t=10){let n=Q(this,e),r=Array.from(n?.observers.get(e)||[]);if(this._executing.has(e)){this._dirty.add(e);return}let i=this._pending.get(e);if(i){for(let e of r)i.entries.includes(e)||i.entries.push(e);return i.done}let a=new Promise(i=>{setTimeout(async()=>{this._pending.delete(e);try{this._executing.add(e);let t=this.runObservers(r);this._dirty.delete(e),await Promise.all(t)}finally{this._executing.delete(e),this._dirty.delete(e)&&this.notify(e,t)}let a=n?.observers.get(e);if(a)for(let e of r){let t=e.store._store.has(`$parent`),n=e.store._store.get(`$rootNode`);t&&n&&!n.isConnected&&!n.parentNode&&a.delete(e)}i()},t)});return this._pending.set(e,{done:a,entries:r}),a}get(e,t){t&&this.watch(e,t);let n=Z(this,e);if(Kt(n)){if(n.dirty){this._computedDepth++;try{let t=this.proxify(n.effectFn);n.value=n.fn.call(t,t),n.dirty=!1,n.effectFn&&this.tagObserversForComputed(n.effectFn,e),this.markDependentComputedsDirty(e)}finally{this._computedDepth--}}return n.value}return n}setupComputed(e,t){let n=this,r={[q]:!0,fn:t,dirty:!0};this._store.set(e,r);let i=function(){n._computedDepth++;try{let i=t.call(this,this);if(r.value!==i){r.value=i;let t=Q(n,e),a=Array.from(t?.observers.get(e)||[]);for(let e of a)e.observer.call(e.store.proxify(e.observer))}r.dirty=!1}finally{n._computedDepth--}};r.effectFn=i,this.effect(i,{directive:`computed`,id:e}),this.tagObserversForComputed(i,e)}mutationCallback(e){let t=this._mutationCallbacks.get(e);if(t)return t;let n=()=>{this.markDependentComputedsDirty(e),this.notify(e)};return this._mutationCallbacks.set(e,n),n}async set(e,t,n){if(Kt(t)){this.setupComputed(e,t.fn);return}if(this._store.has(e)&&t===this._store.get(e))return;let r=Z(this,e);if(Y(t)&&(t=this.wrapObject(t)),X(t)||Y(r)){let n=this.mutationCallback(e);en(r,n),$t(t,n)}if(n?this._store.set(e,t):tn(this,e,t),!n){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))}this.markDependentComputedsDirty(e),await this.notify(e)}async del(e){await this.set(e,null),this._store.delete(e),this.observers.delete(e),this._mutationCallbacks.delete(e)}disposeSubtree(e){if(!e.has(this)){e.add(this),this._disposed=!0;for(let t of this._children)t.disposeSubtree(e);this._children.clear();for(let[e,t]of this._mutationCallbacks)en(Z(this,e),t);this._mutationCallbacks.clear();for(let e of this.observers.values())e.clear();this.observers.clear()}}dispose(){this._store.get(`$parent`)?._children.delete(this);let e=new Set;this.disposeSubtree(e);let t=this._store.get(`$parent`);for(;t;){for(let n of t.observers.values())for(let t of n)e.has(t.store)&&n.delete(t);t=t._store.get(`$parent`)}}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))}$computed(e){return{[q]:!0,fn:e,dirty:!0}}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!==Jt&&!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._computedDepth>0&&console.warn(`[mancha] Computed wrote to '${t}'. Computeds should be pure; use $effect for side effects.`),this.set(t,n)),!0)})}get $(){return this.proxify()}makeEvalFunction(e){return(t,n)=>{let r=Wt(e,qt),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}`,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}};let rn=`data-m-cloak`,an=`mancha-runtime-cloak`,on=k`[data-m-cloak]{display:none!important}`;var sn=class e extends nn{_debugLevel=`off`;dirpath=``;_perfData={lifecycle:{},effects:new Map};static DEBUG_LEVELS=[`off`,`lifecycle`,`effects`,`verbose`];_skipNodes=new Set;_customElements=new Map;_pendingValueRetries=[];cloakElement(e){let t=e.ownerDocument??globalThis.document;if(t?.head&&!t.getElementById(an)){let e=t.createElement(`style`);e.id=an,_(e,on),t.head.appendChild(e)}F(e,rn,``)}uncloakElement(e){L(e,rn)}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(`>`)}buildObserverId(e){let t=e?.directive??`unknown`,n=ft(e?.expression??``,32),r=e?.element,i=e?.id??(r?r.dataset?.perfid??r.id??r.dataset?.testid??this.getNodePath(r):`unknown`);return n?`${t}:${i}:${n}`:`${t}:${i}`}recordObserverExecution(e,t){let n=this.buildObserverId(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){let n=this;function r(){if(!n.shouldLog(`lifecycle`))return e.call(this);let r=performance.now(),i=e.call(this),a=performance.now()-r;return t&&n.recordObserverExecution(t,a),a>16&&console.warn(`[mancha] Slow observer (${a.toFixed(1)}ms):`,n.buildObserverId(t)),n.shouldLog(`effects`)&&console.debug(`[mancha] Observer (${a.toFixed(2)}ms):`,n.buildObserverId(t)),i}return super.effect(r,t)}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:
|
|
45
|
-
`,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:
|
|
43
|
+
let Rt=new Set([`==`,`!=`,`<=`,`>=`,`||`,`&&`,`??`,`?.`]),zt=new Set([`===`,`!==`]),W=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}({}),G=(e,t,n=0)=>({kind:e,value:t,precedence:n}),Bt=e=>e===9||e===10||e===13||e===32,Vt=e=>{if(e===95||e===36)return!0;let t=e&-33;return 65<=t&&t<=90},Ht=e=>Vt(e)||K(e),Ut=e=>At.has(e),Wt=e=>e===34||e===39,K=e=>48<=e&&e<=57,Gt=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,Kt=e=>e===40||e===41||e===91||e===93||e===123||e===125,qt=e=>e.replace(/\\(.)/g,(e,t)=>{switch(t){case`n`:return`
|
|
44
|
+
`;case`r`:return`\r`;case`t`:return` `;case`b`:return`\b`;case`f`:return`\f`;default:return t}});var Jt=class{_input;_index=-1;_tokenStart=0;_next;constructor(e){this._input=e,this._advance()}nextToken(){for(;Bt(this._next??-1);)this._advance(!0);if(Wt(this._next??-1))return this._tokenizeString();if(Vt(this._next??-1))return this._tokenizeIdentOrKeyword();if(K(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(Gt(this._next??-1))return this._tokenizeOperator();if(Kt(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=G(W.STRING,qt(this._getValue()));return this._advance(),t}_tokenizeIdentOrKeyword(){do this._advance();while(Ht(this._next??-1));let e=this._getValue();return G(Ut(e)?W.KEYWORD:jt.has(e)?W.OPERATOR:W.IDENTIFIER,e,Pt[e]??0)}_tokenizeNumber(){do this._advance();while(K(this._next??-1));return this._next===46?this._tokenizeDot():G(W.INTEGER,this._getValue())}_tokenizeDot(){if(this._advance(),K(this._next??-1))return this._tokenizeFraction();if(this._next===46){if(this._advance(),this._next===46)return this._advance(),this._clearValue(),G(W.SPREAD,`...`);throw Error(`Unexpected token ..`)}return this._clearValue(),G(W.DOT,`.`,13)}_tokenizeComma(){return this._advance(!0),G(W.COMMA,`,`)}_tokenizeColon(){return this._advance(!0),G(W.COLON,`:`)}_tokenizeFraction(){do this._advance();while(K(this._next??-1));return G(W.DECIMAL,this._getValue())}_tokenizeOperator(){this._advance();let e=this._getValue(2);if(zt.has(e))this._advance(),this._advance();else{if(e=this._getValue(1),e===`=>`)return this._advance(),G(W.ARROW,e);Rt.has(e)&&this._advance()}return e=this._getValue(),e===`?.`?G(W.OPTIONAL_DOT,e,13):G(W.OPERATOR,e,Pt[e])}_tokenizeGrouper(){let e=String.fromCharCode(this._next??0),t=G(W.GROUPER,e,Pt[e]);return this._advance(!0),t}};let Yt=(e,t)=>new Xt(e,t).parse();var Xt=class{_kind;_tokenizer;_ast;_token;_value;constructor(e,t){this._tokenizer=new Jt(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(W.GROUPER,`(`)){let t=this._parseArguments();e=this._ast.invoke(e,void 0,t)}else if(this._matches(W.GROUPER,`[`)){let t=this._parseIndex();e=this._ast.index(e,t)}else if(this._matches(W.DOT)||this._matches(W.OPTIONAL_DOT)){let t=this._kind===W.OPTIONAL_DOT;if(this._advance(),t&&this._matches(W.GROUPER,`[`)){let t=this._parseIndex();e=this._ast.index(e,t,!0)}else if(t&&this._matches(W.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(W.KEYWORD))break;else if(this._matches(W.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(!Nt.has(t.value))throw Error(`unknown operator: ${t.value}`);this._advance();let n=this._parseUnary();for(;(this._kind===W.OPERATOR||this._kind===W.DOT||this._kind===W.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(W.KEYWORD,`typeof`)){this._advance();let e=this._parsePrecedence(this._parsePrimary(),13);return this._ast.unary(`typeof`,e)}if(this._matches(W.OPERATOR)){let e=this._value;if(this._advance(),e===`+`||e===`-`){if(this._matches(W.INTEGER))return this._parseInteger(e);if(this._matches(W.DECIMAL))return this._parseDecimal(e)}if(!e||!Mt.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(W.OPERATOR,`?`);let t=this._parseExpression();this._advance(W.COLON);let n=this._parseExpression();return this._ast.ternary(e,t,n)}_parsePrimary(){switch(this._kind){case W.KEYWORD:{let e=this._value??``;if(e===`this`)return this._advance(),this._ast.id(e);throw At.has(e)?Error(`unexpected keyword: ${e}`):Error(`unrecognized keyword: ${e}`)}case W.IDENTIFIER:return this._parseInvokeOrIdentifier();case W.STRING:return this._parseString();case W.INTEGER:return this._parseInteger();case W.DECIMAL:return this._parseDecimal();case W.GROUPER:return this._value===`(`?this._parseParenOrFunction():this._value===`{`?this._parseMap():this._value===`[`?this._parseList():void 0;case W.COLON:throw Error(`unexpected token ":"`);default:return}}_parseList(){let e=[];do{if(this._advance(),this._matches(W.GROUPER,`]`))break;if(this._matches(W.SPREAD)){this._advance();let t=this._parseExpression();t&&e.push(this._ast.spreadElement(t))}else e.push(this._parseExpression())}while(this._matches(W.COMMA));return this._advance(W.GROUPER,`]`),this._ast.list(e)}_parseMap(){let e=[];do{if(this._advance(),this._matches(W.GROUPER,`}`))break;if(this._matches(W.SPREAD)){this._advance();let t=this._parseExpression();t&&e.push(this._ast.spreadProperty(t))}else{let t=this._value??``;if((this._matches(W.STRING)||this._matches(W.IDENTIFIER))&&this._advance(),this._matches(W.COLON)){this._advance(W.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(W.COMMA));return this._advance(W.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(W.IDENTIFIER))throw Error(`expected identifier: ${this._value}`);let e=this._value;return this._advance(),this._ast.id(e??``)}_parseArguments(){if(!this._matches(W.GROUPER,`(`))return;let e=[];do{if(this._advance(),this._matches(W.GROUPER,`)`))break;if(this._matches(W.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(W.COMMA));return this._advance(W.GROUPER,`)`),e}_parseIndex(){this._advance();let e=this._parseExpression();return this._advance(W.GROUPER,`]`),e}_parseParenOrFunction(){let e=this._parseArguments();if(this._matches(W.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}};let q=Symbol(`__computed__`);function Zt(e){return typeof e==`object`&&!!e&&q in e&&e[q]===!0}let Qt=new Lt,$t=`__is_proxy__`;function en(e){return e instanceof cn||e[$t]===!0}let J=new WeakMap;function Y(e){return typeof e==`object`&&!!e}function X(e){return Y(e)?J.get(e):void 0}function tn(e){return e.subscribers.size===0&&e.holders.size===0}function nn(e,t){if(!t.has(e)){t.add(e);for(let n of Array.from(e.holders))tn(n)?e.holders.delete(n):nn(n,t);for(let t of Array.from(e.subscribers))t()}}function rn(e){nn(e,new Set)}function an(e,t){X(e)?.subscribers.add(t)}function on(e,t){X(e)?.subscribers.delete(t)}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 sn(e,t,n){let r=Q(e,t);r?r._store.set(t,n):e._store.set(t,n)}var cn=class e{evalkeys=[`$elem`,`$event`];expressionCache=new Map;observers=new Map;keyHandlers=new Map;_store=new Map;_lock=Promise.resolve();_pending=new Map;_executing=new Set;_dirty=new Set;_children=new Set;_mutationCallbacks=new Map;_disposed=!1;_computedDepth=0;constructor(e){for(let[t,n]of Object.entries(e||{}))this.set(t,n)}wrapObject(e){if(e==null||en(e)||Object.isFrozen(e)||Object.isSealed(e))return e;let t=Object.getPrototypeOf(e);if(!(t===Object.prototype||t===null)&&!Array.isArray(e))return e;let n=J.get(e)??{subscribers:new Set,holders:new Set};J.set(e,n);let r=()=>rn(n),i=new Proxy(e,{deleteProperty:(e,t)=>typeof t==`string`&&t in e?(delete e[t],r(),!0):!1,set:(e,t,i,a)=>{if(Reflect.get(e,t,a)===i)return!0;Y(i)&&(i=this.wrapObject(i),X(i)?.holders.add(n));let o=Reflect.set(e,t,i,a);return r(),o},get:(e,t,r)=>{if(t===$t)return!0;let i=Reflect.get(e,t,r);if(!Y(i))return i;let a=this.wrapObject(i);return a!==i&&Reflect.set(e,t,a,r),X(a)?.holders.add(n),a}});return J.set(i,n),i}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)}tagObserversForComputed(e,t){for(let n of this.observers.values())for(let r of n)r.observer===e&&r.store===this&&(r.computedKey=t);let n=this._store.get(`$parent`);for(;n;){for(let r of n.observers.values())for(let n of r)n.observer===e&&n.store===this&&(n.computedKey=t);n=n._store.get(`$parent`)}}markDependentComputedsDirty(e){let t=Q(this,e)?.observers.get(e);if(t){for(let e of t)if(e.computedKey){let t=e.store._store.get(e.computedKey);Zt(t)&&!t.dirty&&(t.dirty=!0,e.store.markDependentComputedsDirty(e.computedKey))}}}runObservers(e){return e.filter(e=>!e.store._disposed).map(e=>e.observer.call(e.store.proxify(e.observer)))}async notify(e,t=10){let n=Q(this,e),r=Array.from(n?.observers.get(e)||[]);if(this._executing.has(e)){this._dirty.add(e);return}let i=this._pending.get(e);if(i){for(let e of r)i.entries.includes(e)||i.entries.push(e);return i.done}let a=new Promise(i=>{setTimeout(async()=>{this._pending.delete(e);try{this._executing.add(e);let t=this.runObservers(r);this._dirty.delete(e),await Promise.all(t)}finally{this._executing.delete(e),this._dirty.delete(e)&&this.notify(e,t)}let a=n?.observers.get(e);if(a)for(let e of r){let t=e.store._store.has(`$parent`),n=e.store._store.get(`$rootNode`);t&&n&&!n.isConnected&&!n.parentNode&&a.delete(e)}i()},t)});return this._pending.set(e,{done:a,entries:r}),a}get(e,t){t&&this.watch(e,t);let n=Z(this,e);if(Zt(n)){if(n.dirty){this._computedDepth++;try{let t=this.proxify(n.effectFn);n.value=n.fn.call(t,t),n.dirty=!1,n.effectFn&&this.tagObserversForComputed(n.effectFn,e),this.markDependentComputedsDirty(e)}finally{this._computedDepth--}}return n.value}return n}setupComputed(e,t){let n=this,r={[q]:!0,fn:t,dirty:!0};this._store.set(e,r);let i=function(){n._computedDepth++;try{let i=t.call(this,this);if(r.value!==i){r.value=i;let t=Q(n,e),a=Array.from(t?.observers.get(e)||[]);for(let e of a)e.observer.call(e.store.proxify(e.observer))}r.dirty=!1}finally{n._computedDepth--}};r.effectFn=i,this.effect(i,{directive:`computed`,id:e}),this.tagObserversForComputed(i,e)}mutationCallback(e){let t=this._mutationCallbacks.get(e);if(t)return t;let n=()=>{this.markDependentComputedsDirty(e),this.notify(e)};return this._mutationCallbacks.set(e,n),n}async set(e,t,n){if(Zt(t)){this.setupComputed(e,t.fn);return}if(this._store.has(e)&&t===this._store.get(e))return;let r=Z(this,e);if(Y(t)&&(t=this.wrapObject(t)),X(t)||Y(r)){let n=this.mutationCallback(e);on(r,n),an(t,n)}if(n?this._store.set(e,t):sn(this,e,t),!n){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))}this.markDependentComputedsDirty(e),await this.notify(e)}async del(e){await this.set(e,null),this._store.delete(e),this.observers.delete(e),this._mutationCallbacks.delete(e)}disposeSubtree(e){if(!e.has(this)){e.add(this),this._disposed=!0;for(let t of this._children)t.disposeSubtree(e);this._children.clear();for(let[e,t]of this._mutationCallbacks)on(Z(this,e),t);this._mutationCallbacks.clear();for(let e of this.observers.values())e.clear();this.observers.clear()}}dispose(){this._store.get(`$parent`)?._children.delete(this);let e=new Set;this.disposeSubtree(e);let t=this._store.get(`$parent`);for(;t;){for(let n of t.observers.values())for(let t of n)e.has(t.store)&&n.delete(t);t=t._store.get(`$parent`)}}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))}$computed(e){return{[q]:!0,fn:e,dirty:!0}}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!==$t&&!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._computedDepth>0&&console.warn(`[mancha] Computed wrote to '${t}'. Computeds should be pure; use $effect for side effects.`),this.set(t,n)),!0)})}get $(){return this.proxify()}makeEvalFunction(e){return(t,n)=>{let r=Yt(e,Qt),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}`,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}};let ln=`data-m-cloak`,un=`mancha-runtime-cloak`,dn=k`[data-m-cloak]{display:none!important}`;var fn=class e extends cn{_debugLevel=`off`;dirpath=``;_perfData={lifecycle:{},effects:new Map};static DEBUG_LEVELS=[`off`,`lifecycle`,`effects`,`verbose`];_skipNodes=new Set;_customElements=new Map;_pendingValueRetries=[];cloakElement(e){let t=e.ownerDocument??globalThis.document;if(t?.head&&!t.getElementById(un)){let e=t.createElement(`style`);e.id=un,_(e,dn),t.head.appendChild(e)}F(e,ln,``)}uncloakElement(e){L(e,ln)}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(`>`)}buildObserverId(e){let t=e?.directive??`unknown`,n=_t(e?.expression??``,32),r=e?.element,i=e?.id??(r?r.dataset?.perfid??r.id??r.dataset?.testid??this.getNodePath(r):`unknown`);return n?`${t}:${i}:${n}`:`${t}:${i}`}recordObserverExecution(e,t){let n=this.buildObserverId(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){let n=this;function r(){if(!n.shouldLog(`lifecycle`))return e.call(this);let r=performance.now(),i=e.call(this),a=performance.now()-r;return t&&n.recordObserverExecution(t,a),a>16&&console.warn(`[mancha] Slow observer (${a.toFixed(1)}ms):`,n.buildObserverId(t)),n.shouldLog(`effects`)&&console.debug(`[mancha] Observer (${a.toFixed(2)}ms):`,n.buildObserverId(t)),i}return super.effect(r,t)}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:
|
|
45
|
+
`,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:vt(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:vt(e),rootDocument:t?.rootDocument??!e.endsWith(`.tpl.html`)})}subrenderer(){let e=new this.constructor().debug(this.debugging);return e._store.set(`$parent`,this),this._disposed||this._children.add(e),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 bt(A(e,this._skipNodes)).map(async e=>{this.log(`Preprocessing node:
|
|
46
46
|
`,H(e,128)),await U.resolveIncludes.call(this,e,t),await U.rebaseRelativePaths.call(this,e,t),await U.registerCustomElements.call(this,e,t),await U.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:
|
|
47
|
-
`,H(n,128)),await U.resolveForAttribute.call(this,n,t),await U.resolveRenderAttribute.call(this,n,t),await U.resolveDataAttribute.call(this,n,t),await U.resolveTextAttributes.call(this,n,t),await U.resolveHtmlAttribute.call(this,n,t),await U.resolveIfAttribute.call(this,n,t),await U.resolveShowAttribute.call(this,n,t),await U.resolveClassAttribute.call(this,n,t),await U.resolveBindAttribute.call(this,n,t),await U.resolveEventAttributes.call(this,n,t),await U.resolveTextNodeExpressions.call(this,n,t),await U.resolveCustomAttribute.call(this,n,t),await U.resolveCustomProperty.call(this,n,t),await U.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},I(e,`renderer`,this),this._store.set(`$rootNode`,e),this.has(`$rootRenderer`)||this._store.set(`$rootRenderer`,this),this.get(`$rootRenderer`)===this&&await
|
|
47
|
+
`,H(n,128)),await U.resolveForAttribute.call(this,n,t),await U.resolveRenderAttribute.call(this,n,t),await U.resolveDataAttribute.call(this,n,t),await U.resolveTextAttributes.call(this,n,t),await U.resolveHtmlAttribute.call(this,n,t),await U.resolveIfAttribute.call(this,n,t),await U.resolveShowAttribute.call(this,n,t),await U.resolveClassAttribute.call(this,n,t),await U.resolveBindAttribute.call(this,n,t),await U.resolveEventAttributes.call(this,n,t),await U.resolveTextNodeExpressions.call(this,n,t),await U.resolveCustomAttribute.call(this,n,t),await U.resolveCustomProperty.call(this,n,t),await U.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},I(e,`renderer`,this),this._store.set(`$rootNode`,e),this.has(`$rootRenderer`)||this._store.set(`$rootRenderer`,this),this.get(`$rootRenderer`)===this&&await kt(this),await this.preprocessNode(e,t),await this.renderNode(e,t),rt(e),n&&(this._perfData.lifecycle.mountTime=performance.now()-n)}};function pn(){return ot([k`*,::before,::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}`,k`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}`,k`body{margin:0;line-height:inherit}`,k`hr{height:0;color:inherit;border-top-width:1px}`,k`abbr:where([title]){text-decoration:underline dotted}`,k`b,strong{font-weight:bolder}`,k`code,kbd,samp,pre{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:1em}`,k`small{font-size:80%}`,k`sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}`,k`sub{bottom:-0.25em}`,k`sup{top:-0.5em}`,k`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}`,k`button,select{text-transform:none}`,k`button,[type='button'],[type='reset'],[type='submit']{-webkit-appearance:button;background-color:transparent;background-image:none;cursor:pointer}`,k`:-moz-focusring{outline:auto}`,k`:-moz-ui-invalid{box-shadow:none}`,k`progress{vertical-align:baseline}`,k`::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}`,k`[type='search']{-webkit-appearance:textfield;outline-offset:-2px}`,k`::-webkit-search-decoration{-webkit-appearance:none}`,k`::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}`,k`summary{display:list-item}`,k`blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}`,k`fieldset{margin:0;padding:0}`,k`legend{padding:0}`,k`ol,ul,menu{list-style:none;margin:0;padding:0}`,k`textarea{resize:vertical}`,k`::placeholder{opacity:1;color:#9ca3af}`,k`button,[role="button"]{cursor:pointer}`,k`:disabled{cursor:default;pointer-events:none;opacity:0.75}`,k`img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}`,k`img,video{max-width:100%;height:auto}`,k`[hidden]{display:none}`,k`dialog{padding:0}`,k`dialog::backdrop{background:rgba(0,0,0,0.5)}`])}function mn(){return ot([k`html{`,k`max-width: 70ch;`,k`padding: 2em 1em;`,k`margin: auto;`,k`line-height: 1.75;`,k`font-size: 1.25em;`,k`font-family: sans-serif;`,k`}`,k`h1,h2,h3,h4,h5,h6{`,k`margin: 1em 0 0.5em;`,k`}`,k`p,ul,ol{`,k`margin-bottom: 1em;`,k`color: #1d1d1d;`,k`}`])}var hn=class extends fn{impl=`browser`;dirpath=vt(globalThis.location?.href??`http://localhost/`);parseHTML(e,t={rootDocument:!1}){if(t.rootDocument)return new DOMParser().parseFromString(e,`text/html`);{let t=document.createRange();return t.selectNodeContents(document.body),t.createContextualFragment(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}};new hn;function gn(e){for(let t of e){t=t.trim();let e=document.createElement(`style`);switch(t){case`minimal`:_(e,mn());break;case`basic`:case`custom`:continue;case`utils`:{_(e,pn()),e.setAttribute(`data-mancha`,`basic`),globalThis.document.head.appendChild(e);let t=document.createElement(`style`);t.textContent=Ne(),t.setAttribute(`data-mancha`,`utils`),globalThis.document.head.appendChild(t),tt(document);continue}default:console.error(`Unknown style name: "${t}"`);continue}globalThis.document.head.appendChild(e)}}let _n=`mancha-cloak`;function vn(e,t){let n=`${e.join(`, `)} { opacity: 0 !important; ${t>0?`transition: opacity ${t}ms ease-in-out !important;`:``} }`,r=document.getElementById(_n);r||(r=document.createElement(`style`),r.id=_n,document.head.appendChild(r)),r.textContent=n}function yn(e){let t=!1;return async()=>{if(t)return;t=!0;let n=document.getElementById(_n);if(n){if(e!==!1){let t=n.sheet;t&&t.cssRules.length>0&&t.cssRules[0].style.setProperty(`opacity`,`1`,`important`),await new Promise(t=>setTimeout(t,e))}typeof globalThis.requestAnimationFrame==`function`&&(await new Promise(e=>globalThis.requestAnimationFrame(e)),await new Promise(e=>globalThis.requestAnimationFrame(e))),n.remove()}}}async function bn(e={}){let t;document.documentElement.classList.add(`mancha-loading`);let n=e.cloak?e.cloak===!0?{}:e.cloak:void 0;if(n){let r=e.target?Array.isArray(e.target)?e.target:[e.target]:[`body`],i=n.selector&&(Array.isArray(n.selector)||typeof n.selector==`string`)?Array.isArray(n.selector)?n.selector:[n.selector]:r,a=n.duration??0;vn(i,a),t=yn(a>0?a:!1)}else t=yn(!1);document.readyState===`loading`&&await new Promise(e=>{window.addEventListener(`DOMContentLoaded`,()=>e(),{once:!0})});let r=e.renderer??new hn;e.css&&e.css.length>0&&gn(e.css),e.debug&&r.debug(!0),e.state&&await Promise.all(Object.entries(e.state).map(([e,t])=>r.set(e,t)));try{if(e.callback)await e.callback(r);else if(e.target){let t=Array.isArray(e.target)?e.target:[e.target];for(let n of t){let t=globalThis.document.querySelector(n);t?await r.mount(t,{cache:e.cache}):console.error(`Target element not found: "${n}"`)}}}finally{document.documentElement.classList.remove(`mancha-loading`),t&&await t()}return r}let $=globalThis.document?.currentScript,xn=new hn;if(xn.initMancha=bn,globalThis.Mancha=xn,$?.hasAttribute(`init`)){let e=$.hasAttribute(`debug`),t=$.getAttribute(`cache`)||void 0,n=$.getAttribute(`target`)?.split(`+`).map(e=>e.trim())||[`body`],r=$.getAttribute(`css`)?.split(`+`).map(e=>e.trim()).filter(e=>e!==``),i,a=$.getAttribute(`cloak`);if(a===`false`)i=void 0;else if(a&&!Number.isNaN(parseInt(a,10))){let e=parseInt(a,10);i=e>0?{duration:e}:!0}else i=!0;bn({renderer:xn,css:r,target:n,debug:e,cache:t,cloak:i})}else if($?.hasAttribute(`css`)){let e=$.getAttribute(`css`)?.split(`+`).map(e=>e.trim()).filter(e=>e!==``);bn({css:e})}return xn})();
|
package/docs/05_css.md
CHANGED
|
@@ -145,7 +145,10 @@ Spacing utilities use a 0.25rem (4px) unit by default.
|
|
|
145
145
|
|
|
146
146
|
### Colors
|
|
147
147
|
|
|
148
|
-
Supported prefixes: `text-`, `bg-`, `border-`, `fill-`.
|
|
148
|
+
Supported prefixes: `text-`, `bg-`, `border-`, `fill-`, `divide-`, `ring-`.
|
|
149
|
+
|
|
150
|
+
`ring-{color}` sets the ring color through the `--ring-color` custom property, so it
|
|
151
|
+
needs a ring width utility (`ring`, `ring-2`, ...) alongside it to be visible.
|
|
149
152
|
|
|
150
153
|
| Color | Shades |
|
|
151
154
|
| --- | --- |
|
|
@@ -211,13 +214,14 @@ You can also control the opacity of any color utility by appending `/{opacity}`
|
|
|
211
214
|
| `shadow-2xl` | `box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25)` |
|
|
212
215
|
| `shadow-inner` | `box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05)` |
|
|
213
216
|
| `shadow-none` | `box-shadow: 0 0 #0000` |
|
|
214
|
-
| `ring` | `box-shadow: var(--ring-inset, ) 0 0 0 3px rgb(59 130 246 / 0.5)` |
|
|
215
|
-
| `ring-0` | `box-shadow: var(--ring-inset, ) 0 0 0 0px rgb(59 130 246 / 0.5)` |
|
|
216
|
-
| `ring-1` | `box-shadow: var(--ring-inset, ) 0 0 0 1px rgb(59 130 246 / 0.5)` |
|
|
217
|
-
| `ring-2` | `box-shadow: var(--ring-inset, ) 0 0 0 2px rgb(59 130 246 / 0.5)` |
|
|
218
|
-
| `ring-4` | `box-shadow: var(--ring-inset, ) 0 0 0 4px rgb(59 130 246 / 0.5)` |
|
|
219
|
-
| `ring-8` | `box-shadow: var(--ring-inset, ) 0 0 0 8px rgb(59 130 246 / 0.5)` |
|
|
217
|
+
| `ring` | `box-shadow: var(--ring-inset, ) 0 0 0 3px var(--ring-color, rgb(59 130 246 / 0.5))` |
|
|
218
|
+
| `ring-0` | `box-shadow: var(--ring-inset, ) 0 0 0 0px var(--ring-color, rgb(59 130 246 / 0.5))` |
|
|
219
|
+
| `ring-1` | `box-shadow: var(--ring-inset, ) 0 0 0 1px var(--ring-color, rgb(59 130 246 / 0.5))` |
|
|
220
|
+
| `ring-2` | `box-shadow: var(--ring-inset, ) 0 0 0 2px var(--ring-color, rgb(59 130 246 / 0.5))` |
|
|
221
|
+
| `ring-4` | `box-shadow: var(--ring-inset, ) 0 0 0 4px var(--ring-color, rgb(59 130 246 / 0.5))` |
|
|
222
|
+
| `ring-8` | `box-shadow: var(--ring-inset, ) 0 0 0 8px var(--ring-color, rgb(59 130 246 / 0.5))` |
|
|
220
223
|
| `ring-inset` | `--ring-inset: inset` |
|
|
224
|
+
| `ring-{color}` | `--ring-color: {value}` |
|
|
221
225
|
| `opacity-0` | Fully transparent |
|
|
222
226
|
| `opacity-{5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100}` | Opacity values (multiples of 5) |
|
|
223
227
|
|
|
@@ -630,6 +634,8 @@ Markup that Mancha did not render is the exception: it is never scanned, so call
|
|
|
630
634
|
|
|
631
635
|
**Browser only**: Custom values require the CSSStyleSheet API and are not available in Worker or SSR environments.
|
|
632
636
|
|
|
637
|
+
**Unknown classes warn**: A class that looks like a utility but matches no rule — a typo, or a color outside the palette such as `hover:bg-brand-500` — logs `No CSS rule for class: ...` once and is then ignored. Stylesheets loading after the first scan are picked up, so a late-loading sheet that defines the class still works.
|
|
638
|
+
|
|
633
639
|
### When to Use
|
|
634
640
|
|
|
635
641
|
**Prefer the design scale** for consistency. Use custom values for:
|