(()=>{"use strict";var e,t,r={338(e,t,r){var o=r(795);t.createRoot=o.createRoot,t.hydrateRoot=o.hydrateRoot},795(e){e.exports=window.ReactDOM}},o={};function n(e){var t=o[e];if(void 0!==t)return t.exports;var s=o[e]={exports:{}};return r[e](s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var s=Object.create(null);n.r(s);var i={};e=e||[null,t({}),t([]),t(t)];for(var a=2&o&&r;("object"==typeof a||"function"==typeof a)&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(e=>i[e]=()=>r[e]);return i.default=()=>r,n.d(s,i),s},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};const s=window.React;var i=n.t(s,2),a=n.n(s),l=n(338);const c=window.ReactJSXRuntime;function d(e){return"auto"===e||"dark"===e||"light"===e}function u({key:e="mantine-color-scheme-value"}={}){let t;return{get:t=>{if("undefined"==typeof window)return t;try{const r=window.localStorage.getItem(e);return d(r)?r:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(e){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",e)}},subscribe:r=>{t=t=>{t.storageArea===window.localStorage&&t.key===e&&d(t.newValue)&&r(t.newValue)},window.addEventListener("storage",t)},unsubscribe:()=>{window.removeEventListener("storage",t)},clear:()=>{window.localStorage.removeItem(e)}}}const p=(0,s.createContext)(null);function m(){const e=(0,s.useContext)(p);if(!e)throw new Error("[@mantine/core] MantineProvider was not found in tree");return e}function f(){return m().getStyleNonce}function h(){return m().env||"default"}function g(e){return Object.keys(e)}function y(e){return"0rem"===e?"0rem":`calc(${e} * var(--mantine-scale))`}function b(e,{shouldScale:t=!1}={}){return function r(o){if(0===o||"0"===o)return`0${e}`;if("number"==typeof o){const r=`${o/16}${e}`;return t?y(r):r}if("string"==typeof o){if(""===o)return o;if(o.startsWith("calc(")||o.startsWith("clamp(")||o.includes("rgba("))return o;if(o.includes(","))return o.split(",").map(e=>r(e)).join(",");if(o.includes(" "))return o.split(" ").map(e=>r(e)).join(" ");if(o.includes(e))return t?y(o):o;const n=o.replace("px","");if(!Number.isNaN(Number(n))){const r=`${Number(n)/16}${e}`;return t?y(r):r}}return o}}const v=b("rem",{shouldScale:!0}),w=b("em");function x(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)?function(e){let t=e.replace("#","");if(3===t.length){const e=t.split("");t=[e[0],e[0],e[1],e[1],e[2],e[2]].join("")}if(8===t.length){const e=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:e}}const r=parseInt(t,16);return{r:r>>16&255,g:r>>8&255,b:255&r,a:1}}(e):e.startsWith("rgb")?function(e){const[t,r,o,n]=e.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:t,g:r,b:o,a:void 0===n?1:n}}(e):e.startsWith("hsl")?function(e){const t=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!t)return{r:0,g:0,b:0,a:1};const r=parseInt(t[1],10),o=parseInt(t[2],10)/100,n=parseInt(t[3],10)/100,s=t[5]?parseFloat(t[5]):void 0,i=(1-Math.abs(2*n-1))*o,a=r/60,l=i*(1-Math.abs(a%2-1)),c=n-i/2;let d,u,p;return a>=0&&a<1?(d=i,u=l,p=0):a>=1&&a<2?(d=l,u=i,p=0):a>=2&&a<3?(d=0,u=i,p=l):a>=3&&a<4?(d=0,u=l,p=i):a>=4&&a<5?(d=l,u=0,p=i):(d=i,u=0,p=l),{r:Math.round(255*(d+c)),g:Math.round(255*(u+c)),b:Math.round(255*(p+c)),a:s||1}}(e):{r:0,g:0,b:0,a:1}}function C(e,t){if(e.startsWith("var("))return`color-mix(in srgb, ${e}, black ${100*t}%)`;const{r,g:o,b:n,a:s}=x(e),i=1-t,a=e=>Math.round(e*i);return`rgba(${a(r)}, ${a(o)}, ${a(n)}, ${s})`}function S(e,t){return"number"==typeof e.primaryShade?e.primaryShade:"dark"===t?e.primaryShade.dark:e.primaryShade.light}function N(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function j(e,t=.179){return!e.startsWith("var(")&&function(e){if(e.startsWith("oklch("))return(function(e){const t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}(e)||0)/100;const{r:t,g:r,b:o}=x(e),n=r/255,s=o/255;return.2126*N(t/255)+.7152*N(n)+.0722*N(s)}(e)>t}function P({color:e,theme:t,colorScheme:r}){if("string"!=typeof e)throw new Error("[@mantine/core] Failed to parse color. Expected color to be a string, instead got "+typeof e);if("bright"===e)return{color:e,value:"dark"===r?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:j("dark"===r?t.white:t.black,t.luminanceThreshold),variable:"--mantine-color-bright"};if("dimmed"===e)return{color:e,value:"dark"===r?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:j("dark"===r?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:"--mantine-color-dimmed"};if("white"===e||"black"===e)return{color:e,value:"white"===e?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:j("white"===e?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};const[o,n]=e.split("."),s=n?Number(n):void 0,i=o in t.colors;if(i){const e=void 0!==s?t.colors[o][s]:t.colors[o][S(t,r||"light")];return{color:o,value:e,shade:s,isThemeColor:i,isLight:j(e,t.luminanceThreshold),variable:n?`--mantine-color-${o}-${s}`:`--mantine-color-${o}-filled`}}return{color:e,value:e,isThemeColor:i,isLight:j(e,t.luminanceThreshold),shade:s,variable:void 0}}function _(e,t){const r=P({color:e||t.primaryColor,theme:t});return r.variable?`var(${r.variable})`:e}function $(e,t){const r={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},o=_(r.from,t),n=_(r.to,t);return`linear-gradient(${r.deg}deg, ${o} 0%, ${n} 100%)`}function k(e,t){if("string"!=typeof e||t>1||t<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var("))return`color-mix(in srgb, ${e}, transparent ${100*(1-t)}%)`;if(e.startsWith("oklch"))return e.includes("/")?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(")",` / ${t})`);const{r,g:o,b:n}=x(e);return`rgba(${r}, ${o}, ${n}, ${t})`}const R=k,E="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",T={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:{dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:({color:e,theme:t,variant:r,gradient:o,autoContrast:n})=>{const s=P({color:e,theme:t}),i="boolean"==typeof n?n:t.autoContrast;if("filled"===r){const t=i&&s.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return s.isThemeColor?void 0===s.shade?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:t,border:`${v(1)} solid transparent`}:{background:`var(--mantine-color-${s.color}-${s.shade})`,hover:`var(--mantine-color-${s.color}-${9===s.shade?8:s.shade+1})`,color:t,border:`${v(1)} solid transparent`}:{background:e,hover:C(e,.1),color:t,border:`${v(1)} solid transparent`}}if("light"===r){if(s.isThemeColor){if(void 0===s.shade)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${v(1)} solid transparent`};const r=t.colors[s.color][s.shade];return{background:k(r,.1),hover:k(r,.12),color:`var(--mantine-color-${s.color}-${Math.min(s.shade,6)})`,border:`${v(1)} solid transparent`}}return{background:k(e,.1),hover:k(e,.12),color:e,border:`${v(1)} solid transparent`}}return"outline"===r?s.isThemeColor?void 0===s.shade?{background:"transparent",hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${v(1)} solid var(--mantine-color-${e}-outline)`}:{background:"transparent",hover:k(t.colors[s.color][s.shade],.05),color:`var(--mantine-color-${s.color}-${s.shade})`,border:`${v(1)} solid var(--mantine-color-${s.color}-${s.shade})`}:{background:"transparent",hover:k(e,.05),color:e,border:`${v(1)} solid ${e}`}:"subtle"===r?s.isThemeColor?void 0===s.shade?{background:"transparent",hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${v(1)} solid transparent`}:{background:"transparent",hover:k(t.colors[s.color][s.shade],.12),color:`var(--mantine-color-${s.color}-${Math.min(s.shade,6)})`,border:`${v(1)} solid transparent`}:{background:"transparent",hover:k(e,.12),color:e,border:`${v(1)} solid transparent`}:"transparent"===r?s.isThemeColor?void 0===s.shade?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${e}-light-color)`,border:`${v(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${s.color}-${Math.min(s.shade,6)})`,border:`${v(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:e,border:`${v(1)} solid transparent`}:"white"===r?s.isThemeColor?void 0===s.shade?{background:"var(--mantine-color-white)",hover:C(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${v(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:C(t.white,.01),color:`var(--mantine-color-${s.color}-${s.shade})`,border:`${v(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:C(t.white,.01),color:e,border:`${v(1)} solid transparent`}:"gradient"===r?{background:$(o,t),hover:$(o,t),color:"var(--mantine-color-white)",border:"none"}:"default"===r?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${v(1)} solid var(--mantine-color-default-border)`}:{}},autoContrast:!1,luminanceThreshold:.3,fontFamily:E,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"sm",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:E,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:v(34),lineHeight:"1.3"},h2:{fontSize:v(26),lineHeight:"1.35"},h3:{fontSize:v(22),lineHeight:"1.4"},h4:{fontSize:v(18),lineHeight:"1.45"},h5:{fontSize:v(16),lineHeight:"1.5"},h6:{fontSize:v(14),lineHeight:"1.5"}}},fontSizes:{xs:v(12),sm:v(14),md:v(16),lg:v(18),xl:v(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},radius:{xs:v(2),sm:v(4),md:v(8),lg:v(16),xl:v(32)},spacing:{xs:v(10),sm:v(12),md:v(16),lg:v(20),xl:v(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${v(1)} ${v(3)} rgba(0, 0, 0, 0.05), 0 ${v(1)} ${v(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${v(1)} ${v(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${v(10)} ${v(15)} ${v(-5)}, rgba(0, 0, 0, 0.04) 0 ${v(7)} ${v(7)} ${v(-5)}`,md:`0 ${v(1)} ${v(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${v(20)} ${v(25)} ${v(-5)}, rgba(0, 0, 0, 0.04) 0 ${v(10)} ${v(10)} ${v(-5)}`,lg:`0 ${v(1)} ${v(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${v(28)} ${v(23)} ${v(-7)}, rgba(0, 0, 0, 0.04) 0 ${v(12)} ${v(12)} ${v(-7)}`,xl:`0 ${v(1)} ${v(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${v(36)} ${v(28)} ${v(-7)}, rgba(0, 0, 0, 0.04) 0 ${v(17)} ${v(17)} ${v(-7)}`},other:{},components:{}};function A(e){return e&&"object"==typeof e&&!Array.isArray(e)}function O(e,t){const r={...e},o=t;return A(e)&&A(t)&&Object.keys(t).forEach(t=>{A(o[t])?r[t]=t in e?O(r[t],o[t]):o[t]:r[t]=o[t]}),r}const z="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function D(e){return!(e<0||e>9)&&parseInt(e.toString(),10)===e}function L(e){if(!(e.primaryColor in e.colors))throw new Error("[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");if(!("object"!=typeof e.primaryShade||D(e.primaryShade.dark)&&D(e.primaryShade.light)))throw new Error(z);if("number"==typeof e.primaryShade&&!D(e.primaryShade))throw new Error(z)}const I=(0,s.createContext)(null);function M(){const e=(0,s.useContext)(I);if(!e)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return e}function F({theme:e,children:t,inherit:r=!0}){const o=(0,s.useContext)(I)||T,n=(0,s.useMemo)(()=>function(e,t){if(!t)return L(e),e;const r=O(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(r.headings.fontFamily=t.fontFamily),L(r),r}(r?o:T,e),[e,o,r]);return(0,c.jsx)(I.Provider,{value:n,children:t})}function W(){const e=M(),t=f(),r=g(e.breakpoints).reduce((t,r)=>{const o=e.breakpoints[r].includes("px"),n=function(e){const t=function(e){return"string"==typeof e&&e.includes("var(--mantine-scale)")?e.match(/^calc\((.*?)\)$/)?.[1].split("*")[0].trim():e}(e);return"number"==typeof t?t:"string"==typeof t?t.includes("calc")||t.includes("var")?t:t.includes("px")?Number(t.replace("px","")):t.includes("rem")?16*Number(t.replace("rem","")):t.includes("em")?16*Number(t.replace("em","")):Number(t):NaN}(e.breakpoints[r]);return`${t}@media (max-width: ${o?n-.1+"px":w(n-.1)}){.mantine-visible-from-${r} {display: none !important;}}@media (min-width: ${o?`${n}px`:w(n)}){.mantine-hidden-from-${r} {display: none !important;}}`},"");return(0,c.jsx)("style",{"data-mantine-styles":"classes",nonce:t?.(),dangerouslySetInnerHTML:{__html:r}})}function H(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join("")}function B(e,t){return(Array.isArray(e)?e:[e]).reduce((e,t)=>`${t}{${e}}`,t)}function V({color:e,theme:t,autoContrast:r}){return("boolean"==typeof r?r:t.autoContrast)&&P({color:e||t.primaryColor,theme:t}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function q(e,t){return V({color:e.colors[e.primaryColor][S(e,t)],theme:e,autoContrast:null})}function Y({theme:e,color:t,colorScheme:r,name:o=t,withColorValues:n=!0}){if(!e.colors[t])return{};if("light"===r){const r=S(e,"light"),s={[`--mantine-color-${o}-text`]:`var(--mantine-color-${o}-filled)`,[`--mantine-color-${o}-filled`]:`var(--mantine-color-${o}-${r})`,[`--mantine-color-${o}-filled-hover`]:`var(--mantine-color-${o}-${9===r?8:r+1})`,[`--mantine-color-${o}-light`]:R(e.colors[t][r],.1),[`--mantine-color-${o}-light-hover`]:R(e.colors[t][r],.12),[`--mantine-color-${o}-light-color`]:`var(--mantine-color-${o}-${r})`,[`--mantine-color-${o}-outline`]:`var(--mantine-color-${o}-${r})`,[`--mantine-color-${o}-outline-hover`]:R(e.colors[t][r],.05)};return n?{[`--mantine-color-${o}-0`]:e.colors[t][0],[`--mantine-color-${o}-1`]:e.colors[t][1],[`--mantine-color-${o}-2`]:e.colors[t][2],[`--mantine-color-${o}-3`]:e.colors[t][3],[`--mantine-color-${o}-4`]:e.colors[t][4],[`--mantine-color-${o}-5`]:e.colors[t][5],[`--mantine-color-${o}-6`]:e.colors[t][6],[`--mantine-color-${o}-7`]:e.colors[t][7],[`--mantine-color-${o}-8`]:e.colors[t][8],[`--mantine-color-${o}-9`]:e.colors[t][9],...s}:s}const s=S(e,"dark"),i={[`--mantine-color-${o}-text`]:`var(--mantine-color-${o}-4)`,[`--mantine-color-${o}-filled`]:`var(--mantine-color-${o}-${s})`,[`--mantine-color-${o}-filled-hover`]:`var(--mantine-color-${o}-${9===s?8:s+1})`,[`--mantine-color-${o}-light`]:R(e.colors[t][Math.max(0,s-2)],.15),[`--mantine-color-${o}-light-hover`]:R(e.colors[t][Math.max(0,s-2)],.2),[`--mantine-color-${o}-light-color`]:`var(--mantine-color-${o}-${Math.max(s-5,0)})`,[`--mantine-color-${o}-outline`]:`var(--mantine-color-${o}-${Math.max(s-4,0)})`,[`--mantine-color-${o}-outline-hover`]:R(e.colors[t][Math.max(s-4,0)],.05)};return n?{[`--mantine-color-${o}-0`]:e.colors[t][0],[`--mantine-color-${o}-1`]:e.colors[t][1],[`--mantine-color-${o}-2`]:e.colors[t][2],[`--mantine-color-${o}-3`]:e.colors[t][3],[`--mantine-color-${o}-4`]:e.colors[t][4],[`--mantine-color-${o}-5`]:e.colors[t][5],[`--mantine-color-${o}-6`]:e.colors[t][6],[`--mantine-color-${o}-7`]:e.colors[t][7],[`--mantine-color-${o}-8`]:e.colors[t][8],[`--mantine-color-${o}-9`]:e.colors[t][9],...i}:i}function X(e,t,r){g(t).forEach(o=>Object.assign(e,{[`--mantine-${r}-${o}`]:t[o]}))}F.displayName="@mantine/core/MantineThemeProvider";const U=e=>{const t=S(e,"light"),r=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:v(e.defaultRadius),o={variables:{"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-color-scheme":"light dark","--mantine-webkit-font-smoothing":e.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":e.fontSmoothing?"grayscale":"unset","--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":r,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-primary-color-contrast":q(e,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)"},dark:{"--mantine-primary-color-contrast":q(e,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)"}};X(o.variables,e.breakpoints,"breakpoint"),X(o.variables,e.spacing,"spacing"),X(o.variables,e.fontSizes,"font-size"),X(o.variables,e.lineHeights,"line-height"),X(o.variables,e.shadows,"shadow"),X(o.variables,e.radius,"radius"),e.colors[e.primaryColor].forEach((t,r)=>{o.variables[`--mantine-primary-color-${r}`]=`var(--mantine-color-${e.primaryColor}-${r})`}),g(e.colors).forEach(t=>{const r=e.colors[t];if(function(e){return!!e&&"object"==typeof e&&"mantine-virtual-color"in e}(r))return Object.assign(o.light,Y({theme:e,name:r.name,color:r.light,colorScheme:"light",withColorValues:!0})),void Object.assign(o.dark,Y({theme:e,name:r.name,color:r.dark,colorScheme:"dark",withColorValues:!0}));r.forEach((e,r)=>{o.variables[`--mantine-color-${t}-${r}`]=e}),Object.assign(o.light,Y({theme:e,color:t,colorScheme:"light",withColorValues:!1})),Object.assign(o.dark,Y({theme:e,color:t,colorScheme:"dark",withColorValues:!1}))});const n=e.headings.sizes;return g(n).forEach(t=>{o.variables[`--mantine-${t}-font-size`]=n[t].fontSize,o.variables[`--mantine-${t}-line-height`]=n[t].lineHeight,o.variables[`--mantine-${t}-font-weight`]=n[t].fontWeight||e.headings.fontWeight}),o},K=U(T);function G({cssVariablesSelector:e,deduplicateCssVariables:t}){const r=M(),o=f(),n=function({theme:e,generator:t}){const r=U(e),o=t?.(e);return o?O(r,o):r}({theme:r,generator:m().cssVariablesResolver}),s=":root"===e&&t,i=function(e,t){const r=H(e.variables),o=r?B(t,r):"",n=H(e.dark),s=H(e.light);return`${o}${n?B(":host"===t?`${t}([data-mantine-color-scheme="dark"])`:`${t}[data-mantine-color-scheme="dark"]`,n):""}${s?B(":host"===t?`${t}([data-mantine-color-scheme="light"])`:`${t}[data-mantine-color-scheme="light"]`,s):""}`}(s?function(e){const t={variables:{},light:{},dark:{}};return g(e.variables).forEach(r=>{K.variables[r]!==e.variables[r]&&(t.variables[r]=e.variables[r])}),g(e.light).forEach(r=>{K.light[r]!==e.light[r]&&(t.light[r]=e.light[r])}),g(e.dark).forEach(r=>{K.dark[r]!==e.dark[r]&&(t.dark[r]=e.dark[r])}),t}(n):n,e);return i?(0,c.jsx)("style",{"data-mantine-styles":!0,nonce:o?.(),dangerouslySetInnerHTML:{__html:`${i}${s?"":(a=e,`\n  ${a}[data-mantine-color-scheme="dark"] { --mantine-color-scheme: dark; }\n  ${a}[data-mantine-color-scheme="light"] { --mantine-color-scheme: light; }\n`)}`}}):null;var a}G.displayName="@mantine/CssVariables";const Z="undefined"!=typeof document?s.useLayoutEffect:s.useEffect;function J(e,t){const r="undefined"!=typeof window&&"matchMedia"in window&&window.matchMedia("(prefers-color-scheme: dark)")?.matches,o="auto"!==e?e:r?"dark":"light";t()?.setAttribute("data-mantine-color-scheme",o)}function Q({theme:e,children:t,getStyleNonce:r,withStaticClasses:o=!0,withGlobalClasses:n=!0,deduplicateCssVariables:i=!0,withCssVariables:a=!0,cssVariablesSelector:l=":root",classNamesPrefix:d="mantine",colorSchemeManager:m=u(),defaultColorScheme:f="light",getRootElement:h=()=>document.documentElement,cssVariablesResolver:g,forceColorScheme:y,stylesTransform:b,env:v}){const{colorScheme:w,setColorScheme:x,clearColorScheme:C}=function({manager:e,defaultColorScheme:t,getRootElement:r,forceColorScheme:o}){const n=(0,s.useRef)(null),[i,a]=(0,s.useState)(()=>e.get(t)),l=o||i,c=(0,s.useCallback)(t=>{o||(J(t,r),a(t),e.set(t))},[e.set,l,o]),d=(0,s.useCallback)(()=>{a(t),J(t,r),e.clear()},[e.clear,t]);return(0,s.useEffect)(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),Z(()=>{J(e.get(t),r)},[]),(0,s.useEffect)(()=>{if(o)return J(o,r),()=>{};void 0===o&&J(i,r),"undefined"!=typeof window&&"matchMedia"in window&&(n.current=window.matchMedia("(prefers-color-scheme: dark)"));const e=e=>{"auto"===i&&J(e.matches?"dark":"light",r)};return n.current?.addEventListener("change",e),()=>n.current?.removeEventListener("change",e)},[i,o]),{colorScheme:l,setColorScheme:c,clearColorScheme:d}}({defaultColorScheme:f,forceColorScheme:y,manager:m,getRootElement:h});return function({respectReducedMotion:e,getRootElement:t}){Z(()=>{e&&t()?.setAttribute("data-respect-reduced-motion","true")},[e])}({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:h}),(0,c.jsx)(p.Provider,{value:{colorScheme:w,setColorScheme:x,clearColorScheme:C,getRootElement:h,classNamesPrefix:d,getStyleNonce:r,cssVariablesResolver:g,cssVariablesSelector:l,withStaticClasses:o,stylesTransform:b,env:v},children:(0,c.jsxs)(F,{theme:e,children:[a&&(0,c.jsx)(G,{cssVariablesSelector:l,deduplicateCssVariables:i}),n&&(0,c.jsx)(W,{}),t]})})}function ee(e){return Object.keys(e).reduce((t,r)=>(void 0!==e[r]&&(t[r]=e[r]),t),{})}function te(e,t,r){const o=M(),n=o.components[e]?.defaultProps;return{...t,..."function"==typeof n?n(o):n,...ee(r)}}function re(e){return e}function oe(e){const t=(0,s.forwardRef)(e);return t.extend=re,t.withProps=e=>{const r=(0,s.forwardRef)((r,o)=>(0,c.jsx)(t,{...e,...r,ref:o}));return r.extend=t.extend,r.displayName=`WithProps(${t.displayName})`,r},t}function ne(e){if("number"==typeof e)return!0;if("string"==typeof e){if(e.startsWith("calc(")||e.startsWith("var(")||e.includes(" ")&&""!==e.trim())return!0;const t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(e=>t.test(e))}return!1}function se(e,t="size",r=!0){if(void 0!==e)return ne(e)?r?v(e):e:`var(--${t}-${e})`}function ie(e){return se(e,"mantine-spacing")}function ae(e){return void 0===e?"var(--mantine-radius-default)":se(e,"mantine-radius")}function le(e){return se(e,"mantine-font-size")}function ce(e){if(e)return se(e,"mantine-shadow",!1)}function de(e){var t,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=de(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}!function(){const e=console.error;console.error=(...t)=>{t.length>1&&"string"==typeof t[0]&&t[0].toLowerCase().includes("extra attributes from the server")&&"string"==typeof t[1]&&t[1].toLowerCase().includes("data-mantine-color-scheme")||e(...t)}}(),Q.displayName="@mantine/core/MantineProvider";const ue=function(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=de(e))&&(o&&(o+=" "),o+=t);return o},pe={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"},me={};function fe({theme:e,classNames:t,props:r,stylesCtx:o}){return function(e){const t={};return e.forEach(e=>{Object.entries(e).forEach(([e,r])=>{t[e]?t[e]=ue(t[e],r):t[e]=r})}),t}((Array.isArray(t)?t:[t]).map(t=>"function"==typeof t?t(e,r,o):t||me))}function he({selector:e,stylesCtx:t,theme:r,classNames:o,props:n}){return fe({theme:r,classNames:o,props:n,stylesCtx:t})[e]}function ge({theme:e,options:t,themeName:r,selector:o,classNamesPrefix:n,classNames:s,classes:i,unstyled:a,className:l,rootSelector:c,props:d,stylesCtx:u,withStaticClasses:p,headless:m,transformedStyles:f}){return ue(function({theme:e,options:t,unstyled:r}){return ue(t?.focusable&&!r&&(e.focusClassName||pe[e.focusRing]),t?.active&&!r&&e.activeClassName)}({theme:e,options:t,unstyled:a||m}),function({themeName:e,theme:t,selector:r,props:o,stylesCtx:n}){return e.map(e=>fe({theme:t,classNames:t.components[e]?.classNames,props:o,stylesCtx:n})?.[r])}({theme:e,themeName:r,selector:o,props:d,stylesCtx:u}),function({options:e,classes:t,selector:r,unstyled:o}){return e?.variant&&!o?t[`${r}--${e.variant}`]:void 0}({options:t,classes:i,selector:o,unstyled:a}),he({selector:o,stylesCtx:u,theme:e,classNames:s,props:d}),he({selector:o,stylesCtx:u,theme:e,classNames:f,props:d}),function({selector:e,stylesCtx:t,options:r,props:o,theme:n}){return fe({theme:n,classNames:r?.classNames,props:r?.props||o,stylesCtx:t})[e]}({selector:o,stylesCtx:u,options:t,props:d,theme:e}),function({rootSelector:e,selector:t,className:r}){return e===t?r:void 0}({rootSelector:c,selector:o,className:l}),function({selector:e,classes:t,unstyled:r}){return r?void 0:t[e]}({selector:o,classes:i,unstyled:a||m}),p&&!m&&function({themeName:e,classNamesPrefix:t,selector:r,withStaticClass:o}){return!1===o?[]:e.map(e=>`${t}-${e}-${r}`)}({themeName:r,classNamesPrefix:n,selector:o,withStaticClass:t?.withStaticClass}),t?.className)}function ye({theme:e,styles:t,props:r,stylesCtx:o}){return(Array.isArray(t)?t:[t]).reduce((t,n)=>"function"==typeof n?{...t,...n(e,r,o)}:{...t,...n},{})}function be({theme:e,themeName:t,props:r,stylesCtx:o,selector:n}){return t.map(t=>ye({theme:e,styles:e.components[t]?.styles,props:r,stylesCtx:o})[n]).reduce((e,t)=>({...e,...t}),{})}function ve({style:e,theme:t}){return Array.isArray(e)?[...e].reduce((e,r)=>({...e,...ve({style:r,theme:t})}),{}):"function"==typeof e?e(t):null==e?{}:e}function we({vars:e,varsResolver:t,theme:r,props:o,stylesCtx:n,selector:s,themeName:i,headless:a}){return function(e){return e.reduce((e,t)=>(t&&Object.keys(t).forEach(r=>{e[r]={...e[r],...ee(t[r])}}),e),{})}([a?{}:t?.(r,o,n),...i.map(e=>r.components?.[e]?.vars?.(r,o,n)),e?.(r,o,n)])?.[s]}function xe({theme:e,themeName:t,selector:r,options:o,props:n,stylesCtx:s,rootSelector:i,styles:a,style:l,vars:c,varsResolver:d,headless:u,withStylesTransform:p}){return{...!p&&be({theme:e,themeName:t,props:n,stylesCtx:s,selector:r}),...!p&&ye({theme:e,styles:a,props:n,stylesCtx:s})[r],...!p&&ye({theme:e,styles:o?.styles,props:o?.props||n,stylesCtx:s})[r],...we({theme:e,props:n,stylesCtx:s,vars:c,varsResolver:d,selector:r,themeName:t,headless:u}),...i===r?ve({style:l,theme:e}):null,...ve({style:o?.style,theme:e})}}function Ce({name:e,classes:t,props:r,stylesCtx:o,className:n,style:s,rootSelector:i="root",unstyled:a,classNames:l,styles:c,vars:d,varsResolver:u}){const p=M(),f=m().classNamesPrefix,h=m().withStaticClasses,g=m().headless,y=(Array.isArray(e)?e:[e]).filter(e=>e),{withStylesTransform:b,getTransformedStyles:v}=function({props:e,stylesCtx:t,themeName:r}){const o=M(),n=(m().stylesTransform?.styles)?.();return{getTransformedStyles:s=>n?[...s.map(r=>n(r,{props:e,theme:o,ctx:t})),...r.map(r=>n(o.components[r]?.styles,{props:e,theme:o,ctx:t}))].filter(Boolean):[],withStylesTransform:!!n}}({props:r,stylesCtx:o,themeName:y});return(e,m)=>({className:ge({theme:p,options:m,themeName:y,selector:e,classNamesPrefix:f,classNames:l,classes:t,unstyled:a,className:n,rootSelector:i,props:r,stylesCtx:o,withStaticClasses:h,headless:g,transformedStyles:v([m?.styles,c])}),style:xe({theme:p,themeName:y,selector:e,options:m,props:r,stylesCtx:o,rootSelector:i,styles:c,style:s,vars:d,varsResolver:u,headless:g,withStylesTransform:b})})}function Se(e){return g(e).reduce((t,r)=>{return void 0!==e[r]?`${t}${o=r,o.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}:${e[r]};`:t;var o},"").trim()}function Ne({selector:e,styles:t,media:r,container:o}){const n=t?Se(t):"",s=Array.isArray(r)?r.map(t=>`@media${t.query}{${e}{${Se(t.styles)}}}`):[],i=Array.isArray(o)?o.map(t=>`@container ${t.query}{${e}{${Se(t.styles)}}}`):[];return`${n?`${e}{${n}}`:""}${s.join("")}${i.join("")}`.trim()}function je(e){const t=f();return(0,c.jsx)("style",{"data-mantine-styles":"inline",nonce:t?.(),dangerouslySetInnerHTML:{__html:Ne(e)}})}function Pe(e){return e.startsWith("data-")?e:`data-${e}`}function _e(e){return e?"string"==typeof e?{[Pe(e)]:!0}:Array.isArray(e)?[...e].reduce((e,t)=>({...e,..._e(t)}),{}):(t=e,Object.keys(t).reduce((e,r)=>{const o=t[r];return void 0===o||""===o||!1===o||null===o||(e[Pe(r)]=t[r]),e},{})):null;var t}function $e(e,t){return Array.isArray(e)?[...e].reduce((e,r)=>({...e,...$e(r,t)}),{}):"function"==typeof e?e(t):null==e?{}:e}function ke({theme:e,style:t,vars:r,styleProps:o}){return{...$e(t,e),...$e(r,e),...o}}function Re(e){const{m:t,mx:r,my:o,mt:n,mb:s,ml:i,mr:a,me:l,ms:c,p:d,px:u,py:p,pt:m,pb:f,pl:h,pr:g,pe:y,ps:b,bd:v,bg:w,c:x,opacity:C,ff:S,fz:N,fw:j,lts:P,ta:_,lh:$,fs:k,tt:R,td:E,w:T,miw:A,maw:O,h:z,mih:D,mah:L,bgsz:I,bgp:M,bgr:F,bga:W,pos:H,top:B,left:V,bottom:q,right:Y,inset:X,display:U,flex:K,hiddenFrom:G,visibleFrom:Z,lightHidden:J,darkHidden:Q,sx:te,...re}=e;return{styleProps:ee({m:t,mx:r,my:o,mt:n,mb:s,ml:i,mr:a,me:l,ms:c,p:d,px:u,py:p,pt:m,pb:f,pl:h,pr:g,pe:y,ps:b,bd:v,bg:w,c:x,opacity:C,ff:S,fz:N,fw:j,lts:P,ta:_,lh:$,fs:k,tt:R,td:E,w:T,miw:A,maw:O,h:z,mih:D,mah:L,bgsz:I,bgp:M,bgr:F,bga:W,pos:H,top:B,left:V,bottom:q,right:Y,inset:X,display:U,flex:K,hiddenFrom:G,visibleFrom:Z,lightHidden:J,darkHidden:Q,sx:te}),rest:re}}const Ee={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"size",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};function Te(e,t){const r=P({color:e,theme:t});return"dimmed"===r.color?"var(--mantine-color-dimmed)":"bright"===r.color?"var(--mantine-color-bright)":r.variable?`var(${r.variable})`:r.color}const Ae={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"},Oe=["h1","h2","h3","h4","h5","h6"],ze=["h1","h2","h3","h4","h5","h6"],De={color:Te,textColor:function(e,t){const r=P({color:e,theme:t});return r.isThemeColor&&void 0===r.shade?`var(--mantine-color-${r.color}-text)`:Te(e,t)},fontSize:function(e,t){return"string"==typeof e&&e in t.fontSizes?`var(--mantine-font-size-${e})`:"string"==typeof e&&Oe.includes(e)?`var(--mantine-${e}-font-size)`:"number"==typeof e||"string"==typeof e?v(e):e},spacing:function(e,t){if("number"==typeof e)return v(e);if("string"==typeof e){const r=e.replace("-","");if(!(r in t.spacing))return v(e);const o=`--mantine-spacing-${r}`;return e.startsWith("-")?`calc(var(${o}) * -1)`:`var(${o})`}return e},identity:function(e){return e},size:function(e){return"number"==typeof e?v(e):e},lineHeight:function(e,t){return"string"==typeof e&&e in t.lineHeights?`var(--mantine-line-height-${e})`:"string"==typeof e&&ze.includes(e)?`var(--mantine-${e}-line-height)`:e},fontFamily:function(e){return"string"==typeof e&&e in Ae?Ae[e]:e},border:function(e,t){if("number"==typeof e)return v(e);if("string"==typeof e){const[r,o,...n]=e.split(" ").filter(e=>""!==e.trim());let s=`${v(r)}`;return o&&(s+=` ${o}`),n.length>0&&(s+=` ${Te(n.join(" "),t)}`),s.trim()}return e}};function Le(e){return e.replace("(min-width: ","").replace("em)","")}function Ie(e,t){return"object"==typeof e&&null!==e&&t in e?e[t]:e}const Me=(0,s.forwardRef)(({component:e,style:t,__vars:r,className:o,variant:n,mod:i,size:a,hiddenFrom:l,visibleFrom:d,lightHidden:u,darkHidden:p,renderRoot:f,__size:h,...y},b)=>{const v=M(),w=e||"div",{styleProps:x,rest:C}=Re(y),S=m().stylesTransform?.sx,N=S?.()?.(x.sx),j=`__m__-${(0,s.useId)().replace(/:/g,"")}`,P=function({styleProps:e,data:t,theme:r}){return function({media:e,...t}){return{...t,media:Object.keys(e).sort((e,t)=>Number(Le(e))-Number(Le(t))).map(t=>({query:t,styles:e[t]}))}}(g(e).reduce((o,n)=>{if("hiddenFrom"===n||"visibleFrom"===n||"sx"===n)return o;const s=t[n],i=Array.isArray(s.property)?s.property:[s.property],a="object"==typeof(l=e[n])&&null!==l?"base"in l?l.base:void 0:l;var l;if(!function(e){if("object"!=typeof e||null===e)return!1;const t=Object.keys(e);return 1!==t.length||"base"!==t[0]}(e[n]))return i.forEach(e=>{o.inlineStyles[e]=De[s.type](a,r)}),o;o.hasResponsiveStyles=!0;const c=function(e){return"object"==typeof e&&null!==e?g(e).filter(e=>"base"!==e):[]}(e[n]);return i.forEach(t=>{a&&(o.styles[t]=De[s.type](a,r)),c.forEach(i=>{const a=`(min-width: ${r.breakpoints[i]})`;o.media[a]={...o.media[a],[t]:De[s.type](Ie(e[n],i),r)}})}),o},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}({styleProps:x,theme:v,data:Ee}),_={ref:b,style:ke({theme:v,style:t,vars:r,styleProps:P.inlineStyles}),className:ue(o,N,{[j]:P.hasResponsiveStyles,"mantine-light-hidden":u,"mantine-dark-hidden":p,[`mantine-hidden-from-${l}`]:l,[`mantine-visible-from-${d}`]:d}),"data-variant":n,"data-size":ne(a)?void 0:a||void 0,size:h,..._e(i),...C};return(0,c.jsxs)(c.Fragment,{children:[P.hasResponsiveStyles&&(0,c.jsx)(je,{selector:`.${j}`,styles:P.styles,media:P.media}),"function"==typeof f?f(_):(0,c.jsx)(w,{..._})]})});Me.displayName="@mantine/core/Box";const Fe=Me;var We={root:"m_4081bf90"};const He={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},Be=(e,{grow:t,preventGrowOverflow:r,gap:o,align:n,justify:s,wrap:i},{childWidth:a})=>({root:{"--group-child-width":t&&r?a:void 0,"--group-gap":ie(o),"--group-align":n,"--group-justify":s,"--group-wrap":i}}),Ve=oe((e,t)=>{const r=te("Group",He,e),{classNames:o,className:n,style:i,styles:a,unstyled:l,children:d,gap:u,align:p,justify:m,wrap:f,grow:h,preventGrowOverflow:g,vars:y,variant:b,__size:v,mod:w,...x}=r,C=function(e){return s.Children.toArray(e).filter(Boolean)}(d),S=C.length,N=ie(u??"md"),j=Ce({name:"Group",props:r,stylesCtx:{childWidth:`calc(${100/S}% - (${N} - ${N} / ${S}))`},className:n,style:i,classes:We,classNames:o,styles:a,unstyled:l,vars:y,varsResolver:Be});return(0,c.jsx)(Fe,{...j("root"),ref:t,variant:b,mod:[{grow:h},w],size:v,...x,children:C})});function qe(e){const t=(0,s.forwardRef)(e);return t.withProps=e=>{const r=(0,s.forwardRef)((r,o)=>(0,c.jsx)(t,{...e,...r,ref:o}));return r.extend=t.extend,r.displayName=`WithProps(${t.displayName})`,r},t.extend=re,t}Ve.classes=We,Ve.displayName="@mantine/core/Group";var Ye={root:"m_87cf2631"};const Xe={__staticSelector:"UnstyledButton"},Ue=qe((e,t)=>{const r=te("UnstyledButton",Xe,e),{className:o,component:n="button",__staticSelector:s,unstyled:i,classNames:a,styles:l,style:d,...u}=r,p=Ce({name:s,props:r,classes:Ye,className:o,style:d,classNames:a,styles:l,unstyled:i});return(0,c.jsx)(Fe,{...p("root",{focusable:!0}),component:n,ref:t,type:"button"===n?"button":void 0,...u})});function Ke(e){const t=(0,s.createContext)(null);return[({children:e,value:r})=>(0,c.jsx)(t.Provider,{value:r,children:e}),()=>{const r=(0,s.useContext)(t);if(null===r)throw new Error(e);return r}]}Ue.classes=Ye,Ue.displayName="@mantine/core/UnstyledButton";const[Ge,Ze]=Ke("Pagination.Root component was not found in tree");var Je={root:"m_4addd315",control:"m_326d024a",dots:"m_4ad7767d"};const Qe={withPadding:!0},et=oe((e,t)=>{const r=te("PaginationControl",Qe,e),{classNames:o,className:n,style:s,styles:i,vars:a,active:l,disabled:d,withPadding:u,mod:p,...m}=r,f=Ze(),h=d||f.disabled;return(0,c.jsx)(Ue,{ref:t,disabled:h,mod:[{active:l,disabled:h,"with-padding":u},p],...f.getStyles("control",{className:n,style:s,classNames:o,styles:i,active:!h}),...m})});function tt({style:e,children:t,path:r,...o}){return(0,c.jsx)("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)",...e},...o,children:(0,c.jsx)("path",{d:r,fill:"currentColor"})})}et.classes=Je,et.displayName="@mantine/core/PaginationControl";const rt={icon:e=>(0,c.jsx)(tt,{...e,path:"M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z"})},ot=oe((e,t)=>{const r=te("PaginationDots",rt,e),{classNames:o,className:n,style:s,styles:i,vars:a,icon:l,...d}=r,u=Ze(),p=l;return(0,c.jsx)(Fe,{ref:t,...u.getStyles("dots",{className:n,style:s,styles:i,classNames:o}),...d,children:(0,c.jsx)(p,{style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)"}})})});function nt({icon:e,name:t,action:r,type:o}){const n={icon:e},i=(0,s.forwardRef)((e,s)=>{const{icon:i,...a}=te(t,n,e),l=i,d=Ze(),u="next"===o?d.active===d.total:1===d.active;return(0,c.jsx)(et,{disabled:d.disabled||u,ref:s,onClick:d[r],withPadding:!1,...a,children:(0,c.jsx)(l,{className:"mantine-rotate-rtl",style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)"}})})});return i.displayName=`@mantine/core/${t}`,i}ot.classes=Je,ot.displayName="@mantine/core/PaginationDots";const st=nt({icon:e=>(0,c.jsx)(tt,{...e,path:"M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z"}),name:"PaginationNext",action:"onNext",type:"next"}),it=nt({icon:e=>(0,c.jsx)(tt,{...e,path:"M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z"}),name:"PaginationPrevious",action:"onPrevious",type:"previous"}),at=nt({icon:e=>(0,c.jsx)(tt,{...e,path:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z"}),name:"PaginationFirst",action:"onFirst",type:"previous"}),lt=nt({icon:e=>(0,c.jsx)(tt,{...e,path:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z"}),name:"PaginationLast",action:"onLast",type:"next"});function ct({dotsIcon:e}){const t=Ze(),r=t.range.map((r,o)=>"dots"===r?(0,c.jsx)(ot,{icon:e},o):(0,c.jsx)(et,{active:r===t.active,"aria-current":r===t.active?"page":void 0,onClick:()=>t.onChange(r),disabled:t.disabled,...t.getItemProps?.(r),children:t.getItemProps?.(r)?.children??r},o));return(0,c.jsx)(c.Fragment,{children:r})}function dt({value:e,defaultValue:t,finalValue:r,onChange:o=()=>{}}){const[n,i]=(0,s.useState)(void 0!==t?t:r);return void 0!==e?[e,o,!0]:[n,(e,...t)=>{i(e),o?.(e,...t)},!1]}function ut(e,t){const r=t-e+1;return Array.from({length:r},(t,r)=>r+e)}ct.displayName="@mantine/core/PaginationItems";const pt="dots";function mt({total:e,siblings:t=1,boundaries:r=1,page:o,initialPage:n=1,onChange:i}){const a=Math.max(Math.trunc(e),0),[l,c]=dt({value:o,onChange:i,defaultValue:n,finalValue:n}),d=e=>{c(e<=0?1:e>a?a:e)};return{range:(0,s.useMemo)(()=>{if(2*t+3+2*r>=a)return ut(1,a);const e=Math.max(l-t,r),o=Math.min(l+t,a-r),n=e>r+2,s=o<a-(r+1);if(!n&&s)return[...ut(1,2*t+r+2),pt,...ut(a-(r-1),a)];if(n&&!s){const e=r+1+2*t;return[...ut(1,r),pt,...ut(a-e,a)]}return[...ut(1,r),pt,...ut(e,o),pt,...ut(a-r+1,a)]},[a,t,l]),active:l,setPage:d,next:()=>d(l+1),previous:()=>d(l-1),first:()=>d(1),last:()=>d(a)}}function ft(e,t){return r=>{e?.(r),t?.(r)}}function ht(e,t){return"boolean"==typeof e?e:t.autoContrast}const gt={siblings:1,boundaries:1},yt=(e,{size:t,radius:r,color:o,autoContrast:n})=>({root:{"--pagination-control-radius":void 0===r?void 0:ae(r),"--pagination-control-size":se(t,"pagination-control-size"),"--pagination-control-fz":le(t),"--pagination-active-bg":o?_(o,e):void 0,"--pagination-active-color":ht(n,e)?V({color:o,theme:e,autoContrast:n}):void 0}}),bt=oe((e,t)=>{const r=te("PaginationRoot",gt,e),{classNames:o,className:n,style:s,styles:i,unstyled:a,vars:l,total:d,value:u,defaultValue:p,onChange:m,disabled:f,siblings:h,boundaries:g,color:y,radius:b,onNextPage:v,onPreviousPage:w,onFirstPage:x,onLastPage:C,getItemProps:S,autoContrast:N,...j}=r,P=Ce({name:"Pagination",classes:Je,props:r,className:n,style:s,classNames:o,styles:i,unstyled:a,vars:l,varsResolver:yt}),{range:_,setPage:$,next:k,previous:R,active:E,first:T,last:A}=mt({page:u,initialPage:p,onChange:m,total:d,siblings:h,boundaries:g}),O=ft(v,k),z=ft(w,R),D=ft(x,T),L=ft(C,A);return(0,c.jsx)(Ge,{value:{total:d,range:_,active:E,disabled:f,getItemProps:S,onChange:$,onNext:O,onPrevious:z,onFirst:D,onLast:L,getStyles:P},children:(0,c.jsx)(Fe,{ref:t,...P("root"),...j})})});bt.classes=Je,bt.displayName="@mantine/core/PaginationRoot";const vt={withControls:!0,withPages:!0,siblings:1,boundaries:1,gap:8},wt=oe((e,t)=>{const r=te("Pagination",vt,e),{withEdges:o,withControls:n,getControlProps:s,nextIcon:i,previousIcon:a,lastIcon:l,firstIcon:d,dotsIcon:u,total:p,gap:m,hideWithOnePage:f,withPages:h,...g}=r;return p<=0||f&&1===p?null:(0,c.jsx)(bt,{ref:t,total:p,...g,children:(0,c.jsxs)(Ve,{gap:m,children:[o&&(0,c.jsx)(at,{icon:d,...s?.("first")}),n&&(0,c.jsx)(it,{icon:a,...s?.("previous")}),h&&(0,c.jsx)(ct,{dotsIcon:u}),n&&(0,c.jsx)(st,{icon:i,...s?.("next")}),o&&(0,c.jsx)(lt,{icon:l,...s?.("last")})]})})});wt.classes=Je,wt.displayName="@mantine/core/Pagination",wt.Root=bt,wt.Control=et,wt.Dots=ot,wt.First=at,wt.Last=lt,wt.Next=st,wt.Previous=it,wt.Items=ct;var xt={root:"m_18320242","skeleton-fade":"m_299c329c"};const Ct={visible:!0,animate:!0},St=(e,{width:t,height:r,radius:o,circle:n})=>({root:{"--skeleton-height":v(r),"--skeleton-width":v(n?r:t),"--skeleton-radius":n?"1000px":void 0===o?void 0:ae(o)}}),Nt=oe((e,t)=>{const r=te("Skeleton",Ct,e),{classNames:o,className:n,style:s,styles:i,unstyled:a,vars:l,width:d,height:u,circle:p,visible:m,radius:f,animate:h,mod:g,...y}=r,b=Ce({name:"Skeleton",classes:xt,props:r,className:n,style:s,classNames:o,styles:i,unstyled:a,vars:l,varsResolver:St});return(0,c.jsx)(Fe,{ref:t,...b("root"),mod:[{visible:m,animate:h},g],...y})});Nt.classes=xt,Nt.displayName="@mantine/core/Skeleton";const jt=window.wp.i18n,Pt=()=>(0,c.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-layout-grid",children:[(0,c.jsx)("rect",{width:"7",height:"7",x:"3",y:"3",rx:"1"}),(0,c.jsx)("rect",{width:"7",height:"7",x:"14",y:"3",rx:"1"}),(0,c.jsx)("rect",{width:"7",height:"7",x:"14",y:"14",rx:"1"}),(0,c.jsx)("rect",{width:"7",height:"7",x:"3",y:"14",rx:"1"})]}),_t=()=>(0,c.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-chevron-down-icon lucide-chevron-down",children:(0,c.jsx)("path",{d:"m6 9 6 6 6-6"})}),$t=()=>(0,c.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-chevron-right-icon lucide-chevron-right",children:(0,c.jsx)("path",{d:"m9 18 6-6-6-6"})}),kt=()=>(0,c.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-arrow-up-down-icon lucide-arrow-up-down",children:[(0,c.jsx)("path",{d:"m21 16-4 4-4-4"}),(0,c.jsx)("path",{d:"M17 20V4"}),(0,c.jsx)("path",{d:"m3 8 4-4 4 4"}),(0,c.jsx)("path",{d:"M7 4v16"})]}),Rt=()=>(0,c.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-search-icon lucide-search",children:[(0,c.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,c.jsx)("path",{d:"m21 21-4.3-4.3"})]}),Et=()=>(0,c.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-circle-check-icon lucide-circle-check",children:[(0,c.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,c.jsx)("path",{d:"m9 12 2 2 4-4"})]}),Tt=()=>(0,c.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-circle-alert-icon lucide-circle-alert",children:[(0,c.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,c.jsx)("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),(0,c.jsx)("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})]}),At=e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value},Ot=function({course:e,showCourseProgress:t}){return(0,c.jsx)("a",{href:e.progress.course_url,target:"_blank",className:"eb-my-courses__course-anchor",children:(0,c.jsxs)("div",{className:"eb-my-courses__course-card",children:[(0,c.jsxs)("div",{className:"course-thumbnail-container",children:[(0,c.jsx)("img",{src:e.thumbnail,alt:e.title,className:"course-thumbnail"}),e.categories.length>0&&(0,c.jsxs)("div",{className:"course-category",children:[(0,c.jsx)(Pt,{}),(0,c.jsx)("span",{children:e.categories.map((t,r)=>(0,c.jsxs)(a().Fragment,{children:[(0,jt.__)(At(t?.name),"edwiser-bridge"),r<e.categories.length-1?", ":""]},t?.id))})]})]}),(0,c.jsxs)("div",{className:"course-meta",children:[(0,c.jsxs)("div",{className:"course-content",children:[(0,c.jsx)("h3",{className:"course-title",children:(0,jt.__)(e.title,"edwiser-bridge")}),t&&(0,c.jsxs)("div",{className:"course__progress",children:[(0,c.jsx)("div",{className:"progress-container",children:(0,c.jsx)("div",{className:"progress-bar",children:(0,c.jsx)("div",{className:"progress-fill",style:{width:`${e.progress.percentage}%`}})})}),(0,c.jsxs)("div",{className:"course-completion",children:[(0,c.jsxs)("span",{className:"completion-text",children:[(0,jt.__)("Course completed","edwiser-bridge")," :"]}),(0,c.jsxs)("span",{className:"completion-value",children:[e.progress.percentage,"%"]})]})]})]}),t&&(0,c.jsx)("div",{className:"course-details",children:(()=>{const t=e.progress.percentage;return e?.suspended?(0,c.jsxs)("div",{className:"course-suspended",children:[(0,c.jsx)("span",{children:(0,jt.__)("Suspended","edwiser-bridge")}),(0,c.jsx)(Tt,{})]}):t>=100?(0,c.jsxs)("div",{className:"course-completed",children:[(0,c.jsx)("span",{children:(0,jt.__)("Completed","edwiser-bridge")}),(0,c.jsx)(Et,{})]}):t>0?(0,c.jsxs)("a",{href:e.progress.course_url,className:"btn btn-resume",children:[(0,jt.__)("Resume","edwiser-bridge")," ",(0,c.jsx)($t,{})]}):(0,c.jsxs)("a",{href:e.progress.course_url,className:"btn btn-start",children:[(0,jt.__)("Start","edwiser-bridge")," ",(0,c.jsx)($t,{})]})})()})]})]})})};function zt(){return(0,c.jsxs)("div",{className:"eb-my-courses__course-card",children:[(0,c.jsx)("div",{className:"course-thumbnail-container",children:(0,c.jsx)(Nt,{height:140,style:{borderRadius:0}})}),(0,c.jsxs)("div",{className:"course-meta",children:[(0,c.jsxs)("div",{className:"course-content",children:[(0,c.jsx)(Nt,{height:20,width:"90%"}),(0,c.jsxs)("div",{className:"course__progress",children:[(0,c.jsx)(Nt,{height:8,width:"100%",mt:8,style:{borderRadius:"12px"}}),(0,c.jsxs)("div",{className:"course-completion",style:{marginTop:8},children:[(0,c.jsx)(Nt,{height:18,width:120}),(0,c.jsx)(Nt,{height:28,width:28})]})]})]}),(0,c.jsx)("div",{className:"course-details",children:(0,c.jsx)(Nt,{height:24,width:100})})]})]})}const Dt=function({courses:e,searchTerm:t="",showCourseProgress:r}){return(0,c.jsx)("div",{className:"eb-my-courses__grid",children:e.length>0?e.map(e=>(0,c.jsx)(Ot,{course:e,showCourseProgress:r},e.id)):(0,c.jsx)("div",{className:"eb-my-courses__no-results",children:t?(0,c.jsxs)("p",{children:[(0,jt.__)("No courses found matching","edwiser-bridge")," ",(0,c.jsxs)("strong",{children:['"',t,'"']})]}):(0,c.jsx)("p",{children:(0,jt.__)("No courses found","edwiser-bridge")})})})};function Lt(){return(0,c.jsx)("div",{className:"eb-my-courses__grid",children:Array.from({length:9}).map((e,t)=>(0,c.jsx)(zt,{},t))})}const It=s["useId".toString()]||(()=>{});function Mt(e){const t=function(){const e=It();return e?`mantine-${e.replace(/:/g,"")}`:""}(),[r,o]=(0,s.useState)(t);return Z(()=>{o(function(e="mantine-"){return`${e}${Math.random().toString(36).slice(2,11)}`}())},[]),"string"==typeof e?e:"undefined"==typeof window?t:r}function Ft({classNames:e,styles:t,props:r,stylesCtx:o}){const n=M();return{resolvedClassNames:fe({theme:n,classNames:e,props:r,stylesCtx:o||void 0}),resolvedStyles:ye({theme:n,styles:t,props:r,stylesCtx:o||void 0})}}function Wt(e){return"string"==typeof e?{value:e,label:e}:"value"in e&&!("label"in e)?{value:e.value,label:e.value,disabled:e.disabled}:"number"==typeof e?{value:e.toString(),label:e.toString()}:"group"in e?{group:e.group,items:e.items.map(e=>Wt(e))}:e}function Ht(e){return e?e.map(e=>Wt(e)):[]}function Bt(e){return e.reduce((e,t)=>"group"in t?{...e,...Bt(t.items)}:(e[t.value]=t,e),{})}const Vt=["mousedown","touchstart"],qt={app:100,modal:200,popover:300,overlay:400,max:9999};function Yt(e){return qt[e]}const Xt=(0,s.createContext)({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function Ut(){return(0,s.useContext)(Xt)}function Kt(e,t){if("rtl"===e&&(t.includes("right")||t.includes("left"))){const[e,r]=t.split("-"),o="right"===e?"left":"right";return void 0===r?o:`${o}-${r}`}return t}var Gt={root:"m_9814e45f"};const Zt={zIndex:Yt("modal")},Jt=(e,{gradient:t,color:r,backgroundOpacity:o,blur:n,radius:s,zIndex:i})=>({root:{"--overlay-bg":t||(void 0!==r||void 0!==o)&&k(r||"#000",o??.6)||void 0,"--overlay-filter":n?`blur(${v(n)})`:void 0,"--overlay-radius":void 0===s?void 0:ae(s),"--overlay-z-index":i?.toString()}}),Qt=qe((e,t)=>{const r=te("Overlay",Zt,e),{classNames:o,className:n,style:s,styles:i,unstyled:a,vars:l,fixed:d,center:u,children:p,radius:m,zIndex:f,gradient:h,blur:g,color:y,backgroundOpacity:b,mod:v,...w}=r,x=Ce({name:"Overlay",props:r,classes:Gt,className:n,style:s,classNames:o,styles:i,unstyled:a,vars:l,varsResolver:Jt});return(0,c.jsx)(Fe,{ref:t,...x("root"),mod:[{center:u,fixed:d},v],...w,children:p})});Qt.classes=Gt,Qt.displayName="@mantine/core/Overlay";var er=n(795);function tr(e,t){if("function"==typeof e)return e(t);"object"==typeof e&&null!==e&&"current"in e&&(e.current=t)}function rr(...e){return(0,s.useCallback)(function(...e){const t=new Map;return r=>{if(e.forEach(e=>{const o=tr(e,r);o&&t.set(e,o)}),t.size>0)return()=>{e.forEach(e=>{const r=t.get(e);r?r():tr(e,null)}),t.clear()}}}(...e),e)}function or(e){const t=document.createElement("div");return t.setAttribute("data-portal","true"),"string"==typeof e.className&&t.classList.add(...e.className.split(" ").filter(Boolean)),"object"==typeof e.style&&Object.assign(t.style,e.style),"string"==typeof e.id&&t.setAttribute("id",e.id),t}const nr={},sr=oe((e,t)=>{const{children:r,target:o,reuseTargetNode:n,...i}=te("Portal",nr,e),[a,l]=(0,s.useState)(!1),d=(0,s.useRef)(null);return Z(()=>(l(!0),d.current=function({target:e,reuseTargetNode:t,...r}){if(e)return"string"==typeof e?document.querySelector(e)||or(r):e;if(t){const e=document.querySelector("[data-mantine-shared-portal-node]");if(e)return e;const t=or(r);return t.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(t),t}return or(r)}({target:o,reuseTargetNode:n,...i}),tr(t,d.current),o||n||!d.current||document.body.appendChild(d.current),()=>{o||n||!d.current||document.body.removeChild(d.current)}),[o]),a&&d.current?(0,er.createPortal)((0,c.jsx)(c.Fragment,{children:r}),d.current):null});sr.displayName="@mantine/core/Portal";const ir=oe(({withinPortal:e=!0,children:t,...r},o)=>"test"!==h()&&e?(0,c.jsx)(sr,{ref:o,...r,children:t}):(0,c.jsx)(c.Fragment,{children:t}));ir.displayName="@mantine/core/OptionalPortal";const ar=e=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${"bottom"===e?10:-10}px)`},transitionProperty:"transform, opacity"}),lr={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30px)"},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-30px)"},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(30px)"},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-30px)"},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...ar("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...ar("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...ar("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...ar("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...ar("top"),common:{transformOrigin:"top right"}}},cr={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function dr({transition:e,state:t,duration:r,timingFunction:o}){const n={WebkitBackfaceVisibility:"hidden",willChange:"transform, opacity",transitionDuration:`${r}ms`,transitionTimingFunction:o};return"string"==typeof e?e in lr?{transitionProperty:lr[e].transitionProperty,...n,...lr[e].common,...lr[e][cr[t]]}:{}:{transitionProperty:e.transitionProperty,...n,...e.common,...e[cr[t]]}}function ur(e,t){const r=(0,s.useRef)(!1);(0,s.useEffect)(()=>()=>{r.current=!1},[]),(0,s.useEffect)(()=>{if(r.current)return e();r.current=!0},t)}function pr({duration:e,exitDuration:t,timingFunction:r,mounted:o,onEnter:n,onExit:i,onEntered:a,onExited:l,enterDelay:c,exitDelay:d}){const u=M(),p=function(e,t,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){const[o,n]=(0,s.useState)(r?t:function(e){return"undefined"!=typeof window&&"matchMedia"in window&&window.matchMedia(e).matches}(e)),i=(0,s.useRef)(null);return(0,s.useEffect)(()=>{if("matchMedia"in window)return i.current=window.matchMedia(e),n(i.current.matches),function(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch(r){return e.addListener(t),()=>e.removeListener(t)}}(i.current,e=>n(e.matches))},[e]),o}("(prefers-reduced-motion: reduce)",undefined,undefined);const m=!!u.respectReducedMotion&&p,[f,h]=(0,s.useState)(m?0:e),[g,y]=(0,s.useState)(o?"entered":"exited"),b=(0,s.useRef)(-1),v=(0,s.useRef)(-1),w=(0,s.useRef)(-1);function x(){window.clearTimeout(b.current),window.clearTimeout(v.current),cancelAnimationFrame(w.current)}const C=r=>{x();const o=r?n:i,s=r?a:l,c=m?0:r?e:t;h(c),0===c?("function"==typeof o&&o(),"function"==typeof s&&s(),y(r?"entered":"exited")):w.current=requestAnimationFrame(()=>{er.flushSync(()=>{y(r?"pre-entering":"pre-exiting")}),w.current=requestAnimationFrame(()=>{"function"==typeof o&&o(),y(r?"entering":"exiting"),b.current=window.setTimeout(()=>{"function"==typeof s&&s(),y(r?"entered":"exited")},c)})})};return ur(()=>{var e;e=o,x(),"number"==typeof(e?c:d)?v.current=window.setTimeout(()=>{C(e)},e?c:d):C(e)},[o]),(0,s.useEffect)(()=>()=>{x()},[]),{transitionDuration:f,transitionStatus:g,transitionTimingFunction:r||"ease"}}function mr({keepMounted:e,transition:t="fade",duration:r=250,exitDuration:o=r,mounted:n,children:s,timingFunction:i="ease",onExit:a,onEntered:l,onEnter:d,onExited:u,enterDelay:p,exitDelay:m}){const f=h(),{transitionDuration:g,transitionStatus:y,transitionTimingFunction:b}=pr({mounted:n,exitDuration:o,duration:r,timingFunction:i,onExit:a,onEntered:l,onEnter:d,onExited:u,enterDelay:p,exitDelay:m});return 0===g||"test"===f?n?(0,c.jsx)(c.Fragment,{children:s({})}):e?s({display:"none"}):null:"exited"===y?e?s({display:"none"}):null:(0,c.jsx)(c.Fragment,{children:s(dr({transition:t,duration:g,state:y,timingFunction:b}))})}mr.displayName="@mantine/core/Transition";const[fr,hr]=Ke("Popover component was not found in the tree"),gr=()=>{};function yr(e,t={active:!0}){return"function"==typeof e&&t.active?r=>{"Escape"===r.key&&(e(r),t.onTrigger?.())}:t.onKeyDown||gr}function br(e,t,r,o){return"center"===e||"center"===o?{top:t}:"end"===e?{bottom:r}:"start"===e?{top:r}:{}}function vr(e,t,r,o,n){return"center"===e||"center"===o?{left:t}:"end"===e?{["ltr"===n?"right":"left"]:r}:"start"===e?{["ltr"===n?"left":"right"]:r}:{}}const wr={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function xr({position:e,arrowSize:t,arrowOffset:r,arrowRadius:o,arrowPosition:n,arrowX:s,arrowY:i,dir:a}){const[l,c="center"]=e.split("-"),d={width:t,height:t,transform:"rotate(45deg)",position:"absolute",[wr[l]]:o},u=-t/2;return"left"===l?{...d,...br(c,i,r,n),right:u,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:"right"===l?{...d,...br(c,i,r,n),left:u,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:"top"===l?{...d,...vr(c,s,r,n,a),bottom:u,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:"bottom"===l?{...d,...vr(c,s,r,n,a),top:u,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}const Cr=(0,s.forwardRef)(({position:e,arrowSize:t,arrowOffset:r,arrowRadius:o,arrowPosition:n,visible:s,arrowX:i,arrowY:a,style:l,...d},u)=>{const{dir:p}=Ut();return s?(0,c.jsx)("div",{...d,ref:u,style:{...l,...xr({position:e,arrowSize:t,arrowOffset:r,arrowRadius:o,arrowPosition:n,dir:p,arrowX:i,arrowY:a})}}):null});Cr.displayName="@mantine/core/FloatingArrow";const Sr=/input|select|textarea|button|object/,Nr="a, input, select, textarea, button, object, [tabindex]";function jr(e){return"none"===e.style.display}function Pr(e){let t=e.getAttribute("tabindex");return null===t&&(t=void 0),parseInt(t,10)}function _r(e){const t=e.nodeName.toLowerCase(),r=!Number.isNaN(Pr(e));return(Sr.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||r)&&function(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||"hidden"===e.getAttribute("type"))return!1;let t=e;for(;t&&t!==document.body&&11!==t.nodeType;){if(jr(t))return!1;t=t.parentNode}return!0}(e)}function $r(e){const t=Pr(e);return(Number.isNaN(t)||t>=0)&&_r(e)}function kr(e){return!Array.isArray(e)&&null!==e&&"object"==typeof e&&e.type!==s.Fragment}var Rr={root:"m_515a97f8"};const Er={},Tr=oe((e,t)=>{const r=te("VisuallyHidden",Er,e),{classNames:o,className:n,style:s,styles:i,unstyled:a,vars:l,...d}=r,u=Ce({name:"VisuallyHidden",classes:Rr,props:r,className:n,style:s,classNames:o,styles:i,unstyled:a});return(0,c.jsx)(Fe,{component:"span",ref:t,...u("root"),...d})});function Ar({children:e,active:t=!0,refProp:r="ref",innerRef:o}){const n=function(e=!0){const t=(0,s.useRef)(null),r=e=>{let t=e.querySelector("[data-autofocus]");if(!t){const r=Array.from(e.querySelectorAll(Nr));t=r.find($r)||r.find(_r)||null,!t&&_r(e)&&(t=e)}t&&t.focus({preventScroll:!0})},o=(0,s.useCallback)(o=>{e&&null!==o&&t.current!==o&&(o?(setTimeout(()=>{o.getRootNode()&&r(o)}),t.current=o):t.current=null)},[e]);return(0,s.useEffect)(()=>{if(!e)return;t.current&&setTimeout(()=>r(t.current));const o=e=>{"Tab"===e.key&&t.current&&function(e,t){const r=(o=e,Array.from(o.querySelectorAll(Nr)).filter($r));var o;if(!r.length)return void t.preventDefault();const n=r[t.shiftKey?0:r.length-1],s=e.getRootNode();let i=n===s.activeElement||e===s.activeElement;const a=s.activeElement;if("INPUT"===a.tagName&&"radio"===a.getAttribute("type")){const e=r.filter(e=>"radio"===e.getAttribute("type")&&e.getAttribute("name")===a.getAttribute("name"));i=e.includes(n)}if(!i)return;t.preventDefault();const l=r[t.shiftKey?r.length-1:0];l&&l.focus()}(t.current,e)};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[e]),o}(t),i=rr(n,o);return kr(e)?(0,s.cloneElement)(e,{[r]:i}):e}function Or(e){return(0,c.jsx)(Tr,{tabIndex:-1,"data-autofocus":!0,...e})}Tr.classes=Rr,Tr.displayName="@mantine/core/VisuallyHidden",Ar.displayName="@mantine/core/FocusTrap",Or.displayName="@mantine/core/FocusTrapInitialFocus",Ar.InitialFocus=Or;var zr={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const Dr={},Lr=oe((e,t)=>{const r=te("PopoverDropdown",Dr,e),{className:o,style:n,vars:i,children:a,onKeyDownCapture:l,variant:d,classNames:u,styles:p,...m}=r,f=hr(),h=function({opened:e,shouldReturnFocus:t=!0}){const r=(0,s.useRef)(null),o=()=>{r.current&&"focus"in r.current&&"function"==typeof r.current.focus&&r.current?.focus({preventScroll:!0})};return ur(()=>{let n=-1;const s=e=>{"Tab"===e.key&&window.clearTimeout(n)};return document.addEventListener("keydown",s),e?r.current=document.activeElement:t&&(n=window.setTimeout(o,10)),()=>{window.clearTimeout(n),document.removeEventListener("keydown",s)}},[e,t]),o}({opened:f.opened,shouldReturnFocus:f.returnFocus}),g=f.withRoles?{"aria-labelledby":f.getTargetId(),id:f.getDropdownId(),role:"dialog",tabIndex:-1}:{},y=rr(t,f.floating);return f.disabled?null:(0,c.jsx)(ir,{...f.portalProps,withinPortal:f.withinPortal,children:(0,c.jsx)(mr,{mounted:f.opened,...f.transitionProps,transition:f.transitionProps?.transition||"fade",duration:f.transitionProps?.duration??150,keepMounted:f.keepMounted,exitDuration:"number"==typeof f.transitionProps?.exitDuration?f.transitionProps.exitDuration:f.transitionProps?.duration,children:e=>(0,c.jsx)(Ar,{active:f.trapFocus&&f.opened,innerRef:y,children:(0,c.jsxs)(Fe,{...g,...m,variant:d,onKeyDownCapture:yr(()=>{f.onClose?.(),f.onDismiss?.()},{active:f.closeOnEscape,onTrigger:h,onKeyDown:l}),"data-position":f.placement,"data-fixed":"fixed"===f.floatingStrategy||void 0,...f.getStyles("dropdown",{className:o,props:r,classNames:u,styles:p,style:[{...e,zIndex:f.zIndex,top:f.y??0,left:f.x??0,width:"target"===f.width?void 0:v(f.width)},f.resolvedStyles.dropdown,p?.dropdown,n]}),children:[a,(0,c.jsx)(Cr,{ref:f.arrowRef,arrowX:f.arrowX,arrowY:f.arrowY,visible:f.withArrow,position:f.placement,arrowSize:f.arrowSize,arrowRadius:f.arrowRadius,arrowOffset:f.arrowOffset,arrowPosition:f.arrowPosition,...f.getStyles("arrow",{props:r,classNames:u,styles:p})})]})})})})});function Ir(e){const t=s.version;return"string"!=typeof s.version||t.startsWith("18.")?e?.ref:e?.props?.ref}Lr.classes=zr,Lr.displayName="@mantine/core/PopoverDropdown";const Mr={refProp:"ref",popupType:"dialog"},Fr=oe((e,t)=>{const{children:r,refProp:o,popupType:n,...i}=te("PopoverTarget",Mr,e);if(!kr(r))throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const a=i,l=hr(),c=rr(l.reference,Ir(r),t),d=l.withRoles?{"aria-haspopup":n,"aria-expanded":l.opened,"aria-controls":l.getDropdownId(),id:l.getTargetId()}:{};return(0,s.cloneElement)(r,{...a,...d,...l.targetProps,className:ue(l.targetProps.className,a.className,r.props.className),[o]:c,...l.controlled?null:{onClick:l.onToggle}})});Fr.displayName="@mantine/core/PopoverTarget";const Wr=Math.min,Hr=Math.max,Br=Math.round,Vr=Math.floor,qr=e=>({x:e,y:e}),Yr={left:"right",right:"left",bottom:"top",top:"bottom"},Xr={start:"end",end:"start"};function Ur(e,t,r){return Hr(e,Wr(t,r))}function Kr(e,t){return"function"==typeof e?e(t):e}function Gr(e){return e.split("-")[0]}function Zr(e){return e.split("-")[1]}function Jr(e){return"x"===e?"y":"x"}function Qr(e){return"y"===e?"height":"width"}const eo=new Set(["top","bottom"]);function to(e){return eo.has(Gr(e))?"y":"x"}function ro(e){return Jr(to(e))}function oo(e){return e.replace(/start|end/g,e=>Xr[e])}const no=["left","right"],so=["right","left"],io=["top","bottom"],ao=["bottom","top"];function lo(e){return e.replace(/left|right|bottom|top/g,e=>Yr[e])}function co(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function uo(e){const{x:t,y:r,width:o,height:n}=e;return{width:o,height:n,top:r,left:t,right:t+o,bottom:r+n,x:t,y:r}}function po(e,t,r){let{reference:o,floating:n}=e;const s=to(t),i=ro(t),a=Qr(i),l=Gr(t),c="y"===s,d=o.x+o.width/2-n.width/2,u=o.y+o.height/2-n.height/2,p=o[a]/2-n[a]/2;let m;switch(l){case"top":m={x:d,y:o.y-n.height};break;case"bottom":m={x:d,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:u};break;case"left":m={x:o.x-n.width,y:u};break;default:m={x:o.x,y:o.y}}switch(Zr(t)){case"start":m[i]-=p*(r&&c?-1:1);break;case"end":m[i]+=p*(r&&c?-1:1)}return m}async function mo(e,t){var r;void 0===t&&(t={});const{x:o,y:n,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:m=0}=Kr(t,e),f=co(m),h=a[p?"floating"===u?"reference":"floating":u],g=uo(await s.getClippingRect({element:null==(r=await(null==s.isElement?void 0:s.isElement(h)))||r?h:h.contextElement||await(null==s.getDocumentElement?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),y="floating"===u?{x:o,y:n,width:i.floating.width,height:i.floating.height}:i.reference,b=await(null==s.getOffsetParent?void 0:s.getOffsetParent(a.floating)),v=await(null==s.isElement?void 0:s.isElement(b))&&await(null==s.getScale?void 0:s.getScale(b))||{x:1,y:1},w=uo(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:b,strategy:l}):y);return{top:(g.top-w.top+f.top)/v.y,bottom:(w.bottom-g.bottom+f.bottom)/v.y,left:(g.left-w.left+f.left)/v.x,right:(w.right-g.right+f.right)/v.x}}function fo(e){const t=Wr(...e.map(e=>e.left)),r=Wr(...e.map(e=>e.top));return{x:t,y:r,width:Hr(...e.map(e=>e.right))-t,height:Hr(...e.map(e=>e.bottom))-r}}const ho=new Set(["left","top"]);function go(){return"undefined"!=typeof window}function yo(e){return wo(e)?(e.nodeName||"").toLowerCase():"#document"}function bo(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function vo(e){var t;return null==(t=(wo(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function wo(e){return!!go()&&(e instanceof Node||e instanceof bo(e).Node)}function xo(e){return!!go()&&(e instanceof Element||e instanceof bo(e).Element)}function Co(e){return!!go()&&(e instanceof HTMLElement||e instanceof bo(e).HTMLElement)}function So(e){return!(!go()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof bo(e).ShadowRoot)}const No=new Set(["inline","contents"]);function jo(e){const{overflow:t,overflowX:r,overflowY:o,display:n}=Lo(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&!No.has(n)}const Po=new Set(["table","td","th"]);function _o(e){return Po.has(yo(e))}const $o=[":popover-open",":modal"];function ko(e){return $o.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const Ro=["transform","translate","scale","rotate","perspective"],Eo=["transform","translate","scale","rotate","perspective","filter"],To=["paint","layout","strict","content"];function Ao(e){const t=Oo(),r=xo(e)?Lo(e):e;return Ro.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||Eo.some(e=>(r.willChange||"").includes(e))||To.some(e=>(r.contain||"").includes(e))}function Oo(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const zo=new Set(["html","body","#document"]);function Do(e){return zo.has(yo(e))}function Lo(e){return bo(e).getComputedStyle(e)}function Io(e){return xo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Mo(e){if("html"===yo(e))return e;const t=e.assignedSlot||e.parentNode||So(e)&&e.host||vo(e);return So(t)?t.host:t}function Fo(e){const t=Mo(e);return Do(t)?e.ownerDocument?e.ownerDocument.body:e.body:Co(t)&&jo(t)?t:Fo(t)}function Wo(e,t,r){var o;void 0===t&&(t=[]),void 0===r&&(r=!0);const n=Fo(e),s=n===(null==(o=e.ownerDocument)?void 0:o.body),i=bo(n);if(s){const e=Ho(i);return t.concat(i,i.visualViewport||[],jo(n)?n:[],e&&r?Wo(e):[])}return t.concat(n,Wo(n,[],r))}function Ho(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Bo(e){const t=Lo(e);let r=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const n=Co(e),s=n?e.offsetWidth:r,i=n?e.offsetHeight:o,a=Br(r)!==s||Br(o)!==i;return a&&(r=s,o=i),{width:r,height:o,$:a}}function Vo(e){return xo(e)?e:e.contextElement}function qo(e){const t=Vo(e);if(!Co(t))return qr(1);const r=t.getBoundingClientRect(),{width:o,height:n,$:s}=Bo(t);let i=(s?Br(r.width):r.width)/o,a=(s?Br(r.height):r.height)/n;return i&&Number.isFinite(i)||(i=1),a&&Number.isFinite(a)||(a=1),{x:i,y:a}}const Yo=qr(0);function Xo(e){const t=bo(e);return Oo()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Yo}function Uo(e,t,r,o){void 0===t&&(t=!1),void 0===r&&(r=!1);const n=e.getBoundingClientRect(),s=Vo(e);let i=qr(1);t&&(o?xo(o)&&(i=qo(o)):i=qo(e));const a=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==bo(e))&&t}(s,r,o)?Xo(s):qr(0);let l=(n.left+a.x)/i.x,c=(n.top+a.y)/i.y,d=n.width/i.x,u=n.height/i.y;if(s){const e=bo(s),t=o&&xo(o)?bo(o):o;let r=e,n=Ho(r);for(;n&&o&&t!==r;){const e=qo(n),t=n.getBoundingClientRect(),o=Lo(n),s=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,u*=e.y,l+=s,c+=i,r=bo(n),n=Ho(r)}}return uo({width:d,height:u,x:l,y:c})}function Ko(e,t){const r=Io(e).scrollLeft;return t?t.left+r:Uo(vo(e)).left+r}function Go(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Ko(e,r),y:r.top+t.scrollTop}}const Zo=new Set(["absolute","fixed"]);function Jo(e,t,r){let o;if("viewport"===t)o=function(e,t){const r=bo(e),o=vo(e),n=r.visualViewport;let s=o.clientWidth,i=o.clientHeight,a=0,l=0;if(n){s=n.width,i=n.height;const e=Oo();(!e||e&&"fixed"===t)&&(a=n.offsetLeft,l=n.offsetTop)}const c=Ko(o);if(c<=0){const e=o.ownerDocument,t=e.body,r=getComputedStyle(t),n="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,i=Math.abs(o.clientWidth-t.clientWidth-n);i<=25&&(s-=i)}else c<=25&&(s+=c);return{width:s,height:i,x:a,y:l}}(e,r);else if("document"===t)o=function(e){const t=vo(e),r=Io(e),o=e.ownerDocument.body,n=Hr(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=Hr(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-r.scrollLeft+Ko(e);const a=-r.scrollTop;return"rtl"===Lo(o).direction&&(i+=Hr(t.clientWidth,o.clientWidth)-n),{width:n,height:s,x:i,y:a}}(vo(e));else if(xo(t))o=function(e,t){const r=Uo(e,!0,"fixed"===t),o=r.top+e.clientTop,n=r.left+e.clientLeft,s=Co(e)?qo(e):qr(1);return{width:e.clientWidth*s.x,height:e.clientHeight*s.y,x:n*s.x,y:o*s.y}}(t,r);else{const r=Xo(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return uo(o)}function Qo(e,t){const r=Mo(e);return!(r===t||!xo(r)||Do(r))&&("fixed"===Lo(r).position||Qo(r,t))}function en(e,t,r){const o=Co(t),n=vo(t),s="fixed"===r,i=Uo(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=qr(0);function c(){l.x=Ko(n)}if(o||!o&&!s)if(("body"!==yo(t)||jo(n))&&(a=Io(t)),o){const e=Uo(t,!0,s,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else n&&c();s&&!o&&n&&c();const d=!n||o||s?qr(0):Go(n,a);return{x:i.left+a.scrollLeft-l.x-d.x,y:i.top+a.scrollTop-l.y-d.y,width:i.width,height:i.height}}function tn(e){return"static"===Lo(e).position}function rn(e,t){if(!Co(e)||"fixed"===Lo(e).position)return null;if(t)return t(e);let r=e.offsetParent;return vo(e)===r&&(r=r.ownerDocument.body),r}function on(e,t){const r=bo(e);if(ko(e))return r;if(!Co(e)){let t=Mo(e);for(;t&&!Do(t);){if(xo(t)&&!tn(t))return t;t=Mo(t)}return r}let o=rn(e,t);for(;o&&_o(o)&&tn(o);)o=rn(o,t);return o&&Do(o)&&tn(o)&&!Ao(o)?r:o||function(e){let t=Mo(e);for(;Co(t)&&!Do(t);){if(Ao(t))return t;if(ko(t))return null;t=Mo(t)}return null}(e)||r}const nn={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e;const s="fixed"===n,i=vo(o),a=!!t&&ko(t.floating);if(o===i||a&&s)return r;let l={scrollLeft:0,scrollTop:0},c=qr(1);const d=qr(0),u=Co(o);if((u||!u&&!s)&&(("body"!==yo(o)||jo(i))&&(l=Io(o)),Co(o))){const e=Uo(o);c=qo(o),d.x=e.x+o.clientLeft,d.y=e.y+o.clientTop}const p=!i||u||s?qr(0):Go(i,l);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+p.x,y:r.y*c.y-l.scrollTop*c.y+d.y+p.y}},getDocumentElement:vo,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e;const s=[..."clippingAncestors"===r?ko(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let o=Wo(e,[],!1).filter(e=>xo(e)&&"body"!==yo(e)),n=null;const s="fixed"===Lo(e).position;let i=s?Mo(e):e;for(;xo(i)&&!Do(i);){const t=Lo(i),r=Ao(i);r||"fixed"!==t.position||(n=null),(s?!r&&!n:!r&&"static"===t.position&&n&&Zo.has(n.position)||jo(i)&&!r&&Qo(e,i))?o=o.filter(e=>e!==i):n=t,i=Mo(i)}return t.set(e,o),o}(t,this._c):[].concat(r),o],i=s[0],a=s.reduce((e,r)=>{const o=Jo(t,r,n);return e.top=Hr(o.top,e.top),e.right=Wr(o.right,e.right),e.bottom=Wr(o.bottom,e.bottom),e.left=Hr(o.left,e.left),e},Jo(t,i,n));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:on,getElementRects:async function(e){const t=this.getOffsetParent||on,r=this.getDimensions,o=await r(e.floating);return{reference:en(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=Bo(e);return{width:t,height:r}},getScale:qo,isElement:xo,isRTL:function(e){return"rtl"===Lo(e).direction}};function sn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}const an=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,o;const{x:n,y:s,placement:i,middlewareData:a}=t,l=await async function(e,t){const{placement:r,platform:o,elements:n}=e,s=await(null==o.isRTL?void 0:o.isRTL(n.floating)),i=Gr(r),a=Zr(r),l="y"===to(r),c=ho.has(i)?-1:1,d=s&&l?-1:1,u=Kr(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&"number"==typeof f&&(m="end"===a?-1*f:f),l?{x:m*d,y:p*c}:{x:p*c,y:m*d}}(t,e);return i===(null==(r=a.offset)?void 0:r.placement)&&null!=(o=a.arrow)&&o.alignmentOffset?{}:{x:n+l.x,y:s+l.y,data:{...l,placement:i}}}}},ln=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:o,placement:n}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=Kr(e,t),c={x:r,y:o},d=await mo(t,l),u=to(Gr(n)),p=Jr(u);let m=c[p],f=c[u];if(s){const e="y"===p?"bottom":"right";m=Ur(m+d["y"===p?"top":"left"],m,m-d[e])}if(i){const e="y"===u?"bottom":"right";f=Ur(f+d["y"===u?"top":"left"],f,f-d[e])}const h=a.fn({...t,[p]:m,[u]:f});return{...h,data:{x:h.x-r,y:h.y-o,enabled:{[p]:s,[u]:i}}}}}},cn=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,o;const{placement:n,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:h=!0,...g}=Kr(e,t);if(null!=(r=s.arrow)&&r.alignmentOffset)return{};const y=Gr(n),b=to(a),v=Gr(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=p||(v||!h?[lo(a)]:function(e){const t=lo(e);return[oo(e),t,oo(t)]}(a)),C="none"!==f;!p&&C&&x.push(...function(e,t,r,o){const n=Zr(e);let s=function(e,t,r){switch(e){case"top":case"bottom":return r?t?so:no:t?no:so;case"left":case"right":return t?io:ao;default:return[]}}(Gr(e),"start"===r,o);return n&&(s=s.map(e=>e+"-"+n),t&&(s=s.concat(s.map(oo)))),s}(a,h,f,w));const S=[a,...x],N=await mo(t,g),j=[];let P=(null==(o=s.flip)?void 0:o.overflows)||[];if(d&&j.push(N[y]),u){const e=function(e,t,r){void 0===r&&(r=!1);const o=Zr(e),n=ro(e),s=Qr(n);let i="x"===n?o===(r?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=lo(i)),[i,lo(i)]}(n,i,w);j.push(N[e[0]],N[e[1]])}if(P=[...P,{placement:n,overflows:j}],!j.every(e=>e<=0)){var _,$;const e=((null==(_=s.flip)?void 0:_.index)||0)+1,t=S[e];if(t&&("alignment"!==u||b===to(t)||P.every(e=>to(e.placement)!==b||e.overflows[0]>0)))return{data:{index:e,overflows:P},reset:{placement:t}};let r=null==($=P.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:$.placement;if(!r)switch(m){case"bestFit":{var k;const e=null==(k=P.filter(e=>{if(C){const t=to(e.placement);return t===b||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:k[0];e&&(r=e);break}case"initialPlacement":r=a}if(n!==r)return{reset:{placement:r}}}return{}}}},dn=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,o;const{placement:n,rects:s,platform:i,elements:a}=t,{apply:l=()=>{},...c}=Kr(e,t),d=await mo(t,c),u=Gr(n),p=Zr(n),m="y"===to(n),{width:f,height:h}=s.floating;let g,y;"top"===u||"bottom"===u?(g=u,y=p===(await(null==i.isRTL?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=u,g="end"===p?"top":"bottom");const b=h-d.top-d.bottom,v=f-d.left-d.right,w=Wr(h-d[g],b),x=Wr(f-d[y],v),C=!t.middlewareData.shift;let S=w,N=x;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(N=v),null!=(o=t.middlewareData.shift)&&o.enabled.y&&(S=b),C&&!p){const e=Hr(d.left,0),t=Hr(d.right,0),r=Hr(d.top,0),o=Hr(d.bottom,0);m?N=f-2*(0!==e||0!==t?e+t:Hr(d.left,d.right)):S=h-2*(0!==r||0!==o?r+o:Hr(d.top,d.bottom))}await l({...t,availableWidth:N,availableHeight:S});const j=await i.getDimensions(a.floating);return f!==j.width||h!==j.height?{reset:{rects:!0}}:{}}}},un=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:o,placement:n,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=Kr(e,t)||{};if(null==c)return{};const u=co(d),p={x:r,y:o},m=ro(n),f=Qr(m),h=await i.getDimensions(c),g="y"===m,y=g?"top":"left",b=g?"bottom":"right",v=g?"clientHeight":"clientWidth",w=s.reference[f]+s.reference[m]-p[m]-s.floating[f],x=p[m]-s.reference[m],C=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let S=C?C[v]:0;S&&await(null==i.isElement?void 0:i.isElement(C))||(S=a.floating[v]||s.floating[f]);const N=w/2-x/2,j=S/2-h[f]/2-1,P=Wr(u[y],j),_=Wr(u[b],j),$=P,k=S-h[f]-_,R=S/2-h[f]/2+N,E=Ur($,R,k),T=!l.arrow&&null!=Zr(n)&&R!==E&&s.reference[f]/2-(R<$?P:_)-h[f]/2<0,A=T?R<$?R-$:R-k:0;return{[m]:p[m]+A,data:{[m]:E,centerOffset:R-E-A,...T&&{alignmentOffset:A}},reset:T}}}),pn=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:r,elements:o,rects:n,platform:s,strategy:i}=t,{padding:a=2,x:l,y:c}=Kr(e,t),d=Array.from(await(null==s.getClientRects?void 0:s.getClientRects(o.reference))||[]),u=function(e){const t=e.slice().sort((e,t)=>e.y-t.y),r=[];let o=null;for(let e=0;e<t.length;e++){const n=t[e];!o||n.y-o.y>o.height/2?r.push([n]):r[r.length-1].push(n),o=n}return r.map(e=>uo(fo(e)))}(d),p=uo(fo(d)),m=co(a),f=await s.getElementRects({reference:{getBoundingClientRect:function(){if(2===u.length&&u[0].left>u[1].right&&null!=l&&null!=c)return u.find(e=>l>e.left-m.left&&l<e.right+m.right&&c>e.top-m.top&&c<e.bottom+m.bottom)||p;if(u.length>=2){if("y"===to(r)){const e=u[0],t=u[u.length-1],o="top"===Gr(r),n=e.top,s=t.bottom,i=o?e.left:t.left,a=o?e.right:t.right;return{top:n,bottom:s,left:i,right:a,width:a-i,height:s-n,x:i,y:n}}const e="left"===Gr(r),t=Hr(...u.map(e=>e.right)),o=Wr(...u.map(e=>e.left)),n=u.filter(r=>e?r.left===o:r.right===t),s=n[0].top,i=n[n.length-1].bottom;return{top:s,bottom:i,left:o,right:t,width:t-o,height:i-s,x:o,y:s}}return p}},floating:o.floating,strategy:i});return n.reference.x!==f.reference.x||n.reference.y!==f.reference.y||n.reference.width!==f.reference.width||n.reference.height!==f.reference.height?{reset:{rects:f}}:{}}}},mn=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:r,y:o,placement:n,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Kr(e,t),d={x:r,y:o},u=to(n),p=Jr(u);let m=d[p],f=d[u];const h=Kr(a,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const e="y"===p?"height":"width",t=s.reference[p]-s.floating[e]+g.mainAxis,r=s.reference[p]+s.reference[e]-g.mainAxis;m<t?m=t:m>r&&(m=r)}if(c){var y,b;const e="y"===p?"width":"height",t=ho.has(Gr(n)),r=s.reference[u]-s.floating[e]+(t&&(null==(y=i.offset)?void 0:y[u])||0)+(t?0:g.crossAxis),o=s.reference[u]+s.reference[e]+(t?0:(null==(b=i.offset)?void 0:b[u])||0)-(t?g.crossAxis:0);f<r?f=r:f>o&&(f=o)}return{[p]:m,[u]:f}}}},fn=(e,t,r)=>{const o=new Map,n={platform:nn,...r},s={...n.platform,_c:o};return(async(e,t,r)=>{const{placement:o="bottom",strategy:n="absolute",middleware:s=[],platform:i}=r,a=s.filter(Boolean),l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:u}=po(c,o,l),p=o,m={},f=0;for(let r=0;r<a.length;r++){const{name:s,fn:h}=a[r],{x:g,y,data:b,reset:v}=await h({x:d,y:u,initialPlacement:o,placement:p,strategy:n,middlewareData:m,rects:c,platform:i,elements:{reference:e,floating:t}});d=null!=g?g:d,u=null!=y?y:u,m={...m,[s]:{...m[s],...b}},v&&f<=50&&(f++,"object"==typeof v&&(v.placement&&(p=v.placement),v.rects&&(c=!0===v.rects?await i.getElementRects({reference:e,floating:t,strategy:n}):v.rects),({x:d,y:u}=po(c,p,l))),r=-1)}return{x:d,y:u,placement:p,strategy:n,middlewareData:m}})(e,t,{...n,platform:s})};var hn="undefined"!=typeof document?s.useLayoutEffect:function(){};function gn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,o,n;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(o=r;0!==o--;)if(!gn(e[o],t[o]))return!1;return!0}if(n=Object.keys(e),r=n.length,r!==Object.keys(t).length)return!1;for(o=r;0!==o--;)if(!{}.hasOwnProperty.call(t,n[o]))return!1;for(o=r;0!==o--;){const r=n[o];if(!("_owner"===r&&e.$$typeof||gn(e[r],t[r])))return!1}return!0}return e!=e&&t!=t}function yn(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function bn(e,t){const r=yn(e);return Math.round(t*r)/r}function vn(e){const t=s.useRef(e);return hn(()=>{t.current=e}),t}const wn=e=>({name:"arrow",options:e,fn(t){const{element:r,padding:o}="function"==typeof e?e(t):e;return r&&(n=r,{}.hasOwnProperty.call(n,"current"))?null!=r.current?un({element:r.current,padding:o}).fn(t):{}:r?un({element:r,padding:o}).fn(t):{};var n}}),xn=(e,t)=>({...an(e),options:[e,t]}),Cn=(e,t)=>({...mn(e),options:[e,t]}),Sn=(e,t)=>({...cn(e),options:[e,t]}),Nn=(e,t)=>({...pn(e),options:[e,t]});const jn={...i},Pn=jn.useInsertionEffect||(e=>e());var $n="undefined"!=typeof document?s.useLayoutEffect:s.useEffect;let kn=!1,Rn=0;const En=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Rn++,Tn=jn.useId||function(){const[e,t]=s.useState(()=>kn?En():void 0);return $n(()=>{null==e&&t(En())},[]),s.useEffect(()=>{kn=!0},[]),e};const An=s.createContext(null),On=s.createContext(null);function zn(e){void 0===e&&(e={});const{nodeId:t}=e,r=function(e){const{open:t=!1,onOpenChange:r,elements:o}=e,n=Tn(),i=s.useRef({}),[a]=s.useState(()=>function(){const e=new Map;return{emit(t,r){var o;null==(o=e.get(t))||o.forEach(e=>e(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var o;e.set(t,(null==(o=e.get(t))?void 0:o.filter(e=>e!==r))||[])}}}()),l=null!=((null==(f=s.useContext(An))?void 0:f.id)||null),[c,d]=s.useState(o.reference),u=function(e){const t=s.useRef(()=>{});return Pn(()=>{t.current=e}),s.useCallback(function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return null==t.current?void 0:t.current(...r)},[])}((e,t,o)=>{i.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:o,nested:l}),null==r||r(e,t,o)}),p=s.useMemo(()=>({setPositionReference:d}),[]),m=s.useMemo(()=>({reference:c||o.reference||null,floating:o.floating||null,domReference:o.reference}),[c,o.reference,o.floating]);var f;return s.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:m,events:a,floatingId:n,refs:p}),[t,u,m,a,n,p])}({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||r,n=o.elements,[i,a]=s.useState(null),[l,c]=s.useState(null),d=(null==n?void 0:n.domReference)||i,u=s.useRef(null),p=s.useContext(On);$n(()=>{d&&(u.current=d)},[d]);const m=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:n,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[u,p]=s.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,f]=s.useState(o);gn(m,o)||f(o);const[h,g]=s.useState(null),[y,b]=s.useState(null),v=s.useCallback(e=>{e!==S.current&&(S.current=e,g(e))},[]),w=s.useCallback(e=>{e!==N.current&&(N.current=e,b(e))},[]),x=i||h,C=a||y,S=s.useRef(null),N=s.useRef(null),j=s.useRef(u),P=null!=c,_=vn(c),$=vn(n),k=vn(d),R=s.useCallback(()=>{if(!S.current||!N.current)return;const e={placement:t,strategy:r,middleware:m};$.current&&(e.platform=$.current),fn(S.current,N.current,e).then(e=>{const t={...e,isPositioned:!1!==k.current};E.current&&!gn(j.current,t)&&(j.current=t,er.flushSync(()=>{p(t)}))})},[m,t,r,$,k]);hn(()=>{!1===d&&j.current.isPositioned&&(j.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);const E=s.useRef(!1);hn(()=>(E.current=!0,()=>{E.current=!1}),[]),hn(()=>{if(x&&(S.current=x),C&&(N.current=C),x&&C){if(_.current)return _.current(x,C,R);R()}},[x,C,R,_,P]);const T=s.useMemo(()=>({reference:S,floating:N,setReference:v,setFloating:w}),[v,w]),A=s.useMemo(()=>({reference:x,floating:C}),[x,C]),O=s.useMemo(()=>{const e={position:r,left:0,top:0};if(!A.floating)return e;const t=bn(A.floating,u.x),o=bn(A.floating,u.y);return l?{...e,transform:"translate("+t+"px, "+o+"px)",...yn(A.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:o}},[r,l,A.floating,u.x,u.y]);return s.useMemo(()=>({...u,update:R,refs:T,elements:A,floatingStyles:O}),[u,R,T,A,O])}({...e,elements:{...n,...l&&{reference:l}}}),f=s.useCallback(e=>{const t=xo(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),m.refs.setReference(t)},[m.refs]),h=s.useCallback(e=>{(xo(e)||null===e)&&(u.current=e,a(e)),(xo(m.refs.reference.current)||null===m.refs.reference.current||null!==e&&!xo(e))&&m.refs.setReference(e)},[m.refs]),g=s.useMemo(()=>({...m.refs,setReference:h,setPositionReference:f,domReference:u}),[m.refs,h,f]),y=s.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),b=s.useMemo(()=>({...m,...o,refs:g,elements:y,nodeId:t}),[m,g,y,t,o]);return $n(()=>{o.dataRef.current.floatingContext=b;const e=null==p?void 0:p.nodesRef.current.find(e=>e.id===t);e&&(e.context=b)}),s.useMemo(()=>({...m,context:b,refs:g,elements:y}),[m,g,y,b])}function Dn(e,t){const r=function(e){if(void 0===e)return{shift:!0,flip:!0};const t={...e};return void 0===e.shift&&(t.shift=!0),void 0===e.flip&&(t.flip=!0),t}(e.middlewares),o=[xn(e.offset)];return r.shift&&o.push((e=>({...ln(e),options:[e,void 0]}))("boolean"==typeof r.shift?{limiter:Cn(),padding:5}:{limiter:Cn(),padding:5,...r.shift})),r.flip&&o.push("boolean"==typeof r.flip?Sn():Sn(r.flip)),r.inline&&o.push("boolean"==typeof r.inline?Nn():Nn(r.inline)),o.push((e=>({...wn(e),options:[e,void 0]}))({element:e.arrowRef,padding:e.arrowOffset})),(r.size||"target"===e.width)&&o.push((e=>({...dn(e),options:[e,void 0]}))({..."boolean"==typeof r.size?{}:r.size,apply({rects:o,availableWidth:n,availableHeight:s,...i}){const a=t(),l=a.refs.floating.current?.style??{};r.size&&("object"==typeof r.size&&r.size.apply?r.size.apply({rects:o,availableWidth:n,availableHeight:s,...i}):Object.assign(l,{maxWidth:`${n}px`,maxHeight:`${s}px`})),"target"===e.width&&Object.assign(l,{width:`${o.reference.width}px`})}})),o}function Ln(e){const[t,r]=dt({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),o=(0,s.useRef)(t),n=zn({strategy:e.strategy,placement:e.position,middleware:Dn(e,()=>n)});return function({opened:e,floating:t,position:r,positionDependencies:o}){const[n,i]=(0,s.useState)(0);(0,s.useEffect)(()=>{if(t.refs.reference.current&&t.refs.floating.current&&e)return function(e,t,r,o){void 0===o&&(o={});const{ancestorScroll:n=!0,ancestorResize:s=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,c=Vo(e),d=n||s?[...c?Wo(c):[],...Wo(t)]:[];d.forEach(e=>{n&&e.addEventListener("scroll",r,{passive:!0}),s&&e.addEventListener("resize",r)});const u=c&&a?function(e,t){let r,o=null;const n=vo(e);function s(){var e;clearTimeout(r),null==(e=o)||e.disconnect(),o=null}return function i(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),s();const c=e.getBoundingClientRect(),{left:d,top:u,width:p,height:m}=c;if(a||t(),!p||!m)return;const f={rootMargin:-Vr(u)+"px "+-Vr(n.clientWidth-(d+p))+"px "+-Vr(n.clientHeight-(u+m))+"px "+-Vr(d)+"px",threshold:Hr(0,Wr(1,l))||1};let h=!0;function g(t){const o=t[0].intersectionRatio;if(o!==l){if(!h)return i();o?i(!1,o):r=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==o||sn(c,e.getBoundingClientRect())||i(),h=!1}try{o=new IntersectionObserver(g,{...f,root:n.ownerDocument})}catch(e){o=new IntersectionObserver(g,f)}o.observe(e)}(!0),s}(c,r):null;let p,m=-1,f=null;i&&(f=new ResizeObserver(e=>{let[o]=e;o&&o.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),r()}),c&&!l&&f.observe(c),f.observe(t));let h=l?Uo(e):null;return l&&function t(){const o=Uo(e);h&&!sn(h,o)&&r(),h=o,p=requestAnimationFrame(t)}(),r(),()=>{var e;d.forEach(e=>{n&&e.removeEventListener("scroll",r),s&&e.removeEventListener("resize",r)}),null==u||u(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(p)}}(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,n,r]),ur(()=>{t.update()},o),ur(()=>{i(e=>e+1)},[e])}({opened:t,position:e.position,positionDependencies:e.positionDependencies||[],floating:n}),ur(()=>{e.onPositionChange?.(n.placement)},[n.placement]),ur(()=>{t!==o.current&&(t?e.onOpen?.():e.onClose?.()),o.current=t},[t,e.onClose,e.onOpen]),{floating:n,controlled:"boolean"==typeof e.opened,opened:t,onClose:()=>{t&&!e.disabled&&r(!1)},onToggle:()=>!e.disabled&&r(!t)}}const In={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:Yt("popover"),__staticSelector:"Popover",width:"max-content"},Mn=(e,{radius:t,shadow:r})=>({dropdown:{"--popover-radius":void 0===t?void 0:ae(t),"--popover-shadow":ce(r)}});function Fn(e){const t=te("Popover",In,e),{children:r,position:o,offset:n,onPositionChange:i,positionDependencies:a,opened:l,transitionProps:d,onExitTransitionEnd:u,onEnterTransitionEnd:p,width:m,middlewares:f,withArrow:h,arrowSize:g,arrowOffset:y,arrowRadius:b,arrowPosition:v,unstyled:w,classNames:x,styles:C,closeOnClickOutside:S,withinPortal:N,portalProps:j,closeOnEscape:P,clickOutsideEvents:_,trapFocus:$,onClose:k,onDismiss:R,onOpen:E,onChange:T,zIndex:A,radius:O,shadow:z,id:D,defaultOpened:L,__staticSelector:I,withRoles:M,disabled:F,returnFocus:W,variant:H,keepMounted:B,vars:V,floatingStrategy:q,withOverlay:Y,overlayProps:X,...U}=t,K=Ce({name:I,props:t,classes:zr,classNames:x,styles:C,unstyled:w,rootSelector:"dropdown",vars:V,varsResolver:Mn}),{resolvedStyles:G}=Ft({classNames:x,styles:C,props:t}),Z=(0,s.useRef)(null),[J,Q]=(0,s.useState)(null),[ee,re]=(0,s.useState)(null),{dir:oe}=Ut(),ne=Mt(D),se=Ln({middlewares:f,width:m,position:Kt(oe,o),offset:"number"==typeof n?n+(h?g/2:0):n,arrowRef:Z,arrowOffset:y,onPositionChange:i,positionDependencies:a,opened:l,defaultOpened:L,onChange:T,onOpen:E,onClose:k,onDismiss:R,strategy:q,disabled:F});!function(e,t,r){const o=(0,s.useRef)(null);(0,s.useEffect)(()=>{const n=t=>{const{target:n}=t??{};if(Array.isArray(r)){const o=n?.hasAttribute("data-ignore-outside-clicks")||!document.body.contains(n)&&"HTML"!==n.tagName;r.every(e=>!!e&&!t.composedPath().includes(e))&&!o&&e()}else o.current&&!o.current.contains(n)&&e()};return(t||Vt).forEach(e=>document.addEventListener(e,n)),()=>{(t||Vt).forEach(e=>document.removeEventListener(e,n))}},[o,e,r])}(()=>{S&&(se.onClose(),R?.())},_,[J,ee]);const ie=(0,s.useCallback)(e=>{Q(e),se.floating.refs.setReference(e)},[se.floating.refs.setReference]),ae=(0,s.useCallback)(e=>{re(e),se.floating.refs.setFloating(e)},[se.floating.refs.setFloating]),le=(0,s.useCallback)(()=>{d?.onExited?.(),u?.()},[d?.onExited,u]),ce=(0,s.useCallback)(()=>{d?.onEntered?.(),p?.()},[d?.onEntered,p]);return(0,c.jsxs)(fr,{value:{returnFocus:W,disabled:F,controlled:se.controlled,reference:ie,floating:ae,x:se.floating.x,y:se.floating.y,arrowX:se.floating?.middlewareData?.arrow?.x,arrowY:se.floating?.middlewareData?.arrow?.y,opened:se.opened,arrowRef:Z,transitionProps:{...d,onExited:le,onEntered:ce},width:m,withArrow:h,arrowSize:g,arrowOffset:y,arrowRadius:b,arrowPosition:v,placement:se.floating.placement,trapFocus:$,withinPortal:N,portalProps:j,zIndex:A,radius:O,shadow:z,closeOnEscape:P,onDismiss:R,onClose:se.onClose,onToggle:se.onToggle,getTargetId:()=>`${ne}-target`,getDropdownId:()=>`${ne}-dropdown`,withRoles:M,targetProps:U,__staticSelector:I,classNames:x,styles:C,unstyled:w,variant:H,keepMounted:B,getStyles:K,resolvedStyles:G,floatingStrategy:q},children:[r,Y&&(0,c.jsx)(mr,{transition:"fade",mounted:se.opened,duration:d?.duration||250,exitDuration:d?.exitDuration||250,children:e=>(0,c.jsx)(ir,{withinPortal:N,children:(0,c.jsx)(Qt,{...X,...K("overlay",{className:X?.className,style:[e,X?.style]})})})})]})}Fn.Target=Fr,Fn.Dropdown=Lr,Fn.displayName="@mantine/core/Popover",Fn.extend=e=>e;const[Wn,Hn]=Ke("Combobox component was not found in tree");var Bn={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2"};const Vn={error:null},qn=(e,{size:t,color:r})=>({chevron:{"--combobox-chevron-size":se(t,"combobox-chevron-size"),"--combobox-chevron-color":r?_(r,e):void 0}}),Yn=oe((e,t)=>{const r=te("ComboboxChevron",Vn,e),{size:o,error:n,style:s,className:i,classNames:a,styles:l,unstyled:d,vars:u,mod:p,...m}=r,f=Ce({name:"ComboboxChevron",classes:Bn,props:r,style:s,className:i,classNames:a,styles:l,unstyled:d,vars:u,varsResolver:qn,rootSelector:"chevron"});return(0,c.jsx)(Fe,{component:"svg",...m,...f("chevron"),size:o,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:n},p],ref:t,children:(0,c.jsx)("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});function Xn(e=null){const t=(0,s.createContext)(e);return[({children:e,value:r})=>(0,c.jsx)(t.Provider,{value:r,children:e}),()=>(0,s.useContext)(t)]}Yn.classes=Bn,Yn.displayName="@mantine/core/ComboboxChevron";const[Un,Kn]=Xn({size:"sm"}),Gn=(0,s.forwardRef)(({size:e="var(--cb-icon-size, 70%)",style:t,...r},o)=>(0,c.jsx)("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t,width:e,height:e},ref:o,...r,children:(0,c.jsx)("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}));Gn.displayName="@mantine/core/CloseIcon";var Zn={root:"m_86a44da5","root--subtle":"m_220c80f2"};const Jn={variant:"subtle"},Qn=(e,{size:t,radius:r,iconSize:o})=>({root:{"--cb-size":se(t,"cb-size"),"--cb-radius":void 0===r?void 0:ae(r),"--cb-icon-size":v(o)}}),es=qe((e,t)=>{const r=te("CloseButton",Jn,e),{iconSize:o,children:n,vars:s,radius:i,className:a,classNames:l,style:d,styles:u,unstyled:p,"data-disabled":m,disabled:f,variant:h,icon:g,mod:y,__staticSelector:b,...v}=r,w=Ce({name:b||"CloseButton",props:r,className:a,style:d,classes:Zn,classNames:l,styles:u,unstyled:p,vars:s,varsResolver:Qn});return(0,c.jsxs)(Ue,{ref:t,...v,unstyled:p,variant:h,disabled:f,mod:[{disabled:f||m},y],...w("root",{variant:h,active:!f&&!m}),children:[g||(0,c.jsx)(Gn,{}),n]})});es.classes=Zn,es.displayName="@mantine/core/CloseButton";const ts={},rs=oe((e,t)=>{const r=te("InputClearButton",ts,e),{size:o,variant:n,vars:s,classNames:i,styles:a,...l}=r,d=Kn(),{resolvedClassNames:u,resolvedStyles:p}=Ft({classNames:i,styles:a,props:r});return(0,c.jsx)(es,{variant:n||"transparent",ref:t,size:o||d?.size||"sm",classNames:u,styles:p,__staticSelector:"InputClearButton",...l})});rs.displayName="@mantine/core/InputClearButton";const[os,ns]=Xn({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var ss={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};const is={},as=(e,{size:t})=>({description:{"--input-description-size":void 0===t?void 0:`calc(${le(t)} - ${v(2)})`}}),ls=oe((e,t)=>{const r=te("InputDescription",is,e),{classNames:o,className:n,style:s,styles:i,unstyled:a,vars:l,size:d,__staticSelector:u,__inheritStyles:p=!0,variant:m,...f}=te("InputDescription",is,r),h=ns(),g=Ce({name:["InputWrapper",u],props:r,classes:ss,className:n,style:s,classNames:o,styles:i,unstyled:a,rootSelector:"description",vars:l,varsResolver:as}),y=p&&h?.getStyles||g;return(0,c.jsx)(Fe,{component:"p",ref:t,variant:m,size:d,...y("description",h?.getStyles?{className:n,style:s}:void 0),...f})});ls.classes=ss,ls.displayName="@mantine/core/InputDescription";const cs={},ds=(e,{size:t})=>({error:{"--input-error-size":void 0===t?void 0:`calc(${le(t)} - ${v(2)})`}}),us=oe((e,t)=>{const r=te("InputError",cs,e),{classNames:o,className:n,style:s,styles:i,unstyled:a,vars:l,size:d,__staticSelector:u,__inheritStyles:p=!0,variant:m,...f}=r,h=Ce({name:["InputWrapper",u],props:r,classes:ss,className:n,style:s,classNames:o,styles:i,unstyled:a,rootSelector:"error",vars:l,varsResolver:ds}),g=ns(),y=p&&g?.getStyles||h;return(0,c.jsx)(Fe,{component:"p",ref:t,variant:m,size:d,...y("error",g?.getStyles?{className:n,style:s}:void 0),...f})});us.classes=ss,us.displayName="@mantine/core/InputError";const ps={labelElement:"label"},ms=(e,{size:t})=>({label:{"--input-label-size":le(t),"--input-asterisk-color":void 0}}),fs=oe((e,t)=>{const r=te("InputLabel",ps,e),{classNames:o,className:n,style:s,styles:i,unstyled:a,vars:l,labelElement:d,size:u,required:p,htmlFor:m,onMouseDown:f,children:h,__staticSelector:g,variant:y,mod:b,...v}=te("InputLabel",ps,r),w=Ce({name:["InputWrapper",g],props:r,classes:ss,className:n,style:s,classNames:o,styles:i,unstyled:a,rootSelector:"label",vars:l,varsResolver:ms}),x=ns(),C=x?.getStyles||w;return(0,c.jsxs)(Fe,{...C("label",x?.getStyles?{className:n,style:s}:void 0),component:d,variant:y,size:u,ref:t,htmlFor:"label"===d?m:void 0,mod:[{required:p},b],onMouseDown:e=>{f?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault()},...v,children:[h,p&&(0,c.jsx)("span",{...C("required"),"aria-hidden":!0,children:" *"})]})});fs.classes=ss,fs.displayName="@mantine/core/InputLabel";const hs={},gs=oe((e,t)=>{const r=te("InputPlaceholder",hs,e),{classNames:o,className:n,style:s,styles:i,unstyled:a,vars:l,__staticSelector:d,variant:u,error:p,mod:m,...f}=te("InputPlaceholder",hs,r),h=Ce({name:["InputPlaceholder",d],props:r,classes:ss,className:n,style:s,classNames:o,styles:i,unstyled:a,rootSelector:"placeholder"});return(0,c.jsx)(Fe,{...h("placeholder"),mod:[{error:!!p},m],component:"span",variant:u,ref:t,...f})});function ys(e,{hasDescription:t,hasError:r}){const o=e.findIndex(e=>"input"===e),n=e.slice(0,o),s=e.slice(o+1),i=t&&n.includes("description")||r&&n.includes("error");return{offsetBottom:t&&s.includes("description")||r&&s.includes("error"),offsetTop:i}}gs.classes=ss,gs.displayName="@mantine/core/InputPlaceholder";const bs={labelElement:"label",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},vs=(e,{size:t})=>({label:{"--input-label-size":le(t),"--input-asterisk-color":void 0},error:{"--input-error-size":void 0===t?void 0:`calc(${le(t)} - ${v(2)})`},description:{"--input-description-size":void 0===t?void 0:`calc(${le(t)} - ${v(2)})`}}),ws=oe((e,t)=>{const r=te("InputWrapper",bs,e),{classNames:o,className:n,style:i,styles:a,unstyled:l,vars:d,size:u,variant:p,__staticSelector:m,inputContainer:f,inputWrapperOrder:h,label:g,error:y,description:b,labelProps:v,descriptionProps:w,errorProps:x,labelElement:C,children:S,withAsterisk:N,id:j,required:P,__stylesApiProps:_,mod:$,...k}=r,R=Ce({name:["InputWrapper",m],props:_||r,classes:ss,className:n,style:i,classNames:o,styles:a,unstyled:l,vars:d,varsResolver:vs}),E={size:u,variant:p,__staticSelector:m},T=Mt(j),A="boolean"==typeof N?N:P,O=x?.id||`${T}-error`,z=w?.id||`${T}-description`,D=T,L=!!y&&"boolean"!=typeof y,I=!!b,M=`${L?O:""} ${I?z:""}`,F=M.trim().length>0?M.trim():void 0,W=v?.id||`${T}-label`,H=g&&(0,c.jsx)(fs,{labelElement:C,id:W,htmlFor:D,required:A,...E,...v,children:g},"label"),B=I&&(0,c.jsx)(ls,{...w,...E,size:w?.size||E.size,id:w?.id||z,children:b},"description"),V=(0,c.jsx)(s.Fragment,{children:f(S)},"input"),q=L&&(0,s.createElement)(us,{...x,...E,size:x?.size||E.size,key:"error",id:x?.id||O},y),Y=h.map(e=>{switch(e){case"label":return H;case"input":return V;case"description":return B;case"error":return q;default:return null}});return(0,c.jsx)(os,{value:{getStyles:R,describedBy:F,inputId:D,labelId:W,...ys(h,{hasDescription:I,hasError:L})},children:(0,c.jsx)(Fe,{ref:t,variant:p,size:u,mod:[{error:!!y},$],...R("root"),...k,children:Y})})});ws.classes=ss,ws.displayName="@mantine/core/InputWrapper";const xs={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0},Cs=(e,t,r)=>({wrapper:{"--input-margin-top":r.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":r.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":se(t.size,"input-height"),"--input-fz":le(t.size),"--input-radius":void 0===t.radius?void 0:ae(t.radius),"--input-left-section-width":void 0!==t.leftSectionWidth?v(t.leftSectionWidth):void 0,"--input-right-section-width":void 0!==t.rightSectionWidth?v(t.rightSectionWidth):void 0,"--input-padding-y":t.multiline?se(t.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}}),Ss=qe((e,t)=>{const r=te("Input",xs,e),{classNames:o,className:n,style:s,styles:i,unstyled:a,required:l,__staticSelector:d,__stylesApiProps:u,size:p,wrapperProps:m,error:f,disabled:h,leftSection:g,leftSectionProps:y,leftSectionWidth:b,rightSection:v,rightSectionProps:w,rightSectionWidth:x,rightSectionPointerEvents:C,leftSectionPointerEvents:S,variant:N,vars:j,pointer:P,multiline:_,radius:$,id:k,withAria:R,withErrorStyles:E,mod:T,inputSize:A,__clearSection:O,__clearable:z,__defaultRightSection:D,...L}=r,{styleProps:I,rest:M}=Re(L),F=ns(),W=Ce({name:["Input",d],props:u||r,classes:ss,className:n,style:s,classNames:o,styles:i,unstyled:a,stylesCtx:{offsetBottom:F?.offsetBottom,offsetTop:F?.offsetTop},rootSelector:"wrapper",vars:j,varsResolver:Cs}),H=R?{required:l,disabled:h,"aria-invalid":!!f,"aria-describedby":F?.describedBy,id:F?.inputId||k}:{},B=v||z&&O||D;return(0,c.jsx)(Un,{value:{size:p||"sm"},children:(0,c.jsxs)(Fe,{...W("wrapper"),...I,...m,mod:[{error:!!f&&E,pointer:P,disabled:h,multiline:_,"data-with-right-section":!!B,"data-with-left-section":!!g},T],variant:N,size:p,children:[g&&(0,c.jsx)("div",{...y,"data-position":"left",...W("section",{className:y?.className,style:y?.style}),children:g}),(0,c.jsx)(Fe,{component:"input",...M,...H,ref:t,required:l,mod:{disabled:h,error:!!f&&E},variant:N,__size:A,...W("input")}),B&&(0,c.jsx)("div",{...w,"data-position":"right",...W("section",{className:w?.className,style:w?.style}),children:B})]})})});Ss.classes=ss,Ss.Wrapper=ws,Ss.Label=fs,Ss.Error=us,Ss.Description=ls,Ss.Placeholder=gs,Ss.ClearButton=rs,Ss.displayName="@mantine/core/Input";const Ns=(0,s.forwardRef)(({size:e,onMouseDown:t,onClick:r,onClear:o,...n},s)=>(0,c.jsx)(Ss.ClearButton,{ref:s,tabIndex:-1,"aria-hidden":!0,...n,onMouseDown:e=>{e.preventDefault(),t?.(e)},onClick:e=>{o(),r?.(e)}}));Ns.displayName="@mantine/core/ComboboxClearButton";const js={},Ps=oe((e,t)=>{const{classNames:r,styles:o,className:n,style:s,hidden:i,...a}=te("ComboboxDropdown",js,e),l=Hn();return(0,c.jsx)(Fn.Dropdown,{...a,ref:t,role:"presentation","data-hidden":i||void 0,...l.getStyles("dropdown",{className:n,style:s,classNames:r,styles:o})})});Ps.classes=Bn,Ps.displayName="@mantine/core/ComboboxDropdown";const _s={refProp:"ref"},$s=oe((e,t)=>{const{children:r,refProp:o}=te("ComboboxDropdownTarget",_s,e);if(Hn(),!kr(r))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return(0,c.jsx)(Fn.Target,{ref:t,refProp:o,children:r})});$s.displayName="@mantine/core/ComboboxDropdownTarget";const ks={},Rs=oe((e,t)=>{const{classNames:r,className:o,style:n,styles:s,vars:i,...a}=te("ComboboxEmpty",ks,e),l=Hn();return(0,c.jsx)(Fe,{ref:t,...l.getStyles("empty",{className:o,classNames:r,styles:s,style:n}),...a})});function Es({onKeyDown:e,withKeyboardNavigation:t,withAriaAttributes:r,withExpandedAttribute:o,targetType:n,autoComplete:i}){const a=Hn(),[l,c]=(0,s.useState)(null);return{...r?{"aria-haspopup":"listbox","aria-expanded":o&&!(!a.store.listId||!a.store.dropdownOpened)||void 0,"aria-controls":a.store.dropdownOpened?a.store.listId:void 0,"aria-activedescendant":a.store.dropdownOpened&&l||void 0,autoComplete:i,"data-expanded":a.store.dropdownOpened||void 0,"data-mantine-stop-propagation":a.store.dropdownOpened||void 0}:{},onKeyDown:r=>{if(e?.(r),!a.readOnly&&t){if(r.nativeEvent.isComposing)return;if("ArrowDown"===r.nativeEvent.code&&(r.preventDefault(),a.store.dropdownOpened?c(a.store.selectNextOption()):(a.store.openDropdown("keyboard"),c(a.store.selectActiveOption()),a.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),"ArrowUp"===r.nativeEvent.code&&(r.preventDefault(),a.store.dropdownOpened?c(a.store.selectPreviousOption()):(a.store.openDropdown("keyboard"),c(a.store.selectActiveOption()),a.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),"Enter"===r.nativeEvent.code||"NumpadEnter"===r.nativeEvent.code){if(229===r.nativeEvent.keyCode)return;const e=a.store.getSelectedOptionIndex();a.store.dropdownOpened&&-1!==e?(r.preventDefault(),a.store.clickSelectedOption()):"button"===n&&(r.preventDefault(),a.store.openDropdown("keyboard"))}"Escape"===r.key&&a.store.closeDropdown("keyboard"),"Space"===r.nativeEvent.code&&"button"===n&&(r.preventDefault(),a.store.toggleDropdown("keyboard"))}}}}Rs.classes=Bn,Rs.displayName="@mantine/core/ComboboxEmpty";const Ts={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},As=oe((e,t)=>{const{children:r,refProp:o,withKeyboardNavigation:n,withAriaAttributes:i,withExpandedAttribute:a,targetType:l,autoComplete:c,...d}=te("ComboboxEventsTarget",Ts,e);if(!kr(r))throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const u=Hn(),p=Es({targetType:l,withAriaAttributes:i,withKeyboardNavigation:n,withExpandedAttribute:a,onKeyDown:r.props.onKeyDown,autoComplete:c});return(0,s.cloneElement)(r,{...p,...d,[o]:rr(t,u.store.targetRef,Ir(r))})});As.displayName="@mantine/core/ComboboxEventsTarget";const Os={},zs=oe((e,t)=>{const{classNames:r,className:o,style:n,styles:s,vars:i,...a}=te("ComboboxFooter",Os,e),l=Hn();return(0,c.jsx)(Fe,{ref:t,...l.getStyles("footer",{className:o,classNames:r,style:n,styles:s}),...a,onMouseDown:e=>{e.preventDefault()}})});zs.classes=Bn,zs.displayName="@mantine/core/ComboboxFooter";const Ds={},Ls=oe((e,t)=>{const{classNames:r,className:o,style:n,styles:s,vars:i,children:a,label:l,...d}=te("ComboboxGroup",Ds,e),u=Hn();return(0,c.jsxs)(Fe,{ref:t,...u.getStyles("group",{className:o,classNames:r,style:n,styles:s}),...d,children:[l&&(0,c.jsx)("div",{...u.getStyles("groupLabel",{classNames:r,styles:s}),children:l}),a]})});Ls.classes=Bn,Ls.displayName="@mantine/core/ComboboxGroup";const Is={},Ms=oe((e,t)=>{const{classNames:r,className:o,style:n,styles:s,vars:i,...a}=te("ComboboxHeader",Is,e),l=Hn();return(0,c.jsx)(Fe,{ref:t,...l.getStyles("header",{className:o,classNames:r,style:n,styles:s}),...a,onMouseDown:e=>{e.preventDefault()}})});function Fs({value:e,valuesDivider:t=",",...r}){return(0,c.jsx)("input",{type:"hidden",value:Array.isArray(e)?e.join(t):e||"",...r})}Ms.classes=Bn,Ms.displayName="@mantine/core/ComboboxHeader",Fs.displayName="@mantine/core/ComboboxHiddenInput";const Ws={},Hs=oe((e,t)=>{const r=te("ComboboxOption",Ws,e),{classNames:o,className:n,style:i,styles:a,vars:l,onClick:d,id:u,active:p,onMouseDown:m,onMouseOver:f,disabled:h,selected:g,mod:y,...b}=r,v=Hn(),w=(0,s.useId)(),x=u||w;return(0,c.jsx)(Fe,{...v.getStyles("option",{className:n,classNames:o,styles:a,style:i}),...b,ref:t,id:x,mod:["combobox-option",{"combobox-active":p,"combobox-disabled":h,"combobox-selected":g},y],role:"option",onClick:e=>{h?e.preventDefault():(v.onOptionSubmit?.(r.value,r),d?.(e))},onMouseDown:e=>{e.preventDefault(),m?.(e)},onMouseOver:e=>{v.resetSelectionOnOptionHover&&v.store.resetSelectedOption(),f?.(e)}})});Hs.classes=Bn,Hs.displayName="@mantine/core/ComboboxOption";const Bs={},Vs=oe((e,t)=>{const r=te("ComboboxOptions",Bs,e),{classNames:o,className:n,style:i,styles:a,id:l,onMouseDown:d,labelledBy:u,...p}=r,m=Hn(),f=Mt(l);return(0,s.useEffect)(()=>{m.store.setListId(f)},[f]),(0,c.jsx)(Fe,{ref:t,...m.getStyles("options",{className:n,style:i,classNames:o,styles:a}),...p,id:f,role:"listbox","aria-labelledby":u,onMouseDown:e=>{e.preventDefault(),d?.(e)}})});Vs.classes=Bn,Vs.displayName="@mantine/core/ComboboxOptions";const qs={withAriaAttributes:!0,withKeyboardNavigation:!0},Ys=oe((e,t)=>{const r=te("ComboboxSearch",qs,e),{classNames:o,styles:n,unstyled:s,vars:i,withAriaAttributes:a,onKeyDown:l,withKeyboardNavigation:d,size:u,...p}=r,m=Hn(),f=m.getStyles("search"),h=Es({targetType:"input",withAriaAttributes:a,withKeyboardNavigation:d,withExpandedAttribute:!1,onKeyDown:l,autoComplete:"off"});return(0,c.jsx)(Ss,{ref:rr(t,m.store.searchRef),classNames:[{input:f.className},o],styles:[{input:f.style},n],size:u||m.size,...h,...p,__staticSelector:"Combobox"})});Ys.classes=Bn,Ys.displayName="@mantine/core/ComboboxSearch";const Xs={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},Us=oe((e,t)=>{const{children:r,refProp:o,withKeyboardNavigation:n,withAriaAttributes:i,withExpandedAttribute:a,targetType:l,autoComplete:d,...u}=te("ComboboxTarget",Xs,e);if(!kr(r))throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const p=Hn(),m=Es({targetType:l,withAriaAttributes:i,withKeyboardNavigation:n,withExpandedAttribute:a,onKeyDown:r.props.onKeyDown,autoComplete:d}),f=(0,s.cloneElement)(r,{...m,...u});return(0,c.jsx)(Fn.Target,{ref:rr(t,p.store.targetRef),children:f})});function Ks({defaultOpened:e,opened:t,onOpenedChange:r,onDropdownClose:o,onDropdownOpen:n,loop:i=!0,scrollBehavior:a="instant"}={}){const[l,c]=dt({value:t,defaultValue:e,finalValue:!1,onChange:r}),d=(0,s.useRef)(null),u=(0,s.useRef)(-1),p=(0,s.useRef)(null),m=(0,s.useRef)(null),f=(0,s.useRef)(-1),h=(0,s.useRef)(-1),g=(0,s.useRef)(-1),y=(0,s.useCallback)((e="unknown")=>{l||(c(!0),n?.(e))},[c,n,l]),b=(0,s.useCallback)((e="unknown")=>{l&&(c(!1),o?.(e))},[c,o,l]),v=(0,s.useCallback)((e="unknown")=>{l?b(e):y(e)},[b,y,l]),w=(0,s.useCallback)(()=>{const e=document.querySelector(`#${d.current} [data-combobox-selected]`);e?.removeAttribute("data-combobox-selected"),e?.removeAttribute("aria-selected")},[]),x=(0,s.useCallback)(e=>{const t=document.getElementById(d.current),r=t?.querySelectorAll("[data-combobox-option]");if(!r)return null;const o=e>=r.length?0:e<0?r.length-1:e;return u.current=o,r?.[o]&&!r[o].hasAttribute("data-combobox-disabled")?(w(),r[o].setAttribute("data-combobox-selected","true"),r[o].setAttribute("aria-selected","true"),r[o].scrollIntoView({block:"nearest",behavior:a}),r[o].id):null},[a,w]),C=(0,s.useCallback)(()=>{const e=document.querySelector(`#${d.current} [data-combobox-active]`);if(e){const t=document.querySelectorAll(`#${d.current} [data-combobox-option]`),r=Array.from(t).findIndex(t=>t===e);return x(r)}return x(0)},[x]),S=(0,s.useCallback)(()=>x(function(e,t,r){for(let r=e+1;r<t.length;r+=1)if(!t[r].hasAttribute("data-combobox-disabled"))return r;if(r)for(let e=0;e<t.length;e+=1)if(!t[e].hasAttribute("data-combobox-disabled"))return e;return e}(u.current,document.querySelectorAll(`#${d.current} [data-combobox-option]`),i)),[x,i]),N=(0,s.useCallback)(()=>x(function(e,t,r){for(let r=e-1;r>=0;r-=1)if(!t[r].hasAttribute("data-combobox-disabled"))return r;if(r)for(let e=t.length-1;e>-1;e-=1)if(!t[e].hasAttribute("data-combobox-disabled"))return e;return e}(u.current,document.querySelectorAll(`#${d.current} [data-combobox-option]`),i)),[x,i]),j=(0,s.useCallback)(()=>x(function(e){for(let t=0;t<e.length;t+=1)if(!e[t].hasAttribute("data-combobox-disabled"))return t;return-1}(document.querySelectorAll(`#${d.current} [data-combobox-option]`))),[x]),P=(0,s.useCallback)((e="selected",t)=>{g.current=window.setTimeout(()=>{const r=document.querySelectorAll(`#${d.current} [data-combobox-option]`),o=Array.from(r).findIndex(t=>t.hasAttribute(`data-combobox-${e}`));u.current=o,t?.scrollIntoView&&r[o]?.scrollIntoView({block:"nearest",behavior:a})},0)},[]),_=(0,s.useCallback)(()=>{u.current=-1,w()},[w]),$=(0,s.useCallback)(()=>{const e=document.querySelectorAll(`#${d.current} [data-combobox-option]`),t=e?.[u.current];t?.click()},[]),k=(0,s.useCallback)(e=>{d.current=e},[]),R=(0,s.useCallback)(()=>{f.current=window.setTimeout(()=>p.current.focus(),0)},[]),E=(0,s.useCallback)(()=>{h.current=window.setTimeout(()=>m.current.focus(),0)},[]),T=(0,s.useCallback)(()=>u.current,[]);return(0,s.useEffect)(()=>()=>{window.clearTimeout(f.current),window.clearTimeout(h.current),window.clearTimeout(g.current)},[]),{dropdownOpened:l,openDropdown:y,closeDropdown:b,toggleDropdown:v,selectedOptionIndex:u.current,getSelectedOptionIndex:T,selectOption:x,selectFirstOption:j,selectActiveOption:C,selectNextOption:S,selectPreviousOption:N,resetSelectedOption:_,updateSelectedOptionIndex:P,listId:d.current,setListId:k,clickSelectedOption:$,searchRef:p,focusSearchInput:R,targetRef:m,focusTarget:E}}Us.displayName="@mantine/core/ComboboxTarget";const Gs={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0}},Zs=(e,{size:t,dropdownPadding:r})=>({options:{"--combobox-option-fz":le(t),"--combobox-option-padding":se(t,"combobox-option-padding")},dropdown:{"--combobox-padding":void 0===r?void 0:v(r),"--combobox-option-fz":le(t),"--combobox-option-padding":se(t,"combobox-option-padding")}});function Js(e){const t=te("Combobox",Gs,e),{classNames:r,styles:o,unstyled:n,children:s,store:i,vars:a,onOptionSubmit:l,onClose:d,size:u,dropdownPadding:p,resetSelectionOnOptionHover:m,__staticSelector:f,readOnly:h,...g}=t,y=Ks(),b=i||y,v=Ce({name:f||"Combobox",classes:Bn,props:t,classNames:r,styles:o,unstyled:n,vars:a,varsResolver:Zs});return(0,c.jsx)(Wn,{value:{getStyles:v,store:b,onOptionSubmit:l,size:u,resetSelectionOnOptionHover:m,readOnly:h},children:(0,c.jsx)(Fn,{opened:b.dropdownOpened,...g,onChange:e=>!e&&(d?.(),void b.closeDropdown()),withRoles:!1,unstyled:n,children:s})})}function Qs({size:e,style:t,...r}){const o=void 0!==e?{width:v(e),height:v(e),...t}:t;return(0,c.jsx)("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":!0,...r,children:(0,c.jsx)("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}Js.extend=e=>e,Js.classes=Bn,Js.displayName="@mantine/core/Combobox",Js.Target=Us,Js.Dropdown=Ps,Js.Options=Vs,Js.Option=Hs,Js.Search=Ys,Js.Empty=Rs,Js.Chevron=Yn,Js.Footer=zs,Js.Header=Ms,Js.EventsTarget=As,Js.DropdownTarget=$s,Js.Group=Ls,Js.ClearButton=Ns,Js.HiddenInput=Fs;const[ei,ti]=Ke("ScrollArea.Root component was not found in tree");function ri(e){const t=(0,s.useRef)(e);return(0,s.useEffect)(()=>{t.current=e}),(0,s.useMemo)(()=>(...e)=>t.current?.(...e),[])}function oi(e,t){const r=ri(t);Z(()=>{let t=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(t),o.unobserve(e)}}},[e,r])}const ni=(0,s.forwardRef)((e,t)=>{const{style:r,...o}=e,n=ti(),[i,a]=(0,s.useState)(0),[l,d]=(0,s.useState)(0),u=Boolean(i&&l);return oi(n.scrollbarX,()=>{const e=n.scrollbarX?.offsetHeight||0;n.onCornerHeightChange(e),d(e)}),oi(n.scrollbarY,()=>{const e=n.scrollbarY?.offsetWidth||0;n.onCornerWidthChange(e),a(e)}),u?(0,c.jsx)("div",{...o,ref:t,style:{...r,width:i,height:l}}):null}),si=(0,s.forwardRef)((e,t)=>{const r=ti(),o=Boolean(r.scrollbarX&&r.scrollbarY);return"scroll"!==r.type&&o?(0,c.jsx)(ni,{...e,ref:t}):null}),ii={scrollHideDelay:1e3,type:"hover"},ai=(0,s.forwardRef)((e,t)=>{const r=te("ScrollAreaRoot",ii,e),{type:o,scrollHideDelay:n,scrollbars:i,...a}=r,[l,d]=(0,s.useState)(null),[u,p]=(0,s.useState)(null),[m,f]=(0,s.useState)(null),[h,g]=(0,s.useState)(null),[y,b]=(0,s.useState)(null),[v,w]=(0,s.useState)(0),[x,C]=(0,s.useState)(0),[S,N]=(0,s.useState)(!1),[j,P]=(0,s.useState)(!1),_=rr(t,e=>d(e));return(0,c.jsx)(ei,{value:{type:o,scrollHideDelay:n,scrollArea:l,viewport:u,onViewportChange:p,content:m,onContentChange:f,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:S,onScrollbarXEnabledChange:N,scrollbarY:y,onScrollbarYChange:b,scrollbarYEnabled:j,onScrollbarYEnabledChange:P,onCornerWidthChange:w,onCornerHeightChange:C},children:(0,c.jsx)(Fe,{...a,ref:_,__vars:{"--sa-corner-width":"xy"!==i?"0px":`${v}px`,"--sa-corner-height":"xy"!==i?"0px":`${x}px`}})})});function li(e,t){const r="number"==typeof t?t:t.delay,o="number"!=typeof t&&t.flushOnUnmount,n=ri(e),i=(0,s.useRef)(0),a=(0,s.useRef)(()=>{}),l=Object.assign((0,s.useCallback)((...e)=>{window.clearTimeout(i.current);const t=()=>{0!==i.current&&(i.current=0,n(...e))};a.current=t,l.flush=t,i.current=window.setTimeout(t,r)},[n,r]),{flush:a.current});return(0,s.useEffect)(()=>()=>{window.clearTimeout(i.current),o&&l.flush()},[l,o]),l}function ci(e,t){const r=e/t;return Number.isNaN(r)?0:r}function di(e){const t=ci(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-r)*t;return Math.max(o,18)}function ui(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(r-e[0])}}function pi(e,t,r="ltr"){const o=di(t),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-n,i=t.content-t.viewport,a=s-o,l=function(e,[t,r]){return Math.min(r,Math.max(t,e))}(e,"ltr"===r?[0,i]:[-1*i,0]);return ui([0,i],[0,a])(l)}function mi(e,t){return e>0&&e<t}function fi(e){return e?parseInt(e,10):0}function hi(e,t,{checkForDefaultPrevented:r=!0}={}){return o=>{e?.(o),!1!==r&&o.defaultPrevented||t?.(o)}}ai.displayName="@mantine/core/ScrollAreaRoot";const[gi,yi]=Ke("ScrollAreaScrollbar was not found in tree"),bi=(0,s.forwardRef)((e,t)=>{const{sizes:r,hasThumb:o,onThumbChange:n,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:d,onWheelScroll:u,onResize:p,...m}=e,f=ti(),[h,g]=(0,s.useState)(null),y=rr(t,e=>g(e)),b=(0,s.useRef)(null),v=(0,s.useRef)(""),{viewport:w}=f,x=r.content-r.viewport,C=ri(u),S=ri(l),N=li(p,10),j=e=>{if(b.current){const t=e.clientX-b.current.left,r=e.clientY-b.current.top;d({x:t,y:r})}};return(0,s.useEffect)(()=>{const e=e=>{const t=e.target,r=h?.contains(t);r&&C(e,x)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[w,h,x,C]),(0,s.useEffect)(S,[r,S]),oi(h,N),oi(f.content,N),(0,c.jsx)(gi,{value:{scrollbar:h,hasThumb:o,onThumbChange:ri(n),onThumbPointerUp:ri(i),onThumbPositionChange:S,onThumbPointerDown:ri(a)},children:(0,c.jsx)("div",{...m,ref:y,"data-mantine-scrollbar":!0,style:{position:"absolute",...m.style},onPointerDown:hi(e.onPointerDown,e=>{e.preventDefault(),0===e.button&&(e.target.setPointerCapture(e.pointerId),b.current=h.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",j(e))}),onPointerMove:hi(e.onPointerMove,j),onPointerUp:hi(e.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(e.preventDefault(),t.releasePointerCapture(e.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=v.current,b.current=null}})})}),vi=(0,s.forwardRef)((e,t)=>{const{sizes:r,onSizesChange:o,style:n,...i}=e,a=ti(),[l,d]=(0,s.useState)(),u=(0,s.useRef)(null),p=rr(t,u,a.onScrollbarXChange);return(0,s.useEffect)(()=>{u.current&&d(getComputedStyle(u.current))},[u]),(0,c.jsx)(bi,{"data-orientation":"horizontal",...i,ref:p,sizes:r,style:{...n,"--sa-thumb-width":`${di(r)}px`},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,r)=>{if(a.viewport){const o=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(o),mi(o,r)&&t.preventDefault()}},onResize:()=>{u.current&&a.viewport&&l&&o({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:fi(l.paddingLeft),paddingEnd:fi(l.paddingRight)}})}})});vi.displayName="@mantine/core/ScrollAreaScrollbarX";const wi=(0,s.forwardRef)((e,t)=>{const{sizes:r,onSizesChange:o,style:n,...i}=e,a=ti(),[l,d]=(0,s.useState)(),u=(0,s.useRef)(null),p=rr(t,u,a.onScrollbarYChange);return(0,s.useEffect)(()=>{u.current&&d(window.getComputedStyle(u.current))},[]),(0,c.jsx)(bi,{...i,"data-orientation":"vertical",ref:p,sizes:r,style:{"--sa-thumb-height":`${di(r)}px`,...n},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,r)=>{if(a.viewport){const o=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(o),mi(o,r)&&t.preventDefault()}},onResize:()=>{u.current&&a.viewport&&l&&o({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:fi(l.paddingTop),paddingEnd:fi(l.paddingBottom)}})}})});wi.displayName="@mantine/core/ScrollAreaScrollbarY";const xi=(0,s.forwardRef)((e,t)=>{const{orientation:r="vertical",...o}=e,{dir:n}=Ut(),i=ti(),a=(0,s.useRef)(null),l=(0,s.useRef)(0),[d,u]=(0,s.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=ci(d.viewport,d.content),m={...o,sizes:d,onSizesChange:u,hasThumb:Boolean(p>0&&p<1),onThumbChange:e=>{a.current=e},onThumbPointerUp:()=>{l.current=0},onThumbPointerDown:e=>{l.current=e}},f=(e,t)=>function(e,t,r,o="ltr"){const n=di(r),s=t||n/2,i=n-s,a=r.scrollbar.paddingStart+s,l=r.scrollbar.size-r.scrollbar.paddingEnd-i,c=r.content-r.viewport;return ui([a,l],"ltr"===o?[0,c]:[-1*c,0])(e)}(e,l.current,d,t);return"horizontal"===r?(0,c.jsx)(vi,{...m,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const e=pi(i.viewport.scrollLeft,d,n);a.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=f(e,n))}}):"vertical"===r?(0,c.jsx)(wi,{...m,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const e=pi(i.viewport.scrollTop,d);0===d.scrollbar.size?a.current.style.setProperty("--thumb-opacity","0"):a.current.style.setProperty("--thumb-opacity","1"),a.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=f(e))}}):null});xi.displayName="@mantine/core/ScrollAreaScrollbarVisible";const Ci=(0,s.forwardRef)((e,t)=>{const r=ti(),{forceMount:o,...n}=e,[i,a]=(0,s.useState)(!1),l="horizontal"===e.orientation,d=li(()=>{if(r.viewport){const e=r.viewport.offsetWidth<r.viewport.scrollWidth,t=r.viewport.offsetHeight<r.viewport.scrollHeight;a(l?e:t)}},10);return oi(r.viewport,d),oi(r.content,d),o||i?(0,c.jsx)(xi,{"data-state":i?"visible":"hidden",...n,ref:t}):null});Ci.displayName="@mantine/core/ScrollAreaScrollbarAuto";const Si=(0,s.forwardRef)((e,t)=>{const{forceMount:r,...o}=e,n=ti(),[i,a]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{const{scrollArea:e}=n;let t=0;if(e){const r=()=>{window.clearTimeout(t),a(!0)},o=()=>{t=window.setTimeout(()=>a(!1),n.scrollHideDelay)};return e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",o),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",r),e.removeEventListener("pointerleave",o)}}},[n.scrollArea,n.scrollHideDelay]),r||i?(0,c.jsx)(Ci,{"data-state":i?"visible":"hidden",...o,ref:t}):null});Si.displayName="@mantine/core/ScrollAreaScrollbarHover";const Ni=(0,s.forwardRef)((e,t)=>{const{forceMount:r,...o}=e,n=ti(),i="horizontal"===e.orientation,[a,l]=(0,s.useState)("hidden"),d=li(()=>l("idle"),100);return(0,s.useEffect)(()=>{if("idle"===a){const e=window.setTimeout(()=>l("hidden"),n.scrollHideDelay);return()=>window.clearTimeout(e)}},[a,n.scrollHideDelay]),(0,s.useEffect)(()=>{const{viewport:e}=n,t=i?"scrollLeft":"scrollTop";if(e){let r=e[t];const o=()=>{const o=e[t];r!==o&&(l("scrolling"),d()),r=o};return e.addEventListener("scroll",o),()=>e.removeEventListener("scroll",o)}},[n.viewport,i,d]),r||"hidden"!==a?(0,c.jsx)(xi,{"data-state":"hidden"===a?"hidden":"visible",...o,ref:t,onPointerEnter:hi(e.onPointerEnter,()=>l("interacting")),onPointerLeave:hi(e.onPointerLeave,()=>l("idle"))}):null}),ji=(0,s.forwardRef)((e,t)=>{const{forceMount:r,...o}=e,n=ti(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=n,l="horizontal"===e.orientation;return(0,s.useEffect)(()=>(l?i(!0):a(!0),()=>{l?i(!1):a(!1)}),[l,i,a]),"hover"===n.type?(0,c.jsx)(Si,{...o,ref:t,forceMount:r}):"scroll"===n.type?(0,c.jsx)(Ni,{...o,ref:t,forceMount:r}):"auto"===n.type?(0,c.jsx)(Ci,{...o,ref:t,forceMount:r}):"always"===n.type?(0,c.jsx)(xi,{...o,ref:t}):null});ji.displayName="@mantine/core/ScrollAreaScrollbar";const Pi=(0,s.forwardRef)((e,t)=>{const{style:r,...o}=e,n=ti(),i=yi(),{onThumbPositionChange:a}=i,l=rr(t,e=>i.onThumbChange(e)),d=(0,s.useRef)(void 0),u=li(()=>{d.current&&(d.current(),d.current=void 0)},100);return(0,s.useEffect)(()=>{const{viewport:e}=n;if(e){const t=()=>{if(u(),!d.current){const t=function(e,t=()=>{}){let r={left:e.scrollLeft,top:e.scrollTop},o=0;return function n(){const s={left:e.scrollLeft,top:e.scrollTop},i=r.left!==s.left,a=r.top!==s.top;(i||a)&&t(),r=s,o=window.requestAnimationFrame(n)}(),()=>window.cancelAnimationFrame(o)}(e,a);d.current=t,a()}};return a(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[n.viewport,u,a]),(0,c.jsx)("div",{"data-state":i.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...r},onPointerDownCapture:hi(e.onPointerDownCapture,e=>{const t=e.target.getBoundingClientRect(),r=e.clientX-t.left,o=e.clientY-t.top;i.onThumbPointerDown({x:r,y:o})}),onPointerUp:hi(e.onPointerUp,i.onThumbPointerUp)})});Pi.displayName="@mantine/core/ScrollAreaThumb";const _i=(0,s.forwardRef)((e,t)=>{const{forceMount:r,...o}=e,n=yi();return r||n.hasThumb?(0,c.jsx)(Pi,{ref:t,...o}):null});_i.displayName="@mantine/core/ScrollAreaThumb";const $i=(0,s.forwardRef)(({children:e,style:t,...r},o)=>{const n=ti(),s=rr(o,n.onViewportChange);return(0,c.jsx)(Fe,{...r,ref:s,style:{overflowX:n.scrollbarXEnabled?"scroll":"hidden",overflowY:n.scrollbarYEnabled?"scroll":"hidden",...t},children:(0,c.jsx)("div",{style:{minWidth:"100%"},ref:n.onContentChange,children:e})})});$i.displayName="@mantine/core/ScrollAreaViewport";var ki={root:"m_d57069b5",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};const Ri={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},Ei=(e,{scrollbarSize:t,overscrollBehavior:r})=>({root:{"--scrollarea-scrollbar-size":v(t),"--scrollarea-over-scroll-behavior":r}}),Ti=oe((e,t)=>{const r=te("ScrollArea",Ri,e),{classNames:o,className:n,style:i,styles:a,unstyled:l,scrollbarSize:d,vars:u,type:p,scrollHideDelay:m,viewportProps:f,viewportRef:h,onScrollPositionChange:g,children:y,offsetScrollbars:b,scrollbars:v,onBottomReached:w,onTopReached:x,overscrollBehavior:C,...S}=r,[N,j]=(0,s.useState)(!1),[P,_]=(0,s.useState)(!1),[$,k]=(0,s.useState)(!1),R=Ce({name:"ScrollArea",props:r,classes:ki,className:n,style:i,classNames:o,styles:a,unstyled:l,vars:u,varsResolver:Ei}),E=(0,s.useRef)(null),T=(A=[h,E],s.useMemo(()=>A.every(e=>null==e)?null:e=>{A.forEach(t=>{"function"==typeof t?t(e):null!=t&&(t.current=e)})},A));var A;return(0,s.useEffect)(()=>{if(!E.current)return;if("present"!==b)return;const e=E.current,t=new ResizeObserver(()=>{const{scrollHeight:t,clientHeight:r,scrollWidth:o,clientWidth:n}=e;_(t>r),k(o>n)});return t.observe(e),()=>t.disconnect()},[E,b]),(0,c.jsxs)(ai,{type:"never"===p?"always":p,scrollHideDelay:m,ref:t,scrollbars:v,...R("root"),...S,children:[(0,c.jsx)($i,{...f,...R("viewport",{style:f?.style}),ref:T,"data-offset-scrollbars":!0===b?"xy":b||void 0,"data-scrollbars":v||void 0,"data-horizontal-hidden":"present"!==b||$?void 0:"true","data-vertical-hidden":"present"!==b||P?void 0:"true",onScroll:e=>{f?.onScroll?.(e),g?.({x:e.currentTarget.scrollLeft,y:e.currentTarget.scrollTop});const{scrollTop:t,scrollHeight:r,clientHeight:o}=e.currentTarget;t-(r-o)>=-.6&&w?.(),0===t&&x?.()},children:y}),("xy"===v||"x"===v)&&(0,c.jsx)(ji,{...R("scrollbar"),orientation:"horizontal","data-hidden":"never"===p||"present"===b&&!$||void 0,forceMount:!0,onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),children:(0,c.jsx)(_i,{...R("thumb")})}),("xy"===v||"y"===v)&&(0,c.jsx)(ji,{...R("scrollbar"),orientation:"vertical","data-hidden":"never"===p||"present"===b&&!P||void 0,forceMount:!0,onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),children:(0,c.jsx)(_i,{...R("thumb")})}),(0,c.jsx)(si,{...R("corner"),"data-hovered":N||void 0,"data-hidden":"never"===p||void 0})]})});Ti.displayName="@mantine/core/ScrollArea";const Ai=oe((e,t)=>{const{children:r,classNames:o,styles:n,scrollbarSize:s,scrollHideDelay:i,type:a,dir:l,offsetScrollbars:d,viewportRef:u,onScrollPositionChange:p,unstyled:m,variant:f,viewportProps:h,scrollbars:g,style:y,vars:b,onBottomReached:v,onTopReached:w,...x}=te("ScrollAreaAutosize",Ri,e);return(0,c.jsx)(Fe,{...x,ref:t,style:[{display:"flex",overflow:"auto"},y],children:(0,c.jsx)(Fe,{style:{display:"flex",flexDirection:"column",flex:1},children:(0,c.jsx)(Ti,{classNames:o,styles:n,scrollHideDelay:i,scrollbarSize:s,type:a,dir:l,offsetScrollbars:d,viewportRef:u,onScrollPositionChange:p,unstyled:m,variant:f,viewportProps:h,vars:b,scrollbars:g,onBottomReached:v,onTopReached:w,children:r})})})});function Oi(e){return"group"in e}function zi({options:e,search:t,limit:r}){const o=t.trim().toLowerCase(),n=[];for(let s=0;s<e.length;s+=1){const i=e[s];if(n.length===r)return n;Oi(i)&&n.push({group:i.group,items:zi({options:i.items,search:t,limit:r-n.length})}),Oi(i)||i.label.toLowerCase().includes(o)&&n.push(i)}return n}function Di(e,t=new Set){if(Array.isArray(e))for(const r of e)if(Oi(r))Di(r.items,t);else{if(void 0===r.value)throw new Error("[@mantine/core] Each option must have value property");if("string"!=typeof r.value)throw new Error("[@mantine/core] Option value must be a string, other data formats are not supported, got "+typeof r.value);if(t.has(r.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${r.value}" was provided more than once`);t.add(r.value)}}function Li({data:e,withCheckIcon:t,value:r,checkIconPosition:o,unstyled:n,renderOption:s}){if(!Oi(e)){const i=function(e,t){return Array.isArray(e)?e.includes(t):e===t}(r,e.value),a=t&&i&&(0,c.jsx)(Qs,{className:Bn.optionsDropdownCheckIcon}),l=(0,c.jsxs)(c.Fragment,{children:["left"===o&&a,(0,c.jsx)("span",{children:e.label}),"right"===o&&a]});return(0,c.jsx)(Js.Option,{value:e.value,disabled:e.disabled,className:ue({[Bn.optionsDropdownOption]:!n}),"data-reverse":"right"===o||void 0,"data-checked":i||void 0,"aria-selected":i,active:i,children:"function"==typeof s?s({option:e,checked:i}):l})}const i=e.items.map(e=>(0,c.jsx)(Li,{data:e,value:r,unstyled:n,withCheckIcon:t,checkIconPosition:o,renderOption:s},e.value));return(0,c.jsx)(Js.Group,{label:e.group,children:i})}function Ii({data:e,hidden:t,hiddenWhenEmpty:r,filter:o,search:n,limit:s,maxDropdownHeight:i,withScrollArea:a=!0,filterOptions:l=!0,withCheckIcon:d=!1,value:u,checkIconPosition:p,nothingFoundMessage:m,unstyled:f,labelId:h,renderOption:g,scrollAreaProps:y,"aria-label":b}){Di(e);const v="string"==typeof n?(o||zi)({options:e,search:l?n:"",limit:s??1/0}):e,w=function(e){if(0===e.length)return!0;for(const t of e){if(!("group"in t))return!1;if(t.items.length>0)return!1}return!0}(v),x=v.map(e=>(0,c.jsx)(Li,{data:e,withCheckIcon:d,value:u,checkIconPosition:p,unstyled:f,renderOption:g},Oi(e)?e.group:e.value));return(0,c.jsx)(Js.Dropdown,{hidden:t||r&&w,"data-composed":!0,children:(0,c.jsxs)(Js.Options,{labelledBy:h,"aria-label":b,children:[a?(0,c.jsx)(Ti.Autosize,{mah:i??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",...y,children:x}):x,w&&m&&(0,c.jsx)(Js.Empty,{children:m})]})})}Ti.classes=ki,Ai.displayName="@mantine/core/ScrollAreaAutosize",Ai.classes=ki,Ti.Autosize=Ai;const Mi={__staticSelector:"InputBase",withAria:!0},Fi=qe((e,t)=>{const{inputProps:r,wrapperProps:o,...n}=function(e,t,r){const o=te("InputBase",t,r),{label:n,description:s,error:i,required:a,classNames:l,styles:c,className:d,unstyled:u,__staticSelector:p,__stylesApiProps:m,errorProps:f,labelProps:h,descriptionProps:g,wrapperProps:y,id:b,size:v,style:w,inputContainer:x,inputWrapperOrder:C,withAsterisk:S,variant:N,vars:j,mod:P,..._}=o,{styleProps:$,rest:k}=Re(_);return{...k,classNames:l,styles:c,unstyled:u,wrapperProps:{...{label:n,description:s,error:i,required:a,classNames:l,className:d,__staticSelector:p,__stylesApiProps:m||o,errorProps:f,labelProps:h,descriptionProps:g,unstyled:u,styles:c,size:v,style:w,inputContainer:x,inputWrapperOrder:C,withAsterisk:S,variant:N,id:b,mod:P,...y},...$},inputProps:{required:a,classNames:l,styles:c,unstyled:u,size:v,__staticSelector:p,__stylesApiProps:m||o,error:i,variant:N,id:b}}}(0,Mi,e);return(0,c.jsx)(Ss.Wrapper,{...o,children:(0,c.jsx)(Ss,{...r,...n,ref:t})})});Fi.classes={...Ss.classes,...Ss.Wrapper.classes},Fi.displayName="@mantine/core/InputBase";const Wi={searchable:!1,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left"},Hi=oe((e,t)=>{const r=te("Select",Wi,e),{classNames:o,styles:n,unstyled:i,vars:a,dropdownOpened:l,defaultDropdownOpened:d,onDropdownClose:u,onDropdownOpen:p,onFocus:m,onBlur:f,onClick:h,onChange:g,data:y,value:b,defaultValue:v,selectFirstOptionOnChange:w,onOptionSubmit:x,comboboxProps:C,readOnly:S,disabled:N,filter:j,limit:P,withScrollArea:_,maxDropdownHeight:$,size:k,searchable:R,rightSection:E,checkIconPosition:T,withCheckIcon:A,nothingFoundMessage:O,name:z,form:D,searchValue:L,defaultSearchValue:I,onSearchChange:M,allowDeselect:F,error:W,rightSectionPointerEvents:H,id:B,clearable:V,clearButtonProps:q,hiddenInputProps:Y,renderOption:X,onClear:U,autoComplete:K,scrollAreaProps:G,__defaultRightSection:Z,__clearSection:J,__clearable:Q,chevronColor:ee,...re}=r,oe=(0,s.useMemo)(()=>Ht(y),[y]),ne=(0,s.useMemo)(()=>Bt(oe),[oe]),se=Mt(B),[ie,ae,le]=dt({value:b,defaultValue:v,finalValue:null,onChange:g}),ce="string"==typeof ie?ne[ie]:void 0,de=function(e){const t=(0,s.useRef)(void 0);return(0,s.useEffect)(()=>{t.current=e},[e]),t.current}(ce),[ue,pe,me]=dt({value:L,defaultValue:I,finalValue:ce?ce.label:"",onChange:M}),fe=Ks({opened:l,defaultOpened:d,onDropdownOpen:()=>{p?.(),fe.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{u?.(),fe.resetSelectedOption()}}),he=e=>{pe(e),fe.resetSelectedOption()},{resolvedClassNames:ge,resolvedStyles:ye}=Ft({props:r,styles:n,classNames:o});(0,s.useEffect)(()=>{w&&fe.selectFirstOption()},[w,ue]),(0,s.useEffect)(()=>{null===b&&he(""),"string"!=typeof b||!ce||de?.value===ce.value&&de?.label===ce.label||he(ce.label)},[b,ce]),(0,s.useEffect)(()=>{le||me||he("string"==typeof ie&&ne[ie]?.label||"")},[y,ie]);const be=(0,c.jsx)(Js.ClearButton,{...q,onClear:()=>{ae(null,null),he(""),U?.()}}),ve=V&&!!ie&&!N&&!S;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(Js,{store:fe,__staticSelector:"Select",classNames:ge,styles:ye,unstyled:i,readOnly:S,onOptionSubmit:e=>{x?.(e);const t=F&&ne[e].value===ie?null:ne[e],r=t?t.value:null;r!==ie&&ae(r,t),!le&&he("string"==typeof r&&t?.label||""),fe.closeDropdown()},size:k,...C,children:[(0,c.jsx)(Js.Target,{targetType:R?"input":"button",autoComplete:K,children:(0,c.jsx)(Fi,{id:se,ref:t,__defaultRightSection:(0,c.jsx)(Js.Chevron,{size:k,error:W,unstyled:i,color:ee}),__clearSection:be,__clearable:ve,rightSection:E,rightSectionPointerEvents:H||(ve?"all":"none"),...re,size:k,__staticSelector:"Select",disabled:N,readOnly:S||!R,value:ue,onChange:e=>{he(e.currentTarget.value),fe.openDropdown(),w&&fe.selectFirstOption()},onFocus:e=>{R&&fe.openDropdown(),m?.(e)},onBlur:e=>{R&&fe.closeDropdown(),he(null!=ie&&ne[ie]?.label||""),f?.(e)},onClick:e=>{R?fe.openDropdown():fe.toggleDropdown(),h?.(e)},classNames:ge,styles:ye,unstyled:i,pointer:!R,error:W})}),(0,c.jsx)(Ii,{data:oe,hidden:S||N,filter:j,search:ue,limit:P,hiddenWhenEmpty:!O,withScrollArea:_,maxDropdownHeight:$,filterOptions:R&&ce?.label!==ue,value:ie,checkIconPosition:T,withCheckIcon:A,nothingFoundMessage:O,unstyled:i,labelId:re.label?`${se}-label`:void 0,"aria-label":re.label?void 0:re["aria-label"],renderOption:X,scrollAreaProps:G})]}),(0,c.jsx)(Js.HiddenInput,{value:ie,name:z,form:D,disabled:N,...Y})]})});Hi.classes={...Fi.classes,...Js.classes},Hi.displayName="@mantine/core/Select";const Bi={},Vi=oe((e,t)=>{const r=te("TextInput",Bi,e);return(0,c.jsx)(Fi,{component:"input",ref:t,...r,__staticSelector:"TextInput"})});Vi.classes=Fi.classes,Vi.displayName="@mantine/core/TextInput";const qi=function({sortOrder:e,setSortOrder:t,searchTerm:r,setSearchTerm:o}){return(0,c.jsxs)("div",{className:"eb-my-courses__controls",children:[(0,c.jsx)(Hi,{value:e,onChange:t,defaultValue:"a-z",data:[{value:"a-z",label:(0,jt.__)("A-Z","edwiser-bridge")},{value:"z-a",label:(0,jt.__)("Z-A","edwiser-bridge")},{value:"progress-high",label:(0,jt.__)("Progress: High to Low","edwiser-bridge")},{value:"progress-low",label:(0,jt.__)("Progress: Low to High","edwiser-bridge")}],allowDeselect:!1,checkIconPosition:"right",comboboxProps:{withinPortal:!1},leftSection:(0,c.jsx)(kt,{}),rightSection:(0,c.jsx)(_t,{})}),(0,c.jsx)(Vi,{value:r,onChange:e=>o(e.currentTarget.value),leftSectionPointerEvents:"none",leftSection:(0,c.jsx)(Rt,{}),placeholder:(0,jt.__)("Search courses","edwiser-bridge")})]})},Yi=()=>(0,c.jsxs)("div",{className:"eb-my-courses__controls",children:[(0,c.jsx)(Nt,{width:300,height:36}),(0,c.jsx)(Nt,{width:300,height:36})]}),Xi=function({courses:e,title:t,coursesPageUrl:r}){return e&&0!==e.length?(0,c.jsxs)("div",{className:"eb-my-courses__recommended-courses",children:[(0,c.jsx)("h3",{className:"eb-my-courses__recommended-courses-title",children:t}),(0,c.jsx)("div",{className:"eb-my-courses__recommended-courses-grid",children:e.map(e=>(0,c.jsx)("a",{href:e.link,target:"_blank",className:"eb-courses__course-anchor",children:(0,c.jsxs)("div",{className:"eb-courses__course-card",children:[(0,c.jsxs)("div",{className:"course-thumbnail-container",children:[(0,c.jsx)("img",{src:e.thumbnail,alt:e.title,className:"course-thumbnail"}),e.categories.length>0&&(0,c.jsxs)("div",{className:"course-category",children:[(0,c.jsx)(Pt,{}),(0,c.jsx)("span",{children:e.categories.map((t,r)=>(0,c.jsxs)(a().Fragment,{children:[(0,jt.__)(At(t?.name),"edwiser-bridge"),r<e.categories.length-1?", ":""]},t?.id))})]})]}),(0,c.jsxs)("div",{className:"course-meta",children:[(0,c.jsxs)("div",{className:"course-content",children:[(0,c.jsx)("h3",{className:"course-title",children:(0,jt.__)(e.title,"edwiser-bridge")}),(0,c.jsx)("p",{className:"course-excerpt",children:(0,jt.__)(e.excerpt,"edwiser-bridge")})]}),(0,c.jsxs)("div",{className:"course-details",children:[(0,c.jsx)("div",{className:"course-price",children:e?.suspended?(0,c.jsx)("span",{className:"suspended",children:(0,jt.__)("Suspended","edwiser-bridge")}):(0,c.jsx)(Ui,{price:e.price})}),(0,c.jsx)("a",{href:e.link,className:"btn",children:(0,jt.__)("View Details","edwiser-bridge")})]})]})]})},e.ID))}),(0,c.jsx)("div",{className:"eb-my-courses__recommended-courses-view-more",children:(0,c.jsxs)("a",{href:r,className:"eb-btn__view-more",children:[(0,jt.__)("View more courses","edwiser-bridge"),(0,c.jsx)($t,{})]})})]}):null};function Ui({price:e}){return e.enrolled?(0,c.jsx)("span",{className:"enrolled",children:(0,jt.__)("Enrolled","edwiser-bridge")}):"subscription"===e.type?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{className:"price",children:(0,jt.__)("₹"+e.amount,"edwiser-bridge")}),(0,c.jsx)("span",{className:"recurring",children:(0,jt.__)("/month","edwiser-bridge")})]}):"closed"===e.type?(0,c.jsx)(c.Fragment,{children:(0,c.jsx)("span",{})}):0===e.amount?(0,c.jsx)("span",{className:"price",children:(0,jt.__)("Free","edwiser-bridge")}):null!==e.originalAmount?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{className:"price",children:(0,jt.__)(e.currency+e.amount,"edwiser-bridge")}),(0,c.jsx)("span",{className:"original-price",children:(0,jt.__)(e.currency+e.originalAmount,"edwiser-bridge")})]}):(0,c.jsx)("span",{className:"price",children:(0,jt.__)(e.currency+e.amount,"edwiser-bridge")})}const Ki=()=>(0,c.jsxs)("div",{className:"eb-my-courses__recommended-courses",children:[(0,c.jsx)("h3",{className:"eb-my-courses__recommended-courses-title",children:(0,jt.__)("Recommended Courses","edwiser-bridge")}),(0,c.jsx)("div",{className:"eb-my-courses__recommended-courses-grid",children:Array.from({length:3}).map((e,t)=>(0,c.jsxs)("div",{className:"eb-courses__course-card",children:[(0,c.jsx)("div",{className:"course-thumbnail-container",children:(0,c.jsx)(Nt,{height:140,style:{borderRadius:0}})}),(0,c.jsxs)("div",{className:"course-meta",children:[(0,c.jsxs)("div",{className:"course-content",children:[(0,c.jsx)(Nt,{height:20,width:"90%"}),(0,c.jsxs)("div",{children:[(0,c.jsx)(Nt,{height:12}),(0,c.jsx)(Nt,{height:12,mt:6,width:"70%"})]})]}),(0,c.jsxs)("div",{className:"course-details",children:[(0,c.jsx)("div",{className:"course-price",children:(0,c.jsx)(Nt,{height:28,width:80})}),(0,c.jsx)(Nt,{height:18,width:80})]})]})]},t))}),(0,c.jsx)("div",{className:"eb-my-courses__recommended-courses-view-more",children:(0,c.jsx)(Nt,{width:130,height:20})})]}),Gi=window.wp.element,Zi=window.wp.apiFetch;var Ji=n.n(Zi);function Qi({pageTitle:e,hidePageTitle:t,showCourseProgress:r,showRecommendedCourses:o,recommendedCoursesTitle:n,recommendedCoursesCount:i}){const{enrolledCourses:l,recommendedCourses:d,coursesPageUrl:u,isLoading:p,authRequired:m,signInUrl:f}=function(e){const[t,r]=(0,Gi.useState)([]),[o,n]=(0,Gi.useState)([]),[s,i]=(0,Gi.useState)(""),[a,l]=(0,Gi.useState)(!0),[c,d]=(0,Gi.useState)(!1),[u,p]=(0,Gi.useState)("");return(0,Gi.useEffect)(()=>{(async()=>{try{const t=await Ji()({path:`/eb/api/v1/my-courses?number_of_recommended_courses=${e}`});r(t.enrolled_courses),n(t.recommended_courses),i(t.courses_page_url),d(t.auth_required||!1),p(t.sign_in_url||"")}catch(e){console.error("Error fetching courses:",e),"rest_forbidden"!==e?.code&&401!==e?.data?.status||(d(!0),p(e?.data?.sign_in_url||""))}finally{l(!1)}})()},[]),{enrolledCourses:t,recommendedCourses:o,coursesPageUrl:s,isLoading:a,authRequired:c,signInUrl:u}}(i),[h,g]=(0,s.useState)(1),[y,b]=(0,s.useState)("a-z"),[v,w]=(0,s.useState)(""),x=(0,s.useMemo)(()=>{let e=l;if(v.trim()){const t=v.toLowerCase();e=l.filter(e=>(e.title||"").toLowerCase().includes(t)||(e.categories||[]).some(e=>(e.name||"").toLowerCase().includes(t)))}return[...e].sort((e,t)=>{switch(y){case"a-z":return e.title.localeCompare(t.title);case"z-a":return t.title.localeCompare(e.title);case"progress-high":return t.progress.percentage-e.progress.percentage;case"progress-low":return e.progress.percentage-t.progress.percentage;default:return new Date(t.createdAt)-new Date(e.createdAt)}})},[l,v,y]),C=Math.ceil(x.length/9);a().useEffect(()=>{g(1)},[v,y]);const S=9*(h-1),N=S+9,j=x.slice(S,N),P=l&&l.length>0,_=d&&d.length>0;return(0,c.jsx)(Q,{children:p?(0,c.jsx)(ea,{showRecommendedCourses:o}):(0,c.jsxs)("div",{className:"eb-my-courses__wrapper",children:[!t&&(0,c.jsx)("h2",{className:"eb-my-courses__title",children:e}),P?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(qi,{sortOrder:y,setSortOrder:b,searchTerm:v,setSearchTerm:w}),(0,c.jsx)(Dt,{courses:j,searchTerm:v,showCourseProgress:r}),x.length>0&&(0,c.jsxs)("div",{className:"eb-my-courses__pagination",children:[(0,c.jsx)("span",{className:"eb-my-courses__pagination-text",children:(0,c.jsxs)(c.Fragment,{children:[(0,jt.__)("Showing","edwiser-bridge")," ",S+1," ",(0,jt.__)("to","edwiser-bridge")," ",Math.min(N,x.length)," ",(0,jt.__)("of","edwiser-bridge")," ",x.length," ",(0,jt.__)("entries","edwiser-bridge")]})}),(0,c.jsx)(wt,{total:C,value:h,onChange:g})]})]}):(0,c.jsx)("div",{className:"eb-my-courses__empty",children:m?(0,c.jsx)(c.Fragment,{children:(0,c.jsxs)("p",{children:[(0,jt.__)("You are not logged in.","edwiser-bridge")," ",(0,c.jsx)("a",{href:f,className:"eb-my-courses__login-link",children:(0,jt.__)("Click here to login.","edwiser-bridge")})]})}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("h4",{children:(0,jt.__)("No courses found.","edwiser-bridge")}),(0,c.jsx)("p",{children:(0,jt.__)("You are not enrolled in any courses yet.","edwiser-bridge")})]})}),o&&_&&(0,c.jsx)(Xi,{courses:d,title:n,coursesPageUrl:u})]})})}const ea=({showRecommendedCourses:e})=>(0,c.jsxs)("div",{className:"eb-my-courses__wrapper",children:[(0,c.jsx)("h2",{className:"eb-my-courses__title",children:(0,jt.__)("My Courses","edwiser-bridge")}),(0,c.jsx)(Yi,{}),(0,c.jsx)(Lt,{}),(0,c.jsxs)("div",{className:"eb-my-courses__pagination",children:[(0,c.jsx)(Nt,{width:160,height:20}),(0,c.jsx)(Nt,{width:240,height:32})]}),e&&(0,c.jsx)(Ki,{})]});function ta(){const e=document.getElementById("eb-my-courses");if(e){const t={pageTitle:e.dataset.pageTitle||"",recommendedCoursesTitle:e.dataset.recommendedCoursesTitle||"",recommendedCoursesCount:parseInt(e.dataset.recommendedCoursesCount,10)||3,showCourseProgress:"true"===e.dataset.showCourseProgress,showRecommendedCourses:"true"===e.dataset.showRecommendedCourses,hidePageTitle:"true"===e.dataset.hidePageTitle};l.createRoot(e).render((0,c.jsx)(Qi,{...t}))}}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",ta):ta()})();