@epfl-sti/poesis 0.1.7 → 0.1.8
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/poesis.js +1734 -2049
- package/dist/poesis.js.map +1 -1
- package/package.json +23 -23
package/dist/poesis.js
CHANGED
|
@@ -1,2105 +1,1790 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode(`@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-md:28rem;--container-xl:36rem;--container-6xl:72rem;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--radius-sm:4px;--radius-md:8px;--radius-lg:12px;--shadow-sm:0 1px 2px #0000000f;--shadow-md:0 2px 8px #00000014;--shadow-lg:0 4px 16px #0000001a;--shadow-xl:0 8px 32px #0000001f;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-epfl-red:red;--color-epfl-red-dark:#b51f1f;--color-epfl-leman:#00a79f;--color-epfl-canard:#007480;--color-epfl-canard-dark:#004248;--color-primary:var(--action-primary);--color-primary-hover:var(--action-primary-hover);--color-bg-primary:var(--bg-primary);--color-bg-secondary:var(--bg-secondary);--color-bg-tertiary:var(--bg-tertiary);--color-border:var(--border-default);--color-border-strong:var(--border-strong);--color-text-primary:var(--text-primary);--color-text-secondary:var(--text-secondary);--color-text-muted:var(--text-muted);--color-success:var(--semantic-success);--color-success-bg:var(--semantic-success-bg);--color-warning:var(--semantic-warning);--color-warning-bg:var(--semantic-warning-bg);--color-error:var(--semantic-error);--color-error-bg:var(--semantic-error-bg);--color-info:var(--semantic-info);--color-info-bg:var(--semantic-info-bg);--radius-full:9999px;--spacing-xs:4px;--spacing-sm:8px;--spacing-md:16px;--spacing-lg:24px;--spacing-xl:32px;--spacing-2xl:48px;--text-h1:2rem;--text-h1--line-height:1.2;--text-h2:1.5rem;--text-h2--line-height:1.3;--text-h3:1.25rem;--text-h3--line-height:1.4;--text-body:.9375rem;--text-body--line-height:1.5;--text-small:.8125rem;--text-small--line-height:1.5;--text-caption:.75rem;--text-caption--line-height:1.4}}@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}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.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-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.right-0{right:calc(var(--spacing) * 0)}.right-lg{right:var(--spacing-lg)}.bottom-lg{bottom:var(--spacing-lg)}.left-0{left:calc(var(--spacing) * 0)}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.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-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-lg{margin-top:var(--spacing-lg)}.mt-md{margin-top:var(--spacing-md)}.mt-xs{margin-top:var(--spacing-xs)}.mr-lg{margin-right:var(--spacing-lg)}.mr-sm{margin-right:var(--spacing-sm)}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-lg{margin-bottom:var(--spacing-lg)}.mb-md{margin-bottom:var(--spacing-md)}.mb-sm{margin-bottom:var(--spacing-sm)}.mb-xs{margin-bottom:var(--spacing-xs)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-auto{margin-left:auto}.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}.table{display:table}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.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-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.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-11{width:calc(var(--spacing) * 11);height:calc(var(--spacing) * 11)}.size-12{width:calc(var(--spacing) * 12);height:calc(var(--spacing) * 12)}.size-14{width:calc(var(--spacing) * 14);height:calc(var(--spacing) * 14)}.size-16{width:calc(var(--spacing) * 16);height:calc(var(--spacing) * 16)}.size-20{width:calc(var(--spacing) * 20);height:calc(var(--spacing) * 20)}.size-full{width:100%;height:100%}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-4{height:calc(var(--spacing) * 4)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-20{height:calc(var(--spacing) * 20)}.h-64{height:calc(var(--spacing) * 64)}.h-96{height:calc(var(--spacing) * 96)}.h-full{height:100%}.h-screen{height:100vh}.min-h-screen{min-height:100vh}.w-7{width:calc(var(--spacing) * 7)}.w-10{width:calc(var(--spacing) * 10)}.w-11{width:calc(var(--spacing) * 11)}.w-16{width:calc(var(--spacing) * 16)}.w-40{width:calc(var(--spacing) * 40)}.w-48{width:calc(var(--spacing) * 48)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-96{width:calc(var(--spacing) * 96)}.w-\\[4px\\]{width:4px}.w-\\[8px\\]{width:8px}.w-\\[16px\\]{width:16px}.w-\\[24px\\]{width:24px}.w-\\[32px\\]{width:32px}.w-\\[48px\\]{width:48px}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.max-w-\\[24rem\\]{max-width:24rem}.max-w-\\[32rem\\]{max-width:32rem}.max-w-\\[42rem\\]{max-width:42rem}.max-w-\\[600px\\]{max-width:600px}.max-w-\\[var\\(--container-6xl\\)\\]{max-width:var(--container-6xl)}.max-w-\\[var\\(--container-md\\)\\]{max-width:var(--container-md)}.max-w-\\[var\\(--container-xl\\)\\]{max-width:var(--container-xl)}.max-w-\\[var\\(--container-xs\\)\\]{max-width:var(--container-xs)}.max-w-full{max-width:100%}.max-w-md{max-width:var(--spacing-md)}.max-w-screen{max-width:100vw}.max-w-sm{max-width:var(--spacing-sm)}.max-w-xl{max-width:var(--spacing-xl)}.max-w-xs{max-width:var(--spacing-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\\[10rem\\]{min-width:10rem}.min-w-\\[500px\\]{min-width:500px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.-rotate-90{rotate:-90deg}.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,)}.animate-dialog-in{animation:.2s ease-out dialog-in}.animate-floating-in{animation:.15s ease-out floating-in}.animate-slide-in{animation:.25s ease-out slide-in}.animate-spin{animation:var(--animate-spin)}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.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}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2xl{gap:var(--spacing-2xl)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-lg{gap:var(--spacing-lg)}.gap-md{gap:var(--spacing-md)}.gap-px{gap:1px}.gap-sm{gap:var(--spacing-sm)}.gap-xl{gap:var(--spacing-xl)}.gap-xs{gap:var(--spacing-xs)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border>:not(:last-child)){border-color:var(--color-border)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.\\!rounded-lg{border-radius:var(--radius-lg)!important}.\\!rounded-md{border-radius:var(--radius-md)!important}.\\!rounded-sm{border-radius:var(--radius-sm)!important}.rounded{border-radius:.25rem}.rounded-full{border-radius:var(--radius-full)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.\\!border{border-style:var(--tw-border-style)!important;border-width:1px!important}.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-dashed{--tw-border-style:dashed;border-style:dashed}.\\!border-border{border-color:var(--color-border)!important}.\\!border-epfl-canard{border-color:var(--color-epfl-canard)!important}.\\!border-error{border-color:var(--color-error)!important}.\\!border-primary{border-color:var(--color-primary)!important}.border-border{border-color:var(--color-border)}.border-border-strong{border-color:var(--color-border-strong)}.border-error,.border-error\\/30{border-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.border-error\\/30{border-color:color-mix(in oklab,var(--color-error) 30%,transparent)}}.border-info\\/30{border-color:var(--color-info)}@supports (color:color-mix(in lab,red,red)){.border-info\\/30{border-color:color-mix(in oklab,var(--color-info) 30%,transparent)}}.border-primary{border-color:var(--color-primary)}.border-success\\/30{border-color:var(--color-success)}@supports (color:color-mix(in lab,red,red)){.border-success\\/30{border-color:color-mix(in oklab,var(--color-success) 30%,transparent)}}.border-transparent{border-color:#0000}.border-warning\\/30{border-color:var(--color-warning)}@supports (color:color-mix(in lab,red,red)){.border-warning\\/30{border-color:color-mix(in oklab,var(--color-warning) 30%,transparent)}}.\\!bg-bg-tertiary{background-color:var(--color-bg-tertiary)!important}.\\!bg-epfl-canard{background-color:var(--color-epfl-canard)!important}.\\!bg-primary{background-color:var(--color-primary)!important}.bg-bg-primary{background-color:var(--color-bg-primary)}.bg-bg-secondary{background-color:var(--color-bg-secondary)}.bg-bg-tertiary,.bg-bg-tertiary\\/50{background-color:var(--color-bg-tertiary)}@supports (color:color-mix(in lab,red,red)){.bg-bg-tertiary\\/50{background-color:color-mix(in oklab,var(--color-bg-tertiary) 50%,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-border{background-color:var(--color-border)}.bg-border-strong{background-color:var(--color-border-strong)}.bg-epfl-canard{background-color:var(--color-epfl-canard)}.bg-epfl-canard-dark{background-color:var(--color-epfl-canard-dark)}.bg-epfl-leman{background-color:var(--color-epfl-leman)}.bg-epfl-red{background-color:var(--color-epfl-red)}.bg-epfl-red-dark{background-color:var(--color-epfl-red-dark)}.bg-error{background-color:var(--color-error)}.bg-error-bg{background-color:var(--color-error-bg)}.bg-info{background-color:var(--color-info)}.bg-info-bg{background-color:var(--color-info-bg)}.bg-primary,.bg-primary\\/5{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/5{background-color:color-mix(in oklab,var(--color-primary) 5%,transparent)}}.bg-primary\\/8{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/8{background-color:color-mix(in oklab,var(--color-primary) 8%,transparent)}}.bg-primary\\/10{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/10{background-color:color-mix(in oklab,var(--color-primary) 10%,transparent)}}.bg-success{background-color:var(--color-success)}.bg-success-bg{background-color:var(--color-success-bg)}.bg-text-muted{background-color:var(--color-text-muted)}.bg-text-primary{background-color:var(--color-text-primary)}.bg-warning{background-color:var(--color-warning)}.bg-warning-bg{background-color:var(--color-warning-bg)}.object-cover{object-fit:cover}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:calc(var(--spacing) * 1)}.p-2{padding:calc(var(--spacing) * 2)}.p-2xl{padding:var(--spacing-2xl)}.p-16{padding:calc(var(--spacing) * 16)}.p-lg{padding:var(--spacing-lg)}.p-md{padding:var(--spacing-md)}.p-sm{padding:var(--spacing-sm)}.p-xl{padding:var(--spacing-xl)}.p-xs{padding:var(--spacing-xs)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-lg{padding-inline:var(--spacing-lg)}.px-md{padding-inline:var(--spacing-md)}.px-sm{padding-inline:var(--spacing-sm)}.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-2xl{padding-block:var(--spacing-2xl)}.py-lg{padding-block:var(--spacing-lg)}.py-md{padding-block:var(--spacing-md)}.py-sm{padding-block:var(--spacing-sm)}.py-xl{padding-block:var(--spacing-xl)}.py-xs{padding-block:var(--spacing-xs)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-14{padding-top:calc(var(--spacing) * 14)}.pt-xl{padding-top:var(--spacing-xl)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pr-11{padding-right:calc(var(--spacing) * 11)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-10{padding-left:calc(var(--spacing) * 10)}.pl-11{padding-left:calc(var(--spacing) * 11)}.pl-14{padding-left:calc(var(--spacing) * 14)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-body{font-size:var(--text-body);line-height:var(--tw-leading,var(--text-body--line-height))}.text-caption{font-size:var(--text-caption);line-height:var(--tw-leading,var(--text-caption--line-height))}.text-h1{font-size:var(--text-h1);line-height:var(--tw-leading,var(--text-h1--line-height))}.text-h2{font-size:var(--text-h2);line-height:var(--tw-leading,var(--text-h2--line-height))}.text-h3{font-size:var(--text-h3);line-height:var(--tw-leading,var(--text-h3--line-height))}.text-small{font-size:var(--text-small);line-height:var(--tw-leading,var(--text-small--line-height))}.leading-\\[1\\.2\\]{--tw-leading:1.2;line-height:1.2}.leading-\\[1\\.3\\]{--tw-leading:1.3;line-height:1.3}.leading-\\[1\\.4\\]{--tw-leading:1.4;line-height:1.4}.leading-\\[1\\.5\\]{--tw-leading:1.5;line-height:1.5}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.whitespace-nowrap{white-space:nowrap}.\\!text-white{color:var(--color-white)!important}.text-bg-primary{color:var(--color-bg-primary)}.text-epfl-canard{color:var(--color-epfl-canard)}.text-epfl-leman{color:var(--color-epfl-leman)}.text-epfl-red{color:var(--color-epfl-red)}.text-error{color:var(--color-error)}.text-info{color:var(--color-info)}.text-primary{color:var(--color-primary)}.text-success{color:var(--color-success)}.text-text-muted{color:var(--color-text-muted)}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary{color:var(--color-text-secondary)}.text-warning{color:var(--color-warning)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.decoration-dotted{text-decoration-style:dotted}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-100{opacity:1}.\\!shadow-lg{--tw-shadow:0 4px 16px var(--tw-shadow-color,#0000001a)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.\\!shadow-sm{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000000f)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.shadow-lg{--tw-shadow:0 4px 16px 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 2px 8px var(--tw-shadow-color,#00000014);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 2px var(--tw-shadow-color,#0000000f);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 8px 32px 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)}.\\!ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.\\!ring-epfl-canard{--tw-ring-color:var(--color-epfl-canard)!important}.\\!ring-primary{--tw-ring-color:var(--color-primary)!important}.transition-\\[width\\]{transition-property:width;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))}.transition-none{transition-property:none}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.peer-checked\\:bg-primary:is(:where(.peer):checked~*){background-color:var(--color-primary)}.peer-focus-visible\\:ring-2:is(:where(.peer):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)}.peer-focus-visible\\:ring-primary:is(:where(.peer):focus-visible~*){--tw-ring-color:var(--color-primary)}.peer-focus-visible\\:ring-offset-2:is(:where(.peer):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)}.peer-focus-visible\\:ring-offset-bg-primary:is(:where(.peer):focus-visible~*){--tw-ring-offset-color:var(--color-bg-primary)}.peer-disabled\\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.placeholder\\:text-text-muted::placeholder{color:var(--color-text-muted)}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:top-0\\.5:after{content:var(--tw-content);top:calc(var(--spacing) * .5)}.after\\:left-0\\.5:after{content:var(--tw-content);left:calc(var(--spacing) * .5)}.after\\:size-5:after{content:var(--tw-content);width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.after\\:rounded-full:after{content:var(--tw-content);border-radius:var(--radius-full)}.after\\:bg-white:after{content:var(--tw-content);background-color:var(--color-white)}.after\\:shadow-sm:after{content:var(--tw-content);--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000000f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.after\\:transition-transform:after{content:var(--tw-content);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))}.after\\:content-\\[\\'\\'\\]:after{--tw-content:"";content:var(--tw-content)}.peer-checked\\:after\\:translate-x-5:is(:where(.peer):checked~*):after{content:var(--tw-content);--tw-translate-x:calc(var(--spacing) * 5);translate:var(--tw-translate-x) var(--tw-translate-y)}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.checked\\:border-\\[5px\\]:checked{border-style:var(--tw-border-style);border-width:5px}.checked\\:border-primary:checked{border-color:var(--color-primary)}.checked\\:bg-primary:checked{background-color:var(--color-primary)}.checked\\:bg-\\[url\\(\\'data\\:image\\/svg\\+xml\\,\\%3Csvg\\%20viewBox\\%3D\\%220\\%200\\%2016\\%2016\\%22\\%20fill\\%3D\\%22white\\%22\\%20xmlns\\%3D\\%22http\\%3A\\%2F\\%2Fwww\\.w3\\.org\\%2F2000\\%2Fsvg\\%22\\%3E\\%3Cpath\\%20d\\%3D\\%22M12\\.207\\%204\\.793a1\\%201\\%200\\%20010\\%201\\.414l-5\\%205a1\\%201\\%200\\%2001-1\\.414\\%200l-2-2a1\\%201\\%200\\%20011\\.414-1\\.414L6\\.5\\%209\\.086l4\\.293-4\\.293a1\\%201\\%200\\%20011\\.414\\%200z\\%22\\%2F\\%3E\\%3C\\%2Fsvg\\%3E\\'\\)\\]:checked{background-image:url(data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22white%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12.207%204.793a1%201%200%20010%201.414l-5%205a1%201%200%2001-1.414%200l-2-2a1%201%200%20011.414-1.414L6.5%209.086l4.293-4.293a1%201%200%20011.414%200z%22%2F%3E%3C%2Fsvg%3E)}.checked\\:bg-center:checked{background-position:50%}.checked\\:bg-no-repeat:checked{background-repeat:no-repeat}.indeterminate\\:border-primary:indeterminate{border-color:var(--color-primary)}.indeterminate\\:bg-primary:indeterminate{background-color:var(--color-primary)}.indeterminate\\:bg-\\[url\\(\\'data\\:image\\/svg\\+xml\\,\\%3Csvg\\%20viewBox\\%3D\\%220\\%200\\%2016\\%2016\\%22\\%20fill\\%3D\\%22white\\%22\\%20xmlns\\%3D\\%22http\\%3A\\%2F\\%2Fwww\\.w3\\.org\\%2F2000\\%2Fsvg\\%22\\%3E\\%3Crect\\%20x\\%3D\\%223\\%22\\%20y\\%3D\\%227\\%22\\%20width\\%3D\\%2210\\%22\\%20height\\%3D\\%222\\%22\\%20rx\\%3D\\%221\\%22\\%2F\\%3E\\%3C\\%2Fsvg\\%3E\\'\\)\\]:indeterminate{background-image:url(data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22white%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20x%3D%223%22%20y%3D%227%22%20width%3D%2210%22%20height%3D%222%22%20rx%3D%221%22%2F%3E%3C%2Fsvg%3E)}.indeterminate\\:bg-center:indeterminate{background-position:50%}.indeterminate\\:bg-no-repeat:indeterminate{background-repeat:no-repeat}@media(hover:hover){.hover\\:border-border-strong:hover{border-color:var(--color-border-strong)}.hover\\:border-error:hover{border-color:var(--color-error)}.hover\\:border-primary:hover{border-color:var(--color-primary)}.hover\\:bg-bg-tertiary:hover,.hover\\:bg-bg-tertiary\\/70:hover{background-color:var(--color-bg-tertiary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-bg-tertiary\\/70:hover{background-color:color-mix(in oklab,var(--color-bg-tertiary) 70%,transparent)}}.hover\\:bg-error-bg:hover{background-color:var(--color-error-bg)}.hover\\:bg-error\\/80:hover{background-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-error\\/80:hover{background-color:color-mix(in oklab,var(--color-error) 80%,transparent)}}.hover\\:bg-primary-hover:hover{background-color:var(--color-primary-hover)}.hover\\:text-text-primary:hover{color:var(--color-text-primary)}.hover\\:text-text-secondary:hover{color:var(--color-text-secondary)}.hover\\:opacity-90:hover{opacity:.9}}.focus\\:border-error:focus{border-color:var(--color-error)}.focus\\:border-primary:focus{border-color:var(--color-primary)}.focus\\:bg-bg-tertiary:focus{background-color:var(--color-bg-tertiary)}.focus\\:bg-error-bg:focus{background-color:var(--color-error-bg)}.focus\\:ring-1:focus{--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\\:ring-error:focus{--tw-ring-color:var(--color-error)}.focus\\:ring-primary:focus{--tw-ring-color:var(--color-primary)}.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-error:focus-visible{--tw-ring-color:var(--color-error)}.focus-visible\\:ring-primary:focus-visible{--tw-ring-color:var(--color-primary)}.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-bg-primary:focus-visible{--tw-ring-offset-color:var(--color-bg-primary)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-bg-secondary:disabled{background-color:var(--color-bg-secondary)}.disabled\\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\\:col-span-2{grid-column:span 2/span 2}.sm\\:w-1\\/3{width:33.3333%}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\\:flex-row{flex-direction:row}.sm\\:gap-lg{gap:var(--spacing-lg)}}@media(min-width:48rem){.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(min-width:64rem){.lg\\:flex{display:flex}.lg\\:hidden{display:none}.lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\\:px-lg{padding-inline:var(--spacing-lg)}}.\\[\\&\\>svg\\]\\:size-4>svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\\[\\&\\>svg\\]\\:size-5>svg{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}}:root{--bg-primary:#fff;--bg-secondary:#f5f5f5;--bg-tertiary:#e6e6e6;--border-default:#d5d5d5;--border-strong:#c1c1c1;--text-primary:#212121;--text-secondary:#707070;--text-muted:#8e8e8e;--semantic-success:#1b874b;--semantic-success-bg:#e8f5e9;--semantic-warning:#d4860a;--semantic-warning-bg:#fff3e0;--semantic-error:#d32f2f;--semantic-error-bg:#ffebee;--semantic-info:#1976d2;--semantic-info-bg:#e3f2fd;--action-primary:#007480;--action-primary-hover:#004248}.dark{--bg-primary:#1a1a1a;--bg-secondary:#242424;--bg-tertiary:#2e2e2e;--border-default:#3a3a3a;--border-strong:#505050;--text-primary:#f0f0f0;--text-secondary:#a0a0a0;--text-muted:#707070;--semantic-success:#34d37a;--semantic-success-bg:#1a2e1a;--semantic-warning:#ffad33;--semantic-warning-bg:#2e2410;--semantic-error:#ff6b6b;--semantic-error-bg:#2e1515;--semantic-info:#64b5f6;--semantic-info-bg:#152538;--action-primary:#009ba6;--action-primary-hover:#007480;--shadow-sm:0 1px 2px #0000004d;--shadow-md:0 2px 8px #0006;--shadow-lg:0 4px 16px #00000080;--shadow-xl:0 8px 32px #0009}@keyframes slide-in{0%{opacity:0;transform:translate(1rem)}to{opacity:1;transform:translate(0)}}@keyframes dialog-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes floating-in{0%{opacity:0}to{opacity:1}}body{font-family:var(--font-sans);font-size:var(--text-body);line-height:var(--text-body--line-height);color:var(--color-text-primary);background-color:var(--color-bg-primary);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}`)),document.head.appendChild(r)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
-
import { jsx as e, jsxs as m, Fragment as V } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-md:28rem;--container-xl:36rem;--container-6xl:72rem;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--radius-sm:4px;--radius-md:8px;--radius-lg:12px;--shadow-sm:0 1px 2px #0000000f;--shadow-md:0 2px 8px #00000014;--shadow-lg:0 4px 16px #0000001a;--shadow-xl:0 8px 32px #0000001f;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-epfl-red:red;--color-epfl-red-dark:#b51f1f;--color-epfl-leman:#00a79f;--color-epfl-canard:#007480;--color-epfl-canard-dark:#004248;--color-primary:var(--action-primary);--color-primary-hover:var(--action-primary-hover);--color-bg-primary:var(--bg-primary);--color-bg-secondary:var(--bg-secondary);--color-bg-tertiary:var(--bg-tertiary);--color-border:var(--border-default);--color-border-strong:var(--border-strong);--color-text-primary:var(--text-primary);--color-text-secondary:var(--text-secondary);--color-text-muted:var(--text-muted);--color-success:var(--semantic-success);--color-success-bg:var(--semantic-success-bg);--color-warning:var(--semantic-warning);--color-warning-bg:var(--semantic-warning-bg);--color-error:var(--semantic-error);--color-error-bg:var(--semantic-error-bg);--color-info:var(--semantic-info);--color-info-bg:var(--semantic-info-bg);--radius-full:9999px;--spacing-xs:4px;--spacing-sm:8px;--spacing-md:16px;--spacing-lg:24px;--spacing-xl:32px;--spacing-2xl:48px;--text-h1:2rem;--text-h1--line-height:1.2;--text-h2:1.5rem;--text-h2--line-height:1.3;--text-h3:1.25rem;--text-h3--line-height:1.4;--text-body:.9375rem;--text-body--line-height:1.5;--text-small:.8125rem;--text-small--line-height:1.5;--text-caption:.75rem;--text-caption--line-height:1.4}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.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-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.right-0{right:calc(var(--spacing) * 0)}.right-lg{right:var(--spacing-lg)}.bottom-lg{bottom:var(--spacing-lg)}.left-0{left:calc(var(--spacing) * 0)}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-lg{margin-top:var(--spacing-lg)}.mt-md{margin-top:var(--spacing-md)}.mt-xs{margin-top:var(--spacing-xs)}.mr-lg{margin-right:var(--spacing-lg)}.mr-sm{margin-right:var(--spacing-sm)}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-lg{margin-bottom:var(--spacing-lg)}.mb-md{margin-bottom:var(--spacing-md)}.mb-sm{margin-bottom:var(--spacing-sm)}.mb-xs{margin-bottom:var(--spacing-xs)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-auto{margin-left:auto}.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}.table{display:table}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.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-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.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-11{width:calc(var(--spacing) * 11);height:calc(var(--spacing) * 11)}.size-12{width:calc(var(--spacing) * 12);height:calc(var(--spacing) * 12)}.size-14{width:calc(var(--spacing) * 14);height:calc(var(--spacing) * 14)}.size-16{width:calc(var(--spacing) * 16);height:calc(var(--spacing) * 16)}.size-20{width:calc(var(--spacing) * 20);height:calc(var(--spacing) * 20)}.size-full{width:100%;height:100%}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-4{height:calc(var(--spacing) * 4)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-20{height:calc(var(--spacing) * 20)}.h-64{height:calc(var(--spacing) * 64)}.h-96{height:calc(var(--spacing) * 96)}.h-full{height:100%}.h-screen{height:100vh}.min-h-screen{min-height:100vh}.w-7{width:calc(var(--spacing) * 7)}.w-10{width:calc(var(--spacing) * 10)}.w-11{width:calc(var(--spacing) * 11)}.w-16{width:calc(var(--spacing) * 16)}.w-40{width:calc(var(--spacing) * 40)}.w-48{width:calc(var(--spacing) * 48)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-96{width:calc(var(--spacing) * 96)}.w-\\[4px\\]{width:4px}.w-\\[8px\\]{width:8px}.w-\\[16px\\]{width:16px}.w-\\[24px\\]{width:24px}.w-\\[32px\\]{width:32px}.w-\\[48px\\]{width:48px}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.max-w-\\[24rem\\]{max-width:24rem}.max-w-\\[32rem\\]{max-width:32rem}.max-w-\\[42rem\\]{max-width:42rem}.max-w-\\[600px\\]{max-width:600px}.max-w-\\[var\\(--container-6xl\\)\\]{max-width:var(--container-6xl)}.max-w-\\[var\\(--container-md\\)\\]{max-width:var(--container-md)}.max-w-\\[var\\(--container-xl\\)\\]{max-width:var(--container-xl)}.max-w-\\[var\\(--container-xs\\)\\]{max-width:var(--container-xs)}.max-w-full{max-width:100%}.max-w-md{max-width:var(--spacing-md)}.max-w-screen{max-width:100vw}.max-w-sm{max-width:var(--spacing-sm)}.max-w-xl{max-width:var(--spacing-xl)}.max-w-xs{max-width:var(--spacing-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\\[10rem\\]{min-width:10rem}.min-w-\\[500px\\]{min-width:500px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.-rotate-90{rotate:-90deg}.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,)}.animate-dialog-in{animation:.2s ease-out dialog-in}.animate-floating-in{animation:.15s ease-out floating-in}.animate-slide-in{animation:.25s ease-out slide-in}.animate-spin{animation:var(--animate-spin)}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.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}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2xl{gap:var(--spacing-2xl)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-lg{gap:var(--spacing-lg)}.gap-md{gap:var(--spacing-md)}.gap-px{gap:1px}.gap-sm{gap:var(--spacing-sm)}.gap-xl{gap:var(--spacing-xl)}.gap-xs{gap:var(--spacing-xs)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border>:not(:last-child)){border-color:var(--color-border)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.\\!rounded-lg{border-radius:var(--radius-lg)!important}.\\!rounded-md{border-radius:var(--radius-md)!important}.\\!rounded-sm{border-radius:var(--radius-sm)!important}.rounded{border-radius:.25rem}.rounded-full{border-radius:var(--radius-full)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.\\!border{border-style:var(--tw-border-style)!important;border-width:1px!important}.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-dashed{--tw-border-style:dashed;border-style:dashed}.\\!border-border{border-color:var(--color-border)!important}.\\!border-epfl-canard{border-color:var(--color-epfl-canard)!important}.\\!border-error{border-color:var(--color-error)!important}.\\!border-primary{border-color:var(--color-primary)!important}.border-border{border-color:var(--color-border)}.border-border-strong{border-color:var(--color-border-strong)}.border-error,.border-error\\/30{border-color:var(--color-error)}@supports (color:color-mix(in lab, red, red)){.border-error\\/30{border-color:color-mix(in oklab, var(--color-error) 30%, transparent)}}.border-info\\/30{border-color:var(--color-info)}@supports (color:color-mix(in lab, red, red)){.border-info\\/30{border-color:color-mix(in oklab, var(--color-info) 30%, transparent)}}.border-primary{border-color:var(--color-primary)}.border-success\\/30{border-color:var(--color-success)}@supports (color:color-mix(in lab, red, red)){.border-success\\/30{border-color:color-mix(in oklab, var(--color-success) 30%, transparent)}}.border-transparent{border-color:#0000}.border-warning\\/30{border-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\\/30{border-color:color-mix(in oklab, var(--color-warning) 30%, transparent)}}.\\!bg-bg-tertiary{background-color:var(--color-bg-tertiary)!important}.\\!bg-epfl-canard{background-color:var(--color-epfl-canard)!important}.\\!bg-primary{background-color:var(--color-primary)!important}.bg-bg-primary{background-color:var(--color-bg-primary)}.bg-bg-secondary{background-color:var(--color-bg-secondary)}.bg-bg-tertiary,.bg-bg-tertiary\\/50{background-color:var(--color-bg-tertiary)}@supports (color:color-mix(in lab, red, red)){.bg-bg-tertiary\\/50{background-color:color-mix(in oklab, var(--color-bg-tertiary) 50%, 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-border{background-color:var(--color-border)}.bg-border-strong{background-color:var(--color-border-strong)}.bg-epfl-canard{background-color:var(--color-epfl-canard)}.bg-epfl-canard-dark{background-color:var(--color-epfl-canard-dark)}.bg-epfl-leman{background-color:var(--color-epfl-leman)}.bg-epfl-red{background-color:var(--color-epfl-red)}.bg-epfl-red-dark{background-color:var(--color-epfl-red-dark)}.bg-error{background-color:var(--color-error)}.bg-error-bg{background-color:var(--color-error-bg)}.bg-info{background-color:var(--color-info)}.bg-info-bg{background-color:var(--color-info-bg)}.bg-primary,.bg-primary\\/5{background-color:var(--color-primary)}@supports (color:color-mix(in lab, red, red)){.bg-primary\\/5{background-color:color-mix(in oklab, var(--color-primary) 5%, transparent)}}.bg-primary\\/8{background-color:var(--color-primary)}@supports (color:color-mix(in lab, red, red)){.bg-primary\\/8{background-color:color-mix(in oklab, var(--color-primary) 8%, transparent)}}.bg-primary\\/10{background-color:var(--color-primary)}@supports (color:color-mix(in lab, red, red)){.bg-primary\\/10{background-color:color-mix(in oklab, var(--color-primary) 10%, transparent)}}.bg-success{background-color:var(--color-success)}.bg-success-bg{background-color:var(--color-success-bg)}.bg-text-muted{background-color:var(--color-text-muted)}.bg-text-primary{background-color:var(--color-text-primary)}.bg-warning{background-color:var(--color-warning)}.bg-warning-bg{background-color:var(--color-warning-bg)}.object-cover{object-fit:cover}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:calc(var(--spacing) * 1)}.p-2{padding:calc(var(--spacing) * 2)}.p-2xl{padding:var(--spacing-2xl)}.p-16{padding:calc(var(--spacing) * 16)}.p-lg{padding:var(--spacing-lg)}.p-md{padding:var(--spacing-md)}.p-sm{padding:var(--spacing-sm)}.p-xl{padding:var(--spacing-xl)}.p-xs{padding:var(--spacing-xs)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-lg{padding-inline:var(--spacing-lg)}.px-md{padding-inline:var(--spacing-md)}.px-sm{padding-inline:var(--spacing-sm)}.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-2xl{padding-block:var(--spacing-2xl)}.py-lg{padding-block:var(--spacing-lg)}.py-md{padding-block:var(--spacing-md)}.py-sm{padding-block:var(--spacing-sm)}.py-xl{padding-block:var(--spacing-xl)}.py-xs{padding-block:var(--spacing-xs)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-14{padding-top:calc(var(--spacing) * 14)}.pt-xl{padding-top:var(--spacing-xl)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pr-11{padding-right:calc(var(--spacing) * 11)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-10{padding-left:calc(var(--spacing) * 10)}.pl-11{padding-left:calc(var(--spacing) * 11)}.pl-14{padding-left:calc(var(--spacing) * 14)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-body{font-size:var(--text-body);line-height:var(--tw-leading,var(--text-body--line-height))}.text-caption{font-size:var(--text-caption);line-height:var(--tw-leading,var(--text-caption--line-height))}.text-h1{font-size:var(--text-h1);line-height:var(--tw-leading,var(--text-h1--line-height))}.text-h2{font-size:var(--text-h2);line-height:var(--tw-leading,var(--text-h2--line-height))}.text-h3{font-size:var(--text-h3);line-height:var(--tw-leading,var(--text-h3--line-height))}.text-small{font-size:var(--text-small);line-height:var(--tw-leading,var(--text-small--line-height))}.leading-\\[1\\.2\\]{--tw-leading:1.2;line-height:1.2}.leading-\\[1\\.3\\]{--tw-leading:1.3;line-height:1.3}.leading-\\[1\\.4\\]{--tw-leading:1.4;line-height:1.4}.leading-\\[1\\.5\\]{--tw-leading:1.5;line-height:1.5}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.whitespace-nowrap{white-space:nowrap}.\\!text-white{color:var(--color-white)!important}.text-bg-primary{color:var(--color-bg-primary)}.text-epfl-canard{color:var(--color-epfl-canard)}.text-epfl-leman{color:var(--color-epfl-leman)}.text-epfl-red{color:var(--color-epfl-red)}.text-error{color:var(--color-error)}.text-info{color:var(--color-info)}.text-primary{color:var(--color-primary)}.text-success{color:var(--color-success)}.text-text-muted{color:var(--color-text-muted)}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary{color:var(--color-text-secondary)}.text-warning{color:var(--color-warning)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.decoration-dotted{text-decoration-style:dotted}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-100{opacity:1}.\\!shadow-lg{--tw-shadow:0 4px 16px var(--tw-shadow-color,#0000001a)!important;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)!important}.\\!shadow-sm{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000000f)!important;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)!important}.shadow-lg{--tw-shadow:0 4px 16px 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 2px 8px var(--tw-shadow-color,#00000014);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 2px var(--tw-shadow-color,#0000000f);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 8px 32px 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)}.\\!ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor)!important;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)!important}.\\!ring-epfl-canard{--tw-ring-color:var(--color-epfl-canard)!important}.\\!ring-primary{--tw-ring-color:var(--color-primary)!important}.transition-\\[width\\]{transition-property:width;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))}.transition-none{transition-property:none}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.peer-checked\\:bg-primary:is(:where(.peer):checked~*){background-color:var(--color-primary)}.peer-focus-visible\\:ring-2:is(:where(.peer):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)}.peer-focus-visible\\:ring-primary:is(:where(.peer):focus-visible~*){--tw-ring-color:var(--color-primary)}.peer-focus-visible\\:ring-offset-2:is(:where(.peer):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)}.peer-focus-visible\\:ring-offset-bg-primary:is(:where(.peer):focus-visible~*){--tw-ring-offset-color:var(--color-bg-primary)}.peer-disabled\\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.placeholder\\:text-text-muted::placeholder{color:var(--color-text-muted)}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:top-0\\.5:after{content:var(--tw-content);top:calc(var(--spacing) * .5)}.after\\:left-0\\.5:after{content:var(--tw-content);left:calc(var(--spacing) * .5)}.after\\:size-5:after{content:var(--tw-content);width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.after\\:rounded-full:after{content:var(--tw-content);border-radius:var(--radius-full)}.after\\:bg-white:after{content:var(--tw-content);background-color:var(--color-white)}.after\\:shadow-sm:after{content:var(--tw-content);--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000000f);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.after\\:transition-transform:after{content:var(--tw-content);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))}.after\\:content-\\[\\'\\'\\]:after{--tw-content:"";content:var(--tw-content)}.peer-checked\\:after\\:translate-x-5:is(:where(.peer):checked~*):after{content:var(--tw-content);--tw-translate-x:calc(var(--spacing) * 5);translate:var(--tw-translate-x) var(--tw-translate-y)}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.checked\\:border-\\[5px\\]:checked{border-style:var(--tw-border-style);border-width:5px}.checked\\:border-primary:checked{border-color:var(--color-primary)}.checked\\:bg-primary:checked{background-color:var(--color-primary)}.checked\\:bg-\\[url\\(\\'data\\:image\\/svg\\+xml\\,\\%3Csvg\\%20viewBox\\%3D\\%220\\%200\\%2016\\%2016\\%22\\%20fill\\%3D\\%22white\\%22\\%20xmlns\\%3D\\%22http\\%3A\\%2F\\%2Fwww\\.w3\\.org\\%2F2000\\%2Fsvg\\%22\\%3E\\%3Cpath\\%20d\\%3D\\%22M12\\.207\\%204\\.793a1\\%201\\%200\\%20010\\%201\\.414l-5\\%205a1\\%201\\%200\\%2001-1\\.414\\%200l-2-2a1\\%201\\%200\\%20011\\.414-1\\.414L6\\.5\\%209\\.086l4\\.293-4\\.293a1\\%201\\%200\\%20011\\.414\\%200z\\%22\\%2F\\%3E\\%3C\\%2Fsvg\\%3E\\'\\)\\]:checked{background-image:url(data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22white%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12.207%204.793a1%201%200%20010%201.414l-5%205a1%201%200%2001-1.414%200l-2-2a1%201%200%20011.414-1.414L6.5%209.086l4.293-4.293a1%201%200%20011.414%200z%22%2F%3E%3C%2Fsvg%3E)}.checked\\:bg-center:checked{background-position:50%}.checked\\:bg-no-repeat:checked{background-repeat:no-repeat}.indeterminate\\:border-primary:indeterminate{border-color:var(--color-primary)}.indeterminate\\:bg-primary:indeterminate{background-color:var(--color-primary)}.indeterminate\\:bg-\\[url\\(\\'data\\:image\\/svg\\+xml\\,\\%3Csvg\\%20viewBox\\%3D\\%220\\%200\\%2016\\%2016\\%22\\%20fill\\%3D\\%22white\\%22\\%20xmlns\\%3D\\%22http\\%3A\\%2F\\%2Fwww\\.w3\\.org\\%2F2000\\%2Fsvg\\%22\\%3E\\%3Crect\\%20x\\%3D\\%223\\%22\\%20y\\%3D\\%227\\%22\\%20width\\%3D\\%2210\\%22\\%20height\\%3D\\%222\\%22\\%20rx\\%3D\\%221\\%22\\%2F\\%3E\\%3C\\%2Fsvg\\%3E\\'\\)\\]:indeterminate{background-image:url(data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22white%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20x%3D%223%22%20y%3D%227%22%20width%3D%2210%22%20height%3D%222%22%20rx%3D%221%22%2F%3E%3C%2Fsvg%3E)}.indeterminate\\:bg-center:indeterminate{background-position:50%}.indeterminate\\:bg-no-repeat:indeterminate{background-repeat:no-repeat}@media (hover:hover){.hover\\:border-border-strong:hover{border-color:var(--color-border-strong)}.hover\\:border-error:hover{border-color:var(--color-error)}.hover\\:border-primary:hover{border-color:var(--color-primary)}.hover\\:bg-bg-tertiary:hover,.hover\\:bg-bg-tertiary\\/70:hover{background-color:var(--color-bg-tertiary)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-bg-tertiary\\/70:hover{background-color:color-mix(in oklab, var(--color-bg-tertiary) 70%, transparent)}}.hover\\:bg-error-bg:hover{background-color:var(--color-error-bg)}.hover\\:bg-error\\/80:hover{background-color:var(--color-error)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-error\\/80:hover{background-color:color-mix(in oklab, var(--color-error) 80%, transparent)}}.hover\\:bg-primary-hover:hover{background-color:var(--color-primary-hover)}.hover\\:text-text-primary:hover{color:var(--color-text-primary)}.hover\\:text-text-secondary:hover{color:var(--color-text-secondary)}.hover\\:opacity-90:hover{opacity:.9}}.focus\\:border-error:focus{border-color:var(--color-error)}.focus\\:border-primary:focus{border-color:var(--color-primary)}.focus\\:bg-bg-tertiary:focus{background-color:var(--color-bg-tertiary)}.focus\\:bg-error-bg:focus{background-color:var(--color-error-bg)}.focus\\:ring-1:focus{--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\\:ring-error:focus{--tw-ring-color:var(--color-error)}.focus\\:ring-primary:focus{--tw-ring-color:var(--color-primary)}.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-error:focus-visible{--tw-ring-color:var(--color-error)}.focus-visible\\:ring-primary:focus-visible{--tw-ring-color:var(--color-primary)}.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-bg-primary:focus-visible{--tw-ring-offset-color:var(--color-bg-primary)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-bg-secondary:disabled{background-color:var(--color-bg-secondary)}.disabled\\:opacity-50:disabled{opacity:.5}@media (width>=40rem){.sm\\:col-span-2{grid-column:span 2/span 2}.sm\\:w-1\\/3{width:33.3333%}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\\:flex-row{flex-direction:row}.sm\\:gap-lg{gap:var(--spacing-lg)}}@media (width>=48rem){.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width>=64rem){.lg\\:flex{display:flex}.lg\\:hidden{display:none}.lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\\:px-lg{padding-inline:var(--spacing-lg)}}.\\[\\&\\>svg\\]\\:size-4>svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\\[\\&\\>svg\\]\\:size-5>svg{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}}:root{--bg-primary:#fff;--bg-secondary:#f5f5f5;--bg-tertiary:#e6e6e6;--border-default:#d5d5d5;--border-strong:#c1c1c1;--text-primary:#212121;--text-secondary:#707070;--text-muted:#8e8e8e;--semantic-success:#1b874b;--semantic-success-bg:#e8f5e9;--semantic-warning:#d4860a;--semantic-warning-bg:#fff3e0;--semantic-error:#d32f2f;--semantic-error-bg:#ffebee;--semantic-info:#1976d2;--semantic-info-bg:#e3f2fd;--action-primary:#007480;--action-primary-hover:#004248}.dark{--bg-primary:#1a1a1a;--bg-secondary:#242424;--bg-tertiary:#2e2e2e;--border-default:#3a3a3a;--border-strong:#505050;--text-primary:#f0f0f0;--text-secondary:#a0a0a0;--text-muted:#707070;--semantic-success:#34d37a;--semantic-success-bg:#1a2e1a;--semantic-warning:#ffad33;--semantic-warning-bg:#2e2410;--semantic-error:#ff6b6b;--semantic-error-bg:#2e1515;--semantic-info:#64b5f6;--semantic-info-bg:#152538;--action-primary:#009ba6;--action-primary-hover:#007480;--shadow-sm:0 1px 2px #0000004d;--shadow-md:0 2px 8px #0006;--shadow-lg:0 4px 16px #00000080;--shadow-xl:0 8px 32px #0009}@keyframes slide-in{0%{opacity:0;transform:translate(1rem)}to{opacity:1;transform:translate(0)}}@keyframes dialog-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes floating-in{0%{opacity:0}to{opacity:1}}body{font-family:var(--font-sans);font-size:var(--text-body);line-height:var(--text-body--line-height);color:var(--color-text-primary);background-color:var(--color-bg-primary);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}
|
|
3
|
+
/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();import { createContext as e, forwardRef as t, useCallback as n, useContext as r, useEffect as i, useId as a, useMemo as o, useRef as s, useState as c, useSyncExternalStore as l } from "react";
|
|
4
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
5
|
+
import { CheckCircleFill as p, ChevronDown as m, CloudArrowUp as h, ExclamationTriangleFill as g, InfoCircleFill as _, List as v, MoonFill as y, SortAlphaDown as b, SortAlphaDownAlt as x, SortDown as S, SortNumericDown as C, SortNumericDownAlt as w, SunFill as T, X as E, XCircleFill as D, XLg as O } from "react-bootstrap-icons";
|
|
6
|
+
import k from "react-select";
|
|
7
|
+
import { FloatingFocusManager as A, FloatingPortal as j, arrow as ee, autoUpdate as M, flip as N, offset as P, shift as F, useClick as te, useDismiss as I, useFloating as L, useFocus as ne, useHover as re, useInteractions as R, useListNavigation as ie, useRole as z } from "@floating-ui/react";
|
|
8
|
+
import { useTranslation as B } from "react-i18next";
|
|
9
|
+
import { createPortal as ae } from "react-dom";
|
|
10
|
+
//#region src/components/ui/Avatar.tsx
|
|
11
|
+
var oe = {
|
|
12
|
+
sm: "size-8 text-caption",
|
|
13
|
+
md: "size-10 text-small",
|
|
14
|
+
lg: "size-14 text-body"
|
|
13
15
|
};
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
function se(e) {
|
|
17
|
+
let t = e.trim().split(/\s+/);
|
|
18
|
+
return t.length === 0 ? "?" : t.length === 1 ? t[0][0].toUpperCase() : (t[0][0] + t[t.length - 1][0]).toUpperCase();
|
|
17
19
|
}
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children: Pe(r) })
|
|
41
|
-
}
|
|
42
|
-
);
|
|
20
|
+
function ce({ src: e, name: t, size: n = "md", alt: r, className: i = "", ...a }) {
|
|
21
|
+
let [o, s] = c(!1), l = !!e && !o;
|
|
22
|
+
return /* @__PURE__ */ d("span", {
|
|
23
|
+
role: "img",
|
|
24
|
+
"aria-label": r ?? t,
|
|
25
|
+
className: [
|
|
26
|
+
"inline-flex items-center justify-center rounded-full overflow-hidden",
|
|
27
|
+
"bg-primary text-white font-semibold select-none shrink-0",
|
|
28
|
+
oe[n],
|
|
29
|
+
i
|
|
30
|
+
].join(" "),
|
|
31
|
+
...a,
|
|
32
|
+
children: l ? /* @__PURE__ */ d("img", {
|
|
33
|
+
src: e,
|
|
34
|
+
alt: r ?? t,
|
|
35
|
+
className: "size-full object-cover",
|
|
36
|
+
onError: () => s(!0)
|
|
37
|
+
}) : /* @__PURE__ */ d("span", {
|
|
38
|
+
"aria-hidden": "true",
|
|
39
|
+
children: se(t)
|
|
40
|
+
})
|
|
41
|
+
});
|
|
43
42
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/components/ui/Badge.tsx
|
|
45
|
+
var le = {
|
|
46
|
+
default: "bg-bg-tertiary text-text-primary",
|
|
47
|
+
success: "bg-success-bg text-success",
|
|
48
|
+
warning: "bg-warning-bg text-warning",
|
|
49
|
+
error: "bg-error-bg text-error",
|
|
50
|
+
info: "bg-info-bg text-info"
|
|
51
|
+
}, ue = {
|
|
52
|
+
default: "bg-text-muted",
|
|
53
|
+
success: "bg-success",
|
|
54
|
+
warning: "bg-warning",
|
|
55
|
+
error: "bg-error",
|
|
56
|
+
info: "bg-info"
|
|
56
57
|
};
|
|
57
|
-
function
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
o
|
|
73
|
-
].join(" "),
|
|
74
|
-
...s,
|
|
75
|
-
children: n
|
|
76
|
-
}
|
|
77
|
-
);
|
|
58
|
+
function de({ color: e = "default", dot: t, className: n = "", children: r, ...i }) {
|
|
59
|
+
return t ? /* @__PURE__ */ d("span", {
|
|
60
|
+
role: "status",
|
|
61
|
+
className: `inline-block size-2.5 rounded-full ${ue[e]} ${n}`,
|
|
62
|
+
...i
|
|
63
|
+
}) : /* @__PURE__ */ d("span", {
|
|
64
|
+
className: [
|
|
65
|
+
"inline-flex items-center rounded-sm px-2 py-0.5",
|
|
66
|
+
"text-caption font-medium leading-none",
|
|
67
|
+
le[e],
|
|
68
|
+
n
|
|
69
|
+
].join(" "),
|
|
70
|
+
...i,
|
|
71
|
+
children: r
|
|
72
|
+
});
|
|
78
73
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region src/components/ui/Spinner.tsx
|
|
76
|
+
var fe = {
|
|
77
|
+
sm: "size-4",
|
|
78
|
+
md: "size-6",
|
|
79
|
+
lg: "size-8"
|
|
83
80
|
};
|
|
84
|
-
function
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
),
|
|
107
|
-
/* @__PURE__ */ e(
|
|
108
|
-
"path",
|
|
109
|
-
{
|
|
110
|
-
className: "opacity-75",
|
|
111
|
-
fill: "currentColor",
|
|
112
|
-
d: "M4 12a8 8 0 018-8v3a5 5 0 00-5 5H4z"
|
|
113
|
-
}
|
|
114
|
-
)
|
|
115
|
-
]
|
|
116
|
-
}
|
|
117
|
-
);
|
|
81
|
+
function V({ size: e = "md", className: t = "", ...n }) {
|
|
82
|
+
return /* @__PURE__ */ f("svg", {
|
|
83
|
+
viewBox: "0 0 24 24",
|
|
84
|
+
fill: "none",
|
|
85
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
86
|
+
className: `animate-spin ${fe[e]} ${t}`,
|
|
87
|
+
role: "status",
|
|
88
|
+
"aria-label": "Loading",
|
|
89
|
+
...n,
|
|
90
|
+
children: [/* @__PURE__ */ d("circle", {
|
|
91
|
+
className: "opacity-25",
|
|
92
|
+
cx: "12",
|
|
93
|
+
cy: "12",
|
|
94
|
+
r: "10",
|
|
95
|
+
stroke: "currentColor",
|
|
96
|
+
strokeWidth: "3"
|
|
97
|
+
}), /* @__PURE__ */ d("path", {
|
|
98
|
+
className: "opacity-75",
|
|
99
|
+
fill: "currentColor",
|
|
100
|
+
d: "M4 12a8 8 0 018-8v3a5 5 0 00-5 5H4z"
|
|
101
|
+
})]
|
|
102
|
+
});
|
|
118
103
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
"inline-flex items-center justify-center rounded-md",
|
|
192
|
-
"transition-colors duration-150 cursor-pointer",
|
|
193
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
194
|
-
// variant + size
|
|
195
|
-
Ue[r],
|
|
196
|
-
Ke[o],
|
|
197
|
-
// disabled / loading
|
|
198
|
-
l && "opacity-50 pointer-events-none",
|
|
199
|
-
a
|
|
200
|
-
].filter(Boolean).join(" "),
|
|
201
|
-
...c,
|
|
202
|
-
children: n ? /* @__PURE__ */ e(te, { size: "sm", "aria-hidden": "true" }) : i
|
|
203
|
-
}
|
|
204
|
-
);
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region src/components/ui/Button.tsx
|
|
106
|
+
var pe = {
|
|
107
|
+
primary: "bg-primary text-white hover:bg-primary-hover focus-visible:ring-primary",
|
|
108
|
+
secondary: "border border-border text-text-primary bg-bg-primary hover:bg-bg-tertiary focus-visible:ring-primary",
|
|
109
|
+
ghost: "text-text-primary hover:bg-bg-tertiary focus-visible:ring-primary",
|
|
110
|
+
danger: "bg-error text-white hover:opacity-90 focus-visible:ring-error"
|
|
111
|
+
}, me = {
|
|
112
|
+
sm: "text-small px-3 py-1 gap-1.5",
|
|
113
|
+
md: "text-body px-4 py-2 gap-2",
|
|
114
|
+
lg: "text-body px-5 py-2.5 gap-2"
|
|
115
|
+
}, he = {
|
|
116
|
+
sm: "sm",
|
|
117
|
+
md: "sm",
|
|
118
|
+
lg: "md"
|
|
119
|
+
}, ge = t(function({ variant: e = "primary", size: t = "md", loading: n = !1, disabled: r, iconLeft: i, iconRight: a, className: o = "", children: s, ...c }, l) {
|
|
120
|
+
let u = r || n;
|
|
121
|
+
return /* @__PURE__ */ f("button", {
|
|
122
|
+
ref: l,
|
|
123
|
+
type: "button",
|
|
124
|
+
disabled: u,
|
|
125
|
+
"aria-busy": n || void 0,
|
|
126
|
+
className: [
|
|
127
|
+
"inline-flex items-center justify-center font-medium rounded-md",
|
|
128
|
+
"transition-colors duration-150 cursor-pointer",
|
|
129
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
130
|
+
pe[e],
|
|
131
|
+
me[t],
|
|
132
|
+
u && "opacity-50 pointer-events-none",
|
|
133
|
+
o
|
|
134
|
+
].filter(Boolean).join(" "),
|
|
135
|
+
...c,
|
|
136
|
+
children: [
|
|
137
|
+
n ? /* @__PURE__ */ d(V, {
|
|
138
|
+
size: he[t],
|
|
139
|
+
"aria-hidden": "true"
|
|
140
|
+
}) : i,
|
|
141
|
+
s,
|
|
142
|
+
!n && a
|
|
143
|
+
]
|
|
144
|
+
});
|
|
145
|
+
}), _e = {
|
|
146
|
+
primary: "bg-primary text-white hover:bg-primary-hover focus-visible:ring-primary",
|
|
147
|
+
secondary: "border border-border text-text-primary bg-bg-primary hover:bg-bg-tertiary focus-visible:ring-primary",
|
|
148
|
+
ghost: "text-text-primary hover:bg-bg-tertiary focus-visible:ring-primary",
|
|
149
|
+
danger: "bg-error text-white hover:opacity-90 focus-visible:ring-error"
|
|
150
|
+
}, ve = {
|
|
151
|
+
sm: "size-7 text-small",
|
|
152
|
+
md: "size-9 text-body",
|
|
153
|
+
lg: "size-11 text-body"
|
|
154
|
+
}, H = t(function({ variant: e = "ghost", size: t = "md", loading: n = !1, disabled: r, icon: i, className: a = "", ...o }, s) {
|
|
155
|
+
let c = r || n;
|
|
156
|
+
return /* @__PURE__ */ d("button", {
|
|
157
|
+
ref: s,
|
|
158
|
+
type: "button",
|
|
159
|
+
disabled: c,
|
|
160
|
+
"aria-busy": n || void 0,
|
|
161
|
+
className: [
|
|
162
|
+
"inline-flex items-center justify-center rounded-md",
|
|
163
|
+
"transition-colors duration-150 cursor-pointer",
|
|
164
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
165
|
+
_e[e],
|
|
166
|
+
ve[t],
|
|
167
|
+
c && "opacity-50 pointer-events-none",
|
|
168
|
+
a
|
|
169
|
+
].filter(Boolean).join(" "),
|
|
170
|
+
...o,
|
|
171
|
+
children: n ? /* @__PURE__ */ d(V, {
|
|
172
|
+
size: "sm",
|
|
173
|
+
"aria-hidden": "true"
|
|
174
|
+
}) : i
|
|
175
|
+
});
|
|
205
176
|
});
|
|
206
|
-
|
|
207
|
-
|
|
177
|
+
//#endregion
|
|
178
|
+
//#region src/components/ui/FileUpload.tsx
|
|
179
|
+
function ye(e) {
|
|
180
|
+
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
208
181
|
}
|
|
209
|
-
function
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
children: [
|
|
316
|
-
/* @__PURE__ */ e("span", { className: "truncate flex-1", children: w.name }),
|
|
317
|
-
/* @__PURE__ */ e("span", { className: "shrink-0 text-text-secondary", children: qe(w.size) }),
|
|
318
|
-
/* @__PURE__ */ e(
|
|
319
|
-
"button",
|
|
320
|
-
{
|
|
321
|
-
type: "button",
|
|
322
|
-
onClick: (B) => {
|
|
323
|
-
B.stopPropagation(), O(S);
|
|
324
|
-
},
|
|
325
|
-
className: "shrink-0 p-0.5 rounded-sm text-text-secondary hover:text-text-primary hover:bg-bg-tertiary transition-colors cursor-pointer",
|
|
326
|
-
"aria-label": `Remove ${w.name}`,
|
|
327
|
-
children: /* @__PURE__ */ e(U, { size: 14 })
|
|
328
|
-
}
|
|
329
|
-
)
|
|
330
|
-
]
|
|
331
|
-
},
|
|
332
|
-
`${w.name}-${w.size}-${S}`
|
|
333
|
-
)) })
|
|
334
|
-
] });
|
|
182
|
+
function be({ accept: e, multiple: t = !1, maxSize: r, onFilesSelected: i, onReject: a, disabled: o = !1, label: l = "Drop files here or click to browse", helperText: u, error: p, illustration: m, className: g = "" }) {
|
|
183
|
+
let [_, v] = c(!1), [y, b] = c([]), x = s(null), S = !!p, C = n((e) => {
|
|
184
|
+
let n = Array.from(e), o = [], s = [];
|
|
185
|
+
for (let e of n) r && e.size > r ? s.push(e) : o.push(e);
|
|
186
|
+
if (o.length > 0) {
|
|
187
|
+
let e = t ? [...y, ...o] : o.slice(0, 1);
|
|
188
|
+
b(e), i?.(e);
|
|
189
|
+
}
|
|
190
|
+
s.length > 0 && a?.(s);
|
|
191
|
+
}, [
|
|
192
|
+
r,
|
|
193
|
+
t,
|
|
194
|
+
i,
|
|
195
|
+
a,
|
|
196
|
+
y
|
|
197
|
+
]), w = n((e) => {
|
|
198
|
+
e.preventDefault(), o || v(!0);
|
|
199
|
+
}, [o]), T = n((e) => {
|
|
200
|
+
e.preventDefault(), v(!1);
|
|
201
|
+
}, []), D = n((e) => {
|
|
202
|
+
e.preventDefault(), v(!1), !(o || !e.dataTransfer.files.length) && C(e.dataTransfer.files);
|
|
203
|
+
}, [o, C]), O = n((e) => {
|
|
204
|
+
e.target.files?.length && C(e.target.files);
|
|
205
|
+
}, [C]), k = n(() => {
|
|
206
|
+
o || x.current?.click();
|
|
207
|
+
}, [o]), A = n((e) => {
|
|
208
|
+
!o && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), x.current?.click());
|
|
209
|
+
}, [o]), j = n((e) => {
|
|
210
|
+
let t = y.filter((t, n) => n !== e);
|
|
211
|
+
b(t), i?.(t);
|
|
212
|
+
}, [y, i]);
|
|
213
|
+
return /* @__PURE__ */ f("div", {
|
|
214
|
+
className: `flex flex-col gap-1.5 ${g}`,
|
|
215
|
+
children: [
|
|
216
|
+
/* @__PURE__ */ f("div", {
|
|
217
|
+
role: "button",
|
|
218
|
+
tabIndex: o ? -1 : 0,
|
|
219
|
+
onClick: k,
|
|
220
|
+
onKeyDown: A,
|
|
221
|
+
onDragOver: w,
|
|
222
|
+
onDragLeave: T,
|
|
223
|
+
onDrop: D,
|
|
224
|
+
className: [
|
|
225
|
+
"flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed p-lg",
|
|
226
|
+
"transition-colors cursor-pointer select-none",
|
|
227
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
|
|
228
|
+
o ? "opacity-50 pointer-events-none bg-bg-secondary" : _ ? "border-primary bg-primary/5" : S ? "border-error hover:border-error bg-bg-primary" : "border-border hover:border-primary bg-bg-primary"
|
|
229
|
+
].filter(Boolean).join(" "),
|
|
230
|
+
"aria-disabled": o,
|
|
231
|
+
children: [
|
|
232
|
+
m ?? /* @__PURE__ */ d(h, {
|
|
233
|
+
size: 32,
|
|
234
|
+
className: _ ? "text-primary" : "text-text-muted",
|
|
235
|
+
"aria-hidden": !0
|
|
236
|
+
}),
|
|
237
|
+
/* @__PURE__ */ d("span", {
|
|
238
|
+
className: "text-body font-medium text-text-primary text-center",
|
|
239
|
+
children: l
|
|
240
|
+
}),
|
|
241
|
+
u && /* @__PURE__ */ d("span", {
|
|
242
|
+
className: "text-caption text-text-secondary text-center",
|
|
243
|
+
children: u
|
|
244
|
+
})
|
|
245
|
+
]
|
|
246
|
+
}),
|
|
247
|
+
/* @__PURE__ */ d("input", {
|
|
248
|
+
ref: x,
|
|
249
|
+
type: "file",
|
|
250
|
+
accept: e,
|
|
251
|
+
multiple: t,
|
|
252
|
+
onChange: O,
|
|
253
|
+
className: "hidden",
|
|
254
|
+
tabIndex: -1,
|
|
255
|
+
"aria-hidden": !0
|
|
256
|
+
}),
|
|
257
|
+
p && /* @__PURE__ */ d("p", {
|
|
258
|
+
className: "text-caption text-error",
|
|
259
|
+
children: p
|
|
260
|
+
}),
|
|
261
|
+
y.length > 0 && /* @__PURE__ */ d("ul", {
|
|
262
|
+
className: "flex flex-col gap-1 mt-1",
|
|
263
|
+
children: y.map((e, t) => /* @__PURE__ */ f("li", {
|
|
264
|
+
className: "flex items-center gap-2 rounded-md bg-bg-secondary px-3 py-1.5 text-small text-text-primary",
|
|
265
|
+
children: [
|
|
266
|
+
/* @__PURE__ */ d("span", {
|
|
267
|
+
className: "truncate flex-1",
|
|
268
|
+
children: e.name
|
|
269
|
+
}),
|
|
270
|
+
/* @__PURE__ */ d("span", {
|
|
271
|
+
className: "shrink-0 text-text-secondary",
|
|
272
|
+
children: ye(e.size)
|
|
273
|
+
}),
|
|
274
|
+
/* @__PURE__ */ d("button", {
|
|
275
|
+
type: "button",
|
|
276
|
+
onClick: (e) => {
|
|
277
|
+
e.stopPropagation(), j(t);
|
|
278
|
+
},
|
|
279
|
+
className: "shrink-0 p-0.5 rounded-sm text-text-secondary hover:text-text-primary hover:bg-bg-tertiary transition-colors cursor-pointer",
|
|
280
|
+
"aria-label": `Remove ${e.name}`,
|
|
281
|
+
children: /* @__PURE__ */ d(E, { size: 14 })
|
|
282
|
+
})
|
|
283
|
+
]
|
|
284
|
+
}, `${e.name}-${e.size}-${t}`))
|
|
285
|
+
})
|
|
286
|
+
]
|
|
287
|
+
});
|
|
335
288
|
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
},
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
disabled: l,
|
|
481
|
-
...u
|
|
482
|
-
}, f) {
|
|
483
|
-
const h = j(), p = d ?? h, y = `${p}-helper`, b = !!n;
|
|
484
|
-
return /* @__PURE__ */ m("div", { className: `flex flex-col gap-1.5 ${c}`, children: [
|
|
485
|
-
r && /* @__PURE__ */ e("label", { htmlFor: p, className: "text-small font-medium text-text-primary", children: r }),
|
|
486
|
-
/* @__PURE__ */ m("div", { className: "relative", children: [
|
|
487
|
-
s && /* @__PURE__ */ e(
|
|
488
|
-
"span",
|
|
489
|
-
{
|
|
490
|
-
className: `pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-text-secondary ${ne[a]}`,
|
|
491
|
-
"aria-hidden": "true",
|
|
492
|
-
children: s
|
|
493
|
-
}
|
|
494
|
-
),
|
|
495
|
-
/* @__PURE__ */ e(
|
|
496
|
-
"input",
|
|
497
|
-
{
|
|
498
|
-
ref: f,
|
|
499
|
-
id: p,
|
|
500
|
-
disabled: l,
|
|
501
|
-
"aria-invalid": b || void 0,
|
|
502
|
-
"aria-describedby": o || n ? y : void 0,
|
|
503
|
-
className: [
|
|
504
|
-
"w-full rounded-md border bg-bg-primary text-text-primary placeholder:text-text-muted",
|
|
505
|
-
"outline-none transition-colors",
|
|
506
|
-
"focus:border-primary focus:ring-1 focus:ring-primary",
|
|
507
|
-
"disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-bg-secondary",
|
|
508
|
-
b ? "border-error focus:border-error focus:ring-error" : "border-border hover:border-border-strong",
|
|
509
|
-
Ye[a],
|
|
510
|
-
s ? _e[a] : "",
|
|
511
|
-
i ? We[a] : ""
|
|
512
|
-
].join(" "),
|
|
513
|
-
...u
|
|
514
|
-
}
|
|
515
|
-
),
|
|
516
|
-
i && /* @__PURE__ */ e(
|
|
517
|
-
"span",
|
|
518
|
-
{
|
|
519
|
-
className: `pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-text-secondary ${ne[a]}`,
|
|
520
|
-
"aria-hidden": "true",
|
|
521
|
-
children: i
|
|
522
|
-
}
|
|
523
|
-
)
|
|
524
|
-
] }),
|
|
525
|
-
(o || n) && /* @__PURE__ */ e(
|
|
526
|
-
"p",
|
|
527
|
-
{
|
|
528
|
-
id: y,
|
|
529
|
-
className: `text-caption ${b ? "text-error" : "text-text-secondary"}`,
|
|
530
|
-
children: n ?? o
|
|
531
|
-
}
|
|
532
|
-
)
|
|
533
|
-
] });
|
|
534
|
-
}), ue = R(null);
|
|
535
|
-
function Je() {
|
|
536
|
-
const t = M(ue);
|
|
537
|
-
if (!t) throw new Error("RadioGroup.Item must be used within RadioGroup");
|
|
538
|
-
return t;
|
|
289
|
+
//#endregion
|
|
290
|
+
//#region src/components/ui/ProgressBar.tsx
|
|
291
|
+
var xe = {
|
|
292
|
+
sm: "h-1.5",
|
|
293
|
+
md: "h-2.5",
|
|
294
|
+
lg: "h-4"
|
|
295
|
+
}, Se = {
|
|
296
|
+
primary: "bg-primary",
|
|
297
|
+
success: "bg-success",
|
|
298
|
+
warning: "bg-warning",
|
|
299
|
+
error: "bg-error",
|
|
300
|
+
info: "bg-info"
|
|
301
|
+
}, Ce = t(function({ value: e, variant: t = "primary", size: n = "md", showLabel: r = !1, formatLabel: i, className: a = "", ...o }, s) {
|
|
302
|
+
let c = Math.round(Math.min(100, Math.max(0, e))), l = i ? i(c) : `${c}%`;
|
|
303
|
+
return /* @__PURE__ */ f("div", {
|
|
304
|
+
ref: s,
|
|
305
|
+
className: `flex items-center gap-2 ${a}`,
|
|
306
|
+
...o,
|
|
307
|
+
children: [/* @__PURE__ */ d("div", {
|
|
308
|
+
className: ["flex-1 overflow-hidden rounded-full bg-bg-tertiary", xe[n]].join(" "),
|
|
309
|
+
role: "progressbar",
|
|
310
|
+
"aria-valuenow": c,
|
|
311
|
+
"aria-valuemin": 0,
|
|
312
|
+
"aria-valuemax": 100,
|
|
313
|
+
children: /* @__PURE__ */ d("div", {
|
|
314
|
+
className: ["h-full rounded-full transition-all duration-300 ease-out", Se[t]].join(" "),
|
|
315
|
+
style: { width: `${c}%` }
|
|
316
|
+
})
|
|
317
|
+
}), r && /* @__PURE__ */ d("span", {
|
|
318
|
+
className: "text-small font-medium text-text-secondary tabular-nums shrink-0",
|
|
319
|
+
children: l
|
|
320
|
+
})]
|
|
321
|
+
});
|
|
322
|
+
}), we = t(function({ label: e, indeterminate: t = !1, helperText: r, error: o, className: c = "", id: l, disabled: u, ...p }, m) {
|
|
323
|
+
let h = a(), g = l ?? h, _ = `${g}-helper`, v = !!o, y = s(null), b = n((e) => {
|
|
324
|
+
y.current = e, typeof m == "function" ? m(e) : m && (m.current = e);
|
|
325
|
+
}, [m]);
|
|
326
|
+
return i(() => {
|
|
327
|
+
y.current && (y.current.indeterminate = t);
|
|
328
|
+
}, [t]), /* @__PURE__ */ f("div", {
|
|
329
|
+
className: `flex flex-col gap-1 ${c}`,
|
|
330
|
+
children: [/* @__PURE__ */ f("div", {
|
|
331
|
+
className: "flex items-start gap-2",
|
|
332
|
+
children: [/* @__PURE__ */ d("input", {
|
|
333
|
+
ref: b,
|
|
334
|
+
id: g,
|
|
335
|
+
type: "checkbox",
|
|
336
|
+
disabled: u,
|
|
337
|
+
"aria-invalid": v || void 0,
|
|
338
|
+
"aria-describedby": r || o ? _ : void 0,
|
|
339
|
+
className: [
|
|
340
|
+
"mt-0.5 size-4 shrink-0 cursor-pointer rounded-sm border appearance-none",
|
|
341
|
+
"bg-bg-primary transition-colors",
|
|
342
|
+
"checked:bg-primary checked:border-primary",
|
|
343
|
+
"indeterminate:bg-primary indeterminate:border-primary",
|
|
344
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-bg-primary",
|
|
345
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
346
|
+
v ? "border-error" : "border-border hover:border-border-strong",
|
|
347
|
+
"checked:bg-[url('data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22white%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12.207%204.793a1%201%200%20010%201.414l-5%205a1%201%200%2001-1.414%200l-2-2a1%201%200%20011.414-1.414L6.5%209.086l4.293-4.293a1%201%200%20011.414%200z%22%2F%3E%3C%2Fsvg%3E')] checked:bg-center checked:bg-no-repeat",
|
|
348
|
+
"indeterminate:bg-[url('data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22white%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20x%3D%223%22%20y%3D%227%22%20width%3D%2210%22%20height%3D%222%22%20rx%3D%221%22%2F%3E%3C%2Fsvg%3E')] indeterminate:bg-center indeterminate:bg-no-repeat"
|
|
349
|
+
].join(" "),
|
|
350
|
+
...p
|
|
351
|
+
}), e && /* @__PURE__ */ d("label", {
|
|
352
|
+
htmlFor: g,
|
|
353
|
+
className: `text-body select-none ${u ? "text-text-muted cursor-not-allowed" : "text-text-primary cursor-pointer"}`,
|
|
354
|
+
children: e
|
|
355
|
+
})]
|
|
356
|
+
}), (r || o) && /* @__PURE__ */ d("p", {
|
|
357
|
+
id: _,
|
|
358
|
+
className: `text-caption pl-6 ${v ? "text-error" : "text-text-secondary"}`,
|
|
359
|
+
children: o ?? r
|
|
360
|
+
})]
|
|
361
|
+
});
|
|
362
|
+
}), Te = {
|
|
363
|
+
sm: "h-8 text-small px-2.5",
|
|
364
|
+
md: "h-10 text-body px-3",
|
|
365
|
+
lg: "h-12 text-body px-3.5"
|
|
366
|
+
}, Ee = {
|
|
367
|
+
sm: "pl-8",
|
|
368
|
+
md: "pl-10",
|
|
369
|
+
lg: "pl-11"
|
|
370
|
+
}, De = {
|
|
371
|
+
sm: "pr-8",
|
|
372
|
+
md: "pr-10",
|
|
373
|
+
lg: "pr-11"
|
|
374
|
+
}, U = {
|
|
375
|
+
sm: "[&>svg]:size-4",
|
|
376
|
+
md: "[&>svg]:size-5",
|
|
377
|
+
lg: "[&>svg]:size-5"
|
|
378
|
+
}, Oe = t(function({ label: e, helperText: t, error: n, leftIcon: r, rightIcon: i, inputSize: o = "md", className: s = "", id: c, disabled: l, ...u }, p) {
|
|
379
|
+
let m = a(), h = c ?? m, g = `${h}-helper`, _ = !!n;
|
|
380
|
+
return /* @__PURE__ */ f("div", {
|
|
381
|
+
className: `flex flex-col gap-1.5 ${s}`,
|
|
382
|
+
children: [
|
|
383
|
+
e && /* @__PURE__ */ d("label", {
|
|
384
|
+
htmlFor: h,
|
|
385
|
+
className: "text-small font-medium text-text-primary",
|
|
386
|
+
children: e
|
|
387
|
+
}),
|
|
388
|
+
/* @__PURE__ */ f("div", {
|
|
389
|
+
className: "relative",
|
|
390
|
+
children: [
|
|
391
|
+
r && /* @__PURE__ */ d("span", {
|
|
392
|
+
className: `pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-text-secondary ${U[o]}`,
|
|
393
|
+
"aria-hidden": "true",
|
|
394
|
+
children: r
|
|
395
|
+
}),
|
|
396
|
+
/* @__PURE__ */ d("input", {
|
|
397
|
+
ref: p,
|
|
398
|
+
id: h,
|
|
399
|
+
disabled: l,
|
|
400
|
+
"aria-invalid": _ || void 0,
|
|
401
|
+
"aria-describedby": t || n ? g : void 0,
|
|
402
|
+
className: [
|
|
403
|
+
"w-full rounded-md border bg-bg-primary text-text-primary placeholder:text-text-muted",
|
|
404
|
+
"outline-none transition-colors",
|
|
405
|
+
"focus:border-primary focus:ring-1 focus:ring-primary",
|
|
406
|
+
"disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-bg-secondary",
|
|
407
|
+
_ ? "border-error focus:border-error focus:ring-error" : "border-border hover:border-border-strong",
|
|
408
|
+
Te[o],
|
|
409
|
+
r ? Ee[o] : "",
|
|
410
|
+
i ? De[o] : ""
|
|
411
|
+
].join(" "),
|
|
412
|
+
...u
|
|
413
|
+
}),
|
|
414
|
+
i && /* @__PURE__ */ d("span", {
|
|
415
|
+
className: `pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-text-secondary ${U[o]}`,
|
|
416
|
+
"aria-hidden": "true",
|
|
417
|
+
children: i
|
|
418
|
+
})
|
|
419
|
+
]
|
|
420
|
+
}),
|
|
421
|
+
(t || n) && /* @__PURE__ */ d("p", {
|
|
422
|
+
id: g,
|
|
423
|
+
className: `text-caption ${_ ? "text-error" : "text-text-secondary"}`,
|
|
424
|
+
children: n ?? t
|
|
425
|
+
})
|
|
426
|
+
]
|
|
427
|
+
});
|
|
428
|
+
}), W = e(null);
|
|
429
|
+
function ke() {
|
|
430
|
+
let e = r(W);
|
|
431
|
+
if (!e) throw Error("RadioGroup.Item must be used within RadioGroup");
|
|
432
|
+
return e;
|
|
539
433
|
}
|
|
540
|
-
function
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
id: p,
|
|
573
|
-
className: `text-caption ${y ? "text-error" : "text-text-secondary"}`,
|
|
574
|
-
children: i ?? s
|
|
575
|
-
}
|
|
576
|
-
)
|
|
577
|
-
]
|
|
578
|
-
}
|
|
579
|
-
) });
|
|
434
|
+
function G({ name: e, value: t, onChange: n, label: r, helperText: i, error: o, orientation: s = "vertical", disabled: c = !1, children: l, className: u = "" }) {
|
|
435
|
+
let p = a(), m = e ?? p, h = `${`${m}-group`}-helper`, g = !!o;
|
|
436
|
+
return /* @__PURE__ */ d(W.Provider, {
|
|
437
|
+
value: {
|
|
438
|
+
name: m,
|
|
439
|
+
value: t,
|
|
440
|
+
onChange: n,
|
|
441
|
+
disabled: c,
|
|
442
|
+
hasError: g
|
|
443
|
+
},
|
|
444
|
+
children: /* @__PURE__ */ f("fieldset", {
|
|
445
|
+
className: `flex flex-col gap-2 ${u}`,
|
|
446
|
+
"aria-describedby": i || o ? h : void 0,
|
|
447
|
+
disabled: c,
|
|
448
|
+
children: [
|
|
449
|
+
r && /* @__PURE__ */ d("legend", {
|
|
450
|
+
className: "text-small font-medium text-text-primary mb-1",
|
|
451
|
+
children: r
|
|
452
|
+
}),
|
|
453
|
+
/* @__PURE__ */ d("div", {
|
|
454
|
+
className: `flex gap-3 ${s === "horizontal" ? "flex-row flex-wrap" : "flex-col"}`,
|
|
455
|
+
role: "radiogroup",
|
|
456
|
+
children: l
|
|
457
|
+
}),
|
|
458
|
+
(i || o) && /* @__PURE__ */ d("p", {
|
|
459
|
+
id: h,
|
|
460
|
+
className: `text-caption ${g ? "text-error" : "text-text-secondary"}`,
|
|
461
|
+
children: o ?? i
|
|
462
|
+
})
|
|
463
|
+
]
|
|
464
|
+
})
|
|
465
|
+
});
|
|
580
466
|
}
|
|
581
|
-
function
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
{
|
|
614
|
-
htmlFor: l,
|
|
615
|
-
className: `text-body select-none ${u ? "text-text-muted cursor-not-allowed" : "text-text-primary cursor-pointer"}`,
|
|
616
|
-
children: r
|
|
617
|
-
}
|
|
618
|
-
),
|
|
619
|
-
o && /* @__PURE__ */ e("span", { className: "text-caption text-text-secondary", children: o })
|
|
620
|
-
] })
|
|
621
|
-
] });
|
|
467
|
+
function Ae({ value: e, label: t, description: n, disabled: r }) {
|
|
468
|
+
let { name: i, value: o, onChange: s, disabled: c, hasError: l } = ke(), u = a(), p = c || r;
|
|
469
|
+
return /* @__PURE__ */ f("div", {
|
|
470
|
+
className: "flex items-start gap-2",
|
|
471
|
+
children: [/* @__PURE__ */ d("input", {
|
|
472
|
+
id: u,
|
|
473
|
+
type: "radio",
|
|
474
|
+
name: i,
|
|
475
|
+
value: e,
|
|
476
|
+
checked: o === void 0 ? void 0 : o === e,
|
|
477
|
+
disabled: p,
|
|
478
|
+
onChange: () => s?.(e),
|
|
479
|
+
className: [
|
|
480
|
+
"mt-0.5 size-4 shrink-0 cursor-pointer appearance-none rounded-full border",
|
|
481
|
+
"bg-bg-primary transition-colors",
|
|
482
|
+
"checked:border-primary checked:border-[5px]",
|
|
483
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-bg-primary",
|
|
484
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
485
|
+
l ? "border-error" : "border-border hover:border-border-strong"
|
|
486
|
+
].join(" ")
|
|
487
|
+
}), /* @__PURE__ */ f("div", {
|
|
488
|
+
className: "flex flex-col",
|
|
489
|
+
children: [/* @__PURE__ */ d("label", {
|
|
490
|
+
htmlFor: u,
|
|
491
|
+
className: `text-body select-none ${p ? "text-text-muted cursor-not-allowed" : "text-text-primary cursor-pointer"}`,
|
|
492
|
+
children: t
|
|
493
|
+
}), n && /* @__PURE__ */ d("span", {
|
|
494
|
+
className: "text-caption text-text-secondary",
|
|
495
|
+
children: n
|
|
496
|
+
})]
|
|
497
|
+
})]
|
|
498
|
+
});
|
|
622
499
|
}
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
danger: "var(--color-error)",
|
|
655
|
-
dangerLight: "var(--color-error-bg)"
|
|
656
|
-
}
|
|
657
|
-
}), oe = {
|
|
658
|
-
control: ({ isFocused: t }) => `!shadow-sm !rounded-md !border-border ${t ? "!border-primary !ring-1 !ring-primary" : ""}`,
|
|
659
|
-
menu: () => "!rounded-lg !shadow-lg !border !border-border",
|
|
660
|
-
option: ({ isFocused: t, isSelected: r }) => `${r ? "!bg-primary !text-white" : t ? "!bg-bg-tertiary" : ""}`,
|
|
661
|
-
multiValue: () => "!rounded-sm !bg-bg-tertiary"
|
|
500
|
+
G.Item = Ae;
|
|
501
|
+
//#endregion
|
|
502
|
+
//#region src/theme/reactSelectStyles.ts
|
|
503
|
+
var K = (e) => ({
|
|
504
|
+
...e,
|
|
505
|
+
borderRadius: 8,
|
|
506
|
+
colors: {
|
|
507
|
+
...e.colors,
|
|
508
|
+
primary: "var(--color-primary)",
|
|
509
|
+
primary75: "var(--color-primary-hover)",
|
|
510
|
+
primary50: "var(--color-bg-tertiary)",
|
|
511
|
+
primary25: "var(--color-bg-secondary)",
|
|
512
|
+
neutral0: "var(--color-bg-primary)",
|
|
513
|
+
neutral5: "var(--color-bg-secondary)",
|
|
514
|
+
neutral10: "var(--color-bg-tertiary)",
|
|
515
|
+
neutral20: "var(--color-border)",
|
|
516
|
+
neutral30: "var(--color-border-strong)",
|
|
517
|
+
neutral40: "var(--color-text-muted)",
|
|
518
|
+
neutral50: "var(--color-text-secondary)",
|
|
519
|
+
neutral60: "var(--color-text-secondary)",
|
|
520
|
+
neutral70: "var(--color-text-primary)",
|
|
521
|
+
neutral80: "var(--color-text-primary)",
|
|
522
|
+
neutral90: "var(--color-text-primary)",
|
|
523
|
+
danger: "var(--color-error)",
|
|
524
|
+
dangerLight: "var(--color-error-bg)"
|
|
525
|
+
}
|
|
526
|
+
}), q = {
|
|
527
|
+
control: ({ isFocused: e }) => `!shadow-sm !rounded-md !border-border ${e ? "!border-primary !ring-1 !ring-primary" : ""}`,
|
|
528
|
+
menu: () => "!rounded-lg !shadow-lg !border !border-border",
|
|
529
|
+
option: ({ isFocused: e, isSelected: t }) => `${t ? "!bg-primary !text-white" : e ? "!bg-bg-tertiary" : ""}`,
|
|
530
|
+
multiValue: () => "!rounded-sm !bg-bg-tertiary"
|
|
662
531
|
};
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
532
|
+
//#endregion
|
|
533
|
+
//#region src/components/ui/Select.tsx
|
|
534
|
+
function je({ label: e, helperText: t, error: n, className: r = "", ...i }) {
|
|
535
|
+
let o = a(), s = i.inputId ?? o, c = `${s}-helper`, l = !!n;
|
|
536
|
+
return /* @__PURE__ */ f("div", {
|
|
537
|
+
className: `flex flex-col gap-1.5 ${r}`,
|
|
538
|
+
children: [
|
|
539
|
+
e && /* @__PURE__ */ d("label", {
|
|
540
|
+
htmlFor: s,
|
|
541
|
+
className: "text-small font-medium text-text-primary",
|
|
542
|
+
children: e
|
|
543
|
+
}),
|
|
544
|
+
/* @__PURE__ */ d(k, {
|
|
545
|
+
inputId: s,
|
|
546
|
+
theme: K,
|
|
547
|
+
menuPortalTarget: document.body,
|
|
548
|
+
styles: {
|
|
549
|
+
menuPortal: (e) => ({
|
|
550
|
+
...e,
|
|
551
|
+
zIndex: 50
|
|
552
|
+
}),
|
|
553
|
+
...i.styles
|
|
554
|
+
},
|
|
555
|
+
classNames: {
|
|
556
|
+
...q,
|
|
557
|
+
control: (e) => {
|
|
558
|
+
let t = q.control?.(e) ?? "";
|
|
559
|
+
return l ? `${t} !border-error !focus:ring-error` : t;
|
|
560
|
+
}
|
|
561
|
+
},
|
|
562
|
+
"aria-invalid": l || void 0,
|
|
563
|
+
"aria-errormessage": l ? c : void 0,
|
|
564
|
+
...i
|
|
565
|
+
}),
|
|
566
|
+
(t || n) && /* @__PURE__ */ d("p", {
|
|
567
|
+
id: c,
|
|
568
|
+
className: `text-caption ${l ? "text-error" : "text-text-secondary"}`,
|
|
569
|
+
children: n ?? t
|
|
570
|
+
})
|
|
571
|
+
]
|
|
572
|
+
});
|
|
698
573
|
}
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
"p",
|
|
800
|
-
{
|
|
801
|
-
id: y,
|
|
802
|
-
className: `text-caption ${b ? "text-error" : "text-text-secondary"}`,
|
|
803
|
-
children: n ?? o
|
|
804
|
-
}
|
|
805
|
-
)
|
|
806
|
-
] });
|
|
807
|
-
}), pe = R({
|
|
808
|
-
close: () => {
|
|
809
|
-
},
|
|
810
|
-
getItemProps: () => ({}),
|
|
811
|
-
activeIndex: null,
|
|
812
|
-
setActiveIndex: () => {
|
|
813
|
-
}
|
|
574
|
+
//#endregion
|
|
575
|
+
//#region src/components/ui/Switch.tsx
|
|
576
|
+
var Me = t(function({ label: e, helperText: t, className: n = "", id: r, disabled: i, ...o }, s) {
|
|
577
|
+
let c = a(), l = r ?? c, u = `${l}-helper`;
|
|
578
|
+
return /* @__PURE__ */ f("div", {
|
|
579
|
+
className: `flex flex-col gap-1 ${n}`,
|
|
580
|
+
children: [/* @__PURE__ */ f("div", {
|
|
581
|
+
className: "flex items-center gap-3",
|
|
582
|
+
children: [/* @__PURE__ */ f("div", {
|
|
583
|
+
className: "relative inline-flex items-center",
|
|
584
|
+
children: [/* @__PURE__ */ d("input", {
|
|
585
|
+
ref: s,
|
|
586
|
+
id: l,
|
|
587
|
+
type: "checkbox",
|
|
588
|
+
role: "switch",
|
|
589
|
+
disabled: i,
|
|
590
|
+
"aria-describedby": t ? u : void 0,
|
|
591
|
+
className: "peer sr-only",
|
|
592
|
+
...o
|
|
593
|
+
}), /* @__PURE__ */ d("label", {
|
|
594
|
+
htmlFor: l,
|
|
595
|
+
className: [
|
|
596
|
+
"relative h-6 w-11 rounded-full transition-colors",
|
|
597
|
+
"bg-border-strong",
|
|
598
|
+
"peer-checked:bg-primary",
|
|
599
|
+
"peer-focus-visible:ring-2 peer-focus-visible:ring-primary peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-bg-primary",
|
|
600
|
+
"peer-disabled:opacity-50 peer-disabled:cursor-not-allowed",
|
|
601
|
+
i ? "cursor-not-allowed" : "cursor-pointer",
|
|
602
|
+
"after:content-[''] after:absolute after:top-0.5 after:left-0.5",
|
|
603
|
+
"after:size-5 after:rounded-full after:bg-white after:shadow-sm",
|
|
604
|
+
"after:transition-transform peer-checked:after:translate-x-5"
|
|
605
|
+
].join(" "),
|
|
606
|
+
"aria-hidden": "true"
|
|
607
|
+
})]
|
|
608
|
+
}), e && /* @__PURE__ */ d("label", {
|
|
609
|
+
htmlFor: l,
|
|
610
|
+
className: `text-body select-none ${i ? "text-text-muted cursor-not-allowed" : "text-text-primary cursor-pointer"}`,
|
|
611
|
+
children: e
|
|
612
|
+
})]
|
|
613
|
+
}), t && /* @__PURE__ */ d("p", {
|
|
614
|
+
id: u,
|
|
615
|
+
className: "text-caption text-text-secondary pl-14",
|
|
616
|
+
children: t
|
|
617
|
+
})]
|
|
618
|
+
});
|
|
619
|
+
}), Ne = t(function({ label: e, helperText: t, error: r, autoGrow: o = !1, minRows: c = 3, className: l = "", id: u, disabled: p, onChange: m, ...h }, g) {
|
|
620
|
+
let _ = a(), v = u ?? _, y = `${v}-helper`, b = !!r, x = s(null), S = n(() => {
|
|
621
|
+
let e = x.current;
|
|
622
|
+
!e || !o || (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
|
|
623
|
+
}, [o]);
|
|
624
|
+
i(() => {
|
|
625
|
+
S();
|
|
626
|
+
}, [
|
|
627
|
+
S,
|
|
628
|
+
h.value,
|
|
629
|
+
h.defaultValue
|
|
630
|
+
]);
|
|
631
|
+
let C = n((e) => {
|
|
632
|
+
x.current = e, typeof g == "function" ? g(e) : g && (g.current = e);
|
|
633
|
+
}, [g]);
|
|
634
|
+
return /* @__PURE__ */ f("div", {
|
|
635
|
+
className: `flex flex-col gap-1.5 ${l}`,
|
|
636
|
+
children: [
|
|
637
|
+
e && /* @__PURE__ */ d("label", {
|
|
638
|
+
htmlFor: v,
|
|
639
|
+
className: "text-small font-medium text-text-primary",
|
|
640
|
+
children: e
|
|
641
|
+
}),
|
|
642
|
+
/* @__PURE__ */ d("textarea", {
|
|
643
|
+
ref: C,
|
|
644
|
+
id: v,
|
|
645
|
+
rows: c,
|
|
646
|
+
disabled: p,
|
|
647
|
+
"aria-invalid": b || void 0,
|
|
648
|
+
"aria-describedby": t || r ? y : void 0,
|
|
649
|
+
onChange: (e) => {
|
|
650
|
+
m?.(e), S();
|
|
651
|
+
},
|
|
652
|
+
className: [
|
|
653
|
+
"w-full rounded-md border bg-bg-primary text-text-primary placeholder:text-text-muted",
|
|
654
|
+
"px-3 py-2 text-body outline-none transition-colors",
|
|
655
|
+
"focus:border-primary focus:ring-1 focus:ring-primary",
|
|
656
|
+
"disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-bg-secondary",
|
|
657
|
+
o ? "resize-none overflow-hidden" : "resize-y",
|
|
658
|
+
b ? "border-error focus:border-error focus:ring-error" : "border-border hover:border-border-strong"
|
|
659
|
+
].join(" "),
|
|
660
|
+
...h
|
|
661
|
+
}),
|
|
662
|
+
(t || r) && /* @__PURE__ */ d("p", {
|
|
663
|
+
id: y,
|
|
664
|
+
className: `text-caption ${b ? "text-error" : "text-text-secondary"}`,
|
|
665
|
+
children: r ?? t
|
|
666
|
+
})
|
|
667
|
+
]
|
|
668
|
+
});
|
|
669
|
+
}), J = e({
|
|
670
|
+
close: () => {},
|
|
671
|
+
getItemProps: () => ({}),
|
|
672
|
+
activeIndex: null,
|
|
673
|
+
setActiveIndex: () => {}
|
|
814
674
|
});
|
|
815
|
-
function
|
|
816
|
-
|
|
675
|
+
function Pe() {
|
|
676
|
+
return /* @__PURE__ */ d("div", {
|
|
677
|
+
role: "separator",
|
|
678
|
+
className: "my-1 border-t border-border"
|
|
679
|
+
});
|
|
817
680
|
}
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
]
|
|
842
|
-
}
|
|
843
|
-
);
|
|
681
|
+
var Fe = t(function({ children: e, icon: t, danger: n = !1, disabled: i = !1, onClick: a, className: o = "", ...s }, c) {
|
|
682
|
+
let { close: l } = r(J);
|
|
683
|
+
return /* @__PURE__ */ f("button", {
|
|
684
|
+
ref: c,
|
|
685
|
+
type: "button",
|
|
686
|
+
role: "menuitem",
|
|
687
|
+
disabled: i,
|
|
688
|
+
onClick: () => {
|
|
689
|
+
i || (a?.(), l());
|
|
690
|
+
},
|
|
691
|
+
className: [
|
|
692
|
+
"flex w-full items-center gap-2 px-3 py-2 text-small rounded-md",
|
|
693
|
+
"text-left transition-colors outline-none cursor-pointer",
|
|
694
|
+
n ? "text-error hover:bg-error-bg focus:bg-error-bg" : "text-text-primary hover:bg-bg-tertiary focus:bg-bg-tertiary",
|
|
695
|
+
i && "opacity-50 pointer-events-none",
|
|
696
|
+
o
|
|
697
|
+
].filter(Boolean).join(" "),
|
|
698
|
+
...s,
|
|
699
|
+
children: [t && /* @__PURE__ */ d("span", {
|
|
700
|
+
className: "shrink-0 size-4",
|
|
701
|
+
children: t
|
|
702
|
+
}), e]
|
|
703
|
+
});
|
|
844
704
|
});
|
|
845
|
-
function
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
705
|
+
function Ie({ trigger: e, children: t, placement: r = "bottom-start", className: i = "" }) {
|
|
706
|
+
let [a, o] = c(!1), [l, p] = c(null), m = s([]), { refs: h, floatingStyles: g, context: _ } = L({
|
|
707
|
+
open: a,
|
|
708
|
+
onOpenChange: o,
|
|
709
|
+
placement: r,
|
|
710
|
+
middleware: [
|
|
711
|
+
P(4),
|
|
712
|
+
N(),
|
|
713
|
+
F({ padding: 8 })
|
|
714
|
+
],
|
|
715
|
+
whileElementsMounted: M
|
|
716
|
+
}), { getReferenceProps: v, getFloatingProps: y, getItemProps: b } = R([
|
|
717
|
+
te(_),
|
|
718
|
+
I(_),
|
|
719
|
+
z(_, { role: "menu" }),
|
|
720
|
+
ie(_, {
|
|
721
|
+
listRef: m,
|
|
722
|
+
activeIndex: l,
|
|
723
|
+
onNavigate: p,
|
|
724
|
+
loop: !0
|
|
725
|
+
})
|
|
726
|
+
]), x = n(() => o(!1), []);
|
|
727
|
+
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("span", {
|
|
728
|
+
ref: h.setReference,
|
|
729
|
+
className: "inline-flex",
|
|
730
|
+
...v(),
|
|
731
|
+
children: e
|
|
732
|
+
}), a && /* @__PURE__ */ d(j, { children: /* @__PURE__ */ d(A, {
|
|
733
|
+
context: _,
|
|
734
|
+
modal: !1,
|
|
735
|
+
children: /* @__PURE__ */ d("div", {
|
|
736
|
+
ref: h.setFloating,
|
|
737
|
+
style: g,
|
|
738
|
+
className: [
|
|
739
|
+
"z-50 min-w-[10rem] p-1 rounded-lg border border-border",
|
|
740
|
+
"bg-bg-primary shadow-lg animate-floating-in",
|
|
741
|
+
i
|
|
742
|
+
].join(" "),
|
|
743
|
+
...y(),
|
|
744
|
+
children: /* @__PURE__ */ d(J.Provider, {
|
|
745
|
+
value: {
|
|
746
|
+
close: x,
|
|
747
|
+
getItemProps: b,
|
|
748
|
+
activeIndex: l,
|
|
749
|
+
setActiveIndex: p
|
|
750
|
+
},
|
|
751
|
+
children: t
|
|
752
|
+
})
|
|
753
|
+
})
|
|
754
|
+
}) })] });
|
|
891
755
|
}
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
756
|
+
//#endregion
|
|
757
|
+
//#region src/components/ui/Popover.tsx
|
|
758
|
+
function Le({ trigger: e, children: t, placement: n = "bottom", open: r, onOpenChange: i, className: a = "" }) {
|
|
759
|
+
let [o, s] = c(!1), l = r !== void 0, p = l ? r : o, { refs: m, floatingStyles: h, context: g } = L({
|
|
760
|
+
open: p,
|
|
761
|
+
onOpenChange: l ? (e) => i?.(e) : s,
|
|
762
|
+
placement: n,
|
|
763
|
+
middleware: [
|
|
764
|
+
P(8),
|
|
765
|
+
N(),
|
|
766
|
+
F({ padding: 8 })
|
|
767
|
+
],
|
|
768
|
+
whileElementsMounted: M
|
|
769
|
+
}), { getReferenceProps: _, getFloatingProps: v } = R([
|
|
770
|
+
te(g),
|
|
771
|
+
I(g),
|
|
772
|
+
z(g)
|
|
773
|
+
]);
|
|
774
|
+
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("span", {
|
|
775
|
+
ref: m.setReference,
|
|
776
|
+
className: "inline-flex",
|
|
777
|
+
..._(),
|
|
778
|
+
children: e
|
|
779
|
+
}), p && /* @__PURE__ */ d(j, { children: /* @__PURE__ */ d(A, {
|
|
780
|
+
context: g,
|
|
781
|
+
modal: !1,
|
|
782
|
+
children: /* @__PURE__ */ d("div", {
|
|
783
|
+
ref: m.setFloating,
|
|
784
|
+
style: h,
|
|
785
|
+
className: [
|
|
786
|
+
"z-50 rounded-lg border border-border p-md",
|
|
787
|
+
"bg-bg-primary shadow-lg animate-floating-in",
|
|
788
|
+
a
|
|
789
|
+
].join(" "),
|
|
790
|
+
...v(),
|
|
791
|
+
children: t
|
|
792
|
+
})
|
|
793
|
+
}) })] });
|
|
924
794
|
}
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
795
|
+
//#endregion
|
|
796
|
+
//#region src/components/ui/Tabs.tsx
|
|
797
|
+
var Y = e({
|
|
798
|
+
activeValue: "",
|
|
799
|
+
idPrefix: ""
|
|
928
800
|
});
|
|
929
|
-
function
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
children: i && r
|
|
941
|
-
}
|
|
942
|
-
);
|
|
801
|
+
function Re({ value: e, children: t, className: n = "" }) {
|
|
802
|
+
let { activeValue: i, idPrefix: a } = r(Y), o = i === e;
|
|
803
|
+
return /* @__PURE__ */ d("div", {
|
|
804
|
+
id: `${a}-panel-${e}`,
|
|
805
|
+
role: "tabpanel",
|
|
806
|
+
"aria-labelledby": `${a}-tab-${e}`,
|
|
807
|
+
hidden: !o,
|
|
808
|
+
tabIndex: 0,
|
|
809
|
+
className: n,
|
|
810
|
+
children: o && t
|
|
811
|
+
});
|
|
943
812
|
}
|
|
944
|
-
function
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
"border-b-2 -mb-px transition-colors outline-none cursor-pointer",
|
|
1011
|
-
"focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
|
|
1012
|
-
v ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary hover:border-border-strong",
|
|
1013
|
-
b.disabled && "opacity-50 pointer-events-none"
|
|
1014
|
-
].filter(Boolean).join(" "),
|
|
1015
|
-
children: [
|
|
1016
|
-
b.icon && /* @__PURE__ */ e("span", { className: "shrink-0 size-4", children: b.icon }),
|
|
1017
|
-
b.label
|
|
1018
|
-
]
|
|
1019
|
-
},
|
|
1020
|
-
b.value
|
|
1021
|
-
);
|
|
1022
|
-
})
|
|
1023
|
-
}
|
|
1024
|
-
),
|
|
1025
|
-
s
|
|
1026
|
-
] }) });
|
|
813
|
+
function ze({ items: e, value: t, defaultValue: r, onChange: i, children: o, className: l = "" }) {
|
|
814
|
+
let u = a().replace(/:/g, ""), p = s(null), m = t !== void 0, [h, g] = c(() => r ?? e.find((e) => !e.disabled)?.value ?? e[0]?.value ?? ""), _ = m ? t : h, v = n((e) => {
|
|
815
|
+
m || g(e), i?.(e);
|
|
816
|
+
}, [m, i]), y = e.filter((e) => !e.disabled), b = (e) => {
|
|
817
|
+
let t = y.findIndex((e) => e.value === _), n = t;
|
|
818
|
+
switch (e.key) {
|
|
819
|
+
case "ArrowRight":
|
|
820
|
+
case "ArrowDown":
|
|
821
|
+
e.preventDefault(), n = (t + 1) % y.length;
|
|
822
|
+
break;
|
|
823
|
+
case "ArrowLeft":
|
|
824
|
+
case "ArrowUp":
|
|
825
|
+
e.preventDefault(), n = (t - 1 + y.length) % y.length;
|
|
826
|
+
break;
|
|
827
|
+
case "Home":
|
|
828
|
+
e.preventDefault(), n = 0;
|
|
829
|
+
break;
|
|
830
|
+
case "End":
|
|
831
|
+
e.preventDefault(), n = y.length - 1;
|
|
832
|
+
break;
|
|
833
|
+
default: return;
|
|
834
|
+
}
|
|
835
|
+
let r = y[n];
|
|
836
|
+
r && (v(r.value), (p.current?.querySelector(`[data-tab-value="${r.value}"]`))?.focus());
|
|
837
|
+
};
|
|
838
|
+
return /* @__PURE__ */ d(Y.Provider, {
|
|
839
|
+
value: {
|
|
840
|
+
activeValue: _,
|
|
841
|
+
idPrefix: u
|
|
842
|
+
},
|
|
843
|
+
children: /* @__PURE__ */ f("div", {
|
|
844
|
+
className: l,
|
|
845
|
+
children: [/* @__PURE__ */ d("div", {
|
|
846
|
+
ref: p,
|
|
847
|
+
role: "tablist",
|
|
848
|
+
"aria-orientation": "horizontal",
|
|
849
|
+
onKeyDown: b,
|
|
850
|
+
className: "flex border-b border-border",
|
|
851
|
+
children: e.map((e) => {
|
|
852
|
+
let t = e.value === _;
|
|
853
|
+
return /* @__PURE__ */ f("button", {
|
|
854
|
+
id: `${u}-tab-${e.value}`,
|
|
855
|
+
role: "tab",
|
|
856
|
+
type: "button",
|
|
857
|
+
"data-tab-value": e.value,
|
|
858
|
+
"aria-selected": t,
|
|
859
|
+
"aria-controls": `${u}-panel-${e.value}`,
|
|
860
|
+
tabIndex: t ? 0 : -1,
|
|
861
|
+
disabled: e.disabled,
|
|
862
|
+
onClick: () => v(e.value),
|
|
863
|
+
className: [
|
|
864
|
+
"inline-flex items-center gap-1.5 px-4 py-2.5 text-small font-medium",
|
|
865
|
+
"border-b-2 -mb-px transition-colors outline-none cursor-pointer",
|
|
866
|
+
"focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
|
|
867
|
+
t ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary hover:border-border-strong",
|
|
868
|
+
e.disabled && "opacity-50 pointer-events-none"
|
|
869
|
+
].filter(Boolean).join(" "),
|
|
870
|
+
children: [e.icon && /* @__PURE__ */ d("span", {
|
|
871
|
+
className: "shrink-0 size-4",
|
|
872
|
+
children: e.icon
|
|
873
|
+
}), e.label]
|
|
874
|
+
}, e.value);
|
|
875
|
+
})
|
|
876
|
+
}), o]
|
|
877
|
+
})
|
|
878
|
+
});
|
|
1027
879
|
}
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
880
|
+
//#endregion
|
|
881
|
+
//#region src/components/ui/Tooltip.tsx
|
|
882
|
+
var Be = {
|
|
883
|
+
top: "bottom",
|
|
884
|
+
bottom: "top",
|
|
885
|
+
left: "right",
|
|
886
|
+
right: "left"
|
|
1033
887
|
};
|
|
1034
|
-
function
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
className: "absolute size-2 bg-text-primary rotate-45",
|
|
1082
|
-
style: {
|
|
1083
|
-
left: z != null ? `${z}px` : "",
|
|
1084
|
-
top: A != null ? `${A}px` : "",
|
|
1085
|
-
[tt[x]]: "-4px"
|
|
1086
|
-
}
|
|
1087
|
-
}
|
|
1088
|
-
)
|
|
1089
|
-
]
|
|
1090
|
-
}
|
|
1091
|
-
) })
|
|
1092
|
-
] });
|
|
888
|
+
function Ve({ children: e, content: t, placement: n = "top", delay: r = 200, className: i = "" }) {
|
|
889
|
+
let [a, o] = c(!1), l = s(null), { refs: p, floatingStyles: m, context: h, middlewareData: g, placement: _ } = L({
|
|
890
|
+
open: a,
|
|
891
|
+
onOpenChange: o,
|
|
892
|
+
placement: n,
|
|
893
|
+
middleware: [
|
|
894
|
+
P(8),
|
|
895
|
+
N(),
|
|
896
|
+
F({ padding: 8 }),
|
|
897
|
+
ee({ element: l })
|
|
898
|
+
],
|
|
899
|
+
whileElementsMounted: M
|
|
900
|
+
}), { getReferenceProps: v, getFloatingProps: y } = R([
|
|
901
|
+
re(h, {
|
|
902
|
+
delay: r,
|
|
903
|
+
move: !1
|
|
904
|
+
}),
|
|
905
|
+
ne(h),
|
|
906
|
+
I(h),
|
|
907
|
+
z(h, { role: "tooltip" })
|
|
908
|
+
]), b = _.split("-")[0], x = g.arrow?.x, S = g.arrow?.y;
|
|
909
|
+
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("span", {
|
|
910
|
+
ref: p.setReference,
|
|
911
|
+
className: "inline-flex",
|
|
912
|
+
...v(),
|
|
913
|
+
children: e
|
|
914
|
+
}), a && t && /* @__PURE__ */ d(j, { children: /* @__PURE__ */ f("div", {
|
|
915
|
+
ref: p.setFloating,
|
|
916
|
+
style: m,
|
|
917
|
+
role: "tooltip",
|
|
918
|
+
className: [
|
|
919
|
+
"z-50 max-w-[var(--container-xs)] px-3 py-1.5 rounded-md text-small",
|
|
920
|
+
"bg-text-primary text-bg-primary shadow-md",
|
|
921
|
+
"pointer-events-none animate-floating-in",
|
|
922
|
+
i
|
|
923
|
+
].join(" "),
|
|
924
|
+
...y(),
|
|
925
|
+
children: [t, /* @__PURE__ */ d("div", {
|
|
926
|
+
ref: l,
|
|
927
|
+
className: "absolute size-2 bg-text-primary rotate-45",
|
|
928
|
+
style: {
|
|
929
|
+
left: x == null ? "" : `${x}px`,
|
|
930
|
+
top: S == null ? "" : `${S}px`,
|
|
931
|
+
[Be[b]]: "-4px"
|
|
932
|
+
}
|
|
933
|
+
})]
|
|
934
|
+
}) })] });
|
|
1093
935
|
}
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
936
|
+
//#endregion
|
|
937
|
+
//#region src/hooks/useLanguage.ts
|
|
938
|
+
function X() {
|
|
939
|
+
let { i18n: e } = B(), t = e.language ?? "en", r = n((t) => {
|
|
940
|
+
e.changeLanguage(t);
|
|
941
|
+
}, [e]);
|
|
942
|
+
return {
|
|
943
|
+
language: t,
|
|
944
|
+
toggleLanguage: n(() => {
|
|
945
|
+
r(t === "en" ? "fr" : "en");
|
|
946
|
+
}, [t, r]),
|
|
947
|
+
setLanguage: r
|
|
948
|
+
};
|
|
1104
949
|
}
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
].join(" "),
|
|
1133
|
-
children: s
|
|
1134
|
-
},
|
|
1135
|
-
n
|
|
1136
|
-
);
|
|
1137
|
-
})
|
|
1138
|
-
}
|
|
1139
|
-
);
|
|
950
|
+
//#endregion
|
|
951
|
+
//#region src/components/ui/LanguageSwitcher.tsx
|
|
952
|
+
var He = [{
|
|
953
|
+
value: "en",
|
|
954
|
+
label: "EN"
|
|
955
|
+
}, {
|
|
956
|
+
value: "fr",
|
|
957
|
+
label: "FR"
|
|
958
|
+
}];
|
|
959
|
+
function Ue({ className: e = "" }) {
|
|
960
|
+
let { language: t, setLanguage: n } = X();
|
|
961
|
+
return /* @__PURE__ */ d("div", {
|
|
962
|
+
role: "radiogroup",
|
|
963
|
+
"aria-label": "Language",
|
|
964
|
+
className: ["inline-flex items-center rounded-full border border-border bg-bg-secondary p-0.5", e].filter(Boolean).join(" "),
|
|
965
|
+
children: He.map(({ value: e, label: r }) => {
|
|
966
|
+
let i = t === e;
|
|
967
|
+
return /* @__PURE__ */ d("button", {
|
|
968
|
+
type: "button",
|
|
969
|
+
role: "radio",
|
|
970
|
+
"aria-checked": i,
|
|
971
|
+
onClick: () => n(e),
|
|
972
|
+
className: ["rounded-full px-2.5 py-0.5 text-caption font-medium transition-colors cursor-pointer", i ? "bg-primary text-white shadow-sm" : "text-text-secondary hover:text-text-primary"].join(" "),
|
|
973
|
+
children: r
|
|
974
|
+
}, e);
|
|
975
|
+
})
|
|
976
|
+
});
|
|
1140
977
|
}
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
978
|
+
//#endregion
|
|
979
|
+
//#region src/hooks/useTheme.ts
|
|
980
|
+
var Z = "poesis-theme", Q = /* @__PURE__ */ new Set();
|
|
981
|
+
function We() {
|
|
982
|
+
Q.forEach((e) => e());
|
|
1144
983
|
}
|
|
1145
|
-
function
|
|
1146
|
-
|
|
984
|
+
function Ge(e) {
|
|
985
|
+
return Q.add(e), () => Q.delete(e);
|
|
1147
986
|
}
|
|
1148
|
-
function
|
|
1149
|
-
|
|
987
|
+
function Ke() {
|
|
988
|
+
return document.documentElement.classList.contains("dark") ? "dark" : "light";
|
|
1150
989
|
}
|
|
1151
|
-
function
|
|
1152
|
-
|
|
990
|
+
function qe() {
|
|
991
|
+
return "light";
|
|
1153
992
|
}
|
|
1154
|
-
function
|
|
1155
|
-
|
|
993
|
+
function $(e) {
|
|
994
|
+
e === "dark" ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark"), localStorage.setItem(Z, e), We();
|
|
1156
995
|
}
|
|
1157
|
-
function
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
996
|
+
function Je() {
|
|
997
|
+
let e = localStorage.getItem(Z);
|
|
998
|
+
if (e) {
|
|
999
|
+
$(e);
|
|
1000
|
+
return;
|
|
1001
|
+
}
|
|
1002
|
+
let t = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
1003
|
+
$(t ? "dark" : "light");
|
|
1165
1004
|
}
|
|
1166
|
-
function
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1005
|
+
function Ye() {
|
|
1006
|
+
let e = l(Ge, Ke, qe);
|
|
1007
|
+
return i(() => {
|
|
1008
|
+
let e = window.matchMedia("(prefers-color-scheme: dark)"), t = (e) => {
|
|
1009
|
+
localStorage.getItem(Z) || $(e.matches ? "dark" : "light");
|
|
1010
|
+
};
|
|
1011
|
+
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
1012
|
+
}, []), {
|
|
1013
|
+
theme: e,
|
|
1014
|
+
toggleTheme: n(() => {
|
|
1015
|
+
$(e === "dark" ? "light" : "dark");
|
|
1016
|
+
}, [e]),
|
|
1017
|
+
setTheme: n((e) => {
|
|
1018
|
+
$(e);
|
|
1019
|
+
}, []),
|
|
1020
|
+
isDark: e === "dark"
|
|
1021
|
+
};
|
|
1180
1022
|
}
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
);
|
|
1023
|
+
//#endregion
|
|
1024
|
+
//#region src/components/ui/ThemeToggle.tsx
|
|
1025
|
+
function Xe({ variant: e = "ghost", size: t = "md", className: n }) {
|
|
1026
|
+
let { isDark: r, toggleTheme: i } = Ye(), { t: a } = B();
|
|
1027
|
+
return /* @__PURE__ */ d(H, {
|
|
1028
|
+
variant: e,
|
|
1029
|
+
size: t,
|
|
1030
|
+
icon: d(r ? T : y, { size: 16 }),
|
|
1031
|
+
"aria-label": a("theme.toggleTheme"),
|
|
1032
|
+
onClick: i,
|
|
1033
|
+
className: n
|
|
1034
|
+
});
|
|
1194
1035
|
}
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
s && /* @__PURE__ */ e("div", { className: "flex items-center gap-xs", children: s })
|
|
1237
|
-
] });
|
|
1036
|
+
//#endregion
|
|
1037
|
+
//#region src/components/layout/TopNav.tsx
|
|
1038
|
+
function Ze({ logo: e, categories: t = [], activeCategoryId: n, onCategoryChange: r, actions: i, onBurgerClick: a }) {
|
|
1039
|
+
return /* @__PURE__ */ f("header", {
|
|
1040
|
+
className: "fixed inset-x-0 top-0 z-40 flex h-14 items-center border-b border-border bg-bg-primary px-md",
|
|
1041
|
+
children: [
|
|
1042
|
+
/* @__PURE__ */ d("button", {
|
|
1043
|
+
type: "button",
|
|
1044
|
+
onClick: a,
|
|
1045
|
+
className: "mr-sm flex size-9 items-center justify-center rounded-md text-text-secondary hover:bg-bg-tertiary hover:text-text-primary lg:hidden",
|
|
1046
|
+
"aria-label": "Open menu",
|
|
1047
|
+
children: /* @__PURE__ */ d(v, { size: 22 })
|
|
1048
|
+
}),
|
|
1049
|
+
/* @__PURE__ */ d("div", {
|
|
1050
|
+
className: "mr-lg flex shrink-0 items-center",
|
|
1051
|
+
children: e ?? /* @__PURE__ */ d("span", {
|
|
1052
|
+
className: "text-h3 font-bold text-epfl-red",
|
|
1053
|
+
children: "EPFL"
|
|
1054
|
+
})
|
|
1055
|
+
}),
|
|
1056
|
+
/* @__PURE__ */ d("nav", {
|
|
1057
|
+
className: "hidden flex-1 items-center gap-xs lg:flex",
|
|
1058
|
+
"aria-label": "Main categories",
|
|
1059
|
+
children: t.map((e) => {
|
|
1060
|
+
let t = e.id === n;
|
|
1061
|
+
return /* @__PURE__ */ f("button", {
|
|
1062
|
+
type: "button",
|
|
1063
|
+
onClick: () => r?.(e.id),
|
|
1064
|
+
className: ["flex items-center gap-xs rounded-md px-sm py-xs text-small font-medium transition-colors", t ? "bg-primary/10 text-primary" : "text-text-secondary hover:bg-bg-tertiary hover:text-text-primary"].join(" "),
|
|
1065
|
+
"aria-current": t ? "page" : void 0,
|
|
1066
|
+
children: [e.icon && /* @__PURE__ */ d(e.icon, { size: 16 }), e.label]
|
|
1067
|
+
}, e.id);
|
|
1068
|
+
})
|
|
1069
|
+
}),
|
|
1070
|
+
/* @__PURE__ */ d("div", { className: "flex-1 lg:hidden" }),
|
|
1071
|
+
i && /* @__PURE__ */ d("div", {
|
|
1072
|
+
className: "flex items-center gap-xs",
|
|
1073
|
+
children: i
|
|
1074
|
+
})
|
|
1075
|
+
]
|
|
1076
|
+
});
|
|
1238
1077
|
}
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
section: s,
|
|
1256
|
-
activeLinkId: r,
|
|
1257
|
-
onLinkClick: o,
|
|
1258
|
-
collapsed: n
|
|
1259
|
-
},
|
|
1260
|
-
s.id
|
|
1261
|
-
)) })
|
|
1262
|
-
}
|
|
1263
|
-
);
|
|
1078
|
+
//#endregion
|
|
1079
|
+
//#region src/components/layout/SideNav.tsx
|
|
1080
|
+
function Qe({ sections: e = [], activeLinkId: t, onLinkClick: n, collapsed: r = !1 }) {
|
|
1081
|
+
return /* @__PURE__ */ d("aside", {
|
|
1082
|
+
className: ["hidden lg:flex flex-col border-r border-border bg-bg-secondary overflow-y-auto transition-[width] duration-200", r ? "w-16" : "w-64"].join(" "),
|
|
1083
|
+
children: /* @__PURE__ */ d("nav", {
|
|
1084
|
+
className: "flex flex-col gap-xs p-sm",
|
|
1085
|
+
"aria-label": "Page navigation",
|
|
1086
|
+
children: e.map((e) => /* @__PURE__ */ d($e, {
|
|
1087
|
+
section: e,
|
|
1088
|
+
activeLinkId: t,
|
|
1089
|
+
onLinkClick: n,
|
|
1090
|
+
collapsed: r
|
|
1091
|
+
}, e.id))
|
|
1092
|
+
})
|
|
1093
|
+
});
|
|
1264
1094
|
}
|
|
1265
|
-
function
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
type: "button",
|
|
1297
|
-
onClick: () => o?.(a.href),
|
|
1298
|
-
title: n ? a.label : void 0,
|
|
1299
|
-
className: [
|
|
1300
|
-
"flex w-full items-center gap-sm rounded-md px-sm py-xs text-small transition-colors",
|
|
1301
|
-
n ? "justify-center" : "",
|
|
1302
|
-
c ? "bg-primary/8 font-medium text-primary" : "text-text-secondary hover:bg-bg-tertiary hover:text-text-primary"
|
|
1303
|
-
].join(" "),
|
|
1304
|
-
"aria-current": c ? "page" : void 0,
|
|
1305
|
-
children: [
|
|
1306
|
-
a.icon && /* @__PURE__ */ e(a.icon, { size: 18 }),
|
|
1307
|
-
!n && /* @__PURE__ */ e("span", { children: a.label })
|
|
1308
|
-
]
|
|
1309
|
-
}
|
|
1310
|
-
) }, a.id);
|
|
1311
|
-
}) })
|
|
1312
|
-
] });
|
|
1095
|
+
function $e({ section: e, activeLinkId: t, onLinkClick: n, collapsed: r }) {
|
|
1096
|
+
let [i, a] = c(!0);
|
|
1097
|
+
return /* @__PURE__ */ f("div", {
|
|
1098
|
+
className: "flex flex-col",
|
|
1099
|
+
children: [e.title && !r && /* @__PURE__ */ f("button", {
|
|
1100
|
+
type: "button",
|
|
1101
|
+
onClick: () => a((e) => !e),
|
|
1102
|
+
className: "flex items-center justify-between rounded-md px-sm py-xs text-caption font-semibold uppercase tracking-wide text-text-secondary hover:text-text-primary",
|
|
1103
|
+
children: [/* @__PURE__ */ d("span", { children: e.title }), /* @__PURE__ */ d(m, {
|
|
1104
|
+
size: 14,
|
|
1105
|
+
className: `transition-transform ${i ? "" : "-rotate-90"}`
|
|
1106
|
+
})]
|
|
1107
|
+
}), (i || r) && /* @__PURE__ */ d("ul", {
|
|
1108
|
+
className: "flex flex-col gap-px",
|
|
1109
|
+
children: e.links.map((e) => {
|
|
1110
|
+
let i = e.id === t;
|
|
1111
|
+
return /* @__PURE__ */ d("li", { children: /* @__PURE__ */ f("button", {
|
|
1112
|
+
type: "button",
|
|
1113
|
+
onClick: () => n?.(e.href),
|
|
1114
|
+
title: r ? e.label : void 0,
|
|
1115
|
+
className: [
|
|
1116
|
+
"flex w-full items-center gap-sm rounded-md px-sm py-xs text-small transition-colors",
|
|
1117
|
+
r ? "justify-center" : "",
|
|
1118
|
+
i ? "bg-primary/8 font-medium text-primary" : "text-text-secondary hover:bg-bg-tertiary hover:text-text-primary"
|
|
1119
|
+
].join(" "),
|
|
1120
|
+
"aria-current": i ? "page" : void 0,
|
|
1121
|
+
children: [e.icon && /* @__PURE__ */ d(e.icon, { size: 18 }), !r && /* @__PURE__ */ d("span", { children: e.label })]
|
|
1122
|
+
}) }, e.id);
|
|
1123
|
+
})
|
|
1124
|
+
})]
|
|
1125
|
+
});
|
|
1313
1126
|
}
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
o.length > 0 && /* @__PURE__ */ m("div", { className: "mb-md flex flex-col gap-xs", children: [
|
|
1376
|
-
/* @__PURE__ */ e("span", { className: "px-sm text-caption font-semibold uppercase tracking-wide text-text-muted", children: "Categories" }),
|
|
1377
|
-
o.map((l) => {
|
|
1378
|
-
const u = l.id === n;
|
|
1379
|
-
return /* @__PURE__ */ m(
|
|
1380
|
-
"button",
|
|
1381
|
-
{
|
|
1382
|
-
type: "button",
|
|
1383
|
-
onClick: () => {
|
|
1384
|
-
s?.(l.id);
|
|
1385
|
-
},
|
|
1386
|
-
className: [
|
|
1387
|
-
"flex items-center gap-sm rounded-md px-sm py-xs text-small font-medium transition-colors",
|
|
1388
|
-
u ? "bg-primary/10 text-primary" : "text-text-secondary hover:bg-bg-tertiary hover:text-text-primary"
|
|
1389
|
-
].join(" "),
|
|
1390
|
-
children: [
|
|
1391
|
-
l.icon && /* @__PURE__ */ e(l.icon, { size: 16 }),
|
|
1392
|
-
l.label
|
|
1393
|
-
]
|
|
1394
|
-
},
|
|
1395
|
-
l.id
|
|
1396
|
-
);
|
|
1397
|
-
})
|
|
1398
|
-
] }),
|
|
1399
|
-
i.map((l) => /* @__PURE__ */ e(
|
|
1400
|
-
pt,
|
|
1401
|
-
{
|
|
1402
|
-
section: l,
|
|
1403
|
-
activeLinkId: a,
|
|
1404
|
-
onLinkClick: (u) => {
|
|
1405
|
-
c?.(u), r();
|
|
1406
|
-
}
|
|
1407
|
-
},
|
|
1408
|
-
l.id
|
|
1409
|
-
))
|
|
1410
|
-
] })
|
|
1411
|
-
]
|
|
1412
|
-
}
|
|
1413
|
-
)
|
|
1414
|
-
] });
|
|
1127
|
+
//#endregion
|
|
1128
|
+
//#region src/components/layout/BurgerDrawer.tsx
|
|
1129
|
+
function et({ open: e, onClose: t, categories: n = [], activeCategoryId: r, onCategoryChange: a, sections: o = [], activeLinkId: c, onLinkClick: l }) {
|
|
1130
|
+
let p = s(null);
|
|
1131
|
+
return i(() => {
|
|
1132
|
+
if (!e) return;
|
|
1133
|
+
let n = (e) => {
|
|
1134
|
+
e.key === "Escape" && t();
|
|
1135
|
+
};
|
|
1136
|
+
return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
|
|
1137
|
+
}, [e, t]), i(() => {
|
|
1138
|
+
e && p.current?.focus();
|
|
1139
|
+
}, [e]), i(() => (e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
1140
|
+
document.body.style.overflow = "";
|
|
1141
|
+
}), [e]), /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", {
|
|
1142
|
+
className: ["fixed inset-0 z-50 bg-black/40 transition-opacity lg:hidden", e ? "opacity-100" : "pointer-events-none opacity-0"].join(" "),
|
|
1143
|
+
onClick: t,
|
|
1144
|
+
"aria-hidden": "true"
|
|
1145
|
+
}), /* @__PURE__ */ f("div", {
|
|
1146
|
+
ref: p,
|
|
1147
|
+
tabIndex: -1,
|
|
1148
|
+
role: "dialog",
|
|
1149
|
+
"aria-modal": "true",
|
|
1150
|
+
"aria-label": "Navigation menu",
|
|
1151
|
+
className: ["fixed inset-y-0 left-0 z-50 flex w-72 flex-col bg-bg-primary shadow-xl transition-transform duration-200 lg:hidden", e ? "translate-x-0" : "-translate-x-full"].join(" "),
|
|
1152
|
+
children: [/* @__PURE__ */ f("div", {
|
|
1153
|
+
className: "flex h-14 items-center justify-between border-b border-border px-md",
|
|
1154
|
+
children: [/* @__PURE__ */ d("span", {
|
|
1155
|
+
className: "text-h3 font-bold text-epfl-red",
|
|
1156
|
+
children: "EPFL"
|
|
1157
|
+
}), /* @__PURE__ */ d("button", {
|
|
1158
|
+
type: "button",
|
|
1159
|
+
onClick: t,
|
|
1160
|
+
className: "flex size-9 items-center justify-center rounded-md text-text-secondary hover:bg-bg-tertiary hover:text-text-primary",
|
|
1161
|
+
"aria-label": "Close menu",
|
|
1162
|
+
children: /* @__PURE__ */ d(O, { size: 18 })
|
|
1163
|
+
})]
|
|
1164
|
+
}), /* @__PURE__ */ f("div", {
|
|
1165
|
+
className: "flex-1 overflow-y-auto p-sm",
|
|
1166
|
+
children: [n.length > 0 && /* @__PURE__ */ f("div", {
|
|
1167
|
+
className: "mb-md flex flex-col gap-xs",
|
|
1168
|
+
children: [/* @__PURE__ */ d("span", {
|
|
1169
|
+
className: "px-sm text-caption font-semibold uppercase tracking-wide text-text-muted",
|
|
1170
|
+
children: "Categories"
|
|
1171
|
+
}), n.map((e) => /* @__PURE__ */ f("button", {
|
|
1172
|
+
type: "button",
|
|
1173
|
+
onClick: () => {
|
|
1174
|
+
a?.(e.id);
|
|
1175
|
+
},
|
|
1176
|
+
className: ["flex items-center gap-sm rounded-md px-sm py-xs text-small font-medium transition-colors", e.id === r ? "bg-primary/10 text-primary" : "text-text-secondary hover:bg-bg-tertiary hover:text-text-primary"].join(" "),
|
|
1177
|
+
children: [e.icon && /* @__PURE__ */ d(e.icon, { size: 16 }), e.label]
|
|
1178
|
+
}, e.id))]
|
|
1179
|
+
}), o.map((e) => /* @__PURE__ */ d(tt, {
|
|
1180
|
+
section: e,
|
|
1181
|
+
activeLinkId: c,
|
|
1182
|
+
onLinkClick: (e) => {
|
|
1183
|
+
l?.(e), t();
|
|
1184
|
+
}
|
|
1185
|
+
}, e.id))]
|
|
1186
|
+
})]
|
|
1187
|
+
})] });
|
|
1415
1188
|
}
|
|
1416
|
-
function
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
const a = i.id === r;
|
|
1443
|
-
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ m(
|
|
1444
|
-
"button",
|
|
1445
|
-
{
|
|
1446
|
-
type: "button",
|
|
1447
|
-
onClick: () => o?.(i.href),
|
|
1448
|
-
className: [
|
|
1449
|
-
"flex w-full items-center gap-sm rounded-md px-sm py-xs text-small transition-colors",
|
|
1450
|
-
a ? "bg-primary/10 font-medium text-primary" : "text-text-secondary hover:bg-bg-tertiary hover:text-text-primary"
|
|
1451
|
-
].join(" "),
|
|
1452
|
-
"aria-current": a ? "page" : void 0,
|
|
1453
|
-
children: [
|
|
1454
|
-
i.icon && /* @__PURE__ */ e(i.icon, { size: 18 }),
|
|
1455
|
-
/* @__PURE__ */ e("span", { children: i.label })
|
|
1456
|
-
]
|
|
1457
|
-
}
|
|
1458
|
-
) }, i.id);
|
|
1459
|
-
}) })
|
|
1460
|
-
] });
|
|
1189
|
+
function tt({ section: e, activeLinkId: t, onLinkClick: n }) {
|
|
1190
|
+
let [r, i] = c(!0);
|
|
1191
|
+
return /* @__PURE__ */ f("div", {
|
|
1192
|
+
className: "mb-xs flex flex-col",
|
|
1193
|
+
children: [e.title && /* @__PURE__ */ f("button", {
|
|
1194
|
+
type: "button",
|
|
1195
|
+
onClick: () => i((e) => !e),
|
|
1196
|
+
className: "flex items-center justify-between rounded-md px-sm py-xs text-caption font-semibold uppercase tracking-wide text-text-muted hover:text-text-secondary",
|
|
1197
|
+
children: [/* @__PURE__ */ d("span", { children: e.title }), /* @__PURE__ */ d(m, {
|
|
1198
|
+
size: 14,
|
|
1199
|
+
className: `transition-transform ${r ? "" : "-rotate-90"}`
|
|
1200
|
+
})]
|
|
1201
|
+
}), r && /* @__PURE__ */ d("ul", {
|
|
1202
|
+
className: "flex flex-col gap-px",
|
|
1203
|
+
children: e.links.map((e) => {
|
|
1204
|
+
let r = e.id === t;
|
|
1205
|
+
return /* @__PURE__ */ d("li", { children: /* @__PURE__ */ f("button", {
|
|
1206
|
+
type: "button",
|
|
1207
|
+
onClick: () => n?.(e.href),
|
|
1208
|
+
className: ["flex w-full items-center gap-sm rounded-md px-sm py-xs text-small transition-colors", r ? "bg-primary/10 font-medium text-primary" : "text-text-secondary hover:bg-bg-tertiary hover:text-text-primary"].join(" "),
|
|
1209
|
+
"aria-current": r ? "page" : void 0,
|
|
1210
|
+
children: [e.icon && /* @__PURE__ */ d(e.icon, { size: 18 }), /* @__PURE__ */ d("span", { children: e.label })]
|
|
1211
|
+
}) }, e.id);
|
|
1212
|
+
})
|
|
1213
|
+
})]
|
|
1214
|
+
});
|
|
1461
1215
|
}
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
},
|
|
1509
|
-
sections: i,
|
|
1510
|
-
activeLinkId: a,
|
|
1511
|
-
onLinkClick: (h) => {
|
|
1512
|
-
c?.(h), f(!1);
|
|
1513
|
-
}
|
|
1514
|
-
}
|
|
1515
|
-
)
|
|
1516
|
-
] });
|
|
1216
|
+
//#endregion
|
|
1217
|
+
//#region src/components/layout/PageShell.tsx
|
|
1218
|
+
function nt({ children: e, logo: t, categories: n = [], activeCategoryId: r, onCategoryChange: i, sections: a = [], activeLinkId: o, onLinkClick: s, actions: l, sideNavCollapsed: u = !1 }) {
|
|
1219
|
+
let [p, m] = c(!1);
|
|
1220
|
+
return /* @__PURE__ */ f("div", {
|
|
1221
|
+
className: "flex h-screen flex-col bg-bg-primary",
|
|
1222
|
+
children: [
|
|
1223
|
+
/* @__PURE__ */ d(Ze, {
|
|
1224
|
+
logo: t,
|
|
1225
|
+
categories: n,
|
|
1226
|
+
activeCategoryId: r,
|
|
1227
|
+
onCategoryChange: i,
|
|
1228
|
+
actions: l,
|
|
1229
|
+
onBurgerClick: () => m(!0)
|
|
1230
|
+
}),
|
|
1231
|
+
/* @__PURE__ */ f("div", {
|
|
1232
|
+
className: "flex flex-1 overflow-hidden pt-14",
|
|
1233
|
+
children: [/* @__PURE__ */ d(Qe, {
|
|
1234
|
+
sections: a,
|
|
1235
|
+
activeLinkId: o,
|
|
1236
|
+
onLinkClick: s,
|
|
1237
|
+
collapsed: u
|
|
1238
|
+
}), /* @__PURE__ */ d("main", {
|
|
1239
|
+
className: "flex-1 overflow-y-auto px-md py-lg lg:px-lg",
|
|
1240
|
+
children: /* @__PURE__ */ d("div", {
|
|
1241
|
+
className: "mx-auto max-w-[var(--container-6xl)]",
|
|
1242
|
+
children: e
|
|
1243
|
+
})
|
|
1244
|
+
})]
|
|
1245
|
+
}),
|
|
1246
|
+
/* @__PURE__ */ d(et, {
|
|
1247
|
+
open: p,
|
|
1248
|
+
onClose: () => m(!1),
|
|
1249
|
+
categories: n,
|
|
1250
|
+
activeCategoryId: r,
|
|
1251
|
+
onCategoryChange: (e) => {
|
|
1252
|
+
i?.(e), m(!1);
|
|
1253
|
+
},
|
|
1254
|
+
sections: a,
|
|
1255
|
+
activeLinkId: o,
|
|
1256
|
+
onLinkClick: (e) => {
|
|
1257
|
+
s?.(e), m(!1);
|
|
1258
|
+
}
|
|
1259
|
+
})
|
|
1260
|
+
]
|
|
1261
|
+
});
|
|
1517
1262
|
}
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
),
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1263
|
+
//#endregion
|
|
1264
|
+
//#region src/components/data-display/Card.tsx
|
|
1265
|
+
var rt = t(function({ header: e, footer: t, actions: n, noPadding: r = !1, className: i = "", children: a, ...o }, s) {
|
|
1266
|
+
let c = t || n;
|
|
1267
|
+
return /* @__PURE__ */ f("div", {
|
|
1268
|
+
ref: s,
|
|
1269
|
+
className: [
|
|
1270
|
+
"rounded-md shadow-md border border-border bg-bg-secondary",
|
|
1271
|
+
"flex flex-col overflow-hidden",
|
|
1272
|
+
i
|
|
1273
|
+
].filter(Boolean).join(" "),
|
|
1274
|
+
...o,
|
|
1275
|
+
children: [
|
|
1276
|
+
e && /* @__PURE__ */ d("div", {
|
|
1277
|
+
className: "px-lg py-md border-b border-border",
|
|
1278
|
+
children: /* @__PURE__ */ d("div", {
|
|
1279
|
+
className: "font-semibold text-body text-text-primary",
|
|
1280
|
+
children: e
|
|
1281
|
+
})
|
|
1282
|
+
}),
|
|
1283
|
+
/* @__PURE__ */ d("div", {
|
|
1284
|
+
className: r ? "" : "p-lg",
|
|
1285
|
+
children: a
|
|
1286
|
+
}),
|
|
1287
|
+
c && /* @__PURE__ */ f("div", {
|
|
1288
|
+
className: "px-lg py-md border-t border-border flex items-center gap-3",
|
|
1289
|
+
children: [t && /* @__PURE__ */ d("div", {
|
|
1290
|
+
className: "flex-1 min-w-0",
|
|
1291
|
+
children: t
|
|
1292
|
+
}), n && /* @__PURE__ */ d("div", {
|
|
1293
|
+
className: "ml-auto flex items-center gap-2",
|
|
1294
|
+
children: n
|
|
1295
|
+
})]
|
|
1296
|
+
})
|
|
1297
|
+
]
|
|
1298
|
+
});
|
|
1299
|
+
}), it = t(function({ items: e, layout: t = "horizontal", dividers: n = !0, className: r = "", ...i }, a) {
|
|
1300
|
+
let o = t === "horizontal";
|
|
1301
|
+
return /* @__PURE__ */ d("dl", {
|
|
1302
|
+
ref: a,
|
|
1303
|
+
className: [
|
|
1304
|
+
"text-body",
|
|
1305
|
+
n && "divide-y divide-border",
|
|
1306
|
+
r
|
|
1307
|
+
].filter(Boolean).join(" "),
|
|
1308
|
+
...i,
|
|
1309
|
+
children: e.map((e, t) => /* @__PURE__ */ f("div", {
|
|
1310
|
+
className: ["py-sm", o ? "flex flex-col sm:flex-row sm:gap-lg" : "flex flex-col gap-xs"].filter(Boolean).join(" "),
|
|
1311
|
+
children: [/* @__PURE__ */ d("dt", {
|
|
1312
|
+
className: ["font-medium text-text-secondary text-small shrink-0", o && "sm:w-1/3"].filter(Boolean).join(" "),
|
|
1313
|
+
children: e.label
|
|
1314
|
+
}), /* @__PURE__ */ d("dd", {
|
|
1315
|
+
className: "text-text-primary",
|
|
1316
|
+
children: e.value
|
|
1317
|
+
})]
|
|
1318
|
+
}, t))
|
|
1319
|
+
});
|
|
1320
|
+
}), at = t(function({ illustration: e, title: t, description: n, action: r, className: i = "", ...a }, o) {
|
|
1321
|
+
return /* @__PURE__ */ f("div", {
|
|
1322
|
+
ref: o,
|
|
1323
|
+
className: ["flex flex-col items-center justify-center text-center py-2xl px-lg", i].filter(Boolean).join(" "),
|
|
1324
|
+
...a,
|
|
1325
|
+
children: [
|
|
1326
|
+
e && /* @__PURE__ */ d("div", {
|
|
1327
|
+
className: "mb-lg text-text-secondary",
|
|
1328
|
+
children: e
|
|
1329
|
+
}),
|
|
1330
|
+
/* @__PURE__ */ d("h3", {
|
|
1331
|
+
className: "text-h3 font-semibold text-text-primary",
|
|
1332
|
+
children: t
|
|
1333
|
+
}),
|
|
1334
|
+
n && /* @__PURE__ */ d("p", {
|
|
1335
|
+
className: "mt-xs text-body text-text-secondary max-w-[var(--container-md)]",
|
|
1336
|
+
children: n
|
|
1337
|
+
}),
|
|
1338
|
+
r && /* @__PURE__ */ d("div", {
|
|
1339
|
+
className: "mt-lg",
|
|
1340
|
+
children: r
|
|
1341
|
+
})
|
|
1342
|
+
]
|
|
1343
|
+
});
|
|
1593
1344
|
});
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1345
|
+
//#endregion
|
|
1346
|
+
//#region src/components/data-display/Table.tsx
|
|
1347
|
+
function ot(e, t) {
|
|
1348
|
+
if (!e.sortValue || t.length === 0) return "text";
|
|
1349
|
+
for (let n of t) {
|
|
1350
|
+
let t = e.sortValue(n);
|
|
1351
|
+
if (t != null) return typeof t == "number" ? "numeric" : "text";
|
|
1352
|
+
}
|
|
1353
|
+
return "text";
|
|
1601
1354
|
}
|
|
1602
|
-
function
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1355
|
+
function st({ active: e, direction: t, columnType: n }) {
|
|
1356
|
+
return e ? d(n === "numeric" ? t === "asc" ? C : w : t === "asc" ? b : x, {
|
|
1357
|
+
size: 14,
|
|
1358
|
+
className: "ml-1 inline",
|
|
1359
|
+
"aria-hidden": !0
|
|
1360
|
+
}) : /* @__PURE__ */ d(S, {
|
|
1361
|
+
size: 14,
|
|
1362
|
+
className: "ml-1 inline opacity-30",
|
|
1363
|
+
"aria-hidden": !0
|
|
1364
|
+
});
|
|
1608
1365
|
}
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
},
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
}
|
|
1712
|
-
success: {
|
|
1713
|
-
bg: "bg-success-bg",
|
|
1714
|
-
border: "border-success/30",
|
|
1715
|
-
text: "text-success",
|
|
1716
|
-
icon: ce
|
|
1717
|
-
},
|
|
1718
|
-
warning: {
|
|
1719
|
-
bg: "bg-warning-bg",
|
|
1720
|
-
border: "border-warning/30",
|
|
1721
|
-
text: "text-warning",
|
|
1722
|
-
icon: q
|
|
1723
|
-
},
|
|
1724
|
-
error: {
|
|
1725
|
-
bg: "bg-error-bg",
|
|
1726
|
-
border: "border-error/30",
|
|
1727
|
-
text: "text-error",
|
|
1728
|
-
icon: le
|
|
1729
|
-
},
|
|
1730
|
-
info: {
|
|
1731
|
-
bg: "bg-info-bg",
|
|
1732
|
-
border: "border-info/30",
|
|
1733
|
-
text: "text-info",
|
|
1734
|
-
icon: ae
|
|
1735
|
-
}
|
|
1366
|
+
var ct = t(function({ columns: e, data: t, rowKey: r, striped: i = !1, sort: a, onSortChange: s, emptyContent: l, className: u = "", ...p }, m) {
|
|
1367
|
+
let [h, g] = c(), _ = a ?? h, v = n((e) => {
|
|
1368
|
+
let t = _?.column === e && _.direction === "asc" ? {
|
|
1369
|
+
column: e,
|
|
1370
|
+
direction: "desc"
|
|
1371
|
+
} : {
|
|
1372
|
+
column: e,
|
|
1373
|
+
direction: "asc"
|
|
1374
|
+
};
|
|
1375
|
+
s ? s(t) : g(t);
|
|
1376
|
+
}, [_, s]), y = o(() => {
|
|
1377
|
+
if (!_ || s) return t;
|
|
1378
|
+
let n = e.find((e) => e.key === _.column);
|
|
1379
|
+
if (!n?.sortValue) return t;
|
|
1380
|
+
let r = n.sortValue;
|
|
1381
|
+
return [...t].sort((e, t) => {
|
|
1382
|
+
let n = r(e), i = r(t);
|
|
1383
|
+
if (n == null && i == null) return 0;
|
|
1384
|
+
if (n == null) return 1;
|
|
1385
|
+
if (i == null) return -1;
|
|
1386
|
+
let a = typeof n == "number" && typeof i == "number" ? n - i : String(n).localeCompare(String(i));
|
|
1387
|
+
return _.direction === "asc" ? a : -a;
|
|
1388
|
+
});
|
|
1389
|
+
}, [
|
|
1390
|
+
t,
|
|
1391
|
+
_,
|
|
1392
|
+
e,
|
|
1393
|
+
s
|
|
1394
|
+
]), b = o(() => {
|
|
1395
|
+
let n = /* @__PURE__ */ new Map();
|
|
1396
|
+
for (let r of e) r.sortable && n.set(r.key, ot(r, t));
|
|
1397
|
+
return n;
|
|
1398
|
+
}, [e, t]), x = y.length === 0;
|
|
1399
|
+
return /* @__PURE__ */ d("div", {
|
|
1400
|
+
ref: m,
|
|
1401
|
+
className: ["overflow-x-auto rounded-md border border-border", u].filter(Boolean).join(" "),
|
|
1402
|
+
...p,
|
|
1403
|
+
children: /* @__PURE__ */ f("table", {
|
|
1404
|
+
className: "w-full text-body text-left",
|
|
1405
|
+
children: [/* @__PURE__ */ d("thead", { children: /* @__PURE__ */ d("tr", {
|
|
1406
|
+
className: "bg-bg-secondary border-b border-border",
|
|
1407
|
+
children: e.map((e) => {
|
|
1408
|
+
let t = _?.column === e.key;
|
|
1409
|
+
return /* @__PURE__ */ d("th", {
|
|
1410
|
+
className: [
|
|
1411
|
+
"px-md py-sm font-semibold text-small text-text-secondary whitespace-nowrap",
|
|
1412
|
+
e.sortable && "cursor-pointer select-none hover:text-text-primary",
|
|
1413
|
+
e.headerClassName
|
|
1414
|
+
].filter(Boolean).join(" "),
|
|
1415
|
+
onClick: e.sortable ? () => v(e.key) : void 0,
|
|
1416
|
+
"aria-sort": t ? _.direction === "asc" ? "ascending" : "descending" : e.sortable ? "none" : void 0,
|
|
1417
|
+
children: /* @__PURE__ */ f("span", {
|
|
1418
|
+
className: "inline-flex items-center",
|
|
1419
|
+
children: [e.header, e.sortable && /* @__PURE__ */ d(st, {
|
|
1420
|
+
active: t,
|
|
1421
|
+
direction: t ? _.direction : void 0,
|
|
1422
|
+
columnType: b.get(e.key) ?? "text"
|
|
1423
|
+
})]
|
|
1424
|
+
})
|
|
1425
|
+
}, e.key);
|
|
1426
|
+
})
|
|
1427
|
+
}) }), /* @__PURE__ */ d("tbody", { children: x ? /* @__PURE__ */ d("tr", { children: /* @__PURE__ */ d("td", {
|
|
1428
|
+
colSpan: e.length,
|
|
1429
|
+
className: "px-md py-xl text-center text-text-secondary",
|
|
1430
|
+
children: l ?? "No data available."
|
|
1431
|
+
}) }) : y.map((t, n) => /* @__PURE__ */ d("tr", {
|
|
1432
|
+
className: [
|
|
1433
|
+
"border-b border-border last:border-b-0 transition-colors",
|
|
1434
|
+
i && n % 2 == 1 && "bg-bg-tertiary/50",
|
|
1435
|
+
"hover:bg-bg-tertiary/70"
|
|
1436
|
+
].filter(Boolean).join(" "),
|
|
1437
|
+
children: e.map((e) => /* @__PURE__ */ d("td", {
|
|
1438
|
+
className: ["px-md py-sm text-text-primary", e.cellClassName].filter(Boolean).join(" "),
|
|
1439
|
+
children: e.cell(t, n)
|
|
1440
|
+
}, e.key))
|
|
1441
|
+
}, r(t, n))) })]
|
|
1442
|
+
})
|
|
1443
|
+
});
|
|
1444
|
+
}), lt = {
|
|
1445
|
+
success: {
|
|
1446
|
+
bg: "bg-success-bg",
|
|
1447
|
+
border: "border-success/30",
|
|
1448
|
+
text: "text-success",
|
|
1449
|
+
icon: p
|
|
1450
|
+
},
|
|
1451
|
+
warning: {
|
|
1452
|
+
bg: "bg-warning-bg",
|
|
1453
|
+
border: "border-warning/30",
|
|
1454
|
+
text: "text-warning",
|
|
1455
|
+
icon: g
|
|
1456
|
+
},
|
|
1457
|
+
error: {
|
|
1458
|
+
bg: "bg-error-bg",
|
|
1459
|
+
border: "border-error/30",
|
|
1460
|
+
text: "text-error",
|
|
1461
|
+
icon: D
|
|
1462
|
+
},
|
|
1463
|
+
info: {
|
|
1464
|
+
bg: "bg-info-bg",
|
|
1465
|
+
border: "border-info/30",
|
|
1466
|
+
text: "text-info",
|
|
1467
|
+
icon: _
|
|
1468
|
+
}
|
|
1736
1469
|
};
|
|
1737
|
-
function
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
]
|
|
1772
|
-
}
|
|
1773
|
-
);
|
|
1470
|
+
function ut({ variant: e, title: t, children: n, dismissible: r = !1, onDismiss: i, className: a = "" }) {
|
|
1471
|
+
let [o, s] = c(!0), { bg: l, border: u, text: p, icon: m } = lt[e];
|
|
1472
|
+
if (!o) return null;
|
|
1473
|
+
let h = () => {
|
|
1474
|
+
s(!1), i?.();
|
|
1475
|
+
};
|
|
1476
|
+
return /* @__PURE__ */ f("div", {
|
|
1477
|
+
role: "alert",
|
|
1478
|
+
className: `flex gap-3 rounded-md border p-md ${l} ${u} ${a}`,
|
|
1479
|
+
children: [
|
|
1480
|
+
/* @__PURE__ */ d(m, {
|
|
1481
|
+
size: 20,
|
|
1482
|
+
className: `shrink-0 mt-0.5 ${p}`,
|
|
1483
|
+
"aria-hidden": !0
|
|
1484
|
+
}),
|
|
1485
|
+
/* @__PURE__ */ f("div", {
|
|
1486
|
+
className: "flex-1 min-w-0",
|
|
1487
|
+
children: [t && /* @__PURE__ */ d("p", {
|
|
1488
|
+
className: `font-semibold text-body ${p}`,
|
|
1489
|
+
children: t
|
|
1490
|
+
}), /* @__PURE__ */ d("div", {
|
|
1491
|
+
className: "text-body text-text-primary",
|
|
1492
|
+
children: n
|
|
1493
|
+
})]
|
|
1494
|
+
}),
|
|
1495
|
+
r && /* @__PURE__ */ d("button", {
|
|
1496
|
+
type: "button",
|
|
1497
|
+
onClick: h,
|
|
1498
|
+
className: "shrink-0 p-1 rounded-sm text-text-secondary hover:text-text-primary hover:bg-bg-tertiary transition-colors cursor-pointer",
|
|
1499
|
+
"aria-label": "Dismiss alert",
|
|
1500
|
+
children: /* @__PURE__ */ d(E, { size: 16 })
|
|
1501
|
+
})
|
|
1502
|
+
]
|
|
1503
|
+
});
|
|
1774
1504
|
}
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1505
|
+
//#endregion
|
|
1506
|
+
//#region src/components/feedback/Dialog.tsx
|
|
1507
|
+
var dt = {
|
|
1508
|
+
sm: "max-w-[24rem]",
|
|
1509
|
+
md: "max-w-[32rem]",
|
|
1510
|
+
lg: "max-w-[42rem]"
|
|
1779
1511
|
};
|
|
1780
|
-
function
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
}) {
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
type: "button",
|
|
1868
|
-
onClick: r,
|
|
1869
|
-
className: "shrink-0 p-1 rounded-sm text-text-secondary hover:text-text-primary hover:bg-bg-tertiary transition-colors cursor-pointer",
|
|
1870
|
-
"aria-label": "Close dialog",
|
|
1871
|
-
children: /* @__PURE__ */ e(U, { size: 18 })
|
|
1872
|
-
}
|
|
1873
|
-
)
|
|
1874
|
-
] }),
|
|
1875
|
-
/* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto px-lg py-md text-body text-text-primary", children: s }),
|
|
1876
|
-
i && /* @__PURE__ */ e("div", { className: "flex items-center justify-end gap-sm px-lg py-md border-t border-border", children: i })
|
|
1877
|
-
]
|
|
1878
|
-
}
|
|
1879
|
-
)
|
|
1880
|
-
}
|
|
1881
|
-
)
|
|
1882
|
-
]
|
|
1883
|
-
}
|
|
1884
|
-
),
|
|
1885
|
-
document.body
|
|
1886
|
-
) : null;
|
|
1512
|
+
function ft({ open: e, onClose: t, title: n, size: r = "md", children: a, footer: o, className: c = "" }) {
|
|
1513
|
+
let l = s(null);
|
|
1514
|
+
i(() => {
|
|
1515
|
+
if (!e) return;
|
|
1516
|
+
let t = document.activeElement;
|
|
1517
|
+
return l.current?.focus(), () => {
|
|
1518
|
+
t?.focus();
|
|
1519
|
+
};
|
|
1520
|
+
}, [e]), i(() => {
|
|
1521
|
+
if (!e) return;
|
|
1522
|
+
let t = document.body.style.overflow;
|
|
1523
|
+
return document.body.style.overflow = "hidden", () => {
|
|
1524
|
+
document.body.style.overflow = t;
|
|
1525
|
+
};
|
|
1526
|
+
}, [e]);
|
|
1527
|
+
let u = (e) => {
|
|
1528
|
+
if (e.key === "Escape") {
|
|
1529
|
+
t();
|
|
1530
|
+
return;
|
|
1531
|
+
}
|
|
1532
|
+
if (e.key === "Tab" && l.current) {
|
|
1533
|
+
let t = l.current.querySelectorAll("a[href], button:not([disabled]), textarea, input:not([disabled]), select, [tabindex]:not([tabindex=\"-1\"])");
|
|
1534
|
+
if (t.length === 0) return;
|
|
1535
|
+
let n = t[0], r = t[t.length - 1];
|
|
1536
|
+
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
|
|
1537
|
+
}
|
|
1538
|
+
};
|
|
1539
|
+
return e ? ae(/* @__PURE__ */ f("div", {
|
|
1540
|
+
style: {
|
|
1541
|
+
position: "fixed",
|
|
1542
|
+
inset: 0,
|
|
1543
|
+
zIndex: 50,
|
|
1544
|
+
overflowY: "auto"
|
|
1545
|
+
},
|
|
1546
|
+
"aria-modal": "true",
|
|
1547
|
+
role: "dialog",
|
|
1548
|
+
"aria-labelledby": n ? "dialog-title" : void 0,
|
|
1549
|
+
onKeyDown: u,
|
|
1550
|
+
children: [/* @__PURE__ */ d("div", {
|
|
1551
|
+
style: {
|
|
1552
|
+
position: "fixed",
|
|
1553
|
+
inset: 0
|
|
1554
|
+
},
|
|
1555
|
+
className: "bg-black/50",
|
|
1556
|
+
"aria-hidden": !0,
|
|
1557
|
+
onClick: t
|
|
1558
|
+
}), /* @__PURE__ */ d("div", {
|
|
1559
|
+
style: {
|
|
1560
|
+
display: "flex",
|
|
1561
|
+
minHeight: "100%",
|
|
1562
|
+
width: "100%",
|
|
1563
|
+
alignItems: "center",
|
|
1564
|
+
justifyContent: "center",
|
|
1565
|
+
padding: "var(--spacing-md, 16px)",
|
|
1566
|
+
boxSizing: "border-box"
|
|
1567
|
+
},
|
|
1568
|
+
children: /* @__PURE__ */ f("div", {
|
|
1569
|
+
ref: l,
|
|
1570
|
+
tabIndex: -1,
|
|
1571
|
+
className: `relative z-10 flex flex-col w-full ${dt[r]} rounded-lg border border-border bg-bg-primary shadow-xl outline-none animate-dialog-in ${c}`,
|
|
1572
|
+
children: [
|
|
1573
|
+
n && /* @__PURE__ */ f("div", {
|
|
1574
|
+
className: "flex items-center justify-between px-lg py-md border-b border-border",
|
|
1575
|
+
children: [/* @__PURE__ */ d("h2", {
|
|
1576
|
+
id: "dialog-title",
|
|
1577
|
+
className: "text-h3 font-semibold text-text-primary",
|
|
1578
|
+
children: n
|
|
1579
|
+
}), /* @__PURE__ */ d("button", {
|
|
1580
|
+
type: "button",
|
|
1581
|
+
onClick: t,
|
|
1582
|
+
className: "shrink-0 p-1 rounded-sm text-text-secondary hover:text-text-primary hover:bg-bg-tertiary transition-colors cursor-pointer",
|
|
1583
|
+
"aria-label": "Close dialog",
|
|
1584
|
+
children: /* @__PURE__ */ d(E, { size: 18 })
|
|
1585
|
+
})]
|
|
1586
|
+
}),
|
|
1587
|
+
/* @__PURE__ */ d("div", {
|
|
1588
|
+
className: "flex-1 overflow-y-auto px-lg py-md text-body text-text-primary",
|
|
1589
|
+
children: a
|
|
1590
|
+
}),
|
|
1591
|
+
o && /* @__PURE__ */ d("div", {
|
|
1592
|
+
className: "flex items-center justify-end gap-sm px-lg py-md border-t border-border",
|
|
1593
|
+
children: o
|
|
1594
|
+
})
|
|
1595
|
+
]
|
|
1596
|
+
})
|
|
1597
|
+
})]
|
|
1598
|
+
}), document.body) : null;
|
|
1887
1599
|
}
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
"button",
|
|
1928
|
-
{
|
|
1929
|
-
type: "button",
|
|
1930
|
-
onClick: o,
|
|
1931
|
-
disabled: d,
|
|
1932
|
-
className: [
|
|
1933
|
-
"inline-flex items-center justify-center gap-2 px-4 py-2 rounded-md text-small font-medium text-white transition-colors cursor-pointer",
|
|
1934
|
-
c ? "bg-error hover:bg-error/80" : "bg-primary hover:bg-primary-hover",
|
|
1935
|
-
d && "opacity-80 pointer-events-none"
|
|
1936
|
-
].filter(Boolean).join(" "),
|
|
1937
|
-
children: [
|
|
1938
|
-
d && /* @__PURE__ */ e(te, { size: "sm" }),
|
|
1939
|
-
i
|
|
1940
|
-
]
|
|
1941
|
-
}
|
|
1942
|
-
)
|
|
1943
|
-
] })
|
|
1944
|
-
] });
|
|
1600
|
+
//#endregion
|
|
1601
|
+
//#region src/components/feedback/ConfirmDialog.tsx
|
|
1602
|
+
function pt({ open: e, onCancel: t, onConfirm: n, title: r, children: i, confirmLabel: a = "Confirm", cancelLabel: o = "Cancel", danger: s = !1, submitting: c = !1, size: l = "sm" }) {
|
|
1603
|
+
return /* @__PURE__ */ f(ft, {
|
|
1604
|
+
open: e,
|
|
1605
|
+
onClose: t,
|
|
1606
|
+
title: r,
|
|
1607
|
+
size: l,
|
|
1608
|
+
children: [/* @__PURE__ */ f("div", {
|
|
1609
|
+
className: "flex gap-3",
|
|
1610
|
+
children: [s && /* @__PURE__ */ d(g, {
|
|
1611
|
+
size: 22,
|
|
1612
|
+
className: "shrink-0 mt-0.5 text-error",
|
|
1613
|
+
"aria-hidden": !0
|
|
1614
|
+
}), /* @__PURE__ */ d("div", {
|
|
1615
|
+
className: "text-body text-text-secondary",
|
|
1616
|
+
children: i
|
|
1617
|
+
})]
|
|
1618
|
+
}), /* @__PURE__ */ f("div", {
|
|
1619
|
+
className: "flex items-center justify-end gap-sm mt-lg",
|
|
1620
|
+
children: [/* @__PURE__ */ d("button", {
|
|
1621
|
+
type: "button",
|
|
1622
|
+
onClick: t,
|
|
1623
|
+
disabled: c,
|
|
1624
|
+
className: ["px-4 py-2 rounded-md text-small font-medium text-text-primary bg-bg-secondary hover:bg-bg-tertiary border border-border transition-colors cursor-pointer", c && "opacity-50 pointer-events-none"].filter(Boolean).join(" "),
|
|
1625
|
+
children: o
|
|
1626
|
+
}), /* @__PURE__ */ f("button", {
|
|
1627
|
+
type: "button",
|
|
1628
|
+
onClick: n,
|
|
1629
|
+
disabled: c,
|
|
1630
|
+
className: [
|
|
1631
|
+
"inline-flex items-center justify-center gap-2 px-4 py-2 rounded-md text-small font-medium text-white transition-colors cursor-pointer",
|
|
1632
|
+
s ? "bg-error hover:bg-error/80" : "bg-primary hover:bg-primary-hover",
|
|
1633
|
+
c && "opacity-80 pointer-events-none"
|
|
1634
|
+
].filter(Boolean).join(" "),
|
|
1635
|
+
children: [c && /* @__PURE__ */ d(V, { size: "sm" }), a]
|
|
1636
|
+
})]
|
|
1637
|
+
})]
|
|
1638
|
+
});
|
|
1945
1639
|
}
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1640
|
+
//#endregion
|
|
1641
|
+
//#region src/components/feedback/toastContext.ts
|
|
1642
|
+
var mt = e(null);
|
|
1643
|
+
function ht() {
|
|
1644
|
+
let e = r(mt);
|
|
1645
|
+
if (!e) throw Error("useToast must be used within a <ToastProvider>");
|
|
1646
|
+
return e;
|
|
1951
1647
|
}
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1648
|
+
//#endregion
|
|
1649
|
+
//#region src/components/feedback/Toast.tsx
|
|
1650
|
+
var gt = {
|
|
1651
|
+
success: {
|
|
1652
|
+
bg: "bg-bg-primary",
|
|
1653
|
+
accent: "bg-success",
|
|
1654
|
+
text: "text-success",
|
|
1655
|
+
icon: p
|
|
1656
|
+
},
|
|
1657
|
+
warning: {
|
|
1658
|
+
bg: "bg-bg-primary",
|
|
1659
|
+
accent: "bg-warning",
|
|
1660
|
+
text: "text-warning",
|
|
1661
|
+
icon: g
|
|
1662
|
+
},
|
|
1663
|
+
error: {
|
|
1664
|
+
bg: "bg-bg-primary",
|
|
1665
|
+
accent: "bg-error",
|
|
1666
|
+
text: "text-error",
|
|
1667
|
+
icon: D
|
|
1668
|
+
},
|
|
1669
|
+
info: {
|
|
1670
|
+
bg: "bg-bg-primary",
|
|
1671
|
+
accent: "bg-info",
|
|
1672
|
+
text: "text-info",
|
|
1673
|
+
icon: _
|
|
1674
|
+
}
|
|
1977
1675
|
};
|
|
1978
|
-
function
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
1676
|
+
function _t({ toast: e, onRemove: t }) {
|
|
1677
|
+
let { variant: n, title: r, message: a, duration: o = 5e3 } = e, { bg: l, accent: u, text: p, icon: m } = gt[n], [h, g] = c(100), _ = s(0), v = s(0);
|
|
1678
|
+
return i(() => {
|
|
1679
|
+
if (o <= 0) return;
|
|
1680
|
+
_.current = performance.now();
|
|
1681
|
+
let n = (r) => {
|
|
1682
|
+
let i = r - _.current, a = Math.max(0, 100 - i / o * 100);
|
|
1683
|
+
if (g(a), a <= 0) {
|
|
1684
|
+
t(e.id);
|
|
1685
|
+
return;
|
|
1686
|
+
}
|
|
1687
|
+
v.current = requestAnimationFrame(n);
|
|
1688
|
+
};
|
|
1689
|
+
return v.current = requestAnimationFrame(n), () => cancelAnimationFrame(v.current);
|
|
1690
|
+
}, [
|
|
1691
|
+
o,
|
|
1692
|
+
e.id,
|
|
1693
|
+
t
|
|
1694
|
+
]), /* @__PURE__ */ f("div", {
|
|
1695
|
+
role: "status",
|
|
1696
|
+
"aria-live": "polite",
|
|
1697
|
+
className: `relative overflow-hidden rounded-lg border border-border shadow-lg ${l} w-80 animate-slide-in`,
|
|
1698
|
+
children: [/* @__PURE__ */ f("div", {
|
|
1699
|
+
className: "flex gap-3 p-md",
|
|
1700
|
+
children: [
|
|
1701
|
+
/* @__PURE__ */ d(m, {
|
|
1702
|
+
size: 18,
|
|
1703
|
+
className: `shrink-0 mt-0.5 ${p}`,
|
|
1704
|
+
"aria-hidden": !0
|
|
1705
|
+
}),
|
|
1706
|
+
/* @__PURE__ */ f("div", {
|
|
1707
|
+
className: "flex-1 min-w-0",
|
|
1708
|
+
children: [r && /* @__PURE__ */ d("p", {
|
|
1709
|
+
className: "font-semibold text-small text-text-primary",
|
|
1710
|
+
children: r
|
|
1711
|
+
}), /* @__PURE__ */ d("p", {
|
|
1712
|
+
className: "text-small text-text-secondary",
|
|
1713
|
+
children: a
|
|
1714
|
+
})]
|
|
1715
|
+
}),
|
|
1716
|
+
/* @__PURE__ */ d("button", {
|
|
1717
|
+
type: "button",
|
|
1718
|
+
onClick: () => t(e.id),
|
|
1719
|
+
className: "shrink-0 p-1 rounded-sm text-text-secondary hover:text-text-primary hover:bg-bg-tertiary transition-colors cursor-pointer",
|
|
1720
|
+
"aria-label": "Dismiss notification",
|
|
1721
|
+
children: /* @__PURE__ */ d(E, { size: 14 })
|
|
1722
|
+
})
|
|
1723
|
+
]
|
|
1724
|
+
}), o > 0 && /* @__PURE__ */ d("div", {
|
|
1725
|
+
className: "h-0.5 w-full bg-bg-tertiary",
|
|
1726
|
+
children: /* @__PURE__ */ d("div", {
|
|
1727
|
+
className: `h-full ${u} transition-none`,
|
|
1728
|
+
style: { width: `${h}%` }
|
|
1729
|
+
})
|
|
1730
|
+
})]
|
|
1731
|
+
});
|
|
2026
1732
|
}
|
|
2027
|
-
|
|
2028
|
-
function
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
1733
|
+
var vt = 0;
|
|
1734
|
+
function yt({ children: e }) {
|
|
1735
|
+
let [t, r] = c([]), i = n((e) => {
|
|
1736
|
+
let t = `toast-${++vt}`;
|
|
1737
|
+
return r((n) => [...n, {
|
|
1738
|
+
...e,
|
|
1739
|
+
id: t
|
|
1740
|
+
}]), t;
|
|
1741
|
+
}, []), a = n((e) => {
|
|
1742
|
+
r((t) => t.filter((t) => t.id !== e));
|
|
1743
|
+
}, []);
|
|
1744
|
+
return /* @__PURE__ */ f(mt, {
|
|
1745
|
+
value: {
|
|
1746
|
+
addToast: i,
|
|
1747
|
+
removeToast: a
|
|
1748
|
+
},
|
|
1749
|
+
children: [e, /* @__PURE__ */ d("div", {
|
|
1750
|
+
"aria-label": "Notifications",
|
|
1751
|
+
className: "fixed bottom-lg right-lg z-50 flex flex-col-reverse gap-sm pointer-events-none",
|
|
1752
|
+
children: t.map((e) => /* @__PURE__ */ d("div", {
|
|
1753
|
+
className: "pointer-events-auto",
|
|
1754
|
+
children: /* @__PURE__ */ d(_t, {
|
|
1755
|
+
toast: e,
|
|
1756
|
+
onRemove: a
|
|
1757
|
+
})
|
|
1758
|
+
}, e.id))
|
|
1759
|
+
})]
|
|
1760
|
+
});
|
|
2046
1761
|
}
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
1762
|
+
//#endregion
|
|
1763
|
+
//#region src/hooks/useAuth.tsx
|
|
1764
|
+
var bt = e(null), xt = {
|
|
1765
|
+
name: "Alice Martin",
|
|
1766
|
+
email: "alice.martin@epfl.ch",
|
|
1767
|
+
role: "admin"
|
|
2051
1768
|
};
|
|
2052
|
-
function
|
|
2053
|
-
|
|
2054
|
-
|
|
1769
|
+
function St({ initialUser: e = xt, children: t }) {
|
|
1770
|
+
let [n, r] = c(e), i = (e) => r((t) => ({
|
|
1771
|
+
...t,
|
|
1772
|
+
role: e
|
|
1773
|
+
})), a = o(() => ({
|
|
1774
|
+
user: n,
|
|
1775
|
+
setRole: i
|
|
1776
|
+
}), [n]);
|
|
1777
|
+
return /* @__PURE__ */ d(bt.Provider, {
|
|
1778
|
+
value: a,
|
|
1779
|
+
children: t
|
|
1780
|
+
});
|
|
2055
1781
|
}
|
|
2056
|
-
function
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
1782
|
+
function Ct() {
|
|
1783
|
+
let e = r(bt);
|
|
1784
|
+
if (!e) throw Error("useAuth must be used within an AuthProvider");
|
|
1785
|
+
return e;
|
|
2060
1786
|
}
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
Et as Badge,
|
|
2066
|
-
ut as BurgerDrawer,
|
|
2067
|
-
St as Button,
|
|
2068
|
-
Jt as Card,
|
|
2069
|
-
Pt as Checkbox,
|
|
2070
|
-
rr as ConfirmDialog,
|
|
2071
|
-
Qt as DescriptionList,
|
|
2072
|
-
ht as Dialog,
|
|
2073
|
-
Ot as DropdownDivider,
|
|
2074
|
-
Vt as DropdownItem,
|
|
2075
|
-
Ut as DropdownMenu,
|
|
2076
|
-
Zt as EmptyState,
|
|
2077
|
-
Bt as FileUpload,
|
|
2078
|
-
He as IconButton,
|
|
2079
|
-
Lt as Input,
|
|
2080
|
-
Xt as LanguageSwitcher,
|
|
2081
|
-
Wt as PageShell,
|
|
2082
|
-
Kt as Popover,
|
|
2083
|
-
At as ProgressBar,
|
|
2084
|
-
Qe as RadioGroup,
|
|
2085
|
-
Tt as Select,
|
|
2086
|
-
dt as SideNav,
|
|
2087
|
-
te as Spinner,
|
|
2088
|
-
Rt as Switch,
|
|
2089
|
-
Ht as TabPanel,
|
|
2090
|
-
er as Table,
|
|
2091
|
-
qt as Tabs,
|
|
2092
|
-
Mt as Textarea,
|
|
2093
|
-
_t as ThemeToggle,
|
|
2094
|
-
or as ToastProvider,
|
|
2095
|
-
Gt as Tooltip,
|
|
2096
|
-
ct as TopNav,
|
|
2097
|
-
oe as epflSelectClassNames,
|
|
2098
|
-
et as epflSelectTheme,
|
|
2099
|
-
Yt as initTheme,
|
|
2100
|
-
sr as useAuth,
|
|
2101
|
-
rt as useLanguage,
|
|
2102
|
-
lt as useTheme,
|
|
2103
|
-
nr as useToast
|
|
2104
|
-
};
|
|
2105
|
-
//# sourceMappingURL=poesis.js.map
|
|
1787
|
+
//#endregion
|
|
1788
|
+
export { ut as Alert, St as AuthProvider, ce as Avatar, de as Badge, et as BurgerDrawer, ge as Button, rt as Card, we as Checkbox, pt as ConfirmDialog, it as DescriptionList, ft as Dialog, Pe as DropdownDivider, Fe as DropdownItem, Ie as DropdownMenu, at as EmptyState, be as FileUpload, H as IconButton, Oe as Input, Ue as LanguageSwitcher, nt as PageShell, Le as Popover, Ce as ProgressBar, G as RadioGroup, je as Select, Qe as SideNav, V as Spinner, Me as Switch, Re as TabPanel, ct as Table, ze as Tabs, Ne as Textarea, Xe as ThemeToggle, yt as ToastProvider, Ve as Tooltip, Ze as TopNav, q as epflSelectClassNames, K as epflSelectTheme, Je as initTheme, Ct as useAuth, X as useLanguage, Ye as useTheme, ht as useToast };
|
|
1789
|
+
|
|
1790
|
+
//# sourceMappingURL=poesis.js.map
|