grab 0.1.47-dev.423fe9d → 0.1.47-dev.58b4de2

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.
Files changed (33) hide show
  1. package/dist/{copy-content-DaqHoqk_.d.cts → copy-content-5FzVj_Qo.d.cts} +6 -7
  2. package/dist/{copy-content-JFYyyG38.d.ts → copy-content-BJATOqZF.d.ts} +6 -7
  3. package/dist/{copy-content-Czq_T5A4.js → copy-content-BPOJJewQ.js} +1 -1
  4. package/dist/{copy-content-DQZhmRbG.cjs → copy-content-DBTUuI3p.cjs} +1 -1
  5. package/dist/core/index.cjs +1 -1
  6. package/dist/core/index.d.cts +2 -2
  7. package/dist/core/index.d.ts +2 -2
  8. package/dist/core/index.js +1 -1
  9. package/dist/core-Bas76m8X.js +14 -0
  10. package/dist/core-Ch_38Dh0.cjs +14 -0
  11. package/dist/{create-pointer-move-prompt-handoff-RUfeJDhx.cjs → create-pointer-move-prompt-handoff-CuUzA8kA.cjs} +1 -1
  12. package/dist/{create-pointer-move-prompt-handoff-9qSasKrd.js → create-pointer-move-prompt-handoff-DL_Nlrs5.js} +1 -1
  13. package/dist/{freeze-updates-BjpjTrQp.cjs → freeze-updates-D6aehaiC.cjs} +1 -1
  14. package/dist/{freeze-updates-Bcu6JNcm.js → freeze-updates-Dldphza-.js} +1 -1
  15. package/dist/{index-BerRIq43.d.ts → index-C_bngsx-.d.ts} +1 -1
  16. package/dist/{index-ED8DYbM_.d.cts → index-jMjUhmbS.d.cts} +1 -1
  17. package/dist/index.cjs +1 -1
  18. package/dist/index.d.cts +2 -2
  19. package/dist/index.d.ts +2 -2
  20. package/dist/index.global.js +9 -9
  21. package/dist/index.js +1 -1
  22. package/dist/primitives.cjs +1 -1
  23. package/dist/primitives.d.cts +1 -1
  24. package/dist/primitives.d.ts +1 -1
  25. package/dist/primitives.js +1 -1
  26. package/dist/renderer-BI36o6Yw.cjs +9 -0
  27. package/dist/renderer-PetxKDwl.js +9 -0
  28. package/dist/styles.css +1 -1
  29. package/package.json +2 -2
  30. package/dist/core-BQw4TuR5.js +0 -14
  31. package/dist/core-BhhBnb2X.cjs +0 -14
  32. package/dist/renderer-BFx7vCsE.cjs +0 -9
  33. package/dist/renderer-nRW72NeZ.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
