grab 0.1.48-dev.7b43062 → 0.1.48-dev.cac6157
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/{copy-content-BPJ08fM-.d.cts → copy-content-BPB8MmpL.d.cts} +2 -2
- package/dist/{copy-content-tDo_MSv9.d.ts → copy-content-C7lFyXsY.d.ts} +2 -2
- package/dist/{copy-content-aPzkB0pw.js → copy-content-CbjqLSIH.js} +2 -2
- package/dist/{copy-content-DqD6H7mI.cjs → copy-content-DoR-wbHM.cjs} +2 -2
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/core-7jNiR5NZ.cjs +14 -0
- package/dist/core-C2C_YRT3.js +14 -0
- package/dist/{create-pointer-move-prompt-handoff-B6RIo2wa.cjs → create-pointer-move-prompt-handoff-D41bFo0b.cjs} +1 -1
- package/dist/{create-pointer-move-prompt-handoff-Cc3Ao31A.js → create-pointer-move-prompt-handoff-DwNZaiRA.js} +1 -1
- package/dist/freeze-updates-CqzBfk2W.cjs +51 -0
- package/dist/freeze-updates-DlHvYaiv.js +51 -0
- package/dist/{index-CjtwpNJq.d.cts → index-DMyJsiaz.d.cts} +1 -1
- package/dist/{index-Cx-YnOMQ.d.ts → index-VkohC_Hw.d.ts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.global.js +18 -18
- package/dist/index.js +1 -1
- package/dist/primitives.cjs +2 -2
- package/dist/primitives.d.cts +1 -1
- package/dist/primitives.d.ts +1 -1
- package/dist/primitives.js +2 -2
- package/dist/renderer-D0g-Fo8Z.js +9 -0
- package/dist/renderer-Dfd9Vhgx.cjs +9 -0
- package/package.json +2 -2
- package/dist/core-CAq8Gl1J.cjs +0 -14
- package/dist/core-CGI3R0aj.js +0 -14
- package/dist/freeze-updates-BHM2DGMm.js +0 -51
- package/dist/freeze-updates-CYpw0MB2.cjs +0 -51
- package/dist/renderer-B5F9XzY8.cjs +0 -9
- package/dist/renderer-Dw-byE_k.js +0 -9
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 Aiden Bai
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
import{A as e,B as t,C as n,Ct as r,D as i,Dt as a,E as o,F as s,H as c,I as l,L as u,M as d,N as f,O as p,P as m,R as h,S as g,T as _,U as v,V as ee,W as y,X as te,Z as ne,_ as b,_t as re,a as ie,at as ae,b as oe,bt as se,dt as x,ft as ce,h as le,ht as S,i as ue,it as C,j as w,k as de,mt as T,n as fe,o as pe,r as me,s as E,t as he,v as D,vt as ge,w as _e,wt as O,x as ve,xt as ye,yt as k,z as be}from"./create-pointer-move-prompt-handoff-DwNZaiRA.js";import{A as xe,B as Se,Bt as Ce,F as we,G as Te,Gt as A,I as Ee,Kt as De,L as Oe,U as ke,Ut as Ae,Vt as je,Wt as Me,X as Ne,_ as Pe,_t as Fe,a as Ie,at as Le,b as Re,bt as ze,c as Be,ct as Ve,d as He,f as Ue,g as We,gt as Ge,h as Ke,ht as qe,i as Je,j,jt as Ye,k as Xe,l as Ze,m as Qe,o as $e,p as et,qt as tt,r as nt,s as rt,st as it,t as at,u as ot,v as st,vt as M,z as N}from"./freeze-updates-DlHvYaiv.js";import{a as ct,c as lt,d as ut,i as dt,n as ft,o as pt,r as mt,s as ht,t as gt}from"./copy-content-CbjqLSIH.js";var _t=`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
10
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial}}}@layer theme{:root,:host{--font-sans:"Geist", ui-sans-serif, system-ui, sans-serif;--font-serif:ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-500:oklch(63.7% .237 25.331);--spacing:4px;--font-weight-thin:100;--font-weight-extralight:200;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--radius-sm:4px;--ease-out:cubic-bezier(0, 0, .2, 1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--ease-drawer:cubic-bezier(.32, .72, 0, 1);--ease-spring:cubic-bezier(.34, 1.56, .64, 1)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.a11y-hitbox{position:relative}.a11y-hitbox:before{content:"";pointer-events:auto;width:100%;min-width:24px;height:100%;min-height:24px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.top-0{top:calc(var(--spacing) * 0)}.top-1\\/2{top:50%}.top-\\[2px\\]{top:2px}.top-full{top:100%}.right-0{right:calc(var(--spacing) * 0)}.right-full{right:100%}.bottom-\\[2px\\]{bottom:2px}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing) * 0)}.left-full{left:100%}.z-1{z-index:1}.z-10{z-index:10}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.-m-0\\.5{margin:calc(var(--spacing) * -.5)}.-m-4{margin:calc(var(--spacing) * -4)}.m-0{margin:calc(var(--spacing) * 0)}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.-my-1\\.5{margin-block:calc(var(--spacing) * -1.5)}.-mt-\\[8px\\]{margin-top:-8px}.mt-2\\.5{margin-top:calc(var(--spacing) * 2.5)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-1\\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2\\.5{margin-right:calc(var(--spacing) * 2.5)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2\\.5{margin-bottom:calc(var(--spacing) * 2.5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2\\.5{margin-left:calc(var(--spacing) * 2.5)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-auto{margin-left:auto}.ml-px{margin-left:1px}.no-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.no-scrollbar::-webkit-scrollbar{width:0;height:0;display:none}.line-clamp-5{-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.list-item{display:list-item}.size-0{width:calc(var(--spacing) * 0);height:calc(var(--spacing) * 0)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-\\[12px\\]{width:12px;height:12px}.size-\\[16px\\]{width:16px;height:16px}.h-\\[8px\\]{height:8px}.h-\\[17px\\]{height:17px}.h-\\[20px\\]{height:20px}.h-\\[24px\\]{height:24px}.h-fit{height:fit-content}.max-h-\\[var\\(--rg-edit-list-max-h\\)\\]{max-height:var(--rg-edit-list-max-h)}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-4{min-height:calc(var(--spacing) * 4)}.min-h-\\[28px\\]{min-height:28px}.w-\\[2px\\]{width:2px}.w-\\[calc\\(100\\%\\+16px\\)\\]{width:calc(100% + 16px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.max-w-\\[280px\\]{max-width:280px}.max-w-full{max-width:100%}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\\[36px\\]{min-width:36px}.min-w-\\[100px\\]{min-width:100px}.min-w-\\[150px\\]{min-width:150px}.flex-1{flex:1}.flex-shrink,.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.-rotate-90{rotate:-90deg}.rotate-0{rotate:0deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.interactive-scale{transition:transform .4s cubic-bezier(.34,1.56,.64,1)}@media (hover:hover) and (pointer:fine){.interactive-scale:hover{transform:scale(1.05)}}.interactive-scale:active{transition:transform 60ms cubic-bezier(0,0,.2,1);transform:scale(.96)}.press-scale{transition:transform .4s cubic-bezier(.34,1.56,.64,1)}.press-scale:active{transition:transform 60ms cubic-bezier(0,0,.2,1);transform:scale(.97)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.resize{resize:both}.resize-none{resize:none}.grid-cols-\\[0fr\\]{grid-template-columns:0fr}.grid-cols-\\[1fr\\]{grid-template-columns:1fr}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing) * 0)}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-\\[5px\\]{gap:5px}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:4px}.rounded-\\[1px\\]{border-radius:1px}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[6px\\]{border-radius:6px}.rounded-\\[13px\\]{border-radius:13px}.rounded-\\[14px\\]{border-radius:14px}.rounded-full{border-radius:3.40282e38px}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t{border-top-left-radius:4px;border-top-right-radius:4px}.rounded-t-\\[10px\\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.rounded-l{border-top-left-radius:4px;border-bottom-left-radius:4px}.rounded-l-\\[10px\\]{border-top-left-radius:10px;border-bottom-left-radius:10px}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-tl{border-top-left-radius:4px}.rounded-r{border-top-right-radius:4px;border-bottom-right-radius:4px}.rounded-r-\\[10px\\]{border-top-right-radius:10px;border-bottom-right-radius:10px}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-tr{border-top-right-radius:4px}.rounded-b{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.rounded-b-\\[6px\\]{border-bottom-right-radius:6px;border-bottom-left-radius:6px}.rounded-b-\\[10px\\]{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.rounded-br{border-bottom-right-radius:4px}.rounded-bl{border-bottom-left-radius:4px}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.\\[border-width\\:0\\.5px\\]{border-width:.5px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-4{border-top-style:var(--tw-border-style);border-top-width:4px}.\\[border-top-width\\:0\\.5px\\]{border-top-width:.5px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-dotted{--tw-border-style:dotted;border-style:dotted}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-\\[var\\(--rg-border-button\\)\\]{border-color:var(--rg-border-button)}.border-t-\\[var\\(--rg-border-subtle\\)\\]{border-top-color:var(--rg-border-subtle)}.bg-\\[\\#f00\\]{background-color:red}.bg-\\[var\\(--rg-error-bg\\)\\]{background-color:var(--rg-error-bg)}.bg-\\[var\\(--rg-panel-bg\\)\\]{background-color:var(--rg-panel-bg)}.bg-\\[var\\(--rg-submit-bg\\)\\]{background-color:var(--rg-submit-bg)}.bg-\\[var\\(--rg-surface-active\\)\\]{background-color:var(--rg-surface-active)}.bg-\\[var\\(--rg-surface-hover\\)\\]{background-color:var(--rg-surface-hover)}.bg-\\[var\\(--rg-text-primary\\)\\]{background-color:var(--rg-text-primary)}.bg-\\[var\\(--rg-text-secondary\\)\\]{background-color:var(--rg-text-secondary)}.bg-red-500{background-color:var(--color-red-500)}.bg-transparent{background-color:#0000}.p-0{padding:calc(var(--spacing) * 0)}.p-1{padding:calc(var(--spacing) * 1)}.p-6{padding:calc(var(--spacing) * 6)}.px-0{padding-inline:calc(var(--spacing) * 0)}.px-0\\.25{padding-inline:calc(var(--spacing) * .25)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-\\[3px\\]{padding-inline:3px}.py-0{padding-block:calc(var(--spacing) * 0)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-0\\.25{padding-block:calc(var(--spacing) * .25)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-px{padding-block:1px}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.text-center{text-align:center}.text-justify{text-align:justify}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-serif{font-family:var(--font-serif)}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.leading-3\\.5{--tw-leading:calc(var(--spacing) * 3.5);line-height:calc(var(--spacing) * 3.5)}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-extralight{--tw-font-weight:var(--font-weight-extralight);font-weight:var(--font-weight-extralight)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.font-thin{--tw-font-weight:var(--font-weight-thin);font-weight:var(--font-weight-thin)}.break-normal{overflow-wrap:normal;word-break:normal}.break-words,.wrap-break-word{overflow-wrap:break-word}.break-all{word-break:break-all}.break-keep{word-break:keep-all}.text-ellipsis{text-overflow:ellipsis}.whitespace-break-spaces{white-space:break-spaces}.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}.text-\\[var\\(--rg-error-text\\)\\]{color:var(--rg-error-text)}.text-\\[var\\(--rg-submit-fg\\)\\]{color:var(--rg-submit-fg)}.text-\\[var\\(--rg-text-primary\\)\\]{color:var(--rg-text-primary)}.text-\\[var\\(--rg-text-primary-85\\)\\]{color:var(--rg-text-primary-85)}.text-\\[var\\(--rg-text-secondary\\)\\]{color:var(--rg-text-secondary)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.\\[box-shadow\\:var\\(--rg-shadow\\)\\]{box-shadow:var(--rg-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.\\[filter\\:var\\(--rg-drop-shadow\\)\\]{filter:var(--rg-drop-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-columns\\]{transition-property:grid-template-columns;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\]{transition-property:grid-template-rows;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[padding\\,border-radius\\,transform\\]{transition-property:padding,border-radius,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[top\\,left\\,width\\,height\\,opacity\\,border-radius\\]{transition-property:top,left,width,height,opacity,border-radius;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,color\\]{transition-property:transform,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,opacity\\]{transition-property:transform,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.delay-\\[80ms\\]{transition-delay:80ms}.duration-60{--tw-duration:60ms;transition-duration:60ms}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-120{--tw-duration:.12s;transition-duration:.12s}.duration-140{--tw-duration:.14s;transition-duration:.14s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-180{--tw-duration:.18s;transition-duration:.18s}.duration-220{--tw-duration:.22s;transition-duration:.22s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-400{--tw-duration:.4s;transition-duration:.4s}.ease-\\[cubic-bezier\\(0\\,0\\,0\\.2\\,1\\)\\]{--tw-ease:cubic-bezier(0,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-drawer{--tw-ease:var(--ease-drawer);transition-timing-function:var(--ease-drawer)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.ease-spring{--tw-ease:var(--ease-spring);transition-timing-function:var(--ease-spring)}.will-change-\\[opacity\\,transform\\]{will-change:opacity,transform}.will-change-transform{will-change:transform}.contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,) var(--tw-contain-layout,) var(--tw-contain-paint,) var(--tw-contain-style,)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[corner-shape\\:superellipse\\(1\\.25\\)\\]{corner-shape:superellipse(1.25)}.\\[font-synthesis\\:none\\]{font-synthesis:none}@media (hover:hover){.group-hover\\:text-\\[var\\(--rg-text-primary\\)\\]:is(:where(.group):hover *){color:var(--rg-text-primary)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.hover\\:bg-\\[var\\(--rg-error-bg-hover\\)\\]:hover{background-color:var(--rg-error-bg-hover)}.hover\\:bg-\\[var\\(--rg-surface-active\\)\\]:hover{background-color:var(--rg-surface-active)}.hover\\:bg-\\[var\\(--rg-surface-hover\\)\\]:hover{background-color:var(--rg-surface-hover)}.hover\\:text-\\[var\\(--rg-text-primary\\)\\]:hover{color:var(--rg-text-primary)}}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:opacity-40:disabled{opacity:.4}}:host{all:initial;direction:ltr}:host,[data-rg-theme=dark]{--rg-panel-bg:#161616;--rg-text-primary:#fff;--rg-text-secondary:#a7a7a7;--rg-surface-hover:#ffffff1a;--rg-surface-active:#ffffff26;--rg-border-subtle:#ffffff1a;--rg-border-button:#fff3;--rg-submit-bg:#fff;--rg-submit-fg:#161616;--rg-error-text:#f87171;--rg-error-bg:#3d1515;--rg-error-bg-hover:#4d1f1f;--rg-shadow:0 2px 8px #00000014;--rg-drop-shadow:drop-shadow(0px 2px 8px #00000014);--rg-shimmer-from:#a1a1aa;--rg-shimmer-to:#d4d4d8;--rg-text-primary-85:#ffffffd9}@media (prefers-color-scheme:dark){:host:not([data-rg-theme]){--rg-panel-bg:#fff;--rg-text-primary:#171717;--rg-text-secondary:#737373;--rg-surface-hover:#0000000d;--rg-surface-active:#00000014;--rg-border-subtle:#00000014;--rg-border-button:#00000026;--rg-submit-bg:#171717;--rg-submit-fg:#fff;--rg-error-text:#dc2626;--rg-error-bg:#fee2e2;--rg-error-bg-hover:#fecaca;--rg-shadow:0 2px 12px #0000001a;--rg-drop-shadow:drop-shadow(0px 2px 12px #0000001a);--rg-shimmer-from:#71717a;--rg-shimmer-to:#a1a1aa;--rg-text-primary-85:#171717d9}}:host([data-rg-theme=light]),[data-rg-theme=light]{--rg-panel-bg:#fff;--rg-text-primary:#171717;--rg-text-secondary:#737373;--rg-surface-hover:#0000000d;--rg-surface-active:#00000014;--rg-border-subtle:#00000014;--rg-border-button:#00000026;--rg-submit-bg:#171717;--rg-submit-fg:#fff;--rg-error-text:#dc2626;--rg-error-bg:#fee2e2;--rg-error-bg-hover:#fecaca;--rg-shadow:0 2px 12px #0000001a;--rg-drop-shadow:drop-shadow(0px 2px 12px #0000001a);--rg-shimmer-from:#71717a;--rg-shimmer-to:#a1a1aa;--rg-text-primary-85:#171717d9}@keyframes rg-slot-enter-up{0%{filter:blur(2px);opacity:0;transform:translateY(.5em)scale(.5)}to{filter:blur();opacity:1;transform:translateY(0)scale(1)}}@keyframes rg-slot-exit-up{0%{filter:blur();opacity:1;transform:translateY(0)scale(1)}to{filter:blur(2px);opacity:0;transform:translateY(-.5em)scale(.5)}}@keyframes rg-slot-enter-down{0%{filter:blur(2px);opacity:0;transform:translateY(-.5em)scale(.5)}to{filter:blur();opacity:1;transform:translateY(0)scale(1)}}@keyframes rg-slot-exit-down{0%{filter:blur();opacity:1;transform:translateY(0)scale(1)}to{filter:blur(2px);opacity:0;transform:translateY(.5em)scale(.5)}}@keyframes rg-slot-enter-fade{0%{filter:blur(2px);opacity:0;transform:scale(.5)}to{filter:blur();opacity:1;transform:scale(1)}}@keyframes rg-slot-exit-fade{0%{filter:blur();opacity:1;transform:scale(1)}to{filter:blur(2px);opacity:0;transform:scale(.5)}}.rg-slot-column{vertical-align:top;display:inline-block;position:relative}.rg-slot-sizer{visibility:hidden;white-space:pre;display:inline-block}.rg-slot-cell{white-space:pre;will-change:transform, filter, opacity;animation-duration:var(--rg-slot-dur,.35s);animation-timing-function:var(--rg-slot-ease,cubic-bezier(.34, 1.56, .64, 1));animation-fill-mode:both;display:inline-block;position:absolute;top:0;left:0}.rg-slot-cell.rg-slot-enter[data-dir="1"]{animation-name:rg-slot-enter-up}.rg-slot-cell.rg-slot-enter[data-dir="-1"]{animation-name:rg-slot-enter-down}.rg-slot-cell.rg-slot-enter[data-dir="0"]{animation-name:rg-slot-enter-fade}.rg-slot-cell.rg-slot-exit[data-dir="1"]{animation-name:rg-slot-exit-up}.rg-slot-cell.rg-slot-exit[data-dir="-1"]{animation-name:rg-slot-exit-down}.rg-slot-cell.rg-slot-exit[data-dir="0"]{animation-name:rg-slot-exit-fade}@media (prefers-reduced-motion:reduce){:host,:host *,:host :before,:host :after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}:host :focus,:host :focus-visible{box-shadow:none!important;outline:none!important}@keyframes shake{0%,to{translate:0}15%,45%{translate:calc(-3px * var(--rg-shake-x,1)) calc(-3px * var(--rg-shake-y,0))}30%,60%{translate:calc(3px * var(--rg-shake-x,1)) calc(3px * var(--rg-shake-y,0))}75%{translate:calc(-2px * var(--rg-shake-x,1)) calc(-2px * var(--rg-shake-y,0))}90%{translate:calc(2px * var(--rg-shake-x,1)) calc(2px * var(--rg-shake-y,0))}}@keyframes icon-loader-spin{0%{opacity:1}50%{opacity:.5}to{opacity:.2}}.icon-loader-bar{animation:.5s linear infinite icon-loader-spin}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.shimmer-text{background:linear-gradient(90deg, var(--rg-shimmer-from) 0%, var(--rg-shimmer-to) 25%, var(--rg-shimmer-from) 50%, var(--rg-shimmer-to) 75%, var(--rg-shimmer-from) 100%);color:#0000;background-size:200% 100%;-webkit-background-clip:text;background-clip:text;animation:2.5s linear infinite shimmer}.animate-shake,.animate-shake-vertical{will-change:translate;animation:.3s ease-out shake}@keyframes tooltip-fade-in{0%{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}.animate-tooltip-fade-in{will-change:transform, opacity;animation:.1s ease-out tooltip-fade-in}.animate-shake-vertical{--rg-shake-x:0;--rg-shake-y:1}@supports (-webkit-touch-callout:none){textarea[data-react-grab-input]{font-size:16px}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}`;const P=Symbol(`store-raw`),vt=Symbol(`store-node`),F=Symbol(`store-has`),I=Symbol(`store-self`);function yt(e){let t=e[C];if(!t&&(Object.defineProperty(e,C,{value:t=new Proxy(e,Et)}),!Array.isArray(e))){let n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let i=0,a=n.length;i<a;i++){let a=n[i];r[a].get&&Object.defineProperty(e,a,{enumerable:r[a].enumerable,get:r[a].get.bind(t)})}}return t}function bt(e){let t;return typeof e==`object`&&!!e&&(e[C]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function L(e,t=new Set){let n,r,i,a;if(n=e!=null&&e[P])return n;if(!bt(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let n=0,a=e.length;n<a;n++)i=e[n],(r=L(i,t))!==i&&(e[n]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);let n=Object.keys(e),o=Object.getOwnPropertyDescriptors(e);for(let s=0,c=n.length;s<c;s++)a=n[s],!o[a].get&&(i=e[a],(r=L(i,t))!==i&&(e[a]=r))}return e}function xt(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function St(e,t,n){if(e[t])return e[t];let[r,i]=k(n,{equals:!1,internal:!0});return r.$=i,e[t]=r}function Ct(e,t){let n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===C||t===vt?n:(delete n.value,delete n.writable,n.get=()=>e[C][t],n)}function wt(e){se()&&St(xt(e,vt),I)()}function Tt(e){return wt(e),Reflect.ownKeys(e)}const Et={get(e,t,n){if(t===P)return e;if(t===C)return n;if(t===ae)return wt(e),n;let r=xt(e,vt),i=r[t],a=i?i():e[t];if(t===vt||t===F||t===`__proto__`)return a;if(!i){let n=Object.getOwnPropertyDescriptor(e,t);se()&&(typeof a!=`function`||e.hasOwnProperty(t))&&!(n&&n.get)&&(a=St(r,t,a)())}return bt(a)?yt(a):a},has(e,t){return t===P||t===C||t===ae||t===vt||t===F||t===`__proto__`?!0:(se()&&St(xt(e,F),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Tt,getOwnPropertyDescriptor:Ct};function R(e,t,n,r=!1){if(!r&&e[t]===n)return;let i=e[t],a=e.length;n===void 0?(delete e[t],e[F]&&e[F][t]&&i!==void 0&&e[F][t].$()):(e[t]=n,e[F]&&e[F][t]&&i===void 0&&e[F][t].$());let o=xt(e,vt),s;if((s=St(o,t,i))&&s.$(()=>n),Array.isArray(e)&&e.length!==a){for(let t=e.length;t<a;t++)(s=o[t])&&s.$();(s=St(o,`length`,a))&&s.$(e.length)}(s=o[I])&&s.$()}function z(e,t){let n=Object.keys(t);for(let r=0;r<n.length;r+=1){let i=n[r];R(e,i,t[i])}}function Dt(e,t){if(typeof t==`function`&&(t=t(e)),t=L(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){let r=t[n];e[n]!==r&&R(e,n,r)}R(e,`length`,r)}else z(e,t)}function Ot(e,t,n=[]){let r,i=e;if(t.length>1){r=t.shift();let a=typeof r,o=Array.isArray(e);if(Array.isArray(r)){for(let i=0;i<r.length;i++)Ot(e,[r[i]].concat(t),n);return}else if(o&&a===`function`){for(let i=0;i<e.length;i++)r(e[i],i)&&Ot(e,[i].concat(t),n);return}else if(o&&a===`object`){let{from:i=0,to:a=e.length-1,by:o=1}=r;for(let r=i;r<=a;r+=o)Ot(e,[r].concat(t),n);return}else if(t.length>1){Ot(e[r],t,[r].concat(n));return}i=e[r],n=[r].concat(n)}let a=t[0];typeof a==`function`&&(a=a(i,n),a===i)||r===void 0&&a==null||(a=L(a),r===void 0||bt(i)&&bt(a)&&!Array.isArray(a)?z(i,a):R(e,r,a))}function kt(...[e,t]){let n=L(e||{}),r=Array.isArray(n),i=yt(n);function a(...e){x(()=>{r&&e.length===1?Dt(n,e[0]):Ot(n,e)})}return[i,a]}const At=new WeakMap,jt={get(e,t){if(t===P)return e;let n=e[t],r;return bt(n)?At.get(n)||(At.set(n,r=new Proxy(n,jt)),r):n},set(e,t,n){return R(e,t,L(n)),!0},deleteProperty(e,t){return R(e,t,void 0,!0),!0}};function Mt(e){return t=>{if(bt(t)){let n;(n=At.get(t))||At.set(t,n=new Proxy(t,jt)),e(n)}return t}}let B=new WeakMap,V=new WeakMap;const H=()=>{B=new WeakMap,V=new WeakMap},Nt=(e,t,n)=>{let r=V.get(e);if(r&&n-r.timestamp<200)return r.borderRadius;let i=(t??window.getComputedStyle(e)).borderRadius||`0px`;return V.set(e,{borderRadius:i,timestamp:n}),i},U=e=>{let t=performance.now(),n=B.get(e);if(n&&t-n.timestamp<16)return n.bounds;let r=e.getBoundingClientRect(),i={borderRadius:Nt(e,null,t),height:r.height,width:r.width,x:r.left,y:r.top};return B.set(e,{bounds:i,timestamp:t}),i},W=e=>({x:e.x+e.width/2,y:e.y+e.height/2}),Pt=e=>{let t=0,n=e.previousElementSibling;for(;n;)t+=1,n=n.previousElementSibling;return t},Ft=new WeakMap,It=e=>{if(e.anchorElement.isConnected)return e.anchorElement;let t=e.anchorElement.tagName,n=we(e.anchorParentFiber);if(Oe(n)){let r=n.stateNode;if(!(r instanceof Element)||!r.isConnected)return null;let i=r.children[e.anchorIndexInParent];return i&&i.tagName===t?i:null}for(let e of N(n)){let n=e.stateNode;if(n instanceof Element&&n.isConnected&&n.tagName===t)return n}return null},Lt=(e,t)=>{let n=e;for(let e of t){let t=n.children[e];if(!t)return null;n=t}return n},Rt=e=>{let t=[],n=e,r=Ee(n);for(;n&&!r;)t.unshift(Pt(n)),n=n.parentElement,r=Ee(n);let i=r?.return;return!n||!i?null:{anchorElement:n,anchorParentFiber:i,anchorIndexInParent:Pt(n),domPath:t,targetTagName:e.tagName}},zt=(e,t)=>e.anchorElement.isConnected&&e.anchorIndexInParent===Pt(e.anchorElement)&&Lt(e.anchorElement,e.domPath)===t,G=e=>{if(!e.isConnected)return;let t=Ft.get(e);if(t&&zt(t,e))return;let n=Rt(e);n&&Ft.set(e,n)},Bt=e=>{if(e.isConnected)return e;let t=Ft.get(e);if(!t)return null;let n=It(t);if(!n)return null;let r=Lt(n,t.domPath);return r&&r.isConnected&&r.tagName===t.targetTagName?r:null},K=e=>{let t=Bt(e)??e;return G(t),t},Vt=e=>{for(let t=0;t<e.frozenElements.length;t+=1)e.frozenElements[t]=K(e.frozenElements[t]);e.frozenElement=e.frozenElement&&K(e.frozenElement),e.detectedElement=e.detectedElement&&K(e.detectedElement),e.contextMenuElement=e.contextMenuElement&&K(e.contextMenuElement);for(let t of e.labelInstances)if(t.element&&=K(t.element),t.elements)for(let e=0;e<t.elements.length;e+=1)t.elements[e]=K(t.elements[e]);for(let t of e.grabbedBoxes)t.element&&=K(t.element)},Ht=e=>({selectionInteractionLockDepth:0,wasActivatedByToggle:!1,pendingCommentMode:!1,keyHoldDuration:e.keyHoldDuration,dragStart:{x:M,y:M},copyStart:{x:M,y:M},copyOffsetFromCenterX:0,detectedElement:null,frozenElement:null,frozenElements:[],frozenDragRect:null,lastGrabbedElement:null,selectionFilePath:null,selectionLineNumber:null,inputText:``,grabbedBoxes:[],labelInstances:[],isTouchMode:!1,activationTimestamp:null,previouslyFocusedElement:null,contextMenuPosition:null,contextMenuElement:null,contextMenuClickOffset:null}),Ut=e=>{let[t,n]=kt(Ht(e)),[r,i]=k({x:M,y:M}),[a,o]=k(0),[s,c]=k({state:`idle`}),l=e=>{n(Mt(t=>{e(t),t.frozenElement=t.frozenElements.length>0?t.frozenElements[0]:null,t.frozenDragRect=null;for(let e of t.frozenElements)G(e)}))},u=()=>{l(e=>{e.frozenElements=[]})},d=e=>{c(t=>t.state===`active`?{...t,phase:e}:t)},f={startHold:e=>{e!==void 0&&n(`keyHoldDuration`,e),c({state:`holding`,startedAt:Date.now()})},releaseHold:()=>{s().state===`holding`&&c({state:`idle`})},activate:()=>{x(()=>{c({state:`active`,phase:`hovering`,isPromptMode:!1,isPendingDismiss:!1}),n(`activationTimestamp`,Date.now()),n(`previouslyFocusedElement`,document.activeElement)})},deactivate:()=>{x(()=>{c({state:`idle`}),n(Mt(e=>{e.wasActivatedByToggle=!1,e.pendingCommentMode=!1,e.inputText=``,e.frozenElement=null,e.frozenElements=[],e.frozenDragRect=null,e.activationTimestamp=null,e.previouslyFocusedElement=null,e.contextMenuPosition=null,e.contextMenuElement=null,e.contextMenuClickOffset=null,e.isTouchMode&&(e.detectedElement=null)}))})},toggle:()=>{t.activationTimestamp===null?(n(`wasActivatedByToggle`,!0),f.activate()):f.deactivate()},freeze:()=>{if(s().state===`active`){let e=t.frozenElement??t.detectedElement;e&&(G(e),n(`frozenElement`,e)),d(`frozen`)}},unfreeze:()=>{s().state===`active`&&x(()=>{n(Mt(e=>{e.frozenElement=null,e.frozenElements=[],e.frozenDragRect=null})),d(`hovering`)})},startDrag:(e,t)=>{s().state===`active`&&x(()=>{t||u(),n(`dragStart`,{x:e.x+window.scrollX,y:e.y+window.scrollY}),d(`dragging-select`)})},startDragReposition:()=>{let e=s();e.state===`active`&&e.phase===`dragging-select`&&d(`dragging-reposition`)},stopDragReposition:()=>{let e=s();e.state===`active`&&e.phase===`dragging-reposition`&&d(`dragging-select`)},shiftDragStart:e=>{let t=s();t.state===`active`&&t.phase===`dragging-reposition`&&n(`dragStart`,t=>({x:t.x+e.x,y:t.y+e.y}))},endDrag:()=>{let e=s();e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)&&x(()=>{n(`dragStart`,{x:M,y:M}),d(`justDragged`)})},cancelDrag:()=>{let e=s();e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)&&x(()=>{n(`dragStart`,{x:M,y:M}),d(`hovering`)})},finishJustDragged:()=>{let e=s();e.state===`active`&&e.phase===`justDragged`&&d(`hovering`)},startCopy:()=>{let e=s().state===`active`;c({state:`copying`,startedAt:Date.now(),wasActive:e})},completeCopy:()=>{let e=s(),t=e.state===`copying`?e.wasActive:!1;c({state:`justCopied`,copiedAt:Date.now(),wasActive:t})},finishJustCopied:()=>{let e=s();e.state===`justCopied`&&(e.wasActive&&!t.wasActivatedByToggle?x(()=>{u(),c({state:`active`,phase:`hovering`,isPromptMode:!1,isPendingDismiss:!1})}):f.deactivate())},enterPromptMode:(e,t)=>{let{x:r}=W(U(t));G(t),x(()=>{n(`copyStart`,e),n(`copyOffsetFromCenterX`,e.x-r),i(e),n(`frozenElement`,t),n(`wasActivatedByToggle`,!0),s().state===`active`?c(e=>e.state===`active`?{...e,isPromptMode:!0,phase:`frozen`}:e):(c({state:`active`,phase:`frozen`,isPromptMode:!0,isPendingDismiss:!1}),n(`activationTimestamp`,Date.now()),n(`previouslyFocusedElement`,document.activeElement))})},exitPromptMode:()=>{c(e=>e.state===`active`?{...e,isPromptMode:!1,isPendingDismiss:!1}:e)},setInputText:e=>{n(`inputText`,e)},clearInputText:()=>{n(`inputText`,``)},setPendingDismiss:e=>{c(t=>t.state===`active`?{...t,isPendingDismiss:e}:t)},setPointer:e=>{i(t=>t.x===e.x&&t.y===e.y?t:e)},setDetectedElement:e=>{e&&G(e),n(`detectedElement`,e)},setFrozenElement:e=>{l(t=>{t.frozenElements=[e]})},setFrozenElements:e=>{l(t=>{t.frozenElements=e})},toggleFrozenElement:e=>{l(t=>{let n=t.frozenElements.indexOf(e);n>=0?t.frozenElements.splice(n,1):t.frozenElements.push(e)})},addFrozenElements:e=>{l(t=>{for(let n of e)t.frozenElements.includes(n)||t.frozenElements.push(n)})},setFrozenDragRect:e=>{n(`frozenDragRect`,e)},relinkLiveElements:()=>{n(Mt(Vt))},setCopyStart:(e,t)=>{let{x:r}=W(U(t));n(`copyStart`,e),n(`copyOffsetFromCenterX`,e.x-r)},setLastGrabbed:e=>{n(`lastGrabbedElement`,e)},setWasActivatedByToggle:e=>{n(`wasActivatedByToggle`,e)},setPendingCommentMode:e=>{n(`pendingCommentMode`,e)},setTouchMode:e=>{n(`isTouchMode`,e)},incrementSelectionInteractionLockDepth:()=>{n(`selectionInteractionLockDepth`,e=>e+1)},decrementSelectionInteractionLockDepth:()=>{n(`selectionInteractionLockDepth`,e=>Math.max(0,e-1))},setSelectionSource:(e,t)=>{x(()=>{n(`selectionFilePath`,e),n(`selectionLineNumber`,t)})},incrementViewportVersion:()=>{o(e=>e+1)},addGrabbedBox:e=>{e.element&&G(e.element),n(`grabbedBoxes`,t=>[...t,e])},removeGrabbedBox:e=>{n(`grabbedBoxes`,t=>t.filter(t=>t.id!==e))},clearGrabbedBoxes:()=>{n(`grabbedBoxes`,[])},addLabelInstance:e=>{e.element&&G(e.element);for(let t of e.elements??[])G(t);n(`labelInstances`,t=>[...t,e])},updateLabelInstance:(e,r,i)=>{let a=t.labelInstances.findIndex(t=>t.id===e);a!==-1&&x(()=>{n(`labelInstances`,a,`status`,r),i===void 0?r!==`error`&&n(`labelInstances`,a,`errorMessage`,void 0):n(`labelInstances`,a,`errorMessage`,i)})},removeLabelInstance:e=>{n(`labelInstances`,t=>t.filter(t=>t.id!==e))},clearLabelInstances:()=>{n(`labelInstances`,[])},showContextMenu:(e,t)=>{let{x:r,y:i}=W(U(t));G(t),x(()=>{n(`contextMenuPosition`,e),n(`contextMenuElement`,t),n(`contextMenuClickOffset`,{x:e.x-r,y:e.y-i})})},hideContextMenu:()=>{x(()=>{n(`contextMenuPosition`,null),n(`contextMenuElement`,null),n(`contextMenuClickOffset`,null)})},updateContextMenuPosition:()=>{let e=t.contextMenuElement,r=t.contextMenuClickOffset;if(!e||!r||!y(e))return;let{x:i,y:a}=W(U(e));n(`contextMenuPosition`,{x:i+r.x,y:a+r.y})}};return{store:t,actions:f,pointer:r,viewportVersion:a,current:s}},Wt=e=>{if(!document.body)return;let t=document.querySelectorAll(`[${Ae}]`);for(let n of t)n!==e&&n.parentNode!==e&&(n.shadowRoot||n.remove());document.body.appendChild(e)},Gt=e=>{if(document.body){Wt(e);return}let t=()=>{document.removeEventListener(`DOMContentLoaded`,t),Wt(e)};document.addEventListener(`DOMContentLoaded`,t,{once:!0})},Kt=e=>{let t=document.querySelectorAll(`[${Ae}]`);for(let e of t){let t=e.shadowRoot?.querySelector(`[${Ae}]`);if(t instanceof HTMLDivElement)return{root:t,host:e};e.remove()}let n=document.createElement(`div`);n.setAttribute(Ae,`true`),Xe(n),n.style.zIndex=String(je),n.style.position=`fixed`,n.style.inset=`0`,n.style.pointerEvents=`none`,n.style.contain=`strict`;let r=n.attachShadow({mode:`open`}),i=document.createElement(`style`),a=xe();a&&(i.nonce=a),i.textContent=`@import url("https://fonts.googleapis.com/css2?family=Geist:wght@500&display=swap");\n${e??``}`,r.appendChild(i);let o=document.createElement(`div`);return o.setAttribute(Ae,`true`),r.appendChild(o),Gt(n),setTimeout(()=>{Wt(n)},Ge),{root:o,host:n}},qt=e=>{let[t,n]=k(void 0),i=0;return T(r(e,e=>{let t=++i;if(!e){n(void 0);return}let r=mt(e)??void 0;n(r),ct(e).then(e=>{i===t&&n(e??r)}).catch(()=>{i===t&&n(r)})})),[t,n]},Jt=[`data-theme`,`data-mode`,`data-color-scheme`,`data-bs-theme`,`data-mui-color-scheme`,`data-mantine-color-scheme`],Yt=[{attribute:`data-dark`,theme:`dark`},{attribute:`data-light`,theme:`light`}],Xt=(e,t,n)=>{let[r,i,a]=[e,t,n].map(e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return .2126*r+.7152*i+.0722*a},Zt=(e,n=0)=>{let r=h(e),i=r?t(r):null;return!i||i.alpha<=n?null:Xt(i.red,i.green,i.blue)},Qt=e=>{let t=Zt(e);return t===null?null:t<.18?`dark`:`light`},$t=e=>Qt(getComputedStyle(e).backgroundColor),en=()=>{let e=Zt(getComputedStyle(document.documentElement).color,ze);return e===null?null:e>.6?`dark`:null},tn=()=>{let e=document.createElement(`div`);e.style.cssText=`position:fixed;width:0;height:0;background-color:Canvas!important`,document.documentElement.appendChild(e);let t=Qt(getComputedStyle(e).backgroundColor);return e.remove(),t},q=e=>{let t=e.toLowerCase();return t===`dark`?`dark`:t===`light`?`light`:null},nn=e=>{let t=e.style.colorScheme||getComputedStyle(e).colorScheme;return t?t.trim().toLowerCase().split(/\s+/):[]},rn=e=>{let t=nn(e),n=t.includes(`dark`);return n===t.includes(`light`)?null:n?`dark`:`light`},an=e=>{if(e.classList.contains(`dark`))return`dark`;if(e.classList.contains(`light`))return`light`;for(let t of Jt){let n=e.getAttribute(t);if(!n)continue;let r=q(n);if(r)return r}for(let{attribute:t,theme:n}of Yt)if(e.hasAttribute(t))return n;return null},on=(e,t)=>{for(let n of e){if(!n)continue;let e=t(n);if(e)return e}return null},J=()=>{let e=[document.documentElement,document.body],t=[document.body,document.documentElement];return on(e,an)??on(e,rn)??on(t,$t)??en()??tn()??`light`},sn=e=>e===`dark`?`light`:`dark`,cn=()=>{let e=[];for(let t of[document.documentElement,document.body]){if(!t)continue;e.push(t.className);for(let n of Jt)e.push(t.getAttribute(n)??``);for(let{attribute:n}of Yt)e.push(t.hasAttribute(n)?`1`:``);let n=t.style;e.push(n.colorScheme,n.backgroundColor,n.color);for(let t=0;t<n.length;t++){let r=n[t];r.startsWith(`--`)&&e.push(`${r}:${n.getPropertyValue(r)}`)}}return e.join(`|`)},ln={attributes:!0,attributeFilter:[`class`,`style`,...Jt,...Yt.map(({attribute:e})=>e)]},un=(e,t)=>{let n=null,r=null,i=null,a=()=>{let i=cn();if(i===r&&n!==null)return getComputedStyle(document.body??document.documentElement).backgroundColor,n;r=i;let a=sn(J());return a!==n&&(n=a,e.setAttribute(`data-rg-theme`,a),t?.(a)),a},o=()=>{i===null&&(i=Pe(()=>{i=null,a()}))},s=a(),c=new MutationObserver(o);c.observe(document.documentElement,ln);let l=null;document.body?c.observe(document.body,ln):(l=new MutationObserver(()=>{document.body&&(l.disconnect(),l=null,c.observe(document.body,ln),a())}),l.observe(document.documentElement,{childList:!0}));let u=()=>{r=null,o()},d=window.matchMedia(`(prefers-color-scheme: dark)`);return d.addEventListener(`change`,u),{theme:s,cleanup:()=>{l?.disconnect(),c.disconnect(),d.removeEventListener(`change`,u),i!==null&&We(i)}}},Y=()=>{},dn=()=>({activate:Y,deactivate:Y,toggle:Y,comment:Y,isActive:()=>!1,isEnabled:()=>!1,setEnabled:Y,getToolbarState:()=>null,setToolbarState:Y,onToolbarStateChange:()=>Y,reset:Y,dispose:Y,copyElement:()=>Promise.resolve(!1),getSource:()=>Promise.resolve(null),getStackContext:()=>Promise.resolve(``),getState:()=>({isActive:!1,isDragging:!1,isCopying:!1,isPromptMode:!1,isSelectionBoxVisible:!1,isDragBoxVisible:!1,targetElement:null,dragBounds:null,grabbedBoxes:[],labelInstances:[],selectionFilePath:null,toolbarState:null}),setOptions:Y,registerPlugin:Y,unregisterPlugin:Y,getPlugins:()=>[],getDisplayName:()=>null}),fn=()=>{let e=new AbortController;return{signal:e.signal,abort:()=>e.abort(),addWindowListener:(t,n,r={})=>{window.addEventListener(t,n,{...r,signal:e.signal})},addDocumentListener:(t,n,r={})=>{document.addEventListener(t,n,{...r,signal:e.signal})}}},pn=(e,t=`Unknown error`)=>e instanceof Error&&e.message?e.message:t,mn=e=>e instanceof Error?e:Error(String(e)),hn=e=>({functionName:e.functionName,fileName:e.fileName,lineNumber:e.lineNumber,columnNumber:e.columnNumber,isServer:e.isServer,isSymbolicated:e.isSymbolicated}),gn=async(e,t)=>{let n={maxLines:t},[r,i,a,o]=await Promise.all([dt(e,n),ht(e,n),lt(e),pt(e)]);return{tagName:j(e),componentName:a?.componentName??void 0,content:`[${r}]`,source:a,stackContext:i,frames:(o??[]).map(hn)}},_n=async(e,t)=>{let n=await Promise.all(e.map(e=>gn(e,t))),r=new Map;for(let e of n)r.has(e.content)||r.set(e.content,e);let i=[...r.values()];return i.length>0?{content:i.map(e=>e.content).join(`
|
|
11
|
+
`),entries:i}:null},vn=(e,t,n)=>{if(e?.entries)return t===e.content?e.entries:e.entries.length===1?[{...e.entries[0],content:t,commentText:n}]:e.entries.map(e=>({...e,commentText:n}))},yn=async(e,t,n,r)=>{await t.onBeforeCopy(n);let i=!1,a=``;try{let o=e.getContent?{content:await e.getContent(n)}:await _n(n,e.maxContextLines),s=o?.content;if(s?.trim()){let c=await t.transformCopyContent(s,n);a=r?`${r}\n${c}`:c,i=gt(a,{componentName:e.componentName,entries:vn(o,a,r)})}}catch(e){t.onCopyError(mn(e))}return i&&t.onCopySuccess(n,a),t.onAfterCopy(n,i),i},X=(e,t)=>{let n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),i=Math.min(e.right,t.right),a=Math.min(e.bottom,t.bottom);return Math.max(0,i-n)*Math.max(0,a-r)},bn=(e,t)=>e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top,xn=e=>e.sort((e,t)=>{if(e===t)return 0;let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0}),Sn=e=>{if(e.width<=0||e.height<=0)return[];let t=window.innerWidth,n=window.innerHeight,r=e.x,i=e.y,a=e.x+e.width,o=e.y+e.height,s=r+e.width/2,c=i+e.height/2,l=u(Math.ceil(e.width/32),3,20),d=u(Math.ceil(e.height/32),3,20),f=l*d,p=f>100?Math.sqrt(100/f):1,m=u(Math.floor(l*p),3,20),h=u(Math.floor(d*p),3,20),g=new Set,_=[],v=(e,r)=>{let i=u(Math.round(e),0,t-1),a=u(Math.round(r),0,n-1),o=`${i}:${a}`;g.has(o)||(g.add(o),_.push({x:i,y:a}))};v(r+1,i+1),v(a-1,i+1),v(r+1,o-1),v(a-1,o-1),v(s,i+1),v(s,o-1),v(r+1,c),v(a-1,c),v(s,c);for(let t=0;t<m;t+=1){let n=r+(t+.5)/m*e.width;for(let t=0;t<h;t+=1)v(n,i+(t+.5)/h*e.height)}return _},Cn=(e,t,n)=>{let r={left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height},i=new Set,a=Sn(e);Ue();try{for(let e of a){let t=document.elementsFromPoint(e.x,e.y);for(let e of t)i.add(e)}}finally{He()}let o=[];for(let e of i)!n&&Ke(e)||De(e)&&t(e)&&o.push(e);let s=new Map;for(let e of o)s.set(e,e.getBoundingClientRect());let c=[];for(let e of o){let t=s.get(e);if(t.width<=0||t.height<=0)continue;let i={left:t.left,top:t.top,right:t.left+t.width,bottom:t.top+t.height};if(n){let n=X(r,i),a=t.width*t.height;a>0&&n/a>=.75&&c.push(e)}else bn(i,r)&&c.push(e)}return xn(c)},wn=e=>{let t=new Set(e);return e.filter(e=>{for(let n=e.parentElement;n;n=n.parentElement)if(t.has(n))return!1;return!0})},Tn=(e,t,n=!0)=>wn(Cn(e,t,n)),En=(e,t)=>e.width<=0?0:u((t.x-e.x)/e.width,0,1),Dn=()=>{H(),Be()},On=e=>({borderRadius:`0px`,height:e.height,width:e.width,x:e.pageX-window.scrollX,y:e.pageY-window.scrollY}),kn=e=>({pageX:e.x+window.scrollX,pageY:e.y+window.scrollY,width:e.width,height:e.height}),An=e=>({borderRadius:`0px`,height:e.height,width:e.width,x:e.x,y:e.y}),jn=(e,t,n)=>{let r=(e,t,n,r)=>{let i=[],a=e,o=0;for(;a&&i.length<n&&o<100;)r(a)&&i.push(a),a=t(a),o+=1;return i},i=r(e.parentElement,e=>e.parentElement,6,t);i.reverse();let a=i.map((e,t)=>({element:e,depth:t,isLast:!0})),o=i.length,s=r(e.previousElementSibling,e=>e.previousElementSibling,7,n),c=r(e.nextElementSibling,e=>e.nextElementSibling,7,n),l=Math.min(s.length,Math.max(3,7-c.length)),u=Math.min(c.length,7-l),d=[...s.slice(0,l).reverse(),e,...c.slice(0,u)],f=r(e.firstElementChild,e=>e.nextElementSibling,6,t),p=d.length-1,m=f.length-1;return d.forEach((t,n)=>{a.push({element:t,depth:o,isLast:n===p}),t===e&&f.forEach((e,t)=>{a.push({element:e,depth:o+1,isLast:t===m})})}),a},Mn=e=>e instanceof SVGElement&&!(e instanceof SVGSVGElement),Nn=e=>{let t=e.getBoundingClientRect();return t.width>=16||t.height>=16},Pn=(e,t)=>t(e)&&!Mn(e)&&Nn(e),Fn=new Set([`c`,`C`,`с`,`С`,`ȼ`,`Ȼ`,`ↄ`,`Ↄ`,`ᴄ`,`ᶜ`,`ⱼ`,`ⅽ`,`Ⅽ`,`ç`,`Ç`,`ć`,`Ć`,`č`,`Č`,`ĉ`,`Ĉ`,`ċ`,`Ċ`]),In=(e,t)=>t===`KeyC`?!0:!e||e.length!==1?!1:Fn.has(e),Ln=(e,t)=>{if(!e||!t)return!1;let n=e.toLowerCase();return t===`Space`?n===`space`||n===` `:t.startsWith(`Key`)?t.slice(3).toLowerCase()===n:t.startsWith(`Digit`)?t.slice(5)===n:!1},Rn={meta:`metaKey`,cmd:`metaKey`,command:`metaKey`,win:`metaKey`,windows:`metaKey`,ctrl:`ctrlKey`,control:`ctrlKey`,shift:`shiftKey`,alt:`altKey`,option:`altKey`,opt:`altKey`},zn=e=>{let t=e.split(`+`).map(e=>e.trim().toLowerCase()),n={metaKey:!1,ctrlKey:!1,shiftKey:!1,altKey:!1,key:null};for(let e of t){let t=Rn[e];t?n[t]=!0:n.key=e}return n},Bn=e=>{if(typeof e==`function`)return e;let t=zn(e),n=t.key;return e=>{if(n===null){let n=t.metaKey?e.metaKey||e.key===`Meta`:!0,r=t.ctrlKey?e.ctrlKey||e.key===`Control`:!0,i=t.shiftKey?e.shiftKey||e.key===`Shift`:!0,a=t.altKey?e.altKey||e.key===`Alt`:!0,o=n&&r&&i&&a,s=[t.metaKey,t.ctrlKey,t.shiftKey,t.altKey].filter(Boolean).length,c=[e.metaKey||e.key===`Meta`,e.ctrlKey||e.key===`Control`,e.shiftKey||e.key===`Shift`,e.altKey||e.key===`Alt`].filter(Boolean).length;return o&&c>=s}let r=e.key?.toLowerCase()===n||Ln(n,e.code),i=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey?(t.metaKey?e.metaKey:!0)&&(t.ctrlKey?e.ctrlKey:!0)&&(t.shiftKey?e.shiftKey:!0)&&(t.altKey?e.altKey:!0):!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey;return r&&i}},Vn=e=>!e||typeof e==`function`?{metaKey:l(),ctrlKey:!l(),shiftKey:!1,altKey:!1,key:null}:zn(e),Hn=(e,t)=>{if(t.activationKey)return Bn(t.activationKey)(e);let n=(l()?e.metaKey:e.ctrlKey)&&!e.shiftKey&&!e.altKey;return!!(e.key&&n&&In(e.key,e.code))},Un=e=>{if(e.length===0)return{x:0,y:0,width:0,height:0};if(e.length===1)return e[0];let t=1/0,n=1/0,r=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),i=Math.max(i,a.y+a.height);return{x:t,y:n,width:r-t,height:i-n}},Wn=t=>{let n=getComputedStyle(t),r={};for(let t of e)r[t]=n.getPropertyValue(t);return r},Gn=e=>{let t={};for(let n of oe)t[n]=e.getPropertyValue(n);return t},Kn=e=>{try{let t=e.parentElement;if(!t)return null;let n=e.namespaceURI,r=e.tagName.toLowerCase(),i=n&&n!==`http://www.w3.org/1999/xhtml`?e.ownerDocument.createElementNS(n,r):e.ownerDocument.createElement(r),a=`style`in i?i.style:null;a instanceof CSSStyleDeclaration&&a.setProperty(`display`,`none`,`important`),t.appendChild(i);try{return Gn(getComputedStyle(i))}finally{i.remove()}}catch{return null}},qn=new Set([`display`,`width`,`height`]),Jn=(e,t,n)=>e.kind===`color`?!1:e.cssProperties.some(e=>qn.has(e))?Yn(e):e.cssProperties.every(e=>{let r=t[e],i=n[e];return r===void 0||i===void 0?!1:r===i}),Yn=e=>{if(e.kind===`color`)return!1;if(e.kind===`enum`)return e.key===`font-weight`?e.original===`400`:e.options[0]?.value===e.original;let{key:t,original:n}=e;return t.startsWith(`padding`)||t.startsWith(`margin`)||t.includes(`gap`)||t===`border-width`||t.endsWith(`-radius`)||t===`border-radius`?n===0:t===`opacity`?n===100:t===`letter-spacing`||t===`z-index`?n===0:o.has(t)?!1:!!(t===`width`||t===`height`||t===`width,height`||t.startsWith(`max-`)||t.startsWith(`min-`)||t===`line-height`)},Xn=e=>{let t=e.trim();if(!t||t===`auto`||t===`normal`||t===`none`)return null;let n=Number.parseFloat(t);return Number.isFinite(n)?t.endsWith(`%`)?{value:n,unit:`%`}:t.endsWith(`rem`)||t.endsWith(`em`)?{value:n*16,unit:`px`}:t.endsWith(`px`)?{value:n,unit:`px`}:{value:n,unit:``}:null},Zn=(e,t)=>{let r=Xn(e[t]);if(r)return r;if(t===`line-height`){let t=Xn(e[`font-size`]);return t?{value:b(t.value*Ve),unit:t.unit||`px`}:null}return n.has(t)?{value:0,unit:`px`}:null},Qn=(e,t)=>{let n=Zn(e,t[0]);if(!n)return null;for(let r=1;r<t.length;r++){let i=Zn(e,t[r]);if(!i||i.unit!==n.unit||Math.abs(i.value-n.value)>=.5)return null}return n},$n=(e,t)=>e===`opacity`?{value:Math.round(t.value*100),unit:`%`}:w.has(e)?{value:b(t.value),unit:``}:{value:b(t.value),unit:t.unit||`px`},er=e=>e!==null,tr=(e,t)=>{let n=t.map(t=>{let n=t.longhands.length===1?Zn(e,t.longhands[0]):Qn(e,t.longhands);return n?{definition:t,value:n}:null}).filter(er),r=new Map;for(let e of n)for(let t of e.definition.longhands){let n=r.get(t);(!n||e.definition.longhands.length>n.definition.longhands.length)&&r.set(t,e)}let i=new Set(r.values());return n.map(e=>({...e,isCanonical:i.has(e)}))},nr=(e,t,n)=>e===`opacity`?{min:0,max:100}:e===`z-index`?{min:f,max:d}:e===`letter-spacing`?{min:-10,max:20}:e===`font-size`?{min:8,max:96}:e===`line-height`?{min:0,max:120}:e.includes(`radius`)?{min:0,max:96}:e===`width`||e===`height`||e===`width,height`||e.startsWith(`min-`)||e.startsWith(`max-`)?{min:0,max:Math.max(512,Math.ceil(t*2))}:o.has(e)?{min:i,max:512}:n===`%`?{min:0,max:100}:{min:e.startsWith(`margin`)?_:0,max:de},rr=(e,t,n)=>{let r=$n(e.key,t),i=r.unit===`px`&&Math.abs(r.value)>1e7,a=nr(e.key,i?0:r.value,r.unit),o=r.value<0?a.min:a.max,s=i?o:r.value;return{kind:`numeric`,key:e.key,label:e.label,cssProperties:e.longhands,min:a.min,max:a.max,value:s,original:s,unit:r.unit,tailwindAliases:E(e.key),isPrioritized:!1,isDefault:!1,isCanonical:n}},ir=(e,n,r,i=!1)=>{let a=h(r),o=a?t(a):null,s=o!==null&&o.alpha!==0;if(!s&&!i)return null;let c=s&&a?a:Le;return{kind:`color`,key:e,label:n,cssProperties:[e],value:c,original:c,tailwindAliases:E(e),isPrioritized:i,isDefault:!1,isCanonical:!0}},ar=(e,t,n)=>{let r=t.trim(),i=n??e.options;return!i||!i.some(e=>e.value===r)?null:{kind:`enum`,key:e.key,label:e.label,cssProperties:[e.key],value:r,original:r,options:i,tailwindAliases:E(e.key),isPrioritized:!1,isDefault:!1,isCanonical:!0}},or=new Map(`background-color.color.padding.padding-left,padding-right.padding-top,padding-bottom.padding-top.padding-right.padding-bottom.padding-left.margin.margin-left,margin-right.margin-top,margin-bottom.margin-top.margin-right.margin-bottom.margin-left.font-family.font-size.font-weight.font-style.line-height.letter-spacing.text-transform.text-align.text-decoration-line.white-space.word-break.overflow-wrap.font-variant-numeric.border-radius.border-top-left-radius,border-top-right-radius.border-bottom-left-radius,border-bottom-right-radius.border-top-left-radius,border-bottom-left-radius.border-top-right-radius,border-bottom-right-radius.border-top-left-radius.border-top-right-radius.border-bottom-left-radius.border-bottom-right-radius.width,height.width.height.max-width.max-height.min-width.min-height.opacity.gap.row-gap.column-gap.border-width.border-top-width.border-right-width.border-bottom-width.border-left-width.border-color.align-items.justify-content.top,right,bottom,left.left,right.top,bottom.top.right.bottom.left.z-index`.split(`.`).map((e,t)=>[e,t])),sr=e=>or.get(e.key)??1/0,Z=e=>e.map((e,t)=>({property:e,index:t})).sort((e,t)=>{let n=sr(e.property)-sr(t.property);return n===0?e.index-t.index:n}).map(e=>e.property),cr=e=>{let t=Wn(e),n=getComputedStyle(e),r=Gn(n),i=Kn(e),a=[],o=new Set,s=e=>{o.has(e.key)||(a.push(e),o.add(e.key))};for(let e of D)for(let n of tr(t,e))s(rr(n.definition,n.value,n.isCanonical));for(let e of p){let n=Zn(t,e.key);n&&s(rr({key:e.key,label:e.label,longhands:[e.key]},n,!0))}for(let{key:e,label:t,alwaysShow:r}of ve){let i=n.getPropertyValue(e);if(!r&&(!i||be(i)))continue;let a=ir(e,t,i,r);a&&s(a)}let c=n.getPropertyValue(_e.key);if(c){let e=ar(_e,c,m(c));e&&s(e)}for(let e of g){let t=n.getPropertyValue(e.key);if(!t)continue;let r=ar(e,t);r&&s(r)}return lr(a,pe(e),r,i)},lr=(e,t,n,r)=>{let i=[],a=[];for(let o of e)if(o.isPrioritized||t.has(o.key))i.push({...o,isPrioritized:!0,isDefault:!1});else{let e=r?Jn(o,n,r):Yn(o);a.push({...o,isDefault:e})}return[...Z(i),...Z(a)]},Q=[{keyword:`letter`,family:`letter-spacing`},{keyword:`tracking`,family:`letter-spacing`},{keyword:`leading`,family:`line-height`},{keyword:`line-height`,family:`line-height`},{keyword:`lineheight`,family:`line-height`},{keyword:`radius`,family:`radius`},{keyword:`rounded`,family:`radius`},{keyword:`corner`,family:`radius`},{keyword:`font-size`,family:`font-size`},{keyword:`fontsize`,family:`font-size`},{keyword:`text`,family:`font-size`},{keyword:`stroke`,family:`border-width`},{keyword:`border-width`,family:`border-width`},{keyword:`borderwidth`,family:`border-width`},{keyword:`space`,family:`spacing`},{keyword:`gap`,family:`spacing`},{keyword:`gutter`,family:`spacing`},{keyword:`inset`,family:`spacing`},{keyword:`padding`,family:`spacing`},{keyword:`margin`,family:`spacing`},{keyword:`size`,family:`size`},{keyword:`width`,family:`size`},{keyword:`height`,family:`size`}],ur=e=>{let t=e.toLowerCase();for(let{keyword:e,family:n}of Q)if(t.includes(e))return n;return null},dr=e=>e.includes(`radius`)?`radius`:e.endsWith(`-width`)&&e.includes(`border`)?`border-width`:e===`font-size`?`font-size`:e===`line-height`?`line-height`:e===`letter-spacing`?`letter-spacing`:e.startsWith(`padding`)||e.startsWith(`margin`)||e.endsWith(`gap`)||e===`top`||e===`right`||e===`bottom`||e===`left`||e.startsWith(`inset`)?`spacing`:e===`width`||e===`height`||e.startsWith(`min-`)||e.startsWith(`max-`)?`size`:null,fr=e=>{let t=Xn(e);return!t||t.unit!==`px`?null:b(t.value)},pr=(e,t)=>t===null?!0:e.length===t.length?e<t:e.length<t.length,mr=(e,t,n)=>{if(n===1){for(let n of e)if(n>t)return n;return null}for(let n=e.length-1;n>=0;n--)if(e[n]<t)return e[n];return null},hr=(e,t,n)=>{let r=(t===1?Math.floor(e/n)+1:Math.ceil(e/n)-1)*n;return r<0?null:r};let gr=null;const _r=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),vr=()=>{let e=Array.from(document.adoptedStyleSheets??[]),t=document.styleSheets.length;if(gr&&gr.documentSheetCount===t&&_r(gr.adoptedSheets,e))return gr.names;let n=new Set;for(let t of[...document.styleSheets,...e]){let e;try{e=t.cssRules}catch{continue}yr(e,n)}return gr={documentSheetCount:t,adoptedSheets:e,names:n},n},yr=(e,t)=>{for(let n of Array.from(e))if(n instanceof CSSStyleRule){let e=n.style;for(let n=0;n<e.length;n++){let r=e.item(n);r.startsWith(`--`)&&t.add(r)}}else n instanceof CSSGroupingRule&&yr(n.cssRules,t)},br={hasTokens:!1,matchColor:()=>null,matchLength:()=>null,stepLength:()=>null},xr=e=>{if(typeof document>`u`)return br;let t=vr();if(t.size===0)return br;let n=getComputedStyle(e),r=new Map,i=new Map,a=new Map,o=null;for(let e of t){let t=n.getPropertyValue(e).trim();if(!t)continue;let s=fr(t);if(s!==null){e===`--spacing`&&s>0&&(o=s);let t=ur(e);if(t!==null){let n=i.get(s);n?n.push({name:e,family:t}):i.set(s,[{name:e,family:t}]);let r=a.get(t);r?r.add(s):a.set(t,new Set([s]))}continue}let c=h(t);if(c){let t=c.toLowerCase();pr(e,r.get(t)??null)&&r.set(t,e)}}if(r.size===0&&i.size===0)return br;let s=new Map;for(let[e,t]of a)s.set(e,Array.from(t).sort((e,t)=>e-t));return{hasTokens:!0,matchColor:e=>{let t=h(e)?.toLowerCase();return t?r.get(t)??null:null},matchLength:(e,t)=>{let n=dr(t);if(n===null)return null;let r=i.get(Math.round(e));if(!r)return null;let a=null;for(let e of r)e.family===n&&pr(e.name,a)&&(a=e.name);return a},stepLength:(e,t,n)=>{let r=dr(n);if(r===null)return null;let i=Math.round(e),a=s.get(r);return a&&a.length>=2?mr(a,i,t):(r===`spacing`||r===`size`)&&o?hr(i,t,o):a?mr(a,i,t):null}}},Sr=e=>e.kind===`color`||e.kind===`enum`?e.value:e.key===`opacity`&&e.unit===`%`?le(e.value/100):`${le(e.value)}${e.unit}`,Cr=(e,t,n)=>{if(!n?.hasTokens)return null;let{edit:r}=t;return r.kind===`color`?n.matchColor(r.value):r.kind===`numeric`&&r.unit===`px`?n.matchLength(r.value,e):null},wr=e=>{let t=new Map;for(let n of e.edits){let e=Sr(n);for(let r of n.cssProperties)t.set(r,{edit:n,cssValue:e})}let n=!1;return{lines:Array.from(t,([t,r])=>{let i=Cr(t,r,e.designTokens);i&&(n=!0);let a=i?` /* var(${i}) */`:``;return`${t}: ${r.cssValue};${a}`}),usesToken:n}},Tr=e=>e.filePath?`${e.filePath}:${e.lineNumber}`:``,Er=e=>["```css",...e,"```"].join(`
|
|
12
|
+
`),Dr=e=>{if(e.length===0)return``;let t=e.map(e=>{let{lines:t,usesToken:n}=wr(e);return{header:Tr(e),cssLines:t,usesToken:n}}),n=[`Apply these style changes canonically (CSS = visual intent; choose the source change that best expresses the underlying layout intent):`];if(t.some(e=>e.usesToken)&&n.push("Prefer the design token shown in each `/* var(--token) */` comment over the raw value when it matches the project's intent."),t.length===1){let[e]=t;return e.header&&n.push(`\n${e.header}`),n.push(Er(e.cssLines)),n.join(`
|
|
13
|
+
`)}for(let e of t)n.push(e.header?`\n${e.header}`:``),n.push(Er(e.cssLines));return n.join(`
|
|
14
|
+
`)},Or=e=>`style`in e&&e.style instanceof CSSStyleDeclaration,kr=e=>{let t=new Map,n=Or(e)?e:null;return{apply:(e,r)=>{if(n)for(let i of e)t.has(i)||t.set(i,{value:n.style.getPropertyValue(i),priority:n.style.getPropertyPriority(i)}),n.style.setProperty(i,r)},restore:()=>{if(!n){t.clear();return}for(let[e,{value:r,priority:i}]of t)r?n.style.setProperty(e,r,i):n.style.removeProperty(e);t.clear()},hasAppliedStyles:()=>t.size>0}},Ar=(e,t)=>{for(let n of t){let t=e.edits.findIndex(e=>e.key===n.key);t>=0?e.edits[t]=n:e.edits.push(n)}},jr=(e,t)=>({element:e.element,preview:e.preview,filePath:e.filePath??``,lineNumber:e.lineNumber??0,edits:t,designTokens:e.designTokens}),Mr=e=>{let[t,n]=k(null),[r,i]=k(!1),a=[],o=[],s=e=>{o=e},c=()=>{let r=t()!==null;n(null),i(!1),a=[],o=[],r&&e.onClose?.()},l=()=>{t()?.preview.restore();for(let e=a.length-1;e>=0;e--)a[e].preview.restore();c()},u=e=>{ct(e).then(t=>{t&&n(n=>!n||n.element!==e||n.componentName?n:{...n,componentName:t})})},d=(r,i,a={})=>{if(t()!==null)return!1;let o=cr(r);if(o.length===0)return!1;let s=a.filePath??e.store.selectionFilePath??void 0,c=a.lineNumber??e.store.selectionLineNumber??void 0;return n({element:r,position:i,properties:o,preview:kr(r),filePath:s,lineNumber:c,componentName:a.componentName,tagName:a.tagName??j(r),initialSearchQuery:a.initialSearchQuery,designTokens:xr(r)}),u(r),e.isActivated()||e.activateRenderer(),e.actions.setPointer(i),e.actions.setFrozenElement(r),e.actions.freeze(),e.onOpen?.(),!0},f=(r,i)=>{let s=t();if(!s||s.element===r)return!1;let c=cr(r);return c.length===0?!1:((o.length>0||s.preview.hasAppliedStyles())&&a.push(jr(s,o)),o=[],n({element:r,position:i,properties:c,preview:kr(r),tagName:j(r),hasSessionEdits:a.some(e=>e.edits.length>0),designTokens:xr(r)}),lt(r).then(e=>{if(e){for(let t of a)t.element===r&&!t.filePath&&(t.filePath=e.filePath,t.lineNumber=e.lineNumber??0);n(t=>!t||t.element!==r||t.filePath?t:{...t,filePath:e.filePath,lineNumber:e.lineNumber??void 0})}}).catch(()=>void 0),u(r),e.actions.setPointer(i),e.actions.setFrozenElement(r),!0)},p=(e,t)=>[...a,jr(e,t)],m=e=>{let t=new Map;for(let n of e){if(n.edits.length===0)continue;let e=t.get(n.element);if(e){!e.filePath&&n.filePath&&(e.filePath=n.filePath,e.lineNumber=n.lineNumber),Ar(e,n.edits);continue}t.set(n.element,{filePath:n.filePath,lineNumber:n.lineNumber,edits:[...n.edits],designTokens:n.designTokens})}return Array.from(t.values())},h=e=>{let t=new Set;for(let n of e)n.edits.length>0&&t.add(n.element);for(let n=e.length-1;n>=0;n--){let r=e[n];r.edits.length===0&&!t.has(r.element)&&r.preview.restore()}};return{state:t,trigger:d,switchToElement:f,setPendingEdits:s,dismiss:()=>{t()!==null&&(l(),e.store.wasActivatedByToggle?e.deactivateRenderer():e.actions.unfreeze())},closePreservingRenderer:()=>{t()!==null&&(l(),e.actions.unfreeze())},submit:n=>{let r=t();if(!r)return;let i=r.element,a=p(r,n),o=Dr(m(a));h(a),c(),e.store.wasActivatedByToggle||e.actions.unfreeze(),e.performCopyWithLabel({element:i,cursorX:r.position.x,extraPrompt:o||void 0,shouldDeactivateAfter:e.store.wasActivatedByToggle})},resetWithDiscard:l,isOpen:()=>t()!==null,isInteracting:r,setInteracting:i}},Nr={enabled:!0,hue:0,selectionBox:{enabled:!0},dragBox:{enabled:!0},grabbedBoxes:{enabled:!0},elementLabel:{enabled:!0},toolbar:{enabled:!0}},Pr=(e,t)=>({enabled:t.enabled??e.enabled,hue:t.hue??e.hue,selectionBox:{enabled:t.selectionBox?.enabled??e.selectionBox.enabled},dragBox:{enabled:t.dragBox?.enabled??e.dragBox.enabled},grabbedBoxes:{enabled:t.grabbedBoxes?.enabled??e.grabbedBoxes.enabled},elementLabel:{enabled:t.elementLabel?.enabled??e.elementLabel.enabled},toolbar:{enabled:t.toolbar?.enabled??e.toolbar.enabled}}),Fr={activationMode:`toggle`,keyHoldDuration:100,allowActivationInsideInput:!0,activationKey:void 0,getContent:void 0,maxContextLines:3,freezeReactUpdates:!0},Ir=(e={})=>{let t=new Map,n={},[r,i]=kt({theme:Nr,options:{...Fr,...e},actions:[]}),a=()=>{let r=Nr,a={...Fr,...e},o=[];for(let{config:e}of t.values())if(e.theme&&(r=Pr(r,e.theme)),e.options&&(a={...a,...e.options}),e.actions)for(let t of e.actions)o.push(t);a={...a,...n},i(`theme`,r),i(`options`,a),i(`actions`,o)},o=(e,t)=>{n[e]=t,i(`options`,e,t)},s=[`activationMode`,`keyHoldDuration`,`allowActivationInsideInput`,`activationKey`,`getContent`,`maxContextLines`,`freezeReactUpdates`],c=e=>{for(let t of s)e[t]!==void 0&&o(t,e[t])},l=(e,n)=>{t.has(e.name)&&u(e.name);let r=e.setup?.(n,_)??{};e.theme&&(r.theme=r.theme?Pr(Pr(Nr,e.theme),r.theme):e.theme),e.actions&&(r.actions=[...e.actions,...r.actions??[]]),e.hooks&&(r.hooks=r.hooks?{...e.hooks,...r.hooks}:e.hooks),e.options&&(r.options=r.options?{...e.options,...r.options}:e.options),t.set(e.name,{plugin:e,config:r}),a()},u=e=>{let n=t.get(e);n&&(n.config.cleanup&&n.config.cleanup(),t.delete(e),a())},d=()=>Array.from(t.keys()),f=(e,...n)=>{for(let{config:r}of t.values()){let t=r.hooks?.[e];t&&t(...n)}},p=(e,...n)=>{let r=!1;for(let{config:i}of t.values()){let t=i.hooks?.[e];t&&t(...n)===!0&&(r=!0)}return r},m=async(e,...n)=>{for(let{config:r}of t.values()){let t=r.hooks?.[e];t&&await t(...n)}},h=async(e,n,...r)=>{let i=n;for(let{config:n}of t.values()){let t=n.hooks?.[e];t&&(i=await t(i,...r))}return i},g=(e,n,...r)=>{let i=n;for(let{config:n}of t.values()){let t=n.hooks?.[e];t&&(i=t(i,...r))}return i},_={onActivate:()=>f(`onActivate`),onDeactivate:()=>f(`onDeactivate`),onElementHover:e=>f(`onElementHover`,e),onElementSelect:e=>{let n=!1,r;for(let{config:i}of t.values()){let t=i.hooks?.onElementSelect;if(t){let i=t(e);i===!0?n=!0:i instanceof Promise&&(n=!0,r=i)}}return{wasIntercepted:n,pendingResult:r}},onDragStart:(e,t)=>f(`onDragStart`,e,t),onDragEnd:(e,t)=>f(`onDragEnd`,e,t),onBeforeCopy:async e=>m(`onBeforeCopy`,e),transformCopyContent:async(e,t)=>h(`transformCopyContent`,e,t),onAfterCopy:(e,t)=>f(`onAfterCopy`,e,t),onCopySuccess:(e,t)=>f(`onCopySuccess`,e,t),onCopyError:e=>f(`onCopyError`,e),onStateChange:e=>f(`onStateChange`,e),onPromptModeChange:(e,t)=>f(`onPromptModeChange`,e,t),onSelectionBox:(e,t,n)=>f(`onSelectionBox`,e,t,n),onDragBox:(e,t)=>f(`onDragBox`,e,t),onGrabbedBox:(e,t)=>f(`onGrabbedBox`,e,t),onElementLabel:(e,t,n)=>f(`onElementLabel`,e,t,n),onContextMenu:(e,t)=>f(`onContextMenu`,e,t),onOpenFile:(e,t)=>p(`onOpenFile`,e,t),transformHtmlContent:async(e,t)=>h(`transformHtmlContent`,e,t),transformAgentContext:async(e,t)=>h(`transformAgentContext`,e,t),transformActionContext:e=>g(`transformActionContext`,e),transformOpenFileUrl:(e,t,n)=>g(`transformOpenFileUrl`,e,t,n)};return{register:l,unregister:u,getPluginNames:d,setOptions:c,store:r,hooks:_}},Lr=e=>`${e}-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,Rr=e=>{let t=e.bounds.x+e.bounds.width/2,n=e.bounds.width/2,r=e.mouseX===void 0?void 0:e.mouseX-t;return{id:Lr(`label`),bounds:e.bounds,boundsMultiple:e.boundsMultiple,tagName:e.tagName,componentName:e.componentName,status:e.status,createdAt:Date.now(),element:e.element,elements:e.elements,mouseX:e.mouseX,mouseXOffsetFromCenter:r,mouseXOffsetRatio:r!==void 0&&n>0?r/n:void 0,hideArrow:e.hideArrow}},zr=(e,t,n)=>{let r=new Map,i=e=>{let t=r.get(e);t!==void 0&&(window.clearTimeout(t),r.delete(e))},a=()=>{for(let e of r.values())window.clearTimeout(e);r.clear()},o=()=>{a(),e.clearLabelInstances(),n?.()},s=t=>{i(t);let n=window.setTimeout(()=>{e.updateLabelInstance(t,`fading`);let n=window.setTimeout(()=>{r.delete(t),e.removeLabelInstance(t)},125);r.set(t,n)},it);r.set(t,n)};return{createInstance:(t,n,r,i,a)=>{o();let s=Rr({bounds:t,tagName:n,componentName:r,status:i,element:a?.element,mouseX:a?.mouseX,elements:a?.elements,boundsMultiple:a?.boundsMultiple,hideArrow:a?.hideArrow});return e.addLabelInstance(s),s.id},createPerElementInstances:(t,n)=>{o();let r=[];for(let i of t){let t=Rr({bounds:U(i.element),tagName:i.tagName,componentName:i.componentName,status:n,element:i.element,mouseX:i.mouseX});e.addLabelInstance(t),r.push(t.id)}return r},updateAfterCopy:(t,n,r)=>{n?(e.updateLabelInstance(t,`copied`),s(t)):(i(t),e.updateLabelInstance(t,`error`,r||`Unknown error`))},markRetrying:t=>{i(t),e.updateLabelInstance(t,`copying`)},dismissInstance:t=>{i(t),e.removeLabelInstance(t)},cancelAllFades:a,clearAll:o,handleHoverChange:(e,n)=>{if(n){i(e);return}let r=t().find(t=>t.id===e);r&&(r.status===`copied`||r.status===`fading`)&&s(e)}}},$=e=>{let t=window.innerWidth,n=window.innerHeight,r=Math.max(0,e.x),i=Math.min(t,e.x+e.width),a=Math.max(0,e.y),o=Math.min(n,e.y+e.height);return{x:(r+i)/2,y:(a+o)/2}},Br=(e,t,n)=>{let r=[],i=(t,r)=>{let i=$(n(t)),a=ot(i.x,i.y).filter(e),o=a.indexOf(t);return o===-1?null:a[o+r]??null},a=e=>{let t=i(e,1);return t&&(r.push(e),r.length>50&&(r=r.slice(-50))),t},o=e=>{if(r.length>0){let e=r.pop();if(y(e))return e}return i(e,-1)},s=(e,n)=>{let i=e=>n?e.nextElementSibling:e.previousElementSibling,a=i(e);for(;a;){if(t(a))return r=[],a;a=i(a)}return null};return{findNext:(e,t)=>{switch(e){case`ArrowUp`:return a(t);case`ArrowDown`:return o(t);case`ArrowRight`:return s(t,!0);case`ArrowLeft`:return s(t,!1);default:return null}},clearHistory:()=>{r=[]}}},Vr=e=>{let{metaKey:t,ctrlKey:n,shiftKey:r,altKey:i}=Vn(e.activationKey);return{metaKey:t,ctrlKey:n,shiftKey:r,altKey:i}},Hr=()=>{let e=new WeakSet,t=Object.getOwnPropertyDescriptor(KeyboardEvent.prototype,`key`),n=!1;if(t?.get&&!t.get.__reactGrabPatched){n=!0;let r=t.get,i=function(){return e.has(this)?``:r.call(this)};i.__reactGrabPatched=!0,Object.defineProperty(KeyboardEvent.prototype,`key`,{get:i,configurable:!0})}return{claimedEvents:e,originalKeyDescriptor:t,restore:()=>{n&&t&&Object.defineProperty(KeyboardEvent.prototype,`key`,t)}}},Ur=(e,t)=>({top:t<25,bottom:t>window.innerHeight-25,left:e<25,right:e>window.innerWidth-25}),Wr=(e,t,n)=>{let r=null,i=()=>{if(!t()){a();return}let o=e(),s=Ur(o.x,o.y),c=0,l=0;if(s.top&&(l-=10),s.bottom&&(l+=10),s.left&&(c-=10),s.right&&(c+=10),c!==0||l!==0){let e=window.scrollX,t=window.scrollY;window.scrollBy(c,l);let r=window.scrollX-e,i=window.scrollY-t;(r!==0||i!==0)&&n?.({x:r,y:i})}r=s.top||s.bottom||s.left||s.right?Pe(i):null},a=()=>{r!==null&&(We(r),r=null)};return{start:i,stop:a,isActive:()=>r!==null}},Gr=()=>{let e=globalThis;return!!(e.chrome?.runtime?.id||e.browser?.runtime?.id)},Kr=e=>{try{let t=`0.1.48-dev.cac6157`,n=`data:image/svg+xml;base64,${btoa(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 294 294"><path fill="#ff40e0" d="M145 47c25-20 50-27 67-17 16 9 23 30 20 60 0 2-1 5-1 7l-2 13h-1l-12-4c-8-3-17-5-25-6l-17-3c-10-1-20-1-29-1-10 0-20 0-29 1-6 8-11 16-16 24-5 9-9 17-13 26 4 9 8 18 13 26s10 16 16 24l11 14c5 7 11 13 18 19l10 8s-1 0 0 0l-11 9c-17 14-35 22-49 22-6 0-13-2-18-5-16-9-23-30-20-59 1-3 1-5 1-8-30-12-48-29-48-50 0-18 14-35 41-47 2-1 5-2 7-3 0-2 0-5-1-7-3-30 4-51 20-60 18-10 42-3 68 17M71 201c-1 2-1 4-1 5-2 24 3 41 13 47h1c11 7 30 1 51-15-10-9-18-18-26-29-13-1-26-4-38-8m9-38c-3 9-5 17-7 26 8 2 17 4 25 6-3-5-6-10-9-16-3-5-6-10-9-16m-19-53c-2 1-3 1-5 2-21 10-34 23-34 35 0 13 14 27 39 37 3-12 7-25 12-37-5-12-9-24-12-37m37-10c-8 1-17 3-25 6 2 8 4 16 7 25 3-5 6-11 9-16zm-3-61c-4-1-8 0-12 2-10 7-15 24-13 47 0 2 0 3 1 5 12-4 25-6 38-8 8-10 16-20 26-29-15-11-29-17-40-17m111 2c-4-2-8-3-12-2-11 0-25 5-40 17 10 9 19 19 26 29 13 2 26 4 39 8v-5c3-23-2-40-13-47m-61 23c-7 6-13 13-19 19h37c-6-6-12-13-18-19"/><mask id="a"><path fill="#fff" d="m235 85-133 27 28 133 133-27Z"/></mask><path fill="#ff40e0" d="m137 130 76 11c8 1 9 11 3 15l-28 16-4 32c-1 8-10 10-14 4l-41-66c-3-6 1-13 8-12" mask="url(#a)"/></svg>`)}`;console.log(`%cReact Grab${` v${t}`}%c\nhttps://react-grab.com`,`background: #330039; color: #ffffff; border: 1px solid #d75fcb; padding: 4px 4px 4px 24px; border-radius: 4px; background-image: url("${n}"); background-size: 16px 16px; background-repeat: no-repeat; background-position: 4px center; display: inline-block; margin-bottom: 4px;`,``),e&&navigator.onLine&&!Gr()&&fetch(`https://www.react-grab.com/api/version?source=browser&v=${t}&t=${Date.now()}`,{referrerPolicy:`origin`,keepalive:!0,priority:`low`,cache:`no-store`}).then(e=>e.text()).then(e=>{e&&e!==t&&console.warn(`[React Grab] v${t} is outdated (latest: v${e}). Run \`npx grab@latest upgrade\` to upgrade.`)}).catch(()=>null)}catch{}},qr=e=>typeof e==`object`&&!!e,Jr=e=>{if(!qr(e))return null;let t={};return typeof e.enabled==`boolean`&&(t.enabled=e.enabled),(e.activationMode===`toggle`||e.activationMode===`hold`)&&(t.activationMode=e.activationMode),typeof e.keyHoldDuration==`number`&&Number.isFinite(e.keyHoldDuration)&&(t.keyHoldDuration=e.keyHoldDuration),typeof e.allowActivationInsideInput==`boolean`&&(t.allowActivationInsideInput=e.allowActivationInsideInput),typeof e.activationKey==`string`&&(t.activationKey=e.activationKey),typeof e.maxContextLines==`number`&&Number.isFinite(e.maxContextLines)&&(t.maxContextLines=e.maxContextLines),typeof e.freezeReactUpdates==`boolean`&&(t.freezeReactUpdates=e.freezeReactUpdates),typeof e.telemetry==`boolean`&&(t.telemetry=e.telemetry),Object.keys(t).length===0?null:t},Yr=()=>{if(typeof window>`u`)return null;try{let e=(document.currentScript instanceof HTMLScriptElement?document.currentScript:null)?.getAttribute(`data-options`);return e?Jr(JSON.parse(e)):null}catch{return null}},Xr=e=>e===`Enter`||e===`NumpadEnter`,Zr=(e,t)=>e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height,Qr=(e=>({name:e.name,setup:(t,n)=>({actions:[typeof e.contextMenuAction==`function`?e.contextMenuAction(t,n):e.contextMenuAction],cleanup:e.cleanup})}))({name:`copy`,contextMenuAction:{id:`copy`,label:`Copy`,shortcut:`C`,showInToolbarMenu:!0,onAction:e=>{e.copy?.()}}}),$r={name:`comment`,setup:()=>({actions:[{id:`comment`,label:`Comment`,shortcut:`Enter`,shortcutModifier:!1,showInToolbarMenu:!0,onAction:e=>{e.enterPromptMode?.()}}]})},ei={name:`edit`,setup:()=>({actions:[{id:`edit`,label:`Style`,shortcut:`S`,shortcutModifier:!1,showInToolbarMenu:!0,onAction:e=>{e.enterEditMode?.()}}]})},ti={name:`open`,actions:[{id:`open`,label:`Open`,shortcut:`O`,enabled:e=>!!e.filePath,onAction:e=>{e.filePath&&(e.hooks.onOpenFile(e.filePath,e.lineNumber)||rt(e.filePath,e.lineNumber,e.hooks.transformOpenFileUrl),e.hideContextMenu(),e.cleanup())}}]},ni=e=>{let t=e.left+e.width/2,n=e.top+e.height/2,r=n,i=window.innerHeight-n,a=t,o=window.innerWidth-t,s=Math.min(r,i,a,o);return s===r?`top`:s===a?`left`:s===o?`right`:`bottom`},ri=()=>{let[e,t]=k(!1),[n,r]=k(null),i=he(),a=()=>{let e=n();return y(e)?e:null},o=()=>{r(null),i.clear(),t(!1)};return{selectedElement:a,isPendingDismiss:e,select:(e,n)=>{r(e),t(!1),n?.shouldPromptBeforeMouseHandoff?i.arm():i.clear()},clear:o,consumeMouseHandoff:()=>i.consume()&&a()!==null,showDismissPrompt:()=>a()?e()?!1:(t(!0),!0):(o(),!1),takeSelection:e=>{let t=a()??(y(e)?e:null);return o(),t}}},ii=async(e,t={})=>(await Promise.allSettled(e.map(e=>ft(e,t)))).map(e=>e.status===`fulfilled`?e.value:``),ai=[Qr,ei,$r,ti];let oi=!1;const si=new Set,ci=e=>{if(typeof window>`u`)return dn();let t={enabled:!0,activationMode:`toggle`,keyHoldDuration:100,allowActivationInsideInput:!0,...Yr(),...e};if(t.enabled===!1||oi)return dn();oi=!0,tt(t.container??null),Kr(t.telemetry!==!1);let{enabled:n,telemetry:i,container:o,...u}=t;return ge(e=>{let t=!1,n,i=Ir(u),{store:o,actions:d,pointer:f,viewportVersion:p,current:m}=Ut({keyHoldDuration:i.store.options.keyHoldDuration??100}),h=S(()=>m().state===`holding`),g=S(()=>m().state===`active`),_=S(()=>{let e=m();return e.state===`active`&&e.phase===`frozen`}),b=S(()=>{let e=m();return e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)}),ae=S(()=>{if(!b())return!1;let e=Math.abs(f().x+window.scrollX-o.dragStart.x),t=Math.abs(f().y+window.scrollY-o.dragStart.y);return e>2||t>2}),oe=S(()=>{let e=m();return e.state===`active`&&e.phase===`dragging-reposition`}),se=S(()=>{let e=m();return e.state===`active`&&e.phase===`justDragged`}),x=S(()=>m().state===`copying`),le=S(()=>o.selectionInteractionLockDepth>0),C=S(()=>m().state===`justCopied`),w=S(()=>{let e=m();return e.state===`active`&&!!e.isPromptMode}),de=S(()=>o.pendingCommentMode||w()),pe=S(()=>{let e=m();return e.state===`active`&&!!e.isPromptMode&&!!e.isPendingDismiss}),E=(e,t)=>{document.body.style[e]=t};T(r(g,(e,t)=>{e&&!t?(nt(f().x,f().y),E(`touchAction`,`none`)):!e&&t&&(Je(),E(`touchAction`,``))}));let he=ue(),[D,ge]=k(he?!he.collapsed:!0),[_e,ve]=k(0),[be,we]=k(0),[Ee,De]=k(he),[Oe,je]=k(!1),Le=me(e=>e.shiftKey),[ze,Ve]=k(null),[He,Ue]=k(null),[Ge,M]=k(null),N=Mr({store:o,actions:d,isActivated:g,activateRenderer:()=>lr(),deactivateRenderer:()=>Q(),performCopyWithLabel:e=>_n(e),onOpen:()=>{oa(),P?.(),P=aa(ia,Ue)},onClose:()=>{P?.(),P=null,Ue(null)}}),dt=S(()=>o.contextMenuPosition!==null||N.isOpen()),ft=S(()=>dt()||ze()!==null),pt,gt=null,P=null,vt=!1,F=new WeakMap,I=ri(),yt=()=>!D()||w()||le()||dt()||I.isPendingDismiss(),bt=()=>{F=new WeakMap},L=()=>{Pt(!1),bt()},xt=e=>{let t=Ee()??ue(),n={edge:t?.edge??`bottom`,ratio:t?.ratio??.5,collapsed:t?.collapsed??!1,enabled:t?.enabled??!0,defaultAction:t?.defaultAction??`copy`,...e};ie(n),De(n);for(let e of si)e(n)},St=()=>{V.timerId!==null&&(clearTimeout(V.timerId),V.timerId=null)},Ct=()=>{V.copyWaiting=!1,V.holdTimerFired=!1,V.startTimestamp=null};T(()=>{if(m().state!==`holding`){St();return}V.startTimestamp=Date.now(),V.timerId=window.setTimeout(()=>{if(V.timerId=null,V.copyWaiting){V.holdTimerFired=!0;return}d.activate()},o.keyHoldDuration),O(St)}),T(()=>{let e=m();if(e.state!==`active`||e.phase!==`justDragged`)return;let t=setTimeout(()=>{d.finishJustDragged()},it);O(()=>clearTimeout(t))}),T(()=>{if(m().state!==`justCopied`)return;let e=setTimeout(()=>{d.finishJustCopied()},it);O(()=>clearTimeout(e))}),T(r(h,(e,t=!1)=>{!t||e||!g()||(i.store.options.activationMode!==`hold`&&d.setWasActivatedByToggle(!0),i.hooks.onActivate())}));let wt=(e,t,n)=>{Et(e,t,n),d.clearInputText()},Tt=()=>{let e=o.frozenElement||X();e&&d.enterPromptMode({x:f().x,y:f().y},e)},Et=(e,t,n)=>{d.setCopyStart({x:t,y:n},e)},R={lastDetectionTimestamp:0,pendingDetectionScheduledAt:0,latestPointerX:0,latestPointerY:0},z=null,[Dt,Ot]=k(null),[kt,At]=k(0),jt=(e,t)=>{z!==null&&clearTimeout(z),Ot(null),z=window.setTimeout(()=>{Ot({x:e,y:t}),z=null},32)},Mt=()=>{z!==null&&(clearTimeout(z),z=null),Ot(null),Qn()},B=null,V={timerId:null,startTimestamp:null,copyWaiting:!1,holdTimerFired:!1},H=null,[Nt,Pt]=k(!1),Ft=0,It=!1,Lt=null,Rt=()=>{It=!0,Lt!==null&&window.clearTimeout(Lt),Lt=window.setTimeout(()=>{It=!1,Lt=null},it)},zt=()=>{Lt!==null&&(window.clearTimeout(Lt),Lt=null),It=!1},G=0,Bt=null,K=null,[Vt,Ht]=k(!1),[Wt,Gt]=k(null),[Jt,Yt]=k(null),[Xt,Zt]=qt(Jt),Qt=S(()=>N.isOpen()?Ne:de()?ke:Vt()?Wt():g()?Te:null),$t=e=>Pn(e,Qe),en=Br(Qe,$t,U),tn=Wr(f,()=>b(),e=>{if(oe()){if(d.shiftDragStart(e),H){H={x:H.x+e.x,y:H.y+e.y};return}let{pageX:t,pageY:n}=Gn(f().x,f().y);H={x:t,y:n}}}),q=S(()=>g()&&!x()),nn=new Map,rn=(e,t)=>{let n=Lr(`grabbed`),r={id:n,bounds:e,createdAt:Date.now(),element:t};d.addGrabbedBox(r),i.hooks.onGrabbedBox(e,t);let a=window.setTimeout(()=>{nn.delete(n),d.removeGrabbedBox(n)},it+125);nn.set(n,a)},an=async e=>{let t=await Promise.all(e.map(async e=>{let t=await lt(e),n=t?.componentName??null,r=t?.filePath,i=t?.lineNumber??void 0,a=t?.columnNumber??void 0;n||=mt(e);let o=e instanceof HTMLElement?e.innerText?.slice(0,100):void 0;return{tagName:j(e),id:e.id||void 0,className:e.getAttribute(`class`)||void 0,textContent:o,componentName:n??void 0,filePath:r,lineNumber:i,columnNumber:a}}));window.dispatchEvent(new CustomEvent(`react-grab:element-selected`,{detail:{elements:t}}))},on=new Map,J=zr(d,()=>o.labelInstances,()=>on.clear()),sn=async(e,t)=>{let n=!1,r;try{n=await e(),n||(r=`Failed to copy`)}catch(e){r=pn(e,`Action failed`)}if(t)for(let e of t)J.updateAfterCopy(e,n,r);return n},cn=(e,t,n,r)=>{if(e){for(let e of n)on.delete(e);return}let i={operation:t,siblingIds:new Set(n),shouldDeactivateAfter:r};for(let e of n)on.set(e,i)},ln=async(e,t,n)=>{zt(),m().state!==`copying`&&d.startCopy();let r=await sn(e,t);t&&cn(r,e,t,!!n),m().state===`copying`&&(r&&d.completeCopy(),n?Q():r?(d.activate(),Rt()):(d.activate(),d.unfreeze()))},Y=e=>{let t=on.get(e);if(!t)return;let n=[...t.siblingIds];for(let e of n)J.markRetrying(e),on.delete(e);ln(t.operation,n,t.shouldDeactivateAfter)},dn=e=>{on.get(e)?.siblingIds.delete(e),on.delete(e),J.dismissInstance(e)},mn=(e,t,n)=>{let r=e[0],a=n??(r?mt(r):null),o=r?j(r):null,s=a??o??void 0;return yn({getContent:i.store.options.getContent,componentName:s,maxContextLines:i.store.options.maxContextLines},i.hooks,e,t)},hn=async(e,t,n)=>{if(e.length===0)return!1;let r=[],a=[];for(let t of e){let{wasIntercepted:e,pendingResult:n}=i.hooks.onElementSelect(t);e||r.push(t),n&&a.push(n),i.store.theme.grabbedBoxes.enabled&&rn(U(t),t)}await st();let o=!0;if(r.length>0&&(o=await mn(r,t,n)),a.length>0&&!(await Promise.all(a)).every(Boolean))throw new ut;return an(e),o},gn=e=>{ct(e.primaryElement).then(async t=>{await ln(()=>hn(e.targetElements,e.extraPrompt,t??void 0),e.labelInstanceIds.length>0?e.labelInstanceIds:null,e.shouldDeactivateAfter),e.onComplete?.()}).catch(t=>{let n=pn(t,`Action failed`);for(let t of e.labelInstanceIds)J.updateAfterCopy(t,!1,n);e.labelInstanceIds.length>0&&cn(!1,()=>ct(e.primaryElement).then(t=>hn(e.targetElements,e.extraPrompt,t??void 0)),e.labelInstanceIds,!!e.shouldDeactivateAfter),m().state===`copying`&&(e.shouldDeactivateAfter?Q():(d.activate(),d.unfreeze()))})},_n=e=>{let{element:t,cursorX:n,selectedElements:r,extraPrompt:i,shouldDeactivateAfter:a,onComplete:s,dragRect:c}=e,l=r??[t],u=c??o.frozenDragRect,f=l.length>1,p=!f&&t===Nn()?Wn():void 0,m=u&&f?On(u):p??U(t),h=f?m.x+m.width/2:n,g=j(t);zt(),d.startCopy();let _=g?J.createInstance(m,g,void 0,`copying`,{element:t,mouseX:h,elements:r}):null;gn({primaryElement:t,targetElements:l,labelInstanceIds:_?[_]:[],extraPrompt:i,shouldDeactivateAfter:a,onComplete:s})},vn=e=>{let{elements:t,labelEntries:n,shouldDeactivateAfter:r,onComplete:i}=e,a=t[0];zt(),d.startCopy(),gn({primaryElement:a,targetElements:t,labelInstanceIds:J.createPerElementInstances(n,`copying`),shouldDeactivateAfter:r,onComplete:i})},X=S(()=>{if(p(),!q()||ae()||le()||I.isPendingDismiss())return null;let e=o.detectedElement;return y(e)?e:null}),bn=S(()=>o.frozenElement||(_()?null:X())),xn=S(()=>!g()||w()||Nt()||x()||ft()||I.isPendingDismiss()?null:Le()?_()?bn():X()??o.frozenElement:I.selectedElement()),Sn=S(()=>{let e=xn();return e?jn(e,Qe,$t):[]}),Cn=S(()=>{let e=xn();return e?Math.max(0,Sn().findIndex(t=>t.element===e)):0}),wn=S(()=>xn()!==null);T(()=>{if(!o.detectedElement)return;let e=setInterval(()=>{y(o.detectedElement)||d.relinkLiveElements(),y(o.detectedElement)||yi()},100);O(()=>clearInterval(e))}),T(r(bn,e=>{if(Bt!==null&&(clearTimeout(Bt),Bt=null),!e){Yt(null);return}Bt=window.setTimeout(()=>{Bt=null,Yt(e)},100)})),O(()=>{Bt!==null&&(clearTimeout(Bt),Bt=null)}),T(()=>{let e=o.frozenElements;O($e(e))}),T(r(g,e=>{e&&i.store.options.freezeReactUpdates&&O(at())}));let Mn=()=>{if(o.isTouchMode&&b()){let e=o.detectedElement;return!y(e)||Ke(e)?void 0:e}let e=bn();if(!(!e||Ke(e)))return e},Nn=S(()=>Mn()),Fn=()=>Nn()?o.isTouchMode&&b()?q():q()&&!ae():!1,Ln=ye(()=>o.frozenElements,e=>S(()=>(p(),U(e)))),Rn=S(()=>{let e=o.frozenElements;if(e.length===0)return[];let t=o.frozenDragRect;return t&&e.length>1?[On(t)]:Ln().map(e=>e())}),zn=S(()=>{if(!Nt()||o.pendingCommentMode||Vt())return null;let e=o.detectedElement;return!y(e)||Ke(e)||o.frozenElements.includes(e)?null:e}),Vn=S(()=>{p();let e=zn();if(e)return U(e)}),Wn=S(()=>{p();let e=o.frozenElements;if(e.length>0){let t=Rn();if(e.length===1){let e=t[0];if(e)return e}let n=o.frozenDragRect;return n?t[0]??On(n):An(Un(t))}let t=Nn();if(t)return U(t)}),Gn=(e,t)=>({pageX:e+window.scrollX,pageY:t+window.scrollY}),Kn=(e,t)=>{let{pageX:n,pageY:r}=Gn(e,t);return{x:Math.abs(n-o.dragStart.x),y:Math.abs(r-o.dragStart.y)}},qn=(e,t)=>{let{pageX:n,pageY:r}=Gn(e,t),i=Math.min(o.dragStart.x,n),a=Math.min(o.dragStart.y,r),s=Math.abs(n-o.dragStart.x),c=Math.abs(r-o.dragStart.y);return{x:i-window.scrollX,y:a-window.scrollY,width:s,height:c}},Jn=e=>e.code===`Space`||e.key===` `,Yn=()=>{if(!b())return;d.startDragReposition();let{pageX:e,pageY:t}=Gn(f().x,f().y);H={x:e,y:t}},Xn=()=>{d.stopDragReposition(),H=null},Zn=S(()=>{if(p(),ae())return An(qn(f().x,f().y))}),Qn=S(()=>{if(kt(),!ae())return[];let e=Dt();if(!e)return[];let t=qn(e.x,e.y),n=Tn(t,Qe);return n.length>0?n:Tn(t,Qe,!1)}),$n=S(()=>(p(),Qn().map(e=>U(e)))),er=S(()=>{let e=$n();if(e.length>0)return e;let t=Vn();return t?[...Rn(),t]:Rn()}),tr=ye(()=>o.frozenElements,e=>{let t=j(e)||`element`,n=mt(e)??void 0;return S(()=>{if(p(),!y(e))return null;let r=U(e),i=F.get(e);return{tagName:t,componentName:n,bounds:r,mouseX:i===void 0?void 0:r.x+r.width*i}})}),nr=S(()=>{if(w()||o.frozenElements.length<2)return[];let e=[];for(let t of tr()){let n=t();n!==null&&e.push(n)}return e}),rr=S(()=>{if(w())return null;let e=zn();return e?(p(),{tagName:j(e)||`element`,componentName:mt(e)??void 0,bounds:U(e),mouseX:f().x}):null}),ir=S(()=>{if(x()||w()){p();let e=o.frozenElement||X();return e?{x:W(U(e)).x+o.copyOffsetFromCenterX,y:o.copyStart.y}:{x:o.copyStart.x,y:o.copyStart.y}}return{x:f().x,y:f().y}}),ar=S(()=>{if(!Nt()||o.frozenElements.length!==1)return;p();let e=o.frozenElements[0];if(!y(e))return;let t=F.get(e);if(t===void 0)return;let n=U(e);return n.x+n.width*t});T(r(()=>[X(),o.lastGrabbedElement],([e,t])=>{t&&e&&t!==e&&d.setLastGrabbed(null),e&&i.hooks.onElementHover(e)})),T(r(()=>X(),e=>{let t=++G,n=()=>{G===t&&d.setSelectionSource(null,null)};if(!e){n();return}lt(e).then(e=>{if(G===t){if(!e){n();return}d.setSelectionSource(e.filePath,e.lineNumber)}}).catch(()=>{G===t&&d.setSelectionSource(null,null)})}));let or=S(()=>o.grabbedBoxes.map(e=>({id:e.id,bounds:e.bounds,createdAt:e.createdAt}))),sr=S(()=>o.labelInstances.map(e=>({id:e.id,status:e.status,tagName:e.tagName,componentName:e.componentName,createdAt:e.createdAt})));T(r(S(()=>{let e=g(),t=b(),n=x(),r=w(),a=X(),s=Zn(),c=i.store.theme.enabled,l=i.store.theme.selectionBox.enabled,u=i.store.theme.dragBox.enabled,d=ae(),f=bn(),p=C();return{isActive:e,isDragging:t,isCopying:n,isPromptMode:r,isSelectionBoxVisible:!!(c&&l&&e&&!n&&!p&&!t&&f!=null),isDragBoxVisible:!!(c&&u&&e&&!n&&d),targetElement:a,dragBounds:s?{x:s.x,y:s.y,width:s.width,height:s.height}:null,grabbedBoxes:[...or()],labelInstances:[...sr()],selectionFilePath:o.selectionFilePath,toolbarState:Ee()}}),e=>{i.hooks.onStateChange(e)})),T(r(()=>{let e=w();return{inputMode:e,position:e?f():a(f),target:e?X():a(X)}},({inputMode:e,position:t,target:n})=>{i.hooks.onPromptModeChange(e,{x:t.x,y:t.y,targetElement:n})})),T(r(()=>[Ii(),Wn(),X()],([e,t,n])=>{i.hooks.onSelectionBox(!!e,t??null,n)})),T(r(()=>[Ui(),Zn()],([e,t])=>{i.hooks.onDragBox(!!e,t??null)})),T(r(()=>{let e=Gi();return[e,Wi(),e?ir():a(ir),e?X():a(X),o.selectionFilePath,o.selectionLineNumber]},([e,t,n,r,a,o])=>{i.hooks.onElementLabel(e,t,{x:n.x,y:n.y,content:``,element:r??void 0,tagName:r&&j(r)||void 0,filePath:a??void 0,lineNumber:o??void 0})}));let Z=null,cr=e=>{if(e){if(!Z){Z=document.createElement(`style`),Z.setAttribute(`data-react-grab-cursor`,``);let e=xe();e&&(Z.nonce=e),Xe(Z),document.head.appendChild(Z)}Z.textContent=`* { cursor: ${e} !important; }`}else Z&&=(Z.remove(),null)};T(r(()=>[g(),x(),w()],([e,t,n])=>{cr(t?`progress`:e&&!n?`crosshair`:null)}));let lr=()=>{let e=h();d.activate(),e||i.hooks.onActivate()},Q=()=>{let e=b(),t=o.previouslyFocusedElement;Xn(),d.deactivate(),N.resetWithDiscard(),oa(),L(),qr(),I.clear(),Ht(!1),Gt(null),e&&(E(`userSelect`,``),Mt()),B&&window.clearTimeout(B),tn.stop(),t instanceof HTMLElement&&t!==document.body&&t!==document.activeElement&&y(t)&&t.focus({preventScroll:!0}),i.hooks.onDeactivate()},ur=()=>{h()&&d.releaseHold(),g()&&Q(),zt()},dr=()=>{d.setWasActivatedByToggle(!0),lr()},fr=()=>{let e=[...o.frozenElements],t=o.frozenElement||X(),n=w()?o.inputText.trim():``;if(!t){Q();return}let r=e.length>0?e:[t],i=r.map(e=>U(e))[0],{x:a,y:s}=W(i),c=a+o.copyOffsetFromCenterX;d.setPointer({x:a,y:s}),d.exitPromptMode(),d.clearInputText(),_n({element:t,cursorX:c,selectedElements:r,extraPrompt:n||void 0,shouldDeactivateAfter:!0})},pr=()=>{if(w()){if(pe()){d.clearInputText(),Q();return}d.setPendingDismiss(!0),we(e=>e+1)}},mr=()=>{if(I.isPendingDismiss()){Qr();return}d.clearInputText(),Q()},hr=()=>{d.setPendingDismiss(!1)},gr=()=>{if(N.isOpen()){N.dismiss();return}let e=o.frozenElement||X();e&&N.trigger(e,{x:f().x,y:f().y})},_r=(e,t)=>{if(!N.isOpen()||o.contextMenuPosition!==null)return!1;let n=ot(e,t).find(Qe);if(!n)return!1;let r=N.switchToElement(n,{x:e,y:t});return r&&Ie([n]),r},vr=e=>({filePath:o.selectionFilePath??void 0,lineNumber:o.selectionLineNumber??void 0,componentName:Xt(),tagName:j(e)||void 0}),yr=()=>{K=null,Ht(!1),d.setPendingCommentMode(!1),Gt(null)},br=e=>{let t=o.frozenElement||X();if(!t)return!1;let n={x:f().x,y:f().y},r=i.store.actions.find(t=>t.id===e);return r?e===`edit`?N.trigger(t,n,vr(t))?(d.clearInputText(),d.exitPromptMode(),yr(),!0):!0:(d.clearInputText(),d.exitPromptMode(),yr(),r.onAction(li(t,n)),!0):(d.clearInputText(),d.exitPromptMode(),yr(),la(Te),wr(t,n),!0)},xr=e=>{if(g()){if(Qt()!==e&&w()&&br(e))return;if(Qt()!==e&&o.pendingCommentMode){d.setPendingCommentMode(!1),K=e,Gt(e),Ht(!0);return}if(Qt()!==e&&Vt()){K=e,Gt(e);return}Q();return}D()&&(K=e,Gt(e),Ht(!0),dr())},Sr=()=>{xr(Ee()?.defaultAction??`copy`)},Cr=(e,t,n)=>{yr(),d.clearInputText(),d.enterPromptMode({x:t,y:n},e)},wr=(e,t)=>{L(),sa(),d.showContextMenu(t,e),qr(),i.hooks.onContextMenu(e,t)},Tr=(e,t)=>{let n=K;if(K=null,Gt(null),!n)return;if(n===`edit`){N.trigger(e,t,vr(e));return}let r=i.store.actions.find(e=>e.id===n);if(!r){la(Te),wr(e,t);return}r.onAction(li(e,t))},Er=()=>{if(D()){if(g()&&de()){Q();return}d.setPendingCommentMode(!0),g()||dr()}},Dr=(e,t,n)=>{let r=n&&Nt()&&!b()&&!o.pendingCommentMode&&!Vt();if(yt()||_()&&!r)return;if(d.setPointer({x:e,y:t}),R.latestPointerX=e,R.latestPointerY=t,r){let n=Ze(e,t);n!==o.detectedElement&&d.setDetectedElement(n);return}let i=performance.now(),a=R.pendingDetectionScheduledAt>0&&i-R.pendingDetectionScheduledAt<200;if(!ae()&&i-R.lastDetectionTimestamp>=32&&!a&&(R.lastDetectionTimestamp=i,R.pendingDetectionScheduledAt=i,setTimeout(()=>{if(yt()||ae()){R.pendingDetectionScheduledAt=0;return}let e=Ze(R.latestPointerX,R.latestPointerY);e!==o.detectedElement&&d.setDetectedElement(e),R.pendingDetectionScheduledAt=0})),b()){if(oe()){let{pageX:n,pageY:r}=Gn(e,t);H&&d.shiftDragStart({x:n-H.x,y:r-H.y}),H={x:n,y:r}}jt(e,t);let n=Ur(e,t),r=n.top||n.bottom||n.left||n.right;r&&!tn.isActive()?tn.start():!r&&tn.isActive()&&tn.stop()}},Or=(e,t,n)=>{if(!q()||le())return!1;!n&&Nt()&&L();let r=I.selectedElement()!==null;return d.startDrag({x:e,y:t},n||r),d.setPointer({x:e,y:t}),E(`userSelect`,`none`),jt(e,t),i.hooks.onDragStart(e+window.scrollX,t+window.scrollY),!0},kr=(e,t)=>{let n=o.frozenElements.includes(e),r=o.frozenElements.length===0;if(!n){let n=En(U(e),t);F.set(e,n),r&&Zt(mt(e)??void 0)}d.toggleFrozenElement(e),Be();let i=o.frozenElements.includes(e);if(i||F.delete(e),o.frozenElements.length===0){L(),d.unfreeze();return}Ie(o.frozenElements),Pt(!0),d.setPointer(t),d.setLastGrabbed(i?e:o.frozenElements[o.frozenElements.length-1]),d.freeze(),qr()},Ar=()=>{let e=o.frozenElements.filter(y),t=e.map(e=>{let t=j(e)||`element`,n=mt(e)??void 0,r=F.get(e),i=U(e);return{element:e,tagName:t,componentName:n,mouseX:r===void 0?i.x+i.width/2:i.x+i.width*r}});if(L(),e.length===0){d.unfreeze();return}if(e.length===1){_n({element:e[0],cursorX:t[0].mouseX,selectedElements:e,shouldDeactivateAfter:o.wasActivatedByToggle});return}vn({elements:e,labelEntries:t,shouldDeactivateAfter:o.wasActivatedByToggle})},jr=(e,t,n)=>{let r=Tn(e,Qe),a=r.length>0?r:Tn(e,Qe,!1);if(a.length===0)return;let s=n&&!o.pendingCommentMode&&!Vt();if(s&&d.addFrozenElements(a),Ie(s?o.frozenElements:a),i.hooks.onDragEnd(a,e),s){let e=a[a.length-1];Pt(!0),Be(),d.setPointer(W(U(e))),d.setLastGrabbed(e),d.freeze(),qr();return}let c=a[0],l=W(U(c));d.setPointer(l),d.setFrozenElements(a);let u=kn(e);if(d.setFrozenDragRect(u),d.freeze(),d.setLastGrabbed(c),o.pendingCommentMode){Cr(c,l.x,l.y);return}if(Vt()){Ht(!1),K?Tr(c,l):wr(c,l);return}let f=o.wasActivatedByToggle&&!t;_n({element:c,cursorX:l.x,selectedElements:a,shouldDeactivateAfter:f,dragRect:u})},Nr=e=>{for(let t of o.frozenElements)if(y(t)&&Zr(e,U(t)))return t;return null},Pr=(e,t,n,r)=>{let a=y(o.frozenElement)?o.frozenElement:null,s=I.selectedElement(),c=()=>ot(e,t).find(Qe)??null;if(r&&!o.pendingCommentMode&&!Vt()){let n=c();n!==null&&kr(n,{x:e,y:t});return}let l=c()??(y(o.detectedElement)?o.detectedElement:null),u=s??l??a;if(!u)return;let p,m,h=l===null&&a===u,g=s===u;if(h)p=f().x,m=f().y;else if(g){let e=W(U(u));p=e.x,m=e.y}else p=e,m=t;if(o.pendingCommentMode){Cr(u,p,m),I.clear();return}if(Vt()){Ht(!1);let{wasIntercepted:e}=i.hooks.onElementSelect(u);if(e)return;I.clear(),Ie([u]),d.setFrozenElement(u);let t={x:p,y:m};d.setPointer(t),d.freeze(),K?Tr(u,t):wr(u,t);return}let _=o.wasActivatedByToggle&&!n;d.setLastGrabbed(u),_n({element:u,cursorX:p,shouldDeactivateAfter:_}),I.clear()},Fr=()=>{b()&&(Xn(),Mt(),d.cancelDrag(),tn.stop(),E(`userSelect`,``),yi())},Rr=(e,t,n,r)=>{if(!b())return;Mt();let i=Kn(e,t),a=i.x>2||i.y>2,o=a?qn(e,t):null;a?d.endDrag():d.cancelDrag(),Xn(),tn.stop(),E(`userSelect`,``),o?jr(o,n,r):Pr(e,t,n,r)},$=fn(),Gr=Hr(),Kr=e=>{let t;try{t=Gr.originalKeyDescriptor?.get?Gr.originalKeyDescriptor.get.call(e):e.key}catch{return!1}let n=t===`Enter`||Xr(e.code),r=g()||h();return n&&r&&!w()&&!I.isPendingDismiss()&&!o.wasActivatedByToggle?s(e,`data-react-grab-input`)?!1:(Gr.claimedEvents.add(e),e.preventDefault(),e.stopImmediatePropagation(),!0):!1};$.addDocumentListener(`keydown`,A(Kr),{capture:!0}),$.addDocumentListener(`keyup`,A(Kr),{capture:!0}),$.addDocumentListener(`keypress`,A(Kr),{capture:!0});let qr=()=>{en.clearHistory(),I.clear()},Jr=(e,t=!1)=>{d.setFrozenElement(e),d.freeze(),I.select(e,{shouldPromptBeforeMouseHandoff:t});let n=W(U(e));d.setPointer(n),o.contextMenuPosition!==null&&d.showContextMenu(n,e)},Yr=()=>{I.showDismissPrompt()&&we(e=>e+1)},Qr=()=>{I.clear(),d.unfreeze(),qr()},$r=()=>{let e=I.takeSelection(o.frozenElement);if(!e){Qr();return}let t=W(U(e));qr(),d.setLastGrabbed(e),_n({element:e,cursorX:t.x,shouldDeactivateAfter:o.wasActivatedByToggle})},ei=e=>Se.has(e.key)?e.key:e.key===`Tab`?e.shiftKey?`ArrowLeft`:`ArrowRight`:null,ti=(e,t={})=>{if(!g()||w()||Nt()||I.isPendingDismiss()&&!t.allowPendingKeyboardSelection)return!1;let n=ei(e);if(!n||ft())return!1;let r=bn(),i=!r;if(!r){let e=Me()?.getBoundingClientRect();r=e?Ze(e.left+e.width/2,e.top+e.height/2):Ze(window.innerWidth/2,window.innerHeight/2)}if(!r)return!1;let a=n===`ArrowUp`||n===`ArrowDown`,o=en.findNext(n,r);if(!o&&!a&&!i)return!1;let s=o??r;return e.preventDefault(),e.stopPropagation(),Jr(s,!0),!0},ii=e=>e.metaKey||e.ctrlKey||e.altKey||e.repeat||v(e)||!g()||x()||le()||ft()?null:o.frozenElement||X(),ci=e=>{let t=ii(e);if(!t)return null;let n=fe(i.store.actions,e);return n?{element:t,action:n}:null},li=(e,t)=>{let n=U(e);return ea({element:e,filePath:o.selectionFilePath??void 0,lineNumber:o.selectionLineNumber??void 0,tagName:j(e)||void 0,componentName:Xt(),position:t,shouldDeferHideContextMenu:!1,performWithFeedbackOptions:{fallbackBounds:n,fallbackSelectionBounds:[n],position:t}})},ui=/^[a-zA-Z0-9-]$/,di=e=>{if(!e.key||e.key.length!==1||!ui.test(e.key))return!1;let t=ii(e);return!t||!N.trigger(t,{x:f().x,y:f().y},{initialSearchQuery:e.key})?!1:(yr(),e.preventDefault(),e.stopImmediatePropagation(),!0)},fi=e=>{let t=ci(e);if(!t)return!1;let{element:n,action:r}=t;if(w())return br(r.id)?(e.preventDefault(),e.stopImmediatePropagation(),!0):!1;let i={x:f().x,y:f().y};return r.onAction(li(n,i)),e.preventDefault(),e.stopImmediatePropagation(),!0},pi=e=>{if(e.key?.toLowerCase()!==`o`||!g()||!(e.metaKey||e.ctrlKey))return!1;let t=o.selectionFilePath,n=o.selectionLineNumber;return t?(e.preventDefault(),e.stopPropagation(),i.hooks.onOpenFile(t,n??void 0)||rt(t,n??void 0,i.hooks.transformOpenFileUrl),!0):!1},mi=e=>{if(!g()||x()||o.contextMenuPosition!==null||N.isOpen())return!1;let t=e.key===`F10`&&e.shiftKey,n=e.key===`ContextMenu`;if(!t&&!n)return!1;let r=o.frozenElements,i=r.length>1,a=(i?r[0]:null)||o.frozenElement||X();if(!a)return!1;e.preventDefault(),e.stopPropagation();let s=W(U(a));return i?Ie(r):(Ie([a]),d.setFrozenElement(a)),d.setPointer(s),d.freeze(),wr(a,s),!0},hi=S(()=>Sn().map(e=>({tagName:j(e.element)||`element`,componentName:mt(e.element)??void 0,depth:e.depth,isLast:e.isLast}))),gi=S(()=>({items:hi(),activeIndex:Cn()})),_i=e=>{if(!(!i.store.options.allowActivationInsideInput&&v(e))&&!(!Hn(e,i.store.options)&&((e.metaKey||e.ctrlKey)&&!qe.includes(e.key)&&!Xr(e.code)&&(g()&&!o.wasActivatedByToggle?Q():h()&&(St(),Ct(),d.releaseHold())),!Xr(e.code)||!h()))){if((g()||h())&&!w()&&(e.preventDefault(),Xr(e.code)&&e.stopImmediatePropagation()),g()){if(o.wasActivatedByToggle&&i.store.options.activationMode!==`hold`||e.repeat)return;B!==null&&window.clearTimeout(B),B=window.setTimeout(()=>{Q()},200);return}if(h()&&e.repeat){if(V.copyWaiting){let e=V.holdTimerFired;Ct(),e&&d.activate()}return}if(!(x()||C())&&!h()){let t=i.store.options.keyHoldDuration??100;v(e)?ee(e)?t+=600:t+=400:c()&&(t+=600),Ct(),d.startHold(t)}}},vi=e=>{if(!I.isPendingDismiss())return!1;if(Xr(e.code))return!0;let t=Se.has(e.key),n=ci(e)!==null;return!t&&!n?!1:t?ti(e,{allowPendingKeyboardSelection:!0}):fi(e)?(qr(),!0):!1};$.addWindowListener(`keydown`,A(e=>{if(ei(e)&&v(e)||vi(e))return;if(Kr(e),!D()){Hn(e,i.store.options)&&!e.repeat&&ve(e=>e+1);return}let t=Xr(e.code)&&h()&&!w(),n=s(e,Ye);if(w()&&Hn(e,i.store.options)&&!e.repeat&&!n){e.preventDefault(),e.stopPropagation(),pr();return}if(e.key===`Escape`&&ft()){ze()!==null&&oa();return}let r=s(e,`data-react-grab-ignore-events`)&&!t;if(w()||r)return w()&&!n&&fi(e)||(e.key===`Escape`&&(w()?pr():o.wasActivatedByToggle&&Q()),r&&Se.has(e.key)&&ti(e)),void 0;if(b()&&Jn(e)){e.repeat||Yn(),e.preventDefault(),e.stopPropagation();return}if(e.key===`Escape`&&(h()||o.wasActivatedByToggle)){Q();return}g()&&!qe.includes(e.key)&&e.preventDefault();let a=Date.now()-Ft<200;ti(e)||pi(e)||mi(e)||fi(e)||di(e)||a||_i(e)}),{capture:!0}),$.addWindowListener(`keyup`,A(e=>{if(Kr(e))return;if(Jn(e)&&oe()&&(Xn(),e.preventDefault(),e.stopPropagation()),e.key===`Shift`&&Nt()){b()&&Fr(),Ar();return}if(s(e,`data-react-grab-ignore-events`))return;let t=Vr(i.store.options),n=t.metaKey||t.ctrlKey?l()?!e.metaKey:!e.ctrlKey:t.shiftKey&&!e.shiftKey||t.altKey&&!e.altKey,r=i.store.options.activationKey?typeof i.store.options.activationKey==`function`?i.store.options.activationKey(e):Bn(i.store.options.activationKey)(e):In(e.key,e.code);if(C()||It){(r||n)&&(zt(),Q());return}if(!h()&&!g()||w())return;let a=!!i.store.options.activationKey,c=i.store.options.activationMode===`hold`,u=b();if(g()){let e=dt();if(n){if(o.wasActivatedByToggle&&i.store.options.activationMode!==`hold`||e)return;Q()}else if(c&&r){if(B!==null&&(window.clearTimeout(B),B=null),e||u)return;Q()}else !a&&r&&B!==null&&(window.clearTimeout(B),B=null);return}if(r||n){if(o.wasActivatedByToggle&&i.store.options.activationMode!==`hold`)return;if(h()||V.holdTimerFired&&n){St();let t=(V.startTimestamp?Date.now()-V.startTimestamp:0)>=200,n=V.holdTimerFired&&t&&(i.store.options.allowActivationInsideInput||!v(e));Ct(),n?d.activate():d.releaseHold()}else Q()}}),{capture:!0}),$.addDocumentListener(`copy`,()=>{h()&&(V.copyWaiting=!0)}),$.addWindowListener(`keypress`,A(Kr),{capture:!0}),$.addWindowListener(`pointermove`,A(e=>{if(!e.isPrimary)return;let t=e.pointerType===`touch`;if(d.setTouchMode(t),!s(e,`data-react-grab-ignore-events`)&&!yt()&&!(t&&!h()&&!g())){if((t?h():g())&&!w()&&_()&&!e.shiftKey&&!Nt()){if(I.consumeMouseHandoff()){Yr();return}d.unfreeze(),qr()}Dr(e.clientX,e.clientY,e.shiftKey)}}),{passive:!0,capture:!0}),$.addWindowListener(`pointerdown`,A(e=>{if(e.button===0&&e.isPrimary&&(d.setTouchMode(e.pointerType===`touch`),vt=!1,!s(e,`data-react-grab-ignore-events`))){if(dt()){_r(e.clientX,e.clientY)&&(vt=!0,e.preventDefault(),e.stopImmediatePropagation());return}if(w()){let t=Wn();t&&e.clientX>=t.x&&e.clientX<=t.x+t.width&&e.clientY>=t.y&&e.clientY<=t.y+t.height?fr():pr();return}if(I.isPendingDismiss()){e.preventDefault(),e.stopImmediatePropagation();return}if(le()){e.preventDefault(),e.stopImmediatePropagation();return}if(Or(e.clientX,e.clientY,e.shiftKey)){if(e.pointerId!==void 0)try{document.documentElement.setPointerCapture(e.pointerId)}catch{}e.preventDefault(),e.stopImmediatePropagation()}}}),{capture:!0}),$.addWindowListener(`pointerup`,A(e=>{if(e.button!==0||!e.isPrimary||s(e,`data-react-grab-ignore-events`)||dt())return;let t=q()||le()||b(),n=e.metaKey||e.ctrlKey;Rr(e.clientX,e.clientY,n,e.shiftKey),t&&(e.preventDefault(),e.stopImmediatePropagation())}),{capture:!0}),$.addWindowListener(`contextmenu`,A(e=>{if(!q()||x()||w()||N.isOpen())return;let t=s(e,`data-react-grab-ignore-events`),n={x:e.clientX,y:e.clientY},r=t&&o.frozenElements.length>1?Nr(n):null,i=I.isPendingDismiss();if(t&&!r&&!i&&!wn())return;if(dt()){e.preventDefault();return}e.preventDefault(),e.stopPropagation();let a=r??Ze(e.clientX,e.clientY);if(!a)return;let c=o.frozenElements;c.length>1&&c.includes(a)?Ie(c):(Ie([a]),d.setFrozenElement(a)),d.setPointer(n),d.freeze(),wr(a,n)}),{capture:!0}),$.addWindowListener(`pointercancel`,A(e=>{e.isPrimary&&Fr()})),$.addWindowListener(`click`,A(e=>{if(!s(e,`data-react-grab-ignore-events`)){if(vt){vt=!1,e.preventDefault(),e.stopImmediatePropagation();return}dt()||(q()||se())&&(e.preventDefault(),e.stopImmediatePropagation(),o.wasActivatedByToggle&&!w()&&!e.shiftKey&&(h()?d.setWasActivatedByToggle(!1):Q()))}}),{capture:!0}),$.addDocumentListener(`visibilitychange`,()=>{if(document.hidden){d.clearGrabbedBoxes();let e=o.activationTimestamp;g()&&!w()&&e!==null&&Date.now()-e>500&&Q()}}),$.addWindowListener(`blur`,()=>{Fr(),h()&&(St(),d.releaseHold(),Ct()),L()}),$.addWindowListener(`focus`,()=>{Ft=Date.now()}),$.addWindowListener(`focusin`,e=>{s(e,Ae)&&e.stopPropagation()},{capture:!0});let yi=()=>{if(!(o.isTouchMode&&!h()&&!g())&&!yt()&&!_()&&!b()&&o.frozenElements.length===0){let e=Ze(f().x,f().y);d.setDetectedElement(e)}},bi=null,xi=null,Si=()=>{Dn(),yi(),At(e=>e+1),d.incrementViewportVersion(),d.updateContextMenuPosition()},Ci=()=>{et(),Si()};$.addWindowListener(`scroll`,Si,{capture:!0});let wi=window.innerWidth,Ti=window.innerHeight;$.addWindowListener(`resize`,()=>{let e=window.innerWidth,t=window.innerHeight;if(wi>0&&Ti>0){let n=e/wi,r=t/Ti,i=Math.abs(n-r)<Ce,a=Math.abs(n-1)>Ce;i&&a&&d.setPointer({x:f().x*n,y:f().y*r})}wi=e,Ti=t,Ci()});let Ei=window.visualViewport;if(Ei){let{signal:e}=$;Ei.addEventListener(`resize`,Ci,{signal:e}),Ei.addEventListener(`scroll`,Si,{signal:e})}let Di=()=>{xi===null&&(xi=Pe(()=>{xi=null,d.incrementViewportVersion()}))};T(()=>{if(i.store.theme.enabled&&(g()||x()||o.labelInstances.length>0||o.grabbedBoxes.length>0)){if(bi!==null)return;bi=window.setInterval(()=>{d.relinkLiveElements(),Di()},100);return}bi!==null&&(window.clearInterval(bi),bi=null),xi!==null&&(We(xi),xi=null)}),O(()=>{bi!==null&&window.clearInterval(bi),xi!==null&&We(xi)}),$.addDocumentListener(`copy`,A(e=>{w()||s(e,`data-react-grab-ignore-events`)||q()&&e.preventDefault()}),{capture:!0}),O(()=>{$.abort(),z!==null&&window.clearTimeout(z),B&&window.clearTimeout(B),zt(),gt?.(),gt=null,P?.(),P=null,nn.forEach(e=>window.clearTimeout(e)),nn.clear(),J.cancelAllFades(),tn.stop(),E(`userSelect`,``),E(`touchAction`,``),cr(null),Gr.restore(),tt(null)});let{root:Oi,host:ki}=Kt(_t);O(un(ki).cleanup);let Ai=S(()=>i.store.theme.enabled),ji=S(()=>i.store.theme.selectionBox.enabled),Mi=S(()=>i.store.theme.elementLabel.enabled),Ni=S(()=>i.store.theme.dragBox.enabled),Pi=S(()=>C()||Oe()&&!_()||N.isInteracting()),Fi=S(()=>$n().length>0),Ii=S(()=>!Ai()||!ji()||Pi()?!1:Fi()?!0:Fn()),Li=S(()=>{let e=Nn();if(e)return j(e)||void 0}),Ri=S(()=>!Ai()||dt()||!Mi()||Pi()?!1:Fn()),zi=new Map,Bi=e=>{let t=e.elements?.filter(y)??[],n=e.element,r=null;t.length>0?r=t.map(U):n&&y(n)&&(r=[U(n)]);let i=e.bounds,a=e.boundsMultiple;r&&(i=r.length>1?An(Un(r)):r[0],e.boundsMultiple!==void 0&&(a=e.boundsMultiple.length>1&&e.boundsMultiple.length===e.elements?.length?r:[i]));let o=zi.get(e.id),s=o?.boundsMultiple,c=s===a||s!==void 0&&a!==void 0&&s.length===a.length&&s.every((e,t)=>e.x===a[t].x&&e.y===a[t].y&&e.width===a[t].width&&e.height===a[t].height);if(o&&o.status===e.status&&o.errorMessage===e.errorMessage&&o.bounds.x===i.x&&o.bounds.y===i.y&&o.bounds.width===i.width&&o.bounds.height===i.height&&c)return o;let l=i.x+i.width/2,u=i.width/2,d;d=e.mouseXOffsetRatio!==void 0&&u>0?l+e.mouseXOffsetRatio*u:e.mouseXOffsetFromCenter===void 0?e.mouseX??l:l+e.mouseXOffsetFromCenter;let f={...e,bounds:i,boundsMultiple:a,mouseX:d};return zi.set(e.id,f),f},Vi=S(()=>{if(!Ai()||!i.store.theme.grabbedBoxes.enabled)return[];p();let e=new Set(o.labelInstances.map(e=>e.id));for(let t of zi.keys())e.has(t)||zi.delete(t);return o.labelInstances.map(Bi)}),Hi=S(()=>!Ai()||!i.store.theme.grabbedBoxes.enabled?[]:(p(),o.grabbedBoxes.map(e=>y(e.element)?{...e,bounds:U(e.element)}:e))),Ui=S(()=>Ai()&&Ni()&&q()&&ae()),Wi=S(()=>x()?`processing`:`hover`),Gi=S(()=>{if(!Ai())return!1;let e=Mi(),t=w(),n=x(),r=q(),i=b(),a=!!bn(),o=Oe(),s=_();return!e||t||o&&!s?!1:n?!0:r&&!i&&a}),Ki=S(()=>{p();let e=o.contextMenuElement;return e?U(e):null}),qi=S(()=>(p(),o.contextMenuPosition)),Ji=S(()=>{let e=o.contextMenuElement;if(!e)return;let t=o.frozenElements.length;return t>1?`${t} elements`:j(e)||void 0}),[Yi]=qt(()=>o.frozenElements.length>1?null:o.contextMenuElement),[Xi]=re(()=>o.contextMenuElement,async e=>e?lt(e):null),Zi=async e=>{d.incrementSelectionInteractionLockDepth();try{return await e()}finally{d.decrementSelectionInteractionLockDepth()}},Qi=(e,t,n,r,i)=>async a=>{await Zi(async()=>{let s=i?.fallbackBounds??null,c=i?.fallbackSelectionBounds??[],l=i?.position??o.contextMenuPosition??f(),u=Rn(),p=Ki()??s,m=t.length>1,h=m?An(Un(u)):p,g=o.wasActivatedByToggle,_;if(_=m?u:p?[p]:c,d.hideContextMenu(),h){let i=m?h.x+h.width/2:l.x,o=J.createInstance(h,n||`element`,r,`copying`,{element:e,mouseX:i,elements:m?t:void 0,boundsMultiple:_}),s=!1,c;try{s=await a(),s||(c=`Failed to copy`)}catch(e){c=pn(e,`Action failed`)}J.updateAfterCopy(o,s,c)}else try{await a()}catch{}g?Q():d.unfreeze()})},$i=()=>{setTimeout(()=>{d.hideContextMenu()},0)},ea=e=>{let{element:t,filePath:n,lineNumber:r,tagName:a,componentName:s,position:c,performWithFeedbackOptions:l,shouldDeferHideContextMenu:u,onBeforeCopy:f,onBeforePrompt:p,customEnterPromptMode:m}=e,h=o.frozenElements.length>0?o.frozenElements:[t],_=u?$i:d.hideContextMenu,v={element:t,elements:h,filePath:n,lineNumber:r,componentName:s,tagName:a,enterPromptMode:m??(()=>{J.clearAll(),yr(),p?.(),wt(t,c.x,c.y),d.setPointer({x:c.x,y:c.y}),d.setFrozenElement(t),Tt(),g()||lr(),_()}),enterEditMode:()=>{N.trigger(t,c,{filePath:n,lineNumber:r,componentName:s,tagName:a})&&yr(),_()},copy:()=>{yr(),f?.(),_n({element:t,cursorX:c.x,selectedElements:h.length>1?h:void 0,shouldDeactivateAfter:o.wasActivatedByToggle}),_()},hooks:{transformHtmlContent:i.hooks.transformHtmlContent,onOpenFile:i.hooks.onOpenFile,transformOpenFileUrl:i.hooks.transformOpenFileUrl},performWithFeedback:Qi(t,h,a,s,l),hideContextMenu:_,cleanup:()=>{o.wasActivatedByToggle?Q():d.unfreeze()}},ee=i.hooks.transformActionContext(v);return{...v,...ee}},ta=S(()=>{let e=o.contextMenuElement;if(!e)return;let t=Xi(),n=o.contextMenuPosition??f();return ea({element:e,filePath:t?.filePath,lineNumber:t?.lineNumber??void 0,tagName:Ji(),componentName:Yi(),position:n,shouldDeferHideContextMenu:!0,onBeforeCopy:()=>{I.clear()},customEnterPromptMode:()=>{J.clearAll(),yr(),d.clearInputText(),d.enterPromptMode(n,e),$i()}})}),na=()=>{setTimeout(()=>{d.hideContextMenu(),Q()},0)},ra=()=>{if(!pt)return null;let e=pt.getBoundingClientRect(),t=ni(e);return t===`left`||t===`right`?{x:t===`left`?e.right:e.left,y:e.top+e.height/2,edge:t}:{x:e.left+e.width/2,y:t===`top`?e.bottom:e.top,edge:t}},ia=()=>{let e=ra();if(e)return e;let t=N.state();return t?{x:t.position.x,y:t.position.y,edge:`bottom`}:null},aa=(e,t)=>{let n=null,r=()=>{let i=e();i&&t(i),n=Pe(r)};return r(),()=>{n!==null&&(We(n),n=null)}};T(()=>{if(!wn())return;let e=aa(ra,M);O(()=>{e(),M(null)})});let oa=()=>{gt?.(),gt=null,Ve(null)},sa=()=>{d.hideContextMenu(),oa(),N.dismiss()},ca=()=>{ze()===null?(d.hideContextMenu(),N.isOpen()&&N.closePreservingRenderer(),gt?.(),gt=aa(ra,Ve)):oa()},la=e=>{xt({defaultAction:e})},ua=e=>{let t=o.labelInstances.find(t=>t.id===e);if(!t?.element||!y(t.element))return;let n=t.element,r=W(U(n)),i={x:t.mouseX??r.x,y:r.y},a=t.elements&&t.elements.length>0?t.elements.filter(e=>y(e)):[n];setTimeout(()=>{oa(),N.isOpen()&&N.closePreservingRenderer(),g()||(d.setWasActivatedByToggle(!0),lr()),d.setPointer(i),d.setFrozenElements(a),a.length>1&&t.bounds&&d.setFrozenDragRect(kn(t.bounds)),d.freeze(),d.showContextMenu(i,n)},0)};T(()=>{let e=i.store.theme.hue;e===0?Oi.style.filter=``:Oi.style.filter=`hue-rotate(${e}deg)`}),i.store.theme.enabled&&import(`./renderer-D0g-Fo8Z.js`).then(({ReactGrabRenderer:e})=>{t||(n=ne(()=>ce(e,{get selectionVisible(){return Ii()},get selectionBounds(){return Wn()},get selectionBoundsMultiple(){return er()},get selectionShouldSnap(){return o.frozenElements.length>0||$n().length>0},get selectionElementsCount(){return o.frozenElements.length},get frozenLabelEntries(){return nr()},get pendingShiftPreviewEntry(){return rr()??void 0},get selectionFilePath(){return o.selectionFilePath??void 0},get selectionLineNumber(){return o.selectionLineNumber??void 0},get selectionTagName(){return Li()},get selectionComponentName(){return Xt()},get selectionLabelVisible(){return Ri()},selectionLabelStatus:`idle`,get hierarchyState(){return gi()},get hierarchyMenuPosition(){return Ge()},get labelInstances(){return Vi()},get dragVisible(){return Ui()},get dragBounds(){return Zn()},get grabbedBoxes(){return Hi()},get mouseX(){return te(()=>o.frozenElements.length>1)()?void 0:ar()??ir().x},get isFrozen(){return _()||g()||Oe()},get inputValue(){return o.inputText},get isPromptMode(){return w()},onShowContextMenuInstance:ua,onRetryInstance:Y,onAcknowledgeErrorInstance:dn,get onLabelInstanceHoverChange(){return J.handleHoverChange},get onInputChange(){return d.setInputText},onInputSubmit:()=>void fr(),onToggleExpand:gr,get selectionLabelShakeCount(){return be()},onConfirmDismiss:mr,get discardPrompt(){return te(()=>!!I.isPendingDismiss())()?{isKeyboardSelection:!0,onConfirm:mr,onCopy:$r}:pe()?{onConfirm:mr,onCancel:hr}:void 0},get toolbarVisible(){return i.store.theme.toolbar.enabled},get isActive(){return g()},onToggleActive:Sr,onActivateAction:xr,get activeActionId(){return Qt()},get enabled(){return D()},get shakeCount(){return _e()},onToolbarStateChange:e=>{De(e),e.enabled!==D()&&(ge(e.enabled),e.enabled||(ur(),sa())),si.forEach(t=>t(e))},onSubscribeToToolbarStateChanges:e=>(si.add(e),()=>{si.delete(e)}),onToolbarSelectHoverChange:je,onToolbarRef:e=>{pt=e},get contextMenuPosition(){return qi()},get contextMenuBounds(){return Ki()},get contextMenuTagName(){return Ji()},get contextMenuComponentName(){return Yi()},get contextMenuHasFilePath(){return!!Xi()?.filePath},get actions(){return i.store.actions},get actionContext(){return ta()},onContextMenuDismiss:na,onContextMenuHide:$i,get toolbarMenuPosition(){return ze()},get toolbarMenuActions(){return i.store.actions.filter(e=>e.showInToolbarMenu===!0)},get defaultActionId(){return Ee()?.defaultAction??`copy`},onSetDefaultAction:la,onToggleToolbarMenu:ca,onToolbarMenuDismiss:oa,get editPanelState(){return N.state()},get editPanelPosition(){return He()},get onEditPanelDismiss(){return N.dismiss},get onEditPanelSubmit(){return N.submit},get onEditPanelPendingEditsChange(){return N.setPendingEdits},get onEditPanelInteractingChange(){return N.setInteracting}}),Oi))}).catch(e=>{console.warn(`[react-grab] Failed to load renderer:`,e)});let da={activate:()=>{d.setPendingCommentMode(!1),!g()&&D()&&dr()},deactivate:()=>{(g()||x())&&Q()},toggle:()=>{g()?Q():D()&&dr()},comment:Er,isActive:()=>g(),isEnabled:()=>D(),setEnabled:e=>{e!==D()&&(ge(e),xt({enabled:e,collapsed:!e}),e||(ur(),sa()))},getToolbarState:()=>Ee()??ue(),setToolbarState:e=>{let t=Ee()??ue(),n=e.collapsed??t?.collapsed??!1,r={edge:e.edge??t?.edge??`bottom`,ratio:e.ratio??t?.ratio??.5,collapsed:n,enabled:e.enabled??!n,defaultAction:e.defaultAction??t?.defaultAction??`copy`};ie(r),De(r),r.enabled!==D()&&(ge(r.enabled),r.enabled||(ur(),sa())),si.forEach(e=>e(r))},onToolbarStateChange:e=>(si.add(e),()=>{si.delete(e)}),reset:()=>{ur(),sa(),d.clearGrabbedBoxes(),d.clearLabelInstances(),d.setSelectionSource(null,null)},dispose:()=>{t=!0,oi=!1,n?.(),gt?.(),gt=null,P?.(),P=null,si.clear(),e()},copyElement:async e=>{let t=Array.isArray(e)?e:[e];return t.length===0?!1:await mn(t)},getSource:async e=>{let t=await lt(e);return t?{filePath:t.filePath,lineNumber:t.lineNumber,componentName:t.componentName}:null},getStackContext:e=>ht(e,{maxLines:i.store.options.maxContextLines}),getState:()=>({isActive:g(),isDragging:b(),isCopying:x(),isPromptMode:w(),isSelectionBoxVisible:!!Ii(),isDragBoxVisible:!!Ui(),targetElement:X(),dragBounds:Zn()??null,grabbedBoxes:[...or()],labelInstances:[...sr()],selectionFilePath:o.selectionFilePath,toolbarState:Ee()}),setOptions:e=>{i.setOptions(e)},registerPlugin:e=>{i.register(e,da)},unregisterPlugin:e=>{i.unregister(e)},getPlugins:()=>i.getPluginNames(),getDisplayName:mt};for(let e of ai)i.register(e,da);return setTimeout(()=>{Re(!0)},Fe),da})};export{Nr as a,$r as i,ii as n,ti as r,ci as t};
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
const e=require(`./freeze-updates-CYpw0MB2.cjs`),t=Symbol(`error`);function n(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function r(e,i=a){let o=i&&i.context&&i.context[t],s=n(e);if(!o)throw s;try{for(let e of o)e(s)}catch(e){r(e,i&&i.owner||null)}}const i={context:null,owner:null,owned:null,cleanups:null};let a=null;function o(){let e={owner:a,context:a?a.context:null,owned:null,cleanups:null};return a&&(a.owned?a.owned.push(e):a.owned=[e]),e}function s(e,t){let n=a,o=t===void 0?n:t,s=e.length===0?i:{context:o?o.context:null,owner:o,owned:null,cleanups:null};a=s;let c;try{c=e(e.length===0?()=>{}:()=>re(s))}catch(e){r(e)}finally{a=n}return c}function c(e,t){return[()=>e,t=>e=typeof t==`function`?t(e):t]}function l(e,t){a=o();try{e(t)}catch(e){r(e)}finally{a=a.owner}}const u=l;function d(e,t){}function f(e,t){a=o();let n;try{n=e(t)}catch(e){r(e)}finally{a=a.owner}return()=>n}function p(e){return e()}const m=p;function ee(e,t,n={}){let r=Array.isArray(e),i=n.defer;return()=>{if(i)return;let n;if(r){n=[];for(let t=0;t<e.length;t++)n.push(e[t]())}else n=e();return t(n)}}function te(e){}function ne(e){return a&&(a.cleanups?a.cleanups.push(e):a.cleanups=[e]),e}function re(e){if(e.owned){for(let t=0;t<e.owned.length;t++)re(e.owned[t]);e.owned=null}if(e.cleanups){for(let t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}}function ie(e){let t=Symbol(`context`);return{id:t,Provider:se(t),defaultValue:e}}function ae(e){return a&&a.context&&a.context[e.id]!==void 0?a.context[e.id]:e.defaultValue}function oe(e){let t=f(()=>h(e()));return t.toArray=()=>{let e=t();return Array.isArray(e)?e:e==null?[]:[e]},t}function h(e){if(typeof e==`function`&&!e.length)return h(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=h(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function se(e){return function(t){return f(()=>(a.context={...a.context,[e]:t.value},oe(()=>t.children)))}}function ce(e,t,n={}){let r=e(),i=[];if(r&&r.length)for(let e=0,n=r.length;e<n;e++)i.push(t(r[e],()=>e));else n.fallback&&(i=[n.fallback()]);return()=>i}const g={context:void 0,getContextId(){if(!this.context)throw Error(`getContextId cannot be used under non-hydrating context`);return _(this.context.count)},getNextContextId(){if(!this.context)throw Error(`getNextContextId cannot be used under non-hydrating context`);return _(this.context.count++)}};function _(e){let t=String(e),n=t.length-1;return g.context.id+(n?String.fromCharCode(96+n):``)+t}function le(e){g.context=e}function ue(){return g.context?{...g.context,id:g.getNextContextId(),count:0}:void 0}function de(e,t){if(g.context&&!g.context.noHydrate){let n=g.context;le(ue());let r=e(t||{});return le(n),r}return e(t||{})}function fe(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`function`&&(r=r()),r){let n=Object.getOwnPropertyDescriptors(r);for(let r in n)r in t||Object.defineProperty(t,r,{enumerable:!0,get(){for(let t=e.length-1;t>=0;t--){let n,i=e[t];if(typeof i==`function`&&(i=i()),n=(i||{})[r],n!==void 0)return n}}})}}return t}function pe(e,...t){let n=Object.getOwnPropertyDescriptors(e),r=e=>{let t={};for(let r=0;r<e.length;r++){let i=e[r];n[i]&&(Object.defineProperty(t,i,n[i]),delete n[i])}return t};return t.map(r).concat(r(Object.keys(n)))}function v(e,t){let n=e.each||[],r=n.length,i=e.children;if(r){let e=Array(r);for(let a=0;a<r;a++)e[a]=t(i,n[a],a);return e}return e.fallback}function me(e){return v(e,(e,t,n)=>e(t,()=>n))}function he(e){return v(e,(e,t,n)=>e(()=>t,n))}function ge(e){let t;return e.when?typeof(t=e.children)==`function`?t(e.keyed?e.when:()=>e.when):t:e.fallback||``}function _e(e){let t=e.children;Array.isArray(t)||(t=[t]);for(let e=0;e<t.length;e++){let n=t[e].when;if(n){let r=t[e].children;return typeof r==`function`?r(t[e].keyed?n:()=>n):r}}return e.fallback||``}function ve(e){return e}const ye=ie();let y=null;function be(e,t,r={}){typeof t!=`function`&&(r=t||{},t=e,e=!0);let i=new Set,a=g.getNextContextId(),o={},s=r.storage?r.storage(r.initialValue)[0]():r.initialValue,c,l;if(g.context.async&&r.ssrLoadFrom!==`initial`&&(o=g.context.resources[a]||(g.context.resources[a]={}),o.ref))return!o.data&&!o.ref[0]._loading&&!o.ref[0].error&&o.ref[1].refetch(),o.ref;let u=()=>{if(l)throw l;let e=r.ssrLoadFrom!==`initial`&&g.context.async&&`data`in g.context.resources[a];if(!e&&y&&y.push(a),!e&&d._loading){let e=ae(ye);e&&(e.resources.set(a,d),i.add(e))}return e},d=()=>u()?g.context.resources[a].data:s,f=()=>(u(),d._loading);d._loading=!1,d.error=void 0,d.state=`initialValue`in r?`ready`:`unresolved`,Object.defineProperties(d,{latest:{get(){return d()}},loading:{get(){return f()}}});function p(){let o=g.context;if(!o.async)return d._loading=!!(typeof e==`function`?e():e);if(o.resources&&a in o.resources&&`data`in o.resources[a]){s=o.resources[a].data;return}let u;try{if(y=[],u=typeof e==`function`?e():e,y.length)return}finally{y=null}if(!c){if(u==null||u===!1)return;c=t(u,{value:s})}return typeof c==`object`&&c&&`then`in c?(d._loading=!0,d.state=`pending`,c=c.then(e=>(d._loading=!1,d.state=`ready`,o.resources[a].data=e,c=null,b(i),e)).catch(e=>{throw d._loading=!1,d.state=`errored`,d.error=l=n(e),c=null,b(i),l}),o.serialize&&o.serialize(a,c,r.deferStream),c):(o.resources[a].data=c,o.serialize&&o.serialize(a,c),c=null,o.resources[a].data)}r.ssrLoadFrom!==`initial`&&p();let m=[d,{refetch:p,mutate:e=>s=e}];return c&&(o.ref=m),m}function xe(e){for(let t of e.resources.values())if(t._loading)return!1;return!0}function b(e){for(let t of e)xe(t)&&(t.completed(),e.delete(t))}const Se=new Set([`className`,`value`,`readOnly`,`noValidate`,`formNoValidate`,`isMap`,`noModule`,`playsInline`,`adAuctionHeaders`,`allowFullscreen`,`browsingTopics`,`defaultChecked`,`defaultMuted`,`defaultSelected`,`disablePictureInPicture`,`disableRemotePlayback`,`preservesPitch`,`shadowRootClonable`,`shadowRootCustomElementRegistry`,`shadowRootDelegatesFocus`,`shadowRootSerializable`,`sharedStorageWritable`,...`allowfullscreen.async.alpha.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.hidden.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.adauctionheaders.browsingtopics.credentialless.defaultchecked.defaultmuted.defaultselected.defer.disablepictureinpicture.disableremoteplayback.preservespitch.shadowrootclonable.shadowrootcustomelementregistry.shadowrootdelegatesfocus.shadowrootserializable.sharedstoragewritable`.split(`.`)]),Ce=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),we=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),Te=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}});function Ee(e,t){let n=Te[e];return typeof n==`object`?n[t]?n.$:void 0:n}const De=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),Oe={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},ke=e=>f(()=>e());function Ae(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null)if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&!((d=l.get(t[c]))==null||d!==r+u);)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++;else t[o++].remove()}}}const x=`_$DX_DELEGATE`;function je(e,t,n,r={}){let i;return s(r=>{i=r,t===document?e():Re(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function Me(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>m(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function S(e,t=window.document){let n=t[x]||(t[x]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,Ue))}}function C(e,t,n){O(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Ne(e,t,n,r){O(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Pe(e,t,n){O(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function w(e,t){O(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function T(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){let r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,typeof n!=`function`&&n)}function E(e,t,n={}){let r=Object.keys(t||{}),i=Object.keys(n),a,o;for(a=0,o=i.length;a<o;a++){let r=i[a];!r||r===`undefined`||t[r]||(Ve(e,r,!1),delete n[r])}for(a=0,o=r.length;a<o;a++){let i=r[a],o=!!t[i];!i||i===`undefined`||n[i]===o||!o||(Ve(e,i,!0),n[i]=o)}return n}function D(e,t,n){if(!t)return n?C(e,`style`):t;let r=e.style;if(typeof t==`string`)return r.cssText=t;typeof n==`string`&&(r.cssText=n=void 0),n||={},t||={};let i,a;for(a in n)t[a]??r.removeProperty(a),delete n[a];for(a in t)i=t[a],i!==n[a]&&(r.setProperty(a,i),n[a]=i);return n}function Fe(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function Ie(e,t={},n,r){let i={};return r||u(()=>i.children=k(e,t.children,i.children)),u(()=>typeof t.ref==`function`&&Le(t.ref,e)),u(()=>ze(e,t,n,!0,i,!0)),i}function Le(e,t,n){return m(()=>e(t,n))}function Re(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return k(e,t,r,n);u(r=>k(e,t(),r,n),r)}function ze(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=He(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||k(e,t.children);continue}let s=t[o];i[o]=He(e,o,s,i[o],n,a,t)}}function O(e){return!!g.context&&!g.done&&(!e||e.isConnected)}function Be(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function Ve(e,t,n){let r=t.trim().split(/\s+/);for(let t=0,i=r.length;t<i;t++)e.classList.toggle(r[t],n)}function He(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return D(e,n,r);if(t===`classList`)return E(e,n,r);if(n===r)return r;if(t===`ref`)a||n(e);else if(t.slice(0,3)===`on:`){let i=t.slice(3);r&&e.removeEventListener(i,r,typeof r!=`function`&&r),n&&e.addEventListener(i,n,typeof n!=`function`&&n)}else if(t.slice(0,10)===`oncapture:`){let i=t.slice(10);r&&e.removeEventListener(i,r,!0),n&&e.addEventListener(i,n,!0)}else if(t.slice(0,2)===`on`){let i=t.slice(2).toLowerCase(),a=De.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(T(e,i,n,a),a&&S([i]))}else if(t.slice(0,5)===`attr:`)C(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)Pe(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=Ce.has(t))||!i&&((u=Ee(t,e.tagName))||(c=Se.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(O(e))return n;t===`class`||t===`className`?w(e,n):s&&!c&&!l?e[Be(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&Oe[t.split(`:`)[0]];r?Ne(e,r,t,n):C(e,we[t]||t,n)}return n}function Ue(e){if(g.registry&&g.events&&g.events.find(([t,n])=>n===e))return;let t=e.target,n=`$$${e.type}`,r=e.target,i=e.currentTarget,a=t=>Object.defineProperty(e,`target`,{configurable:!0,value:t}),o=()=>{let r=t[n];if(r&&!t.disabled){let i=t[`${n}Data`];if(i===void 0?r.call(t,e):r.call(t,i,e),e.cancelBubble)return}return t.host&&typeof t.host!=`string`&&!t.host._$host&&t.contains(e.target)&&a(t.host),!0},s=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,`currentTarget`,{configurable:!0,get(){return t||document}}),g.registry&&!g.done&&(g.done=_$HY.done=!0),e.composedPath){let n=e.composedPath();a(n[0]);for(let e=0;e<n.length-2&&(t=n[e],o());e++){if(t._$host){t=t._$host,s();break}if(t.parentNode===i)break}}else s();a(r)}function k(e,t,n,r,i){let a=O(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=M(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=M(e,n,r)}else if(o===`function`)return u(()=>{let i=t();for(;typeof i==`function`;)i=i();n=k(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(A(o,t,n,i))return u(()=>n=k(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=M(e,n,r),s)return n}else c?n.length===0?j(e,o,r):Ae(e,n,o):(n&&M(e),j(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=M(e,n,r,t);M(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function A(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(!(o==null||o===!0||o===!1))if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=A(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=A(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0;else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}return i}function j(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function M(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}const We=e=>!!(e?.isConnected??e?.ownerDocument?.contains(e)),Ge=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`,`combobox`],Ke=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},qe=t=>{if(document.designMode===`on`)return!0;let n=Ke(t);if(!n)return!1;if(n.isContentEditable)return!0;let r=e.I(n);return Ge.some(e=>e===r||e===n.role)},Je=e=>{let t=e.target;if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){let e=t.selectionStart??0;return(t.selectionEnd??0)-e>0}return!1},Ye=()=>{let e=window.getSelection();return e?e.toString().length>0:!1},N=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*([\d.]+%?))?\s*\)$/,P=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`),F=(e,t,n,r=1)=>{let i=P(e),a=P(t),o=P(n);return r>=1?`#${i}${a}${o}`:`#${i}${a}${o}${P(r*255)}`},Xe=e=>{if(!e.startsWith(`#`))return null;let t=e.slice(1);if(t.length!==6&&t.length!==8)return null;let n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16),a=t.length===8?parseInt(t.slice(6,8),16)/255:1;return!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)?null:{red:n,green:r,blue:i,alpha:a}},Ze=e=>{let t=e.match(N);if(!t)return null;let n=1;if(t[4]!==void 0){let e=t[4];n=e.endsWith(`%`)?Number(e.slice(0,-1))/100:Number(e)}return F(Number(t[1]),Number(t[2]),Number(t[3]),n)},Qe=e=>{let t=e.match(N);return!t||t[4]===void 0?!1:(t[4].endsWith(`%`)?Number(t[4].slice(0,-1))/100:Number(t[4]))===0},$e=/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,et=e=>{let t=e.match($e);if(!t)return null;let n=t[1];return n.length===3?`#${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`:n.length===4?`#${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}${n[3]}${n[3]}`:`#${n}`},I=`rgba(0, 0, 0, 0)`,tt=/^oklch\(\s*([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+)(deg|grad|rad|turn)?(?:\s*\/\s*([+-]?\d*\.?\d+%?))?\s*\)$/i,nt=180/Math.PI,L=(e,t)=>e.endsWith(`%`)?Number(e.slice(0,-1))/100*t:Number(e),rt=(e,t)=>{let n=Number(e);return t===`grad`?n*.9:t===`rad`?n*nt:t===`turn`?n*360:n},R=e=>{let t=Math.max(0,Math.min(1,e));return(t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055)*255},it=e=>{let t=e.match(tt);if(!t)return null;let n=L(t[1],1),r=L(t[2],.4),i=rt(t[3],t[4])*Math.PI/180,a=t[5]===void 0?1:L(t[5],1);if(![n,r,i,a].every(Number.isFinite))return null;let o=r*Math.cos(i),s=r*Math.sin(i),c=n+.3963377774*o+.2158037573*s,l=n-.1055613458*o-.0638541728*s,u=n-.0894841775*o-1.291485548*s,d=c**3,f=l**3,p=u**3,m=4.0767416621*d-3.3077115913*f+.2309699292*p,ee=-1.2684380046*d+2.6097574011*f-.3413193965*p,te=-.0041960863*d-.7034186147*f+1.707614701*p;return F(R(m),R(ee),R(te),Math.max(0,Math.min(1,a)))};let z=null;const at=()=>z||(typeof document>`u`?null:(z=document.createElement(`canvas`).getContext(`2d`,{willReadFrequently:!0}),z)),ot=(t,n)=>{t.clearRect(0,0,1,1),t.fillStyle=n,t.fillRect(0,0,1,1);let r=t.getImageData(0,0,1,1).data;return r[3]===0?e.nt:F(r[0],r[1],r[2],r[3]/255)},st=t=>{let n=t.trim();if(!n)return null;if(n.toLowerCase()===`transparent`)return e.nt;let r=et(n);if(r)return r;let i=it(n);if(i)return i;let a=at();if(!a)return null;a.fillStyle=I,a.fillStyle=n;let o=a.fillStyle;return typeof o==`string`?o.toLowerCase()===I?n.toLowerCase().replace(/\s+/g,``)===`rgba(0,0,0,0)`?e.nt:null:o.startsWith(`#`)&&o.length===7?o:o.startsWith(`rgb`)?Ze(o):ot(a,n):null},ct=(e,t,n)=>Math.max(t,Math.min(e,n));let B=null;const lt=()=>{if(typeof navigator>`u`||!(`userAgentData`in navigator))return null;let e=navigator.userAgentData;if(typeof e!=`object`||!e||!(`platform`in e))return null;let t=e.platform;return typeof t==`string`?t:null},ut=()=>{if(B===null){if(typeof navigator>`u`)return B=!1,B;let e=navigator.platform??lt()??navigator.userAgent;B=/Mac|iPhone|iPad|iPod/i.test(e)}return B},dt=(e,t)=>{try{return e.composedPath().some(e=>e instanceof HTMLElement&&e.hasAttribute(t))}catch{return!1}},V=`padding-top.padding-right.padding-bottom.padding-left.margin-top.margin-right.margin-bottom.margin-left.gap.row-gap.column-gap.font-size.line-height.letter-spacing.border-radius.border-top-left-radius.border-top-right-radius.border-bottom-right-radius.border-bottom-left-radius.border-width.border-top-width.border-right-width.border-bottom-width.border-left-width.opacity.width.height.min-width.min-height.max-width.max-height.top.right.bottom.left.z-index`.split(`.`),ft=new Set([`letter-spacing`,`gap`,`row-gap`,`column-gap`]),pt=new Set([`z-index`]),mt=[{key:`padding`,label:`padding`,longhands:[`padding-top`,`padding-right`,`padding-bottom`,`padding-left`]},{key:`padding-top,padding-bottom`,label:`padding-y`,longhands:[`padding-top`,`padding-bottom`]},{key:`padding-left,padding-right`,label:`padding-x`,longhands:[`padding-left`,`padding-right`]},{key:`padding-top`,label:`padding top`,longhands:[`padding-top`]},{key:`padding-right`,label:`padding right`,longhands:[`padding-right`]},{key:`padding-bottom`,label:`padding bottom`,longhands:[`padding-bottom`]},{key:`padding-left`,label:`padding left`,longhands:[`padding-left`]}],ht=[{key:`margin`,label:`margin`,longhands:[`margin-top`,`margin-right`,`margin-bottom`,`margin-left`]},{key:`margin-top,margin-bottom`,label:`margin-y`,longhands:[`margin-top`,`margin-bottom`]},{key:`margin-left,margin-right`,label:`margin-x`,longhands:[`margin-left`,`margin-right`]},{key:`margin-top`,label:`margin top`,longhands:[`margin-top`]},{key:`margin-right`,label:`margin right`,longhands:[`margin-right`]},{key:`margin-bottom`,label:`margin bottom`,longhands:[`margin-bottom`]},{key:`margin-left`,label:`margin left`,longhands:[`margin-left`]}],gt=[{key:`gap`,label:`gap`,longhands:[`row-gap`,`column-gap`]},{key:`row-gap`,label:`row gap`,longhands:[`row-gap`]},{key:`column-gap`,label:`column gap`,longhands:[`column-gap`]}],_t=[{key:`border-radius`,label:`border radius`,longhands:[`border-top-left-radius`,`border-top-right-radius`,`border-bottom-right-radius`,`border-bottom-left-radius`]},{key:`border-top-left-radius,border-top-right-radius`,label:`top corners`,longhands:[`border-top-left-radius`,`border-top-right-radius`]},{key:`border-bottom-left-radius,border-bottom-right-radius`,label:`bottom corners`,longhands:[`border-bottom-left-radius`,`border-bottom-right-radius`]},{key:`border-top-left-radius,border-bottom-left-radius`,label:`left corners`,longhands:[`border-top-left-radius`,`border-bottom-left-radius`]},{key:`border-top-right-radius,border-bottom-right-radius`,label:`right corners`,longhands:[`border-top-right-radius`,`border-bottom-right-radius`]},{key:`border-top-left-radius`,label:`top left radius`,longhands:[`border-top-left-radius`]},{key:`border-top-right-radius`,label:`top right radius`,longhands:[`border-top-right-radius`]},{key:`border-bottom-right-radius`,label:`bottom right radius`,longhands:[`border-bottom-right-radius`]},{key:`border-bottom-left-radius`,label:`bottom left radius`,longhands:[`border-bottom-left-radius`]}],H=[{key:`top,right,bottom,left`,label:`inset`,longhands:[`top`,`right`,`bottom`,`left`]},{key:`top,bottom`,label:`inset-y`,longhands:[`top`,`bottom`]},{key:`left,right`,label:`inset-x`,longhands:[`left`,`right`]},{key:`top`,label:`top`,longhands:[`top`]},{key:`right`,label:`right`,longhands:[`right`]},{key:`bottom`,label:`bottom`,longhands:[`bottom`]},{key:`left`,label:`left`,longhands:[`left`]}],vt=new Set(H.map(e=>e.key)),yt=[mt,ht,gt,_t,[{key:`border-width`,label:`border width`,longhands:[`border-top-width`,`border-right-width`,`border-bottom-width`,`border-left-width`]},{key:`border-top-width`,label:`border top width`,longhands:[`border-top-width`]},{key:`border-right-width`,label:`border right width`,longhands:[`border-right-width`]},{key:`border-bottom-width`,label:`border bottom width`,longhands:[`border-bottom-width`]},{key:`border-left-width`,label:`border left width`,longhands:[`border-left-width`]}],[{key:`width,height`,label:`size`,longhands:[`width`,`height`]},{key:`width`,label:`width`,longhands:[`width`]},{key:`height`,label:`height`,longhands:[`height`]}],H],bt=[{key:`font-size`,label:`font size`},{key:`line-height`,label:`line height`},{key:`letter-spacing`,label:`letter spacing`},{key:`min-width`,label:`min width`},{key:`min-height`,label:`min height`},{key:`max-width`,label:`max width`},{key:`max-height`,label:`max height`},{key:`z-index`,label:`z-index`},{key:`opacity`,label:`opacity`}],xt=[{key:`color`,label:`text color`,alwaysShow:!0},{key:`background-color`,label:`background`,alwaysShow:!0},{key:`border-color`,label:`border color`},{key:`fill`,label:`fill`},{key:`stroke`,label:`stroke`}],U=[{value:`ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`,label:`sans`},{value:`ui-serif, Georgia, Cambria, "Times New Roman", Times, serif`,label:`serif`},{value:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`,label:`mono`},{value:`system-ui, sans-serif`,label:`system`},{value:`serif`,label:`serif`},{value:`monospace`,label:`mono`}],St=e=>{let t=e.trim();return U.some(e=>e.value===t)?U:[{value:t,label:`current`},...U]},Ct={key:`font-family`,label:`font family`},wt=[{key:`display`,label:`display`,options:[{value:`block`,label:`block`},{value:`flex`,label:`flex`},{value:`inline-block`,label:`inline-block`},{value:`inline`,label:`inline`},{value:`grid`,label:`grid`},{value:`none`,label:`none`}]},{key:`text-align`,label:`text align`,options:[{value:`left`,label:`left`},{value:`center`,label:`center`},{value:`right`,label:`right`},{value:`justify`,label:`justify`}]},{key:`font-style`,label:`font style`,options:[{value:`normal`,label:`normal`},{value:`italic`,label:`italic`}]},{key:`text-transform`,label:`text transform`,options:[{value:`none`,label:`none`},{value:`uppercase`,label:`uppercase`},{value:`lowercase`,label:`lowercase`},{value:`capitalize`,label:`capitalize`}]},{key:`white-space`,label:`white space`,options:[{value:`normal`,label:`normal`},{value:`nowrap`,label:`nowrap`},{value:`pre`,label:`pre`},{value:`pre-wrap`,label:`pre-wrap`},{value:`pre-line`,label:`pre-line`},{value:`break-spaces`,label:`break-spaces`}]},{key:`word-break`,label:`word break`,options:[{value:`normal`,label:`normal`},{value:`break-all`,label:`break-all`},{value:`keep-all`,label:`keep-all`}]},{key:`overflow-wrap`,label:`wrap`,options:[{value:`normal`,label:`normal`},{value:`break-word`,label:`break-word`},{value:`anywhere`,label:`anywhere`}]},{key:`font-variant-numeric`,label:`number style`,options:[{value:`normal`,label:`normal`},{value:`tabular-nums`,label:`tabular`},{value:`proportional-nums`,label:`proportional`},{value:`lining-nums`,label:`lining`},{value:`oldstyle-nums`,label:`oldstyle`},{value:`slashed-zero`,label:`slashed zero`}]},{key:`text-decoration-line`,label:`decoration`,options:[{value:`none`,label:`none`},{value:`underline`,label:`underline`},{value:`line-through`,label:`strike`}]},{key:`border-style`,label:`border style`,options:[{value:`none`,label:`none`},{value:`solid`,label:`solid`},{value:`dashed`,label:`dashed`},{value:`dotted`,label:`dotted`}]},{key:`visibility`,label:`visibility`,options:[{value:`visible`,label:`visible`},{value:`hidden`,label:`hidden`}]},{key:`align-items`,label:`align items`,options:[{value:`stretch`,label:`stretch`},{value:`flex-start`,label:`start`},{value:`center`,label:`center`},{value:`flex-end`,label:`end`},{value:`baseline`,label:`baseline`}]},{key:`justify-content`,label:`justify content`,options:[{value:`flex-start`,label:`start`},{value:`center`,label:`center`},{value:`flex-end`,label:`end`},{value:`space-between`,label:`between`},{value:`space-around`,label:`around`},{value:`space-evenly`,label:`evenly`}]},{key:`font-weight`,label:`font weight`,options:[{value:`100`,label:`thin`},{value:`200`,label:`extra-light`},{value:`300`,label:`light`},{value:`400`,label:`normal`},{value:`500`,label:`medium`},{value:`600`,label:`semibold`},{value:`700`,label:`bold`},{value:`800`,label:`extra-bold`},{value:`900`,label:`black`}]}],Tt=[...V,`color`,`background-color`,`border-color`,`fill`,`stroke`,`font-family`,`display`,`text-align`,`font-style`,`text-transform`,`white-space`,`word-break`,`overflow-wrap`,`font-variant-numeric`,`text-decoration-line`,`border-style`,`visibility`,`align-items`,`justify-content`,`font-weight`],W=e=>Number.isInteger(e)?e:Math.round(e*100)/100,G=e=>Number.isInteger(e)?String(e):e.toFixed(2).replace(/\.?0+$/,``),Et=e=>Number.isFinite(e)?G(W(e)):String(e),Dt=e=>Math.round(e),Ot=(e,t)=>{if(e.kind===`color`||e.kind===`enum`)return typeof t==`string`?t:e.value;let n=typeof t==`number`?t:e.value;return e.key===`opacity`&&e.unit===`%`?G(W(n/100)):`${G(W(n))}${e.unit}`},kt={slate:{50:`#f8fafc`,100:`#f1f5f9`,200:`#e2e8f0`,300:`#cbd5e1`,400:`#94a3b8`,500:`#64748b`,600:`#475569`,700:`#334155`,800:`#1e293b`,900:`#0f172a`,950:`#020617`},gray:{50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#1f2937`,900:`#111827`,950:`#030712`},zinc:{50:`#fafafa`,100:`#f4f4f5`,200:`#e4e4e7`,300:`#d4d4d8`,400:`#a1a1aa`,500:`#71717a`,600:`#52525b`,700:`#3f3f46`,800:`#27272a`,900:`#18181b`,950:`#09090b`},neutral:{50:`#fafafa`,100:`#f5f5f5`,200:`#e5e5e5`,300:`#d4d4d4`,400:`#a3a3a3`,500:`#737373`,600:`#525252`,700:`#404040`,800:`#262626`,900:`#171717`,950:`#0a0a0a`},stone:{50:`#fafaf9`,100:`#f5f5f4`,200:`#e7e5e4`,300:`#d6d3d1`,400:`#a8a29e`,500:`#78716c`,600:`#57534e`,700:`#44403c`,800:`#292524`,900:`#1c1917`,950:`#0c0a09`},red:{50:`#fef2f2`,100:`#fee2e2`,200:`#fecaca`,300:`#fca5a5`,400:`#f87171`,500:`#ef4444`,600:`#dc2626`,700:`#b91c1c`,800:`#991b1b`,900:`#7f1d1d`,950:`#450a0a`},orange:{50:`#fff7ed`,100:`#ffedd5`,200:`#fed7aa`,300:`#fdba74`,400:`#fb923c`,500:`#f97316`,600:`#ea580c`,700:`#c2410c`,800:`#9a3412`,900:`#7c2d12`,950:`#431407`},amber:{50:`#fffbeb`,100:`#fef3c7`,200:`#fde68a`,300:`#fcd34d`,400:`#fbbf24`,500:`#f59e0b`,600:`#d97706`,700:`#b45309`,800:`#92400e`,900:`#78350f`,950:`#451a03`},yellow:{50:`#fefce8`,100:`#fef9c3`,200:`#fef08a`,300:`#fde047`,400:`#facc15`,500:`#eab308`,600:`#ca8a04`,700:`#a16207`,800:`#854d0e`,900:`#713f12`,950:`#422006`},lime:{50:`#f7fee7`,100:`#ecfccb`,200:`#d9f99d`,300:`#bef264`,400:`#a3e635`,500:`#84cc16`,600:`#65a30d`,700:`#4d7c0f`,800:`#3f6212`,900:`#365314`,950:`#1a2e05`},green:{50:`#f0fdf4`,100:`#dcfce7`,200:`#bbf7d0`,300:`#86efac`,400:`#4ade80`,500:`#22c55e`,600:`#16a34a`,700:`#15803d`,800:`#166534`,900:`#14532d`,950:`#052e16`},emerald:{50:`#ecfdf5`,100:`#d1fae5`,200:`#a7f3d0`,300:`#6ee7b7`,400:`#34d399`,500:`#10b981`,600:`#059669`,700:`#047857`,800:`#065f46`,900:`#064e3b`,950:`#022c22`},teal:{50:`#f0fdfa`,100:`#ccfbf1`,200:`#99f6e4`,300:`#5eead4`,400:`#2dd4bf`,500:`#14b8a6`,600:`#0d9488`,700:`#0f766e`,800:`#115e59`,900:`#134e4a`,950:`#042f2e`},cyan:{50:`#ecfeff`,100:`#cffafe`,200:`#a5f3fc`,300:`#67e8f9`,400:`#22d3ee`,500:`#06b6d4`,600:`#0891b2`,700:`#0e7490`,800:`#155e75`,900:`#164e63`,950:`#083344`},sky:{50:`#f0f9ff`,100:`#e0f2fe`,200:`#bae6fd`,300:`#7dd3fc`,400:`#38bdf8`,500:`#0ea5e9`,600:`#0284c7`,700:`#0369a1`,800:`#075985`,900:`#0c4a6e`,950:`#082f49`},blue:{50:`#eff6ff`,100:`#dbeafe`,200:`#bfdbfe`,300:`#93c5fd`,400:`#60a5fa`,500:`#3b82f6`,600:`#2563eb`,700:`#1d4ed8`,800:`#1e40af`,900:`#1e3a8a`,950:`#172554`},indigo:{50:`#eef2ff`,100:`#e0e7ff`,200:`#c7d2fe`,300:`#a5b4fc`,400:`#818cf8`,500:`#6366f1`,600:`#4f46e5`,700:`#4338ca`,800:`#3730a3`,900:`#312e81`,950:`#1e1b4b`},violet:{50:`#f5f3ff`,100:`#ede9fe`,200:`#ddd6fe`,300:`#c4b5fd`,400:`#a78bfa`,500:`#8b5cf6`,600:`#7c3aed`,700:`#6d28d9`,800:`#5b21b6`,900:`#4c1d95`,950:`#2e1065`},purple:{50:`#faf5ff`,100:`#f3e8ff`,200:`#e9d5ff`,300:`#d8b4fe`,400:`#c084fc`,500:`#a855f7`,600:`#9333ea`,700:`#7e22ce`,800:`#6b21a8`,900:`#581c87`,950:`#3b0764`},fuchsia:{50:`#fdf4ff`,100:`#fae8ff`,200:`#f5d0fe`,300:`#f0abfc`,400:`#e879f9`,500:`#d946ef`,600:`#c026d3`,700:`#a21caf`,800:`#86198f`,900:`#701a75`,950:`#4a044e`},pink:{50:`#fdf2f8`,100:`#fce7f3`,200:`#fbcfe8`,300:`#f9a8d4`,400:`#f472b6`,500:`#ec4899`,600:`#db2777`,700:`#be185d`,800:`#9d174d`,900:`#831843`,950:`#500724`},rose:{50:`#fff1f2`,100:`#ffe4e6`,200:`#fecdd3`,300:`#fda4af`,400:`#fb7185`,500:`#f43f5e`,600:`#e11d48`,700:`#be123c`,800:`#9f1239`,900:`#881337`,950:`#4c0519`}},K={p:`padding`,px:`padding-left,padding-right`,py:`padding-top,padding-bottom`,pt:`padding-top`,pr:`padding-right`,pb:`padding-bottom`,pl:`padding-left`,ps:`padding-left`,pe:`padding-right`,m:`margin`,mx:`margin-left,margin-right`,my:`margin-top,margin-bottom`,mt:`margin-top`,mr:`margin-right`,mb:`margin-bottom`,ml:`margin-left`,ms:`margin-left`,me:`margin-right`,gap:`gap`,"gap-x":`column-gap`,"gap-y":`row-gap`,text:`font-size`,leading:`line-height`,tracking:`letter-spacing`,rounded:`border-radius`,"rounded-t":`border-top-left-radius,border-top-right-radius`,"rounded-b":`border-bottom-left-radius,border-bottom-right-radius`,"rounded-l":`border-top-left-radius,border-bottom-left-radius`,"rounded-r":`border-top-right-radius,border-bottom-right-radius`,"rounded-tl":`border-top-left-radius`,"rounded-tr":`border-top-right-radius`,"rounded-bl":`border-bottom-left-radius`,"rounded-br":`border-bottom-right-radius`,border:`border-width`,"border-t":`border-top-width`,"border-r":`border-right-width`,"border-b":`border-bottom-width`,"border-l":`border-left-width`,w:`width`,h:`height`,size:`width,height`,"max-w":`max-width`,"max-h":`max-height`,"min-w":`min-width`,"min-h":`min-height`,opacity:`opacity`,inset:`top,right,bottom,left`,"inset-x":`left,right`,"inset-y":`top,bottom`,top:`top`,right:`right`,bottom:`bottom`,left:`left`,z:`z-index`,items:`align-items`,justify:`justify-content`,font:`font-weight`,whitespace:`white-space`},At={"font-size":[`font-size`,`font size`,`text-size`,`text size`],color:[`color`,`text-color`,`text color`,`text-colour`,`text colour`,`foreground`,`fg`],"background-color":[`background`,`background-color`,`background color`,`bg`,`bg-color`,`bg color`],"border-color":[`border-color`,`border color`],fill:[`fill`,`fill-color`,`fill color`],stroke:[`stroke`,`stroke-color`,`stroke color`],"font-family":[`font`,`font-sans`,`font-serif`,`font-mono`,`family`,`sans`,`serif`,`mono`],"font-style":[`italic`,`not-italic`],"text-align":[`text-left`,`text-center`,`text-right`,`text-justify`],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-decoration-line":[`underline`,`line-through`,`no-underline`],"white-space":[`whitespace`,`whitespace-normal`,`whitespace-nowrap`,`whitespace-pre`],"word-break":[`break-normal`,`break-all`,`break-keep`],"overflow-wrap":[`break-words`,`break-anywhere`],"font-variant-numeric":[`tabular-nums`,`proportional-nums`,`lining-nums`,`oldstyle-nums`],"border-style":[`border-solid`,`border-dashed`,`border-dotted`,`border-none`]},jt=(()=>{let e={};for(let[t,n]of Object.entries(K))n!==void 0&&(e[n]??=new Set).add(t);let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=Array.from(r));for(let[e,n]of Object.entries(At)){let r=new Set([...t[e]??[],...n]);t[e]=Array.from(r)}return t})(),q={text:`color`,bg:`background-color`,border:`border-color`,"border-x":`border-color`,"border-y":`border-color`,"border-t":`border-color`,"border-r":`border-color`,"border-b":`border-color`,"border-l":`border-color`,"border-s":`border-color`,"border-e":`border-color`,fill:`fill`,stroke:`stroke`},Mt=e=>K[e]!==void 0||q[e]!==void 0,J=e=>{let t=0,n=-1;for(let r=0;r<e.length;r++){let i=e[r];i===`[`?t++:i===`]`?t--:i===`:`&&t===0&&(n=r)}let r=n>=0?e.slice(n+1):e;return r.startsWith(`!`)?r.slice(1):r},Y=e=>{let t=J(e);if(!t)return null;let n=t.indexOf(`[`);if(n>0)return t.slice(0,n).replace(/-$/,``)||null;let r=t.split(`-`).filter(Boolean);if(r.length===0)return null;for(let e=r.length;e>=1;e--){let t=r.slice(0,e).join(`-`);if(Mt(t))return t}return r[0]},Nt=/-(red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|slate|gray|zinc|neutral|stone|black|white|transparent|current|inherit)\b/,Pt=(e,t)=>e!==`text`&&e!==`bg`&&e!==`border`&&!e.startsWith(`border-`)?!1:Nt.test(t),Ft=new Set(`color.red.orange.amber.yellow.lime.green.emerald.teal.cyan.sky.blue.indigo.violet.purple.fuchsia.pink.rose.slate.gray.grey.zinc.neutral.stone.black.white.transparent.current.currentcolor.inherit.primary.secondary.accent.muted.foreground.background.destructive.success.warning.error.info.card.popover.input.ring`.split(`.`)),It=new Set([`xs`,`sm`,`base`,`lg`,`xl`,`2xl`,`3xl`,`4xl`,`5xl`,`6xl`,`7xl`,`8xl`,`9xl`]),Lt=/^(#|rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color:|color\(|var\(--.*color)/,Rt=/^(-?\d|length:|size:)/,X=e=>e.trim().toLowerCase().replace(/\s+/g,`-`).replace(/([a-z])(\d)/g,`$1-$2`),zt=e=>Lt.test(e)&&!Rt.test(e),Z=(e,t)=>{if(e===t)return``;let n=`${t}-`;return e.startsWith(n)?e.slice(n.length):null},Bt=e=>{let t=J(X(e)),n=Y(t);if(!n)return null;let r=q[n];if(!r)return null;let i=t.indexOf(`[`);if(i>=0)return zt(t.slice(i+1).replace(/\]$/,``))?r:null;let a=Z(t,n);if(a===null)return null;if(n===`bg`&&a===``||(n===`fill`||n===`stroke`)&&a===``)return r;let o=a.split(`-`)[0];return n===`text`&&It.has(o)?null:Ft.has(o)?r:null},Vt={black:`#000000`,white:`#ffffff`,transparent:e.nt},Ht=e=>{let t=J(X(e)),n=Y(t);if(!n||q[n]===void 0||t.includes(`[`))return null;let r=Z(t,n);if(!r)return null;let i=Vt[r];if(i)return i;let a=r.lastIndexOf(`-`);if(a<0)return null;let o=r.slice(0,a),s=o===`grey`?`gray`:o,c=Number.parseInt(r.slice(a+1),10);return kt[s]?.[c]??null},Ut=/^-?\d/,Wt=(e,t)=>{if(t===``||t.startsWith(`[`)||Ut.test(t))return!0;let n=t.split(`-`)[0];return e===`text`?It.has(n):e===`font`||e===`border`||e.startsWith(`border-`)?!1:(e===`rounded`||e.startsWith(`rounded-`),!0)},Gt={"font-sans":{property:`font-family`,value:`ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`},"font-serif":{property:`font-family`,value:`ui-serif, Georgia, Cambria, "Times New Roman", Times, serif`},"font-mono":{property:`font-family`,value:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`},"font-thin":{property:`font-weight`,value:`100`},"font-extralight":{property:`font-weight`,value:`200`},"font-light":{property:`font-weight`,value:`300`},"font-normal":{property:`font-weight`,value:`400`},"font-medium":{property:`font-weight`,value:`500`},"font-semibold":{property:`font-weight`,value:`600`},"font-bold":{property:`font-weight`,value:`700`},"font-extrabold":{property:`font-weight`,value:`800`},"font-black":{property:`font-weight`,value:`900`},"text-left":{property:`text-align`,value:`left`},"text-center":{property:`text-align`,value:`center`},"text-right":{property:`text-align`,value:`right`},"text-justify":{property:`text-align`,value:`justify`},italic:{property:`font-style`,value:`italic`},"not-italic":{property:`font-style`,value:`normal`},uppercase:{property:`text-transform`,value:`uppercase`},lowercase:{property:`text-transform`,value:`lowercase`},capitalize:{property:`text-transform`,value:`capitalize`},"normal-case":{property:`text-transform`,value:`none`},underline:{property:`text-decoration-line`,value:`underline`},"line-through":{property:`text-decoration-line`,value:`line-through`},"no-underline":{property:`text-decoration-line`,value:`none`},"whitespace-normal":{property:`white-space`,value:`normal`},"whitespace-nowrap":{property:`white-space`,value:`nowrap`},"whitespace-pre":{property:`white-space`,value:`pre`},"whitespace-pre-line":{property:`white-space`,value:`pre-line`},"whitespace-pre-wrap":{property:`white-space`,value:`pre-wrap`},"whitespace-break-spaces":{property:`white-space`,value:`break-spaces`},"break-normal":{property:`word-break`,value:`normal`},"break-all":{property:`word-break`,value:`break-all`},"break-keep":{property:`word-break`,value:`keep-all`},"break-words":{property:`overflow-wrap`,value:`break-word`},"break-anywhere":{property:`overflow-wrap`,value:`anywhere`},"tabular-nums":{property:`font-variant-numeric`,value:`tabular-nums`},"proportional-nums":{property:`font-variant-numeric`,value:`proportional-nums`},"lining-nums":{property:`font-variant-numeric`,value:`lining-nums`},"oldstyle-nums":{property:`font-variant-numeric`,value:`oldstyle-nums`},"slashed-zero":{property:`font-variant-numeric`,value:`slashed-zero`},"border-solid":{property:`border-style`,value:`solid`},"border-dashed":{property:`border-style`,value:`dashed`},"border-dotted":{property:`border-style`,value:`dotted`},"border-none":{property:`border-style`,value:`none`}},Kt=e=>{let t=X(e);if(!t)return[];let n=$(t);if(n)return[n.property];let r=Bt(t);return r?[r]:[]},qt=e=>{let t=X(e);if(!t)return[];let n=Y(t);if(!n)return[];let r=Z(J(t),n);if(r===null||!Wt(n,r))return[];let i=Q(n);return i?[i]:[]},Jt=e=>{let t=e.getAttribute(`class`);if(!t)return new Set;let n=t.split(/\s+/).filter(Boolean),r=new Set;for(let e of n){let t=Y(e);if(!t||Pt(t,e))continue;let n=$(e);if(n){r.add(n.property);continue}let i=Q(t);i&&r.add(i)}return r},Yt=e=>jt[e]??[],Q=e=>{let t=K[e];return t===void 0?null:t},$=e=>{let t=Gt[J(e)];return t===void 0?null:t},Xt=`react-grab-toolbar-state`,Zt=()=>{try{let t=localStorage.getItem(Xt);if(!t)return null;let n=JSON.parse(t);if(typeof n!=`object`||!n)return null;let r=n,i=typeof r.collapsed==`boolean`?r.collapsed:!1;return{edge:r.edge===`top`||r.edge===`bottom`||r.edge===`left`||r.edge===`right`?r.edge:`bottom`,ratio:typeof r.ratio==`number`?r.ratio:e.Ft,collapsed:i,enabled:!i,defaultAction:typeof r.defaultAction==`string`?r.defaultAction:e.H}}catch(e){console.warn(`[react-grab] Failed to load toolbar state from localStorage:`,e)}return null},Qt=e=>{try{localStorage.setItem(Xt,JSON.stringify(e))}catch(e){console.warn(`[react-grab] Failed to save toolbar state to localStorage:`,e)}},$t=e=>{let[t,n]=c(!1);return t},en=e=>e.key===`Enter`,tn=e=>e.metaKey||e.ctrlKey,nn=(e,t,n={})=>{if(!t.key)return null;if(en(t))return e.find(e=>e.shortcut===`Enter`)??null;if(t.repeat)return null;let r=t.key.toLowerCase();return tn(t)?n.includeModifierShortcuts===!0?e.find(e=>e.shortcut!==void 0&&e.shortcut!==`Enter`&&e.shortcutModifier!==!1&&r===e.shortcut.toLowerCase())??null:null:e.find(e=>e.shortcut!==void 0&&e.shortcutModifier===!1&&r===e.shortcut.toLowerCase())??null},rn=()=>{let e=!1;return{arm:()=>{e=!0},clear:()=>{e=!1},consume:()=>e?(e=!1,!0):!1}};Object.defineProperty(exports,`$`,{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,`B`,{enumerable:!0,get:function(){return Xe}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return ft}}),Object.defineProperty(exports,`Ct`,{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return-512}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return vt}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return dt}}),Object.defineProperty(exports,`G`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`H`,{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(exports,`I`,{enumerable:!0,get:function(){return ut}}),Object.defineProperty(exports,`J`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`K`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`L`,{enumerable:!0,get:function(){return ct}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return 9999}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return-9999}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return bt}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return St}}),Object.defineProperty(exports,`Q`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`R`,{enumerable:!0,get:function(){return st}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return wt}}),Object.defineProperty(exports,`St`,{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return-128}}),Object.defineProperty(exports,`Tt`,{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,`U`,{enumerable:!0,get:function(){return qe}}),Object.defineProperty(exports,`V`,{enumerable:!0,get:function(){return Je}}),Object.defineProperty(exports,`W`,{enumerable:!0,get:function(){return We}}),Object.defineProperty(exports,`X`,{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,`Y`,{enumerable:!0,get:function(){return Re}}),Object.defineProperty(exports,`Z`,{enumerable:!0,get:function(){return je}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(exports,`_t`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return Qt}}),Object.defineProperty(exports,`at`,{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return Tt}}),Object.defineProperty(exports,`bt`,{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return Bt}}),Object.defineProperty(exports,`ct`,{enumerable:!0,get:function(){return _e}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return Kt}}),Object.defineProperty(exports,`dt`,{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,`et`,{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,`ft`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return Ot}}),Object.defineProperty(exports,`gt`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return Et}}),Object.defineProperty(exports,`ht`,{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return Zt}}),Object.defineProperty(exports,`it`,{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return pt}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return 384}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return Ht}}),Object.defineProperty(exports,`lt`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,`mt`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return nn}}),Object.defineProperty(exports,`nt`,{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return Jt}}),Object.defineProperty(exports,`ot`,{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`pt`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`q`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return $t}}),Object.defineProperty(exports,`rt`,{enumerable:!0,get:function(){return Le}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Yt}}),Object.defineProperty(exports,`st`,{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return rn}}),Object.defineProperty(exports,`tt`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return qt}}),Object.defineProperty(exports,`ut`,{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return yt}}),Object.defineProperty(exports,`vt`,{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return Ct}}),Object.defineProperty(exports,`wt`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return xt}}),Object.defineProperty(exports,`xt`,{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`yt`,{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,`z`,{enumerable:!0,get:function(){return Qe}});
|
|
9
|
+
const e=require(`./freeze-updates-CqzBfk2W.cjs`),t=Symbol(`error`);function n(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function r(e,i=a){let o=i&&i.context&&i.context[t],s=n(e);if(!o)throw s;try{for(let e of o)e(s)}catch(e){r(e,i&&i.owner||null)}}const i={context:null,owner:null,owned:null,cleanups:null};let a=null;function o(){let e={owner:a,context:a?a.context:null,owned:null,cleanups:null};return a&&(a.owned?a.owned.push(e):a.owned=[e]),e}function s(e,t){let n=a,o=t===void 0?n:t,s=e.length===0?i:{context:o?o.context:null,owner:o,owned:null,cleanups:null};a=s;let c;try{c=e(e.length===0?()=>{}:()=>re(s))}catch(e){r(e)}finally{a=n}return c}function c(e,t){return[()=>e,t=>e=typeof t==`function`?t(e):t]}function l(e,t){a=o();try{e(t)}catch(e){r(e)}finally{a=a.owner}}const u=l;function d(e,t){}function f(e,t){a=o();let n;try{n=e(t)}catch(e){r(e)}finally{a=a.owner}return()=>n}function p(e){return e()}const m=p;function ee(e,t,n={}){let r=Array.isArray(e),i=n.defer;return()=>{if(i)return;let n;if(r){n=[];for(let t=0;t<e.length;t++)n.push(e[t]())}else n=e();return t(n)}}function te(e){}function ne(e){return a&&(a.cleanups?a.cleanups.push(e):a.cleanups=[e]),e}function re(e){if(e.owned){for(let t=0;t<e.owned.length;t++)re(e.owned[t]);e.owned=null}if(e.cleanups){for(let t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}}function ie(e){let t=Symbol(`context`);return{id:t,Provider:se(t),defaultValue:e}}function ae(e){return a&&a.context&&a.context[e.id]!==void 0?a.context[e.id]:e.defaultValue}function oe(e){let t=f(()=>h(e()));return t.toArray=()=>{let e=t();return Array.isArray(e)?e:e==null?[]:[e]},t}function h(e){if(typeof e==`function`&&!e.length)return h(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=h(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function se(e){return function(t){return f(()=>(a.context={...a.context,[e]:t.value},oe(()=>t.children)))}}function ce(e,t,n={}){let r=e(),i=[];if(r&&r.length)for(let e=0,n=r.length;e<n;e++)i.push(t(r[e],()=>e));else n.fallback&&(i=[n.fallback()]);return()=>i}const g={context:void 0,getContextId(){if(!this.context)throw Error(`getContextId cannot be used under non-hydrating context`);return _(this.context.count)},getNextContextId(){if(!this.context)throw Error(`getNextContextId cannot be used under non-hydrating context`);return _(this.context.count++)}};function _(e){let t=String(e),n=t.length-1;return g.context.id+(n?String.fromCharCode(96+n):``)+t}function le(e){g.context=e}function ue(){return g.context?{...g.context,id:g.getNextContextId(),count:0}:void 0}function de(e,t){if(g.context&&!g.context.noHydrate){let n=g.context;le(ue());let r=e(t||{});return le(n),r}return e(t||{})}function fe(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`function`&&(r=r()),r){let n=Object.getOwnPropertyDescriptors(r);for(let r in n)r in t||Object.defineProperty(t,r,{enumerable:!0,get(){for(let t=e.length-1;t>=0;t--){let n,i=e[t];if(typeof i==`function`&&(i=i()),n=(i||{})[r],n!==void 0)return n}}})}}return t}function pe(e,...t){let n=Object.getOwnPropertyDescriptors(e),r=e=>{let t={};for(let r=0;r<e.length;r++){let i=e[r];n[i]&&(Object.defineProperty(t,i,n[i]),delete n[i])}return t};return t.map(r).concat(r(Object.keys(n)))}function v(e,t){let n=e.each||[],r=n.length,i=e.children;if(r){let e=Array(r);for(let a=0;a<r;a++)e[a]=t(i,n[a],a);return e}return e.fallback}function me(e){return v(e,(e,t,n)=>e(t,()=>n))}function he(e){return v(e,(e,t,n)=>e(()=>t,n))}function ge(e){let t;return e.when?typeof(t=e.children)==`function`?t(e.keyed?e.when:()=>e.when):t:e.fallback||``}function _e(e){let t=e.children;Array.isArray(t)||(t=[t]);for(let e=0;e<t.length;e++){let n=t[e].when;if(n){let r=t[e].children;return typeof r==`function`?r(t[e].keyed?n:()=>n):r}}return e.fallback||``}function ve(e){return e}const ye=ie();let y=null;function be(e,t,r={}){typeof t!=`function`&&(r=t||{},t=e,e=!0);let i=new Set,a=g.getNextContextId(),o={},s=r.storage?r.storage(r.initialValue)[0]():r.initialValue,c,l;if(g.context.async&&r.ssrLoadFrom!==`initial`&&(o=g.context.resources[a]||(g.context.resources[a]={}),o.ref))return!o.data&&!o.ref[0]._loading&&!o.ref[0].error&&o.ref[1].refetch(),o.ref;let u=()=>{if(l)throw l;let e=r.ssrLoadFrom!==`initial`&&g.context.async&&`data`in g.context.resources[a];if(!e&&y&&y.push(a),!e&&d._loading){let e=ae(ye);e&&(e.resources.set(a,d),i.add(e))}return e},d=()=>u()?g.context.resources[a].data:s,f=()=>(u(),d._loading);d._loading=!1,d.error=void 0,d.state=`initialValue`in r?`ready`:`unresolved`,Object.defineProperties(d,{latest:{get(){return d()}},loading:{get(){return f()}}});function p(){let o=g.context;if(!o.async)return d._loading=!!(typeof e==`function`?e():e);if(o.resources&&a in o.resources&&`data`in o.resources[a]){s=o.resources[a].data;return}let u;try{if(y=[],u=typeof e==`function`?e():e,y.length)return}finally{y=null}if(!c){if(u==null||u===!1)return;c=t(u,{value:s})}return typeof c==`object`&&c&&`then`in c?(d._loading=!0,d.state=`pending`,c=c.then(e=>(d._loading=!1,d.state=`ready`,o.resources[a].data=e,c=null,b(i),e)).catch(e=>{throw d._loading=!1,d.state=`errored`,d.error=l=n(e),c=null,b(i),l}),o.serialize&&o.serialize(a,c,r.deferStream),c):(o.resources[a].data=c,o.serialize&&o.serialize(a,c),c=null,o.resources[a].data)}r.ssrLoadFrom!==`initial`&&p();let m=[d,{refetch:p,mutate:e=>s=e}];return c&&(o.ref=m),m}function xe(e){for(let t of e.resources.values())if(t._loading)return!1;return!0}function b(e){for(let t of e)xe(t)&&(t.completed(),e.delete(t))}const Se=new Set([`className`,`value`,`readOnly`,`noValidate`,`formNoValidate`,`isMap`,`noModule`,`playsInline`,`adAuctionHeaders`,`allowFullscreen`,`browsingTopics`,`defaultChecked`,`defaultMuted`,`defaultSelected`,`disablePictureInPicture`,`disableRemotePlayback`,`preservesPitch`,`shadowRootClonable`,`shadowRootCustomElementRegistry`,`shadowRootDelegatesFocus`,`shadowRootSerializable`,`sharedStorageWritable`,...`allowfullscreen.async.alpha.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.hidden.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.adauctionheaders.browsingtopics.credentialless.defaultchecked.defaultmuted.defaultselected.defer.disablepictureinpicture.disableremoteplayback.preservespitch.shadowrootclonable.shadowrootcustomelementregistry.shadowrootdelegatesfocus.shadowrootserializable.sharedstoragewritable`.split(`.`)]),Ce=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),we=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),Te=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}});function Ee(e,t){let n=Te[e];return typeof n==`object`?n[t]?n.$:void 0:n}const De=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),Oe={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},ke=e=>f(()=>e());function Ae(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null)if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&!((d=l.get(t[c]))==null||d!==r+u);)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++;else t[o++].remove()}}}const x=`_$DX_DELEGATE`;function je(e,t,n,r={}){let i;return s(r=>{i=r,t===document?e():Re(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function Me(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>m(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function S(e,t=window.document){let n=t[x]||(t[x]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,Ue))}}function C(e,t,n){O(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Ne(e,t,n,r){O(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Pe(e,t,n){O(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function w(e,t){O(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function T(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){let r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,typeof n!=`function`&&n)}function E(e,t,n={}){let r=Object.keys(t||{}),i=Object.keys(n),a,o;for(a=0,o=i.length;a<o;a++){let r=i[a];!r||r===`undefined`||t[r]||(Ve(e,r,!1),delete n[r])}for(a=0,o=r.length;a<o;a++){let i=r[a],o=!!t[i];!i||i===`undefined`||n[i]===o||!o||(Ve(e,i,!0),n[i]=o)}return n}function D(e,t,n){if(!t)return n?C(e,`style`):t;let r=e.style;if(typeof t==`string`)return r.cssText=t;typeof n==`string`&&(r.cssText=n=void 0),n||={},t||={};let i,a;for(a in n)t[a]??r.removeProperty(a),delete n[a];for(a in t)i=t[a],i!==n[a]&&(r.setProperty(a,i),n[a]=i);return n}function Fe(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function Ie(e,t={},n,r){let i={};return r||u(()=>i.children=k(e,t.children,i.children)),u(()=>typeof t.ref==`function`&&Le(t.ref,e)),u(()=>ze(e,t,n,!0,i,!0)),i}function Le(e,t,n){return m(()=>e(t,n))}function Re(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return k(e,t,r,n);u(r=>k(e,t(),r,n),r)}function ze(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=He(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||k(e,t.children);continue}let s=t[o];i[o]=He(e,o,s,i[o],n,a,t)}}function O(e){return!!g.context&&!g.done&&(!e||e.isConnected)}function Be(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function Ve(e,t,n){let r=t.trim().split(/\s+/);for(let t=0,i=r.length;t<i;t++)e.classList.toggle(r[t],n)}function He(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return D(e,n,r);if(t===`classList`)return E(e,n,r);if(n===r)return r;if(t===`ref`)a||n(e);else if(t.slice(0,3)===`on:`){let i=t.slice(3);r&&e.removeEventListener(i,r,typeof r!=`function`&&r),n&&e.addEventListener(i,n,typeof n!=`function`&&n)}else if(t.slice(0,10)===`oncapture:`){let i=t.slice(10);r&&e.removeEventListener(i,r,!0),n&&e.addEventListener(i,n,!0)}else if(t.slice(0,2)===`on`){let i=t.slice(2).toLowerCase(),a=De.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(T(e,i,n,a),a&&S([i]))}else if(t.slice(0,5)===`attr:`)C(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)Pe(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=Ce.has(t))||!i&&((u=Ee(t,e.tagName))||(c=Se.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(O(e))return n;t===`class`||t===`className`?w(e,n):s&&!c&&!l?e[Be(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&Oe[t.split(`:`)[0]];r?Ne(e,r,t,n):C(e,we[t]||t,n)}return n}function Ue(e){if(g.registry&&g.events&&g.events.find(([t,n])=>n===e))return;let t=e.target,n=`$$${e.type}`,r=e.target,i=e.currentTarget,a=t=>Object.defineProperty(e,`target`,{configurable:!0,value:t}),o=()=>{let r=t[n];if(r&&!t.disabled){let i=t[`${n}Data`];if(i===void 0?r.call(t,e):r.call(t,i,e),e.cancelBubble)return}return t.host&&typeof t.host!=`string`&&!t.host._$host&&t.contains(e.target)&&a(t.host),!0},s=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,`currentTarget`,{configurable:!0,get(){return t||document}}),g.registry&&!g.done&&(g.done=_$HY.done=!0),e.composedPath){let n=e.composedPath();a(n[0]);for(let e=0;e<n.length-2&&(t=n[e],o());e++){if(t._$host){t=t._$host,s();break}if(t.parentNode===i)break}}else s();a(r)}function k(e,t,n,r,i){let a=O(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=M(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=M(e,n,r)}else if(o===`function`)return u(()=>{let i=t();for(;typeof i==`function`;)i=i();n=k(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(A(o,t,n,i))return u(()=>n=k(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=M(e,n,r),s)return n}else c?n.length===0?j(e,o,r):Ae(e,n,o):(n&&M(e),j(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=M(e,n,r,t);M(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function A(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(!(o==null||o===!0||o===!1))if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=A(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=A(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0;else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}return i}function j(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function M(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}const We=e=>!!(e?.isConnected??e?.ownerDocument?.contains(e)),Ge=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`,`combobox`],Ke=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},qe=t=>{if(document.designMode===`on`)return!0;let n=Ke(t);if(!n)return!1;if(n.isContentEditable)return!0;let r=e.j(n);return Ge.some(e=>e===r||e===n.role)},Je=e=>{let t=e.target;if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){let e=t.selectionStart??0;return(t.selectionEnd??0)-e>0}return!1},Ye=()=>{let e=window.getSelection();return e?e.toString().length>0:!1},N=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*([\d.]+%?))?\s*\)$/,P=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`),F=(e,t,n,r=1)=>{let i=P(e),a=P(t),o=P(n);return r>=1?`#${i}${a}${o}`:`#${i}${a}${o}${P(r*255)}`},Xe=e=>{if(!e.startsWith(`#`))return null;let t=e.slice(1);if(t.length!==6&&t.length!==8)return null;let n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16),a=t.length===8?parseInt(t.slice(6,8),16)/255:1;return!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)?null:{red:n,green:r,blue:i,alpha:a}},Ze=e=>{let t=e.match(N);if(!t)return null;let n=1;if(t[4]!==void 0){let e=t[4];n=e.endsWith(`%`)?Number(e.slice(0,-1))/100:Number(e)}return F(Number(t[1]),Number(t[2]),Number(t[3]),n)},Qe=e=>{let t=e.match(N);return!t||t[4]===void 0?!1:(t[4].endsWith(`%`)?Number(t[4].slice(0,-1))/100:Number(t[4]))===0},$e=/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,et=e=>{let t=e.match($e);if(!t)return null;let n=t[1];return n.length===3?`#${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`:n.length===4?`#${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}${n[3]}${n[3]}`:`#${n}`},I=`rgba(0, 0, 0, 0)`,tt=/^oklch\(\s*([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+)(deg|grad|rad|turn)?(?:\s*\/\s*([+-]?\d*\.?\d+%?))?\s*\)$/i,nt=180/Math.PI,L=(e,t)=>e.endsWith(`%`)?Number(e.slice(0,-1))/100*t:Number(e),rt=(e,t)=>{let n=Number(e);return t===`grad`?n*.9:t===`rad`?n*nt:t===`turn`?n*360:n},R=e=>{let t=Math.max(0,Math.min(1,e));return(t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055)*255},it=e=>{let t=e.match(tt);if(!t)return null;let n=L(t[1],1),r=L(t[2],.4),i=rt(t[3],t[4])*Math.PI/180,a=t[5]===void 0?1:L(t[5],1);if(![n,r,i,a].every(Number.isFinite))return null;let o=r*Math.cos(i),s=r*Math.sin(i),c=n+.3963377774*o+.2158037573*s,l=n-.1055613458*o-.0638541728*s,u=n-.0894841775*o-1.291485548*s,d=c**3,f=l**3,p=u**3,m=4.0767416621*d-3.3077115913*f+.2309699292*p,ee=-1.2684380046*d+2.6097574011*f-.3413193965*p,te=-.0041960863*d-.7034186147*f+1.707614701*p;return F(R(m),R(ee),R(te),Math.max(0,Math.min(1,a)))};let z=null;const at=()=>z||(typeof document>`u`?null:(z=document.createElement(`canvas`).getContext(`2d`,{willReadFrequently:!0}),z)),ot=(t,n)=>{t.clearRect(0,0,1,1),t.fillStyle=n,t.fillRect(0,0,1,1);let r=t.getImageData(0,0,1,1).data;return r[3]===0?e.at:F(r[0],r[1],r[2],r[3]/255)},st=t=>{let n=t.trim();if(!n)return null;if(n.toLowerCase()===`transparent`)return e.at;let r=et(n);if(r)return r;let i=it(n);if(i)return i;let a=at();if(!a)return null;a.fillStyle=I,a.fillStyle=n;let o=a.fillStyle;return typeof o==`string`?o.toLowerCase()===I?n.toLowerCase().replace(/\s+/g,``)===`rgba(0,0,0,0)`?e.at:null:o.startsWith(`#`)&&o.length===7?o:o.startsWith(`rgb`)?Ze(o):ot(a,n):null},ct=(e,t,n)=>Math.max(t,Math.min(e,n));let B=null;const lt=()=>{if(typeof navigator>`u`||!(`userAgentData`in navigator))return null;let e=navigator.userAgentData;if(typeof e!=`object`||!e||!(`platform`in e))return null;let t=e.platform;return typeof t==`string`?t:null},ut=()=>{if(B===null){if(typeof navigator>`u`)return B=!1,B;let e=navigator.platform??lt()??navigator.userAgent;B=/Mac|iPhone|iPad|iPod/i.test(e)}return B},dt=(e,t)=>{try{return e.composedPath().some(e=>e instanceof HTMLElement&&e.hasAttribute(t))}catch{return!1}},V=`padding-top.padding-right.padding-bottom.padding-left.margin-top.margin-right.margin-bottom.margin-left.gap.row-gap.column-gap.font-size.line-height.letter-spacing.border-radius.border-top-left-radius.border-top-right-radius.border-bottom-right-radius.border-bottom-left-radius.border-width.border-top-width.border-right-width.border-bottom-width.border-left-width.opacity.width.height.min-width.min-height.max-width.max-height.top.right.bottom.left.z-index`.split(`.`),ft=new Set([`letter-spacing`,`gap`,`row-gap`,`column-gap`]),pt=new Set([`z-index`]),mt=[{key:`padding`,label:`padding`,longhands:[`padding-top`,`padding-right`,`padding-bottom`,`padding-left`]},{key:`padding-top,padding-bottom`,label:`padding-y`,longhands:[`padding-top`,`padding-bottom`]},{key:`padding-left,padding-right`,label:`padding-x`,longhands:[`padding-left`,`padding-right`]},{key:`padding-top`,label:`padding top`,longhands:[`padding-top`]},{key:`padding-right`,label:`padding right`,longhands:[`padding-right`]},{key:`padding-bottom`,label:`padding bottom`,longhands:[`padding-bottom`]},{key:`padding-left`,label:`padding left`,longhands:[`padding-left`]}],ht=[{key:`margin`,label:`margin`,longhands:[`margin-top`,`margin-right`,`margin-bottom`,`margin-left`]},{key:`margin-top,margin-bottom`,label:`margin-y`,longhands:[`margin-top`,`margin-bottom`]},{key:`margin-left,margin-right`,label:`margin-x`,longhands:[`margin-left`,`margin-right`]},{key:`margin-top`,label:`margin top`,longhands:[`margin-top`]},{key:`margin-right`,label:`margin right`,longhands:[`margin-right`]},{key:`margin-bottom`,label:`margin bottom`,longhands:[`margin-bottom`]},{key:`margin-left`,label:`margin left`,longhands:[`margin-left`]}],gt=[{key:`gap`,label:`gap`,longhands:[`row-gap`,`column-gap`]},{key:`row-gap`,label:`row gap`,longhands:[`row-gap`]},{key:`column-gap`,label:`column gap`,longhands:[`column-gap`]}],_t=[{key:`border-radius`,label:`border radius`,longhands:[`border-top-left-radius`,`border-top-right-radius`,`border-bottom-right-radius`,`border-bottom-left-radius`]},{key:`border-top-left-radius,border-top-right-radius`,label:`top corners`,longhands:[`border-top-left-radius`,`border-top-right-radius`]},{key:`border-bottom-left-radius,border-bottom-right-radius`,label:`bottom corners`,longhands:[`border-bottom-left-radius`,`border-bottom-right-radius`]},{key:`border-top-left-radius,border-bottom-left-radius`,label:`left corners`,longhands:[`border-top-left-radius`,`border-bottom-left-radius`]},{key:`border-top-right-radius,border-bottom-right-radius`,label:`right corners`,longhands:[`border-top-right-radius`,`border-bottom-right-radius`]},{key:`border-top-left-radius`,label:`top left radius`,longhands:[`border-top-left-radius`]},{key:`border-top-right-radius`,label:`top right radius`,longhands:[`border-top-right-radius`]},{key:`border-bottom-right-radius`,label:`bottom right radius`,longhands:[`border-bottom-right-radius`]},{key:`border-bottom-left-radius`,label:`bottom left radius`,longhands:[`border-bottom-left-radius`]}],H=[{key:`top,right,bottom,left`,label:`inset`,longhands:[`top`,`right`,`bottom`,`left`]},{key:`top,bottom`,label:`inset-y`,longhands:[`top`,`bottom`]},{key:`left,right`,label:`inset-x`,longhands:[`left`,`right`]},{key:`top`,label:`top`,longhands:[`top`]},{key:`right`,label:`right`,longhands:[`right`]},{key:`bottom`,label:`bottom`,longhands:[`bottom`]},{key:`left`,label:`left`,longhands:[`left`]}],vt=new Set(H.map(e=>e.key)),yt=[mt,ht,gt,_t,[{key:`border-width`,label:`border width`,longhands:[`border-top-width`,`border-right-width`,`border-bottom-width`,`border-left-width`]},{key:`border-top-width`,label:`border top width`,longhands:[`border-top-width`]},{key:`border-right-width`,label:`border right width`,longhands:[`border-right-width`]},{key:`border-bottom-width`,label:`border bottom width`,longhands:[`border-bottom-width`]},{key:`border-left-width`,label:`border left width`,longhands:[`border-left-width`]}],[{key:`width,height`,label:`size`,longhands:[`width`,`height`]},{key:`width`,label:`width`,longhands:[`width`]},{key:`height`,label:`height`,longhands:[`height`]}],H],bt=[{key:`font-size`,label:`font size`},{key:`line-height`,label:`line height`},{key:`letter-spacing`,label:`letter spacing`},{key:`min-width`,label:`min width`},{key:`min-height`,label:`min height`},{key:`max-width`,label:`max width`},{key:`max-height`,label:`max height`},{key:`z-index`,label:`z-index`},{key:`opacity`,label:`opacity`}],xt=[{key:`color`,label:`text color`,alwaysShow:!0},{key:`background-color`,label:`background`,alwaysShow:!0},{key:`border-color`,label:`border color`},{key:`fill`,label:`fill`},{key:`stroke`,label:`stroke`}],U=[{value:`ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`,label:`sans`},{value:`ui-serif, Georgia, Cambria, "Times New Roman", Times, serif`,label:`serif`},{value:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`,label:`mono`},{value:`system-ui, sans-serif`,label:`system`},{value:`serif`,label:`serif`},{value:`monospace`,label:`mono`}],St=e=>{let t=e.trim();return U.some(e=>e.value===t)?U:[{value:t,label:`current`},...U]},Ct={key:`font-family`,label:`font family`},wt=[{key:`display`,label:`display`,options:[{value:`block`,label:`block`},{value:`flex`,label:`flex`},{value:`inline-block`,label:`inline-block`},{value:`inline`,label:`inline`},{value:`grid`,label:`grid`},{value:`none`,label:`none`}]},{key:`text-align`,label:`text align`,options:[{value:`left`,label:`left`},{value:`center`,label:`center`},{value:`right`,label:`right`},{value:`justify`,label:`justify`}]},{key:`font-style`,label:`font style`,options:[{value:`normal`,label:`normal`},{value:`italic`,label:`italic`}]},{key:`text-transform`,label:`text transform`,options:[{value:`none`,label:`none`},{value:`uppercase`,label:`uppercase`},{value:`lowercase`,label:`lowercase`},{value:`capitalize`,label:`capitalize`}]},{key:`white-space`,label:`white space`,options:[{value:`normal`,label:`normal`},{value:`nowrap`,label:`nowrap`},{value:`pre`,label:`pre`},{value:`pre-wrap`,label:`pre-wrap`},{value:`pre-line`,label:`pre-line`},{value:`break-spaces`,label:`break-spaces`}]},{key:`word-break`,label:`word break`,options:[{value:`normal`,label:`normal`},{value:`break-all`,label:`break-all`},{value:`keep-all`,label:`keep-all`}]},{key:`overflow-wrap`,label:`wrap`,options:[{value:`normal`,label:`normal`},{value:`break-word`,label:`break-word`},{value:`anywhere`,label:`anywhere`}]},{key:`font-variant-numeric`,label:`number style`,options:[{value:`normal`,label:`normal`},{value:`tabular-nums`,label:`tabular`},{value:`proportional-nums`,label:`proportional`},{value:`lining-nums`,label:`lining`},{value:`oldstyle-nums`,label:`oldstyle`},{value:`slashed-zero`,label:`slashed zero`}]},{key:`text-decoration-line`,label:`decoration`,options:[{value:`none`,label:`none`},{value:`underline`,label:`underline`},{value:`line-through`,label:`strike`}]},{key:`border-style`,label:`border style`,options:[{value:`none`,label:`none`},{value:`solid`,label:`solid`},{value:`dashed`,label:`dashed`},{value:`dotted`,label:`dotted`}]},{key:`visibility`,label:`visibility`,options:[{value:`visible`,label:`visible`},{value:`hidden`,label:`hidden`}]},{key:`align-items`,label:`align items`,options:[{value:`stretch`,label:`stretch`},{value:`flex-start`,label:`start`},{value:`center`,label:`center`},{value:`flex-end`,label:`end`},{value:`baseline`,label:`baseline`}]},{key:`justify-content`,label:`justify content`,options:[{value:`flex-start`,label:`start`},{value:`center`,label:`center`},{value:`flex-end`,label:`end`},{value:`space-between`,label:`between`},{value:`space-around`,label:`around`},{value:`space-evenly`,label:`evenly`}]},{key:`font-weight`,label:`font weight`,options:[{value:`100`,label:`thin`},{value:`200`,label:`extra-light`},{value:`300`,label:`light`},{value:`400`,label:`normal`},{value:`500`,label:`medium`},{value:`600`,label:`semibold`},{value:`700`,label:`bold`},{value:`800`,label:`extra-bold`},{value:`900`,label:`black`}]}],Tt=[...V,`color`,`background-color`,`border-color`,`fill`,`stroke`,`font-family`,`display`,`text-align`,`font-style`,`text-transform`,`white-space`,`word-break`,`overflow-wrap`,`font-variant-numeric`,`text-decoration-line`,`border-style`,`visibility`,`align-items`,`justify-content`,`font-weight`],W=e=>Number.isInteger(e)?e:Math.round(e*100)/100,G=e=>Number.isInteger(e)?String(e):e.toFixed(2).replace(/\.?0+$/,``),Et=e=>Number.isFinite(e)?G(W(e)):String(e),Dt=e=>Math.round(e),Ot=(e,t)=>{if(e.kind===`color`||e.kind===`enum`)return typeof t==`string`?t:e.value;let n=typeof t==`number`?t:e.value;return e.key===`opacity`&&e.unit===`%`?G(W(n/100)):`${G(W(n))}${e.unit}`},kt={slate:{50:`#f8fafc`,100:`#f1f5f9`,200:`#e2e8f0`,300:`#cbd5e1`,400:`#94a3b8`,500:`#64748b`,600:`#475569`,700:`#334155`,800:`#1e293b`,900:`#0f172a`,950:`#020617`},gray:{50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#1f2937`,900:`#111827`,950:`#030712`},zinc:{50:`#fafafa`,100:`#f4f4f5`,200:`#e4e4e7`,300:`#d4d4d8`,400:`#a1a1aa`,500:`#71717a`,600:`#52525b`,700:`#3f3f46`,800:`#27272a`,900:`#18181b`,950:`#09090b`},neutral:{50:`#fafafa`,100:`#f5f5f5`,200:`#e5e5e5`,300:`#d4d4d4`,400:`#a3a3a3`,500:`#737373`,600:`#525252`,700:`#404040`,800:`#262626`,900:`#171717`,950:`#0a0a0a`},stone:{50:`#fafaf9`,100:`#f5f5f4`,200:`#e7e5e4`,300:`#d6d3d1`,400:`#a8a29e`,500:`#78716c`,600:`#57534e`,700:`#44403c`,800:`#292524`,900:`#1c1917`,950:`#0c0a09`},red:{50:`#fef2f2`,100:`#fee2e2`,200:`#fecaca`,300:`#fca5a5`,400:`#f87171`,500:`#ef4444`,600:`#dc2626`,700:`#b91c1c`,800:`#991b1b`,900:`#7f1d1d`,950:`#450a0a`},orange:{50:`#fff7ed`,100:`#ffedd5`,200:`#fed7aa`,300:`#fdba74`,400:`#fb923c`,500:`#f97316`,600:`#ea580c`,700:`#c2410c`,800:`#9a3412`,900:`#7c2d12`,950:`#431407`},amber:{50:`#fffbeb`,100:`#fef3c7`,200:`#fde68a`,300:`#fcd34d`,400:`#fbbf24`,500:`#f59e0b`,600:`#d97706`,700:`#b45309`,800:`#92400e`,900:`#78350f`,950:`#451a03`},yellow:{50:`#fefce8`,100:`#fef9c3`,200:`#fef08a`,300:`#fde047`,400:`#facc15`,500:`#eab308`,600:`#ca8a04`,700:`#a16207`,800:`#854d0e`,900:`#713f12`,950:`#422006`},lime:{50:`#f7fee7`,100:`#ecfccb`,200:`#d9f99d`,300:`#bef264`,400:`#a3e635`,500:`#84cc16`,600:`#65a30d`,700:`#4d7c0f`,800:`#3f6212`,900:`#365314`,950:`#1a2e05`},green:{50:`#f0fdf4`,100:`#dcfce7`,200:`#bbf7d0`,300:`#86efac`,400:`#4ade80`,500:`#22c55e`,600:`#16a34a`,700:`#15803d`,800:`#166534`,900:`#14532d`,950:`#052e16`},emerald:{50:`#ecfdf5`,100:`#d1fae5`,200:`#a7f3d0`,300:`#6ee7b7`,400:`#34d399`,500:`#10b981`,600:`#059669`,700:`#047857`,800:`#065f46`,900:`#064e3b`,950:`#022c22`},teal:{50:`#f0fdfa`,100:`#ccfbf1`,200:`#99f6e4`,300:`#5eead4`,400:`#2dd4bf`,500:`#14b8a6`,600:`#0d9488`,700:`#0f766e`,800:`#115e59`,900:`#134e4a`,950:`#042f2e`},cyan:{50:`#ecfeff`,100:`#cffafe`,200:`#a5f3fc`,300:`#67e8f9`,400:`#22d3ee`,500:`#06b6d4`,600:`#0891b2`,700:`#0e7490`,800:`#155e75`,900:`#164e63`,950:`#083344`},sky:{50:`#f0f9ff`,100:`#e0f2fe`,200:`#bae6fd`,300:`#7dd3fc`,400:`#38bdf8`,500:`#0ea5e9`,600:`#0284c7`,700:`#0369a1`,800:`#075985`,900:`#0c4a6e`,950:`#082f49`},blue:{50:`#eff6ff`,100:`#dbeafe`,200:`#bfdbfe`,300:`#93c5fd`,400:`#60a5fa`,500:`#3b82f6`,600:`#2563eb`,700:`#1d4ed8`,800:`#1e40af`,900:`#1e3a8a`,950:`#172554`},indigo:{50:`#eef2ff`,100:`#e0e7ff`,200:`#c7d2fe`,300:`#a5b4fc`,400:`#818cf8`,500:`#6366f1`,600:`#4f46e5`,700:`#4338ca`,800:`#3730a3`,900:`#312e81`,950:`#1e1b4b`},violet:{50:`#f5f3ff`,100:`#ede9fe`,200:`#ddd6fe`,300:`#c4b5fd`,400:`#a78bfa`,500:`#8b5cf6`,600:`#7c3aed`,700:`#6d28d9`,800:`#5b21b6`,900:`#4c1d95`,950:`#2e1065`},purple:{50:`#faf5ff`,100:`#f3e8ff`,200:`#e9d5ff`,300:`#d8b4fe`,400:`#c084fc`,500:`#a855f7`,600:`#9333ea`,700:`#7e22ce`,800:`#6b21a8`,900:`#581c87`,950:`#3b0764`},fuchsia:{50:`#fdf4ff`,100:`#fae8ff`,200:`#f5d0fe`,300:`#f0abfc`,400:`#e879f9`,500:`#d946ef`,600:`#c026d3`,700:`#a21caf`,800:`#86198f`,900:`#701a75`,950:`#4a044e`},pink:{50:`#fdf2f8`,100:`#fce7f3`,200:`#fbcfe8`,300:`#f9a8d4`,400:`#f472b6`,500:`#ec4899`,600:`#db2777`,700:`#be185d`,800:`#9d174d`,900:`#831843`,950:`#500724`},rose:{50:`#fff1f2`,100:`#ffe4e6`,200:`#fecdd3`,300:`#fda4af`,400:`#fb7185`,500:`#f43f5e`,600:`#e11d48`,700:`#be123c`,800:`#9f1239`,900:`#881337`,950:`#4c0519`}},K={p:`padding`,px:`padding-left,padding-right`,py:`padding-top,padding-bottom`,pt:`padding-top`,pr:`padding-right`,pb:`padding-bottom`,pl:`padding-left`,ps:`padding-left`,pe:`padding-right`,m:`margin`,mx:`margin-left,margin-right`,my:`margin-top,margin-bottom`,mt:`margin-top`,mr:`margin-right`,mb:`margin-bottom`,ml:`margin-left`,ms:`margin-left`,me:`margin-right`,gap:`gap`,"gap-x":`column-gap`,"gap-y":`row-gap`,text:`font-size`,leading:`line-height`,tracking:`letter-spacing`,rounded:`border-radius`,"rounded-t":`border-top-left-radius,border-top-right-radius`,"rounded-b":`border-bottom-left-radius,border-bottom-right-radius`,"rounded-l":`border-top-left-radius,border-bottom-left-radius`,"rounded-r":`border-top-right-radius,border-bottom-right-radius`,"rounded-tl":`border-top-left-radius`,"rounded-tr":`border-top-right-radius`,"rounded-bl":`border-bottom-left-radius`,"rounded-br":`border-bottom-right-radius`,border:`border-width`,"border-t":`border-top-width`,"border-r":`border-right-width`,"border-b":`border-bottom-width`,"border-l":`border-left-width`,w:`width`,h:`height`,size:`width,height`,"max-w":`max-width`,"max-h":`max-height`,"min-w":`min-width`,"min-h":`min-height`,opacity:`opacity`,inset:`top,right,bottom,left`,"inset-x":`left,right`,"inset-y":`top,bottom`,top:`top`,right:`right`,bottom:`bottom`,left:`left`,z:`z-index`,items:`align-items`,justify:`justify-content`,font:`font-weight`,whitespace:`white-space`},At={"font-size":[`font-size`,`font size`,`text-size`,`text size`],color:[`color`,`text-color`,`text color`,`text-colour`,`text colour`,`foreground`,`fg`],"background-color":[`background`,`background-color`,`background color`,`bg`,`bg-color`,`bg color`],"border-color":[`border-color`,`border color`],fill:[`fill`,`fill-color`,`fill color`],stroke:[`stroke`,`stroke-color`,`stroke color`],"font-family":[`font`,`font-sans`,`font-serif`,`font-mono`,`family`,`sans`,`serif`,`mono`],"font-style":[`italic`,`not-italic`],"text-align":[`text-left`,`text-center`,`text-right`,`text-justify`],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-decoration-line":[`underline`,`line-through`,`no-underline`],"white-space":[`whitespace`,`whitespace-normal`,`whitespace-nowrap`,`whitespace-pre`],"word-break":[`break-normal`,`break-all`,`break-keep`],"overflow-wrap":[`break-words`,`break-anywhere`],"font-variant-numeric":[`tabular-nums`,`proportional-nums`,`lining-nums`,`oldstyle-nums`],"border-style":[`border-solid`,`border-dashed`,`border-dotted`,`border-none`]},jt=(()=>{let e={};for(let[t,n]of Object.entries(K))n!==void 0&&(e[n]??=new Set).add(t);let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=Array.from(r));for(let[e,n]of Object.entries(At)){let r=new Set([...t[e]??[],...n]);t[e]=Array.from(r)}return t})(),q={text:`color`,bg:`background-color`,border:`border-color`,"border-x":`border-color`,"border-y":`border-color`,"border-t":`border-color`,"border-r":`border-color`,"border-b":`border-color`,"border-l":`border-color`,"border-s":`border-color`,"border-e":`border-color`,fill:`fill`,stroke:`stroke`},Mt=e=>K[e]!==void 0||q[e]!==void 0,J=e=>{let t=0,n=-1;for(let r=0;r<e.length;r++){let i=e[r];i===`[`?t++:i===`]`?t--:i===`:`&&t===0&&(n=r)}let r=n>=0?e.slice(n+1):e;return r.startsWith(`!`)?r.slice(1):r},Y=e=>{let t=J(e);if(!t)return null;let n=t.indexOf(`[`);if(n>0)return t.slice(0,n).replace(/-$/,``)||null;let r=t.split(`-`).filter(Boolean);if(r.length===0)return null;for(let e=r.length;e>=1;e--){let t=r.slice(0,e).join(`-`);if(Mt(t))return t}return r[0]},Nt=/-(red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|slate|gray|zinc|neutral|stone|black|white|transparent|current|inherit)\b/,Pt=(e,t)=>e!==`text`&&e!==`bg`&&e!==`border`&&!e.startsWith(`border-`)?!1:Nt.test(t),Ft=new Set(`color.red.orange.amber.yellow.lime.green.emerald.teal.cyan.sky.blue.indigo.violet.purple.fuchsia.pink.rose.slate.gray.grey.zinc.neutral.stone.black.white.transparent.current.currentcolor.inherit.primary.secondary.accent.muted.foreground.background.destructive.success.warning.error.info.card.popover.input.ring`.split(`.`)),It=new Set([`xs`,`sm`,`base`,`lg`,`xl`,`2xl`,`3xl`,`4xl`,`5xl`,`6xl`,`7xl`,`8xl`,`9xl`]),Lt=/^(#|rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color:|color\(|var\(--.*color)/,Rt=/^(-?\d|length:|size:)/,X=e=>e.trim().toLowerCase().replace(/\s+/g,`-`).replace(/([a-z])(\d)/g,`$1-$2`),zt=e=>Lt.test(e)&&!Rt.test(e),Z=(e,t)=>{if(e===t)return``;let n=`${t}-`;return e.startsWith(n)?e.slice(n.length):null},Bt=e=>{let t=J(X(e)),n=Y(t);if(!n)return null;let r=q[n];if(!r)return null;let i=t.indexOf(`[`);if(i>=0)return zt(t.slice(i+1).replace(/\]$/,``))?r:null;let a=Z(t,n);if(a===null)return null;if(n===`bg`&&a===``||(n===`fill`||n===`stroke`)&&a===``)return r;let o=a.split(`-`)[0];return n===`text`&&It.has(o)?null:Ft.has(o)?r:null},Vt={black:`#000000`,white:`#ffffff`,transparent:e.at},Ht=e=>{let t=J(X(e)),n=Y(t);if(!n||q[n]===void 0||t.includes(`[`))return null;let r=Z(t,n);if(!r)return null;let i=Vt[r];if(i)return i;let a=r.lastIndexOf(`-`);if(a<0)return null;let o=r.slice(0,a),s=o===`grey`?`gray`:o,c=Number.parseInt(r.slice(a+1),10);return kt[s]?.[c]??null},Ut=/^-?\d/,Wt=(e,t)=>{if(t===``||t.startsWith(`[`)||Ut.test(t))return!0;let n=t.split(`-`)[0];return e===`text`?It.has(n):e===`font`||e===`border`||e.startsWith(`border-`)?!1:(e===`rounded`||e.startsWith(`rounded-`),!0)},Gt={"font-sans":{property:`font-family`,value:`ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`},"font-serif":{property:`font-family`,value:`ui-serif, Georgia, Cambria, "Times New Roman", Times, serif`},"font-mono":{property:`font-family`,value:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`},"font-thin":{property:`font-weight`,value:`100`},"font-extralight":{property:`font-weight`,value:`200`},"font-light":{property:`font-weight`,value:`300`},"font-normal":{property:`font-weight`,value:`400`},"font-medium":{property:`font-weight`,value:`500`},"font-semibold":{property:`font-weight`,value:`600`},"font-bold":{property:`font-weight`,value:`700`},"font-extrabold":{property:`font-weight`,value:`800`},"font-black":{property:`font-weight`,value:`900`},"text-left":{property:`text-align`,value:`left`},"text-center":{property:`text-align`,value:`center`},"text-right":{property:`text-align`,value:`right`},"text-justify":{property:`text-align`,value:`justify`},italic:{property:`font-style`,value:`italic`},"not-italic":{property:`font-style`,value:`normal`},uppercase:{property:`text-transform`,value:`uppercase`},lowercase:{property:`text-transform`,value:`lowercase`},capitalize:{property:`text-transform`,value:`capitalize`},"normal-case":{property:`text-transform`,value:`none`},underline:{property:`text-decoration-line`,value:`underline`},"line-through":{property:`text-decoration-line`,value:`line-through`},"no-underline":{property:`text-decoration-line`,value:`none`},"whitespace-normal":{property:`white-space`,value:`normal`},"whitespace-nowrap":{property:`white-space`,value:`nowrap`},"whitespace-pre":{property:`white-space`,value:`pre`},"whitespace-pre-line":{property:`white-space`,value:`pre-line`},"whitespace-pre-wrap":{property:`white-space`,value:`pre-wrap`},"whitespace-break-spaces":{property:`white-space`,value:`break-spaces`},"break-normal":{property:`word-break`,value:`normal`},"break-all":{property:`word-break`,value:`break-all`},"break-keep":{property:`word-break`,value:`keep-all`},"break-words":{property:`overflow-wrap`,value:`break-word`},"break-anywhere":{property:`overflow-wrap`,value:`anywhere`},"tabular-nums":{property:`font-variant-numeric`,value:`tabular-nums`},"proportional-nums":{property:`font-variant-numeric`,value:`proportional-nums`},"lining-nums":{property:`font-variant-numeric`,value:`lining-nums`},"oldstyle-nums":{property:`font-variant-numeric`,value:`oldstyle-nums`},"slashed-zero":{property:`font-variant-numeric`,value:`slashed-zero`},"border-solid":{property:`border-style`,value:`solid`},"border-dashed":{property:`border-style`,value:`dashed`},"border-dotted":{property:`border-style`,value:`dotted`},"border-none":{property:`border-style`,value:`none`}},Kt=e=>{let t=X(e);if(!t)return[];let n=$(t);if(n)return[n.property];let r=Bt(t);return r?[r]:[]},qt=e=>{let t=X(e);if(!t)return[];let n=Y(t);if(!n)return[];let r=Z(J(t),n);if(r===null||!Wt(n,r))return[];let i=Q(n);return i?[i]:[]},Jt=e=>{let t=e.getAttribute(`class`);if(!t)return new Set;let n=t.split(/\s+/).filter(Boolean),r=new Set;for(let e of n){let t=Y(e);if(!t||Pt(t,e))continue;let n=$(e);if(n){r.add(n.property);continue}let i=Q(t);i&&r.add(i)}return r},Yt=e=>jt[e]??[],Q=e=>{let t=K[e];return t===void 0?null:t},$=e=>{let t=Gt[J(e)];return t===void 0?null:t},Xt=`react-grab-toolbar-state`,Zt=()=>{try{let t=localStorage.getItem(Xt);if(!t)return null;let n=JSON.parse(t);if(typeof n!=`object`||!n)return null;let r=n,i=typeof r.collapsed==`boolean`?r.collapsed:!1;return{edge:r.edge===`top`||r.edge===`bottom`||r.edge===`left`||r.edge===`right`?r.edge:`bottom`,ratio:typeof r.ratio==`number`?r.ratio:e.Rt,collapsed:i,enabled:!i,defaultAction:typeof r.defaultAction==`string`?r.defaultAction:e.G}}catch(e){console.warn(`[react-grab] Failed to load toolbar state from localStorage:`,e)}return null},Qt=e=>{try{localStorage.setItem(Xt,JSON.stringify(e))}catch(e){console.warn(`[react-grab] Failed to save toolbar state to localStorage:`,e)}},$t=e=>{let[t,n]=c(!1);return t},en=e=>e.key===`Enter`,tn=e=>e.metaKey||e.ctrlKey,nn=(e,t,n={})=>{if(!t.key)return null;if(en(t))return e.find(e=>e.shortcut===`Enter`)??null;if(t.repeat)return null;let r=t.key.toLowerCase();return tn(t)?n.includeModifierShortcuts===!0?e.find(e=>e.shortcut!==void 0&&e.shortcut!==`Enter`&&e.shortcutModifier!==!1&&r===e.shortcut.toLowerCase())??null:null:e.find(e=>e.shortcut!==void 0&&e.shortcutModifier===!1&&r===e.shortcut.toLowerCase())??null},rn=()=>{let e=!1;return{arm:()=>{e=!0},clear:()=>{e=!1},consume:()=>e?(e=!1,!0):!1}};Object.defineProperty(exports,`$`,{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,`B`,{enumerable:!0,get:function(){return Xe}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return ft}}),Object.defineProperty(exports,`Ct`,{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return-512}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return vt}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return dt}}),Object.defineProperty(exports,`G`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`H`,{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(exports,`I`,{enumerable:!0,get:function(){return ut}}),Object.defineProperty(exports,`J`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`K`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`L`,{enumerable:!0,get:function(){return ct}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return 9999}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return-9999}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return bt}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return St}}),Object.defineProperty(exports,`Q`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`R`,{enumerable:!0,get:function(){return st}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return wt}}),Object.defineProperty(exports,`St`,{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return-128}}),Object.defineProperty(exports,`Tt`,{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,`U`,{enumerable:!0,get:function(){return qe}}),Object.defineProperty(exports,`V`,{enumerable:!0,get:function(){return Je}}),Object.defineProperty(exports,`W`,{enumerable:!0,get:function(){return We}}),Object.defineProperty(exports,`X`,{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,`Y`,{enumerable:!0,get:function(){return Re}}),Object.defineProperty(exports,`Z`,{enumerable:!0,get:function(){return je}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(exports,`_t`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return Qt}}),Object.defineProperty(exports,`at`,{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return Tt}}),Object.defineProperty(exports,`bt`,{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return Bt}}),Object.defineProperty(exports,`ct`,{enumerable:!0,get:function(){return _e}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return Kt}}),Object.defineProperty(exports,`dt`,{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,`et`,{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,`ft`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return Ot}}),Object.defineProperty(exports,`gt`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return Et}}),Object.defineProperty(exports,`ht`,{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return Zt}}),Object.defineProperty(exports,`it`,{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return pt}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return 384}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return Ht}}),Object.defineProperty(exports,`lt`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,`mt`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return nn}}),Object.defineProperty(exports,`nt`,{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return Jt}}),Object.defineProperty(exports,`ot`,{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`pt`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`q`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return $t}}),Object.defineProperty(exports,`rt`,{enumerable:!0,get:function(){return Le}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Yt}}),Object.defineProperty(exports,`st`,{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return rn}}),Object.defineProperty(exports,`tt`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return qt}}),Object.defineProperty(exports,`ut`,{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return yt}}),Object.defineProperty(exports,`vt`,{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return Ct}}),Object.defineProperty(exports,`wt`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return xt}}),Object.defineProperty(exports,`xt`,{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`yt`,{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,`z`,{enumerable:!0,get:function(){return Qe}});
|