@ragrails/api-playground-react 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,26 +1,14 @@
1
- const __RAGRAILS_API_PLAYGROUND_CSS__="/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */\n@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-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--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-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}:root,:host{--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-green-500:oklch(72.3% .219 149.579);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--font-weight-medium:500;--font-weight-semibold:600;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--font-heading:system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.top-2{top:calc(var(--spacing) * 2)}.top-5{top:calc(var(--spacing) * 5)}.top-full{top:100%}.right-2{right:calc(var(--spacing) * 2)}.right-5{right:calc(var(--spacing) * 5)}.-bottom-px{bottom:-1px}.left-0{left:0}.isolate{isolation:isolate}.-z-10{z-index:calc(10 * -1)}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mt-1{margin-top:var(--spacing)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mr-4{margin-right:calc(var(--spacing) * 4)}.mb-1{margin-bottom:var(--spacing)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1\\.5{margin-left:calc(var(--spacing) * 1.5)}.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}.\\[field-sizing\\:content\\]{field-sizing:content}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-full{height:100%}.min-h-0{min-height:0}.min-h-10{min-height:calc(var(--spacing) * 10)}.w-3{width:calc(var(--spacing) * 3)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-11{width:calc(var(--spacing) * 11)}.w-full{width:100%}.w-max{width:max-content}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-28{min-width:calc(var(--spacing) * 28)}.min-w-\\[7rem\\]{min-width:7rem}.min-w-full{min-width:100%}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1{--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-6{--tw-translate-x:calc(var(--spacing) * 6);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-180{rotate:180deg}.-skew-x-12{--tw-skew-x:skewX(calc(12deg * -1));transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\\[shimmer_2s_linear_infinite\\]{animation:2s linear infinite shimmer}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.grid-cols-\\[auto_1fr_auto\\]{grid-template-columns:auto 1fr auto}.\\[grid-template-rows\\:1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\\[\\#52b788\\]\\/25{border-color:oklab(70.6413% -.111726 .0387149/.25)}.border-\\[\\#FC7070\\]\\/20{border-color:oklab(71.4755% .158854 .0655041/.2)}.border-amber-500\\/30{border-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.border-amber-500\\/30{border-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.border-border{border-color:var(--border)}.border-current{border-color:currentColor}.border-primary,.border-primary\\/30{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.border-primary\\/30{border-color:color-mix(in oklab, var(--primary) 30%, transparent)}}.border-red-500{border-color:var(--color-red-500)}.border-red-500\\/60{border-color:#fb2c3699}@supports (color:color-mix(in lab, red, red)){.border-red-500\\/60{border-color:color-mix(in oklab, var(--color-red-500) 60%, transparent)}}.border-sky-500\\/30{border-color:#00a5ef4d}@supports (color:color-mix(in lab, red, red)){.border-sky-500\\/30{border-color:color-mix(in oklab, var(--color-sky-500) 30%, transparent)}}.border-transparent{border-color:#0000}.border-t-primary{border-top-color:var(--primary)}.border-t-transparent{border-top-color:#0000}.bg-\\[\\#4A0F0F\\]{background-color:#4a0f0f}.bg-\\[\\#52b788\\]\\/15{background-color:oklab(70.6413% -.111726 .0387149/.15)}.bg-\\[\\#EF5350\\]{background-color:#ef5350}.bg-amber-500\\/15{background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\\/15{background-color:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.bg-bg{background-color:var(--bg)}.bg-primary{background-color:var(--primary)}.bg-primary-soft{background-color:var(--primary-soft)}.bg-sky-500\\/15{background-color:#00a5ef26}@supports (color:color-mix(in lab, red, red)){.bg-sky-500\\/15{background-color:color-mix(in oklab, var(--color-sky-500) 15%, transparent)}}.bg-surface{background-color:var(--surface)}.bg-surface-2{background-color:var(--surface-2)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-muted{--tw-gradient-from:var(--text-muted);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-content{--tw-gradient-via:var(--text);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\\/5{--tw-gradient-via:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.via-white\\/5{--tw-gradient-via:color-mix(in oklab, var(--color-white) 5%, transparent)}}.via-white\\/5{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\\/10{--tw-gradient-via:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.via-white\\/10{--tw-gradient-via:color-mix(in oklab, var(--color-white) 10%, transparent)}}.via-white\\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\\/25{--tw-gradient-via:#ffffff40}@supports (color:color-mix(in lab, red, red)){.via-white\\/25{--tw-gradient-via:color-mix(in oklab, var(--color-white) 25%, transparent)}}.via-white\\/25{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-muted{--tw-gradient-to:var(--text-muted);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-\\[length\\:200\\%_100\\%\\]{background-size:200% 100%}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.px-0\\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:var(--spacing)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-7{padding-inline:calc(var(--spacing) * 7)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.pr-28{padding-right:calc(var(--spacing) * 28)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-heading{font-family:var(--font-heading)}.font-mono{font-family:var(--font-mono)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.text-\\[14px\\]{font-size:14px}.text-\\[16px\\]{font-size:16px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-\\[550\\]{--tw-font-weight:550;font-weight:550}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.whitespace-pre{white-space:pre}.text-\\[\\#52b788\\]{color:#52b788}.text-\\[\\#FC7070\\]{color:#fc7070}.text-amber-400{color:var(--color-amber-400)}.text-amber-500{color:var(--color-amber-500)}.text-content{color:var(--text)}.text-green-500{color:var(--color-green-500)}.text-muted,.text-muted\\/60{color:var(--text-muted)}@supports (color:color-mix(in lab, red, red)){.text-muted\\/60{color:color-mix(in oklab, var(--text-muted) 60%, transparent)}}.text-primary{color:var(--primary)}.text-primary-contrast{color:var(--primary-contrast)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-sky-400{color:var(--color-sky-400)}.text-transparent{color:#0000}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.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,)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-70{opacity:.7}.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)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px 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)}.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-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-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-0{--tw-duration:0s;transition-duration:0s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.group-hover\\:translate-x-full:is(:where(.group):hover *){--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\\:\\[animation\\:text-shimmer_1\\.2s_linear_1_forwards\\]:is(:where(.group):hover *){animation:1.2s linear forwards text-shimmer}.group-hover\\:text-transparent:is(:where(.group):hover *){color:#0000}.group-hover\\:duration-\\[1200ms\\]:is(:where(.group):hover *){--tw-duration:1.2s;transition-duration:1.2s}.group-hover\\/seg\\:\\[animation\\:text-shimmer_1\\.2s_linear_1_forwards\\]:is(:where(.group\\/seg):hover *){animation:1.2s linear forwards text-shimmer}.group-hover\\/seg\\:text-transparent:is(:where(.group\\/seg):hover *){color:#0000}}.group-disabled\\:hidden:is(:where(.group):disabled *){display:none}.placeholder\\:text-muted::placeholder,.placeholder\\:text-muted\\/50::placeholder{color:var(--text-muted)}@supports (color:color-mix(in lab, red, red)){.placeholder\\:text-muted\\/50::placeholder{color:color-mix(in oklab, var(--text-muted) 50%, transparent)}}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.read-only\\:cursor-default:read-only{cursor:default}.focus-within\\:border-primary:focus-within,.focus-within\\:border-primary\\/60:focus-within{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:border-primary\\/60:focus-within{border-color:color-mix(in oklab, var(--primary) 60%, transparent)}}.focus-within\\:border-primary\\/70:focus-within{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:border-primary\\/70:focus-within{border-color:color-mix(in oklab, var(--primary) 70%, transparent)}}.focus-within\\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + 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)}.focus-within\\:ring-primary\\/15:focus-within{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:ring-primary\\/15:focus-within{--tw-ring-color:color-mix(in oklab, var(--primary) 15%, transparent)}}.focus-within\\:ring-primary\\/20:focus-within{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:ring-primary\\/20:focus-within{--tw-ring-color:color-mix(in oklab, var(--primary) 20%, transparent)}}@media (hover:hover){.hover\\:border-primary\\/70:hover{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\\:border-primary\\/70:hover{border-color:color-mix(in oklab, var(--primary) 70%, transparent)}}.hover\\:bg-\\[\\#e53935\\]:hover{background-color:#e53935}.hover\\:bg-border:hover{background-color:var(--border)}.hover\\:bg-primary-hover:hover{background-color:var(--primary-hover)}.hover\\:bg-surface-2:hover{background-color:var(--surface-2)}.hover\\:text-content:hover{color:var(--text)}.hover\\:text-primary-hover:hover{color:var(--primary-hover)}}.focus\\:border-primary\\/60:focus{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus\\:border-primary\\/60:focus{border-color:color-mix(in oklab, var(--primary) 60%, transparent)}}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + 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)}.focus\\:ring-primary\\/20:focus{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus\\:ring-primary\\/20:focus{--tw-ring-color:color-mix(in oklab, var(--primary) 20%, transparent)}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + 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)}.focus-visible\\:ring-primary\\/60:focus-visible{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-visible\\:ring-primary\\/60:focus-visible{--tw-ring-color:color-mix(in oklab, var(--primary) 60%, transparent)}}.active\\:scale-105:active{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:opacity-60:disabled{opacity:.6}@media (prefers-reduced-motion:no-preference){.motion-safe\\:animate-\\[dropdown-expand_0\\.2s_ease-out\\]{animation:.2s ease-out dropdown-expand}.motion-safe\\:animate-\\[dropdown-expand_0\\.18s_ease-in_reverse_forwards\\]{animation:.18s ease-in reverse forwards dropdown-expand}.motion-safe\\:animate-\\[fade-in_0\\.6s_ease-out_both\\]{animation:.6s ease-out both fade-in}.motion-safe\\:animate-\\[widget-slide-in_180ms_ease-out\\]{animation:.18s ease-out widget-slide-in}}@media (prefers-reduced-motion:reduce){.motion-reduce\\:active\\:scale-100:active{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}}@media (min-width:40rem){.sm\\:inline{display:inline}}@media (min-width:48rem){.md\\:col-start-auto{grid-column-start:auto}.md\\:row-span-1{grid-row:span 1/span 1}.md\\:inline{display:inline}.md\\:grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr auto}.md\\:grid-cols-\\[auto_1fr\\]{grid-template-columns:auto 1fr}.md\\:grid-cols-\\[auto_1fr_1fr_auto\\]{grid-template-columns:auto 1fr 1fr auto}.md\\:grid-cols-\\[minmax\\(0\\,0\\.7fr\\)_minmax\\(0\\,1fr\\)\\]{grid-template-columns:minmax(0,.7fr) minmax(0,1fr)}}.\\[\\&_button\\]\\:text-\\[14px\\] button{font-size:14px}[data-theme=light]{--bg:#f2f4f7;--surface:#fff;--surface-2:#e7ebf3;--border:#d2d7df;--text:#0f1216;--text-muted:#4b5563;--primary:#7855ff;--primary-contrast:#fff}[data-theme=dark]{--bg:#16171d;--surface:#1f2028;--surface-2:#2a2c36;--border:#2e303a;--text:#f3f4f6;--text-muted:#9ca3af;--primary:#7855ff;--primary-contrast:#fff}[data-theme]{--primary-hover:var(--primary)}@supports (color:color-mix(in lab, red, red)){[data-theme]{--primary-hover:color-mix(in srgb, var(--primary) 86%, #000)}}[data-theme]{--primary-soft:var(--primary)}@supports (color:color-mix(in lab, red, red)){[data-theme]{--primary-soft:color-mix(in srgb, var(--primary) 16%, transparent)}}@keyframes shimmer{to{transform:translate(100%)}}@keyframes text-shimmer{0%{background-position:200%}to{background-position:-200%}}@keyframes dropdown-expand{0%{opacity:0;grid-template-rows:0fr}to{opacity:1;grid-template-rows:1fr}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes widget-slide-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:var(--text-muted);font-style:italic}.token.punctuation{color:var(--text-muted)}.token.property,.token.tag,.token.symbol,.token.deleted{color:#7aa2f7}.token.number{color:#e5c07b}.token.boolean,.token.null,.token.keyword,.token.atrule,.token.important{color:var(--primary)}.token.string,.token.char,.token.attr-name,.token.attr-value,.token.regex,.token.inserted,.token.selector{color:#9ece6a}.token.operator,.token.entity,.token.url,.token.variable{color:var(--text)}.token.function,.token.class-name{color:#61afef}.token.builtin{color:#56b6c2}[data-theme=light] .token.property,[data-theme=light] .token.tag,[data-theme=light] .token.symbol,[data-theme=light] .token.deleted{color:#0550ae}[data-theme=light] .token.number{color:#953800}[data-theme=light] .token.string,[data-theme=light] .token.char,[data-theme=light] .token.attr-name,[data-theme=light] .token.attr-value,[data-theme=light] .token.regex,[data-theme=light] .token.inserted,[data-theme=light] .token.selector{color:#116329}[data-theme=light] .token.function,[data-theme=light] .token.class-name{color:#1f6feb}[data-theme=light] .token.builtin{color:#0e7490}@layer base{[data-theme] button:not(:disabled),[data-theme] [role=button]:not([aria-disabled=true]){cursor:pointer}}@property --tw-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\"*\";inherits:false;initial-value:0}@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-space-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:\"*\";inherits:false}@property --tw-gradient-from{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:\"*\";inherits:false}@property --tw-gradient-via-stops{syntax:\"*\";inherits:false}@property --tw-gradient-from-position{syntax:\"<length-percentage>\";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:\"<length-percentage>\";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:\"<length-percentage>\";inherits:false;initial-value:100%}@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-duration{syntax:\"*\";inherits:false}@property --tw-ease{syntax:\"*\";inherits:false}@property --tw-scale-x{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-y{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-z{syntax:\"*\";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}";
1
+ const __RAGRAILS_API_PLAYGROUND_CSS__="/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */\n@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-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--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-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}:root,:host{--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-green-500:oklch(72.3% .219 149.579);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--font-weight-medium:500;--font-weight-semibold:600;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--font-heading:system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.top-2{top:calc(var(--spacing) * 2)}.top-5{top:calc(var(--spacing) * 5)}.top-full{top:100%}.right-2{right:calc(var(--spacing) * 2)}.right-5{right:calc(var(--spacing) * 5)}.-bottom-px{bottom:-1px}.left-0{left:0}.isolate{isolation:isolate}.-z-10{z-index:calc(10 * -1)}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mt-1{margin-top:var(--spacing)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mr-4{margin-right:calc(var(--spacing) * 4)}.mb-1{margin-bottom:var(--spacing)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1\\.5{margin-left:calc(var(--spacing) * 1.5)}.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}.\\[field-sizing\\:content\\]{field-sizing:content}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-full{height:100%}.min-h-0{min-height:0}.min-h-10{min-height:calc(var(--spacing) * 10)}.w-3{width:calc(var(--spacing) * 3)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-11{width:calc(var(--spacing) * 11)}.w-full{width:100%}.w-max{width:max-content}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-28{min-width:calc(var(--spacing) * 28)}.min-w-\\[7rem\\]{min-width:7rem}.min-w-full{min-width:100%}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1{--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-6{--tw-translate-x:calc(var(--spacing) * 6);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-180{rotate:180deg}.-skew-x-12{--tw-skew-x:skewX(calc(12deg * -1));transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\\[shimmer_2s_linear_infinite\\]{animation:2s linear infinite shimmer}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.grid-cols-\\[auto_1fr_auto\\]{grid-template-columns:auto 1fr auto}.\\[grid-template-rows\\:1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\\[\\#52b788\\]\\/25{border-color:oklab(70.6413% -.111726 .0387149/.25)}.border-\\[\\#FC7070\\]\\/20{border-color:oklab(71.4755% .158854 .0655041/.2)}.border-amber-500\\/30{border-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.border-amber-500\\/30{border-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.border-border{border-color:var(--border)}.border-current{border-color:currentColor}.border-primary,.border-primary\\/30{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.border-primary\\/30{border-color:color-mix(in oklab, var(--primary) 30%, transparent)}}.border-red-500{border-color:var(--color-red-500)}.border-red-500\\/60{border-color:#fb2c3699}@supports (color:color-mix(in lab, red, red)){.border-red-500\\/60{border-color:color-mix(in oklab, var(--color-red-500) 60%, transparent)}}.border-sky-500\\/30{border-color:#00a5ef4d}@supports (color:color-mix(in lab, red, red)){.border-sky-500\\/30{border-color:color-mix(in oklab, var(--color-sky-500) 30%, transparent)}}.border-transparent{border-color:#0000}.border-t-primary{border-top-color:var(--primary)}.border-t-transparent{border-top-color:#0000}.bg-\\[\\#4A0F0F\\]{background-color:#4a0f0f}.bg-\\[\\#52b788\\]\\/15{background-color:oklab(70.6413% -.111726 .0387149/.15)}.bg-\\[\\#EF5350\\]{background-color:#ef5350}.bg-amber-500\\/15{background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\\/15{background-color:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.bg-primary{background-color:var(--primary)}.bg-primary-soft{background-color:var(--primary-soft)}.bg-sky-500\\/15{background-color:#00a5ef26}@supports (color:color-mix(in lab, red, red)){.bg-sky-500\\/15{background-color:color-mix(in oklab, var(--color-sky-500) 15%, transparent)}}.bg-surface{background-color:var(--surface)}.bg-surface-2{background-color:var(--surface-2)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-muted{--tw-gradient-from:var(--text-muted);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-content{--tw-gradient-via:var(--text);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\\/5{--tw-gradient-via:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.via-white\\/5{--tw-gradient-via:color-mix(in oklab, var(--color-white) 5%, transparent)}}.via-white\\/5{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\\/10{--tw-gradient-via:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.via-white\\/10{--tw-gradient-via:color-mix(in oklab, var(--color-white) 10%, transparent)}}.via-white\\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\\/25{--tw-gradient-via:#ffffff40}@supports (color:color-mix(in lab, red, red)){.via-white\\/25{--tw-gradient-via:color-mix(in oklab, var(--color-white) 25%, transparent)}}.via-white\\/25{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-muted{--tw-gradient-to:var(--text-muted);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-\\[length\\:200\\%_100\\%\\]{background-size:200% 100%}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.px-0\\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:var(--spacing)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-7{padding-inline:calc(var(--spacing) * 7)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.pr-28{padding-right:calc(var(--spacing) * 28)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-heading{font-family:var(--font-heading)}.font-mono{font-family:var(--font-mono)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.text-\\[14px\\]{font-size:14px}.text-\\[16px\\]{font-size:16px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-\\[550\\]{--tw-font-weight:550;font-weight:550}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.whitespace-pre{white-space:pre}.text-\\[\\#52b788\\]{color:#52b788}.text-\\[\\#FC7070\\]{color:#fc7070}.text-amber-400{color:var(--color-amber-400)}.text-amber-500{color:var(--color-amber-500)}.text-content{color:var(--text)}.text-green-500{color:var(--color-green-500)}.text-muted,.text-muted\\/45{color:var(--text-muted)}@supports (color:color-mix(in lab, red, red)){.text-muted\\/45{color:color-mix(in oklab, var(--text-muted) 45%, transparent)}}.text-muted\\/60{color:var(--text-muted)}@supports (color:color-mix(in lab, red, red)){.text-muted\\/60{color:color-mix(in oklab, var(--text-muted) 60%, transparent)}}.text-primary{color:var(--primary)}.text-primary-contrast{color:var(--primary-contrast)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-sky-400{color:var(--color-sky-400)}.text-transparent{color:#0000}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.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,)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-70{opacity:.7}.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)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px 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)}.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-\\[height\\]{transition-property:height;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-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-0{--tw-duration:0s;transition-duration:0s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-\\[240ms\\]{--tw-duration:.24s;transition-duration:.24s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.group-hover\\:translate-x-full:is(:where(.group):hover *){--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\\:\\[animation\\:text-shimmer_1\\.2s_linear_1_forwards\\]:is(:where(.group):hover *){animation:1.2s linear forwards text-shimmer}.group-hover\\:text-transparent:is(:where(.group):hover *){color:#0000}.group-hover\\:duration-\\[1200ms\\]:is(:where(.group):hover *){--tw-duration:1.2s;transition-duration:1.2s}.group-hover\\/seg\\:\\[animation\\:text-shimmer_1\\.2s_linear_1_forwards\\]:is(:where(.group\\/seg):hover *){animation:1.2s linear forwards text-shimmer}.group-hover\\/seg\\:text-transparent:is(:where(.group\\/seg):hover *){color:#0000}}.group-disabled\\:hidden:is(:where(.group):disabled *){display:none}.placeholder\\:text-muted::placeholder,.placeholder\\:text-muted\\/50::placeholder{color:var(--text-muted)}@supports (color:color-mix(in lab, red, red)){.placeholder\\:text-muted\\/50::placeholder{color:color-mix(in oklab, var(--text-muted) 50%, transparent)}}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.read-only\\:cursor-default:read-only{cursor:default}.focus-within\\:border-primary:focus-within,.focus-within\\:border-primary\\/60:focus-within{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:border-primary\\/60:focus-within{border-color:color-mix(in oklab, var(--primary) 60%, transparent)}}.focus-within\\:border-primary\\/70:focus-within{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:border-primary\\/70:focus-within{border-color:color-mix(in oklab, var(--primary) 70%, transparent)}}.focus-within\\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + 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)}.focus-within\\:ring-primary\\/15:focus-within{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:ring-primary\\/15:focus-within{--tw-ring-color:color-mix(in oklab, var(--primary) 15%, transparent)}}.focus-within\\:ring-primary\\/20:focus-within{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:ring-primary\\/20:focus-within{--tw-ring-color:color-mix(in oklab, var(--primary) 20%, transparent)}}@media (hover:hover){.hover\\:border-primary\\/70:hover{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\\:border-primary\\/70:hover{border-color:color-mix(in oklab, var(--primary) 70%, transparent)}}.hover\\:bg-\\[\\#e53935\\]:hover{background-color:#e53935}.hover\\:bg-border:hover{background-color:var(--border)}.hover\\:bg-primary-hover:hover{background-color:var(--primary-hover)}.hover\\:bg-surface-2:hover{background-color:var(--surface-2)}.hover\\:text-content:hover{color:var(--text)}.hover\\:text-muted:hover{color:var(--text-muted)}.hover\\:text-primary-hover:hover{color:var(--primary-hover)}}.focus\\:border-primary\\/60:focus{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus\\:border-primary\\/60:focus{border-color:color-mix(in oklab, var(--primary) 60%, transparent)}}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + 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)}.focus\\:ring-primary\\/20:focus{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus\\:ring-primary\\/20:focus{--tw-ring-color:color-mix(in oklab, var(--primary) 20%, transparent)}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + 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)}.focus-visible\\:ring-primary\\/60:focus-visible{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-visible\\:ring-primary\\/60:focus-visible{--tw-ring-color:color-mix(in oklab, var(--primary) 60%, transparent)}}.active\\:scale-105:active{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:opacity-60:disabled{opacity:.6}@media (prefers-reduced-motion:no-preference){.motion-safe\\:animate-\\[dropdown-expand_0\\.2s_ease-out\\]{animation:.2s ease-out dropdown-expand}.motion-safe\\:animate-\\[dropdown-expand_0\\.18s_ease-in_reverse_forwards\\]{animation:.18s ease-in reverse forwards dropdown-expand}.motion-safe\\:animate-\\[fade-in_0\\.6s_ease-out_both\\]{animation:.6s ease-out both fade-in}.motion-safe\\:animate-\\[widget-slide-in_180ms_ease-out\\]{animation:.18s ease-out widget-slide-in}}@media (prefers-reduced-motion:reduce){.motion-reduce\\:active\\:scale-100:active{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}}@media (min-width:40rem){.sm\\:inline{display:inline}}@media (min-width:48rem){.md\\:col-start-auto{grid-column-start:auto}.md\\:row-span-1{grid-row:span 1/span 1}.md\\:inline{display:inline}.md\\:grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr auto}.md\\:grid-cols-\\[auto_1fr\\]{grid-template-columns:auto 1fr}.md\\:grid-cols-\\[auto_1fr_1fr_auto\\]{grid-template-columns:auto 1fr 1fr auto}.md\\:grid-cols-\\[minmax\\(0\\,0\\.7fr\\)_minmax\\(0\\,1fr\\)\\]{grid-template-columns:minmax(0,.7fr) minmax(0,1fr)}}.\\[\\&_button\\]\\:text-\\[14px\\] button{font-size:14px}[data-theme=light]{--bg:#f2f4f7;--surface:#fff;--surface-2:#e7ebf3;--border:#d2d7df;--text:#0f1216;--text-muted:#4b5563;--primary:#7855ff;--primary-contrast:#fff}[data-theme=dark]{--bg:#16171d;--surface:#1f2028;--surface-2:#2a2c36;--border:#2e303a;--text:#f3f4f6;--text-muted:#9ca3af;--primary:#7855ff;--primary-contrast:#fff}[data-theme]{--primary-hover:var(--primary)}@supports (color:color-mix(in lab, red, red)){[data-theme]{--primary-hover:color-mix(in srgb, var(--primary) 86%, #000)}}[data-theme]{--primary-soft:var(--primary)}@supports (color:color-mix(in lab, red, red)){[data-theme]{--primary-soft:color-mix(in srgb, var(--primary) 16%, transparent)}}@keyframes shimmer{to{transform:translate(100%)}}@keyframes text-shimmer{0%{background-position:200%}to{background-position:-200%}}@keyframes dropdown-expand{0%{opacity:0;grid-template-rows:0fr}to{opacity:1;grid-template-rows:1fr}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes widget-slide-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:var(--text-muted);font-style:italic}.token.punctuation{color:var(--text-muted)}.token.property,.token.tag,.token.symbol,.token.deleted{color:#7aa2f7}.token.number{color:#e5c07b}.token.boolean,.token.null,.token.keyword,.token.atrule,.token.important{color:var(--primary)}.token.string,.token.char,.token.attr-name,.token.attr-value,.token.regex,.token.inserted,.token.selector{color:#9ece6a}.token.operator,.token.entity,.token.url,.token.variable{color:var(--text)}.token.function,.token.class-name{color:#61afef}.token.builtin{color:#56b6c2}[data-theme=light] .token.property,[data-theme=light] .token.tag,[data-theme=light] .token.symbol,[data-theme=light] .token.deleted{color:#0550ae}[data-theme=light] .token.number{color:#953800}[data-theme=light] .token.string,[data-theme=light] .token.char,[data-theme=light] .token.attr-name,[data-theme=light] .token.attr-value,[data-theme=light] .token.regex,[data-theme=light] .token.inserted,[data-theme=light] .token.selector{color:#116329}[data-theme=light] .token.function,[data-theme=light] .token.class-name{color:#1f6feb}[data-theme=light] .token.builtin{color:#0e7490}@layer base{[data-theme] button:not(:disabled),[data-theme] [role=button]:not([aria-disabled=true]){cursor:pointer}}@property --tw-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\"*\";inherits:false;initial-value:0}@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-space-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:\"*\";inherits:false}@property --tw-gradient-from{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:\"*\";inherits:false}@property --tw-gradient-via-stops{syntax:\"*\";inherits:false}@property --tw-gradient-from-position{syntax:\"<length-percentage>\";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:\"<length-percentage>\";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:\"<length-percentage>\";inherits:false;initial-value:100%}@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-duration{syntax:\"*\";inherits:false}@property --tw-ease{syntax:\"*\";inherits:false}@property --tw-scale-x{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-y{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-z{syntax:\"*\";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}";
2
2
  if(typeof document!=="undefined"&&!document.getElementById("ragrails-api-playground-react-styles")){const style=document.createElement("style");style.id="ragrails-api-playground-react-styles";style.textContent=__RAGRAILS_API_PLAYGROUND_CSS__;(document.head||document.documentElement).appendChild(style);}