+ const e=require(`./create-pointer-move-prompt-handoff-CuUzA8kA.cjs`),t=require(`./freeze-updates-D6aehaiC.cjs`),n=require(`./copy-content-DBTUuI3p.cjs`);var r=`/*! 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}.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\\.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-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}`;function i(e){return typeof e==`object`&&!!e&&(Object.getPrototypeOf(e)===Object.prototype||Array.isArray(e))}function a(e,t,n,r){!r&&e[t]===n||(n===void 0?delete e[t]:e[t]=n)}function o(e,t,n){let r=Object.keys(t);for(let i=0;i<r.length;i+=1){let o=r[i];a(e,o,t[o],n)}}function s(e,t){if(typeof t==`function`&&(t=t(e)),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){let r=t[n];e[n]!==r&&a(e,n,r)}a(e,`length`,r)}else o(e,t)}function c(e,t,n=[]){let r,s=e;if(t.length>1){r=t.shift();let i=typeof r,a=Array.isArray(e);if(Array.isArray(r)){for(let i=0;i<r.length;i++)c(e,[r[i]].concat(t),n);return}else if(a&&i===`function`){for(let i=0;i<e.length;i++)r(e[i],i)&&c(e,[i].concat(t),n);return}else if(a&&i===`object`){let{from:i=0,to:a=e.length-1,by:o=1}=r;for(let r=i;r<=a;r+=o)c(e,[r].concat(t),n);return}else if(t.length>1){c(e[r],t,[r].concat(n));return}s=e[r],n=[r].concat(n)}let l=t[0];typeof l==`function`&&(l=l(s,n),l===s)||r===void 0&&l==null||(r===void 0||i(s)&&i(l)&&!Array.isArray(l)?o(s,l):a(e,r,l))}function l(e){let t=Array.isArray(e);function n(...n){t&&n.length===1?s(e,n[0]):c(e,n)}return[e,n]}function u(e){return t=>(i(t)&&e(t),t)}let d=new WeakMap,f=new WeakMap;const p=()=>{d=new WeakMap,f=new WeakMap},m=(e,t,n)=>{let r=f.get(e);if(r&&n-r.timestamp<200)return r.borderRadius;let i=(t??window.getComputedStyle(e)).borderRadius||`0px`;return f.set(e,{borderRadius:i,timestamp:n}),i},h=e=>{let t=performance.now(),n=d.get(e);if(n&&t-n.timestamp<16)return n.bounds;let r=e.getBoundingClientRect(),i={borderRadius:m(e,null,t),height:r.height,width:r.width,x:r.left,y:r.top};return d.set(e,{bounds:i,timestamp:t}),i},g=e=>({x:e.x+e.width/2,y:e.y+e.height/2}),_=e=>({selectionInteractionLockDepth:0,wasActivatedByToggle:!1,pendingCommentMode:!1,keyHoldDuration:e.keyHoldDuration,dragStart:{x:t.ht,y:t.ht},copyStart:{x:t.ht,y:t.ht},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}),v=n=>{let[r,i]=l(_(n)),[a,o]=e.gt({x:t.ht,y:t.ht}),[s,c]=e.gt(0),[d,f]=e.gt({state:`idle`}),p=e=>{i(u(t=>{e(t),t.frozenElement=t.frozenElements.length>0?t.frozenElements[0]:null,t.frozenDragRect=null}))},m=()=>{p(e=>{e.frozenElements=[]})},v=e=>{f(t=>t.state===`active`?{...t,phase:e}:t)},y={startHold:e=>{e!==void 0&&i(`keyHoldDuration`,e),f({state:`holding`,startedAt:Date.now()})},releaseHold:()=>{d().state===`holding`&&f({state:`idle`})},activate:()=>{e.ct(()=>{f({state:`active`,phase:`hovering`,isPromptMode:!1,isPendingDismiss:!1}),i(`activationTimestamp`,Date.now()),i(`previouslyFocusedElement`,document.activeElement)})},deactivate:()=>{e.ct(()=>{f({state:`idle`}),i(u(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:()=>{r.activationTimestamp===null?(i(`wasActivatedByToggle`,!0),y.activate()):y.deactivate()},freeze:()=>{if(d().state===`active`){let e=r.frozenElement??r.detectedElement;e&&i(`frozenElement`,e),v(`frozen`)}},unfreeze:()=>{d().state===`active`&&e.ct(()=>{i(u(e=>{e.frozenElement=null,e.frozenElements=[],e.frozenDragRect=null})),v(`hovering`)})},startDrag:(t,n)=>{d().state===`active`&&e.ct(()=>{n||m(),i(`dragStart`,{x:t.x+window.scrollX,y:t.y+window.scrollY}),v(`dragging-select`)})},startDragReposition:()=>{let e=d();e.state===`active`&&e.phase===`dragging-select`&&v(`dragging-reposition`)},stopDragReposition:()=>{let e=d();e.state===`active`&&e.phase===`dragging-reposition`&&v(`dragging-select`)},shiftDragStart:e=>{let t=d();t.state===`active`&&t.phase===`dragging-reposition`&&i(`dragStart`,t=>({x:t.x+e.x,y:t.y+e.y}))},endDrag:()=>{let n=d();n.state===`active`&&(n.phase===`dragging-select`||n.phase===`dragging-reposition`)&&e.ct(()=>{i(`dragStart`,{x:t.ht,y:t.ht}),v(`justDragged`)})},cancelDrag:()=>{let n=d();n.state===`active`&&(n.phase===`dragging-select`||n.phase===`dragging-reposition`)&&e.ct(()=>{i(`dragStart`,{x:t.ht,y:t.ht}),v(`hovering`)})},finishJustDragged:()=>{let e=d();e.state===`active`&&e.phase===`justDragged`&&v(`hovering`)},startCopy:()=>{let e=d().state===`active`;f({state:`copying`,startedAt:Date.now(),wasActive:e})},completeCopy:()=>{let e=d(),t=e.state===`copying`?e.wasActive:!1;f({state:`justCopied`,copiedAt:Date.now(),wasActive:t})},finishJustCopied:()=>{let t=d();t.state===`justCopied`&&(t.wasActive&&!r.wasActivatedByToggle?e.ct(()=>{m(),f({state:`active`,phase:`hovering`,isPromptMode:!1,isPendingDismiss:!1})}):y.deactivate())},enterPromptMode:(t,n)=>{let{x:r}=g(h(n));e.ct(()=>{i(`copyStart`,t),i(`copyOffsetFromCenterX`,t.x-r),o(t),i(`frozenElement`,n),i(`wasActivatedByToggle`,!0),d().state===`active`?f(e=>e.state===`active`?{...e,isPromptMode:!0,phase:`frozen`}:e):(f({state:`active`,phase:`frozen`,isPromptMode:!0,isPendingDismiss:!1}),i(`activationTimestamp`,Date.now()),i(`previouslyFocusedElement`,document.activeElement))})},exitPromptMode:()=>{f(e=>e.state===`active`?{...e,isPromptMode:!1,isPendingDismiss:!1}:e)},setInputText:e=>{i(`inputText`,e)},clearInputText:()=>{i(`inputText`,``)},setPendingDismiss:e=>{f(t=>t.state===`active`?{...t,isPendingDismiss:e}:t)},setPointer:e=>{o(t=>t.x===e.x&&t.y===e.y?t:e)},setDetectedElement:e=>{i(`detectedElement`,e)},setFrozenElement:e=>{p(t=>{t.frozenElements=[e]})},setFrozenElements:e=>{p(t=>{t.frozenElements=e})},toggleFrozenElement:e=>{p(t=>{let n=t.frozenElements.indexOf(e);n>=0?t.frozenElements.splice(n,1):t.frozenElements.push(e)})},addFrozenElements:e=>{p(t=>{for(let n of e)t.frozenElements.includes(n)||t.frozenElements.push(n)})},setFrozenDragRect:e=>{i(`frozenDragRect`,e)},setCopyStart:(e,t)=>{let{x:n}=g(h(t));i(`copyStart`,e),i(`copyOffsetFromCenterX`,e.x-n)},setLastGrabbed:e=>{i(`lastGrabbedElement`,e)},setWasActivatedByToggle:e=>{i(`wasActivatedByToggle`,e)},setPendingCommentMode:e=>{i(`pendingCommentMode`,e)},setTouchMode:e=>{i(`isTouchMode`,e)},incrementSelectionInteractionLockDepth:()=>{i(`selectionInteractionLockDepth`,e=>e+1)},decrementSelectionInteractionLockDepth:()=>{i(`selectionInteractionLockDepth`,e=>Math.max(0,e-1))},setSelectionSource:(t,n)=>{e.ct(()=>{i(`selectionFilePath`,t),i(`selectionLineNumber`,n)})},incrementViewportVersion:()=>{c(e=>e+1)},addGrabbedBox:e=>{i(`grabbedBoxes`,t=>[...t,e])},removeGrabbedBox:e=>{i(`grabbedBoxes`,t=>t.filter(t=>t.id!==e))},clearGrabbedBoxes:()=>{i(`grabbedBoxes`,[])},addLabelInstance:e=>{i(`labelInstances`,t=>[...t,e])},updateLabelInstance:(t,n,a)=>{let o=r.labelInstances.findIndex(e=>e.id===t);o!==-1&&e.ct(()=>{i(`labelInstances`,o,`status`,n),a!==void 0&&i(`labelInstances`,o,`errorMessage`,a)})},removeLabelInstance:e=>{i(`labelInstances`,t=>t.filter(t=>t.id!==e))},clearLabelInstances:()=>{i(`labelInstances`,[])},showContextMenu:(t,n)=>{let{x:r,y:a}=g(h(n));e.ct(()=>{i(`contextMenuPosition`,t),i(`contextMenuElement`,n),i(`contextMenuClickOffset`,{x:t.x-r,y:t.y-a})})},hideContextMenu:()=>{e.ct(()=>{i(`contextMenuPosition`,null),i(`contextMenuElement`,null),i(`contextMenuClickOffset`,null)})},updateContextMenuPosition:()=>{let t=r.contextMenuElement,n=r.contextMenuClickOffset;if(!t||!n||!e.U(t))return;let{x:a,y:o}=g(h(t));i(`contextMenuPosition`,{x:a+n.x,y:o+n.y})}};return{store:r,actions:y,pointer:a,viewportVersion:s,current:d}},y=e=>{if(!document.body)return;let n=document.querySelectorAll(`[${t.zt}]`);for(let t of n)t!==e&&t.parentNode!==e&&(t.shadowRoot||t.remove());document.body.appendChild(e)},b=e=>{if(document.body){y(e);return}let t=()=>{document.removeEventListener(`DOMContentLoaded`,t),y(e)};document.addEventListener(`DOMContentLoaded`,t,{once:!0})},ee=e=>{let n=document.querySelectorAll(`[${t.zt}]`);for(let e of n){let n=e.shadowRoot?.querySelector(`[${t.zt}]`);if(n instanceof HTMLDivElement)return{root:n,host:e};e.remove()}let r=document.createElement(`div`);r.setAttribute(t.zt,`true`),t.P(r),r.style.zIndex=String(t.Lt),r.style.position=`fixed`,r.style.inset=`0`,r.style.pointerEvents=`none`,r.style.contain=`strict`;let i=r.attachShadow({mode:`open`}),a=document.createElement(`style`),o=t.F();o&&(a.nonce=o),a.textContent=`@import url("https://fonts.googleapis.com/css2?family=Geist:wght@500&display=swap");\n${e??``}`,i.appendChild(a);let s=document.createElement(`div`);return s.setAttribute(t.zt,`true`),i.appendChild(s),b(r),setTimeout(()=>{y(r)},t.pt),{root:s,host:r}},te=t=>{let[r,i]=e.gt(void 0),a=0;return e.dt(e.yt(t,e=>{let t=++a;if(!e){i(void 0);return}let r=n.r(e)??void 0;i(r),n.a(e).then(e=>{a===t&&i(e??r)}).catch(()=>{a===t&&i(r)})})),[r,i]},ne=[`data-theme`,`data-mode`,`data-color-scheme`,`data-bs-theme`,`data-mui-color-scheme`,`data-mantine-color-scheme`],re=[{attribute:`data-dark`,theme:`dark`},{attribute:`data-light`,theme:`light`}],ie=(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},x=(t,n=0)=>{let r=e.L(t),i=r?e.z(r):null;return!i||i.alpha<=n?null:ie(i.red,i.green,i.blue)},S=e=>{let t=x(e);return t===null?null:t<.18?`dark`:`light`},ae=e=>S(getComputedStyle(e).backgroundColor),C=()=>{let e=x(getComputedStyle(document.documentElement).color,t._t);return e===null?null:e>.6?`dark`:null},oe=()=>{let e=document.createElement(`div`);e.style.cssText=`position:fixed;width:0;height:0;background-color:Canvas!important`,document.documentElement.appendChild(e);let t=S(getComputedStyle(e).backgroundColor);return e.remove(),t},se=e=>{let t=e.toLowerCase();return t===`dark`?`dark`:t===`light`?`light`:null},ce=e=>{let t=e.style.colorScheme||getComputedStyle(e).colorScheme;return t?t.trim().toLowerCase().split(/\s+/):[]},w=e=>{let t=ce(e),n=t.includes(`dark`);return n===t.includes(`light`)?null:n?`dark`:`light`},le=e=>{if(e.classList.contains(`dark`))return`dark`;if(e.classList.contains(`light`))return`light`;for(let t of ne){let n=e.getAttribute(t);if(!n)continue;let r=se(n);if(r)return r}for(let{attribute:t,theme:n}of re)if(e.hasAttribute(t))return n;return null},ue=(e,t)=>{for(let n of e){if(!n)continue;let e=t(n);if(e)return e}return null},de=()=>{let e=[document.documentElement,document.body],t=[document.body,document.documentElement];return ue(e,le)??ue(e,w)??ue(t,ae)??C()??oe()??`light`},fe=e=>e===`dark`?`light`:`dark`,pe={attributes:!0,attributeFilter:[`class`,`style`,...ne,...re.map(({attribute:e})=>e)]},me=(e,n)=>{let r=null,i=null,a=()=>{let t=fe(de());return t!==r&&(r=t,e.setAttribute(`data-rg-theme`,t),n?.(t)),t},o=()=>{i===null&&(i=t._(()=>{i=null,a()}))},s=a(),c=new MutationObserver(o);c.observe(document.documentElement,pe);let l=null;document.body?c.observe(document.body,pe):(l=new MutationObserver(()=>{document.body&&(l.disconnect(),l=null,c.observe(document.body,pe),a())}),l.observe(document.documentElement,{childList:!0}));let u=window.matchMedia(`(prefers-color-scheme: dark)`);return u.addEventListener(`change`,o),{theme:s,cleanup:()=>{l?.disconnect(),c.disconnect(),u.removeEventListener(`change`,o),i!==null&&t.g(i)}}},T=()=>{},he=()=>({activate:T,deactivate:T,toggle:T,comment:T,isActive:()=>!1,isEnabled:()=>!1,setEnabled:T,getToolbarState:()=>null,setToolbarState:T,onToolbarStateChange:()=>T,dispose:T,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:T,registerPlugin:T,unregisterPlugin:T,getPlugins:()=>[],getDisplayName:()=>null}),ge=()=>{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})}}},_e=(e,t=`Unknown error`)=>e instanceof Error&&e.message?e.message:t,ve=e=>e instanceof Error?e:Error(String(e)),ye=e=>({functionName:e.functionName,fileName:e.fileName,lineNumber:e.lineNumber,columnNumber:e.columnNumber,isServer:e.isServer,isSymbolicated:e.isSymbolicated}),be=async(e,r)=>{let i={maxLines:r},[a,o,s,c]=await Promise.all([n.i(e,i),n.s(e,i),n.c(e),n.o(e)]);return{tagName:t.I(e),componentName:s?.componentName??void 0,content:`[${a}]`,source:s,stackContext:o,frames:(c??[]).map(ye)}},xe=async(e,t)=>{let n=await Promise.all(e.map(e=>be(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},Se=(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}))},Ce=async(e,t,r,i)=>{await t.onBeforeCopy(r);let a=!1,o=``;try{let s=e.getContent?{content:await e.getContent(r)}:await xe(r,e.maxContextLines),c=s?.content;if(c?.trim()){let l=await t.transformCopyContent(c,r);o=i?`${i}\n${l}`:l,a=n.t(o,{componentName:e.componentName,entries:Se(s,o,i)})}}catch(e){t.onCopyError(ve(e))}return a&&t.onCopySuccess(r,o),t.onAfterCopy(r,a),a},we=(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)},E=(e,t)=>e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top,D=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}),Te=t=>{if(t.width<=0||t.height<=0)return[];let n=window.innerWidth,r=window.innerHeight,i=t.x,a=t.y,o=t.x+t.width,s=t.y+t.height,c=i+t.width/2,l=a+t.height/2,u=e.I(Math.ceil(t.width/32),3,20),d=e.I(Math.ceil(t.height/32),3,20),f=u*d,p=f>100?Math.sqrt(100/f):1,m=e.I(Math.floor(u*p),3,20),h=e.I(Math.floor(d*p),3,20),g=new Set,_=[],v=(t,i)=>{let a=e.I(Math.round(t),0,n-1),o=e.I(Math.round(i),0,r-1),s=`${a}:${o}`;g.has(s)||(g.add(s),_.push({x:a,y:o}))};v(i+1,a+1),v(o-1,a+1),v(i+1,s-1),v(o-1,s-1),v(c,a+1),v(c,s-1),v(i+1,l),v(o-1,l),v(c,l);for(let e=0;e<m;e+=1){let n=i+(e+.5)/m*t.width;for(let e=0;e<h;e+=1)v(n,a+(e+.5)/h*t.height)}return _},Ee=(e,n,r)=>{let i={left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height},a=new Set,o=Te(e);t.f();try{for(let e of o){let t=document.elementsFromPoint(e.x,e.y);for(let e of t)a.add(e)}}finally{t.d()}let s=[];for(let e of a)!r&&t.h(e)||n(e)&&s.push(e);let c=new Map;for(let e of s)c.set(e,e.getBoundingClientRect());let l=[];for(let e of s){let t=c.get(e);if(t.width<=0||t.height<=0)continue;let n={left:t.left,top:t.top,right:t.left+t.width,bottom:t.top+t.height};if(r){let r=we(i,n),a=t.width*t.height;a>0&&r/a>=.75&&l.push(e)}else E(n,i)&&l.push(e)}return D(l)},O=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})},De=(e,t,n=!0)=>O(Ee(e,t,n)),Oe=(t,n)=>t.width<=0?0:e.I((n.x-t.x)/t.width,0,1),ke=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}},Ae=()=>{p(),t.c(),t.p()},je=e=>({borderRadius:`0px`,height:e.height,width:e.width,x:e.pageX-window.scrollX,y:e.pageY-window.scrollY}),Me=e=>({pageX:e.x+window.scrollX,pageY:e.y+window.scrollY,width:e.width,height:e.height}),Ne=e=>({borderRadius:`0px`,height:e.height,width:e.width,x:e.x,y:e.y}),k=new Set([`c`,`C`,`с`,`С`,`ȼ`,`Ȼ`,`ↄ`,`Ↄ`,`ᴄ`,`ᶜ`,`ⱼ`,`ⅽ`,`Ⅽ`,`ç`,`Ç`,`ć`,`Ć`,`č`,`Č`,`ĉ`,`Ĉ`,`ċ`,`Ċ`]),Pe=(e,t)=>t===`KeyC`?!0:!e||e.length!==1?!1:k.has(e),Fe=(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},Ie={meta:`metaKey`,cmd:`metaKey`,command:`metaKey`,win:`metaKey`,windows:`metaKey`,ctrl:`ctrlKey`,control:`ctrlKey`,shift:`shiftKey`,alt:`altKey`,option:`altKey`,opt:`altKey`},A=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=Ie[e];t?n[t]=!0:n.key=e}return n},Le=e=>{if(typeof e==`function`)return e;let t=A(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||Fe(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}},Re=t=>!t||typeof t==`function`?{metaKey:e.F(),ctrlKey:!e.F(),shiftKey:!1,altKey:!1,key:null}:A(t),ze=(t,n)=>{if(n.activationKey)return Le(n.activationKey)(t);let r=(e.F()?t.metaKey:t.ctrlKey)&&!t.shiftKey&&!t.altKey;return!!(t.key&&r&&Pe(t.key,t.code))},Be=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}},Ve=t=>{let n=getComputedStyle(t),r={};for(let t of e.k)r[t]=n.getPropertyValue(t);return r},j=t=>{let n={};for(let r of e.y)n[r]=t.getPropertyValue(r);return n},He=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 j(getComputedStyle(i))}finally{i.remove()}}catch{return null}},Ue=new Set([`display`,`width`,`height`]),We=(e,t,n)=>e.kind===`color`?!1:e.cssProperties.some(e=>Ue.has(e))?Ge(e):e.cssProperties.every(e=>{let r=t[e],i=n[e];return r===void 0||i===void 0?!1:r===i}),Ge=t=>{if(t.kind===`color`)return!1;if(t.kind===`enum`)return t.key===`font-weight`?t.original===`400`:t.options[0]?.value===t.original;let{key:n,original:r}=t;return n.startsWith(`padding`)||n.startsWith(`margin`)||n.includes(`gap`)||n===`border-width`||n.endsWith(`-radius`)||n===`border-radius`?r===0:n===`opacity`?r===100:n===`letter-spacing`||n===`z-index`?r===0:e.T.has(n)?!1:!!(n===`width`||n===`height`||n===`width,height`||n.startsWith(`max-`)||n.startsWith(`min-`)||n===`line-height`)},Ke=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},qe=(n,r)=>{let i=Ke(n[r]);if(i)return i;if(r===`line-height`){let r=Ke(n[`font-size`]);return r?{value:e.g(r.value*t.at),unit:r.unit||`px`}:null}return e.S.has(r)?{value:0,unit:`px`}:null},M=(e,t)=>{let n=qe(e,t[0]);if(!n)return null;for(let r=1;r<t.length;r++){let i=qe(e,t[r]);if(!i||i.unit!==n.unit||Math.abs(i.value-n.value)>=.5)return null}return n},N=(t,n)=>t===`opacity`?{value:Math.round(n.value*100),unit:`%`}:e.A.has(t)?{value:e.g(n.value),unit:``}:{value:e.g(n.value),unit:n.unit||`px`},Je=e=>e!==null,Ye=(e,t)=>{let n=t.map(t=>{let n=t.longhands.length===1?qe(e,t.longhands[0]):M(e,t.longhands);return n?{definition:t,value:n}:null}).filter(Je),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)}))},Xe=(t,n,r)=>t===`opacity`?{min:0,max:100}:t===`z-index`?{min:e.M,max:e.j}:t===`letter-spacing`?{min:-10,max:20}:t===`font-size`?{min:8,max:96}:t===`line-height`?{min:0,max:120}:t.includes(`radius`)?{min:0,max:96}:t===`width`||t===`height`||t===`width,height`||t.startsWith(`min-`)||t.startsWith(`max-`)?{min:0,max:Math.max(512,Math.ceil(n*2))}:e.T.has(t)?{min:e.E,max:512}:r===`%`?{min:0,max:100}:{min:t.startsWith(`margin`)?e.w:0,max:e.O},P=(t,n,r)=>{let i=N(t.key,n),a=i.unit===`px`&&Math.abs(i.value)>1e7,o=Xe(t.key,a?0:i.value,i.unit),s=i.value<0?o.min:o.max,c=a?s:i.value;return{kind:`numeric`,key:t.key,label:t.label,cssProperties:t.longhands,min:o.min,max:o.max,value:c,original:c,unit:i.unit,tailwindAliases:e.o(t.key),isPrioritized:!1,isDefault:!1,isCanonical:r}},F=(n,r,i,a=!1)=>{let o=e.L(i),s=o?e.z(o):null,c=s!==null&&s.alpha!==0;if(!c&&!a)return null;let l=c&&o?o:t.nt;return{kind:`color`,key:n,label:r,cssProperties:[n],value:l,original:l,tailwindAliases:e.o(n),isPrioritized:a,isDefault:!1,isCanonical:!0}},I=(t,n,r)=>{let i=n.trim(),a=r??t.options;return!a||!a.some(e=>e.value===i)?null:{kind:`enum`,key:t.key,label:t.label,cssProperties:[t.key],value:i,original:i,options:a,tailwindAliases:e.o(t.key),isPrioritized:!1,isDefault:!1,isCanonical:!0}},L=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])),Ze=e=>L.get(e.key)??1/0,Qe=e=>e.map((e,t)=>({property:e,index:t})).sort((e,t)=>{let n=Ze(e.property)-Ze(t.property);return n===0?e.index-t.index:n}).map(e=>e.property),$e=t=>{let n=Ve(t),r=getComputedStyle(t),i=j(r),a=He(t),o=[],s=new Set,c=e=>{s.has(e.key)||(o.push(e),s.add(e.key))};for(let t of e._)for(let e of Ye(n,t))c(P(e.definition,e.value,e.isCanonical));for(let t of e.D){let e=qe(n,t.key);e&&c(P({key:t.key,label:t.label,longhands:[t.key]},e,!0))}for(let{key:t,label:n,alwaysShow:i}of e.b){let a=r.getPropertyValue(t);if(!i&&(!a||e.R(a)))continue;let o=F(t,n,a,i);o&&c(o)}let l=r.getPropertyValue(e.C.key);if(l){let t=I(e.C,l,e.N(l));t&&c(t)}for(let t of e.x){let e=r.getPropertyValue(t.key);if(!e)continue;let n=I(t,e);n&&c(n)}return R(o,e.a(t),i,a)},R=(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?We(o,n,r):Ge(o);a.push({...o,isDefault:e})}return[...Qe(i),...Qe(a)]},et=[{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`}],tt=e=>{let t=e.toLowerCase();for(let{keyword:e,family:n}of et)if(t.includes(e))return n;return null},nt=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,z=t=>{let n=Ke(t);return!n||n.unit!==`px`?null:e.g(n.value)},B=(e,t)=>t===null?!0:e.length===t.length?e<t:e.length<t.length,V=(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},rt=(e,t,n)=>{let r=(t===1?Math.floor(e/n)+1:Math.ceil(e/n)-1)*n;return r<0?null:r};let it=null;const at=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),ot=()=>{let e=Array.from(document.adoptedStyleSheets??[]),t=document.styleSheets.length;if(it&&it.documentSheetCount===t&&at(it.adoptedSheets,e))return it.names;let n=new Set;for(let t of[...document.styleSheets,...e]){let e;try{e=t.cssRules}catch{continue}st(e,n)}return it={documentSheetCount:t,adoptedSheets:e,names:n},n},st=(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&&st(n.cssRules,t)},ct={hasTokens:!1,matchColor:()=>null,matchLength:()=>null,stepLength:()=>null},lt=t=>{if(typeof document>`u`)return ct;let n=ot();if(n.size===0)return ct;let r=getComputedStyle(t),i=new Map,a=new Map,o=new Map,s=null;for(let t of n){let n=r.getPropertyValue(t).trim();if(!n)continue;let c=z(n);if(c!==null){t===`--spacing`&&c>0&&(s=c);let e=tt(t);if(e!==null){let n=a.get(c);n?n.push({name:t,family:e}):a.set(c,[{name:t,family:e}]);let r=o.get(e);r?r.add(c):o.set(e,new Set([c]))}continue}let l=e.L(n);if(l){let e=l.toLowerCase();B(t,i.get(e)??null)&&i.set(e,t)}}if(i.size===0&&a.size===0)return ct;let c=new Map;for(let[e,t]of o)c.set(e,Array.from(t).sort((e,t)=>e-t));return{hasTokens:!0,matchColor:t=>{let n=e.L(t)?.toLowerCase();return n?i.get(n)??null:null},matchLength:(e,t)=>{let n=nt(t);if(n===null)return null;let r=a.get(Math.round(e));if(!r)return null;let i=null;for(let e of r)e.family===n&&B(e.name,i)&&(i=e.name);return i},stepLength:(e,t,n)=>{let r=nt(n);if(r===null)return null;let i=Math.round(e),a=c.get(r);return a&&a.length>=2?V(a,i,t):(r===`spacing`||r===`size`)&&s?rt(i,t,s):a?V(a,i,t):null}}},ut=t=>t.kind===`color`||t.kind===`enum`?t.value:t.key===`opacity`&&t.unit===`%`?e.m(t.value/100):`${e.m(t.value)}${t.unit}`,dt=(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},ft=e=>{let t=new Map;for(let n of e.edits){let e=ut(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=dt(t,r,e.designTokens);i&&(n=!0);let a=i?` /* var(${i}) */`:``;return`${t}: ${r.cssValue};${a}`}),usesToken:n}},pt=e=>e.filePath?`${e.filePath}:${e.lineNumber}`:``,mt=e=>["```css",...e,"```"].join(`
12
+ `),ht=e=>{if(e.length===0)return``;let t=e.map(e=>{let{lines:t,usesToken:n}=ft(e);return{header:pt(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(mt(e.cssLines)),n.join(`
13
+ `)}for(let e of t)n.push(e.header?`\n${e.header}`:``),n.push(mt(e.cssLines));return n.join(`
14
+ `)},H=e=>`style`in e&&e.style instanceof CSSStyleDeclaration,U=e=>{let t=new Map,n=H(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}},gt=(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)}},_t=(e,t)=>({element:e.element,preview:e.preview,filePath:e.filePath??``,lineNumber:e.lineNumber??0,edits:t,designTokens:e.designTokens}),vt=r=>{let[i,a]=e.gt(null),[o,s]=e.gt(!1),c=[],l=[],u=e=>{l=e},d=()=>{let e=i()!==null;a(null),s(!1),c=[],l=[],e&&r.onClose?.()},f=()=>{i()?.preview.restore();for(let e=c.length-1;e>=0;e--)c[e].preview.restore();d()},p=e=>{n.a(e).then(t=>{t&&a(n=>!n||n.element!==e||n.componentName?n:{...n,componentName:t})})},m=(e,n,o={})=>{if(i()!==null)return!1;let s=$e(e);if(s.length===0)return!1;let c=o.filePath??r.store.selectionFilePath??void 0,l=o.lineNumber??r.store.selectionLineNumber??void 0;return a({element:e,position:n,selectionBounds:h(e),properties:s,preview:U(e),filePath:c,lineNumber:l,componentName:o.componentName,tagName:o.tagName??t.I(e),initialSearchQuery:o.initialSearchQuery,designTokens:lt(e)}),p(e),r.isActivated()||r.activateRenderer(),r.actions.setPointer(n),r.actions.setFrozenElement(e),r.actions.freeze(),r.onOpen?.(),!0},g=(e,o)=>{let s=i();if(!s||s.element===e)return!1;let u=$e(e);return u.length===0?!1:((l.length>0||s.preview.hasAppliedStyles())&&c.push(_t(s,l)),l=[],a({element:e,position:o,selectionBounds:h(e),properties:u,preview:U(e),tagName:t.I(e),hasSessionEdits:c.some(e=>e.edits.length>0),designTokens:lt(e)}),n.c(e).then(t=>{if(t){for(let n of c)n.element===e&&!n.filePath&&(n.filePath=t.filePath,n.lineNumber=t.lineNumber??0);a(n=>!n||n.element!==e||n.filePath?n:{...n,filePath:t.filePath,lineNumber:t.lineNumber??void 0})}}).catch(()=>void 0),p(e),r.actions.setPointer(o),r.actions.setFrozenElement(e),!0)},_=(e,t)=>[...c,_t(e,t)],v=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),gt(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())},y=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:i,trigger:m,switchToElement:g,setPendingEdits:u,dismiss:()=>{i()!==null&&(f(),r.store.wasActivatedByToggle?r.deactivateRenderer():r.actions.unfreeze())},closePreservingRenderer:()=>{i()!==null&&(f(),r.actions.unfreeze())},submit:e=>{let t=i();if(!t)return;let n=t.element,a=_(t,e),o=ht(v(a));y(a),d(),r.store.wasActivatedByToggle||r.actions.unfreeze(),r.performCopyWithLabel({element:n,cursorX:t.position.x,extraPrompt:o||void 0,shouldDeactivateAfter:r.store.wasActivatedByToggle})},resetWithDiscard:f,isOpen:()=>i()!==null,isInteracting:o,setInteracting:s}},yt={enabled:!0,hue:0,selectionBox:{enabled:!0},dragBox:{enabled:!0},grabbedBoxes:{enabled:!0},elementLabel:{enabled:!0},toolbar:{enabled:!0}},W=(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}}),bt={activationMode:`toggle`,keyHoldDuration:100,allowActivationInsideInput:!0,activationKey:void 0,getContent:void 0,maxContextLines:3,freezeReactUpdates:!0},xt=(e={})=>{let t=new Map,n={},[r,i]=l({theme:yt,options:{...bt,...e},actions:[]}),a=()=>{let r=yt,a={...bt,...e},o=[];for(let{config:e}of t.values())if(e.theme&&(r=W(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])},u=(e,n)=>{t.has(e.name)&&d(e.name);let r=e.setup?.(n,v)??{};e.theme&&(r.theme=r.theme?W(W(yt,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()},d=e=>{let n=t.get(e);n&&(n.config.cleanup&&n.config.cleanup(),t.delete(e),a())},f=()=>Array.from(t.keys()),p=(e,...n)=>{for(let{config:r}of t.values()){let t=r.hooks?.[e];t&&t(...n)}},m=(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},h=async(e,...n)=>{for(let{config:r}of t.values()){let t=r.hooks?.[e];t&&await t(...n)}},g=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},_=(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},v={onActivate:()=>p(`onActivate`),onDeactivate:()=>p(`onDeactivate`),onElementHover:e=>p(`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)=>p(`onDragStart`,e,t),onDragEnd:(e,t)=>p(`onDragEnd`,e,t),onBeforeCopy:async e=>h(`onBeforeCopy`,e),transformCopyContent:async(e,t)=>g(`transformCopyContent`,e,t),onAfterCopy:(e,t)=>p(`onAfterCopy`,e,t),onCopySuccess:(e,t)=>p(`onCopySuccess`,e,t),onCopyError:e=>p(`onCopyError`,e),onStateChange:e=>p(`onStateChange`,e),onPromptModeChange:(e,t)=>p(`onPromptModeChange`,e,t),onSelectionBox:(e,t,n)=>p(`onSelectionBox`,e,t,n),onDragBox:(e,t)=>p(`onDragBox`,e,t),onGrabbedBox:(e,t)=>p(`onGrabbedBox`,e,t),onElementLabel:(e,t,n)=>p(`onElementLabel`,e,t,n),onContextMenu:(e,t)=>p(`onContextMenu`,e,t),onOpenFile:(e,t)=>m(`onOpenFile`,e,t),transformHtmlContent:async(e,t)=>g(`transformHtmlContent`,e,t),transformAgentContext:async(e,t)=>g(`transformAgentContext`,e,t),transformActionContext:e=>_(`transformActionContext`,e),transformOpenFileUrl:(e,t,n)=>_(`transformOpenFileUrl`,e,t,n)};return{register:u,unregister:d,getPluginNames:f,setOptions:c,store:r,hooks:v}},St=e=>`${e}-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,Ct=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:St(`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}},wt=(e,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()},s=n=>{i(n);let a=window.setTimeout(()=>{e.updateLabelInstance(n,`fading`);let t=window.setTimeout(()=>{r.delete(n),e.removeLabelInstance(n)},125);r.set(n,t)},t.it);r.set(n,a)};return{createInstance:(t,n,r,i,a)=>{o();let s=Ct({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=Ct({bounds:h(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`):e.updateLabelInstance(t,`error`,r||`Unknown error`),s(t)},cancelAllFades:a,clearAll:o,handleHoverChange:(e,t)=>{if(t){i(e);return}let r=n().find(t=>t.id===e);r&&(r.status===`copied`||r.status===`error`||r.status===`fading`)&&s(e)}}},Tt=(n,r)=>{let i=[],a=(e,i)=>{let a=ke(r(e)),o=t.u(a.x,a.y).filter(n),s=o.indexOf(e);return s===-1?null:o[s+i]??null},o=e=>{let t=a(e,1);return t&&(i.push(e),i.length>50&&(i=i.slice(-50))),t},s=t=>{if(i.length>0){let t=i.pop();if(e.U(t))return t}return a(t,-1)},c=e=>e instanceof SVGElement&&!(e instanceof SVGSVGElement),l=e=>{let t=e.getBoundingClientRect();return t.width>=16||t.height>=16},u=(e,t)=>Math.abs(e.x-t.x)<=2&&Math.abs(e.y-t.y)<=2&&Math.abs(e.width-t.width)<=2&&Math.abs(e.height-t.height)<=2,d=e=>n(e)&&!c(e)&&l(e),f=(e,t)=>{let n=e.getBoundingClientRect(),r=e=>!u(e.getBoundingClientRect(),n),i=e=>{if(e instanceof SVGSVGElement)return null;let n=Array.from(e.children),a=t?n:n.reverse();for(let e of a)if(t){if(d(e)&&r(e))return e;let t=i(e);if(t)return t}else{let t=i(e);if(t)return t;if(d(e)&&r(e))return e}return null},a=e=>t?e.nextElementSibling:e.previousElementSibling,o=null;if(t&&(o=i(e)),!o){let n=e;for(;n;){let e=a(n);for(;e;){if(d(e)&&r(e)){o=e;break}let t=i(e);if(t){o=t;break}e=a(e)}if(o)break;let s=n.parentElement;if(!t&&s&&d(s)){o=s;break}n=s}}return o};return{findNext:(e,t)=>{switch(e){case`ArrowUp`:return o(t);case`ArrowDown`:return s(t);case`ArrowRight`:return f(t,!0);case`ArrowLeft`:return f(t,!1);default:return null}},clearHistory:()=>{i=[]}}},Et=e=>{let{metaKey:t,ctrlKey:n,shiftKey:r,altKey:i}=Re(e.activationKey);return{metaKey:t,ctrlKey:n,shiftKey:r,altKey:i}},Dt=()=>{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)}}},Ot=(e,t)=>({top:t<25,bottom:t>window.innerHeight-25,left:e<25,right:e>window.innerWidth-25}),kt=(e,n,r)=>{let i=null,a=()=>{if(!n()){o();return}let s=e(),c=Ot(s.x,s.y),l=0,u=0;if(c.top&&(u-=10),c.bottom&&(u+=10),c.left&&(l-=10),c.right&&(l+=10),l!==0||u!==0){let e=window.scrollX,t=window.scrollY;window.scrollBy(l,u);let n=window.scrollX-e,i=window.scrollY-t;(n!==0||i!==0)&&r?.({x:n,y:i})}i=c.top||c.bottom||c.left||c.right?t._(a):null},o=()=>{i!==null&&(t.g(i),i=null)};return{start:a,stop:o,isActive:()=>i!==null}},At=()=>{let e=globalThis;return!!(e.chrome?.runtime?.id||e.browser?.runtime?.id)},jt=e=>{try{let t=`0.1.47-dev.58b4de2`,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&&!At()&&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{}},G=e=>typeof e==`object`&&!!e,Mt=e=>{if(!G(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},K=()=>{if(typeof window>`u`)return null;try{let e=(document.currentScript instanceof HTMLScriptElement?document.currentScript:null)?.getAttribute(`data-options`);return e?Mt(JSON.parse(e)):null}catch{return null}},Nt=e=>e===`Enter`||e===`NumpadEnter`,Pt=(e,t)=>e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height,Ft=(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?.()}}}),It={name:`comment`,setup:()=>({actions:[{id:`comment`,label:`Comment`,shortcut:`Enter`,shortcutModifier:!1,showInToolbarMenu:!0,onAction:e=>{e.enterPromptMode?.()}}]})},Lt={name:`edit`,setup:()=>({actions:[{id:`edit`,label:`Style`,shortcut:`S`,shortcutModifier:!1,showInToolbarMenu:!0,onAction:e=>{e.enterEditMode?.()}}]})},Rt={name:`open`,actions:[{id:`open`,label:`Open`,shortcut:`O`,enabled:e=>!!e.filePath,onAction:e=>{e.filePath&&(e.hooks.onOpenFile(e.filePath,e.lineNumber)||t.s(e.filePath,e.lineNumber,e.hooks.transformOpenFileUrl),e.hideContextMenu(),e.cleanup())}}]},zt=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`},Bt=()=>{let[t,n]=e.gt(!1),r=null,i=e.t(),a=()=>e.U(r)?r:null,o=()=>{r=null,i.clear(),n(!1)};return{selectedElement:a,isPendingDismiss:t,select:(e,t)=>{r=e,n(!1),t?.shouldPromptBeforeMouseHandoff?i.arm():i.clear()},clear:o,consumeMouseHandoff:()=>i.consume()&&a()!==null,showDismissPrompt:()=>a()?t()?!1:(n(!0),!0):(o(),!1),takeSelection:t=>{let n=a()??(e.U(t)?t:null);return o(),n}}},Vt=async(e,t={})=>(await Promise.allSettled(e.map(e=>n.n(e,t)))).map(e=>e.status===`fulfilled`?e.value:``),Ht=[Ft,Lt,It,Rt];let Ut=!1;const q=new Set,Wt=i=>{if(typeof window>`u`)return he();let a={enabled:!0,activationMode:`toggle`,keyHoldDuration:100,allowActivationInsideInput:!0,...K(),...i};if(a.enabled===!1||Ut)return he();Ut=!0,jt(a.telemetry!==!1);let{enabled:o,telemetry:s,...c}=a;return e.ht(i=>{let a=!1,o,s=xt(c),{store:l,actions:u,pointer:d,viewportVersion:f,current:p}=v({keyHoldDuration:s.store.options.keyHoldDuration??100}),m=e.ft(()=>p().state===`holding`),_=e.ft(()=>p().state===`active`),y=e.ft(()=>{let e=p();return e.state===`active`&&e.phase===`frozen`}),b=e.ft(()=>{let e=p();return e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)}),ne=e.ft(()=>{if(!b())return!1;let e=Math.abs(d().x+window.scrollX-l.dragStart.x),t=Math.abs(d().y+window.scrollY-l.dragStart.y);return e>2||t>2}),re=e.ft(()=>{let e=p();return e.state===`active`&&e.phase===`dragging-reposition`}),ie=e.ft(()=>{let e=p();return e.state===`active`&&e.phase===`justDragged`}),x=e.ft(()=>p().state===`copying`),S=e.ft(()=>l.selectionInteractionLockDepth>0),ae=e.ft(()=>p().state===`justCopied`),C=e.ft(()=>{let e=p();return e.state===`active`&&!!e.isPromptMode}),oe=e.ft(()=>l.pendingCommentMode||C()),se=e.ft(()=>{let e=p();return e.state===`active`&&!!e.isPromptMode&&!!e.isPendingDismiss});e.dt(e.yt(_,(e,n)=>{e&&!n?(t.r(d().x,d().y),document.body.style.touchAction=`none`):!e&&n&&(t.i(),document.body.style.touchAction=``)}));let ce=e.r(),[w,le]=e.gt(ce?!ce.collapsed:!0),[ue,de]=e.gt(0),[fe,pe]=e.gt(0),[T,he]=e.gt(ce),[ve,ye]=e.gt(!1),[be,xe]=e.gt(null),[Se,we]=e.gt(null),E=vt({store:l,actions:u,isActivated:_,activateRenderer:()=>pn(),deactivateRenderer:()=>Y(),performCopyWithLabel:e=>G(e),onOpen:()=>{qr(),k?.(),k=Kr(Gr,we)},onClose:()=>{k?.(),k=null,we(null)}}),D=e.ft(()=>l.contextMenuPosition!==null||E.isOpen()),Te=e.ft(()=>D()||be()!==null),Ee,O=null,k=null,Fe=!1,Ie=new WeakMap,A=Bt(),Re=()=>!w()||C()||S()||D()||A.isPendingDismiss(),Ve=()=>{Ie=new WeakMap},j=()=>{Ze(!1),Ve()},He=t=>{let n=T()??e.r(),r={edge:n?.edge??`bottom`,ratio:n?.ratio??.5,collapsed:n?.collapsed??!1,enabled:n?.enabled??!0,defaultAction:n?.defaultAction??`copy`,...t};e.i(r),he(r);for(let e of q)e(r)},Ue=()=>{F.timerId!==null&&(clearTimeout(F.timerId),F.timerId=null)},We=()=>{F.copyWaiting=!1,F.holdTimerFired=!1,F.startTimestamp=null};e.dt(()=>{if(p().state!==`holding`){Ue();return}F.startTimestamp=Date.now(),F.timerId=window.setTimeout(()=>{if(F.timerId=null,F.copyWaiting){F.holdTimerFired=!0;return}u.activate()},l.keyHoldDuration),e.bt(Ue)}),e.dt(()=>{let n=p();if(n.state!==`active`||n.phase!==`justDragged`)return;let r=setTimeout(()=>{u.finishJustDragged()},t.it);e.bt(()=>clearTimeout(r))}),e.dt(()=>{if(p().state!==`justCopied`)return;let n=setTimeout(()=>{u.finishJustCopied()},t.it);e.bt(()=>clearTimeout(n))}),e.dt(e.yt(m,(e,t=!1)=>{!t||e||!_()||(s.store.options.activationMode!==`hold`&&u.setWasActivatedByToggle(!0),s.hooks.onActivate())}));let Ge=(e,t,n)=>{qe(e,t,n),u.clearInputText()},Ke=()=>{let e=l.frozenElement||K();e&&u.enterPromptMode({x:d().x,y:d().y},e)},qe=(e,t,n)=>{u.setCopyStart({x:t,y:n},e)},M={lastDetectionTimestamp:0,pendingDetectionScheduledAt:0,latestPointerX:0,latestPointerY:0},N=null,[Je,Ye]=e.gt(null),Xe=(e,t)=>{N!==null&&clearTimeout(N),Ye(null),N=window.setTimeout(()=>{Ye({x:e,y:t}),N=null},32)},P=null,F={timerId:null,startTimestamp:null,copyWaiting:!1,holdTimerFired:!1},I=null,[L,Ze]=e.gt(!1),Qe=0,$e=!1,R=null,et=()=>{$e=!0,R!==null&&window.clearTimeout(R),R=window.setTimeout(()=>{$e=!1,R=null},t.it)},tt=()=>{R!==null&&(window.clearTimeout(R),R=null),$e=!1},nt=0,z=null,B=null,[V,rt]=e.gt(!1),[it,at]=e.gt(null),[ot,st]=e.gt(null),[ct,lt]=te(ot),ut=e.ft(()=>E.isOpen()?t.q:oe()?t.B:V()?it():_()?t.H:null),[dt,ft]=e.gt([]),[pt,mt]=e.gt(0),ht=Tt(t.m,h),H=kt(d,()=>b(),e=>{if(re()){if(u.shiftDragStart(e),I){I={x:I.x+e.x,y:I.y+e.y};return}let{pageX:t,pageY:n}=Jt(d().x,d().y);I={x:t,y:n}}}),U=e.ft(()=>_()&&!x()),gt=new Map,_t=(e,n)=>{let r=St(`grabbed`),i={id:r,bounds:e,createdAt:Date.now(),element:n};u.addGrabbedBox(i),s.hooks.onGrabbedBox(e,n);let a=window.setTimeout(()=>{gt.delete(r),u.removeGrabbedBox(r)},t.it);gt.set(r,a)},yt=async e=>{let r=await Promise.all(e.map(async e=>{let r=await n.c(e),i=r?.componentName??null,a=r?.filePath,o=r?.lineNumber??void 0,s=r?.columnNumber??void 0;i||=n.r(e);let c=e instanceof HTMLElement?e.innerText?.slice(0,100):void 0;return{tagName:t.I(e),id:e.id||void 0,className:e.getAttribute(`class`)||void 0,textContent:c,componentName:i??void 0,filePath:a,lineNumber:o,columnNumber:s}}));window.dispatchEvent(new CustomEvent(`react-grab:element-selected`,{detail:{elements:r}}))},W=wt(u,()=>l.labelInstances),bt=async(e,t,n)=>{tt(),p().state!==`copying`&&u.startCopy();let r=!1,i;try{r=await e(),r||(i=`Failed to copy`)}catch(e){i=_e(e,`Action failed`)}if(t)for(let e of t)W.updateAfterCopy(e,r,i);p().state===`copying`&&(r&&u.completeCopy(),n?Y():r?(u.activate(),et()):u.unfreeze())},Ct=(e,r,i)=>{let a=e[0],o=i??(a?n.r(a):null),c=a?t.I(a):null,l=o??c??void 0;return Ce({getContent:s.store.options.getContent,componentName:l,maxContextLines:s.store.options.maxContextLines},s.hooks,e,r)},At=async(e,r,i)=>{if(e.length===0)return!1;let a=[],o=[];for(let t of e){let{wasIntercepted:e,pendingResult:n}=s.hooks.onElementSelect(t);e||a.push(t),n&&o.push(n),s.store.theme.grabbedBoxes.enabled&&_t(h(t),t)}await t.v();let c=!0;if(a.length>0&&(c=await Ct(a,r,i)),o.length>0&&!(await Promise.all(o)).every(Boolean))throw new n.d;return yt(e),c},jt=e=>{n.a(e.primaryElement).then(async t=>{await bt(()=>At(e.targetElements,e.extraPrompt,t??void 0),e.labelInstanceIds.length>0?e.labelInstanceIds:null,e.shouldDeactivateAfter),e.onComplete?.()}).catch(t=>{let n=_e(t,`Action failed`);for(let t of e.labelInstanceIds)W.updateAfterCopy(t,!1,n);p().state===`copying`&&u.unfreeze()})},G=e=>{let{element:n,cursorX:r,selectedElements:i,extraPrompt:a,shouldDeactivateAfter:o,onComplete:s,dragRect:c}=e,d=i??[n],f=c??l.frozenDragRect,p=d.length>1,m=!p&&n===Lt()?qt():void 0,g=f&&p?je(f):m??h(n),_=p?g.x+g.width/2:r,v=t.I(n);tt(),u.startCopy();let y=v?W.createInstance(g,v,void 0,`copying`,{element:n,mouseX:_,elements:i}):null;jt({primaryElement:n,targetElements:d,labelInstanceIds:y?[y]:[],extraPrompt:a,shouldDeactivateAfter:o,onComplete:s})},Mt=e=>{let{elements:t,labelEntries:n,shouldDeactivateAfter:r,onComplete:i}=e,a=t[0];tt(),u.startCopy(),jt({primaryElement:a,targetElements:t,labelInstanceIds:W.createPerElementInstances(n,`copying`),shouldDeactivateAfter:r,onComplete:i})},K=e.ft(()=>{if(f(),!U()||ne()||S()||A.isPendingDismiss())return null;let t=l.detectedElement;return e.U(t)?t:null}),Ft=e.ft(()=>l.frozenElement||(y()?null:K()));e.dt(()=>{let t=l.detectedElement;if(!t)return;let n=setInterval(()=>{e.U(t)||u.setDetectedElement(null)},100);e.bt(()=>clearInterval(n))}),e.dt(e.yt(Ft,e=>{if(z!==null&&(clearTimeout(z),z=null),!e){st(null);return}z=window.setTimeout(()=>{z=null,st(e)},100)})),e.bt(()=>{z!==null&&(clearTimeout(z),z=null)}),e.dt(()=>{let n=l.frozenElements;e.bt(t.o(n))}),e.dt(e.yt(_,n=>{n&&s.store.options.freezeReactUpdates&&e.bt(t.t())}));let It=()=>{if(l.isTouchMode&&b()){let e=l.detectedElement;return!e||t.h(e)?void 0:e}let e=Ft();if(!(!e||t.h(e)))return e},Lt=e.ft(()=>It()),Rt=()=>Lt()?l.isTouchMode&&b()?U():U()&&!ne():!1,Vt=e._t(()=>l.frozenElements,t=>e.ft(()=>(f(),h(t)))),Wt=e.ft(()=>{let e=l.frozenElements;if(e.length===0)return[];let t=l.frozenDragRect;return t&&e.length>1?[je(t)]:Vt().map(e=>e())}),Gt=e.ft(()=>{if(!L()||l.pendingCommentMode||V())return null;let n=l.detectedElement;return!e.U(n)||t.h(n)||l.frozenElements.includes(n)?null:n}),Kt=e.ft(()=>{f();let e=Gt();if(e)return h(e)}),qt=e.ft(()=>{f();let e=l.frozenElements;if(e.length>0){let t=Wt();if(e.length===1){let e=t[0];if(e)return e}let n=l.frozenDragRect;return n?t[0]??je(n):Ne(Be(t))}let t=Lt();if(t)return h(t)}),Jt=(e,t)=>({pageX:e+window.scrollX,pageY:t+window.scrollY}),Yt=(e,t)=>{let{pageX:n,pageY:r}=Jt(e,t);return{x:Math.abs(n-l.dragStart.x),y:Math.abs(r-l.dragStart.y)}},Xt=e.ft(()=>{if(!b())return!1;let e=Yt(d().x,d().y);return e.x>2||e.y>2}),Zt=(e,t)=>{let{pageX:n,pageY:r}=Jt(e,t),i=Math.min(l.dragStart.x,n),a=Math.min(l.dragStart.y,r),o=Math.abs(n-l.dragStart.x),s=Math.abs(r-l.dragStart.y);return{x:i-window.scrollX,y:a-window.scrollY,width:o,height:s}},Qt=e=>e.code===`Space`||e.key===` `,$t=()=>{if(!b())return;u.startDragReposition();let{pageX:e,pageY:t}=Jt(d().x,d().y);I={x:e,y:t}},en=()=>{u.stopDragReposition(),I=null},tn=e.ft(()=>{if(f(),Xt())return Ne(Zt(d().x,d().y))}),nn=e.ft(()=>{if(f(),!Xt())return[];let e=Je();if(!e)return[];let n=Zt(e.x,e.y),r=De(n,t.m);return(r.length>0?r:De(n,t.m,!1)).map(e=>h(e))}),rn=e.ft(()=>{let e=nn();if(e.length>0)return e;let t=Kt();return t?[...Wt(),t]:Wt()}),an=e._t(()=>l.frozenElements,r=>{let i=t.I(r)||`element`,a=n.r(r)??void 0;return e.ft(()=>{if(f(),!e.U(r))return null;let t=h(r),n=Ie.get(r);return{tagName:i,componentName:a,bounds:t,mouseX:n===void 0?void 0:t.x+t.width*n}})}),on=e.ft(()=>{if(C()||l.frozenElements.length<2)return[];let e=[];for(let t of an()){let n=t();n!==null&&e.push(n)}return e}),sn=e.ft(()=>{if(C())return null;let e=Gt();return e?(f(),{tagName:t.I(e)||`element`,componentName:n.r(e)??void 0,bounds:h(e),mouseX:d().x}):null}),cn=e.ft(()=>{if(x()||C()){f();let e=l.frozenElement||K();return e?{x:g(h(e)).x+l.copyOffsetFromCenterX,y:l.copyStart.y}:{x:l.copyStart.x,y:l.copyStart.y}}return{x:d().x,y:d().y}}),ln=e.ft(()=>{if(!L()||l.frozenElements.length!==1)return;f();let t=l.frozenElements[0];if(!e.U(t))return;let n=Ie.get(t);if(n===void 0)return;let r=h(t);return r.x+r.width*n});e.dt(e.yt(()=>[K(),l.lastGrabbedElement],([e,t])=>{t&&e&&t!==e&&u.setLastGrabbed(null),e&&s.hooks.onElementHover(e)})),e.dt(e.yt(()=>K(),e=>{let t=++nt,r=()=>{nt===t&&u.setSelectionSource(null,null)};if(!e){r();return}n.c(e).then(e=>{if(nt===t){if(!e){r();return}u.setSelectionSource(e.filePath,e.lineNumber)}}).catch(()=>{nt===t&&u.setSelectionSource(null,null)})}));let un=e.ft(()=>l.grabbedBoxes.map(e=>({id:e.id,bounds:e.bounds,createdAt:e.createdAt}))),dn=e.ft(()=>l.labelInstances.map(e=>({id:e.id,status:e.status,tagName:e.tagName,componentName:e.componentName,createdAt:e.createdAt})));e.dt(e.yt(e.ft(()=>{let e=_(),t=b(),n=x(),r=C(),i=K(),a=tn(),o=s.store.theme.enabled,c=s.store.theme.selectionBox.enabled,u=s.store.theme.dragBox.enabled,d=Xt(),f=Ft(),p=ae();return{isActive:e,isDragging:t,isCopying:n,isPromptMode:r,isSelectionBoxVisible:!!(o&&c&&e&&!n&&!p&&!t&&f!=null),isDragBoxVisible:!!(o&&u&&e&&!n&&d),targetElement:i,dragBounds:a?{x:a.x,y:a.y,width:a.width,height:a.height}:null,grabbedBoxes:[...un()],labelInstances:[...dn()],selectionFilePath:l.selectionFilePath,toolbarState:T()}}),e=>{s.hooks.onStateChange(e)})),e.dt(e.yt(()=>{let t=C();return{inputMode:t,position:t?d():e.Ct(d),target:t?K():e.Ct(K)}},({inputMode:e,position:t,target:n})=>{s.hooks.onPromptModeChange(e,{x:t.x,y:t.y,targetElement:n})})),e.dt(e.yt(()=>[Cr(),qt(),K()],([e,t,n])=>{s.hooks.onSelectionBox(!!e,t??null,n)})),e.dt(e.yt(()=>[Ar(),tn()],([e,t])=>{s.hooks.onDragBox(!!e,t??null)})),e.dt(e.yt(()=>{let t=Mr();return[t,jr(),t?cn():e.Ct(cn),t?K():e.Ct(K),l.selectionFilePath,l.selectionLineNumber]},([e,n,r,i,a,o])=>{s.hooks.onElementLabel(e,n,{x:r.x,y:r.y,content:``,element:i??void 0,tagName:i&&t.I(i)||void 0,filePath:a??void 0,lineNumber:o??void 0})}));let J=null,fn=e=>{if(e){if(!J){J=document.createElement(`style`),J.setAttribute(`data-react-grab-cursor`,``);let e=t.F();e&&(J.nonce=e),t.P(J),document.head.appendChild(J)}J.textContent=`* { cursor: ${e} !important; }`}else J&&=(J.remove(),null)};e.dt(e.yt(()=>[_(),x(),C()],([e,t,n])=>{fn(t?`progress`:e&&!n?`crosshair`:null)}));let pn=()=>{let e=m();u.activate(),e||s.hooks.onActivate()},Y=()=>{let t=b(),n=l.previouslyFocusedElement;en(),u.deactivate(),E.resetWithDiscard(),qr(),j(),Q(),A.clear(),rt(!1),at(null),t&&(document.body.style.userSelect=``),P&&window.clearTimeout(P),H.stop(),n instanceof HTMLElement&&n!==document.body&&n!==document.activeElement&&e.U(n)&&n.focus({preventScroll:!0}),s.hooks.onDeactivate()},mn=()=>{m()&&u.releaseHold(),_()&&Y(),tt()},hn=()=>{u.setWasActivatedByToggle(!0),pn()},gn=()=>{let e=[...l.frozenElements],t=l.frozenElement||K(),n=C()?l.inputText.trim():``;if(!t){Y();return}let r=e.length>0?e:[t],i=r.map(e=>h(e))[0],{x:a,y:o}=g(i),s=a+l.copyOffsetFromCenterX;u.setPointer({x:a,y:o}),u.exitPromptMode(),u.clearInputText(),G({element:t,cursorX:s,selectedElements:r,extraPrompt:n||void 0,shouldDeactivateAfter:!0})},_n=()=>{if(C()){if(se()){u.clearInputText(),Y();return}u.setPendingDismiss(!0),pe(e=>e+1)}},vn=()=>{if(A.isPendingDismiss()){Kn();return}u.clearInputText(),Y()},yn=()=>{u.setPendingDismiss(!1)},bn=()=>{if(E.isOpen()){E.dismiss();return}let e=l.frozenElement||K();e&&xn(e,{x:d().x,y:d().y})},xn=(e,t,n={})=>E.trigger(e,t,n),Sn=(e,n)=>{if(!E.isOpen()||l.contextMenuPosition!==null)return!1;let r=t.u(e,n).find(t.m);if(!r)return!1;let i=E.switchToElement(r,{x:e,y:n});return i&&t.a([r]),i},Cn=e=>({filePath:l.selectionFilePath??void 0,lineNumber:l.selectionLineNumber??void 0,componentName:ct(),tagName:t.I(e)||void 0}),X=()=>{B=null,rt(!1),u.setPendingCommentMode(!1),at(null)},wn=e=>{let n=l.frozenElement||K();if(!n)return!1;let r={x:d().x,y:d().y},i=s.store.actions.find(t=>t.id===e);return i?e===`edit`?xn(n,r,Cn(n))?(u.clearInputText(),u.exitPromptMode(),X(),!0):!0:(u.clearInputText(),u.exitPromptMode(),X(),i.onAction(Zn(n,r)),!0):(u.clearInputText(),u.exitPromptMode(),X(),Xr(t.H),On(n,r),!0)},Tn=e=>{if(_()){if(ut()!==e&&C()&&wn(e))return;if(ut()!==e&&l.pendingCommentMode){u.setPendingCommentMode(!1),B=e,at(e),rt(!0);return}if(ut()!==e&&V()){B=e,at(e);return}Y();return}w()&&(B=e,at(e),rt(!0),hn())},En=()=>{Tn(T()?.defaultAction??`copy`)},Dn=(e,t,n)=>{X(),u.clearInputText(),u.enterPromptMode({x:t,y:n},e)},On=(e,t)=>{j(),Jr(),u.showContextMenu(t,e),Q(),s.hooks.onContextMenu(e,t)},kn=(e,n)=>{let r=B;if(B=null,at(null),!r)return;if(r===`edit`){xn(e,n,Cn(e));return}let i=s.store.actions.find(e=>e.id===r);if(!i){Xr(t.H),On(e,n);return}i.onAction(Zn(e,n))},An=()=>{if(w()){if(_()&&oe()){Y();return}u.setPendingCommentMode(!0),_()||hn()}},jn=(e,n,r)=>{let i=r&&L()&&!b()&&!l.pendingCommentMode&&!V();if(Re()||y()&&!i)return;if(u.setPointer({x:e,y:n}),M.latestPointerX=e,M.latestPointerY=n,i){let r=t.l(e,n);r!==l.detectedElement&&u.setDetectedElement(r);return}let a=performance.now(),o=M.pendingDetectionScheduledAt>0&&a-M.pendingDetectionScheduledAt<200;if(a-M.lastDetectionTimestamp>=32&&!o&&(M.lastDetectionTimestamp=a,M.pendingDetectionScheduledAt=a,setTimeout(()=>{if(Re()){M.pendingDetectionScheduledAt=0;return}let e=t.l(M.latestPointerX,M.latestPointerY);e!==l.detectedElement&&u.setDetectedElement(e),M.pendingDetectionScheduledAt=0})),b()){if(re()){let{pageX:t,pageY:r}=Jt(e,n);I&&u.shiftDragStart({x:t-I.x,y:r-I.y}),I={x:t,y:r}}Xe(e,n);let t=Ot(e,n),r=t.top||t.bottom||t.left||t.right;r&&!H.isActive()?H.start():!r&&H.isActive()&&H.stop()}},Mn=(e,t,n)=>{if(!U()||S())return!1;!n&&L()&&j();let r=A.selectedElement()!==null;return u.startDrag({x:e,y:t},n||r),u.setPointer({x:e,y:t}),document.body.style.userSelect=`none`,Xe(e,t),s.hooks.onDragStart(e+window.scrollX,t+window.scrollY),!0},Nn=(e,r)=>{let i=l.frozenElements.includes(e),a=l.frozenElements.length===0;if(!i){let t=Oe(h(e),r);Ie.set(e,t),a&&lt(n.r(e)??void 0)}u.toggleFrozenElement(e),t.c();let o=l.frozenElements.includes(e);if(o||Ie.delete(e),l.frozenElements.length===0){j(),u.unfreeze();return}t.a(l.frozenElements),Ze(!0),u.setPointer(r),u.setLastGrabbed(o?e:l.frozenElements[l.frozenElements.length-1]),u.freeze(),Q()},Pn=()=>{let r=l.frozenElements.filter(e.U),i=r.map(e=>{let r=t.I(e)||`element`,i=n.r(e)??void 0,a=Ie.get(e),o=h(e);return{element:e,tagName:r,componentName:i,mouseX:a===void 0?o.x+o.width/2:o.x+o.width*a}});if(j(),r.length===0){u.unfreeze();return}if(r.length===1){G({element:r[0],cursorX:i[0].mouseX,selectedElements:r,shouldDeactivateAfter:l.wasActivatedByToggle});return}Mt({elements:r,labelEntries:i,shouldDeactivateAfter:l.wasActivatedByToggle})},Fn=(e,n,r)=>{let i=De(e,t.m),a=i.length>0?i:De(e,t.m,!1);if(a.length===0)return;let o=r&&!l.pendingCommentMode&&!V();if(o&&u.addFrozenElements(a),t.a(o?l.frozenElements:a),s.hooks.onDragEnd(a,e),o){let e=a[a.length-1];Ze(!0),t.c(),u.setPointer(g(h(e))),u.setLastGrabbed(e),u.freeze(),Q();return}let c=a[0],d=g(h(c));u.setPointer(d),u.setFrozenElements(a);let f=Me(e);if(u.setFrozenDragRect(f),u.freeze(),u.setLastGrabbed(c),l.pendingCommentMode){Dn(c,d.x,d.y);return}if(V()){rt(!1),B?kn(c,d):On(c,d);return}let p=l.wasActivatedByToggle&&!n;G({element:c,cursorX:d.x,selectedElements:a,shouldDeactivateAfter:p,dragRect:f})},In=t=>{for(let n of l.frozenElements)if(e.U(n)&&Pt(t,h(n)))return n;return null},Ln=(n,r,i,a)=>{let o=e.U(l.frozenElement)?l.frozenElement:null,c=A.selectedElement(),f=()=>t.u(n,r).find(t.m)??null;if(a&&!l.pendingCommentMode&&!V()){let e=f();e!==null&&Nn(e,{x:n,y:r});return}let p=f()??(e.U(l.detectedElement)?l.detectedElement:null),m=c??p??o;if(!m)return;let _,v,y=p===null&&o===m,b=c===m;if(y)_=d().x,v=d().y;else if(b){let e=g(h(m));_=e.x,v=e.y}else _=n,v=r;if(l.pendingCommentMode){Dn(m,_,v),A.clear();return}if(V()){rt(!1);let{wasIntercepted:e}=s.hooks.onElementSelect(m);if(e)return;A.clear(),t.a([m]),u.setFrozenElement(m);let n={x:_,y:v};u.setPointer(n),u.freeze(),B?kn(m,n):On(m,n);return}let ee=l.wasActivatedByToggle&&!i;u.setLastGrabbed(m),G({element:m,cursorX:_,shouldDeactivateAfter:ee}),A.clear()},Rn=()=>{b()&&(en(),u.cancelDrag(),H.stop(),document.body.style.userSelect=``)},zn=(e,t,n,r)=>{if(!b())return;N!==null&&(clearTimeout(N),N=null),Ye(null);let i=Yt(e,t),a=i.x>2||i.y>2,o=a?Zt(e,t):null;a?u.endDrag():u.cancelDrag(),en(),H.stop(),document.body.style.userSelect=``,o?Fn(o,n,r):Ln(e,t,n,r)},Z=ge(),Bn=Dt(),Vn=t=>{let n;try{n=Bn.originalKeyDescriptor?.get?Bn.originalKeyDescriptor.get.call(t):t.key}catch{return!1}let r=n===`Enter`||Nt(t.code),i=_()||m();return r&&i&&!C()&&!A.isPendingDismiss()&&!l.wasActivatedByToggle?e.P(t,`data-react-grab-input`)?!1:(Bn.claimedEvents.add(t),t.preventDefault(),t.stopImmediatePropagation(),!0):!1};Z.addDocumentListener(`keydown`,Vn,{capture:!0}),Z.addDocumentListener(`keyup`,Vn,{capture:!0}),Z.addDocumentListener(`keypress`,Vn,{capture:!0});let Q=()=>{ft([]),mt(0),ht.clearHistory(),A.clear()},Hn=(e,t=!1)=>{u.setFrozenElement(e),u.freeze(),A.select(e,{shouldPromptBeforeMouseHandoff:t});let n=g(h(e));u.setPointer(n),l.contextMenuPosition!==null&&u.showContextMenu(n,e)},Un=e=>{let n=ke(h(e)),r=t.u(n.x,n.y).filter(t.m).reverse();ft(r),mt(Math.max(0,r.indexOf(e)))},Wn=e=>{let t=dt()[e];t&&(mt(e),ht.clearHistory(),Hn(t,!0))},Gn=()=>{A.showDismissPrompt()&&pe(e=>e+1)},Kn=()=>{A.clear(),u.unfreeze(),Q()},qn=()=>{let e=A.takeSelection(l.frozenElement);if(!e){Kn();return}let t=g(h(e));Q(),u.setLastGrabbed(e),G({element:e,cursorX:t.x,shouldDeactivateAfter:l.wasActivatedByToggle})},Jn=(e,n={})=>{if(!_()||C()||L()||A.isPendingDismiss()&&!n.allowPendingKeyboardSelection||!t.L.has(e.key)||Te())return!1;let r=Ft(),i=!r;if(r||=t.l(window.innerWidth/2,window.innerHeight/2),!r)return!1;if(!(e.key===`ArrowUp`||e.key===`ArrowDown`)){let t=ht.findNext(e.key,r);return!t&&!i?!1:(Q(),e.preventDefault(),e.stopPropagation(),Hn(t??r,!0),!0)}dt().length===0&&Un(r);let a=ht.findNext(e.key,r)??r;e.preventDefault(),e.stopPropagation(),Hn(a,!0);let o=dt().indexOf(a);return o===-1?Un(a):mt(o),!0},Yn=t=>t.metaKey||t.ctrlKey||t.altKey||t.repeat||e.H(t)||!_()||x()||S()||Te()?null:l.frozenElement||K(),Xn=t=>{let n=Yn(t);if(!n)return null;let r=e.n(s.store.actions,t);return r?{element:n,action:r}:null},Zn=(e,n)=>{let r=h(e);return Vr({element:e,filePath:l.selectionFilePath??void 0,lineNumber:l.selectionLineNumber??void 0,tagName:t.I(e)||void 0,componentName:ct(),position:n,shouldDeferHideContextMenu:!1,performWithFeedbackOptions:{fallbackBounds:r,fallbackSelectionBounds:[r],position:n}})},Qn=/^[a-zA-Z0-9-]$/,$n=e=>{if(!e.key||e.key.length!==1||!Qn.test(e.key))return!1;let t=Yn(e);return!t||!E.trigger(t,{x:d().x,y:d().y},{initialSearchQuery:e.key})?!1:(X(),e.preventDefault(),e.stopImmediatePropagation(),!0)},er=e=>{let t=Xn(e);if(!t)return!1;let{element:n,action:r}=t;if(C())return wn(r.id)?(e.preventDefault(),e.stopImmediatePropagation(),!0):!1;let i={x:d().x,y:d().y};return r.onAction(Zn(n,i)),e.preventDefault(),e.stopImmediatePropagation(),!0},tr=e=>{if(e.key?.toLowerCase()!==`o`||!_()||!(e.metaKey||e.ctrlKey))return!1;let n=l.selectionFilePath,r=l.selectionLineNumber;return n?(e.preventDefault(),e.stopPropagation(),s.hooks.onOpenFile(n,r??void 0)||t.s(n,r??void 0,s.hooks.transformOpenFileUrl),!0):!1},nr=e=>{if(!_()||x()||l.contextMenuPosition!==null||E.isOpen())return!1;let n=e.key===`F10`&&e.shiftKey,r=e.key===`ContextMenu`;if(!n&&!r)return!1;let i=l.frozenElements,a=i.length>1,o=(a?i[0]:null)||l.frozenElement||K();if(!o)return!1;e.preventDefault(),e.stopPropagation();let s=g(h(o));return a?t.a(i):(t.a([o]),u.setFrozenElement(o)),u.setPointer(s),u.freeze(),On(o,s),!0},rr=e.ft(()=>dt().map(e=>({tagName:t.I(e)||`element`,componentName:n.r(e)??void 0}))),ir=e.ft(()=>({items:rr(),activeIndex:pt(),isVisible:dt().length>0})),ar=n=>{if(!(!s.store.options.allowActivationInsideInput&&e.H(n))&&!(!ze(n,s.store.options)&&((n.metaKey||n.ctrlKey)&&!t.ft.includes(n.key)&&!Nt(n.code)&&(_()&&!l.wasActivatedByToggle?Y():m()&&(Ue(),We(),u.releaseHold())),!Nt(n.code)||!m()))){if((_()||m())&&!C()&&(n.preventDefault(),Nt(n.code)&&n.stopImmediatePropagation()),_()){if(l.wasActivatedByToggle&&s.store.options.activationMode!==`hold`||n.repeat)return;P!==null&&window.clearTimeout(P),P=window.setTimeout(()=>{Y()},200);return}if(m()&&n.repeat){if(F.copyWaiting){let e=F.holdTimerFired;We(),e&&u.activate()}return}if(!(x()||ae())&&!m()){let t=s.store.options.keyHoldDuration??100;e.H(n)?e.B(n)?t+=600:t+=400:e.V()&&(t+=600),We(),u.startHold(t)}}},or=e=>{if(!Nt(e.code))return!1;let t=e.composedPath()[0],n=t instanceof HTMLElement?t:null;return!!(n?.closest(`[data-react-grab-discard-copy]`)||n?.closest(`[data-react-grab-discard-yes]`))},sr=e=>{if(!A.isPendingDismiss())return!1;if(or(e))return!0;let n=t.L.has(e.key),r=Xn(e)!==null;return!n&&!r?!1:n?Jn(e,{allowPendingKeyboardSelection:!0}):er(e)?(Q(),!0):!1};Z.addWindowListener(`keydown`,n=>{if(sr(n))return;if(Vn(n),!w()){ze(n,s.store.options)&&!n.repeat&&de(e=>e+1);return}let r=Nt(n.code)&&m()&&!C(),i=e.P(n,`data-react-grab-input`);if(C()&&ze(n,s.store.options)&&!n.repeat&&!i){n.preventDefault(),n.stopPropagation(),_n();return}if(n.key===`Escape`&&Te()){be()!==null&&qr();return}let a=e.P(n,`data-react-grab-ignore-events`)&&!r;if(C()||a)return C()&&!i&&er(n)||(n.key===`Escape`&&(C()?_n():l.wasActivatedByToggle&&Y()),a&&t.L.has(n.key)&&Jn(n)),void 0;if(b()&&Qt(n)){n.repeat||$t(),n.preventDefault(),n.stopPropagation();return}if(n.key===`Escape`&&(m()||l.wasActivatedByToggle)){Y();return}_()&&!t.ft.includes(n.key)&&n.preventDefault();let o=Date.now()-Qe<200;Jn(n)||tr(n)||nr(n)||er(n)||$n(n)||o||ar(n)},{capture:!0}),Z.addWindowListener(`keyup`,t=>{if(Vn(t))return;if(Qt(t)&&re()&&(en(),t.preventDefault(),t.stopPropagation()),t.key===`Shift`&&L()){b()&&Rn(),Pn();return}if(e.P(t,`data-react-grab-ignore-events`))return;let n=Et(s.store.options),r=n.metaKey||n.ctrlKey?e.F()?!t.metaKey:!t.ctrlKey:n.shiftKey&&!t.shiftKey||n.altKey&&!t.altKey,i=s.store.options.activationKey?typeof s.store.options.activationKey==`function`?s.store.options.activationKey(t):Le(s.store.options.activationKey)(t):Pe(t.key,t.code);if(ae()||$e){(i||r)&&(tt(),Y());return}if(!m()&&!_()||C())return;let a=!!s.store.options.activationKey,o=s.store.options.activationMode===`hold`,c=b();if(_()){let e=D();if(r){if(l.wasActivatedByToggle&&s.store.options.activationMode!==`hold`||e)return;Y()}else if(o&&i){if(P!==null&&(window.clearTimeout(P),P=null),e||c)return;Y()}else !a&&i&&P!==null&&(window.clearTimeout(P),P=null);return}if(i||r){if(l.wasActivatedByToggle&&s.store.options.activationMode!==`hold`)return;if(m()||F.holdTimerFired&&r){Ue();let n=(F.startTimestamp?Date.now()-F.startTimestamp:0)>=200,r=F.holdTimerFired&&n&&(s.store.options.allowActivationInsideInput||!e.H(t));We(),r?u.activate():u.releaseHold()}else Y()}},{capture:!0}),Z.addDocumentListener(`copy`,()=>{m()&&(F.copyWaiting=!0)}),Z.addWindowListener(`keypress`,Vn,{capture:!0}),Z.addWindowListener(`pointermove`,t=>{if(!t.isPrimary)return;let n=t.pointerType===`touch`;if(u.setTouchMode(n),!e.P(t,`data-react-grab-ignore-events`)&&!Re()&&!(n&&!m()&&!_())){if((n?m():_())&&!C()&&y()&&!t.shiftKey&&!L()){if(A.consumeMouseHandoff()){Gn();return}u.unfreeze(),Q()}jn(t.clientX,t.clientY,t.shiftKey)}},{passive:!0}),Z.addWindowListener(`pointerdown`,t=>{if(t.button===0&&t.isPrimary&&(u.setTouchMode(t.pointerType===`touch`),Fe=!1,!e.P(t,`data-react-grab-ignore-events`))){if(D()){Sn(t.clientX,t.clientY)&&(Fe=!0,t.preventDefault(),t.stopImmediatePropagation());return}if(C()){let e=qt();e&&t.clientX>=e.x&&t.clientX<=e.x+e.width&&t.clientY>=e.y&&t.clientY<=e.y+e.height?gn():_n();return}if(A.isPendingDismiss()){t.preventDefault(),t.stopImmediatePropagation();return}if(S()){t.preventDefault(),t.stopImmediatePropagation();return}Mn(t.clientX,t.clientY,t.shiftKey)&&(t.pointerId!==void 0&&document.documentElement.setPointerCapture(t.pointerId),t.preventDefault(),t.stopImmediatePropagation())}},{capture:!0}),Z.addWindowListener(`pointerup`,t=>{if(t.button!==0||!t.isPrimary||e.P(t,`data-react-grab-ignore-events`)||D())return;let n=U()||S()||b(),r=t.metaKey||t.ctrlKey;zn(t.clientX,t.clientY,r,t.shiftKey),n&&(t.preventDefault(),t.stopImmediatePropagation())},{capture:!0}),Z.addWindowListener(`contextmenu`,n=>{if(!U()||x()||C()||E.isOpen())return;if(A.isPendingDismiss()){n.preventDefault(),n.stopPropagation();return}let r=e.P(n,`data-react-grab-ignore-events`),i={x:n.clientX,y:n.clientY},a=r&&l.frozenElements.length>1?In(i):null;if(r&&dt().length>0)Q();else if(r&&!a)return;if(D()){n.preventDefault();return}n.preventDefault(),n.stopPropagation();let o=a??t.l(n.clientX,n.clientY);if(!o)return;let s=l.frozenElements;s.length>1&&s.includes(o)?t.a(s):(t.a([o]),u.setFrozenElement(o)),u.setPointer(i),u.freeze(),On(o,i)},{capture:!0}),Z.addWindowListener(`pointercancel`,e=>{e.isPrimary&&Rn()}),Z.addWindowListener(`click`,t=>{if(!e.P(t,`data-react-grab-ignore-events`)){if(Fe){Fe=!1,t.preventDefault(),t.stopImmediatePropagation();return}D()||(U()||ie())&&(t.preventDefault(),t.stopImmediatePropagation(),l.wasActivatedByToggle&&!C()&&!t.shiftKey&&(m()?u.setWasActivatedByToggle(!1):Y()))}},{capture:!0}),Z.addDocumentListener(`visibilitychange`,()=>{if(document.hidden){u.clearGrabbedBoxes();let e=l.activationTimestamp;_()&&!C()&&e!==null&&Date.now()-e>500&&Y()}}),Z.addWindowListener(`blur`,()=>{Rn(),m()&&(Ue(),u.releaseHold(),We()),j()}),Z.addWindowListener(`focus`,()=>{Qe=Date.now()}),Z.addWindowListener(`focusin`,t=>{e.P(t,`data-react-grab`)&&t.stopPropagation()},{capture:!0});let cr=()=>{if(!(l.isTouchMode&&!m()&&!_())&&!Re()&&!y()&&!b()&&l.frozenElements.length===0){let e=t.l(d().x,d().y);u.setDetectedElement(e)}},lr=null,$=null,ur=()=>{Ae(),cr(),u.incrementViewportVersion(),u.updateContextMenuPosition()};Z.addWindowListener(`scroll`,ur,{capture:!0});let dr=window.innerWidth,fr=window.innerHeight;Z.addWindowListener(`resize`,()=>{let e=window.innerWidth,n=window.innerHeight;if(dr>0&&fr>0){let r=e/dr,i=n/fr,a=Math.abs(r-i)<t.It,o=Math.abs(r-1)>t.It;a&&o&&u.setPointer({x:d().x*r,y:d().y*i})}dr=e,fr=n,ur()});let pr=window.visualViewport;if(pr){let{signal:e}=Z;pr.addEventListener(`resize`,ur,{signal:e}),pr.addEventListener(`scroll`,ur,{signal:e})}let mr=()=>{$===null&&($=t._(()=>{$=null,u.incrementViewportVersion()}))};e.dt(()=>{if(s.store.theme.enabled&&(_()||x()||l.labelInstances.length>0||l.grabbedBoxes.length>0)){if(lr!==null)return;lr=window.setInterval(()=>{mr()},100);return}lr!==null&&(window.clearInterval(lr),lr=null),$!==null&&(t.g($),$=null)}),e.bt(()=>{lr!==null&&window.clearInterval(lr),$!==null&&t.g($)}),Z.addDocumentListener(`copy`,t=>{C()||e.P(t,`data-react-grab-ignore-events`)||U()&&t.preventDefault()},{capture:!0}),e.bt(()=>{Z.abort(),N!==null&&window.clearTimeout(N),P&&window.clearTimeout(P),tt(),O?.(),O=null,k?.(),k=null,gt.forEach(e=>window.clearTimeout(e)),gt.clear(),W.cancelAllFades(),H.stop(),document.body.style.userSelect=``,document.body.style.touchAction=``,fn(null),Bn.restore()});let{root:hr,host:gr}=ee(r);e.bt(me(gr).cleanup);let _r=e.ft(()=>s.store.theme.enabled),vr=e.ft(()=>s.store.theme.selectionBox.enabled),yr=e.ft(()=>s.store.theme.elementLabel.enabled),br=e.ft(()=>s.store.theme.dragBox.enabled),xr=e.ft(()=>ae()||ve()&&!y()||E.isInteracting()),Sr=e.ft(()=>nn().length>0),Cr=e.ft(()=>!_r()||!vr()||xr()?!1:Sr()?!0:Rt()),wr=e.ft(()=>{let e=Lt();if(e)return t.I(e)||void 0}),Tr=e.ft(()=>!_r()||D()||!yr()||xr()?!1:Rt()),Er=new Map,Dr=t=>{let n=t.elements?.filter(e.U)??[],r=t.element,i=null;n.length>0?i=n.map(h):r&&e.U(r)&&(i=[h(r)]);let a=t.bounds,o=t.boundsMultiple;i&&(a=i.length>1?Ne(Be(i)):i[0],t.boundsMultiple!==void 0&&(o=t.boundsMultiple.length>1&&t.boundsMultiple.length===t.elements?.length?i:[a]));let s=Er.get(t.id),c=s?.boundsMultiple,l=c===o||c!==void 0&&o!==void 0&&c.length===o.length&&c.every((e,t)=>e.x===o[t].x&&e.y===o[t].y&&e.width===o[t].width&&e.height===o[t].height);if(s&&s.status===t.status&&s.errorMessage===t.errorMessage&&s.bounds.x===a.x&&s.bounds.y===a.y&&s.bounds.width===a.width&&s.bounds.height===a.height&&l)return s;let u=a.x+a.width/2,d=a.width/2,f;f=t.mouseXOffsetRatio!==void 0&&d>0?u+t.mouseXOffsetRatio*d:t.mouseXOffsetFromCenter===void 0?t.mouseX??u:u+t.mouseXOffsetFromCenter;let p={...t,bounds:a,boundsMultiple:o,mouseX:f};return Er.set(t.id,p),p},Or=e.ft(()=>{if(!_r()||!s.store.theme.grabbedBoxes.enabled)return[];f();let e=new Set(l.labelInstances.map(e=>e.id));for(let t of Er.keys())e.has(t)||Er.delete(t);return l.labelInstances.map(Dr)}),kr=e.ft(()=>!_r()||!s.store.theme.grabbedBoxes.enabled?[]:(f(),l.grabbedBoxes.map(e=>!e.element||!document.body.contains(e.element)?e:{...e,bounds:h(e.element)}))),Ar=e.ft(()=>_r()&&br()&&U()&&Xt()),jr=e.ft(()=>x()?`processing`:`hover`),Mr=e.ft(()=>{if(!_r())return!1;let e=yr(),t=C(),n=x(),r=U(),i=b(),a=!!Ft(),o=ve(),s=y();return!e||t||o&&!s?!1:n?!0:r&&!i&&a}),Nr=e.ft(()=>{f();let e=l.contextMenuElement;return e?h(e):null}),Pr=e.ft(()=>(f(),l.contextMenuPosition)),Fr=e.ft(()=>{let e=l.contextMenuElement;if(!e)return;let n=l.frozenElements.length;return n>1?`${n} elements`:t.I(e)||void 0}),[Ir]=te(()=>l.frozenElements.length>1?null:l.contextMenuElement),[Lr]=e.mt(()=>l.contextMenuElement,async e=>e?n.c(e):null),Rr=async e=>{u.incrementSelectionInteractionLockDepth();try{return await e()}finally{u.decrementSelectionInteractionLockDepth()}},zr=(e,t,n,r,i)=>async a=>{await Rr(async()=>{let o=i?.fallbackBounds??null,s=i?.fallbackSelectionBounds??[],c=i?.position??l.contextMenuPosition??d(),f=Wt(),p=Nr()??o,m=t.length>1,h=m?Ne(Be(f)):p,g=l.wasActivatedByToggle,_;if(_=m?f:p?[p]:s,u.hideContextMenu(),h){let i=m?h.x+h.width/2:c.x,o=W.createInstance(h,n||`element`,r,`copying`,{element:e,mouseX:i,elements:m?t:void 0,boundsMultiple:_}),s=!1,l;try{s=await a(),s||(l=`Failed to copy`)}catch(e){l=_e(e,`Action failed`)}W.updateAfterCopy(o,s,l)}else try{await a()}catch{}g?Y():u.unfreeze()})},Br=()=>{setTimeout(()=>{u.hideContextMenu()},0)},Vr=e=>{let{element:t,filePath:n,lineNumber:r,tagName:i,componentName:a,position:o,performWithFeedbackOptions:c,shouldDeferHideContextMenu:d,onBeforeCopy:f,onBeforePrompt:p,customEnterPromptMode:m}=e,h=l.frozenElements.length>0?l.frozenElements:[t],g=d?Br:u.hideContextMenu,v={element:t,elements:h,filePath:n,lineNumber:r,componentName:a,tagName:i,enterPromptMode:m??(()=>{W.clearAll(),X(),p?.(),Ge(t,o.x,o.y),u.setPointer({x:o.x,y:o.y}),u.setFrozenElement(t),Ke(),_()||pn(),g()}),enterEditMode:()=>{xn(t,o,{filePath:n,lineNumber:r,componentName:a,tagName:i})&&X(),g()},copy:()=>{X(),f?.(),G({element:t,cursorX:o.x,selectedElements:h.length>1?h:void 0,shouldDeactivateAfter:l.wasActivatedByToggle}),g()},hooks:{transformHtmlContent:s.hooks.transformHtmlContent,onOpenFile:s.hooks.onOpenFile,transformOpenFileUrl:s.hooks.transformOpenFileUrl},performWithFeedback:zr(t,h,i,a,c),hideContextMenu:g,cleanup:()=>{l.wasActivatedByToggle?Y():u.unfreeze()}},y=s.hooks.transformActionContext(v);return{...v,...y}},Hr=e.ft(()=>{let e=l.contextMenuElement;if(!e)return;let t=Lr(),n=l.contextMenuPosition??d();return Vr({element:e,filePath:t?.filePath,lineNumber:t?.lineNumber??void 0,tagName:Fr(),componentName:Ir(),position:n,shouldDeferHideContextMenu:!0,onBeforeCopy:()=>{A.clear()},customEnterPromptMode:()=>{W.clearAll(),X(),u.clearInputText(),u.enterPromptMode(n,e),Br()}})}),Ur=()=>{setTimeout(()=>{u.hideContextMenu(),Y()},0)},Wr=()=>{if(!Ee)return null;let e=Ee.getBoundingClientRect(),t=zt(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}},Gr=()=>{let e=Wr();if(e)return e;let t=E.state();return t?{x:t.position.x,y:t.position.y,edge:`bottom`}:null},Kr=(e,n)=>{let r=null,i=()=>{let a=e();a&&n(a),r=t._(i)};return i(),()=>{r!==null&&(t.g(r),r=null)}},qr=()=>{O?.(),O=null,xe(null)},Jr=()=>{u.hideContextMenu(),qr(),E.dismiss()},Yr=()=>{be()===null?(u.hideContextMenu(),E.isOpen()&&E.closePreservingRenderer(),O?.(),O=Kr(Wr,xe)):qr()},Xr=e=>{He({defaultAction:e})},Zr=t=>{let n=l.labelInstances.find(e=>e.id===t);if(!n?.element||!e.U(n.element))return;let r=n.element,i=g(h(r)),a={x:n.mouseX??i.x,y:i.y},o=n.elements&&n.elements.length>0?n.elements.filter(t=>e.U(t)):[r];setTimeout(()=>{qr(),E.isOpen()&&E.closePreservingRenderer(),_()||(u.setWasActivatedByToggle(!0),pn()),u.setPointer(a),u.setFrozenElements(o),o.length>1&&n.bounds&&u.setFrozenDragRect(Me(n.bounds)),u.freeze(),u.showContextMenu(a,r)},0)};e.dt(()=>{let e=s.store.theme.hue;e===0?hr.style.filter=``:hr.style.filter=`hue-rotate(${e}deg)`}),s.store.theme.enabled&&Promise.resolve().then(()=>require(`./renderer-BI36o6Yw.cjs`)).then(({ReactGrabRenderer:t})=>{a||(o=e.X(()=>e.lt(t,{get selectionVisible(){return Cr()},get selectionBounds(){return qt()},get selectionBoundsMultiple(){return rn()},get selectionShouldSnap(){return l.frozenElements.length>0||nn().length>0},get selectionElementsCount(){return l.frozenElements.length},get frozenLabelEntries(){return on()},get pendingShiftPreviewEntry(){return sn()??void 0},get selectionFilePath(){return l.selectionFilePath??void 0},get selectionLineNumber(){return l.selectionLineNumber??void 0},get selectionTagName(){return wr()},get selectionComponentName(){return ct()},get selectionLabelVisible(){return Tr()},selectionLabelStatus:`idle`,get selectionArrowNavigationState(){return ir()},onArrowNavigationSelect:Wn,get labelInstances(){return Or()},get dragVisible(){return Ar()},get dragBounds(){return tn()},get grabbedBoxes(){return kr()},get mouseX(){return e.Y(()=>l.frozenElements.length>1)()?void 0:ln()??cn().x},get isFrozen(){return y()||_()||ve()},get inputValue(){return l.inputText},get isPromptMode(){return C()},onShowContextMenuInstance:Zr,get onLabelInstanceHoverChange(){return W.handleHoverChange},get onInputChange(){return u.setInputText},onInputSubmit:()=>void gn(),onToggleExpand:bn,get selectionLabelShakeCount(){return fe()},onConfirmDismiss:vn,get discardPrompt(){return e.Y(()=>!!A.isPendingDismiss())()?{isKeyboardSelection:!0,onConfirm:vn,onCopy:qn}:se()?{onConfirm:vn,onCancel:yn}:void 0},get toolbarVisible(){return s.store.theme.toolbar.enabled},get isActive(){return _()},onToggleActive:En,onActivateAction:Tn,get activeActionId(){return ut()},get enabled(){return w()},get shakeCount(){return ue()},onToolbarStateChange:e=>{he(e),e.enabled!==w()&&(le(e.enabled),e.enabled||(mn(),Jr())),q.forEach(t=>t(e))},onSubscribeToToolbarStateChanges:e=>(q.add(e),()=>{q.delete(e)}),onToolbarSelectHoverChange:ye,onToolbarRef:e=>{Ee=e},get contextMenuPosition(){return Pr()},get contextMenuBounds(){return Nr()},get contextMenuTagName(){return Fr()},get contextMenuComponentName(){return Ir()},get contextMenuHasFilePath(){return!!Lr()?.filePath},get actions(){return s.store.actions},get actionContext(){return Hr()},onContextMenuDismiss:Ur,onContextMenuHide:Br,get toolbarMenuPosition(){return be()},get toolbarMenuActions(){return s.store.actions.filter(e=>e.showInToolbarMenu===!0)},get defaultActionId(){return T()?.defaultAction??`copy`},onSetDefaultAction:Xr,onToggleToolbarMenu:Yr,onToolbarMenuDismiss:qr,get editPanelState(){return E.state()},get editPanelPosition(){return Se()},get onEditPanelDismiss(){return E.dismiss},get onEditPanelSubmit(){return E.submit},get onEditPanelPendingEditsChange(){return E.setPendingEdits},get onEditPanelInteractingChange(){return E.setInteracting}}),hr))}).catch(e=>{console.warn(`[react-grab] Failed to load renderer:`,e)});let Qr={activate:()=>{u.setPendingCommentMode(!1),!_()&&w()&&hn()},deactivate:()=>{(_()||x())&&Y()},toggle:()=>{_()?Y():w()&&hn()},comment:An,isActive:()=>_(),isEnabled:()=>w(),setEnabled:e=>{e!==w()&&(le(e),He({enabled:e,collapsed:!e}),e||(mn(),Jr()))},getToolbarState:()=>e.r(),setToolbarState:t=>{let n=e.r(),r=t.collapsed??n?.collapsed??!1,i={edge:t.edge??n?.edge??`bottom`,ratio:t.ratio??n?.ratio??.5,collapsed:r,enabled:t.enabled??!r,defaultAction:t.defaultAction??n?.defaultAction??`copy`};e.i(i),he(i),i.enabled!==w()&&(le(i.enabled),i.enabled||(mn(),Jr())),q.forEach(e=>e(i))},onToolbarStateChange:e=>(q.add(e),()=>{q.delete(e)}),dispose:()=>{a=!0,Ut=!1,o?.(),O?.(),O=null,k?.(),k=null,q.clear(),i()},copyElement:async e=>{let t=Array.isArray(e)?e:[e];return t.length===0?!1:await Ct(t)},getSource:async e=>{let t=await n.c(e);return t?{filePath:t.filePath,lineNumber:t.lineNumber,componentName:t.componentName}:null},getStackContext:e=>n.s(e,{maxLines:s.store.options.maxContextLines}),getState:()=>({isActive:_(),isDragging:b(),isCopying:x(),isPromptMode:C(),isSelectionBoxVisible:!!Cr(),isDragBoxVisible:!!Ar(),targetElement:K(),dragBounds:tn()??null,grabbedBoxes:[...un()],labelInstances:[...dn()],selectionFilePath:l.selectionFilePath,toolbarState:T()}),setOptions:e=>{s.setOptions(e)},registerPlugin:e=>{s.register(e,Qr)},unregisterPlugin:e=>{s.unregister(e)},getPlugins:()=>s.getPluginNames(),getDisplayName:n.r};for(let e of Ht)s.register(e,Qr);return setTimeout(()=>{t.b(!0)},t.mt),Qr})};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return yt}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return It}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return Vt}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return Rt}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return Wt}});
@@ -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-BjpjTrQp.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.Pt,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-D6aehaiC.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.Pt,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=>e.key===`Enter`,en=e=>e.metaKey||e.ctrlKey,tn=(e,t,n={})=>{if(!t.key)return null;if($t(t))return e.find(e=>e.shortcut===`Enter`)??null;if(t.repeat)return null;let r=t.key.toLowerCase();return en(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},nn=()=>{let e=!1;return{arm:()=>{e=!0},clear:()=>{e=!1},consume:()=>e?(e=!1,!0):!1}};Object.defineProperty(exports,`$`,{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return pt}}),Object.defineProperty(exports,`B`,{enumerable:!0,get:function(){return Je}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return Ct}}),Object.defineProperty(exports,`Ct`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return bt}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return-512}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return ut}}),Object.defineProperty(exports,`G`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`H`,{enumerable:!0,get:function(){return qe}}),Object.defineProperty(exports,`I`,{enumerable:!0,get:function(){return ct}}),Object.defineProperty(exports,`J`,{enumerable:!0,get:function(){return Re}}),Object.defineProperty(exports,`K`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`L`,{enumerable:!0,get:function(){return st}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return-9999}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return St}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return 384}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return dt}}),Object.defineProperty(exports,`Q`,{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,`R`,{enumerable:!0,get:function(){return Qe}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return ft}}),Object.defineProperty(exports,`St`,{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return vt}}),Object.defineProperty(exports,`U`,{enumerable:!0,get:function(){return We}}),Object.defineProperty(exports,`V`,{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(exports,`W`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`X`,{enumerable:!0,get:function(){return je}}),Object.defineProperty(exports,`Y`,{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,`Z`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return yt}}),Object.defineProperty(exports,`_t`,{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return Jt}}),Object.defineProperty(exports,`at`,{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return xt}}),Object.defineProperty(exports,`bt`,{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return Ht}}),Object.defineProperty(exports,`ct`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,`dt`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`et`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`ft`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(exports,`gt`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return Ot}}),Object.defineProperty(exports,`ht`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return Qt}}),Object.defineProperty(exports,`it`,{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return 9999}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return qt}}),Object.defineProperty(exports,`lt`,{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return Et}}),Object.defineProperty(exports,`mt`,{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return tn}}),Object.defineProperty(exports,`nt`,{enumerable:!0,get:function(){return Le}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return Yt}}),Object.defineProperty(exports,`ot`,{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,`pt`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`q`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return Zt}}),Object.defineProperty(exports,`rt`,{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Bt}}),Object.defineProperty(exports,`st`,{enumerable:!0,get:function(){return _e}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return nn}}),Object.defineProperty(exports,`tt`,{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return Kt}}),Object.defineProperty(exports,`ut`,{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`vt`,{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return-128}}),Object.defineProperty(exports,`wt`,{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return wt}}),Object.defineProperty(exports,`xt`,{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return Tt}}),Object.defineProperty(exports,`yt`,{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,`z`,{enumerable:!0,get:function(){return Xe}});