@mcp-use/inspector 0.5.3 → 0.6.0-canary.0
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/client/assets/{chunk-VL2OQCWN-lvFdpsKs.js → chunk-VL2OQCWN-C0ihwl40.js} +1 -1
- package/dist/client/assets/{embeddings-0wcwzrOS.js → embeddings-Dl8ofK1W.js} +1 -1
- package/dist/client/assets/index-CAnbiFOL.css +1 -0
- package/dist/client/assets/{index-DhJ0wa09.js → index-CIzJNAE9.js} +1 -1
- package/dist/client/assets/{index-D0nLMG1E.js → index-CzLz-q1x.js} +1 -1
- package/dist/client/assets/index-D_VAIhOb.js +1559 -0
- package/dist/client/assets/{index-BiSYQqGa.js → index-DkO-dCM6.js} +1 -1
- package/dist/client/assets/{index-BDWwgNIO.js → index-DyFaqSRJ.js} +1 -1
- package/dist/client/assets/{index-BbXTQtxh.js → index-IOpM2W9S.js} +1 -1
- package/dist/client/assets/{index-hZz5tb9V.js → index-KxvWY3zW.js} +1 -1
- package/dist/client/assets/{langfuse-C4HKZ3NL-CsiDw8Wb.js → langfuse-C4HKZ3NL-h6ZaewUF.js} +3 -3
- package/dist/client/assets/{winston-DaYIuPyF.js → winston-D3TcTGV3.js} +1 -1
- package/dist/client/index.html +3 -3
- package/package.json +2 -2
- package/dist/client/assets/index-CFpQGWTL.js +0 -1559
- package/dist/client/assets/index-DPoppY7E.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@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-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--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-space-x-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-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-500:oklch(70.5% .213 47.604);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-yellow-950:oklch(28.6% .066 53.813);--color-green-50:oklch(98.2% .018 155.826);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-800:oklch(43.2% .095 166.913);--color-cyan-500:oklch(71.5% .143 215.221);--color-blue-50:oklch(97% .014 254.604);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-blue-950:oklch(28.2% .091 267.935);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-200:oklch(90.2% .063 306.703);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-purple-800:oklch(43.8% .218 303.724);--color-purple-900:oklch(38.1% .176 304.987);--color-pink-500:oklch(65.6% .241 354.308);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-slate-950:oklch(12.9% .042 264.695);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-zinc-50:oklch(98.5% 0 0);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-zinc-950:oklch(14.1% .005 285.823);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--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: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-widest:.1em;--leading-relaxed:1.625;--radius-xs:.125rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse var(--duration)ease-out infinite;--blur-sm:8px;--blur-md:12px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-family-ubuntu:Ubuntu,sans-serif;--animate-aurora:aurora 60s linear infinite}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring)50%,transparent)}}body{background-color:var(--background);color:var(--foreground)}h2,.font-ubuntu{font-family:var(--font-family-ubuntu)}}@layer components;@layer utilities{.\@container\/card-header{container:card-header/inline-size}.\@container{container-type:inline-size}.\[container-type\:size\]{container-type:size}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.-inset-\[10px\]{inset:-10px}.-inset-full{inset:-100%}.\[inset\:var\(--cut\)\]{inset:var(--cut)}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-1{top:calc(var(--spacing)*1)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.top-4{top:calc(var(--spacing)*4)}.top-\[50\%\]{top:50%}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-4{right:calc(var(--spacing)*4)}.right-6{right:calc(var(--spacing)*6)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-6{bottom:calc(var(--spacing)*6)}.left-0{left:calc(var(--spacing)*0)}.left-1\/2,.left-\[50\%\]{left:50%}.isolate{isolation:isolate}.-z-20{z-index:-20}.-z-30{z-index:-30}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-\[51\]{z-index:51}.order-1{order:1}.order-2{order:2}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.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}}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.-mx-3{margin-inline:calc(var(--spacing)*-3)}.mx-0{margin-inline:calc(var(--spacing)*0)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-4{margin-inline:calc(var(--spacing)*4)}.mx-auto{margin-inline:auto}.-my-2{margin-block:calc(var(--spacing)*-2)}.-my-3{margin-block:calc(var(--spacing)*-3)}.my-1{margin-block:calc(var(--spacing)*1)}.my-4{margin-block:calc(var(--spacing)*4)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-auto{margin-top:auto}.mr-0{margin-right:calc(var(--spacing)*0)}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-3{margin-right:calc(var(--spacing)*3)}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.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}.\[aspect-ratio\:1\],.aspect-square{aspect-ratio:1}.size-2\.5{width:calc(var(--spacing)*2.5);height:calc(var(--spacing)*2.5)}.size-3\.5{width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.size-8{width:calc(var(--spacing)*8);height:calc(var(--spacing)*8)}.size-9{width:calc(var(--spacing)*9);height:calc(var(--spacing)*9)}.size-10{width:calc(var(--spacing)*10);height:calc(var(--spacing)*10)}.size-\[20px\]{width:20px;height:20px}.size-\[40px\]{width:40px;height:40px}.size-full{width:100%;height:100%}.h-0\.5{height:calc(var(--spacing)*.5)}.h-2{height:calc(var(--spacing)*2)}.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-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.h-12{height:calc(var(--spacing)*12)}.h-16{height:calc(var(--spacing)*16)}.h-32{height:calc(var(--spacing)*32)}.h-64{height:calc(var(--spacing)*64)}.h-96{height:calc(var(--spacing)*96)}.h-\[100cqh\]{height:100cqh}.h-\[350px\]{height:350px}.h-\[400px\]{height:400px}.h-\[calc\(100\%-8px\)\]{height:calc(100% - 8px)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\(--radix-select-content-available-height\){max-height:var(--radix-select-content-available-height)}.max-h-48{max-height:calc(var(--spacing)*48)}.max-h-96{max-height:calc(var(--spacing)*96)}.max-h-\[80vh\]{max-height:80vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[300px\]{max-height:300px}.max-h-\[400px\]{max-height:400px}.max-h-full{max-height:100%}.min-h-16{min-height:calc(var(--spacing)*16)}.min-h-\[100px\]{min-height:100px}.min-h-\[150px\]{min-height:150px}.min-h-\[200px\]{min-height:200px}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-3\.5{width:calc(var(--spacing)*3.5)}.w-3\/4{width:75%}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-16{width:calc(var(--spacing)*16)}.w-72{width:calc(var(--spacing)*72)}.w-\[400px\]{width:400px}.w-\[768px\]{width:768px}.w-\[calc\(100vw-2rem\)\]{width:calc(100vw - 2rem)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-\[80\%\]{max-width:80%}.max-w-\[640px\]{max-width:640px}.max-w-\[768px\]{max-width:768px}.max-w-\[calc\(100\%-2rem\)\]{max-width:calc(100% - 2rem)}.max-w-fit{max-width:fit-content}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.max-w-min{max-width:min-content}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-5{min-width:calc(var(--spacing)*5)}.min-w-\[8rem\]{min-width:8rem}.min-w-\[300px\]{min-width:300px}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.origin-\(--radix-select-content-transform-origin\){transform-origin:var(--radix-select-content-transform-origin)}.origin-\(--radix-tooltip-content-transform-origin\){transform-origin:var(--radix-tooltip-content-transform-origin)}.origin-top-left{transform-origin:0 0}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-\[10px\]{--tw-translate-x: -10px ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-\[60px\]{--tw-translate-y: -60px ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\[calc\(-50\%_-_2px\)\]{--tw-translate-y: calc(-50% - 2px) ;translate:var(--tw-translate-x)var(--tw-translate-y)}.\[translate\:0_0\]{translate:0}.scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-150{--tw-scale-x:150%;--tw-scale-y:150%;--tw-scale-z:150%;scale:var(--tw-scale-x)var(--tw-scale-y)}.rotate-0{rotate:none}.rotate-45{rotate:45deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.transform-gpu{transform:translateZ(0)var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-in{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-shimmer-slide{animation:shimmer-slide var(--speed)ease-in-out infinite alternate}.animate-spin{animation:var(--animate-spin)}.animate-spin-around{animation:spin-around calc(var(--speed)*2)infinite linear}.animate-status-pulse{animation:2s infinite status-pulse}.animate-status-pulse-red{animation:2s infinite status-pulse-red}.animate-status-pulse-yellow{animation:2s infinite status-pulse-yellow}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.resize{resize:both}.scroll-my-1{scroll-margin-block:calc(var(--spacing)*1)}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.auto-rows-min{grid-auto-rows:min-content}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[1fr_1fr\]{grid-template-columns:1fr 1fr}.grid-rows-\[auto_auto\]{grid-template-rows:auto auto}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}:where(.-space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*-1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*-1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*0)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*0)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*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-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)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*1)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*3)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.\[border-radius\:0\]{border-radius:0}.\[border-radius\:var\(--radius\)\]{border-radius:var(--radius)}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\[2px\]{border-radius:2px}.rounded-\[30px\]{border-radius:30px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-xs{border-radius:var(--radius-xs)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-none{--tw-border-style:none;border-style:none}.border-black{border-color:var(--color-black)}.border-black\/10{border-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.border-black\/10{border-color:color-mix(in oklab,var(--color-black)10%,transparent)}}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-200\/50{border-color:#bedbff80}@supports (color:color-mix(in lab,red,red)){.border-blue-200\/50{border-color:color-mix(in oklab,var(--color-blue-200)50%,transparent)}}.border-border{border-color:var(--border)}.border-destructive\/20{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.border-destructive\/20{border-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-200\/50{border-color:#e5e7eb80}@supports (color:color-mix(in lab,red,red)){.border-gray-200\/50{border-color:color-mix(in oklab,var(--color-gray-200)50%,transparent)}}.border-gray-300{border-color:var(--color-gray-300)}.border-input{border-color:var(--input)}.border-muted-foreground{border-color:var(--muted-foreground)}.border-purple-200{border-color:var(--color-purple-200)}.border-purple-500\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/30{border-color:color-mix(in oklab,var(--color-purple-500)30%,transparent)}}.border-red-200{border-color:var(--color-red-200)}.border-red-200\/50{border-color:#ffcaca80}@supports (color:color-mix(in lab,red,red)){.border-red-200\/50{border-color:color-mix(in oklab,var(--color-red-200)50%,transparent)}}.border-transparent{border-color:#0000}.border-white\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.border-white\/10{border-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.border-white\/20{border-color:#fff3}@supports (color:color-mix(in lab,red,red)){.border-white\/20{border-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.border-yellow-200{border-color:var(--color-yellow-200)}.border-zinc-200{border-color:var(--color-zinc-200)}.border-zinc-300{border-color:var(--color-zinc-300)}.border-l-zinc-500{border-left-color:var(--color-zinc-500)}.bg-\[\#f3f3f3\]{background-color:#f3f3f3}.bg-background,.bg-background\/40{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.bg-background\/40{background-color:color-mix(in oklab,var(--background)40%,transparent)}}.bg-background\/50{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.bg-background\/50{background-color:color-mix(in oklab,var(--background)50%,transparent)}}.bg-background\/80{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.bg-background\/80{background-color:color-mix(in oklab,var(--background)80%,transparent)}}.bg-background\/90{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.bg-background\/90{background-color:color-mix(in oklab,var(--background)90%,transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.bg-black\/10{background-color:color-mix(in oklab,var(--color-black)10%,transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.bg-black\/70{background-color:color-mix(in oklab,var(--color-black)70%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-50\/30{background-color:#eff6ff4d}@supports (color:color-mix(in lab,red,red)){.bg-blue-50\/30{background-color:color-mix(in oklab,var(--color-blue-50)30%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-cyan-500\/20{background-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/20{background-color:color-mix(in oklab,var(--color-cyan-500)20%,transparent)}}.bg-destructive,.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.bg-destructive\/10{background-color:color-mix(in oklab,var(--destructive)10%,transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500)20%,transparent)}}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-foreground{background-color:var(--foreground)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-100\/20{background-color:#f3f4f633}@supports (color:color-mix(in lab,red,red)){.bg-gray-100\/20{background-color:color-mix(in oklab,var(--color-gray-100)20%,transparent)}}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-gray-500\/20{background-color:#6a728233}@supports (color:color-mix(in lab,red,red)){.bg-gray-500\/20{background-color:color-mix(in oklab,var(--color-gray-500)20%,transparent)}}.bg-green-50{background-color:var(--color-green-50)}.bg-green-500\/20{background-color:#00c75833}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/20{background-color:color-mix(in oklab,var(--color-green-500)20%,transparent)}}.bg-inherit{background-color:inherit}.bg-muted{background-color:var(--muted)}.bg-muted-foreground\/20{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.bg-muted-foreground\/20{background-color:color-mix(in oklab,var(--muted-foreground)20%,transparent)}}.bg-muted\/30{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/30{background-color:color-mix(in oklab,var(--muted)30%,transparent)}}.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/50{background-color:color-mix(in oklab,var(--muted)50%,transparent)}}.bg-orange-500\/20{background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/20{background-color:color-mix(in oklab,var(--color-orange-500)20%,transparent)}}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-purple-50{background-color:var(--color-purple-50)}.bg-purple-500{background-color:var(--color-purple-500)}.bg-purple-500\/20{background-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/20{background-color:color-mix(in oklab,var(--color-purple-500)20%,transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-red-50\/30{background-color:#fef2f24d}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/30{background-color:color-mix(in oklab,var(--color-red-50)30%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.bg-rose-500{background-color:var(--color-rose-500)}.bg-rose-600{background-color:var(--color-rose-600)}.bg-secondary{background-color:var(--secondary)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-white\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\/80{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.bg-white\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.bg-white\/90{background-color:color-mix(in oklab,var(--color-white)90%,transparent)}}.bg-yellow-50{background-color:var(--color-yellow-50)}.bg-yellow-50\/30{background-color:#fefce84d}@supports (color:color-mix(in lab,red,red)){.bg-yellow-50\/30{background-color:color-mix(in oklab,var(--color-yellow-50)30%,transparent)}}.bg-yellow-500{background-color:var(--color-yellow-500)}.bg-zinc-50{background-color:var(--color-zinc-50)}.bg-zinc-100{background-color:var(--color-zinc-100)}.bg-zinc-200{background-color:var(--color-zinc-200)}.bg-zinc-400{background-color:var(--color-zinc-400)}.bg-zinc-500{background-color:var(--color-zinc-500)}.bg-zinc-500\/20{background-color:#71717b33}@supports (color:color-mix(in lab,red,red)){.bg-zinc-500\/20{background-color:color-mix(in oklab,var(--color-zinc-500)20%,transparent)}}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.\[background-image\:var\(--white-gradient\)\,var\(--aurora\)\]{background-image:var(--white-gradient),var(--aurora)}.bg-\[radial-gradient\(circle\,_rgba\(0\,0\,0\,0\.2\)_1px\,_transparent_1px\)\]{background-image:radial-gradient(circle,#0003 1px,#0000 1px)}.bg-none{background-image:none}.from-purple-500\/10{--tw-gradient-from:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.from-purple-500\/10{--tw-gradient-from:color-mix(in oklab,var(--color-purple-500)10%,transparent)}}.from-purple-500\/10{--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-pink-500\/10{--tw-gradient-to:#f6339a1a}@supports (color:color-mix(in lab,red,red)){.to-pink-500\/10{--tw-gradient-to:color-mix(in oklab,var(--color-pink-500)10%,transparent)}}.to-pink-500\/10{--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))}.\[mask-image\:radial-gradient\(ellipse_at_100\%_0\%\,black_10\%\,var\(--transparent\)_70\%\)\]{-webkit-mask-image:radial-gradient(ellipse at 100% 0%,black 10%,var(--transparent)70%);mask-image:radial-gradient(ellipse at 100% 0%,black 10%,var(--transparent)70%)}.\[background-size\:300\%\,_200\%\]{background-size:300%,200%}.bg-\[length\:32px_32px\]{background-size:32px 32px}.bg-\[length\:250\%_100\%\,auto\]{background-size:250% 100%,auto}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.\[background-position\:50\%_50\%\,50\%_50\%\]{background-position:50%,50%}.\[background-repeat\:no-repeat\,padding-box\]{background-repeat:no-repeat,padding-box}.fill-foreground{fill:var(--foreground)}.stroke-black{stroke:var(--color-black)}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-1\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-2\.5{padding:calc(var(--spacing)*2.5)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-0{padding-block:calc(var(--spacing)*0)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.py-12{padding-block:calc(var(--spacing)*12)}.pt-0{padding-top:calc(var(--spacing)*0)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-6{padding-top:calc(var(--spacing)*6)}.pt-14{padding-top:calc(var(--spacing)*14)}.pt-\[80px\]{padding-top:80px}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-3{padding-right:calc(var(--spacing)*3)}.pr-4{padding-right:calc(var(--spacing)*4)}.pr-8{padding-right:calc(var(--spacing)*8)}.pr-10{padding-right:calc(var(--spacing)*10)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-8{padding-left:calc(var(--spacing)*8)}.text-center{text-align:center}.text-left{text-align:left}.text-start{text-align:start}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[17px\]{font-size:17px}.leading-7{--tw-leading:calc(var(--spacing)*7);line-height:calc(var(--spacing)*7)}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-background{color:var(--background)}.text-black{color:var(--color-black)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-card-foreground{color:var(--card-foreground)}.text-current{color:currentColor}.text-destructive{color:var(--destructive)}.text-emerald-800{color:var(--color-emerald-800)}.text-foreground,.text-foreground\/80{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\/80{color:color-mix(in oklab,var(--foreground)80%,transparent)}}.text-gray-200{color:var(--color-gray-200)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-muted-foreground,.text-muted-foreground\/50{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/50{color:color-mix(in oklab,var(--muted-foreground)50%,transparent)}}.text-orange-500{color:var(--color-orange-500)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-purple-500{color:var(--color-purple-500)}.text-purple-600{color:var(--color-purple-600)}.text-purple-700{color:var(--color-purple-700)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-slate-950{color:var(--color-slate-950)}.text-transparent{color:#0000}.text-white{color:var(--color-white)}.text-white\/60{color:#fff9}@supports (color:color-mix(in lab,red,red)){.text-white\/60{color:color-mix(in oklab,var(--color-white)60%,transparent)}}.text-white\/70{color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.text-white\/70{color:color-mix(in oklab,var(--color-white)70%,transparent)}}.text-white\/80{color:#fffc}@supports (color:color-mix(in lab,red,red)){.text-white\/80{color:color-mix(in oklab,var(--color-white)80%,transparent)}}.text-white\/90{color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.text-white\/90{color:color-mix(in oklab,var(--color-white)90%,transparent)}}.text-yellow-600{color:var(--color-yellow-600)}.text-yellow-700{color:var(--color-yellow-700)}.text-yellow-800{color:var(--color-yellow-800)}.text-zinc-100{color:var(--color-zinc-100)}.text-zinc-300{color:var(--color-zinc-300)}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.text-zinc-600{color:var(--color-zinc-600)}.text-zinc-700{color:var(--color-zinc-700)}.italic{font-style:italic}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_-8px_10px_\#0000001f\]{--tw-shadow:inset 0 -8px 10px var(--tw-shadow-color,#0000001f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_-8px_10px_\#ffffff1f\]{--tw-shadow:inset 0 -8px 10px var(--tw-shadow-color,#ffffff1f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[var\(--cmdk-shadow\)\]{--tw-shadow:var(--cmdk-shadow);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)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px 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-sm{--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-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px 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-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + 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)}.ring-2{--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)}.shadow-black\/25{--tw-shadow-color:#00000040}@supports (color:color-mix(in lab,red,red)){.shadow-black\/25{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-black)25%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-black\/50{--tw-shadow-color:#00000080}@supports (color:color-mix(in lab,red,red)){.shadow-black\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-black)50%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-emerald-500{--tw-ring-color:var(--color-emerald-500)}.ring-red-500{--tw-ring-color:var(--color-red-500)}.ring-yellow-500{--tw-ring-color:var(--color-yellow-500)}.ring-zinc-500{--tw-ring-color:var(--color-zinc-500)}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-\[2px\]{--tw-blur:blur(2px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-\[10px\]{--tw-blur:blur(10px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;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-opacity{transition-property:opacity;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-100{--tw-duration:.1s;transition-duration:.1s}.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-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-\[background\,color\]{will-change:background,color}.will-change-transform{will-change:transform}.fade-in-0{--tw-enter-opacity:0}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.zoom-in-95{--tw-enter-scale:.95}.\[--aurora\:repeating-linear-gradient\(100deg\,var\(--blue-500\)_10\%\,var\(--indigo-300\)_15\%\,var\(--blue-300\)_20\%\,var\(--violet-200\)_25\%\,var\(--blue-400\)_30\%\)\]{--aurora:repeating-linear-gradient(100deg,var(--blue-500)10%,var(--indigo-300)15%,var(--blue-300)20%,var(--violet-200)25%,var(--blue-400)30%)}.\[--base-color\:\#a1a1aa\]{--base-color:#a1a1aa}.\[--base-gradient-color\:\#000\]{--base-gradient-color:#000}.\[--bg\:linear-gradient\(90deg\,\#0000_calc\(50\%-var\(--spread\)\)\,var\(--base-gradient-color\)\,\#0000_calc\(50\%\+var\(--spread\)\)\)\]{--bg:linear-gradient(90deg,#0000 calc(50% - var(--spread)),var(--base-gradient-color),#0000 calc(50% + var(--spread)))}.\[--dark-gradient\:repeating-linear-gradient\(100deg\,var\(--black\)_0\%\,var\(--black\)_7\%\,var\(--transparent\)_10\%\,var\(--transparent\)_12\%\,var\(--black\)_16\%\)\]{--dark-gradient:repeating-linear-gradient(100deg,var(--black)0%,var(--black)7%,var(--transparent)10%,var(--transparent)12%,var(--black)16%)}.\[--white-gradient\:repeating-linear-gradient\(100deg\,var\(--white\)_0\%\,var\(--white\)_7\%\,var\(--transparent\)_10\%\,var\(--transparent\)_12\%\,var\(--white\)_16\%\)\]{--white-gradient:repeating-linear-gradient(100deg,var(--white)0%,var(--white)7%,var(--transparent)10%,var(--transparent)12%,var(--white)16%)}.\[background\:conic-gradient\(from_calc\(270deg-\(var\(--spread\)\*0\.5\)\)\,transparent_0\,var\(--shimmer-color\)_var\(--spread\)\,transparent_var\(--spread\)\)\]{background:conic-gradient(from calc(270deg - (var(--spread)*.5)),transparent 0,var(--shimmer-color)var(--spread),transparent var(--spread))}.\[background\:var\(--bg\)\]{background:var(--bg)}.\[content-visibility\:auto\]{content-visibility:auto}.\[mask\:none\]{-webkit-mask:none;mask:none}.fade-out{--tw-exit-opacity:0}.ring-inset{--tw-ring-inset:inset}.running{animation-play-state:running}@media(hover:hover){.group-hover\:bg-gray-200:is(:where(.group):hover *){background-color:var(--color-gray-200)}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\:shadow-\[inset_0_-6px_10px_\#0000003f\]:is(:where(.group):hover *){--tw-shadow:inset 0 -6px 10px var(--tw-shadow-color,#0000003f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-hover\:shadow-\[inset_0_-6px_10px_\#ffffff3f\]:is(:where(.group):hover *){--tw-shadow:inset 0 -6px 10px var(--tw-shadow-color,#ffffff3f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-hover\/code\:opacity-100:is(:where(.group\/code):hover *),.group-hover\/message\:opacity-100:is(:where(.group\/message):hover *){opacity:1}}.group-active\:shadow-\[inset_0_-10px_10px_\#0000003f\]:is(:where(.group):active *){--tw-shadow:inset 0 -10px 10px var(--tw-shadow-color,#0000003f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-active\:shadow-\[inset_0_-10px_10px_\#ffffff3f\]:is(:where(.group):active *){--tw-shadow:inset 0 -10px 10px var(--tw-shadow-color,#ffffff3f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-data-\[disabled\=true\]\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\[disabled\=true\]\:opacity-50:is(:where(.group)[data-disabled=true] *){opacity:.5}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.selection\:bg-primary ::selection{background-color:var(--primary)}.selection\:bg-primary::selection{background-color:var(--primary)}.selection\:text-primary-foreground ::selection{color:var(--primary-foreground)}.selection\:text-primary-foreground::selection{color:var(--primary-foreground)}.file\:inline-flex::file-selector-button{display:inline-flex}.file\:h-7::file-selector-button{height:calc(var(--spacing)*7)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.placeholder\:text-white\/50::placeholder{color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.placeholder\:text-white\/50::placeholder{color:color-mix(in oklab,var(--color-white)50%,transparent)}}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:inset-0:before{content:var(--tw-content);inset:calc(var(--spacing)*0)}.before\:rounded-\[inherit\]:before{content:var(--tw-content);border-radius:inherit}.before\:bg-gradient-to-r:before{content:var(--tw-content);--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.before\:from-transparent:before{content:var(--tw-content);--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))}.before\:via-white\/20:before{content:var(--tw-content);--tw-gradient-via:#fff3}@supports (color:color-mix(in lab,red,red)){.before\:via-white\/20:before{--tw-gradient-via:color-mix(in oklab,var(--color-white)20%,transparent)}}.before\:via-white\/20:before{--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)}.before\:to-transparent:before{content:var(--tw-content);--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))}.before\:p-\[1px\]:before{content:var(--tw-content);padding:1px}.before\:opacity-0:before{content:var(--tw-content);opacity:0}.before\:transition-opacity:before{content:var(--tw-content);transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.before\:duration-500:before{content:var(--tw-content);--tw-duration:.5s;transition-duration:.5s}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:inset-0:after{content:var(--tw-content);inset:calc(var(--spacing)*0)}.after\:inset-y-0:after{content:var(--tw-content);inset-block:calc(var(--spacing)*0)}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:w-1:after{content:var(--tw-content);width:calc(var(--spacing)*1)}.after\:-translate-x-1\/2:after{content:var(--tw-content);--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.after\:animate-aurora:after{content:var(--tw-content);animation:var(--animate-aurora)}.after\:\[background-image\:var\(--white-gradient\)\,var\(--aurora\)\]:after{content:var(--tw-content);background-image:var(--white-gradient),var(--aurora)}.after\:\[background-size\:200\%\,_100\%\]:after{content:var(--tw-content);background-size:200%,100%}.after\:\[background-attachment\:fixed\]:after{content:var(--tw-content);background-attachment:fixed}.after\:mix-blend-difference:after{content:var(--tw-content);mix-blend-mode:difference}.after\:content-\[\"\"\]:after{--tw-content:"";content:var(--tw-content)}.first\:mt-0:first-child{margin-top:calc(var(--spacing)*0)}@media(hover:hover){.hover\:border-border\/80:hover{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.hover\:border-border\/80:hover{border-color:color-mix(in oklab,var(--border)80%,transparent)}}.hover\:border-gray-800:hover{border-color:var(--color-gray-800)}.hover\:bg-accent:hover,.hover\:bg-accent\/50:hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-accent\/50:hover{background-color:color-mix(in oklab,var(--accent)50%,transparent)}}.hover\:bg-background:hover,.hover\:bg-background\/80:hover{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/80:hover{background-color:color-mix(in oklab,var(--background)80%,transparent)}}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive)90%,transparent)}}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:bg-gray-800:hover{background-color:var(--color-gray-800)}.hover\:bg-muted:hover,.hover\:bg-muted\/80:hover{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/80:hover{background-color:color-mix(in oklab,var(--muted)80%,transparent)}}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary)90%,transparent)}}.hover\:bg-rose-600:hover{background-color:var(--color-rose-600)}.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary)80%,transparent)}}.hover\:bg-white:hover{background-color:var(--color-white)}.hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.hover\:bg-white\/20:hover{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/20:hover{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.hover\:bg-white\/90:hover{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/90:hover{background-color:color-mix(in oklab,var(--color-white)90%,transparent)}}.hover\:bg-zinc-100:hover{background-color:var(--color-zinc-100)}.hover\:bg-zinc-200:hover{background-color:var(--color-zinc-200)}.hover\:from-purple-500\/20:hover{--tw-gradient-from:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.hover\:from-purple-500\/20:hover{--tw-gradient-from:color-mix(in oklab,var(--color-purple-500)20%,transparent)}}.hover\:from-purple-500\/20:hover{--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))}.hover\:to-pink-500\/20:hover{--tw-gradient-to:#f6339a33}@supports (color:color-mix(in lab,red,red)){.hover\:to-pink-500\/20:hover{--tw-gradient-to:color-mix(in oklab,var(--color-pink-500)20%,transparent)}}.hover\:to-pink-500\/20:hover{--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))}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-white:hover{color:var(--color-white)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px 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)}.hover\:before\:opacity-100:hover:before{content:var(--tw-content);opacity:1}}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:bg-white\/10:focus{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.focus\:bg-white\/10:focus{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.focus\:bg-zinc-100:focus{background-color:var(--color-zinc-100)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:text-destructive:focus{color:var(--destructive)}.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-blue-500\/20:focus{--tw-ring-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.focus\:ring-blue-500\/20:focus{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.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-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + 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-destructive\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.focus-visible\:ring-ring:focus-visible,.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab,var(--ring)50%,transparent)}}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color:var(--background)}.focus-visible\:outline-hidden:focus-visible{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus-visible\:outline-hidden:focus-visible{outline-offset:2px;outline:2px solid #0000}}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:translate-y-px:active{--tw-translate-y:1px;translate:var(--tw-translate-x)var(--tw-translate-y)}.active\:bg-accent\/80:active{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.active\:bg-accent\/80:active{background-color:color-mix(in oklab,var(--accent)80%,transparent)}}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.has-data-\[slot\=card-action\]\:grid-cols-\[1fr_auto\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.has-\[\>svg\]\:px-2\.5:has(>svg){padding-inline:calc(var(--spacing)*2.5)}.has-\[\>svg\]\:px-3:has(>svg){padding-inline:calc(var(--spacing)*3)}.has-\[\>svg\]\:px-4:has(>svg){padding-inline:calc(var(--spacing)*4)}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[disabled\=true\]\:cursor-not-allowed[data-disabled=true]{cursor:not-allowed}.data-\[disabled\=true\]\:text-muted-foreground\/50[data-disabled=true]{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.data-\[disabled\=true\]\:text-muted-foreground\/50[data-disabled=true]{color:color-mix(in oklab,var(--muted-foreground)50%,transparent)}}.data-\[panel-group-direction\=vertical\]\:h-px[data-panel-group-direction=vertical]{height:1px}.data-\[panel-group-direction\=vertical\]\:w-full[data-panel-group-direction=vertical]{width:100%}.data-\[panel-group-direction\=vertical\]\:flex-col[data-panel-group-direction=vertical]{flex-direction:column}.data-\[panel-group-direction\=vertical\]\:after\:left-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);left:calc(var(--spacing)*0)}.data-\[panel-group-direction\=vertical\]\:after\:h-1[data-panel-group-direction=vertical]:after{content:var(--tw-content);height:calc(var(--spacing)*1)}.data-\[panel-group-direction\=vertical\]\:after\:w-full[data-panel-group-direction=vertical]:after{content:var(--tw-content);width:100%}.data-\[panel-group-direction\=vertical\]\:after\:translate-x-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[panel-group-direction\=vertical\]\:after\:-translate-y-1\/2[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:var(--accent)}.data-\[selected\=true\]\:text-foreground[data-selected=true]{color:var(--foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\[size\=default\]\:h-9[data-size=default]{height:calc(var(--spacing)*9)}.data-\[size\=sm\]\:h-8[data-size=sm]{height:calc(var(--spacing)*8)}:is(.\*\:data-\[slot\=select-value\]\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.\*\:data-\[slot\=select-value\]\:flex>*)[data-slot=select-value]{display:flex}:is(.\*\:data-\[slot\=select-value\]\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\*\:data-\[slot\=select-value\]\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing)*2)}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x:calc(var(--spacing)*4);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y:100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x:-100%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x:100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y:-100%}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:var(--accent)}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:var(--secondary)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=open\]\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y:100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x:-100%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x:100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y:-100%}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:var(--input)}@supports ((-webkit-backdrop-filter:var(--tw)) or (backdrop-filter:var(--tw))){.supports-\[backdrop-filter\]\:bg-background\/60{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.supports-\[backdrop-filter\]\:bg-background\/60{background-color:color-mix(in oklab,var(--background)60%,transparent)}}}@media(min-width:40rem){.sm\:order-1{order:1}.sm\:order-2{order:2}.sm\:mt-8{margin-top:calc(var(--spacing)*8)}.sm\:mr-2{margin-right:calc(var(--spacing)*2)}.sm\:mb-8{margin-bottom:calc(var(--spacing)*8)}.sm\:ml-4{margin-left:calc(var(--spacing)*4)}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:inline{display:inline}.sm\:min-h-\[330px\]{min-height:330px}.sm\:w-96{width:calc(var(--spacing)*96)}.sm\:w-\[300px\]{width:300px}.sm\:w-\[540px\]{width:540px}.sm\:w-full{width:100%}.sm\:max-w-lg{max-width:var(--container-lg)}.sm\:max-w-sm{max-width:var(--container-sm)}.sm\:min-w-\[200px\]{min-width:200px}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-start{justify-content:flex-start}.sm\:gap-3{gap:calc(var(--spacing)*3)}.sm\:gap-4{gap:calc(var(--spacing)*4)}.sm\:p-4{padding:calc(var(--spacing)*4)}.sm\:p-6{padding:calc(var(--spacing)*6)}.sm\:px-4{padding-inline:calc(var(--spacing)*4)}.sm\:px-6{padding-inline:calc(var(--spacing)*6)}.sm\:py-4{padding-block:calc(var(--spacing)*4)}.sm\:py-6{padding-block:calc(var(--spacing)*6)}.sm\:pt-2{padding-top:calc(var(--spacing)*2)}.sm\:pt-3{padding-top:calc(var(--spacing)*3)}.sm\:pt-\[100px\]{padding-top:100px}.sm\:pr-1{padding-right:calc(var(--spacing)*1)}.sm\:pr-3{padding-right:calc(var(--spacing)*3)}.sm\:pl-3{padding-left:calc(var(--spacing)*3)}.sm\:text-left{text-align:left}.sm\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.sm\:text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.sm\:text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(min-width:48rem){.md\:mb-0{margin-bottom:calc(var(--spacing)*0)}:where(.md\:space-x-6>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*6)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-x-reverse)))}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(min-width:64rem){.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:inline{display:inline}.lg\:h-full{height:100%}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:overflow-auto{overflow:auto}.lg\:p-10{padding:calc(var(--spacing)*10)}}@container (min-width:32rem){.\@lg\:flex-col{flex-direction:column}}.dark\:border-blue-800\/50:is(.dark *){border-color:#193cb880}@supports (color:color-mix(in lab,red,red)){.dark\:border-blue-800\/50:is(.dark *){border-color:color-mix(in oklab,var(--color-blue-800)50%,transparent)}}.dark\:border-input:is(.dark *){border-color:var(--input)}.dark\:border-purple-500\/40:is(.dark *){border-color:#ac4bff66}@supports (color:color-mix(in lab,red,red)){.dark\:border-purple-500\/40:is(.dark *){border-color:color-mix(in oklab,var(--color-purple-500)40%,transparent)}}.dark\:border-purple-800\/50:is(.dark *){border-color:#6e11b080}@supports (color:color-mix(in lab,red,red)){.dark\:border-purple-800\/50:is(.dark *){border-color:color-mix(in oklab,var(--color-purple-800)50%,transparent)}}.dark\:border-red-800:is(.dark *){border-color:var(--color-red-800)}.dark\:border-red-800\/50:is(.dark *){border-color:#9f071280}@supports (color:color-mix(in lab,red,red)){.dark\:border-red-800\/50:is(.dark *){border-color:color-mix(in oklab,var(--color-red-800)50%,transparent)}}.dark\:border-white:is(.dark *){border-color:var(--color-white)}.dark\:border-yellow-800:is(.dark *){border-color:var(--color-yellow-800)}.dark\:border-zinc-500:is(.dark *){border-color:var(--color-zinc-500)}.dark\:border-zinc-600:is(.dark *){border-color:var(--color-zinc-600)}.dark\:border-zinc-700:is(.dark *){border-color:var(--color-zinc-700)}.dark\:border-zinc-800:is(.dark *){border-color:var(--color-zinc-800)}.dark\:bg-black:is(.dark *){background-color:var(--color-black)}.dark\:bg-black\/90:is(.dark *){background-color:#000000e6}@supports (color:color-mix(in lab,red,red)){.dark\:bg-black\/90:is(.dark *){background-color:color-mix(in oklab,var(--color-black)90%,transparent)}}.dark\:bg-blue-500\/20:is(.dark *){background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-blue-500\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.dark\:bg-blue-900\/20:is(.dark *){background-color:#1c398e33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-blue-900\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-blue-900)20%,transparent)}}.dark\:bg-blue-950\/20:is(.dark *){background-color:#16245633}@supports (color:color-mix(in lab,red,red)){.dark\:bg-blue-950\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-blue-950)20%,transparent)}}.dark\:bg-destructive\/60:is(.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:bg-destructive\/60:is(.dark *){background-color:color-mix(in oklab,var(--destructive)60%,transparent)}}.dark\:bg-emerald-500\/20:is(.dark *){background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-emerald-500\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-emerald-500)20%,transparent)}}.dark\:bg-gray-600:is(.dark *){background-color:var(--color-gray-600)}.dark\:bg-gray-800:is(.dark *){background-color:var(--color-gray-800)}.dark\:bg-input\/30:is(.dark *){background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:bg-input\/30:is(.dark *){background-color:color-mix(in oklab,var(--input)30%,transparent)}}.dark\:bg-purple-900\/20:is(.dark *){background-color:#59168b33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-purple-900\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-purple-900)20%,transparent)}}.dark\:bg-red-500\/20:is(.dark *){background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-500\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.dark\:bg-red-900\/20:is(.dark *){background-color:#82181a33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-900\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-red-900)20%,transparent)}}.dark\:bg-red-950\/10:is(.dark *){background-color:#4608091a}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-950\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-red-950)10%,transparent)}}.dark\:bg-red-950\/20:is(.dark *){background-color:#46080933}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-950\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-red-950)20%,transparent)}}.dark\:bg-white:is(.dark *){background-color:var(--color-white)}.dark\:bg-white\/10:is(.dark *){background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.dark\:bg-white\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.dark\:bg-yellow-900\/20:is(.dark *){background-color:#733e0a33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-yellow-900\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-yellow-900)20%,transparent)}}.dark\:bg-yellow-950\/10:is(.dark *){background-color:#4320041a}@supports (color:color-mix(in lab,red,red)){.dark\:bg-yellow-950\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-yellow-950)10%,transparent)}}.dark\:bg-zinc-100\/80:is(.dark *){background-color:#f4f4f5cc}@supports (color:color-mix(in lab,red,red)){.dark\:bg-zinc-100\/80:is(.dark *){background-color:color-mix(in oklab,var(--color-zinc-100)80%,transparent)}}.dark\:bg-zinc-700:is(.dark *){background-color:var(--color-zinc-700)}.dark\:bg-zinc-800:is(.dark *){background-color:var(--color-zinc-800)}.dark\:bg-zinc-900:is(.dark *){background-color:var(--color-zinc-900)}.dark\:bg-zinc-900\/90:is(.dark *){background-color:#18181be6}@supports (color:color-mix(in lab,red,red)){.dark\:bg-zinc-900\/90:is(.dark *){background-color:color-mix(in oklab,var(--color-zinc-900)90%,transparent)}}.dark\:bg-zinc-950:is(.dark *){background-color:var(--color-zinc-950)}.dark\:\[background-image\:var\(--dark-gradient\)\,var\(--aurora\)\]:is(.dark *){background-image:var(--dark-gradient),var(--aurora)}.dark\:bg-\[radial-gradient\(circle\,_rgba\(255\,255\,255\,0\.2\)_1px\,_transparent_1px\)\]:is(.dark *){background-image:radial-gradient(circle,#fff3 1px,#0000 1px)}.dark\:from-purple-500\/20:is(.dark *){--tw-gradient-from:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.dark\:from-purple-500\/20:is(.dark *){--tw-gradient-from:color-mix(in oklab,var(--color-purple-500)20%,transparent)}}.dark\:from-purple-500\/20:is(.dark *){--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))}.dark\:to-pink-500\/20:is(.dark *){--tw-gradient-to:#f6339a33}@supports (color:color-mix(in lab,red,red)){.dark\:to-pink-500\/20:is(.dark *){--tw-gradient-to:color-mix(in oklab,var(--color-pink-500)20%,transparent)}}.dark\:to-pink-500\/20:is(.dark *){--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))}.dark\:stroke-white:is(.dark *){stroke:var(--color-white)}.dark\:text-black:is(.dark *){color:var(--color-black)}.dark\:text-blue-400:is(.dark *){color:var(--color-blue-400)}.dark\:text-emerald-400:is(.dark *){color:var(--color-emerald-400)}.dark\:text-gray-100:is(.dark *){color:var(--color-gray-100)}.dark\:text-gray-300:is(.dark *){color:var(--color-gray-300)}.dark\:text-gray-400:is(.dark *){color:var(--color-gray-400)}.dark\:text-gray-500:is(.dark *){color:var(--color-gray-500)}.dark\:text-gray-600:is(.dark *){color:var(--color-gray-600)}.dark\:text-purple-300:is(.dark *){color:var(--color-purple-300)}.dark\:text-purple-400:is(.dark *){color:var(--color-purple-400)}.dark\:text-red-300:is(.dark *){color:var(--color-red-300)}.dark\:text-red-400:is(.dark *){color:var(--color-red-400)}.dark\:text-white:is(.dark *){color:var(--color-white)}.dark\:text-yellow-300:is(.dark *){color:var(--color-yellow-300)}.dark\:text-yellow-400:is(.dark *){color:var(--color-yellow-400)}.dark\:text-zinc-300:is(.dark *){color:var(--color-zinc-300)}.dark\:text-zinc-400:is(.dark *){color:var(--color-zinc-400)}.dark\:text-zinc-500:is(.dark *){color:var(--color-zinc-500)}.dark\:text-zinc-600:is(.dark *){color:var(--color-zinc-600)}.dark\:text-zinc-900:is(.dark *){color:var(--color-zinc-900)}.dark\:opacity-50:is(.dark *){opacity:.5}.dark\:ring-zinc-400:is(.dark *){--tw-ring-color:var(--color-zinc-400)}.dark\:contrast-200:is(.dark *){--tw-contrast:contrast(200%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.dark\:invert-0:is(.dark *){--tw-invert:invert(0%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.dark\:\[--base-color\:\#71717a\]:is(.dark *){--base-color:#71717a}.dark\:\[--base-gradient-color\:\#ffffff\]:is(.dark *){--base-gradient-color:#fff}.dark\:\[--bg\:linear-gradient\(90deg\,\#0000_calc\(50\%-var\(--spread\)\)\,var\(--base-gradient-color\)\,\#0000_calc\(50\%\+var\(--spread\)\)\)\]:is(.dark *){--bg:linear-gradient(90deg,#0000 calc(50% - var(--spread)),var(--base-gradient-color),#0000 calc(50% + var(--spread)))}@media(hover:hover){.dark\:group-hover\:bg-zinc-600:is(.dark *):is(:where(.group):hover *){background-color:var(--color-zinc-600)}}.after\:dark\:\[background-image\:var\(--dark-gradient\)\,var\(--aurora\)\]:after{content:var(--tw-content)}@media(hover:hover){.dark\:hover\:border-zinc-200:is(.dark *):hover{border-color:var(--color-zinc-200)}.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--accent)50%,transparent)}}.dark\:hover\:bg-black\/10:is(.dark *):hover{background-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-black\/10:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-black)10%,transparent)}}.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--input)50%,transparent)}}.dark\:hover\:bg-white\/15:is(.dark *):hover{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-white\/15:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.dark\:hover\:bg-white\/20:is(.dark *):hover{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-white\/20:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.dark\:hover\:bg-zinc-100:is(.dark *):hover{background-color:var(--color-zinc-100)}.dark\:hover\:bg-zinc-800:is(.dark *):hover{background-color:var(--color-zinc-800)}.dark\:hover\:bg-zinc-800\/50:is(.dark *):hover{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-zinc-800\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.dark\:hover\:bg-zinc-900:is(.dark *):hover{background-color:var(--color-zinc-900)}.dark\:hover\:from-purple-500\/30:is(.dark *):hover{--tw-gradient-from:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:from-purple-500\/30:is(.dark *):hover{--tw-gradient-from:color-mix(in oklab,var(--color-purple-500)30%,transparent)}}.dark\:hover\:from-purple-500\/30:is(.dark *):hover{--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))}.dark\:hover\:to-pink-500\/30:is(.dark *):hover{--tw-gradient-to:#f6339a4d}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:to-pink-500\/30:is(.dark *):hover{--tw-gradient-to:color-mix(in oklab,var(--color-pink-500)30%,transparent)}}.dark\:hover\:to-pink-500\/30:is(.dark *):hover{--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))}}.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:color-mix(in oklab,var(--destructive)40%,transparent)}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive)40%,transparent)}}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3 svg:not([class*=size-]){width:calc(var(--spacing)*3);height:calc(var(--spacing)*3)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\[\&_svg\:not\(\[class\*\=\'text-\'\]\)\]\:text-muted-foreground svg:not([class*=text-]){color:var(--muted-foreground)}.\[\.border-b\]\:pb-6.border-b{padding-bottom:calc(var(--spacing)*6)}.\[\.border-t\]\:pt-6.border-t{padding-top:calc(var(--spacing)*6)}:is(.\*\:\[span\]\:last\:flex>*):is(span):last-child{display:flex}:is(.\*\:\[span\]\:last\:items-center>*):is(span):last-child{align-items:center}:is(.\*\:\[span\]\:last\:gap-2>*):is(span):last-child{gap:calc(var(--spacing)*2)}.\[\&\>svg\]\:pointer-events-none>svg{pointer-events:none}.\[\&\>svg\]\:mr-0>svg{margin-right:calc(var(--spacing)*0)}.\[\&\>svg\]\:size-3>svg{width:calc(var(--spacing)*3);height:calc(var(--spacing)*3)}@media(min-width:64rem){.lg\:\[\&\>svg\]\:mr-2>svg{margin-right:calc(var(--spacing)*2)}}.\[\&\[data-panel-group-direction\=vertical\]\>div\]\:rotate-90[data-panel-group-direction=vertical]>div{rotate:90deg}[data-slot=tooltip-content] .\[\[data-slot\=tooltip-content\]_\&\]\:bg-background\/20{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){[data-slot=tooltip-content] .\[\[data-slot\=tooltip-content\]_\&\]\:bg-background\/20{background-color:color-mix(in oklab,var(--background)20%,transparent)}}[data-slot=tooltip-content] .\[\[data-slot\=tooltip-content\]_\&\]\:text-background{color:var(--background)}[data-slot=tooltip-content] .dark\:\[\[data-slot\=tooltip-content\]_\&\]\:bg-background\/10:is(.dark *){background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){[data-slot=tooltip-content] .dark\:\[\[data-slot\=tooltip-content\]_\&\]\:bg-background\/10:is(.dark *){background-color:color-mix(in oklab,var(--background)10%,transparent)}}@media(hover:hover){a.\[a\&\]\:hover\:bg-accent:hover{background-color:var(--accent)}a.\[a\&\]\:hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive)90%,transparent)}}a.\[a\&\]\:hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary)90%,transparent)}}a.\[a\&\]\:hover\:bg-secondary\/90:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-secondary\/90:hover{background-color:color-mix(in oklab,var(--secondary)90%,transparent)}}a.\[a\&\]\:hover\:text-accent-foreground:hover{color:var(--accent-foreground)}}.\@lg\:flex-col{flex-direction:column}@container (min-width:32rem){.\@lg\:flex-col{flex-direction:row}}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:root{--radius:.625rem;--cmdk-shadow:0 16px 70px #0003;--background:oklch(100% 0 0);--foreground:oklch(14.1% .005 285.823);--card:oklch(100% 0 0);--card-foreground:oklch(14.1% .005 285.823);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.1% .005 285.823);--primary:oklch(21% .006 285.885);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(96.7% .001 286.375);--secondary-foreground:oklch(21% .006 285.885);--muted:oklch(96.7% .001 286.375);--muted-foreground:oklch(55.2% .016 285.938);--accent:oklch(96.7% .001 286.375);--accent-foreground:oklch(21% .006 285.885);--destructive:oklch(57.7% .245 27.325);--border:oklch(92% .004 286.32);--input:oklch(92% .004 286.32);--ring:oklch(70.5% .015 286.067);--chart-1:oklch(64.6% .222 41.116);--chart-2:oklch(60% .118 184.704);--chart-3:oklch(39.8% .07 227.392);--chart-4:oklch(82.8% .189 84.429);--chart-5:oklch(76.9% .188 70.08);--sidebar:oklch(98.5% 0 0);--sidebar-foreground:oklch(14.1% .005 285.823);--sidebar-primary:oklch(21% .006 285.885);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(96.7% .001 286.375);--sidebar-accent-foreground:oklch(21% .006 285.885);--sidebar-border:oklch(92% .004 286.32);--sidebar-ring:oklch(70.5% .015 286.067)}.dark{--cmdk-shadow:0 16px 70px #00000080;--background:oklch(14.1% .005 285.823);--foreground:oklch(98.5% 0 0);--card:oklch(21% .006 285.885);--card-foreground:oklch(98.5% 0 0);--popover:oklch(21% .006 285.885);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(92% .004 286.32);--primary-foreground:oklch(21% .006 285.885);--secondary:oklch(27.4% .006 286.033);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(27.4% .006 286.033);--muted-foreground:oklch(70.5% .015 286.067);--accent:oklch(27.4% .006 286.033);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(70.4% .191 22.216);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.2% .016 285.938);--chart-1:oklch(48.8% .243 264.376);--chart-2:oklch(69.6% .17 162.48);--chart-3:oklch(76.9% .188 70.08);--chart-4:oklch(62.7% .265 303.9);--chart-5:oklch(64.5% .246 16.439);--sidebar:oklch(21% .006 285.885);--sidebar-foreground:oklch(98.5% 0 0);--sidebar-primary:oklch(48.8% .243 264.376);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(27.4% .006 286.033);--sidebar-accent-foreground:oklch(98.5% 0 0);--sidebar-border:oklch(100% 0 0/.1);--sidebar-ring:oklch(55.2% .016 285.938)}@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-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}@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-space-x-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-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{0%,to{box-shadow:0 0 0 0 var(--pulse-color)}50%{box-shadow:0 0 0 8px var(--pulse-color)}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}@keyframes aurora{0%{background-position:50%,50%}to{background-position:350%,350%}}@keyframes shimmer-slide{to{transform:translate(calc(100cqw - 100%))}}@keyframes spin-around{0%{transform:translateZ(0)rotate(0)}15%,35%{transform:translateZ(0)rotate(90deg)}65%,85%{transform:translateZ(0)rotate(270deg)}to{transform:translateZ(0)rotate(360deg)}}@keyframes status-pulse{0%{box-shadow:0 0 #22c55e66}70%{box-shadow:0 0 0 8px #22c55e00}to{box-shadow:0 0 #22c55e00}}@keyframes status-pulse-red{0%{box-shadow:0 0 #ef444466}70%{box-shadow:0 0 0 8px #ef444400}to{box-shadow:0 0 #ef444400}}@keyframes status-pulse-yellow{0%{box-shadow:0 0 #eab30866}70%{box-shadow:0 0 0 8px #eab30800}to{box-shadow:0 0 #eab30800}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as B}from"./langfuse-C4HKZ3NL-CsiDw8Wb.js";import"./index-CFpQGWTL.js";import"./chunk-VL2OQCWN-lvFdpsKs.js";import"./index-DRz5BQNA.js";import"./__vite-browser-external-DFygW7-s.js";import"./path-C9FudP8b.js";var J={};class ge{constructor(){this.events={},this.events={}}on(e,t){return this.events[e]||(this.events[e]=[]),this.events[e].push(t),()=>{this.events[e]=this.events[e].filter(s=>s!==t)}}emit(e,t){for(const s of this.events[e]||[])s(t);for(const s of this.events["*"]||[])s(e,t)}}const ye=60;class be{constructor(e,t){this.value=e,this._expiry=Date.now()+t*1e3}get isExpired(){return Date.now()>this._expiry}}class _e{constructor(){this._cache=new Map,this._defaultTtlSeconds=ye,this._refreshingKeys=new Map}getIncludingExpired(e){return this._cache.get(e)??null}set(e,t,s){const n=s??this._defaultTtlSeconds;this._cache.set(e,new be(t,n))}addRefreshingPromise(e,t){this._refreshingKeys.set(e,t),t.then(()=>{this._refreshingKeys.delete(e)}).catch(()=>{this._refreshingKeys.delete(e)})}isRefreshing(e){return this._refreshingKeys.has(e)}invalidate(e){console.log("invalidating",e,this._cache.keys());for(const t of this._cache.keys())t.startsWith(e)&&this._cache.delete(t)}}var I;(function(r){r.Props="props",r.Queue="queue",r.OptedOut="opted_out"})(I||(I={}));var b;(function(r){r.ChatMessage="chatmessage",r.Placeholder="placeholder"})(b||(b={}));B.escape=function(r){return r};class ee{constructor(e,t=!1,s){this.name=e.name,this.version=e.version,this.config=e.config,this.labels=e.labels,this.tags=e.tags,this.isFallback=t,this.type=s,this.commitMessage=e.commitMessage}_transformToLangchainVariables(e){return this.escapeJsonForLangchain(e).replace(/\{\{(\w+)\}\}/g,"{$1}")}escapeJsonForLangchain(e){const t=[],s=[];let n=0;const o=e.length;for(;n<o;){const a=e[n];if(a==="{"){if(n+1<o&&e[n+1]==="{"){t.push("{{"),n+=2;continue}let c=n+1;for(;c<o&&/\s/.test(e[c]);)c++;const i=c<o&&(e[c]==="'"||e[c]==='"');t.push(i?"{{":"{"),s.push(i),n+=1;continue}if(a==="}"){if(n+1<o&&e[n+1]==="}"){t.push("}}"),n+=2;continue}const c=s.pop()??!1;t.push(c?"}}":"}"),n+=1;continue}t.push(a),n+=1}return t.join("")}}class k extends ee{constructor(e,t=!1){super(e,t,"text"),this.promptResponse=e,this.prompt=e.prompt}compile(e,t){return B.render(this.promptResponse.prompt,e??{})}getLangchainPrompt(e){return this._transformToLangchainVariables(this.prompt)}toJSON(){return JSON.stringify({name:this.name,prompt:this.prompt,version:this.version,isFallback:this.isFallback,tags:this.tags,labels:this.labels,type:this.type,config:this.config})}}class O extends ee{constructor(e,t=!1){const s=O.normalizePrompt(e.prompt),n={...e,prompt:s};super(n,t,"chat"),this.promptResponse=n,this.prompt=s}static normalizePrompt(e){return e.map(t=>"type"in t?t:{type:b.ChatMessage,...t})}compile(e,t){const s=[],n=t??{};for(const o of this.prompt)if("type"in o&&o.type===b.Placeholder){const a=n[o.name];Array.isArray(a)&&a.length>0&&a.every(c=>typeof c=="object"&&"role"in c&&"content"in c)?s.push(...a):Array.isArray(a)&&a.length===0||(a!==void 0?s.push(JSON.stringify(a)):s.push(o))}else"role"in o&&"content"in o&&o.type===b.ChatMessage&&s.push({role:o.role,content:o.content});return s.map(o=>typeof o=="object"&&o!==null&&"role"in o&&"content"in o?{...o,content:B.render(o.content,e??{})}:o)}getLangchainPrompt(e){const t=[],s=e?.placeholders??{};for(const n of this.prompt)if("type"in n&&n.type===b.Placeholder){const o=s[n.name];Array.isArray(o)&&o.length>0&&o.every(a=>typeof a=="object"&&"role"in a&&"content"in a)?t.push(...o.map(a=>({role:a.role,content:this._transformToLangchainVariables(a.content)}))):Array.isArray(o)&&o.length===0||(o!==void 0?t.push(JSON.stringify(o)):t.push({variableName:n.name,optional:!1}))}else"role"in n&&"content"in n&&n.type===b.ChatMessage&&t.push({role:n.role,content:this._transformToLangchainVariables(n.content)});return t}toJSON(){return JSON.stringify({name:this.name,prompt:this.promptResponse.prompt.map(e=>{if("type"in e&&e.type===b.ChatMessage){const{type:t,...s}=e;return s}return e}),version:this.version,isFallback:this.isFallback,tags:this.tags,labels:this.labels,type:this.type,config:this.config})}}function Ee(r,e){if(!r)throw new Error(e)}function te(r){return r?.replace(/\/+$/,"")}async function F(r,e={},t){const{retryCount:s=3,retryDelay:n=5e3,retryCheck:o=()=>!0}=e;let a=null;for(let c=0;c<s+1;c++){c>0&&(await new Promise(i=>setTimeout(i,n)),t(`Retrying ${c+1} of ${s+1}`));try{return await r()}catch(i){if(a=i,!o(i))throw i;t(`Retriable error: ${JSON.stringify(i)}`)}}throw a}function w(r){let e=new Date().getTime(),t=r&&r.performance&&r.performance.now&&r.performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){let n=Math.random()*16;return e>0?(n=(e+n)%16|0,e=Math.floor(e/16)):(n=(t+n)%16|0,t=Math.floor(t/16)),(s==="x"?n:n&3|8).toString(16)})}function we(){return new Date().getTime()}function se(){return new Date().toISOString()}function re(r,e){const t=setTimeout(r,e);return t?.unref&&t?.unref(),t}function g(r){if(typeof process<"u"&&J[r])return J[r];if(typeof globalThis<"u")return globalThis[r]}function Se(r,e=!0){const{publicKey:t,secretKey:s,...n}=r??{},o=t??g("LANGFUSE_PUBLIC_KEY"),a=e?s??g("LANGFUSE_SECRET_KEY"):void 0,c=n.baseUrl??g("LANGFUSE_BASEURL"),i={...n,baseUrl:c};return{publicKey:o,...e?{secretKey:a}:void 0,...i}}const C=r=>{const e=new URLSearchParams;return Object.entries(r??{}).forEach(([t,s])=>{s!=null&&(s instanceof Date?e.append(t,s.toISOString()):e.append(t,s.toString()))}),e.toString()};var ne=Object.freeze({__proto__:null,assert:Ee,configLangfuseSDK:Se,currentISOTime:se,currentTimestamp:we,encodeQueryParams:C,generateUUID:w,getEnv:g,removeTrailingSlash:te,retriable:F,safeSetTimeout:re});const ve=["VERCEL_GIT_COMMIT_SHA","NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA","COMMIT_REF","RENDER_GIT_COMMIT","CI_COMMIT_SHA","CIRCLE_SHA1","CF_PAGES_COMMIT_SHA","REACT_APP_GIT_SHA","SOURCE_VERSION","TRIGGER_DEPLOYMENT_ID"];function Te(){for(const r of ve){const e=g(r);if(e)return e}}let P=null,$=null;const j=r=>import(r);typeof globalThis.Deno<"u"?Promise.all([j("node:fs"),j("node:crypto")]).then(([r,e])=>{P=r,$=e}).catch():typeof process<"u"&&process.versions?.node?Promise.all([j("fs"),j("crypto")]).then(([r,e])=>{P=r,$=e}).catch():typeof crypto<"u"&&($=crypto);class v{constructor(e){const{obj:t,base64DataUri:s,contentType:n,contentBytes:o,filePath:a}=e;if(this.obj=t,this._mediaId=void 0,s){const[c,i]=this.parseBase64DataUri(s);this._contentBytes=c,this._contentType=i,this._source="base64_data_uri"}else if(o&&n)this._contentBytes=o,this._contentType=n,this._source="bytes";else if(a&&n){if(!P)throw new Error("File system support is not available in this environment");if(!P.existsSync(a))throw new Error(`File at path ${a} does not exist`);this._contentBytes=this.readFile(a),this._contentType=this._contentBytes?n:void 0,this._source=this._contentBytes?"file":void 0}else console.error("base64DataUri, or contentBytes and contentType, or filePath must be provided to LangfuseMedia")}readFile(e){try{if(!P)throw new Error("File system support is not available in this environment");return P.readFileSync(e)}catch(t){console.error(`Error reading file at path ${e}`,t);return}}parseBase64DataUri(e){try{if(!e||typeof e!="string")throw new Error("Data URI is not a string");if(!e.startsWith("data:"))throw new Error("Data URI does not start with 'data:'");const[t,s]=e.slice(5).split(",",2);if(!t||!s)throw new Error("Invalid URI");const n=t.split(";");if(!n.includes("base64"))throw new Error("Data is not base64 encoded");const o=n[0];if(!o)throw new Error("Content type is empty");return[Buffer.from(s,"base64"),o]}catch(t){return console.error("Error parsing base64 data URI",t),[void 0,void 0]}}get contentLength(){return this._contentBytes?.length}get contentSha256Hash(){if(!this._contentBytes)return;if(!$){console.error("Crypto support is not available in this environment");return}return $.createHash("sha256").update(this._contentBytes).digest("base64")}toJSON(){return!this._contentType||!this._source||!this._mediaId?`<Upload handling failed for LangfuseMedia of type ${this._contentType}>`:`@@@langfuseMedia:type=${this._contentType}|id=${this._mediaId}|source=${this._source}@@@`}static parseReferenceString(e){const t="@@@langfuseMedia:";if(!e.startsWith(t))throw new Error("Reference string does not start with '@@@langfuseMedia:type='");if(!e.endsWith("@@@"))throw new Error("Reference string does not end with '@@@'");const o=e.slice(t.length,-3).split("|"),a={};for(const c of o){const[i,u]=c.split("=",2);a[i]=u}if(!("type"in a&&"id"in a&&"source"in a))throw new Error("Missing required fields in reference string");return{mediaId:a.id,source:a.source,contentType:a.type}}static async resolveMediaReferences(e){const{obj:t,langfuseClient:s,maxDepth:n=10}=e;async function o(a,c){if(c>n)return a;if(typeof a=="string"){const i=/@@@langfuseMedia:.+?@@@/g,u=a.match(i);if(!u)return a;let h=a;const l=new Map;await Promise.all(u.map(async p=>{try{const m=v.parseReferenceString(p),y=await s.fetchMedia(m.mediaId),_=await s.fetch(y.url,{method:"GET",headers:{}});if(_.status!==200)throw new Error("Failed to fetch media content");const E=Buffer.from(await _.arrayBuffer()).toString("base64"),f=`data:${y.contentType};base64,${E}`;l.set(p,f)}catch(m){console.warn("Error fetching media content for reference string",p,m)}}));for(const[p,m]of l.entries())h=h.replaceAll(p,m);return h}return Array.isArray(a)?Promise.all(a.map(async i=>await o(i,c+1))):typeof a=="object"&&a!==null?Object.fromEntries(await Promise.all(Object.entries(a).map(async([i,u])=>[i,await o(u,c+1)]))):a}return o(t,0)}}function Ie(r,e){return e===void 0?!0:e===0?!1:e<0||e>1||isNaN(e)?(console.warn("Sample rate must be between 0 and 1. Ignoring setting."),!0):Pe(r)<e}function Pe(r){let e=0;const t=31;for(let s=0;s<r.length;s++)e=e*t+r.charCodeAt(s)>>>0;return e=(e>>>16^e)*73244475,e=(e>>>16^e)*73244475,e=e>>>16^e,Math.abs(e)/2147483647}const z=g("LANGFUSE_MAX_EVENT_SIZE_BYTES")?Number(g("LANGFUSE_MAX_EVENT_SIZE_BYTES")):1e6,Le=g("LANGFUSE_MAX_BATCH_SIZE_BYTES")?Number(g("LANGFUSE_MAX_BATCH_SIZE_BYTES")):25e5,H=/^(?!langfuse)[a-z0-9_-]+$/,Ae=["langfuse-prompt-experiment"];class U extends Error{constructor(e,t){super("HTTP error while fetching Langfuse: "+e.status+" and body: "+t),this.response=e,this.name="LangfuseFetchHttpError"}}class M extends Error{constructor(e){super("Network error while fetching Langfuse",e instanceof Error?{cause:e}:{}),this.error=e,this.name="LangfuseFetchNetworkError"}}function oe(r){return typeof r=="object"&&r.name==="LangfuseFetchHttpError"}function ae(r){return typeof r=="object"&&r.name==="LangfuseFetchNetworkError"}function Ce(r){return oe(r)||ae(r)}const D="https://langfuse.com/support",Oe="https://api.reference.langfuse.com",$e="https://langfuse.com/docs/rbac",Re="https://langfuse.com/docs/sdk/typescript/guide",je="https://langfuse.com/faq/all/api-limits",Ue="https://www.npmjs.com/package/langfuse",Q=`Make sure to keep your SDK updated, refer to ${Ue} for details.`,x=`This is an unusual occurrence and we are monitoring it closely. For help, please contact support: ${D}.`,V=`Unexpected error occurred. Please check your request and contact support: ${D}.`,xe=new Map([[500,`Internal server error occurred. For help, please contact support: ${D}`],[501,`Not implemented. Please check your request and contact support for help: ${D}.`],[502,`Bad gateway. ${x}`],[503,`Service unavailable. ${x}`],[504,`Gateway timeout. ${x}`],[404,`Internal error occurred. ${x}`],[400,`Bad request. Please check your request for any missing or incorrect parameters. Refer to our API docs: ${Oe} for details.`],[401,`Unauthorized. Please check your public/private host settings. Refer to our installation and setup guide: ${Re} for details on SDK configuration.`],[403,`Forbidden. Please check your access control settings. Refer to our RBAC docs: ${$e} for details.`],[429,`Rate limit exceeded. For more information on rate limits please see: ${je}`]]);function De(r){if(!r)return`${V} ${Q}`;const e=xe.get(r)||V;return`${r}: ${e} ${Q}`}function G(r){if(oe(r)){const e=r.response.status,t=De(e);console.error("[Langfuse SDK]",t,`Error details: ${r}`)}else ae(r)?console.error("[Langfuse SDK] Network error: ",r):console.error("[Langfuse SDK] Unknown error:",r)}class ie{constructor(e){this.additionalHeaders={},this.debugMode=!1,this.pendingEventProcessingPromises={},this.pendingIngestionPromises={},this.localEventExportMap=new Map,this._events=new ge;const{publicKey:t,secretKey:s,enabled:n,_projectId:o,_isLocalEventExportEnabled:a,...c}=e;if(this._events.on("error",i=>{console.error(`[Langfuse SDK] ${typeof i=="string"?i:JSON.stringify(i)}`)}),this.enabled=n!==!1,this.publicKey=t??"",this.secretKey=s,this.baseUrl=te(c?.baseUrl||"https://cloud.langfuse.com"),this.additionalHeaders=c?.additionalHeaders||{},this.flushAt=c?.flushAt?Math.max(c?.flushAt,1):15,this.flushInterval=c?.flushInterval??1e4,this.release=c?.release??g("LANGFUSE_RELEASE")??Te()??void 0,this.mask=c?.mask,this.sampleRate=c?.sampleRate??(g("LANGFUSE_SAMPLE_RATE")?Number(g("LANGFUSE_SAMPLE_RATE")):void 0),this.sampleRate&&this._events.emit("debug",`Langfuse trace sampling enabled with sampleRate ${this.sampleRate}.`),this.environment=c?.environment??g("LANGFUSE_TRACING_ENVIRONMENT"),this.environment&&!(H.test(this.environment)||Ae.includes(this.environment))&&!a&&this._events.emit("error",`Invalid tracing environment set: ${this.environment} . Environment must match regex ${H}. Events will be rejected by Langfuse server.`),this._retryOptions={retryCount:c?.fetchRetryCount??3,retryDelay:c?.fetchRetryDelay??3e3,retryCheck:Ce},this.requestTimeout=c?.requestTimeout??5e3,this.sdkIntegration=c?.sdkIntegration??"DEFAULT",this.isLocalEventExportEnabled=a??!1,this.isLocalEventExportEnabled&&!o){this._events.emit("error","Local event export is enabled, but no project ID was provided. Disabling local export."),this.isLocalEventExportEnabled=!1;return}else if(!this.isLocalEventExportEnabled&&o){this._events.emit("error","Local event export is disabled, but a project ID was provided. Disabling local export."),this.isLocalEventExportEnabled=!1;return}else this.projectId=o}getSdkIntegration(){return this.sdkIntegration}getCommonEventProperties(){return{$lib:this.getLibraryId(),$lib_version:this.getLibraryVersion()}}on(e,t){return this._events.on(e,t)}debug(e=!0){this.removeDebugCallback?.(),this.debugMode=e,e&&(this.removeDebugCallback=this.on("*",(t,s)=>{t!=="error"&&console.log("[Langfuse Debug]",t,JSON.stringify(s))}))}traceStateless(e){const{id:t,timestamp:s,release:n,...o}=e,a=t??w(),c=n??this.release,i={id:a,release:c,timestamp:s??new Date,environment:this.environment,...o};return this.enqueue("trace-create",i),a}eventStateless(e){const{id:t,startTime:s,...n}=e,o=t??w(),a={id:o,startTime:s??new Date,environment:this.environment,...n};return this.enqueue("event-create",a),o}spanStateless(e){const{id:t,startTime:s,...n}=e,o=t||w(),a={id:o,startTime:s??new Date,environment:this.environment,...n};return this.enqueue("span-create",a),o}generationStateless(e){const{id:t,startTime:s,prompt:n,...o}=e,a=n&&!n.isFallback?{promptName:n.name,promptVersion:n.version}:{},c=t||w(),i={id:c,startTime:s??new Date,environment:this.environment,...a,...o};return this.enqueue("generation-create",i),c}scoreStateless(e){const{id:t,...s}=e,n=t||w(),o={id:n,environment:this.environment,...s};return this.enqueue("score-create",o),n}updateSpanStateless(e){return this.enqueue("span-update",e),e.id}updateGenerationStateless(e){const{prompt:t,...s}=e,o={...t&&!t.isFallback?{promptName:t.name,promptVersion:t.version}:{},...s};return this.enqueue("generation-update",o),e.id}async _getDataset(e){const t=encodeURIComponent(e);return this.fetchAndLogErrors(`${this.baseUrl}/api/public/v2/datasets/${t}`,this._getFetchOptions({method:"GET"}))}async _getDatasetItems(e){const t=new URLSearchParams;return Object.entries(e??{}).forEach(([s,n])=>{n!=null&&t.append(s,n.toString())}),this.fetchAndLogErrors(`${this.baseUrl}/api/public/dataset-items?${t}`,this._getFetchOptions({method:"GET"}))}async _fetchMedia(e){return this.fetchAndLogErrors(`${this.baseUrl}/api/public/media/${e}`,this._getFetchOptions({method:"GET"}))}async fetchTraces(e){const{data:t,meta:s}=await this.fetchAndLogErrors(`${this.baseUrl}/api/public/traces?${C(e)}`,this._getFetchOptions({method:"GET"}));return{data:t,meta:s}}async fetchTrace(e){return{data:await this.fetchAndLogErrors(`${this.baseUrl}/api/public/traces/${e}`,this._getFetchOptions({method:"GET"}))}}async fetchObservations(e){const{data:t,meta:s}=await this.fetchAndLogErrors(`${this.baseUrl}/api/public/observations?${C(e)}`,this._getFetchOptions({method:"GET"}));return{data:t,meta:s}}async fetchObservation(e){return{data:await this.fetchAndLogErrors(`${this.baseUrl}/api/public/observations/${e}`,this._getFetchOptions({method:"GET"}))}}async fetchSessions(e){const{data:t,meta:s}=await this.fetchAndLogErrors(`${this.baseUrl}/api/public/sessions?${C(e)}`,this._getFetchOptions({method:"GET"}));return{data:t,meta:s}}async getDatasetRun(e){const t=encodeURIComponent(e.datasetName),s=encodeURIComponent(e.runName);return this.fetchAndLogErrors(`${this.baseUrl}/api/public/datasets/${t}/runs/${s}`,this._getFetchOptions({method:"GET"}))}async getDatasetRuns(e,t){return this.fetchAndLogErrors(`${this.baseUrl}/api/public/datasets/${encodeURIComponent(e)}/runs?${C(t)}`,this._getFetchOptions({method:"GET"}))}async createDatasetRunItem(e){return this.fetchAndLogErrors(`${this.baseUrl}/api/public/dataset-run-items`,this._getFetchOptions({method:"POST",body:JSON.stringify(e)}))}async createDataset(e){const t=typeof e=="string"?{name:e}:e;return this.fetchAndLogErrors(`${this.baseUrl}/api/public/datasets`,this._getFetchOptions({method:"POST",body:JSON.stringify(t)}))}async createDatasetItem(e){return this.fetchAndLogErrors(`${this.baseUrl}/api/public/dataset-items`,this._getFetchOptions({method:"POST",body:JSON.stringify(e)}))}async getDatasetItem(e){return this.fetchAndLogErrors(`${this.baseUrl}/api/public/dataset-items/${e}`,this._getFetchOptions({method:"GET"}))}_parsePayload(e){try{return JSON.parse(e)}catch{return e}}async createPromptStateless(e){return this.fetchAndLogErrors(`${this.baseUrl}/api/public/v2/prompts`,this._getFetchOptions({method:"POST",body:JSON.stringify(e)}))}async updatePromptStateless(e){return this.fetchAndLogErrors(`${this.baseUrl}/api/public/v2/prompts/${encodeURIComponent(e.name)}/versions/${encodeURIComponent(e.version)}`,this._getFetchOptions({method:"PATCH",body:JSON.stringify(e)}))}async getPromptStateless(e,t,s,n,o){const a=encodeURIComponent(e),c=new URLSearchParams;if(t&&s)throw new Error("Provide either version or label, not both.");t&&c.append("version",t.toString()),s&&c.append("label",s);const i=`${this.baseUrl}/api/public/v2/prompts/${a}${c.size?"?"+c:""}`,u=this._getBoundedMaxRetries({maxRetries:n,defaultMaxRetries:2,maxRetriesUpperBound:4}),h={...this._retryOptions,retryCount:u,retryDelay:500};return F(async()=>{const p=await this.fetch(i,this._getFetchOptions({method:"GET",fetchTimeout:o??this.requestTimeout})).catch(y=>{throw y.name==="AbortError"?new M("Fetch request timed out"):new M(y)});if(p.status>=500)throw new U(p,await p.text());const m=await p.json();return{fetchResult:p.status===200?"success":"failure",data:m}},h,p=>this._events.emit("retry",p+", "+i+", "+JSON.stringify(h)))}_getBoundedMaxRetries(e){const t=Math.max(e.defaultMaxRetries??2,0),s=Math.max(e.maxRetriesUpperBound??4,0);return e.maxRetries===void 0?t:Math.min(Math.max(e.maxRetries,0),s)}enqueue(e,t){if(!this.enabled)return;const s=this.parseTraceId(e,t);if(!s)this._events.emit("warning","Failed to parse traceID for sampling. Please open a Github issue in https://github.com/langfuse/langfuse/issues/new/choose");else if(!Ie(s,this.sampleRate)){this._events.emit("debug",`Event with trace ID ${s} is out of sample. Skipping.`);return}const n=this.processEnqueueEvent(e,t),o=w();this.pendingEventProcessingPromises[o]=n,n.catch(a=>{this._events.emit("error",a)}).finally(()=>{delete this.pendingEventProcessingPromises[o]})}async processEnqueueEvent(e,t){this.maskEventBodyInPlace(t),await this.processMediaInEvent(e,t);const s=this.truncateEventBody(t,z);try{JSON.stringify(s)}catch(o){this._events.emit("error",`Event Body for ${e} is not JSON-serializable: ${o}`);return}const n=this.getPersistedProperty(I.Queue)||[];n.push({id:w(),type:e,timestamp:se(),body:s,metadata:void 0}),this.setPersistedProperty(I.Queue,n),this._events.emit(e,s),n.length>=this.flushAt&&this.flush(),this.flushInterval&&!this._flushTimer&&(this._flushTimer=re(()=>this.flush(),this.flushInterval))}maskEventBodyInPlace(e){if(!this.mask)return;const t=["input","output"];for(const s of t)if(s in e)try{e[s]=this.mask({data:e[s]})}catch(n){this._events.emit("error",`Error masking ${s}: ${n}`),e[s]="<fully masked due to failed mask function>"}}truncateEventBody(e,t){const s=this.getByteSize(e);if(s<=t)return e;this._events.emit("warning",`Event Body is too large (${s} bytes) and will be truncated`);const o=["input","output","metadata"].map(i=>({key:i,size:i in e?this.getByteSize(e[i]):0})).sort((i,u)=>u.size-i.size);let a={...e},c=s;for(const{key:i,size:u}of o)c>t&&Object.prototype.hasOwnProperty.call(a,i)&&(a={...a,[i]:"<truncated due to size exceeding limit>"},this._events.emit("warning",`Truncated ${i} due to total size exceeding limit`),c-=u);return a}getByteSize(e){const t=JSON.stringify(e);return typeof TextEncoder<"u"?new TextEncoder().encode(t).length:encodeURIComponent(t).replace(/%[A-F\d]{2}/g,"U").length}async processMediaInEvent(e,t){if(!t)return;const s=this.parseTraceId(e,t);if(!s){this._events.emit("warning","traceId is required for media upload");return}const n=(e.includes("generation")||e.includes("span"))&&t.id?t.id:void 0;await Promise.all(["input","output","metadata"].map(async o=>{t[o]&&(t[o]=await this.findAndProcessMedia({data:t[o],traceId:s,observationId:n,field:o}).catch(a=>{this._events.emit("error",`Error processing multimodal event: ${a}`)})??t[o])}))}parseTraceId(e,t){return"traceId"in t?t.traceId:e.includes("trace")?t.id:void 0}async findAndProcessMedia({data:e,traceId:t,observationId:s,field:n}){const o=new WeakMap,a=10,c=async(i,u)=>{if(typeof i=="string"&&i.startsWith("data:")){const h=new v({base64DataUri:i});return await this.processMediaItem({media:h,traceId:t,observationId:s,field:n}),h}if(typeof i!="object"||i===null||o.has(i)||u>a)return i;if(o.set(i,!0),i instanceof v||Object.prototype.toString.call(i)==="[object LangfuseMedia]")return await this.processMediaItem({media:i,traceId:t,observationId:s,field:n}),i;if(Array.isArray(i))return await Promise.all(i.map(h=>c(h,u+1)));if(typeof i=="object"&&i!==null){if("input_audio"in i&&typeof i.input_audio=="object"&&"data"in i.input_audio){const h=new v({base64DataUri:`data:audio/${i.input_audio.format||"wav"};base64,${i.input_audio.data}`});return await this.processMediaItem({media:h,traceId:t,observationId:s,field:n}),{...i,input_audio:{...i.input_audio,data:h}}}if("audio"in i&&typeof i.audio=="object"&&"data"in i.audio){const h=new v({base64DataUri:`data:audio/${i.audio.format||"wav"};base64,${i.audio.data}`});return await this.processMediaItem({media:h,traceId:t,observationId:s,field:n}),{...i,audio:{...i.audio,data:h}}}return Object.fromEntries(await Promise.all(Object.entries(i).map(async([h,l])=>[h,await c(l,u+1)])))}return i};return await c(e,1)}async processMediaItem({media:e,traceId:t,observationId:s,field:n}){try{if(!e.contentLength||!e._contentType||!e.contentSha256Hash||!e._contentBytes)return;const o={contentLength:e.contentLength,traceId:t,observationId:s,field:n,contentType:e._contentType,sha256Hash:e.contentSha256Hash},c=await(await this.fetch(`${this.baseUrl}/api/public/media`,this._getFetchOptions({method:"POST",body:JSON.stringify(o)}))).json(),{uploadUrl:i,mediaId:u}=c;if(e._mediaId=u,i){this._events.emit("debug",`Uploading media ${u}`);const h=Date.now(),l=await this.uploadMediaWithBackoff({uploadUrl:i,contentBytes:e._contentBytes,contentType:e._contentType,contentSha256Hash:e.contentSha256Hash,maxRetries:3,baseDelay:1e3});if(!l)throw Error("Media upload process failed");const p={uploadedAt:new Date().toISOString(),uploadHttpStatus:l.status,uploadHttpError:await l.text(),uploadTimeMs:Date.now()-h};await this.fetch(`${this.baseUrl}/api/public/media/${u}`,this._getFetchOptions({method:"PATCH",body:JSON.stringify(p)})),this._events.emit("debug",`Media upload status reported for ${u}`)}else this._events.emit("debug",`Media ${u} already uploaded`)}catch(o){this._events.emit("error",`Error processing media item: ${o}`)}}async uploadMediaWithBackoff(e){const{uploadUrl:t,contentType:s,contentSha256Hash:n,contentBytes:o,maxRetries:a,baseDelay:c}=e;for(let i=0;i<=a;i++)try{const u=await this.fetch(t,{method:"PUT",body:o,headers:{"Content-Type":s,"x-amz-checksum-sha256":n,"x-ms-blob-type":"BlockBlob"}});if(i<a&&u.status!==200&&u.status!==201)throw new Error(`Upload failed with status ${u.status}`);return u}catch(u){if(i===a)throw u;const h=c*Math.pow(2,i),l=Math.random()*1e3;await new Promise(p=>setTimeout(p,h+l))}}async flushAsync(){return await Promise.all(Object.values(this.pendingEventProcessingPromises)).catch(e=>{G(e)}),new Promise((e,t)=>{try{this.flush((s,n)=>{s?(G(s),e()):e(n)})}catch(s){console.error("[Langfuse SDK] Error while flushing Langfuse",s)}})}flush(e){this._flushTimer&&(clearTimeout(this._flushTimer),this._flushTimer=null);const t=this.getPersistedProperty(I.Queue)||[];if(!t.length)return e?.();const s=t.splice(0,this.flushAt),{processedItems:n,remainingItems:o}=this.processQueueItems(s,z,Le);this.setPersistedProperty(I.Queue,[...o,...t]);const a=w(),c=p=>{p&&this._events.emit("warning",p),e?.(p,s),this._events.emit("flush",s)};if(this.isLocalEventExportEnabled&&this.projectId){this.localEventExportMap.has(this.projectId)?this.localEventExportMap.get(this.projectId)?.push(...s):this.localEventExportMap.set(this.projectId,[...s]),c();return}const i=JSON.stringify({batch:n,metadata:{batch_size:n.length,sdk_integration:this.sdkIntegration,sdk_version:this.getLibraryVersion(),sdk_variant:this.getLibraryId(),public_key:this.publicKey,sdk_name:"langfuse-js"}}),u=`${this.baseUrl}/api/public/ingestion`,h=this._getFetchOptions({method:"POST",body:i}),l=this.fetchWithRetry(u,h).then(()=>c()).catch(p=>{c(p)});this.pendingIngestionPromises[a]=l,l.finally(()=>{delete this.pendingIngestionPromises[a]})}processQueueItems(e,t,s){let n=0;const o=[],a=[];for(let c=0;c<e.length;c++)try{const i=new Blob([JSON.stringify(e[c])]).size;if(i>t){console.warn(`Item exceeds size limit (size: ${i}), dropping item.`);continue}if(n+i>=s){console.debug(`hit batch size limit (size: ${n+i})`),a.push(...e.slice(c)),console.log(`Remaining items: ${a.length}`),console.log(`processes items: ${o.length}`);break}n+=i,o.push(e[c])}catch(i){this._events.emit("error",i),a.push(...e.slice(c));break}return{processedItems:o,remainingItems:a}}_getFetchOptions(e){return{method:e.method,headers:{"Content-Type":"application/json","X-Langfuse-Sdk-Name":"langfuse-js","X-Langfuse-Sdk-Version":this.getLibraryVersion(),"X-Langfuse-Sdk-Variant":this.getLibraryId(),"X-Langfuse-Sdk-Integration":this.sdkIntegration,"X-Langfuse-Public-Key":this.publicKey,...this.additionalHeaders,...this.constructAuthorizationHeader(this.publicKey,this.secretKey)},body:e.body,...e.fetchTimeout!==void 0?{signal:AbortSignal.timeout(e.fetchTimeout)}:{}}}constructAuthorizationHeader(e,t){return t===void 0?{Authorization:"Bearer "+e}:{Authorization:"Basic "+(typeof btoa=="function"?btoa(e+":"+t):Buffer.from(e+":"+t).toString("base64"))}}async fetchWithRetry(e,t,s){return AbortSignal.timeout??=function(o){const a=new AbortController;return setTimeout(()=>a.abort(),o),a.signal},await F(async()=>{let n=null;try{n=await this.fetch(e,{signal:AbortSignal.timeout(this.requestTimeout),...t})}catch(a){throw new M(a)}if(n.status<200||n.status>=400){const a=await n.json();throw new U(n,JSON.stringify(a))}const o=await n.json();if(n.status===207&&o.errors.length>0)throw new U(n,JSON.stringify(o.errors));return n},{...this._retryOptions,...s},n=>this._events.emit("retry",n+", "+e+", "+JSON.stringify(t)))}async fetchAndLogErrors(e,t){const s=await this.fetch(e,t),n=s.status===429?await s.text():await s.json();return(s.status<200||s.status>=400)&&G(new U(s,JSON.stringify(n))),n}async shutdownAsync(){clearTimeout(this._flushTimer);try{await this.flushAsync(),await Promise.all(Object.values(this.pendingIngestionPromises).map(e=>e.catch(()=>{}))),await this.flushAsync()}catch(e){console.error("[Langfuse SDK] Error while shutting down Langfuse",e)}}async _exportLocalEvents(e){if(this.isLocalEventExportEnabled){clearTimeout(this._flushTimer),await this.flushAsync();const t=this.localEventExportMap.get(e)??[];return this.localEventExportMap.delete(e),t}else return this._events.emit("error","Local event exports are disabled, but _exportLocalEvents() was called."),[]}shutdown(){console.warn("shutdown() is deprecated. It does not wait for all events to be processed. Please use shutdownAsync() instead."),this.shutdownAsync()}async awaitAllQueuedAndPendingRequests(){clearTimeout(this._flushTimer),await this.flushAsync(),await Promise.all(Object.values(this.pendingIngestionPromises))}}class qe extends ie{constructor(e){const{flushAt:t,flushInterval:s,publicKey:n,enabled:o,...a}=e;let c=o!==!1;c&&!n&&(c=!1,console.warn("Langfuse public key not passed to constructor and not set as 'LANGFUSE_PUBLIC_KEY' environment variable. No observability data will be sent to Langfuse.")),super({...a,publicKey:n,flushAt:t??1,flushInterval:s??0,enabled:c})}async score(e){return this.scoreStateless(e),await this.awaitAllQueuedAndPendingRequests(),this}}class ke extends ie{constructor(e){const{publicKey:t,secretKey:s,enabled:n,_isLocalEventExportEnabled:o}=e;let a=n!==!1;o?a=!0:s?t||(a=!1,n!==!1&&console.warn("Langfuse public key was not passed to constructor or not set as 'LANGFUSE_PUBLIC_KEY' environment variable. No observability data will be sent to Langfuse.")):(a=!1,n!==!1&&console.warn("Langfuse secret key was not passed to constructor or not set as 'LANGFUSE_SECRET_KEY' environment variable. No observability data will be sent to Langfuse.")),super({...e,enabled:a}),this._promptCache=new _e}trace(e){const t=this.traceStateless(e??{}),s=new Me(this,t);if(g("DEFER")&&e)try{const n=g("__deferRuntime");n&&n.langfuseTraces([{id:t,name:e.name||"",url:s.getTraceUrl()}])}catch{}return s}span(e){const t=e.traceId||this.traceStateless({name:e.name}),s=this.spanStateless({...e,traceId:t});return new Ge(this,s,t)}generation(e){const t=e.traceId||this.traceStateless({name:e.name}),s=this.generationStateless({...e,traceId:t});return new Ne(this,s,t)}event(e){const t=e.traceId||this.traceStateless({name:e.name}),s=this.eventStateless({...e,traceId:t});return new Fe(this,s,t)}score(e){return this.scoreStateless(e),this}async getDataset(e,t){const s=await this._getDataset(e),n=[];let o=1;for(;;){const c=await this._getDatasetItems({datasetName:e,limit:t?.fetchItemsPageSize??50,page:o});if(n.push(...c.data),c.meta.totalPages<=o)break;o++}return{...s,description:s.description??void 0,metadata:s.metadata??void 0,items:n.map(c=>({...c,link:async(i,u,h)=>(await this.awaitAllQueuedAndPendingRequests(),await this.createDatasetRunItem({runName:u,datasetItemId:c.id,observationId:i.observationId,traceId:i.traceId,runDescription:h?.description,metadata:h?.metadata}))}))}}async createPrompt(e){const t=e.labels??[],s=e.type==="chat"?await this.createPromptStateless({...e,prompt:e.prompt.map(n=>"type"in n&&n.type===b.Placeholder?{type:b.Placeholder,name:n.name}:{type:b.ChatMessage,...n}),labels:e.isActive?[...new Set([...t,"production"])]:t}):await this.createPromptStateless({...e,type:e.type??"text",labels:e.isActive?[...new Set([...t,"production"])]:t});return s.type==="chat"?new O(s):new k(s)}async updatePrompt(e){const t=await this.updatePromptStateless(e);return this._promptCache.invalidate(e.name),t}async getPrompt(e,t,s){const n=this._getPromptCacheKey({name:e,version:t,label:s?.label}),o=this._promptCache.getIncludingExpired(n);if(!o||s?.cacheTtlSeconds===0)try{return await this._fetchPromptAndUpdateCache({name:e,version:t,label:s?.label,cacheTtlSeconds:s?.cacheTtlSeconds,maxRetries:s?.maxRetries,fetchTimeout:s?.fetchTimeoutMs})}catch(a){if(s?.fallback){const c={name:e,version:t??0,labels:s.label?[s.label]:[],cacheTtlSeconds:s?.cacheTtlSeconds,config:{},tags:[]};return s.type==="chat"?new O({...c,type:"chat",prompt:s.fallback.map(i=>({type:b.ChatMessage,...i}))},!0):new k({...c,type:"text",prompt:s.fallback},!0)}throw a}if(o.isExpired){if(!this._promptCache.isRefreshing(n)){const a=this._fetchPromptAndUpdateCache({name:e,version:t,label:s?.label,cacheTtlSeconds:s?.cacheTtlSeconds,maxRetries:s?.maxRetries,fetchTimeout:s?.fetchTimeoutMs}).catch(()=>{console.warn(`Failed to refresh prompt cache '${n}', stale cache will be used until next refresh succeeds.`)});this._promptCache.addRefreshingPromise(n,a)}return o.value}return o.value}_getPromptCacheKey(e){const{name:t,version:s,label:n}=e,o=[t];return s!==void 0?o.push("version:"+s.toString()):n!==void 0?o.push("label:"+n):o.push("label:production"),o.join("-")}async _fetchPromptAndUpdateCache(e){const t=this._getPromptCacheKey(e);try{const{name:s,version:n,cacheTtlSeconds:o,label:a,maxRetries:c,fetchTimeout:i}=e,{data:u,fetchResult:h}=await this.getPromptStateless(s,n,a,c,i);if(h==="failure")throw Error(u.message??"Internal error while fetching prompt");let l;return u.type==="chat"?l=new O(u):l=new k(u),this._promptCache.set(t,l,o),l}catch(s){throw console.error(`[Langfuse SDK] Error while fetching prompt '${t}':`,s),s}}async fetchMedia(e){return await this._fetchMedia(e)}async resolveMediaReferences(e){const{obj:t,...s}=e;return v.resolveMediaReferences({...s,langfuseClient:this,obj:t})}_updateSpan(e){return this.updateSpanStateless(e),this}_updateGeneration(e){return this.updateGenerationStateless(e),this}}class ce{constructor({client:e,id:t,traceId:s,observationId:n}){this.client=e,this.id=t,this.traceId=s,this.observationId=n}event(e){return this.client.event({...e,traceId:this.traceId,parentObservationId:this.observationId})}span(e){return this.client.span({...e,traceId:this.traceId,parentObservationId:this.observationId})}generation(e){return this.client.generation({...e,traceId:this.traceId,parentObservationId:this.observationId})}score(e){return this.client.score({...e,traceId:this.traceId,observationId:this.observationId}),this}getTraceUrl(){return`${this.client.baseUrl}/trace/${this.traceId}`}}class Me extends ce{constructor(e,t){super({client:e,id:t,traceId:t,observationId:null})}update(e){return this.client.trace({...e,id:this.id}),this}}class K extends ce{constructor(e,t,s){super({client:e,id:t,traceId:s,observationId:t})}}class Ge extends K{constructor(e,t,s){super(e,t,s)}update(e){return this.client._updateSpan({...e,id:this.id,traceId:this.traceId}),this}end(e){return this.client._updateSpan({...e,id:this.id,traceId:this.traceId,endTime:new Date}),this}}class Ne extends K{constructor(e,t,s){super(e,t,s)}update(e){return this.client._updateGeneration({...e,id:this.id,traceId:this.traceId}),this}end(e){return this.client._updateGeneration({...e,id:this.id,traceId:this.traceId,endTime:new Date}),this}}class Fe extends K{constructor(e,t,s){super(e,t,s)}}const ue={getItem(r){try{const e=r+"=",t=document.cookie.split(";");for(let s=0;s<t.length;s++){let n=t[s];for(;n.charAt(0)==" ";)n=n.substring(1,n.length);if(n.indexOf(e)===0)return decodeURIComponent(n.substring(e.length,n.length))}}catch{}return null},setItem(r,e){try{const o=r+"="+encodeURIComponent(e)+"; path=/";document.cookie=o}catch{return}},removeItem(r){try{ue.setItem(r,"")}catch{return}},clear(){document.cookie=""},getAllKeys(){const r=document.cookie.split(";"),e=[];for(let t=0;t<r.length;t++){let s=r[t];for(;s.charAt(0)==" ";)s=s.substring(1,s.length);e.push(s.split("=")[0])}return e}},W=r=>({getItem(e){return r.getItem(e)},setItem(e,t){r.setItem(e,t)},removeItem(e){r.removeItem(e)},clear(){r.clear()},getAllKeys(){const e=[];for(const t in localStorage)e.push(t);return e}}),X=(r,e="__mplssupport__")=>{if(!window)return!1;try{return r.setItem(e,"xyz"),r.getItem(e)!=="xyz"?!1:(r.removeItem(e),!0)}catch{return!1}};let N,L;const A=()=>{const r={};return{getItem(t){return r[t]},setItem(t,s){r[t]=s!==null?s:void 0},removeItem(t){delete r[t]},clear(){for(const t in r)delete r[t]},getAllKeys(){const t=[];for(const s in r)t.push(s);return t}}},q=(r,e)=>{if(typeof e!==void 0&&e){if(!localStorage){const t=W(e.localStorage);N=X(t)?t:void 0}if(!L){const t=W(e.sessionStorage);L=X(t)?t:void 0}}switch(r){case"cookie":return ue||N||L||A();case"localStorage":return N||L||A();case"sessionStorage":return L||A();case"memory":return A();default:return A()}};var d;(function(r){r.Json="application/json",r.FormData="multipart/form-data",r.UrlEncoded="application/x-www-form-urlencoded",r.Text="text/plain"})(d||(d={}));class Be{constructor(e={}){this.baseUrl="",this.securityData=null,this.abortControllers=new Map,this.customFetch=(...t)=>fetch(...t),this.baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"},this.setSecurityData=t=>{this.securityData=t},this.contentFormatters={[d.Json]:t=>t!==null&&(typeof t=="object"||typeof t=="string")?JSON.stringify(t):t,[d.Text]:t=>t!==null&&typeof t!="string"?JSON.stringify(t):t,[d.FormData]:t=>Object.keys(t||{}).reduce((s,n)=>{const o=t[n];return s.append(n,o instanceof Blob?o:typeof o=="object"&&o!==null?JSON.stringify(o):`${o}`),s},new FormData),[d.UrlEncoded]:t=>this.toQueryString(t)},this.createAbortSignal=t=>{if(this.abortControllers.has(t)){const n=this.abortControllers.get(t);return n?n.signal:void 0}const s=new AbortController;return this.abortControllers.set(t,s),s.signal},this.abortRequest=t=>{const s=this.abortControllers.get(t);s&&(s.abort(),this.abortControllers.delete(t))},this.request=async({body:t,secure:s,path:n,type:o,query:a,format:c,baseUrl:i,cancelToken:u,...h})=>{const l=(typeof s=="boolean"?s:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},p=this.mergeRequestParams(h,l),m=a&&this.toQueryString(a),y=this.contentFormatters[o||d.Json],_=c||p.format;return this.customFetch(`${i||this.baseUrl||""}${n}${m?`?${m}`:""}`,{...p,headers:{...p.headers||{},...o&&o!==d.FormData?{"Content-Type":o}:{}},signal:(u?this.createAbortSignal(u):p.signal)||null,body:typeof t>"u"||t===null?null:y(t)}).then(async E=>{const f=E.clone();f.data=null,f.error=null;const R=_?await E[_]().then(T=>(f.ok?f.data=T:f.error=T,f)).catch(T=>(f.error=T,f)):f;if(u&&this.abortControllers.delete(u),!E.ok)throw R;return R.data})},Object.assign(this,e)}encodeQueryParam(e,t){return`${encodeURIComponent(e)}=${encodeURIComponent(typeof t=="number"?t:`${t}`)}`}addQueryParam(e,t){return this.encodeQueryParam(t,e[t])}addArrayQueryParam(e,t){return e[t].map(n=>this.encodeQueryParam(t,n)).join("&")}toQueryString(e){const t=e||{};return Object.keys(t).filter(n=>typeof t[n]<"u").map(n=>Array.isArray(t[n])?this.addArrayQueryParam(t,n):this.addQueryParam(t,n)).join("&")}addQueryParams(e){const t=this.toQueryString(e);return t?`?${t}`:""}mergeRequestParams(e,t){return{...this.baseApiParams,...e,...t||{},headers:{...this.baseApiParams.headers||{},...e.headers||{},...t&&t.headers||{}}}}}class Ke extends Be{constructor(){super(...arguments),this.api={annotationQueuesCreateQueueItem:(e,t,s={})=>this.request({path:`/api/public/annotation-queues/${e}/items`,method:"POST",body:t,secure:!0,type:d.Json,format:"json",...s}),annotationQueuesDeleteQueueItem:(e,t,s={})=>this.request({path:`/api/public/annotation-queues/${e}/items/${t}`,method:"DELETE",secure:!0,format:"json",...s}),annotationQueuesGetQueue:(e,t={})=>this.request({path:`/api/public/annotation-queues/${e}`,method:"GET",secure:!0,format:"json",...t}),annotationQueuesGetQueueItem:(e,t,s={})=>this.request({path:`/api/public/annotation-queues/${e}/items/${t}`,method:"GET",secure:!0,format:"json",...s}),annotationQueuesListQueueItems:({queueId:e,...t},s={})=>this.request({path:`/api/public/annotation-queues/${e}/items`,method:"GET",query:t,secure:!0,format:"json",...s}),annotationQueuesListQueues:(e,t={})=>this.request({path:"/api/public/annotation-queues",method:"GET",query:e,secure:!0,format:"json",...t}),annotationQueuesUpdateQueueItem:(e,t,s,n={})=>this.request({path:`/api/public/annotation-queues/${e}/items/${t}`,method:"PATCH",body:s,secure:!0,type:d.Json,format:"json",...n}),commentsCreate:(e,t={})=>this.request({path:"/api/public/comments",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),commentsGet:(e,t={})=>this.request({path:"/api/public/comments",method:"GET",query:e,secure:!0,format:"json",...t}),commentsGetById:(e,t={})=>this.request({path:`/api/public/comments/${e}`,method:"GET",secure:!0,format:"json",...t}),datasetItemsCreate:(e,t={})=>this.request({path:"/api/public/dataset-items",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),datasetItemsDelete:(e,t={})=>this.request({path:`/api/public/dataset-items/${e}`,method:"DELETE",secure:!0,format:"json",...t}),datasetItemsGet:(e,t={})=>this.request({path:`/api/public/dataset-items/${e}`,method:"GET",secure:!0,format:"json",...t}),datasetItemsList:(e,t={})=>this.request({path:"/api/public/dataset-items",method:"GET",query:e,secure:!0,format:"json",...t}),datasetRunItemsCreate:(e,t={})=>this.request({path:"/api/public/dataset-run-items",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),datasetRunItemsList:(e,t={})=>this.request({path:"/api/public/dataset-run-items",method:"GET",query:e,secure:!0,...t}),datasetsCreate:(e,t={})=>this.request({path:"/api/public/v2/datasets",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),datasetsDeleteRun:(e,t,s={})=>this.request({path:`/api/public/datasets/${e}/runs/${t}`,method:"DELETE",secure:!0,format:"json",...s}),datasetsGet:(e,t={})=>this.request({path:`/api/public/v2/datasets/${e}`,method:"GET",secure:!0,format:"json",...t}),datasetsGetRun:(e,t,s={})=>this.request({path:`/api/public/datasets/${e}/runs/${t}`,method:"GET",secure:!0,format:"json",...s}),datasetsGetRuns:({datasetName:e,...t},s={})=>this.request({path:`/api/public/datasets/${e}/runs`,method:"GET",query:t,secure:!0,format:"json",...s}),datasetsList:(e,t={})=>this.request({path:"/api/public/v2/datasets",method:"GET",query:e,secure:!0,format:"json",...t}),healthHealth:(e={})=>this.request({path:"/api/public/health",method:"GET",format:"json",...e}),ingestionBatch:(e,t={})=>this.request({path:"/api/public/ingestion",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),mediaGet:(e,t={})=>this.request({path:`/api/public/media/${e}`,method:"GET",secure:!0,format:"json",...t}),mediaGetUploadUrl:(e,t={})=>this.request({path:"/api/public/media",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),mediaPatch:(e,t,s={})=>this.request({path:`/api/public/media/${e}`,method:"PATCH",body:t,secure:!0,type:d.Json,...s}),metricsMetrics:(e,t={})=>this.request({path:"/api/public/metrics",method:"GET",query:e,secure:!0,format:"json",...t}),modelsCreate:(e,t={})=>this.request({path:"/api/public/models",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),modelsDelete:(e,t={})=>this.request({path:`/api/public/models/${e}`,method:"DELETE",secure:!0,...t}),modelsGet:(e,t={})=>this.request({path:`/api/public/models/${e}`,method:"GET",secure:!0,format:"json",...t}),modelsList:(e,t={})=>this.request({path:"/api/public/models",method:"GET",query:e,secure:!0,format:"json",...t}),observationsGet:(e,t={})=>this.request({path:`/api/public/observations/${e}`,method:"GET",secure:!0,format:"json",...t}),observationsGetMany:(e,t={})=>this.request({path:"/api/public/observations",method:"GET",query:e,secure:!0,format:"json",...t}),organizationsGetOrganizationMemberships:(e={})=>this.request({path:"/api/public/organizations/memberships",method:"GET",secure:!0,format:"json",...e}),organizationsGetOrganizationProjects:(e={})=>this.request({path:"/api/public/organizations/projects",method:"GET",secure:!0,format:"json",...e}),organizationsGetProjectMemberships:(e,t={})=>this.request({path:`/api/public/projects/${e}/memberships`,method:"GET",secure:!0,format:"json",...t}),organizationsUpdateOrganizationMembership:(e,t={})=>this.request({path:"/api/public/organizations/memberships",method:"PUT",body:e,secure:!0,type:d.Json,format:"json",...t}),organizationsUpdateProjectMembership:(e,t,s={})=>this.request({path:`/api/public/projects/${e}/memberships`,method:"PUT",body:t,secure:!0,type:d.Json,format:"json",...s}),projectsCreate:(e,t={})=>this.request({path:"/api/public/projects",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),projectsCreateApiKey:(e,t,s={})=>this.request({path:`/api/public/projects/${e}/apiKeys`,method:"POST",body:t,secure:!0,type:d.Json,format:"json",...s}),projectsDelete:(e,t={})=>this.request({path:`/api/public/projects/${e}`,method:"DELETE",secure:!0,format:"json",...t}),projectsDeleteApiKey:(e,t,s={})=>this.request({path:`/api/public/projects/${e}/apiKeys/${t}`,method:"DELETE",secure:!0,format:"json",...s}),projectsGet:(e={})=>this.request({path:"/api/public/projects",method:"GET",secure:!0,format:"json",...e}),projectsGetApiKeys:(e,t={})=>this.request({path:`/api/public/projects/${e}/apiKeys`,method:"GET",secure:!0,format:"json",...t}),projectsUpdate:(e,t,s={})=>this.request({path:`/api/public/projects/${e}`,method:"PUT",body:t,secure:!0,type:d.Json,format:"json",...s}),promptsCreate:(e,t={})=>this.request({path:"/api/public/v2/prompts",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),promptsGet:({promptName:e,...t},s={})=>this.request({path:`/api/public/v2/prompts/${e}`,method:"GET",query:t,secure:!0,format:"json",...s}),promptsList:(e,t={})=>this.request({path:"/api/public/v2/prompts",method:"GET",query:e,secure:!0,format:"json",...t}),promptVersionUpdate:(e,t,s,n={})=>this.request({path:`/api/public/v2/prompts/${e}/versions/${t}`,method:"PATCH",body:s,secure:!0,type:d.Json,format:"json",...n}),scimCreateUser:(e,t={})=>this.request({path:"/api/public/scim/Users",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),scimDeleteUser:(e,t={})=>this.request({path:`/api/public/scim/Users/${e}`,method:"DELETE",secure:!0,format:"json",...t}),scimGetResourceTypes:(e={})=>this.request({path:"/api/public/scim/ResourceTypes",method:"GET",secure:!0,format:"json",...e}),scimGetSchemas:(e={})=>this.request({path:"/api/public/scim/Schemas",method:"GET",secure:!0,format:"json",...e}),scimGetServiceProviderConfig:(e={})=>this.request({path:"/api/public/scim/ServiceProviderConfig",method:"GET",secure:!0,format:"json",...e}),scimGetUser:(e,t={})=>this.request({path:`/api/public/scim/Users/${e}`,method:"GET",secure:!0,format:"json",...t}),scimListUsers:(e,t={})=>this.request({path:"/api/public/scim/Users",method:"GET",query:e,secure:!0,format:"json",...t}),scoreConfigsCreate:(e,t={})=>this.request({path:"/api/public/score-configs",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),scoreConfigsGet:(e,t={})=>this.request({path:"/api/public/score-configs",method:"GET",query:e,secure:!0,format:"json",...t}),scoreConfigsGetById:(e,t={})=>this.request({path:`/api/public/score-configs/${e}`,method:"GET",secure:!0,format:"json",...t}),scoreCreate:(e,t={})=>this.request({path:"/api/public/scores",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),scoreDelete:(e,t={})=>this.request({path:`/api/public/scores/${e}`,method:"DELETE",secure:!0,...t}),scoreV2Get:(e,t={})=>this.request({path:"/api/public/v2/scores",method:"GET",query:e,secure:!0,format:"json",...t}),scoreV2GetById:(e,t={})=>this.request({path:`/api/public/v2/scores/${e}`,method:"GET",secure:!0,format:"json",...t}),sessionsGet:(e,t={})=>this.request({path:`/api/public/sessions/${e}`,method:"GET",secure:!0,format:"json",...t}),sessionsList:(e,t={})=>this.request({path:"/api/public/sessions",method:"GET",query:e,secure:!0,format:"json",...t}),traceDelete:(e,t={})=>this.request({path:`/api/public/traces/${e}`,method:"DELETE",secure:!0,format:"json",...t}),traceDeleteMultiple:(e,t={})=>this.request({path:"/api/public/traces",method:"DELETE",body:e,secure:!0,type:d.Json,format:"json",...t}),traceGet:(e,t={})=>this.request({path:`/api/public/traces/${e}`,method:"GET",secure:!0,format:"json",...t}),traceList:(e,t={})=>this.request({path:"/api/public/traces",method:"GET",query:e,secure:!0,format:"json",...t})}}}var le="3.38.6";class Je extends ke{constructor(e){const t=ne.configLangfuseSDK(e);super(t),typeof window<"u"&&!("Deno"in window)?(this._storageKey=e?.persistence_name?`lf_${e.persistence_name}`:`lf_${t.publicKey}_langfuse`,this._storage=q(e?.persistence||"localStorage",window)):(this._storageKey=`lf_${t.publicKey}_langfuse`,this._storage=q("memory",void 0)),this.api=new Ke({baseUrl:this.baseUrl,baseApiParams:{headers:{"X-Langfuse-Sdk-Name":"langfuse-js","X-Langfuse-Sdk-Version":this.getLibraryVersion(),"X-Langfuse-Sdk-Variant":this.getLibraryId(),"X-Langfuse-Sdk-Integration":this.sdkIntegration,"X-Langfuse-Public-Key":this.publicKey,...this.additionalHeaders,...this.constructAuthorizationHeader(this.publicKey,this.secretKey)}}}).api}getPersistedProperty(e){return this._storageCache||(this._storageCache=JSON.parse(this._storage.getItem(this._storageKey)||"{}")||{}),this._storageCache[e]}setPersistedProperty(e,t){this._storageCache||(this._storageCache=JSON.parse(this._storage.getItem(this._storageKey)||"{}")||{}),t===null?delete this._storageCache[e]:this._storageCache[e]=t,this._storage.setItem(this._storageKey,JSON.stringify(this._storageCache))}fetch(e,t){return fetch(e,t)}getLibraryId(){return"langfuse"}getLibraryVersion(){return le}getCustomUserAgent(){}}class ot extends qe{constructor(e){const t=ne.configLangfuseSDK(e,!1);super(t),typeof window<"u"?(this._storageKey=e?.persistence_name?`lf_${e.persistence_name}`:`lf_${t.publicKey}_langfuse`,this._storage=q(e?.persistence||"localStorage",window)):(this._storageKey=`lf_${t.publicKey}_langfuse`,this._storage=q("memory",void 0))}getPersistedProperty(e){return this._storageCache||(this._storageCache=JSON.parse(this._storage.getItem(this._storageKey)||"{}")||{}),this._storageCache[e]}setPersistedProperty(e,t){this._storageCache||(this._storageCache=JSON.parse(this._storage.getItem(this._storageKey)||"{}")||{}),t===null?delete this._storageCache[e]:this._storageCache[e]=t,this._storage.setItem(this._storageKey,JSON.stringify(this._storageCache))}fetch(e,t){return fetch(e,t)}getLibraryId(){return"langfuse-frontend"}getLibraryVersion(){return le}getCustomUserAgent(){}}class S{static getInstance(e){return S.instance||(S.instance=new Je(e)),S.instance}}S.instance=null;const ze=r=>{let e={};e={frequency_penalty:r.frequency_penalty,logit_bias:r.logit_bias,logprobs:r.logprobs,max_tokens:r.max_tokens,n:r.n,presence_penalty:r.presence_penalty,seed:r.seed,stop:r.stop,stream:r.stream,temperature:r.temperature,top_p:r.top_p,user:r.user,response_format:r.response_format,top_logprobs:r.top_logprobs};let t=r.input;return r&&typeof r=="object"&&!Array.isArray(r)&&"messages"in r?(t={},t.messages=r.messages,"function_call"in r&&(t.function_call=r.function_call),"functions"in r&&(t.functions=r.functions),"tools"in r&&(t.tools=r.tools),"tool_choice"in r&&(t.tool_choice=r.tool_choice)):t||(t=r.prompt),{model:r.model,input:t,modelParameters:e}},he=r=>{if(r instanceof Object&&"output_text"in r&&r.output_text!=="")return r.output_text;if(typeof r=="object"&&r&&"output"in r&&Array.isArray(r.output)){const e=r.output;return e.length>1?e:e.length===1?e[0]:null}return r instanceof Object&&"choices"in r&&Array.isArray(r.choices)?"message"in r.choices[0]?r.choices[0].message:r.choices[0].text??"":""},He=r=>{if(me(r)){const{prompt_tokens:e,completion_tokens:t,total_tokens:s}=r.usage;return{input:e,output:t,total:s}}},pe=r=>{if("prompt_tokens"in r){const{prompt_tokens:e,completion_tokens:t,total_tokens:s,completion_tokens_details:n,prompt_tokens_details:o}=r;return{input:e,output:t,total:s,...Object.fromEntries(Object.entries(o??{}).map(([a,c])=>[`input_${a}`,c])),...Object.fromEntries(Object.entries(n??{}).map(([a,c])=>[`output_${a}`,c]))}}else if("input_tokens"in r){const{input_tokens:e,output_tokens:t,total_tokens:s,input_tokens_details:n,output_tokens_details:o}=r;return{input:e,output:t,total:s,...Object.fromEntries(Object.entries(n??{}).map(([a,c])=>[`input_${a}`,c])),...Object.fromEntries(Object.entries(o??{}).map(([a,c])=>[`output_${a}`,c]))}}},de=r=>{if(me(r))return pe(r.usage)},Qe=r=>{let e=!1;const s=r?.choices?.[0];try{if("delta"in s&&"tool_calls"in s.delta&&Array.isArray(s.delta.tool_calls))return e=!0,{isToolCall:e,data:s.delta.tool_calls[0]};if("delta"in s)return{isToolCall:e,data:s.delta?.content||""};if("text"in s)return{isToolCall:e,data:s.text||""}}catch{}return{isToolCall:!1,data:""}};function me(r){return r instanceof Object&&"usage"in r&&r.usage instanceof Object&&(typeof r.usage.prompt_tokens=="number"&&typeof r.usage.completion_tokens=="number"&&typeof r.usage.total_tokens=="number"||typeof r.usage.input_tokens=="number"&&typeof r.usage.output_tokens=="number"&&typeof r.usage.total_tokens=="number")}const Ve=r=>{let e="",t="";for(const s of r)e=s.function?.name||e,t+=s.function?.arguments||"";return{tool_calls:[{function:{name:e,arguments:t}}]}},fe=r=>{if(typeof r!="object"||r===null)return{model:void 0,modelParameters:void 0,metadata:void 0};const e="model"in r?r.model:void 0,t={},s=["max_output_tokens","parallel_tool_calls","store","temperature","tool_choice","top_p","truncation","user"],n={},o=["reasoning","incomplete_details","instructions","previous_response_id","tools","metadata","status","error"];for(const a of s){const c=a in r?r[a]:null;c!=null&&(t[a]=c)}for(const a of o){const c=a in r?r[a]:null;c&&(n[a]=c)}return{model:e,modelParameters:Object.keys(t).length>0?t:void 0,metadata:Object.keys(n).length>0?n:void 0}},Y=r=>r!=null&&typeof r=="object"&&typeof r[Symbol.asyncIterator]=="function",We=(r,e)=>(...t)=>Xe(r,e,...t),Xe=(r,e,...t)=>{const{model:s,input:n,modelParameters:o}=ze(t[0]??{}),a={...o,response_format:null},c={...e?.metadata,response_format:"response_format"in o?o.response_format:void 0};let i={model:s,input:n,modelParameters:a,name:e?.generationName,startTime:new Date,promptName:e?.langfusePrompt?.name,promptVersion:e?.langfusePrompt?.version,metadata:c},u;const h=e&&"parent"in e;h?(u=e.parent,i={...{...e,parent:void 0},...i,promptName:e?.promptName??e?.langfusePrompt?.name,promptVersion:e?.promptVersion??e?.langfusePrompt?.version}):u=S.getInstance(e?.clientInitParams).trace({...e,...i,id:e?.traceId,name:e?.traceName,timestamp:i.startTime});try{const l=r(...t);return Y(l)?Z(l,u,h,i):l instanceof Promise?l.then(m=>{if(Y(m))return Z(m,u,h,i);const y=he(m),_=He(m),E=de(m),{model:f,modelParameters:R,metadata:T}=fe(m);return u.generation({...i,output:y,endTime:new Date,usage:_,usageDetails:E,model:f||i.model,modelParameters:{...i.modelParameters,...R},metadata:{...i.metadata,...T}}),h||u.update({output:y}),m}).catch(m=>{throw u.generation({...i,endTime:new Date,statusMessage:String(m),level:"ERROR",usage:{inputCost:0,outputCost:0,totalCost:0},costDetails:{input:0,output:0,total:0}}),m}):l}catch(l){throw u.generation({...i,endTime:new Date,statusMessage:String(l),level:"ERROR",usage:{inputCost:0,outputCost:0,totalCost:0},costDetails:{input:0,output:0,total:0}}),l}};function Z(r,e,t,s){async function*n(){const o=r,a=[],c=[];let i=null,u=null,h,l=null;for await(const p of o){if(i=i??new Date,typeof p=="object"&&p&&"response"in p){const y=p.response;l=he(y),h=de(y);const{model:_,modelParameters:E,metadata:f}=fe(y);s.model=_??s.model,s.modelParameters={...s.modelParameters,...E},s.metadata={...s.metadata,...f}}typeof p=="object"&&p!=null&&"usage"in p&&(u=p.usage);const m=Qe(p);m.isToolCall?c.push(m.data):a.push(m.data),yield p}l=l??(c.length>0?Ve(c):a.join("")),e.generation({...s,output:l,endTime:new Date,completionStartTime:i,usage:u?{input:"prompt_tokens"in u?u.prompt_tokens:void 0,output:"completion_tokens"in u?u.completion_tokens:void 0,total:"total_tokens"in u?u.total_tokens:void 0}:void 0,usageDetails:h??(u?pe(u):void 0)}),t||e.update({output:l})}return n()}const Ye=(r,e)=>new Proxy(r,{get(t,s,n){const o=t[s],a=`${r.constructor?.name}.${s.toString()}`,c=e?.generationName??a,i=e&&"traceName"in e?e.traceName:c,u={...e,generationName:c,traceName:i};if(s==="flushAsync"){let l;return e&&"parent"in e?l=e.parent.client:l=S.getInstance(),l.flushAsync.bind(l)}if(s==="shutdownAsync"){let l;return e&&"parent"in e?l=e.parent.client:l=S.getInstance(),l.shutdownAsync.bind(l)}return typeof o=="function"?We(o.bind(t),u):o&&!Array.isArray(o)&&!(o instanceof Date)&&typeof o=="object"?Ye(o,u):Reflect.get(t,s,n)}});export{Je as Langfuse,v as LangfuseMedia,ot as LangfuseWeb,Je as default,Ye as observeOpenAI};
|
|
1
|
+
import{m as B}from"./langfuse-C4HKZ3NL-h6ZaewUF.js";import"./index-D_VAIhOb.js";import"./chunk-VL2OQCWN-C0ihwl40.js";import"./index-DRz5BQNA.js";import"./__vite-browser-external-DFygW7-s.js";import"./path-C9FudP8b.js";var J={};class ge{constructor(){this.events={},this.events={}}on(e,t){return this.events[e]||(this.events[e]=[]),this.events[e].push(t),()=>{this.events[e]=this.events[e].filter(s=>s!==t)}}emit(e,t){for(const s of this.events[e]||[])s(t);for(const s of this.events["*"]||[])s(e,t)}}const ye=60;class be{constructor(e,t){this.value=e,this._expiry=Date.now()+t*1e3}get isExpired(){return Date.now()>this._expiry}}class _e{constructor(){this._cache=new Map,this._defaultTtlSeconds=ye,this._refreshingKeys=new Map}getIncludingExpired(e){return this._cache.get(e)??null}set(e,t,s){const n=s??this._defaultTtlSeconds;this._cache.set(e,new be(t,n))}addRefreshingPromise(e,t){this._refreshingKeys.set(e,t),t.then(()=>{this._refreshingKeys.delete(e)}).catch(()=>{this._refreshingKeys.delete(e)})}isRefreshing(e){return this._refreshingKeys.has(e)}invalidate(e){console.log("invalidating",e,this._cache.keys());for(const t of this._cache.keys())t.startsWith(e)&&this._cache.delete(t)}}var I;(function(r){r.Props="props",r.Queue="queue",r.OptedOut="opted_out"})(I||(I={}));var b;(function(r){r.ChatMessage="chatmessage",r.Placeholder="placeholder"})(b||(b={}));B.escape=function(r){return r};class ee{constructor(e,t=!1,s){this.name=e.name,this.version=e.version,this.config=e.config,this.labels=e.labels,this.tags=e.tags,this.isFallback=t,this.type=s,this.commitMessage=e.commitMessage}_transformToLangchainVariables(e){return this.escapeJsonForLangchain(e).replace(/\{\{(\w+)\}\}/g,"{$1}")}escapeJsonForLangchain(e){const t=[],s=[];let n=0;const o=e.length;for(;n<o;){const a=e[n];if(a==="{"){if(n+1<o&&e[n+1]==="{"){t.push("{{"),n+=2;continue}let c=n+1;for(;c<o&&/\s/.test(e[c]);)c++;const i=c<o&&(e[c]==="'"||e[c]==='"');t.push(i?"{{":"{"),s.push(i),n+=1;continue}if(a==="}"){if(n+1<o&&e[n+1]==="}"){t.push("}}"),n+=2;continue}const c=s.pop()??!1;t.push(c?"}}":"}"),n+=1;continue}t.push(a),n+=1}return t.join("")}}class k extends ee{constructor(e,t=!1){super(e,t,"text"),this.promptResponse=e,this.prompt=e.prompt}compile(e,t){return B.render(this.promptResponse.prompt,e??{})}getLangchainPrompt(e){return this._transformToLangchainVariables(this.prompt)}toJSON(){return JSON.stringify({name:this.name,prompt:this.prompt,version:this.version,isFallback:this.isFallback,tags:this.tags,labels:this.labels,type:this.type,config:this.config})}}class O extends ee{constructor(e,t=!1){const s=O.normalizePrompt(e.prompt),n={...e,prompt:s};super(n,t,"chat"),this.promptResponse=n,this.prompt=s}static normalizePrompt(e){return e.map(t=>"type"in t?t:{type:b.ChatMessage,...t})}compile(e,t){const s=[],n=t??{};for(const o of this.prompt)if("type"in o&&o.type===b.Placeholder){const a=n[o.name];Array.isArray(a)&&a.length>0&&a.every(c=>typeof c=="object"&&"role"in c&&"content"in c)?s.push(...a):Array.isArray(a)&&a.length===0||(a!==void 0?s.push(JSON.stringify(a)):s.push(o))}else"role"in o&&"content"in o&&o.type===b.ChatMessage&&s.push({role:o.role,content:o.content});return s.map(o=>typeof o=="object"&&o!==null&&"role"in o&&"content"in o?{...o,content:B.render(o.content,e??{})}:o)}getLangchainPrompt(e){const t=[],s=e?.placeholders??{};for(const n of this.prompt)if("type"in n&&n.type===b.Placeholder){const o=s[n.name];Array.isArray(o)&&o.length>0&&o.every(a=>typeof a=="object"&&"role"in a&&"content"in a)?t.push(...o.map(a=>({role:a.role,content:this._transformToLangchainVariables(a.content)}))):Array.isArray(o)&&o.length===0||(o!==void 0?t.push(JSON.stringify(o)):t.push({variableName:n.name,optional:!1}))}else"role"in n&&"content"in n&&n.type===b.ChatMessage&&t.push({role:n.role,content:this._transformToLangchainVariables(n.content)});return t}toJSON(){return JSON.stringify({name:this.name,prompt:this.promptResponse.prompt.map(e=>{if("type"in e&&e.type===b.ChatMessage){const{type:t,...s}=e;return s}return e}),version:this.version,isFallback:this.isFallback,tags:this.tags,labels:this.labels,type:this.type,config:this.config})}}function Ee(r,e){if(!r)throw new Error(e)}function te(r){return r?.replace(/\/+$/,"")}async function F(r,e={},t){const{retryCount:s=3,retryDelay:n=5e3,retryCheck:o=()=>!0}=e;let a=null;for(let c=0;c<s+1;c++){c>0&&(await new Promise(i=>setTimeout(i,n)),t(`Retrying ${c+1} of ${s+1}`));try{return await r()}catch(i){if(a=i,!o(i))throw i;t(`Retriable error: ${JSON.stringify(i)}`)}}throw a}function w(r){let e=new Date().getTime(),t=r&&r.performance&&r.performance.now&&r.performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){let n=Math.random()*16;return e>0?(n=(e+n)%16|0,e=Math.floor(e/16)):(n=(t+n)%16|0,t=Math.floor(t/16)),(s==="x"?n:n&3|8).toString(16)})}function we(){return new Date().getTime()}function se(){return new Date().toISOString()}function re(r,e){const t=setTimeout(r,e);return t?.unref&&t?.unref(),t}function g(r){if(typeof process<"u"&&J[r])return J[r];if(typeof globalThis<"u")return globalThis[r]}function Se(r,e=!0){const{publicKey:t,secretKey:s,...n}=r??{},o=t??g("LANGFUSE_PUBLIC_KEY"),a=e?s??g("LANGFUSE_SECRET_KEY"):void 0,c=n.baseUrl??g("LANGFUSE_BASEURL"),i={...n,baseUrl:c};return{publicKey:o,...e?{secretKey:a}:void 0,...i}}const C=r=>{const e=new URLSearchParams;return Object.entries(r??{}).forEach(([t,s])=>{s!=null&&(s instanceof Date?e.append(t,s.toISOString()):e.append(t,s.toString()))}),e.toString()};var ne=Object.freeze({__proto__:null,assert:Ee,configLangfuseSDK:Se,currentISOTime:se,currentTimestamp:we,encodeQueryParams:C,generateUUID:w,getEnv:g,removeTrailingSlash:te,retriable:F,safeSetTimeout:re});const ve=["VERCEL_GIT_COMMIT_SHA","NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA","COMMIT_REF","RENDER_GIT_COMMIT","CI_COMMIT_SHA","CIRCLE_SHA1","CF_PAGES_COMMIT_SHA","REACT_APP_GIT_SHA","SOURCE_VERSION","TRIGGER_DEPLOYMENT_ID"];function Te(){for(const r of ve){const e=g(r);if(e)return e}}let P=null,$=null;const j=r=>import(r);typeof globalThis.Deno<"u"?Promise.all([j("node:fs"),j("node:crypto")]).then(([r,e])=>{P=r,$=e}).catch():typeof process<"u"&&process.versions?.node?Promise.all([j("fs"),j("crypto")]).then(([r,e])=>{P=r,$=e}).catch():typeof crypto<"u"&&($=crypto);class v{constructor(e){const{obj:t,base64DataUri:s,contentType:n,contentBytes:o,filePath:a}=e;if(this.obj=t,this._mediaId=void 0,s){const[c,i]=this.parseBase64DataUri(s);this._contentBytes=c,this._contentType=i,this._source="base64_data_uri"}else if(o&&n)this._contentBytes=o,this._contentType=n,this._source="bytes";else if(a&&n){if(!P)throw new Error("File system support is not available in this environment");if(!P.existsSync(a))throw new Error(`File at path ${a} does not exist`);this._contentBytes=this.readFile(a),this._contentType=this._contentBytes?n:void 0,this._source=this._contentBytes?"file":void 0}else console.error("base64DataUri, or contentBytes and contentType, or filePath must be provided to LangfuseMedia")}readFile(e){try{if(!P)throw new Error("File system support is not available in this environment");return P.readFileSync(e)}catch(t){console.error(`Error reading file at path ${e}`,t);return}}parseBase64DataUri(e){try{if(!e||typeof e!="string")throw new Error("Data URI is not a string");if(!e.startsWith("data:"))throw new Error("Data URI does not start with 'data:'");const[t,s]=e.slice(5).split(",",2);if(!t||!s)throw new Error("Invalid URI");const n=t.split(";");if(!n.includes("base64"))throw new Error("Data is not base64 encoded");const o=n[0];if(!o)throw new Error("Content type is empty");return[Buffer.from(s,"base64"),o]}catch(t){return console.error("Error parsing base64 data URI",t),[void 0,void 0]}}get contentLength(){return this._contentBytes?.length}get contentSha256Hash(){if(!this._contentBytes)return;if(!$){console.error("Crypto support is not available in this environment");return}return $.createHash("sha256").update(this._contentBytes).digest("base64")}toJSON(){return!this._contentType||!this._source||!this._mediaId?`<Upload handling failed for LangfuseMedia of type ${this._contentType}>`:`@@@langfuseMedia:type=${this._contentType}|id=${this._mediaId}|source=${this._source}@@@`}static parseReferenceString(e){const t="@@@langfuseMedia:";if(!e.startsWith(t))throw new Error("Reference string does not start with '@@@langfuseMedia:type='");if(!e.endsWith("@@@"))throw new Error("Reference string does not end with '@@@'");const o=e.slice(t.length,-3).split("|"),a={};for(const c of o){const[i,u]=c.split("=",2);a[i]=u}if(!("type"in a&&"id"in a&&"source"in a))throw new Error("Missing required fields in reference string");return{mediaId:a.id,source:a.source,contentType:a.type}}static async resolveMediaReferences(e){const{obj:t,langfuseClient:s,maxDepth:n=10}=e;async function o(a,c){if(c>n)return a;if(typeof a=="string"){const i=/@@@langfuseMedia:.+?@@@/g,u=a.match(i);if(!u)return a;let h=a;const l=new Map;await Promise.all(u.map(async p=>{try{const m=v.parseReferenceString(p),y=await s.fetchMedia(m.mediaId),_=await s.fetch(y.url,{method:"GET",headers:{}});if(_.status!==200)throw new Error("Failed to fetch media content");const E=Buffer.from(await _.arrayBuffer()).toString("base64"),f=`data:${y.contentType};base64,${E}`;l.set(p,f)}catch(m){console.warn("Error fetching media content for reference string",p,m)}}));for(const[p,m]of l.entries())h=h.replaceAll(p,m);return h}return Array.isArray(a)?Promise.all(a.map(async i=>await o(i,c+1))):typeof a=="object"&&a!==null?Object.fromEntries(await Promise.all(Object.entries(a).map(async([i,u])=>[i,await o(u,c+1)]))):a}return o(t,0)}}function Ie(r,e){return e===void 0?!0:e===0?!1:e<0||e>1||isNaN(e)?(console.warn("Sample rate must be between 0 and 1. Ignoring setting."),!0):Pe(r)<e}function Pe(r){let e=0;const t=31;for(let s=0;s<r.length;s++)e=e*t+r.charCodeAt(s)>>>0;return e=(e>>>16^e)*73244475,e=(e>>>16^e)*73244475,e=e>>>16^e,Math.abs(e)/2147483647}const z=g("LANGFUSE_MAX_EVENT_SIZE_BYTES")?Number(g("LANGFUSE_MAX_EVENT_SIZE_BYTES")):1e6,Le=g("LANGFUSE_MAX_BATCH_SIZE_BYTES")?Number(g("LANGFUSE_MAX_BATCH_SIZE_BYTES")):25e5,H=/^(?!langfuse)[a-z0-9_-]+$/,Ae=["langfuse-prompt-experiment"];class U extends Error{constructor(e,t){super("HTTP error while fetching Langfuse: "+e.status+" and body: "+t),this.response=e,this.name="LangfuseFetchHttpError"}}class M extends Error{constructor(e){super("Network error while fetching Langfuse",e instanceof Error?{cause:e}:{}),this.error=e,this.name="LangfuseFetchNetworkError"}}function oe(r){return typeof r=="object"&&r.name==="LangfuseFetchHttpError"}function ae(r){return typeof r=="object"&&r.name==="LangfuseFetchNetworkError"}function Ce(r){return oe(r)||ae(r)}const D="https://langfuse.com/support",Oe="https://api.reference.langfuse.com",$e="https://langfuse.com/docs/rbac",Re="https://langfuse.com/docs/sdk/typescript/guide",je="https://langfuse.com/faq/all/api-limits",Ue="https://www.npmjs.com/package/langfuse",Q=`Make sure to keep your SDK updated, refer to ${Ue} for details.`,x=`This is an unusual occurrence and we are monitoring it closely. For help, please contact support: ${D}.`,V=`Unexpected error occurred. Please check your request and contact support: ${D}.`,xe=new Map([[500,`Internal server error occurred. For help, please contact support: ${D}`],[501,`Not implemented. Please check your request and contact support for help: ${D}.`],[502,`Bad gateway. ${x}`],[503,`Service unavailable. ${x}`],[504,`Gateway timeout. ${x}`],[404,`Internal error occurred. ${x}`],[400,`Bad request. Please check your request for any missing or incorrect parameters. Refer to our API docs: ${Oe} for details.`],[401,`Unauthorized. Please check your public/private host settings. Refer to our installation and setup guide: ${Re} for details on SDK configuration.`],[403,`Forbidden. Please check your access control settings. Refer to our RBAC docs: ${$e} for details.`],[429,`Rate limit exceeded. For more information on rate limits please see: ${je}`]]);function De(r){if(!r)return`${V} ${Q}`;const e=xe.get(r)||V;return`${r}: ${e} ${Q}`}function G(r){if(oe(r)){const e=r.response.status,t=De(e);console.error("[Langfuse SDK]",t,`Error details: ${r}`)}else ae(r)?console.error("[Langfuse SDK] Network error: ",r):console.error("[Langfuse SDK] Unknown error:",r)}class ie{constructor(e){this.additionalHeaders={},this.debugMode=!1,this.pendingEventProcessingPromises={},this.pendingIngestionPromises={},this.localEventExportMap=new Map,this._events=new ge;const{publicKey:t,secretKey:s,enabled:n,_projectId:o,_isLocalEventExportEnabled:a,...c}=e;if(this._events.on("error",i=>{console.error(`[Langfuse SDK] ${typeof i=="string"?i:JSON.stringify(i)}`)}),this.enabled=n!==!1,this.publicKey=t??"",this.secretKey=s,this.baseUrl=te(c?.baseUrl||"https://cloud.langfuse.com"),this.additionalHeaders=c?.additionalHeaders||{},this.flushAt=c?.flushAt?Math.max(c?.flushAt,1):15,this.flushInterval=c?.flushInterval??1e4,this.release=c?.release??g("LANGFUSE_RELEASE")??Te()??void 0,this.mask=c?.mask,this.sampleRate=c?.sampleRate??(g("LANGFUSE_SAMPLE_RATE")?Number(g("LANGFUSE_SAMPLE_RATE")):void 0),this.sampleRate&&this._events.emit("debug",`Langfuse trace sampling enabled with sampleRate ${this.sampleRate}.`),this.environment=c?.environment??g("LANGFUSE_TRACING_ENVIRONMENT"),this.environment&&!(H.test(this.environment)||Ae.includes(this.environment))&&!a&&this._events.emit("error",`Invalid tracing environment set: ${this.environment} . Environment must match regex ${H}. Events will be rejected by Langfuse server.`),this._retryOptions={retryCount:c?.fetchRetryCount??3,retryDelay:c?.fetchRetryDelay??3e3,retryCheck:Ce},this.requestTimeout=c?.requestTimeout??5e3,this.sdkIntegration=c?.sdkIntegration??"DEFAULT",this.isLocalEventExportEnabled=a??!1,this.isLocalEventExportEnabled&&!o){this._events.emit("error","Local event export is enabled, but no project ID was provided. Disabling local export."),this.isLocalEventExportEnabled=!1;return}else if(!this.isLocalEventExportEnabled&&o){this._events.emit("error","Local event export is disabled, but a project ID was provided. Disabling local export."),this.isLocalEventExportEnabled=!1;return}else this.projectId=o}getSdkIntegration(){return this.sdkIntegration}getCommonEventProperties(){return{$lib:this.getLibraryId(),$lib_version:this.getLibraryVersion()}}on(e,t){return this._events.on(e,t)}debug(e=!0){this.removeDebugCallback?.(),this.debugMode=e,e&&(this.removeDebugCallback=this.on("*",(t,s)=>{t!=="error"&&console.log("[Langfuse Debug]",t,JSON.stringify(s))}))}traceStateless(e){const{id:t,timestamp:s,release:n,...o}=e,a=t??w(),c=n??this.release,i={id:a,release:c,timestamp:s??new Date,environment:this.environment,...o};return this.enqueue("trace-create",i),a}eventStateless(e){const{id:t,startTime:s,...n}=e,o=t??w(),a={id:o,startTime:s??new Date,environment:this.environment,...n};return this.enqueue("event-create",a),o}spanStateless(e){const{id:t,startTime:s,...n}=e,o=t||w(),a={id:o,startTime:s??new Date,environment:this.environment,...n};return this.enqueue("span-create",a),o}generationStateless(e){const{id:t,startTime:s,prompt:n,...o}=e,a=n&&!n.isFallback?{promptName:n.name,promptVersion:n.version}:{},c=t||w(),i={id:c,startTime:s??new Date,environment:this.environment,...a,...o};return this.enqueue("generation-create",i),c}scoreStateless(e){const{id:t,...s}=e,n=t||w(),o={id:n,environment:this.environment,...s};return this.enqueue("score-create",o),n}updateSpanStateless(e){return this.enqueue("span-update",e),e.id}updateGenerationStateless(e){const{prompt:t,...s}=e,o={...t&&!t.isFallback?{promptName:t.name,promptVersion:t.version}:{},...s};return this.enqueue("generation-update",o),e.id}async _getDataset(e){const t=encodeURIComponent(e);return this.fetchAndLogErrors(`${this.baseUrl}/api/public/v2/datasets/${t}`,this._getFetchOptions({method:"GET"}))}async _getDatasetItems(e){const t=new URLSearchParams;return Object.entries(e??{}).forEach(([s,n])=>{n!=null&&t.append(s,n.toString())}),this.fetchAndLogErrors(`${this.baseUrl}/api/public/dataset-items?${t}`,this._getFetchOptions({method:"GET"}))}async _fetchMedia(e){return this.fetchAndLogErrors(`${this.baseUrl}/api/public/media/${e}`,this._getFetchOptions({method:"GET"}))}async fetchTraces(e){const{data:t,meta:s}=await this.fetchAndLogErrors(`${this.baseUrl}/api/public/traces?${C(e)}`,this._getFetchOptions({method:"GET"}));return{data:t,meta:s}}async fetchTrace(e){return{data:await this.fetchAndLogErrors(`${this.baseUrl}/api/public/traces/${e}`,this._getFetchOptions({method:"GET"}))}}async fetchObservations(e){const{data:t,meta:s}=await this.fetchAndLogErrors(`${this.baseUrl}/api/public/observations?${C(e)}`,this._getFetchOptions({method:"GET"}));return{data:t,meta:s}}async fetchObservation(e){return{data:await this.fetchAndLogErrors(`${this.baseUrl}/api/public/observations/${e}`,this._getFetchOptions({method:"GET"}))}}async fetchSessions(e){const{data:t,meta:s}=await this.fetchAndLogErrors(`${this.baseUrl}/api/public/sessions?${C(e)}`,this._getFetchOptions({method:"GET"}));return{data:t,meta:s}}async getDatasetRun(e){const t=encodeURIComponent(e.datasetName),s=encodeURIComponent(e.runName);return this.fetchAndLogErrors(`${this.baseUrl}/api/public/datasets/${t}/runs/${s}`,this._getFetchOptions({method:"GET"}))}async getDatasetRuns(e,t){return this.fetchAndLogErrors(`${this.baseUrl}/api/public/datasets/${encodeURIComponent(e)}/runs?${C(t)}`,this._getFetchOptions({method:"GET"}))}async createDatasetRunItem(e){return this.fetchAndLogErrors(`${this.baseUrl}/api/public/dataset-run-items`,this._getFetchOptions({method:"POST",body:JSON.stringify(e)}))}async createDataset(e){const t=typeof e=="string"?{name:e}:e;return this.fetchAndLogErrors(`${this.baseUrl}/api/public/datasets`,this._getFetchOptions({method:"POST",body:JSON.stringify(t)}))}async createDatasetItem(e){return this.fetchAndLogErrors(`${this.baseUrl}/api/public/dataset-items`,this._getFetchOptions({method:"POST",body:JSON.stringify(e)}))}async getDatasetItem(e){return this.fetchAndLogErrors(`${this.baseUrl}/api/public/dataset-items/${e}`,this._getFetchOptions({method:"GET"}))}_parsePayload(e){try{return JSON.parse(e)}catch{return e}}async createPromptStateless(e){return this.fetchAndLogErrors(`${this.baseUrl}/api/public/v2/prompts`,this._getFetchOptions({method:"POST",body:JSON.stringify(e)}))}async updatePromptStateless(e){return this.fetchAndLogErrors(`${this.baseUrl}/api/public/v2/prompts/${encodeURIComponent(e.name)}/versions/${encodeURIComponent(e.version)}`,this._getFetchOptions({method:"PATCH",body:JSON.stringify(e)}))}async getPromptStateless(e,t,s,n,o){const a=encodeURIComponent(e),c=new URLSearchParams;if(t&&s)throw new Error("Provide either version or label, not both.");t&&c.append("version",t.toString()),s&&c.append("label",s);const i=`${this.baseUrl}/api/public/v2/prompts/${a}${c.size?"?"+c:""}`,u=this._getBoundedMaxRetries({maxRetries:n,defaultMaxRetries:2,maxRetriesUpperBound:4}),h={...this._retryOptions,retryCount:u,retryDelay:500};return F(async()=>{const p=await this.fetch(i,this._getFetchOptions({method:"GET",fetchTimeout:o??this.requestTimeout})).catch(y=>{throw y.name==="AbortError"?new M("Fetch request timed out"):new M(y)});if(p.status>=500)throw new U(p,await p.text());const m=await p.json();return{fetchResult:p.status===200?"success":"failure",data:m}},h,p=>this._events.emit("retry",p+", "+i+", "+JSON.stringify(h)))}_getBoundedMaxRetries(e){const t=Math.max(e.defaultMaxRetries??2,0),s=Math.max(e.maxRetriesUpperBound??4,0);return e.maxRetries===void 0?t:Math.min(Math.max(e.maxRetries,0),s)}enqueue(e,t){if(!this.enabled)return;const s=this.parseTraceId(e,t);if(!s)this._events.emit("warning","Failed to parse traceID for sampling. Please open a Github issue in https://github.com/langfuse/langfuse/issues/new/choose");else if(!Ie(s,this.sampleRate)){this._events.emit("debug",`Event with trace ID ${s} is out of sample. Skipping.`);return}const n=this.processEnqueueEvent(e,t),o=w();this.pendingEventProcessingPromises[o]=n,n.catch(a=>{this._events.emit("error",a)}).finally(()=>{delete this.pendingEventProcessingPromises[o]})}async processEnqueueEvent(e,t){this.maskEventBodyInPlace(t),await this.processMediaInEvent(e,t);const s=this.truncateEventBody(t,z);try{JSON.stringify(s)}catch(o){this._events.emit("error",`Event Body for ${e} is not JSON-serializable: ${o}`);return}const n=this.getPersistedProperty(I.Queue)||[];n.push({id:w(),type:e,timestamp:se(),body:s,metadata:void 0}),this.setPersistedProperty(I.Queue,n),this._events.emit(e,s),n.length>=this.flushAt&&this.flush(),this.flushInterval&&!this._flushTimer&&(this._flushTimer=re(()=>this.flush(),this.flushInterval))}maskEventBodyInPlace(e){if(!this.mask)return;const t=["input","output"];for(const s of t)if(s in e)try{e[s]=this.mask({data:e[s]})}catch(n){this._events.emit("error",`Error masking ${s}: ${n}`),e[s]="<fully masked due to failed mask function>"}}truncateEventBody(e,t){const s=this.getByteSize(e);if(s<=t)return e;this._events.emit("warning",`Event Body is too large (${s} bytes) and will be truncated`);const o=["input","output","metadata"].map(i=>({key:i,size:i in e?this.getByteSize(e[i]):0})).sort((i,u)=>u.size-i.size);let a={...e},c=s;for(const{key:i,size:u}of o)c>t&&Object.prototype.hasOwnProperty.call(a,i)&&(a={...a,[i]:"<truncated due to size exceeding limit>"},this._events.emit("warning",`Truncated ${i} due to total size exceeding limit`),c-=u);return a}getByteSize(e){const t=JSON.stringify(e);return typeof TextEncoder<"u"?new TextEncoder().encode(t).length:encodeURIComponent(t).replace(/%[A-F\d]{2}/g,"U").length}async processMediaInEvent(e,t){if(!t)return;const s=this.parseTraceId(e,t);if(!s){this._events.emit("warning","traceId is required for media upload");return}const n=(e.includes("generation")||e.includes("span"))&&t.id?t.id:void 0;await Promise.all(["input","output","metadata"].map(async o=>{t[o]&&(t[o]=await this.findAndProcessMedia({data:t[o],traceId:s,observationId:n,field:o}).catch(a=>{this._events.emit("error",`Error processing multimodal event: ${a}`)})??t[o])}))}parseTraceId(e,t){return"traceId"in t?t.traceId:e.includes("trace")?t.id:void 0}async findAndProcessMedia({data:e,traceId:t,observationId:s,field:n}){const o=new WeakMap,a=10,c=async(i,u)=>{if(typeof i=="string"&&i.startsWith("data:")){const h=new v({base64DataUri:i});return await this.processMediaItem({media:h,traceId:t,observationId:s,field:n}),h}if(typeof i!="object"||i===null||o.has(i)||u>a)return i;if(o.set(i,!0),i instanceof v||Object.prototype.toString.call(i)==="[object LangfuseMedia]")return await this.processMediaItem({media:i,traceId:t,observationId:s,field:n}),i;if(Array.isArray(i))return await Promise.all(i.map(h=>c(h,u+1)));if(typeof i=="object"&&i!==null){if("input_audio"in i&&typeof i.input_audio=="object"&&"data"in i.input_audio){const h=new v({base64DataUri:`data:audio/${i.input_audio.format||"wav"};base64,${i.input_audio.data}`});return await this.processMediaItem({media:h,traceId:t,observationId:s,field:n}),{...i,input_audio:{...i.input_audio,data:h}}}if("audio"in i&&typeof i.audio=="object"&&"data"in i.audio){const h=new v({base64DataUri:`data:audio/${i.audio.format||"wav"};base64,${i.audio.data}`});return await this.processMediaItem({media:h,traceId:t,observationId:s,field:n}),{...i,audio:{...i.audio,data:h}}}return Object.fromEntries(await Promise.all(Object.entries(i).map(async([h,l])=>[h,await c(l,u+1)])))}return i};return await c(e,1)}async processMediaItem({media:e,traceId:t,observationId:s,field:n}){try{if(!e.contentLength||!e._contentType||!e.contentSha256Hash||!e._contentBytes)return;const o={contentLength:e.contentLength,traceId:t,observationId:s,field:n,contentType:e._contentType,sha256Hash:e.contentSha256Hash},c=await(await this.fetch(`${this.baseUrl}/api/public/media`,this._getFetchOptions({method:"POST",body:JSON.stringify(o)}))).json(),{uploadUrl:i,mediaId:u}=c;if(e._mediaId=u,i){this._events.emit("debug",`Uploading media ${u}`);const h=Date.now(),l=await this.uploadMediaWithBackoff({uploadUrl:i,contentBytes:e._contentBytes,contentType:e._contentType,contentSha256Hash:e.contentSha256Hash,maxRetries:3,baseDelay:1e3});if(!l)throw Error("Media upload process failed");const p={uploadedAt:new Date().toISOString(),uploadHttpStatus:l.status,uploadHttpError:await l.text(),uploadTimeMs:Date.now()-h};await this.fetch(`${this.baseUrl}/api/public/media/${u}`,this._getFetchOptions({method:"PATCH",body:JSON.stringify(p)})),this._events.emit("debug",`Media upload status reported for ${u}`)}else this._events.emit("debug",`Media ${u} already uploaded`)}catch(o){this._events.emit("error",`Error processing media item: ${o}`)}}async uploadMediaWithBackoff(e){const{uploadUrl:t,contentType:s,contentSha256Hash:n,contentBytes:o,maxRetries:a,baseDelay:c}=e;for(let i=0;i<=a;i++)try{const u=await this.fetch(t,{method:"PUT",body:o,headers:{"Content-Type":s,"x-amz-checksum-sha256":n,"x-ms-blob-type":"BlockBlob"}});if(i<a&&u.status!==200&&u.status!==201)throw new Error(`Upload failed with status ${u.status}`);return u}catch(u){if(i===a)throw u;const h=c*Math.pow(2,i),l=Math.random()*1e3;await new Promise(p=>setTimeout(p,h+l))}}async flushAsync(){return await Promise.all(Object.values(this.pendingEventProcessingPromises)).catch(e=>{G(e)}),new Promise((e,t)=>{try{this.flush((s,n)=>{s?(G(s),e()):e(n)})}catch(s){console.error("[Langfuse SDK] Error while flushing Langfuse",s)}})}flush(e){this._flushTimer&&(clearTimeout(this._flushTimer),this._flushTimer=null);const t=this.getPersistedProperty(I.Queue)||[];if(!t.length)return e?.();const s=t.splice(0,this.flushAt),{processedItems:n,remainingItems:o}=this.processQueueItems(s,z,Le);this.setPersistedProperty(I.Queue,[...o,...t]);const a=w(),c=p=>{p&&this._events.emit("warning",p),e?.(p,s),this._events.emit("flush",s)};if(this.isLocalEventExportEnabled&&this.projectId){this.localEventExportMap.has(this.projectId)?this.localEventExportMap.get(this.projectId)?.push(...s):this.localEventExportMap.set(this.projectId,[...s]),c();return}const i=JSON.stringify({batch:n,metadata:{batch_size:n.length,sdk_integration:this.sdkIntegration,sdk_version:this.getLibraryVersion(),sdk_variant:this.getLibraryId(),public_key:this.publicKey,sdk_name:"langfuse-js"}}),u=`${this.baseUrl}/api/public/ingestion`,h=this._getFetchOptions({method:"POST",body:i}),l=this.fetchWithRetry(u,h).then(()=>c()).catch(p=>{c(p)});this.pendingIngestionPromises[a]=l,l.finally(()=>{delete this.pendingIngestionPromises[a]})}processQueueItems(e,t,s){let n=0;const o=[],a=[];for(let c=0;c<e.length;c++)try{const i=new Blob([JSON.stringify(e[c])]).size;if(i>t){console.warn(`Item exceeds size limit (size: ${i}), dropping item.`);continue}if(n+i>=s){console.debug(`hit batch size limit (size: ${n+i})`),a.push(...e.slice(c)),console.log(`Remaining items: ${a.length}`),console.log(`processes items: ${o.length}`);break}n+=i,o.push(e[c])}catch(i){this._events.emit("error",i),a.push(...e.slice(c));break}return{processedItems:o,remainingItems:a}}_getFetchOptions(e){return{method:e.method,headers:{"Content-Type":"application/json","X-Langfuse-Sdk-Name":"langfuse-js","X-Langfuse-Sdk-Version":this.getLibraryVersion(),"X-Langfuse-Sdk-Variant":this.getLibraryId(),"X-Langfuse-Sdk-Integration":this.sdkIntegration,"X-Langfuse-Public-Key":this.publicKey,...this.additionalHeaders,...this.constructAuthorizationHeader(this.publicKey,this.secretKey)},body:e.body,...e.fetchTimeout!==void 0?{signal:AbortSignal.timeout(e.fetchTimeout)}:{}}}constructAuthorizationHeader(e,t){return t===void 0?{Authorization:"Bearer "+e}:{Authorization:"Basic "+(typeof btoa=="function"?btoa(e+":"+t):Buffer.from(e+":"+t).toString("base64"))}}async fetchWithRetry(e,t,s){return AbortSignal.timeout??=function(o){const a=new AbortController;return setTimeout(()=>a.abort(),o),a.signal},await F(async()=>{let n=null;try{n=await this.fetch(e,{signal:AbortSignal.timeout(this.requestTimeout),...t})}catch(a){throw new M(a)}if(n.status<200||n.status>=400){const a=await n.json();throw new U(n,JSON.stringify(a))}const o=await n.json();if(n.status===207&&o.errors.length>0)throw new U(n,JSON.stringify(o.errors));return n},{...this._retryOptions,...s},n=>this._events.emit("retry",n+", "+e+", "+JSON.stringify(t)))}async fetchAndLogErrors(e,t){const s=await this.fetch(e,t),n=s.status===429?await s.text():await s.json();return(s.status<200||s.status>=400)&&G(new U(s,JSON.stringify(n))),n}async shutdownAsync(){clearTimeout(this._flushTimer);try{await this.flushAsync(),await Promise.all(Object.values(this.pendingIngestionPromises).map(e=>e.catch(()=>{}))),await this.flushAsync()}catch(e){console.error("[Langfuse SDK] Error while shutting down Langfuse",e)}}async _exportLocalEvents(e){if(this.isLocalEventExportEnabled){clearTimeout(this._flushTimer),await this.flushAsync();const t=this.localEventExportMap.get(e)??[];return this.localEventExportMap.delete(e),t}else return this._events.emit("error","Local event exports are disabled, but _exportLocalEvents() was called."),[]}shutdown(){console.warn("shutdown() is deprecated. It does not wait for all events to be processed. Please use shutdownAsync() instead."),this.shutdownAsync()}async awaitAllQueuedAndPendingRequests(){clearTimeout(this._flushTimer),await this.flushAsync(),await Promise.all(Object.values(this.pendingIngestionPromises))}}class qe extends ie{constructor(e){const{flushAt:t,flushInterval:s,publicKey:n,enabled:o,...a}=e;let c=o!==!1;c&&!n&&(c=!1,console.warn("Langfuse public key not passed to constructor and not set as 'LANGFUSE_PUBLIC_KEY' environment variable. No observability data will be sent to Langfuse.")),super({...a,publicKey:n,flushAt:t??1,flushInterval:s??0,enabled:c})}async score(e){return this.scoreStateless(e),await this.awaitAllQueuedAndPendingRequests(),this}}class ke extends ie{constructor(e){const{publicKey:t,secretKey:s,enabled:n,_isLocalEventExportEnabled:o}=e;let a=n!==!1;o?a=!0:s?t||(a=!1,n!==!1&&console.warn("Langfuse public key was not passed to constructor or not set as 'LANGFUSE_PUBLIC_KEY' environment variable. No observability data will be sent to Langfuse.")):(a=!1,n!==!1&&console.warn("Langfuse secret key was not passed to constructor or not set as 'LANGFUSE_SECRET_KEY' environment variable. No observability data will be sent to Langfuse.")),super({...e,enabled:a}),this._promptCache=new _e}trace(e){const t=this.traceStateless(e??{}),s=new Me(this,t);if(g("DEFER")&&e)try{const n=g("__deferRuntime");n&&n.langfuseTraces([{id:t,name:e.name||"",url:s.getTraceUrl()}])}catch{}return s}span(e){const t=e.traceId||this.traceStateless({name:e.name}),s=this.spanStateless({...e,traceId:t});return new Ge(this,s,t)}generation(e){const t=e.traceId||this.traceStateless({name:e.name}),s=this.generationStateless({...e,traceId:t});return new Ne(this,s,t)}event(e){const t=e.traceId||this.traceStateless({name:e.name}),s=this.eventStateless({...e,traceId:t});return new Fe(this,s,t)}score(e){return this.scoreStateless(e),this}async getDataset(e,t){const s=await this._getDataset(e),n=[];let o=1;for(;;){const c=await this._getDatasetItems({datasetName:e,limit:t?.fetchItemsPageSize??50,page:o});if(n.push(...c.data),c.meta.totalPages<=o)break;o++}return{...s,description:s.description??void 0,metadata:s.metadata??void 0,items:n.map(c=>({...c,link:async(i,u,h)=>(await this.awaitAllQueuedAndPendingRequests(),await this.createDatasetRunItem({runName:u,datasetItemId:c.id,observationId:i.observationId,traceId:i.traceId,runDescription:h?.description,metadata:h?.metadata}))}))}}async createPrompt(e){const t=e.labels??[],s=e.type==="chat"?await this.createPromptStateless({...e,prompt:e.prompt.map(n=>"type"in n&&n.type===b.Placeholder?{type:b.Placeholder,name:n.name}:{type:b.ChatMessage,...n}),labels:e.isActive?[...new Set([...t,"production"])]:t}):await this.createPromptStateless({...e,type:e.type??"text",labels:e.isActive?[...new Set([...t,"production"])]:t});return s.type==="chat"?new O(s):new k(s)}async updatePrompt(e){const t=await this.updatePromptStateless(e);return this._promptCache.invalidate(e.name),t}async getPrompt(e,t,s){const n=this._getPromptCacheKey({name:e,version:t,label:s?.label}),o=this._promptCache.getIncludingExpired(n);if(!o||s?.cacheTtlSeconds===0)try{return await this._fetchPromptAndUpdateCache({name:e,version:t,label:s?.label,cacheTtlSeconds:s?.cacheTtlSeconds,maxRetries:s?.maxRetries,fetchTimeout:s?.fetchTimeoutMs})}catch(a){if(s?.fallback){const c={name:e,version:t??0,labels:s.label?[s.label]:[],cacheTtlSeconds:s?.cacheTtlSeconds,config:{},tags:[]};return s.type==="chat"?new O({...c,type:"chat",prompt:s.fallback.map(i=>({type:b.ChatMessage,...i}))},!0):new k({...c,type:"text",prompt:s.fallback},!0)}throw a}if(o.isExpired){if(!this._promptCache.isRefreshing(n)){const a=this._fetchPromptAndUpdateCache({name:e,version:t,label:s?.label,cacheTtlSeconds:s?.cacheTtlSeconds,maxRetries:s?.maxRetries,fetchTimeout:s?.fetchTimeoutMs}).catch(()=>{console.warn(`Failed to refresh prompt cache '${n}', stale cache will be used until next refresh succeeds.`)});this._promptCache.addRefreshingPromise(n,a)}return o.value}return o.value}_getPromptCacheKey(e){const{name:t,version:s,label:n}=e,o=[t];return s!==void 0?o.push("version:"+s.toString()):n!==void 0?o.push("label:"+n):o.push("label:production"),o.join("-")}async _fetchPromptAndUpdateCache(e){const t=this._getPromptCacheKey(e);try{const{name:s,version:n,cacheTtlSeconds:o,label:a,maxRetries:c,fetchTimeout:i}=e,{data:u,fetchResult:h}=await this.getPromptStateless(s,n,a,c,i);if(h==="failure")throw Error(u.message??"Internal error while fetching prompt");let l;return u.type==="chat"?l=new O(u):l=new k(u),this._promptCache.set(t,l,o),l}catch(s){throw console.error(`[Langfuse SDK] Error while fetching prompt '${t}':`,s),s}}async fetchMedia(e){return await this._fetchMedia(e)}async resolveMediaReferences(e){const{obj:t,...s}=e;return v.resolveMediaReferences({...s,langfuseClient:this,obj:t})}_updateSpan(e){return this.updateSpanStateless(e),this}_updateGeneration(e){return this.updateGenerationStateless(e),this}}class ce{constructor({client:e,id:t,traceId:s,observationId:n}){this.client=e,this.id=t,this.traceId=s,this.observationId=n}event(e){return this.client.event({...e,traceId:this.traceId,parentObservationId:this.observationId})}span(e){return this.client.span({...e,traceId:this.traceId,parentObservationId:this.observationId})}generation(e){return this.client.generation({...e,traceId:this.traceId,parentObservationId:this.observationId})}score(e){return this.client.score({...e,traceId:this.traceId,observationId:this.observationId}),this}getTraceUrl(){return`${this.client.baseUrl}/trace/${this.traceId}`}}class Me extends ce{constructor(e,t){super({client:e,id:t,traceId:t,observationId:null})}update(e){return this.client.trace({...e,id:this.id}),this}}class K extends ce{constructor(e,t,s){super({client:e,id:t,traceId:s,observationId:t})}}class Ge extends K{constructor(e,t,s){super(e,t,s)}update(e){return this.client._updateSpan({...e,id:this.id,traceId:this.traceId}),this}end(e){return this.client._updateSpan({...e,id:this.id,traceId:this.traceId,endTime:new Date}),this}}class Ne extends K{constructor(e,t,s){super(e,t,s)}update(e){return this.client._updateGeneration({...e,id:this.id,traceId:this.traceId}),this}end(e){return this.client._updateGeneration({...e,id:this.id,traceId:this.traceId,endTime:new Date}),this}}class Fe extends K{constructor(e,t,s){super(e,t,s)}}const ue={getItem(r){try{const e=r+"=",t=document.cookie.split(";");for(let s=0;s<t.length;s++){let n=t[s];for(;n.charAt(0)==" ";)n=n.substring(1,n.length);if(n.indexOf(e)===0)return decodeURIComponent(n.substring(e.length,n.length))}}catch{}return null},setItem(r,e){try{const o=r+"="+encodeURIComponent(e)+"; path=/";document.cookie=o}catch{return}},removeItem(r){try{ue.setItem(r,"")}catch{return}},clear(){document.cookie=""},getAllKeys(){const r=document.cookie.split(";"),e=[];for(let t=0;t<r.length;t++){let s=r[t];for(;s.charAt(0)==" ";)s=s.substring(1,s.length);e.push(s.split("=")[0])}return e}},W=r=>({getItem(e){return r.getItem(e)},setItem(e,t){r.setItem(e,t)},removeItem(e){r.removeItem(e)},clear(){r.clear()},getAllKeys(){const e=[];for(const t in localStorage)e.push(t);return e}}),X=(r,e="__mplssupport__")=>{if(!window)return!1;try{return r.setItem(e,"xyz"),r.getItem(e)!=="xyz"?!1:(r.removeItem(e),!0)}catch{return!1}};let N,L;const A=()=>{const r={};return{getItem(t){return r[t]},setItem(t,s){r[t]=s!==null?s:void 0},removeItem(t){delete r[t]},clear(){for(const t in r)delete r[t]},getAllKeys(){const t=[];for(const s in r)t.push(s);return t}}},q=(r,e)=>{if(typeof e!==void 0&&e){if(!localStorage){const t=W(e.localStorage);N=X(t)?t:void 0}if(!L){const t=W(e.sessionStorage);L=X(t)?t:void 0}}switch(r){case"cookie":return ue||N||L||A();case"localStorage":return N||L||A();case"sessionStorage":return L||A();case"memory":return A();default:return A()}};var d;(function(r){r.Json="application/json",r.FormData="multipart/form-data",r.UrlEncoded="application/x-www-form-urlencoded",r.Text="text/plain"})(d||(d={}));class Be{constructor(e={}){this.baseUrl="",this.securityData=null,this.abortControllers=new Map,this.customFetch=(...t)=>fetch(...t),this.baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"},this.setSecurityData=t=>{this.securityData=t},this.contentFormatters={[d.Json]:t=>t!==null&&(typeof t=="object"||typeof t=="string")?JSON.stringify(t):t,[d.Text]:t=>t!==null&&typeof t!="string"?JSON.stringify(t):t,[d.FormData]:t=>Object.keys(t||{}).reduce((s,n)=>{const o=t[n];return s.append(n,o instanceof Blob?o:typeof o=="object"&&o!==null?JSON.stringify(o):`${o}`),s},new FormData),[d.UrlEncoded]:t=>this.toQueryString(t)},this.createAbortSignal=t=>{if(this.abortControllers.has(t)){const n=this.abortControllers.get(t);return n?n.signal:void 0}const s=new AbortController;return this.abortControllers.set(t,s),s.signal},this.abortRequest=t=>{const s=this.abortControllers.get(t);s&&(s.abort(),this.abortControllers.delete(t))},this.request=async({body:t,secure:s,path:n,type:o,query:a,format:c,baseUrl:i,cancelToken:u,...h})=>{const l=(typeof s=="boolean"?s:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},p=this.mergeRequestParams(h,l),m=a&&this.toQueryString(a),y=this.contentFormatters[o||d.Json],_=c||p.format;return this.customFetch(`${i||this.baseUrl||""}${n}${m?`?${m}`:""}`,{...p,headers:{...p.headers||{},...o&&o!==d.FormData?{"Content-Type":o}:{}},signal:(u?this.createAbortSignal(u):p.signal)||null,body:typeof t>"u"||t===null?null:y(t)}).then(async E=>{const f=E.clone();f.data=null,f.error=null;const R=_?await E[_]().then(T=>(f.ok?f.data=T:f.error=T,f)).catch(T=>(f.error=T,f)):f;if(u&&this.abortControllers.delete(u),!E.ok)throw R;return R.data})},Object.assign(this,e)}encodeQueryParam(e,t){return`${encodeURIComponent(e)}=${encodeURIComponent(typeof t=="number"?t:`${t}`)}`}addQueryParam(e,t){return this.encodeQueryParam(t,e[t])}addArrayQueryParam(e,t){return e[t].map(n=>this.encodeQueryParam(t,n)).join("&")}toQueryString(e){const t=e||{};return Object.keys(t).filter(n=>typeof t[n]<"u").map(n=>Array.isArray(t[n])?this.addArrayQueryParam(t,n):this.addQueryParam(t,n)).join("&")}addQueryParams(e){const t=this.toQueryString(e);return t?`?${t}`:""}mergeRequestParams(e,t){return{...this.baseApiParams,...e,...t||{},headers:{...this.baseApiParams.headers||{},...e.headers||{},...t&&t.headers||{}}}}}class Ke extends Be{constructor(){super(...arguments),this.api={annotationQueuesCreateQueueItem:(e,t,s={})=>this.request({path:`/api/public/annotation-queues/${e}/items`,method:"POST",body:t,secure:!0,type:d.Json,format:"json",...s}),annotationQueuesDeleteQueueItem:(e,t,s={})=>this.request({path:`/api/public/annotation-queues/${e}/items/${t}`,method:"DELETE",secure:!0,format:"json",...s}),annotationQueuesGetQueue:(e,t={})=>this.request({path:`/api/public/annotation-queues/${e}`,method:"GET",secure:!0,format:"json",...t}),annotationQueuesGetQueueItem:(e,t,s={})=>this.request({path:`/api/public/annotation-queues/${e}/items/${t}`,method:"GET",secure:!0,format:"json",...s}),annotationQueuesListQueueItems:({queueId:e,...t},s={})=>this.request({path:`/api/public/annotation-queues/${e}/items`,method:"GET",query:t,secure:!0,format:"json",...s}),annotationQueuesListQueues:(e,t={})=>this.request({path:"/api/public/annotation-queues",method:"GET",query:e,secure:!0,format:"json",...t}),annotationQueuesUpdateQueueItem:(e,t,s,n={})=>this.request({path:`/api/public/annotation-queues/${e}/items/${t}`,method:"PATCH",body:s,secure:!0,type:d.Json,format:"json",...n}),commentsCreate:(e,t={})=>this.request({path:"/api/public/comments",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),commentsGet:(e,t={})=>this.request({path:"/api/public/comments",method:"GET",query:e,secure:!0,format:"json",...t}),commentsGetById:(e,t={})=>this.request({path:`/api/public/comments/${e}`,method:"GET",secure:!0,format:"json",...t}),datasetItemsCreate:(e,t={})=>this.request({path:"/api/public/dataset-items",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),datasetItemsDelete:(e,t={})=>this.request({path:`/api/public/dataset-items/${e}`,method:"DELETE",secure:!0,format:"json",...t}),datasetItemsGet:(e,t={})=>this.request({path:`/api/public/dataset-items/${e}`,method:"GET",secure:!0,format:"json",...t}),datasetItemsList:(e,t={})=>this.request({path:"/api/public/dataset-items",method:"GET",query:e,secure:!0,format:"json",...t}),datasetRunItemsCreate:(e,t={})=>this.request({path:"/api/public/dataset-run-items",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),datasetRunItemsList:(e,t={})=>this.request({path:"/api/public/dataset-run-items",method:"GET",query:e,secure:!0,...t}),datasetsCreate:(e,t={})=>this.request({path:"/api/public/v2/datasets",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),datasetsDeleteRun:(e,t,s={})=>this.request({path:`/api/public/datasets/${e}/runs/${t}`,method:"DELETE",secure:!0,format:"json",...s}),datasetsGet:(e,t={})=>this.request({path:`/api/public/v2/datasets/${e}`,method:"GET",secure:!0,format:"json",...t}),datasetsGetRun:(e,t,s={})=>this.request({path:`/api/public/datasets/${e}/runs/${t}`,method:"GET",secure:!0,format:"json",...s}),datasetsGetRuns:({datasetName:e,...t},s={})=>this.request({path:`/api/public/datasets/${e}/runs`,method:"GET",query:t,secure:!0,format:"json",...s}),datasetsList:(e,t={})=>this.request({path:"/api/public/v2/datasets",method:"GET",query:e,secure:!0,format:"json",...t}),healthHealth:(e={})=>this.request({path:"/api/public/health",method:"GET",format:"json",...e}),ingestionBatch:(e,t={})=>this.request({path:"/api/public/ingestion",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),mediaGet:(e,t={})=>this.request({path:`/api/public/media/${e}`,method:"GET",secure:!0,format:"json",...t}),mediaGetUploadUrl:(e,t={})=>this.request({path:"/api/public/media",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),mediaPatch:(e,t,s={})=>this.request({path:`/api/public/media/${e}`,method:"PATCH",body:t,secure:!0,type:d.Json,...s}),metricsMetrics:(e,t={})=>this.request({path:"/api/public/metrics",method:"GET",query:e,secure:!0,format:"json",...t}),modelsCreate:(e,t={})=>this.request({path:"/api/public/models",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),modelsDelete:(e,t={})=>this.request({path:`/api/public/models/${e}`,method:"DELETE",secure:!0,...t}),modelsGet:(e,t={})=>this.request({path:`/api/public/models/${e}`,method:"GET",secure:!0,format:"json",...t}),modelsList:(e,t={})=>this.request({path:"/api/public/models",method:"GET",query:e,secure:!0,format:"json",...t}),observationsGet:(e,t={})=>this.request({path:`/api/public/observations/${e}`,method:"GET",secure:!0,format:"json",...t}),observationsGetMany:(e,t={})=>this.request({path:"/api/public/observations",method:"GET",query:e,secure:!0,format:"json",...t}),organizationsGetOrganizationMemberships:(e={})=>this.request({path:"/api/public/organizations/memberships",method:"GET",secure:!0,format:"json",...e}),organizationsGetOrganizationProjects:(e={})=>this.request({path:"/api/public/organizations/projects",method:"GET",secure:!0,format:"json",...e}),organizationsGetProjectMemberships:(e,t={})=>this.request({path:`/api/public/projects/${e}/memberships`,method:"GET",secure:!0,format:"json",...t}),organizationsUpdateOrganizationMembership:(e,t={})=>this.request({path:"/api/public/organizations/memberships",method:"PUT",body:e,secure:!0,type:d.Json,format:"json",...t}),organizationsUpdateProjectMembership:(e,t,s={})=>this.request({path:`/api/public/projects/${e}/memberships`,method:"PUT",body:t,secure:!0,type:d.Json,format:"json",...s}),projectsCreate:(e,t={})=>this.request({path:"/api/public/projects",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),projectsCreateApiKey:(e,t,s={})=>this.request({path:`/api/public/projects/${e}/apiKeys`,method:"POST",body:t,secure:!0,type:d.Json,format:"json",...s}),projectsDelete:(e,t={})=>this.request({path:`/api/public/projects/${e}`,method:"DELETE",secure:!0,format:"json",...t}),projectsDeleteApiKey:(e,t,s={})=>this.request({path:`/api/public/projects/${e}/apiKeys/${t}`,method:"DELETE",secure:!0,format:"json",...s}),projectsGet:(e={})=>this.request({path:"/api/public/projects",method:"GET",secure:!0,format:"json",...e}),projectsGetApiKeys:(e,t={})=>this.request({path:`/api/public/projects/${e}/apiKeys`,method:"GET",secure:!0,format:"json",...t}),projectsUpdate:(e,t,s={})=>this.request({path:`/api/public/projects/${e}`,method:"PUT",body:t,secure:!0,type:d.Json,format:"json",...s}),promptsCreate:(e,t={})=>this.request({path:"/api/public/v2/prompts",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),promptsGet:({promptName:e,...t},s={})=>this.request({path:`/api/public/v2/prompts/${e}`,method:"GET",query:t,secure:!0,format:"json",...s}),promptsList:(e,t={})=>this.request({path:"/api/public/v2/prompts",method:"GET",query:e,secure:!0,format:"json",...t}),promptVersionUpdate:(e,t,s,n={})=>this.request({path:`/api/public/v2/prompts/${e}/versions/${t}`,method:"PATCH",body:s,secure:!0,type:d.Json,format:"json",...n}),scimCreateUser:(e,t={})=>this.request({path:"/api/public/scim/Users",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),scimDeleteUser:(e,t={})=>this.request({path:`/api/public/scim/Users/${e}`,method:"DELETE",secure:!0,format:"json",...t}),scimGetResourceTypes:(e={})=>this.request({path:"/api/public/scim/ResourceTypes",method:"GET",secure:!0,format:"json",...e}),scimGetSchemas:(e={})=>this.request({path:"/api/public/scim/Schemas",method:"GET",secure:!0,format:"json",...e}),scimGetServiceProviderConfig:(e={})=>this.request({path:"/api/public/scim/ServiceProviderConfig",method:"GET",secure:!0,format:"json",...e}),scimGetUser:(e,t={})=>this.request({path:`/api/public/scim/Users/${e}`,method:"GET",secure:!0,format:"json",...t}),scimListUsers:(e,t={})=>this.request({path:"/api/public/scim/Users",method:"GET",query:e,secure:!0,format:"json",...t}),scoreConfigsCreate:(e,t={})=>this.request({path:"/api/public/score-configs",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),scoreConfigsGet:(e,t={})=>this.request({path:"/api/public/score-configs",method:"GET",query:e,secure:!0,format:"json",...t}),scoreConfigsGetById:(e,t={})=>this.request({path:`/api/public/score-configs/${e}`,method:"GET",secure:!0,format:"json",...t}),scoreCreate:(e,t={})=>this.request({path:"/api/public/scores",method:"POST",body:e,secure:!0,type:d.Json,format:"json",...t}),scoreDelete:(e,t={})=>this.request({path:`/api/public/scores/${e}`,method:"DELETE",secure:!0,...t}),scoreV2Get:(e,t={})=>this.request({path:"/api/public/v2/scores",method:"GET",query:e,secure:!0,format:"json",...t}),scoreV2GetById:(e,t={})=>this.request({path:`/api/public/v2/scores/${e}`,method:"GET",secure:!0,format:"json",...t}),sessionsGet:(e,t={})=>this.request({path:`/api/public/sessions/${e}`,method:"GET",secure:!0,format:"json",...t}),sessionsList:(e,t={})=>this.request({path:"/api/public/sessions",method:"GET",query:e,secure:!0,format:"json",...t}),traceDelete:(e,t={})=>this.request({path:`/api/public/traces/${e}`,method:"DELETE",secure:!0,format:"json",...t}),traceDeleteMultiple:(e,t={})=>this.request({path:"/api/public/traces",method:"DELETE",body:e,secure:!0,type:d.Json,format:"json",...t}),traceGet:(e,t={})=>this.request({path:`/api/public/traces/${e}`,method:"GET",secure:!0,format:"json",...t}),traceList:(e,t={})=>this.request({path:"/api/public/traces",method:"GET",query:e,secure:!0,format:"json",...t})}}}var le="3.38.6";class Je extends ke{constructor(e){const t=ne.configLangfuseSDK(e);super(t),typeof window<"u"&&!("Deno"in window)?(this._storageKey=e?.persistence_name?`lf_${e.persistence_name}`:`lf_${t.publicKey}_langfuse`,this._storage=q(e?.persistence||"localStorage",window)):(this._storageKey=`lf_${t.publicKey}_langfuse`,this._storage=q("memory",void 0)),this.api=new Ke({baseUrl:this.baseUrl,baseApiParams:{headers:{"X-Langfuse-Sdk-Name":"langfuse-js","X-Langfuse-Sdk-Version":this.getLibraryVersion(),"X-Langfuse-Sdk-Variant":this.getLibraryId(),"X-Langfuse-Sdk-Integration":this.sdkIntegration,"X-Langfuse-Public-Key":this.publicKey,...this.additionalHeaders,...this.constructAuthorizationHeader(this.publicKey,this.secretKey)}}}).api}getPersistedProperty(e){return this._storageCache||(this._storageCache=JSON.parse(this._storage.getItem(this._storageKey)||"{}")||{}),this._storageCache[e]}setPersistedProperty(e,t){this._storageCache||(this._storageCache=JSON.parse(this._storage.getItem(this._storageKey)||"{}")||{}),t===null?delete this._storageCache[e]:this._storageCache[e]=t,this._storage.setItem(this._storageKey,JSON.stringify(this._storageCache))}fetch(e,t){return fetch(e,t)}getLibraryId(){return"langfuse"}getLibraryVersion(){return le}getCustomUserAgent(){}}class ot extends qe{constructor(e){const t=ne.configLangfuseSDK(e,!1);super(t),typeof window<"u"?(this._storageKey=e?.persistence_name?`lf_${e.persistence_name}`:`lf_${t.publicKey}_langfuse`,this._storage=q(e?.persistence||"localStorage",window)):(this._storageKey=`lf_${t.publicKey}_langfuse`,this._storage=q("memory",void 0))}getPersistedProperty(e){return this._storageCache||(this._storageCache=JSON.parse(this._storage.getItem(this._storageKey)||"{}")||{}),this._storageCache[e]}setPersistedProperty(e,t){this._storageCache||(this._storageCache=JSON.parse(this._storage.getItem(this._storageKey)||"{}")||{}),t===null?delete this._storageCache[e]:this._storageCache[e]=t,this._storage.setItem(this._storageKey,JSON.stringify(this._storageCache))}fetch(e,t){return fetch(e,t)}getLibraryId(){return"langfuse-frontend"}getLibraryVersion(){return le}getCustomUserAgent(){}}class S{static getInstance(e){return S.instance||(S.instance=new Je(e)),S.instance}}S.instance=null;const ze=r=>{let e={};e={frequency_penalty:r.frequency_penalty,logit_bias:r.logit_bias,logprobs:r.logprobs,max_tokens:r.max_tokens,n:r.n,presence_penalty:r.presence_penalty,seed:r.seed,stop:r.stop,stream:r.stream,temperature:r.temperature,top_p:r.top_p,user:r.user,response_format:r.response_format,top_logprobs:r.top_logprobs};let t=r.input;return r&&typeof r=="object"&&!Array.isArray(r)&&"messages"in r?(t={},t.messages=r.messages,"function_call"in r&&(t.function_call=r.function_call),"functions"in r&&(t.functions=r.functions),"tools"in r&&(t.tools=r.tools),"tool_choice"in r&&(t.tool_choice=r.tool_choice)):t||(t=r.prompt),{model:r.model,input:t,modelParameters:e}},he=r=>{if(r instanceof Object&&"output_text"in r&&r.output_text!=="")return r.output_text;if(typeof r=="object"&&r&&"output"in r&&Array.isArray(r.output)){const e=r.output;return e.length>1?e:e.length===1?e[0]:null}return r instanceof Object&&"choices"in r&&Array.isArray(r.choices)?"message"in r.choices[0]?r.choices[0].message:r.choices[0].text??"":""},He=r=>{if(me(r)){const{prompt_tokens:e,completion_tokens:t,total_tokens:s}=r.usage;return{input:e,output:t,total:s}}},pe=r=>{if("prompt_tokens"in r){const{prompt_tokens:e,completion_tokens:t,total_tokens:s,completion_tokens_details:n,prompt_tokens_details:o}=r;return{input:e,output:t,total:s,...Object.fromEntries(Object.entries(o??{}).map(([a,c])=>[`input_${a}`,c])),...Object.fromEntries(Object.entries(n??{}).map(([a,c])=>[`output_${a}`,c]))}}else if("input_tokens"in r){const{input_tokens:e,output_tokens:t,total_tokens:s,input_tokens_details:n,output_tokens_details:o}=r;return{input:e,output:t,total:s,...Object.fromEntries(Object.entries(n??{}).map(([a,c])=>[`input_${a}`,c])),...Object.fromEntries(Object.entries(o??{}).map(([a,c])=>[`output_${a}`,c]))}}},de=r=>{if(me(r))return pe(r.usage)},Qe=r=>{let e=!1;const s=r?.choices?.[0];try{if("delta"in s&&"tool_calls"in s.delta&&Array.isArray(s.delta.tool_calls))return e=!0,{isToolCall:e,data:s.delta.tool_calls[0]};if("delta"in s)return{isToolCall:e,data:s.delta?.content||""};if("text"in s)return{isToolCall:e,data:s.text||""}}catch{}return{isToolCall:!1,data:""}};function me(r){return r instanceof Object&&"usage"in r&&r.usage instanceof Object&&(typeof r.usage.prompt_tokens=="number"&&typeof r.usage.completion_tokens=="number"&&typeof r.usage.total_tokens=="number"||typeof r.usage.input_tokens=="number"&&typeof r.usage.output_tokens=="number"&&typeof r.usage.total_tokens=="number")}const Ve=r=>{let e="",t="";for(const s of r)e=s.function?.name||e,t+=s.function?.arguments||"";return{tool_calls:[{function:{name:e,arguments:t}}]}},fe=r=>{if(typeof r!="object"||r===null)return{model:void 0,modelParameters:void 0,metadata:void 0};const e="model"in r?r.model:void 0,t={},s=["max_output_tokens","parallel_tool_calls","store","temperature","tool_choice","top_p","truncation","user"],n={},o=["reasoning","incomplete_details","instructions","previous_response_id","tools","metadata","status","error"];for(const a of s){const c=a in r?r[a]:null;c!=null&&(t[a]=c)}for(const a of o){const c=a in r?r[a]:null;c&&(n[a]=c)}return{model:e,modelParameters:Object.keys(t).length>0?t:void 0,metadata:Object.keys(n).length>0?n:void 0}},Y=r=>r!=null&&typeof r=="object"&&typeof r[Symbol.asyncIterator]=="function",We=(r,e)=>(...t)=>Xe(r,e,...t),Xe=(r,e,...t)=>{const{model:s,input:n,modelParameters:o}=ze(t[0]??{}),a={...o,response_format:null},c={...e?.metadata,response_format:"response_format"in o?o.response_format:void 0};let i={model:s,input:n,modelParameters:a,name:e?.generationName,startTime:new Date,promptName:e?.langfusePrompt?.name,promptVersion:e?.langfusePrompt?.version,metadata:c},u;const h=e&&"parent"in e;h?(u=e.parent,i={...{...e,parent:void 0},...i,promptName:e?.promptName??e?.langfusePrompt?.name,promptVersion:e?.promptVersion??e?.langfusePrompt?.version}):u=S.getInstance(e?.clientInitParams).trace({...e,...i,id:e?.traceId,name:e?.traceName,timestamp:i.startTime});try{const l=r(...t);return Y(l)?Z(l,u,h,i):l instanceof Promise?l.then(m=>{if(Y(m))return Z(m,u,h,i);const y=he(m),_=He(m),E=de(m),{model:f,modelParameters:R,metadata:T}=fe(m);return u.generation({...i,output:y,endTime:new Date,usage:_,usageDetails:E,model:f||i.model,modelParameters:{...i.modelParameters,...R},metadata:{...i.metadata,...T}}),h||u.update({output:y}),m}).catch(m=>{throw u.generation({...i,endTime:new Date,statusMessage:String(m),level:"ERROR",usage:{inputCost:0,outputCost:0,totalCost:0},costDetails:{input:0,output:0,total:0}}),m}):l}catch(l){throw u.generation({...i,endTime:new Date,statusMessage:String(l),level:"ERROR",usage:{inputCost:0,outputCost:0,totalCost:0},costDetails:{input:0,output:0,total:0}}),l}};function Z(r,e,t,s){async function*n(){const o=r,a=[],c=[];let i=null,u=null,h,l=null;for await(const p of o){if(i=i??new Date,typeof p=="object"&&p&&"response"in p){const y=p.response;l=he(y),h=de(y);const{model:_,modelParameters:E,metadata:f}=fe(y);s.model=_??s.model,s.modelParameters={...s.modelParameters,...E},s.metadata={...s.metadata,...f}}typeof p=="object"&&p!=null&&"usage"in p&&(u=p.usage);const m=Qe(p);m.isToolCall?c.push(m.data):a.push(m.data),yield p}l=l??(c.length>0?Ve(c):a.join("")),e.generation({...s,output:l,endTime:new Date,completionStartTime:i,usage:u?{input:"prompt_tokens"in u?u.prompt_tokens:void 0,output:"completion_tokens"in u?u.completion_tokens:void 0,total:"total_tokens"in u?u.total_tokens:void 0}:void 0,usageDetails:h??(u?pe(u):void 0)}),t||e.update({output:l})}return n()}const Ye=(r,e)=>new Proxy(r,{get(t,s,n){const o=t[s],a=`${r.constructor?.name}.${s.toString()}`,c=e?.generationName??a,i=e&&"traceName"in e?e.traceName:c,u={...e,generationName:c,traceName:i};if(s==="flushAsync"){let l;return e&&"parent"in e?l=e.parent.client:l=S.getInstance(),l.flushAsync.bind(l)}if(s==="shutdownAsync"){let l;return e&&"parent"in e?l=e.parent.client:l=S.getInstance(),l.shutdownAsync.bind(l)}return typeof o=="function"?We(o.bind(t),u):o&&!Array.isArray(o)&&!(o instanceof Date)&&typeof o=="object"?Ye(o,u):Reflect.get(t,s,n)}});export{Je as Langfuse,v as LangfuseMedia,ot as LangfuseWeb,Je as default,Ye as observeOpenAI};
|