3
3
  import e, { useEffect as t, useId as n, useLayoutEffect as r, useMemo as i, useRef as a, useState as o } from "react";
4
4
  import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
5
- //#region \0rolldown/runtime.js
6
- var u = Object.create, d = Object.defineProperty, f = Object.getOwnPropertyDescriptor, p = Object.getOwnPropertyNames, m = Object.getPrototypeOf, h = Object.prototype.hasOwnProperty, g = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), _ = (e, t, n, r) => {
7
- if (t && typeof t == "object" || typeof t == "function") for (var i = p(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !h.call(e, s) && s !== n && d(e, s, {
8
- get: ((e) => t[e]).bind(null, s),
9
- enumerable: !(r = f(t, s)) || r.enumerable
10
- });
11
- return e;
12
- }, v = (e, t, n) => (n = e == null ? {} : u(m(e)), _(t || !e || !e.__esModule ? d(n, "default", {
13
- value: e,
14
- enumerable: !0
15
- }) : n, e));
16
- //#endregion
17
5
  //#region src/lib/cn.ts
18
- function y(...e) {
6
+ function u(...e) {
19
7
  return e.filter(Boolean).join(" ");
20
8
  }
21
9
  //#endregion
22
10
  //#region src/components/ui/Icon.tsx
23
- var b = {
11
+ var d = {
24
12
  copy: /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c("path", {
25
13
  fill: "currentColor",
26
14
  d: "M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593s1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.6 3.6 0 0 0 15.24 2"
@@ -210,61 +198,61 @@ var b = {
210
198
  fill: "currentColor",
211
199
  d: "M2.69 6.705a.75.75 0 0 0-1.38.59zm12.897 6.624l-.274-.698zm-6.546.409a.75.75 0 1 0-1.257-.818zm-2.67 1.353a.75.75 0 1 0 1.258.818zM22.69 7.295a.75.75 0 0 0-1.378-.59zM19 11.13l-.513-.547zm.97 2.03a.75.75 0 1 0 1.06-1.06zm-8.72 3.34a.75.75 0 0 0 1.5 0zm5.121-.591a.75.75 0 1 0 1.258-.818zm-10.84-4.25A.75.75 0 0 0 4.47 10.6zm-2.561.44a.75.75 0 0 0 1.06 1.06zM12 13.25c-3.224 0-5.539-1.605-7.075-3.26a13.6 13.6 0 0 1-1.702-2.28a12 12 0 0 1-.507-.946l-.022-.049l-.004-.01l-.001-.001L2 7l-.69.296h.001l.001.003l.003.006l.04.088q.039.088.117.243c.103.206.256.496.462.841c.41.69 1.035 1.61 1.891 2.533C5.54 12.855 8.224 14.75 12 14.75zm3.313-.62c-.97.383-2.071.62-3.313.62v1.5c1.438 0 2.725-.276 3.862-.723zm-7.529.29l-1.413 2.17l1.258.818l1.412-2.171zM22 7l-.69-.296h.001v.002l-.007.013l-.028.062a12 12 0 0 1-.64 1.162a13.3 13.3 0 0 1-2.15 2.639l1.027 1.094a14.8 14.8 0 0 0 3.122-4.26l.039-.085l.01-.024l.004-.007v-.003h.001v-.001zm-3.513 3.582c-.86.806-1.913 1.552-3.174 2.049l.549 1.396c1.473-.58 2.685-1.444 3.651-2.351zm-.017 1.077l1.5 1.5l1.06-1.06l-1.5-1.5zM11.25 14v2.5h1.5V14zm3.709-.262l1.412 2.171l1.258-.818l-1.413-2.171zm-10.49-3.14l-1.5 1.5L4.03 13.16l1.5-1.5z"
212
200
  })
213
- }, x = ({ name: e, size: t, className: n, ...r }) => /* @__PURE__ */ c("svg", {
201
+ }, f = ({ name: e, size: t, className: n, ...r }) => /* @__PURE__ */ c("svg", {
214
202
  xmlns: "http://www.w3.org/2000/svg",
215
203
  viewBox: "0 0 24 24",
216
204
  width: t ?? "1em",
217
205
  height: t ?? "1em",
218
- className: y("inline-block shrink-0", n),
206
+ className: u("inline-block shrink-0", n),
219
207
  "aria-hidden": r["aria-label"] ? void 0 : !0,
220
208
  ...r,
221
- children: b[e]
222
- }), S = {
209
+ children: d[e]
210
+ }), p = {
223
211
  primary: "bg-primary text-primary-contrast hover:bg-primary-hover",
224
212
  secondary: "bg-surface-2 text-content border border-border hover:bg-border",
225
213
  ghost: "bg-transparent text-muted hover:text-content",
226
214
  danger: "bg-[#EF5350] text-white hover:bg-[#e53935]"
227
- }, C = {
215
+ }, m = {
228
216
  sm: "text-[12px] px-3 py-1.5",
229
217
  md: "text-[14px] px-4 py-2",
230
218
  lg: "text-[16px] px-5 py-2.5"
231
- }, w = {
219
+ }, h = {
232
220
  sm: "gap-1.5",
233
221
  md: "gap-2",
234
222
  lg: "gap-2"
235
- }, T = ({ variant: e = "primary", size: t = "md", isLoading: n = !1, leftIcon: r, rightIcon: i, className: a, children: o, disabled: s, ...u }) => /* @__PURE__ */ l("button", {
236
- className: y("group relative isolate overflow-hidden rounded-lg font-heading font-medium", "inline-flex items-center justify-center", "transition duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60", "active:scale-105 motion-reduce:active:scale-100", "disabled:opacity-50 disabled:cursor-not-allowed", S[e], C[t], a),
223
+ }, g = ({ variant: e = "primary", size: t = "md", isLoading: n = !1, leftIcon: r, rightIcon: i, className: a, children: o, disabled: s, ...d }) => /* @__PURE__ */ l("button", {
224
+ className: u("group relative isolate overflow-hidden rounded-lg font-heading font-medium", "inline-flex items-center justify-center", "transition duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60", "active:scale-105 motion-reduce:active:scale-100", "disabled:opacity-50 disabled:cursor-not-allowed", p[e], m[t], a),
237
225
  disabled: s || n,
238
- ...u,
226
+ ...d,
239
227
  children: [e !== "ghost" && /* @__PURE__ */ c("span", {
240
228
  "aria-hidden": "true",
241
- className: y("pointer-events-none absolute inset-0 -z-10 -translate-x-full -skew-x-12", "bg-gradient-to-r from-transparent via-white/25 to-transparent", "transition-transform duration-0 ease-out", "group-hover:translate-x-full group-hover:duration-[1200ms] group-disabled:hidden")
229
+ className: u("pointer-events-none absolute inset-0 -z-10 -translate-x-full -skew-x-12", "bg-gradient-to-r from-transparent via-white/25 to-transparent", "transition-transform duration-0 ease-out", "group-hover:translate-x-full group-hover:duration-[1200ms] group-disabled:hidden")
242
230
  }), /* @__PURE__ */ l("span", {
243
- className: y("inline-flex items-center", w[t]),
231
+ className: u("inline-flex items-center", h[t]),
244
232
  children: [
245
233
  n ? /* @__PURE__ */ c("span", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }) : r,
246
234
  /* @__PURE__ */ c("span", {
247
- className: y(e === "ghost" && "bg-gradient-to-r from-muted via-content to-muted bg-[length:200%_100%] bg-clip-text group-hover:text-transparent group-hover:[animation:text-shimmer_1.2s_linear_1_forwards]"),
235
+ className: u(e === "ghost" && "bg-gradient-to-r from-muted via-content to-muted bg-[length:200%_100%] bg-clip-text group-hover:text-transparent group-hover:[animation:text-shimmer_1.2s_linear_1_forwards]"),
248
236
  children: o
249
237
  }),
250
238
  !n && i
251
239
  ]
252
240
  })]
253
- }), E = {
241
+ }), _ = {
254
242
  ghost: "text-muted hover:bg-surface-2 hover:text-content",
255
243
  surface: "bg-surface-2 text-muted border border-border hover:text-content",
256
244
  solid: "bg-primary text-primary-contrast hover:bg-primary-hover"
257
- }, D = {
245
+ }, v = {
258
246
  sm: "h-7 w-7",
259
247
  md: "h-9 w-9"
260
- }, O = ({ variant: e = "ghost", size: t = "md", className: n, children: r, ...i }) => /* @__PURE__ */ c("button", {
261
- className: y("inline-flex items-center justify-center rounded-lg transition-colors duration-150", "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60", "disabled:opacity-50 disabled:cursor-not-allowed", E[e], D[t], n),
248
+ }, y = ({ variant: e = "ghost", size: t = "md", className: n, children: r, ...i }) => /* @__PURE__ */ c("button", {
249
+ className: u("inline-flex items-center justify-center rounded-lg transition-colors duration-150", "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60", "disabled:opacity-50 disabled:cursor-not-allowed", _[e], v[t], n),
262
250
  ...i,
263
251
  children: r
264
252
  });
265
253
  //#endregion
266
254
  //#region src/lib/clipboard.ts
267
- async function k(e) {
255
+ async function b(e) {
268
256
  try {
269
257
  if (navigator.clipboard && window.isSecureContext) try {
270
258
  return await navigator.clipboard.writeText(e), !0;
@@ -283,13 +271,13 @@ async function k(e) {
283
271
  return console.error("Failed to copy text:", e), !1;
284
272
  }
285
273
  }
286
- function A(t = 2e3) {
274
+ function x(t = 2e3) {
287
275
  let [n, r] = e.useState(!1), i = e.useRef(null);
288
276
  return e.useEffect(() => () => {
289
277
  i.current && clearTimeout(i.current);
290
278
  }, []), {
291
279
  copy: async (e) => {
292
- let n = await k(e);
280
+ let n = await b(e);
293
281
  return n && (r(!0), i.current && clearTimeout(i.current), i.current = window.setTimeout(() => {
294
282
  r(!1);
295
283
  }, t)), n;
@@ -299,44 +287,44 @@ function A(t = 2e3) {
299
287
  }
300
288
  //#endregion
301
289
  //#region src/components/ui/CopyButton.tsx
302
- var j = ({ value: e, variant: t = "surface", size: n = "md", className: r, label: i = "Copy to clipboard" }) => {
303
- let { copy: a, copied: o } = A(), s = n === "sm" ? 14 : 16;
304
- return /* @__PURE__ */ c(O, {
290
+ var S = ({ value: e, variant: t = "surface", size: n = "md", className: r, label: i = "Copy to clipboard" }) => {
291
+ let { copy: a, copied: o } = x(), s = n === "sm" ? 14 : 16;
292
+ return /* @__PURE__ */ c(y, {
305
293
  "aria-label": o ? "Copied" : i,
306
294
  variant: t,
307
295
  size: n,
308
296
  className: r,
309
297
  onClick: () => a(e),
310
- children: o ? /* @__PURE__ */ c(x, {
298
+ children: o ? /* @__PURE__ */ c(f, {
311
299
  name: "check",
312
300
  size: s,
313
301
  className: "text-green-500"
314
- }) : /* @__PURE__ */ c(x, {
302
+ }) : /* @__PURE__ */ c(f, {
315
303
  name: "copy",
316
304
  size: s
317
305
  })
318
306
  });
319
- }, M = {
307
+ }, C = {
320
308
  neutral: "bg-surface-2 text-muted border border-border",
321
309
  primary: "bg-primary-soft text-primary border border-primary/30",
322
310
  success: "bg-[#52b788]/15 text-[#52b788] border border-[#52b788]/25",
323
311
  error: "bg-[#4A0F0F] text-[#FC7070] border border-[#FC7070]/20",
324
312
  warning: "bg-amber-500/15 text-amber-500 border border-amber-500/30",
325
313
  info: "bg-sky-500/15 text-sky-400 border border-sky-500/30"
326
- }, N = ({ tone: e = "neutral", className: t, children: n }) => /* @__PURE__ */ c("span", {
327
- className: y("inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-xs font-heading font-[550]", M[e], t),
314
+ }, w = ({ tone: e = "neutral", className: t, children: n }) => /* @__PURE__ */ c("span", {
315
+ className: u("inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-xs font-heading font-[550]", C[e], t),
328
316
  children: n
329
- }), P = {
317
+ }), T = {
330
318
  GET: "success",
331
319
  POST: "info",
332
320
  PUT: "warning",
333
321
  PATCH: "primary",
334
322
  DELETE: "error"
335
- }, F = ({ method: e, className: t }) => /* @__PURE__ */ c(N, {
336
- tone: P[e],
323
+ }, E = ({ method: e, className: t }) => /* @__PURE__ */ c(w, {
324
+ tone: T[e],
337
325
  className: t,
338
326
  children: e
339
- }), I = ({ status: e, statusText: t, className: n }) => /* @__PURE__ */ l(N, {
327
+ }), D = ({ status: e, statusText: t, className: n }) => /* @__PURE__ */ l(w, {
340
328
  tone: e >= 200 && e < 300 ? "success" : e >= 300 && e < 400 ? "warning" : "error",
341
329
  className: n,
342
330
  children: [
@@ -344,16 +332,16 @@ var j = ({ value: e, variant: t = "surface", size: n = "md", className: r, label
344
332
  " ",
345
333
  t
346
334
  ]
347
- }), L = {
335
+ }), ee = {
348
336
  sm: "h-4 w-4 rounded",
349
337
  md: "h-5 w-5 rounded-md"
350
- }, R = {
338
+ }, O = {
351
339
  sm: "h-3 w-3",
352
340
  md: "h-3.5 w-3.5"
353
- }, ee = {
341
+ }, te = {
354
342
  sm: "text-xs",
355
343
  md: "text-sm"
356
- }, te = ({ checked: e, onChange: t, label: n, disabled: r, size: i = "md", className: a, "aria-label": o }) => {
344
+ }, k = ({ checked: e, onChange: t, label: n, disabled: r, size: i = "md", className: a, "aria-label": o }) => {
357
345
  let s = /* @__PURE__ */ c("button", {
358
346
  type: "button",
359
347
  role: "checkbox",
@@ -361,41 +349,41 @@ var j = ({ value: e, variant: t = "surface", size: n = "md", className: r, label
361
349
  "aria-label": o ?? n,
362
350
  disabled: r,
363
351
  onClick: () => t(!e),
364
- className: y("inline-flex shrink-0 items-center justify-center border transition-colors duration-150", "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60", "disabled:cursor-not-allowed disabled:opacity-50", L[i], e ? "border-primary bg-primary text-primary-contrast" : "border-border bg-surface-2 text-transparent hover:border-primary/70"),
365
- children: /* @__PURE__ */ c(x, {
352
+ className: u("inline-flex shrink-0 items-center justify-center border transition-colors duration-150", "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60", "disabled:cursor-not-allowed disabled:opacity-50", ee[i], e ? "border-primary bg-primary text-primary-contrast" : "border-border bg-surface-2 text-transparent hover:border-primary/70"),
353
+ children: /* @__PURE__ */ c(f, {
366
354
  name: "check",
367
- className: R[i]
355
+ className: O[i]
368
356
  })
369
357
  });
370
358
  return n ? /* @__PURE__ */ l("label", {
371
- className: y("inline-flex cursor-pointer select-none items-center gap-2", a),
359
+ className: u("inline-flex cursor-pointer select-none items-center gap-2", a),
372
360
  children: [s, /* @__PURE__ */ c("span", {
373
- className: y("text-content", ee[i]),
361
+ className: u("text-content", te[i]),
374
362
  children: n
375
363
  })]
376
364
  }) : /* @__PURE__ */ c("span", {
377
365
  className: a,
378
366
  children: s
379
367
  });
380
- }, z = ({ label: e, flush: t, className: n, children: r }) => /* @__PURE__ */ l("div", {
368
+ }, A = ({ label: e, flush: t, className: n, children: r }) => /* @__PURE__ */ l("div", {
381
369
  className: "w-full",
382
370
  children: [e && /* @__PURE__ */ c("div", {
383
371
  className: "mb-2 text-sm text-muted",
384
372
  children: e
385
373
  }), /* @__PURE__ */ c("div", {
386
- className: y("rounded-xl border border-border bg-surface", !t && "p-3", n),
374
+ className: u("rounded-xl border border-border bg-surface", !t && "p-3", n),
387
375
  children: r
388
376
  })]
389
- }), B = ({ items: e, activeId: n, onChange: i, variant: s = "underline", size: u = "md", className: d }) => {
390
- let f = a({}), [p, m] = o({
377
+ }), j = ({ items: e, activeId: n, onChange: i, variant: s = "underline", size: d = "md", className: f }) => {
378
+ let p = a({}), [m, h] = o({
391
379
  left: 0,
392
380
  top: 0,
393
381
  width: 0,
394
382
  height: 0
395
383
  });
396
384
  return r(() => {
397
- let e = f.current[n];
398
- e && m({
385
+ let e = p.current[n];
386
+ e && h({
399
387
  left: e.offsetLeft,
400
388
  top: e.offsetTop,
401
389
  width: e.offsetWidth,
@@ -403,8 +391,8 @@ var j = ({ value: e, variant: t = "surface", size: n = "md", className: r, label
403
391
  });
404
392
  }, [n, e]), t(() => {
405
393
  let e = () => {
406
- let e = f.current[n];
407
- e && m({
394
+ let e = p.current[n];
395
+ e && h({
408
396
  left: e.offsetLeft,
409
397
  top: e.offsetTop,
410
398
  width: e.offsetWidth,
@@ -413,25 +401,25 @@ var j = ({ value: e, variant: t = "surface", size: n = "md", className: r, label
413
401
  };
414
402
  return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
415
403
  }, [n]), s === "segmented" ? /* @__PURE__ */ l("div", {
416
- className: y("relative inline-flex gap-1 rounded-lg border border-border bg-surface-2 p-1", d),
404
+ className: u("relative inline-flex gap-1 rounded-lg border border-border bg-surface-2 p-1", f),
417
405
  children: [/* @__PURE__ */ c("span", {
418
406
  className: "pointer-events-none absolute z-0 rounded-md bg-primary transition-all duration-300 ease-out",
419
407
  style: {
420
- left: p.left,
421
- top: p.top,
422
- width: p.width,
423
- height: p.height
408
+ left: m.left,
409
+ top: m.top,
410
+ width: m.width,
411
+ height: m.height
424
412
  }
425
413
  }), e.map((e) => {
426
414
  let t = e.id === n;
427
415
  return /* @__PURE__ */ c("button", {
428
416
  ref: (t) => {
429
- f.current[e.id] = t;
417
+ p.current[e.id] = t;
430
418
  },
431
419
  onClick: () => i(e.id),
432
- className: y("group/seg relative z-10 cursor-pointer rounded-md font-heading transition-colors duration-150", u === "sm" ? "px-2.5 py-1 text-[12px]" : "px-3 py-1.5 text-[14px]", t ? "text-primary-contrast" : "text-muted"),
420
+ className: u("group/seg relative z-10 cursor-pointer rounded-md font-heading transition-colors duration-150", d === "sm" ? "px-2.5 py-1 text-[12px]" : "px-3 py-1.5 text-[14px]", t ? "text-primary-contrast" : "text-muted"),
433
421
  children: /* @__PURE__ */ l("span", {
434
- className: y("relative z-10", !t && "bg-gradient-to-r from-muted via-content to-muted bg-[length:200%_100%] bg-clip-text group-hover/seg:text-transparent group-hover/seg:[animation:text-shimmer_1.2s_linear_1_forwards]"),
422
+ className: u("relative z-10", !t && "bg-gradient-to-r from-muted via-content to-muted bg-[length:200%_100%] bg-clip-text group-hover/seg:text-transparent group-hover/seg:[animation:text-shimmer_1.2s_linear_1_forwards]"),
435
423
  children: [e.label, e.badge !== void 0 && /* @__PURE__ */ c("span", {
436
424
  className: "ml-1.5 opacity-70",
437
425
  children: e.badge
@@ -440,15 +428,15 @@ var j = ({ value: e, variant: t = "surface", size: n = "md", className: r, label
440
428
  }, e.id);
441
429
  })]
442
430
  }) : /* @__PURE__ */ l("div", {
443
- className: y("relative flex gap-1 border-b border-border", d),
431
+ className: u("relative flex gap-1 border-b border-border", f),
444
432
  children: [e.map((e) => {
445
433
  let t = e.id === n;
446
434
  return /* @__PURE__ */ l("button", {
447
435
  ref: (t) => {
448
- f.current[e.id] = t;
436
+ p.current[e.id] = t;
449
437
  },
450
438
  onClick: () => i(e.id),
451
- className: y("inline-flex cursor-pointer items-center gap-1.5 font-heading transition-colors duration-150", u === "sm" ? "px-2 py-2 text-[12px]" : "px-3 py-2.5 text-[14px]", t ? "text-content" : "text-muted hover:text-content"),
439
+ className: u("inline-flex cursor-pointer items-center gap-1.5 font-heading transition-colors duration-150", d === "sm" ? "px-2 py-2 text-[12px]" : "px-3 py-2.5 text-[14px]", t ? "text-content" : "text-muted hover:text-content"),
452
440
  children: [e.label, e.badge !== void 0 && /* @__PURE__ */ c("span", {
453
441
  className: "text-xs text-muted",
454
442
  children: e.badge
@@ -457,8 +445,8 @@ var j = ({ value: e, variant: t = "surface", size: n = "md", className: r, label
457
445
  }), /* @__PURE__ */ c("span", {
458
446
  className: "pointer-events-none absolute -bottom-px h-0.5 rounded-full bg-primary transition-all duration-300 ease-out",
459
447
  style: {
460
- left: p.left,
461
- width: p.width
448
+ left: m.left,
449
+ width: m.width
462
450
  }
463
451
  })]
464
452
  });
@@ -466,95 +454,95 @@ var j = ({ value: e, variant: t = "surface", size: n = "md", className: r, label
466
454
  sm: "gap-1.5 rounded-md px-2.5",
467
455
  md: "gap-2 rounded-lg px-3",
468
456
  lg: "gap-2.5 rounded-lg px-4"
469
- }, re = {
457
+ }, M = {
470
458
  sm: "py-1.5 text-[12px]",
471
459
  md: "py-2 text-sm",
472
460
  lg: "py-2.5 text-base"
473
- }, ie = {
461
+ }, re = {
474
462
  sm: "mb-1 text-xs",
475
463
  md: "mb-1.5 text-sm",
476
464
  lg: "mb-2 text-sm"
477
- }, ae = {
465
+ }, N = {
478
466
  sm: "mt-1 text-[11px]",
479
467
  md: "mt-1 text-xs",
480
468
  lg: "mt-1.5 text-xs"
481
- }, V = ({ label: e, error: t, hint: r, size: i = "md", leftSlot: a, rightSlot: o, className: s, containerClassName: u, id: d, ...f }) => {
482
- let p = n(), m = d ?? p;
469
+ }, P = ({ label: e, error: t, hint: r, size: i = "md", leftSlot: a, rightSlot: o, className: s, containerClassName: d, id: f, ...p }) => {
470
+ let m = n(), h = f ?? m;
483
471
  return /* @__PURE__ */ l("div", {
484
- className: y("w-full", u),
472
+ className: u("w-full", d),
485
473
  children: [
486
474
  e && /* @__PURE__ */ c("label", {
487
- htmlFor: m,
488
- className: y("block font-medium text-muted", ie[i]),
475
+ htmlFor: h,
476
+ className: u("block font-medium text-muted", re[i]),
489
477
  children: e
490
478
  }),
491
479
  /* @__PURE__ */ l("div", {
492
- className: y("flex items-center border bg-surface-2", "focus-within:border-primary/70 focus-within:ring-2 focus-within:ring-primary/15", ne[i], t ? "border-red-500" : "border-border"),
480
+ className: u("flex items-center border bg-surface-2", "focus-within:border-primary/70 focus-within:ring-2 focus-within:ring-primary/15", ne[i], t ? "border-red-500" : "border-border"),
493
481
  children: [
494
482
  a,
495
483
  /* @__PURE__ */ c("input", {
496
- id: m,
497
- className: y("w-full bg-transparent text-content placeholder:text-muted", "focus:outline-none disabled:cursor-not-allowed disabled:opacity-60", re[i], s),
498
- ...f
484
+ id: h,
485
+ className: u("w-full bg-transparent text-content placeholder:text-muted", "focus:outline-none disabled:cursor-not-allowed disabled:opacity-60", M[i], s),
486
+ ...p
499
487
  }),
500
488
  o
501
489
  ]
502
490
  }),
503
491
  t ? /* @__PURE__ */ c("p", {
504
- className: y("text-red-500", ae[i]),
492
+ className: u("text-red-500", N[i]),
505
493
  children: t
506
494
  }) : r ? /* @__PURE__ */ c("p", {
507
- className: y("text-muted", ae[i]),
495
+ className: u("text-muted", N[i]),
508
496
  children: r
509
497
  }) : null
510
498
  ]
511
499
  });
512
- }, oe = {
500
+ }, F = {
513
501
  sm: "gap-1.5 px-2.5 py-1.5 text-[12px]",
514
502
  md: "gap-1 px-2 py-1.5 text-[14px]"
515
- }, se = {
503
+ }, I = {
516
504
  sm: "px-2.5 py-1.5 text-[12px]",
517
505
  md: "px-3 py-1.5 text-[14px]"
518
506
  };
519
- function ce({ items: e, value: n, onChange: r, size: i = "md", disabled: s, minWidthClassName: u = "min-w-[7rem]", className: d }) {
520
- let [f, p] = o(!1), [m, h] = o(!1), g = a(null), _ = e.find((e) => e.id === n) ?? e[0];
507
+ function L({ items: e, value: n, onChange: r, size: i = "md", disabled: s, minWidthClassName: d = "min-w-[7rem]", className: p }) {
508
+ let [m, h] = o(!1), [g, _] = o(!1), v = a(null), y = e.find((e) => e.id === n) ?? e[0];
521
509
  t(() => {
522
- if (f) {
523
- h(!0);
510
+ if (m) {
511
+ _(!0);
524
512
  return;
525
513
  }
526
- let e = window.setTimeout(() => h(!1), 200);
514
+ let e = window.setTimeout(() => _(!1), 200);
527
515
  return () => window.clearTimeout(e);
528
- }, [f]), t(() => {
529
- if (!f) return;
516
+ }, [m]), t(() => {
517
+ if (!m) return;
530
518
  let e = (e) => {
531
- g.current && !g.current.contains(e.target) && p(!1);
519
+ v.current && !v.current.contains(e.target) && h(!1);
532
520
  }, t = (e) => {
533
- e.key === "Escape" && p(!1);
521
+ e.key === "Escape" && h(!1);
534
522
  };
535
523
  return document.addEventListener("mousedown", e), document.addEventListener("keydown", t), () => {
536
524
  document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
537
525
  };
538
- }, [f]);
539
- let v = (e) => {
540
- s || (r(e), p(!1));
526
+ }, [m]);
527
+ let b = (e) => {
528
+ s || (r(e), h(!1));
541
529
  };
542
530
  return /* @__PURE__ */ l("div", {
543
- ref: g,
544
- className: y("relative inline-flex", d),
531
+ ref: v,
532
+ className: u("relative inline-flex", p),
545
533
  children: [/* @__PURE__ */ l("button", {
546
534
  type: "button",
547
535
  "aria-haspopup": "listbox",
548
- "aria-expanded": f,
536
+ "aria-expanded": m,
549
537
  disabled: s,
550
- onClick: () => p((e) => !e),
551
- className: y("inline-flex cursor-pointer items-center rounded-md font-heading transition-colors duration-150", "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60", "disabled:cursor-not-allowed disabled:opacity-60", oe[i], _?.className ?? "text-content hover:bg-surface-2"),
552
- children: [_?.label, /* @__PURE__ */ c(x, {
538
+ onClick: () => h((e) => !e),
539
+ className: u("inline-flex cursor-pointer items-center rounded-md font-heading transition-colors duration-150", "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60", "disabled:cursor-not-allowed disabled:opacity-60", F[i], y?.className ?? "text-content hover:bg-surface-2"),
540
+ children: [y?.label, /* @__PURE__ */ c(f, {
553
541
  name: "chevron-down",
554
- className: y("h-4 w-4 text-muted transition-transform duration-200", f && "rotate-180")
542
+ className: u("h-4 w-4 text-muted transition-transform duration-200", m && "rotate-180")
555
543
  })]
556
- }), m && /* @__PURE__ */ c("div", {
557
- className: y("absolute left-0 top-full z-20 mt-1 grid overflow-hidden rounded-lg border border-border bg-surface shadow-lg [grid-template-rows:1fr]", u, f ? "motion-safe:animate-[dropdown-expand_0.2s_ease-out]" : "motion-safe:animate-[dropdown-expand_0.18s_ease-in_reverse_forwards]"),
544
+ }), g && /* @__PURE__ */ c("div", {
545
+ className: u("absolute left-0 top-full z-20 mt-1 grid overflow-hidden rounded-lg border border-border bg-surface shadow-lg [grid-template-rows:1fr]", d, m ? "motion-safe:animate-[dropdown-expand_0.2s_ease-out]" : "motion-safe:animate-[dropdown-expand_0.18s_ease-in_reverse_forwards]"),
558
546
  children: /* @__PURE__ */ c("ul", {
559
547
  role: "listbox",
560
548
  className: "min-h-0 overflow-hidden p-1",
@@ -565,9 +553,9 @@ function ce({ items: e, value: n, onChange: r, size: i = "md", disabled: s, minW
565
553
  "aria-selected": t,
566
554
  children: /* @__PURE__ */ l("button", {
567
555
  type: "button",
568
- onClick: () => v(e.id),
569
- className: y("flex w-full cursor-pointer items-center justify-between rounded-md font-heading transition-colors duration-150 hover:bg-surface-2", se[i], e.className ?? "text-muted hover:text-content", t && "bg-surface-2"),
570
- children: [e.label, t && /* @__PURE__ */ c(x, {
556
+ onClick: () => b(e.id),
557
+ className: u("flex w-full cursor-pointer items-center justify-between rounded-md font-heading transition-colors duration-150 hover:bg-surface-2", I[i], e.className ?? "text-muted hover:text-content", t && "bg-surface-2"),
558
+ children: [e.label, t && /* @__PURE__ */ c(f, {
571
559
  name: "check",
572
560
  className: "h-4 w-4"
573
561
  })]
@@ -580,976 +568,233 @@ function ce({ items: e, value: n, onChange: r, size: i = "md", disabled: s, minW
580
568
  }
581
569
  //#endregion
582
570
  //#region src/components/ui/MethodSelect.tsx
583
- var le = [
571
+ var ie = [
584
572
  "GET",
585
573
  "POST",
586
574
  "PUT",
587
575
  "PATCH",
588
576
  "DELETE"
589
- ], ue = {
577
+ ], R = {
590
578
  GET: "text-[#52b788]",
591
579
  POST: "text-sky-400",
592
580
  PUT: "text-amber-400",
593
581
  PATCH: "text-primary",
594
582
  DELETE: "text-red-400"
595
- }, de = (e) => e.map((e) => ({
583
+ }, ae = (e) => e.map((e) => ({
596
584
  id: e,
597
585
  label: e,
598
- className: `${ue[e]} font-semibold`
599
- })), fe = ({ value: e, onChange: t, methods: n = le, disabled: r, className: i }) => /* @__PURE__ */ c(ce, {
586
+ className: `${R[e]} font-semibold`
587
+ })), oe = ({ value: e, onChange: t, methods: n = ie, disabled: r, className: i }) => /* @__PURE__ */ c(L, {
600
588
  value: e,
601
589
  onChange: t,
602
- items: de(n),
590
+ items: ae(n),
603
591
  disabled: r,
604
592
  minWidthClassName: "min-w-[7rem]",
605
593
  className: i
606
- }), pe = /* @__PURE__ */ g(((e, t) => {
607
- var n = function(e) {
608
- var t = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, n = 0, r = {}, i = {
609
- manual: e.Prism && e.Prism.manual,
610
- disableWorkerMessageHandler: e.Prism && e.Prism.disableWorkerMessageHandler,
611
- util: {
612
- encode: function e(t) {
613
- return t instanceof a ? new a(t.type, e(t.content), t.alias) : Array.isArray(t) ? t.map(e) : t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/\u00a0/g, " ");
614
- },
615
- type: function(e) {
616
- return Object.prototype.toString.call(e).slice(8, -1);
617
- },
618
- objId: function(e) {
619
- return e.__id || Object.defineProperty(e, "__id", { value: ++n }), e.__id;
620
- },
621
- clone: function e(t, n) {
622
- n ||= {};
623
- var r, a;
624
- switch (i.util.type(t)) {
625
- case "Object":
626
- if (a = i.util.objId(t), n[a]) return n[a];
627
- for (var o in r = {}, n[a] = r, t) t.hasOwnProperty(o) && (r[o] = e(t[o], n));
628
- return r;
629
- case "Array": return a = i.util.objId(t), n[a] ? n[a] : (r = [], n[a] = r, t.forEach(function(t, i) {
630
- r[i] = e(t, n);
631
- }), r);
632
- default: return t;
633
- }
634
- },
635
- getLanguage: function(e) {
636
- for (; e;) {
637
- var n = t.exec(e.className);
638
- if (n) return n[1].toLowerCase();
639
- e = e.parentElement;
640
- }
641
- return "none";
642
- },
643
- setLanguage: function(e, n) {
644
- e.className = e.className.replace(RegExp(t, "gi"), ""), e.classList.add("language-" + n);
645
- },
646
- currentScript: function() {
647
- if (typeof document > "u") return null;
648
- if (document.currentScript && document.currentScript.tagName === "SCRIPT") return document.currentScript;
649
- try {
650
- throw Error();
651
- } catch (r) {
652
- var e = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack) || [])[1];
653
- if (e) {
654
- var t = document.getElementsByTagName("script");
655
- for (var n in t) if (t[n].src == e) return t[n];
656
- }
657
- return null;
658
- }
659
- },
660
- isActive: function(e, t, n) {
661
- for (var r = "no-" + t; e;) {
662
- var i = e.classList;
663
- if (i.contains(t)) return !0;
664
- if (i.contains(r)) return !1;
665
- e = e.parentElement;
666
- }
667
- return !!n;
668
- }
669
- },
670
- languages: {
671
- plain: r,
672
- plaintext: r,
673
- text: r,
674
- txt: r,
675
- extend: function(e, t) {
676
- var n = i.util.clone(i.languages[e]);
677
- for (var r in t) n[r] = t[r];
678
- return n;
679
- },
680
- insertBefore: function(e, t, n, r) {
681
- r ||= i.languages;
682
- var a = r[e], o = {};
683
- for (var s in a) if (a.hasOwnProperty(s)) {
684
- if (s == t) for (var c in n) n.hasOwnProperty(c) && (o[c] = n[c]);
685
- n.hasOwnProperty(s) || (o[s] = a[s]);
686
- }
687
- var l = r[e];
688
- return r[e] = o, i.languages.DFS(i.languages, function(t, n) {
689
- n === l && t != e && (this[t] = o);
690
- }), o;
691
- },
692
- DFS: function e(t, n, r, a) {
693
- a ||= {};
694
- var o = i.util.objId;
695
- for (var s in t) if (t.hasOwnProperty(s)) {
696
- n.call(t, s, t[s], r || s);
697
- var c = t[s], l = i.util.type(c);
698
- l === "Object" && !a[o(c)] ? (a[o(c)] = !0, e(c, n, null, a)) : l === "Array" && !a[o(c)] && (a[o(c)] = !0, e(c, n, s, a));
699
- }
700
- }
701
- },
702
- plugins: {},
703
- highlightAll: function(e, t) {
704
- i.highlightAllUnder(document, e, t);
705
- },
706
- highlightAllUnder: function(e, t, n) {
707
- var r = {
708
- callback: n,
709
- container: e,
710
- selector: "code[class*=\"language-\"], [class*=\"language-\"] code, code[class*=\"lang-\"], [class*=\"lang-\"] code"
711
- };
712
- i.hooks.run("before-highlightall", r), r.elements = Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)), i.hooks.run("before-all-elements-highlight", r);
713
- for (var a = 0, o; o = r.elements[a++];) i.highlightElement(o, t === !0, r.callback);
714
- },
715
- highlightElement: function(t, n, r) {
716
- var a = i.util.getLanguage(t), o = i.languages[a];
717
- i.util.setLanguage(t, a);
718
- var s = t.parentElement;
719
- s && s.nodeName.toLowerCase() === "pre" && i.util.setLanguage(s, a);
720
- var c = {
721
- element: t,
722
- language: a,
723
- grammar: o,
724
- code: t.textContent
725
- };
726
- function l(e) {
727
- c.highlightedCode = e, i.hooks.run("before-insert", c), c.element.innerHTML = c.highlightedCode, i.hooks.run("after-highlight", c), i.hooks.run("complete", c), r && r.call(c.element);
728
- }
729
- if (i.hooks.run("before-sanity-check", c), s = c.element.parentElement, s && s.nodeName.toLowerCase() === "pre" && !s.hasAttribute("tabindex") && s.setAttribute("tabindex", "0"), !c.code) {
730
- i.hooks.run("complete", c), r && r.call(c.element);
731
- return;
732
- }
733
- if (i.hooks.run("before-highlight", c), !c.grammar) {
734
- l(i.util.encode(c.code));
735
- return;
736
- }
737
- if (n && e.Worker) {
738
- var u = new Worker(i.filename);
739
- u.onmessage = function(e) {
740
- l(e.data);
741
- }, u.postMessage(JSON.stringify({
742
- language: c.language,
743
- code: c.code,
744
- immediateClose: !0
745
- }));
746
- } else l(i.highlight(c.code, c.grammar, c.language));
747
- },
748
- highlight: function(e, t, n) {
749
- var r = {
750
- code: e,
751
- grammar: t,
752
- language: n
753
- };
754
- if (i.hooks.run("before-tokenize", r), !r.grammar) throw Error("The language \"" + r.language + "\" has no grammar.");
755
- return r.tokens = i.tokenize(r.code, r.grammar), i.hooks.run("after-tokenize", r), a.stringify(i.util.encode(r.tokens), r.language);
756
- },
757
- tokenize: function(e, t) {
758
- var n = t.rest;
759
- if (n) {
760
- for (var r in n) t[r] = n[r];
761
- delete t.rest;
762
- }
763
- var i = new c();
764
- return l(i, i.head, e), s(e, i, t, i.head, 0), d(i);
765
- },
766
- hooks: {
767
- all: {},
768
- add: function(e, t) {
769
- var n = i.hooks.all;
770
- n[e] = n[e] || [], n[e].push(t);
771
- },
772
- run: function(e, t) {
773
- var n = i.hooks.all[e];
774
- if (!(!n || !n.length)) for (var r = 0, a; a = n[r++];) a(t);
775
- }
776
- },
777
- Token: a
778
- };
779
- e.Prism = i;
780
- function a(e, t, n, r) {
781
- this.type = e, this.content = t, this.alias = n, this.length = (r || "").length | 0;
782
- }
783
- a.stringify = function e(t, n) {
784
- if (typeof t == "string") return t;
785
- if (Array.isArray(t)) {
786
- var r = "";
787
- return t.forEach(function(t) {
788
- r += e(t, n);
789
- }), r;
790
- }
791
- var a = {
792
- type: t.type,
793
- content: e(t.content, n),
794
- tag: "span",
795
- classes: ["token", t.type],
796
- attributes: {},
797
- language: n
798
- }, o = t.alias;
799
- o && (Array.isArray(o) ? Array.prototype.push.apply(a.classes, o) : a.classes.push(o)), i.hooks.run("wrap", a);
800
- var s = "";
801
- for (var c in a.attributes) s += " " + c + "=\"" + (a.attributes[c] || "").replace(/"/g, "&quot;") + "\"";
802
- return "<" + a.tag + " class=\"" + a.classes.join(" ") + "\"" + s + ">" + a.content + "</" + a.tag + ">";
803
- };
804
- function o(e, t, n, r) {
805
- e.lastIndex = t;
806
- var i = e.exec(n);
807
- if (i && r && i[1]) {
808
- var a = i[1].length;
809
- i.index += a, i[0] = i[0].slice(a);
810
- }
811
- return i;
812
- }
813
- function s(e, t, n, r, c, d) {
814
- for (var f in n) if (!(!n.hasOwnProperty(f) || !n[f])) {
815
- var p = n[f];
816
- p = Array.isArray(p) ? p : [p];
817
- for (var m = 0; m < p.length; ++m) {
818
- if (d && d.cause == f + "," + m) return;
819
- var h = p[m], g = h.inside, _ = !!h.lookbehind, v = !!h.greedy, y = h.alias;
820
- if (v && !h.pattern.global) {
821
- var b = h.pattern.toString().match(/[imsuy]*$/)[0];
822
- h.pattern = RegExp(h.pattern.source, b + "g");
823
- }
824
- for (var x = h.pattern || h, S = r.next, C = c; S !== t.tail && !(d && C >= d.reach); C += S.value.length, S = S.next) {
825
- var w = S.value;
826
- if (t.length > e.length) return;
827
- if (!(w instanceof a)) {
828
- var T = 1, E;
829
- if (v) {
830
- if (E = o(x, C, e, _), !E || E.index >= e.length) break;
831
- var D = E.index, O = E.index + E[0].length, k = C;
832
- for (k += S.value.length; D >= k;) S = S.next, k += S.value.length;
833
- if (k -= S.value.length, C = k, S.value instanceof a) continue;
834
- for (var A = S; A !== t.tail && (k < O || typeof A.value == "string"); A = A.next) T++, k += A.value.length;
835
- T--, w = e.slice(C, k), E.index -= C;
836
- } else if (E = o(x, 0, w, _), !E) continue;
837
- var D = E.index, j = E[0], M = w.slice(0, D), N = w.slice(D + j.length), P = C + w.length;
838
- d && P > d.reach && (d.reach = P);
839
- var F = S.prev;
840
- M && (F = l(t, F, M), C += M.length), u(t, F, T);
841
- var I = new a(f, g ? i.tokenize(j, g) : j, y, j);
842
- if (S = l(t, F, I), N && l(t, S, N), T > 1) {
843
- var L = {
844
- cause: f + "," + m,
845
- reach: P
846
- };
847
- s(e, t, n, S.prev, C, L), d && L.reach > d.reach && (d.reach = L.reach);
848
- }
849
- }
850
- }
851
- }
852
- }
853
- }
854
- function c() {
855
- var e = {
856
- value: null,
857
- prev: null,
858
- next: null
859
- }, t = {
860
- value: null,
861
- prev: e,
862
- next: null
863
- };
864
- e.next = t, this.head = e, this.tail = t, this.length = 0;
865
- }
866
- function l(e, t, n) {
867
- var r = t.next, i = {
868
- value: n,
869
- prev: t,
870
- next: r
871
- };
872
- return t.next = i, r.prev = i, e.length++, i;
873
- }
874
- function u(e, t, n) {
875
- for (var r = t.next, i = 0; i < n && r !== e.tail; i++) r = r.next;
876
- t.next = r, r.prev = t, e.length -= i;
877
- }
878
- function d(e) {
879
- for (var t = [], n = e.head.next; n !== e.tail;) t.push(n.value), n = n.next;
880
- return t;
881
- }
882
- if (!e.document) return e.addEventListener && (i.disableWorkerMessageHandler || e.addEventListener("message", function(t) {
883
- var n = JSON.parse(t.data), r = n.language, a = n.code, o = n.immediateClose;
884
- e.postMessage(i.highlight(a, i.languages[r], r)), o && e.close();
885
- }, !1)), i;
886
- var f = i.util.currentScript();
887
- f && (i.filename = f.src, f.hasAttribute("data-manual") && (i.manual = !0));
888
- function p() {
889
- i.manual || i.highlightAll();
890
- }
891
- if (!i.manual) {
892
- var m = document.readyState;
893
- m === "loading" || m === "interactive" && f && f.defer ? document.addEventListener("DOMContentLoaded", p) : window.requestAnimationFrame ? window.requestAnimationFrame(p) : window.setTimeout(p, 16);
894
- }
895
- return i;
896
- }(typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {});
897
- t !== void 0 && t.exports && (t.exports = n), typeof global < "u" && (global.Prism = n), n.languages.markup = {
898
- comment: {
899
- pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
900
- greedy: !0
594
+ }), se = {
595
+ json: [
596
+ {
597
+ type: "property",
598
+ pattern: /"(?:\\.|[^"\\])*"(?=\s*:)/y
901
599
  },
902
- prolog: {
903
- pattern: /<\?[\s\S]+?\?>/,
904
- greedy: !0
600
+ {
601
+ type: "string",
602
+ pattern: /"(?:\\.|[^"\\])*"/y
905
603
  },
906
- doctype: {
907
- pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
908
- greedy: !0,
909
- inside: {
910
- "internal-subset": {
911
- pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/,
912
- lookbehind: !0,
913
- greedy: !0,
914
- inside: null
915
- },
916
- string: {
917
- pattern: /"[^"]*"|'[^']*'/,
918
- greedy: !0
919
- },
920
- punctuation: /^<!|>$|[[\]]/,
921
- "doctype-tag": /^DOCTYPE/i,
922
- name: /[^\s<>'"]+/
923
- }
604
+ {
605
+ type: "number",
606
+ pattern: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/iy
924
607
  },
925
- cdata: {
926
- pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
927
- greedy: !0
608
+ {
609
+ type: "boolean",
610
+ pattern: /\b(?:true|false)\b/y
928
611
  },
929
- tag: {
930
- pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
931
- greedy: !0,
932
- inside: {
933
- tag: {
934
- pattern: /^<\/?[^\s>\/]+/,
935
- inside: {
936
- punctuation: /^<\/?/,
937
- namespace: /^[^\s>\/:]+:/
938
- }
939
- },
940
- "special-attr": [],
941
- "attr-value": {
942
- pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
943
- inside: { punctuation: [{
944
- pattern: /^=/,
945
- alias: "attr-equals"
946
- }, {
947
- pattern: /^(\s*)["']|["']$/,
948
- lookbehind: !0
949
- }] }
950
- },
951
- punctuation: /\/?>/,
952
- "attr-name": {
953
- pattern: /[^\s>\/]+/,
954
- inside: { namespace: /^[^\s>\/:]+:/ }
955
- }
956
- }
612
+ {
613
+ type: "keyword",
614
+ pattern: /\bnull\b/y
957
615
  },
958
- entity: [{
959
- pattern: /&[\da-z]{1,8};/i,
960
- alias: "named-entity"
961
- }, /&#x?[\da-f]{1,8};/i]
962
- }, n.languages.markup.tag.inside["attr-value"].inside.entity = n.languages.markup.entity, n.languages.markup.doctype.inside["internal-subset"].inside = n.languages.markup, n.hooks.add("wrap", function(e) {
963
- e.type === "entity" && (e.attributes.title = e.content.replace(/&amp;/, "&"));
964
- }), Object.defineProperty(n.languages.markup.tag, "addInlined", { value: function(e, t) {
965
- var r = {};
966
- r["language-" + t] = {
967
- pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
968
- lookbehind: !0,
969
- inside: n.languages[t]
970
- }, r.cdata = /^<!\[CDATA\[|\]\]>$/i;
971
- var i = { "included-cdata": {
972
- pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
973
- inside: r
974
- } };
975
- i["language-" + t] = {
976
- pattern: /[\s\S]+/,
977
- inside: n.languages[t]
978
- };
979
- var a = {};
980
- a[e] = {
981
- pattern: RegExp("(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[\\s\\S])*?(?=<\\/__>)".replace(/__/g, function() {
982
- return e;
983
- }), "i"),
984
- lookbehind: !0,
985
- greedy: !0,
986
- inside: i
987
- }, n.languages.insertBefore("markup", "cdata", a);
988
- } }), Object.defineProperty(n.languages.markup.tag, "addAttribute", { value: function(e, t) {
989
- n.languages.markup.tag.inside["special-attr"].push({
990
- pattern: RegExp("(^|[\"'\\s])(?:" + e + ")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))", "i"),
991
- lookbehind: !0,
992
- inside: {
993
- "attr-name": /^[^\s=]+/,
994
- "attr-value": {
995
- pattern: /=[\s\S]+/,
996
- inside: {
997
- value: {
998
- pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
999
- lookbehind: !0,
1000
- alias: [t, "language-" + t],
1001
- inside: n.languages[t]
1002
- },
1003
- punctuation: [{
1004
- pattern: /^=/,
1005
- alias: "attr-equals"
1006
- }, /"|'/]
1007
- }
1008
- }
1009
- }
1010
- });
1011
- } }), n.languages.html = n.languages.markup, n.languages.mathml = n.languages.markup, n.languages.svg = n.languages.markup, n.languages.xml = n.languages.extend("markup", {}), n.languages.ssml = n.languages.xml, n.languages.atom = n.languages.xml, n.languages.rss = n.languages.xml, (function(e) {
1012
- var t = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
1013
- e.languages.css = {
1014
- comment: /\/\*[\s\S]*?\*\//,
1015
- atrule: {
1016
- pattern: RegExp("@[\\w-](?:[^;{\\s\"']|\\s+(?!\\s)|" + t.source + ")*?(?:;|(?=\\s*\\{))"),
1017
- inside: {
1018
- rule: /^@[\w-]+/,
1019
- "selector-function-argument": {
1020
- pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,
1021
- lookbehind: !0,
1022
- alias: "selector"
1023
- },
1024
- keyword: {
1025
- pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/,
1026
- lookbehind: !0
1027
- }
1028
- }
1029
- },
1030
- url: {
1031
- pattern: RegExp("\\burl\\((?:" + t.source + "|(?:[^\\\\\\r\\n()\"']|\\\\[\\s\\S])*)\\)", "i"),
1032
- greedy: !0,
1033
- inside: {
1034
- function: /^url/i,
1035
- punctuation: /^\(|\)$/,
1036
- string: {
1037
- pattern: RegExp("^" + t.source + "$"),
1038
- alias: "url"
1039
- }
1040
- }
1041
- },
1042
- selector: {
1043
- pattern: RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|" + t.source + ")*(?=\\s*\\{)"),
1044
- lookbehind: !0
1045
- },
1046
- string: {
1047
- pattern: t,
1048
- greedy: !0
1049
- },
1050
- property: {
1051
- pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,
1052
- lookbehind: !0
1053
- },
1054
- important: /!important\b/i,
1055
- function: {
1056
- pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,
1057
- lookbehind: !0
1058
- },
1059
- punctuation: /[(){};:,]/
1060
- }, e.languages.css.atrule.inside.rest = e.languages.css;
1061
- var n = e.languages.markup;
1062
- n && (n.tag.addInlined("style", "css"), n.tag.addAttribute("style", "css"));
1063
- })(n), n.languages.clike = {
1064
- comment: [{
1065
- pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
1066
- lookbehind: !0,
1067
- greedy: !0
1068
- }, {
1069
- pattern: /(^|[^\\:])\/\/.*/,
1070
- lookbehind: !0,
1071
- greedy: !0
1072
- }],
1073
- string: {
1074
- pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
1075
- greedy: !0
616
+ {
617
+ type: "operator",
618
+ pattern: /:/y
1076
619
  },
1077
- "class-name": {
1078
- pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
1079
- lookbehind: !0,
1080
- inside: { punctuation: /[.\\]/ }
620
+ {
621
+ type: "punctuation",
622
+ pattern: /[{}[\],]/y
623
+ }
624
+ ],
625
+ bash: [
626
+ {
627
+ type: "comment",
628
+ pattern: /#.*/y
1081
629
  },
1082
- keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
1083
- boolean: /\b(?:false|true)\b/,
1084
- function: /\b\w+(?=\()/,
1085
- number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
1086
- operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
1087
- punctuation: /[{}[\];(),.:]/
1088
- }, n.languages.javascript = n.languages.extend("clike", {
1089
- "class-name": [n.languages.clike["class-name"], {
1090
- pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
1091
- lookbehind: !0
1092
- }],
1093
- keyword: [{
1094
- pattern: /((?:^|\})\s*)catch\b/,
1095
- lookbehind: !0
1096
- }, {
1097
- pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
1098
- lookbehind: !0
1099
- }],
1100
- function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
1101
- number: {
1102
- pattern: RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),
1103
- lookbehind: !0
630
+ {
631
+ type: "string",
632
+ pattern: /'(?:[^']*)'|"(?:\\.|[^"\\])*"/y
1104
633
  },
1105
- operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
1106
- }), n.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, n.languages.insertBefore("javascript", "keyword", {
1107
- regex: {
1108
- pattern: RegExp("((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))"),
1109
- lookbehind: !0,
1110
- greedy: !0,
1111
- inside: {
1112
- "regex-source": {
1113
- pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
1114
- lookbehind: !0,
1115
- alias: "language-regex",
1116
- inside: n.languages.regex
1117
- },
1118
- "regex-delimiter": /^\/|\/$/,
1119
- "regex-flags": /^[a-z]+$/
1120
- }
634
+ {
635
+ type: "function",
636
+ pattern: /\b(?:curl|wget|fetch|http|httpie)\b/y
1121
637
  },
1122
- "function-variable": {
1123
- pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
1124
- alias: "function"
638
+ {
639
+ type: "variable",
640
+ pattern: /\$[A-Za-z_][\w]*|\$\{[^}]+\}/y
1125
641
  },
1126
- parameter: [
1127
- {
1128
- pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
1129
- lookbehind: !0,
1130
- inside: n.languages.javascript
1131
- },
1132
- {
1133
- pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
1134
- lookbehind: !0,
1135
- inside: n.languages.javascript
1136
- },
1137
- {
1138
- pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
1139
- lookbehind: !0,
1140
- inside: n.languages.javascript
1141
- },
1142
- {
1143
- pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
1144
- lookbehind: !0,
1145
- inside: n.languages.javascript
1146
- }
1147
- ],
1148
- constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
1149
- }), n.languages.insertBefore("javascript", "string", {
1150
- hashbang: {
1151
- pattern: /^#!.*/,
1152
- greedy: !0,
1153
- alias: "comment"
642
+ {
643
+ type: "keyword",
644
+ pattern: /\b(?:if|then|else|fi|for|do|done|while|case|esac)\b/y
1154
645
  },
1155
- "template-string": {
1156
- pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
1157
- greedy: !0,
1158
- inside: {
1159
- "template-punctuation": {
1160
- pattern: /^`|`$/,
1161
- alias: "string"
1162
- },
1163
- interpolation: {
1164
- pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
1165
- lookbehind: !0,
1166
- inside: {
1167
- "interpolation-punctuation": {
1168
- pattern: /^\$\{|\}$/,
1169
- alias: "punctuation"
1170
- },
1171
- rest: n.languages.javascript
1172
- }
1173
- },
1174
- string: /[\s\S]+/
1175
- }
646
+ {
647
+ type: "number",
648
+ pattern: /\b\d+(?:\.\d+)?\b/y
1176
649
  },
1177
- "string-property": {
1178
- pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
1179
- lookbehind: !0,
1180
- greedy: !0,
1181
- alias: "property"
1182
- }
1183
- }), n.languages.insertBefore("javascript", "operator", { "literal-property": {
1184
- pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
1185
- lookbehind: !0,
1186
- alias: "property"
1187
- } }), n.languages.markup && (n.languages.markup.tag.addInlined("script", "javascript"), n.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)", "javascript")), n.languages.js = n.languages.javascript, (function() {
1188
- if (n === void 0 || typeof document > "u") return;
1189
- Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
1190
- var e = "Loading…", t = function(e, t) {
1191
- return "✖ Error " + e + " while fetching file: " + t;
1192
- }, r = "✖ Error: File does not exist or is empty", i = {
1193
- js: "javascript",
1194
- py: "python",
1195
- rb: "ruby",
1196
- ps1: "powershell",
1197
- psm1: "powershell",
1198
- sh: "bash",
1199
- bat: "batch",
1200
- h: "c",
1201
- tex: "latex"
1202
- }, a = "data-src-status", o = "loading", s = "loaded", c = "failed", l = "pre[data-src]:not([" + a + "=\"" + s + "\"]):not([" + a + "=\"" + o + "\"])";
1203
- function u(e, n, i) {
1204
- var a = new XMLHttpRequest();
1205
- a.open("GET", e, !0), a.onreadystatechange = function() {
1206
- a.readyState == 4 && (a.status < 400 && a.responseText ? n(a.responseText) : a.status >= 400 ? i(t(a.status, a.statusText)) : i(r));
1207
- }, a.send(null);
1208
- }
1209
- function d(e) {
1210
- var t = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e || "");
1211
- if (t) {
1212
- var n = Number(t[1]), r = t[2], i = t[3];
1213
- return r ? i ? [n, Number(i)] : [n, void 0] : [n, n];
1214
- }
650
+ {
651
+ type: "operator",
652
+ pattern: /&&|\|\||[|&;=<>]/y
653
+ },
654
+ {
655
+ type: "punctuation",
656
+ pattern: /\\|[()[\]{}]/y
657
+ },
658
+ {
659
+ type: "builtin",
660
+ pattern: /-{1,2}[A-Za-z][\w-]*/y
1215
661
  }
1216
- n.hooks.add("before-highlightall", function(e) {
1217
- e.selector += ", " + l;
1218
- }), n.hooks.add("before-sanity-check", function(t) {
1219
- var r = t.element;
1220
- if (r.matches(l)) {
1221
- t.code = "", r.setAttribute(a, o);
1222
- var f = r.appendChild(document.createElement("CODE"));
1223
- f.textContent = e;
1224
- var p = r.getAttribute("data-src"), m = t.language;
1225
- if (m === "none") {
1226
- var h = (/\.(\w+)$/.exec(p) || [, "none"])[1];
1227
- m = i[h] || h;
1228
- }
1229
- n.util.setLanguage(f, m), n.util.setLanguage(r, m);
1230
- var g = n.plugins.autoloader;
1231
- g && g.loadLanguages(m), u(p, function(e) {
1232
- r.setAttribute(a, s);
1233
- var t = d(r.getAttribute("data-range"));
1234
- if (t) {
1235
- var i = e.split(/\r\n?|\n/g), o = t[0], c = t[1] == null ? i.length : t[1];
1236
- o < 0 && (o += i.length), o = Math.max(0, Math.min(o - 1, i.length)), c < 0 && (c += i.length), c = Math.max(0, Math.min(c, i.length)), e = i.slice(o, c).join("\n"), r.hasAttribute("data-start") || r.setAttribute("data-start", String(o + 1));
1237
- }
1238
- f.textContent = e, n.highlightElement(f);
1239
- }, function(e) {
1240
- r.setAttribute(a, c), f.textContent = e;
1241
- });
1242
- }
1243
- }), n.plugins.fileHighlight = { highlight: function(e) {
1244
- for (var t = (e || document).querySelectorAll(l), r = 0, i; i = t[r++];) n.highlightElement(i);
1245
- } };
1246
- var f = !1;
1247
- n.fileHighlight = function() {
1248
- f ||= (console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."), !0), n.plugins.fileHighlight.highlight.apply(this, arguments);
1249
- };
1250
- })();
1251
- }));
1252
- (function(e) {
1253
- var t = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b", n = {
1254
- pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
1255
- lookbehind: !0,
1256
- alias: "punctuation",
1257
- inside: null
1258
- }, r = {
1259
- bash: n,
1260
- environment: {
1261
- pattern: RegExp("\\$" + t),
1262
- alias: "constant"
662
+ ],
663
+ javascript: [
664
+ {
665
+ type: "comment",
666
+ pattern: /\/\/.*|\/\*.*?\*\//y
1263
667
  },
1264
- variable: [
1265
- {
1266
- pattern: /\$?\(\([\s\S]+?\)\)/,
1267
- greedy: !0,
1268
- inside: {
1269
- variable: [{
1270
- pattern: /(^\$\(\([\s\S]+)\)\)/,
1271
- lookbehind: !0
1272
- }, /^\$\(\(/],
1273
- number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,
1274
- operator: /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,
1275
- punctuation: /\(\(?|\)\)?|,|;/
1276
- }
1277
- },
1278
- {
1279
- pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,
1280
- greedy: !0,
1281
- inside: { variable: /^\$\(|^`|\)$|`$/ }
1282
- },
1283
- {
1284
- pattern: /\$\{[^}]+\}/,
1285
- greedy: !0,
1286
- inside: {
1287
- operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,
1288
- punctuation: /[\[\]]/,
1289
- environment: {
1290
- pattern: RegExp("(\\{)" + t),
1291
- lookbehind: !0,
1292
- alias: "constant"
1293
- }
1294
- }
1295
- },
1296
- /\$(?:\w+|[#?*!@$])/
1297
- ],
1298
- entity: /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/
1299
- };
1300
- e.languages.bash = {
1301
- shebang: {
1302
- pattern: /^#!\s*\/.*/,
1303
- alias: "important"
668
+ {
669
+ type: "string",
670
+ pattern: /'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|`(?:\\.|[^`\\])*`/y
1304
671
  },
1305
- comment: {
1306
- pattern: /(^|[^"{\\$])#.*/,
1307
- lookbehind: !0
672
+ {
673
+ type: "keyword",
674
+ pattern: /\b(?:await|async|const|let|var|return|if|else|for|while|try|catch|throw|new|import|export|from|function|class)\b/y
1308
675
  },
1309
- "function-name": [{
1310
- pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,
1311
- lookbehind: !0,
1312
- alias: "function"
1313
- }, {
1314
- pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/,
1315
- alias: "function"
1316
- }],
1317
- "for-or-select": {
1318
- pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/,
1319
- alias: "variable",
1320
- lookbehind: !0
676
+ {
677
+ type: "boolean",
678
+ pattern: /\b(?:true|false|null|undefined)\b/y
1321
679
  },
1322
- "assign-left": {
1323
- pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,
1324
- inside: { environment: {
1325
- pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + t),
1326
- lookbehind: !0,
1327
- alias: "constant"
1328
- } },
1329
- alias: "variable",
1330
- lookbehind: !0
680
+ {
681
+ type: "function",
682
+ pattern: /\b[A-Za-z_$][\w$]*(?=\s*\()/y
1331
683
  },
1332
- parameter: {
1333
- pattern: /(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,
1334
- alias: "variable",
1335
- lookbehind: !0
684
+ {
685
+ type: "number",
686
+ pattern: /\b\d+(?:\.\d+)?\b/y
1336
687
  },
1337
- string: [
1338
- {
1339
- pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,
1340
- lookbehind: !0,
1341
- greedy: !0,
1342
- inside: r
1343
- },
1344
- {
1345
- pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,
1346
- lookbehind: !0,
1347
- greedy: !0,
1348
- inside: { bash: n }
1349
- },
1350
- {
1351
- pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,
1352
- lookbehind: !0,
1353
- greedy: !0,
1354
- inside: r
1355
- },
1356
- {
1357
- pattern: /(^|[^$\\])'[^']*'/,
1358
- lookbehind: !0,
1359
- greedy: !0
1360
- },
1361
- {
1362
- pattern: /\$'(?:[^'\\]|\\[\s\S])*'/,
1363
- greedy: !0,
1364
- inside: { entity: r.entity }
1365
- }
1366
- ],
1367
- environment: {
1368
- pattern: RegExp("\\$?" + t),
1369
- alias: "constant"
688
+ {
689
+ type: "operator",
690
+ pattern: /=>|===|!==|==|!=|<=|>=|\+\+|--|&&|\|\||[+\-*/%=<>!?:]/y
1370
691
  },
1371
- variable: r.variable,
1372
- function: {
1373
- pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,
1374
- lookbehind: !0
692
+ {
693
+ type: "punctuation",
694
+ pattern: /[()[\]{}.,;]/y
695
+ }
696
+ ],
697
+ python: [
698
+ {
699
+ type: "comment",
700
+ pattern: /#.*/y
1375
701
  },
1376
- keyword: {
1377
- pattern: /(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,
1378
- lookbehind: !0
702
+ {
703
+ type: "string",
704
+ pattern: /'''[\s\S]*?'''|"""[\s\S]*?"""|'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"/y
1379
705
  },
1380
- builtin: {
1381
- pattern: /(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,
1382
- lookbehind: !0,
1383
- alias: "class-name"
706
+ {
707
+ type: "keyword",
708
+ pattern: /\b(?:import|from|as|def|class|return|if|elif|else|for|while|try|except|with|lambda|pass|None|True|False|and|or|not|in|is)\b/y
1384
709
  },
1385
- boolean: {
1386
- pattern: /(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,
1387
- lookbehind: !0
710
+ {
711
+ type: "function",
712
+ pattern: /\b[A-Za-z_]\w*(?=\s*\()/y
1388
713
  },
1389
- "file-descriptor": {
1390
- pattern: /\B&\d\b/,
1391
- alias: "important"
714
+ {
715
+ type: "number",
716
+ pattern: /\b\d+(?:\.\d+)?\b/y
1392
717
  },
1393
- operator: {
1394
- pattern: /\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,
1395
- inside: { "file-descriptor": {
1396
- pattern: /^\d/,
1397
- alias: "important"
1398
- } }
718
+ {
719
+ type: "operator",
720
+ pattern: /==|!=|<=|>=|:=|[+\-*/%=<>]/y
1399
721
  },
1400
- punctuation: /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,
1401
- number: {
1402
- pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,
1403
- lookbehind: !0
1404
- }
1405
- }, n.inside = e.languages.bash;
1406
- for (var i = [
1407
- "comment",
1408
- "function-name",
1409
- "for-or-select",
1410
- "assign-left",
1411
- "parameter",
1412
- "string",
1413
- "environment",
1414
- "function",
1415
- "keyword",
1416
- "builtin",
1417
- "boolean",
1418
- "file-descriptor",
1419
- "operator",
1420
- "punctuation",
1421
- "number"
1422
- ], a = r.variable[1].inside, o = 0; o < i.length; o++) a[i[o]] = e.languages.bash[i[o]];
1423
- e.languages.sh = e.languages.bash, e.languages.shell = e.languages.bash;
1424
- })(Prism), Prism.languages.json = {
1425
- property: {
1426
- pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
1427
- lookbehind: !0,
1428
- greedy: !0
1429
- },
1430
- string: {
1431
- pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
1432
- lookbehind: !0,
1433
- greedy: !0
1434
- },
1435
- comment: {
1436
- pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
1437
- greedy: !0
1438
- },
1439
- number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
1440
- punctuation: /[{}[\],]/,
1441
- operator: /:/,
1442
- boolean: /\b(?:false|true)\b/,
1443
- null: {
1444
- pattern: /\bnull\b/,
1445
- alias: "keyword"
1446
- }
1447
- }, Prism.languages.webmanifest = Prism.languages.json, Prism.languages.python = {
1448
- comment: {
1449
- pattern: /(^|[^\\])#.*/,
1450
- lookbehind: !0,
1451
- greedy: !0
1452
- },
1453
- "string-interpolation": {
1454
- pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,
1455
- greedy: !0,
1456
- inside: {
1457
- interpolation: {
1458
- pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,
1459
- lookbehind: !0,
1460
- inside: {
1461
- "format-spec": {
1462
- pattern: /(:)[^:(){}]+(?=\}$)/,
1463
- lookbehind: !0
1464
- },
1465
- "conversion-option": {
1466
- pattern: /![sra](?=[:}]$)/,
1467
- alias: "punctuation"
1468
- },
1469
- rest: null
1470
- }
1471
- },
1472
- string: /[\s\S]+/
722
+ {
723
+ type: "punctuation",
724
+ pattern: /[()[\]{}.,:;]/y
1473
725
  }
1474
- },
1475
- "triple-quoted-string": {
1476
- pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,
1477
- greedy: !0,
1478
- alias: "string"
1479
- },
1480
- string: {
1481
- pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,
1482
- greedy: !0
1483
- },
1484
- function: {
1485
- pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,
1486
- lookbehind: !0
1487
- },
1488
- "class-name": {
1489
- pattern: /(\bclass\s+)\w+/i,
1490
- lookbehind: !0
1491
- },
1492
- decorator: {
1493
- pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m,
1494
- lookbehind: !0,
1495
- alias: ["annotation", "punctuation"],
1496
- inside: { punctuation: /\./ }
1497
- },
1498
- keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,
1499
- builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,
1500
- boolean: /\b(?:False|None|True)\b/,
1501
- number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,
1502
- operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
1503
- punctuation: /[{}[\];(),.:]/
1504
- }, Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest = Prism.languages.python, Prism.languages.py = Prism.languages.python, Prism.languages.go = Prism.languages.extend("clike", {
1505
- string: {
1506
- pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,
1507
- lookbehind: !0,
1508
- greedy: !0
1509
- },
1510
- keyword: /\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,
1511
- boolean: /\b(?:_|false|iota|nil|true)\b/,
1512
- number: [
1513
- /\b0(?:b[01_]+|o[0-7_]+)i?\b/i,
1514
- /\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,
1515
- /(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i
1516
726
  ],
1517
- operator: /[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,
1518
- builtin: /\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/
1519
- }), Prism.languages.insertBefore("go", "string", { char: {
1520
- pattern: /'(?:\\.|[^'\\\r\n]){0,10}'/,
1521
- greedy: !0
1522
- } }), delete Prism.languages.go["class-name"];
1523
- //#endregion
1524
- //#region src/lib/highlight.tsx
1525
- var H = /* @__PURE__ */ v(pe(), 1), me = {
1526
- json: H.default.languages.json,
1527
- bash: H.default.languages.bash,
1528
- javascript: H.default.languages.javascript,
1529
- python: H.default.languages.python,
1530
- go: H.default.languages.go
727
+ go: [
728
+ {
729
+ type: "comment",
730
+ pattern: /\/\/.*|\/\*.*?\*\//y
731
+ },
732
+ {
733
+ type: "string",
734
+ pattern: /`[^`]*`|'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"/y
735
+ },
736
+ {
737
+ type: "keyword",
738
+ pattern: /\b(?:package|import|func|var|const|type|struct|interface|return|if|else|for|range|go|defer|select|case|switch|default|nil|true|false)\b/y
739
+ },
740
+ {
741
+ type: "builtin",
742
+ pattern: /\b(?:append|bool|byte|cap|close|complex64|complex128|copy|delete|error|float32|float64|int|int8|int16|int32|int64|len|make|new|panic|print|println|real|recover|rune|string|uint|uint8|uint16|uint32|uint64|uintptr)\b/y
743
+ },
744
+ {
745
+ type: "function",
746
+ pattern: /\b[A-Za-z_]\w*(?=\s*\()/y
747
+ },
748
+ {
749
+ type: "number",
750
+ pattern: /\b\d+(?:\.\d+)?\b/y
751
+ },
752
+ {
753
+ type: "operator",
754
+ pattern: /:=|==|!=|<=|>=|\+\+|--|&&|\|\||[+\-*/%=<>!&|]/y
755
+ },
756
+ {
757
+ type: "punctuation",
758
+ pattern: /[()[\]{}.,;:]/y
759
+ }
760
+ ]
1531
761
  };
1532
- function U(e, t) {
1533
- if (typeof e == "string") return e;
1534
- let n = Array.isArray(e.content) ? e.content.map((e, t) => U(e, t)) : U(e.content, 0);
1535
- return /* @__PURE__ */ c("span", {
1536
- className: `token ${e.type}`,
1537
- children: n
1538
- }, t);
762
+ function ce(e, t, n) {
763
+ for (let r of n) {
764
+ r.pattern.lastIndex = t;
765
+ let n = r.pattern.exec(e);
766
+ if (n?.index === t && n[0]) return {
767
+ type: r.type,
768
+ value: n[0]
769
+ };
770
+ }
771
+ return null;
1539
772
  }
1540
- function he(e, t) {
1541
- let n = t === "plain" ? void 0 : me[t];
1542
- return !n || !e ? e : H.default.tokenize(e, n).map((e, t) => U(e, t));
773
+ function le(e, t) {
774
+ if (t === "plain" || !e) return e;
775
+ let n = se[t], r = [], i = "", a = 0, o = 0;
776
+ for (; a < e.length;) {
777
+ let t = ce(e, a, n);
778
+ if (!t) {
779
+ i += e[a], a += 1;
780
+ continue;
781
+ }
782
+ i &&= (r.push(i), ""), r.push(/* @__PURE__ */ c("span", {
783
+ className: `token ${t.type}`,
784
+ children: t.value
785
+ }, o)), o += 1, a += t.value.length;
786
+ }
787
+ return i && r.push(i), r;
1543
788
  }
1544
789
  //#endregion
1545
790
  //#region src/components/ui/CodeBlock.tsx
1546
- var W = ({ code: e, language: t = "plain", showLineNumbers: n = !1, copyable: r = !0, maxHeight: a, reveal: o = !1, revealStagger: s = 70, className: u }) => {
1547
- let d = i(() => e.replace(/\n$/, "").split("\n"), [e]), f = String(d.length).length;
791
+ var z = ({ code: e, language: t = "plain", showLineNumbers: n = !1, copyable: r = !0, maxHeight: a, reveal: o = !1, revealStagger: s = 70, className: d }) => {
792
+ let f = i(() => e.replace(/\n$/, "").split("\n"), [e]), p = String(f.length).length;
1548
793
  return /* @__PURE__ */ l("div", {
1549
- className: y("group relative w-full overflow-hidden rounded-lg border border-border bg-surface-2", u),
794
+ className: u("group relative w-full overflow-hidden rounded-lg border border-border bg-surface-2", d),
1550
795
  children: [r && /* @__PURE__ */ c("div", {
1551
796
  className: "absolute right-2 top-2 z-10",
1552
- children: /* @__PURE__ */ c(j, {
797
+ children: /* @__PURE__ */ c(S, {
1553
798
  value: e,
1554
799
  size: "sm"
1555
800
  })
@@ -1560,23 +805,23 @@ var W = ({ code: e, language: t = "plain", showLineNumbers: n = !1, copyable: r
1560
805
  className: "w-max min-w-full p-3 font-mono text-[14px] leading-relaxed text-content",
1561
806
  children: /* @__PURE__ */ c("code", {
1562
807
  className: "flex flex-col bg-transparent p-0 text-[14px] text-content",
1563
- children: d.map((e, r) => /* @__PURE__ */ l("span", {
1564
- className: y("flex", o && "motion-safe:animate-[fade-in_0.6s_ease-out_both]"),
808
+ children: f.map((e, r) => /* @__PURE__ */ l("span", {
809
+ className: u("flex", o && "motion-safe:animate-[fade-in_0.6s_ease-out_both]"),
1565
810
  style: o ? { animationDelay: `${r * s}ms` } : void 0,
1566
811
  children: [n && /* @__PURE__ */ c("span", {
1567
812
  className: "mr-4 shrink-0 select-none text-right text-muted",
1568
- style: { width: `${f}ch` },
813
+ style: { width: `${p}ch` },
1569
814
  children: r + 1
1570
815
  }), /* @__PURE__ */ c("span", {
1571
816
  className: "whitespace-pre",
1572
- children: he(e, t) || " "
817
+ children: le(e, t) || " "
1573
818
  })]
1574
819
  }, r))
1575
820
  })
1576
821
  })
1577
822
  })]
1578
823
  });
1579
- }, ge = /* @__PURE__ */ new Set([
824
+ }, B = /* @__PURE__ */ new Set([
1580
825
  "accept-charset",
1581
826
  "accept-encoding",
1582
827
  "access-control-request-headers",
@@ -1598,7 +843,7 @@ var W = ({ code: e, language: t = "plain", showLineNumbers: n = !1, copyable: r
1598
843
  "upgrade",
1599
844
  "via"
1600
845
  ]);
1601
- function _e(e) {
846
+ function ue(e) {
1602
847
  return !e.auth || e.auth.type === "none" ? null : e.auth.type === "bearer" ? {
1603
848
  key: "Authorization",
1604
849
  value: `Bearer ${e.auth.token}`
@@ -1607,23 +852,23 @@ function _e(e) {
1607
852
  value: e.auth.value
1608
853
  };
1609
854
  }
1610
- function ve(e) {
855
+ function de(e) {
1611
856
  let t = new Headers();
1612
- for (let n of e.headers ?? []) n.key.trim() && (ge.has(n.key.trim().toLowerCase()) || t.set(n.key, n.value));
1613
- let n = _e(e);
1614
- return n && !ge.has(n.key.toLowerCase()) && t.set(n.key, n.value), t;
857
+ for (let n of e.headers ?? []) n.key.trim() && (B.has(n.key.trim().toLowerCase()) || t.set(n.key, n.value));
858
+ let n = ue(e);
859
+ return n && !B.has(n.key.toLowerCase()) && t.set(n.key, n.value), t;
1615
860
  }
1616
- function ye(e) {
861
+ function fe(e) {
1617
862
  return [...e.entries()].map(([e, t]) => ({
1618
863
  key: e,
1619
864
  value: t
1620
865
  }));
1621
866
  }
1622
- function be(e) {
867
+ function pe(e) {
1623
868
  let t = new TextEncoder().encode(e).length;
1624
869
  return t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(1)} KB` : `${(t / (1024 * 1024)).toFixed(1)} MB`;
1625
870
  }
1626
- function xe(e, t) {
871
+ function me(e, t) {
1627
872
  if (!(t?.includes("json") || /^[\s\n]*(?:\[|\{)/.test(e))) return e;
1628
873
  try {
1629
874
  return JSON.stringify(JSON.parse(e), null, 2);
@@ -1631,11 +876,11 @@ function xe(e, t) {
1631
876
  return e;
1632
877
  }
1633
878
  }
1634
- function Se(e) {
879
+ function he(e) {
1635
880
  return e instanceof Error ? e.message : "Request failed";
1636
881
  }
1637
- function G(e, t = performance.now()) {
1638
- let n = Se(e);
882
+ function V(e, t = performance.now()) {
883
+ let n = he(e);
1639
884
  return {
1640
885
  status: 0,
1641
886
  statusText: "Network Error",
@@ -1649,27 +894,27 @@ function G(e, t = performance.now()) {
1649
894
  error: n
1650
895
  };
1651
896
  }
1652
- async function Ce(e) {
897
+ async function H(e) {
1653
898
  let t = performance.now();
1654
899
  try {
1655
900
  let n = await fetch(e.url, {
1656
901
  method: e.method,
1657
- headers: ve(e),
902
+ headers: de(e),
1658
903
  body: e.body && e.method !== "GET" ? e.body : void 0
1659
- }), r = await n.text(), i = xe(r, n.headers.get("content-type"));
904
+ }), r = await n.text(), i = me(r, n.headers.get("content-type"));
1660
905
  return {
1661
906
  status: n.status,
1662
907
  statusText: n.statusText || (n.ok ? "OK" : "Error"),
1663
- headers: ye(n.headers),
908
+ headers: fe(n.headers),
1664
909
  body: i,
1665
910
  timeMs: Math.round(performance.now() - t),
1666
- size: be(r)
911
+ size: pe(r)
1667
912
  };
1668
913
  } catch (e) {
1669
- return G(e, t);
914
+ return V(e, t);
1670
915
  }
1671
916
  }
1672
- function we(e) {
917
+ function ge(e) {
1673
918
  let t = e.sampleResponse ?? JSON.stringify({
1674
919
  ok: !0,
1675
920
  request: e.title
@@ -1686,20 +931,20 @@ function we(e) {
1686
931
  }],
1687
932
  body: t,
1688
933
  timeMs: 142,
1689
- size: be(t)
934
+ size: pe(t)
1690
935
  };
1691
936
  }
1692
937
  //#endregion
1693
938
  //#region src/features/api-widget/request-model.ts
1694
- var K = "Authorization", Te = "Bearer ", Ee = [{
939
+ var U = "Authorization", _e = "Bearer ", ve = [{
1695
940
  key: "Content-Type",
1696
941
  value: "application/json",
1697
942
  enabled: !0
1698
943
  }];
1699
- function De(e) {
944
+ function ye(e) {
1700
945
  return e.type === "none" ? null : e.type === "bearer" ? {
1701
- key: K,
1702
- value: `${Te}${e.token}`,
946
+ key: U,
947
+ value: `${_e}${e.token}`,
1703
948
  enabled: !0
1704
949
  } : {
1705
950
  key: e.key,
@@ -1707,57 +952,57 @@ function De(e) {
1707
952
  enabled: !0
1708
953
  };
1709
954
  }
1710
- function q(e, t) {
955
+ function W(e, t) {
1711
956
  return e.toLowerCase() === t.toLowerCase();
1712
957
  }
1713
- function Oe(e) {
1714
- return e.toLowerCase().startsWith(Te.toLowerCase());
958
+ function be(e) {
959
+ return e.toLowerCase().startsWith(_e.toLowerCase());
1715
960
  }
1716
- function ke(e) {
1717
- return Oe(e) ? e.slice(7) : e;
961
+ function xe(e) {
962
+ return be(e) ? e.slice(7) : e;
1718
963
  }
1719
- function Ae(e) {
1720
- return e ? q(e.key, K) && Oe(e.value) ? {
964
+ function Se(e) {
965
+ return e ? W(e.key, U) && be(e.value) ? {
1721
966
  type: "bearer",
1722
- token: ke(e.value)
967
+ token: xe(e.value)
1723
968
  } : {
1724
969
  type: "apiKey",
1725
- key: e.key || K,
970
+ key: e.key || U,
1726
971
  value: e.value,
1727
972
  in: "header"
1728
973
  } : { type: "none" };
1729
974
  }
1730
- function je(e) {
1731
- return e.type === "apiKey" ? e.key : K;
975
+ function Ce(e) {
976
+ return e.type === "apiKey" ? e.key : U;
1732
977
  }
1733
- function J(e, t) {
1734
- return t.type === "none" ? q(e.key, K) : q(e.key, je(t));
978
+ function G(e, t) {
979
+ return t.type === "none" ? W(e.key, U) : W(e.key, Ce(t));
1735
980
  }
1736
- function Me(e) {
1737
- return e.auth ? e.auth : Ae(e.headers?.find((e) => q(e.key, K)));
981
+ function we(e) {
982
+ return e.auth ? e.auth : Se(e.headers?.find((e) => W(e.key, U)));
1738
983
  }
1739
- function Ne(e, t) {
1740
- let n = (e.headers?.length ? e.headers : Ee).filter((e) => !J(e, t)).map((e) => ({
984
+ function Te(e, t) {
985
+ let n = (e.headers?.length ? e.headers : ve).filter((e) => !G(e, t)).map((e) => ({
1741
986
  ...e,
1742
987
  enabled: !0
1743
- })), r = De(t);
988
+ })), r = ye(t);
1744
989
  return r ? [...n, r] : n;
1745
990
  }
1746
- function Pe(e, t, n) {
1747
- if (t.type === "none") return e.map((e) => J(e, n) || q(e.key, K) ? {
991
+ function Ee(e, t, n) {
992
+ if (t.type === "none") return e.map((e) => G(e, n) || W(e.key, U) ? {
1748
993
  ...e,
1749
994
  enabled: !1
1750
995
  } : e);
1751
- let r = De(t);
1752
- return r ? [...e.filter((e) => !J(e, n) && !J(e, t)), r] : e;
996
+ let r = ye(t);
997
+ return r ? [...e.filter((e) => !G(e, n) && !G(e, t)), r] : e;
1753
998
  }
1754
- function Fe(e, t) {
1755
- return e.filter((e) => e.enabled && e.key.trim() && !J(e, t)).map(({ key: e, value: t }) => ({
999
+ function De(e, t) {
1000
+ return e.filter((e) => e.enabled && e.key.trim() && !G(e, t)).map(({ key: e, value: t }) => ({
1756
1001
  key: e,
1757
1002
  value: t
1758
1003
  }));
1759
1004
  }
1760
- function Y(e) {
1005
+ function K(e) {
1761
1006
  return JSON.stringify({
1762
1007
  method: e.method,
1763
1008
  url: e.url,
@@ -1766,7 +1011,7 @@ function Y(e) {
1766
1011
  body: e.body ?? ""
1767
1012
  });
1768
1013
  }
1769
- function Ie(e, t) {
1014
+ function Oe(e, t) {
1770
1015
  let n = t.body.trim() ? t.body : void 0;
1771
1016
  return {
1772
1017
  ...e,
@@ -1774,18 +1019,18 @@ function Ie(e, t) {
1774
1019
  url: t.url,
1775
1020
  body: n,
1776
1021
  auth: t.auth,
1777
- headers: Fe(t.headers, t.auth)
1022
+ headers: De(t.headers, t.auth)
1778
1023
  };
1779
1024
  }
1780
1025
  //#endregion
1781
1026
  //#region src/features/api-widget/ApiConsole.tsx
1782
- var Le = "{\n \n}", X = "Authorization", Re = [
1027
+ var ke = "{\n \n}", q = "Authorization", Ae = [
1783
1028
  "GET",
1784
1029
  "POST",
1785
1030
  "PUT",
1786
1031
  "PATCH",
1787
1032
  "DELETE"
1788
- ], ze = [
1033
+ ], je = [
1789
1034
  {
1790
1035
  id: "body",
1791
1036
  label: "Body"
@@ -1798,13 +1043,13 @@ var Le = "{\n \n}", X = "Authorization", Re = [
1798
1043
  id: "auth",
1799
1044
  label: "Auth"
1800
1045
  }
1801
- ], Be = [{
1046
+ ], Me = [{
1802
1047
  id: "response",
1803
1048
  label: "Response"
1804
1049
  }, {
1805
1050
  id: "history",
1806
1051
  label: "History"
1807
- }], Ve = ["body", "headers"], He = [
1052
+ }], Ne = ["body", "headers"], Pe = [
1808
1053
  {
1809
1054
  id: "none",
1810
1055
  label: "None",
@@ -1821,38 +1066,38 @@ var Le = "{\n \n}", X = "Authorization", Re = [
1821
1066
  className: "font-semibold text-content hover:bg-surface-2"
1822
1067
  }
1823
1068
  ];
1824
- function Ue(e) {
1069
+ function Fe(e) {
1825
1070
  return Math.max(3, e.split("\n").length);
1826
1071
  }
1827
- function We(e) {
1072
+ function Ie(e) {
1828
1073
  return JSON.stringify(JSON.parse(e), null, 2);
1829
1074
  }
1830
- function Ge(e) {
1075
+ function Le(e) {
1831
1076
  try {
1832
- return We(e);
1077
+ return Ie(e);
1833
1078
  } catch {
1834
1079
  return e;
1835
1080
  }
1836
1081
  }
1837
- var Ke = ({ children: e, className: t }) => /* @__PURE__ */ c("div", {
1838
- className: y("flex min-h-10 items-center rounded-md border border-transparent bg-surface-2 px-3 text-sm text-content", "focus-within:border-primary/60 focus-within:ring-2 focus-within:ring-primary/20", t),
1082
+ var Re = ({ children: e, className: t }) => /* @__PURE__ */ c("div", {
1083
+ className: u("flex min-h-10 items-center rounded-md border border-transparent bg-surface-2 px-3 text-sm text-content", "focus-within:border-primary/60 focus-within:ring-2 focus-within:ring-primary/20", t),
1839
1084
  children: e
1840
- }), qe = ({ value: e, onChange: t }) => /* @__PURE__ */ c("div", {
1085
+ }), ze = ({ value: e, onChange: t }) => /* @__PURE__ */ c("div", {
1841
1086
  className: "inline-flex items-center gap-4",
1842
- children: Ve.map((n) => /* @__PURE__ */ c("button", {
1087
+ children: Ne.map((n) => /* @__PURE__ */ c("button", {
1843
1088
  type: "button",
1844
1089
  onClick: () => t(n),
1845
- className: y("text-xs font-medium capitalize transition-colors", e === n ? "text-content" : "text-muted hover:text-content"),
1090
+ className: u("text-xs font-medium capitalize transition-colors", e === n ? "text-content" : "text-muted hover:text-content"),
1846
1091
  children: n
1847
1092
  }, n))
1848
- }), Je = ({ method: e, url: t, isSending: n, editable: r, onMethodChange: i, onUrlChange: a, onSend: o }) => /* @__PURE__ */ l("div", {
1093
+ }), Be = ({ method: e, url: t, isSending: n, editable: r, onMethodChange: i, onUrlChange: a, onSend: o }) => /* @__PURE__ */ l("div", {
1849
1094
  className: "grid gap-3 md:grid-cols-[1fr_auto]",
1850
- children: [/* @__PURE__ */ l(Ke, {
1095
+ children: [/* @__PURE__ */ l(Re, {
1851
1096
  className: "min-w-0",
1852
- children: [/* @__PURE__ */ c(fe, {
1097
+ children: [/* @__PURE__ */ c(oe, {
1853
1098
  value: e,
1854
1099
  onChange: i,
1855
- methods: Re,
1100
+ methods: Ae,
1856
1101
  disabled: !r
1857
1102
  }), /* @__PURE__ */ c("input", {
1858
1103
  value: t,
@@ -1861,24 +1106,24 @@ var Ke = ({ children: e, className: t }) => /* @__PURE__ */ c("div", {
1861
1106
  "aria-label": "Request URL",
1862
1107
  className: "min-w-0 flex-1 bg-transparent px-2 py-2 font-mono text-[14px] text-muted outline-none read-only:cursor-default"
1863
1108
  })]
1864
- }), /* @__PURE__ */ c(T, {
1109
+ }), /* @__PURE__ */ c(g, {
1865
1110
  size: "md",
1866
1111
  variant: "primary",
1867
1112
  isLoading: n,
1868
1113
  onClick: o,
1869
- rightIcon: /* @__PURE__ */ c(x, {
1114
+ rightIcon: /* @__PURE__ */ c(f, {
1870
1115
  name: "send",
1871
1116
  className: "h-4 w-4"
1872
1117
  }),
1873
1118
  className: "min-h-10 px-7",
1874
1119
  children: "Send"
1875
1120
  })]
1876
- }), Ye = ({ header: e, index: t, editable: n, onUpdate: r, onRemove: i }) => /* @__PURE__ */ l("div", {
1121
+ }), Ve = ({ header: e, index: t, editable: n, onUpdate: r, onRemove: i }) => /* @__PURE__ */ l("div", {
1877
1122
  className: "grid grid-cols-[auto_1fr_auto] gap-3 md:grid-cols-[auto_1fr_1fr_auto]",
1878
1123
  children: [
1879
1124
  /* @__PURE__ */ c("span", {
1880
1125
  className: "flex h-8 items-center",
1881
- children: /* @__PURE__ */ c(te, {
1126
+ children: /* @__PURE__ */ c(k, {
1882
1127
  size: "sm",
1883
1128
  checked: e.enabled,
1884
1129
  onChange: (e) => r(t, { enabled: e }),
@@ -1886,7 +1131,7 @@ var Ke = ({ children: e, className: t }) => /* @__PURE__ */ c("div", {
1886
1131
  "aria-label": `Enable ${e.key}`
1887
1132
  })
1888
1133
  }),
1889
- /* @__PURE__ */ c(V, {
1134
+ /* @__PURE__ */ c(P, {
1890
1135
  size: "sm",
1891
1136
  value: e.key,
1892
1137
  onChange: (e) => r(t, { key: e.target.value }),
@@ -1894,7 +1139,7 @@ var Ke = ({ children: e, className: t }) => /* @__PURE__ */ c("div", {
1894
1139
  "aria-label": "Header name",
1895
1140
  className: "font-mono"
1896
1141
  }),
1897
- /* @__PURE__ */ c(V, {
1142
+ /* @__PURE__ */ c(P, {
1898
1143
  size: "sm",
1899
1144
  value: e.value,
1900
1145
  onChange: (e) => r(t, { value: e.target.value }),
@@ -1909,13 +1154,13 @@ var Ke = ({ children: e, className: t }) => /* @__PURE__ */ c("div", {
1909
1154
  onClick: () => i(t),
1910
1155
  disabled: !n,
1911
1156
  className: "row-span-2 inline-flex h-8 w-8 items-center justify-center rounded-md text-muted transition-colors hover:bg-surface-2 hover:text-content disabled:cursor-not-allowed disabled:opacity-40 md:row-span-1",
1912
- children: /* @__PURE__ */ c(x, {
1157
+ children: /* @__PURE__ */ c(f, {
1913
1158
  name: "trash",
1914
1159
  className: "h-4 w-4"
1915
1160
  })
1916
1161
  })
1917
1162
  ]
1918
- }), Xe = ({ body: e, error: t, editable: n, onBodyChange: r, onClearError: i }) => /* @__PURE__ */ l("div", {
1163
+ }), He = ({ body: e, error: t, editable: n, onBodyChange: r, onClearError: i }) => /* @__PURE__ */ l("div", {
1919
1164
  className: "space-y-2",
1920
1165
  children: [t && /* @__PURE__ */ c("div", {
1921
1166
  className: "text-xs text-muted",
@@ -1928,16 +1173,16 @@ var Ke = ({ children: e, className: t }) => /* @__PURE__ */ c("div", {
1928
1173
  readOnly: !n,
1929
1174
  "aria-label": "Request body",
1930
1175
  spellCheck: !1,
1931
- rows: Ue(e),
1932
- className: y("w-full resize-none overflow-hidden rounded-lg border border-border bg-surface-2 p-3 [field-sizing:content]", "font-mono text-[13px] leading-relaxed text-content outline-none placeholder:text-muted read-only:cursor-default")
1176
+ rows: Fe(e),
1177
+ className: u("w-full resize-none overflow-hidden rounded-lg border border-border bg-surface-2 p-3 [field-sizing:content]", "font-mono text-[13px] leading-relaxed text-content outline-none placeholder:text-muted read-only:cursor-default")
1933
1178
  })]
1934
- }), Ze = ({ auth: e, editable: t, onChange: n }) => {
1179
+ }), Ue = ({ auth: e, editable: t, onChange: n }) => {
1935
1180
  let [r, i] = o(!1), a = /* @__PURE__ */ c("button", {
1936
1181
  type: "button",
1937
1182
  "aria-label": r ? "Hide secret" : "Show secret",
1938
1183
  onClick: () => i((e) => !e),
1939
1184
  className: "inline-flex h-6 w-6 items-center justify-center rounded-md text-muted transition-colors hover:text-content",
1940
- children: /* @__PURE__ */ c(x, {
1185
+ children: /* @__PURE__ */ c(f, {
1941
1186
  name: r ? "eye-closed" : "eye",
1942
1187
  className: "h-4 w-4"
1943
1188
  })
@@ -1945,7 +1190,7 @@ var Ke = ({ children: e, className: t }) => /* @__PURE__ */ c("div", {
1945
1190
  return /* @__PURE__ */ l("div", {
1946
1191
  className: "grid items-start gap-3 md:grid-cols-[auto_1fr]",
1947
1192
  children: [
1948
- /* @__PURE__ */ c(ce, {
1193
+ /* @__PURE__ */ c(L, {
1949
1194
  value: e.type,
1950
1195
  onChange: (t) => {
1951
1196
  t === "none" && n({ type: "none" }), t === "bearer" && n({
@@ -1953,12 +1198,12 @@ var Ke = ({ children: e, className: t }) => /* @__PURE__ */ c("div", {
1953
1198
  token: e.type === "bearer" ? e.token : ""
1954
1199
  }), t === "apiKey" && n({
1955
1200
  type: "apiKey",
1956
- key: e.type === "apiKey" ? e.key : X,
1201
+ key: e.type === "apiKey" ? e.key : q,
1957
1202
  value: e.type === "apiKey" ? e.value : "",
1958
1203
  in: "header"
1959
1204
  });
1960
1205
  },
1961
- items: He,
1206
+ items: Pe,
1962
1207
  size: "md",
1963
1208
  disabled: !t,
1964
1209
  minWidthClassName: "min-w-28"
@@ -1967,7 +1212,7 @@ var Ke = ({ children: e, className: t }) => /* @__PURE__ */ c("div", {
1967
1212
  className: "rounded-lg border border-border bg-surface-2 p-2.5 text-xs text-muted",
1968
1213
  children: "Auth is disabled for this request."
1969
1214
  }),
1970
- e.type === "bearer" && /* @__PURE__ */ c(V, {
1215
+ e.type === "bearer" && /* @__PURE__ */ c(P, {
1971
1216
  size: "sm",
1972
1217
  type: r ? "text" : "password",
1973
1218
  value: e.token,
@@ -1981,7 +1226,7 @@ var Ke = ({ children: e, className: t }) => /* @__PURE__ */ c("div", {
1981
1226
  }),
1982
1227
  e.type === "apiKey" && /* @__PURE__ */ l("div", {
1983
1228
  className: "grid gap-3 md:grid-cols-[minmax(0,0.7fr)_minmax(0,1fr)]",
1984
- children: [/* @__PURE__ */ c(V, {
1229
+ children: [/* @__PURE__ */ c(P, {
1985
1230
  size: "sm",
1986
1231
  value: e.key,
1987
1232
  onChange: (t) => n({
@@ -1992,7 +1237,7 @@ var Ke = ({ children: e, className: t }) => /* @__PURE__ */ c("div", {
1992
1237
  }),
1993
1238
  readOnly: !t,
1994
1239
  className: "font-mono"
1995
- }), /* @__PURE__ */ c(V, {
1240
+ }), /* @__PURE__ */ c(P, {
1996
1241
  size: "sm",
1997
1242
  type: r ? "text" : "password",
1998
1243
  value: e.value,
@@ -2009,19 +1254,19 @@ var Ke = ({ children: e, className: t }) => /* @__PURE__ */ c("div", {
2009
1254
  })
2010
1255
  ]
2011
1256
  });
2012
- }, Qe = ({ activeTab: e, auth: t, headers: n, body: r, bodyError: i, editable: a, onAuthChange: o, onHeaderUpdate: s, onHeaderRemove: u, onHeaderAdd: d, onBodyChange: f, onBodyErrorClear: p }) => e === "body" ? /* @__PURE__ */ c(Xe, {
1257
+ }, We = ({ activeTab: e, auth: t, headers: n, body: r, bodyError: i, editable: a, onAuthChange: o, onHeaderUpdate: s, onHeaderRemove: u, onHeaderAdd: d, onBodyChange: p, onBodyErrorClear: m }) => e === "body" ? /* @__PURE__ */ c(He, {
2013
1258
  body: r,
2014
1259
  error: i,
2015
1260
  editable: a,
2016
- onBodyChange: f,
2017
- onClearError: p
2018
- }) : e === "auth" ? /* @__PURE__ */ c(Ze, {
1261
+ onBodyChange: p,
1262
+ onClearError: m
1263
+ }) : e === "auth" ? /* @__PURE__ */ c(Ue, {
2019
1264
  auth: t,
2020
1265
  editable: a,
2021
1266
  onChange: o
2022
1267
  }) : /* @__PURE__ */ l("div", {
2023
1268
  className: "space-y-2.5",
2024
- children: [n.map((e, t) => /* @__PURE__ */ c(Ye, {
1269
+ children: [n.map((e, t) => /* @__PURE__ */ c(Ve, {
2025
1270
  header: e,
2026
1271
  index: t,
2027
1272
  editable: a,
@@ -2032,19 +1277,19 @@ var Ke = ({ children: e, className: t }) => /* @__PURE__ */ c("div", {
2032
1277
  onClick: d,
2033
1278
  disabled: !a,
2034
1279
  className: "inline-flex items-center gap-1.5 rounded-md px-1 py-1 text-xs font-medium text-primary transition-colors hover:text-primary-hover disabled:cursor-not-allowed disabled:opacity-40",
2035
- children: [/* @__PURE__ */ c(x, {
1280
+ children: [/* @__PURE__ */ c(f, {
2036
1281
  name: "plus",
2037
1282
  className: "h-4 w-4"
2038
1283
  }), "Add header"]
2039
1284
  })]
2040
- }), $e = ({ responsePanel: e, response: t }) => {
1285
+ }), Ge = ({ responsePanel: e, response: t }) => {
2041
1286
  let n = e === "body", r = t.headers.map((e) => `${e.key}: ${e.value}`).join("\n"), i = n ? t.body : r || "No response headers";
2042
1287
  return /* @__PURE__ */ l("div", {
2043
1288
  className: "relative p-3",
2044
1289
  children: [/* @__PURE__ */ l("div", {
2045
1290
  className: "absolute right-5 top-5 z-10 flex items-center gap-1",
2046
1291
  children: [
2047
- /* @__PURE__ */ c(O, {
1292
+ /* @__PURE__ */ c(y, {
2048
1293
  "aria-label": "Download response",
2049
1294
  variant: "surface",
2050
1295
  size: "sm",
@@ -2052,12 +1297,12 @@ var Ke = ({ children: e, className: t }) => /* @__PURE__ */ c("div", {
2052
1297
  let e = new Blob([i], { type: n ? "application/json" : "text/plain" }), t = URL.createObjectURL(e), r = document.createElement("a");
2053
1298
  r.href = t, r.download = n ? "response.json" : "response-headers.txt", r.click(), URL.revokeObjectURL(t);
2054
1299
  },
2055
- children: /* @__PURE__ */ c(x, {
1300
+ children: /* @__PURE__ */ c(f, {
2056
1301
  name: "download",
2057
1302
  size: 14
2058
1303
  })
2059
1304
  }),
2060
- /* @__PURE__ */ c(O, {
1305
+ /* @__PURE__ */ c(y, {
2061
1306
  "aria-label": "Share response",
2062
1307
  variant: "surface",
2063
1308
  size: "sm",
@@ -2070,17 +1315,17 @@ var Ke = ({ children: e, className: t }) => /* @__PURE__ */ c("div", {
2070
1315
  } catch {}
2071
1316
  else await navigator.clipboard?.writeText(i);
2072
1317
  },
2073
- children: /* @__PURE__ */ c(x, {
1318
+ children: /* @__PURE__ */ c(f, {
2074
1319
  name: "share",
2075
1320
  size: 14
2076
1321
  })
2077
1322
  }),
2078
- /* @__PURE__ */ c(j, {
1323
+ /* @__PURE__ */ c(S, {
2079
1324
  value: i,
2080
1325
  size: "sm"
2081
1326
  })
2082
1327
  ]
2083
- }), /* @__PURE__ */ c(W, {
1328
+ }), /* @__PURE__ */ c(z, {
2084
1329
  code: i,
2085
1330
  language: n ? "json" : "plain",
2086
1331
  copyable: !1,
@@ -2089,17 +1334,17 @@ var Ke = ({ children: e, className: t }) => /* @__PURE__ */ c("div", {
2089
1334
  })]
2090
1335
  });
2091
1336
  };
2092
- function et(e) {
1337
+ function Ke(e) {
2093
1338
  let t = Math.max(0, Math.round((Date.now() - e) / 1e3));
2094
1339
  if (t < 5) return "just now";
2095
1340
  if (t < 60) return `${t}s ago`;
2096
1341
  let n = Math.round(t / 60);
2097
1342
  return n < 60 ? `${n}m ago` : `${Math.round(n / 60)}h ago`;
2098
1343
  }
2099
- var tt = ({ entries: e, onSelect: t, onClear: n }) => e.length === 0 ? /* @__PURE__ */ l("div", {
1344
+ var qe = ({ entries: e, onSelect: t, onClear: n }) => e.length === 0 ? /* @__PURE__ */ l("div", {
2100
1345
  className: "flex flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-border px-6 py-10 text-center",
2101
1346
  children: [
2102
- /* @__PURE__ */ c(x, {
1347
+ /* @__PURE__ */ c(f, {
2103
1348
  name: "restart",
2104
1349
  className: "h-6 w-6 text-muted"
2105
1350
  }),
@@ -2138,7 +1383,7 @@ var tt = ({ entries: e, onSelect: t, onClear: n }) => e.length === 0 ? /* @__PUR
2138
1383
  onClick: () => t(e),
2139
1384
  className: "flex w-full items-center gap-3 px-3 py-2.5 text-left transition-colors hover:bg-surface-2",
2140
1385
  children: [
2141
- /* @__PURE__ */ c(F, {
1386
+ /* @__PURE__ */ c(E, {
2142
1387
  method: e.request.method,
2143
1388
  className: "shrink-0"
2144
1389
  }),
@@ -2146,7 +1391,7 @@ var tt = ({ entries: e, onSelect: t, onClear: n }) => e.length === 0 ? /* @__PUR
2146
1391
  className: "min-w-0 flex-1 truncate font-mono text-[13px] text-content",
2147
1392
  children: e.request.url
2148
1393
  }),
2149
- /* @__PURE__ */ c(I, {
1394
+ /* @__PURE__ */ c(D, {
2150
1395
  status: e.response.status,
2151
1396
  statusText: e.response.statusText,
2152
1397
  className: "shrink-0"
@@ -2157,40 +1402,40 @@ var tt = ({ entries: e, onSelect: t, onClear: n }) => e.length === 0 ? /* @__PUR
2157
1402
  }),
2158
1403
  /* @__PURE__ */ c("span", {
2159
1404
  className: "hidden shrink-0 text-xs text-muted md:inline",
2160
- children: et(e.at)
1405
+ children: Ke(e.at)
2161
1406
  })
2162
1407
  ]
2163
1408
  })
2164
- }, Y(e.request)))
1409
+ }, K(e.request)))
2165
1410
  })]
2166
1411
  });
2167
- async function nt(e, t) {
1412
+ async function Je(e, t) {
2168
1413
  let n = performance.now();
2169
1414
  try {
2170
- return t ? await t(e) : await Ce(e);
1415
+ return t ? await t(e) : await H(e);
2171
1416
  } catch (e) {
2172
- return G(e, n);
1417
+ return V(e, n);
2173
1418
  }
2174
1419
  }
2175
- var rt = ({ request: e, onRequestChange: t, onSend: n, editable: r = !0, onBack: a, onImport: u, className: d }) => {
2176
- let f = i(() => Me(e), [e]), p = i(() => Ne(e, f), [e, f]), m = Ge(e.body ?? Le), h = e.body ?? "", [g, _] = o("body"), [v, b] = o("response"), [S, C] = o("body"), [w, E] = o(!1), [D, O] = o([]), [k, A] = o(null), [j, M] = o(null), N = i(() => we(e), [e]), P = j ?? N, F = p.filter((e) => e.enabled).length, L = ze.map((e) => e.id === "headers" ? {
1420
+ var Ye = ({ request: e, onRequestChange: t, onSend: n, title: r, editable: d = !0, onBack: p, onImport: m, className: h }) => {
1421
+ let _ = i(() => we(e), [e]), v = i(() => Te(e, _), [e, _]), y = Le(e.body ?? ke), b = e.body ?? "", [x, S] = o("body"), [C, w] = o("response"), [T, E] = o("body"), [ee, O] = o(!1), [te, k] = o([]), [ne, M] = o(null), [re, N] = o(null), P = a(null), F = i(() => ge(e), [e]), I = re ?? F, L = v.filter((e) => e.enabled).length, ie = je.map((e) => e.id === "headers" ? {
2177
1422
  ...e,
2178
- badge: F
1423
+ badge: L
2179
1424
  } : e), R = (n) => {
2180
- if (!r) return;
2181
- let i = Ie(e, {
1425
+ if (!d) return;
1426
+ let r = Oe(e, {
2182
1427
  method: e.method,
2183
1428
  url: e.url,
2184
- body: h,
2185
- auth: f,
2186
- headers: p,
1429
+ body: b,
1430
+ auth: _,
1431
+ headers: v,
2187
1432
  ...n
2188
1433
  });
2189
- t?.(i);
1434
+ t?.(r);
2190
1435
  };
2191
1436
  return /* @__PURE__ */ l("div", {
2192
- className: y("space-y-3", d),
2193
- children: [/* @__PURE__ */ l(z, {
1437
+ className: u("space-y-3", h),
1438
+ children: [/* @__PURE__ */ l(A, {
2194
1439
  flush: !0,
2195
1440
  children: [
2196
1441
  /* @__PURE__ */ l("div", {
@@ -2199,75 +1444,80 @@ var rt = ({ request: e, onRequestChange: t, onSend: n, editable: r = !0, onBack:
2199
1444
  className: "mb-4 flex items-center justify-between gap-3",
2200
1445
  children: [/* @__PURE__ */ l("div", {
2201
1446
  className: "flex min-w-0 items-center gap-3",
2202
- children: [a && /* @__PURE__ */ c("button", {
1447
+ children: [p && /* @__PURE__ */ c("button", {
2203
1448
  type: "button",
2204
1449
  "aria-label": "Back to request snippets",
2205
- onClick: a,
1450
+ onClick: p,
2206
1451
  className: "inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-content transition-colors hover:bg-surface-2",
2207
- children: /* @__PURE__ */ c(x, {
1452
+ children: /* @__PURE__ */ c(f, {
2208
1453
  name: "arrow-left",
2209
1454
  className: "h-5 w-5"
2210
1455
  })
2211
1456
  }), /* @__PURE__ */ c("div", {
2212
- className: "font-heading text-sm font-semibold text-content",
2213
- children: "Try it Out"
1457
+ className: "truncate font-heading text-sm font-semibold text-content",
1458
+ children: r ?? "Try it Out"
2214
1459
  })]
2215
- }), r && u && /* @__PURE__ */ c(T, {
1460
+ }), d && m && /* @__PURE__ */ c(g, {
2216
1461
  type: "button",
2217
1462
  size: "sm",
2218
1463
  variant: "ghost",
2219
- onClick: u,
2220
- leftIcon: /* @__PURE__ */ c(x, {
1464
+ onClick: m,
1465
+ leftIcon: /* @__PURE__ */ c(f, {
2221
1466
  name: "download",
2222
1467
  className: "h-4 w-4"
2223
1468
  }),
2224
1469
  children: "Import"
2225
1470
  })]
2226
- }), /* @__PURE__ */ c(Je, {
1471
+ }), /* @__PURE__ */ c(Be, {
2227
1472
  method: e.method,
2228
1473
  url: e.url,
2229
- isSending: w,
2230
- editable: r,
1474
+ isSending: ee,
1475
+ editable: d,
2231
1476
  onMethodChange: (e) => R({ method: e }),
2232
1477
  onUrlChange: (e) => R({ url: e }),
2233
1478
  onSend: async () => {
2234
- let t = Ie(e, {
1479
+ let t = Oe(e, {
2235
1480
  method: e.method,
2236
1481
  url: e.url,
2237
- body: h,
2238
- auth: f,
2239
- headers: p
2240
- }), r = Y(t);
2241
- E(!0);
2242
- let i = await nt(t, n);
2243
- E(!1), M(i), b("response"), O((e) => [{
1482
+ body: b,
1483
+ auth: _,
1484
+ headers: v
1485
+ }), r = K(t);
1486
+ O(!0);
1487
+ let i = await Je(t, n);
1488
+ O(!1), N(i), w("response"), window.requestAnimationFrame(() => {
1489
+ P.current?.scrollIntoView({
1490
+ behavior: "smooth",
1491
+ block: "center"
1492
+ });
1493
+ }), k((e) => [{
2244
1494
  request: t,
2245
1495
  response: i,
2246
1496
  at: Date.now()
2247
- }, ...e.filter((e) => Y(e.request) !== r)].slice(0, 25));
1497
+ }, ...e.filter((e) => K(e.request) !== r)].slice(0, 25));
2248
1498
  }
2249
1499
  })]
2250
1500
  }),
2251
1501
  /* @__PURE__ */ l("div", {
2252
1502
  className: "flex items-center justify-between gap-3 border-y border-border px-3",
2253
- children: [/* @__PURE__ */ c(B, {
2254
- items: L,
2255
- activeId: g,
2256
- onChange: (e) => _(e),
1503
+ children: [/* @__PURE__ */ c(j, {
1504
+ items: ie,
1505
+ activeId: x,
1506
+ onChange: (e) => S(e),
2257
1507
  className: "border-b-0"
2258
- }), g === "body" && /* @__PURE__ */ c(T, {
1508
+ }), x === "body" && /* @__PURE__ */ c(g, {
2259
1509
  type: "button",
2260
1510
  size: "sm",
2261
1511
  variant: "ghost",
2262
1512
  onClick: () => {
2263
1513
  try {
2264
- R({ body: We(m) }), A(null);
1514
+ R({ body: Ie(y) }), M(null);
2265
1515
  } catch {
2266
- A("Invalid JSON");
1516
+ M("Invalid JSON");
2267
1517
  }
2268
1518
  },
2269
- disabled: !r,
2270
- leftIcon: /* @__PURE__ */ c(x, {
1519
+ disabled: !d,
1520
+ leftIcon: /* @__PURE__ */ c(f, {
2271
1521
  name: "magic",
2272
1522
  className: "h-4 w-4"
2273
1523
  }),
@@ -2276,107 +1526,110 @@ var rt = ({ request: e, onRequestChange: t, onSend: n, editable: r = !0, onBack:
2276
1526
  }),
2277
1527
  /* @__PURE__ */ c("div", {
2278
1528
  className: "p-3",
2279
- children: /* @__PURE__ */ c(Qe, {
2280
- activeTab: g,
2281
- auth: f,
2282
- headers: p,
2283
- body: m,
2284
- bodyError: k,
2285
- editable: r,
1529
+ children: /* @__PURE__ */ c(We, {
1530
+ activeTab: x,
1531
+ auth: _,
1532
+ headers: v,
1533
+ body: y,
1534
+ bodyError: ne,
1535
+ editable: d,
2286
1536
  onAuthChange: (e) => {
2287
1537
  R({
2288
1538
  auth: e,
2289
- headers: Pe(p, e, f)
1539
+ headers: Ee(v, e, _)
2290
1540
  });
2291
1541
  },
2292
1542
  onHeaderUpdate: (e, t) => {
2293
- let n = p[e], r = p.map((n, r) => r === e ? {
1543
+ let n = v[e], r = v.map((n, r) => r === e ? {
2294
1544
  ...n,
2295
1545
  ...t
2296
1546
  } : n), i = r[e];
2297
1547
  R({
2298
- auth: i && (n && J(n, f) || J(i, f) || q(i.key, X)) ? i.enabled ? Ae(i) : { type: "none" } : f,
1548
+ auth: i && (n && G(n, _) || G(i, _) || W(i.key, q)) ? i.enabled ? Se(i) : { type: "none" } : _,
2299
1549
  headers: r
2300
1550
  });
2301
1551
  },
2302
1552
  onHeaderRemove: (e) => {
2303
- let t = p[e];
1553
+ let t = v[e];
2304
1554
  R({
2305
- auth: t && (J(t, f) || q(t.key, X)) ? { type: "none" } : f,
2306
- headers: p.filter((t, n) => n !== e)
1555
+ auth: t && (G(t, _) || W(t.key, q)) ? { type: "none" } : _,
1556
+ headers: v.filter((t, n) => n !== e)
2307
1557
  });
2308
1558
  },
2309
1559
  onHeaderAdd: () => {
2310
- R({ headers: [...p, {
1560
+ R({ headers: [...v, {
2311
1561
  key: "",
2312
1562
  value: "",
2313
1563
  enabled: !0
2314
1564
  }] });
2315
1565
  },
2316
1566
  onBodyChange: (e) => R({ body: e }),
2317
- onBodyErrorClear: () => A(null)
1567
+ onBodyErrorClear: () => M(null)
2318
1568
  })
2319
1569
  })
2320
1570
  ]
2321
- }), /* @__PURE__ */ l(z, {
2322
- flush: !0,
2323
- children: [/* @__PURE__ */ l("div", {
2324
- className: "flex flex-wrap items-center justify-between gap-3 border-b border-border px-3",
2325
- children: [/* @__PURE__ */ c(B, {
2326
- items: Be,
2327
- activeId: v,
2328
- onChange: (e) => b(e),
2329
- className: "border-b-0"
2330
- }), v === "response" && /* @__PURE__ */ c(qe, {
2331
- value: S,
2332
- onChange: C
1571
+ }), /* @__PURE__ */ c("div", {
1572
+ ref: P,
1573
+ children: /* @__PURE__ */ l(A, {
1574
+ flush: !0,
1575
+ children: [/* @__PURE__ */ l("div", {
1576
+ className: "flex flex-wrap items-center justify-between gap-3 border-b border-border px-3",
1577
+ children: [/* @__PURE__ */ c(j, {
1578
+ items: Me,
1579
+ activeId: C,
1580
+ onChange: (e) => w(e),
1581
+ className: "border-b-0"
1582
+ }), C === "response" && /* @__PURE__ */ c(ze, {
1583
+ value: T,
1584
+ onChange: E
1585
+ })]
1586
+ }), C === "response" ? /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ l("div", {
1587
+ className: "flex flex-wrap items-center gap-5 border-b border-border px-3 py-3 text-xs text-muted",
1588
+ children: [
1589
+ /* @__PURE__ */ c(D, {
1590
+ status: I.status,
1591
+ statusText: I.statusText
1592
+ }),
1593
+ /* @__PURE__ */ l("span", { children: [I.timeMs, "ms"] }),
1594
+ /* @__PURE__ */ c("span", { children: I.size })
1595
+ ]
1596
+ }), /* @__PURE__ */ c(Ge, {
1597
+ responsePanel: T,
1598
+ response: I
1599
+ })] }) : /* @__PURE__ */ c("div", {
1600
+ className: "p-3",
1601
+ children: /* @__PURE__ */ c(qe, {
1602
+ entries: te,
1603
+ onSelect: (e) => {
1604
+ t?.(e.request), N(e.response), w("response");
1605
+ },
1606
+ onClear: () => k([])
1607
+ })
2333
1608
  })]
2334
- }), v === "response" ? /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ l("div", {
2335
- className: "flex flex-wrap items-center gap-5 border-b border-border px-3 py-3 text-xs text-muted",
2336
- children: [
2337
- /* @__PURE__ */ c(I, {
2338
- status: P.status,
2339
- statusText: P.statusText
2340
- }),
2341
- /* @__PURE__ */ l("span", { children: [P.timeMs, "ms"] }),
2342
- /* @__PURE__ */ c("span", { children: P.size })
2343
- ]
2344
- }), /* @__PURE__ */ c($e, {
2345
- responsePanel: S,
2346
- response: P
2347
- })] }) : /* @__PURE__ */ c("div", {
2348
- className: "p-3",
2349
- children: /* @__PURE__ */ c(tt, {
2350
- entries: D,
2351
- onSelect: (e) => {
2352
- t?.(e.request), M(e.response), b("response");
2353
- },
2354
- onClear: () => O([])
2355
- })
2356
- })]
1609
+ })
2357
1610
  })]
2358
1611
  });
2359
- }, it = [
1612
+ }, Xe = [
2360
1613
  "GET",
2361
1614
  "POST",
2362
1615
  "PUT",
2363
1616
  "PATCH",
2364
1617
  "DELETE"
2365
- ], at = /* @__PURE__ */ new Set([
1618
+ ], Ze = /* @__PURE__ */ new Set([
2366
1619
  "-d",
2367
1620
  "--data",
2368
1621
  "--data-raw",
2369
1622
  "--data-binary",
2370
1623
  "--data-ascii"
2371
- ]), ot = /* @__PURE__ */ new Set(["-H", "--header"]), st = /* @__PURE__ */ new Set(["-X", "--request"]), ct = /* @__PURE__ */ new Set(["--url"]), lt = "authorization", ut = "Bearer ";
2372
- function dt(e) {
1624
+ ]), Qe = /* @__PURE__ */ new Set(["-H", "--header"]), $e = /* @__PURE__ */ new Set(["-X", "--request"]), et = /* @__PURE__ */ new Set(["--url"]), tt = "authorization", nt = "Bearer ";
1625
+ function rt(e) {
2373
1626
  return e.replace(/\\\s*\n\s*/g, " ").trim();
2374
1627
  }
2375
- function ft(e) {
1628
+ function it(e) {
2376
1629
  return e.trim().replace(/^```(?:bash|sh|shell|zsh|curl)?\s*/i, "").replace(/\s*```$/i, "").replace(/^\s*[$>]\s*/gm, "").replace(/\\n/g, "\n").replace(/\\"/g, "\"").replace(/\\'/g, "'");
2377
1630
  }
2378
- function pt(e) {
2379
- let t = [], n = "", r = null, i = !1, a = dt(ft(e)), o = () => {
1631
+ function at(e) {
1632
+ let t = [], n = "", r = null, i = !1, a = rt(it(e)), o = () => {
2380
1633
  n &&= (t.push(n), "");
2381
1634
  };
2382
1635
  for (let e = 0; e < a.length; e++) {
@@ -2410,30 +1663,30 @@ function pt(e) {
2410
1663
  }
2411
1664
  return i && (n += "\\"), o(), t;
2412
1665
  }
2413
- function mt(e) {
1666
+ function ot(e) {
2414
1667
  let t = e.findIndex((e) => e === "curl" || e.endsWith("/curl"));
2415
1668
  return t >= 0 ? e.slice(t + 1) : e;
2416
1669
  }
2417
- function ht(e) {
1670
+ function st(e) {
2418
1671
  return /^(?:https?:\/\/\S+|\/\S*|[A-Za-z0-9.-]+\.[A-Za-z]{2,}\S*)$/.test(e);
2419
1672
  }
2420
- function Z(e) {
1673
+ function J(e) {
2421
1674
  return e.startsWith("http://") || e.startsWith("https://") || e.startsWith("/") ? e : `https://${e}`;
2422
1675
  }
2423
- function gt(e) {
1676
+ function ct(e) {
2424
1677
  let t = e.toUpperCase();
2425
- return it.includes(t) ? t : null;
1678
+ return Xe.includes(t) ? t : null;
2426
1679
  }
2427
- function _t(e) {
1680
+ function lt(e) {
2428
1681
  let t = e.indexOf(":");
2429
1682
  return t < 0 ? null : {
2430
1683
  key: e.slice(0, t).trim(),
2431
1684
  value: e.slice(t + 1).trim()
2432
1685
  };
2433
1686
  }
2434
- function vt(e) {
2435
- let t = e.find((e) => e.key.toLowerCase() === lt);
2436
- if (t) return t.value.toLowerCase().startsWith(ut.toLowerCase()) ? {
1687
+ function ut(e) {
1688
+ let t = e.find((e) => e.key.toLowerCase() === tt);
1689
+ if (t) return t.value.toLowerCase().startsWith(nt.toLowerCase()) ? {
2437
1690
  type: "bearer",
2438
1691
  token: t.value.slice(7)
2439
1692
  } : {
@@ -2443,72 +1696,72 @@ function vt(e) {
2443
1696
  in: "header"
2444
1697
  };
2445
1698
  }
2446
- function yt(e) {
1699
+ function dt(e) {
2447
1700
  try {
2448
1701
  return JSON.stringify(JSON.parse(e), null, 2);
2449
1702
  } catch {
2450
1703
  return e;
2451
1704
  }
2452
1705
  }
2453
- function Q(e) {
2454
- let t = mt(pt(e));
1706
+ function Y(e) {
1707
+ let t = ot(at(e));
2455
1708
  if (t.length === 0) return null;
2456
1709
  let n = [], r = [], i = null, a = "";
2457
1710
  for (let e = 0; e < t.length; e++) {
2458
1711
  let o = t[e], s = t[e + 1];
2459
- if (st.has(o) && s) {
2460
- i = gt(s) ?? i, e++;
1712
+ if ($e.has(o) && s) {
1713
+ i = ct(s) ?? i, e++;
2461
1714
  continue;
2462
1715
  }
2463
1716
  if (o.startsWith("-X") && o.length > 2) {
2464
- i = gt(o.slice(2)) ?? i;
1717
+ i = ct(o.slice(2)) ?? i;
2465
1718
  continue;
2466
1719
  }
2467
- if (ot.has(o) && s) {
2468
- let t = _t(s);
1720
+ if (Qe.has(o) && s) {
1721
+ let t = lt(s);
2469
1722
  t && n.push(t), e++;
2470
1723
  continue;
2471
1724
  }
2472
1725
  if (o.startsWith("-H") && o.length > 2) {
2473
- let e = _t(o.slice(2));
1726
+ let e = lt(o.slice(2));
2474
1727
  e && n.push(e);
2475
1728
  continue;
2476
1729
  }
2477
- if (at.has(o) && s !== void 0) {
1730
+ if (Ze.has(o) && s !== void 0) {
2478
1731
  r.push(s), e++;
2479
1732
  continue;
2480
1733
  }
2481
- let c = [...at].find((e) => o.startsWith(`${e}=`));
1734
+ let c = [...Ze].find((e) => o.startsWith(`${e}=`));
2482
1735
  if (c) {
2483
1736
  r.push(o.slice(c.length + 1));
2484
1737
  continue;
2485
1738
  }
2486
- if (ct.has(o) && s) {
2487
- a = Z(s), e++;
1739
+ if (et.has(o) && s) {
1740
+ a = J(s), e++;
2488
1741
  continue;
2489
1742
  }
2490
1743
  if (o.startsWith("--url=")) {
2491
- a = Z(o.slice(6));
1744
+ a = J(o.slice(6));
2492
1745
  continue;
2493
1746
  }
2494
- !o.startsWith("-") && ht(o) && (a = Z(o));
1747
+ !o.startsWith("-") && st(o) && (a = J(o));
2495
1748
  }
2496
1749
  if (!a) return null;
2497
- let o = r.length ? yt(r.join("&")) : "", s = i ?? (o ? "POST" : "GET"), c = vt(n);
1750
+ let o = r.length ? dt(r.join("&")) : "", s = i ?? (o ? "POST" : "GET"), c = ut(n);
2498
1751
  return {
2499
1752
  title: "Imported request",
2500
1753
  method: s,
2501
1754
  url: a,
2502
- headers: c ? n.filter((e) => e.key.toLowerCase() !== lt) : n,
1755
+ headers: c ? n.filter((e) => e.key.toLowerCase() !== tt) : n,
2503
1756
  auth: c,
2504
1757
  body: o || void 0
2505
1758
  };
2506
1759
  }
2507
1760
  //#endregion
2508
1761
  //#region src/features/api-widget/ImportCard.tsx
2509
- var bt = "curl -X POST 'https://jsonplaceholder.typicode.com/posts' \\\n -H 'Content-Type: application/json' \\\n -d '{ \"title\": \"API client\", \"body\": \"Live request\", \"userId\": 1 }'", xt = ({ onImport: e, onCancel: t, className: n }) => {
1762
+ var ft = "curl -X POST 'https://jsonplaceholder.typicode.com/posts' \\\n -H 'Content-Type: application/json' \\\n -d '{ \"title\": \"API client\", \"body\": \"Live request\", \"userId\": 1 }'", pt = ({ onImport: e, onCancel: t, className: n }) => {
2510
1763
  let [r, i] = o(""), [a, s] = o(null);
2511
- return /* @__PURE__ */ c(z, {
1764
+ return /* @__PURE__ */ c(A, {
2512
1765
  flush: !0,
2513
1766
  className: n,
2514
1767
  children: /* @__PURE__ */ l("div", {
@@ -2521,7 +1774,7 @@ var bt = "curl -X POST 'https://jsonplaceholder.typicode.com/posts' \\\n -H 'Co
2521
1774
  "aria-label": "Back",
2522
1775
  onClick: t,
2523
1776
  className: "inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-content transition-colors hover:bg-surface-2",
2524
- children: /* @__PURE__ */ c(x, {
1777
+ children: /* @__PURE__ */ c(f, {
2525
1778
  name: "arrow-left",
2526
1779
  className: "h-5 w-5"
2527
1780
  })
@@ -2541,9 +1794,9 @@ var bt = "curl -X POST 'https://jsonplaceholder.typicode.com/posts' \\\n -H 'Co
2541
1794
  },
2542
1795
  spellCheck: !1,
2543
1796
  rows: 5,
2544
- placeholder: bt,
1797
+ placeholder: ft,
2545
1798
  "aria-label": "cURL command",
2546
- className: y("w-full resize-none rounded-lg border bg-surface-2 p-3 font-mono text-[13px] leading-relaxed text-content outline-none", "placeholder:text-muted/50 focus:ring-2 focus:ring-primary/20", a ? "border-red-500/60" : "border-border focus:border-primary/60")
1799
+ className: u("w-full resize-none rounded-lg border bg-surface-2 p-3 font-mono text-[13px] leading-relaxed text-content outline-none", "placeholder:text-muted/50 focus:ring-2 focus:ring-primary/20", a ? "border-red-500/60" : "border-border focus:border-primary/60")
2547
1800
  }),
2548
1801
  a && /* @__PURE__ */ c("p", {
2549
1802
  className: "text-xs text-red-400",
@@ -2551,10 +1804,10 @@ var bt = "curl -X POST 'https://jsonplaceholder.typicode.com/posts' \\\n -H 'Co
2551
1804
  }),
2552
1805
  /* @__PURE__ */ c("div", {
2553
1806
  className: "flex items-center justify-end",
2554
- children: /* @__PURE__ */ c(T, {
1807
+ children: /* @__PURE__ */ c(g, {
2555
1808
  size: "sm",
2556
1809
  onClick: () => {
2557
- let t = Q(r);
1810
+ let t = Y(r);
2558
1811
  if (!t) {
2559
1812
  s("Could not parse a valid cURL command. Make sure it includes a URL.");
2560
1813
  return;
@@ -2562,7 +1815,7 @@ var bt = "curl -X POST 'https://jsonplaceholder.typicode.com/posts' \\\n -H 'Co
2562
1815
  e(t, r), i(""), s(null);
2563
1816
  },
2564
1817
  disabled: !r.trim(),
2565
- leftIcon: /* @__PURE__ */ c(x, {
1818
+ leftIcon: /* @__PURE__ */ c(f, {
2566
1819
  name: "download",
2567
1820
  className: "h-4 w-4"
2568
1821
  }),
@@ -2572,7 +1825,21 @@ var bt = "curl -X POST 'https://jsonplaceholder.typicode.com/posts' \\\n -H 'Co
2572
1825
  ]
2573
1826
  })
2574
1827
  });
2575
- }, St = [
1828
+ };
1829
+ //#endregion
1830
+ //#region src/features/api-widget/format.ts
1831
+ function mt(e) {
1832
+ let t = e.trim();
1833
+ if (!t) return e;
1834
+ try {
1835
+ return JSON.stringify(JSON.parse(t), null, 2);
1836
+ } catch {
1837
+ return e;
1838
+ }
1839
+ }
1840
+ //#endregion
1841
+ //#region src/features/api-widget/snippets.ts
1842
+ var X = [
2576
1843
  {
2577
1844
  id: "curl",
2578
1845
  label: "cURL"
@@ -2590,10 +1857,10 @@ var bt = "curl -X POST 'https://jsonplaceholder.typicode.com/posts' \\\n -H 'Co
2590
1857
  label: "Go"
2591
1858
  }
2592
1859
  ];
2593
- function Ct(e) {
1860
+ function ht(e) {
2594
1861
  return e === "curl" ? "bash" : e;
2595
1862
  }
2596
- function wt(e) {
1863
+ function gt(e) {
2597
1864
  return !e || e.type === "none" ? null : e.type === "bearer" ? {
2598
1865
  key: "Authorization",
2599
1866
  value: `Bearer ${e.token}`
@@ -2602,17 +1869,17 @@ function wt(e) {
2602
1869
  value: e.value
2603
1870
  };
2604
1871
  }
2605
- function $(e) {
2606
- let t = wt(e.auth);
1872
+ function Z(e) {
1873
+ let t = gt(e.auth);
2607
1874
  return t ? [...(e.headers ?? []).filter((e) => e.key.toLowerCase() !== t.key.toLowerCase()), t] : e.headers ?? [];
2608
1875
  }
2609
- function Tt(e) {
1876
+ function _t(e) {
2610
1877
  let t = `curl -X ${e.method} '${e.url}'`;
2611
- for (let n of $(e)) t += ` \\\n -H '${n.key}: ${n.value}'`;
1878
+ for (let n of Z(e)) t += ` \\\n -H '${n.key}: ${n.value}'`;
2612
1879
  return e.body && (t += ` \\\n -d '${e.body}'`), t;
2613
1880
  }
2614
- function Et(e) {
2615
- let t = [`method: '${e.method}'`], n = $(e);
1881
+ function vt(e) {
1882
+ let t = [`method: '${e.method}'`], n = Z(e);
2616
1883
  if (n.length) {
2617
1884
  let e = n.map((e) => ` '${e.key}': '${e.value}'`).join(",\n");
2618
1885
  t.push(`headers: {\n${e}\n }`);
@@ -2626,12 +1893,12 @@ function Et(e) {
2626
1893
  "console.log(data);"
2627
1894
  ].join("\n");
2628
1895
  }
2629
- function Dt(e) {
1896
+ function yt(e) {
2630
1897
  let t = [
2631
1898
  "import requests",
2632
1899
  "",
2633
1900
  `url = "${e.url}"`
2634
- ], n = ["url"], r = $(e);
1901
+ ], n = ["url"], r = Z(e);
2635
1902
  if (r.length) {
2636
1903
  t.push("", "headers = {");
2637
1904
  for (let e of r) t.push(` "${e.key}": "${e.value}",`);
@@ -2639,7 +1906,7 @@ function Dt(e) {
2639
1906
  }
2640
1907
  return e.body && (t.push("", `payload = ${e.body}`), n.push("json=payload")), t.push("", `response = requests.${e.method.toLowerCase()}(${n.join(", ")})`, "print(response.json())"), t.join("\n");
2641
1908
  }
2642
- function Ot(e) {
1909
+ function bt(e) {
2643
1910
  let t = [
2644
1911
  "\"fmt\"",
2645
1912
  "\"io\"",
@@ -2653,56 +1920,53 @@ function Ot(e) {
2653
1920
  ];
2654
1921
  for (let e of t) n.push(`\t${e}`);
2655
1922
  n.push(")", "", "func main() {"), e.body ? (n.push(`\tpayload := strings.NewReader(\`${e.body}\`)`), n.push(`\treq, _ := http.NewRequest("${e.method}", "${e.url}", payload)`)) : n.push(`\treq, _ := http.NewRequest("${e.method}", "${e.url}", nil)`);
2656
- for (let t of $(e)) n.push(`\treq.Header.Set("${t.key}", "${t.value}")`);
1923
+ for (let t of Z(e)) n.push(`\treq.Header.Set("${t.key}", "${t.value}")`);
2657
1924
  return n.push(" res, _ := http.DefaultClient.Do(req)", " defer res.Body.Close()", "", " body, _ := io.ReadAll(res.Body)", " fmt.Println(string(body))", "}"), n.join("\n");
2658
1925
  }
2659
- function kt(e, t) {
1926
+ function Q(e, t) {
2660
1927
  switch (t) {
2661
- case "curl": return Tt(e);
2662
- case "javascript": return Et(e);
2663
- case "python": return Dt(e);
2664
- case "go": return Ot(e);
1928
+ case "curl": return _t(e);
1929
+ case "javascript": return vt(e);
1930
+ case "python": return yt(e);
1931
+ case "go": return bt(e);
2665
1932
  }
2666
1933
  }
2667
1934
  //#endregion
2668
1935
  //#region src/features/api-widget/RequestSnippet.tsx
2669
- var At = ({ request: e, onTryItOut: t }) => {
2670
- let [n, r] = o("curl"), a = i(() => kt(e, n), [e, n]), s = !!t;
1936
+ var xt = ({ request: e, onTryItOut: t }) => {
1937
+ let [n, r] = o("curl"), a = i(() => Q(e, n), [e, n]), s = i(() => e.sampleResponse ? mt(e.sampleResponse) : "", [e.sampleResponse]);
2671
1938
  return /* @__PURE__ */ l("div", {
2672
1939
  className: "space-y-3",
2673
- children: [/* @__PURE__ */ l(z, {
2674
- label: e.title,
2675
- children: [/* @__PURE__ */ l("div", {
2676
- className: "relative flex items-center justify-between",
2677
- children: [/* @__PURE__ */ c(B, {
2678
- items: St,
2679
- activeId: n,
2680
- onChange: (e) => {
2681
- r(e);
2682
- },
2683
- className: "[&_button]:text-[14px]"
2684
- }), s && /* @__PURE__ */ c(T, {
2685
- size: "sm",
2686
- variant: "primary",
2687
- onClick: t,
2688
- rightIcon: /* @__PURE__ */ c(x, {
2689
- name: "arrow-right",
2690
- className: "h-4 w-4"
2691
- }),
2692
- children: "Try it"
2693
- })]
2694
- }), /* @__PURE__ */ c("div", {
2695
- className: "mt-4",
2696
- children: /* @__PURE__ */ c(W, {
2697
- code: a,
2698
- language: Ct(n),
2699
- showLineNumbers: !0
2700
- })
1940
+ children: [/* @__PURE__ */ l(A, { children: [/* @__PURE__ */ l("div", {
1941
+ className: "relative flex items-center justify-between",
1942
+ children: [/* @__PURE__ */ c(j, {
1943
+ items: X,
1944
+ activeId: n,
1945
+ onChange: (e) => {
1946
+ r(e);
1947
+ },
1948
+ className: "[&_button]:text-[14px]"
1949
+ }), !!t && /* @__PURE__ */ c(g, {
1950
+ size: "sm",
1951
+ variant: "primary",
1952
+ onClick: t,
1953
+ rightIcon: /* @__PURE__ */ c(f, {
1954
+ name: "arrow-right",
1955
+ className: "h-4 w-4"
1956
+ }),
1957
+ children: "Try it"
2701
1958
  })]
2702
- }), e.sampleResponse && /* @__PURE__ */ c(z, {
1959
+ }), /* @__PURE__ */ c("div", {
1960
+ className: "mt-4",
1961
+ children: /* @__PURE__ */ c(z, {
1962
+ code: a,
1963
+ language: ht(n),
1964
+ showLineNumbers: !0
1965
+ })
1966
+ })] }), s && /* @__PURE__ */ c(A, {
2703
1967
  label: "",
2704
- children: /* @__PURE__ */ c(W, {
2705
- code: e.sampleResponse,
1968
+ children: /* @__PURE__ */ c(z, {
1969
+ code: s,
2706
1970
  language: "json"
2707
1971
  })
2708
1972
  })]
@@ -2710,7 +1974,7 @@ var At = ({ request: e, onTryItOut: t }) => {
2710
1974
  };
2711
1975
  //#endregion
2712
1976
  //#region src/features/api-widget/ApiPlayground.tsx
2713
- function jt(e) {
1977
+ function St(e) {
2714
1978
  let [n, r] = o(() => typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
2715
1979
  return t(() => {
2716
1980
  if (e !== "system") return;
@@ -2718,7 +1982,7 @@ function jt(e) {
2718
1982
  return n(), t.addEventListener("change", n), () => t.removeEventListener("change", n);
2719
1983
  }, [e]), e === "system" ? n : e;
2720
1984
  }
2721
- function Mt(e) {
1985
+ function Ct(e) {
2722
1986
  try {
2723
1987
  let t = new URL(e.url);
2724
1988
  return `${e.method} ${t.pathname || "/"}`;
@@ -2726,7 +1990,7 @@ function Mt(e) {
2726
1990
  return `${e.method} ${e.url || "/"}`;
2727
1991
  }
2728
1992
  }
2729
- var Nt = ({ request: e, allowImport: t, editable: n, onTryImport: r }) => /* @__PURE__ */ l(z, {
1993
+ var wt = ({ request: e, allowImport: t, editable: n, onTryImport: r }) => /* @__PURE__ */ l(A, {
2730
1994
  label: "Invalid request",
2731
1995
  children: [
2732
1996
  /* @__PURE__ */ l("div", {
@@ -2734,11 +1998,11 @@ var Nt = ({ request: e, allowImport: t, editable: n, onTryImport: r }) => /* @__
2734
1998
  children: [/* @__PURE__ */ c("div", {
2735
1999
  className: "text-sm font-medium text-content",
2736
2000
  children: "cURL"
2737
- }), t && n && /* @__PURE__ */ c(T, {
2001
+ }), t && n && /* @__PURE__ */ c(g, {
2738
2002
  size: "sm",
2739
2003
  variant: "primary",
2740
2004
  onClick: r,
2741
- rightIcon: /* @__PURE__ */ c(x, {
2005
+ rightIcon: /* @__PURE__ */ c(f, {
2742
2006
  name: "download",
2743
2007
  className: "h-4 w-4"
2744
2008
  }),
@@ -2747,7 +2011,7 @@ var Nt = ({ request: e, allowImport: t, editable: n, onTryImport: r }) => /* @__
2747
2011
  }),
2748
2012
  /* @__PURE__ */ c("div", {
2749
2013
  className: "mt-4",
2750
- children: /* @__PURE__ */ c(W, {
2014
+ children: /* @__PURE__ */ c(z, {
2751
2015
  code: e.trim() || "Paste or pass a cURL request with a URL.",
2752
2016
  language: "bash",
2753
2017
  showLineNumbers: !0
@@ -2758,72 +2022,120 @@ var Nt = ({ request: e, allowImport: t, editable: n, onTryImport: r }) => /* @__
2758
2022
  children: "The request could not be parsed into a valid URL."
2759
2023
  })
2760
2024
  ]
2761
- });
2762
- function Pt(e, t, n) {
2025
+ }), Tt = 240, Et = ({ panelKey: e, children: n }) => {
2026
+ let r = a(null), i = a(null), s = a(e), l = a(null), [u, d] = o(null), [f, p] = o(!1);
2027
+ return t(() => {
2028
+ let t = r.current, n = i.current;
2029
+ if (!t || !n || s.current === e) return;
2030
+ let a = window.matchMedia("(prefers-reduced-motion: reduce)").matches, o = l.current ?? t.getBoundingClientRect().height, c = n.getBoundingClientRect().height;
2031
+ if (s.current = e, l.current = c, a || Math.abs(o - c) < 1) {
2032
+ d(null), p(!1);
2033
+ return;
2034
+ }
2035
+ p(!0), d(o);
2036
+ let u = window.requestAnimationFrame(() => {
2037
+ d(c);
2038
+ }), f = window.setTimeout(() => {
2039
+ d(null), p(!1);
2040
+ }, Tt);
2041
+ return () => {
2042
+ window.cancelAnimationFrame(u), window.clearTimeout(f);
2043
+ };
2044
+ }, [e]), t(() => {
2045
+ let e = i.current;
2046
+ if (!e || typeof ResizeObserver > "u") return;
2047
+ let t = new ResizeObserver(([e]) => {
2048
+ l.current = e.contentRect.height;
2049
+ });
2050
+ return t.observe(e), () => t.disconnect();
2051
+ }, []), /* @__PURE__ */ c("div", {
2052
+ ref: r,
2053
+ className: "transition-[height] duration-[240ms] ease-out",
2054
+ style: {
2055
+ height: u === null ? void 0 : `${u}px`,
2056
+ overflow: f ? "hidden" : void 0
2057
+ },
2058
+ children: /* @__PURE__ */ c("div", {
2059
+ ref: i,
2060
+ children: n
2061
+ })
2062
+ });
2063
+ };
2064
+ function $(e, t, n) {
2763
2065
  return {
2764
2066
  ...e,
2765
- title: t ?? Mt(e),
2766
- sampleResponse: n
2067
+ title: t ?? Ct(e),
2068
+ sampleResponse: n ? mt(n) : void 0
2767
2069
  };
2768
2070
  }
2769
- var Ft = ({ request: e, title: n, sampleResponse: r, onUpdateRequest: a, editable: s = !0, allowImport: l = !0, mode: u = "dark", syncSnippet: d = !1, customization: f }) => {
2770
- let p = jt(u), [m, h] = o("idle"), [g, _] = o(e);
2071
+ var Dt = ({ request: e, title: n, sampleResponse: r, onUpdateRequest: a, editable: s = !0, allowImport: u = !0, mode: d = "dark", syncSnippet: f = !1, customization: p }) => {
2072
+ let m = St(d), [h, g] = o("idle"), [_, v] = o(e);
2771
2073
  t(() => {
2772
- _(e);
2074
+ v(e);
2773
2075
  }, [e]);
2774
- let v = i(() => {
2775
- let e = Q(g);
2776
- return e ? Pt(e, n, r) : null;
2076
+ let y = i(() => {
2077
+ let e = Y(_);
2078
+ return e ? $(e, n, r) : null;
2777
2079
  }, [
2778
- g,
2080
+ _,
2779
2081
  n,
2780
2082
  r
2781
- ]), y = d ? g : e, b = i(() => {
2782
- let e = Q(y);
2783
- return e ? Pt(e, n, r) : null;
2083
+ ]), b = f ? _ : e, x = i(() => {
2084
+ let e = Y(b);
2085
+ return e ? $(e, n, r) : null;
2784
2086
  }, [
2785
- y,
2087
+ b,
2786
2088
  n,
2787
2089
  r
2788
- ]), x = (e) => {
2789
- _(e), a?.(e);
2790
- }, S = (e) => {
2791
- x(kt(e, "curl"));
2792
- }, C = (e, t) => {
2793
- x(t.trim()), h("console");
2794
- };
2795
- return /* @__PURE__ */ c("div", {
2796
- "data-theme": p,
2797
- style: {
2798
- ...f?.primary ? { "--primary": f.primary } : {},
2799
- ...f?.background ? { "--bg": f.background } : {}
2800
- },
2801
- className: "bg-bg text-content text-left",
2802
- children: m === "import" ? /* @__PURE__ */ c("div", {
2803
- className: "motion-safe:animate-[widget-slide-in_180ms_ease-out]",
2804
- children: /* @__PURE__ */ c(xt, {
2805
- onImport: C,
2806
- onCancel: () => h(v ? "console" : "idle")
2807
- })
2808
- }, "import") : m === "console" && v ? /* @__PURE__ */ c("div", {
2809
- className: "motion-safe:animate-[widget-slide-in_180ms_ease-out]",
2810
- children: /* @__PURE__ */ c(rt, {
2811
- request: v,
2812
- onRequestChange: S,
2813
- editable: s,
2814
- onBack: () => h("idle"),
2815
- onImport: l && s ? () => h("import") : void 0
2090
+ ]), S = (e) => {
2091
+ v(e), a?.(e);
2092
+ }, C = (e) => {
2093
+ S(Q(e, "curl"));
2094
+ }, w = (e, t) => {
2095
+ S(t.trim()), g("console");
2096
+ }, T = {
2097
+ ...p?.primary ? { "--primary": p.primary } : {},
2098
+ ...p?.background ? { "--bg": p.background } : {}
2099
+ }, E = h === "console" && y, D = h === "import" ? "import" : E ? "console" : x ? "snippet" : "invalid";
2100
+ return /* @__PURE__ */ l("div", {
2101
+ "data-theme": m,
2102
+ style: T,
2103
+ className: "text-content text-left",
2104
+ children: [/* @__PURE__ */ c(Et, {
2105
+ panelKey: D,
2106
+ children: /* @__PURE__ */ c("div", {
2107
+ className: "motion-safe:animate-[widget-slide-in_180ms_ease-out]",
2108
+ children: h === "import" ? /* @__PURE__ */ c(pt, {
2109
+ onImport: w,
2110
+ onCancel: () => g(y ? "console" : "idle")
2111
+ }) : E ? /* @__PURE__ */ c(Ye, {
2112
+ request: y,
2113
+ onRequestChange: C,
2114
+ title: n,
2115
+ editable: s,
2116
+ onBack: () => g("idle"),
2117
+ onImport: u && s ? () => g("import") : void 0
2118
+ }) : x ? /* @__PURE__ */ c(xt, {
2119
+ request: x,
2120
+ onTryItOut: () => g("console")
2121
+ }) : /* @__PURE__ */ c(wt, {
2122
+ request: b,
2123
+ allowImport: u,
2124
+ editable: s,
2125
+ onTryImport: () => g("import")
2126
+ })
2127
+ }, D)
2128
+ }), /* @__PURE__ */ c("div", {
2129
+ className: "mt-2 flex justify-end",
2130
+ children: /* @__PURE__ */ c("a", {
2131
+ href: "https://www.npmjs.com/package/@ragrails/api-playground-react",
2132
+ target: "_blank",
2133
+ rel: "noreferrer",
2134
+ className: "text-[11px] font-medium text-muted/45 transition-colors hover:text-muted",
2135
+ children: "Build yours with RagRails"
2816
2136
  })
2817
- }, "console") : b ? /* @__PURE__ */ c(At, {
2818
- request: b,
2819
- onTryItOut: () => h("console")
2820
- }) : /* @__PURE__ */ c(Nt, {
2821
- request: y,
2822
- allowImport: l,
2823
- editable: s,
2824
- onTryImport: () => h("import")
2825
- })
2137
+ })]
2826
2138
  });
2827
2139
  };
2828
2140
  //#endregion
2829
- export { rt as ApiConsole, Ft as ApiPlayground, xt as ImportCard, At as RequestSnippet, St as SNIPPET_LANGUAGES, Ce as executeWidgetRequest, kt as generateSnippet, Ct as highlightFor, we as mockWidgetResponse, Q as parseCurl, G as widgetErrorResponse };
2141
+ export { Ye as ApiConsole, Dt as ApiPlayground, pt as ImportCard, xt as RequestSnippet, X as SNIPPET_LANGUAGES, H as executeWidgetRequest, Q as generateSnippet, ht as highlightFor, ge as mockWidgetResponse, Y as parseCurl, V as widgetErrorResponse };