diff --git a/.gitignore b/.gitignore index b2fbf5e..0a83ce2 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,9 @@ frontend/tsconfig.tsbuildinfo # Local files local_files/ +# Card file attachments (issue 0128) — binarios en disco; metadata en card_files +uploads/ + # Logs *.log frontend/test-results/ diff --git a/app.md b/app.md index 39f034e..8a113d6 100644 --- a/app.md +++ b/app.md @@ -2,8 +2,8 @@ name: kanban lang: go domain: tools -version: 0.1.0 -description: "Kanban board con persistencia SQLite, drag-and-drop entre columnas (dnd-kit) y tracking del tiempo que cada tarjeta pasa en cada columna. Frontend Vite + React + Mantine v9 embebido en el binario Go." +version: 0.2.0 +description: "Kanban board con persistencia SQLite, drag-and-drop entre columnas (dnd-kit), tracking del tiempo por columna y adjuntos de archivos por card (drag&drop en descripcion y chat). Frontend Vite + React + Mantine v9 embebido en el binario Go." tags: [service, kanban, web, dnd-kit, mantine, sqlite, time-tracking] uses_functions: - random_hex_id_go_core @@ -81,6 +81,10 @@ e2e_checks: cmd: "go test -tags fts5 -count=1 ./..." timeout_s: 120 expect_exit: 0 + - id: smoke_files + cmd: "bash e2e/files_smoke.sh" + timeout_s: 30 + expect_exit: 0 --- ## Arquitectura @@ -143,7 +147,12 @@ Single-binary: backend Go con frontend Vite embebido. SQLite local con tres tabl - **Enlaces** (`CardLinksPanel`): extrae URLs (`https?://...`) de titulo, descripcion y cuerpo de cada mensaje del chat. Deduplica, muestra hostname + URL completa + badge de origen. Click abre en pestaña nueva (`target="_blank"`). - **Duplicar card:** click derecho sobre la card abre el menu contextual (mismo que el boton `⋮`), donde aparece el item "Duplicar". Al pulsarlo invoca `POST /api/cards/{id}/duplicate`. La copia se inserta al final de la misma columna con titulo + " (copia)". - **Sesion obligatoria para chat:** `POST/DELETE /api/cards/{id}/messages` exige sesion activa (401 si falta). `author_id` siempre poblado; no hay comentarios anonimos. -- **Archivos (proximamente):** blobs persistidos en SQLite (`card_attachments` con `BLOB`), no en filesystem. +- **Archivos** (`CardFilesPanel`): adjuntos por card almacenados en `apps/kanban/uploads//__` (filesystem, gitignored). Tabla `card_files` con soft-delete. Limite 10 MB por archivo. Tres vias de upload: + 1. Drag&drop en el editor de descripcion (`CardForm`) → inserta `![name](url)` (imagen) o `[name](url)` (resto) en la posicion del cursor. + 2. Drag&drop o boton paperclip en el chat (`CardChatPanel`) → crea un mensaje cuyo cuerpo es la ref markdown. + 3. Boton "Subir" en el tab Archivos → sube sin embed. + - El renderer de mensajes (`MessageBody`) reconoce `![alt](url)` -> `` thumb 220px y `[name](url)` -> ``. Texto plano se renderiza con `whiteSpace: pre-wrap`. + - Endpoints: `POST /api/cards/{id}/files` (multipart, 10 MB max), `GET /api/cards/{id}/files`, `GET /api/files/{id}` (sirve binario con `inline` o `attachment` segun MIME), `DELETE /api/files/{id}` (soft delete). ### Build @@ -182,3 +191,4 @@ Una linea por bump SemVer. Bump-type segun `.claude/commands/version.md`: - `patch`: bugfix sin cambio observable. - v0.1.0 (2026-05-18) — baseline. +- v0.2.0 (2026-05-27) — adjuntos de archivos por card (issue 0128): tabla `card_files` con soft-delete, endpoints REST (`POST/GET/DELETE /api/cards/{id}/files`, `GET/DELETE /api/files/{id}`), tres vias de upload (drag&drop en descripcion y chat, boton en tab Archivos), render inline de imagenes via `MessageBody`. Limite 10 MB. diff --git a/backend/dist/assets/index-DT3pghXY.js b/backend/dist/assets/index-DT3pghXY.js new file mode 100644 index 0000000..2c47d30 --- /dev/null +++ b/backend/dist/assets/index-DT3pghXY.js @@ -0,0 +1,1283 @@ +function fK(e,n){for(var t=0;ti[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=t(r);fetch(r.href,a)}})();var Pv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nk={exports:{}},Qd={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var y5;function cK(){if(y5)return Qd;y5=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(i,r,a){var o=null;if(a!==void 0&&(o=""+a),r.key!==void 0&&(o=""+r.key),"key"in r){a={};for(var l in r)l!=="key"&&(a[l]=r[l])}else a=r;return r=a.ref,{$$typeof:e,type:i,key:o,ref:r!==void 0?r:null,props:a}}return Qd.Fragment=n,Qd.jsx=t,Qd.jsxs=t,Qd}var b5;function dK(){return b5||(b5=1,nk.exports=cK()),nk.exports}var y=dK();function Pt(e){return Object.keys(e)}function tk(e){return e&&typeof e=="object"&&!Array.isArray(e)}function D6(e,n){const t={...e},i=n;return tk(e)&&tk(n)&&Object.keys(n).forEach(r=>{tk(i[r])&&r in e?t[r]=D6(t[r],i[r]):t[r]=i[r]}),t}function hK(e){return e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}function mK(e){var n;return typeof e!="string"||!e.includes("var(--mantine-scale)")?e:(n=e.match(/^calc\((.*?)\)$/))==null?void 0:n[1].split("*")[0].trim()}function Hh(e){const n=mK(e);return typeof n=="number"?n:typeof n=="string"?n.includes("calc")||n.includes("var")?n:n.includes("px")?Number(n.replace("px","")):n.includes("rem")?Number(n.replace("rem",""))*16:n.includes("em")?Number(n.replace("em",""))*16:Number(n):NaN}function w5(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function dz(e,{shouldScale:n=!1}={}){function t(i){if(i===0||i==="0")return`0${e}`;if(typeof i=="number"){const r=`${i/16}${e}`;return n?w5(r):r}if(typeof i=="string"){if(i===""||i.startsWith("calc(")||i.startsWith("clamp(")||i.includes("rgba("))return i;if(i.includes(","))return i.split(",").map(a=>t(a)).join(",");if(i.includes(" "))return i.split(" ").map(a=>t(a)).join(" ");const r=i.replace("px","");if(!Number.isNaN(Number(r))){const a=`${Number(r)/16}${e}`;return n?w5(a):a}}return i}return t}const pe=dz("rem",{shouldScale:!0}),Eg=dz("em");function Tu(e){return Object.keys(e).reduce((n,t)=>(e[t]!==void 0&&(n[t]=e[t]),n),{})}function hz(e){if(typeof e=="number")return!0;if(typeof e=="string"){if(e.startsWith("calc(")||e.startsWith("var(")||e.includes(" ")&&e.trim()!=="")return!0;const n=/^[+-]?[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(t=>n.test(t))}return!1}var ik={exports:{}},Rn={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var k5;function pK(){if(k5)return Rn;k5=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),p=Symbol.iterator;function v(G){return G===null||typeof G!="object"?null:(G=p&&G[p]||G["@@iterator"],typeof G=="function"?G:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,k={};function _(G,W,I){this.props=G,this.context=W,this.refs=k,this.updater=I||b}_.prototype.isReactComponent={},_.prototype.setState=function(G,W){if(typeof G!="object"&&typeof G!="function"&&G!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,G,W,"setState")},_.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function C(){}C.prototype=_.prototype;function S(G,W,I){this.props=G,this.context=W,this.refs=k,this.updater=I||b}var E=S.prototype=new C;E.constructor=S,w(E,_.prototype),E.isPureReactComponent=!0;var j=Array.isArray;function O(){}var M={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function q(G,W,I){var X=I.ref;return{$$typeof:e,type:G,key:W,ref:X!==void 0?X:null,props:I}}function P(G,W){return q(G.type,W,G.props)}function z(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function B(G){var W={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(I){return W[I]})}var V=/\/+/g;function U(G,W){return typeof G=="object"&&G!==null&&G.key!=null?B(""+G.key):W.toString(36)}function N(G){switch(G.status){case"fulfilled":return G.value;case"rejected":throw G.reason;default:switch(typeof G.status=="string"?G.then(O,O):(G.status="pending",G.then(function(W){G.status==="pending"&&(G.status="fulfilled",G.value=W)},function(W){G.status==="pending"&&(G.status="rejected",G.reason=W)})),G.status){case"fulfilled":return G.value;case"rejected":throw G.reason}}throw G}function D(G,W,I,X,ee){var re=typeof G;(re==="undefined"||re==="boolean")&&(G=null);var se=!1;if(G===null)se=!0;else switch(re){case"bigint":case"string":case"number":se=!0;break;case"object":switch(G.$$typeof){case e:case n:se=!0;break;case h:return se=G._init,D(se(G._payload),W,I,X,ee)}}if(se)return ee=ee(G),se=X===""?"."+U(G,0):X,j(ee)?(I="",se!=null&&(I=se.replace(V,"$&/")+"/"),D(ee,W,I,"",function(le){return le})):ee!=null&&(z(ee)&&(ee=P(ee,I+(ee.key==null||G&&G.key===ee.key?"":(""+ee.key).replace(V,"$&/")+"/")+se)),W.push(ee)),1;se=0;var ye=X===""?".":X+":";if(j(G))for(var ae=0;ae{const i=A.use(n);if(i===null)throw new Error(e);return i}]}function x5(e,n){return t=>{if(typeof t!="string"||t.trim().length===0)throw new Error(n);return`${e}-${t}`}}function Tg(e,n){let t=e;for(;(t=t.parentElement)&&!t.matches(n););return t}function vK(e,n,t){for(let i=e-1;i>=0;i-=1)if(!n[i].disabled)return i;if(t){for(let i=n.length-1;i>-1;i-=1)if(!n[i].disabled)return i}return e}function gK(e,n,t){for(let i=e+1;i{var b;t==null||t(l);const f=Array.from(((b=Tg(l.currentTarget,e))==null?void 0:b.querySelectorAll(n))||[]).filter(w=>yK(l.currentTarget,w,e)),c=f.findIndex(w=>l.currentTarget===w),h=gK(c,f,i),d=vK(c,f,i),p=a==="rtl"?d:h,v=a==="rtl"?h:d;switch(l.key){case"ArrowRight":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),f[p].focus(),r&&f[p].click());break;case"ArrowLeft":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),f[v].focus(),r&&f[v].click());break;case"ArrowUp":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),f[d].focus(),r&&f[d].click());break;case"ArrowDown":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),f[h].focus(),r&&f[h].click());break;case"Home":l.stopPropagation(),l.preventDefault(),!f[0].disabled&&f[0].focus();break;case"End":{l.stopPropagation(),l.preventDefault();const w=f.length-1;!f[w].disabled&&f[w].focus();break}}}}const bK={app:100,modal:200,popover:300,overlay:400,max:9999};function wa(e){return bK[e]}const fS=()=>{};function wK(e,n={active:!0}){return typeof e!="function"||!n.active?n.onKeyDown||fS:t=>{var i;t.key==="Escape"&&(e(t),(i=n.onTrigger)==null||i.call(n))}}function $n(e,n="size",t=!0){if(e!==void 0)return hz(e)?t?pe(e):e:`var(--${n}-${e})`}function Ut(e){return $n(e,"mantine-spacing")}function Yt(e){return e===void 0?"var(--mantine-radius-default)":$n(e,"mantine-radius")}function ri(e){return $n(e,"mantine-font-size")}function kK(e){return $n(e,"mantine-line-height",!1)}function $6(e){if(e)return $n(e,"mantine-shadow",!1)}function kr(e,n){return t=>{e==null||e(t),n==null||n(t)}}function z6(e,n){return e in n?Hh(n[e]):Hh(e)}function Uh(e,n){const t=e.map(i=>({value:i,px:z6(i,n)}));return t.sort((i,r)=>i.px-r.px),t}function Wr(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function _K(e,n,t){var i;return t?Array.from(((i=Tg(t,n))==null?void 0:i.querySelectorAll(e))||[]).findIndex(r=>r===t):null}function Yo(e,n,t){return n===void 0&&t===void 0?e:n!==void 0&&t===void 0?Math.max(e,n):Math.min(n===void 0&&t!==void 0?e:Math.max(e,n),t)}function al(e="mantine-"){return`${e}${Math.random().toString(36).slice(2,11)}`}function yh(e){const n=A.useRef(e);return A.useEffect(()=>{n.current=e}),A.useMemo(()=>((...t)=>{var i;return(i=n.current)==null?void 0:i.call(n,...t)}),[])}function oy(e,n){const{delay:t,flushOnUnmount:i,leading:r,maxWait:a}=typeof n=="number"?{delay:n,flushOnUnmount:!1,leading:!1,maxWait:void 0}:n,o=yh(e),l=A.useRef(0),f=A.useRef(0),c=A.useRef(null),h=A.useMemo(()=>{const d=Object.assign((...p)=>{window.clearTimeout(l.current),c.current=p;const v=d._isFirstCall;d._isFirstCall=!1;function b(){window.clearTimeout(l.current),window.clearTimeout(f.current),l.current=0,f.current=0,d._isFirstCall=!0,d._hasPendingCallback=!1}function w(){a!==void 0&&f.current===0&&(f.current=window.setTimeout(()=>{if(l.current!==0){const C=c.current;b(),o(...C)}},a))}if(r&&v){o(...p);const C=()=>{b()},S=()=>{l.current!==0&&(b(),o(...p))},E=()=>{b()};d.flush=S,d.cancel=E,l.current=window.setTimeout(C,t),w();return}if(r&&!v){d._hasPendingCallback=!0;const C=()=>{l.current!==0&&(b(),o(...p))},S=()=>{b()};d.flush=C,d.cancel=S;const E=()=>{b()};l.current=window.setTimeout(E,t),w();return}d._hasPendingCallback=!0;const k=()=>{l.current!==0&&(b(),o(...p))},_=()=>{b()};d.flush=k,d.cancel=_,l.current=window.setTimeout(k,t),w()},{flush:()=>{},cancel:()=>{},isPending:()=>d._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return d},[o,t,r,a]);return A.useEffect(()=>()=>{i?h.flush():h.cancel()},[h,i]),h}const xK=["mousedown","touchstart"];function SK(e,n,t,i=!0){const r=A.useRef(null),a=n||xK,o=A.useEffectEvent(f=>{const{target:c}=f??{};if(!document.body.contains(c)&&(c==null?void 0:c.tagName)!=="HTML")return;const h=f.composedPath();Array.isArray(t)?t.every(d=>!!d&&!h.includes(d))&&e(f):r.current&&!h.includes(r.current)&&e(f)}),l=a.join(",");return A.useEffect(()=>{if(!i)return;const f=l.split(",");return f.forEach(c=>document.addEventListener(c,o)),()=>{f.forEach(c=>document.removeEventListener(c,o))}},[l,i]),r}function CK(e,n){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function AK(e,n,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){const[i,r]=A.useState(t?n:CK(e));return A.useEffect(()=>{try{if("matchMedia"in window){const a=window.matchMedia(e);r(a.matches);const o=l=>r(l.matches);return a.addEventListener("change",o),()=>{a.removeEventListener("change",o)}}}catch{return}},[e]),i||!1}const us=typeof document<"u"?A.useLayoutEffect:A.useEffect;function ns(e,n){const t=A.useRef(!1);A.useEffect(()=>()=>{t.current=!1},[]),A.useEffect(()=>{if(t.current)return e();t.current=!0},n)}function pz({opened:e,shouldReturnFocus:n=!0}){const t=A.useRef(null),i=()=>{var r;t.current&&"focus"in t.current&&typeof t.current.focus=="function"&&((r=t.current)==null||r.focus({preventScroll:!0}))};return ns(()=>{let r=-1;const a=o=>{o.key==="Tab"&&window.clearTimeout(r)};if(document.addEventListener("keydown",a),e)t.current=document.activeElement;else if(n){const o=document.activeElement;r=window.setTimeout(()=>{const l=document.activeElement;(l===null||l===document.body||l===o)&&i()},10)}return()=>{window.clearTimeout(r),document.removeEventListener("keydown",a)}},[e,n]),i}const jK=/input|select|textarea|button|object/,vz="a, input, select, textarea, button, object, [tabindex]";function OK(e){return e.style.display==="none"}function EK(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let n=e;for(;n&&!(n===document.body||n.nodeType===11);){if(OK(n))return!1;n=n.parentNode}return!0}function gz(e){let n=e.getAttribute("tabindex");return n===null&&(n=void 0),parseInt(n,10)}function cS(e){const n=e.nodeName.toLowerCase(),t=!Number.isNaN(gz(e));return(jK.test(n)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||t)&&EK(e)}function yz(e){const n=gz(e);return(Number.isNaN(n)||n>=0)&&cS(e)}function TK(e){return Array.from(e.querySelectorAll(vz)).filter(yz)}function MK(e,n){const t=TK(e);if(!t.length){n.preventDefault();return}const i=t[n.shiftKey?0:t.length-1],r=e.getRootNode();let a=i===r.activeElement||e===r.activeElement;const o=r.activeElement;if(o.tagName==="INPUT"&&o.getAttribute("type")==="radio"&&(a=t.filter(f=>f.getAttribute("type")==="radio"&&f.getAttribute("name")===o.getAttribute("name")).includes(i)),!a)return;n.preventDefault();const l=t[n.shiftKey?t.length-1:0];l&&l.focus()}function DK(e=!0){const n=A.useRef(null),t=r=>{let a=r.querySelector("[data-autofocus]");if(!a){const o=Array.from(r.querySelectorAll(vz));a=o.find(yz)||o.find(cS)||null,!a&&cS(r)&&(a=r)}a?a.focus({preventScroll:!0}):console.warn("[@mantine/hooks/use-focus-trap] Failed to find focusable element within provided node",r)},i=A.useCallback(r=>{if(e){if(r===null){n.current=null;return}n.current!==r&&(setTimeout(()=>{r.getRootNode()?t(r):console.warn("[@mantine/hooks/use-focus-trap] Ref node is not part of the dom",r)}),n.current=r)}},[e]);return A.useEffect(()=>{if(!e)return;n.current&&setTimeout(()=>{n.current&&t(n.current)});const r=a=>{a.key==="Tab"&&n.current&&MK(n.current,a)};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),i}const RK=e=>(e+1)%1e6;function PK(){const[,e]=A.useReducer(RK,0);return e}function qi(e){const[n,t]=A.useState(`mantine-${A.useId().replace(/:/g,"")}`);return us(()=>{t(al())},[]),typeof e=="string"?e:n}function bz(e,n,t){const i=A.useEffectEvent(n);A.useEffect(()=>(window.addEventListener(e,i,t),()=>window.removeEventListener(e,i,t)),[e])}function Wh(e,n){if(typeof e=="function")return e(n);typeof e=="object"&&e!==null&&"current"in e&&(e.current=n)}function NK(...e){const n=new Map;return t=>{if(e.forEach(i=>{const r=Wh(i,t);r&&n.set(i,r)}),n.size>0)return()=>{e.forEach(i=>{const r=n.get(i);r&&typeof r=="function"?r():Wh(i,null)}),n.clear()}}}function Bt(...e){return A.useCallback(NK(...e),e)}function wz(e){return{x:Yo(e.x,0,1),y:Yo(e.y,0,1)}}function kz(e,n,t="ltr"){const i=A.useRef(!1),r=A.useRef(!1),a=A.useRef(0),o=A.useRef(null),[l,f]=A.useState(!1);return A.useEffect(()=>(i.current=!0,()=>{var c;(c=o.current)==null||c.call(o)}),[]),{ref:A.useCallback(c=>{const h=({x:S,y:E})=>{cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{if(i.current&&c){c.style.userSelect="none";const j=c.getBoundingClientRect();if(j.width&&j.height){const O=Yo((S-j.left)/j.width,0,1);e({x:t==="ltr"?O:1-O,y:Yo((E-j.top)/j.height,0,1)})}}})},d=()=>{document.addEventListener("mousemove",k),document.addEventListener("mouseup",b),document.addEventListener("touchmove",C,{passive:!1}),document.addEventListener("touchend",b)},p=()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",b),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",b)},v=()=>{!r.current&&i.current&&(r.current=!0,typeof(n==null?void 0:n.onScrubStart)=="function"&&n.onScrubStart(),f(!0),d())},b=()=>{r.current&&i.current&&(r.current=!1,f(!1),p(),setTimeout(()=>{typeof(n==null?void 0:n.onScrubEnd)=="function"&&n.onScrubEnd()},0))},w=S=>{v(),S.preventDefault(),k(S)},k=S=>h({x:S.clientX,y:S.clientY}),_=S=>{S.cancelable&&S.preventDefault(),v(),C(S)},C=S=>{S.cancelable&&S.preventDefault(),h({x:S.changedTouches[0].clientX,y:S.changedTouches[0].clientY})};return c==null||c.addEventListener("mousedown",w),c==null||c.addEventListener("touchstart",_,{passive:!1}),o.current=()=>{p(),cancelAnimationFrame(a.current)},()=>{c&&(c.removeEventListener("mousedown",w),c.removeEventListener("touchstart",_))}},[t,e]),active:l}}function Mi({value:e,defaultValue:n,finalValue:t,onChange:i=()=>{}}){const[r,a]=A.useState(n!==void 0?n:t),o=(l,...f)=>{a(l),i==null||i(l,...f)};return e!==void 0?[e,i,!0]:[r,o,!1]}function L6(e,n){return AK("(prefers-reduced-motion: reduce)",e,n)}function _z(e=!1,n={}){const[t,i]=A.useState(e),r=A.useCallback(()=>{i(o=>{var l;return o||((l=n.onOpen)==null||l.call(n),!0)})},[n.onOpen]),a=A.useCallback(()=>{i(o=>{var l;return o&&((l=n.onClose)==null||l.call(n),!1)})},[n.onClose]);return[t,{open:r,close:a,toggle:A.useCallback(()=>{t?a():r()},[a,r,t]),set:i}]}function $K(e){const n=A.useRef(void 0);return A.useEffect(()=>{n.current=e},[e]),n.current}var rk={exports:{}},Gi={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var S5;function zK(){if(S5)return Gi;S5=1;var e=R6();function n(f){var c="https://react.dev/errors/"+f;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),rk.exports=zK(),rk.exports}var Qs=xz();const bh=pt(Qs);function LK(e,n){window.dispatchEvent(new CustomEvent(e,{detail:n}))}function IK(e){function n(i){const r=Object.keys(i).reduce((a,o)=>(a[`${e}:${o}`]=l=>i[o](l.detail),a),{});us(()=>(Object.keys(r).forEach(a=>{window.removeEventListener(a,r[a]),window.addEventListener(a,r[a])}),()=>Object.keys(r).forEach(a=>{window.removeEventListener(a,r[a])})),[r])}function t(i){return(...r)=>LK(`${e}:${String(i)}`,r[0])}return[n,t]}var BK={};function FK(){return"development"}function sy(e){var t;const n=Q.version;return typeof Q.version!="string"||n.startsWith("18.")?e==null?void 0:e.ref:(t=e==null?void 0:e.props)==null?void 0:t.ref}function mg(e,n=document){const t=n.querySelector(e);if(t)return t;const i=n.querySelectorAll("*");for(let r=0;r{Object.entries(t).forEach(([i,r])=>{n[i]?n[i]=hn(n[i],r):n[i]=r})}),n}function Vh({theme:e,classNames:n,props:t,stylesCtx:i}){return HK((Array.isArray(n)?n:[n]).map(r=>typeof r=="function"?r(e,t,i):r||qK))}function Mg({theme:e,styles:n,props:t,stylesCtx:i}){const r=Array.isArray(n)?n:[n],a={};for(const o of r)typeof o=="function"?Object.assign(a,o(e,t,i)):o&&Object.assign(a,o);return a}function A5(e){return e==="auto"||e==="dark"||e==="light"}function UK({key:e="mantine-color-scheme-value"}={}){let n;return{get:t=>{if(typeof window>"u")return t;try{const i=window.localStorage.getItem(e);return A5(i)?i:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(i){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",i)}},subscribe:t=>{n=i=>{i.storageArea===window.localStorage&&i.key===e&&A5(i.newValue)&&t(i.newValue)},window.addEventListener("storage",n)},unsubscribe:()=>{window.removeEventListener("storage",n)},clear:()=>{window.localStorage.removeItem(e)}}}function Gh(e,n){return typeof e.primaryShade=="number"?e.primaryShade:n==="dark"?e.primaryShade.dark:e.primaryShade.light}function WK(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function VK(e){let n=e.replace("#","");if(n.length===3){const i=n.split("");n=[i[0],i[0],i[1],i[1],i[2],i[2]].join("")}if(n.length===8){const i=parseInt(n.slice(6,8),16)/255;return{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:i}}const t=parseInt(n,16);return{r:t>>16&255,g:t>>8&255,b:t&255,a:1}}function GK(e){const[n,t,i,r]=e.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:n,g:t,b:i,a:r===void 0?1:r}}function YK(e){const n=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!n)return{r:0,g:0,b:0,a:1};const t=parseInt(n[1],10),i=parseInt(n[2],10)/100,r=parseInt(n[3],10)/100,a=n[5]?parseFloat(n[5]):void 0,o=(1-Math.abs(2*r-1))*i,l=t/60,f=o*(1-Math.abs(l%2-1)),c=r-o/2;let h,d,p;return l>=0&&l<1?(h=o,d=f,p=0):l>=1&&l<2?(h=f,d=o,p=0):l>=2&&l<3?(h=0,d=o,p=f):l>=3&&l<4?(h=0,d=f,p=o):l>=4&&l<5?(h=f,d=0,p=o):(h=o,d=0,p=f),{r:Math.round((h+c)*255),g:Math.round((d+c)*255),b:Math.round((p+c)*255),a:a||1}}function I6(e){return WK(e)?VK(e):e.startsWith("rgb")?GK(e):e.startsWith("hsl")?YK(e):{r:0,g:0,b:0,a:1}}function ak(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function KK(e){const n=e.match(/oklch\((.*?)%\s/);return n?parseFloat(n[1]):null}function Cz(e){if(e.startsWith("oklch("))return(KK(e)||0)/100;const{r:n,g:t,b:i}=I6(e),r=n/255,a=t/255,o=i/255,l=ak(r),f=ak(a),c=ak(o);return .2126*l+.7152*f+.0722*c}function Jd(e,n=.179){return e.startsWith("var(")?!1:Cz(e)>n}function fs({color:e,theme:n,colorScheme:t}){if(typeof e!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e==="bright")return{color:e,value:t==="dark"?n.white:n.black,shade:void 0,isThemeColor:!1,isLight:Jd(t==="dark"?n.white:n.black,n.luminanceThreshold),variable:"--mantine-color-bright"};if(e==="dimmed")return{color:e,value:t==="dark"?n.colors.dark[2]:n.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:Jd(t==="dark"?n.colors.dark[2]:n.colors.gray[6],n.luminanceThreshold),variable:"--mantine-color-dimmed"};if(e==="white"||e==="black")return{color:e,value:e==="white"?n.white:n.black,shade:void 0,isThemeColor:!1,isLight:Jd(e==="white"?n.white:n.black,n.luminanceThreshold),variable:`--mantine-color-${e}`};const[i,r]=e.split("."),a=r?Number(r):void 0,o=i in n.colors;if(o){const l=a!==void 0?n.colors[i][a]:n.colors[i][Gh(n,t||"light")];return{color:i,value:l,shade:a,isThemeColor:o,isLight:Jd(l,n.luminanceThreshold),variable:r?`--mantine-color-${i}-${a}`:`--mantine-color-${i}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:Jd(e,n.luminanceThreshold),shade:a,variable:void 0}}function ut(e,n){const t=fs({color:e||n.primaryColor,theme:n});return t.variable?`var(${t.variable})`:e}function ou(e,n){if(e.startsWith("var("))return`color-mix(in srgb, ${e}, black ${n*100}%)`;const{r:t,g:i,b:r,a}=I6(e),o=1-n,l=f=>Math.round(f*o);return`rgba(${l(t)}, ${l(i)}, ${l(r)}, ${a})`}function dS(e,n){const t={from:(e==null?void 0:e.from)||n.defaultGradient.from,to:(e==null?void 0:e.to)||n.defaultGradient.to,deg:(e==null?void 0:e.deg)??n.defaultGradient.deg??0},i=ut(t.from,n),r=ut(t.to,n);return`linear-gradient(${t.deg}deg, ${i} 0%, ${r} 100%)`}function Vs(e,n){if(typeof e!="string"||n>1||n<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var("))return`color-mix(in srgb, ${e}, transparent ${(1-n)*100}%)`;if(e.startsWith("oklch"))return e.includes("/")?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${n})`):e.replace(")",` / ${n})`);const{r:t,g:i,b:r}=I6(e);return`rgba(${t}, ${i}, ${r}, ${n})`}const j5=Vs,XK=({color:e,theme:n,variant:t,gradient:i,autoContrast:r})=>{const a=fs({color:e,theme:n}),o=typeof r=="boolean"?r:n.autoContrast;if(t==="none")return{background:"transparent",hover:"transparent",color:"inherit",border:"none"};if(t==="filled"){const l=o&&a.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:l,border:`${pe(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:l,border:`${pe(1)} solid transparent`}:{background:e,hover:ou(e,.1),color:l,border:`${pe(1)} solid transparent`}}if(t==="light"){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${pe(1)} solid transparent`};const l=n.colors[a.color][a.shade];return{background:l,hover:ou(l,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${pe(1)} solid transparent`}}return{background:Vs(e,.1),hover:Vs(e,.12),color:e,border:`${pe(1)} solid transparent`}}if(t==="outline")return a.isThemeColor?a.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${pe(1)} solid var(--mantine-color-${e}-outline)`}:{background:"transparent",hover:Vs(n.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${pe(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:"transparent",hover:Vs(e,.05),color:e,border:`${pe(1)} solid ${e}`};if(t==="subtle"){if(a.isThemeColor){if(a.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${pe(1)} solid transparent`};const l=n.colors[a.color][a.shade];return{background:"transparent",hover:Vs(l,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${pe(1)} solid transparent`}}return{background:"transparent",hover:Vs(e,.12),color:e,border:`${pe(1)} solid transparent`}}return t==="transparent"?a.isThemeColor?a.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${e}-light-color)`,border:`${pe(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${pe(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:e,border:`${pe(1)} solid transparent`}:t==="white"?a.isThemeColor?a.shade===void 0?{background:"var(--mantine-color-white)",hover:ou(n.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${pe(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:ou(n.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${pe(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:ou(n.white,.01),color:e,border:`${pe(1)} solid transparent`}:t==="gradient"?{background:dS(i,n),hover:dS(i,n),color:"var(--mantine-color-white)",border:"none"}:t==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${pe(1)} solid var(--mantine-color-default-border)`}:{}};function Fm({color:e,theme:n,autoContrast:t}){return(typeof t=="boolean"?t:n.autoContrast)&&fs({color:e||n.primaryColor,theme:n}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function O5(e,n){return Fm({color:e.colors[e.primaryColor][Gh(e,n)],theme:e,autoContrast:null})}function ly(e,n){return typeof e=="boolean"?e:n.autoContrast}const Az=A.createContext(null);function bo(){const e=A.use(Az);if(!e)throw new Error("[@mantine/core] MantineProvider was not found in tree");return e}function ZK(){return bo().cssVariablesResolver}function QK(){return bo().classNamesPrefix}function B6(){return bo().getStyleNonce}function JK(){return bo().withStaticClasses}function eX(){return bo().headless}function nX(){var e;return(e=bo().stylesTransform)==null?void 0:e.sx}function tX(){var e;return(e=bo().stylesTransform)==null?void 0:e.styles}function qm(){return bo().env||"default"}function iX(){return bo().deduplicateInlineStyles}function Sf(e,n){var r,a;const t=typeof window<"u"&&"matchMedia"in window&&((r=window.matchMedia("(prefers-color-scheme: dark)"))==null?void 0:r.matches),i=e!=="auto"?e:t?"dark":"light";(a=n())==null||a.setAttribute("data-mantine-color-scheme",i)}function rX({manager:e,defaultColorScheme:n,getRootElement:t,forceColorScheme:i}){const r=A.useRef(null),[a,o]=A.useState(()=>e.get(n)),l=i||a,f=A.useCallback(h=>{i||(Sf(h,t),o(h),e.set(h))},[e.set,l,i]),c=A.useCallback(()=>{o(n),Sf(n,t),e.clear()},[e.clear,n]);return A.useEffect(()=>(e.subscribe(f),e.unsubscribe),[e.subscribe,e.unsubscribe]),us(()=>{Sf(e.get(n),t)},[]),A.useEffect(()=>{var d;if(i)return Sf(i,t),()=>{};i===void 0&&Sf(a,t),typeof window<"u"&&"matchMedia"in window&&(r.current=window.matchMedia("(prefers-color-scheme: dark)"));const h=p=>{a==="auto"&&Sf(p.matches?"dark":"light",t)};return(d=r.current)==null||d.addEventListener("change",h),()=>{var p;return(p=r.current)==null?void 0:p.removeEventListener("change",h)}},[a,i]),{colorScheme:l,setColorScheme:f,clearColorScheme:c}}const aX={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"]},E5="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",F6={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:aX,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:XK,autoContrast:!1,luminanceThreshold:.3,fontFamily:E5,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:"md",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:E5,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:pe(34),lineHeight:"1.3"},h2:{fontSize:pe(26),lineHeight:"1.35"},h3:{fontSize:pe(22),lineHeight:"1.4"},h4:{fontSize:pe(18),lineHeight:"1.45"},h5:{fontSize:pe(16),lineHeight:"1.5"},h6:{fontSize:pe(14),lineHeight:"1.5"}}},fontSizes:{xs:pe(12),sm:pe(14),md:pe(16),lg:pe(18),xl:pe(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},fontWeights:{regular:"400",medium:"600",bold:"700"},radius:{xs:pe(2),sm:pe(4),md:pe(8),lg:pe(16),xl:pe(32)},spacing:{xs:pe(10),sm:pe(12),md:pe(16),lg:pe(20),xl:pe(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${pe(1)} ${pe(3)} rgba(0, 0, 0, 0.05), 0 ${pe(1)} ${pe(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${pe(1)} ${pe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${pe(10)} ${pe(15)} ${pe(-5)}, rgba(0, 0, 0, 0.04) 0 ${pe(7)} ${pe(7)} ${pe(-5)}`,md:`0 ${pe(1)} ${pe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${pe(20)} ${pe(25)} ${pe(-5)}, rgba(0, 0, 0, 0.04) 0 ${pe(10)} ${pe(10)} ${pe(-5)}`,lg:`0 ${pe(1)} ${pe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${pe(28)} ${pe(23)} ${pe(-7)}, rgba(0, 0, 0, 0.04) 0 ${pe(12)} ${pe(12)} ${pe(-7)}`,xl:`0 ${pe(1)} ${pe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${pe(36)} ${pe(28)} ${pe(-7)}, rgba(0, 0, 0, 0.04) 0 ${pe(17)} ${pe(17)} ${pe(-7)}`},other:{},components:{}},oX="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",T5="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function ok(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function M5(e){if(!(e.primaryColor in e.colors))throw new Error(oX);if(typeof e.primaryShade=="object"&&(!ok(e.primaryShade.dark)||!ok(e.primaryShade.light)))throw new Error(T5);if(typeof e.primaryShade=="number"&&!ok(e.primaryShade))throw new Error(T5)}function sX(e,n){var i;if(!n)return M5(e),e;const t=D6(e,n);return n.fontFamily&&!((i=n.headings)!=null&&i.fontFamily)&&(t.headings.fontFamily=n.fontFamily),M5(t),t}const q6=A.createContext(null),lX=()=>A.use(q6)||F6;function ui(){const e=A.use(q6);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 jz({theme:e,children:n,inherit:t=!0}){const i=lX();return y.jsx(q6,{value:A.useMemo(()=>sX(t?i:F6,e),[e,i,t]),children:n})}jz.displayName="@mantine/core/MantineThemeProvider";function sk(e){return Object.entries(e).map(([n,t])=>`${n}: ${t};`).join("")}function Oz(e,n){const t=n?[n]:[":root",":host"],i=sk(e.variables),r=i?`${t.join(", ")}{${i}}`:"",a=sk(e.dark),o=sk(e.light),l=f=>t.map(c=>c===":host"?`${c}([data-mantine-color-scheme="${f}"])`:`${c}[data-mantine-color-scheme="${f}"]`).join(", ");return`${r} + +${a?`${l("dark")}{${a}}`:""} + +${o?`${l("light")}{${o}}`:""}`}function Nv({theme:e,color:n,colorScheme:t,name:i=n,withColorValues:r=!0}){if(!e.colors[n])return{};if(t==="light"){const l=Gh(e,"light"),f={[`--mantine-color-${i}-text`]:`var(--mantine-color-${i}-filled)`,[`--mantine-color-${i}-filled`]:`var(--mantine-color-${i}-${l})`,[`--mantine-color-${i}-filled-hover`]:`var(--mantine-color-${i}-${l===9?8:l+1})`,[`--mantine-color-${i}-light`]:`var(--mantine-color-${i}-1)`,[`--mantine-color-${i}-light-hover`]:`var(--mantine-color-${i}-2)`,[`--mantine-color-${i}-light-color`]:`var(--mantine-color-${i}-9)`,[`--mantine-color-${i}-outline`]:`var(--mantine-color-${i}-${l})`,[`--mantine-color-${i}-outline-hover`]:j5(e.colors[n][l],.05)};return r?{[`--mantine-color-${i}-0`]:e.colors[n][0],[`--mantine-color-${i}-1`]:e.colors[n][1],[`--mantine-color-${i}-2`]:e.colors[n][2],[`--mantine-color-${i}-3`]:e.colors[n][3],[`--mantine-color-${i}-4`]:e.colors[n][4],[`--mantine-color-${i}-5`]:e.colors[n][5],[`--mantine-color-${i}-6`]:e.colors[n][6],[`--mantine-color-${i}-7`]:e.colors[n][7],[`--mantine-color-${i}-8`]:e.colors[n][8],[`--mantine-color-${i}-9`]:e.colors[n][9],...f}:f}const a=Gh(e,"dark"),o={[`--mantine-color-${i}-text`]:`var(--mantine-color-${i}-4)`,[`--mantine-color-${i}-filled`]:`var(--mantine-color-${i}-${a})`,[`--mantine-color-${i}-filled-hover`]:`var(--mantine-color-${i}-${a===9?8:a+1})`,[`--mantine-color-${i}-light`]:ou(e.colors[n][9],.5),[`--mantine-color-${i}-light-hover`]:ou(e.colors[n][9],.3),[`--mantine-color-${i}-light-color`]:`var(--mantine-color-${i}-0)`,[`--mantine-color-${i}-outline`]:`var(--mantine-color-${i}-${Math.max(a-4,0)})`,[`--mantine-color-${i}-outline-hover`]:j5(e.colors[n][Math.max(a-4,0)],.05)};return r?{[`--mantine-color-${i}-0`]:e.colors[n][0],[`--mantine-color-${i}-1`]:e.colors[n][1],[`--mantine-color-${i}-2`]:e.colors[n][2],[`--mantine-color-${i}-3`]:e.colors[n][3],[`--mantine-color-${i}-4`]:e.colors[n][4],[`--mantine-color-${i}-5`]:e.colors[n][5],[`--mantine-color-${i}-6`]:e.colors[n][6],[`--mantine-color-${i}-7`]:e.colors[n][7],[`--mantine-color-${i}-8`]:e.colors[n][8],[`--mantine-color-${i}-9`]:e.colors[n][9],...o}:o}function uX(e){return!!e&&typeof e=="object"&&"mantine-virtual-color"in e}function Zl(e,n,t){Pt(n).forEach(i=>Object.assign(e,{[`--mantine-${t}-${i}`]:n[i]}))}const Ez=e=>{const n=Gh(e,"light"),t=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:pe(e.defaultRadius),i={variables:{"--mantine-z-index-app":"100","--mantine-z-index-modal":"200","--mantine-z-index-popover":"300","--mantine-z-index-overlay":"400","--mantine-z-index-max":"9999","--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--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":t,"--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-color-scheme":"light","--mantine-primary-color-contrast":O5(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}-${n})`,"--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)","--mantine-color-disabled":"var(--mantine-color-gray-2)","--mantine-color-disabled-color":"var(--mantine-color-gray-5)","--mantine-color-disabled-border":"var(--mantine-color-gray-3)"},dark:{"--mantine-color-scheme":"dark","--mantine-primary-color-contrast":O5(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)","--mantine-color-disabled":"var(--mantine-color-dark-6)","--mantine-color-disabled-color":"var(--mantine-color-dark-3)","--mantine-color-disabled-border":"var(--mantine-color-dark-4)"}};Zl(i.variables,e.breakpoints,"breakpoint"),Zl(i.variables,e.spacing,"spacing"),Zl(i.variables,e.fontSizes,"font-size"),Zl(i.variables,e.lineHeights,"line-height"),Zl(i.variables,e.shadows,"shadow"),Zl(i.variables,e.radius,"radius"),Zl(i.variables,e.fontWeights,"font-weight"),e.colors[e.primaryColor].forEach((a,o)=>{i.variables[`--mantine-primary-color-${o}`]=`var(--mantine-color-${e.primaryColor}-${o})`}),Pt(e.colors).forEach(a=>{const o=e.colors[a];if(uX(o)){Object.assign(i.light,Nv({theme:e,name:o.name,color:o.light,colorScheme:"light",withColorValues:!0})),Object.assign(i.dark,Nv({theme:e,name:o.name,color:o.dark,colorScheme:"dark",withColorValues:!0}));return}o.forEach((l,f)=>{i.variables[`--mantine-color-${a}-${f}`]=l}),Object.assign(i.light,Nv({theme:e,color:a,colorScheme:"light",withColorValues:!1})),Object.assign(i.dark,Nv({theme:e,color:a,colorScheme:"dark",withColorValues:!1}))});const r=e.headings.sizes;return Pt(r).forEach(a=>{i.variables[`--mantine-${a}-font-size`]=r[a].fontSize,i.variables[`--mantine-${a}-line-height`]=r[a].lineHeight,i.variables[`--mantine-${a}-font-weight`]=r[a].fontWeight||e.headings.fontWeight}),i};function fX(){const e=ui(),n=B6(),t=Pt(e.breakpoints).reduce((i,r)=>{const a=e.breakpoints[r].includes("px"),o=Hh(e.breakpoints[r]);return`${i}@media (max-width: ${a?`${o-.1}px`:Eg(o-.1)}) {.mantine-visible-from-${r} {display: none !important;}}@media (min-width: ${a?`${o}px`:Eg(o)}) {.mantine-hidden-from-${r} {display: none !important;}}`},"");return y.jsx("style",{"data-mantine-styles":"classes",nonce:n==null?void 0:n(),dangerouslySetInnerHTML:{__html:t}})}function cX({theme:e,generator:n}){const t=Ez(e),i=n==null?void 0:n(e);return i?D6(t,i):t}const lk=Ez(F6);function dX(e){const n={variables:{},light:{},dark:{}};return Pt(e.variables).forEach(t=>{lk.variables[t]!==e.variables[t]&&(n.variables[t]=e.variables[t])}),Pt(e.light).forEach(t=>{lk.light[t]!==e.light[t]&&(n.light[t]=e.light[t])}),Pt(e.dark).forEach(t=>{lk.dark[t]!==e.dark[t]&&(n.dark[t]=e.dark[t])}),n}function hX(e){return Oz({variables:{},dark:{"--mantine-color-scheme":"dark"},light:{"--mantine-color-scheme":"light"}},e)}function Tz({cssVariablesSelector:e,deduplicateCssVariables:n}){const t=ui(),i=B6(),r=cX({theme:t,generator:ZK()}),a=(e===void 0||e===":root"||e===":host")&&n,o=Oz(a?dX(r):r,e);return o?y.jsx("style",{"data-mantine-styles":!0,nonce:i==null?void 0:i(),dangerouslySetInnerHTML:{__html:`${o}${a?"":hX(e)}`}}):null}Tz.displayName="@mantine/CssVariables";function mX({respectReducedMotion:e,getRootElement:n}){us(()=>{var t;e&&((t=n())==null||t.setAttribute("data-respect-reduced-motion","true"))},[e])}function Mz({theme:e,children:n,getStyleNonce:t,withStaticClasses:i=!0,withGlobalClasses:r=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:l,classNamesPrefix:f="mantine",colorSchemeManager:c=UK(),defaultColorScheme:h="light",getRootElement:d=()=>document.documentElement,cssVariablesResolver:p,forceColorScheme:v,stylesTransform:b,env:w,deduplicateInlineStyles:k=!1}){const{colorScheme:_,setColorScheme:C,clearColorScheme:S}=rX({defaultColorScheme:h,forceColorScheme:v,manager:c,getRootElement:d});return mX({respectReducedMotion:(e==null?void 0:e.respectReducedMotion)||!1,getRootElement:d}),y.jsx(Az,{value:{colorScheme:_,setColorScheme:C,clearColorScheme:S,getRootElement:d,classNamesPrefix:f,getStyleNonce:t,cssVariablesResolver:p,cssVariablesSelector:l??":root",withStaticClasses:i,stylesTransform:b,env:w,deduplicateInlineStyles:k},children:y.jsxs(jz,{theme:e,children:[o&&y.jsx(Tz,{cssVariablesSelector:l,deduplicateCssVariables:a}),r&&y.jsx(fX,{}),n]})})}Mz.displayName="@mantine/core/MantineProvider";function be(e,n,t){var o;const i=ui(),r=(o=i.components[e])==null?void 0:o.defaultProps,a=typeof r=="function"?r(i):r;return{...n,...a,...Tu(t)}}function Hi({classNames:e,styles:n,props:t,stylesCtx:i}){const r=ui();return{resolvedClassNames:e===void 0?void 0:Vh({theme:r,classNames:e,props:t,stylesCtx:i||void 0}),resolvedStyles:n===void 0?void 0:Mg({theme:r,styles:n,props:t,stylesCtx:i||void 0})}}const pX={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function vX({theme:e,options:n,unstyled:t}){return hn((n==null?void 0:n.focusable)&&!t&&(e.focusClassName||pX[e.focusRing]),(n==null?void 0:n.active)&&!t&&e.activeClassName)}function gX({selector:e,stylesCtx:n,options:t,props:i,theme:r}){return Vh({theme:r,classNames:t==null?void 0:t.classNames,props:(t==null?void 0:t.props)||i,stylesCtx:n})[e]}function yX({selector:e,stylesCtx:n,theme:t,classNames:i,props:r}){return Vh({theme:t,classNames:i,props:r,stylesCtx:n})[e]}function bX({rootSelector:e,selector:n,className:t}){return e===n?t:void 0}function wX({selector:e,classes:n,unstyled:t}){return t?void 0:n[e]}function kX({themeName:e,classNamesPrefix:n,selector:t,withStaticClass:i}){return i===!1?[]:e.map(r=>`${n}-${r}-${t}`)}function _X({options:e,classes:n,selector:t,unstyled:i}){return e!=null&&e.variant&&!i?n[`${t}--${e.variant}`]:void 0}function xX({theme:e,options:n,themeName:t,selector:i,classNamesPrefix:r,resolvedClassNames:a,resolvedThemeClassNames:o,classes:l,unstyled:f,className:c,rootSelector:h,props:d,stylesCtx:p,withStaticClasses:v,headless:b,transformedStyles:w}){return hn(vX({theme:e,options:n,unstyled:f||b}),o.map(k=>k[i]),_X({options:n,classes:l,selector:i,unstyled:f||b}),a[i],yX({selector:i,stylesCtx:p,theme:e,classNames:w,props:d}),gX({selector:i,stylesCtx:p,options:n,props:d,theme:e}),bX({rootSelector:h,selector:i,className:c}),wX({selector:i,classes:l,unstyled:f||b}),v&&!b&&kX({themeName:t,classNamesPrefix:r,selector:i,withStaticClass:n==null?void 0:n.withStaticClass}),n==null?void 0:n.className)}function H6({style:e,theme:n}){return Array.isArray(e)?e.reduce((t,i)=>({...t,...H6({style:i,theme:n})}),{}):typeof e=="function"?e(n):e??{}}function SX({theme:e,selector:n,options:t,props:i,stylesCtx:r,rootSelector:a,withStylesTransform:o,resolvedStyles:l,resolvedThemeStyles:f,resolvedVars:c,resolvedRootStyle:h}){return{...f[n],...l[n],...!o&&Mg({theme:e,styles:t==null?void 0:t.styles,props:(t==null?void 0:t.props)||i,stylesCtx:r})[n],...c[n],...a===n?h:null,...H6({style:t==null?void 0:t.style,theme:e})}}function CX(e){return e.reduce((n,t)=>(t&&Object.keys(t).forEach(i=>{n[i]={...n[i],...Tu(t[i])}}),n),{})}function AX({props:e,stylesCtx:n,themeName:t,theme:i}){var o;const r=(o=tX())==null?void 0:o();return{getTransformedStyles:l=>r?[...l.map(f=>r(f,{props:e,theme:i,ctx:n})),...t.map(f=>{var c;return r((c=i.components[f])==null?void 0:c.styles,{props:e,theme:i,ctx:n})})].filter(Boolean):[],withStylesTransform:!!r}}function Xe({name:e,classes:n,props:t,stylesCtx:i,className:r,style:a,rootSelector:o="root",unstyled:l,classNames:f,styles:c,vars:h,varsResolver:d,attributes:p}){var P;const v=ui(),b=QK(),w=JK(),k=eX(),_=(Array.isArray(e)?e:[e]).filter(z=>z),{withStylesTransform:C,getTransformedStyles:S}=AX({props:t,stylesCtx:i,themeName:_,theme:v}),E=Vh({theme:v,classNames:f,props:t,stylesCtx:i}),j=_.map(z=>{var B;return Vh({theme:v,classNames:(B=v.components[z])==null?void 0:B.classNames,props:t,stylesCtx:i})}),O=C?{}:Mg({theme:v,styles:c,props:t,stylesCtx:i}),M={};if(!C)for(const z of _){const B=Mg({theme:v,styles:(P=v.components[z])==null?void 0:P.styles,props:t,stylesCtx:i});for(const V of Object.keys(B))M[V]={...M[V],...B[V]}}const $=CX([k?{}:d==null?void 0:d(v,t,i),..._.map(z=>{var B,V,U;return(U=(V=(B=v.components)==null?void 0:B[z])==null?void 0:V.vars)==null?void 0:U.call(V,v,t,i)}),h==null?void 0:h(v,t,i)]),q=H6({style:a,theme:v});return(z,B)=>({...p==null?void 0:p[z],className:xX({theme:v,options:B,themeName:_,selector:z,classNamesPrefix:b,resolvedClassNames:E,resolvedThemeClassNames:j,classes:n,unstyled:l,className:r,rootSelector:o,props:t,stylesCtx:i,withStaticClasses:w,headless:k,transformedStyles:S([B==null?void 0:B.styles,c])}),style:SX({theme:v,selector:z,options:B,props:t,stylesCtx:i,rootSelector:o,withStylesTransform:C,resolvedStyles:O,resolvedThemeStyles:M,resolvedVars:$,resolvedRootStyle:q})})}function Eh(e){return Pt(e).reduce((n,t)=>e[t]!==void 0?`${n}${hK(t)}:${e[t]};`:n,"").trim()}function jX({selector:e,styles:n,media:t,container:i}){const r=n?Eh(n):"",a=Array.isArray(t)?t.map(l=>`@media${l.query}{${e}{${Eh(l.styles)}}}`):[],o=Array.isArray(i)?i.map(l=>`@container ${l.query}{${e}{${Eh(l.styles)}}}`):[];return`${r?`${e}{${r}}`:""}${a.join("")}${o.join("")}`.trim()}function OX(e){let n=5381;for(let t=0;t>>0).toString(36)}function Dc({deduplicate:e,...n}){const t=B6(),i=jX(n);return e?y.jsx("style",{href:`mantine-${OX(i)}`,precedence:"mantine",nonce:t==null?void 0:t(),children:i}):y.jsx("style",{"data-mantine-styles":"inline",nonce:t==null?void 0:t(),dangerouslySetInnerHTML:{__html:i}})}function EX(e){let n=5381;for(let t=0;t>>0).toString(36)}function TX(e,n){return`__mdi__-${EX(`${e?Eh(e):""}|${Array.isArray(n)?n.map(t=>`${t.query}:${Eh(t.styles)}`).join("|"):""}`)}`}function Du(e){const{m:n,mx:t,my:i,mt:r,mb:a,ml:o,mr:l,me:f,ms:c,mis:h,mie:d,p,px:v,py:b,pt:w,pb:k,pl:_,pr:C,pe:S,ps:E,pis:j,pie:O,bd:M,bdrs:$,bg:q,c:P,opacity:z,ff:B,fz:V,fw:U,lts:N,ta:D,lh:L,fs:H,tt:Y,td:R,w:G,miw:W,maw:I,h:X,mih:ee,mah:re,bgsz:se,bgp:ye,bgr:ae,bga:le,pos:_e,top:ne,left:ze,bottom:we,right:Ce,inset:Ne,display:ge,flex:xe,hiddenFrom:Pe,visibleFrom:ue,lightHidden:Be,darkHidden:Ge,sx:We,...Ze}=e;return{styleProps:Tu({m:n,mx:t,my:i,mt:r,mb:a,ml:o,mr:l,me:f,ms:c,mis:h,mie:d,p,px:v,py:b,pt:w,pb:k,pl:_,pr:C,pis:j,pie:O,pe:S,ps:E,bd:M,bg:q,c:P,opacity:z,ff:B,fz:V,fw:U,lts:N,ta:D,lh:L,fs:H,tt:Y,td:R,w:G,miw:W,maw:I,h:X,mih:ee,mah:re,bgsz:se,bgp:ye,bgr:ae,bga:le,pos:_e,top:ne,left:ze,bottom:we,right:Ce,inset:Ne,display:ge,flex:xe,bdrs:$,hiddenFrom:Pe,visibleFrom:ue,lightHidden:Be,darkHidden:Ge,sx:We}),rest:Ze}}const MX={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"},mis:{type:"spacing",property:"marginInlineStart"},mie:{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"},pis:{type:"spacing",property:"paddingInlineStart"},pie:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bdrs:{type:"radius",property:"borderRadius"},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 U6(e,n){const t=fs({color:e,theme:n});return t.color==="dimmed"?"var(--mantine-color-dimmed)":t.color==="bright"?"var(--mantine-color-bright)":t.variable?`var(${t.variable})`:t.color}function DX(e,n){const t=fs({color:e,theme:n});return t.isThemeColor&&t.shade===void 0?`var(--mantine-color-${t.color}-text)`:U6(e,n)}function RX(e,n){if(typeof e=="number")return pe(e);if(typeof e=="string"){const[t,i,...r]=e.split(" ").filter(o=>o.trim()!=="");let a=`${pe(t)}`;return i&&(a+=` ${i}`),r.length>0&&(a+=` ${U6(r.join(" "),n)}`),a.trim()}return e}const D5={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)"};function PX(e){return typeof e=="string"&&e in D5?D5[e]:e}const NX=["h1","h2","h3","h4","h5","h6"];function $X(e,n){return typeof e=="string"&&e in n.fontSizes?`var(--mantine-font-size-${e})`:typeof e=="string"&&NX.includes(e)?`var(--mantine-${e}-font-size)`:typeof e=="number"||typeof e=="string"?pe(e):e}function zX(e){return e}const LX=["h1","h2","h3","h4","h5","h6"];function IX(e,n){return typeof e=="string"&&e in n.lineHeights?`var(--mantine-line-height-${e})`:typeof e=="string"&&LX.includes(e)?`var(--mantine-${e}-line-height)`:e}function BX(e,n){return typeof e=="string"&&e in n.radius?`var(--mantine-radius-${e})`:typeof e=="number"||typeof e=="string"?pe(e):e}function FX(e){return typeof e=="number"?pe(e):e}function qX(e,n){if(typeof e=="number")return pe(e);if(typeof e=="string"){const t=e.replace("-","");if(!(t in n.spacing))return pe(e);const i=`--mantine-spacing-${t}`;return e.startsWith("-")?`calc(var(${i}) * -1)`:`var(${i})`}return e}const uk={color:U6,textColor:DX,fontSize:$X,spacing:qX,radius:BX,identity:zX,size:FX,lineHeight:IX,fontFamily:PX,border:RX};function R5(e){return e.replace("(min-width: ","").replace("em)","")}function HX({media:e,...n}){const t=Object.keys(e).sort((i,r)=>Number(R5(i))-Number(R5(r))).map(i=>({query:i,styles:e[i]}));return{...n,media:t}}function UX(e){if(typeof e!="object"||e===null)return!1;const n=Object.keys(e);return!(n.length===1&&n[0]==="base")}function WX(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function VX(e){return typeof e=="object"&&e!==null?Pt(e).filter(n=>n!=="base"):[]}function GX(e,n){return typeof e=="object"&&e!==null&&n in e?e[n]:e}function YX({styleProps:e,data:n,theme:t}){return HX(Pt(e).reduce((i,r)=>{if(r==="hiddenFrom"||r==="visibleFrom"||r==="sx")return i;const a=n[r],o=Array.isArray(a.property)?a.property:[a.property],l=WX(e[r]);if(!UX(e[r]))return o.forEach(c=>{i.inlineStyles[c]=uk[a.type](l,t)}),i;i.hasResponsiveStyles=!0;const f=VX(e[r]);return o.forEach(c=>{l!=null&&(i.styles[c]=uk[a.type](l,t)),f.forEach(h=>{const d=`(min-width: ${t.breakpoints[h]})`;i.media[d]={...i.media[d],[c]:uk[a.type](GX(e[r],h),t)}})}),i},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function uy(){return`__m__-${A.useId().replace(/[:«»]/g,"")}`}function Dz(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...Dz(i,n)}),{}):typeof e=="function"?e(n):e??{}}function KX(e){return e}const XX=KX;function Rz(e){return e}function Re(e){const n=e;return n.extend=Rz,n.withProps=t=>{const i=r=>y.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n}function Hm(e){return Re(e)}function yi(e){const n=e;return n.withProps=t=>{const i=r=>y.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n.extend=Rz,n}function Pz(e){return`data-${(e.startsWith("data-")?e.slice(5):e).replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`}function ZX(e){return Object.keys(e).reduce((n,t)=>{const i=e[t];return i===void 0||i===""||i===!1||i===null||(n[Pz(t)]=e[t]),n},{})}function Nz(e){return e?typeof e=="string"?{[Pz(e)]:!0}:Array.isArray(e)?[...e].reduce((n,t)=>({...n,...Nz(t)}),{}):ZX(e):null}function hS(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...hS(i,n)}),{}):typeof e=="function"?e(n):e??{}}function QX({theme:e,style:n,vars:t,styleProps:i}){const r=hS(n,e),a=hS(t,e);return{...r,...a,...i}}function $z({component:e,style:n,__vars:t,className:i,variant:r,mod:a,size:o,hiddenFrom:l,visibleFrom:f,lightHidden:c,darkHidden:h,renderRoot:d,__size:p,ref:v,...b}){var q,P;const w=ui(),k=e||"div",{styleProps:_,rest:C}=Du(b),S=(P=(q=nX())==null?void 0:q())==null?void 0:P(_.sx),E=uy(),j=YX({styleProps:_,theme:w,data:MX}),O=iX(),M=O&&j.hasResponsiveStyles?TX(j.styles,j.media):E,$={ref:v,style:QX({theme:w,style:n,vars:t,styleProps:j.inlineStyles}),className:hn(i,S,{[M]:j.hasResponsiveStyles,"mantine-light-hidden":c,"mantine-dark-hidden":h,[`mantine-hidden-from-${l}`]:l,[`mantine-visible-from-${f}`]:f}),"data-variant":r,"data-size":hz(o)?void 0:o||void 0,size:p,...Nz(a),...C};return y.jsxs(y.Fragment,{children:[j.hasResponsiveStyles&&y.jsx(Dc,{selector:`.${M}`,styles:j.styles,media:j.media,deduplicate:O}),typeof d=="function"?d($):y.jsx(k,{...$})]})}$z.displayName="@mantine/core/Box";const de=XX($z),JX=A.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function Ru(){return A.use(JX)}const[eZ,ka]=Gr("ScrollArea.Root component was not found in tree");function ll(e,n){const t=A.useEffectEvent(n);us(()=>{let i=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(t)});return r.observe(e),()=>{window.cancelAnimationFrame(i),r.unobserve(e)}}},[e])}function nZ(e){const{style:n,...t}=e,i=ka(),[r,a]=A.useState(0),[o,l]=A.useState(0),f=!!(r&&o);return ll(i.scrollbarX,()=>{var h;const c=((h=i.scrollbarX)==null?void 0:h.offsetHeight)||0;i.onCornerHeightChange(c),l(c)}),ll(i.scrollbarY,()=>{var h;const c=((h=i.scrollbarY)==null?void 0:h.offsetWidth)||0;i.onCornerWidthChange(c),a(c)}),f?y.jsx("div",{...t,style:{...n,width:r,height:o}}):null}function tZ(e){const n=ka(),t=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&t?y.jsx(nZ,{...e}):null}const iZ={scrollHideDelay:1e3,type:"hover"};function zz(e){const{type:n,scrollHideDelay:t,scrollbars:i,getStyles:r,ref:a,...o}=be("ScrollAreaRoot",iZ,e),[l,f]=A.useState(null),[c,h]=A.useState(null),[d,p]=A.useState(null),[v,b]=A.useState(null),[w,k]=A.useState(null),[_,C]=A.useState(0),[S,E]=A.useState(0),[j,O]=A.useState(!1),[M,$]=A.useState(!1),q=Bt(a,P=>f(P));return y.jsx(eZ,{value:{type:n,scrollHideDelay:t,scrollArea:l,viewport:c,onViewportChange:h,content:d,onContentChange:p,scrollbarX:v,onScrollbarXChange:b,scrollbarXEnabled:j,onScrollbarXEnabledChange:O,scrollbarY:w,onScrollbarYChange:k,scrollbarYEnabled:M,onScrollbarYEnabledChange:$,onCornerWidthChange:C,onCornerHeightChange:E,getStyles:r},children:y.jsx(de,{...o,ref:q,__vars:{"--sa-corner-width":i!=="xy"?"0px":`${_}px`,"--sa-corner-height":i!=="xy"?"0px":`${S}px`}})})}zz.displayName="@mantine/core/ScrollAreaRoot";function Lz(e,n){const t=e/n;return Number.isNaN(t)?0:t}function fy(e){const n=Lz(e.viewport,e.content),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-t)*n;return Math.max(i,18)}function Iz(e,n){return t=>{if(e[0]===e[1]||n[0]===n[1])return n[0];const i=(n[1]-n[0])/(e[1]-e[0]);return n[0]+i*(t-e[0])}}function rZ(e,[n,t]){return Math.min(t,Math.max(n,e))}function P5(e,n,t="ltr"){const i=fy(n),r=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,a=n.scrollbar.size-r,o=n.content-n.viewport,l=a-i,f=rZ(e,t==="ltr"?[0,o]:[o*-1,0]);return Iz([0,o],[0,l])(f)}function aZ(e,n,t,i="ltr"){const r=fy(t),a=r/2,o=n||a,l=r-o,f=t.scrollbar.paddingStart+o,c=t.scrollbar.size-t.scrollbar.paddingEnd-l,h=t.content-t.viewport,d=i==="ltr"?[0,h]:[h*-1,0];return Iz([f,c],d)(e)}function Bz(e,n){return e>0&&e{e==null||e(i),(t===!1||!i.defaultPrevented)&&(n==null||n(i))}}const[oZ,Fz]=Gr("ScrollAreaScrollbar was not found in tree");function qz(e){const{sizes:n,hasThumb:t,onThumbChange:i,onThumbPointerUp:r,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:l,onWheelScroll:f,onResize:c,ref:h,...d}=e,p=ka(),[v,b]=A.useState(null),w=Bt(h,$=>b($)),k=A.useRef(null),_=A.useRef(""),{viewport:C}=p,S=n.content-n.viewport,E=A.useEffectEvent(f),j=yh(o),O=oy(c,10),M=$=>{k.current&&l({x:$.clientX-k.current.left,y:$.clientY-k.current.top})};return A.useEffect(()=>{const $=q=>{const P=q.target;v!=null&&v.contains(P)&&E(q,S)};return document.addEventListener("wheel",$,{passive:!1}),()=>document.removeEventListener("wheel",$,{passive:!1})},[C,v,S]),A.useEffect(j,[n,j]),ll(v,O),ll(p.content,O),y.jsx(oZ,{value:{scrollbar:v,hasThumb:t,onThumbChange:yh(i),onThumbPointerUp:yh(r),onThumbPositionChange:j,onThumbPointerDown:yh(a)},children:y.jsx("div",{...d,ref:w,"data-mantine-scrollbar":!0,style:{position:"absolute",...d.style},onPointerDown:pu(e.onPointerDown,$=>{$.preventDefault(),$.button===0&&($.target.setPointerCapture($.pointerId),k.current=v.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",M($))}),onPointerMove:pu(e.onPointerMove,M),onPointerUp:pu(e.onPointerUp,$=>{const q=$.target;q.hasPointerCapture($.pointerId)&&($.preventDefault(),q.releasePointerCapture($.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,k.current=null}})})}const Hz=e=>{const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=ka(),[l,f]=A.useState(),c=A.useRef(null),h=Bt(r,c,o.onScrollbarXChange);return A.useEffect(()=>{c.current&&f(getComputedStyle(c.current))},[c]),y.jsx(qz,{"data-orientation":"horizontal",...a,ref:h,sizes:n,style:{...i,"--sa-thumb-width":`${fy(n)}px`},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,p)=>{if(o.viewport){const v=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(v),Bz(v,p)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&l&&t({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Dg(l.paddingLeft),paddingEnd:Dg(l.paddingRight)}})}})};Hz.displayName="@mantine/core/ScrollAreaScrollbarX";function Uz(e){const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=ka(),[l,f]=A.useState(),c=A.useRef(null),h=Bt(r,c,o.onScrollbarYChange);return A.useEffect(()=>{c.current&&f(window.getComputedStyle(c.current))},[]),y.jsx(qz,{...a,"data-orientation":"vertical",ref:h,sizes:n,style:{"--sa-thumb-height":`${fy(n)}px`,...i},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,p)=>{if(o.viewport){const v=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(v),Bz(v,p)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&l&&t({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Dg(l.paddingTop),paddingEnd:Dg(l.paddingBottom)}})}})}Uz.displayName="@mantine/core/ScrollAreaScrollbarY";function cy(e){const{orientation:n="vertical",...t}=e,{dir:i}=Ru(),r=ka(),a=A.useRef(null),o=A.useRef(0),[l,f]=A.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=Lz(l.viewport,l.content),h={...t,sizes:l,onSizesChange:f,hasThumb:c>0&&c<1,onThumbChange:p=>{a.current=p},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:p=>{o.current=p}},d=(p,v)=>aZ(p,o.current,l,v);return n==="horizontal"?y.jsx(Hz,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollLeft,v=P5(p,l,i);a.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollLeft=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollLeft=d(p,i))}}):n==="vertical"?y.jsx(Uz,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollTop,v=P5(p,l);l.scrollbar.size===0?a.current.style.setProperty("--thumb-opacity","0"):a.current.style.setProperty("--thumb-opacity","1"),a.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollTop=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollTop=d(p))}}):null}cy.displayName="@mantine/core/ScrollAreaScrollbarVisible";function W6(e){const n=ka(),{forceMount:t,...i}=e,[r,a]=A.useState(!1),o=e.orientation==="horizontal",l=oy(()=>{if(n.viewport){const f=n.viewport.offsetWidth{const{scrollArea:o}=i;let l=0;if(o){const f=()=>{window.clearTimeout(l),a(!0)},c=()=>{l=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return o.addEventListener("pointerenter",f),o.addEventListener("pointerleave",c),()=>{window.clearTimeout(l),o.removeEventListener("pointerenter",f),o.removeEventListener("pointerleave",c)}}},[i.scrollArea,i.scrollHideDelay]),n||r?y.jsx(W6,{"data-state":r?"visible":"hidden",...t}):null}Wz.displayName="@mantine/core/ScrollAreaScrollbarHover";function sZ(e){const{forceMount:n,...t}=e,i=ka(),r=e.orientation==="horizontal",[a,o]=A.useState("hidden"),l=oy(()=>o("idle"),100);return A.useEffect(()=>{if(a==="idle"){const f=window.setTimeout(()=>o("hidden"),i.scrollHideDelay);return()=>window.clearTimeout(f)}},[a,i.scrollHideDelay]),A.useEffect(()=>{const{viewport:f}=i,c=r?"scrollLeft":"scrollTop";if(f){let h=f[c];const d=()=>{const p=f[c];h!==p&&(o("scrolling"),l()),h=p};return f.addEventListener("scroll",d),()=>f.removeEventListener("scroll",d)}},[i.viewport,r,l]),n||a!=="hidden"?y.jsx(cy,{"data-state":a==="hidden"?"hidden":"visible",...t,onPointerEnter:pu(e.onPointerEnter,()=>o("interacting")),onPointerLeave:pu(e.onPointerLeave,()=>o("idle"))}):null}function mS(e){const{forceMount:n,...t}=e,i=ka(),{onScrollbarXEnabledChange:r,onScrollbarYEnabledChange:a}=i,o=e.orientation==="horizontal";return A.useEffect(()=>(o?r(!0):a(!0),()=>{o?r(!1):a(!1)}),[o,r,a]),i.type==="hover"?y.jsx(Wz,{...t,forceMount:n}):i.type==="scroll"?y.jsx(sZ,{...t,forceMount:n}):i.type==="auto"?y.jsx(W6,{...t,forceMount:n}):i.type==="always"?y.jsx(cy,{...t}):null}mS.displayName="@mantine/core/ScrollAreaScrollbar";function lZ(e,n=()=>{}){let t={left:e.scrollLeft,top:e.scrollTop},i=0;return(function r(){const a={left:e.scrollLeft,top:e.scrollTop},o=t.left!==a.left,l=t.top!==a.top;(o||l)&&n(),t=a,i=window.requestAnimationFrame(r)})(),()=>window.cancelAnimationFrame(i)}function Vz(e){const{style:n,ref:t,...i}=e,r=ka(),a=Fz(),{onThumbPositionChange:o}=a,l=Bt(t,h=>a.onThumbChange(h)),f=A.useRef(void 0),c=oy(()=>{f.current&&(f.current(),f.current=void 0)},100);return A.useEffect(()=>{const{viewport:h}=r;if(h){const d=()=>{c(),f.current||(f.current=lZ(h,o),o())};return o(),h.addEventListener("scroll",d),()=>h.removeEventListener("scroll",d)}},[r.viewport,c,o]),y.jsx("div",{"data-state":a.hasThumb?"visible":"hidden",...i,ref:l,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...n},onPointerDownCapture:pu(e.onPointerDownCapture,h=>{const d=h.target.getBoundingClientRect(),p=h.clientX-d.left,v=h.clientY-d.top;a.onThumbPointerDown({x:p,y:v})}),onPointerUp:pu(e.onPointerUp,a.onThumbPointerUp)})}Vz.displayName="@mantine/core/ScrollAreaThumb";function pS(e){const{forceMount:n,...t}=e,i=Fz();return n||i.hasThumb?y.jsx(Vz,{...t}):null}pS.displayName="@mantine/core/ScrollAreaThumb";function Gz({children:e,style:n,ref:t,onWheel:i,...r}){const a=ka(),o=Bt(t,a.onViewportChange),l=f=>{if(i==null||i(f),a.scrollbarXEnabled&&a.viewport&&f.shiftKey){const{scrollTop:c,scrollHeight:h,clientHeight:d,scrollWidth:p,clientWidth:v}=a.viewport,b=c<1,w=c>=h-d-1;p>v&&(b||w)&&f.stopPropagation()}};return y.jsx(de,{...r,ref:o,onWheel:l,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...n},children:y.jsx("div",{...a.getStyles("content"),ref:a.onContentChange,children:e})})}Gz.displayName="@mantine/core/ScrollAreaViewport";var V6={root:"m_d57069b5",content:"m_b1336c6",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};function dy(){return typeof window<"u"}function Rc(e){return Yz(e)?(e.nodeName||"").toLowerCase():"#document"}function xr(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function wo(e){var n;return(n=(Yz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function Yz(e){return dy()?e instanceof Node||e instanceof xr(e).Node:!1}function Wt(e){return dy()?e instanceof Element||e instanceof xr(e).Element:!1}function _a(e){return dy()?e instanceof HTMLElement||e instanceof xr(e).HTMLElement:!1}function vS(e){return!dy()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof xr(e).ShadowRoot}function Um(e){const{overflow:n,overflowX:t,overflowY:i,display:r}=ga(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+t)&&r!=="inline"&&r!=="contents"}function uZ(e){return/^(table|td|th)$/.test(Rc(e))}function hy(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const fZ=/transform|translate|scale|rotate|perspective|filter/,cZ=/paint|layout|strict|content/,Ql=e=>!!e&&e!=="none";let fk;function G6(e){const n=Wt(e)?ga(e):e;return Ql(n.transform)||Ql(n.translate)||Ql(n.scale)||Ql(n.rotate)||Ql(n.perspective)||!my()&&(Ql(n.backdropFilter)||Ql(n.filter))||fZ.test(n.willChange||"")||cZ.test(n.contain||"")}function dZ(e){let n=ts(e);for(;_a(n)&&!Ko(n);){if(G6(n))return n;if(hy(n))return null;n=ts(n)}return null}function my(){return fk==null&&(fk=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),fk}function Ko(e){return/^(html|body|#document)$/.test(Rc(e))}function ga(e){return xr(e).getComputedStyle(e)}function py(e){return Wt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ts(e){if(Rc(e)==="html")return e;const n=e.assignedSlot||e.parentNode||vS(e)&&e.host||wo(e);return vS(n)?n.host:n}function Kz(e){const n=ts(e);return Ko(n)?e.ownerDocument?e.ownerDocument.body:e.body:_a(n)&&Um(n)?n:Kz(n)}function Xo(e,n,t){var i;n===void 0&&(n=[]),t===void 0&&(t=!0);const r=Kz(e),a=r===((i=e.ownerDocument)==null?void 0:i.body),o=xr(r);if(a){const l=gS(o);return n.concat(o,o.visualViewport||[],Um(r)?r:[],l&&t?Xo(l):[])}else return n.concat(r,Xo(r,[],t))}function gS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const hZ=["top","right","bottom","left"],Ha=Math.min,Xi=Math.max,Rg=Math.round,$v=Math.floor,so=e=>({x:e,y:e}),mZ={left:"right",right:"left",bottom:"top",top:"bottom"};function yS(e,n,t){return Xi(e,Ha(n,t))}function mo(e,n){return typeof e=="function"?e(n):e}function Ua(e){return e.split("-")[0]}function Pc(e){return e.split("-")[1]}function Y6(e){return e==="x"?"y":"x"}function K6(e){return e==="y"?"height":"width"}function Ia(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function X6(e){return Y6(Ia(e))}function pZ(e,n,t){t===void 0&&(t=!1);const i=Pc(e),r=X6(e),a=K6(r);let o=r==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[a]>n.floating[a]&&(o=Pg(o)),[o,Pg(o)]}function vZ(e){const n=Pg(e);return[bS(e),n,bS(n)]}function bS(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const N5=["left","right"],$5=["right","left"],gZ=["top","bottom"],yZ=["bottom","top"];function bZ(e,n,t){switch(e){case"top":case"bottom":return t?n?$5:N5:n?N5:$5;case"left":case"right":return n?gZ:yZ;default:return[]}}function wZ(e,n,t,i){const r=Pc(e);let a=bZ(Ua(e),t==="start",i);return r&&(a=a.map(o=>o+"-"+r),n&&(a=a.concat(a.map(bS)))),a}function Pg(e){const n=Ua(e);return mZ[n]+e.slice(n.length)}function kZ(e){return{top:0,right:0,bottom:0,left:0,...e}}function Z6(e){return typeof e!="number"?kZ(e):{top:e,right:e,bottom:e,left:e}}function Qf(e){const{x:n,y:t,width:i,height:r}=e;return{width:i,height:r,top:t,left:n,right:n+i,bottom:t+r,x:n,y:t}}function _Z(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function xZ(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(n=>{let{brand:t,version:i}=n;return t+"/"+i}).join(" "):navigator.userAgent}function SZ(){return/apple/i.test(navigator.vendor)}function CZ(){return _Z().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function AZ(){return xZ().includes("jsdom/")}const z5="data-floating-ui-focusable",jZ="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function L5(e){let n=e.activeElement;for(;((t=n)==null||(t=t.shadowRoot)==null?void 0:t.activeElement)!=null;){var t;n=n.shadowRoot.activeElement}return n}function Yh(e,n){if(!e||!n)return!1;const t=n.getRootNode==null?void 0:n.getRootNode();if(e.contains(n))return!0;if(t&&vS(t)){let i=n;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function $f(e){return"composedPath"in e?e.composedPath()[0]:e.target}function ck(e,n){if(n==null)return!1;if("composedPath"in e)return e.composedPath().includes(n);const t=e;return t.target!=null&&n.contains(t.target)}function OZ(e){return e.matches("html,body")}function lu(e){return(e==null?void 0:e.ownerDocument)||document}function EZ(e){return _a(e)&&e.matches(jZ)}function TZ(e){if(!e||AZ())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function MZ(e){return e?e.hasAttribute(z5)?e:e.querySelector("["+z5+"]")||e:null}function pg(e,n,t){return t===void 0&&(t=!0),e.filter(r=>{var a;return r.parentId===n&&(!t||((a=r.context)==null?void 0:a.open))}).flatMap(r=>[r,...pg(e,r.id,t)])}function DZ(e){return"nativeEvent"in e}function wS(e,n){const t=["mouse","pen"];return t.push("",void 0),t.includes(e)}var RZ=typeof document<"u",PZ=function(){},lo=RZ?A.useLayoutEffect:PZ;const NZ={...mz};function zv(e){const n=A.useRef(e);return lo(()=>{n.current=e}),n}const $Z=NZ.useInsertionEffect,zZ=$Z||(e=>e());function io(e){const n=A.useRef(()=>{});return zZ(()=>{n.current=e}),A.useCallback(function(){for(var t=arguments.length,i=new Array(t),r=0;r{const{placement:i="bottom",strategy:r="absolute",middleware:a=[],platform:o}=t,l=o.detectOverflow?o:{...o,detectOverflow:LZ},f=await(o.isRTL==null?void 0:o.isRTL(n));let c=await o.getElementRects({reference:e,floating:n,strategy:r}),{x:h,y:d}=I5(c,i,f),p=i,v=0;const b={};for(let w=0;w({name:"arrow",options:e,async fn(n){const{x:t,y:i,placement:r,rects:a,platform:o,elements:l,middlewareData:f}=n,{element:c,padding:h=0}=mo(e,n)||{};if(c==null)return{};const d=Z6(h),p={x:t,y:i},v=X6(r),b=K6(v),w=await o.getDimensions(c),k=v==="y",_=k?"top":"left",C=k?"bottom":"right",S=k?"clientHeight":"clientWidth",E=a.reference[b]+a.reference[v]-p[v]-a.floating[b],j=p[v]-a.reference[v],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let M=O?O[S]:0;(!M||!await(o.isElement==null?void 0:o.isElement(O)))&&(M=l.floating[S]||a.floating[b]);const $=E/2-j/2,q=M/2-w[b]/2-1,P=Ha(d[_],q),z=Ha(d[C],q),B=P,V=M-w[b]-z,U=M/2-w[b]/2+$,N=yS(B,U,V),D=!f.arrow&&Pc(r)!=null&&U!==N&&a.reference[b]/2-(UU<=0)){var z,B;const U=(((z=a.flip)==null?void 0:z.index)||0)+1,N=M[U];if(N&&(!(d==="alignment"?C!==Ia(N):!1)||P.every(H=>Ia(H.placement)===C?H.overflows[0]>0:!0)))return{data:{index:U,overflows:P},reset:{placement:N}};let D=(B=P.filter(L=>L.overflows[0]<=0).sort((L,H)=>L.overflows[1]-H.overflows[1])[0])==null?void 0:B.placement;if(!D)switch(v){case"bestFit":{var V;const L=(V=P.filter(H=>{if(O){const Y=Ia(H.placement);return Y===C||Y==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(Y=>Y>0).reduce((Y,R)=>Y+R,0)]).sort((H,Y)=>H[1]-Y[1])[0])==null?void 0:V[0];L&&(D=L);break}case"initialPlacement":D=l;break}if(r!==D)return{reset:{placement:D}}}return{}}}};function B5(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function F5(e){return hZ.some(n=>e[n]>=0)}const HZ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:t,platform:i}=n,{strategy:r="referenceHidden",...a}=mo(e,n);switch(r){case"referenceHidden":{const o=await i.detectOverflow(n,{...a,elementContext:"reference"}),l=B5(o,t.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:F5(l)}}}case"escaped":{const o=await i.detectOverflow(n,{...a,altBoundary:!0}),l=B5(o,t.floating);return{data:{escapedOffsets:l,escaped:F5(l)}}}default:return{}}}}};function Xz(e){const n=Ha(...e.map(a=>a.left)),t=Ha(...e.map(a=>a.top)),i=Xi(...e.map(a=>a.right)),r=Xi(...e.map(a=>a.bottom));return{x:n,y:t,width:i-n,height:r-t}}function UZ(e){const n=e.slice().sort((r,a)=>r.y-a.y),t=[];let i=null;for(let r=0;ri.height/2?t.push([a]):t[t.length-1].push(a),i=a}return t.map(r=>Qf(Xz(r)))}const WZ=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(n){const{placement:t,elements:i,rects:r,platform:a,strategy:o}=n,{padding:l=2,x:f,y:c}=mo(e,n),h=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(i.reference))||[]),d=UZ(h),p=Qf(Xz(h)),v=Z6(l);function b(){if(d.length===2&&d[0].left>d[1].right&&f!=null&&c!=null)return d.find(k=>f>k.left-v.left&&fk.top-v.top&&c=2){if(Ia(t)==="y"){const P=d[0],z=d[d.length-1],B=Ua(t)==="top",V=P.top,U=z.bottom,N=B?P.left:z.left,D=B?P.right:z.right,L=D-N,H=U-V;return{top:V,bottom:U,left:N,right:D,width:L,height:H,x:N,y:V}}const k=Ua(t)==="left",_=Xi(...d.map(P=>P.right)),C=Ha(...d.map(P=>P.left)),S=d.filter(P=>k?P.left===C:P.right===_),E=S[0].top,j=S[S.length-1].bottom,O=C,M=_,$=M-O,q=j-E;return{top:E,bottom:j,left:O,right:M,width:$,height:q,x:O,y:E}}return p}const w=await a.getElementRects({reference:{getBoundingClientRect:b},floating:i.floating,strategy:o});return r.reference.x!==w.reference.x||r.reference.y!==w.reference.y||r.reference.width!==w.reference.width||r.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}},Zz=new Set(["left","top"]);async function VZ(e,n){const{placement:t,platform:i,elements:r}=e,a=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=Ua(t),l=Pc(t),f=Ia(t)==="y",c=Zz.has(o)?-1:1,h=a&&f?-1:1,d=mo(n,e);let{mainAxis:p,crossAxis:v,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof b=="number"&&(v=l==="end"?b*-1:b),f?{x:v*h,y:p*c}:{x:p*c,y:v*h}}const GZ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var t,i;const{x:r,y:a,placement:o,middlewareData:l}=n,f=await VZ(n,e);return o===((t=l.offset)==null?void 0:t.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:r+f.x,y:a+f.y,data:{...f,placement:o}}}}},YZ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:t,y:i,placement:r,platform:a}=n,{mainAxis:o=!0,crossAxis:l=!1,limiter:f={fn:_=>{let{x:C,y:S}=_;return{x:C,y:S}}},...c}=mo(e,n),h={x:t,y:i},d=await a.detectOverflow(n,c),p=Ia(Ua(r)),v=Y6(p);let b=h[v],w=h[p];if(o){const _=v==="y"?"top":"left",C=v==="y"?"bottom":"right",S=b+d[_],E=b-d[C];b=yS(S,b,E)}if(l){const _=p==="y"?"top":"left",C=p==="y"?"bottom":"right",S=w+d[_],E=w-d[C];w=yS(S,w,E)}const k=f.fn({...n,[v]:b,[p]:w});return{...k,data:{x:k.x-t,y:k.y-i,enabled:{[v]:o,[p]:l}}}}}},KZ=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:t,y:i,placement:r,rects:a,middlewareData:o}=n,{offset:l=0,mainAxis:f=!0,crossAxis:c=!0}=mo(e,n),h={x:t,y:i},d=Ia(r),p=Y6(d);let v=h[p],b=h[d];const w=mo(l,n),k=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(f){const S=p==="y"?"height":"width",E=a.reference[p]-a.floating[S]+k.mainAxis,j=a.reference[p]+a.reference[S]-k.mainAxis;vj&&(v=j)}if(c){var _,C;const S=p==="y"?"width":"height",E=Zz.has(Ua(r)),j=a.reference[d]-a.floating[S]+(E&&((_=o.offset)==null?void 0:_[d])||0)+(E?0:k.crossAxis),O=a.reference[d]+a.reference[S]+(E?0:((C=o.offset)==null?void 0:C[d])||0)-(E?k.crossAxis:0);bO&&(b=O)}return{[p]:v,[d]:b}}}},XZ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var t,i;const{placement:r,rects:a,platform:o,elements:l}=n,{apply:f=()=>{},...c}=mo(e,n),h=await o.detectOverflow(n,c),d=Ua(r),p=Pc(r),v=Ia(r)==="y",{width:b,height:w}=a.floating;let k,_;d==="top"||d==="bottom"?(k=d,_=p===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(_=d,k=p==="end"?"top":"bottom");const C=w-h.top-h.bottom,S=b-h.left-h.right,E=Ha(w-h[k],C),j=Ha(b-h[_],S),O=!n.middlewareData.shift;let M=E,$=j;if((t=n.middlewareData.shift)!=null&&t.enabled.x&&($=S),(i=n.middlewareData.shift)!=null&&i.enabled.y&&(M=C),O&&!p){const P=Xi(h.left,0),z=Xi(h.right,0),B=Xi(h.top,0),V=Xi(h.bottom,0);v?$=b-2*(P!==0||z!==0?P+z:Xi(h.left,h.right)):M=w-2*(B!==0||V!==0?B+V:Xi(h.top,h.bottom))}await f({...n,availableWidth:$,availableHeight:M});const q=await o.getDimensions(l.floating);return b!==q.width||w!==q.height?{reset:{rects:!0}}:{}}}};function Qz(e){const n=ga(e);let t=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const r=_a(e),a=r?e.offsetWidth:t,o=r?e.offsetHeight:i,l=Rg(t)!==a||Rg(i)!==o;return l&&(t=a,i=o),{width:t,height:i,$:l}}function Q6(e){return Wt(e)?e:e.contextElement}function Hf(e){const n=Q6(e);if(!_a(n))return so(1);const t=n.getBoundingClientRect(),{width:i,height:r,$:a}=Qz(n);let o=(a?Rg(t.width):t.width)/i,l=(a?Rg(t.height):t.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const ZZ=so(0);function Jz(e){const n=xr(e);return!my()||!n.visualViewport?ZZ:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function QZ(e,n,t){return n===void 0&&(n=!1),!t||n&&t!==xr(e)?!1:n}function yu(e,n,t,i){n===void 0&&(n=!1),t===void 0&&(t=!1);const r=e.getBoundingClientRect(),a=Q6(e);let o=so(1);n&&(i?Wt(i)&&(o=Hf(i)):o=Hf(e));const l=QZ(a,t,i)?Jz(a):so(0);let f=(r.left+l.x)/o.x,c=(r.top+l.y)/o.y,h=r.width/o.x,d=r.height/o.y;if(a){const p=xr(a),v=i&&Wt(i)?xr(i):i;let b=p,w=gS(b);for(;w&&i&&v!==b;){const k=Hf(w),_=w.getBoundingClientRect(),C=ga(w),S=_.left+(w.clientLeft+parseFloat(C.paddingLeft))*k.x,E=_.top+(w.clientTop+parseFloat(C.paddingTop))*k.y;f*=k.x,c*=k.y,h*=k.x,d*=k.y,f+=S,c+=E,b=xr(w),w=gS(b)}}return Qf({width:h,height:d,x:f,y:c})}function vy(e,n){const t=py(e).scrollLeft;return n?n.left+t:yu(wo(e)).left+t}function eL(e,n){const t=e.getBoundingClientRect(),i=t.left+n.scrollLeft-vy(e,t),r=t.top+n.scrollTop;return{x:i,y:r}}function JZ(e){let{elements:n,rect:t,offsetParent:i,strategy:r}=e;const a=r==="fixed",o=wo(i),l=n?hy(n.floating):!1;if(i===o||l&&a)return t;let f={scrollLeft:0,scrollTop:0},c=so(1);const h=so(0),d=_a(i);if((d||!d&&!a)&&((Rc(i)!=="body"||Um(o))&&(f=py(i)),d)){const v=yu(i);c=Hf(i),h.x=v.x+i.clientLeft,h.y=v.y+i.clientTop}const p=o&&!d&&!a?eL(o,f):so(0);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-f.scrollLeft*c.x+h.x+p.x,y:t.y*c.y-f.scrollTop*c.y+h.y+p.y}}function eQ(e){return Array.from(e.getClientRects())}function nQ(e){const n=wo(e),t=py(e),i=e.ownerDocument.body,r=Xi(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),a=Xi(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let o=-t.scrollLeft+vy(e);const l=-t.scrollTop;return ga(i).direction==="rtl"&&(o+=Xi(n.clientWidth,i.clientWidth)-r),{width:r,height:a,x:o,y:l}}const q5=25;function tQ(e,n){const t=xr(e),i=wo(e),r=t.visualViewport;let a=i.clientWidth,o=i.clientHeight,l=0,f=0;if(r){a=r.width,o=r.height;const h=my();(!h||h&&n==="fixed")&&(l=r.offsetLeft,f=r.offsetTop)}const c=vy(i);if(c<=0){const h=i.ownerDocument,d=h.body,p=getComputedStyle(d),v=h.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,b=Math.abs(i.clientWidth-d.clientWidth-v);b<=q5&&(a-=b)}else c<=q5&&(a+=c);return{width:a,height:o,x:l,y:f}}function iQ(e,n){const t=yu(e,!0,n==="fixed"),i=t.top+e.clientTop,r=t.left+e.clientLeft,a=_a(e)?Hf(e):so(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,f=r*a.x,c=i*a.y;return{width:o,height:l,x:f,y:c}}function H5(e,n,t){let i;if(n==="viewport")i=tQ(e,t);else if(n==="document")i=nQ(wo(e));else if(Wt(n))i=iQ(n,t);else{const r=Jz(e);i={x:n.x-r.x,y:n.y-r.y,width:n.width,height:n.height}}return Qf(i)}function nL(e,n){const t=ts(e);return t===n||!Wt(t)||Ko(t)?!1:ga(t).position==="fixed"||nL(t,n)}function rQ(e,n){const t=n.get(e);if(t)return t;let i=Xo(e,[],!1).filter(l=>Wt(l)&&Rc(l)!=="body"),r=null;const a=ga(e).position==="fixed";let o=a?ts(e):e;for(;Wt(o)&&!Ko(o);){const l=ga(o),f=G6(o);!f&&l.position==="fixed"&&(r=null),(a?!f&&!r:!f&&l.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||Um(o)&&!f&&nL(e,o))?i=i.filter(h=>h!==o):r=l,o=ts(o)}return n.set(e,i),i}function aQ(e){let{element:n,boundary:t,rootBoundary:i,strategy:r}=e;const o=[...t==="clippingAncestors"?hy(n)?[]:rQ(n,this._c):[].concat(t),i],l=H5(n,o[0],r);let f=l.top,c=l.right,h=l.bottom,d=l.left;for(let p=1;p{o(!1,1e-7)},1e3)}M===1&&!iL(c,e.getBoundingClientRect())&&o(),E=!1}try{t=new IntersectionObserver(j,{...S,root:r.ownerDocument})}catch{t=new IntersectionObserver(j,S)}t.observe(e)}return o(!0),a}function kS(e,n,t,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,c=Q6(e),h=r||a?[...c?Xo(c):[],...n?Xo(n):[]]:[];h.forEach(_=>{r&&_.addEventListener("scroll",t,{passive:!0}),a&&_.addEventListener("resize",t)});const d=c&&l?cQ(c,t):null;let p=-1,v=null;o&&(v=new ResizeObserver(_=>{let[C]=_;C&&C.target===c&&v&&n&&(v.unobserve(n),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=v)==null||S.observe(n)})),t()}),c&&!f&&v.observe(c),n&&v.observe(n));let b,w=f?yu(e):null;f&&k();function k(){const _=yu(e);w&&!iL(w,_)&&t(),w=_,b=requestAnimationFrame(k)}return t(),()=>{var _;h.forEach(C=>{r&&C.removeEventListener("scroll",t),a&&C.removeEventListener("resize",t)}),d==null||d(),(_=v)==null||_.disconnect(),v=null,f&&cancelAnimationFrame(b)}}const dQ=GZ,hQ=YZ,mQ=qZ,pQ=XZ,vQ=HZ,W5=FZ,gQ=WZ,yQ=KZ,bQ=(e,n,t)=>{const i=new Map,r={platform:fQ,...t},a={...r.platform,_c:i};return BZ(e,n,{...r,platform:a})};var wQ=typeof document<"u",kQ=function(){},vg=wQ?A.useLayoutEffect:kQ;function Ng(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let t,i,r;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(t=e.length,t!==n.length)return!1;for(i=t;i--!==0;)if(!Ng(e[i],n[i]))return!1;return!0}if(r=Object.keys(e),t=r.length,t!==Object.keys(n).length)return!1;for(i=t;i--!==0;)if(!{}.hasOwnProperty.call(n,r[i]))return!1;for(i=t;i--!==0;){const a=r[i];if(!(a==="_owner"&&e.$$typeof)&&!Ng(e[a],n[a]))return!1}return!0}return e!==e&&n!==n}function rL(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function V5(e,n){const t=rL(e);return Math.round(n*t)/t}function hk(e){const n=A.useRef(e);return vg(()=>{n.current=e}),n}function _Q(e){e===void 0&&(e={});const{placement:n="bottom",strategy:t="absolute",middleware:i=[],platform:r,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:f,open:c}=e,[h,d]=A.useState({x:0,y:0,strategy:t,placement:n,middlewareData:{},isPositioned:!1}),[p,v]=A.useState(i);Ng(p,i)||v(i);const[b,w]=A.useState(null),[k,_]=A.useState(null),C=A.useCallback(H=>{H!==O.current&&(O.current=H,w(H))},[]),S=A.useCallback(H=>{H!==M.current&&(M.current=H,_(H))},[]),E=a||b,j=o||k,O=A.useRef(null),M=A.useRef(null),$=A.useRef(h),q=f!=null,P=hk(f),z=hk(r),B=hk(c),V=A.useCallback(()=>{if(!O.current||!M.current)return;const H={placement:n,strategy:t,middleware:p};z.current&&(H.platform=z.current),bQ(O.current,M.current,H).then(Y=>{const R={...Y,isPositioned:B.current!==!1};U.current&&!Ng($.current,R)&&($.current=R,Qs.flushSync(()=>{d(R)}))})},[p,n,t,z,B]);vg(()=>{c===!1&&$.current.isPositioned&&($.current.isPositioned=!1,d(H=>({...H,isPositioned:!1})))},[c]);const U=A.useRef(!1);vg(()=>(U.current=!0,()=>{U.current=!1}),[]),vg(()=>{if(E&&(O.current=E),j&&(M.current=j),E&&j){if(P.current)return P.current(E,j,V);V()}},[E,j,V,P,q]);const N=A.useMemo(()=>({reference:O,floating:M,setReference:C,setFloating:S}),[C,S]),D=A.useMemo(()=>({reference:E,floating:j}),[E,j]),L=A.useMemo(()=>{const H={position:t,left:0,top:0};if(!D.floating)return H;const Y=V5(D.floating,h.x),R=V5(D.floating,h.y);return l?{...H,transform:"translate("+Y+"px, "+R+"px)",...rL(D.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:Y,top:R}},[t,l,D.floating,h.x,h.y]);return A.useMemo(()=>({...h,update:V,refs:N,elements:D,floatingStyles:L}),[h,V,N,D,L])}const xQ=e=>{function n(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:e,fn(t){const{element:i,padding:r}=typeof e=="function"?e(t):e;return i&&n(i)?i.current!=null?W5({element:i.current,padding:r}).fn(t):{}:i?W5({element:i,padding:r}).fn(t):{}}}},aL=(e,n)=>{const t=dQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},J6=(e,n)=>{const t=hQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},G5=(e,n)=>({fn:yQ(e).fn,options:[e,n]}),$g=(e,n)=>{const t=mQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},SQ=(e,n)=>{const t=pQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},CQ=(e,n)=>{const t=vQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},Th=(e,n)=>{const t=gQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},oL=(e,n)=>{const t=xQ(e);return{name:t.name,fn:t.fn,options:[e,n]}};function sL(e){const n=A.useRef(void 0),t=A.useCallback(i=>{const r=e.map(a=>{if(a!=null){if(typeof a=="function"){const o=a,l=o(i);return typeof l=="function"?l:()=>{o(null)}}return a.current=i,()=>{a.current=null}}});return()=>{r.forEach(a=>a==null?void 0:a())}},e);return A.useMemo(()=>e.every(i=>i==null)?null:i=>{n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=t(i))},e)}const AQ="data-floating-ui-focusable",Y5="active",K5="selected",jQ={...mz};let X5=!1,OQ=0;const Z5=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+OQ++;function EQ(){const[e,n]=A.useState(()=>X5?Z5():void 0);return lo(()=>{e==null&&n(Z5())},[]),A.useEffect(()=>{X5=!0},[]),e}const TQ=jQ.useId,lL=TQ||EQ;function MQ(){const e=new Map;return{emit(n,t){var i;(i=e.get(n))==null||i.forEach(r=>r(t))},on(n,t){e.has(n)||e.set(n,new Set),e.get(n).add(t)},off(n,t){var i;(i=e.get(n))==null||i.delete(t)}}}const DQ=A.createContext(null),RQ=A.createContext(null),eC=()=>{var e;return((e=A.useContext(DQ))==null?void 0:e.id)||null},nC=()=>A.useContext(RQ);function tC(e){return"data-floating-ui-"+e}function la(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const Q5=tC("safe-polygon");function gg(e,n,t){if(t&&!wS(t))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const i=e();return typeof i=="number"?i:i==null?void 0:i[n]}return e==null?void 0:e[n]}function mk(e){return typeof e=="function"?e():e}function PQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,dataRef:r,events:a,elements:o}=e,{enabled:l=!0,delay:f=0,handleClose:c=null,mouseOnly:h=!1,restMs:d=0,move:p=!0}=n,v=nC(),b=eC(),w=zv(c),k=zv(f),_=zv(t),C=zv(d),S=A.useRef(),E=A.useRef(-1),j=A.useRef(),O=A.useRef(-1),M=A.useRef(!0),$=A.useRef(!1),q=A.useRef(()=>{}),P=A.useRef(!1),z=io(()=>{var L;const H=(L=r.current.openEvent)==null?void 0:L.type;return(H==null?void 0:H.includes("mouse"))&&H!=="mousedown"});A.useEffect(()=>{if(!l)return;function L(H){let{open:Y}=H;Y||(la(E),la(O),M.current=!0,P.current=!1)}return a.on("openchange",L),()=>{a.off("openchange",L)}},[l,a]),A.useEffect(()=>{if(!l||!w.current||!t)return;function L(Y){z()&&i(!1,Y,"hover")}const H=lu(o.floating).documentElement;return H.addEventListener("mouseleave",L),()=>{H.removeEventListener("mouseleave",L)}},[o.floating,t,i,l,w,z]);const B=A.useCallback(function(L,H,Y){H===void 0&&(H=!0),Y===void 0&&(Y="hover");const R=gg(k.current,"close",S.current);R&&!j.current?(la(E),E.current=window.setTimeout(()=>i(!1,L,Y),R)):H&&(la(E),i(!1,L,Y))},[k,i]),V=io(()=>{q.current(),j.current=void 0}),U=io(()=>{if($.current){const L=lu(o.floating).body;L.style.pointerEvents="",L.removeAttribute(Q5),$.current=!1}}),N=io(()=>r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1);A.useEffect(()=>{if(!l)return;function L(W){if(la(E),M.current=!1,h&&!wS(S.current)||mk(C.current)>0&&!gg(k.current,"open"))return;const I=gg(k.current,"open",S.current);I?E.current=window.setTimeout(()=>{_.current||i(!0,W,"hover")},I):t||i(!0,W,"hover")}function H(W){if(N()){U();return}q.current();const I=lu(o.floating);if(la(O),P.current=!1,w.current&&r.current.floatingContext){t||la(E),j.current=w.current({...r.current.floatingContext,tree:v,x:W.clientX,y:W.clientY,onClose(){U(),V(),N()||B(W,!0,"safe-polygon")}});const ee=j.current;I.addEventListener("mousemove",ee),q.current=()=>{I.removeEventListener("mousemove",ee)};return}(S.current==="touch"?!Yh(o.floating,W.relatedTarget):!0)&&B(W)}function Y(W){N()||r.current.floatingContext&&(w.current==null||w.current({...r.current.floatingContext,tree:v,x:W.clientX,y:W.clientY,onClose(){U(),V(),N()||B(W)}})(W))}function R(){la(E)}function G(W){N()||B(W,!1)}if(Wt(o.domReference)){const W=o.domReference,I=o.floating;return t&&W.addEventListener("mouseleave",Y),p&&W.addEventListener("mousemove",L,{once:!0}),W.addEventListener("mouseenter",L),W.addEventListener("mouseleave",H),I&&(I.addEventListener("mouseleave",Y),I.addEventListener("mouseenter",R),I.addEventListener("mouseleave",G)),()=>{t&&W.removeEventListener("mouseleave",Y),p&&W.removeEventListener("mousemove",L),W.removeEventListener("mouseenter",L),W.removeEventListener("mouseleave",H),I&&(I.removeEventListener("mouseleave",Y),I.removeEventListener("mouseenter",R),I.removeEventListener("mouseleave",G))}}},[o,l,e,h,p,B,V,U,i,t,_,v,k,w,r,N,C]),lo(()=>{var L;if(l&&t&&(L=w.current)!=null&&(L=L.__options)!=null&&L.blockPointerEvents&&z()){$.current=!0;const Y=o.floating;if(Wt(o.domReference)&&Y){var H;const R=lu(o.floating).body;R.setAttribute(Q5,"");const G=o.domReference,W=v==null||(H=v.nodesRef.current.find(I=>I.id===b))==null||(H=H.context)==null?void 0:H.elements.floating;return W&&(W.style.pointerEvents=""),R.style.pointerEvents="none",G.style.pointerEvents="auto",Y.style.pointerEvents="auto",()=>{R.style.pointerEvents="",G.style.pointerEvents="",Y.style.pointerEvents=""}}}},[l,t,b,o,v,w,z]),lo(()=>{t||(S.current=void 0,P.current=!1,V(),U())},[t,V,U]),A.useEffect(()=>()=>{V(),la(E),la(O),U()},[l,o.domReference,V,U]);const D=A.useMemo(()=>{function L(H){S.current=H.pointerType}return{onPointerDown:L,onPointerEnter:L,onMouseMove(H){const{nativeEvent:Y}=H;function R(){!M.current&&!_.current&&i(!0,Y,"hover")}h&&!wS(S.current)||t||mk(C.current)===0||P.current&&H.movementX**2+H.movementY**2<2||(la(O),S.current==="touch"?R():(P.current=!0,O.current=window.setTimeout(R,mk(C.current))))}}},[h,i,t,_,C]);return A.useMemo(()=>l?{reference:D}:{},[l,D])}const _S=()=>{},uL=A.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:_S,setState:_S,isInstantPhase:!1}),NQ=()=>A.useContext(uL);function $Q(e){const{children:n,delay:t,timeoutMs:i=0}=e,[r,a]=A.useReducer((f,c)=>({...f,...c}),{delay:t,timeoutMs:i,initialDelay:t,currentId:null,isInstantPhase:!1}),o=A.useRef(null),l=A.useCallback(f=>{a({currentId:f})},[]);return lo(()=>{r.currentId?o.current===null?o.current=r.currentId:r.isInstantPhase||a({isInstantPhase:!0}):(r.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[r.currentId,r.isInstantPhase]),y.jsx(uL.Provider,{value:A.useMemo(()=>({...r,setState:a,setCurrentId:l}),[r,l]),children:n})}function zQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,floatingId:r}=e,{id:a,enabled:o=!0}=n,l=a??r,f=NQ(),{currentId:c,setCurrentId:h,initialDelay:d,setState:p,timeoutMs:v}=f;return lo(()=>{o&&c&&(p({delay:{open:1,close:gg(d,"close")}}),c!==l&&i(!1))},[o,l,i,p,c,d]),lo(()=>{function b(){i(!1),p({delay:d,currentId:null})}if(o&&c&&!t&&c===l){if(v){const w=window.setTimeout(b,v);return()=>{clearTimeout(w)}}b()}},[o,t,p,c,l,i,d,v]),lo(()=>{o&&(h===_S||!t||h(l))},[o,t,h,l]),f}const LQ={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},IQ={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},J5=e=>{var n,t;return{escapeKey:typeof e=="boolean"?e:(n=e==null?void 0:e.escapeKey)!=null?n:!1,outsidePress:typeof e=="boolean"?e:(t=e==null?void 0:e.outsidePress)!=null?t:!0}};function BQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,elements:r,dataRef:a}=e,{enabled:o=!0,escapeKey:l=!0,outsidePress:f=!0,outsidePressEvent:c="pointerdown",referencePress:h=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:v,capture:b}=n,w=nC(),k=io(typeof f=="function"?f:()=>!1),_=typeof f=="function"?k:f,C=A.useRef(!1),{escapeKey:S,outsidePress:E}=J5(v),{escapeKey:j,outsidePress:O}=J5(b),M=A.useRef(!1),$=io(U=>{var N;if(!t||!o||!l||U.key!=="Escape"||M.current)return;const D=(N=a.current.floatingContext)==null?void 0:N.nodeId,L=w?pg(w.nodesRef.current,D):[];if(!S&&(U.stopPropagation(),L.length>0)){let H=!0;if(L.forEach(Y=>{var R;if((R=Y.context)!=null&&R.open&&!Y.context.dataRef.current.__escapeKeyBubbles){H=!1;return}}),!H)return}i(!1,DZ(U)?U.nativeEvent:U,"escape-key")}),q=io(U=>{var N;const D=()=>{var L;$(U),(L=$f(U))==null||L.removeEventListener("keydown",D)};(N=$f(U))==null||N.addEventListener("keydown",D)}),P=io(U=>{var N;const D=a.current.insideReactTree;a.current.insideReactTree=!1;const L=C.current;if(C.current=!1,c==="click"&&L||D||typeof _=="function"&&!_(U))return;const H=$f(U),Y="["+tC("inert")+"]",R=lu(r.floating).querySelectorAll(Y);let G=Wt(H)?H:null;for(;G&&!Ko(G);){const ee=ts(G);if(Ko(ee)||!Wt(ee))break;G=ee}if(R.length&&Wt(H)&&!OZ(H)&&!Yh(H,r.floating)&&Array.from(R).every(ee=>!Yh(G,ee)))return;if(_a(H)&&V){const ee=Ko(H),re=ga(H),se=/auto|scroll/,ye=ee||se.test(re.overflowX),ae=ee||se.test(re.overflowY),le=ye&&H.clientWidth>0&&H.scrollWidth>H.clientWidth,_e=ae&&H.clientHeight>0&&H.scrollHeight>H.clientHeight,ne=re.direction==="rtl",ze=_e&&(ne?U.offsetX<=H.offsetWidth-H.clientWidth:U.offsetX>H.clientWidth),we=le&&U.offsetY>H.clientHeight;if(ze||we)return}const W=(N=a.current.floatingContext)==null?void 0:N.nodeId,I=w&&pg(w.nodesRef.current,W).some(ee=>{var re;return ck(U,(re=ee.context)==null?void 0:re.elements.floating)});if(ck(U,r.floating)||ck(U,r.domReference)||I)return;const X=w?pg(w.nodesRef.current,W):[];if(X.length>0){let ee=!0;if(X.forEach(re=>{var se;if((se=re.context)!=null&&se.open&&!re.context.dataRef.current.__outsidePressBubbles){ee=!1;return}}),!ee)return}i(!1,U,"outside-press")}),z=io(U=>{var N;const D=()=>{var L;P(U),(L=$f(U))==null||L.removeEventListener(c,D)};(N=$f(U))==null||N.addEventListener(c,D)});A.useEffect(()=>{if(!t||!o)return;a.current.__escapeKeyBubbles=S,a.current.__outsidePressBubbles=E;let U=-1;function N(R){i(!1,R,"ancestor-scroll")}function D(){window.clearTimeout(U),M.current=!0}function L(){U=window.setTimeout(()=>{M.current=!1},my()?5:0)}const H=lu(r.floating);l&&(H.addEventListener("keydown",j?q:$,j),H.addEventListener("compositionstart",D),H.addEventListener("compositionend",L)),_&&H.addEventListener(c,O?z:P,O);let Y=[];return p&&(Wt(r.domReference)&&(Y=Xo(r.domReference)),Wt(r.floating)&&(Y=Y.concat(Xo(r.floating))),!Wt(r.reference)&&r.reference&&r.reference.contextElement&&(Y=Y.concat(Xo(r.reference.contextElement)))),Y=Y.filter(R=>{var G;return R!==((G=H.defaultView)==null?void 0:G.visualViewport)}),Y.forEach(R=>{R.addEventListener("scroll",N,{passive:!0})}),()=>{l&&(H.removeEventListener("keydown",j?q:$,j),H.removeEventListener("compositionstart",D),H.removeEventListener("compositionend",L)),_&&H.removeEventListener(c,O?z:P,O),Y.forEach(R=>{R.removeEventListener("scroll",N)}),window.clearTimeout(U)}},[a,r,l,_,c,t,i,p,o,S,E,$,j,q,P,O,z]),A.useEffect(()=>{a.current.insideReactTree=!1},[a,_,c]);const B=A.useMemo(()=>({onKeyDown:$,...h&&{[LQ[d]]:U=>{i(!1,U.nativeEvent,"reference-press")},...d!=="click"&&{onClick(U){i(!1,U.nativeEvent,"reference-press")}}}}),[$,i,h,d]),V=A.useMemo(()=>{function U(N){N.button===0&&(C.current=!0)}return{onKeyDown:$,onMouseDown:U,onMouseUp:U,[IQ[c]]:()=>{a.current.insideReactTree=!0}}},[$,c,a]);return A.useMemo(()=>o?{reference:B,floating:V}:{},[o,B,V])}function FQ(e){const{open:n=!1,onOpenChange:t,elements:i}=e,r=lL(),a=A.useRef({}),[o]=A.useState(()=>MQ()),l=eC()!=null,[f,c]=A.useState(i.reference),h=io((v,b,w)=>{a.current.openEvent=v?b:void 0,o.emit("openchange",{open:v,event:b,reason:w,nested:l}),t==null||t(v,b,w)}),d=A.useMemo(()=>({setPositionReference:c}),[]),p=A.useMemo(()=>({reference:f||i.reference||null,floating:i.floating||null,domReference:i.reference}),[f,i.reference,i.floating]);return A.useMemo(()=>({dataRef:a,open:n,onOpenChange:h,elements:p,events:o,floatingId:r,refs:d}),[n,h,p,o,r,d])}function iC(e){e===void 0&&(e={});const{nodeId:n}=e,t=FQ({...e,elements:{reference:null,floating:null,...e.elements}}),i=e.rootContext||t,r=i.elements,[a,o]=A.useState(null),[l,f]=A.useState(null),h=(r==null?void 0:r.domReference)||a,d=A.useRef(null),p=nC();lo(()=>{h&&(d.current=h)},[h]);const v=_Q({...e,elements:{...r,...l&&{reference:l}}}),b=A.useCallback(S=>{const E=Wt(S)?{getBoundingClientRect:()=>S.getBoundingClientRect(),getClientRects:()=>S.getClientRects(),contextElement:S}:S;f(E),v.refs.setReference(E)},[v.refs]),w=A.useCallback(S=>{(Wt(S)||S===null)&&(d.current=S,o(S)),(Wt(v.refs.reference.current)||v.refs.reference.current===null||S!==null&&!Wt(S))&&v.refs.setReference(S)},[v.refs]),k=A.useMemo(()=>({...v.refs,setReference:w,setPositionReference:b,domReference:d}),[v.refs,w,b]),_=A.useMemo(()=>({...v.elements,domReference:h}),[v.elements,h]),C=A.useMemo(()=>({...v,...i,refs:k,elements:_,nodeId:n}),[v,k,_,n,i]);return lo(()=>{i.dataRef.current.floatingContext=C;const S=p==null?void 0:p.nodesRef.current.find(E=>E.id===n);S&&(S.context=C)}),A.useMemo(()=>({...v,context:C,refs:k,elements:_}),[v,k,_,C])}function pk(){return CZ()&&SZ()}function qQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,events:r,dataRef:a,elements:o}=e,{enabled:l=!0,visibleOnly:f=!0}=n,c=A.useRef(!1),h=A.useRef(-1),d=A.useRef(!0);A.useEffect(()=>{if(!l)return;const v=xr(o.domReference);function b(){!t&&_a(o.domReference)&&o.domReference===L5(lu(o.domReference))&&(c.current=!0)}function w(){d.current=!0}function k(){d.current=!1}return v.addEventListener("blur",b),pk()&&(v.addEventListener("keydown",w,!0),v.addEventListener("pointerdown",k,!0)),()=>{v.removeEventListener("blur",b),pk()&&(v.removeEventListener("keydown",w,!0),v.removeEventListener("pointerdown",k,!0))}},[o.domReference,t,l]),A.useEffect(()=>{if(!l)return;function v(b){let{reason:w}=b;(w==="reference-press"||w==="escape-key")&&(c.current=!0)}return r.on("openchange",v),()=>{r.off("openchange",v)}},[r,l]),A.useEffect(()=>()=>{la(h)},[]);const p=A.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(v){if(c.current)return;const b=$f(v.nativeEvent);if(f&&Wt(b)){if(pk()&&!v.relatedTarget){if(!d.current&&!EZ(b))return}else if(!TZ(b))return}i(!0,v.nativeEvent,"focus")},onBlur(v){c.current=!1;const b=v.relatedTarget,w=v.nativeEvent,k=Wt(b)&&b.hasAttribute(tC("focus-guard"))&&b.getAttribute("data-type")==="outside";h.current=window.setTimeout(()=>{var _;const C=L5(o.domReference?o.domReference.ownerDocument:document);!b&&C===o.domReference||Yh((_=a.current.floatingContext)==null?void 0:_.refs.floating.current,C)||Yh(o.domReference,C)||k||i(!1,w,"focus")})}}),[a,o.domReference,i,f]);return A.useMemo(()=>l?{reference:p}:{},[l,p])}function vk(e,n,t){const i=new Map,r=t==="item";let a=e;if(r&&e){const{[Y5]:o,[K5]:l,...f}=e;a=f}return{...t==="floating"&&{tabIndex:-1,[AQ]:""},...a,...n.map(o=>{const l=o?o[t]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((o,l)=>(l&&Object.entries(l).forEach(f=>{let[c,h]=f;if(!(r&&[Y5,K5].includes(c)))if(c.indexOf("on")===0){if(i.has(c)||i.set(c,[]),typeof h=="function"){var d;(d=i.get(c))==null||d.push(h),o[c]=function(){for(var p,v=arguments.length,b=new Array(v),w=0;wk(...b)).find(k=>k!==void 0)}}}else o[c]=h}),o),{})}}function HQ(e){e===void 0&&(e=[]);const n=e.map(l=>l==null?void 0:l.reference),t=e.map(l=>l==null?void 0:l.floating),i=e.map(l=>l==null?void 0:l.item),r=A.useCallback(l=>vk(l,e,"reference"),n),a=A.useCallback(l=>vk(l,e,"floating"),t),o=A.useCallback(l=>vk(l,e,"item"),i);return A.useMemo(()=>({getReferenceProps:r,getFloatingProps:a,getItemProps:o}),[r,a,o])}const UQ=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function WQ(e,n){var t,i;n===void 0&&(n={});const{open:r,elements:a,floatingId:o}=e,{enabled:l=!0,role:f="dialog"}=n,c=lL(),h=((t=a.domReference)==null?void 0:t.id)||c,d=A.useMemo(()=>{var C;return((C=MZ(a.floating))==null?void 0:C.id)||o},[a.floating,o]),p=(i=UQ.get(f))!=null?i:f,b=eC()!=null,w=A.useMemo(()=>p==="tooltip"||f==="label"?{["aria-"+(f==="label"?"labelledby":"describedby")]:r?d:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":p==="alertdialog"?"dialog":p,"aria-controls":r?d:void 0,...p==="listbox"&&{role:"combobox"},...p==="menu"&&{id:h},...p==="menu"&&b&&{role:"menuitem"},...f==="select"&&{"aria-autocomplete":"none"},...f==="combobox"&&{"aria-autocomplete":"list"}},[p,d,b,r,h,f]),k=A.useMemo(()=>{const C={id:d,...p&&{role:p}};return p==="tooltip"||f==="label"?C:{...C,...p==="menu"&&{"aria-labelledby":h}}},[p,d,h,f]),_=A.useCallback(C=>{let{active:S,selected:E}=C;const j={role:"option",...S&&{id:d+"-fui-option"}};switch(f){case"select":case"combobox":return{...j,"aria-selected":E}}return{}},[d,f]);return A.useMemo(()=>l?{reference:w,floating:k,item:_}:{},[l,w,k,_])}const fL={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},cL=(e,{scrollbarSize:n,overscrollBehavior:t,scrollbars:i})=>{let r=t;return t&&i&&(i==="x"?r=`${t} auto`:i==="y"&&(r=`auto ${t}`)),{root:{"--scrollarea-scrollbar-size":pe(n),"--scrollarea-over-scroll-behavior":r}}},xa=Re(e=>{const n=be("ScrollArea",fL,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,scrollbarSize:l,vars:f,type:c,scrollHideDelay:h,viewportProps:d,viewportRef:p,onScrollPositionChange:v,children:b,offsetScrollbars:w,scrollbars:k,onBottomReached:_,onTopReached:C,onLeftReached:S,onRightReached:E,overscrollBehavior:j,startScrollPosition:O,attributes:M,...$}=n,[q,P]=A.useState(!1),[z,B]=A.useState(!1),[V,U]=A.useState(!1),N=A.useRef(!0),D=A.useRef(!1),L=A.useRef(!0),H=A.useRef(!1),Y=Xe({name:"ScrollArea",props:n,classes:V6,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:M,vars:f,varsResolver:cL}),R=A.useRef(null),[G,W]=A.useState(null),I=sL([p,R,A.useCallback(X=>{W(ee=>ee===X?ee:X)},[])]);return ll(w==="present"?G:null,()=>{const X=R.current;X&&(B(X.scrollHeight>X.clientHeight),U(X.scrollWidth>X.clientWidth))}),us(()=>{O&&R.current&&R.current.scrollTo({left:O.x??0,top:O.y??0})},[]),y.jsxs(zz,{getStyles:Y,type:c==="never"?"always":c,scrollHideDelay:h,scrollbars:k,...Y("root"),...$,children:[y.jsx(Gz,{...d,...Y("viewport",{style:d==null?void 0:d.style}),ref:I,"data-offset-scrollbars":w===!0?"xy":w||void 0,"data-scrollbars":k||void 0,"data-horizontal-hidden":w==="present"&&!V?"true":void 0,"data-vertical-hidden":w==="present"&&!z?"true":void 0,onScroll:X=>{var Ce;(Ce=d==null?void 0:d.onScroll)==null||Ce.call(d,X),v==null||v({x:X.currentTarget.scrollLeft,y:X.currentTarget.scrollTop});const{scrollTop:ee,scrollHeight:re,clientHeight:se,scrollLeft:ye,scrollWidth:ae,clientWidth:le}=X.currentTarget,_e=ee-(re-se)>=-.8,ne=ee===0;_e&&!D.current&&(_==null||_()),ne&&!N.current&&(C==null||C()),D.current=_e,N.current=ne;const ze=ye-(ae-le)>=-.8,we=ye===0;ze&&!H.current&&(E==null||E()),we&&!L.current&&(S==null||S()),H.current=ze,L.current=we},children:b}),(k==="xy"||k==="x")&&y.jsx(mS,{...Y("scrollbar"),orientation:"horizontal","data-hidden":c==="never"||w==="present"&&!V?!0:void 0,forceMount:!0,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:y.jsx(pS,{...Y("thumb")})}),(k==="xy"||k==="y")&&y.jsx(mS,{...Y("scrollbar"),orientation:"vertical","data-hidden":c==="never"||w==="present"&&!z?!0:void 0,forceMount:!0,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:y.jsx(pS,{...Y("thumb")})}),y.jsx(tZ,{...Y("corner"),"data-hovered":q||void 0,"data-hidden":c==="never"||void 0})]})});xa.displayName="@mantine/core/ScrollArea";const rC=Re(e=>{const{children:n,classNames:t,styles:i,scrollbarSize:r,scrollHideDelay:a,type:o,dir:l,offsetScrollbars:f,overscrollBehavior:c,viewportRef:h,onScrollPositionChange:d,unstyled:p,variant:v,viewportProps:b,scrollbars:w,style:k,vars:_,onBottomReached:C,onTopReached:S,startScrollPosition:E,onOverflowChange:j,...O}=be("ScrollAreaAutosize",fL,e),M=A.useRef(null),[$,q]=A.useState(null),P=sL([h,M,A.useCallback(U=>{q(N=>N===U?N:U)},[])]),z=A.useRef(!1),B=A.useRef(!1),V=A.useEffectEvent(()=>{const U=M.current;if(!U||!j)return;const N=U.scrollHeight>U.clientHeight;N!==z.current&&(B.current?j(N):(B.current=!0,N&&j(!0)),z.current=N)});return ll(j?$:null,V),y.jsx(de,{...O,variant:v,style:[{display:"flex",overflow:"hidden"},k],children:y.jsx(de,{style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",...w==="y"&&{minWidth:0},...w==="x"&&{minHeight:0},...w==="xy"&&{minWidth:0,minHeight:0},...w===!1&&{minWidth:0,minHeight:0}},children:y.jsx(xa,{classNames:t,styles:i,scrollHideDelay:a,scrollbarSize:r,type:o,dir:l,offsetScrollbars:f,overscrollBehavior:c,viewportRef:P,onScrollPositionChange:d,unstyled:p,variant:v,viewportProps:b,vars:_,scrollbars:w,onBottomReached:C,onTopReached:S,startScrollPosition:E,"data-autosize":"true",children:n})})})});xa.classes=V6;xa.varsResolver=cL;rC.displayName="@mantine/core/ScrollAreaAutosize";rC.classes=V6;xa.Autosize=rC;var dL={root:"m_87cf2631"};const VQ={__staticSelector:"UnstyledButton"},Dt=yi(e=>{const n=be("UnstyledButton",VQ,e),{className:t,component:i="button",__staticSelector:r,unstyled:a,classNames:o,styles:l,style:f,attributes:c,...h}=n;return y.jsx(de,{...Xe({name:r,props:n,classes:dL,className:t,style:f,classNames:o,styles:l,unstyled:a,attributes:c})("root",{focusable:!0}),component:i,type:i==="button"?"button":void 0,...h})});Dt.classes=dL;Dt.displayName="@mantine/core/UnstyledButton";var hL={root:"m_515a97f8"};const aC=Re(e=>{const n=be("VisuallyHidden",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:f,...c}=n;return y.jsx(de,{component:"span",...Xe({name:"VisuallyHidden",classes:hL,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f})("root"),...c})});aC.classes=hL;aC.displayName="@mantine/core/VisuallyHidden";var mL={root:"m_1b7284a3"};const pL=(e,{radius:n,shadow:t})=>({root:{"--paper-radius":n===void 0?void 0:Yt(n),"--paper-shadow":$6(t)}}),Et=yi(e=>{const n=be("Paper",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,withBorder:l,vars:f,radius:c,shadow:h,variant:d,mod:p,attributes:v,...b}=n,w=Xe({name:"Paper",props:n,classes:mL,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:f,varsResolver:pL});return y.jsx(de,{mod:[{"data-with-border":l},p],...w("root"),variant:d,...b})});Et.classes=mL;Et.varsResolver=pL;Et.displayName="@mantine/core/Paper";function eT(e,n,t,i){return e==="center"||i==="center"?{top:n}:e==="end"?{bottom:t}:e==="start"?{top:t}:{}}function nT(e,n,t,i,r){return e==="center"||i==="center"?{left:n}:e==="end"?{[r==="ltr"?"right":"left"]:t}:e==="start"?{[r==="ltr"?"left":"right"]:t}:{}}const GQ={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function YQ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,arrowX:a,arrowY:o,dir:l}){const[f,c="center"]=e.split("-"),h={width:n,height:n,transform:"rotate(45deg)",position:"absolute",[GQ[f]]:i},d=-n/2;return f==="left"?{...h,...eT(c,o,t,r),right:d,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:f==="right"?{...h,...eT(c,o,t,r),left:d,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:f==="top"?{...h,...nT(c,a,t,r,l),bottom:d,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:f==="bottom"?{...h,...nT(c,a,t,r,l),top:d,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}function zg({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,visible:a,arrowX:o,arrowY:l,style:f,...c}){const{dir:h}=Ru();return a?y.jsx("div",{...c,style:{...f,...YQ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,dir:h,arrowX:o,arrowY:l})}}):null}zg.displayName="@mantine/core/FloatingArrow";function vL(e,n){if(e==="rtl"&&(n.includes("right")||n.includes("left"))){const[t,i]=n.split("-"),r=t==="right"?"left":"right";return i===void 0?r:`${r}-${i}`}return n}function gL({open:e,close:n,openDelay:t,closeDelay:i}){const r=A.useRef(-1),a=A.useRef(-1),o=()=>{window.clearTimeout(r.current),window.clearTimeout(a.current)},l=()=>{o(),t===0||t===void 0?e():r.current=window.setTimeout(e,t)},f=()=>{o(),i===0||i===void 0?n():a.current=window.setTimeout(n,i)};return A.useEffect(()=>o,[]),{openDropdown:l,closeDropdown:f}}var yL={root:"m_9814e45f"};const KQ={zIndex:wa("modal")},bL=(e,{gradient:n,color:t,backgroundOpacity:i,blur:r,radius:a,zIndex:o})=>({root:{"--overlay-bg":n||(t!==void 0||i!==void 0)&&Vs(t||"#000",i??.6)||void 0,"--overlay-filter":r?`blur(${pe(r)})`:void 0,"--overlay-radius":a===void 0?void 0:Yt(a),"--overlay-z-index":o==null?void 0:o.toString()}}),Wm=yi(e=>{const n=be("Overlay",KQ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,fixed:f,center:c,children:h,radius:d,zIndex:p,gradient:v,blur:b,color:w,backgroundOpacity:k,mod:_,attributes:C,...S}=n;return y.jsx(de,{...Xe({name:"Overlay",props:n,classes:yL,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:bL})("root"),mod:[{center:c,fixed:f},_],...S,children:h})});Wm.classes=yL;Wm.varsResolver=bL;Wm.displayName="@mantine/core/Overlay";function gk(e){const n=document.createElement("div");return n.setAttribute("data-portal","true"),typeof e.className=="string"&&n.classList.add(...e.className.split(" ").filter(Boolean)),typeof e.style=="object"&&Object.assign(n.style,e.style),typeof e.id=="string"&&n.setAttribute("id",e.id),n}function XQ({target:e,reuseTargetNode:n,...t}){if(e)return typeof e=="string"?document.querySelector(e)||gk(t):e;if(n){const i=document.querySelector("[data-mantine-shared-portal-node]");if(i)return i;const r=gk(t);return r.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(r),r}return gk(t)}const ZQ={reuseTargetNode:!0},wL=Re(e=>{const{children:n,target:t,reuseTargetNode:i,ref:r,...a}=be("Portal",ZQ,e),[o,l]=A.useState(!1),f=A.useRef(null);return us(()=>(l(!0),f.current=XQ({target:t,reuseTargetNode:i,...a}),Wh(r,f.current),!t&&!i&&f.current&&document.body.appendChild(f.current),()=>{!t&&!i&&f.current&&document.body.removeChild(f.current)}),[t]),!o||!f.current?null:Qs.createPortal(y.jsx(y.Fragment,{children:n}),f.current)});wL.displayName="@mantine/core/Portal";const ul=Re(({withinPortal:e=!0,children:n,...t})=>qm()==="test"||!e?y.jsx(y.Fragment,{children:n}):y.jsx(wL,{...t,children:n}));ul.displayName="@mantine/core/OptionalPortal";const eh=e=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${e==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),Lv={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:{...eh("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...eh("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...eh("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...eh("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...eh("top"),common:{transformOrigin:"top right"}}},tT={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function iT({transition:e,state:n,duration:t,timingFunction:i}){const r={WebkitBackfaceVisibility:"hidden",transitionDuration:`${t}ms`,transitionTimingFunction:i};return typeof e=="string"?e in Lv?{transitionProperty:Lv[e].transitionProperty,...r,...Lv[e].common,...Lv[e][tT[n]]}:{}:{transitionProperty:e.transitionProperty,...r,...e.common,...e[tT[n]]}}function QQ({duration:e,exitDuration:n,timingFunction:t,mounted:i,onEnter:r,onExit:a,onEntered:o,onExited:l,enterDelay:f,exitDelay:c}){const h=ui(),d=L6(),p=h.respectReducedMotion?d:!1,[v,b]=A.useState(p?0:e),[w,k]=A.useState(i?"entered":"exited"),_=A.useRef(-1),C=A.useRef(-1),S=A.useRef(-1);function E(){window.clearTimeout(_.current),window.clearTimeout(C.current),cancelAnimationFrame(S.current)}const j=M=>{E();const $=M?r:a,q=M?o:l,P=p?0:M?e:n;b(P),P===0?(typeof $=="function"&&$(),typeof q=="function"&&q(),k(M?"entered":"exited")):S.current=requestAnimationFrame(()=>{bh.flushSync(()=>{k(M?"pre-entering":"pre-exiting")}),S.current=requestAnimationFrame(()=>{typeof $=="function"&&$(),k(M?"entering":"exiting"),_.current=window.setTimeout(()=>{typeof q=="function"&&q(),k(M?"entered":"exited")},P)})})},O=M=>{if(E(),typeof(M?f:c)!="number"){j(M);return}C.current=window.setTimeout(()=>{j(M)},M?f:c)};return ns(()=>{O(i)},[i]),A.useEffect(()=>()=>{E()},[]),{transitionDuration:v,transitionStatus:w,transitionTimingFunction:t||"ease"}}function is({keepMounted:e,transition:n="fade",duration:t=250,exitDuration:i=t,mounted:r,children:a,timingFunction:o="ease",onExit:l,onEntered:f,onEnter:c,onExited:h,enterDelay:d,exitDelay:p}){const v=qm(),{transitionDuration:b,transitionStatus:w,transitionTimingFunction:k}=QQ({mounted:r,exitDuration:i,duration:t,timingFunction:o,onExit:l,onEntered:f,onEnter:c,onExited:h,enterDelay:d,exitDelay:p});if(v==="test")return r?y.jsx(y.Fragment,{children:a({})}):e?a({display:"none"}):null;if(b===0)return e?y.jsx(A.Activity,{mode:r?"visible":"hidden",children:a({})}):r?y.jsx(y.Fragment,{children:a({})}):null;const _=w==="exited";return e?y.jsx(A.Activity,{mode:_?"hidden":"visible",children:a(_?{}:iT({transition:n,duration:b,state:w,timingFunction:k}))}):_?null:y.jsx(y.Fragment,{children:a(iT({transition:n,duration:b,state:w,timingFunction:k}))})}is.displayName="@mantine/core/Transition";const JQ={duration:100,transition:"fade"};function rT(e,n){return{...JQ,...n,...e}}const[eJ,kL]=Gr("Popover component was not found in the tree");function gy({children:e,active:n=!0,refProp:t="ref",innerRef:i}){const r=Bt(DK(n),i),a=Mu(e);return a?A.cloneElement(a,{[t]:r}):e}function _L(e){return y.jsx(aC,{tabIndex:-1,"data-autofocus":!0,...e})}gy.displayName="@mantine/core/FocusTrap";_L.displayName="@mantine/core/FocusTrapInitialFocus";gy.InitialFocus=_L;var xL={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const oC=Re(e=>{var k,_,C,S;const n=be("PopoverDropdown",null,e),{className:t,style:i,vars:r,children:a,onKeyDownCapture:o,variant:l,classNames:f,styles:c,ref:h,...d}=n,p=kL(),v=pz({opened:p.opened,shouldReturnFocus:p.returnFocus}),b=p.withRoles?{"aria-labelledby":p.getTargetId(),id:p.getDropdownId(),role:"dialog",tabIndex:-1}:{},w=Bt(h,p.floating);return p.disabled?null:y.jsx(ul,{...p.portalProps,withinPortal:p.withinPortal,children:y.jsx(is,{mounted:p.opened,...p.transitionProps,transition:((k=p.transitionProps)==null?void 0:k.transition)||"fade",duration:((_=p.transitionProps)==null?void 0:_.duration)??150,keepMounted:p.keepMounted,exitDuration:typeof((C=p.transitionProps)==null?void 0:C.exitDuration)=="number"?p.transitionProps.exitDuration:(S=p.transitionProps)==null?void 0:S.duration,children:E=>{var j;return y.jsx(gy,{active:p.trapFocus&&p.opened,innerRef:w,children:y.jsxs(de,{...b,...d,variant:l,onKeyDownCapture:wK(()=>{var O,M;(O=p.onClose)==null||O.call(p),(M=p.onDismiss)==null||M.call(p)},{active:p.closeOnEscape,onTrigger:v,onKeyDown:o}),"data-position":p.placement,"data-fixed":p.floatingStrategy==="fixed"||void 0,...p.getStyles("dropdown",{className:t,props:n,classNames:f,styles:c,style:[{...E,zIndex:p.zIndex,top:p.y??0,left:p.x??0,width:p.width==="target"?void 0:pe(p.width),...p.referenceHidden?{display:"none"}:null},(j=p.resolvedStyles)==null?void 0:j.dropdown,c==null?void 0:c.dropdown,i]}),children:[a,y.jsx(zg,{ref:p.arrowRef,arrowX:p.arrowX,arrowY:p.arrowY,visible:p.withArrow,position:p.placement,arrowSize:p.arrowSize,arrowRadius:p.arrowRadius,arrowOffset:p.arrowOffset,arrowPosition:p.arrowPosition,...p.getStyles("arrow",{props:n,classNames:f,styles:c})})]})})}})})});oC.classes=xL;oC.displayName="@mantine/core/PopoverDropdown";const nJ={refProp:"ref",popupType:"dialog"},SL=Re(e=>{const{children:n,refProp:t,popupType:i,ref:r,...a}=be("PopoverTarget",nJ,e),o=Mu(n);if(!o)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 l=a,f=kL(),c=Bt(f.reference,sy(o),r),h=f.withRoles?{"aria-haspopup":i,"aria-expanded":f.opened,"aria-controls":f.opened?f.getDropdownId():void 0,id:f.getTargetId()}:{},d=o.props;return A.cloneElement(o,{...l,...h,...f.targetProps,className:hn(f.targetProps.className,l.className,d.className),[t]:c,...f.controlled?null:{onClick:p=>{var v;f.onToggle(),(v=d.onClick)==null||v.call(d,p)}}})});SL.displayName="@mantine/core/PopoverTarget";function tJ(e){if(e===void 0)return{shift:!0,flip:!0};const n={...e};return e.shift===void 0&&(n.shift=!0),e.flip===void 0&&(n.flip=!0),n}function iJ(e,n,t){const i=tJ(e.middlewares),r=[aL(e.offset),CQ()];return e.dropdownVisible&&t!=="test"&&e.preventPositionChangeWhenVisible&&(i.flip=!1),i.flip&&r.push(typeof i.flip=="boolean"?$g():$g(i.flip)),i.shift&&r.push(J6(typeof i.shift=="boolean"?{limiter:G5(),padding:5}:{limiter:G5(),padding:5,...i.shift})),i.inline&&r.push(typeof i.inline=="boolean"?Th():Th(i.inline)),r.push(oL({element:e.arrowRef,padding:e.arrowOffset})),(i.size||e.width==="target")&&r.push(SQ({...typeof i.size=="boolean"?{}:i.size,apply({rects:a,availableWidth:o,availableHeight:l,...f}){var h;const c=((h=n().refs.floating.current)==null?void 0:h.style)??{};i.size&&(typeof i.size=="object"&&i.size.apply?i.size.apply({rects:a,availableWidth:o,availableHeight:l,...f}):Object.assign(c,{maxWidth:`${o}px`,maxHeight:`${l}px`})),e.width==="target"&&Object.assign(c,{width:`${a.reference.width}px`})}})),r}function rJ(e){const n=qm(),[t,i]=Mi({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=A.useRef(t),a=()=>{t&&!e.disabled&&i(!1)},o=()=>{e.disabled||i(!t)},l=iC({strategy:e.strategy,placement:e.preventPositionChangeWhenVisible?e.positionRef.current:e.position,middleware:iJ(e,()=>l,n),whileElementsMounted:e.keepMounted?void 0:kS});return A.useEffect(()=>{if(!(!l.refs.reference.current||!l.refs.floating.current)&&t)return kS(l.refs.reference.current,l.refs.floating.current,l.update)},[t,l.update]),ns(()=>{var f;(f=e.onPositionChange)==null||f.call(e,l.placement),e.positionRef.current=l.placement},[l.placement,e.preventPositionChangeWhenVisible]),ns(()=>{var f,c;t!==r.current&&(t?(c=e.onOpen)==null||c.call(e):(f=e.onClose)==null||f.call(e)),r.current=t},[t,e.onClose,e.onOpen]),us(()=>{let f=-1;return t&&(f=window.setTimeout(()=>e.setDropdownVisible(!0),4)),()=>{window.clearTimeout(f)}},[t,e.position]),{floating:l,controlled:typeof e.opened=="boolean",opened:t,onClose:a,onToggle:o}}const aJ={position:"bottom",offset:8,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,hideDetached:!0,clickOutsideEvents:["mousedown","touchstart"],zIndex:wa("popover"),__staticSelector:"Popover",width:"max-content"},CL=(e,{radius:n,shadow:t})=>({dropdown:{"--popover-radius":n===void 0?void 0:Yt(n),"--popover-shadow":$6(t)}});function Tn(e){var tn,dn,On,pn,an,en,Nn;const n=be("Popover",aJ,e),{children:t,position:i,offset:r,onPositionChange:a,opened:o,transitionProps:l,onExitTransitionEnd:f,onEnterTransitionEnd:c,width:h,middlewares:d,withArrow:p,arrowSize:v,arrowOffset:b,arrowRadius:w,arrowPosition:k,unstyled:_,classNames:C,styles:S,closeOnClickOutside:E,withinPortal:j,portalProps:O,closeOnEscape:M,clickOutsideEvents:$,trapFocus:q,onClose:P,onDismiss:z,onOpen:B,onChange:V,zIndex:U,radius:N,shadow:D,id:L,defaultOpened:H,__staticSelector:Y,withRoles:R,disabled:G,returnFocus:W,variant:I,keepMounted:X,vars:ee,floatingStrategy:re,withOverlay:se,overlayProps:ye,hideDetached:ae,attributes:le,preventPositionChangeWhenVisible:_e,...ne}=n,ze=Xe({name:Y,props:n,classes:xL,classNames:C,styles:S,unstyled:_,attributes:le,rootSelector:"dropdown",vars:ee,varsResolver:CL}),{resolvedStyles:we}=Hi({classNames:C,styles:S,props:n}),[Ce,Ne]=A.useState(o??H??!1),ge=A.useRef(i),xe=A.useRef(null),[Pe,ue]=A.useState(null),[Be,Ge]=A.useState(null),{dir:We}=Ru(),Ze=qm(),Qe=qi(L),ie=rJ({middlewares:d,width:h,position:vL(We,i),offset:typeof r=="number"?r+(p?v/2:0):r,arrowRef:xe,arrowOffset:b,onPositionChange:a,opened:o,defaultOpened:H,onChange:V,onOpen:B,onClose:P,onDismiss:z,strategy:re,dropdownVisible:Ce,setDropdownVisible:Ne,positionRef:ge,disabled:G,preventPositionChangeWhenVisible:_e,keepMounted:X});SK(()=>{E&&(ie.onClose(),z==null||z())},$,[Pe,Be]);const me=A.useCallback(De=>{ue(De),ie.floating.refs.setReference(De)},[ie.floating.refs.setReference]),Ye=A.useCallback(De=>{Ge(De),ie.floating.refs.setFloating(De)},[ie.floating.refs.setFloating]),Je=A.useCallback(()=>{var De;(De=l==null?void 0:l.onExited)==null||De.call(l),f==null||f(),Ne(!1),_e||(ge.current=i)},[l==null?void 0:l.onExited,f,_e,i]),Se=A.useCallback(()=>{var De;(De=l==null?void 0:l.onEntered)==null||De.call(l),c==null||c()},[l==null?void 0:l.onEntered,c]);return y.jsxs(eJ,{value:{returnFocus:W,disabled:G,controlled:ie.controlled,reference:me,floating:Ye,x:ie.floating.x,y:ie.floating.y,arrowX:(On=(dn=(tn=ie.floating)==null?void 0:tn.middlewareData)==null?void 0:dn.arrow)==null?void 0:On.x,arrowY:(en=(an=(pn=ie.floating)==null?void 0:pn.middlewareData)==null?void 0:an.arrow)==null?void 0:en.y,opened:ie.opened,arrowRef:xe,transitionProps:{...l,onExited:Je,onEntered:Se},width:h,withArrow:p,arrowSize:v,arrowOffset:b,arrowRadius:w,arrowPosition:k,placement:ie.floating.placement,trapFocus:q,withinPortal:j,portalProps:O,zIndex:U,radius:N,shadow:D,closeOnEscape:M,onDismiss:z,onClose:ie.onClose,onToggle:ie.onToggle,getTargetId:()=>Qe,getDropdownId:()=>`${Qe}-dropdown`,withRoles:R,targetProps:ne,__staticSelector:Y,classNames:C,styles:S,unstyled:_,variant:I,keepMounted:X,getStyles:ze,resolvedStyles:we,floatingStrategy:re,referenceHidden:ae&&Ze!=="test"?(Nn=ie.floating.middlewareData.hide)==null?void 0:Nn.referenceHidden:!1},children:[t,se&&y.jsx(is,{transition:"fade",mounted:ie.opened,duration:(l==null?void 0:l.duration)||250,exitDuration:(l==null?void 0:l.exitDuration)||250,children:De=>y.jsx(ul,{withinPortal:j,children:y.jsx(Wm,{...ye,...ze("overlay",{className:ye==null?void 0:ye.className,style:[De,ye==null?void 0:ye.style]})})})})]})}Tn.Target=SL;Tn.Dropdown=oC;Tn.varsResolver=CL;Tn.displayName="@mantine/core/Popover";Tn.extend=e=>e;Tn.withProps=e=>{const n=t=>y.jsx(Tn,{...e,...t});return n.extend=Tn.extend,n.displayName=`WithProps(${Tn.displayName})`,n};var Ba={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};const AL=({className:e,...n})=>y.jsxs(de,{component:"span",className:hn(Ba.barsLoader,e),...n,children:[y.jsx("span",{className:Ba.bar}),y.jsx("span",{className:Ba.bar}),y.jsx("span",{className:Ba.bar})]});AL.displayName="@mantine/core/Bars";const jL=({className:e,...n})=>y.jsxs(de,{component:"span",className:hn(Ba.dotsLoader,e),...n,children:[y.jsx("span",{className:Ba.dot}),y.jsx("span",{className:Ba.dot}),y.jsx("span",{className:Ba.dot})]});jL.displayName="@mantine/core/Dots";const OL=({className:e,...n})=>y.jsx(de,{component:"span",className:hn(Ba.ovalLoader,e),...n});OL.displayName="@mantine/core/Oval";const EL={bars:AL,oval:OL,dots:jL},oJ={loaders:EL,type:"oval"},TL=(e,{size:n,color:t})=>({root:{"--loader-size":$n(n,"loader-size"),"--loader-color":t?ut(t,e):void 0}}),gi=Re(e=>{const n=be("Loader",oJ,e),{size:t,color:i,type:r,vars:a,className:o,style:l,classNames:f,styles:c,unstyled:h,loaders:d,variant:p,children:v,attributes:b,...w}=n,k=Xe({name:"Loader",props:n,classes:Ba,className:o,style:l,classNames:f,styles:c,unstyled:h,attributes:b,vars:a,varsResolver:TL});return v?y.jsx(de,{...k("root"),...w,children:v}):y.jsx(de,{...k("root"),component:d[r],variant:p,size:t,...w})});gi.defaultLoaders=EL;gi.classes=Ba;gi.varsResolver=TL;gi.displayName="@mantine/core/Loader";var Nc={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const aT={orientation:"horizontal"},ML=(e,{borderWidth:n})=>({group:{"--ai-border-width":pe(n)}}),yy=Re(e=>{const n=be("ActionIconGroup",aT,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:f,borderWidth:c,variant:h,mod:d,attributes:p,...v}=be("ActionIconGroup",aT,e);return y.jsx(de,{...Xe({name:"ActionIconGroup",props:n,classes:Nc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:f,varsResolver:ML,rootSelector:"group"})("group"),variant:h,mod:[{"data-orientation":l},d],role:"group",...v})});yy.classes=Nc;yy.varsResolver=ML;yy.displayName="@mantine/core/ActionIconGroup";const DL=(e,{radius:n,color:t,gradient:i,variant:r,autoContrast:a,size:o})=>{const l=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:a});return{groupSection:{"--section-height":$n(o,"section-height"),"--section-padding-x":$n(o,"section-padding-x"),"--section-fz":ri(o),"--section-radius":n===void 0?void 0:Yt(n),"--section-bg":t||r?l.background:void 0,"--section-color":l.color,"--section-bd":t||r?l.border:void 0}}},by=Re(e=>{const n=be("ActionIconGroupSection",null,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,vars:l,variant:f,gradient:c,radius:h,autoContrast:d,attributes:p,...v}=n;return y.jsx(de,{...Xe({name:"ActionIconGroupSection",props:n,classes:Nc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:DL,rootSelector:"groupSection"})("groupSection"),variant:f,...v})});by.classes=Nc;by.varsResolver=DL;by.displayName="@mantine/core/ActionIconGroupSection";const RL=(e,{size:n,radius:t,variant:i,gradient:r,color:a,autoContrast:o})=>{const l=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:r,variant:i||"filled",autoContrast:o});return{root:{"--ai-size":$n(n,"ai-size"),"--ai-radius":t===void 0?void 0:Yt(t),"--ai-bg":a||i?l.background:void 0,"--ai-hover":a||i?l.hover:void 0,"--ai-hover-color":a||i?l.hoverColor:void 0,"--ai-color":l.color,"--ai-bd":a||i?l.border:void 0}}},ht=yi(e=>{const n=be("ActionIcon",null,e),{className:t,unstyled:i,variant:r,classNames:a,styles:o,style:l,loading:f,loaderProps:c,size:h,color:d,radius:p,__staticSelector:v,gradient:b,vars:w,children:k,disabled:_,"data-disabled":C,autoContrast:S,mod:E,attributes:j,...O}=n,M=Xe({name:["ActionIcon",v],props:n,className:t,style:l,classes:Nc,classNames:a,styles:o,unstyled:i,attributes:j,vars:w,varsResolver:RL});return y.jsxs(Dt,{...M("root",{active:!_&&!f&&!C}),...O,unstyled:i,variant:r,size:h,disabled:_||f,mod:[{loading:f,disabled:_||C},E],children:[typeof f=="boolean"&&y.jsx(is,{mounted:f,transition:"slide-down",duration:150,children:$=>y.jsx(de,{component:"span",...M("loader",{style:$}),"aria-hidden":!0,children:y.jsx(gi,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...c})})}),y.jsx(de,{component:"span",mod:{loading:f},...M("icon"),children:k})]})});ht.classes=Nc;ht.varsResolver=RL;ht.displayName="@mantine/core/ActionIcon";ht.Group=yy;ht.GroupSection=by;function PL({size:e="var(--cb-icon-size, 70%)",style:n,...t}){return y.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...n,width:e,height:e},...t,children:y.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"})})}PL.displayName="@mantine/core/CloseIcon";var NL={root:"m_86a44da5","root--subtle":"m_220c80f2"};const sJ={variant:"subtle"},$L=(e,{size:n,radius:t,iconSize:i})=>({root:{"--cb-size":$n(n,"cb-size"),"--cb-radius":t===void 0?void 0:Yt(t),"--cb-icon-size":pe(i)}}),pl=yi(e=>{const n=be("CloseButton",sJ,e),{iconSize:t,children:i,vars:r,radius:a,className:o,classNames:l,style:f,styles:c,unstyled:h,"data-disabled":d,disabled:p,variant:v,icon:b,mod:w,attributes:k,__staticSelector:_,...C}=n,S=Xe({name:_||"CloseButton",props:n,className:o,style:f,classes:NL,classNames:l,styles:c,unstyled:h,attributes:k,vars:r,varsResolver:$L});return y.jsxs(Dt,{...C,unstyled:h,variant:v,disabled:p,mod:[{disabled:p||d},w],...S("root",{variant:v,active:!p&&!d}),children:[b||y.jsx(PL,{}),i]})});pl.classes=NL;pl.varsResolver=$L;pl.displayName="@mantine/core/CloseButton";function lJ(e){return A.Children.toArray(e).filter(Boolean)}var zL={root:"m_4081bf90"};const uJ={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},LL=(e,{grow:n,preventGrowOverflow:t,gap:i,align:r,justify:a,wrap:o},{childWidth:l})=>({root:{"--group-child-width":n&&t?l:void 0,"--group-gap":Ut(i),"--group-align":r,"--group-justify":a,"--group-wrap":o}}),qe=Re(e=>{const n=be("Group",uJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,children:l,gap:f,align:c,justify:h,wrap:d,grow:p,preventGrowOverflow:v,vars:b,variant:w,__size:k,mod:_,attributes:C,...S}=n,E=lJ(l),j=E.length,O=Ut(f??"md");return y.jsx(de,{...Xe({name:"Group",props:n,stylesCtx:{childWidth:`calc(${100/j}% - (${O} - ${O} / ${j}))`},className:i,style:r,classes:zL,classNames:t,styles:a,unstyled:o,attributes:C,vars:b,varsResolver:LL})("root"),variant:w,mod:[{grow:p},_],size:k,...S,children:E})});qe.classes=zL;qe.varsResolver=LL;qe.displayName="@mantine/core/Group";const[fJ,cs]=Gr("ModalBase component was not found in tree");function cJ({opened:e,transitionDuration:n}){const[t,i]=A.useState(e),r=A.useRef(-1),a=L6()?0:n;return A.useEffect(()=>(e?(i(!0),window.clearTimeout(r.current)):a===0?i(!1):r.current=window.setTimeout(()=>i(!1),a),()=>window.clearTimeout(r.current)),[e,a]),t}function dJ({id:e,transitionProps:n,opened:t,trapFocus:i,closeOnEscape:r,onClose:a,returnFocus:o}){const l=qi(e),[f,c]=A.useState(!1),[h,d]=A.useState(!1),p=cJ({opened:t,transitionDuration:typeof(n==null?void 0:n.duration)=="number"?n==null?void 0:n.duration:200});return bz("keydown",v=>{var b;v.key==="Escape"&&r&&!v.isComposing&&t&&((b=v.target)==null?void 0:b.getAttribute("data-mantine-stop-propagation"))!=="true"&&a()},{capture:!0}),pz({opened:t,shouldReturnFocus:i&&o}),{_id:l,titleMounted:f,bodyMounted:h,shouldLockScroll:p,setTitleMounted:c,setBodyMounted:d}}var ro=function(){return ro=Object.assign||function(n){for(var t,i=1,r=arguments.length;i"u")return EJ;var n=TJ(e),t=document.documentElement.clientWidth,i=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,i-t+n[2]-n[0])}},DJ=qL(),Uf="data-scroll-locked",RJ=function(e,n,t,i){var r=e.left,a=e.top,o=e.right,l=e.gap;return t===void 0&&(t="margin"),` + .`.concat(mJ,` { + overflow: hidden `).concat(i,`; + padding-right: `).concat(l,"px ").concat(i,`; + } + body[`).concat(Uf,`] { + overflow: hidden `).concat(i,`; + overscroll-behavior: contain; + `).concat([n&&"position: relative ".concat(i,";"),t==="margin"&&` + padding-left: `.concat(r,`px; + padding-top: `).concat(a,`px; + padding-right: `).concat(o,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(l,"px ").concat(i,`; + `),t==="padding"&&"padding-right: ".concat(l,"px ").concat(i,";")].filter(Boolean).join(""),` + } + + .`).concat(yg,` { + right: `).concat(l,"px ").concat(i,`; + } + + .`).concat(bg,` { + margin-right: `).concat(l,"px ").concat(i,`; + } + + .`).concat(yg," .").concat(yg,` { + right: 0 `).concat(i,`; + } + + .`).concat(bg," .").concat(bg,` { + margin-right: 0 `).concat(i,`; + } + + body[`).concat(Uf,`] { + `).concat(pJ,": ").concat(l,`px; + } +`)},sT=function(){var e=parseInt(document.body.getAttribute(Uf)||"0",10);return isFinite(e)?e:0},PJ=function(){A.useEffect(function(){return document.body.setAttribute(Uf,(sT()+1).toString()),function(){var e=sT()-1;e<=0?document.body.removeAttribute(Uf):document.body.setAttribute(Uf,e.toString())}},[])},NJ=function(e){var n=e.noRelative,t=e.noImportant,i=e.gapMode,r=i===void 0?"margin":i;PJ();var a=A.useMemo(function(){return MJ(r)},[r]);return A.createElement(DJ,{styles:RJ(a,!n,r,t?"":"!important")})},xS=!1;if(typeof window<"u")try{var Iv=Object.defineProperty({},"passive",{get:function(){return xS=!0,!0}});window.addEventListener("test",Iv,Iv),window.removeEventListener("test",Iv,Iv)}catch{xS=!1}var Cf=xS?{passive:!1}:!1,$J=function(e){return e.tagName==="TEXTAREA"},HL=function(e,n){if(!(e instanceof Element))return!1;var t=window.getComputedStyle(e);return t[n]!=="hidden"&&!(t.overflowY===t.overflowX&&!$J(e)&&t[n]==="visible")},zJ=function(e){return HL(e,"overflowY")},LJ=function(e){return HL(e,"overflowX")},lT=function(e,n){var t=n.ownerDocument,i=n;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=UL(e,i);if(r){var a=WL(e,i),o=a[1],l=a[2];if(o>l)return!0}i=i.parentNode}while(i&&i!==t.body);return!1},IJ=function(e){var n=e.scrollTop,t=e.scrollHeight,i=e.clientHeight;return[n,t,i]},BJ=function(e){var n=e.scrollLeft,t=e.scrollWidth,i=e.clientWidth;return[n,t,i]},UL=function(e,n){return e==="v"?zJ(n):LJ(n)},WL=function(e,n){return e==="v"?IJ(n):BJ(n)},FJ=function(e,n){return e==="h"&&n==="rtl"?-1:1},qJ=function(e,n,t,i,r){var a=FJ(e,window.getComputedStyle(n).direction),o=a*i,l=t.target,f=n.contains(l),c=!1,h=o>0,d=0,p=0;do{if(!l)break;var v=WL(e,l),b=v[0],w=v[1],k=v[2],_=w-k-a*b;(b||_)&&UL(e,l)&&(d+=_,p+=b);var C=l.parentNode;l=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!f&&l!==document.body||f&&(n.contains(l)||n===l));return(h&&Math.abs(d)<1||!h&&Math.abs(p)<1)&&(c=!0),c},Bv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},uT=function(e){return[e.deltaX,e.deltaY]},fT=function(e){return e&&"current"in e?e.current:e},HJ=function(e,n){return e[0]===n[0]&&e[1]===n[1]},UJ=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},WJ=0,Af=[];function VJ(e){var n=A.useRef([]),t=A.useRef([0,0]),i=A.useRef(),r=A.useState(WJ++)[0],a=A.useState(qL)[0],o=A.useRef(e);A.useEffect(function(){o.current=e},[e]),A.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var w=hJ([e.lockRef.current],(e.shards||[]).map(fT),!0).filter(Boolean);return w.forEach(function(k){return k.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),w.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var l=A.useCallback(function(w,k){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!o.current.allowPinchZoom;var _=Bv(w),C=t.current,S="deltaX"in w?w.deltaX:C[0]-_[0],E="deltaY"in w?w.deltaY:C[1]-_[1],j,O=w.target,M=Math.abs(S)>Math.abs(E)?"h":"v";if("touches"in w&&M==="h"&&O.type==="range")return!1;var $=window.getSelection(),q=$&&$.anchorNode,P=q?q===O||q.contains(O):!1;if(P)return!1;var z=lT(M,O);if(!z)return!0;if(z?j=M:(j=M==="v"?"h":"v",z=lT(M,O)),!z)return!1;if(!i.current&&"changedTouches"in w&&(S||E)&&(i.current=j),!j)return!0;var B=i.current||j;return qJ(B,k,w,B==="h"?S:E)},[]),f=A.useCallback(function(w){var k=w;if(!(!Af.length||Af[Af.length-1]!==a)){var _="deltaY"in k?uT(k):Bv(k),C=n.current.filter(function(j){return j.name===k.type&&(j.target===k.target||k.target===j.shadowParent)&&HJ(j.delta,_)})[0];if(C&&C.should){k.cancelable&&k.preventDefault();return}if(!C){var S=(o.current.shards||[]).map(fT).filter(Boolean).filter(function(j){return j.contains(k.target)}),E=S.length>0?l(k,S[0]):!o.current.noIsolation;E&&k.cancelable&&k.preventDefault()}}},[]),c=A.useCallback(function(w,k,_,C){var S={name:w,delta:k,target:_,should:C,shadowParent:GJ(_)};n.current.push(S),setTimeout(function(){n.current=n.current.filter(function(E){return E!==S})},1)},[]),h=A.useCallback(function(w){t.current=Bv(w),i.current=void 0},[]),d=A.useCallback(function(w){c(w.type,uT(w),w.target,l(w,e.lockRef.current))},[]),p=A.useCallback(function(w){c(w.type,Bv(w),w.target,l(w,e.lockRef.current))},[]);A.useEffect(function(){return Af.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",f,Cf),document.addEventListener("touchmove",f,Cf),document.addEventListener("touchstart",h,Cf),function(){Af=Af.filter(function(w){return w!==a}),document.removeEventListener("wheel",f,Cf),document.removeEventListener("touchmove",f,Cf),document.removeEventListener("touchstart",h,Cf)}},[]);var v=e.removeScrollBar,b=e.inert;return A.createElement(A.Fragment,null,b?A.createElement(a,{styles:UJ(r)}):null,v?A.createElement(NJ,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function GJ(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const YJ=_J(FL,VJ);var bu=A.forwardRef(function(e,n){return A.createElement(wy,ro({},e,{ref:n,sideCar:YJ}))});bu.classNames=wy.classNames;function VL({keepMounted:e,opened:n,onClose:t,id:i,transitionProps:r,onExitTransitionEnd:a,onEnterTransitionEnd:o,trapFocus:l,closeOnEscape:f,returnFocus:c,closeOnClickOutside:h,withinPortal:d,portalProps:p,lockScroll:v,children:b,zIndex:w,shadow:k,padding:_,__vars:C,unstyled:S,removeScrollProps:E,...j}){const{_id:O,titleMounted:M,bodyMounted:$,shouldLockScroll:q,setTitleMounted:P,setBodyMounted:z}=dJ({id:i,transitionProps:r,opened:n,trapFocus:l,closeOnEscape:f,onClose:t,returnFocus:c}),{key:B,...V}=E||{};return y.jsx(ul,{...p,withinPortal:d,children:y.jsx(fJ,{value:{opened:n,onClose:t,closeOnClickOutside:h,onExitTransitionEnd:a,onEnterTransitionEnd:o,transitionProps:{...r,keepMounted:e},getTitleId:()=>`${O}-title`,getBodyId:()=>`${O}-body`,titleMounted:M,bodyMounted:$,setTitleMounted:P,setBodyMounted:z,trapFocus:l,closeOnEscape:f,zIndex:w,unstyled:S},children:y.jsx(bu,{enabled:q&&v,...V,children:y.jsx(de,{...j,id:O,__vars:{...C,"--mb-z-index":(w||wa("modal")).toString(),"--mb-shadow":$6(k),"--mb-padding":Ut(_)},children:b})},B)})})}VL.displayName="@mantine/core/ModalBase";function KJ(){const e=cs();return A.useEffect(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var Jf={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};function GL({className:e,...n}){const t=KJ(),i=cs();return y.jsx(de,{id:t,className:hn({[Jf.body]:!i.unstyled},e),...n})}GL.displayName="@mantine/core/ModalBaseBody";function YL({className:e,onClick:n,...t}){const i=cs();return y.jsx(pl,{...t,onClick:r=>{i.onClose(),n==null||n(r)},className:hn({[Jf.close]:!i.unstyled},e),unstyled:i.unstyled})}YL.displayName="@mantine/core/ModalBaseCloseButton";function KL({transitionProps:e,className:n,innerProps:t,onKeyDown:i,style:r,ref:a,...o}){const l=cs();return y.jsx(is,{mounted:l.opened,transition:"pop",...l.transitionProps,onExited:()=>{var f,c,h;(f=l.onExitTransitionEnd)==null||f.call(l),(h=(c=l.transitionProps)==null?void 0:c.onExited)==null||h.call(c)},onEntered:()=>{var f,c,h;(f=l.onEnterTransitionEnd)==null||f.call(l),(h=(c=l.transitionProps)==null?void 0:c.onEntered)==null||h.call(c)},...e,children:f=>y.jsx("div",{...t,className:hn({[Jf.inner]:!l.unstyled},t.className),children:y.jsx(gy,{active:l.opened&&l.trapFocus,innerRef:a,children:y.jsx(Et,{...o,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":l.bodyMounted?l.getBodyId():void 0,"aria-labelledby":l.titleMounted?l.getTitleId():void 0,style:[r,f],className:hn({[Jf.content]:!l.unstyled},n),unstyled:l.unstyled,children:o.children})})})})}KL.displayName="@mantine/core/ModalBaseContent";function XL({className:e,...n}){const t=cs();return y.jsx(de,{component:"header",className:hn({[Jf.header]:!t.unstyled},e),...n})}XL.displayName="@mantine/core/ModalBaseHeader";const XJ={duration:200,timingFunction:"ease",transition:"fade"};function ZJ(e){const n=cs();return{...XJ,...n.transitionProps,...e}}function ZL({onClick:e,transitionProps:n,style:t,visible:i,...r}){const a=cs(),o=ZJ(n);return y.jsx(is,{mounted:i!==void 0?i:a.opened,...o,transition:"fade",children:l=>y.jsx(Wm,{fixed:!0,style:[t,l],zIndex:a.zIndex,unstyled:a.unstyled,onClick:f=>{e==null||e(f),a.closeOnClickOutside&&a.onClose()},...r})})}ZL.displayName="@mantine/core/ModalBaseOverlay";function QJ(){const e=cs();return A.useEffect(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function QL({className:e,...n}){const t=QJ(),i=cs();return y.jsx(de,{component:"h2",className:hn({[Jf.title]:!i.unstyled},e),id:t,...n})}QL.displayName="@mantine/core/ModalBaseTitle";function JJ({children:e}){return y.jsx(y.Fragment,{children:e})}const JL=A.createContext({size:"sm"}),eI=Re(e=>{const n=be("InputClearButton",null,e),{size:t,variant:i,vars:r,classNames:a,styles:o,...l}=n,f=A.use(JL),{resolvedClassNames:c,resolvedStyles:h}=Hi({classNames:a,styles:o,props:n});return y.jsx(pl,{variant:i||"transparent",size:t||(f==null?void 0:f.size)||"sm",classNames:c,styles:h,__staticSelector:"InputClearButton",style:{pointerEvents:"all",background:"var(--input-bg)",...l.style},...l})});eI.displayName="@mantine/core/InputClearButton";const eee={xs:7,sm:8,md:10,lg:12,xl:15};function nee({__clearable:e,__clearSection:n,rightSection:t,__defaultRightSection:i,size:r="sm",__clearSectionMode:a="both"}){const o=e&&n;return a==="rightSection"?t===null?null:t||i:a==="clear"?t===null?null:o||i:o&&(t||i)?y.jsxs("div",{"data-combined-clear-section":!0,style:{display:"flex",gap:2,alignItems:"center",paddingInlineEnd:eee[r]},children:[o,t||i]}):t===null?null:t||o||i}const Pu=A.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var Sa={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 nI=(e,{size:n})=>({description:{"--input-description-size":n===void 0?void 0:`calc(${ri(n)} - ${pe(2)})`}}),Vm=Re(e=>{const n=be("InputDescription",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,__inheritStyles:c=!0,attributes:h,...d}=be("InputDescription",null,n),p=A.use(Pu),v=Xe({name:["InputWrapper",f],props:n,classes:Sa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,rootSelector:"description",vars:l,varsResolver:nI});return y.jsx(de,{component:"p",...(c&&(p==null?void 0:p.getStyles)||v)("description",p!=null&&p.getStyles?{className:i,style:r}:void 0),...d})});Vm.classes=Sa;Vm.varsResolver=nI;Vm.displayName="@mantine/core/InputDescription";const tI=(e,{size:n})=>({error:{"--input-error-size":n===void 0?void 0:`calc(${ri(n)} - ${pe(2)})`}}),Gm=Re(e=>{const n=be("InputError",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:f,__staticSelector:c,__inheritStyles:h=!0,...d}=n,p=Xe({name:["InputWrapper",c],props:n,classes:Sa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f,rootSelector:"error",vars:l,varsResolver:tI}),v=A.use(Pu);return y.jsx(de,{component:"p",...(h&&(v==null?void 0:v.getStyles)||p)("error",v!=null&&v.getStyles?{className:i,style:r}:void 0),...d})});Gm.classes=Sa;Gm.varsResolver=tI;Gm.displayName="@mantine/core/InputError";const tee={labelElement:"label"},iI=(e,{size:n})=>({label:{"--input-label-size":ri(n),"--input-asterisk-color":void 0}}),Ym=Re(e=>{const n=be("InputLabel",tee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,labelElement:f,required:c,htmlFor:h,onMouseDown:d,children:p,__staticSelector:v,mod:b,attributes:w,...k}=n,_=Xe({name:["InputWrapper",v],props:n,classes:Sa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,rootSelector:"label",vars:l,varsResolver:iI}),C=A.use(Pu),S=(C==null?void 0:C.getStyles)||_;return y.jsxs(de,{...S("label",C!=null&&C.getStyles?{className:i,style:r}:void 0),component:f,htmlFor:f==="label"?h:void 0,mod:[{required:c},b],onMouseDown:E=>{d==null||d(E),!E.defaultPrevented&&E.detail>1&&E.preventDefault()},...k,children:[p,c&&y.jsx("span",{...S("required"),"aria-hidden":!0,children:" *"})]})});Ym.classes=Sa;Ym.varsResolver=iI;Ym.displayName="@mantine/core/InputLabel";const sC=Re(e=>{const n=be("InputPlaceholder",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,error:c,mod:h,attributes:d,...p}=n;return y.jsx(de,{...Xe({name:["InputPlaceholder",f],props:n,classes:Sa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:d,rootSelector:"placeholder"})("placeholder"),mod:[{error:!!c},h],component:"span",...p})});sC.classes=Sa;sC.displayName="@mantine/core/InputPlaceholder";function iee(e,{hasDescription:n,hasError:t}){const i=e.findIndex(l=>l==="input"),r=e.slice(0,i),a=e.slice(i+1),o=n&&r.includes("description")||t&&r.includes("error");return{offsetBottom:n&&a.includes("description")||t&&a.includes("error"),offsetTop:o}}const ree={labelElement:"label",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},rI=(e,{size:n})=>({label:{"--input-label-size":ri(n),"--input-asterisk-color":void 0},error:{"--input-error-size":n===void 0?void 0:`calc(${ri(n)} - ${pe(2)})`},description:{"--input-description-size":n===void 0?void 0:`calc(${ri(n)} - ${pe(2)})`}}),ky=Re(e=>{const n=be("InputWrapper",ree,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,variant:c,__staticSelector:h,inputContainer:d,inputWrapperOrder:p,label:v,error:b,description:w,labelProps:k,descriptionProps:_,errorProps:C,labelElement:S,children:E,withAsterisk:j,id:O,required:M,__stylesApiProps:$,mod:q,attributes:P,...z}=n,B=Xe({name:["InputWrapper",h],props:$||n,classes:Sa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:P,vars:l,varsResolver:rI}),V={size:f,variant:c,__staticSelector:h},U=qi(O),N=typeof j=="boolean"?j:M,D=(C==null?void 0:C.id)||`${U}-error`,L=(_==null?void 0:_.id)||`${U}-description`,H=U,Y=!!b&&typeof b!="boolean",R=!!w,G=`${Y?D:""} ${R?L:""}`,W=G.trim().length>0?G.trim():void 0,I=(k==null?void 0:k.id)||`${U}-label`,X=v&&y.jsx(Ym,{labelElement:S,id:I,htmlFor:H,required:N,...V,...k,children:v},"label"),ee=R&&y.jsx(Vm,{..._,...V,size:(_==null?void 0:_.size)||V.size,id:(_==null?void 0:_.id)||L,children:w},"description"),re=y.jsx(A.Fragment,{children:d(E)},"input"),se=Y&&A.createElement(Gm,{...C,...V,size:(C==null?void 0:C.size)||V.size,key:"error",id:(C==null?void 0:C.id)||D},b),ye=p.map(ae=>{switch(ae){case"label":return X;case"input":return re;case"description":return ee;case"error":return se;default:return null}});return y.jsx(Pu,{value:{getStyles:B,describedBy:W,inputId:H,labelId:I,...iee(p,{hasDescription:R,hasError:Y})},children:y.jsx(de,{variant:c,size:f,mod:[{error:!!b},q],id:S==="label"?void 0:O,...B("root"),...z,children:ye})})});ky.classes=Sa;ky.varsResolver=rI;ky.displayName="@mantine/core/InputWrapper";const aee={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0,size:"sm",loading:!1,loadingPosition:"right"},aI=(e,n,t)=>({wrapper:{"--input-margin-top":t.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":t.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":$n(n.size,"input-height"),"--input-fz":ri(n.size),"--input-radius":n.radius===void 0?void 0:Yt(n.radius),"--input-left-section-width":n.leftSectionWidth!==void 0?pe(n.leftSectionWidth):void 0,"--input-right-section-width":n.rightSectionWidth!==void 0?pe(n.rightSectionWidth):void 0,"--input-padding-y":n.multiline?$n(n.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":n.leftSectionPointerEvents,"--input-right-section-pointer-events":n.rightSectionPointerEvents}}),Vt=yi(e=>{const n=be("Input",aee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,required:l,__staticSelector:f,__stylesApiProps:c,size:h,wrapperProps:d,error:p,disabled:v,leftSection:b,leftSectionProps:w,leftSectionWidth:k,rightSection:_,rightSectionProps:C,rightSectionWidth:S,rightSectionPointerEvents:E,leftSectionPointerEvents:j,variant:O,vars:M,pointer:$,multiline:q,radius:P,id:z,withAria:B,withErrorStyles:V,mod:U,inputSize:N,attributes:D,__clearSection:L,__clearable:H,__clearSectionMode:Y,__defaultRightSection:R,loading:G,loadingPosition:W,rootRef:I,...X}=n,{styleProps:ee,rest:re}=Du(X),se=A.use(Pu),ye={offsetBottom:se==null?void 0:se.offsetBottom,offsetTop:se==null?void 0:se.offsetTop},ae=Xe({name:["Input",f],props:c||n,classes:Sa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:D,stylesCtx:ye,rootSelector:"wrapper",vars:M,varsResolver:aI}),le=B?{required:l,disabled:v,"aria-invalid":p?!0:void 0,"aria-describedby":se==null?void 0:se.describedBy,id:(se==null?void 0:se.inputId)||z}:{},_e=G?y.jsx(gi,{size:W==="left"?"calc(var(--input-left-section-size) / 2)":"calc(var(--input-right-section-size) / 2)"}):null,ne=G&&W==="left"?_e:b,ze=nee({__clearable:H,__clearSection:L,rightSection:G&&W==="right"?_e:_,__defaultRightSection:R,size:h,__clearSectionMode:Y});return y.jsx(JL,{value:{size:h||"sm"},children:y.jsxs(de,{ref:I,...ae("wrapper"),...ee,...d,mod:[{error:!!p&&V,pointer:$,disabled:v,multiline:q,"data-with-right-section":!!ze,"data-with-left-section":!!ne},U],variant:O,size:h,children:[ne&&y.jsx("div",{...w,"data-position":"left",...ae("section",{className:w==null?void 0:w.className,style:w==null?void 0:w.style}),children:ne}),y.jsx(de,{component:"input",...re,...le,required:l,mod:{disabled:v,error:!!p&&V},variant:O,__size:N,...ae("input")}),ze&&y.jsx("div",{...C,"data-position":"right",...ae("section",{className:C==null?void 0:C.className,style:C==null?void 0:C.style}),children:ze})]})})});Vt.classes=Sa;Vt.varsResolver=aI;Vt.Wrapper=ky;Vt.Label=Ym;Vt.Error=Gm;Vt.Description=Vm;Vt.Placeholder=sC;Vt.ClearButton=eI;Vt.displayName="@mantine/core/Input";function oI(e,n,t){const i=be(e,n,t),{label:r,description:a,error:o,required:l,classNames:f,styles:c,className:h,unstyled:d,__staticSelector:p,__stylesApiProps:v,errorProps:b,labelProps:w,descriptionProps:k,wrapperProps:_,id:C,size:S,style:E,inputContainer:j,inputWrapperOrder:O,withAsterisk:M,variant:$,vars:q,mod:P,attributes:z,...B}=i,{styleProps:V,rest:U}=Du(B),N={label:r,description:a,error:o,required:l,classNames:f,className:h,__staticSelector:p,__stylesApiProps:v||i,errorProps:b,labelProps:w,descriptionProps:k,unstyled:d,styles:c,size:S,style:E,inputContainer:j,inputWrapperOrder:O,withAsterisk:M,variant:$,id:C,mod:P,attributes:z,..._};return{...U,classNames:f,styles:c,unstyled:d,wrapperProps:{...N,...V},inputProps:{required:l,classNames:f,styles:c,unstyled:d,size:S,__staticSelector:p,__stylesApiProps:v||i,error:o,variant:$,id:C,attributes:z}}}const oee={__staticSelector:"InputBase",withAria:!0,size:"sm"},Ui=yi(e=>{const{inputProps:n,wrapperProps:t,...i}=oI("InputBase",oee,e);return y.jsx(Vt.Wrapper,{...t,children:y.jsx(Vt,{...n,...i})})});Ui.classes={...Vt.classes,...Vt.Wrapper.classes};Ui.displayName="@mantine/core/InputBase";function Lg({style:e,size:n=16,...t}){return y.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:pe(n),height:pe(n),display:"block"},...t,children:y.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}Lg.displayName="@mantine/core/AccordionChevron";var sI={root:"m_66836ed3",wrapper:"m_a5d60502",body:"m_667c2793",title:"m_6a03f287",label:"m_698f4f23",icon:"m_667f2a6a",message:"m_7fa78076",closeButton:"m_87f54839"};const lI=(e,{radius:n,color:t,variant:i,autoContrast:r})=>{const a=e.variantColorResolver({color:t||e.primaryColor,theme:e,variant:i||"light",autoContrast:r});return{root:{"--alert-radius":n===void 0?void 0:Yt(n),"--alert-bg":t||i?a.background:void 0,"--alert-color":a.color,"--alert-bd":t||i?a.border:void 0}}},Kh=Re(e=>{const n=be("Alert",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,radius:f,color:c,title:h,children:d,id:p,icon:v,withCloseButton:b,onClose:w,closeButtonLabel:k,variant:_,autoContrast:C,role:S,attributes:E,...j}=n,O=Xe({name:"Alert",classes:sI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:E,vars:l,varsResolver:lI}),M=qi(p),$=h&&`${M}-title`||void 0,q=`${M}-body`;return y.jsx(de,{id:M,...O("root",{variant:_}),variant:_,...j,role:S||"alert","aria-describedby":d?q:void 0,"aria-labelledby":h?$:void 0,children:y.jsxs("div",{...O("wrapper"),children:[v&&y.jsx("div",{...O("icon"),children:v}),y.jsxs("div",{...O("body"),children:[h&&y.jsx("div",{...O("title"),"data-with-close-button":b||void 0,children:y.jsx("span",{id:$,...O("label"),children:h})}),d&&y.jsx("div",{id:q,...O("message"),"data-variant":_,children:d})]}),b&&y.jsx(pl,{...O("closeButton"),onClick:w,variant:"transparent",size:16,iconSize:16,"aria-label":k,unstyled:o})]})})});Kh.classes=sI;Kh.varsResolver=lI;Kh.displayName="@mantine/core/Alert";var uI={root:"m_b6d8b162"};function see(e){if(e==="start")return"start";if(e==="end"||e)return"end"}const lee={inherit:!1},fI=(e,{variant:n,lineClamp:t,gradient:i,size:r})=>({root:{"--text-fz":ri(r),"--text-lh":kK(r),"--text-gradient":n==="gradient"?dS(i,e):void 0,"--text-line-clamp":typeof t=="number"?t.toString():void 0}}),je=yi(e=>{const n=be("Text",lee,e),{lineClamp:t,truncate:i,inline:r,inherit:a,gradient:o,span:l,__staticSelector:f,vars:c,className:h,style:d,classNames:p,styles:v,unstyled:b,variant:w,mod:k,size:_,attributes:C,...S}=n;return y.jsx(de,{...Xe({name:["Text",f],props:n,classes:uI,className:h,style:d,classNames:p,styles:v,unstyled:b,attributes:C,vars:c,varsResolver:fI})("root",{focusable:!0}),component:l?"span":"p",variant:w,mod:[{"data-truncate":see(i),"data-line-clamp":typeof t=="number","data-inline":r,"data-inherit":a},k],size:_,...S})});je.classes=uI;je.varsResolver=fI;je.displayName="@mantine/core/Text";var cI={root:"m_849cf0da"};const uee={underline:"hover"},fl=yi(e=>{const{underline:n,className:t,unstyled:i,mod:r,...a}=be("Anchor",uee,e);return y.jsx(je,{component:"a",className:hn({[cI.root]:!i},t),...a,mod:[{underline:n},r],__staticSelector:"Anchor",unstyled:i})});fl.classes=cI;fl.displayName="@mantine/core/Anchor";const[fee,$c]=Gr("AppShell was not found in tree");var vl={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};const lC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=be("AppShellAside",null,e),d=$c();return d.disabled?null:y.jsx(de,{component:"aside",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("aside",{className:hn({[bu.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-aside-z-index":`calc(${f??d.zIndex} + 1)`}})});lC.classes=vl;lC.displayName="@mantine/core/AppShellAside";const uC=Re(e=>{var p;const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=be("AppShellFooter",null,e),d=$c();return d.disabled?null:y.jsx(de,{component:"footer",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("footer",{className:hn({[bu.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-footer-z-index":(p=f??d.zIndex)==null?void 0:p.toString()}})});uC.classes=vl;uC.displayName="@mantine/core/AppShellFooter";const fC=Re(e=>{var p;const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=be("AppShellHeader",null,e),d=$c();return d.disabled?null:y.jsx(de,{component:"header",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("header",{className:hn({[bu.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-header-z-index":(p=f??d.zIndex)==null?void 0:p.toString()}})});fC.classes=vl;fC.displayName="@mantine/core/AppShellHeader";const cC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("AppShellMain",null,e);return y.jsx(de,{component:"main",...$c().getStyles("main",{className:t,style:i,classNames:n,styles:r}),...o})});cC.classes=vl;cC.displayName="@mantine/core/AppShellMain";const dC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=be("AppShellNavbar",null,e),d=$c();return d.disabled?null:y.jsx(de,{component:"nav",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("navbar",{className:t,classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-navbar-z-index":`calc(${f??d.zIndex} + 1)`}})});dC.classes=vl;dC.displayName="@mantine/core/AppShellNavbar";const hC=yi(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,grow:o,mod:l,...f}=be("AppShellSection",null,e),c=$c();return y.jsx(de,{mod:[{grow:o},l],...c.getStyles("section",{className:t,style:i,classNames:n,styles:r}),...f})});hC.classes=vl;hC.displayName="@mantine/core/AppShellSection";function Km(e){return typeof e=="object"?e.base:e}function Xm(e){const n=typeof e=="object"&&e!==null&&typeof e.base<"u"&&Object.keys(e).length===1;return typeof e=="number"||typeof e=="string"||n}function Zm(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function cee({baseStyles:e,minMediaStyles:n,maxMediaStyles:t,aside:i,theme:r,mode:a}){var c,h,d;const o=i==null?void 0:i.width,l="translateX(var(--app-shell-aside-width))",f="translateX(calc(var(--app-shell-aside-width) * -1))";if(i!=null&&i.breakpoint&&!((c=i==null?void 0:i.collapsed)!=null&&c.mobile)&&(t[i==null?void 0:i.breakpoint]=t[i==null?void 0:i.breakpoint]||{},a==="fixed"?(t[i==null?void 0:i.breakpoint]["--app-shell-aside-width"]="100%",t[i==null?void 0:i.breakpoint]["--app-shell-aside-offset"]="0px"):(t[i==null?void 0:i.breakpoint]["--app-shell-aside-width"]="0px",t[i==null?void 0:i.breakpoint]["--app-shell-aside-offset"]="0px")),Xm(o)){const p=pe(Km(o));e["--app-shell-aside-width"]=p,e["--app-shell-aside-offset"]=p}if(Zm(o)&&(typeof o.base<"u"&&(e["--app-shell-aside-width"]=pe(o.base),e["--app-shell-aside-offset"]=pe(o.base)),Pt(o).forEach(p=>{p!=="base"&&(n[p]=n[p]||{},n[p]["--app-shell-aside-width"]=pe(o[p]),n[p]["--app-shell-aside-offset"]=pe(o[p]))})),i!=null&&i.breakpoint&&a==="static"&&(n[i.breakpoint]=n[i.breakpoint]||{},n[i.breakpoint]["--app-shell-aside-position"]="sticky",n[i.breakpoint]["--app-shell-aside-grid-row"]="2",n[i.breakpoint]["--app-shell-aside-grid-column"]="3",n[i.breakpoint]["--app-shell-main-column-end"]="3"),(h=i==null?void 0:i.collapsed)!=null&&h.desktop){const p=i.breakpoint;n[p]=n[p]||{},n[p]["--app-shell-aside-transform"]=l,n[p]["--app-shell-aside-transform-rtl"]=f,a==="fixed"?n[p]["--app-shell-aside-offset"]="0px !important":(n[p]["--app-shell-aside-width"]="0px",n[p]["--app-shell-aside-display"]="none",n[p]["--app-shell-main-column-end"]="-1"),n[p]["--app-shell-aside-scroll-locked-visibility"]="hidden"}if((d=i==null?void 0:i.collapsed)!=null&&d.mobile){const p=z6(i.breakpoint,r.breakpoints)-.1;t[p]=t[p]||{},a==="fixed"?(t[p]["--app-shell-aside-width"]="100%",t[p]["--app-shell-aside-offset"]="0px"):t[p]["--app-shell-aside-width"]="0px",t[p]["--app-shell-aside-transform"]=l,t[p]["--app-shell-aside-transform-rtl"]=f,t[p]["--app-shell-aside-scroll-locked-visibility"]="hidden"}}function dee({baseStyles:e,minMediaStyles:n,footer:t,mode:i}){const r=t==null?void 0:t.height,a="translateY(var(--app-shell-footer-height))",o=i==="static"?!0:(t==null?void 0:t.offset)??!0;if(i==="static"&&t&&(e["--app-shell-footer-position"]="sticky",e["--app-shell-footer-grid-column"]="1 / -1",e["--app-shell-footer-grid-row"]="3"),Xm(r)){const l=pe(Km(r));e["--app-shell-footer-height"]=l,o&&(e["--app-shell-footer-offset"]=l)}Zm(r)&&(typeof r.base<"u"&&(e["--app-shell-footer-height"]=pe(r.base),o&&(e["--app-shell-footer-offset"]=pe(r.base))),Pt(r).forEach(l=>{l!=="base"&&(n[l]=n[l]||{},n[l]["--app-shell-footer-height"]=pe(r[l]),o&&(n[l]["--app-shell-footer-offset"]=pe(r[l])))})),t!=null&&t.collapsed&&(e["--app-shell-footer-transform"]=a,i==="fixed"&&(e["--app-shell-footer-offset"]="0px !important"))}function hee({baseStyles:e,minMediaStyles:n,header:t,mode:i}){const r=t==null?void 0:t.height,a="translateY(calc(var(--app-shell-header-height) * -1))",o=i==="static"?!0:(t==null?void 0:t.offset)??!0;if(i==="static"&&t&&(e["--app-shell-header-position"]="sticky",e["--app-shell-header-grid-column"]="1 / -1",e["--app-shell-header-grid-row"]="1"),Xm(r)){const l=pe(Km(r));e["--app-shell-header-height"]=l,o&&(e["--app-shell-header-offset"]=l)}Zm(r)&&(typeof r.base<"u"&&(e["--app-shell-header-height"]=pe(r.base),o&&(e["--app-shell-header-offset"]=pe(r.base))),Pt(r).forEach(l=>{l!=="base"&&(n[l]=n[l]||{},n[l]["--app-shell-header-height"]=pe(r[l]),o&&(n[l]["--app-shell-header-offset"]=pe(r[l])))})),t!=null&&t.collapsed&&(e["--app-shell-header-transform"]=a,i==="fixed"&&(e["--app-shell-header-offset"]="0px !important"))}function mee({baseStyles:e,minMediaStyles:n,maxMediaStyles:t,navbar:i,theme:r,mode:a}){var c,h,d;const o=i==null?void 0:i.width,l="translateX(calc(var(--app-shell-navbar-width) * -1))",f="translateX(var(--app-shell-navbar-width))";if(i!=null&&i.breakpoint&&!((c=i==null?void 0:i.collapsed)!=null&&c.mobile)&&(t[i==null?void 0:i.breakpoint]=t[i==null?void 0:i.breakpoint]||{},t[i==null?void 0:i.breakpoint]["--app-shell-navbar-offset"]="0px",t[i==null?void 0:i.breakpoint]["--app-shell-navbar-width"]="100%",a==="static"&&(t[i==null?void 0:i.breakpoint]["--app-shell-navbar-grid-width"]="0px")),Xm(o)){const p=pe(Km(o));e["--app-shell-navbar-width"]=p,e["--app-shell-navbar-offset"]=p,a==="static"&&(e["--app-shell-navbar-grid-width"]=p)}if(Zm(o)&&(typeof o.base<"u"&&(e["--app-shell-navbar-width"]=pe(o.base),e["--app-shell-navbar-offset"]=pe(o.base),a==="static"&&(e["--app-shell-navbar-grid-width"]=pe(o.base))),Pt(o).forEach(p=>{p!=="base"&&(n[p]=n[p]||{},n[p]["--app-shell-navbar-width"]=pe(o[p]),n[p]["--app-shell-navbar-offset"]=pe(o[p]),a==="static"&&(n[p]["--app-shell-navbar-grid-width"]=pe(o[p])))})),i!=null&&i.breakpoint&&a==="static"&&(n[i.breakpoint]=n[i.breakpoint]||{},n[i.breakpoint]["--app-shell-navbar-position"]="sticky",n[i.breakpoint]["--app-shell-navbar-grid-row"]="2",n[i.breakpoint]["--app-shell-navbar-grid-column"]="1",n[i.breakpoint]["--app-shell-main-column-start"]="2"),(h=i==null?void 0:i.collapsed)!=null&&h.desktop){const p=i.breakpoint;n[p]=n[p]||{},n[p]["--app-shell-navbar-transform"]=l,n[p]["--app-shell-navbar-transform-rtl"]=f,a==="fixed"?n[p]["--app-shell-navbar-offset"]="0px !important":(n[p]["--app-shell-navbar-width"]="0px",n[p]["--app-shell-navbar-display"]="none",n[p]["--app-shell-main-column-start"]="1")}if((d=i==null?void 0:i.collapsed)!=null&&d.mobile){const p=z6(i.breakpoint,r.breakpoints)-.1;t[p]=t[p]||{},t[p]["--app-shell-navbar-width"]="100%",t[p]["--app-shell-navbar-offset"]="0px",a==="static"&&(t[p]["--app-shell-navbar-grid-width"]="0px"),t[p]["--app-shell-navbar-transform"]=l,t[p]["--app-shell-navbar-transform-rtl"]=f}}function kk(e){return Number(e)===0?"0px":Ut(e)}function pee({padding:e,baseStyles:n,minMediaStyles:t}){Xm(e)&&(n["--app-shell-padding"]=kk(Km(e))),Zm(e)&&(e.base&&(n["--app-shell-padding"]=kk(e.base)),Pt(e).forEach(i=>{i!=="base"&&(t[i]=t[i]||{},t[i]["--app-shell-padding"]=kk(e[i]))}))}function vee({navbar:e,header:n,footer:t,aside:i,padding:r,theme:a,mode:o}){const l={},f={},c={};o==="static"&&(c["--app-shell-main-grid-column"]="1 / -1",c["--app-shell-main-grid-row"]="2"),mee({baseStyles:c,minMediaStyles:l,maxMediaStyles:f,navbar:e,theme:a,mode:o}),cee({baseStyles:c,minMediaStyles:l,maxMediaStyles:f,aside:i,theme:a,mode:o}),hee({baseStyles:c,minMediaStyles:l,header:n,mode:o}),dee({baseStyles:c,minMediaStyles:l,footer:t,mode:o}),pee({baseStyles:c,minMediaStyles:l,padding:r});const h=Uh(Pt(l),a.breakpoints).map(p=>({query:`(min-width: ${Eg(p.px)})`,styles:l[p.value]})),d=Uh(Pt(f),a.breakpoints).map(p=>({query:`(max-width: ${Eg(p.px)})`,styles:f[p.value]}));return{baseStyles:c,media:[...h,...d]}}function gee({navbar:e,header:n,aside:t,footer:i,padding:r,mode:a,selector:o}){const l=ui(),f=bo(),{media:c,baseStyles:h}=vee({navbar:e,header:n,footer:i,aside:t,padding:r,theme:l,mode:a});return y.jsx(Dc,{media:c,styles:h,selector:o||f.cssVariablesSelector})}function yee({transitionDuration:e,disabled:n}){const[t,i]=A.useState(!0),r=A.useRef(-1),a=A.useRef(-1);return bz("resize",()=>{i(!0),clearTimeout(r.current),r.current=window.setTimeout(()=>A.startTransition(()=>{i(!1)}),200)}),us(()=>{i(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>A.startTransition(()=>{i(!1)}),e||0)},[n,e]),t}const bee={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:wa("app"),mode:"fixed"},dI=(e,{transitionDuration:n,transitionTimingFunction:t})=>({root:{"--app-shell-transition-duration":`${n}ms`,"--app-shell-transition-timing-function":t}}),wr=Re(e=>{const n=be("AppShell",bee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,navbar:f,withBorder:c,padding:h,transitionDuration:d,transitionTimingFunction:p,header:v,zIndex:b,layout:w,disabled:k,aside:_,footer:C,offsetScrollbars:S=!0,mode:E,mod:j,attributes:O,id:M,...$}=n,q=Xe({name:"AppShell",classes:vl,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:O,vars:l,varsResolver:dI}),P=yee({disabled:k,transitionDuration:d}),z=qi(M);return y.jsxs(fee,{value:{getStyles:q,withBorder:c,zIndex:b,disabled:k,offsetScrollbars:S,mode:E},children:[y.jsx(gee,{navbar:f,header:v,aside:_,footer:C,padding:h,mode:E,selector:E==="static"?`#${z}`:void 0}),y.jsx(de,{...q("root"),id:z,mod:[{resizing:P,layout:w,disabled:k,mode:E},j],...$})]})});wr.classes=vl;wr.varsResolver=dI;wr.displayName="@mantine/core/AppShell";wr.Navbar=dC;wr.Header=fC;wr.Main=cC;wr.Aside=lC;wr.Footer=uC;wr.Section=hC;function hI(e){return typeof e=="string"?{value:e,label:e}:typeof e=="object"&&"value"in e&&!("label"in e)?{value:e.value,label:`${e.value}`,disabled:e.disabled}:typeof e=="object"&&"group"in e?{group:e.group,items:e.items.map(n=>hI(n))}:typeof e=="number"||typeof e=="bigint"||typeof e=="boolean"?{value:e,label:`${e}`}:e}function _y(e){return e?e.map(n=>hI(n)):[]}function Qm(e){return e.reduce((n,t)=>"group"in t?{...n,...Qm(t.items)}:(n[`${t.value}`]=t,n),{})}var fr={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",optionsDropdownCheckPlaceholder:"m_a530ee0a"};const wee={error:null},mI=(e,{size:n,color:t})=>({chevron:{"--combobox-chevron-size":$n(n,"combobox-chevron-size"),"--combobox-chevron-color":t?ut(t,e):void 0}}),xy=Re(e=>{const n=be("ComboboxChevron",wee,e),{size:t,error:i,style:r,className:a,classNames:o,styles:l,unstyled:f,vars:c,attributes:h,mod:d,...p}=n,v=Xe({name:"ComboboxChevron",classes:fr,props:n,style:r,className:a,classNames:o,styles:l,unstyled:f,vars:c,varsResolver:mI,attributes:h,rootSelector:"chevron"});return y.jsx(de,{component:"svg",...p,...v("chevron"),size:t,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:i},d],children:y.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"})})});xy.classes=fr;xy.varsResolver=mI;xy.displayName="@mantine/core/ComboboxChevron";const[kee,Ca]=Gr("Combobox component was not found in tree");function pI({onMouseDown:e,onClick:n,onClear:t,...i}){return y.jsx(Vt.ClearButton,{tabIndex:-1,"aria-hidden":!0,...i,onMouseDown:r=>{r.preventDefault(),e==null||e(r)},onClick:r=>{t(),n==null||n(r)}})}pI.displayName="@mantine/core/ComboboxClearButton";const mC=Re(e=>{const{classNames:n,styles:t,className:i,style:r,hidden:a,...o}=be("ComboboxDropdown",null,e),l=Ca();return y.jsx(Tn.Dropdown,{...o,role:"presentation","data-hidden":a||void 0,...l.getStyles("dropdown",{className:i,style:r,classNames:n,styles:t})})});mC.classes=fr;mC.displayName="@mantine/core/ComboboxDropdown";const _ee={refProp:"ref"},vI=Re(e=>{const{children:n,refProp:t,ref:i}=be("ComboboxDropdownTarget",_ee,e);if(Ca(),!P6(n))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 y.jsx(Tn.Target,{ref:i,refProp:t,children:n})});vI.displayName="@mantine/core/ComboboxDropdownTarget";const pC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ComboboxEmpty",null,e);return y.jsx(de,{...Ca().getStyles("empty",{className:t,classNames:n,styles:r,style:i}),...o})});pC.classes=fr;pC.displayName="@mantine/core/ComboboxEmpty";function vC({onKeyDown:e,onClick:n,withKeyboardNavigation:t,withAriaAttributes:i,withExpandedAttribute:r,targetType:a,autoComplete:o}){const l=Ca(),[f,c]=A.useState(null),h=v=>{if(e==null||e(v),!l.readOnly&&t){if(v.nativeEvent.isComposing)return;if(v.nativeEvent.code==="ArrowDown"&&(v.preventDefault(),l.store.dropdownOpened?c(l.store.selectNextOption()):(l.store.openDropdown("keyboard"),c(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),v.nativeEvent.code==="ArrowUp"&&(v.preventDefault(),l.store.dropdownOpened?c(l.store.selectPreviousOption()):(l.store.openDropdown("keyboard"),c(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),v.nativeEvent.code==="Enter"||v.nativeEvent.code==="NumpadEnter"){if(v.nativeEvent.keyCode===229)return;const b=l.store.getSelectedOptionIndex();l.store.dropdownOpened&&b!==-1?(v.preventDefault(),l.store.clickSelectedOption()):a==="button"&&(v.preventDefault(),l.store.openDropdown("keyboard"))}v.key==="Escape"&&l.store.closeDropdown("keyboard"),v.nativeEvent.code==="Space"&&a==="button"&&(v.preventDefault(),l.store.toggleDropdown("keyboard"))}};return{...i?{...r?{role:"combobox"}:{},"aria-haspopup":"listbox","aria-expanded":r?!!(l.store.listId&&l.store.dropdownOpened):void 0,"aria-controls":l.store.dropdownOpened&&l.store.listId?l.store.listId:void 0,"aria-activedescendant":l.store.dropdownOpened&&f||void 0,autoComplete:o,"data-expanded":l.store.dropdownOpened||void 0,"data-mantine-stop-propagation":l.store.dropdownOpened||void 0}:{},onKeyDown:h,onClick:v=>{a==="button"&&v.currentTarget.focus(),n==null||n(v)}}}const xee={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},gI=Re(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:f,...c}=be("ComboboxEventsTarget",xee,e),h=Mu(n);if(!h)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 d=Ca();return A.cloneElement(h,{...vC({targetType:o,withAriaAttributes:r,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:h.props.onKeyDown,onClick:h.props.onClick,autoComplete:l}),...c,[t]:Bt(f,d.store.targetRef,sy(h))})});gI.displayName="@mantine/core/ComboboxEventsTarget";const gC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ComboboxFooter",null,e);return y.jsx(de,{...Ca().getStyles("footer",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});gC.classes=fr;gC.displayName="@mantine/core/ComboboxFooter";const yC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,children:o,label:l,id:f,...c}=be("ComboboxGroup",null,e),h=Ca(),d=qi(f);return y.jsxs(de,{role:"group","aria-labelledby":l?d:void 0,...h.getStyles("group",{className:t,classNames:n,style:i,styles:r}),...c,children:[l&&y.jsx("div",{id:d,...h.getStyles("groupLabel",{classNames:n,styles:r}),children:l}),o]})});yC.classes=fr;yC.displayName="@mantine/core/ComboboxGroup";const bC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ComboboxHeader",null,e);return y.jsx(de,{...Ca().getStyles("header",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});bC.classes=fr;bC.displayName="@mantine/core/ComboboxHeader";function yI({value:e,valuesDivider:n=",",...t}){return y.jsx("input",{type:"hidden",value:Array.isArray(e)?e.join(n):e?`${e}`:"",...t})}yI.displayName="@mantine/core/ComboboxHiddenInput";const wC=Re(e=>{const n=be("ComboboxOption",null,e),{classNames:t,className:i,style:r,styles:a,vars:o,onClick:l,id:f,active:c,onMouseDown:h,onMouseOver:d,disabled:p,selected:v,mod:b,...w}=n,k=Ca(),_=A.useId(),C=f||_;return y.jsx(de,{...k.getStyles("option",{className:i,classNames:t,styles:a,style:r}),...w,id:C,mod:["combobox-option",{"combobox-active":c,"combobox-disabled":p,"combobox-selected":v},b],role:"option",onClick:S=>{var E;p?S.preventDefault():((E=k.onOptionSubmit)==null||E.call(k,n.value,n),l==null||l(S))},onMouseDown:S=>{S.preventDefault(),h==null||h(S)},onMouseOver:S=>{k.resetSelectionOnOptionHover&&k.store.resetSelectedOption(),d==null||d(S)}})});wC.classes=fr;wC.displayName="@mantine/core/ComboboxOption";const kC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,id:a,onMouseDown:o,labelledBy:l,...f}=be("ComboboxOptions",null,e),c=Ca(),h=qi(a);return A.useEffect(()=>{c.store.setListId(h)},[h]),y.jsx(de,{...c.getStyles("options",{className:t,style:i,classNames:n,styles:r}),...f,id:h,role:"listbox","aria-labelledby":l,onMouseDown:d=>{d.preventDefault(),o==null||o(d)}})});kC.classes=fr;kC.displayName="@mantine/core/ComboboxOptions";const See={withAriaAttributes:!0,withKeyboardNavigation:!0},_C=Re(e=>{const{classNames:n,styles:t,unstyled:i,vars:r,withAriaAttributes:a,onKeyDown:o,onClick:l,withKeyboardNavigation:f,size:c,ref:h,...d}=be("ComboboxSearch",See,e),p=Ca(),v=p.getStyles("search"),b=vC({targetType:"input",withAriaAttributes:a,withKeyboardNavigation:f,withExpandedAttribute:!1,onKeyDown:o,onClick:l,autoComplete:"off"});return y.jsx(Vt,{ref:Bt(h,p.store.searchRef),classNames:[{input:v.className},n],styles:[{input:v.style},t],size:c||p.size,...b,...d,__staticSelector:"Combobox"})});_C.classes=fr;_C.displayName="@mantine/core/ComboboxSearch";const Cee={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},bI=Re(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:f,...c}=be("ComboboxTarget",Cee,e),h=Mu(n);if(!h)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 d=Ca(),p=A.cloneElement(h,{...vC({targetType:o,withAriaAttributes:r,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:h.props.onKeyDown,onClick:h.props.onClick,autoComplete:l}),...c});return y.jsx(Tn.Target,{refProp:t,ref:Bt(f,d.store.targetRef),children:p})});bI.displayName="@mantine/core/ComboboxTarget";function Aee(e,n,t){for(let i=e-1;i>=0;i-=1)if(!n[i].hasAttribute("data-combobox-disabled"))return i;if(t){for(let i=n.length-1;i>-1;i-=1)if(!n[i].hasAttribute("data-combobox-disabled"))return i}return e}function jee(e,n,t){for(let i=e+1;i{l||(f(!0),r==null||r(D))},[f,r,l]),_=A.useCallback((D="unknown")=>{l&&(f(!1),i==null||i(D))},[f,i,l]),C=A.useCallback((D="unknown")=>{l?_(D):k(D)},[_,k,l]),S=A.useCallback(()=>{const D=Io(p.current),L=mg(`#${c.current} [data-combobox-selected]`,D);L==null||L.removeAttribute("data-combobox-selected"),L==null||L.removeAttribute("aria-selected")},[]),E=A.useCallback(D=>{const L=Io(p.current),H=mg(`#${c.current}`,L),Y=H?qo("[data-combobox-option]",H):null;if(!Y)return null;const R=D>=Y.length?0:D<0?Y.length-1:D;return h.current=R,Y!=null&&Y[R]&&!Y[R].hasAttribute("data-combobox-disabled")?(S(),Y[R].setAttribute("data-combobox-selected","true"),Y[R].setAttribute("aria-selected","true"),Y[R].scrollIntoView({block:"nearest",behavior:o}),Y[R].id):null},[o,S]),j=A.useCallback(()=>{const D=Io(p.current),L=mg(`#${c.current} [data-combobox-active]`,D);return E(L?qo(`#${c.current} [data-combobox-option]`,D).findIndex(H=>H===L):0)},[E]),O=A.useCallback(()=>{const D=Io(p.current),L=qo(`#${c.current} [data-combobox-option]`,D);return E(jee(h.current,L,a))},[E,a]),M=A.useCallback(()=>{const D=Io(p.current),L=qo(`#${c.current} [data-combobox-option]`,D);return E(Aee(h.current,L,a))},[E,a]),$=A.useCallback(()=>{const D=Io(p.current);return E(Oee(qo(`#${c.current} [data-combobox-option]`,D)))},[E]),q=A.useCallback((D="selected",L)=>{var H;if(typeof D=="number"){h.current=D;const Y=Io(p.current),R=qo(`#${c.current} [data-combobox-option]`,Y);L!=null&&L.scrollIntoView&&((H=R[D])==null||H.scrollIntoView({block:"nearest",behavior:o}));return}w.current=window.setTimeout(()=>{var W;const Y=Io(p.current),R=qo(`#${c.current} [data-combobox-option]`,Y),G=R.findIndex(I=>I.hasAttribute(`data-combobox-${D}`));h.current=G,L!=null&&L.scrollIntoView&&((W=R[G])==null||W.scrollIntoView({block:"nearest",behavior:o}))},0)},[]),P=A.useCallback(()=>{h.current=-1,S()},[S]),z=A.useCallback(()=>{var L,H;const D=Io(p.current);(H=(L=qo(`#${c.current} [data-combobox-option]`,D))==null?void 0:L[h.current])==null||H.click()},[]),B=A.useCallback(D=>{c.current=D},[]),V=A.useCallback(()=>{v.current=window.setTimeout(()=>{var D;return(D=d.current)==null?void 0:D.focus()},0)},[]),U=A.useCallback(()=>{b.current=window.setTimeout(()=>{var D;return(D=p.current)==null?void 0:D.focus()},0)},[]),N=A.useCallback(()=>h.current,[]);return A.useEffect(()=>()=>{window.clearTimeout(v.current),window.clearTimeout(b.current),window.clearTimeout(w.current)},[]),{dropdownOpened:l,openDropdown:k,closeDropdown:_,toggleDropdown:C,selectedOptionIndex:h.current,getSelectedOptionIndex:N,selectOption:E,selectFirstOption:$,selectActiveOption:j,selectNextOption:O,selectPreviousOption:M,resetSelectedOption:P,updateSelectedOptionIndex:q,listId:c.current,setListId:B,clickSelectedOption:z,searchRef:d,focusSearchInput:V,targetRef:p,focusTarget:U}}const Eee={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0},size:"sm"},wI=(e,{size:n,dropdownPadding:t})=>({options:{"--combobox-option-fz":ri(n),"--combobox-option-padding":$n(n,"combobox-option-padding")},dropdown:{"--combobox-padding":t===void 0?void 0:pe(t),"--combobox-option-fz":ri(n),"--combobox-option-padding":$n(n,"combobox-option-padding")}}),Mn=e=>{const n=be("Combobox",Eee,e),{classNames:t,styles:i,unstyled:r,children:a,store:o,vars:l,onOptionSubmit:f,onClose:c,size:h,dropdownPadding:d,resetSelectionOnOptionHover:p,__staticSelector:v,readOnly:b,attributes:w,...k}=n,_=Jm(),C=o||_,S=Xe({name:v||"Combobox",classes:fr,props:n,classNames:t,styles:i,unstyled:r,attributes:w,vars:l,varsResolver:wI}),E=()=>{c==null||c(),C.closeDropdown()};return y.jsx(kee,{value:{getStyles:S,store:C,onOptionSubmit:f,size:h,resetSelectionOnOptionHover:p,readOnly:b},children:y.jsx(Tn,{opened:C.dropdownOpened,preventPositionChangeWhenVisible:!1,...k,onChange:j=>!j&&E(),withRoles:!1,unstyled:r,children:a})})},Tee=e=>e;Mn.extend=Tee;Mn.classes=fr;Mn.varsResolver=wI;Mn.displayName="@mantine/core/Combobox";Mn.Target=bI;Mn.Dropdown=mC;Mn.Options=kC;Mn.Option=wC;Mn.Search=_C;Mn.Empty=pC;Mn.Chevron=xy;Mn.Footer=gC;Mn.Header=bC;Mn.EventsTarget=gI;Mn.DropdownTarget=vI;Mn.Group=yC;Mn.ClearButton=pI;Mn.HiddenInput=yI;function Mee({children:e,role:n}){const t=A.use(Pu);return t?y.jsx("div",{role:n,"aria-labelledby":t.labelId,"aria-describedby":t.describedBy,children:e}):y.jsx(y.Fragment,{children:e})}const xC=A.createContext(null),Dee={hiddenInputValuesSeparator:","},SC=Hm((e=>{const{value:n,defaultValue:t,onChange:i,size:r,wrapperProps:a,children:o,readOnly:l,name:f,hiddenInputValuesSeparator:c,hiddenInputProps:h,maxSelectedValues:d,disabled:p,...v}=be("CheckboxGroup",Dee,e),[b,w]=Mi({value:n,defaultValue:t,finalValue:[],onChange:i}),k=S=>{const E=typeof S=="string"?S:S.currentTarget.value;if(l)return;const j=b.includes(E);!j&&d&&b.length>=d||w(j?b.filter(O=>O!==E):[...b,E])},_=S=>{if(p)return!0;if(!d)return!1;const E=b.includes(S),j=b.length>=d;return!E&&j},C=b.join(c);return y.jsx(xC,{value:{value:b,onChange:k,size:r,isDisabled:_},children:y.jsxs(Vt.Wrapper,{size:r,...a,...v,labelElement:"div",__staticSelector:"CheckboxGroup",children:[y.jsx(Mee,{role:"group",children:o}),y.jsx("input",{type:"hidden",name:f,value:C,...h})]})})}));SC.classes=Vt.Wrapper.classes;SC.displayName="@mantine/core/CheckboxGroup";var kI={card:"m_26775b0a"};const _I=A.createContext(null),Ree={withBorder:!0},xI=(e,{radius:n})=>({card:{"--card-radius":Yt(n)}}),Sy=Re(e=>{const n=be("CheckboxCard",Ree,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,checked:f,mod:c,withBorder:h,value:d,onClick:p,defaultChecked:v,onChange:b,attributes:w,...k}=n,_=Xe({name:"CheckboxCard",classes:kI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:xI,rootSelector:"card"}),C=A.use(xC),[S,E]=Mi({value:typeof f=="boolean"?f:C?C.value.includes(d||""):void 0,defaultValue:v,finalValue:!1,onChange:b});return y.jsx(_I,{value:{checked:S},children:y.jsx(Dt,{mod:[{"with-border":h,checked:S},c],..._("card"),...k,role:"checkbox","aria-checked":S,onClick:j=>{p==null||p(j),C==null||C.onChange(d||""),E(!S)}})})});Sy.displayName="@mantine/core/CheckboxCard";Sy.classes=kI;Sy.varsResolver=xI;function CC({size:e,style:n,...t}){return y.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e!==void 0?{width:pe(e),height:pe(e),...n}:n,"aria-hidden":!0,...t,children:y.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"})})}function SI({indeterminate:e,...n}){return e?y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...n,children:y.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):y.jsx(CC,{...n})}var CI={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const Pee={icon:SI,variant:"filled",radius:"sm"},AI=(e,{radius:n,color:t,size:i,iconColor:r,variant:a,autoContrast:o})=>{const l=fs({color:t||e.primaryColor,theme:e}),f=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{indicator:{"--checkbox-size":$n(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:Yt(n),"--checkbox-color":a==="outline"?f:ut(t,e),"--checkbox-icon-color":r?ut(r,e):ly(o,e)?Fm({color:t,theme:e,autoContrast:o}):void 0}}},Cy=Re(e=>{const n=be("CheckboxIndicator",Pee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,icon:f,indeterminate:c,radius:h,color:d,iconColor:p,autoContrast:v,checked:b,mod:w,variant:k,disabled:_,attributes:C,...S}=n,E=Xe({name:"CheckboxIndicator",classes:CI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:AI,rootSelector:"indicator"}),j=A.use(_I),O=typeof b=="boolean"||typeof c=="boolean"?b||c:(j==null?void 0:j.checked)||!1;return y.jsx(de,{...E("indicator",{variant:k}),variant:k,mod:[{checked:O,disabled:_},w],...S,children:y.jsx(f,{indeterminate:c,...E("icon")})})});Cy.displayName="@mantine/core/CheckboxIndicator";Cy.classes=CI;Cy.varsResolver=AI;var jI={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const Nee=jI;function OI({__staticSelector:e,__stylesApiProps:n,className:t,classNames:i,styles:r,unstyled:a,children:o,label:l,description:f,id:c,disabled:h,error:d,size:p,labelPosition:v="left",bodyElement:b="div",labelElement:w="label",variant:k,style:_,vars:C,mod:S,attributes:E,...j}){const O=Xe({name:e,props:n,className:t,style:_,classes:jI,classNames:i,styles:r,unstyled:a,attributes:E});return y.jsx(de,{...O("root"),__vars:{"--label-fz":ri(p),"--label-lh":$n(p,"label-lh")},mod:[{"label-position":v},S],variant:k,size:p,...j,children:y.jsxs(de,{component:b,htmlFor:b==="label"?c:void 0,...O("body"),children:[o,y.jsxs("div",{...O("labelWrapper"),"data-disabled":h||void 0,children:[l&&y.jsx(de,{component:w,htmlFor:w==="label"?c:void 0,...O("label"),"data-disabled":h||void 0,children:l}),f&&y.jsx(Vt.Description,{size:p,__inheritStyles:!1,...O("description"),children:f}),d&&typeof d!="boolean"&&y.jsx(Vt.Error,{size:p,__inheritStyles:!1,...O("error"),children:d})]})]})})}OI.displayName="@mantine/core/InlineInput";var EI={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const $ee={labelPosition:"right",icon:SI,withErrorStyles:!0,variant:"filled",radius:"sm"},TI=(e,{radius:n,color:t,size:i,iconColor:r,variant:a,autoContrast:o})=>{const l=fs({color:t||e.primaryColor,theme:e}),f=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{root:{"--checkbox-size":$n(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:Yt(n),"--checkbox-color":a==="outline"?f:ut(t,e),"--checkbox-icon-color":r?ut(r,e):ly(o,e)?Fm({color:t,theme:e,autoContrast:o}):void 0}}},cl=Re(e=>{var se;const n=be("Checkbox",$ee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:f,label:c,id:h,size:d,radius:p,wrapperProps:v,checked:b,labelPosition:w,description:k,error:_,disabled:C,variant:S,indeterminate:E,icon:j,rootRef:O,iconColor:M,onChange:$,autoContrast:q,mod:P,attributes:z,readOnly:B,onClick:V,withErrorStyles:U,ref:N,...D}=n,L=A.useRef(null),H=A.use(xC),Y=d||(H==null?void 0:H.size),R=Xe({name:"Checkbox",props:n,classes:EI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:z,vars:l,varsResolver:TI}),{styleProps:G,rest:W}=Du(D),I=qi(h),X={checked:(H==null?void 0:H.value.includes(W.value))??b,onChange:ye=>{H==null||H.onChange(ye),$==null||$(ye)}},ee=((se=H==null?void 0:H.isDisabled)==null?void 0:se.call(H,W.value))??!1,re=C||ee;return A.useEffect(()=>{L.current&&(L.current.indeterminate=E||!1,E?L.current.setAttribute("data-indeterminate","true"):L.current.removeAttribute("data-indeterminate"))},[E]),y.jsx(OI,{...R("root"),__staticSelector:"Checkbox",__stylesApiProps:n,id:I,size:Y,labelPosition:w,label:c,description:k,error:_,disabled:re,classNames:t,styles:a,unstyled:o,"data-checked":X.checked||b||void 0,variant:S,ref:O,mod:P,attributes:z,inert:W.inert,...G,...v,children:y.jsxs(de,{...R("inner"),mod:{"data-label-position":w},children:[y.jsx(de,{component:"input",id:I,ref:Bt(L,N),mod:{error:!!_},...R("input",{focusable:!0,variant:S}),...W,...X,disabled:re,inert:W.inert,type:"checkbox",onClick:ye=>{B&&ye.preventDefault(),V==null||V(ye)}}),y.jsx(j,{indeterminate:E,...R("icon")})]})})});cl.classes={...EI,...Nee};cl.varsResolver=TI;cl.displayName="@mantine/core/Checkbox";cl.Group=SC;cl.Indicator=Cy;cl.Card=Sy;function wu(e){return"group"in e}function MI({options:e,search:n,limit:t}){const i=n.trim().toLowerCase(),r=[];for(let a=0;a0)return!1;return!0}function DI(e,n=new Set){if(Array.isArray(e))for(const t of e)if(wu(t))DI(t.items,n);else{if(typeof t.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(n.has(t.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${t.value}" was provided more than once`);n.add(t.value)}}function Lee(e,n){return Array.isArray(e)?e.includes(n):e===n}function RI({data:e,withCheckIcon:n,withAlignedLabels:t,value:i,checkIconPosition:r,unstyled:a,renderOption:o}){if(!wu(e)){const f=Lee(i,e.value),c=n&&(f?y.jsx(CC,{className:fr.optionsDropdownCheckIcon}):t?y.jsx("div",{className:fr.optionsDropdownCheckPlaceholder}):null),h=y.jsxs(y.Fragment,{children:[r==="left"&&c,y.jsx("span",{children:e.label}),r==="right"&&c]});return y.jsx(Mn.Option,{value:e.value,disabled:e.disabled,className:hn({[fr.optionsDropdownOption]:!a}),"data-reverse":r==="right"||void 0,"data-checked":f||void 0,"aria-selected":f,active:f,children:typeof o=="function"?o({option:e,checked:f}):h})}const l=e.items.map(f=>y.jsx(RI,{data:f,value:i,unstyled:a,withCheckIcon:n,withAlignedLabels:t,checkIconPosition:r,renderOption:o},`${f.value}`));return y.jsx(Mn.Group,{label:e.group,children:l})}function Ay({data:e,hidden:n,hiddenWhenEmpty:t,filter:i,search:r,limit:a,maxDropdownHeight:o,withScrollArea:l=!0,filterOptions:f=!0,withCheckIcon:c=!1,withAlignedLabels:h=!1,value:d,checkIconPosition:p,nothingFoundMessage:v,unstyled:b,labelId:w,renderOption:k,scrollAreaProps:_,"aria-label":C}){DI(e);const S=typeof r=="string"?(i||MI)({options:e,search:f?r:"",limit:a??1/0}):e,E=zee(S),j=S.map(O=>y.jsx(RI,{data:O,withCheckIcon:c,withAlignedLabels:h,value:d,checkIconPosition:p,unstyled:b,renderOption:k},wu(O)?O.group:`${O.value}`));return y.jsx(Mn.Dropdown,{hidden:n||t&&E,"data-composed":!0,children:y.jsxs(Mn.Options,{labelledBy:w,"aria-label":C,children:[l?y.jsx(xa.Autosize,{mah:o??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",..._,children:j}):j,E&&v&&y.jsx(Mn.Empty,{children:v})]})})}const jy=Re(e=>{const n=be("Autocomplete",{size:"sm"},e),{classNames:t,styles:i,unstyled:r,vars:a,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:f,onDropdownOpen:c,onFocus:h,onBlur:d,onClick:p,onChange:v,data:b,value:w,defaultValue:k,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:C,onOptionSubmit:S,comboboxProps:E,readOnly:j,disabled:O,filter:M,limit:$,withScrollArea:q,maxDropdownHeight:P,size:z,id:B,renderOption:V,autoComplete:U,scrollAreaProps:N,onClear:D,clearButtonProps:L,error:H,clearable:Y,clearSectionMode:R,rightSection:G,autoSelectOnBlur:W,openOnFocus:I=!0,attributes:X,...ee}=n,re=qi(B),se=_y(b),ye=Qm(se),[ae,le]=Mi({value:w,defaultValue:k,finalValue:"",onChange:v}),_e=Jm({opened:o,defaultOpened:l,onDropdownOpen:()=>{c==null||c(),C&&_e.selectFirstOption()},onDropdownClose:()=>{f==null||f(),setTimeout(_e.resetSelectedOption,0)}}),ne=Ne=>{le(Ne),_e.resetSelectedOption()},{resolvedClassNames:ze,resolvedStyles:we}=Hi({props:n,styles:i,classNames:t});A.useEffect(()=>{_&&_e.selectFirstOption()},[_,ae]);const Ce=y.jsx(Mn.ClearButton,{...L,onClear:()=>{ne(""),D==null||D()}});return y.jsxs(Mn,{store:_e,__staticSelector:"Autocomplete",classNames:ze,styles:we,unstyled:r,readOnly:j,size:z,attributes:X,keepMounted:W,onOptionSubmit:Ne=>{S==null||S(Ne),ne(ye[Ne].label),_e.closeDropdown()},...E,children:[y.jsx(Mn.Target,{autoComplete:U,withExpandedAttribute:!0,children:y.jsx(Ui,{...ee,size:z,__staticSelector:"Autocomplete",__clearSection:Ce,__clearable:Y&&!!ae&&!O&&!j,__clearSectionMode:R,rightSection:G,disabled:O,readOnly:j,value:ae,error:H,onChange:Ne=>{ne(Ne.currentTarget.value),_e.openDropdown(),_&&_e.selectFirstOption()},onFocus:Ne=>{I&&_e.openDropdown(),h==null||h(Ne)},onBlur:Ne=>{W&&_e.clickSelectedOption(),_e.closeDropdown(),d==null||d(Ne)},onClick:Ne=>{_e.openDropdown(),p==null||p(Ne)},classNames:ze,styles:we,unstyled:r,attributes:X,id:re})}),y.jsx(Ay,{data:se,hidden:j||O,filter:M,search:ae,limit:$,hiddenWhenEmpty:!0,withScrollArea:q,maxDropdownHeight:P,unstyled:r,labelId:ee.label?`${re}-label`:void 0,"aria-label":ee.label?void 0:ee["aria-label"],renderOption:V,scrollAreaProps:N})]})});jy.classes={...Ui.classes,...Mn.classes};jy.displayName="@mantine/core/Autocomplete";var Oy={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};const PI=A.createContext({withinGroup:!1}),NI=(e,{spacing:n})=>({group:{"--ag-spacing":Ut(n)}}),Ey=Re(e=>{const n=be("AvatarGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,spacing:f,attributes:c,...h}=n;return y.jsx(PI,{value:{withinGroup:!0},children:y.jsx(de,{...Xe({name:"AvatarGroup",classes:Oy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:c,vars:l,varsResolver:NI,rootSelector:"group"})("group"),...h})})});Ey.classes=Oy;Ey.varsResolver=NI;Ey.displayName="@mantine/core/AvatarGroup";function Iee(e){return y.jsx("svg",{...e,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function Bee(e){let n=0;for(let t=0;ti[0]).slice(0,n).join("").toUpperCase()}const $I=(e,{size:n,radius:t,variant:i,gradient:r,color:a,autoContrast:o,name:l,allowedInitialsColors:f})=>{const c=a==="initials"&&typeof l=="string"?qee(l,f):a,h=e.variantColorResolver({color:c||"gray",theme:e,gradient:r,variant:i||"light",autoContrast:o});return{root:{"--avatar-size":$n(n,"avatar-size"),"--avatar-radius":t===void 0?void 0:Yt(t),"--avatar-bg":c||i?h.background:void 0,"--avatar-color":c||i?h.color:void 0,"--avatar-bd":c||i?h.border:void 0}}},rs=yi(e=>{const n=be("Avatar",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,src:f,alt:c,radius:h,color:d,gradient:p,imageProps:v,children:b,autoContrast:w,mod:k,name:_,allowedInitialsColors:C,attributes:S,...E}=n,j=A.use(PI),[O,M]=A.useState(!f),$=Xe({name:"Avatar",props:n,classes:Oy,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:$I});return A.useEffect(()=>M(!f),[f]),y.jsx(de,{...$("root"),mod:[{"within-group":j.withinGroup},k],...E,children:O||!f?y.jsx("span",{...$("placeholder"),title:c,children:b||typeof _=="string"&&Hee(_)||y.jsx(Iee,{})}):y.jsx("img",{...v,...$("image"),src:f,alt:c,onError:q=>{var P;M(!0),(P=v==null?void 0:v.onError)==null||P.call(v,q)}})})});rs.classes=Oy;rs.varsResolver=$I;rs.displayName="@mantine/core/Avatar";rs.Group=Ey;var zI={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const LI=(e,{radius:n,color:t,gradient:i,variant:r,size:a,autoContrast:o,circle:l})=>{const f=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:o});return{root:{"--badge-height":$n(a,"badge-height"),"--badge-padding-x":$n(a,"badge-padding-x"),"--badge-fz":$n(a,"badge-fz"),"--badge-radius":l||n===void 0?void 0:Yt(n),"--badge-bg":t||r?f.background:void 0,"--badge-color":t||r?f.color:void 0,"--badge-bd":t||r?f.border:void 0,"--badge-dot-color":r==="dot"?ut(t,e):void 0}}},lt=yi(e=>{const n=be("Badge",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,radius:f,color:c,gradient:h,leftSection:d,rightSection:p,children:v,variant:b,fullWidth:w,autoContrast:k,circle:_,mod:C,attributes:S,...E}=n,j=Xe({name:"Badge",props:n,classes:zI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:LI});return y.jsxs(de,{variant:b,mod:[{block:w,circle:_,"with-right-section":!!p,"with-left-section":!!d},C],...j("root",{variant:b}),...E,children:[d&&y.jsx("span",{...j("section"),"data-position":"left",children:d}),y.jsx("span",{...j("label"),children:v}),p&&y.jsx("span",{...j("section"),"data-position":"right",children:p})]})});lt.classes=zI;lt.varsResolver=LI;lt.displayName="@mantine/core/Badge";var zc={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const cT={orientation:"horizontal"},II=(e,{borderWidth:n})=>({group:{"--button-border-width":pe(n)}}),Ty=Re(e=>{const n=be("ButtonGroup",cT,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:f,borderWidth:c,mod:h,attributes:d,...p}=be("ButtonGroup",cT,e);return y.jsx(de,{...Xe({name:"ButtonGroup",props:n,classes:zc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:f,varsResolver:II,rootSelector:"group"})("group"),mod:[{"data-orientation":l},h],role:"group",...p})});Ty.classes=zc;Ty.varsResolver=II;Ty.displayName="@mantine/core/ButtonGroup";const BI=(e,{radius:n,color:t,gradient:i,variant:r,autoContrast:a,size:o})=>{const l=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:a});return{groupSection:{"--section-height":$n(o,"section-height"),"--section-padding-x":$n(o,"section-padding-x"),"--section-fz":o!=null&&o.includes("compact")?ri(o.replace("compact-","")):ri(o),"--section-radius":n===void 0?void 0:Yt(n),"--section-bg":t||r?l.background:void 0,"--section-color":l.color,"--section-bd":t||r?l.border:void 0}}},My=Re(e=>{const n=be("ButtonGroupSection",null,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,vars:l,gradient:f,radius:c,autoContrast:h,attributes:d,...p}=n;return y.jsx(de,{...Xe({name:"ButtonGroupSection",props:n,classes:zc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:l,varsResolver:BI,rootSelector:"groupSection"})("groupSection"),...p})});My.classes=zc;My.varsResolver=BI;My.displayName="@mantine/core/ButtonGroupSection";const Uee={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${pe(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},FI=(e,{radius:n,color:t,gradient:i,variant:r,size:a,justify:o,autoContrast:l})=>{const f=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:l});return{root:{"--button-justify":o,"--button-height":$n(a,"button-height"),"--button-padding-x":$n(a,"button-padding-x"),"--button-fz":a!=null&&a.includes("compact")?ri(a.replace("compact-","")):ri(a),"--button-radius":n===void 0?void 0:Yt(n),"--button-bg":t||r?f.background:void 0,"--button-hover":t||r?f.hover:void 0,"--button-color":f.color,"--button-bd":t||r?f.border:void 0,"--button-hover-color":t||r?f.hoverColor:void 0}}},gt=yi(e=>{const n=be("Button",null,e),{style:t,vars:i,className:r,color:a,disabled:o,children:l,leftSection:f,rightSection:c,fullWidth:h,variant:d,radius:p,loading:v,loaderProps:b,gradient:w,classNames:k,styles:_,unstyled:C,"data-disabled":S,autoContrast:E,mod:j,attributes:O,...M}=n,$=Xe({name:"Button",props:n,classes:zc,className:r,style:t,classNames:k,styles:_,unstyled:C,attributes:O,vars:i,varsResolver:FI}),q=!!f,P=!!c;return y.jsxs(Dt,{...$("root",{active:!o&&!v&&!S}),unstyled:C,variant:d,disabled:o||v,mod:[{disabled:o||S,loading:v,block:h,"with-left-section":q,"with-right-section":P},j],...M,children:[typeof v=="boolean"&&y.jsx(is,{mounted:v,transition:Uee,duration:150,children:z=>y.jsx(de,{component:"span",...$("loader",{style:z}),"aria-hidden":!0,children:y.jsx(gi,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...b})})}),y.jsxs("span",{...$("inner"),children:[f&&y.jsx(de,{component:"span",...$("section"),mod:{position:"left"},children:f}),y.jsx(de,{component:"span",mod:{loading:v},...$("label"),children:l}),c&&y.jsx(de,{component:"span",...$("section"),mod:{position:"right"},children:c})]})]})});gt.classes=zc;gt.varsResolver=FI;gt.displayName="@mantine/core/Button";gt.Group=Ty;gt.GroupSection=My;const[Wee,Vee]=Gr("Card component was not found in tree");var AC={root:"m_e615b15f",section:"m_599a2148"};const Dy=yi(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,withBorder:o,inheritPadding:l,mod:f,...c}=be("CardSection",null,e),h=Vee();return y.jsx(de,{mod:[{"with-border":o,"inherit-padding":l},f],...h.getStyles("section",{className:t,style:i,styles:r,classNames:n}),...c})});Dy.classes=AC;Dy.displayName="@mantine/core/CardSection";const qI=(e,{padding:n})=>({root:{"--card-padding":Ut(n)}}),Gee={orientation:"vertical"},za=yi(e=>{const n=be("Card",Gee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:f,padding:c,attributes:h,orientation:d,...p}=n,v=Xe({name:"Card",props:n,classes:AC,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,varsResolver:qI}),b=A.Children.toArray(f),w=b.map((k,_)=>{var C;return typeof k=="object"&&k&&"type"in k&&(k.type===Dy||((C=k.type)==null?void 0:C.displayName)==="@mantine/core/CardSection")?A.cloneElement(k,{"data-orientation":d,"data-first-section":_===0||void 0,"data-last-section":_===b.length-1||void 0}):k});return y.jsx(Wee,{value:{getStyles:v},children:y.jsx(Et,{unstyled:o,"data-orientation":d,...v("root"),...p,children:w})})});za.classes=AC;za.varsResolver=qI;za.displayName="@mantine/core/Card";za.Section=Dy;var HI={root:"m_4451eb3a"};const Lc=yi(e=>{const n=be("Center",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,inline:f,mod:c,attributes:h,...d}=n,p=Xe({name:"Center",props:n,classes:HI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l});return y.jsx(de,{mod:[{inline:f},c],...p("root"),...d})});Lc.classes=HI;Lc.displayName="@mantine/core/Center";var UI={root:"m_de3d2490",colorOverlay:"m_862f3d1b",shadowOverlay:"m_98ae7f22",alphaOverlay:"m_95709ac0",childrenOverlay:"m_93e74e3"};const dT={withShadow:!0},WI=(e,{radius:n,size:t})=>({root:{"--cs-radius":n===void 0?void 0:Yt(n),"--cs-size":pe(t)}}),Ic=yi(e=>{const n=be("ColorSwatch",dT,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:f,radius:c,withShadow:h,children:d,attributes:p,...v}=be("ColorSwatch",dT,n),b=Xe({name:"ColorSwatch",props:n,classes:UI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:WI});return y.jsxs(de,{...b("root",{focusable:!0}),...v,children:[y.jsx("span",{...b("alphaOverlay")}),h&&y.jsx("span",{...b("shadowOverlay")}),y.jsx("span",{...b("colorOverlay",{style:{backgroundColor:f}})}),y.jsx("span",{...b("childrenOverlay"),children:d})]})});Ic.classes=UI;Ic.varsResolver=WI;Ic.displayName="@mantine/core/ColorSwatch";function ha(e,n=0,t=10**n){return Math.round(t*e)/t}function Yee({h:e,s:n,l:t,a:i}){const r=n*((t<50?t:100-t)/100);return{h:e,s:r>0?2*r/(t+r)*100:0,v:t+r,a:i}}const Kee={grad:360/400,turn:360,rad:360/(Math.PI*2)};function Xee(e,n="deg"){return Number(e)*(Kee[n]||1)}const Zee=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function hT(e){const n=Zee.exec(e);return n?Yee({h:Xee(n[1],n[2]),s:Number(n[3]),l:Number(n[4]),a:n[5]===void 0?1:Number(n[5])/(n[6]?100:1)}):{h:0,s:0,v:0,a:1}}function SS({r:e,g:n,b:t,a:i}){const r=Math.max(e,n,t),a=r-Math.min(e,n,t),o=a?r===e?(n-t)/a:r===n?2+(t-e)/a:4+(e-n)/a:0;return{h:ha(60*(o<0?o+6:o),3),s:ha(r?a/r*100:0,3),v:ha(r/255*100,3),a:i}}function CS(e){const n=e[0]==="#"?e.slice(1):e;return n.length===3?SS({r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:1}):SS({r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:1})}function Qee(e){const n=e[0]==="#"?e.slice(1):e,t=a=>ha(parseInt(a,16)/255,3);if(n.length===4){const a=n.slice(0,3),o=t(n[3]+n[3]);return{...CS(a),a:o}}const i=n.slice(0,6),r=t(n.slice(6,8));return{...CS(i),a:r}}const Jee=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function mT(e){const n=Jee.exec(e);return n?SS({r:Number(n[1])/(n[2]?100/255:1),g:Number(n[3])/(n[4]?100/255:1),b:Number(n[5])/(n[6]?100/255:1),a:n[7]===void 0?1:Number(n[7])/(n[8]?100:1)}):{h:0,s:0,v:0,a:1}}const VI={hex:/^#?([0-9A-F]{3}){1,2}$/i,hexa:/^#?([0-9A-F]{4}){1,2}$/i,rgb:/^rgb\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,rgba:/^rgba\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,hsl:/hsl\(\s*(\d+)\s*,\s*(\d+(?:\.\d+)?%)\s*,\s*(\d+(?:\.\d+)?%)\)/i,hsla:/^hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*(\d*(?:\.\d+)?)\)$/i},ene={hex:CS,hexa:Qee,rgb:mT,rgba:mT,hsl:hT,hsla:hT};function nne(e){for(const[,n]of Object.entries(VI))if(n.test(e))return!0;return!1}function Fv(e){if(typeof e!="string")return{h:0,s:0,v:0,a:1};if(e==="transparent")return{h:0,s:0,v:0,a:0};const n=e.trim();for(const[t,i]of Object.entries(VI))if(i.test(n))return ene[t](n);return{h:0,s:0,v:0,a:1}}const Ry=A.createContext(null);function jC({position:e,...n}){return y.jsx(de,{__vars:{"--thumb-y-offset":`${e.y*100}%`,"--thumb-x-offset":`${e.x*100}%`},...n})}jC.displayName="@mantine/core/ColorPickerThumb";var Py={wrapper:"m_fee9c77",preview:"m_9dddfbac",body:"m_bffecc3e",sliders:"m_3283bb96",thumb:"m_40d572ba",swatch:"m_d8ee6fd8",swatches:"m_5711e686",saturation:"m_202a296e",saturationOverlay:"m_11b3db02",slider:"m_d856d47d",sliderOverlay:"m_8f327113"};const Bc=Re(e=>{var H;const n=be("ColorSlider",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,onChange:f,onChangeEnd:c,maxValue:h,round:d,size:p="md",focusable:v=!0,value:b,overlays:w,thumbColor:k="transparent",onScrubStart:_,onScrubEnd:C,__staticSelector:S="ColorPicker",attributes:E,ref:j,...O}=n,M=Xe({name:S,classes:Py,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:E,rootSelector:"slider"}),$=((H=A.use(Ry))==null?void 0:H.getStyles)||M,q=ui(),[P,z]=A.useState({y:0,x:b/h}),B=A.useRef(P),V=Y=>d?Math.round(Y*h):Y*h,{ref:U}=kz(({x:Y,y:R})=>{B.current={x:Y,y:R},f==null||f(V(Y))},{onScrubEnd:()=>{const{x:Y}=B.current;c==null||c(V(Y)),C==null||C()},onScrubStart:_});ns(()=>{z({y:0,x:b/h})},[b]);const N=(Y,R)=>{Y.preventDefault();const G=wz(R);f==null||f(V(G.x)),c==null||c(V(G.x))},D=Y=>{switch(Y.key){case"ArrowRight":N(Y,{x:P.x+.05,y:P.y});break;case"ArrowLeft":N(Y,{x:P.x-.05,y:P.y});break}},L=w.map((Y,R)=>A.createElement("div",{...$("sliderOverlay"),style:Y,key:R}));return y.jsxs(de,{...O,ref:Bt(U,j),...$("slider"),size:p,role:"slider","aria-valuenow":b,"aria-valuemax":h,"aria-valuemin":0,tabIndex:v?0:-1,onKeyDown:D,"data-focus-ring":q.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${p})`},children:[L,y.jsx(jC,{position:P,...$("thumb",{style:{top:pe(1),background:k}})})]})});Bc.displayName="@mantine/core/ColorSlider";Bc.classes=Py;const tne={__staticSelector:"AlphaSlider"},OC=Re(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=be("AlphaSlider",tne,e);return y.jsx(Bc,{...a,value:n,onChange:o=>t==null?void 0:t(ha(o,2)),onChangeEnd:o=>i==null?void 0:i(ha(o,2)),maxValue:1,round:!1,"data-alpha":!0,overlays:[{backgroundImage:"linear-gradient(45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(-45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--slider-checkers) 75%), linear-gradient(-45deg, var(--mantine-color-body) 75%, var(--slider-checkers) 75%)",backgroundSize:`${pe(8)} ${pe(8)}`,backgroundPosition:`0 0, 0 ${pe(4)}, ${pe(4)} ${pe(-4)}, ${pe(-4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${r})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${pe(1)} inset, rgb(0, 0, 0, .15) 0 0 ${pe(4)} inset`}]})});OC.displayName="@mantine/core/AlphaSlider";OC.classes=Bc.classes;function GI({h:e,s:n,v:t,a:i}){const r=e/360*6,a=n/100,o=t/100,l=Math.floor(r),f=o*(1-a),c=o*(1-(r-l)*a),h=o*(1-(1-r+l)*a),d=l%6;return{r:ha([o,c,f,f,h,o][d]*255),g:ha([h,o,o,c,f,f][d]*255),b:ha([f,f,h,o,o,c][d]*255),a:ha(i,2)}}function pT(e,n){const{r:t,g:i,b:r,a}=GI(e);return n?`rgba(${t}, ${i}, ${r}, ${ha(a,2)})`:`rgb(${t}, ${i}, ${r})`}function vT({h:e,s:n,v:t,a:i},r){const a=(200-n)*t/100,o={h:Math.round(e),s:Math.round(a>0&&a<200?n*t/100/(a<=100?a:200-a)*100:0),l:Math.round(a/2)};return r?`hsla(${o.h}, ${o.s}%, ${o.l}%, ${ha(i,2)})`:`hsl(${o.h}, ${o.s}%, ${o.l}%)`}function wg(e){const n=e.toString(16);return n.length<2?`0${n}`:n}function YI(e){const{r:n,g:t,b:i}=GI(e);return`#${wg(n)}${wg(t)}${wg(i)}`}function ine(e){const n=Math.round(e.a*255);return`${YI(e)}${wg(n)}`}const _k={hex:YI,hexa:e=>ine(e),rgb:e=>pT(e,!1),rgba:e=>pT(e,!0),hsl:e=>vT(e,!1),hsla:e=>vT(e,!0)};function Us(e,n){return n?e in _k?_k[e](n):_k.hex(n):"#000000"}const rne={__staticSelector:"HueSlider"},EC=Re(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=be("HueSlider",rne,e);return y.jsx(Bc,{...a,value:n,onChange:t,onChangeEnd:i,maxValue:360,thumbColor:`hsl(${n}, 100%, 50%)`,round:!0,"data-hue":!0,overlays:[{backgroundImage:"linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(170,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%))"},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${pe(1)} inset, rgb(0, 0, 0, .15) 0 0 ${pe(4)} inset`}]})});EC.displayName="@mantine/core/HueSlider";EC.classes=Bc.classes;function KI({className:e,onChange:n,onChangeEnd:t,value:i,saturationLabel:r,focusable:a=!0,size:o,color:l,onScrubStart:f,onScrubEnd:c,...h}){const{getStyles:d}=A.use(Ry),[p,v]=A.useState({x:i.s/100,y:1-i.v/100}),b=A.useRef(p),{ref:w}=kz(({x:C,y:S})=>{b.current={x:C,y:S},n({s:Math.round(C*100),v:Math.round((1-S)*100)})},{onScrubEnd:()=>{const{x:C,y:S}=b.current;t({s:Math.round(C*100),v:Math.round((1-S)*100)}),c==null||c()},onScrubStart:f});A.useEffect(()=>{v({x:i.s/100,y:1-i.v/100})},[i.s,i.v]);const k=(C,S)=>{C.preventDefault();const E=wz(S);n({s:Math.round(E.x*100),v:Math.round((1-E.y)*100)}),t({s:Math.round(E.x*100),v:Math.round((1-E.y)*100)})},_=C=>{switch(C.key){case"ArrowUp":k(C,{y:p.y-.05,x:p.x});break;case"ArrowDown":k(C,{y:p.y+.05,x:p.x});break;case"ArrowRight":k(C,{x:p.x+.05,y:p.y});break;case"ArrowLeft":k(C,{x:p.x-.05,y:p.y});break}};return y.jsxs(de,{...d("saturation"),ref:w,...h,role:"slider","aria-label":r,"aria-valuenow":p.x,"aria-valuetext":Us("rgba",i),tabIndex:a?0:-1,onKeyDown:_,children:[y.jsx("div",{...d("saturationOverlay",{style:{backgroundColor:`hsl(${i.h}, 100%, 50%)`}})}),y.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}})}),y.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}})}),y.jsx(jC,{position:p,...d("thumb",{style:{backgroundColor:l}})})]})}KI.displayName="@mantine/core/Saturation";function XI({className:e,datatype:n,setValue:t,onChangeEnd:i,size:r,focusable:a,data:o,swatchesPerRow:l,value:f,...c}){const h=A.use(Ry),d=o.map((p,v)=>A.createElement(Ic,{...h.getStyles("swatch"),unstyled:h.unstyled,component:"button",type:"button",color:p,key:v,radius:"sm",onClick:()=>{t(p),i==null||i(p)},"aria-label":p,tabIndex:a?0:-1,"data-swatch":!0},f===p&&y.jsx(CC,{size:"35%",color:Cz(p)<.5?"white":"black"})));return y.jsx(de,{...h.getStyles("swatches"),...c,children:d})}XI.displayName="@mantine/core/Swatches";const ane={swatchesPerRow:7,withPicker:!0,focusable:!0,size:"md",__staticSelector:"ColorPicker"},ZI=(e,{size:n,swatchesPerRow:t})=>({wrapper:{"--cp-preview-size":$n(n,"cp-preview-size"),"--cp-width":$n(n,"cp-width"),"--cp-body-spacing":Ut(n),"--cp-swatch-size":`${100/t}%`,"--cp-thumb-size":$n(n,"cp-thumb-size"),"--cp-saturation-height":$n(n,"cp-saturation-height")}}),Ny=Re(e=>{const n=be("ColorPicker",ane,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,format:f="hex",value:c,defaultValue:h,onChange:d,onChangeEnd:p,withPicker:v,size:b,saturationLabel:w,hueLabel:k,alphaLabel:_,focusable:C,swatches:S,swatchesPerRow:E,fullWidth:j,onColorSwatchClick:O,__staticSelector:M,mod:$,attributes:q,name:P,hiddenInputProps:z,...B}=n,V=Xe({name:M,props:n,classes:Py,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:q,rootSelector:"wrapper",vars:l,varsResolver:ZI}),U=A.useRef(f||"hex"),N=A.useRef(""),D=A.useRef(-1),L=A.useRef(!1),H=f==="hexa"||f==="rgba"||f==="hsla",[Y,R,G]=Mi({value:c,defaultValue:h,finalValue:"#FFFFFF",onChange:d}),[W,I]=A.useState(Fv(Y)),X=()=>{window.clearTimeout(D.current),L.current=!0},ee=()=>{window.clearTimeout(D.current),D.current=window.setTimeout(()=>{L.current=!1},200)},re=se=>{I(ye=>{const ae={...ye,...se};return N.current=Us(U.current,ae),ae}),R(N.current)};return ns(()=>{typeof c=="string"&&nne(c)&&!L.current&&I(Fv(c))},[c]),ns(()=>{U.current=f||"hex",R(Us(U.current,W))},[f]),y.jsx(Ry,{value:{getStyles:V,unstyled:o},children:y.jsxs(de,{...V("wrapper"),size:b,mod:[{"full-width":j},$],...B,children:[P&&y.jsx("input",{type:"hidden",name:P,value:Y,...z}),v&&y.jsxs(y.Fragment,{children:[y.jsx(KI,{value:W,onChange:re,onChangeEnd:({s:se,v:ye})=>p==null?void 0:p(Us(U.current,{...W,s:se,v:ye})),color:Y,size:b,focusable:C,saturationLabel:w,onScrubStart:X,onScrubEnd:ee}),y.jsxs("div",{...V("body"),children:[y.jsxs("div",{...V("sliders"),children:[y.jsx(EC,{value:W.h,onChange:se=>re({h:se}),onChangeEnd:se=>p==null?void 0:p(Us(U.current,{...W,h:se})),size:b,focusable:C,"aria-label":k,onScrubStart:X,onScrubEnd:ee}),H&&y.jsx(OC,{value:W.a,onChange:se=>re({a:se}),onChangeEnd:se=>{p==null||p(Us(U.current,{...W,a:se}))},size:b,color:Us("hex",W),focusable:C,"aria-label":_,onScrubStart:X,onScrubEnd:ee})]}),H&&y.jsx(Ic,{color:Y,radius:"sm",size:"var(--cp-preview-size)",...V("preview")})]})]}),Array.isArray(S)&&y.jsx(XI,{data:S,swatchesPerRow:E,focusable:C,setValue:R,value:Y,onChangeEnd:se=>{const ye=Us(f,Fv(se));O==null||O(ye),p==null||p(ye),G||I(Fv(se))}})]})})});Ny.classes=Py;Ny.varsResolver=ZI;Ny.displayName="@mantine/core/ColorPicker";var QI={root:"m_3eebeb36",label:"m_9e365f20"};const one={orientation:"horizontal"},JI=(e,{color:n,variant:t,size:i})=>({root:{"--divider-color":n?ut(n,e):void 0,"--divider-border-style":t,"--divider-size":$n(i,"divider-size")}}),Fc=Re(e=>{const n=be("Divider",one,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:f,orientation:c,label:h,labelPosition:d,mod:p,attributes:v,...b}=n,w=Xe({name:"Divider",classes:QI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:l,varsResolver:JI});return y.jsx(de,{mod:[{orientation:c,withLabel:!!h},p],role:"separator",...w("root"),...b,children:h&&y.jsx(de,{component:"span",mod:{position:d},...w("label"),children:h})})});Fc.classes=QI;Fc.varsResolver=JI;Fc.displayName="@mantine/core/Divider";const TC=Hm(e=>{const{onChange:n,children:t,multiple:i,accept:r,name:a,form:o,resetRef:l,disabled:f,capture:c,inputProps:h,ref:d,...p}=be("FileButton",null,e),v=A.useRef(null),b=()=>{var _;!f&&((_=v.current)==null||_.click())},w=_=>{if(_.currentTarget.files===null)return n(i?[]:null);n(i?Array.from(_.currentTarget.files):_.currentTarget.files[0]||null)};return Wh(l,()=>{v.current&&(v.current.value="")}),y.jsxs(y.Fragment,{children:[y.jsx("input",{style:{display:"none"},type:"file",accept:r,multiple:i,onChange:w,ref:Bt(d,v),name:a,form:o,capture:c,...h}),t({onClick:b,...p})]})});TC.displayName="@mantine/core/FileButton";const[gT,eB]=Gr("Grid component was not found in tree"),AS=(e,n)=>{if(e==="content")return"auto";if(e==="auto")return"0rem";if(e)return e===n?"100%":`calc(${100*e/n}% - ${(n-e)/n} * var(--grid-column-gap))`},yT=(e,n,t)=>t||e==="auto"?"100%":e==="content"?"unset":AS(e,n),bT=(e,n)=>{if(e)return e==="auto"||n?"1":"auto"},wT=(e,n)=>{if(e===0)return"0";if(e)return`calc(${100*e/n}% + ${e/n} * var(--grid-column-gap))`};function sne({span:e,order:n,offset:t,align:i,selector:r}){var v;const a=ui(),o=eB(),l=o.breakpoints||a.breakpoints,f=Wr(e),c=f===void 0?12:f,h=Tu({"--col-order":(v=Wr(n))==null?void 0:v.toString(),"--col-flex-grow":bT(c,o.grow),"--col-flex-basis":AS(c,o.columns),"--col-width":c==="content"?"auto":void 0,"--col-max-width":yT(c,o.columns,o.grow),"--col-offset":wT(Wr(t),o.columns),"--col-align-self":Wr(i)}),d=Pt(l).reduce((b,w)=>{var k;return b[w]||(b[w]={}),typeof n=="object"&&n[w]!==void 0&&(b[w]["--col-order"]=(k=n[w])==null?void 0:k.toString()),typeof e=="object"&&e[w]!==void 0&&(b[w]["--col-flex-grow"]=bT(e[w],o.grow),b[w]["--col-flex-basis"]=AS(e[w],o.columns),b[w]["--col-width"]=e[w]==="content"?"auto":void 0,b[w]["--col-max-width"]=yT(e[w],o.columns,o.grow)),typeof t=="object"&&t[w]!==void 0&&(b[w]["--col-offset"]=wT(t[w],o.columns)),typeof i=="object"&&i[w]!==void 0&&(b[w]["--col-align-self"]=i[w]),b},{}),p=Uh(Pt(d),l).filter(b=>Pt(d[b.value]).length>0).map(b=>({query:o.type==="container"?`mantine-grid (min-width: ${l[b.value]})`:`(min-width: ${l[b.value]})`,styles:d[b.value]}));return y.jsx(Dc,{styles:h,media:o.type==="container"?void 0:p,container:o.type==="container"?p:void 0,selector:r})}var MC={container:"m_8478a6da",root:"m_410352e9",inner:"m_dee7bd2f",col:"m_96bdd299"};const lne={span:12},DC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,span:o,order:l,offset:f,align:c,...h}=be("GridCol",lne,e),d=eB(),p=uy();return y.jsxs(y.Fragment,{children:[y.jsx(sne,{selector:`.${p}`,span:o,order:l,offset:f,align:c}),y.jsx(de,{...d.getStyles("col",{className:hn(t,p),style:i,classNames:n,styles:r}),...h})]})});DC.classes=MC;DC.displayName="@mantine/core/GridCol";function kT({gap:e,rowGap:n,columnGap:t,selector:i,breakpoints:r,type:a}){const o=ui(),l=r||o.breakpoints,f=Tu({"--grid-gap":Ut(Wr(e)),"--grid-row-gap":Ut(Wr(n)),"--grid-column-gap":Ut(Wr(t))}),c=Pt(l).reduce((d,p)=>(d[p]||(d[p]={}),typeof e=="object"&&e[p]!==void 0&&(d[p]["--grid-gap"]=Ut(e[p])),typeof n=="object"&&n[p]!==void 0&&(d[p]["--grid-row-gap"]=Ut(n[p])),typeof t=="object"&&t[p]!==void 0&&(d[p]["--grid-column-gap"]=Ut(t[p])),d),{}),h=Uh(Pt(c),l).filter(d=>Pt(c[d.value]).length>0).map(d=>({query:a==="container"?`mantine-grid (min-width: ${l[d.value]})`:`(min-width: ${l[d.value]})`,styles:c[d.value]}));return y.jsx(Dc,{styles:f,media:a==="container"?void 0:h,container:a==="container"?h:void 0,selector:i})}const une={gap:"md",columns:12},nB=(e,{justify:n,align:t,overflow:i})=>({root:{"--grid-justify":n,"--grid-align":t,"--grid-overflow":i}}),qr=Re(e=>{const n=be("Grid",une,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,grow:f,gap:c,rowGap:h,columnGap:d,columns:p,align:v,justify:b,children:w,breakpoints:k,type:_,attributes:C,...S}=n,E=Xe({name:"Grid",classes:MC,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:nB}),j=uy();return _==="container"&&k?y.jsxs(gT,{value:{getStyles:E,grow:f,columns:p,breakpoints:k,type:_},children:[y.jsx(kT,{selector:`.${j}`,...n}),y.jsx("div",{...E("container"),children:y.jsx(de,{...E("root",{className:j}),...S,children:y.jsx("div",{...E("inner"),children:w})})})]}):y.jsxs(gT,{value:{getStyles:E,grow:f,columns:p,breakpoints:k,type:_},children:[y.jsx(kT,{selector:`.${j}`,...n}),y.jsx(de,{...E("root",{className:j}),...S,children:y.jsx("div",{...E("inner"),children:w})})]})});qr.classes=MC;qr.varsResolver=nB;qr.displayName="@mantine/core/Grid";qr.Col=DC;var tB={root:"m_9e117634"};const iB=(e,{radius:n,fit:t})=>({root:{"--image-radius":n===void 0?void 0:Yt(n),"--image-object-fit":t}}),ep=yi(e=>{const n=be("Image",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,onError:f,src:c,radius:h,fit:d,fallbackSrc:p,mod:v,attributes:b,...w}=n,[k,_]=A.useState(!c);A.useEffect(()=>_(!c),[c]);const C=Xe({name:"Image",classes:tB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l,varsResolver:iB});return k&&p?y.jsx(de,{component:"img",src:p,...C("root"),onError:f,mod:["fallback",v],...w}):y.jsx(de,{component:"img",...C("root"),src:c,onError:S=>{f==null||f(S),_(!0)},mod:v,...w})});ep.classes=tB;ep.varsResolver=iB;ep.displayName="@mantine/core/Image";const fne=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],_T={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"};function xT(e){Object.keys(_T).forEach(n=>{e.style.setProperty(n,_T[n],"important")})}function cne(e){const n=window.getComputedStyle(e);if(n===null)return null;const t={};for(const i of fne)t[i]=n[i];return t.boxSizing===""?null:{sizingStyle:t,paddingSize:parseFloat(t.paddingBottom)+parseFloat(t.paddingTop),borderSize:parseFloat(t.borderBottomWidth)+parseFloat(t.borderTopWidth)}}let Oi=null;function dne(e,n,t=1,i=1/0){Oi||(Oi=document.createElement("textarea"),Oi.setAttribute("tabindex","-1"),Oi.setAttribute("aria-hidden","true"),Oi.setAttribute("aria-label","autosize measurement"),xT(Oi)),Oi.parentNode===null&&document.body.appendChild(Oi);const{paddingSize:r,borderSize:a,sizingStyle:o}=e,{boxSizing:l}=o;Object.keys(o).forEach(p=>{Oi.style[p]=o[p]}),xT(Oi),Oi.value=n;let f=l==="border-box"?Oi.scrollHeight+a:Oi.scrollHeight-r;Oi.value=n,f=l==="border-box"?Oi.scrollHeight+a:Oi.scrollHeight-r,Oi.value="x";const c=Oi.scrollHeight-r;let h=c*t;l==="border-box"&&(h=h+r+a),f=Math.max(h,f);let d=c*i;return l==="border-box"&&(d=d+r+a),f=Math.min(d,f),[f,c]}function hne({maxRows:e,minRows:n,onChange:t,ref:i,...r}){const a=r.value!==void 0,o=A.useRef(null),l=Bt(o,i),f=A.useRef(0),c=()=>{const d=o.current;if(!d)return;const p=cne(d);if(!p)return;const[v]=dne(p,d.value||d.placeholder||"x",n,e);f.current!==v&&(f.current=v,d.style.setProperty("height",`${v}px`,"important"))},h=d=>{a||c(),t==null||t(d)};return A.useLayoutEffect(c),A.useEffect(()=>{const d=()=>c();return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]),A.useEffect(()=>{const d=()=>c();return document.fonts.addEventListener("loadingdone",d),()=>document.fonts.removeEventListener("loadingdone",d)},[]),A.useEffect(()=>{const d=p=>{var v;if(((v=o.current)==null?void 0:v.form)===p.target&&!a){const b=o.current.value;requestAnimationFrame(()=>{o.current&&b!==o.current.value&&c()})}};return document.body.addEventListener("reset",d),()=>document.body.removeEventListener("reset",d)},[a]),y.jsx("textarea",{...r,onChange:h,ref:l})}const mne={size:"sm"},ku=Re(e=>{const{autosize:n,maxRows:t,minRows:i,__staticSelector:r,resize:a,...o}=be("Textarea",mne,e),l=n&&FK()!=="test",f=l?{maxRows:t,minRows:i}:{};return y.jsx(Ui,{component:l?hne:"textarea",...o,__staticSelector:r||"Textarea",multiline:!0,"data-no-overflow":n&&t===void 0||void 0,__vars:{"--input-resize":a},...f})});ku.classes=Ui.classes;ku.displayName="@mantine/core/Textarea";const[pne,gl]=Gr("Menu component was not found in the tree");var yl={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504",chevron:"m_b85b0bed"};const RC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("MenuDivider",null,e);return y.jsx(de,{...gl().getStyles("divider",{className:t,style:i,styles:r,classNames:n}),...o})});RC.classes=yl;RC.displayName="@mantine/core/MenuDivider";const PC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,onMouseEnter:o,onMouseLeave:l,onKeyDown:f,children:c,ref:h,...d}=be("MenuDropdown",null,e),p=A.useRef(null),v=gl(),b=kr(f,_=>{var C,S;(_.key==="ArrowUp"||_.key==="ArrowDown")&&(_.preventDefault(),(S=(C=p.current)==null?void 0:C.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||S.focus())}),w=kr(o,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.openDropdown()),k=kr(l,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.closeDropdown());return y.jsxs(Tn.Dropdown,{...d,onMouseEnter:w,onMouseLeave:k,role:"menu","aria-orientation":"vertical",ref:Bt(h,p),...v.getStyles("dropdown",{className:t,style:i,styles:r,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:b,children:[v.withInitialFocusPlaceholder&&y.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),c]})});PC.classes=yl;PC.displayName="@mantine/core/MenuDropdown";const Xh=A.createContext(null),NC=yi(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,color:o,closeMenuOnClick:l,leftSection:f,rightSection:c,children:h,disabled:d,"data-disabled":p,ref:v,...b}=be("MenuItem",null,e),w=gl(),k=A.use(Xh),_=ui(),{dir:C}=Ru(),S=A.useRef(null),E=b,j=kr(E.onClick,()=>{p||(typeof l=="boolean"?l&&w.closeDropdownImmediately():w.closeOnItemClick&&w.closeDropdownImmediately())}),O=o?_.variantColorResolver({color:o,theme:_,variant:"light"}):void 0,M=o?fs({color:o,theme:_}):null,$=kr(E.onKeyDown,q=>{q.key==="ArrowLeft"&&k&&(k.close(),k.focusParentItem())});return y.jsxs(Dt,{onMouseDown:q=>q.preventDefault(),...b,unstyled:w.unstyled,tabIndex:w.menuItemTabIndex,...w.getStyles("item",{className:t,style:i,styles:r,classNames:n}),ref:Bt(S,v),role:"menuitem",disabled:d,"data-menu-item":!0,"data-disabled":d||p||void 0,"data-mantine-stop-propagation":!0,onClick:j,onKeyDown:N6({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:w.loop,dir:C,orientation:"vertical",onKeyDown:$}),__vars:{"--menu-item-color":M!=null&&M.isThemeColor&&(M==null?void 0:M.shade)===void 0?`var(--mantine-color-${M.color}-6)`:O==null?void 0:O.color,"--menu-item-hover":O==null?void 0:O.hover},children:[f&&y.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"left",children:f}),h&&y.jsx("div",{...w.getStyles("itemLabel",{styles:r,classNames:n}),children:h}),c&&y.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"right",children:c})]})});NC.classes=yl;NC.displayName="@mantine/core/MenuItem";const $C=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("MenuLabel",null,e);return y.jsx(de,{...gl().getStyles("label",{className:t,style:i,styles:r,classNames:n}),...o})});$C.classes=yl;$C.displayName="@mantine/core/MenuLabel";const zC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,onMouseEnter:o,onMouseLeave:l,onKeyDown:f,children:c,ref:h,...d}=be("MenuSubDropdown",null,e),p=A.useRef(null),v=gl(),b=A.use(Xh),w=kr(o,b==null?void 0:b.open),k=kr(l,b==null?void 0:b.close);return y.jsx(Tn.Dropdown,{...d,onMouseEnter:w,onMouseLeave:k,role:"menu","aria-orientation":"vertical",ref:Bt(h,p),...v.getStyles("dropdown",{className:t,style:i,styles:r,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:c})});zC.classes=yl;zC.displayName="@mantine/core/MenuSubDropdown";const LC=yi(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,color:o,leftSection:l,rightSection:f,children:c,disabled:h,"data-disabled":d,closeMenuOnClick:p,ref:v,...b}=be("MenuSubItem",null,e),w=gl(),k=A.use(Xh),_=ui(),{dir:C}=Ru(),S=A.useRef(null),E=b,j=o?_.variantColorResolver({color:o,theme:_,variant:"light"}):void 0,O=o?fs({color:o,theme:_}):null,M=kr(E.onKeyDown,z=>{z.key==="ArrowRight"&&(k==null||k.open(),k==null||k.focusFirstItem()),z.key==="ArrowLeft"&&(k!=null&&k.parentContext)&&(k.parentContext.close(),k.parentContext.focusParentItem())}),$=kr(E.onClick,()=>{!d&&p&&w.closeDropdownImmediately()}),q=kr(E.onMouseEnter,k==null?void 0:k.open),P=kr(E.onMouseLeave,k==null?void 0:k.close);return y.jsxs(Dt,{onMouseDown:z=>z.preventDefault(),...b,unstyled:w.unstyled,tabIndex:w.menuItemTabIndex,...w.getStyles("item",{className:t,style:i,styles:r,classNames:n}),ref:Bt(S,v),role:"menuitem",disabled:h,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":h||d||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:q,onMouseLeave:P,onClick:$,onKeyDown:N6({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:w.loop,dir:C,orientation:"vertical",onKeyDown:M}),__vars:{"--menu-item-color":O!=null&&O.isThemeColor&&(O==null?void 0:O.shade)===void 0?`var(--mantine-color-${O.color}-6)`:j==null?void 0:j.color,"--menu-item-hover":j==null?void 0:j.hover},children:[l&&y.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"left",children:l}),c&&y.jsx("div",{...w.getStyles("itemLabel",{styles:r,classNames:n}),children:c}),y.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"right",children:f||y.jsx(Lg,{...w.getStyles("chevron"),size:14})})]})});LC.classes=yl;LC.displayName="@mantine/core/MenuSubItem";function rB({children:e,refProp:n}){if(!P6(e))throw new Error("Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return gl(),y.jsx(Tn.Target,{refProp:n,popupType:"menu",children:e})}rB.displayName="@mantine/core/MenuSubTarget";const vne={offset:0,position:"right-start",transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function qc(e){const{children:n,closeDelay:t,openDelay:i,...r}=be("MenuSub",vne,e),a=qi(),[o,{open:l,close:f}]=_z(!1),c=A.use(Xh),{openDropdown:h,closeDropdown:d}=gL({open:l,close:f,closeDelay:t,openDelay:i}),p=()=>window.setTimeout(()=>{var b,w;(w=(b=document.getElementById(`${a}-dropdown`))==null?void 0:b.querySelectorAll("[data-menu-item]:not([data-disabled])")[0])==null||w.focus()},16),v=()=>window.setTimeout(()=>{var b;(b=document.getElementById(`${a}-target`))==null||b.focus()},16);return y.jsx(Xh,{value:{opened:o,close:d,open:h,focusFirstItem:p,focusParentItem:v,parentContext:c},children:y.jsx(Tn,{opened:o,withinPortal:!1,withArrow:!1,id:a,...r,children:n})})}qc.extend=e=>e;qc.displayName="@mantine/core/MenuSub";qc.Target=rB;qc.Dropdown=zC;qc.Item=LC;const gne={refProp:"ref"};function aB(e){const{children:n,refProp:t,...i}=be("MenuTarget",gne,e),r=Mu(n);if(!r)throw new Error("Menu.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=gl(),o=r.props,l=kr(o.onClick,()=>{a.trigger==="click"?a.toggleDropdown():a.trigger==="click-hover"&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),f=kr(o.onMouseEnter,()=>(a.trigger==="hover"||a.trigger==="click-hover")&&a.openDropdown()),c=kr(o.onMouseLeave,()=>{(a.trigger==="hover"||a.trigger==="click-hover"&&!a.openedViaClick)&&a.closeDropdown()});return y.jsx(Tn.Target,{refProp:t,popupType:"menu",...i,children:A.cloneElement(r,{onClick:l,onMouseEnter:f,onMouseLeave:c,"data-expanded":a.opened?!0:void 0})})}aB.displayName="@mantine/core/MenuTarget";const yne={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1},Wn=Re(e=>{const n=be("Menu",yne,e),{children:t,onOpen:i,onClose:r,opened:a,defaultOpened:o,trapFocus:l,onChange:f,closeOnItemClick:c,loop:h,closeOnEscape:d,trigger:p,openDelay:v,closeDelay:b,classNames:w,styles:k,unstyled:_,variant:C,vars:S,menuItemTabIndex:E,keepMounted:j,withInitialFocusPlaceholder:O,attributes:M,...$}=n,q=Xe({name:"Menu",classes:yl,props:n,classNames:w,styles:k,unstyled:_,attributes:M}),[P,z]=Mi({value:a,defaultValue:o,finalValue:!1,onChange:f}),[B,V]=A.useState(!1),U=()=>{z(!1),V(!1),P&&(r==null||r())},N=()=>{z(!0),!P&&(i==null||i())},D=()=>{P?U():N()},{openDropdown:L,closeDropdown:H}=gL({open:N,close:U,closeDelay:b,openDelay:v}),Y=W=>_K("[data-menu-item]","[data-menu-dropdown]",W),{resolvedClassNames:R,resolvedStyles:G}=Hi({classNames:w,styles:k,props:n});return y.jsx(pne,{value:{getStyles:q,opened:P,toggleDropdown:D,getItemIndex:Y,openedViaClick:B,setOpenedViaClick:V,closeOnItemClick:c,closeDropdown:p==="click"?U:H,openDropdown:p==="click"?N:L,closeDropdownImmediately:U,loop:h,trigger:p,unstyled:_,menuItemTabIndex:E,withInitialFocusPlaceholder:O},children:y.jsx(Tn,{returnFocus:!0,...$,opened:P,onChange:D,defaultOpened:o,trapFocus:j?!1:l,closeOnEscape:d,__staticSelector:"Menu",classNames:R,styles:G,unstyled:_,variant:C,keepMounted:j,children:t})})});Wn.displayName="@mantine/core/Menu";Wn.classes=yl;Wn.Item=NC;Wn.Label=$C;Wn.Dropdown=PC;Wn.Target=aB;Wn.Divider=RC;Wn.Sub=qc;const[bne,Hc]=Gr("Modal component was not found in tree");var ds={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};const $y=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalBody",null,e);return y.jsx(GL,{...Hc().getStyles("body",{classNames:n,style:i,styles:r,className:t}),...o})});$y.classes=ds;$y.displayName="@mantine/core/ModalBody";const zy=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalCloseButton",null,e);return y.jsx(YL,{...Hc().getStyles("close",{classNames:n,style:i,styles:r,className:t}),...o})});zy.classes=ds;zy.displayName="@mantine/core/ModalCloseButton";const Ly=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,children:o,__hidden:l,...f}=be("ModalContent",null,e),c=Hc(),h=c.scrollAreaComponent||JJ;return y.jsx(KL,{...c.getStyles("content",{className:t,style:i,styles:r,classNames:n}),innerProps:c.getStyles("inner",{className:t,style:i,styles:r,classNames:n}),"data-full-screen":c.fullScreen||void 0,"data-modal-content":!0,"data-hidden":l||void 0,...f,children:y.jsx(h,{style:{maxHeight:c.fullScreen?"100dvh":`calc(100dvh - (${pe(c.yOffset)} * 2))`},children:o})})});Ly.classes=ds;Ly.displayName="@mantine/core/ModalContent";const Iy=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalHeader",null,e);return y.jsx(XL,{...Hc().getStyles("header",{classNames:n,style:i,styles:r,className:t}),...o})});Iy.classes=ds;Iy.displayName="@mantine/core/ModalHeader";const By=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalOverlay",null,e);return y.jsx(ZL,{...Hc().getStyles("overlay",{classNames:n,style:i,styles:r,className:t}),...o})});By.classes=ds;By.displayName="@mantine/core/ModalOverlay";const wne={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:wa("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},oB=(e,{radius:n,size:t,yOffset:i,xOffset:r})=>({root:{"--modal-radius":n===void 0?void 0:Yt(n),"--modal-size":$n(t,"modal-size"),"--modal-y-offset":pe(i),"--modal-x-offset":pe(r)}}),np=Re(e=>{const n=be("ModalRoot",wne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,yOffset:f,scrollAreaComponent:c,radius:h,fullScreen:d,centered:p,xOffset:v,__staticSelector:b,attributes:w,...k}=n,_=Xe({name:b,classes:ds,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:oB});return y.jsx(bne,{value:{yOffset:f,scrollAreaComponent:c,getStyles:_,fullScreen:d},children:y.jsx(VL,{..._("root"),"data-full-screen":d||void 0,"data-centered":p||void 0,"data-offset-scrollbars":c===xa.Autosize||void 0,unstyled:o,...k})})});np.classes=ds;np.varsResolver=oB;np.displayName="@mantine/core/ModalRoot";const sB=A.createContext(null);function lB({children:e}){const[n,t]=A.useState([]),[i,r]=A.useState(wa("modal"));return y.jsx(sB,{value:{stack:n,addModal:(a,o)=>{t(l=>[...new Set([...l,a])]),r(l=>typeof o=="number"&&typeof l=="number"?Math.max(l,o):l)},removeModal:a=>t(o=>o.filter(l=>l!==a)),getZIndex:a=>`calc(${i} + ${n.indexOf(a)} + 1)`,currentId:n[n.length-1],maxZIndex:i},children:e})}lB.displayName="@mantine/core/ModalStack";const Fy=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalTitle",null,e);return y.jsx(QL,{...Hc().getStyles("title",{classNames:n,style:i,styles:r,className:t}),...o})});Fy.classes=ds;Fy.displayName="@mantine/core/ModalTitle";const kne={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:wa("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},Sr=Re(e=>{const{title:n,withOverlay:t,overlayProps:i,withCloseButton:r,closeButtonProps:a,children:o,radius:l,opened:f,stackId:c,zIndex:h,...d}=be("Modal",kne,e),p=A.use(sB),v=!!n||r,b=p&&c?{closeOnEscape:p.currentId===c,trapFocus:p.currentId===c,zIndex:p.getZIndex(c)}:{},w=t===!1?!1:c&&p?p.currentId===c:f;return A.useEffect(()=>{p&&c&&(f?p.addModal(c,h||wa("modal")):p.removeModal(c))},[f,c,h]),y.jsxs(np,{radius:l,opened:f,zIndex:p&&c?p.getZIndex(c):h,...d,...b,children:[t&&y.jsx(By,{visible:w,transitionProps:p&&c?{duration:0}:void 0,...i}),y.jsxs(Ly,{radius:l,__hidden:p&&c&&f?c!==p.currentId:!1,children:[v&&y.jsxs(Iy,{children:[n&&y.jsx(Fy,{children:n}),r&&y.jsx(zy,{...a})]}),y.jsx($y,{children:o})]})]})});Sr.classes=ds;Sr.displayName="@mantine/core/Modal";Sr.Root=np;Sr.Overlay=By;Sr.Content=Ly;Sr.Body=$y;Sr.Header=Iy;Sr.Title=Fy;Sr.CloseButton=zy;Sr.Stack=lB;const qy=A.createContext(null);var Hy={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};const uB=A.createContext(null),fB=(e,{gap:n},{size:t})=>({group:{"--pg-gap":n!==void 0?$n(n):$n(t,"pg-gap")}}),Uy=Re(e=>{var b;const n=be("PillGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,disabled:c,attributes:h,...d}=n,p=((b=A.use(qy))==null?void 0:b.size)||f||void 0,v=Xe({name:"PillGroup",classes:Hy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,varsResolver:fB,stylesCtx:{size:p},rootSelector:"group"});return y.jsx(uB,{value:{size:p,disabled:c},children:y.jsx(de,{size:p,...v("group"),...d})})});Uy.classes=Hy;Uy.varsResolver=fB;Uy.displayName="@mantine/core/PillGroup";const _ne={variant:"default"},cB=(e,{radius:n},{size:t})=>({root:{"--pill-fz":$n(t,"pill-fz"),"--pill-height":$n(t,"pill-height"),"--pill-radius":n===void 0?void 0:Yt(n)}}),dl=Re(e=>{const n=be("Pill",_ne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,variant:f,children:c,withRemoveButton:h,onRemove:d,removeButtonProps:p,radius:v,size:b,disabled:w,mod:k,attributes:_,...C}=n,S=A.use(uB),E=A.use(qy),j=b||(S==null?void 0:S.size)||void 0,O=(E==null?void 0:E.variant)==="filled"?"contrast":f||"default",M=Xe({name:"Pill",classes:Hy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_,vars:l,varsResolver:cB,stylesCtx:{size:j}});return y.jsxs(de,{component:"span",variant:O,size:j,...M("root",{variant:O}),mod:[{"with-remove":h&&!w,disabled:w||(S==null?void 0:S.disabled)},k],...C,children:[y.jsx("span",{...M("label"),children:c}),h&&y.jsx(pl,{variant:"transparent",radius:v,tabIndex:-1,"aria-hidden":!0,unstyled:o,...p,...M("remove",{className:p==null?void 0:p.className,style:p==null?void 0:p.style}),onMouseDown:$=>{var q;$.preventDefault(),$.stopPropagation(),(q=p==null?void 0:p.onMouseDown)==null||q.call(p,$)},onClick:$=>{var q;$.stopPropagation(),d==null||d(),(q=p==null?void 0:p.onClick)==null||q.call(p,$)}})]})});dl.classes=Hy;dl.varsResolver=cB;dl.displayName="@mantine/core/Pill";dl.Group=Uy;var dB={field:"m_45c4369d"};const xne={type:"visible"},IC=Re(e=>{const n=be("PillsInputField",xne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,type:f,disabled:c,id:h,pointer:d,mod:p,attributes:v,ref:b,...w}=n,k=A.use(qy),_=A.use(Pu),C=Xe({name:"PillsInputField",classes:dB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,rootSelector:"field"}),S=c||(k==null?void 0:k.disabled);return y.jsx(de,{component:"input",ref:Bt(b,k==null?void 0:k.fieldRef),"data-type":f,disabled:S,mod:[{disabled:S,pointer:d},p],...C("field"),...w,id:(_==null?void 0:_.inputId)||h,"aria-invalid":k==null?void 0:k.hasError,"aria-describedby":_==null?void 0:_.describedBy,type:"text",onMouseDown:E=>!d&&E.stopPropagation()})});IC.classes=dB;IC.displayName="@mantine/core/PillsInputField";const Sne={size:"sm"},_u=Re(e=>{const{children:n,onMouseDown:t,onClick:i,size:r,disabled:a,__staticSelector:o,error:l,variant:f,...c}=be("PillsInput",Sne,e),h=A.useRef(null);return y.jsx(qy,{value:{fieldRef:h,size:r,disabled:a,hasError:!!l,variant:f},children:y.jsx(Ui,{size:r,error:l,variant:f,component:"div","data-no-overflow":!0,onMouseDown:d=>{var p;d.preventDefault(),t==null||t(d),(p=h.current)==null||p.focus()},onClick:d=>{var p,v;d.preventDefault(),(p=d.currentTarget.closest("fieldset"))!=null&&p.disabled||((v=h.current)==null||v.focus(),i==null||i(d))},...c,multiline:!0,disabled:a,__staticSelector:o||"PillsInput",withAria:!1,children:n})})});_u.displayName="@mantine/core/PillsInput";_u.classes=Ui.classes;_u.Field=IC;function xk(e){return typeof e=="string"?e.trim().toLowerCase():e}function Cne({data:e,value:n}){const t=n.map(xk);return e.reduce((i,r)=>(wu(r)?i.push({group:r.group,items:r.items.filter(a=>t.indexOf(xk(a.value))===-1)}):t.indexOf(xk(r.value))===-1&&i.push(r),i),[])}const ST={xs:41,sm:50,md:60,lg:72,xl:89},Ane={maxValues:1/0,withCheckIcon:!0,checkIconPosition:"left",hiddenInputValuesDivider:",",clearSearchOnChange:!0,openOnFocus:!0,size:"sm"},Wy=Hm(e=>{const n=be("MultiSelect",Ane,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,value:c,defaultValue:h,onChange:d,onKeyDown:p,variant:v,data:b,dropdownOpened:w,defaultDropdownOpened:k,onDropdownOpen:_,onDropdownClose:C,selectFirstOptionOnChange:S,selectFirstOptionOnDropdownOpen:E,onOptionSubmit:j,comboboxProps:O,filter:M,limit:$,withScrollArea:q,maxDropdownHeight:P,searchValue:z,defaultSearchValue:B,onSearchChange:V,readOnly:U,disabled:N,onFocus:D,onBlur:L,radius:H,rightSection:Y,rightSectionWidth:R,rightSectionPointerEvents:G,rightSectionProps:W,leftSection:I,leftSectionWidth:X,leftSectionPointerEvents:ee,leftSectionProps:re,inputContainer:se,inputWrapperOrder:ye,withAsterisk:ae,labelProps:le,descriptionProps:_e,errorProps:ne,wrapperProps:ze,description:we,label:Ce,error:Ne,maxValues:ge,searchable:xe,nothingFoundMessage:Pe,withCheckIcon:ue,withAlignedLabels:Be,checkIconPosition:Ge,hidePickedOptions:We,withErrorStyles:Ze,name:Qe,form:ie,id:me,clearable:Ye,clearSectionMode:Je,clearButtonProps:Se,hiddenInputProps:tn,placeholder:dn,hiddenInputValuesDivider:On,required:pn,mod:an,renderOption:en,renderPill:Nn,onRemove:De,onClear:Fe,onMaxValues:En,scrollAreaProps:bn,chevronColor:yn,attributes:wn,clearSearchOnChange:it,openOnFocus:_t,loading:Le,loadingPosition:He,...zn}=n,st=qi(me),Dn=_y(b),nn=Qm(Dn),rn=A.useRef({}),on=Jm({opened:w,defaultOpened:k,onDropdownOpen:()=>{_==null||_(),E&&on.selectFirstOption()},onDropdownClose:()=>{C==null||C(),on.resetSelectedOption()}}),{styleProps:Fn,rest:{type:Vn,autoComplete:xt,...Cn}}=Du(zn),[An,Jn]=Mi({value:c,defaultValue:h,finalValue:[],onChange:d}),[Zt,Ai]=Mi({value:z,defaultValue:B,finalValue:"",onChange:V}),nr=un=>{Ai(un),on.resetSelectedOption()},ja=Xe({name:"MultiSelect",classes:{},props:n,classNames:t,styles:a,unstyled:o,attributes:wn}),{resolvedClassNames:Ya,resolvedStyles:Oa}=Hi({props:n,styles:a,classNames:t}),Yr=un=>{p==null||p(un),un.key===" "&&!xe&&(un.preventDefault(),on.toggleDropdown()),un.key==="Backspace"&&Zt.length===0&&An.length>0&&(De==null||De(An[An.length-1]),Jn(An.slice(0,An.length-1)))},Ka=An.map((un,Er)=>{var Tr;const Xa=nn[`${un}`]||rn.current[`${un}`];return Nn?y.jsx(A.Fragment,{children:Nn({option:Xa,value:un,onRemove:()=>{Jn(An.filter(Kr=>un!==Kr)),De==null||De(un)},disabled:N})},`${un}-${Er}`):y.jsx(dl,{withRemoveButton:!U&&!((Tr=nn[`${un}`])!=null&&Tr.disabled),onRemove:()=>{Jn(An.filter(Kr=>un!==Kr)),De==null||De(un)},unstyled:o,disabled:N,...ja("pill"),children:(Xa==null?void 0:Xa.label)||un},`${un}-${Er}`)});A.useEffect(()=>{S&&on.selectFirstOption()},[S,Zt]),A.useEffect(()=>{An.forEach(un=>{`${un}`in nn&&(rn.current[`${un}`]=nn[`${un}`])})},[nn,An]);const jr=y.jsx(Mn.ClearButton,{...Se,onClear:()=>{Fe==null||Fe(),Jn([]),nr("")}}),Or=Cne({data:Dn,value:An}),mn=Ye&&An.length>0&&!N&&!U,ai=mn?{paddingInlineEnd:ST[f]??ST.sm}:void 0;return y.jsxs(y.Fragment,{children:[y.jsxs(Mn,{store:on,classNames:Ya,styles:Oa,unstyled:o,size:f,readOnly:U,__staticSelector:"MultiSelect",attributes:wn,onOptionSubmit:un=>{j==null||j(un),it&&nr(""),on.updateSelectedOptionIndex("selected"),An.includes(nn[`${un}`].value)?(Jn(An.filter(Er=>Er!==nn[`${un}`].value)),De==null||De(nn[`${un}`].value)):An.lengthxe?on.openDropdown():on.toggleDropdown(),"data-expanded":on.dropdownOpened||void 0,id:st,required:pn,mod:an,attributes:wn,children:y.jsxs(dl.Group,{attributes:wn,disabled:N,unstyled:o,...ja("pillsList",{style:ai}),children:[Ka,y.jsx(Mn.EventsTarget,{autoComplete:xt,withExpandedAttribute:!0,children:y.jsx(_u.Field,{...Cn,id:st,placeholder:dn,type:!xe&&!dn?"hidden":"visible",...ja("inputField"),unstyled:o,onFocus:un=>{D==null||D(un),_t&&xe&&on.openDropdown()},onBlur:un=>{L==null||L(un),on.closeDropdown(),nr("")},onKeyDown:Yr,value:Zt,onChange:un=>{nr(un.currentTarget.value),xe&&on.openDropdown(),S&&on.selectFirstOption()},disabled:N,readOnly:U||!xe,pointer:!xe})})]})})}),y.jsx(Ay,{data:We?Or:Dn,hidden:U||N,filter:M,search:Zt,limit:$,hiddenWhenEmpty:!Pe,withScrollArea:q,maxDropdownHeight:P,filterOptions:xe,value:An,checkIconPosition:Ge,withCheckIcon:ue,withAlignedLabels:Be,nothingFoundMessage:Pe,unstyled:o,labelId:Ce?`${st}-label`:void 0,"aria-label":Ce?void 0:zn["aria-label"],renderOption:en,scrollAreaProps:bn})]}),y.jsx(Mn.HiddenInput,{name:Qe,valuesDivider:On,value:An,form:ie,disabled:N,...tn})]})});Wy.classes={...Ui.classes,...Mn.classes};Wy.displayName="@mantine/core/MultiSelect";var hB={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};const jne={withCloseButton:!0},mB=(e,{radius:n,color:t})=>({root:{"--notification-radius":n===void 0?void 0:Yt(n),"--notification-color":t?ut(t,e):void 0}}),Vy=Re(e=>{const n=be("Notification",jne,e),{className:t,color:i,radius:r,loading:a,withCloseButton:o,withBorder:l,title:f,icon:c,children:h,onClose:d,closeButtonProps:p,classNames:v,style:b,styles:w,unstyled:k,vars:_,mod:C,loaderProps:S,role:E,attributes:j,...O}=n,M=Xe({name:"Notification",classes:hB,props:n,className:t,style:b,classNames:v,styles:w,unstyled:k,attributes:j,vars:_,varsResolver:mB});return y.jsxs(de,{...M("root"),mod:[{"data-with-icon":!!c||a,"data-with-border":l},C],role:E||"alert",...O,children:[c&&!a&&y.jsx("div",{...M("icon"),children:c}),a&&y.jsx(gi,{size:28,color:i,...M("loader"),...S}),y.jsxs("div",{...M("body"),children:[f&&y.jsx("div",{...M("title"),children:f}),y.jsx(de,{...M("description"),mod:{"data-with-title":!!f},children:h})]}),o&&y.jsx(pl,{iconSize:16,color:"gray",...p,unstyled:k,onClick:$=>{var q;(q=p==null?void 0:p.onClick)==null||q.call(p,$),d==null||d()},...M("closeButton")})]})});Vy.classes=hB;Vy.varsResolver=mB;Vy.displayName="@mantine/core/Notification";function pB(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(e);r=l?r=r+AT("0",o-l):r=(r.substring(0,o)||"0")+"."+r.substring(o),t+r}function jT(e,n,t){if(["","-"].indexOf(e)!==-1)return e;var i=(e.indexOf(".")!==-1||t)&&n,r=BC(e),a=r.beforeDecimal,o=r.afterDecimal,l=r.hasNegation,f=parseFloat("0."+(o||"0")),c=o.length<=n?"0."+o:f.toFixed(n),h=c.split("."),d=a;a&&Number(h[0])&&(d=a.split("").reverse().reduce(function(w,k,_){return w.length>_?(Number(w[0])+Number(k)).toString()+w.substring(1,w.length):k+w},h[0]));var p=yB(h[1]||"",n,t),v=l?"-":"",b=i?".":"";return""+v+d+b+p}function su(e,n){if(e.value=e.value,e!==null){if(e.createTextRange){var t=e.createTextRange();return t.move("character",n),t.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(n,n),!0):(e.focus(),!1)}}var wB=One(function(e,n){for(var t=0,i=0,r=e.length,a=n.length;e[t]===n[t]&&tt&&r-i>t;)i++;return{from:{start:t,end:r-i},to:{start:t,end:a-i}}}),Rne=function(e,n){var t=Math.min(e.selectionStart,n);return{from:{start:t,end:e.selectionEnd},to:{start:t,end:n}}};function Pne(e,n,t){return Math.min(Math.max(e,n),t)}function Sk(e){return Math.max(e.selectionStart,e.selectionEnd)}function Nne(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function $ne(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function zne(e){var n=e.currentValue,t=e.formattedValue,i=e.currentValueIndex,r=e.formattedValueIndex;return n[i]===t[r]}function Lne(e,n,t,i,r,a,o){o===void 0&&(o=zne);var l=r.findIndex(function(E){return E}),f=e.slice(0,l);!n&&!t.startsWith(f)&&(n=f,t=f+t,i=i+f.length);for(var c=t.length,h=e.length,d={},p=new Array(c),v=0;v0&&p[_]===-1;)_--;var S=_===-1||p[_]===-1?0:p[_]+1;return S>C?C:i-S=0&&!t[n];)n--;n===-1&&(n=t.indexOf(!0))}else{for(;n<=r&&!t[n];)n++;n>r&&(n=t.lastIndexOf(!0))}return n===-1&&(n=r),n}function Ine(e){for(var n=Array.from({length:e.length+1}).map(function(){return!0}),t=0,i=n.length;tM.length-o.length||Oz||d>e.length-o.length)&&(P=d),e=e.substring(0,P),e=Hne(S?"-"+e:e,r),e=(e.match(Une(b))||[]).join("");var B=e.indexOf(b);e=e.replace(new RegExp(gB(b),"g"),function(L,H){return H===B?".":""});var V=BC(e,r),U=V.beforeDecimal,N=V.afterDecimal,D=V.addNegation;return c.end-c.startG?!1:R>=ee.start&&Rt?t:e}function Jne(e){return e.toString().replace(".","").length}function ete(e,n){return(typeof e=="number"?e=n)&&(t===void 0||e<=t)}const Ok={size:"sm",step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[".",","]},SB=(e,{size:n})=>({controls:{"--ni-chevron-size":$n(n,"ni-chevron-size")}});function tte(e,n,t){const i=e.toString(),r=_B.test(i),a=i.replace(/^0+(?=\d)/,""),o=parseFloat(a);if(Number.isNaN(o))return a;if(o>Number.MAX_SAFE_INTEGER)return n!==void 0?n:a;const l=Yo(o,t,n);return r?`${l.toString().replace(/^0+(?=\d)/,"")}.`:l}function ite(e,n){if(e===""||e==="-")return e;const t=wh(e);return t===null?e:n.clampBehavior==="blur"?kg(t,n.min,n.max):t}const Qh=Hm(e=>{const n=be("NumberInput",Ok,e),{className:t,classNames:i,styles:r,unstyled:a,vars:o,onChange:l,onValueChange:f,value:c,defaultValue:h,max:d,min:p,step:v,hideControls:b,rightSection:w,isAllowed:k,clampBehavior:_,onBlur:C,allowDecimal:S,decimalScale:E,onKeyDown:j,onKeyDownCapture:O,handlersRef:M,startValue:$,disabled:q,rightSectionPointerEvents:P,allowNegative:z,readOnly:B,size:V,rightSectionWidth:U,stepHoldInterval:N,stepHoldDelay:D,allowLeadingZeros:L,withKeyboardEvents:H,trimLeadingZeroesOnBlur:Y,allowedDecimalSeparators:R,selectAllOnFocus:G,onMinReached:W,onMaxReached:I,onFocus:X,attributes:ee,ref:re,...se}=n,ye=z??!0,ae=L??!0,le=Xe({name:"NumberInput",classes:jS,props:n,classNames:i,styles:r,unstyled:a,attributes:ee,vars:o,varsResolver:SB}),{resolvedClassNames:_e,resolvedStyles:ne}=Hi({classNames:i,styles:r,props:n}),ze=A.useRef(Ck(c)||Ck(h)?"bigint":"number");Ck(c)?ze.current="bigint":typeof c=="number"&&(ze.current="number");const we=ze.current==="bigint",[Ce,Ne]=Mi({value:c,defaultValue:h,finalValue:"",onChange:l}),ge=D!==void 0&&N!==void 0,xe=A.useRef(null),Pe=A.useRef(null),ue=A.useRef(0),Be=typeof p=="number"?p:void 0,Ge=typeof d=="number"?d:void 0,We=typeof v=="number"?v:Ok.step,Ze=typeof $=="number"?$:Ok.startValue,Qe=qv(p),ie=qv(d),me=qv(v)??BigInt(1),Ye=qv($)??BigInt(0),Je=Le=>!xB(Le,ye)||ae&&MT.test(Le)?Le:wh(Le)??Le,Se=Le=>{const He=Number(Le);return Number.isSafeInteger(He)?He:void 0},tn=(Le,He)=>{He.source==="event"&&Ne(we?Je(Le.value):ete(Le.floatValue,Le.value)&&!Zne.test(Le.value)&&!(ae&&MT.test(Le.value))&&!Qne.test(Le.value)&&!_B.test(Le.value)?Le.floatValue:Le.value),f==null||f(Le,He)},dn=Le=>{const He=String(Le).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return He?Math.max(0,(He[1]?He[1].length:0)-(He[2]?+He[2]:0)):0},On=Le=>{xe.current&&typeof Le<"u"&&xe.current.setSelectionRange(Le,Le)},pn=A.useRef(fS);pn.current=()=>{if(we){if(!jk(Ce,ye))return;let rn;const on=Ce;if(typeof on=="bigint"){const Vn=on+me;ie!==void 0&&Vn>ie&&(I==null||I()),rn=ie!==void 0&&Vn>ie?ie:Vn}else if(typeof on=="string"&&on!==""){const Vn=wh(on);if(Vn===null)return;const xt=Vn+me;ie!==void 0&&xt>ie&&(I==null||I()),rn=ie!==void 0&&xt>ie?ie:xt}else rn=kg(Ye,Qe,ie);const Fn=rn.toString();Ne(rn),f==null||f({floatValue:Se(rn),formattedValue:Fn,value:Fn},{source:"increment"}),setTimeout(()=>{var Vn;return On((Vn=xe.current)==null?void 0:Vn.value.length)},0);return}if(!Ak(Ce))return;let Le;const He=dn(Ce),zn=dn(We),st=Math.max(He,zn),Dn=10**st;if(!OS(Ce)&&(typeof Ce!="number"||Number.isNaN(Ce)))Le=Yo(Ze,Be,Ge);else if(Ge!==void 0){const rn=(Math.round(Number(Ce)*Dn)+Math.round(We*Dn))/Dn;rn>Ge&&(I==null||I()),Le=rn<=Ge?rn:Ge}else Le=(Math.round(Number(Ce)*Dn)+Math.round(We*Dn))/Dn;const nn=Le.toFixed(st);Ne(parseFloat(nn)),f==null||f({floatValue:parseFloat(nn),formattedValue:nn,value:nn},{source:"increment"}),setTimeout(()=>{var rn;return On((rn=xe.current)==null?void 0:rn.value.length)},0)};const an=A.useRef(fS);an.current=()=>{if(we){if(!jk(Ce,ye))return;let on;const Fn=Qe!==void 0?Qe:ye?void 0:BigInt(0),Vn=Ce;if(typeof Vn=="bigint"){const Cn=Vn-me;Fn!==void 0&&Cn{var Cn;return On((Cn=xe.current)==null?void 0:Cn.value.length)},0);return}if(!Ak(Ce))return;let Le;const He=Be!==void 0?Be:ye?Number.MIN_SAFE_INTEGER:0,zn=dn(Ce),st=dn(We),Dn=Math.max(zn,st),nn=10**Dn;if(!OS(Ce)&&typeof Ce!="number"||Number.isNaN(Ce))Le=Yo(Ze,He,Ge);else{const on=(Math.round(Number(Ce)*nn)-Math.round(We*nn))/nn;He!==void 0&&on{var on;return On((on=xe.current)==null?void 0:on.value.length)},0)};const en=Le=>{var Dn,nn,rn;const He=Le.clipboardData.getData("text"),zn=se.decimalSeparator||".",st=(R||[".",","]).filter(on=>on!==zn);if(st.some(on=>He.includes(on))){Le.preventDefault();let on=He;st.forEach(Vn=>{on=on.split(Vn).join(zn)});const Fn=xe.current;if(Fn){const Vn=Fn.selectionStart??0,xt=Fn.selectionEnd??0,Cn=Fn.value,An=Cn.substring(0,Vn)+on+Cn.substring(xt);(nn=(Dn=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:Dn.set)==null||nn.call(Fn,An),Fn.dispatchEvent(new Event("change",{bubbles:!0}));const Jn=Vn+on.length;setTimeout(()=>On(Jn),0)}}(rn=se.onPaste)==null||rn.call(se,Le)},Nn=Le=>{var He,zn;j==null||j(Le),!(B||!H)&&(Le.key==="ArrowUp"&&(Le.preventDefault(),(He=pn.current)==null||He.call(pn)),Le.key==="ArrowDown"&&(Le.preventDefault(),(zn=an.current)==null||zn.call(an)))},De=Le=>{if(O==null||O(Le),Le.key==="Backspace"){const He=xe.current;He&&He.selectionStart===0&&He.selectionStart===He.selectionEnd&&(Le.preventDefault(),window.setTimeout(()=>On(0),0))}},Fe=Le=>{G&&setTimeout(()=>Le.currentTarget.select(),0),X==null||X(Le)},En=Le=>{let He=Ce;we?(_==="blur"&&typeof He=="bigint"&&(He=kg(He,Qe,ie)),Y&&typeof He=="string"&&(He=ite(He,{min:Qe,max:ie,clampBehavior:_}))):(_==="blur"&&typeof He=="number"&&(He=Yo(He,Be,Ge)),Y&&typeof He=="string"&&dn(He)<15&&(He=tte(He,Ge,Be))),Ce!==He&&Ne(He),C==null||C(Le)};Wh(M,{increment:pn.current,decrement:an.current});const bn=Le=>{var He,zn;Le?(He=pn.current)==null||He.call(pn):(zn=an.current)==null||zn.call(an),ue.current+=1},yn=Le=>{if(bn(Le),ge){const He=typeof N=="number"?N:N(ue.current);Pe.current=window.setTimeout(()=>yn(Le),He)}},wn=(Le,He)=>{var zn;Le.preventDefault(),(zn=xe.current)==null||zn.focus(),bn(He),ge&&(Pe.current=window.setTimeout(()=>yn(He),D))},it=()=>{Pe.current&&window.clearTimeout(Pe.current),Pe.current=null,ue.current=0},_t=y.jsxs("div",{...le("controls"),children:[y.jsx(Dt,{...le("control"),tabIndex:-1,"aria-hidden":!0,disabled:q||typeof Ce=="number"&&Ge!==void 0&&Ce>=Ge||typeof Ce=="bigint"&&ie!==void 0&&Ce>=ie,mod:{direction:"up"},onMouseDown:Le=>Le.preventDefault(),onPointerDown:Le=>{wn(Le,!0)},onPointerUp:it,onPointerLeave:it,children:y.jsx(TT,{direction:"up"})}),y.jsx(Dt,{...le("control"),tabIndex:-1,"aria-hidden":!0,disabled:q||typeof Ce=="number"&&Be!==void 0&&Ce<=Be||typeof Ce=="bigint"&&Qe!==void 0&&Ce<=Qe,mod:{direction:"down"},onMouseDown:Le=>Le.preventDefault(),onPointerDown:Le=>{wn(Le,!1)},onPointerUp:it,onPointerLeave:it,children:y.jsx(TT,{direction:"down"})})]});return y.jsx(Ui,{component:Xne,allowNegative:z,className:hn(jS.root,t),size:V,...se,inputMode:we?"numeric":"decimal",readOnly:B,disabled:q,value:typeof Ce=="bigint"?Ce.toString():Ce,getInputRef:Bt(re,xe),onValueChange:tn,rightSection:b||B||!(we?jk(Ce,ye):Ak(Ce))?w:w||_t,classNames:_e,styles:ne,unstyled:a,__staticSelector:"NumberInput",decimalScale:we?0:S?E:0,onPaste:en,onFocus:Fe,onKeyDown:Nn,onKeyDownCapture:De,rightSectionPointerEvents:P??(q?"none":void 0),rightSectionWidth:U??`var(--ni-right-section-width-${V||"sm"})`,allowLeadingZeros:L,allowedDecimalSeparators:R,onBlur:En,attributes:ee,isAllowed:Le=>{if(!(!k||k(Le)))return!1;if(_!=="strict")return!0;if(!we)return nte(Le.floatValue,Be,Ge);if(Le.value===""||Le.value==="-")return!0;const He=wh(Le.value);return He===null?!0:(Qe===void 0||He>=Qe)&&(ie===void 0||He<=ie)}})});Qh.classes={...Ui.classes,...jS};Qh.varsResolver=SB;Qh.displayName="@mantine/core/NumberInput";function rte({reveal:e}){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",style:{width:"var(--psi-icon-size)",height:"var(--psi-icon-size)"},children:e?y.jsxs(y.Fragment,{children:[y.jsx("path",{fill:"none",d:"M0 0h256v256H0z"}),y.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16",d:"M48 40l160 176M154.91 157.6a40 40 0 01-53.82-59.2M135.53 88.71a40 40 0 0132.3 35.53"}),y.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16",d:"M208.61 169.1C230.41 149.58 240 128 240 128s-32-72-112-72a126 126 0 00-20.68 1.68M74 68.6C33.23 89.24 16 128 16 128s32 72 112 72a118.05 118.05 0 0054-12.6"})]}):y.jsxs(y.Fragment,{children:[y.jsx("path",{fill:"none",d:"M0 0h256v256H0z"}),y.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16",d:"M128 56c-80 0-112 72-112 72s32 72 112 72 112-72 112-72-32-72-112-72z"}),y.jsx("circle",{cx:"128",cy:"128",r:"40",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"})]})})}var ES={root:"m_f61ca620",input:"m_ccf8da4c",innerInput:"m_f2d85dd2",visibilityToggle:"m_b1072d44"};const ate={visibilityToggleIcon:rte,size:"sm"},CB=(e,{size:n})=>({root:{"--psi-icon-size":$n(n,"psi-icon-size"),"--psi-button-size":$n(n,"psi-button-size")}}),Yy=Re(e=>{const n=be("PasswordInput",ate,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,required:f,error:c,leftSection:h,disabled:d,id:p,variant:v,inputContainer:b,description:w,label:k,size:_,errorProps:C,descriptionProps:S,labelProps:E,withAsterisk:j,inputWrapperOrder:O,wrapperProps:M,radius:$,rightSection:q,rightSectionWidth:P,rightSectionPointerEvents:z,leftSectionWidth:B,visible:V,defaultVisible:U,onVisibilityChange:N,visibilityToggleIcon:D,visibilityToggleButtonProps:L,rightSectionProps:H,leftSectionProps:Y,leftSectionPointerEvents:R,withErrorStyles:G,mod:W,attributes:I,...X}=n,ee=qi(p),[re,se]=Mi({value:V,defaultValue:U,finalValue:!1,onChange:N}),ye=()=>se(!re),ae=Xe({name:"PasswordInput",classes:ES,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:I,vars:l,varsResolver:CB}),{resolvedClassNames:le,resolvedStyles:_e}=Hi({classNames:t,styles:a,props:n}),{styleProps:ne,rest:ze}=Du(X),we=(C==null?void 0:C.id)||`${ee}-error`,Ce=(S==null?void 0:S.id)||`${ee}-description`,Ne=`${c&&typeof c!="boolean"?we:""} ${w?Ce:""}`,ge=Ne.trim().length>0?Ne.trim():void 0,xe=y.jsx(ht,{...ae("visibilityToggle"),disabled:d,radius:$,"aria-pressed":re,tabIndex:-1,"aria-label":"Toggle password visibility",...L,variant:(L==null?void 0:L.variant)??"subtle",color:"gray",unstyled:o,onTouchEnd:Pe=>{var ue;Pe.preventDefault(),(ue=L==null?void 0:L.onTouchEnd)==null||ue.call(L,Pe),ye()},onMouseDown:Pe=>{var ue;Pe.preventDefault(),(ue=L==null?void 0:L.onMouseDown)==null||ue.call(L,Pe),ye()},onKeyDown:Pe=>{var ue;(ue=L==null?void 0:L.onKeyDown)==null||ue.call(L,Pe),Pe.key===" "&&(Pe.preventDefault(),ye())},children:y.jsx(D,{reveal:re})});return y.jsx(Vt.Wrapper,{required:f,id:ee,label:k,error:c,description:w,size:_,classNames:le,styles:_e,__staticSelector:"PasswordInput",__stylesApiProps:n,unstyled:o,withAsterisk:j,inputWrapperOrder:O,inputContainer:b,variant:v,labelProps:{...E,htmlFor:ee},descriptionProps:{...S,id:Ce},errorProps:{...C,id:we},mod:W,attributes:I,...ae("root"),...ne,...M,children:y.jsx(Vt,{component:"div",error:c,leftSection:h,size:_,classNames:{...le,input:hn(ES.input,le==null?void 0:le.input)},styles:_e,radius:$,disabled:d,__staticSelector:"PasswordInput",__stylesApiProps:n,rightSectionWidth:P,rightSection:q??xe,variant:v,unstyled:o,leftSectionWidth:B,rightSectionPointerEvents:z||"all",rightSectionProps:H,leftSectionProps:Y,leftSectionPointerEvents:R,withAria:!1,withErrorStyles:G,attributes:I,children:y.jsx("input",{required:f,"data-invalid":!!c||void 0,"data-with-left-section":!!h||void 0,...ae("innerInput"),disabled:d,id:ee,...ze,"aria-describedby":ge,autoComplete:ze.autoComplete||"off",type:re?"text":"password"})})})});Yy.classes={...Ui.classes,...ES};Yy.varsResolver=CB;Yy.displayName="@mantine/core/PasswordInput";function ote({offset:e,position:n,defaultOpened:t}){const[i,r]=A.useState(t),a=A.useRef(null),{x:o,y:l,elements:f,refs:c,update:h,placement:d}=iC({placement:n,middleware:[J6({crossAxis:!0,padding:5,rootBoundary:"document"})]}),p=d.includes("right")?e:n.includes("left")?e*-1:0,v=d.includes("bottom")?e:n.includes("top")?e*-1:0,b=A.useCallback(({clientX:w,clientY:k})=>{c.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:w,y:k,left:w+p,top:k+v,right:w,bottom:k}}})},[f.reference]);return A.useEffect(()=>{if(c.floating.current){const w=a.current;w.addEventListener("mousemove",b);const k=Xo(c.floating.current);return k.forEach(_=>{_.addEventListener("scroll",h)}),()=>{w.removeEventListener("mousemove",b),k.forEach(_=>{_.removeEventListener("scroll",h)})}}},[f.reference,c.floating.current,h,b,i]),{handleMouseMove:b,x:o,y:l,opened:i,setOpened:r,boundaryRef:a,floating:c.setFloating}}var Ky={tooltip:"m_1b3c8819",arrow:"m_f898399f"};const ste={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:wa("popover")},AB=(e,{radius:n,color:t})=>({tooltip:{"--tooltip-radius":n===void 0?void 0:Yt(n),"--tooltip-bg":t?ut(t,e):void 0,"--tooltip-color":t?"var(--mantine-color-white)":void 0}}),Xy=Re(e=>{const n=be("TooltipFloating",ste,e),{children:t,refProp:i,withinPortal:r,style:a,className:o,classNames:l,styles:f,unstyled:c,radius:h,color:d,label:p,offset:v,position:b,multiline:w,zIndex:k,disabled:_,defaultOpened:C,variant:S,vars:E,portalProps:j,attributes:O,ref:M,...$}=n,q=ui(),P=Xe({name:"TooltipFloating",props:n,classes:Ky,className:o,style:a,classNames:l,styles:f,unstyled:c,attributes:O,rootSelector:"tooltip",vars:E,varsResolver:AB}),{handleMouseMove:z,x:B,y:V,opened:U,boundaryRef:N,floating:D,setOpened:L}=ote({offset:v,position:b,defaultOpened:C}),H=Mu(t);if(!H)throw new Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const Y=Bt(N,sy(H),M),R=H.props,G=I=>{var X;(X=R.onMouseEnter)==null||X.call(R,I),z(I),L(!0)},W=I=>{var X;(X=R.onMouseLeave)==null||X.call(R,I),L(!1)};return y.jsxs(y.Fragment,{children:[y.jsx(ul,{...j,withinPortal:r,children:y.jsx(de,{...$,...P("tooltip",{style:{...Dz(a,q),zIndex:k,display:!_&&U?"block":"none",top:(V&&Math.round(V))??"",left:(B&&Math.round(B))??""}}),variant:S,ref:D,mod:{multiline:w},children:p})}),A.cloneElement(H,{...R,[i]:Y,onMouseEnter:G,onMouseLeave:W})]})});Xy.classes=Ky;Xy.varsResolver=AB;Xy.displayName="@mantine/core/TooltipFloating";const jB=A.createContext({withinGroup:!1}),lte={openDelay:0,closeDelay:0};function FC(e){const{openDelay:n,closeDelay:t,children:i}=be("TooltipGroup",lte,e);return y.jsx(jB,{value:{withinGroup:!0},children:y.jsx($Q,{delay:{open:n,close:t},children:i})})}FC.displayName="@mantine/core/TooltipGroup";FC.extend=e=>e;function ute(e){if(e===void 0)return{shift:!0,flip:!0};const n={...e};return e.shift===void 0&&(n.shift=!0),e.flip===void 0&&(n.flip=!0),n}function fte(e){const n=ute(e.middlewares),t=[aL(e.offset)];return n.shift&&t.push(J6(typeof n.shift=="boolean"?{padding:8}:{padding:8,...n.shift})),n.flip&&t.push(typeof n.flip=="boolean"?$g():$g(n.flip)),t.push(oL({element:e.arrowRef,padding:e.arrowOffset})),n.inline?t.push(typeof n.inline=="boolean"?Th():Th(n.inline)):e.inline&&t.push(Th()),t}function cte(e){var E,j,O;const[n,t]=A.useState(e.defaultOpened),i=typeof e.opened=="boolean"?e.opened:n,r=A.use(jB).withinGroup,a=qi(),o=A.useCallback(M=>{t(M),M&&k(a)},[a]),{x:l,y:f,context:c,refs:h,placement:d,middlewareData:{arrow:{x:p,y:v}={}}}=iC({strategy:e.strategy,placement:e.position,open:i,onOpenChange:o,middleware:fte(e),whileElementsMounted:kS}),{delay:b,currentId:w,setCurrentId:k}=zQ(c,{id:a}),{getReferenceProps:_,getFloatingProps:C}=HQ([PQ(c,{enabled:(E=e.events)==null?void 0:E.hover,delay:r?b:{open:e.openDelay,close:e.closeDelay},mouseOnly:!((j=e.events)!=null&&j.touch)}),qQ(c,{enabled:(O=e.events)==null?void 0:O.focus,visibleOnly:!0}),WQ(c,{role:"tooltip"}),BQ(c,{enabled:typeof e.opened>"u"})]);ns(()=>{var M;(M=e.onPositionChange)==null||M.call(e,d)},[d]);const S=i&&w&&w!==a;return{x:l,y:f,arrowX:p,arrowY:v,reference:h.setReference,floating:h.setFloating,getFloatingProps:C,getReferenceProps:_,isGroupPhase:S,opened:i,placement:d}}const dte={position:"top",refProp:"ref",withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:wa("popover"),middlewares:{flip:!0,shift:!0,inline:!1}},OB=(e,{radius:n,color:t,variant:i,autoContrast:r})=>{const a=e.variantColorResolver({theme:e,color:t||e.primaryColor,autoContrast:r,variant:i||"filled"});return{tooltip:{"--tooltip-radius":n===void 0?void 0:Yt(n),"--tooltip-bg":t?a.background:void 0,"--tooltip-color":t?a.color:void 0}}},Gt=Re(e=>{const n=be("Tooltip",dte,e),{children:t,position:i,refProp:r,label:a,openDelay:o,closeDelay:l,onPositionChange:f,opened:c,defaultOpened:h,withinPortal:d,radius:p,color:v,classNames:b,styles:w,unstyled:k,style:_,className:C,withArrow:S,arrowSize:E,arrowOffset:j,arrowRadius:O,arrowPosition:M,offset:$,transitionProps:q,multiline:P,events:z,zIndex:B,disabled:V,onClick:U,onMouseEnter:N,onMouseLeave:D,inline:L,variant:H,keepMounted:Y,vars:R,portalProps:G,mod:W,floatingStrategy:I,middlewares:X,autoContrast:ee,attributes:re,target:se,ref:ye,...ae}=n,{dir:le}=Ru(),_e=A.useRef(null),ne=cte({position:vL(le,i),closeDelay:l,openDelay:o,onPositionChange:f,opened:c,defaultOpened:h,events:z,arrowRef:_e,arrowOffset:j,offset:typeof $=="number"?$+(S?E/2:0):$,inline:L,strategy:I,middlewares:X});A.useEffect(()=>{const Pe=se instanceof HTMLElement?se:typeof se=="string"?document.querySelector(se):(se==null?void 0:se.current)||null;Pe&&ne.reference(Pe)},[se,ne]);const ze=Xe({name:"Tooltip",props:n,classes:Ky,className:C,style:_,classNames:b,styles:w,unstyled:k,attributes:re,rootSelector:"tooltip",vars:R,varsResolver:OB}),we=Mu(t);if(!se&&!we)throw new Error("[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const Ce=ze("tooltip");if(se){const Pe=rT(q,{duration:100,transition:"fade"});return y.jsx(y.Fragment,{children:y.jsx(ul,{...G,withinPortal:d,children:y.jsx(is,{...Pe,keepMounted:Y,mounted:!V&&!!ne.opened,duration:ne.isGroupPhase?10:Pe.duration,children:ue=>y.jsxs(de,{...ae,"data-fixed":I==="fixed"||void 0,variant:H,mod:[{multiline:P},W],...Ce,...ne.getFloatingProps({ref:ne.floating,className:Ce.className,style:{...Ce.style,...ue,zIndex:B,top:ne.y??0,left:ne.x??0}}),children:[a,y.jsx(zg,{ref:_e,arrowX:ne.arrowX,arrowY:ne.arrowY,visible:S,position:ne.placement,arrowSize:E,arrowOffset:j,arrowRadius:O,arrowPosition:M,...ze("arrow")})]})})})})}const Ne=we.props,ge=Bt(ne.reference,sy(we),ye),xe=rT(q,{duration:100,transition:"fade"});return y.jsxs(y.Fragment,{children:[y.jsx(ul,{...G,withinPortal:d,children:y.jsx(is,{...xe,keepMounted:Y,mounted:!V&&!!ne.opened,duration:ne.isGroupPhase?10:xe.duration,children:Pe=>y.jsxs(de,{...ae,"data-fixed":I==="fixed"||void 0,variant:H,mod:[{multiline:P},W],...ne.getFloatingProps({ref:ne.floating,className:ze("tooltip").className,style:{...ze("tooltip").style,...Pe,zIndex:B,top:ne.y??0,left:ne.x??0}}),children:[a,y.jsx(zg,{ref:_e,arrowX:ne.arrowX,arrowY:ne.arrowY,visible:S,position:ne.placement,arrowSize:E,arrowOffset:j,arrowRadius:O,arrowPosition:M,...ze("arrow")})]})})}),A.cloneElement(we,ne.getReferenceProps({onClick:U,onMouseEnter:N,onMouseLeave:D,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,...Ne,className:hn(C,Ne.className),[r]:ge}))]})});Gt.classes=Ky;Gt.varsResolver=OB;Gt.displayName="@mantine/core/Tooltip";Gt.Floating=Xy;Gt.Group=FC;const hte={size:"sm",withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left",openOnFocus:!0},ya=Hm(e=>{const n=be("Select",hte,e),{classNames:t,styles:i,unstyled:r,vars:a,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:f,onDropdownOpen:c,onFocus:h,onBlur:d,onClick:p,onChange:v,data:b,value:w,defaultValue:k,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:C,onOptionSubmit:S,comboboxProps:E,readOnly:j,disabled:O,filter:M,limit:$,withScrollArea:q,maxDropdownHeight:P,size:z,searchable:B,rightSection:V,checkIconPosition:U,withCheckIcon:N,withAlignedLabels:D,nothingFoundMessage:L,name:H,form:Y,searchValue:R,defaultSearchValue:G,onSearchChange:W,allowDeselect:I,error:X,rightSectionPointerEvents:ee,id:re,clearable:se,clearSectionMode:ye,clearButtonProps:ae,hiddenInputProps:le,renderOption:_e,onClear:ne,autoComplete:ze,scrollAreaProps:we,__defaultRightSection:Ce,__clearSection:Ne,__clearable:ge,chevronColor:xe,autoSelectOnBlur:Pe,openOnFocus:ue,attributes:Be,...Ge}=n,We=A.useMemo(()=>_y(b),[b]),Ze=A.useRef({}),Qe=A.useMemo(()=>Qm(We),[We]),ie=qi(re),[me,Ye,Je]=Mi({value:w,defaultValue:k,finalValue:null,onChange:v}),Se=me!=null?`${me}`in Qe?Qe[`${me}`]:Ze.current[`${me}`]:void 0,tn=$K(Se),[dn,On,pn]=Mi({value:R,defaultValue:G,finalValue:Se?Se.label:"",onChange:W}),an=Jm({opened:o,defaultOpened:l,onDropdownOpen:()=>{c==null||c(),C?an.selectFirstOption():an.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{f==null||f(),setTimeout(an.resetSelectedOption,0)}}),en=bn=>{On(bn),an.resetSelectedOption()},{resolvedClassNames:Nn,resolvedStyles:De}=Hi({props:n,styles:i,classNames:t});A.useEffect(()=>{_&&an.selectFirstOption()},[_,dn]),A.useEffect(()=>{w===null&&en(""),w!=null&&Se&&((tn==null?void 0:tn.value)!==Se.value||(tn==null?void 0:tn.label)!==Se.label)&&en(Se.label)},[w,Se]),A.useEffect(()=>{var bn,yn;!Je&&!pn&&en(me!=null?`${me}`in Qe?(bn=Qe[`${me}`])==null?void 0:bn.label:((yn=Ze.current[`${me}`])==null?void 0:yn.label)||"":"")},[Qe,me]),A.useEffect(()=>{me&&`${me}`in Qe&&(Ze.current[`${me}`]=Qe[`${me}`])},[Qe,me]);const Fe=y.jsx(Mn.ClearButton,{...ae,onClear:()=>{Ye(null,null),en(""),ne==null||ne()}}),En=se&&!!me&&!O&&!j;return y.jsxs(y.Fragment,{children:[y.jsxs(Mn,{store:an,__staticSelector:"Select",classNames:Nn,styles:De,unstyled:r,readOnly:j,size:z,attributes:Be,keepMounted:Pe,onOptionSubmit:bn=>{S==null||S(bn);const yn=I&&`${Qe[bn].value}`==`${me}`?null:Qe[bn],wn=yn?yn.value:null;wn!==me&&Ye(wn,yn),!Je&&en(wn!=null&&(yn==null?void 0:yn.label)||""),an.closeDropdown()},...E,children:[y.jsx(Mn.Target,{targetType:B?"input":"button",autoComplete:ze,withExpandedAttribute:!0,children:y.jsx(Ui,{id:ie,__defaultRightSection:y.jsx(Mn.Chevron,{size:z,error:X,unstyled:r,color:xe}),__clearSection:Fe,__clearable:En,__clearSectionMode:ye,rightSection:V,rightSectionPointerEvents:ee||"none",...Ge,size:z,__staticSelector:"Select",disabled:O,readOnly:j||!B,value:dn,onChange:bn=>{en(bn.currentTarget.value),an.openDropdown(),_&&an.selectFirstOption()},onFocus:bn=>{ue&&B&&an.openDropdown(),h==null||h(bn)},onBlur:bn=>{Pe&&an.clickSelectedOption(),B&&an.closeDropdown();const yn=me!=null&&(`${me}`in Qe?Qe[`${me}`]:Ze.current[`${me}`]);en(yn&&yn.label||""),d==null||d(bn)},onClick:bn=>{B?an.openDropdown():an.toggleDropdown(),p==null||p(bn)},classNames:Nn,styles:De,unstyled:r,pointer:!B,error:X,attributes:Be})}),y.jsx(Ay,{data:We,hidden:j||O,filter:M,search:dn,limit:$,hiddenWhenEmpty:!L,withScrollArea:q,maxDropdownHeight:P,filterOptions:!!B&&(Se==null?void 0:Se.label)!==dn,value:me,checkIconPosition:U,withCheckIcon:N,withAlignedLabels:D,nothingFoundMessage:L,unstyled:r,labelId:Ge.label?`${ie}-label`:void 0,"aria-label":Ge.label?void 0:Ge["aria-label"],renderOption:_e,scrollAreaProps:we})]}),y.jsx(Mn.HiddenInput,{value:me,name:H,form:Y,disabled:O,...le})]})});ya.classes={...Ui.classes,...Mn.classes};ya.displayName="@mantine/core/Select";function EB(e){if(e!==void 0)return typeof e=="number"?pe(e):e}function mte({spacing:e,verticalSpacing:n,cols:t,minColWidth:i,autoRows:r,selector:a}){var d;const o=ui(),l=n===void 0?e:n,f=i!==void 0,c=Tu({"--sg-spacing-x":Ut(Wr(e)),"--sg-spacing-y":Ut(Wr(l)),"--sg-auto-rows":r,...f?{"--sg-min-col-width":EB(i)}:{"--sg-cols":(d=Wr(t))==null?void 0:d.toString()}}),h=Pt(o.breakpoints).reduce((p,v)=>(p[v]||(p[v]={}),typeof e=="object"&&e[v]!==void 0&&(p[v]["--sg-spacing-x"]=Ut(e[v])),typeof l=="object"&&l[v]!==void 0&&(p[v]["--sg-spacing-y"]=Ut(l[v])),!f&&typeof t=="object"&&t[v]!==void 0&&(p[v]["--sg-cols"]=t[v]),p),{});return y.jsx(Dc,{styles:c,media:Uh(Pt(h),o.breakpoints).filter(p=>Pt(h[p.value]).length>0).map(p=>({query:`(min-width: ${o.breakpoints[p.value]})`,styles:h[p.value]})),selector:a})}function Ek(e){return typeof e=="object"&&e!==null?Pt(e):[]}function pte(e){return e.sort((n,t)=>Hh(n)-Hh(t))}function vte({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}){return pte(Array.from(new Set([...Ek(e),...Ek(n),...i!==void 0?[]:Ek(t)])))}function gte({spacing:e,verticalSpacing:n,cols:t,minColWidth:i,autoRows:r,selector:a}){var d;const o=n===void 0?e:n,l=i!==void 0,f=Tu({"--sg-spacing-x":Ut(Wr(e)),"--sg-spacing-y":Ut(Wr(o)),"--sg-auto-rows":r,...l?{"--sg-min-col-width":EB(i)}:{"--sg-cols":(d=Wr(t))==null?void 0:d.toString()}}),c=vte({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}),h=c.reduce((p,v)=>(p[v]||(p[v]={}),typeof e=="object"&&e[v]!==void 0&&(p[v]["--sg-spacing-x"]=Ut(e[v])),typeof o=="object"&&o[v]!==void 0&&(p[v]["--sg-spacing-y"]=Ut(o[v])),!l&&typeof t=="object"&&t[v]!==void 0&&(p[v]["--sg-cols"]=t[v]),p),{});return y.jsx(Dc,{styles:f,container:c.map(p=>({query:`simple-grid (min-width: ${p})`,styles:h[p]})),selector:a})}var TB={container:"m_925c2d2c",root:"m_2415a157"};const yte={cols:1,spacing:"md",type:"media"},Uo=Re(e=>{const n=be("SimpleGrid",yte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,cols:f,verticalSpacing:c,spacing:h,type:d,minColWidth:p,autoFlow:v,autoRows:b,attributes:w,...k}=n,_=Xe({name:"SimpleGrid",classes:TB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l}),C=uy(),S=p!==void 0?v||"auto-fill":void 0;return d==="container"?y.jsxs(y.Fragment,{children:[y.jsx(gte,{...n,selector:`.${C}`}),y.jsx("div",{..._("container"),children:y.jsx(de,{..._("root",{className:C}),...k,"data-auto-cols":S})})]}):y.jsxs(y.Fragment,{children:[y.jsx(mte,{...n,selector:`.${C}`}),y.jsx(de,{..._("root",{className:C}),...k,"data-auto-cols":S})]})});Uo.classes=TB;Uo.displayName="@mantine/core/SimpleGrid";var MB={root:"m_6d731127"};const bte={gap:"md",align:"stretch",justify:"flex-start"},DB=(e,{gap:n,align:t,justify:i})=>({root:{"--stack-gap":Ut(n),"--stack-align":t,"--stack-justify":i}}),Pn=Re(e=>{const n=be("Stack",bte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,align:f,justify:c,gap:h,variant:d,attributes:p,...v}=n;return y.jsx(de,{...Xe({name:"Stack",props:n,classes:MB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:DB})("root"),variant:d,...v})});Pn.classes=MB;Pn.varsResolver=DB;Pn.displayName="@mantine/core/Stack";const[wte,kte]=Gr("Table component was not found in the tree");var tp={table:"m_b23fa0ef",th:"m_4e7aa4f3",tr:"m_4e7aa4fd",td:"m_4e7aa4ef",tbody:"m_b2404537",thead:"m_b242d975",caption:"m_9e5a3ac7",scrollContainer:"m_a100c15",scrollContainerInner:"m_62259741"};function _te(e,n){if(!n)return;const t={};return n.columnBorder&&e.withColumnBorders&&(t["data-with-column-border"]=!0),n.rowBorder&&e.withRowBorders&&(t["data-with-row-border"]=!0),n.striped&&e.striped&&(t["data-striped"]=e.striped),n.highlightOnHover&&e.highlightOnHover&&(t["data-hover"]=!0),n.captionSide&&e.captionSide&&(t["data-side"]=e.captionSide),n.stickyHeader&&e.stickyHeader&&(t["data-sticky"]=!0),t}function Nu(e,n){const t=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,i=Re(r=>{const a=be(t,{},r),{classNames:o,className:l,style:f,styles:c,...h}=a,d=kte();return y.jsx(de,{component:e,..._te(d,n),...d.getStyles(e,{className:l,classNames:o,style:f,styles:c,props:a}),...h})});return i.displayName=`@mantine/core/${t}`,i.classes=tp,i}const TS=Nu("th",{columnBorder:!0}),RB=Nu("td",{columnBorder:!0}),_g=Nu("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),PB=Nu("thead",{stickyHeader:!0}),NB=Nu("tbody"),$B=Nu("tfoot"),zB=Nu("caption",{captionSide:!0}),xte={type:"scrollarea"},LB=(e,{minWidth:n,maxHeight:t,type:i})=>({scrollContainer:{"--table-min-width":pe(n),"--table-max-height":pe(t),"--table-overflow":i==="native"?"auto":void 0}}),Zy=Re(e=>{const n=be("TableScrollContainer",xte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:f,minWidth:c,maxHeight:h,type:d,scrollAreaProps:p,attributes:v,...b}=n,w=Xe({name:"TableScrollContainer",classes:tp,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:l,varsResolver:LB,rootSelector:"scrollContainer"});return y.jsx(de,{component:d==="scrollarea"?xa:"div",...d==="scrollarea"?h?{offsetScrollbars:"xy",...p}:{offsetScrollbars:"x",...p}:{},...w("scrollContainer"),...b,children:y.jsx("div",{...w("scrollContainerInner"),children:f})})});Zy.classes=tp;Zy.varsResolver=LB;Zy.displayName="@mantine/core/TableScrollContainer";function qC({data:e}){return y.jsxs(y.Fragment,{children:[e.caption&&y.jsx(zB,{children:e.caption}),e.head&&y.jsx(PB,{children:y.jsx(_g,{children:e.head.map((n,t)=>y.jsx(TS,{children:n},t))})}),e.body&&y.jsx(NB,{children:e.body.map((n,t)=>y.jsx(_g,{children:n.map((i,r)=>y.jsx(RB,{children:i},r))},t))}),e.foot&&y.jsx($B,{children:y.jsx(_g,{children:e.foot.map((n,t)=>y.jsx(TS,{children:n},t))})})]})}qC.displayName="@mantine/core/TableDataRenderer";const Ste={withRowBorders:!0,verticalSpacing:7},IB=(e,{layout:n,captionSide:t,horizontalSpacing:i,verticalSpacing:r,borderColor:a,stripedColor:o,highlightOnHoverColor:l,striped:f,highlightOnHover:c,stickyHeaderOffset:h,stickyHeader:d})=>({table:{"--table-layout":n,"--table-caption-side":t,"--table-horizontal-spacing":Ut(i),"--table-vertical-spacing":Ut(r),"--table-border-color":a?ut(a,e):void 0,"--table-striped-color":f&&o?ut(o,e):void 0,"--table-highlight-on-hover-color":c&&l?ut(l,e):void 0,"--table-sticky-header-offset":d?pe(h):void 0}}),gn=Re(e=>{const n=be("Table",Ste,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,horizontalSpacing:f,verticalSpacing:c,captionSide:h,stripedColor:d,highlightOnHoverColor:p,striped:v,highlightOnHover:b,withColumnBorders:w,withRowBorders:k,withTableBorder:_,borderColor:C,layout:S,data:E,children:j,stickyHeader:O,stickyHeaderOffset:M,mod:$,tabularNums:q,attributes:P,...z}=n,B=Xe({name:"Table",props:n,className:i,style:r,classes:tp,classNames:t,styles:a,unstyled:o,attributes:P,rootSelector:"table",vars:l,varsResolver:IB});return y.jsx(wte,{value:{getStyles:B,stickyHeader:O,striped:v===!0?"odd":v||void 0,highlightOnHover:b,withColumnBorders:w,withRowBorders:k,captionSide:h||"bottom"},children:y.jsx(de,{component:"table",mod:[{"data-with-table-border":_,"data-tabular-nums":q},$],...B("table"),...z,children:j||!!E&&y.jsx(qC,{data:E})})})});gn.classes=tp;gn.varsResolver=IB;gn.displayName="@mantine/core/Table";gn.Td=RB;gn.Th=TS;gn.Tr=_g;gn.Thead=PB;gn.Tbody=NB;gn.Tfoot=$B;gn.Caption=zB;gn.ScrollContainer=Zy;gn.DataRenderer=qC;const[Cte,HC]=Gr("Tabs component was not found in the tree");var ip={root:"m_89d60db1","list--default":"m_576c9d4",list:"m_89d33d6d",tab:"m_4ec4dce6",panel:"m_b0c91715",tabSection:"m_fc420b1f",tabLabel:"m_42bbd1ae","tab--default":"m_539e827b","list--outline":"m_6772fbd5","tab--outline":"m_b59ab47c","tab--pills":"m_c3381914"};const UC=Re(e=>{const n=be("TabsList",null,e),{children:t,className:i,grow:r,justify:a,classNames:o,styles:l,style:f,mod:c,...h}=n,d=HC();return y.jsx(de,{...d.getStyles("list",{className:i,style:f,classNames:o,styles:l,props:n,variant:d.variant}),role:"tablist",variant:d.variant,mod:[{grow:r,orientation:d.orientation,placement:d.orientation==="vertical"&&d.placement,inverted:d.inverted},c],"aria-orientation":d.orientation,__vars:{"--tabs-justify":a},...h,children:t})});UC.classes=ip;UC.displayName="@mantine/core/TabsList";const WC=Re(e=>{const n=be("TabsPanel",null,e),{children:t,className:i,value:r,classNames:a,styles:o,style:l,mod:f,keepMounted:c,...h}=n,d=qm(),p=HC(),v=p.value===r,b=p.keepMounted||c,w=p.keepMountedMode!=="display-none",k=b&&w&&d!=="test"?y.jsx(A.Activity,{mode:v?"visible":"hidden",children:t}):b||v?t:null;return y.jsx(de,{...p.getStyles("panel",{className:i,classNames:a,styles:o,style:[l,v?void 0:{display:"none"}],props:n}),mod:[{orientation:p.orientation},f],role:"tabpanel",id:p.getPanelId(r),"aria-labelledby":p.getTabId(r),...h,children:k})});WC.classes=ip;WC.displayName="@mantine/core/TabsPanel";const VC=Re(e=>{const n=be("TabsTab",null,e),{className:t,children:i,rightSection:r,leftSection:a,value:o,onClick:l,onKeyDown:f,disabled:c,color:h,style:d,classNames:p,styles:v,vars:b,mod:w,tabIndex:k,..._}=n,C=ui(),{dir:S}=Ru(),E=HC(),j=o===E.value,O=$=>{E.onChange(E.allowTabDeactivation&&o===E.value?null:o),l==null||l($)},M={classNames:p,styles:v,props:n};return y.jsxs(Dt,{...E.getStyles("tab",{className:t,style:d,variant:E.variant,...M}),disabled:c,unstyled:E.unstyled,variant:E.variant,mod:[{active:j,disabled:c,orientation:E.orientation,inverted:E.inverted,placement:E.orientation==="vertical"&&E.placement},w],role:"tab",id:E.getTabId(o),"aria-selected":j,tabIndex:k!==void 0?k:j||E.value===null?0:-1,"aria-controls":E.getPanelId(o),onClick:O,__vars:{"--tabs-color":h?ut(h,C):void 0},onKeyDown:N6({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:E.activateTabWithKeyboard,loop:E.loop,orientation:E.orientation||"horizontal",dir:S,onKeyDown:f}),..._,children:[a&&y.jsx("span",{...E.getStyles("tabSection",M),"data-position":"left",children:a}),i&&y.jsx("span",{...E.getStyles("tabLabel",M),children:i}),r&&y.jsx("span",{...E.getStyles("tabSection",M),"data-position":"right",children:r})]})});VC.classes=ip;VC.displayName="@mantine/core/TabsTab";const DT="Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value",Ate={keepMounted:!0,keepMountedMode:"activity",orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,variant:"default",placement:"left"},BB=(e,{radius:n,color:t,autoContrast:i})=>({root:{"--tabs-radius":Yt(n),"--tabs-color":ut(t,e),"--tabs-text-color":ly(i,e)?Fm({color:t,theme:e,autoContrast:i}):void 0}}),_i=Re(e=>{const n=be("Tabs",Ate,e),{defaultValue:t,value:i,onChange:r,orientation:a,children:o,loop:l,id:f,activateTabWithKeyboard:c,allowTabDeactivation:h,variant:d,color:p,radius:v,inverted:b,placement:w,keepMounted:k,keepMountedMode:_,classNames:C,styles:S,unstyled:E,className:j,style:O,vars:M,autoContrast:$,mod:q,attributes:P,...z}=n,B=qi(f),[V,U]=Mi({value:i,defaultValue:t,finalValue:null,onChange:r}),N=Xe({name:"Tabs",props:n,classes:ip,className:j,style:O,classNames:C,styles:S,unstyled:E,attributes:P,vars:M,varsResolver:BB});return y.jsx(Cte,{value:{placement:w,value:V,orientation:a,id:B,loop:l,activateTabWithKeyboard:c,getTabId:x5(`${B}-tab`,DT),getPanelId:x5(`${B}-panel`,DT),onChange:U,allowTabDeactivation:h,variant:d,color:p,radius:v,inverted:b,keepMounted:k,keepMountedMode:_,unstyled:E,getStyles:N},children:y.jsx(de,{id:B,variant:d,mod:[{orientation:a,inverted:a==="horizontal"&&b,placement:a==="vertical"&&w},q],...N("root"),...z,children:o})})});_i.classes=ip;_i.varsResolver=BB;_i.displayName="@mantine/core/Tabs";_i.Tab=VC;_i.Panel=WC;_i.List=UC;function jte({data:e,value:n}){const t=n.map(i=>i.trim().toLowerCase());return e.reduce((i,r)=>(wu(r)?i.push({group:r.group,items:r.items.filter(a=>t.indexOf(a.label.toLowerCase().trim())===-1)}):t.indexOf(r.label.toLowerCase().trim())===-1&&i.push(r),i),[])}function Ote(e,n){return e?n.split(new RegExp(`[${e.join("")}]`)).map(t=>t.trim()).filter(t=>t!==""):[n]}function RT({splitChars:e,allowDuplicates:n,maxTags:t,value:i,currentTags:r,isDuplicate:a,onDuplicate:o}){const l=Ote(e,i),f=[];if(n)f.push(...r,...l);else{f.push(...r);for(const c of l)(a?h=>a(h,f):h=>f.some(d=>d.toLowerCase()===h.toLowerCase()))(c)?o==null||o(c):f.push(c)}return t?f.slice(0,t):f}const Ete={maxTags:1/0,acceptValueOnBlur:!0,splitChars:[","],hiddenInputValuesDivider:",",openOnFocus:!0,size:"sm"},GC=Re(e=>{const n=be("TagsInput",Ete,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,value:c,defaultValue:h,onChange:d,onKeyDown:p,maxTags:v,allowDuplicates:b,onDuplicate:w,variant:k,data:_,dropdownOpened:C,defaultDropdownOpened:S,onDropdownOpen:E,onDropdownClose:j,selectFirstOptionOnChange:O,selectFirstOptionOnDropdownOpen:M,onOptionSubmit:$,comboboxProps:q,filter:P,limit:z,withScrollArea:B,maxDropdownHeight:V,searchValue:U,defaultSearchValue:N,onSearchChange:D,readOnly:L,disabled:H,splitChars:Y,onFocus:R,onBlur:G,onPaste:W,radius:I,rightSection:X,rightSectionWidth:ee,rightSectionPointerEvents:re,rightSectionProps:se,leftSection:ye,leftSectionWidth:ae,leftSectionPointerEvents:le,leftSectionProps:_e,inputContainer:ne,inputWrapperOrder:ze,withAsterisk:we,required:Ce,labelProps:Ne,descriptionProps:ge,errorProps:xe,wrapperProps:Pe,description:ue,label:Be,error:Ge,withErrorStyles:We,name:Ze,form:Qe,id:ie,clearable:me,clearSectionMode:Ye,clearButtonProps:Je,hiddenInputProps:Se,hiddenInputValuesDivider:tn,mod:dn,renderOption:On,renderPill:pn,onRemove:an,onClear:en,onMaxTags:Nn,scrollAreaProps:De,acceptValueOnBlur:Fe,isDuplicate:En,openOnFocus:bn,attributes:yn,ref:wn,loading:it,loadingPosition:_t,...Le}=n,He=qi(ie),zn=_y(_),st=Qm(zn),Dn=A.useRef(null),nn=Bt(Dn,wn),rn=Jm({opened:C,defaultOpened:S,onDropdownOpen:()=>{E==null||E(),M&&rn.selectFirstOption()},onDropdownClose:()=>{j==null||j(),rn.resetSelectedOption()}}),{styleProps:on,rest:{type:Fn,autoComplete:Vn,...xt}}=Du(Le),[Cn,An]=Mi({value:c,defaultValue:h,finalValue:[],onChange:d}),[Jn,Zt]=Mi({value:U,defaultValue:N,finalValue:"",onChange:D}),Ai=mn=>{Zt(mn),rn.resetSelectedOption()},nr=Xe({name:"TagsInput",classes:{},props:n,classNames:t,styles:a,unstyled:o}),{resolvedClassNames:ja,resolvedStyles:Ya}=Hi({props:n,styles:a,classNames:t}),Oa=mn=>{if((En?En(mn,Cn):Cn.some(ai=>ai.toLowerCase()===mn.toLowerCase()))&&(w==null||w(mn),!b)){Ai("");return}if(Cn.length>=v){Nn==null||Nn(mn);return}$==null||$(mn),Ai(""),mn.length>0&&An([...Cn,mn])},Yr=mn=>{if(p==null||p(mn),mn.isPropagationStopped())return;const ai=Jn.trim(),{length:un}=ai;if(Y.includes(mn.key)&&un>0&&(An(RT({splitChars:Y,allowDuplicates:b,maxTags:v,value:Jn,currentTags:Cn,isDuplicate:En,onDuplicate:w})),Ai(""),mn.preventDefault()),mn.key==="Enter"&&un>0&&!mn.nativeEvent.isComposing){if(mn.preventDefault(),document.querySelector(`#${rn.listId} [data-combobox-option][data-combobox-selected]`))return;Oa(ai)}mn.key==="Backspace"&&un===0&&Cn.length>0&&!mn.nativeEvent.isComposing&&!L&&(an==null||an(Cn[Cn.length-1]),An(Cn.slice(0,Cn.length-1)))},Ka=mn=>{W==null||W(mn),mn.preventDefault(),mn.clipboardData&&(An(RT({splitChars:Y,allowDuplicates:b,maxTags:v,value:`${Jn}${mn.clipboardData.getData("text/plain")}`,currentTags:Cn,isDuplicate:En,onDuplicate:w})),Ai(""))},jr=Cn.map((mn,ai)=>{const un=()=>{const Er=Cn.slice();Er.splice(ai,1),An(Er),an==null||an(mn)};return pn?y.jsx(A.Fragment,{children:pn({option:st[mn]||{value:mn,label:mn,disabled:!1},value:mn,onRemove:un,disabled:H||L})},`${mn}-${ai}`):y.jsx(dl,{withRemoveButton:!L,onRemove:un,unstyled:o,disabled:H,attributes:yn,...nr("pill"),children:mn},`${mn}-${ai}`)});A.useEffect(()=>{O&&rn.selectFirstOption()},[O,Cn,Jn]);const Or=y.jsx(Mn.ClearButton,{...Je,onClear:()=>{var mn;An([]),Ai(""),(mn=Dn.current)==null||mn.focus(),rn.openDropdown(),en==null||en()}});return y.jsxs(y.Fragment,{children:[y.jsxs(Mn,{store:rn,classNames:ja,styles:Ya,unstyled:o,size:f,readOnly:L,__staticSelector:"TagsInput",attributes:yn,onOptionSubmit:mn=>{$==null||$(mn),Ai(""),Cn.length>=v?Nn==null||Nn(mn):An([...Cn,st[mn].value]),rn.resetSelectedOption()},...q,children:[y.jsx(Mn.DropdownTarget,{children:y.jsx(_u,{...on,__staticSelector:"TagsInput",classNames:ja,styles:Ya,unstyled:o,size:f,className:i,style:r,variant:k,disabled:H,radius:I,rightSection:X,__clearSection:Or,__clearable:me&&Cn.length>0&&!H&&!L,__clearSectionMode:Ye,rightSectionWidth:ee,rightSectionPointerEvents:re,rightSectionProps:se,leftSection:ye,leftSectionWidth:ae,leftSectionPointerEvents:le,leftSectionProps:_e,loading:it,loadingPosition:_t,inputContainer:ne,inputWrapperOrder:ze,withAsterisk:we,required:Ce,labelProps:Ne,descriptionProps:ge,errorProps:xe,wrapperProps:Pe,description:ue,label:Be,error:Ge,withErrorStyles:We,__stylesApiProps:{...n,multiline:!0},id:He,mod:dn,attributes:yn,children:y.jsxs(dl.Group,{disabled:H,unstyled:o,...nr("pillsList"),children:[jr,y.jsx(Mn.EventsTarget,{autoComplete:Vn,withExpandedAttribute:!0,children:y.jsx(_u.Field,{...xt,ref:nn,...nr("inputField"),unstyled:o,onKeyDown:Yr,onFocus:mn=>{R==null||R(mn),bn&&rn.openDropdown()},onBlur:mn=>{G==null||G(mn),Fe&&Oa(Jn),rn.closeDropdown()},onPaste:Ka,value:Jn,onChange:mn=>Ai(mn.currentTarget.value),required:Ce&&Cn.length===0,disabled:H,readOnly:L,id:He})})]})})}),y.jsx(Ay,{data:jte({data:zn,value:Cn}),hidden:L||H,filter:P,search:Jn,limit:z,hiddenWhenEmpty:!0,withScrollArea:B,maxDropdownHeight:V,unstyled:o,labelId:Be?`${He}-label`:void 0,"aria-label":Be?void 0:Le["aria-label"],renderOption:On,scrollAreaProps:De})]}),y.jsx(Mn.HiddenInput,{name:Ze,form:Qe,value:Cn,valuesDivider:tn,disabled:H,...Se})]})});GC.classes={...Ui.classes,...Mn.classes};GC.displayName="@mantine/core/TagsInput";const hl=Re(e=>y.jsx(Ui,{component:"input",...be("TextInput",null,e),__staticSelector:"TextInput"}));hl.classes=Ui.classes;hl.displayName="@mantine/core/TextInput";const[Tte,Mte]=Gr("Timeline component was not found in tree");var YC={root:"m_43657ece",itemTitle:"m_2ebe8099",item:"m_436178ff",itemBullet:"m_8affcee1",itemBody:"m_540e8f41"};const KC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,__active:o,__align:l,__lineActive:f,__vars:c,bullet:h,radius:d,color:p,lineVariant:v,children:b,title:w,mod:k,..._}=be("TimelineItem",null,e),C=Mte(),S=ui(),E={classNames:n,styles:r};return y.jsxs(de,{...C.getStyles("item",{...E,className:t,style:i}),mod:[{"line-active":f,active:o},k],__vars:{"--tli-radius":d!==void 0?Yt(d):void 0,"--tli-color":p?ut(p,S):void 0,"--tli-border-style":v||void 0},..._,children:[y.jsx(de,{...C.getStyles("itemBullet",E),mod:{"with-child":!!h,align:l,active:o},children:h}),y.jsxs("div",{...C.getStyles("itemBody",E),children:[w&&y.jsx("div",{...C.getStyles("itemTitle",E),children:w}),y.jsx("div",{...C.getStyles("itemContent",E),children:b})]})]})});KC.classes=YC;KC.displayName="@mantine/core/TimelineItem";const Dte={active:-1,align:"left"},FB=(e,{bulletSize:n,lineWidth:t,radius:i,color:r,autoContrast:a})=>({root:{"--tl-bullet-size":pe(n),"--tl-line-width":pe(t),"--tl-radius":i===void 0?void 0:Yt(i),"--tl-color":r?ut(r,e):void 0,"--tl-icon-color":ly(a,e)?Fm({color:r,theme:e,autoContrast:a}):void 0}}),nc=Re(e=>{const n=be("Timeline",Dte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:f,active:c,color:h,radius:d,bulletSize:p,align:v,lineWidth:b,reverseActive:w,mod:k,autoContrast:_,attributes:C,...S}=n,E=Xe({name:"Timeline",classes:YC,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:FB}),j=A.Children.toArray(f),O=j.map((M,$)=>{var q,P;return A.cloneElement(M,{unstyled:o,__align:v,__active:((q=M.props)==null?void 0:q.active)||(w?c>=j.length-$-1:c>=$),__lineActive:((P=M.props)==null?void 0:P.lineActive)||(w?c>=j.length-$-1:c-1>=$)})});return y.jsx(Tte,{value:{getStyles:E},children:y.jsx(de,{...E("root"),mod:[{align:v},k],...S,children:O})})});nc.classes=YC;nc.varsResolver=FB;nc.displayName="@mantine/core/Timeline";nc.Item=KC;const Rte=["h1","h2","h3","h4","h5","h6"],Pte=["xs","sm","md","lg","xl"];function Nte(e,n){const t=n!==void 0?n:`h${e}`;return Rte.includes(t)?{fontSize:`var(--mantine-${t}-font-size)`,fontWeight:`var(--mantine-${t}-font-weight)`,lineHeight:`var(--mantine-${t}-line-height)`}:Pte.includes(t)?{fontSize:`var(--mantine-font-size-${t})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:pe(t),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var qB={root:"m_8a5d1357"};const $te={order:1},HB=(e,{order:n,size:t,lineClamp:i,textWrap:r})=>{const a=Nte(n||1,t);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof i=="number"?i.toString():void 0,"--title-text-wrap":r}}},bl=Re(e=>{const n=be("Title",$te,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,order:l,vars:f,size:c,variant:h,lineClamp:d,textWrap:p,mod:v,attributes:b,...w}=n,k=Xe({name:"Title",props:n,classes:qB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:f,varsResolver:HB});return[1,2,3,4,5,6].includes(l)?y.jsx(de,{...k("root"),component:`h${l}`,variant:h,mod:[{order:l,"data-line-clamp":typeof d=="number"},v],size:c,...w}):null});bl.classes=qB;bl.varsResolver=HB;bl.displayName="@mantine/core/Title";const XC=A.createContext(null);XC.displayName="@mantine/modals/ModalsContext";function zte(){const e=A.use(XC);if(!e)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return e}const[Lte,$u]=IK("mantine-modals"),Ite=e=>{const n=e.modalId||al();return $u("openModal")({...e,modalId:n}),n},Bte=e=>{const n=e.modalId||al();return $u("openConfirmModal")({...e,modalId:n}),n},Fte=e=>{const n=e.modalId||al();return $u("openContextModal")({...e,modalId:n}),n},qte=$u("closeModal"),Hte=$u("closeAllModals"),Ute=e=>$u("updateModal")(e),Wte=e=>$u("updateContextModal")(e),Ra={open:Ite,close:qte,closeAll:Hte,openConfirmModal:Bte,openContextModal:Fte,updateModal:Ute,updateContextModal:Wte};function Vte({id:e,cancelProps:n,confirmProps:t,labels:i={cancel:"",confirm:""},closeOnConfirm:r=!0,closeOnCancel:a=!0,groupProps:o,onCancel:l,onConfirm:f,children:c}){const{cancel:h,confirm:d}=i,p=zte(),v=w=>{typeof(n==null?void 0:n.onClick)=="function"&&(n==null||n.onClick(w)),typeof l=="function"&&l(),a&&p.closeModal(e)},b=w=>{typeof(t==null?void 0:t.onClick)=="function"&&(t==null||t.onClick(w)),typeof f=="function"&&f(),r&&p.closeModal(e)};return y.jsxs(y.Fragment,{children:[c&&y.jsx(de,{mb:"md",children:c}),y.jsxs(qe,{mt:c?0:"md",justify:"flex-end",...o,children:[y.jsx(gt,{variant:"default",...n,onClick:v,children:(n==null?void 0:n.children)||h}),y.jsx(gt,{...t,onClick:b,children:(t==null?void 0:t.children)||d})]})]})}function PT(e,n){var t,i,r,a;n&&e.type==="confirm"&&((i=(t=e.props).onCancel)==null||i.call(t)),(a=(r=e.props).onClose)==null||a.call(r)}function Gte(e,n){var t;switch(n.type){case"OPEN":return{current:n.modal,modals:[...e.modals,n.modal]};case"CLOSE":{if(!e.modals.find(r=>r.id===n.modalId))return e;const i=e.modals.filter(r=>r.id!==n.modalId);return{current:i[i.length-1]||e.current,modals:i}}case"CLOSE_ALL":return e.modals.length?{current:e.current,modals:[]}:e;case"UPDATE":{const{modalId:i,newProps:r}=n,a=e.modals.map(l=>l.id!==i?l:l.type==="content"||l.type==="confirm"?{...l,props:{...l.props,...r}}:l.type==="context"?{...l,props:{...l.props,...r,innerProps:{...l.props.innerProps,...r.innerProps}}}:l),o=((t=e.current)==null?void 0:t.id)===i&&a.find(l=>l.id===i)||e.current;return{...e,modals:a,current:o}}default:return e}}function Yte(e){if(!e)return{confirmProps:{},modalProps:{}};const{id:n,children:t,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:l,confirmProps:f,groupProps:c,labels:h,...d}=e;return{confirmProps:{id:n,children:t,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:l,confirmProps:f,groupProps:c,labels:h},modalProps:{id:n,...d}}}function Kte({children:e,modalProps:n,labels:t,modals:i}){const[r,a]=A.useReducer(Gte,{modals:[],current:null}),o=A.useRef(r);o.current=r;const l=A.useRef(!1),f=A.useCallback(S=>{l.current||(l.current=!0,o.current.modals.concat().reverse().forEach(E=>{PT(E,S)}),l.current=!1),a({type:"CLOSE_ALL",canceled:S})},[o,a]),c=A.useCallback(({modalId:S,...E})=>{const j=S||al();return a({type:"OPEN",modal:{id:j,type:"content",props:E}}),j},[a]),h=A.useCallback(({modalId:S,...E})=>{const j=S||al();return a({type:"OPEN",modal:{id:j,type:"confirm",props:E}}),j},[a]),d=A.useCallback((S,{modalId:E,...j})=>{const O=E||al();return a({type:"OPEN",modal:{id:O,type:"context",props:j,ctx:S}}),O},[a]),p=A.useCallback((S,E)=>{if(!l.current){const j=o.current.modals.find(O=>O.id===S);j&&(l.current=!0,PT(j,E),l.current=!1)}a({type:"CLOSE",modalId:S,canceled:E})},[o,a]),v=A.useCallback(({modalId:S,...E})=>{a({type:"UPDATE",modalId:S,newProps:E})},[a]),b=A.useCallback(({modalId:S,...E})=>{a({type:"UPDATE",modalId:S,newProps:E})},[a]);Lte({openModal:c,openConfirmModal:h,openContextModal:({modal:S,...E})=>d(S,E),closeModal:p,closeContextModal:p,closeAllModals:f,updateModal:v,updateContextModal:b});const w={modalProps:n||{},modals:r.modals,openModal:c,openConfirmModal:h,openContextModal:d,closeModal:p,closeContextModal:p,closeAll:f,updateModal:v,updateContextModal:b},k=()=>{const S=o.current.current;switch(S==null?void 0:S.type){case"context":{const{innerProps:E,...j}=S.props,O=i[S.ctx];return{modalProps:j,content:y.jsx(O,{innerProps:E,context:w,id:S.id})}}case"confirm":{const{modalProps:E,confirmProps:j}=Yte(S.props);return{modalProps:E,content:y.jsx(Vte,{...j,id:S.id,labels:S.props.labels||t})}}case"content":{const{children:E,...j}=S.props;return{modalProps:j,content:E}}default:return{modalProps:{},content:null}}},{modalProps:_,content:C}=k();return y.jsxs(XC,{value:w,children:[y.jsx(Sr,{zIndex:wa("modal")+1,...n,..._,opened:r.modals.length>0,onClose:()=>{var S;return p((S=r.current)==null?void 0:S.id)},children:C}),e]})}function Xte(e){let n=e,t=!1;const i=new Set;return{getState(){return n},updateState(r){n=typeof r=="function"?r(n):r},setState(r){this.updateState(r),i.forEach(a=>a(n))},initialize(r){t||(n=r,t=!0)},subscribe(r){return i.add(r),()=>i.delete(r)}}}function Zte(e){return A.useSyncExternalStore(e.subscribe,()=>e.getState(),()=>e.getState())}function Qte(e,n,t){const i=[],r=[],a={};for(const o of e){const l=o.position||n;a[l]=a[l]||0,a[l]+=1,a[l]<=t?r.push(o):i.push(o)}return{notifications:r,queue:i}}const Jte=()=>Xte({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),zu=Jte(),eie=(e=zu)=>Zte(e);function Uc(e,n){const t=e.getState(),i=Qte(n([...t.notifications,...t.queue]),t.defaultPosition,t.limit);e.setState({notifications:i.notifications,queue:i.queue,limit:t.limit,defaultPosition:t.defaultPosition})}function nie(e,n=zu){const t=e.id||al();return Uc(n,i=>e.id&&i.some(r=>r.id===e.id)?i:[...i,{...e,id:t}]),t}function UB(e,n=zu){return Uc(n,t=>t.filter(i=>{var r;return i.id===e?((r=i.onClose)==null||r.call(i,i),!1):!0})),e}function tie(e,n=zu){return Uc(n,t=>t.map(i=>i.id===e.id?{...i,...e}:i)),e.id}function iie(e=zu){Uc(e,()=>[])}function rie(e=zu){Uc(e,n=>n.slice(0,e.getState().limit))}const jn={show:nie,hide:UB,update:tie,clean:iie,cleanQueue:rie,updateState:Uc},WB=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function aie(e,n){return e.reduce((t,i)=>(t[i.position||n].push(i),t),WB.reduce((t,i)=>(t[i]=[],t),{}))}const NT={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},oie={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function sie({state:e,maxHeight:n,position:t,transitionDuration:i}){const[r,a]=t.split("-"),o=a==="center"?`${r}-center`:a,l={opacity:0,maxHeight:n,transform:NT[o],transitionDuration:`${i}ms, ${i}ms, ${i}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},f={opacity:1,transform:oie[o]},c={opacity:0,maxHeight:0,transform:NT[o]};return{...l,...{entering:f,entered:f,exiting:c,exited:c}[e]}}function lie(e,n){return typeof n=="number"?n:n===!1||e===!1?!1:e}function VB({data:e,onHide:n,autoClose:t,paused:i,onHoverStart:r,onHoverEnd:a,...o}){const{autoClose:l,message:f,onOpen:c,...h}=e,d=lie(t,e.autoClose),p=A.useRef(-1),[v,b]=A.useState(!1),w=()=>window.clearTimeout(p.current),k=()=>{n(e.id),w()},_=()=>{w(),typeof d=="number"&&(p.current=window.setTimeout(k,d))},C=()=>{b(!0),r==null||r()},S=()=>{b(!1),a==null||a()};return A.useEffect(()=>{var E;(E=e.onOpen)==null||E.call(e,e)},[]),A.useEffect(()=>(_(),w),[d]),A.useEffect(()=>(i||v?w():_(),w),[i,v]),y.jsx(Vy,{...o,...h,onClose:k,onMouseEnter:C,onMouseLeave:S,children:f})}VB.displayName="@mantine/notifications/NotificationContainer";var GB={root:"m_b37d9ac7",notification:"m_5ed0edd0"};function MS(){return MS=Object.assign?Object.assign.bind():function(e){for(var n=1;n({root:{"--notifications-z-index":n==null?void 0:n.toString(),"--notifications-container-width":pe(t)}}),ko=Re(e=>{const n=be("Notifications",kie,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:f,position:c,autoClose:h,transitionDuration:d,containerWidth:p,notificationMaxHeight:v,limit:b,zIndex:w,store:k,portalProps:_,withinPortal:C,pauseResetOnHover:S,...E}=n,j=ui(),O=eie(k),M=PK(),$=L6(),q=A.useRef({}),P=A.useRef(0),[z,B]=A.useState(0),V=A.useCallback(()=>B(Y=>Y+1),[]),U=A.useCallback(()=>B(Y=>Math.max(0,Y-1)),[]),N=j.respectReducedMotion&&$?1:d,D=Xe({name:"Notifications",classes:GB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f,vars:l,varsResolver:XB});A.useEffect(()=>{k==null||k.updateState(Y=>({...Y,limit:b||5,defaultPosition:c}))},[b,c]),ns(()=>{O.notifications.length>P.current&&setTimeout(()=>M(),0),P.current=O.notifications.length},[O.notifications]);const L=aie(O.notifications,c),H=WB.reduce((Y,R)=>(Y[R]=L[R].map(({style:G,...W})=>y.jsx(wie,{timeout:N,onEnter:()=>q.current[W.id].offsetHeight,nodeRef:{current:q.current[W.id]},children:I=>y.jsx(VB,{ref:X=>{X&&(q.current[W.id]=X)},data:W,onHide:X=>UB(X,k),autoClose:h,paused:S==="all"?z>0:!1,onHoverStart:V,onHoverEnd:U,...D("notification",{style:{...sie({state:I,position:R,transitionDuration:N,maxHeight:v}),...G}})})},W.id)),Y),{});return y.jsxs(ul,{withinPortal:C,..._,children:[y.jsx(de,{...D("root"),"data-position":"top-center",...E,children:y.jsx(Gs,{children:H["top-center"]})}),y.jsx(de,{...D("root"),"data-position":"top-left",...E,children:y.jsx(Gs,{children:H["top-left"]})}),y.jsx(de,{...D("root",{className:bu.classNames.fullWidth}),"data-position":"top-right",...E,children:y.jsx(Gs,{children:H["top-right"]})}),y.jsx(de,{...D("root",{className:bu.classNames.fullWidth}),"data-position":"bottom-right",...E,children:y.jsx(Gs,{children:H["bottom-right"]})}),y.jsx(de,{...D("root"),"data-position":"bottom-left",...E,children:y.jsx(Gs,{children:H["bottom-left"]})}),y.jsx(de,{...D("root"),"data-position":"bottom-center",...E,children:y.jsx(Gs,{children:H["bottom-center"]})})]})});ko.classes=GB;ko.varsResolver=XB;ko.displayName="@mantine/notifications/Notifications";ko.show=jn.show;ko.hide=jn.hide;ko.update=jn.update;ko.clean=jn.clean;ko.cleanQueue=jn.cleanQueue;ko.updateState=jn.updateState;var Rk={exports:{}},nh={},Pk={exports:{}},Nk={};/** + * @license React + * scheduler.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var BT;function _ie(){return BT||(BT=1,(function(e){function n(D,L){var H=D.length;D.push(L);e:for(;0>>1,R=D[Y];if(0>>1;Yr(I,H))Xr(ee,I)?(D[Y]=ee,D[X]=H,Y=X):(D[Y]=I,D[W]=H,Y=W);else if(Xr(ee,H))D[Y]=ee,D[X]=H,Y=X;else break e}}return L}function r(D,L){var H=D.sortIndex-L.sortIndex;return H!==0?H:D.id-L.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var f=[],c=[],h=1,d=null,p=3,v=!1,b=!1,w=!1,k=!1,_=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function E(D){for(var L=t(c);L!==null;){if(L.callback===null)i(c);else if(L.startTime<=D)i(c),L.sortIndex=L.expirationTime,n(f,L);else break;L=t(c)}}function j(D){if(w=!1,E(D),!b)if(t(f)!==null)b=!0,O||(O=!0,B());else{var L=t(c);L!==null&&N(j,L.startTime-D)}}var O=!1,M=-1,$=5,q=-1;function P(){return k?!0:!(e.unstable_now()-q<$)}function z(){if(k=!1,O){var D=e.unstable_now();q=D;var L=!0;try{e:{b=!1,w&&(w=!1,C(M),M=-1),v=!0;var H=p;try{n:{for(E(D),d=t(f);d!==null&&!(d.expirationTime>D&&P());){var Y=d.callback;if(typeof Y=="function"){d.callback=null,p=d.priorityLevel;var R=Y(d.expirationTime<=D);if(D=e.unstable_now(),typeof R=="function"){d.callback=R,E(D),L=!0;break n}d===t(f)&&i(f),E(D)}else i(f);d=t(f)}if(d!==null)L=!0;else{var G=t(c);G!==null&&N(j,G.startTime-D),L=!1}}break e}finally{d=null,p=H,v=!1}L=void 0}}finally{L?B():O=!1}}}var B;if(typeof S=="function")B=function(){S(z)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,U=V.port2;V.port1.onmessage=z,B=function(){U.postMessage(null)}}else B=function(){_(z,0)};function N(D,L){M=_(function(){D(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(D){D.callback=null},e.unstable_forceFrameRate=function(D){0>D||125Y?(D.sortIndex=H,n(c,D),t(f)===null&&D===t(c)&&(w?(C(M),M=-1):w=!0,N(j,H-Y))):(D.sortIndex=R,n(f,D),b||v||(b=!0,O||(O=!0,B()))),D},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(D){var L=p;return function(){var H=p;p=L;try{return D.apply(this,arguments)}finally{p=H}}}})(Nk)),Nk}var FT;function xie(){return FT||(FT=1,Pk.exports=_ie()),Pk.exports}/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var qT;function Sie(){if(qT)return nh;qT=1;var e=xie(),n=R6(),t=xz();function i(s){var u="https://react.dev/errors/"+s;if(1R||(s.current=Y[R],Y[R]=null,R--)}function I(s,u){R++,Y[R]=s.current,s.current=u}var X=G(null),ee=G(null),re=G(null),se=G(null);function ye(s,u){switch(I(re,u),I(ee,s),I(X,null),u.nodeType){case 9:case 11:s=(s=u.documentElement)&&(s=s.namespaceURI)?FE(s):0;break;default:if(s=u.tagName,u=u.namespaceURI)u=FE(u),s=qE(u,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}W(X),I(X,s)}function ae(){W(X),W(ee),W(re)}function le(s){s.memoizedState!==null&&I(se,s);var u=X.current,m=qE(u,s.type);u!==m&&(I(ee,s),I(X,m))}function _e(s){ee.current===s&&(W(X),W(ee)),se.current===s&&(W(se),Yd._currentValue=H)}var ne,ze;function we(s){if(ne===void 0)try{throw Error()}catch(m){var u=m.stack.trim().match(/\n( *(at )?)/);ne=u&&u[1]||"",ze=-1)":-1x||J[g]!==ce[x]){var Oe=` +`+J[g].replace(" at new "," at ");return s.displayName&&Oe.includes("")&&(Oe=Oe.replace("",s.displayName)),Oe}while(1<=g&&0<=x);break}}}finally{Ce=!1,Error.prepareStackTrace=m}return(m=s?s.displayName||s.name:"")?we(m):""}function ge(s,u){switch(s.tag){case 26:case 27:case 5:return we(s.type);case 16:return we("Lazy");case 13:return s.child!==u&&u!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return Ne(s.type,!1);case 11:return Ne(s.type.render,!1);case 1:return Ne(s.type,!0);case 31:return we("Activity");default:return""}}function xe(s){try{var u="",m=null;do u+=ge(s,m),m=s,s=s.return;while(s);return u}catch(g){return` +Error generating stack: `+g.message+` +`+g.stack}}var Pe=Object.prototype.hasOwnProperty,ue=e.unstable_scheduleCallback,Be=e.unstable_cancelCallback,Ge=e.unstable_shouldYield,We=e.unstable_requestPaint,Ze=e.unstable_now,Qe=e.unstable_getCurrentPriorityLevel,ie=e.unstable_ImmediatePriority,me=e.unstable_UserBlockingPriority,Ye=e.unstable_NormalPriority,Je=e.unstable_LowPriority,Se=e.unstable_IdlePriority,tn=e.log,dn=e.unstable_setDisableYieldValue,On=null,pn=null;function an(s){if(typeof tn=="function"&&dn(s),pn&&typeof pn.setStrictMode=="function")try{pn.setStrictMode(On,s)}catch{}}var en=Math.clz32?Math.clz32:Fe,Nn=Math.log,De=Math.LN2;function Fe(s){return s>>>=0,s===0?32:31-(Nn(s)/De|0)|0}var En=256,bn=262144,yn=4194304;function wn(s){var u=s&42;if(u!==0)return u;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function it(s,u,m){var g=s.pendingLanes;if(g===0)return 0;var x=0,T=s.suspendedLanes,F=s.pingedLanes;s=s.warmLanes;var K=g&134217727;return K!==0?(g=K&~T,g!==0?x=wn(g):(F&=K,F!==0?x=wn(F):m||(m=K&~s,m!==0&&(x=wn(m))))):(K=g&~T,K!==0?x=wn(K):F!==0?x=wn(F):m||(m=g&~s,m!==0&&(x=wn(m)))),x===0?0:u!==0&&u!==x&&(u&T)===0&&(T=x&-x,m=u&-u,T>=m||T===32&&(m&4194048)!==0)?u:x}function _t(s,u){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&u)===0}function Le(s,u){switch(s){case 1:case 2:case 4:case 8:case 64:return u+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function He(){var s=yn;return yn<<=1,(yn&62914560)===0&&(yn=4194304),s}function zn(s){for(var u=[],m=0;31>m;m++)u.push(s);return u}function st(s,u){s.pendingLanes|=u,u!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Dn(s,u,m,g,x,T){var F=s.pendingLanes;s.pendingLanes=m,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=m,s.entangledLanes&=m,s.errorRecoveryDisabledLanes&=m,s.shellSuspendCounter=0;var K=s.entanglements,J=s.expirationTimes,ce=s.hiddenUpdates;for(m=F&~m;0"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var Ap=/[\n"\\]/g;function ir(s){return s.replace(Ap,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function cd(s,u,m,g,x,T,F,K){s.name="",F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"?s.type=F:s.removeAttribute("type"),u!=null?F==="number"?(u===0&&s.value===""||s.value!=u)&&(s.value=""+tr(u)):s.value!==""+tr(u)&&(s.value=""+tr(u)):F!=="submit"&&F!=="reset"||s.removeAttribute("value"),u!=null?dd(s,F,tr(u)):m!=null?dd(s,F,tr(m)):g!=null&&s.removeAttribute("value"),x==null&&T!=null&&(s.defaultChecked=!!T),x!=null&&(s.checked=x&&typeof x!="function"&&typeof x!="symbol"),K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?s.name=""+tr(K):s.removeAttribute("name")}function jp(s,u,m,g,x,T,F,K){if(T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(s.type=T),u!=null||m!=null){if(!(T!=="submit"&&T!=="reset"||u!=null)){Wu(s);return}m=m!=null?""+tr(m):"",u=u!=null?""+tr(u):m,K||u===s.value||(s.value=u),s.defaultValue=u}g=g??x,g=typeof g!="function"&&typeof g!="symbol"&&!!g,s.checked=K?s.checked:!!g,s.defaultChecked=!!g,F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"&&(s.name=F),Wu(s)}function dd(s,u,m){u==="number"&&Ml(s.ownerDocument)===s||s.defaultValue===""+m||(s.defaultValue=""+m)}function bs(s,u,m,g){if(s=s.options,u){u={};for(var x=0;x"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pl=!1;if(Vi)try{var Za={};Object.defineProperty(Za,"passive",{get:function(){Pl=!0}}),window.addEventListener("test",Za,Za),window.removeEventListener("test",Za,Za)}catch{Pl=!1}var Mr=null,Ri=null,ws=null;function Op(){if(ws)return ws;var s,u=Ri,m=u.length,g,x="value"in Mr?Mr.value:Mr.textContent,T=x.length;for(s=0;s=pd),YA=" ",KA=!1;function XA(s,u){switch(s){case"keyup":return DG.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ZA(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Yu=!1;function PG(s,u){switch(s){case"compositionend":return ZA(u);case"keypress":return u.which!==32?null:(KA=!0,YA);case"textInput":return s=u.data,s===YA&&KA?null:s;default:return null}}function NG(s,u){if(Yu)return s==="compositionend"||!sb&&XA(s,u)?(s=Op(),ws=Ri=Mr=null,Yu=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:m,offset:u-s};s=g}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=aj(m)}}function sj(s,u){return s&&u?s===u?!0:s&&s.nodeType===3?!1:u&&u.nodeType===3?sj(s,u.parentNode):"contains"in s?s.contains(u):s.compareDocumentPosition?!!(s.compareDocumentPosition(u)&16):!1:!1}function lj(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var u=Ml(s.document);u instanceof s.HTMLIFrameElement;){try{var m=typeof u.contentWindow.location.href=="string"}catch{m=!1}if(m)s=u.contentWindow;else break;u=Ml(s.document)}return u}function fb(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u&&(u==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||u==="textarea"||s.contentEditable==="true")}var HG=Vi&&"documentMode"in document&&11>=document.documentMode,Ku=null,cb=null,bd=null,db=!1;function uj(s,u,m){var g=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;db||Ku==null||Ku!==Ml(g)||(g=Ku,"selectionStart"in g&&fb(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),bd&&yd(bd,g)||(bd=g,g=bv(cb,"onSelect"),0>=F,x-=F,Qa=1<<32-en(u)+x|m<qn?(tt=fn,fn=null):tt=fn.sibling;var dt=he(oe,fn,fe[qn],Te);if(dt===null){fn===null&&(fn=tt);break}s&&fn&&dt.alternate===null&&u(oe,fn),te=T(dt,te,qn),ct===null?vn=dt:ct.sibling=dt,ct=dt,fn=tt}if(qn===fe.length)return m(oe,fn),rt&&Co(oe,qn),vn;if(fn===null){for(;qnqn?(tt=fn,fn=null):tt=fn.sibling;var qs=he(oe,fn,dt.value,Te);if(qs===null){fn===null&&(fn=tt);break}s&&fn&&qs.alternate===null&&u(oe,fn),te=T(qs,te,qn),ct===null?vn=qs:ct.sibling=qs,ct=qs,fn=tt}if(dt.done)return m(oe,fn),rt&&Co(oe,qn),vn;if(fn===null){for(;!dt.done;qn++,dt=fe.next())dt=Me(oe,dt.value,Te),dt!==null&&(te=T(dt,te,qn),ct===null?vn=dt:ct.sibling=dt,ct=dt);return rt&&Co(oe,qn),vn}for(fn=g(fn);!dt.done;qn++,dt=fe.next())dt=ke(fn,oe,qn,dt.value,Te),dt!==null&&(s&&dt.alternate!==null&&fn.delete(dt.key===null?qn:dt.key),te=T(dt,te,qn),ct===null?vn=dt:ct.sibling=dt,ct=dt);return s&&fn.forEach(function(uK){return u(oe,uK)}),rt&&Co(oe,qn),vn}function jt(oe,te,fe,Te){if(typeof fe=="object"&&fe!==null&&fe.type===w&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case v:e:{for(var vn=fe.key;te!==null;){if(te.key===vn){if(vn=fe.type,vn===w){if(te.tag===7){m(oe,te.sibling),Te=x(te,fe.props.children),Te.return=oe,oe=Te;break e}}else if(te.elementType===vn||typeof vn=="object"&&vn!==null&&vn.$$typeof===$&&Ul(vn)===te.type){m(oe,te.sibling),Te=x(te,fe.props),Cd(Te,fe),Te.return=oe,oe=Te;break e}m(oe,te);break}else u(oe,te);te=te.sibling}fe.type===w?(Te=Il(fe.props.children,oe.mode,Te,fe.key),Te.return=oe,oe=Te):(Te=$p(fe.type,fe.key,fe.props,null,oe.mode,Te),Cd(Te,fe),Te.return=oe,oe=Te)}return F(oe);case b:e:{for(vn=fe.key;te!==null;){if(te.key===vn)if(te.tag===4&&te.stateNode.containerInfo===fe.containerInfo&&te.stateNode.implementation===fe.implementation){m(oe,te.sibling),Te=x(te,fe.children||[]),Te.return=oe,oe=Te;break e}else{m(oe,te);break}else u(oe,te);te=te.sibling}Te=bb(fe,oe.mode,Te),Te.return=oe,oe=Te}return F(oe);case $:return fe=Ul(fe),jt(oe,te,fe,Te)}if(N(fe))return ln(oe,te,fe,Te);if(B(fe)){if(vn=B(fe),typeof vn!="function")throw Error(i(150));return fe=vn.call(fe),_n(oe,te,fe,Te)}if(typeof fe.then=="function")return jt(oe,te,Hp(fe),Te);if(fe.$$typeof===S)return jt(oe,te,Ip(oe,fe),Te);Up(oe,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint"?(fe=""+fe,te!==null&&te.tag===6?(m(oe,te.sibling),Te=x(te,fe),Te.return=oe,oe=Te):(m(oe,te),Te=yb(fe,oe.mode,Te),Te.return=oe,oe=Te),F(oe)):m(oe,te)}return function(oe,te,fe,Te){try{Sd=0;var vn=jt(oe,te,fe,Te);return sf=null,vn}catch(fn){if(fn===of||fn===Fp)throw fn;var ct=Rr(29,fn,null,oe.mode);return ct.lanes=Te,ct.return=oe,ct}finally{}}}var Vl=Dj(!0),Rj=Dj(!1),Cs=!1;function Mb(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Db(s,u){s=s.updateQueue,u.updateQueue===s&&(u.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function As(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function js(s,u,m){var g=s.updateQueue;if(g===null)return null;if(g=g.shared,(vt&2)!==0){var x=g.pending;return x===null?u.next=u:(u.next=x.next,x.next=u),g.pending=u,u=Np(s),vj(s,null,m),u}return Pp(s,g,u,m),Np(s)}function Ad(s,u,m){if(u=u.updateQueue,u!==null&&(u=u.shared,(m&4194048)!==0)){var g=u.lanes;g&=s.pendingLanes,m|=g,u.lanes=m,rn(s,m)}}function Rb(s,u){var m=s.updateQueue,g=s.alternate;if(g!==null&&(g=g.updateQueue,m===g)){var x=null,T=null;if(m=m.firstBaseUpdate,m!==null){do{var F={lane:m.lane,tag:m.tag,payload:m.payload,callback:null,next:null};T===null?x=T=F:T=T.next=F,m=m.next}while(m!==null);T===null?x=T=u:T=T.next=u}else x=T=u;m={baseState:g.baseState,firstBaseUpdate:x,lastBaseUpdate:T,shared:g.shared,callbacks:g.callbacks},s.updateQueue=m;return}s=m.lastBaseUpdate,s===null?m.firstBaseUpdate=u:s.next=u,m.lastBaseUpdate=u}var Pb=!1;function jd(){if(Pb){var s=af;if(s!==null)throw s}}function Od(s,u,m,g){Pb=!1;var x=s.updateQueue;Cs=!1;var T=x.firstBaseUpdate,F=x.lastBaseUpdate,K=x.shared.pending;if(K!==null){x.shared.pending=null;var J=K,ce=J.next;J.next=null,F===null?T=ce:F.next=ce,F=J;var Oe=s.alternate;Oe!==null&&(Oe=Oe.updateQueue,K=Oe.lastBaseUpdate,K!==F&&(K===null?Oe.firstBaseUpdate=ce:K.next=ce,Oe.lastBaseUpdate=J))}if(T!==null){var Me=x.baseState;F=0,Oe=ce=J=null,K=T;do{var he=K.lane&-536870913,ke=he!==K.lane;if(ke?(nt&he)===he:(g&he)===he){he!==0&&he===rf&&(Pb=!0),Oe!==null&&(Oe=Oe.next={lane:0,tag:K.tag,payload:K.payload,callback:null,next:null});e:{var ln=s,_n=K;he=u;var jt=m;switch(_n.tag){case 1:if(ln=_n.payload,typeof ln=="function"){Me=ln.call(jt,Me,he);break e}Me=ln;break e;case 3:ln.flags=ln.flags&-65537|128;case 0:if(ln=_n.payload,he=typeof ln=="function"?ln.call(jt,Me,he):ln,he==null)break e;Me=d({},Me,he);break e;case 2:Cs=!0}}he=K.callback,he!==null&&(s.flags|=64,ke&&(s.flags|=8192),ke=x.callbacks,ke===null?x.callbacks=[he]:ke.push(he))}else ke={lane:he,tag:K.tag,payload:K.payload,callback:K.callback,next:null},Oe===null?(ce=Oe=ke,J=Me):Oe=Oe.next=ke,F|=he;if(K=K.next,K===null){if(K=x.shared.pending,K===null)break;ke=K,K=ke.next,ke.next=null,x.lastBaseUpdate=ke,x.shared.pending=null}}while(!0);Oe===null&&(J=Me),x.baseState=J,x.firstBaseUpdate=ce,x.lastBaseUpdate=Oe,T===null&&(x.shared.lanes=0),Ds|=F,s.lanes=F,s.memoizedState=Me}}function Pj(s,u){if(typeof s!="function")throw Error(i(191,s));s.call(u)}function Nj(s,u){var m=s.callbacks;if(m!==null)for(s.callbacks=null,s=0;sT?T:8;var F=D.T,K={};D.T=K,Jb(s,!1,u,m);try{var J=x(),ce=D.S;if(ce!==null&&ce(K,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var Oe=QG(J,g);Md(s,u,Oe,Lr(s))}else Md(s,u,g,Lr(s))}catch(Me){Md(s,u,{then:function(){},status:"rejected",reason:Me},Lr())}finally{L.p=T,F!==null&&K.types!==null&&(F.types=K.types),D.T=F}}function rY(){}function Zb(s,u,m,g){if(s.tag!==5)throw Error(i(476));var x=hO(s).queue;dO(s,x,u,H,m===null?rY:function(){return mO(s),m(g)})}function hO(s){var u=s.memoizedState;if(u!==null)return u;u={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eo,lastRenderedState:H},next:null};var m={};return u.next={memoizedState:m,baseState:m,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eo,lastRenderedState:m},next:null},s.memoizedState=u,s=s.alternate,s!==null&&(s.memoizedState=u),u}function mO(s){var u=hO(s);u.next===null&&(u=s.alternate.memoizedState),Md(s,u.next.queue,{},Lr())}function Qb(){return Ni(Yd)}function pO(){return li().memoizedState}function vO(){return li().memoizedState}function aY(s){for(var u=s.return;u!==null;){switch(u.tag){case 24:case 3:var m=Lr();s=As(m);var g=js(u,s,m);g!==null&&(yr(g,u,m),Ad(g,u,m)),u={cache:jb()},s.payload=u;return}u=u.return}}function oY(s,u,m){var g=Lr();m={lane:g,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},ev(s)?yO(u,m):(m=vb(s,u,m,g),m!==null&&(yr(m,s,g),bO(m,u,g)))}function gO(s,u,m){var g=Lr();Md(s,u,m,g)}function Md(s,u,m,g){var x={lane:g,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null};if(ev(s))yO(u,x);else{var T=s.alternate;if(s.lanes===0&&(T===null||T.lanes===0)&&(T=u.lastRenderedReducer,T!==null))try{var F=u.lastRenderedState,K=T(F,m);if(x.hasEagerState=!0,x.eagerState=K,Dr(K,F))return Pp(s,u,x,0),Mt===null&&Rp(),!1}catch{}finally{}if(m=vb(s,u,x,g),m!==null)return yr(m,s,g),bO(m,u,g),!0}return!1}function Jb(s,u,m,g){if(g={lane:2,revertLane:Mw(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},ev(s)){if(u)throw Error(i(479))}else u=vb(s,m,g,2),u!==null&&yr(u,s,2)}function ev(s){var u=s.alternate;return s===In||u!==null&&u===In}function yO(s,u){uf=Gp=!0;var m=s.pending;m===null?u.next=u:(u.next=m.next,m.next=u),s.pending=u}function bO(s,u,m){if((m&4194048)!==0){var g=u.lanes;g&=s.pendingLanes,m|=g,u.lanes=m,rn(s,m)}}var Dd={readContext:Ni,use:Xp,useCallback:ei,useContext:ei,useEffect:ei,useImperativeHandle:ei,useLayoutEffect:ei,useInsertionEffect:ei,useMemo:ei,useReducer:ei,useRef:ei,useState:ei,useDebugValue:ei,useDeferredValue:ei,useTransition:ei,useSyncExternalStore:ei,useId:ei,useHostTransitionStatus:ei,useFormState:ei,useActionState:ei,useOptimistic:ei,useMemoCache:ei,useCacheRefresh:ei};Dd.useEffectEvent=ei;var wO={readContext:Ni,use:Xp,useCallback:function(s,u){return sr().memoizedState=[s,u===void 0?null:u],s},useContext:Ni,useEffect:iO,useImperativeHandle:function(s,u,m){m=m!=null?m.concat([s]):null,Qp(4194308,4,sO.bind(null,u,s),m)},useLayoutEffect:function(s,u){return Qp(4194308,4,s,u)},useInsertionEffect:function(s,u){Qp(4,2,s,u)},useMemo:function(s,u){var m=sr();u=u===void 0?null:u;var g=s();if(Gl){an(!0);try{s()}finally{an(!1)}}return m.memoizedState=[g,u],g},useReducer:function(s,u,m){var g=sr();if(m!==void 0){var x=m(u);if(Gl){an(!0);try{m(u)}finally{an(!1)}}}else x=u;return g.memoizedState=g.baseState=x,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:x},g.queue=s,s=s.dispatch=oY.bind(null,In,s),[g.memoizedState,s]},useRef:function(s){var u=sr();return s={current:s},u.memoizedState=s},useState:function(s){s=Vb(s);var u=s.queue,m=gO.bind(null,In,u);return u.dispatch=m,[s.memoizedState,m]},useDebugValue:Kb,useDeferredValue:function(s,u){var m=sr();return Xb(m,s,u)},useTransition:function(){var s=Vb(!1);return s=dO.bind(null,In,s.queue,!0,!1),sr().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,u,m){var g=In,x=sr();if(rt){if(m===void 0)throw Error(i(407));m=m()}else{if(m=u(),Mt===null)throw Error(i(349));(nt&127)!==0||Fj(g,u,m)}x.memoizedState=m;var T={value:m,getSnapshot:u};return x.queue=T,iO(Hj.bind(null,g,T,s),[s]),g.flags|=2048,cf(9,{destroy:void 0},qj.bind(null,g,T,m,u),null),m},useId:function(){var s=sr(),u=Mt.identifierPrefix;if(rt){var m=Ja,g=Qa;m=(g&~(1<<32-en(g)-1)).toString(32)+m,u="_"+u+"R_"+m,m=Yp++,0<\/script>",T=T.removeChild(T.firstChild);break;case"select":T=typeof g.is=="string"?F.createElement("select",{is:g.is}):F.createElement("select"),g.multiple?T.multiple=!0:g.size&&(T.size=g.size);break;default:T=typeof g.is=="string"?F.createElement(x,{is:g.is}):F.createElement(x)}}T[Jn]=u,T[Zt]=g;e:for(F=u.child;F!==null;){if(F.tag===5||F.tag===6)T.appendChild(F.stateNode);else if(F.tag!==4&&F.tag!==27&&F.child!==null){F.child.return=F,F=F.child;continue}if(F===u)break e;for(;F.sibling===null;){if(F.return===null||F.return===u)break e;F=F.return}F.sibling.return=F.return,F=F.sibling}u.stateNode=T;e:switch(zi(T,x,g),x){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}g&&Mo(u)}}return qt(u),hw(u,u.type,s===null?null:s.memoizedProps,u.pendingProps,m),null;case 6:if(s&&u.stateNode!=null)s.memoizedProps!==g&&Mo(u);else{if(typeof g!="string"&&u.stateNode===null)throw Error(i(166));if(s=re.current,nf(u)){if(s=u.stateNode,m=u.memoizedProps,g=null,x=Pi,x!==null)switch(x.tag){case 27:case 5:g=x.memoizedProps}s[Jn]=u,s=!!(s.nodeValue===m||g!==null&&g.suppressHydrationWarning===!0||IE(s.nodeValue,m)),s||xs(u,!0)}else s=wv(s).createTextNode(g),s[Jn]=u,u.stateNode=s}return qt(u),null;case 31:if(m=u.memoizedState,s===null||s.memoizedState!==null){if(g=nf(u),m!==null){if(s===null){if(!g)throw Error(i(318));if(s=u.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(i(557));s[Jn]=u}else Bl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;qt(u),s=!1}else m=xb(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=m),s=!0;if(!s)return u.flags&256?(Nr(u),u):(Nr(u),null);if((u.flags&128)!==0)throw Error(i(558))}return qt(u),null;case 13:if(g=u.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(x=nf(u),g!==null&&g.dehydrated!==null){if(s===null){if(!x)throw Error(i(318));if(x=u.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(i(317));x[Jn]=u}else Bl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;qt(u),x=!1}else x=xb(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=x),x=!0;if(!x)return u.flags&256?(Nr(u),u):(Nr(u),null)}return Nr(u),(u.flags&128)!==0?(u.lanes=m,u):(m=g!==null,s=s!==null&&s.memoizedState!==null,m&&(g=u.child,x=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(x=g.alternate.memoizedState.cachePool.pool),T=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(T=g.memoizedState.cachePool.pool),T!==x&&(g.flags|=2048)),m!==s&&m&&(u.child.flags|=8192),av(u,u.updateQueue),qt(u),null);case 4:return ae(),s===null&&Nw(u.stateNode.containerInfo),qt(u),null;case 10:return jo(u.type),qt(u),null;case 19:if(W(si),g=u.memoizedState,g===null)return qt(u),null;if(x=(u.flags&128)!==0,T=g.rendering,T===null)if(x)Pd(g,!1);else{if(ni!==0||s!==null&&(s.flags&128)!==0)for(s=u.child;s!==null;){if(T=Vp(s),T!==null){for(u.flags|=128,Pd(g,!1),s=T.updateQueue,u.updateQueue=s,av(u,s),u.subtreeFlags=0,s=m,m=u.child;m!==null;)gj(m,s),m=m.sibling;return I(si,si.current&1|2),rt&&Co(u,g.treeForkCount),u.child}s=s.sibling}g.tail!==null&&Ze()>fv&&(u.flags|=128,x=!0,Pd(g,!1),u.lanes=4194304)}else{if(!x)if(s=Vp(T),s!==null){if(u.flags|=128,x=!0,s=s.updateQueue,u.updateQueue=s,av(u,s),Pd(g,!0),g.tail===null&&g.tailMode==="hidden"&&!T.alternate&&!rt)return qt(u),null}else 2*Ze()-g.renderingStartTime>fv&&m!==536870912&&(u.flags|=128,x=!0,Pd(g,!1),u.lanes=4194304);g.isBackwards?(T.sibling=u.child,u.child=T):(s=g.last,s!==null?s.sibling=T:u.child=T,g.last=T)}return g.tail!==null?(s=g.tail,g.rendering=s,g.tail=s.sibling,g.renderingStartTime=Ze(),s.sibling=null,m=si.current,I(si,x?m&1|2:m&1),rt&&Co(u,g.treeForkCount),s):(qt(u),null);case 22:case 23:return Nr(u),$b(),g=u.memoizedState!==null,s!==null?s.memoizedState!==null!==g&&(u.flags|=8192):g&&(u.flags|=8192),g?(m&536870912)!==0&&(u.flags&128)===0&&(qt(u),u.subtreeFlags&6&&(u.flags|=8192)):qt(u),m=u.updateQueue,m!==null&&av(u,m.retryQueue),m=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),g=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(g=u.memoizedState.cachePool.pool),g!==m&&(u.flags|=2048),s!==null&&W(Hl),null;case 24:return m=null,s!==null&&(m=s.memoizedState.cache),u.memoizedState.cache!==m&&(u.flags|=2048),jo(fi),qt(u),null;case 25:return null;case 30:return null}throw Error(i(156,u.tag))}function cY(s,u){switch(kb(u),u.tag){case 1:return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 3:return jo(fi),ae(),s=u.flags,(s&65536)!==0&&(s&128)===0?(u.flags=s&-65537|128,u):null;case 26:case 27:case 5:return _e(u),null;case 31:if(u.memoizedState!==null){if(Nr(u),u.alternate===null)throw Error(i(340));Bl()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 13:if(Nr(u),s=u.memoizedState,s!==null&&s.dehydrated!==null){if(u.alternate===null)throw Error(i(340));Bl()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 19:return W(si),null;case 4:return ae(),null;case 10:return jo(u.type),null;case 22:case 23:return Nr(u),$b(),s!==null&&W(Hl),s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 24:return jo(fi),null;case 25:return null;default:return null}}function UO(s,u){switch(kb(u),u.tag){case 3:jo(fi),ae();break;case 26:case 27:case 5:_e(u);break;case 4:ae();break;case 31:u.memoizedState!==null&&Nr(u);break;case 13:Nr(u);break;case 19:W(si);break;case 10:jo(u.type);break;case 22:case 23:Nr(u),$b(),s!==null&&W(Hl);break;case 24:jo(fi)}}function Nd(s,u){try{var m=u.updateQueue,g=m!==null?m.lastEffect:null;if(g!==null){var x=g.next;m=x;do{if((m.tag&s)===s){g=void 0;var T=m.create,F=m.inst;g=T(),F.destroy=g}m=m.next}while(m!==x)}}catch(K){kt(u,u.return,K)}}function Ts(s,u,m){try{var g=u.updateQueue,x=g!==null?g.lastEffect:null;if(x!==null){var T=x.next;g=T;do{if((g.tag&s)===s){var F=g.inst,K=F.destroy;if(K!==void 0){F.destroy=void 0,x=u;var J=m,ce=K;try{ce()}catch(Oe){kt(x,J,Oe)}}}g=g.next}while(g!==T)}}catch(Oe){kt(u,u.return,Oe)}}function WO(s){var u=s.updateQueue;if(u!==null){var m=s.stateNode;try{Nj(u,m)}catch(g){kt(s,s.return,g)}}}function VO(s,u,m){m.props=Yl(s.type,s.memoizedProps),m.state=s.memoizedState;try{m.componentWillUnmount()}catch(g){kt(s,u,g)}}function $d(s,u){try{var m=s.ref;if(m!==null){switch(s.tag){case 26:case 27:case 5:var g=s.stateNode;break;case 30:g=s.stateNode;break;default:g=s.stateNode}typeof m=="function"?s.refCleanup=m(g):m.current=g}}catch(x){kt(s,u,x)}}function eo(s,u){var m=s.ref,g=s.refCleanup;if(m!==null)if(typeof g=="function")try{g()}catch(x){kt(s,u,x)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof m=="function")try{m(null)}catch(x){kt(s,u,x)}else m.current=null}function GO(s){var u=s.type,m=s.memoizedProps,g=s.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":m.autoFocus&&g.focus();break e;case"img":m.src?g.src=m.src:m.srcSet&&(g.srcset=m.srcSet)}}catch(x){kt(s,s.return,x)}}function mw(s,u,m){try{var g=s.stateNode;RY(g,s.type,m,u),g[Zt]=u}catch(x){kt(s,s.return,x)}}function YO(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&zs(s.type)||s.tag===4}function pw(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||YO(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&zs(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function vw(s,u,m){var g=s.tag;if(g===5||g===6)s=s.stateNode,u?(m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m).insertBefore(s,u):(u=m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m,u.appendChild(s),m=m._reactRootContainer,m!=null||u.onclick!==null||(u.onclick=$t));else if(g!==4&&(g===27&&zs(s.type)&&(m=s.stateNode,u=null),s=s.child,s!==null))for(vw(s,u,m),s=s.sibling;s!==null;)vw(s,u,m),s=s.sibling}function ov(s,u,m){var g=s.tag;if(g===5||g===6)s=s.stateNode,u?m.insertBefore(s,u):m.appendChild(s);else if(g!==4&&(g===27&&zs(s.type)&&(m=s.stateNode),s=s.child,s!==null))for(ov(s,u,m),s=s.sibling;s!==null;)ov(s,u,m),s=s.sibling}function KO(s){var u=s.stateNode,m=s.memoizedProps;try{for(var g=s.type,x=u.attributes;x.length;)u.removeAttributeNode(x[0]);zi(u,g,m),u[Jn]=s,u[Zt]=m}catch(T){kt(s,s.return,T)}}var Do=!1,hi=!1,gw=!1,XO=typeof WeakSet=="function"?WeakSet:Set,ji=null;function dY(s,u){if(s=s.containerInfo,Lw=jv,s=lj(s),fb(s)){if("selectionStart"in s)var m={start:s.selectionStart,end:s.selectionEnd};else e:{m=(m=s.ownerDocument)&&m.defaultView||window;var g=m.getSelection&&m.getSelection();if(g&&g.rangeCount!==0){m=g.anchorNode;var x=g.anchorOffset,T=g.focusNode;g=g.focusOffset;try{m.nodeType,T.nodeType}catch{m=null;break e}var F=0,K=-1,J=-1,ce=0,Oe=0,Me=s,he=null;n:for(;;){for(var ke;Me!==m||x!==0&&Me.nodeType!==3||(K=F+x),Me!==T||g!==0&&Me.nodeType!==3||(J=F+g),Me.nodeType===3&&(F+=Me.nodeValue.length),(ke=Me.firstChild)!==null;)he=Me,Me=ke;for(;;){if(Me===s)break n;if(he===m&&++ce===x&&(K=F),he===T&&++Oe===g&&(J=F),(ke=Me.nextSibling)!==null)break;Me=he,he=Me.parentNode}Me=ke}m=K===-1||J===-1?null:{start:K,end:J}}else m=null}m=m||{start:0,end:0}}else m=null;for(Iw={focusedElem:s,selectionRange:m},jv=!1,ji=u;ji!==null;)if(u=ji,s=u.child,(u.subtreeFlags&1028)!==0&&s!==null)s.return=u,ji=s;else for(;ji!==null;){switch(u=ji,T=u.alternate,s=u.flags,u.tag){case 0:if((s&4)!==0&&(s=u.updateQueue,s=s!==null?s.events:null,s!==null))for(m=0;m title"))),zi(T,g,m),T[Jn]=s,un(T),g=T;break e;case"link":var F=t5("link","href",x).get(g+(m.href||""));if(F){for(var K=0;Kjt&&(F=jt,jt=_n,_n=F);var oe=oj(K,_n),te=oj(K,jt);if(oe&&te&&(ke.rangeCount!==1||ke.anchorNode!==oe.node||ke.anchorOffset!==oe.offset||ke.focusNode!==te.node||ke.focusOffset!==te.offset)){var fe=Me.createRange();fe.setStart(oe.node,oe.offset),ke.removeAllRanges(),_n>jt?(ke.addRange(fe),ke.extend(te.node,te.offset)):(fe.setEnd(te.node,te.offset),ke.addRange(fe))}}}}for(Me=[],ke=K;ke=ke.parentNode;)ke.nodeType===1&&Me.push({element:ke,left:ke.scrollLeft,top:ke.scrollTop});for(typeof K.focus=="function"&&K.focus(),K=0;Km?32:m,D.T=null,m=Sw,Sw=null;var T=Ps,F=zo;if(bi=0,vf=Ps=null,zo=0,(vt&6)!==0)throw Error(i(331));var K=vt;if(vt|=4,sE(T.current),rE(T,T.current,F,m),vt=K,qd(0,!1),pn&&typeof pn.onPostCommitFiberRoot=="function")try{pn.onPostCommitFiberRoot(On,T)}catch{}return!0}finally{L.p=x,D.T=g,CE(s,u)}}function jE(s,u,m){u=Qr(m,u),u=iw(s.stateNode,u,2),s=js(s,u,2),s!==null&&(st(s,2),no(s))}function kt(s,u,m){if(s.tag===3)jE(s,s,m);else for(;u!==null;){if(u.tag===3){jE(u,s,m);break}else if(u.tag===1){var g=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(Rs===null||!Rs.has(g))){s=Qr(m,s),m=OO(2),g=js(u,m,2),g!==null&&(EO(m,g,u,s),st(g,2),no(g));break}}u=u.return}}function Ow(s,u,m){var g=s.pingCache;if(g===null){g=s.pingCache=new pY;var x=new Set;g.set(u,x)}else x=g.get(u),x===void 0&&(x=new Set,g.set(u,x));x.has(m)||(ww=!0,x.add(m),s=wY.bind(null,s,u,m),u.then(s,s))}function wY(s,u,m){var g=s.pingCache;g!==null&&g.delete(u),s.pingedLanes|=s.suspendedLanes&m,s.warmLanes&=~m,Mt===s&&(nt&m)===m&&(ni===4||ni===3&&(nt&62914560)===nt&&300>Ze()-uv?(vt&2)===0&&gf(s,0):kw|=m,pf===nt&&(pf=0)),no(s)}function OE(s,u){u===0&&(u=He()),s=Ll(s,u),s!==null&&(st(s,u),no(s))}function kY(s){var u=s.memoizedState,m=0;u!==null&&(m=u.retryLane),OE(s,m)}function _Y(s,u){var m=0;switch(s.tag){case 31:case 13:var g=s.stateNode,x=s.memoizedState;x!==null&&(m=x.retryLane);break;case 19:g=s.stateNode;break;case 22:g=s.stateNode._retryCache;break;default:throw Error(i(314))}g!==null&&g.delete(u),OE(s,m)}function xY(s,u){return ue(s,u)}var vv=null,bf=null,Ew=!1,gv=!1,Tw=!1,$s=0;function no(s){s!==bf&&s.next===null&&(bf===null?vv=bf=s:bf=bf.next=s),gv=!0,Ew||(Ew=!0,CY())}function qd(s,u){if(!Tw&&gv){Tw=!0;do for(var m=!1,g=vv;g!==null;){if(s!==0){var x=g.pendingLanes;if(x===0)var T=0;else{var F=g.suspendedLanes,K=g.pingedLanes;T=(1<<31-en(42|s)+1)-1,T&=x&~(F&~K),T=T&201326741?T&201326741|1:T?T|2:0}T!==0&&(m=!0,DE(g,T))}else T=nt,T=it(g,g===Mt?T:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(T&3)===0||_t(g,T)||(m=!0,DE(g,T));g=g.next}while(m);Tw=!1}}function SY(){EE()}function EE(){gv=Ew=!1;var s=0;$s!==0&&NY()&&(s=$s);for(var u=Ze(),m=null,g=vv;g!==null;){var x=g.next,T=TE(g,u);T===0?(g.next=null,m===null?vv=x:m.next=x,x===null&&(bf=m)):(m=g,(s!==0||(T&3)!==0)&&(gv=!0)),g=x}bi!==0&&bi!==5||qd(s),$s!==0&&($s=0)}function TE(s,u){for(var m=s.suspendedLanes,g=s.pingedLanes,x=s.expirationTimes,T=s.pendingLanes&-62914561;0K)break;var Oe=J.transferSize,Me=J.initiatorType;Oe&&BE(Me)&&(J=J.responseEnd,F+=Oe*(J"u"?null:document;function QE(s,u,m){var g=wf;if(g&&typeof u=="string"&&u){var x=ir(u);x='link[rel="'+s+'"][href="'+x+'"]',typeof m=="string"&&(x+='[crossorigin="'+m+'"]'),ZE.has(x)||(ZE.add(x),s={rel:s,crossOrigin:m,href:u},g.querySelector(x)===null&&(u=g.createElement("link"),zi(u,"link",s),un(u),g.head.appendChild(u)))}}function UY(s){Lo.D(s),QE("dns-prefetch",s,null)}function WY(s,u){Lo.C(s,u),QE("preconnect",s,u)}function VY(s,u,m){Lo.L(s,u,m);var g=wf;if(g&&s&&u){var x='link[rel="preload"][as="'+ir(u)+'"]';u==="image"&&m&&m.imageSrcSet?(x+='[imagesrcset="'+ir(m.imageSrcSet)+'"]',typeof m.imageSizes=="string"&&(x+='[imagesizes="'+ir(m.imageSizes)+'"]')):x+='[href="'+ir(s)+'"]';var T=x;switch(u){case"style":T=kf(s);break;case"script":T=_f(s)}ra.has(T)||(s=d({rel:"preload",href:u==="image"&&m&&m.imageSrcSet?void 0:s,as:u},m),ra.set(T,s),g.querySelector(x)!==null||u==="style"&&g.querySelector(Vd(T))||u==="script"&&g.querySelector(Gd(T))||(u=g.createElement("link"),zi(u,"link",s),un(u),g.head.appendChild(u)))}}function GY(s,u){Lo.m(s,u);var m=wf;if(m&&s){var g=u&&typeof u.as=="string"?u.as:"script",x='link[rel="modulepreload"][as="'+ir(g)+'"][href="'+ir(s)+'"]',T=x;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":T=_f(s)}if(!ra.has(T)&&(s=d({rel:"modulepreload",href:s},u),ra.set(T,s),m.querySelector(x)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(m.querySelector(Gd(T)))return}g=m.createElement("link"),zi(g,"link",s),un(g),m.head.appendChild(g)}}}function YY(s,u,m){Lo.S(s,u,m);var g=wf;if(g&&s){var x=ai(g).hoistableStyles,T=kf(s);u=u||"default";var F=x.get(T);if(!F){var K={loading:0,preload:null};if(F=g.querySelector(Vd(T)))K.loading=5;else{s=d({rel:"stylesheet",href:s,"data-precedence":u},m),(m=ra.get(T))&&Vw(s,m);var J=F=g.createElement("link");un(J),zi(J,"link",s),J._p=new Promise(function(ce,Oe){J.onload=ce,J.onerror=Oe}),J.addEventListener("load",function(){K.loading|=1}),J.addEventListener("error",function(){K.loading|=2}),K.loading|=4,_v(F,u,g)}F={type:"stylesheet",instance:F,count:1,state:K},x.set(T,F)}}}function KY(s,u){Lo.X(s,u);var m=wf;if(m&&s){var g=ai(m).hoistableScripts,x=_f(s),T=g.get(x);T||(T=m.querySelector(Gd(x)),T||(s=d({src:s,async:!0},u),(u=ra.get(x))&&Gw(s,u),T=m.createElement("script"),un(T),zi(T,"link",s),m.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},g.set(x,T))}}function XY(s,u){Lo.M(s,u);var m=wf;if(m&&s){var g=ai(m).hoistableScripts,x=_f(s),T=g.get(x);T||(T=m.querySelector(Gd(x)),T||(s=d({src:s,async:!0,type:"module"},u),(u=ra.get(x))&&Gw(s,u),T=m.createElement("script"),un(T),zi(T,"link",s),m.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},g.set(x,T))}}function JE(s,u,m,g){var x=(x=re.current)?kv(x):null;if(!x)throw Error(i(446));switch(s){case"meta":case"title":return null;case"style":return typeof m.precedence=="string"&&typeof m.href=="string"?(u=kf(m.href),m=ai(x).hoistableStyles,g=m.get(u),g||(g={type:"style",instance:null,count:0,state:null},m.set(u,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(m.rel==="stylesheet"&&typeof m.href=="string"&&typeof m.precedence=="string"){s=kf(m.href);var T=ai(x).hoistableStyles,F=T.get(s);if(F||(x=x.ownerDocument||x,F={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},T.set(s,F),(T=x.querySelector(Vd(s)))&&!T._p&&(F.instance=T,F.state.loading=5),ra.has(s)||(m={rel:"preload",as:"style",href:m.href,crossOrigin:m.crossOrigin,integrity:m.integrity,media:m.media,hrefLang:m.hrefLang,referrerPolicy:m.referrerPolicy},ra.set(s,m),T||ZY(x,s,m,F.state))),u&&g===null)throw Error(i(528,""));return F}if(u&&g!==null)throw Error(i(529,""));return null;case"script":return u=m.async,m=m.src,typeof m=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=_f(m),m=ai(x).hoistableScripts,g=m.get(u),g||(g={type:"script",instance:null,count:0,state:null},m.set(u,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,s))}}function kf(s){return'href="'+ir(s)+'"'}function Vd(s){return'link[rel="stylesheet"]['+s+"]"}function e5(s){return d({},s,{"data-precedence":s.precedence,precedence:null})}function ZY(s,u,m,g){s.querySelector('link[rel="preload"][as="style"]['+u+"]")?g.loading=1:(u=s.createElement("link"),g.preload=u,u.addEventListener("load",function(){return g.loading|=1}),u.addEventListener("error",function(){return g.loading|=2}),zi(u,"link",m),un(u),s.head.appendChild(u))}function _f(s){return'[src="'+ir(s)+'"]'}function Gd(s){return"script[async]"+s}function n5(s,u,m){if(u.count++,u.instance===null)switch(u.type){case"style":var g=s.querySelector('style[data-href~="'+ir(m.href)+'"]');if(g)return u.instance=g,un(g),g;var x=d({},m,{"data-href":m.href,"data-precedence":m.precedence,href:null,precedence:null});return g=(s.ownerDocument||s).createElement("style"),un(g),zi(g,"style",x),_v(g,m.precedence,s),u.instance=g;case"stylesheet":x=kf(m.href);var T=s.querySelector(Vd(x));if(T)return u.state.loading|=4,u.instance=T,un(T),T;g=e5(m),(x=ra.get(x))&&Vw(g,x),T=(s.ownerDocument||s).createElement("link"),un(T);var F=T;return F._p=new Promise(function(K,J){F.onload=K,F.onerror=J}),zi(T,"link",g),u.state.loading|=4,_v(T,m.precedence,s),u.instance=T;case"script":return T=_f(m.src),(x=s.querySelector(Gd(T)))?(u.instance=x,un(x),x):(g=m,(x=ra.get(T))&&(g=d({},m),Gw(g,x)),s=s.ownerDocument||s,x=s.createElement("script"),un(x),zi(x,"link",g),s.head.appendChild(x),u.instance=x);case"void":return null;default:throw Error(i(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(g=u.instance,u.state.loading|=4,_v(g,m.precedence,s));return u.instance}function _v(s,u,m){for(var g=m.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=g.length?g[g.length-1]:null,T=x,F=0;F title"):null)}function QY(s,u,m){if(m===1||u.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return s=u.disabled,typeof u.precedence=="string"&&s==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function r5(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function JY(s,u,m,g){if(m.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(m.state.loading&4)===0){if(m.instance===null){var x=kf(g.href),T=u.querySelector(Vd(x));if(T){u=T._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(s.count++,s=Sv.bind(s),u.then(s,s)),m.state.loading|=4,m.instance=T,un(T);return}T=u.ownerDocument||u,g=e5(g),(x=ra.get(x))&&Vw(g,x),T=T.createElement("link"),un(T);var F=T;F._p=new Promise(function(K,J){F.onload=K,F.onerror=J}),zi(T,"link",g),m.instance=T}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(m,u),(u=m.state.preload)&&(m.state.loading&3)===0&&(s.count++,m=Sv.bind(s),u.addEventListener("load",m),u.addEventListener("error",m))}}var Yw=0;function eK(s,u){return s.stylesheets&&s.count===0&&Av(s,s.stylesheets),0Yw?50:800)+u);return s.unsuspend=m,function(){s.unsuspend=null,clearTimeout(g),clearTimeout(x)}}:null}function Sv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Av(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Cv=null;function Av(s,u){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Cv=new Map,u.forEach(nK,s),Cv=null,Sv.call(s))}function nK(s,u){if(!(u.state.loading&4)){var m=Cv.get(s);if(m)var g=m.get(null);else{m=new Map,Cv.set(s,m);for(var x=s.querySelectorAll("link[data-precedence],style[data-precedence]"),T=0;T"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Rk.exports=Sie(),Rk.exports}var Aie=Cie();class QC extends Error{constructor(n,t){super(t),this.status=n,this.name="HTTPError"}}async function jie(e,n,t){const i=await fetch(`${t}${e}`,{credentials:"include",...n,headers:{"Content-Type":"application/json",...(n==null?void 0:n.headers)??{}}});if(!i.ok){const r=await i.json().catch(()=>({Message:i.statusText}));throw new QC(i.status,r.Message??r.message??i.statusText)}if(i.status!==204)return i.json()}const ZB="/api";function Yn(e,n){return jie(e,n,ZB)}function Oie(){return Yn("/board")}function Eie(){return Yn("/flags")}function Tie(e){return Yn("/columns",{method:"POST",body:JSON.stringify({name:e})})}function Jl(e,n){return Yn(`/columns/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function Mie(e){return Yn(`/columns/${e}`,{method:"DELETE"})}function Die(e){return Yn("/columns/reorder",{method:"POST",body:JSON.stringify({ids:e})})}function Rie(e){return Yn("/cards",{method:"POST",body:JSON.stringify(e)})}function Of(e,n){return Yn(`/cards/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function Pie(e){return Yn(`/cards/${e}`,{method:"DELETE"})}function $k(e,n){return Yn(`/cards/${e}/stickers`,{method:"PUT",body:JSON.stringify({stickers:n})})}function Nie(){return Yn("/trash")}function $ie(e){return Yn(`/cards/${e}/restore`,{method:"POST"})}function zie(e){return Yn(`/cards/${e}/purge`,{method:"DELETE"})}function Lie(){return Yn("/archive")}function Iie(e){return Yn(`/cards/${e}/archive`,{method:"POST"})}function Bie(e){return Yn(`/cards/${e}/unarchive`,{method:"POST"})}function Fie(e,n){const t=new URLSearchParams({date:e});return Yn(`/reports/daily?${t.toString()}`)}function qie(e){return Yn(`/reports/daily/summary?date=${encodeURIComponent(e)}`)}function Hie(e,n){const t=new URLSearchParams({date:e});return Yn(`/reports/daily/summary?${t.toString()}`,{method:"POST"})}function Uie(e){return Yn(`/settings/${encodeURIComponent(e)}`)}function Wie(e,n){return Yn(`/settings/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify({value:n})})}function Vie(e,n,t){return Yn(`/cards/${e}/move`,{method:"POST",body:JSON.stringify({column_id:n,ordered_ids:t})})}function Gie(e){return Yn(`/cards/${e}/history`)}function Yie(e){return Yn(`/cards/${e}/messages`)}function UT(e,n){return Yn(`/cards/${e}/messages`,{method:"POST",body:JSON.stringify({body:n})})}function Kie(e,n){return Yn(`/cards/${e}/messages/${n}`,{method:"DELETE"})}function Xie(e){return Yn(`/cards/${e}/duplicate`,{method:"POST"})}function Zie(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/chat/ws`}function Qie(e,n,t){return new Promise((i,r)=>{const a=new WebSocket(Zie());let o=!1;const l=f=>{if(!o){o=!0;try{a.close()}catch{}f?r(f):i()}};a.onopen=()=>{a.send(JSON.stringify({messages:e}))},a.onmessage=f=>{try{const c=JSON.parse(typeof f.data=="string"?f.data:"");n(c),(c.type==="done"||c.type==="error")&&l(c.type==="error"?new Error(c.error):void 0)}catch(c){l(c)}},a.onerror=()=>l(new Error("websocket error")),a.onclose=()=>l()})}function WT(e,n){return Yn("/auth/login",{method:"POST",body:JSON.stringify({username:e,password:n})})}function Jie(e,n,t){return Yn("/auth/register",{method:"POST",body:JSON.stringify({username:e,password:n,display_name:t})})}function ere(){return Yn("/auth/logout",{method:"POST"})}function nre(){return Yn("/me")}function VT(e){return Yn("/me",{method:"PATCH",body:JSON.stringify(e)})}function QB(){return Yn("/users")}function JB(){return Yn("/tags")}function tre(){return Yn("/requesters")}function ire(e){return Yn(`/cards/${e}/files`)}async function JC(e,n,t="upload"){const i=new FormData;i.append("file",n),i.append("source",t);const r=await fetch(`${ZB}/cards/${e}/files`,{method:"POST",credentials:"same-origin",body:i});if(!r.ok){let a=`upload failed: ${r.status}`;try{const o=await r.json();(o.Message||o.message)&&(a=o.Message||o.message||a)}catch{}throw new QC(r.status,a)}return await r.json()}function rre(e){return Yn(`/files/${e}`,{method:"DELETE"})}function eF(e){const n=new URLSearchParams;e.from&&n.set("from",e.from),e.to&&n.set("to",e.to),e.assignee_id&&n.set("assignee_id",e.assignee_id),e.requester&&n.set("requester",e.requester),e.tags&&e.tags.length>0&&n.set("tags",e.tags.join(","));const t=n.toString();return Yn(`/metrics${t?`?${t}`:""}`)}const nF=A.createContext(null);function are({children:e}){const[n,t]=A.useState(null),[i,r]=A.useState(!0);A.useEffect(()=>{nre().then(t).catch(f=>{(!(f instanceof QC)||f.status!==401)&&console.warn("getMe failed",f)}).finally(()=>r(!1))},[]);const a=A.useCallback(async(f,c)=>{const h=await WT(f,c);t(h)},[]),o=A.useCallback(async(f,c,h)=>{await Jie(f,c,h);const d=await WT(f,c);t(d)},[]),l=A.useCallback(async()=>{await ere(),t(null)},[]);return y.jsx(nF.Provider,{value:{user:n,loading:i,login:a,register:o,logout:l,setUser:t},children:e})}function e9(){const e=A.useContext(nF);if(!e)throw new Error("useAuth: missing AuthProvider");return e}function ore(){for(var e=arguments.length,n=new Array(e),t=0;ti=>{n.forEach(r=>r(i))},n)}const Qy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Wc(e){const n=Object.prototype.toString.call(e);return n==="[object Window]"||n==="[object global]"}function n9(e){return"nodeType"in e}function dr(e){var n,t;return e?Wc(e)?e:n9(e)&&(n=(t=e.ownerDocument)==null?void 0:t.defaultView)!=null?n:window:window}function t9(e){const{Document:n}=dr(e);return e instanceof n}function rp(e){return Wc(e)?!1:e instanceof dr(e).HTMLElement}function tF(e){return e instanceof dr(e).SVGElement}function Vc(e){return e?Wc(e)?e.document:n9(e)?t9(e)?e:rp(e)||tF(e)?e.ownerDocument:document:document:document}const Wa=Qy?A.useLayoutEffect:A.useEffect;function Jy(e){const n=A.useRef(e);return Wa(()=>{n.current=e}),A.useCallback(function(){for(var t=arguments.length,i=new Array(t),r=0;r{e.current=setInterval(i,r)},[]),t=A.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[n,t]}function Jh(e,n){n===void 0&&(n=[e]);const t=A.useRef(e);return Wa(()=>{t.current!==e&&(t.current=e)},n),t}function ap(e,n){const t=A.useRef();return A.useMemo(()=>{const i=e(t.current);return t.current=i,i},[...n])}function Bg(e){const n=Jy(e),t=A.useRef(null),i=A.useCallback(r=>{r!==t.current&&(n==null||n(r,t.current)),t.current=r},[]);return[t,i]}function Fg(e){const n=A.useRef();return A.useEffect(()=>{n.current=e},[e]),n.current}let zk={};function op(e,n){return A.useMemo(()=>{if(n)return n;const t=zk[e]==null?0:zk[e]+1;return zk[e]=t,e+"-"+t},[e,n])}function iF(e){return function(n){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r{const l=Object.entries(o);for(const[f,c]of l){const h=a[f];h!=null&&(a[f]=h+e*c)}return a},{...n})}}const Wf=iF(1),em=iF(-1);function lre(e){return"clientX"in e&&"clientY"in e}function e0(e){if(!e)return!1;const{KeyboardEvent:n}=dr(e.target);return n&&e instanceof n}function ure(e){if(!e)return!1;const{TouchEvent:n}=dr(e.target);return n&&e instanceof n}function qg(e){if(ure(e)){if(e.touches&&e.touches.length){const{clientX:n,clientY:t}=e.touches[0];return{x:n,y:t}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:n,clientY:t}=e.changedTouches[0];return{x:n,y:t}}}return lre(e)?{x:e.clientX,y:e.clientY}:null}const po=Object.freeze({Translate:{toString(e){if(!e)return;const{x:n,y:t}=e;return"translate3d("+(n?Math.round(n):0)+"px, "+(t?Math.round(t):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:n,scaleY:t}=e;return"scaleX("+n+") scaleY("+t+")"}},Transform:{toString(e){if(e)return[po.Translate.toString(e),po.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:n,duration:t,easing:i}=e;return n+" "+t+"ms "+i}}}),GT="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function fre(e){return e.matches(GT)?e:e.querySelector(GT)}const cre={display:"none"};function dre(e){let{id:n,value:t}=e;return Q.createElement("div",{id:n,style:cre},t)}function hre(e){let{id:n,announcement:t,ariaLiveType:i="assertive"}=e;const r={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Q.createElement("div",{id:n,style:r,role:"status","aria-live":i,"aria-atomic":!0},t)}function mre(){const[e,n]=A.useState("");return{announce:A.useCallback(i=>{i!=null&&n(i)},[]),announcement:e}}const rF=A.createContext(null);function pre(e){const n=A.useContext(rF);A.useEffect(()=>{if(!n)throw new Error("useDndMonitor must be used within a children of ");return n(e)},[e,n])}function vre(){const[e]=A.useState(()=>new Set),n=A.useCallback(i=>(e.add(i),()=>e.delete(i)),[e]);return[A.useCallback(i=>{let{type:r,event:a}=i;e.forEach(o=>{var l;return(l=o[r])==null?void 0:l.call(o,a)})},[e]),n]}const gre={draggable:` + To pick up a draggable item, press the space bar. + While dragging, use the arrow keys to move the item. + Press space again to drop the item in its new position, or press escape to cancel. + `},yre={onDragStart(e){let{active:n}=e;return"Picked up draggable item "+n.id+"."},onDragOver(e){let{active:n,over:t}=e;return t?"Draggable item "+n.id+" was moved over droppable area "+t.id+".":"Draggable item "+n.id+" is no longer over a droppable area."},onDragEnd(e){let{active:n,over:t}=e;return t?"Draggable item "+n.id+" was dropped over droppable area "+t.id:"Draggable item "+n.id+" was dropped."},onDragCancel(e){let{active:n}=e;return"Dragging was cancelled. Draggable item "+n.id+" was dropped."}};function bre(e){let{announcements:n=yre,container:t,hiddenTextDescribedById:i,screenReaderInstructions:r=gre}=e;const{announce:a,announcement:o}=mre(),l=op("DndLiveRegion"),[f,c]=A.useState(!1);if(A.useEffect(()=>{c(!0)},[]),pre(A.useMemo(()=>({onDragStart(d){let{active:p}=d;a(n.onDragStart({active:p}))},onDragMove(d){let{active:p,over:v}=d;n.onDragMove&&a(n.onDragMove({active:p,over:v}))},onDragOver(d){let{active:p,over:v}=d;a(n.onDragOver({active:p,over:v}))},onDragEnd(d){let{active:p,over:v}=d;a(n.onDragEnd({active:p,over:v}))},onDragCancel(d){let{active:p,over:v}=d;a(n.onDragCancel({active:p,over:v}))}}),[a,n])),!f)return null;const h=Q.createElement(Q.Fragment,null,Q.createElement(dre,{id:i,value:r.draggable}),Q.createElement(hre,{id:l,announcement:o}));return t?Qs.createPortal(h,t):h}var xi;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(xi||(xi={}));function Hg(){}function YT(e,n){return A.useMemo(()=>({sensor:e,options:n??{}}),[e,n])}function wre(){for(var e=arguments.length,n=new Array(e),t=0;t[...n].filter(i=>i!=null),[...n])}const Va=Object.freeze({x:0,y:0});function i9(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function kre(e,n){const t=qg(e);if(!t)return"0 0";const i={x:(t.x-n.left)/n.width*100,y:(t.y-n.top)/n.height*100};return i.x+"% "+i.y+"%"}function r9(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return t-i}function _re(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return i-t}function PS(e){let{left:n,top:t,height:i,width:r}=e;return[{x:n,y:t},{x:n+r,y:t},{x:n,y:t+i},{x:n+r,y:t+i}]}function aF(e,n){if(!e||e.length===0)return null;const[t]=e;return t[n]}function KT(e,n,t){return n===void 0&&(n=e.left),t===void 0&&(t=e.top),{x:n+e.width*.5,y:t+e.height*.5}}const xre=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=KT(n,n.left,n.top),a=[];for(const o of i){const{id:l}=o,f=t.get(l);if(f){const c=i9(KT(f),r);a.push({id:l,data:{droppableContainer:o,value:c}})}}return a.sort(r9)},oF=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=PS(n),a=[];for(const o of i){const{id:l}=o,f=t.get(l);if(f){const c=PS(f),h=r.reduce((p,v,b)=>p+i9(c[b],v),0),d=Number((h/4).toFixed(4));a.push({id:l,data:{droppableContainer:o,value:d}})}}return a.sort(r9)};function Sre(e,n){const t=Math.max(n.top,e.top),i=Math.max(n.left,e.left),r=Math.min(n.left+n.width,e.left+e.width),a=Math.min(n.top+n.height,e.top+e.height),o=r-i,l=a-t;if(i{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=[];for(const a of i){const{id:o}=a,l=t.get(o);if(l){const f=Sre(l,n);f>0&&r.push({id:o,data:{droppableContainer:a,value:f}})}}return r.sort(_re)};function Cre(e,n){const{top:t,left:i,bottom:r,right:a}=n;return t<=e.y&&e.y<=r&&i<=e.x&&e.x<=a}const Are=e=>{let{droppableContainers:n,droppableRects:t,pointerCoordinates:i}=e;if(!i)return[];const r=[];for(const a of n){const{id:o}=a,l=t.get(o);if(l&&Cre(i,l)){const c=PS(l).reduce((d,p)=>d+i9(i,p),0),h=Number((c/4).toFixed(4));r.push({id:o,data:{droppableContainer:a,value:h}})}}return r.sort(r9)};function jre(e,n,t){return{...e,scaleX:n&&t?n.width/t.width:1,scaleY:n&&t?n.height/t.height:1}}function lF(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:Va}function Ore(e){return function(t){for(var i=arguments.length,r=new Array(i>1?i-1:0),a=1;a({...o,top:o.top+e*l.y,bottom:o.bottom+e*l.y,left:o.left+e*l.x,right:o.right+e*l.x}),{...t})}}const Ere=Ore(1);function uF(e){if(e.startsWith("matrix3d(")){const n=e.slice(9,-1).split(/, /);return{x:+n[12],y:+n[13],scaleX:+n[0],scaleY:+n[5]}}else if(e.startsWith("matrix(")){const n=e.slice(7,-1).split(/, /);return{x:+n[4],y:+n[5],scaleX:+n[0],scaleY:+n[3]}}return null}function Tre(e,n,t){const i=uF(n);if(!i)return e;const{scaleX:r,scaleY:a,x:o,y:l}=i,f=e.left-o-(1-r)*parseFloat(t),c=e.top-l-(1-a)*parseFloat(t.slice(t.indexOf(" ")+1)),h=r?e.width/r:e.width,d=a?e.height/a:e.height;return{width:h,height:d,top:c,right:f+h,bottom:c+d,left:f}}const Mre={ignoreTransform:!1};function Gc(e,n){n===void 0&&(n=Mre);let t=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:c,transformOrigin:h}=dr(e).getComputedStyle(e);c&&(t=Tre(t,c,h))}const{top:i,left:r,width:a,height:o,bottom:l,right:f}=t;return{top:i,left:r,width:a,height:o,bottom:l,right:f}}function XT(e){return Gc(e,{ignoreTransform:!0})}function Dre(e){const n=e.innerWidth,t=e.innerHeight;return{top:0,left:0,right:n,bottom:t,width:n,height:t}}function Rre(e,n){return n===void 0&&(n=dr(e).getComputedStyle(e)),n.position==="fixed"}function Pre(e,n){n===void 0&&(n=dr(e).getComputedStyle(e));const t=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(r=>{const a=n[r];return typeof a=="string"?t.test(a):!1})}function n0(e,n){const t=[];function i(r){if(n!=null&&t.length>=n||!r)return t;if(t9(r)&&r.scrollingElement!=null&&!t.includes(r.scrollingElement))return t.push(r.scrollingElement),t;if(!rp(r)||tF(r)||t.includes(r))return t;const a=dr(e).getComputedStyle(r);return r!==e&&Pre(r,a)&&t.push(r),Rre(r,a)?t:i(r.parentNode)}return e?i(e):t}function fF(e){const[n]=n0(e,1);return n??null}function Lk(e){return!Qy||!e?null:Wc(e)?e:n9(e)?t9(e)||e===Vc(e).scrollingElement?window:rp(e)?e:null:null}function cF(e){return Wc(e)?e.scrollX:e.scrollLeft}function dF(e){return Wc(e)?e.scrollY:e.scrollTop}function NS(e){return{x:cF(e),y:dF(e)}}var Ti;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ti||(Ti={}));function hF(e){return!Qy||!e?!1:e===document.scrollingElement}function mF(e){const n={x:0,y:0},t=hF(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-t.width,y:e.scrollHeight-t.height},r=e.scrollTop<=n.y,a=e.scrollLeft<=n.x,o=e.scrollTop>=i.y,l=e.scrollLeft>=i.x;return{isTop:r,isLeft:a,isBottom:o,isRight:l,maxScroll:i,minScroll:n}}const Nre={x:.2,y:.2};function $re(e,n,t,i,r){let{top:a,left:o,right:l,bottom:f}=t;i===void 0&&(i=10),r===void 0&&(r=Nre);const{isTop:c,isBottom:h,isLeft:d,isRight:p}=mF(e),v={x:0,y:0},b={x:0,y:0},w={height:n.height*r.y,width:n.width*r.x};return!c&&a<=n.top+w.height?(v.y=Ti.Backward,b.y=i*Math.abs((n.top+w.height-a)/w.height)):!h&&f>=n.bottom-w.height&&(v.y=Ti.Forward,b.y=i*Math.abs((n.bottom-w.height-f)/w.height)),!p&&l>=n.right-w.width?(v.x=Ti.Forward,b.x=i*Math.abs((n.right-w.width-l)/w.width)):!d&&o<=n.left+w.width&&(v.x=Ti.Backward,b.x=i*Math.abs((n.left+w.width-o)/w.width)),{direction:v,speed:b}}function zre(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:o}=window;return{top:0,left:0,right:a,bottom:o,width:a,height:o}}const{top:n,left:t,right:i,bottom:r}=e.getBoundingClientRect();return{top:n,left:t,right:i,bottom:r,width:e.clientWidth,height:e.clientHeight}}function pF(e){return e.reduce((n,t)=>Wf(n,NS(t)),Va)}function Lre(e){return e.reduce((n,t)=>n+cF(t),0)}function Ire(e){return e.reduce((n,t)=>n+dF(t),0)}function vF(e,n){if(n===void 0&&(n=Gc),!e)return;const{top:t,left:i,bottom:r,right:a}=n(e);fF(e)&&(r<=0||a<=0||t>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Bre=[["x",["left","right"],Lre],["y",["top","bottom"],Ire]];class a9{constructor(n,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=n0(t),r=pF(i);this.rect={...n},this.width=n.width,this.height=n.height;for(const[a,o,l]of Bre)for(const f of o)Object.defineProperty(this,f,{get:()=>{const c=l(i),h=r[a]-c;return this.rect[f]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Mh{constructor(n){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(t=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...t)})},this.target=n}add(n,t,i){var r;(r=this.target)==null||r.addEventListener(n,t,i),this.listeners.push([n,t,i])}}function Fre(e){const{EventTarget:n}=dr(e);return e instanceof n?e:Vc(e)}function Ik(e,n){const t=Math.abs(e.x),i=Math.abs(e.y);return typeof n=="number"?Math.sqrt(t**2+i**2)>n:"x"in n&&"y"in n?t>n.x&&i>n.y:"x"in n?t>n.x:"y"in n?i>n.y:!1}var fa;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(fa||(fa={}));function ZT(e){e.preventDefault()}function qre(e){e.stopPropagation()}var at;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(at||(at={}));const gF={start:[at.Space,at.Enter],cancel:[at.Esc],end:[at.Space,at.Enter,at.Tab]},Hre=(e,n)=>{let{currentCoordinates:t}=n;switch(e.code){case at.Right:return{...t,x:t.x+25};case at.Left:return{...t,x:t.x-25};case at.Down:return{...t,y:t.y+25};case at.Up:return{...t,y:t.y-25}}};class o9{constructor(n){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=n;const{event:{target:t}}=n;this.props=n,this.listeners=new Mh(Vc(t)),this.windowListeners=new Mh(dr(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(fa.Resize,this.handleCancel),this.windowListeners.add(fa.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(fa.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:n,onStart:t}=this.props,i=n.node.current;i&&vF(i),t(Va)}handleKeyDown(n){if(e0(n)){const{active:t,context:i,options:r}=this.props,{keyboardCodes:a=gF,coordinateGetter:o=Hre,scrollBehavior:l="smooth"}=r,{code:f}=n;if(a.end.includes(f)){this.handleEnd(n);return}if(a.cancel.includes(f)){this.handleCancel(n);return}const{collisionRect:c}=i.current,h=c?{x:c.left,y:c.top}:Va;this.referenceCoordinates||(this.referenceCoordinates=h);const d=o(n,{active:t,context:i.current,currentCoordinates:h});if(d){const p=em(d,h),v={x:0,y:0},{scrollableAncestors:b}=i.current;for(const w of b){const k=n.code,{isTop:_,isRight:C,isLeft:S,isBottom:E,maxScroll:j,minScroll:O}=mF(w),M=zre(w),$={x:Math.min(k===at.Right?M.right-M.width/2:M.right,Math.max(k===at.Right?M.left:M.left+M.width/2,d.x)),y:Math.min(k===at.Down?M.bottom-M.height/2:M.bottom,Math.max(k===at.Down?M.top:M.top+M.height/2,d.y))},q=k===at.Right&&!C||k===at.Left&&!S,P=k===at.Down&&!E||k===at.Up&&!_;if(q&&$.x!==d.x){const z=w.scrollLeft+p.x,B=k===at.Right&&z<=j.x||k===at.Left&&z>=O.x;if(B&&!p.y){w.scrollTo({left:z,behavior:l});return}B?v.x=w.scrollLeft-z:v.x=k===at.Right?w.scrollLeft-j.x:w.scrollLeft-O.x,v.x&&w.scrollBy({left:-v.x,behavior:l});break}else if(P&&$.y!==d.y){const z=w.scrollTop+p.y,B=k===at.Down&&z<=j.y||k===at.Up&&z>=O.y;if(B&&!p.x){w.scrollTo({top:z,behavior:l});return}B?v.y=w.scrollTop-z:v.y=k===at.Down?w.scrollTop-j.y:w.scrollTop-O.y,v.y&&w.scrollBy({top:-v.y,behavior:l});break}}this.handleMove(n,Wf(em(d,this.referenceCoordinates),v))}}}handleMove(n,t){const{onMove:i}=this.props;n.preventDefault(),i(t)}handleEnd(n){const{onEnd:t}=this.props;n.preventDefault(),this.detach(),t()}handleCancel(n){const{onCancel:t}=this.props;n.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}o9.activators=[{eventName:"onKeyDown",handler:(e,n,t)=>{let{keyboardCodes:i=gF,onActivation:r}=n,{active:a}=t;const{code:o}=e.nativeEvent;if(i.start.includes(o)){const l=a.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),r==null||r({event:e.nativeEvent}),!0)}return!1}}];function QT(e){return!!(e&&"distance"in e)}function JT(e){return!!(e&&"delay"in e)}class s9{constructor(n,t,i){var r;i===void 0&&(i=Fre(n.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=n,this.events=t;const{event:a}=n,{target:o}=a;this.props=n,this.events=t,this.document=Vc(o),this.documentListeners=new Mh(this.document),this.listeners=new Mh(i),this.windowListeners=new Mh(dr(o)),this.initialCoordinates=(r=qg(a))!=null?r:Va,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:n,props:{options:{activationConstraint:t,bypassActivationConstraint:i}}}=this;if(this.listeners.add(n.move.name,this.handleMove,{passive:!1}),this.listeners.add(n.end.name,this.handleEnd),n.cancel&&this.listeners.add(n.cancel.name,this.handleCancel),this.windowListeners.add(fa.Resize,this.handleCancel),this.windowListeners.add(fa.DragStart,ZT),this.windowListeners.add(fa.VisibilityChange,this.handleCancel),this.windowListeners.add(fa.ContextMenu,ZT),this.documentListeners.add(fa.Keydown,this.handleKeydown),t){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(JT(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(QT(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(n,t){const{active:i,onPending:r}=this.props;r(i,n,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:n}=this,{onStart:t}=this.props;n&&(this.activated=!0,this.documentListeners.add(fa.Click,qre,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(fa.SelectionChange,this.removeTextSelection),t(n))}handleMove(n){var t;const{activated:i,initialCoordinates:r,props:a}=this,{onMove:o,options:{activationConstraint:l}}=a;if(!r)return;const f=(t=qg(n))!=null?t:Va,c=em(r,f);if(!i&&l){if(QT(l)){if(l.tolerance!=null&&Ik(c,l.tolerance))return this.handleCancel();if(Ik(c,l.distance))return this.handleStart()}if(JT(l)&&Ik(c,l.tolerance))return this.handleCancel();this.handlePending(l,c);return}n.cancelable&&n.preventDefault(),o(f)}handleEnd(){const{onAbort:n,onEnd:t}=this.props;this.detach(),this.activated||n(this.props.active),t()}handleCancel(){const{onAbort:n,onCancel:t}=this.props;this.detach(),this.activated||n(this.props.active),t()}handleKeydown(n){n.code===at.Esc&&this.handleCancel()}removeTextSelection(){var n;(n=this.document.getSelection())==null||n.removeAllRanges()}}const Ure={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class l9 extends s9{constructor(n){const{event:t}=n,i=Vc(t.target);super(n,Ure,i)}}l9.activators=[{eventName:"onPointerDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;return!t.isPrimary||t.button!==0?!1:(i==null||i({event:t}),!0)}}];const Wre={move:{name:"mousemove"},end:{name:"mouseup"}};var $S;(function(e){e[e.RightClick=2]="RightClick"})($S||($S={}));class Vre extends s9{constructor(n){super(n,Wre,Vc(n.event.target))}}Vre.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;return t.button===$S.RightClick?!1:(i==null||i({event:t}),!0)}}];const Bk={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Gre extends s9{constructor(n){super(n,Bk)}static setup(){return window.addEventListener(Bk.move.name,n,{capture:!1,passive:!1}),function(){window.removeEventListener(Bk.move.name,n)};function n(){}}}Gre.activators=[{eventName:"onTouchStart",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;const{touches:r}=t;return r.length>1?!1:(i==null||i({event:t}),!0)}}];var Dh;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Dh||(Dh={}));var Ug;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Ug||(Ug={}));function Yre(e){let{acceleration:n,activator:t=Dh.Pointer,canScroll:i,draggingRect:r,enabled:a,interval:o=5,order:l=Ug.TreeOrder,pointerCoordinates:f,scrollableAncestors:c,scrollableAncestorRects:h,delta:d,threshold:p}=e;const v=Xre({delta:d,disabled:!a}),[b,w]=sre(),k=A.useRef({x:0,y:0}),_=A.useRef({x:0,y:0}),C=A.useMemo(()=>{switch(t){case Dh.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case Dh.DraggableRect:return r}},[t,r,f]),S=A.useRef(null),E=A.useCallback(()=>{const O=S.current;if(!O)return;const M=k.current.x*_.current.x,$=k.current.y*_.current.y;O.scrollBy(M,$)},[]),j=A.useMemo(()=>l===Ug.TreeOrder?[...c].reverse():c,[l,c]);A.useEffect(()=>{if(!a||!c.length||!C){w();return}for(const O of j){if((i==null?void 0:i(O))===!1)continue;const M=c.indexOf(O),$=h[M];if(!$)continue;const{direction:q,speed:P}=$re(O,$,C,n,p);for(const z of["x","y"])v[z][q[z]]||(P[z]=0,q[z]=0);if(P.x>0||P.y>0){w(),S.current=O,b(E,o),k.current=P,_.current=q;return}}k.current={x:0,y:0},_.current={x:0,y:0},w()},[n,E,i,w,a,o,JSON.stringify(C),JSON.stringify(v),b,c,j,h,JSON.stringify(p)])}const Kre={x:{[Ti.Backward]:!1,[Ti.Forward]:!1},y:{[Ti.Backward]:!1,[Ti.Forward]:!1}};function Xre(e){let{delta:n,disabled:t}=e;const i=Fg(n);return ap(r=>{if(t||!i||!r)return Kre;const a={x:Math.sign(n.x-i.x),y:Math.sign(n.y-i.y)};return{x:{[Ti.Backward]:r.x[Ti.Backward]||a.x===-1,[Ti.Forward]:r.x[Ti.Forward]||a.x===1},y:{[Ti.Backward]:r.y[Ti.Backward]||a.y===-1,[Ti.Forward]:r.y[Ti.Forward]||a.y===1}}},[t,n,i])}function Zre(e,n){const t=n!=null?e.get(n):void 0,i=t?t.node.current:null;return ap(r=>{var a;return n==null?null:(a=i??r)!=null?a:null},[i,n])}function Qre(e,n){return A.useMemo(()=>e.reduce((t,i)=>{const{sensor:r}=i,a=r.activators.map(o=>({eventName:o.eventName,handler:n(o.handler,i)}));return[...t,...a]},[]),[e,n])}var nm;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(nm||(nm={}));var zS;(function(e){e.Optimized="optimized"})(zS||(zS={}));const eM=new Map;function Jre(e,n){let{dragging:t,dependencies:i,config:r}=n;const[a,o]=A.useState(null),{frequency:l,measure:f,strategy:c}=r,h=A.useRef(e),d=k(),p=Jh(d),v=A.useCallback(function(_){_===void 0&&(_=[]),!p.current&&o(C=>C===null?_:C.concat(_.filter(S=>!C.includes(S))))},[p]),b=A.useRef(null),w=ap(_=>{if(d&&!t)return eM;if(!_||_===eM||h.current!==e||a!=null){const C=new Map;for(let S of e){if(!S)continue;if(a&&a.length>0&&!a.includes(S.id)&&S.rect.current){C.set(S.id,S.rect.current);continue}const E=S.node.current,j=E?new a9(f(E),E):null;S.rect.current=j,j&&C.set(S.id,j)}return C}return _},[e,a,t,d,f]);return A.useEffect(()=>{h.current=e},[e]),A.useEffect(()=>{d||v()},[t,d]),A.useEffect(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),A.useEffect(()=>{d||typeof l!="number"||b.current!==null||(b.current=setTimeout(()=>{v(),b.current=null},l))},[l,d,v,...i]),{droppableRects:w,measureDroppableContainers:v,measuringScheduled:a!=null};function k(){switch(c){case nm.Always:return!1;case nm.BeforeDragging:return t;default:return!t}}}function u9(e,n){return ap(t=>e?t||(typeof n=="function"?n(e):e):null,[n,e])}function eae(e,n){return u9(e,n)}function nae(e){let{callback:n,disabled:t}=e;const i=Jy(n),r=A.useMemo(()=>{if(t||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(i)},[i,t]);return A.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function t0(e){let{callback:n,disabled:t}=e;const i=Jy(n),r=A.useMemo(()=>{if(t||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(i)},[t]);return A.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function tae(e){return new a9(Gc(e),e)}function nM(e,n,t){n===void 0&&(n=tae);const[i,r]=A.useState(null);function a(){r(f=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=f??t)!=null?c:null}const h=n(e);return JSON.stringify(f)===JSON.stringify(h)?f:h})}const o=nae({callback(f){if(e)for(const c of f){const{type:h,target:d}=c;if(h==="childList"&&d instanceof HTMLElement&&d.contains(e)){a();break}}}}),l=t0({callback:a});return Wa(()=>{a(),e?(l==null||l.observe(e),o==null||o.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),o==null||o.disconnect())},[e]),i}function iae(e){const n=u9(e);return lF(e,n)}const tM=[];function rae(e){const n=A.useRef(e),t=ap(i=>e?i&&i!==tM&&e&&n.current&&e.parentNode===n.current.parentNode?i:n0(e):tM,[e]);return A.useEffect(()=>{n.current=e},[e]),t}function aae(e){const[n,t]=A.useState(null),i=A.useRef(e),r=A.useCallback(a=>{const o=Lk(a.target);o&&t(l=>l?(l.set(o,NS(o)),new Map(l)):null)},[]);return A.useEffect(()=>{const a=i.current;if(e!==a){o(a);const l=e.map(f=>{const c=Lk(f);return c?(c.addEventListener("scroll",r,{passive:!0}),[c,NS(c)]):null}).filter(f=>f!=null);t(l.length?new Map(l):null),i.current=e}return()=>{o(e),o(a)};function o(l){l.forEach(f=>{const c=Lk(f);c==null||c.removeEventListener("scroll",r)})}},[r,e]),A.useMemo(()=>e.length?n?Array.from(n.values()).reduce((a,o)=>Wf(a,o),Va):pF(e):Va,[e,n])}function iM(e,n){n===void 0&&(n=[]);const t=A.useRef(null);return A.useEffect(()=>{t.current=null},n),A.useEffect(()=>{const i=e!==Va;i&&!t.current&&(t.current=e),!i&&t.current&&(t.current=null)},[e]),t.current?em(e,t.current):Va}function oae(e){A.useEffect(()=>{if(!Qy)return;const n=e.map(t=>{let{sensor:i}=t;return i.setup==null?void 0:i.setup()});return()=>{for(const t of n)t==null||t()}},e.map(n=>{let{sensor:t}=n;return t}))}function sae(e,n){return A.useMemo(()=>e.reduce((t,i)=>{let{eventName:r,handler:a}=i;return t[r]=o=>{a(o,n)},t},{}),[e,n])}function yF(e){return A.useMemo(()=>e?Dre(e):null,[e])}const rM=[];function lae(e,n){n===void 0&&(n=Gc);const[t]=e,i=yF(t?dr(t):null),[r,a]=A.useState(rM);function o(){a(()=>e.length?e.map(f=>hF(f)?i:new a9(n(f),f)):rM)}const l=t0({callback:o});return Wa(()=>{l==null||l.disconnect(),o(),e.forEach(f=>l==null?void 0:l.observe(f))},[e]),r}function bF(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return rp(n)?n:e}function uae(e){let{measure:n}=e;const[t,i]=A.useState(null),r=A.useCallback(c=>{for(const{target:h}of c)if(rp(h)){i(d=>{const p=n(h);return d?{...d,width:p.width,height:p.height}:p});break}},[n]),a=t0({callback:r}),o=A.useCallback(c=>{const h=bF(c);a==null||a.disconnect(),h&&(a==null||a.observe(h)),i(h?n(h):null)},[n,a]),[l,f]=Bg(o);return A.useMemo(()=>({nodeRef:l,rect:t,setRef:f}),[t,l,f])}const fae=[{sensor:l9,options:{}},{sensor:o9,options:{}}],cae={current:{}},xg={draggable:{measure:XT},droppable:{measure:XT,strategy:nm.WhileDragging,frequency:zS.Optimized},dragOverlay:{measure:Gc}};class Rh extends Map{get(n){var t;return n!=null&&(t=super.get(n))!=null?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(n=>{let{disabled:t}=n;return!t})}getNodeFor(n){var t,i;return(t=(i=this.get(n))==null?void 0:i.node.current)!=null?t:void 0}}const dae={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Rh,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Hg},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:xg,measureDroppableContainers:Hg,windowRect:null,measuringScheduled:!1},wF={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Hg,draggableNodes:new Map,over:null,measureDroppableContainers:Hg},sp=A.createContext(wF),kF=A.createContext(dae);function hae(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Rh}}}function mae(e,n){switch(n.type){case xi.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case xi.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:n.coordinates.x-e.draggable.initialCoordinates.x,y:n.coordinates.y-e.draggable.initialCoordinates.y}}};case xi.DragEnd:case xi.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case xi.RegisterDroppable:{const{element:t}=n,{id:i}=t,r=new Rh(e.droppable.containers);return r.set(i,t),{...e,droppable:{...e.droppable,containers:r}}}case xi.SetDroppableDisabled:{const{id:t,key:i,disabled:r}=n,a=e.droppable.containers.get(t);if(!a||i!==a.key)return e;const o=new Rh(e.droppable.containers);return o.set(t,{...a,disabled:r}),{...e,droppable:{...e.droppable,containers:o}}}case xi.UnregisterDroppable:{const{id:t,key:i}=n,r=e.droppable.containers.get(t);if(!r||i!==r.key)return e;const a=new Rh(e.droppable.containers);return a.delete(t),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function pae(e){let{disabled:n}=e;const{active:t,activatorEvent:i,draggableNodes:r}=A.useContext(sp),a=Fg(i),o=Fg(t==null?void 0:t.id);return A.useEffect(()=>{if(!n&&!i&&a&&o!=null){if(!e0(a)||document.activeElement===a.target)return;const l=r.get(o);if(!l)return;const{activatorNode:f,node:c}=l;if(!f.current&&!c.current)return;requestAnimationFrame(()=>{for(const h of[f.current,c.current]){if(!h)continue;const d=fre(h);if(d){d.focus();break}}})}},[i,n,r,o,a]),null}function _F(e,n){let{transform:t,...i}=n;return e!=null&&e.length?e.reduce((r,a)=>a({transform:r,...i}),t):t}function vae(e){return A.useMemo(()=>({draggable:{...xg.draggable,...e==null?void 0:e.draggable},droppable:{...xg.droppable,...e==null?void 0:e.droppable},dragOverlay:{...xg.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function gae(e){let{activeNode:n,measure:t,initialRect:i,config:r=!0}=e;const a=A.useRef(!1),{x:o,y:l}=typeof r=="boolean"?{x:r,y:r}:r;Wa(()=>{if(!o&&!l||!n){a.current=!1;return}if(a.current||!i)return;const c=n==null?void 0:n.node.current;if(!c||c.isConnected===!1)return;const h=t(c),d=lF(h,i);if(o||(d.x=0),l||(d.y=0),a.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const p=fF(c);p&&p.scrollBy({top:d.y,left:d.x})}},[n,o,l,i,t])}const i0=A.createContext({...Va,scaleX:1,scaleY:1});var Ys;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ys||(Ys={}));const yae=A.memo(function(n){var t,i,r,a;let{id:o,accessibility:l,autoScroll:f=!0,children:c,sensors:h=fae,collisionDetection:d=sF,measuring:p,modifiers:v,...b}=n;const w=A.useReducer(mae,void 0,hae),[k,_]=w,[C,S]=vre(),[E,j]=A.useState(Ys.Uninitialized),O=E===Ys.Initialized,{draggable:{active:M,nodes:$,translate:q},droppable:{containers:P}}=k,z=M!=null?$.get(M):null,B=A.useRef({initial:null,translated:null}),V=A.useMemo(()=>{var yn;return M!=null?{id:M,data:(yn=z==null?void 0:z.data)!=null?yn:cae,rect:B}:null},[M,z]),U=A.useRef(null),[N,D]=A.useState(null),[L,H]=A.useState(null),Y=Jh(b,Object.values(b)),R=op("DndDescribedBy",o),G=A.useMemo(()=>P.getEnabled(),[P]),W=vae(p),{droppableRects:I,measureDroppableContainers:X,measuringScheduled:ee}=Jre(G,{dragging:O,dependencies:[q.x,q.y],config:W.droppable}),re=Zre($,M),se=A.useMemo(()=>L?qg(L):null,[L]),ye=bn(),ae=eae(re,W.draggable.measure);gae({activeNode:M!=null?$.get(M):null,config:ye.layoutShiftCompensation,initialRect:ae,measure:W.draggable.measure});const le=nM(re,W.draggable.measure,ae),_e=nM(re?re.parentElement:null),ne=A.useRef({activatorEvent:null,active:null,activeNode:re,collisionRect:null,collisions:null,droppableRects:I,draggableNodes:$,draggingNode:null,draggingNodeRect:null,droppableContainers:P,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ze=P.getNodeFor((t=ne.current.over)==null?void 0:t.id),we=uae({measure:W.dragOverlay.measure}),Ce=(i=we.nodeRef.current)!=null?i:re,Ne=O?(r=we.rect)!=null?r:le:null,ge=!!(we.nodeRef.current&&we.rect),xe=iae(ge?null:le),Pe=yF(Ce?dr(Ce):null),ue=rae(O?ze??re:null),Be=lae(ue),Ge=_F(v,{transform:{x:q.x-xe.x,y:q.y-xe.y,scaleX:1,scaleY:1},activatorEvent:L,active:V,activeNodeRect:le,containerNodeRect:_e,draggingNodeRect:Ne,over:ne.current.over,overlayNodeRect:we.rect,scrollableAncestors:ue,scrollableAncestorRects:Be,windowRect:Pe}),We=se?Wf(se,q):null,Ze=aae(ue),Qe=iM(Ze),ie=iM(Ze,[le]),me=Wf(Ge,Qe),Ye=Ne?Ere(Ne,Ge):null,Je=V&&Ye?d({active:V,collisionRect:Ye,droppableRects:I,droppableContainers:G,pointerCoordinates:We}):null,Se=aF(Je,"id"),[tn,dn]=A.useState(null),On=ge?Ge:Wf(Ge,ie),pn=jre(On,(a=tn==null?void 0:tn.rect)!=null?a:null,le),an=A.useRef(null),en=A.useCallback((yn,wn)=>{let{sensor:it,options:_t}=wn;if(U.current==null)return;const Le=$.get(U.current);if(!Le)return;const He=yn.nativeEvent,zn=new it({active:U.current,activeNode:Le,event:He,options:_t,context:ne,onAbort(Dn){if(!$.get(Dn))return;const{onDragAbort:rn}=Y.current,on={id:Dn};rn==null||rn(on),C({type:"onDragAbort",event:on})},onPending(Dn,nn,rn,on){if(!$.get(Dn))return;const{onDragPending:Vn}=Y.current,xt={id:Dn,constraint:nn,initialCoordinates:rn,offset:on};Vn==null||Vn(xt),C({type:"onDragPending",event:xt})},onStart(Dn){const nn=U.current;if(nn==null)return;const rn=$.get(nn);if(!rn)return;const{onDragStart:on}=Y.current,Fn={activatorEvent:He,active:{id:nn,data:rn.data,rect:B}};Qs.unstable_batchedUpdates(()=>{on==null||on(Fn),j(Ys.Initializing),_({type:xi.DragStart,initialCoordinates:Dn,active:nn}),C({type:"onDragStart",event:Fn}),D(an.current),H(He)})},onMove(Dn){_({type:xi.DragMove,coordinates:Dn})},onEnd:st(xi.DragEnd),onCancel:st(xi.DragCancel)});an.current=zn;function st(Dn){return async function(){const{active:rn,collisions:on,over:Fn,scrollAdjustedTranslate:Vn}=ne.current;let xt=null;if(rn&&Vn){const{cancelDrop:Cn}=Y.current;xt={activatorEvent:He,active:rn,collisions:on,delta:Vn,over:Fn},Dn===xi.DragEnd&&typeof Cn=="function"&&await Promise.resolve(Cn(xt))&&(Dn=xi.DragCancel)}U.current=null,Qs.unstable_batchedUpdates(()=>{_({type:Dn}),j(Ys.Uninitialized),dn(null),D(null),H(null),an.current=null;const Cn=Dn===xi.DragEnd?"onDragEnd":"onDragCancel";if(xt){const An=Y.current[Cn];An==null||An(xt),C({type:Cn,event:xt})}})}}},[$]),Nn=A.useCallback((yn,wn)=>(it,_t)=>{const Le=it.nativeEvent,He=$.get(_t);if(U.current!==null||!He||Le.dndKit||Le.defaultPrevented)return;const zn={active:He};yn(it,wn.options,zn)===!0&&(Le.dndKit={capturedBy:wn.sensor},U.current=_t,en(it,wn))},[$,en]),De=Qre(h,Nn);oae(h),Wa(()=>{le&&E===Ys.Initializing&&j(Ys.Initialized)},[le,E]),A.useEffect(()=>{const{onDragMove:yn}=Y.current,{active:wn,activatorEvent:it,collisions:_t,over:Le}=ne.current;if(!wn||!it)return;const He={active:wn,activatorEvent:it,collisions:_t,delta:{x:me.x,y:me.y},over:Le};Qs.unstable_batchedUpdates(()=>{yn==null||yn(He),C({type:"onDragMove",event:He})})},[me.x,me.y]),A.useEffect(()=>{const{active:yn,activatorEvent:wn,collisions:it,droppableContainers:_t,scrollAdjustedTranslate:Le}=ne.current;if(!yn||U.current==null||!wn||!Le)return;const{onDragOver:He}=Y.current,zn=_t.get(Se),st=zn&&zn.rect.current?{id:zn.id,rect:zn.rect.current,data:zn.data,disabled:zn.disabled}:null,Dn={active:yn,activatorEvent:wn,collisions:it,delta:{x:Le.x,y:Le.y},over:st};Qs.unstable_batchedUpdates(()=>{dn(st),He==null||He(Dn),C({type:"onDragOver",event:Dn})})},[Se]),Wa(()=>{ne.current={activatorEvent:L,active:V,activeNode:re,collisionRect:Ye,collisions:Je,droppableRects:I,draggableNodes:$,draggingNode:Ce,draggingNodeRect:Ne,droppableContainers:P,over:tn,scrollableAncestors:ue,scrollAdjustedTranslate:me},B.current={initial:Ne,translated:Ye}},[V,re,Je,Ye,$,Ce,Ne,I,P,tn,ue,me]),Yre({...ye,delta:q,draggingRect:Ye,pointerCoordinates:We,scrollableAncestors:ue,scrollableAncestorRects:Be});const Fe=A.useMemo(()=>({active:V,activeNode:re,activeNodeRect:le,activatorEvent:L,collisions:Je,containerNodeRect:_e,dragOverlay:we,draggableNodes:$,droppableContainers:P,droppableRects:I,over:tn,measureDroppableContainers:X,scrollableAncestors:ue,scrollableAncestorRects:Be,measuringConfiguration:W,measuringScheduled:ee,windowRect:Pe}),[V,re,le,L,Je,_e,we,$,P,I,tn,X,ue,Be,W,ee,Pe]),En=A.useMemo(()=>({activatorEvent:L,activators:De,active:V,activeNodeRect:le,ariaDescribedById:{draggable:R},dispatch:_,draggableNodes:$,over:tn,measureDroppableContainers:X}),[L,De,V,le,_,R,$,tn,X]);return Q.createElement(rF.Provider,{value:S},Q.createElement(sp.Provider,{value:En},Q.createElement(kF.Provider,{value:Fe},Q.createElement(i0.Provider,{value:pn},c)),Q.createElement(pae,{disabled:(l==null?void 0:l.restoreFocus)===!1})),Q.createElement(bre,{...l,hiddenTextDescribedById:R}));function bn(){const yn=(N==null?void 0:N.autoScrollEnabled)===!1,wn=typeof f=="object"?f.enabled===!1:f===!1,it=O&&!yn&&!wn;return typeof f=="object"?{...f,enabled:it}:{enabled:it}}}),bae=A.createContext(null),aM="button",wae="Draggable";function kae(e){let{id:n,data:t,disabled:i=!1,attributes:r}=e;const a=op(wae),{activators:o,activatorEvent:l,active:f,activeNodeRect:c,ariaDescribedById:h,draggableNodes:d,over:p}=A.useContext(sp),{role:v=aM,roleDescription:b="draggable",tabIndex:w=0}=r??{},k=(f==null?void 0:f.id)===n,_=A.useContext(k?i0:bae),[C,S]=Bg(),[E,j]=Bg(),O=sae(o,n),M=Jh(t);Wa(()=>(d.set(n,{id:n,key:a,node:C,activatorNode:E,data:M}),()=>{const q=d.get(n);q&&q.key===a&&d.delete(n)}),[d,n]);const $=A.useMemo(()=>({role:v,tabIndex:w,"aria-disabled":i,"aria-pressed":k&&v===aM?!0:void 0,"aria-roledescription":b,"aria-describedby":h.draggable}),[i,v,w,k,b,h.draggable]);return{active:f,activatorEvent:l,activeNodeRect:c,attributes:$,isDragging:k,listeners:i?void 0:O,node:C,over:p,setNodeRef:S,setActivatorNodeRef:j,transform:_}}function xF(){return A.useContext(kF)}const _ae="Droppable",xae={timeout:25};function Sae(e){let{data:n,disabled:t=!1,id:i,resizeObserverConfig:r}=e;const a=op(_ae),{active:o,dispatch:l,over:f,measureDroppableContainers:c}=A.useContext(sp),h=A.useRef({disabled:t}),d=A.useRef(!1),p=A.useRef(null),v=A.useRef(null),{disabled:b,updateMeasurementsFor:w,timeout:k}={...xae,...r},_=Jh(w??i),C=A.useCallback(()=>{if(!d.current){d.current=!0;return}v.current!=null&&clearTimeout(v.current),v.current=setTimeout(()=>{c(Array.isArray(_.current)?_.current:[_.current]),v.current=null},k)},[k]),S=t0({callback:C,disabled:b||!o}),E=A.useCallback(($,q)=>{S&&(q&&(S.unobserve(q),d.current=!1),$&&S.observe($))},[S]),[j,O]=Bg(E),M=Jh(n);return A.useEffect(()=>{!S||!j.current||(S.disconnect(),d.current=!1,S.observe(j.current))},[j,S]),A.useEffect(()=>(l({type:xi.RegisterDroppable,element:{id:i,key:a,disabled:t,node:j,rect:p,data:M}}),()=>l({type:xi.UnregisterDroppable,key:a,id:i})),[i]),A.useEffect(()=>{t!==h.current.disabled&&(l({type:xi.SetDroppableDisabled,id:i,key:a,disabled:t}),h.current.disabled=t)},[i,a,t,l]),{active:o,rect:p,isOver:(f==null?void 0:f.id)===i,node:j,over:f,setNodeRef:O}}function Cae(e){let{animation:n,children:t}=e;const[i,r]=A.useState(null),[a,o]=A.useState(null),l=Fg(t);return!t&&!i&&l&&r(l),Wa(()=>{if(!a)return;const f=i==null?void 0:i.key,c=i==null?void 0:i.props.id;if(f==null||c==null){r(null);return}Promise.resolve(n(c,a)).then(()=>{r(null)})},[n,i,a]),Q.createElement(Q.Fragment,null,t,i?A.cloneElement(i,{ref:o}):null)}const Aae={x:0,y:0,scaleX:1,scaleY:1};function jae(e){let{children:n}=e;return Q.createElement(sp.Provider,{value:wF},Q.createElement(i0.Provider,{value:Aae},n))}const Oae={position:"fixed",touchAction:"none"},Eae=e=>e0(e)?"transform 250ms ease":void 0,Tae=A.forwardRef((e,n)=>{let{as:t,activatorEvent:i,adjustScale:r,children:a,className:o,rect:l,style:f,transform:c,transition:h=Eae}=e;if(!l)return null;const d=r?c:{...c,scaleX:1,scaleY:1},p={...Oae,width:l.width,height:l.height,top:l.top,left:l.left,transform:po.Transform.toString(d),transformOrigin:r&&i?kre(i,l):void 0,transition:typeof h=="function"?h(i):h,...f};return Q.createElement(t,{className:o,style:p,ref:n},a)}),Mae=e=>n=>{let{active:t,dragOverlay:i}=n;const r={},{styles:a,className:o}=e;if(a!=null&&a.active)for(const[l,f]of Object.entries(a.active))f!==void 0&&(r[l]=t.node.style.getPropertyValue(l),t.node.style.setProperty(l,f));if(a!=null&&a.dragOverlay)for(const[l,f]of Object.entries(a.dragOverlay))f!==void 0&&i.node.style.setProperty(l,f);return o!=null&&o.active&&t.node.classList.add(o.active),o!=null&&o.dragOverlay&&i.node.classList.add(o.dragOverlay),function(){for(const[f,c]of Object.entries(r))t.node.style.setProperty(f,c);o!=null&&o.active&&t.node.classList.remove(o.active)}},Dae=e=>{let{transform:{initial:n,final:t}}=e;return[{transform:po.Transform.toString(n)},{transform:po.Transform.toString(t)}]},Rae={duration:250,easing:"ease",keyframes:Dae,sideEffects:Mae({styles:{active:{opacity:"0"}}})};function Pae(e){let{config:n,draggableNodes:t,droppableContainers:i,measuringConfiguration:r}=e;return Jy((a,o)=>{if(n===null)return;const l=t.get(a);if(!l)return;const f=l.node.current;if(!f)return;const c=bF(o);if(!c)return;const{transform:h}=dr(o).getComputedStyle(o),d=uF(h);if(!d)return;const p=typeof n=="function"?n:Nae(n);return vF(f,r.draggable.measure),p({active:{id:a,data:l.data,node:f,rect:r.draggable.measure(f)},draggableNodes:t,dragOverlay:{node:o,rect:r.dragOverlay.measure(c)},droppableContainers:i,measuringConfiguration:r,transform:d})})}function Nae(e){const{duration:n,easing:t,sideEffects:i,keyframes:r}={...Rae,...e};return a=>{let{active:o,dragOverlay:l,transform:f,...c}=a;if(!n)return;const h={x:l.rect.left-o.rect.left,y:l.rect.top-o.rect.top},d={scaleX:f.scaleX!==1?o.rect.width*f.scaleX/l.rect.width:1,scaleY:f.scaleY!==1?o.rect.height*f.scaleY/l.rect.height:1},p={x:f.x-h.x,y:f.y-h.y,...d},v=r({...c,active:o,dragOverlay:l,transform:{initial:f,final:p}}),[b]=v,w=v[v.length-1];if(JSON.stringify(b)===JSON.stringify(w))return;const k=i==null?void 0:i({active:o,dragOverlay:l,...c}),_=l.node.animate(v,{duration:n,easing:t,fill:"forwards"});return new Promise(C=>{_.onfinish=()=>{k==null||k(),C()}})}}let oM=0;function $ae(e){return A.useMemo(()=>{if(e!=null)return oM++,oM},[e])}const zae=Q.memo(e=>{let{adjustScale:n=!1,children:t,dropAnimation:i,style:r,transition:a,modifiers:o,wrapperElement:l="div",className:f,zIndex:c=999}=e;const{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:v,draggableNodes:b,droppableContainers:w,dragOverlay:k,over:_,measuringConfiguration:C,scrollableAncestors:S,scrollableAncestorRects:E,windowRect:j}=xF(),O=A.useContext(i0),M=$ae(d==null?void 0:d.id),$=_F(o,{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:v,draggingNodeRect:k.rect,over:_,overlayNodeRect:k.rect,scrollableAncestors:S,scrollableAncestorRects:E,transform:O,windowRect:j}),q=u9(p),P=Pae({config:i,draggableNodes:b,droppableContainers:w,measuringConfiguration:C}),z=q?k.setRef:void 0;return Q.createElement(jae,null,Q.createElement(Cae,{animation:P},d&&M?Q.createElement(Tae,{key:M,id:d.id,ref:z,as:l,activatorEvent:h,adjustScale:n,className:f,transition:a,rect:q,style:{zIndex:c,...r},transform:$},t):null))});function Wg(e,n,t){const i=e.slice();return i.splice(t<0?i.length+t:t,0,i.splice(n,1)[0]),i}function Lae(e,n){return e.reduce((t,i,r)=>{const a=n.get(i);return a&&(t[r]=a),t},Array(e.length))}function Hv(e){return e!==null&&e>=0}function Iae(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let t=0;t{var n;let{rects:t,activeNodeRect:i,activeIndex:r,overIndex:a,index:o}=e;const l=(n=t[r])!=null?n:i;if(!l)return null;const f=qae(t,o,r);if(o===r){const c=t[a];return c?{x:rr&&o<=a?{x:-l.width-f,y:0,...Uv}:o=a?{x:l.width+f,y:0,...Uv}:{x:0,y:0,...Uv}};function qae(e,n,t){const i=e[n],r=e[n-1],a=e[n+1];return!i||!r&&!a?0:t{let{rects:n,activeIndex:t,overIndex:i,index:r}=e;const a=Wg(n,i,t),o=n[r],l=a[r];return!l||!o?null:{x:l.left-o.left,y:l.top-o.top,scaleX:l.width/o.width,scaleY:l.height/o.height}},Wv={scaleX:1,scaleY:1},CF=e=>{var n;let{activeIndex:t,activeNodeRect:i,index:r,rects:a,overIndex:o}=e;const l=(n=a[t])!=null?n:i;if(!l)return null;if(r===t){const c=a[o];return c?{x:0,y:tt&&r<=o?{x:0,y:-l.height-f,...Wv}:r=o?{x:0,y:l.height+f,...Wv}:{x:0,y:0,...Wv}};function Hae(e,n,t){const i=e[n],r=e[n-1],a=e[n+1];return i?ti.map(O=>typeof O=="object"&&"id"in O?O.id:O),[i]),b=o!=null,w=o?v.indexOf(o.id):-1,k=c?v.indexOf(c.id):-1,_=A.useRef(v),C=!Iae(v,_.current),S=k!==-1&&w===-1||C,E=Bae(a);Wa(()=>{C&&b&&h(v)},[C,v,b,h]),A.useEffect(()=>{_.current=v},[v]);const j=A.useMemo(()=>({activeIndex:w,containerId:d,disabled:E,disableTransforms:S,items:v,overIndex:k,useDragOverlay:p,sortedRects:Lae(v,f),strategy:r}),[w,d,E.draggable,E.droppable,S,v,k,f,p,r]);return Q.createElement(jF.Provider,{value:j},n)}const Uae=e=>{let{id:n,items:t,activeIndex:i,overIndex:r}=e;return Wg(t,i,r).indexOf(n)},Wae=e=>{let{containerId:n,isSorting:t,wasDragging:i,index:r,items:a,newIndex:o,previousItems:l,previousContainerId:f,transition:c}=e;return!c||!i||l!==a&&r===o?!1:t?!0:o!==r&&n===f},Vae={duration:200,easing:"ease"},OF="transform",Gae=po.Transition.toString({property:OF,duration:0,easing:"linear"}),Yae={roleDescription:"sortable"};function Kae(e){let{disabled:n,index:t,node:i,rect:r}=e;const[a,o]=A.useState(null),l=A.useRef(t);return Wa(()=>{if(!n&&t!==l.current&&i.current){const f=r.current;if(f){const c=Gc(i.current,{ignoreTransform:!0}),h={x:f.left-c.left,y:f.top-c.top,scaleX:f.width/c.width,scaleY:f.height/c.height};(h.x||h.y)&&o(h)}}t!==l.current&&(l.current=t)},[n,t,i,r]),A.useEffect(()=>{a&&o(null)},[a]),a}function EF(e){let{animateLayoutChanges:n=Wae,attributes:t,disabled:i,data:r,getNewIndex:a=Uae,id:o,strategy:l,resizeObserverConfig:f,transition:c=Vae}=e;const{items:h,containerId:d,activeIndex:p,disabled:v,disableTransforms:b,sortedRects:w,overIndex:k,useDragOverlay:_,strategy:C}=A.useContext(jF),S=Xae(i,v),E=h.indexOf(o),j=A.useMemo(()=>({sortable:{containerId:d,index:E,items:h},...r}),[d,r,E,h]),O=A.useMemo(()=>h.slice(h.indexOf(o)),[h,o]),{rect:M,node:$,isOver:q,setNodeRef:P}=Sae({id:o,data:j,disabled:S.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...f}}),{active:z,activatorEvent:B,activeNodeRect:V,attributes:U,setNodeRef:N,listeners:D,isDragging:L,over:H,setActivatorNodeRef:Y,transform:R}=kae({id:o,data:j,attributes:{...Yae,...t},disabled:S.draggable}),G=ore(P,N),W=!!z,I=W&&!b&&Hv(p)&&Hv(k),X=!_&&L,ee=X&&I?R:null,se=I?ee??(l??C)({rects:w,activeNodeRect:V,activeIndex:p,overIndex:k,index:E}):null,ye=Hv(p)&&Hv(k)?a({id:o,items:h,activeIndex:p,overIndex:k}):E,ae=z==null?void 0:z.id,le=A.useRef({activeId:ae,items:h,newIndex:ye,containerId:d}),_e=h!==le.current.items,ne=n({active:z,containerId:d,isDragging:L,isSorting:W,id:o,index:E,items:h,newIndex:le.current.newIndex,previousItems:le.current.items,previousContainerId:le.current.containerId,transition:c,wasDragging:le.current.activeId!=null}),ze=Kae({disabled:!ne,index:E,node:$,rect:M});return A.useEffect(()=>{W&&le.current.newIndex!==ye&&(le.current.newIndex=ye),d!==le.current.containerId&&(le.current.containerId=d),h!==le.current.items&&(le.current.items=h)},[W,ye,d,h]),A.useEffect(()=>{if(ae===le.current.activeId)return;if(ae!=null&&le.current.activeId==null){le.current.activeId=ae;return}const Ce=setTimeout(()=>{le.current.activeId=ae},50);return()=>clearTimeout(Ce)},[ae]),{active:z,activeIndex:p,attributes:U,data:j,rect:M,index:E,newIndex:ye,items:h,isOver:q,isSorting:W,isDragging:L,listeners:D,node:$,overIndex:k,over:H,setNodeRef:G,setActivatorNodeRef:Y,setDroppableNodeRef:P,setDraggableNodeRef:N,transform:ze??se,transition:we()};function we(){if(ze||_e&&le.current.newIndex===E)return Gae;if(!(X&&!e0(B)||!c)&&(W||ne))return po.Transition.toString({...c,property:OF})}}function Xae(e,n){var t,i;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(t=e==null?void 0:e.draggable)!=null?t:n.draggable,droppable:(i=e==null?void 0:e.droppable)!=null?i:n.droppable}}function Vg(e){if(!e)return!1;const n=e.data.current;return!!(n&&"sortable"in n&&typeof n.sortable=="object"&&"containerId"in n.sortable&&"items"in n.sortable&&"index"in n.sortable)}const Zae=[at.Down,at.Right,at.Up,at.Left],Qae=(e,n)=>{let{context:{active:t,collisionRect:i,droppableRects:r,droppableContainers:a,over:o,scrollableAncestors:l}}=n;if(Zae.includes(e.code)){if(e.preventDefault(),!t||!i)return;const f=[];a.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const p=r.get(d.id);if(p)switch(e.code){case at.Down:i.topp.top&&f.push(d);break;case at.Left:i.left>p.left&&f.push(d);break;case at.Right:i.left1&&(h=c[1].id),h!=null){const d=a.get(t.id),p=a.get(h),v=p?r.get(p.id):null,b=p==null?void 0:p.node.current;if(b&&v&&d&&p){const k=n0(b).some((O,M)=>l[M]!==O),_=TF(d,p),C=Jae(d,p),S=k||!_?{x:0,y:0}:{x:C?i.width-v.width:0,y:C?i.height-v.height:0},E={x:v.left,y:v.top};return S.x&&S.y?E:em(E,S)}}}};function TF(e,n){return!Vg(e)||!Vg(n)?!1:e.data.current.sortable.containerId===n.data.current.sortable.containerId}function Jae(e,n){return!Vg(e)||!Vg(n)||!TF(e,n)?!1:e.data.current.sortable.index=N?U:""+Array(N+1-L.length).join(D)+U},E={s:S,z:function(U){var N=-U.utcOffset(),D=Math.abs(N),L=Math.floor(D/60),H=D%60;return(N<=0?"+":"-")+S(L,2,"0")+":"+S(H,2,"0")},m:function U(N,D){if(N.date()1)return U(R[0])}else{var G=N.name;O[G]=N,H=G}return!L&&H&&(j=H),H||!L&&j},P=function(U,N){if($(U))return U.clone();var D=typeof N=="object"?N:{};return D.date=U,D.args=arguments,new B(D)},z=E;z.l=q,z.i=$,z.w=function(U,N){return P(U,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var B=(function(){function U(D){this.$L=q(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[M]=!0}var N=U.prototype;return N.parse=function(D){this.$d=(function(L){var H=L.date,Y=L.utc;if(H===null)return new Date(NaN);if(z.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var R=H.match(k);if(R){var G=R[2]-1||0,W=(R[7]||"0").substring(0,3);return Y?new Date(Date.UTC(R[1],G,R[3]||1,R[4]||0,R[5]||0,R[6]||0,W)):new Date(R[1],G,R[3]||1,R[4]||0,R[5]||0,R[6]||0,W)}}return new Date(H)})(D),this.init()},N.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},N.$utils=function(){return z},N.isValid=function(){return this.$d.toString()!==w},N.isSame=function(D,L){var H=P(D);return this.startOf(L)<=H&&H<=this.endOf(L)},N.isAfter=function(D,L){return P(D)Ie(o).locale(t).format(i);return e==="default"?n===null?"":a(n):e==="multiple"?n.map(a).join(", "):e==="range"&&Array.isArray(n)?n[0]&&n[1]?`${a(n[0])} ${r} ${a(n[1])}`:n[0]?`${a(n[0])} ${r} `:"":""}function roe({formatter:e,...n}){return(e||ioe)(n)}function aoe({direction:e,levelIndex:n,rowIndex:t,cellIndex:i,size:r}){switch(e){case"up":return n===0&&t===0?null:t===0?{levelIndex:n-1,rowIndex:i<=r[n-1][r[n-1].length-1]-1?r[n-1].length-1:r[n-1].length-2,cellIndex:i}:{levelIndex:n,rowIndex:t-1,cellIndex:i};case"down":return t===r[n].length-1?{levelIndex:n+1,rowIndex:0,cellIndex:i}:t===r[n].length-2&&i>=r[n][r[n].length-1]?{levelIndex:n+1,rowIndex:0,cellIndex:i}:{levelIndex:n,rowIndex:t+1,cellIndex:i};case"left":return n===0&&t===0&&i===0?null:t===0&&i===0?{levelIndex:n-1,rowIndex:r[n-1].length-1,cellIndex:r[n-1][r[n-1].length-1]-1}:i===0?{levelIndex:n,rowIndex:t-1,cellIndex:r[n][t-1]-1}:{levelIndex:n,rowIndex:t,cellIndex:i-1};case"right":return t===r[n].length-1&&i===r[n][t]-1?{levelIndex:n+1,rowIndex:0,cellIndex:0}:i===r[n][t]-1?{levelIndex:n,rowIndex:t+1,cellIndex:0}:{levelIndex:n,rowIndex:t,cellIndex:i+1};default:return{levelIndex:n,rowIndex:t,cellIndex:i}}}function MF({controlsRef:e,direction:n,levelIndex:t,rowIndex:i,cellIndex:r,size:a}){var f,c,h;const o=aoe({direction:n,size:a,rowIndex:i,cellIndex:r,levelIndex:t});if(!o)return;const l=(h=(c=(f=e.current)==null?void 0:f[o.levelIndex])==null?void 0:c[o.rowIndex])==null?void 0:h[o.cellIndex];l&&(l.disabled||l.getAttribute("data-hidden")||l.getAttribute("data-outside")?MF({controlsRef:e,direction:n,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):l.focus())}function ooe(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function soe(e){var n;return(n=e.current)==null?void 0:n.map(t=>t.map(i=>i.length))}function f9({controlsRef:e,levelIndex:n,rowIndex:t,cellIndex:i,event:r}){const a=ooe(r.key);a&&(r.preventDefault(),MF({controlsRef:e,direction:a,levelIndex:n,rowIndex:t,cellIndex:i,size:soe(e)}))}function Qi(e){return e==null||e===""?e:Ie(e).format("YYYY-MM-DD")}function DF(e){return e==null||e===""?e:Ie(e).format("YYYY-MM-DD HH:mm:ss")}function IS({minDate:e,maxDate:n}){const t=Ie();return!e&&!n?Qi(t):e&&Ie(t).isBefore(e)?Qi(e):n&&Ie(t).isAfter(n)?Qi(n):Qi(t)}const loe={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},uoe=A.createContext(loe);function wl(){const e=A.use(uoe),n=A.useCallback(a=>a||e.locale,[e.locale]),t=A.useCallback(a=>typeof a=="number"?a:e.firstDayOfWeek,[e.firstDayOfWeek]),i=A.useCallback(a=>Array.isArray(a)?a:e.weekendDays,[e.weekendDays]),r=A.useCallback(a=>typeof a=="string"?a:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:n,getFirstDayOfWeek:t,getWeekendDays:i,getLabelSeparator:r}}function foe({value:e,type:n,withTime:t}){const i=t?DF:Qi;if(n==="range"&&Array.isArray(e)){const r=i(e[0]),a=i(e[1]);return r?a?`${r} – ${a}`:`${r} –`:""}return n==="multiple"&&Array.isArray(e)?e.filter(Boolean).join(", "):!Array.isArray(e)&&e?i(e):""}function RF({value:e,type:n,name:t,form:i,withTime:r=!1}){return y.jsx("input",{type:"hidden",value:foe({value:e,type:n,withTime:r}),name:t,form:i})}RF.displayName="@mantine/dates/HiddenDatesInput";var PF={day:"m_396ce5cb"};const NF=(e,{size:n})=>({day:{"--day-size":$n(n,"day-size")}}),r0=Re(e=>{const n=be("Day",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,date:f,disabled:c,__staticSelector:h,weekend:d,outside:p,selected:v,renderDay:b,inRange:w,firstInRange:k,lastInRange:_,hidden:C,static:S,highlightToday:E,fullWidth:j,attributes:O,...M}=n;return y.jsx(Dt,{...Xe({name:h||"Day",classes:PF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:O,vars:l,varsResolver:NF,rootSelector:"day"})("day",{style:C?{display:"none"}:void 0}),component:S?"div":"button",disabled:c,"data-today":Ie(f).isSame(new Date,"day")||void 0,"data-hidden":C||void 0,"data-highlight-today":E||void 0,"data-disabled":c||void 0,"data-weekend":!c&&!p&&d||void 0,"data-outside":!c&&p||void 0,"data-selected":!c&&v||void 0,"data-in-range":w&&!c||void 0,"data-first-in-range":k&&!c||void 0,"data-last-in-range":_&&!c||void 0,"data-static":S||void 0,"data-full-width":j||void 0,unstyled:o,...M,children:(b==null?void 0:b(f))||Ie(f).date()})});r0.classes=PF;r0.varsResolver=NF;r0.displayName="@mantine/dates/Day";function coe({locale:e,format:n="dd",firstDayOfWeek:t=1}){const i=Ie().day(t),r=[];for(let a=0;a<7;a+=1)typeof n=="string"?r.push(Ie(i).add(a,"days").locale(e).format(n)):r.push(n(Ie(i).add(a,"days").format("YYYY-MM-DD")));return r}var $F={weekday:"m_18a3eca"};const zF=(e,{size:n})=>({weekdaysRow:{"--wr-fz":ri(n),"--wr-spacing":Ut(n)}}),a0=Re(e=>{const n=be("WeekdaysRow",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,locale:f,firstDayOfWeek:c,weekdayFormat:h,cellComponent:d="th",__staticSelector:p,withWeekNumbers:v,attributes:b,...w}=n,k=Xe({name:p||"WeekdaysRow",classes:$F,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l,varsResolver:zF,rootSelector:"weekdaysRow"}),_=wl(),C=coe({locale:_.getLocale(f),format:h,firstDayOfWeek:_.getFirstDayOfWeek(c)}).map((S,E)=>y.jsx(d,{...k("weekday"),children:S},E));return y.jsxs(de,{component:"tr",...k("weekdaysRow"),...w,children:[v&&y.jsx(d,{...k("weekday"),children:"#"}),C]})});a0.classes=$F;a0.varsResolver=zF;a0.displayName="@mantine/dates/WeekdaysRow";function doe(e,n=1){let t=Ie(e);if(!t.isValid())return t;const i=n===0?6:n-1;for(;t.day()!==i;)t=t.add(1,"day");return t.format("YYYY-MM-DD")}function hoe(e,n=1){let t=Ie(e);for(;t.day()!==n;)t=t.subtract(1,"day");return t.format("YYYY-MM-DD")}function moe({month:e,firstDayOfWeek:n=1,consistentWeeks:t}){const i=Ie(Ie(e).subtract(Ie(e).date()-1,"day").format("YYYY-M-D")),r=i.format("YYYY-MM-DD"),a=doe(i.add(+i.daysInMonth()-1,"day").format("YYYY-MM-DD"),n),o=[];let l=Ie(hoe(r,n));for(;Ie(l).isBefore(a,"day");){const f=[];for(let c=0;c<7;c+=1)f.push(l.format("YYYY-MM-DD")),l=l.add(1,"day");o.push(f)}if(t&&o.length<6){const f=o[o.length-1],c=f[f.length-1];let h=Ie(c).add(1,"day");for(;o.length<6;){const d=[];for(let p=0;p<7;p+=1)d.push(h.format("YYYY-MM-DD")),h=h.add(1,"day");o.push(d)}}return o}function c9(e,n){return Ie(e).format("YYYY-MM")===Ie(n).format("YYYY-MM")}function LF(e,n){return n?Ie(e).isAfter(Ie(n).subtract(1,"day"),"day"):!0}function IF(e,n){return n?Ie(e).isBefore(Ie(n).add(1,"day"),"day"):!0}function poe({dates:e,minDate:n,maxDate:t,getDayProps:i,excludeDate:r,hideOutsideDates:a,month:o}){const l=e.flat().filter(h=>{var d;return IF(h,t)&&LF(h,n)&&!(r!=null&&r(h))&&!((d=i==null?void 0:i(h))!=null&&d.disabled)&&(!a||c9(h,o))}),f=l.find(h=>{var d;return(d=i==null?void 0:i(h))==null?void 0:d.selected});if(f)return f;const c=l.find(h=>Ie().isSame(h,"date"));return c||l[0]}var Cg={exports:{}},voe=Cg.exports,lM;function goe(){return lM||(lM=1,(function(e,n){(function(t,i){e.exports=i()})(voe,(function(){var t="day";return function(i,r,a){var o=function(c){return c.add(4-c.isoWeekday(),t)},l=r.prototype;l.isoWeekYear=function(){return o(this).year()},l.isoWeek=function(c){if(!this.$utils().u(c))return this.add(7*(c-this.isoWeek()),t);var h,d,p,v,b=o(this),w=(h=this.isoWeekYear(),d=this.$u,p=(d?a.utc:a)().year(h).startOf("year"),v=4-p.isoWeekday(),p.isoWeekday()>4&&(v+=7),p.add(v,t));return b.diff(w,"week")+1},l.isoWeekday=function(c){return this.$utils().u(c)?this.day()||7:this.day(this.day()%7?c:c-7)};var f=l.startOf;l.startOf=function(c,h){var d=this.$utils(),p=!!d.u(h)||h;return d.p(c)==="isoweek"?p?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):f.bind(this)(c,h)}}}))})(Cg)),Cg.exports}var yoe=goe();const boe=pt(yoe);Ie.extend(boe);function woe(e){return Ie(e.find(n=>Ie(n).day()===1)).isoWeek()}var BF={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const koe={withCellSpacing:!0},FF=(e,{size:n})=>({weekNumber:{"--wn-fz":ri(n),"--wn-size":$n(n,"wn-size")}}),lp=Re(e=>{const n=be("Month",koe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,locale:c,firstDayOfWeek:h,weekdayFormat:d,month:p,weekendDays:v,getDayProps:b,excludeDate:w,minDate:k,maxDate:_,renderDay:C,hideOutsideDates:S,hideWeekdays:E,getDayAriaLabel:j,static:O,__getDayRef:M,__onDayKeyDown:$,__onDayClick:q,__onDayMouseEnter:P,__preventFocus:z,__stopPropagation:B,withCellSpacing:V,size:U,highlightToday:N,withWeekNumbers:D,fullWidth:L,attributes:H,...Y}=n,R=Xe({name:f||"Month",classes:BF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:H,vars:l,varsResolver:FF,rootSelector:"month"}),G=wl(),W=moe({month:p,firstDayOfWeek:G.getFirstDayOfWeek(h),consistentWeeks:G.consistentWeeks}),I=poe({dates:W,minDate:Qi(k),maxDate:Qi(_),getDayProps:b,excludeDate:w,hideOutsideDates:S,month:p}),{resolvedClassNames:X,resolvedStyles:ee}=Hi({classNames:t,styles:a,props:n}),re=W.map((se,ye)=>{const ae=se.map((le,_e)=>{const ne=!c9(le,p),ze=(j==null?void 0:j(le))||Ie(le).locale(c||G.locale).format("D MMMM YYYY"),we=b==null?void 0:b(le),Ce=Ie(le).isSame(I,"date");return y.jsx("td",{...R("monthCell"),"data-with-spacing":V||void 0,children:y.jsx(r0,{__staticSelector:f||"Month",classNames:X,styles:ee,attributes:H,unstyled:o,"data-mantine-stop-propagation":B||void 0,highlightToday:N,renderDay:C,date:le,size:U,weekend:G.getWeekendDays(v).includes(Ie(le).get("day")),outside:ne,hidden:S?ne:!1,"aria-label":ze,static:O,fullWidth:L,disabled:(w==null?void 0:w(le))||!IF(le,Qi(_))||!LF(le,Qi(k)),ref:Ne=>{Ne&&(M==null||M(ye,_e,Ne))},...we,onKeyDown:Ne=>{var ge;(ge=we==null?void 0:we.onKeyDown)==null||ge.call(we,Ne),$==null||$(Ne,{rowIndex:ye,cellIndex:_e,date:le})},onMouseEnter:Ne=>{var ge;(ge=we==null?void 0:we.onMouseEnter)==null||ge.call(we,Ne),P==null||P(Ne,le)},onClick:Ne=>{var ge;(ge=we==null?void 0:we.onClick)==null||ge.call(we,Ne),q==null||q(Ne,le)},onMouseDown:Ne=>{var ge;(ge=we==null?void 0:we.onMouseDown)==null||ge.call(we,Ne),z&&Ne.preventDefault()},tabIndex:z||!Ce?-1:0})},le.toString())});return y.jsxs("tr",{...R("monthRow"),children:[D&&y.jsx("td",{...R("weekNumber"),children:woe(se)}),ae]},ye)});return y.jsxs(de,{component:"table",...R("month"),size:U,"data-full-width":L||void 0,...Y,children:[!E&&y.jsx("thead",{...R("monthThead"),children:y.jsx(a0,{__staticSelector:f||"Month",locale:c,firstDayOfWeek:h,weekdayFormat:d,withWeekNumbers:D,size:U,classNames:X,styles:ee,unstyled:o,attributes:H})}),y.jsx("tbody",{...R("monthTbody"),children:re})]})});lp.classes=BF;lp.varsResolver=FF;lp.displayName="@mantine/dates/Month";var qF={pickerControl:"m_dc6a3c71"};const HF=(e,{size:n})=>({pickerControl:{"--dpc-fz":ri(n),"--dpc-size":$n(n,"dpc-size")}}),up=Re(e=>{const n=be("PickerControl",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,firstInRange:f,lastInRange:c,inRange:h,__staticSelector:d,selected:p,disabled:v,fullWidth:b,attributes:w,...k}=n;return y.jsx(Dt,{...Xe({name:d||"PickerControl",classes:qF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:HF,rootSelector:"pickerControl"})("pickerControl"),unstyled:o,"data-picker-control":!0,"data-full-width":b||void 0,"data-selected":p&&!v||void 0,"data-disabled":v||void 0,"data-in-range":h&&!v&&!p||void 0,"data-first-in-range":f&&!v||void 0,"data-last-in-range":c&&!v||void 0,disabled:v,...k})});up.classes=qF;up.varsResolver=HF;up.displayName="@mantine/dates/PickerControl";function UF({year:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&Ie(e).isBefore(n,"year")||t&&Ie(e).isAfter(t,"year"))}function _oe({years:e,minDate:n,maxDate:t,getYearControlProps:i}){const r=e.flat().filter(l=>{var f;return!UF({year:l,minDate:n,maxDate:t})&&!((f=i==null?void 0:i(l))!=null&&f.disabled)}),a=r.find(l=>{var f;return(f=i==null?void 0:i(l))==null?void 0:f.selected});if(a)return a;const o=r.find(l=>Ie().isSame(l,"year"));return o||r[0]}function WF(e){const n=Ie(e).year(),t=n-n%10;let i=0;const r=[[],[],[],[]];for(let a=0;a<4;a+=1){const o=a===3?1:3;for(let l=0;l{const n=be("YearsList",xoe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,decade:f,yearsListFormat:c,locale:h,minDate:d,maxDate:p,getYearControlProps:v,__staticSelector:b,__getControlRef:w,__onControlKeyDown:k,__onControlClick:_,__onControlMouseEnter:C,__preventFocus:S,__stopPropagation:E,withCellSpacing:j,fullWidth:O,size:M,attributes:$,...q}=n,P=Xe({name:b||"YearsList",classes:VF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:$,vars:l,rootSelector:"yearsList"}),z=wl(),B=WF(f),V=_oe({years:B,minDate:d,maxDate:p,getYearControlProps:v}),U=B.map((N,D)=>{const L=N.map((H,Y)=>{const R=v==null?void 0:v(H),G=Ie(H).isSame(V,"year");return y.jsx("td",{...P("yearsListCell"),"data-with-spacing":j||void 0,children:y.jsx(up,{...P("yearsListControl"),size:M,unstyled:o,fullWidth:O,"data-mantine-stop-propagation":E||void 0,disabled:UF({year:H,minDate:d,maxDate:p}),ref:W=>{W&&(w==null||w(D,Y,W))},...R,onKeyDown:W=>{var I;(I=R==null?void 0:R.onKeyDown)==null||I.call(R,W),k==null||k(W,{rowIndex:D,cellIndex:Y,date:H})},onClick:W=>{var I;(I=R==null?void 0:R.onClick)==null||I.call(R,W),_==null||_(W,H)},onMouseEnter:W=>{var I;(I=R==null?void 0:R.onMouseEnter)==null||I.call(R,W),C==null||C(W,H)},onMouseDown:W=>{var I;(I=R==null?void 0:R.onMouseDown)==null||I.call(R,W),S&&W.preventDefault()},tabIndex:S||!G?-1:0,children:(R==null?void 0:R.children)??Ie(H).locale(z.getLocale(h)).format(c)})},Y)});return y.jsx("tr",{...P("yearsListRow"),children:L},D)});return y.jsx(de,{component:"table",size:M,...P("yearsList"),"data-full-width":O||void 0,...q,children:y.jsx("tbody",{children:U})})});o0.classes=VF;o0.displayName="@mantine/dates/YearsList";function GF({month:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&Ie(e).isBefore(n,"month")||t&&Ie(e).isAfter(t,"month"))}function Soe({months:e,minDate:n,maxDate:t,getMonthControlProps:i}){const r=e.flat().filter(l=>{var f;return!GF({month:l,minDate:n,maxDate:t})&&!((f=i==null?void 0:i(l))!=null&&f.disabled)}),a=r.find(l=>{var f;return(f=i==null?void 0:i(l))==null?void 0:f.selected});if(a)return a;const o=r.find(l=>Ie().isSame(l,"month"));return o||r[0]}function Coe(e){const n=Ie(e).startOf("year").toDate(),t=[[],[],[],[]];let i=0;for(let r=0;r<4;r+=1)for(let a=0;a<3;a+=1)t[r].push(Ie(n).add(i,"months").format("YYYY-MM-DD")),i+=1;return t}var YF={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const Aoe={monthsListFormat:"MMM",withCellSpacing:!0},s0=Re(e=>{const n=be("MonthsList",Aoe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,year:c,monthsListFormat:h,locale:d,minDate:p,maxDate:v,getMonthControlProps:b,__getControlRef:w,__onControlKeyDown:k,__onControlClick:_,__onControlMouseEnter:C,__preventFocus:S,__stopPropagation:E,withCellSpacing:j,fullWidth:O,size:M,attributes:$,...q}=n,P=Xe({name:f||"MonthsList",classes:YF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:$,vars:l,rootSelector:"monthsList"}),z=wl(),B=Coe(c),V=Soe({months:B,minDate:Qi(p),maxDate:Qi(v),getMonthControlProps:b}),U=B.map((N,D)=>{const L=N.map((H,Y)=>{const R=b==null?void 0:b(H),G=Ie(H).isSame(V,"month");return y.jsx("td",{...P("monthsListCell"),"data-with-spacing":j||void 0,children:y.jsx(up,{...P("monthsListControl"),size:M,unstyled:o,fullWidth:O,__staticSelector:f||"MonthsList","data-mantine-stop-propagation":E||void 0,disabled:GF({month:H,minDate:Qi(p),maxDate:Qi(v)}),ref:W=>{W&&(w==null||w(D,Y,W))},...R,onKeyDown:W=>{var I;(I=R==null?void 0:R.onKeyDown)==null||I.call(R,W),k==null||k(W,{rowIndex:D,cellIndex:Y,date:H})},onClick:W=>{var I;(I=R==null?void 0:R.onClick)==null||I.call(R,W),_==null||_(W,H)},onMouseEnter:W=>{var I;(I=R==null?void 0:R.onMouseEnter)==null||I.call(R,W),C==null||C(W,H)},onMouseDown:W=>{var I;(I=R==null?void 0:R.onMouseDown)==null||I.call(R,W),S&&W.preventDefault()},tabIndex:S||!G?-1:0,children:(R==null?void 0:R.children)??Ie(H).locale(z.getLocale(d)).format(h)})},Y)});return y.jsx("tr",{...P("monthsListRow"),children:L},D)});return y.jsx(de,{component:"table",size:M,...P("monthsList"),"data-full-width":O||void 0,...q,children:y.jsx("tbody",{children:U})})});s0.classes=YF;s0.displayName="@mantine/dates/MonthsList";var KF={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const joe={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:["previous","level","next"]},XF=(e,{size:n})=>({calendarHeader:{"--dch-control-size":$n(n,"dch-control-size"),"--dch-fz":ri(n)}}),ms=Re(e=>{const n=be("CalendarHeader",joe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,nextIcon:f,previousIcon:c,nextLabel:h,previousLabel:d,onNext:p,onPrevious:v,onLevelClick:b,label:w,nextDisabled:k,previousDisabled:_,hasNextLevel:C,levelControlAriaLabel:S,withNext:E,withPrevious:j,headerControlsOrder:O,fullWidth:M,__staticSelector:$,__preventFocus:q,__stopPropagation:P,attributes:z,...B}=n,V=Xe({name:$||"CalendarHeader",classes:KF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:z,vars:l,varsResolver:XF,rootSelector:"calendarHeader"}),U=q?Y=>Y.preventDefault():void 0,N=j&&A.createElement(Dt,{...V("calendarHeaderControl"),key:"previous","data-direction":"previous","aria-label":d,onClick:v,unstyled:o,onMouseDown:U,disabled:_,"data-disabled":_||void 0,tabIndex:q||_?-1:0,"data-mantine-stop-propagation":P||void 0},c||y.jsx(Lg,{...V("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})),D=A.createElement(Dt,{component:C?"button":"div",...V("calendarHeaderLevel"),key:"level",onClick:C?b:void 0,unstyled:o,onMouseDown:C?U:void 0,disabled:!C,"data-static":!C||void 0,"aria-label":S,tabIndex:q||!C?-1:0,"data-mantine-stop-propagation":P||void 0},w),L=E&&A.createElement(Dt,{...V("calendarHeaderControl"),key:"next","data-direction":"next","aria-label":h,onClick:p,unstyled:o,onMouseDown:U,disabled:k,"data-disabled":k||void 0,tabIndex:q||k?-1:0,"data-mantine-stop-propagation":P||void 0},f||y.jsx(Lg,{...V("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})),H=O.map(Y=>Y==="previous"?N:Y==="level"?D:Y==="next"?L:null);return y.jsx(de,{...V("calendarHeader"),"data-full-width":M||void 0,...B,children:H})});ms.classes=KF;ms.varsResolver=XF;ms.displayName="@mantine/dates/CalendarHeader";function Ooe(e){const n=WF(e);return[n[0][0],n[3][0]]}const Eoe={decadeLabelFormat:"YYYY"},l0=Re(e=>{const{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,withCellSpacing:d,__preventFocus:p,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:C,nextDisabled:S,previousDisabled:E,levelControlAriaLabel:j,withNext:O,withPrevious:M,headerControlsOrder:$,decadeLabelFormat:q,classNames:P,styles:z,unstyled:B,__staticSelector:V,__stopPropagation:U,size:N,fullWidth:D,attributes:L,...H}=be("DecadeLevel",Eoe,e),Y=wl(),[R,G]=Ooe(n),W={__staticSelector:V||"DecadeLevel",classNames:P,styles:z,unstyled:B,size:N,attributes:L},I=typeof S=="boolean"?S:r?!Ie(G).endOf("year").isBefore(r):!1,X=typeof E=="boolean"?E:i?!Ie(R).startOf("year").isAfter(i):!1,ee=(re,se)=>Ie(re).locale(t||Y.locale).format(se);return y.jsxs(de,{"data-decade-level":!0,size:N,...H,children:[y.jsx(ms,{label:typeof q=="function"?q(R,G):`${ee(R,q)} – ${ee(G,q)}`,__preventFocus:p,__stopPropagation:U,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:C,nextDisabled:I,previousDisabled:X,hasNextLevel:!1,levelControlAriaLabel:j,withNext:O,withPrevious:M,headerControlsOrder:$,fullWidth:D,...W}),y.jsx(o0,{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:U,withCellSpacing:d,fullWidth:D,...W})]})});l0.classes={...o0.classes,...ms.classes};l0.displayName="@mantine/dates/DecadeLevel";const Toe={yearLabelFormat:"YYYY"},u0=Re(e=>{const{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,withCellSpacing:d,__preventFocus:p,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:C,onLevelClick:S,nextDisabled:E,previousDisabled:j,hasNextLevel:O,levelControlAriaLabel:M,withNext:$,withPrevious:q,headerControlsOrder:P,yearLabelFormat:z,__staticSelector:B,__stopPropagation:V,size:U,classNames:N,styles:D,unstyled:L,fullWidth:H,attributes:Y,...R}=be("YearLevel",Toe,e),G=wl(),W={__staticSelector:B||"YearLevel",classNames:N,styles:D,unstyled:L,size:U,attributes:Y},I=typeof E=="boolean"?E:r?!Ie(n).endOf("year").isBefore(r):!1,X=typeof j=="boolean"?j:i?!Ie(n).startOf("year").isAfter(i):!1;return y.jsxs(de,{"data-year-level":!0,size:U,...R,children:[y.jsx(ms,{label:typeof z=="function"?z(n):Ie(n).locale(t||G.locale).format(z),__preventFocus:p,__stopPropagation:V,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:C,onLevelClick:S,nextDisabled:I,previousDisabled:X,hasNextLevel:O,levelControlAriaLabel:M,withNext:$,withPrevious:q,headerControlsOrder:P,fullWidth:H,...W}),y.jsx(s0,{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:V,withCellSpacing:d,fullWidth:H,...W})]})});u0.classes={...ms.classes,...s0.classes};u0.displayName="@mantine/dates/YearLevel";const Moe={monthLabelFormat:"MMMM YYYY"},f0=Re(e=>{const{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__getDayRef:b,__onDayKeyDown:w,__onDayClick:k,__onDayMouseEnter:_,withCellSpacing:C,highlightToday:S,withWeekNumbers:E,__preventFocus:j,__stopPropagation:O,nextIcon:M,previousIcon:$,nextLabel:q,previousLabel:P,onNext:z,onPrevious:B,onLevelClick:V,nextDisabled:U,previousDisabled:N,hasNextLevel:D,levelControlAriaLabel:L,withNext:H,withPrevious:Y,headerControlsOrder:R,monthLabelFormat:G,classNames:W,styles:I,unstyled:X,__staticSelector:ee,size:re,static:se,fullWidth:ye,attributes:ae,...le}=be("MonthLevel",Moe,e),_e=wl(),ne={__staticSelector:ee||"MonthLevel",classNames:W,styles:I,unstyled:X,size:re,attributes:ae},ze=typeof U=="boolean"?U:c?!Ie(n).endOf("month").isBefore(c):!1,we=typeof N=="boolean"?N:f?!Ie(n).startOf("month").isAfter(f):!1;return y.jsxs(de,{"data-month-level":!0,size:re,...le,children:[y.jsx(ms,{label:typeof G=="function"?G(n):Ie(n).locale(t||_e.locale).format(G),__preventFocus:j,__stopPropagation:O,nextIcon:M,previousIcon:$,nextLabel:q,previousLabel:P,onNext:z,onPrevious:B,onLevelClick:V,nextDisabled:ze,previousDisabled:we,hasNextLevel:D,levelControlAriaLabel:L,withNext:H,withPrevious:Y,headerControlsOrder:R,fullWidth:ye,...ne}),y.jsx(lp,{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__getDayRef:b,__onDayKeyDown:w,__onDayClick:k,__onDayMouseEnter:_,__preventFocus:j,__stopPropagation:O,static:se,withCellSpacing:C,highlightToday:S,withWeekNumbers:E,fullWidth:ye,...ne})]})});f0.classes={...lp.classes,...ms.classes};f0.displayName="@mantine/dates/MonthLevel";var ZF={levelsGroup:"m_30b26e33"};const kl=Re(e=>{const n=be("LevelsGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,fullWidth:c,attributes:h,...d}=n;return y.jsx(de,{...Xe({name:f||"LevelsGroup",classes:ZF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,rootSelector:"levelsGroup"})("levelsGroup"),"data-full-width":c||void 0,...d})});kl.classes=ZF;kl.displayName="@mantine/dates/LevelsGroup";const Doe={numberOfColumns:1},c0=Re(e=>{const{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__onControlClick:l,__onControlMouseEnter:f,withCellSpacing:c,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:b,onNext:w,onPrevious:k,nextDisabled:_,previousDisabled:C,headerControlsOrder:S,classNames:E,styles:j,unstyled:O,__staticSelector:M,__stopPropagation:$,numberOfColumns:q,levelControlAriaLabel:P,decadeLabelFormat:z,size:B,fullWidth:V,vars:U,attributes:N,...D}=be("DecadeLevelGroup",Doe,e),L=A.useRef([]),H=Array(q).fill(0).map((Y,R)=>{const G=Ie(n).add(R*10,"years").format("YYYY-MM-DD");return y.jsx(l0,{size:B,yearsListFormat:a,decade:G,withNext:R===q-1,withPrevious:R===0,decadeLabelFormat:z,__onControlClick:l,__onControlMouseEnter:f,__onControlKeyDown:(W,I)=>f9({levelIndex:R,rowIndex:I.rowIndex,cellIndex:I.cellIndex,event:W,controlsRef:L}),__getControlRef:(W,I,X)=>{Array.isArray(L.current[R])||(L.current[R]=[]),Array.isArray(L.current[R][W])||(L.current[R][W]=[]),L.current[R][W][I]=X},levelControlAriaLabel:typeof P=="function"?P(G):P,locale:t,minDate:i,maxDate:r,__preventFocus:h,__stopPropagation:$,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:b,onNext:w,onPrevious:k,nextDisabled:_,previousDisabled:C,getYearControlProps:o,__staticSelector:M||"DecadeLevelGroup",classNames:E,styles:j,unstyled:O,withCellSpacing:c,headerControlsOrder:S,fullWidth:V,attributes:N},R)});return y.jsx(kl,{classNames:E,styles:j,__staticSelector:M||"DecadeLevelGroup",size:B,unstyled:O,fullWidth:V,attributes:N,...D,children:H})});c0.classes={...kl.classes,...l0.classes};c0.displayName="@mantine/dates/DecadeLevelGroup";const Roe={numberOfColumns:1},d0=Re(e=>{const{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__onControlClick:l,__onControlMouseEnter:f,withCellSpacing:c,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:b,onNext:w,onPrevious:k,onLevelClick:_,nextDisabled:C,previousDisabled:S,hasNextLevel:E,headerControlsOrder:j,classNames:O,styles:M,unstyled:$,__staticSelector:q,__stopPropagation:P,numberOfColumns:z,levelControlAriaLabel:B,yearLabelFormat:V,size:U,fullWidth:N,vars:D,attributes:L,...H}=be("YearLevelGroup",Roe,e),Y=A.useRef([]),R=Array(z).fill(0).map((G,W)=>{const I=Ie(n).add(W,"years").format("YYYY-MM-DD");return y.jsx(u0,{size:U,monthsListFormat:a,year:I,withNext:W===z-1,withPrevious:W===0,yearLabelFormat:V,__stopPropagation:P,__onControlClick:l,__onControlMouseEnter:f,__onControlKeyDown:(X,ee)=>f9({levelIndex:W,rowIndex:ee.rowIndex,cellIndex:ee.cellIndex,event:X,controlsRef:Y}),__getControlRef:(X,ee,re)=>{Array.isArray(Y.current[W])||(Y.current[W]=[]),Array.isArray(Y.current[W][X])||(Y.current[W][X]=[]),Y.current[W][X][ee]=re},levelControlAriaLabel:typeof B=="function"?B(I):B,locale:t,minDate:i,maxDate:r,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:b,onNext:w,onPrevious:k,onLevelClick:_,nextDisabled:C,previousDisabled:S,hasNextLevel:E,getMonthControlProps:o,classNames:O,styles:M,unstyled:$,__staticSelector:q||"YearLevelGroup",withCellSpacing:c,headerControlsOrder:j,fullWidth:N,attributes:L},W)});return y.jsx(kl,{classNames:O,styles:M,__staticSelector:q||"YearLevelGroup",size:U,unstyled:$,fullWidth:N,attributes:L,...H,children:R})});d0.classes={...u0.classes,...kl.classes};d0.displayName="@mantine/dates/YearLevelGroup";const Poe={numberOfColumns:1},h0=Re(e=>{const{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__onDayClick:b,__onDayMouseEnter:w,withCellSpacing:k,highlightToday:_,withWeekNumbers:C,__preventFocus:S,nextIcon:E,previousIcon:j,nextLabel:O,previousLabel:M,onNext:$,onPrevious:q,onLevelClick:P,nextDisabled:z,previousDisabled:B,hasNextLevel:V,headerControlsOrder:U,classNames:N,styles:D,unstyled:L,numberOfColumns:H,levelControlAriaLabel:Y,monthLabelFormat:R,__staticSelector:G,__stopPropagation:W,size:I,static:X,fullWidth:ee,vars:re,attributes:se,...ye}=be("MonthLevelGroup",Poe,e),ae=A.useRef([]),le=Array(H).fill(0).map((_e,ne)=>{const ze=Ie(n).add(ne,"months").format("YYYY-MM-DD");return y.jsx(f0,{month:ze,withNext:ne===H-1,withPrevious:ne===0,monthLabelFormat:R,__stopPropagation:W,__onDayClick:b,__onDayMouseEnter:w,__onDayKeyDown:(we,Ce)=>f9({levelIndex:ne,rowIndex:Ce.rowIndex,cellIndex:Ce.cellIndex,event:we,controlsRef:ae}),__getDayRef:(we,Ce,Ne)=>{Array.isArray(ae.current[ne])||(ae.current[ne]=[]),Array.isArray(ae.current[ne][we])||(ae.current[ne][we]=[]),ae.current[ne][we][Ce]=Ne},levelControlAriaLabel:typeof Y=="function"?Y(ze):Y,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__preventFocus:S,nextIcon:E,previousIcon:j,nextLabel:O,previousLabel:M,onNext:$,onPrevious:q,onLevelClick:P,nextDisabled:z,previousDisabled:B,hasNextLevel:V,classNames:N,styles:D,unstyled:L,__staticSelector:G||"MonthLevelGroup",size:I,static:X,withCellSpacing:k,highlightToday:_,withWeekNumbers:C,headerControlsOrder:U,fullWidth:ee,attributes:se},ne)});return y.jsx(kl,{classNames:N,styles:D,__staticSelector:G||"MonthLevelGroup",size:I,fullWidth:ee,attributes:se,...ye,children:le})});h0.classes={...kl.classes,...f0.classes};h0.displayName="@mantine/dates/MonthLevelGroup";var QF={input:"m_6fa5e2aa"};const Yc=Re(e=>{const{inputProps:n,wrapperProps:t,placeholder:i,classNames:r,styles:a,unstyled:o,popoverProps:l,modalProps:f,dropdownType:c,children:h,formattedValue:d,dropdownHandlers:p,dropdownOpened:v,onClick:b,clearable:w,clearSectionMode:k,onClear:_,clearButtonProps:C,rightSection:S,shouldClear:E,readOnly:j,disabled:O,value:M,name:$,form:q,type:P,onDropdownClose:z,withTime:B,...V}=oI("PickerInputBase",{size:"sm"},e),U=y.jsx(Vt.ClearButton,{onClick:_,unstyled:o,...C}),N=()=>{P==="range"&&Array.isArray(M)&&M[0]&&!M[1]&&_(),p.close()};return y.jsxs(y.Fragment,{children:[c==="modal"&&!j&&y.jsx(Sr,{opened:v,onClose:N,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:o,...f,children:h}),y.jsx(Vt.Wrapper,{...t,children:y.jsxs(Tn,{position:"bottom-start",opened:v,trapFocus:!0,returnFocus:!1,unstyled:o,onClose:z,...l,disabled:(l==null?void 0:l.disabled)||c==="modal"||j,onChange:D=>{var L;D||((L=l==null?void 0:l.onClose)==null||L.call(l),N())},children:[y.jsx(Tn.Target,{children:y.jsx(Vt,{"data-dates-input":!0,"data-read-only":j||void 0,disabled:O,component:"button",type:"button",multiline:!0,onClick:D=>{b==null||b(D),p.toggle()},__clearSection:U,__clearable:w&&E&&!j&&!O,__clearSectionMode:k,rightSection:S,...n,classNames:{...r,input:hn(QF.input,r==null?void 0:r.input)},...V,children:d||y.jsx(Vt.Placeholder,{error:n.error,unstyled:o,classNames:r,styles:a,__staticSelector:n.__staticSelector,children:i})})}),y.jsx(Tn.Dropdown,{"data-dates-dropdown":!0,children:h})]})}),y.jsx(RF,{value:M,name:$,form:q,type:P,withTime:B})]})});Yc.classes=QF;Yc.displayName="@mantine/dates/PickerInputBase";const uM=e=>e==="range"?[null,null]:e==="multiple"?[]:null,fM=(e,n)=>{const t=n?DF:Qi;return Array.isArray(e)?e.map(t):t(e)};function d9({type:e,value:n,defaultValue:t,onChange:i,withTime:r=!1}){const a=A.useRef(e),[o,l,f]=Mi({value:fM(n,r),defaultValue:fM(t,r),finalValue:uM(e),onChange:i});let c=o;return a.current!==e&&(a.current=e,n===void 0&&(c=t!==void 0?t:uM(e),l(c))),[c,l,f]}function Fk(e,n){return e?e==="month"?0:e==="year"?1:2:n||0}function Noe(e){return e===0?"month":e===1?"year":"decade"}function th(e,n,t){return Noe(Yo(Fk(e,0),Fk(n,0),Fk(t,2)))}const $oe={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},Kc=Re(e=>{const n=be("Calendar",$oe,e),{vars:t,maxLevel:i,minLevel:r,defaultLevel:a,level:o,onLevelChange:l,date:f,defaultDate:c,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:b,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:C,onMonthMouseEnter:S,headerControlsOrder:E,__updateDateOnYearSelect:j,__updateDateOnMonthSelect:O,__setDateRef:M,__setLevelRef:$,firstDayOfWeek:q,weekdayFormat:P,weekendDays:z,getDayProps:B,excludeDate:V,renderDay:U,hideOutsideDates:N,hideWeekdays:D,getDayAriaLabel:L,monthLabelFormat:H,nextIcon:Y,previousIcon:R,__onDayClick:G,__onDayMouseEnter:W,withCellSpacing:I,highlightToday:X,withWeekNumbers:ee,monthsListFormat:re,getMonthControlProps:se,yearLabelFormat:ye,yearsListFormat:ae,getYearControlProps:le,decadeLabelFormat:_e,classNames:ne,styles:ze,unstyled:we,minDate:Ce,maxDate:Ne,locale:ge,__staticSelector:xe,size:Pe,__preventFocus:ue,__stopPropagation:Be,onNextDecade:Ge,onPreviousDecade:We,onNextYear:Ze,onPreviousYear:Qe,onNextMonth:ie,onPreviousMonth:me,static:Ye,enableKeyboardNavigation:Je,fullWidth:Se,attributes:tn,ref:dn,...On}=n,{resolvedClassNames:pn,resolvedStyles:an}=Hi({classNames:ne,styles:ze,props:n}),[en,Nn]=Mi({value:o?th(o,r,i):void 0,defaultValue:a?th(a,r,i):void 0,finalValue:th(void 0,r,i),onChange:l}),[De,Fe]=d9({type:"default",value:Qi(f),defaultValue:Qi(c),onChange:h});A.useImperativeHandle(M,()=>nn=>{Fe(nn)}),A.useImperativeHandle($,()=>nn=>{Nn(nn)});const En={__staticSelector:xe||"Calendar",styles:an,classNames:pn,unstyled:we,size:Pe,attributes:tn},bn=p||d||1,yn=A.useRef(null);if(yn.current===null){const nn=new Date;yn.current=Ce&&Ie(nn).isAfter(Ce)?Ce:Ie(nn).format("YYYY-MM-DD")}const wn=De||yn.current,it=()=>{const nn=Ie(wn).add(bn,"month").format("YYYY-MM-DD");ie==null||ie(nn),Fe(nn)},_t=()=>{const nn=Ie(wn).subtract(bn,"month").format("YYYY-MM-DD");me==null||me(nn),Fe(nn)},Le=()=>{const nn=Ie(wn).add(bn,"year").format("YYYY-MM-DD");Ze==null||Ze(nn),Fe(nn)},He=()=>{const nn=Ie(wn).subtract(bn,"year").format("YYYY-MM-DD");Qe==null||Qe(nn),Fe(nn)},zn=()=>{const nn=Ie(wn).add(10*bn,"year").format("YYYY-MM-DD");Ge==null||Ge(nn),Fe(nn)},st=()=>{const nn=Ie(wn).subtract(10*bn,"year").format("YYYY-MM-DD");We==null||We(nn),Fe(nn)},Dn=A.useRef(null);return A.useEffect(()=>{if(!Je||Ye)return;const nn=rn=>{var Vn;if(!((Vn=Dn.current)!=null&&Vn.contains(document.activeElement)))return;const on=rn.ctrlKey||rn.metaKey,Fn=rn.shiftKey;switch(rn.key){case"ArrowUp":on&&Fn?(rn.preventDefault(),st()):on&&(rn.preventDefault(),He());break;case"ArrowDown":on&&Fn?(rn.preventDefault(),zn()):on&&(rn.preventDefault(),Le());break;case"y":case"Y":en==="month"&&(rn.preventDefault(),Nn("year"));break}};return document.addEventListener("keydown",nn),()=>{document.removeEventListener("keydown",nn)}},[Je,Ye,en,Le,He,zn,st]),y.jsxs(de,{ref:Bt(Dn,dn),size:Pe,"data-calendar":!0,"data-full-width":Se||void 0,...On,children:[en==="month"&&y.jsx(h0,{month:wn,minDate:Ce,maxDate:Ne,firstDayOfWeek:q,weekdayFormat:P,weekendDays:z,getDayProps:B,excludeDate:V,renderDay:U,hideOutsideDates:N,hideWeekdays:D,getDayAriaLabel:L,onNext:it,onPrevious:_t,hasNextLevel:i!=="month",onLevelClick:()=>Nn("year"),numberOfColumns:d,locale:ge,levelControlAriaLabel:v==null?void 0:v.monthLevelControl,nextLabel:(v==null?void 0:v.nextMonth)??b,nextIcon:Y,previousLabel:(v==null?void 0:v.previousMonth)??w,previousIcon:R,monthLabelFormat:H,__onDayClick:G,__onDayMouseEnter:W,__preventFocus:ue,__stopPropagation:Be,static:Ye,withCellSpacing:I,highlightToday:X,withWeekNumbers:ee,headerControlsOrder:E,fullWidth:Se,...En}),en==="year"&&y.jsx(d0,{year:wn,numberOfColumns:d,minDate:Ce,maxDate:Ne,monthsListFormat:re,getMonthControlProps:se,locale:ge,onNext:Le,onPrevious:He,hasNextLevel:i!=="month"&&i!=="year",onLevelClick:()=>Nn("decade"),levelControlAriaLabel:v==null?void 0:v.yearLevelControl,nextLabel:(v==null?void 0:v.nextYear)??b,nextIcon:Y,previousLabel:(v==null?void 0:v.previousYear)??w,previousIcon:R,yearLabelFormat:ye,__onControlMouseEnter:S,__onControlClick:(nn,rn)=>{O&&Fe(rn),Nn(th("month",r,i)),_==null||_(rn)},__preventFocus:ue,__stopPropagation:Be,withCellSpacing:I,headerControlsOrder:E,fullWidth:Se,...En}),en==="decade"&&y.jsx(c0,{decade:wn,minDate:Ce,maxDate:Ne,yearsListFormat:ae,getYearControlProps:le,locale:ge,onNext:zn,onPrevious:st,numberOfColumns:d,nextLabel:(v==null?void 0:v.nextDecade)??b,nextIcon:Y,previousLabel:(v==null?void 0:v.previousDecade)??w,previousIcon:R,decadeLabelFormat:_e,__onControlMouseEnter:C,__onControlClick:(nn,rn)=>{j&&Fe(rn),Nn(th("year",r,i)),k==null||k(rn)},__preventFocus:ue,__stopPropagation:Be,withCellSpacing:I,headerControlsOrder:E,fullWidth:Se,...En})]})});Kc.classes={...c0.classes,...d0.classes,...h0.classes};Kc.displayName="@mantine/dates/Calendar";function m0(e){const{maxLevel:n,minLevel:t,defaultLevel:i,level:r,onLevelChange:a,nextIcon:o,previousIcon:l,date:f,defaultDate:c,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:b,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:C,onMonthMouseEnter:S,onNextMonth:E,onPreviousMonth:j,onNextYear:O,onPreviousYear:M,onNextDecade:$,onPreviousDecade:q,withCellSpacing:P,highlightToday:z,__updateDateOnYearSelect:B,__updateDateOnMonthSelect:V,__setDateRef:U,__setLevelRef:N,withWeekNumbers:D,headerControlsOrder:L,firstDayOfWeek:H,weekdayFormat:Y,weekendDays:R,getDayProps:G,excludeDate:W,renderDay:I,hideOutsideDates:X,hideWeekdays:ee,getDayAriaLabel:re,monthLabelFormat:se,monthsListFormat:ye,getMonthControlProps:ae,yearLabelFormat:le,yearsListFormat:_e,getYearControlProps:ne,decadeLabelFormat:ze,allowSingleDateInRange:we,allowDeselect:Ce,minDate:Ne,maxDate:ge,locale:xe,...Pe}=e;return{calendarProps:{maxLevel:n,minLevel:t,defaultLevel:i,level:r,onLevelChange:a,nextIcon:o,previousIcon:l,date:f,defaultDate:c,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:b,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:C,onMonthMouseEnter:S,onNextMonth:E,onPreviousMonth:j,onNextYear:O,onPreviousYear:M,onNextDecade:$,onPreviousDecade:q,withCellSpacing:P,highlightToday:z,__updateDateOnYearSelect:B,__updateDateOnMonthSelect:V,__setDateRef:U,withWeekNumbers:D,headerControlsOrder:L,firstDayOfWeek:H,weekdayFormat:Y,weekendDays:R,getDayProps:G,excludeDate:W,renderDay:I,hideOutsideDates:X,hideWeekdays:ee,getDayAriaLabel:re,monthLabelFormat:se,monthsListFormat:ye,getMonthControlProps:ae,yearLabelFormat:le,yearsListFormat:_e,getYearControlProps:ne,decadeLabelFormat:ze,allowSingleDateInRange:we,allowDeselect:Ce,minDate:Ne,maxDate:ge,locale:xe},others:Pe}}function cM(e,n){const t=[...n].sort((i,r)=>Ie(i).isAfter(Ie(r))?1:-1);return Ie(t[0]).startOf("day").subtract(1,"ms").isBefore(e)&&Ie(t[1]).endOf("day").add(1,"ms").isAfter(e)}function JF({type:e,level:n,value:t,defaultValue:i,onChange:r,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:l}){const[f,c]=d9({type:e,value:t,defaultValue:i,onChange:r}),[h,d]=A.useState(e==="range"&&f[0]&&!f[1]?f[0]:null),[p,v]=A.useState(null),b=j=>{if(e==="range"){if(h&&!f[1]){if(Ie(j).isSame(h,n)&&!a){d(null),v(null),c([null,null]);return}const O=[j,h];O.sort((M,$)=>Ie(M).isAfter(Ie($))?1:-1),c(O),v(null),d(null);return}if(f[0]&&!f[1]&&Ie(j).isSame(f[0],n)&&!a){d(null),v(null),c([null,null]);return}c([j,null]),v(null),d(j);return}if(e==="multiple"){f.some(O=>Ie(O).isSame(j,n))?c(f.filter(O=>!Ie(O).isSame(j,n))):c([...f,j]);return}f&&o&&Ie(j).isSame(f,n)?c(null):c(j)},w=j=>h&&p?cM(j,[p,h]):f[0]&&f[1]?cM(j,f):!1,k=e==="range"?j=>{l==null||l(j),v(null)}:l,_=j=>f[0]&&Ie(j).isSame(f[0],n)?!(p&&Ie(p).isBefore(f[0])):!1,C=j=>f[1]?Ie(j).isSame(f[1],n):!f[0]||!p?!1:Ie(p).isBefore(f[0])&&Ie(j).isSame(f[0],n),S=j=>{if(e==="range")return{selected:f.some(M=>M&&Ie(M).isSame(j,n)),inRange:w(j),firstInRange:_(j),lastInRange:C(j),"data-autofocus":!!f[0]&&Ie(f[0]).isSame(j,n)||void 0};if(e==="multiple")return{selected:f.some(M=>M&&Ie(M).isSame(j,n)),"data-autofocus":!!f[0]&&Ie(f[0]).isSame(j,n)||void 0};const O=Ie(f).isSame(j,n);return{selected:O,"data-autofocus":O||void 0}},E=e==="range"&&h?v:()=>{};return A.useEffect(()=>{if(e==="range")if(f[0]&&!f[1])d(f[0]);else{const j=f[0]==null&&f[1]==null,O=f[0]!=null&&f[1]!=null;(j||O)&&(d(null),v(null))}},[f]),{onDateChange:b,onRootMouseLeave:k,onHoveredDateChange:E,getControlProps:S,_value:f,setValue:c}}var eq={monthPickerRoot:"m_53c9e871",presetsList:"m_cccb8ff3",presetButton:"m_7b4fbf50"};const nq=(e,{size:n})=>({monthPickerRoot:{"--preset-font-size":ri(n)}}),zoe={type:"default"},fp=Re(e=>{const n=be("MonthPicker",zoe,e),{classNames:t,styles:i,vars:r,type:a,defaultValue:o,value:l,onChange:f,__staticSelector:c,getMonthControlProps:h,allowSingleDateInRange:d,allowDeselect:p,onMouseLeave:v,onMonthSelect:b,__updateDateOnMonthSelect:w,__onPresetSelect:k,__stopPropagation:_,presets:C,className:S,style:E,unstyled:j,size:O,attributes:M,onLevelChange:$,...q}=n,{calendarProps:P,others:z}=m0(q),B=A.useRef(null),V=A.useRef(null),U=Xe({name:c||"MonthPicker",classes:eq,props:n,className:S,style:E,classNames:t,styles:i,unstyled:j,attributes:M,rootSelector:C?"monthPickerRoot":void 0,varsResolver:nq,vars:r}),{onDateChange:N,onRootMouseLeave:D,onHoveredDateChange:L,getControlProps:H,setValue:Y}=JF({type:a,level:"month",allowDeselect:p,allowSingleDateInRange:d,value:l,defaultValue:o,onChange:f,onMouseLeave:v}),{resolvedClassNames:R,resolvedStyles:G}=Hi({classNames:t,styles:i,props:n}),W=y.jsx(Kc,{classNames:R,styles:G,size:O,...P,...C?{}:z,minLevel:"year",__updateDateOnMonthSelect:w??!1,__staticSelector:c||"MonthPicker",onMouseLeave:D,onMonthMouseEnter:(ee,re)=>L(re),onMonthSelect:ee=>{N(ee),b==null||b(ee)},getMonthControlProps:ee=>({...H(ee),...h==null?void 0:h(ee)}),onLevelChange:$,__setDateRef:B,__setLevelRef:V,__stopPropagation:_,attributes:M,...C?{}:{className:S,style:E}});if(!C)return W;const I=ee=>{var se,ye;const re=Array.isArray(ee)?ee[0]:ee;re!==void 0&&((se=B.current)==null||se.call(B,re),(ye=V.current)==null||ye.call(V,"year"),k?k(re):Y(ee))},X=C.map((ee,re)=>y.jsx(Dt,{...U("presetButton"),onClick:()=>I(ee.value),onMouseDown:se=>se.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:ee.label},re));return y.jsxs(de,{...U("monthPickerRoot"),size:O,...z,children:[y.jsx("div",{...U("presetsList"),children:X}),W]})});fp.classes={...Kc.classes,...eq};fp.varsResolver=nq;fp.displayName="@mantine/dates/MonthPicker";var Loe={datePickerRoot:"m_765a40cf",presetsList:"m_d6a681e1",presetButton:"m_acd30b22"};const tq=(e,{size:n})=>({datePickerRoot:{"--preset-font-size":ri(n)}}),Ioe={type:"default",defaultLevel:"month",numberOfColumns:1,size:"sm"},cp=Re(e=>{const n=be("DatePicker",Ioe,e),{allowDeselect:t,allowSingleDateInRange:i,value:r,defaultValue:a,onChange:o,onMouseLeave:l,classNames:f,styles:c,__staticSelector:h,__onDayClick:d,__onDayMouseEnter:p,__onPresetSelect:v,__stopPropagation:b,presets:w,className:k,style:_,unstyled:C,size:S,vars:E,attributes:j,...O}=n,{calendarProps:M,others:$}=m0(O),q=A.useRef(null),P=A.useRef(null),z=Xe({name:h||"DatePicker",classes:Loe,props:n,className:k,style:_,classNames:f,styles:c,unstyled:C,attributes:j,rootSelector:w?"datePickerRoot":void 0,varsResolver:tq,vars:E}),{onDateChange:B,onRootMouseLeave:V,onHoveredDateChange:U,getControlProps:N,_value:D,setValue:L}=JF({type:$.type,level:"day",allowDeselect:t,allowSingleDateInRange:i,value:r,defaultValue:a,onChange:o,onMouseLeave:l}),{resolvedClassNames:H,resolvedStyles:Y}=Hi({classNames:f,styles:c,props:n}),R=y.jsx(Kc,{classNames:H,styles:Y,__staticSelector:h||"DatePicker",onMouseLeave:V,size:S,...M,...w?{}:$,__stopPropagation:b,__setDateRef:q,__setLevelRef:P,minLevel:M.minLevel||"month",__onDayMouseEnter:(I,X)=>{U(X),p==null||p(I,X)},__onDayClick:(I,X)=>{B(X),d==null||d(I,X)},getDayProps:I=>{var X;return{...N(I),...(X=M.getDayProps)==null?void 0:X.call(M,I)}},getMonthControlProps:I=>{var X;return{selected:typeof D=="string"?c9(I,D):!1,...(X=M.getMonthControlProps)==null?void 0:X.call(M,I)}},getYearControlProps:I=>{var X;return{selected:typeof D=="string"?Ie(I).isSame(D,"year"):!1,...(X=M.getYearControlProps)==null?void 0:X.call(M,I)}},hideOutsideDates:M.hideOutsideDates??M.numberOfColumns!==1,attributes:j,...w?{}:{className:k,style:_}});if(!w)return R;const G=I=>{var ee,re;const X=Array.isArray(I)?I[0]:I;X!==void 0&&((ee=q.current)==null||ee.call(q,X),(re=P.current)==null||re.call(P,"month"),v?v(X):L(I))},W=w.map((I,X)=>y.jsx(Dt,{...z("presetButton"),onClick:()=>G(I.value),onMouseDown:ee=>ee.preventDefault(),"data-mantine-stop-propagation":b||void 0,children:I.label},X));return y.jsxs(de,{...z("datePickerRoot"),size:S,...$,children:[y.jsx("div",{...z("presetsList"),children:W}),R]})});cp.classes=Kc.classes;cp.varsResolver=tq;cp.displayName="@mantine/dates/DatePicker";function iq({type:e,value:n,defaultValue:t,onChange:i,locale:r,format:a,closeOnChange:o,sortDates:l,labelSeparator:f,valueFormatter:c}){const h=wl(),[d,p]=_z(!1),[v,b]=d9({type:e,value:n,defaultValue:t,onChange:i}),w=roe({type:e,date:v,locale:h.getLocale(r),format:a,labelSeparator:h.getLabelSeparator(f),formatter:c}),k=C=>{o&&(e==="default"&&p.close(),e==="range"&&C[0]&&C[1]&&p.close()),b(l&&e==="multiple"?[...C].sort((S,E)=>Ie(S).isAfter(Ie(E))?1:-1):C)};return{_value:v,setValue:k,onClear:()=>k(e==="range"?[null,null]:e==="multiple"?[]:null),shouldClear:e==="range"?!!v[0]:e==="multiple"?v.length>0:v!==null,formattedValue:w,dropdownOpened:d,dropdownHandlers:p}}const Boe={type:"default",size:"sm",valueFormat:"MMMM YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},h9=Re(e=>{const n=be("MonthPickerInput",Boe,e),{type:t,value:i,defaultValue:r,onChange:a,valueFormat:o,labelSeparator:l,locale:f,classNames:c,styles:h,unstyled:d,closeOnChange:p,size:v,variant:b,dropdownType:w,sortDates:k,minDate:_,maxDate:C,vars:S,valueFormatter:E,presets:j,attributes:O,...M}=n,{resolvedClassNames:$,resolvedStyles:q}=Hi({classNames:c,styles:h,props:n}),{calendarProps:P,others:z}=m0(M),{_value:B,setValue:V,formattedValue:U,dropdownHandlers:N,dropdownOpened:D,onClear:L,shouldClear:H}=iq({type:t,value:i,defaultValue:r,onChange:a,locale:f,format:o,labelSeparator:l,closeOnChange:p,sortDates:k,valueFormatter:E});return y.jsx(Yc,{formattedValue:U,dropdownOpened:D,dropdownHandlers:N,classNames:$,styles:q,unstyled:d,onClear:L,shouldClear:H,value:B,size:v,variant:b,dropdownType:w,...z,attributes:O,type:t,__staticSelector:"MonthPickerInput",children:y.jsx(fp,{...P,size:v,variant:b,type:t,value:B,defaultDate:P.defaultDate||(Array.isArray(B)?B[0]||IS({maxDate:C,minDate:_}):B||IS({maxDate:C,minDate:_})),onChange:V,locale:f,classNames:$,styles:q,unstyled:d,__staticSelector:"MonthPickerInput",__stopPropagation:w==="popover",minDate:_,maxDate:C,presets:j,attributes:O})})});h9.classes={...Yc.classes,...fp.classes};h9.displayName="@mantine/dates/MonthPickerInput";const Foe={type:"default",size:"sm",valueFormat:"MMMM D, YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},xu=Re(e=>{const n=be("DatePickerInput",Foe,e),{type:t,value:i,defaultValue:r,onChange:a,valueFormat:o,labelSeparator:l,locale:f,classNames:c,styles:h,unstyled:d,closeOnChange:p,size:v,variant:b,dropdownType:w,sortDates:k,minDate:_,maxDate:C,vars:S,defaultDate:E,valueFormatter:j,presets:O,attributes:M,...$}=n,{resolvedClassNames:q,resolvedStyles:P}=Hi({classNames:c,styles:h,props:n}),{calendarProps:z,others:B}=m0($),{_value:V,setValue:U,formattedValue:N,dropdownHandlers:D,dropdownOpened:L,onClear:H,shouldClear:Y}=iq({type:t,value:i,defaultValue:r,onChange:a,locale:f,format:o,labelSeparator:l,closeOnChange:p,sortDates:k,valueFormatter:j}),R=Array.isArray(V)?V[0]||E:V||E;return y.jsx(Yc,{formattedValue:N,dropdownOpened:L,dropdownHandlers:D,classNames:q,styles:P,unstyled:d,onClear:H,shouldClear:Y,value:V,size:v,variant:b,dropdownType:w,...B,type:t,__staticSelector:"DatePickerInput",attributes:M,children:y.jsx(cp,{...z,size:v,variant:b,type:t,value:V,defaultDate:R||IS({maxDate:C,minDate:_}),onChange:U,locale:f,classNames:q,styles:P,unstyled:d,__staticSelector:"DatePickerInput",__stopPropagation:w==="popover",minDate:_,maxDate:C,presets:O,attributes:M})})});xu.classes={...Yc.classes,...cp.classes};xu.displayName="@mantine/dates/DatePickerInput";/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */var qoe={outline:{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"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const cn=(e,n,t,i)=>{const r=A.forwardRef(({color:a="currentColor",size:o=24,stroke:l=2,title:f,className:c,children:h,...d},p)=>A.createElement("svg",{ref:p,...qoe[e],width:o,height:o,className:["tabler-icon",`tabler-icon-${n}`,c].join(" "),strokeWidth:l,stroke:a,...d},[f&&A.createElement("title",{key:"svg-title"},f),...i.map(([v,b])=>A.createElement(v,b)),...Array.isArray(h)?h:[h]]));return r.displayName=`${t}`,r};/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Hoe=[["path",{d:"M12 9v4",key:"svg-0"}],["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],BS=cn("outline","alert-triangle","AlertTriangle",Hoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Uoe=[["path",{d:"M8 4h11a2 2 0 1 1 0 4h-7m-4 0h-3a2 2 0 0 1 -.826 -3.822",key:"svg-0"}],["path",{d:"M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 1.824 -1.18m.176 -3.82v-7",key:"svg-1"}],["path",{d:"M10 12h2",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]],Woe=cn("outline","archive-off","ArchiveOff",Uoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Voe=[["path",{d:"M3 6a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2",key:"svg-0"}],["path",{d:"M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-10",key:"svg-1"}],["path",{d:"M10 12l4 0",key:"svg-2"}]],rq=cn("outline","archive","Archive",Voe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Goe=[["path",{d:"M9 14l-4 -4l4 -4",key:"svg-0"}],["path",{d:"M5 10h11a4 4 0 1 1 0 8h-1",key:"svg-1"}]],Gg=cn("outline","arrow-back-up","ArrowBackUp",Goe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Yoe=[["path",{d:"M7 8l-4 4l4 4",key:"svg-0"}],["path",{d:"M17 8l4 4l-4 4",key:"svg-1"}],["path",{d:"M3 12l18 0",key:"svg-2"}]],Koe=cn("outline","arrows-horizontal","ArrowsHorizontal",Yoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Xoe=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}]],aq=cn("outline","calendar-due","CalendarDue",Xoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Zoe=[["path",{d:"M9 5h9a2 2 0 0 1 2 2v9m-.184 3.839a2 2 0 0 1 -1.816 1.161h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 1.158 -1.815",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v1",key:"svg-2"}],["path",{d:"M4 11h7m4 0h5",key:"svg-3"}],["path",{d:"M3 3l18 18",key:"svg-4"}]],Qoe=cn("outline","calendar-off","CalendarOff",Zoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Joe=[["path",{d:"M11.795 21h-6.795a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v4",key:"svg-0"}],["path",{d:"M18 14v4h4",key:"svg-1"}],["path",{d:"M14 18a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-2"}],["path",{d:"M15 3v4",key:"svg-3"}],["path",{d:"M7 3v4",key:"svg-4"}],["path",{d:"M3 11h16",key:"svg-5"}]],ese=cn("outline","calendar-stats","CalendarStats",Joe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const nse=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 15h1",key:"svg-4"}],["path",{d:"M12 15v3",key:"svg-5"}]],tse=cn("outline","calendar","Calendar",nse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const ise=[["path",{d:"M3 13a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -6",key:"svg-0"}],["path",{d:"M15 9a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -10",key:"svg-1"}],["path",{d:"M9 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -14",key:"svg-2"}],["path",{d:"M4 20h14",key:"svg-3"}]],rse=cn("outline","chart-bar","ChartBar",ise);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const ase=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],tc=cn("outline","check","Check",ase);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const ose=[["path",{d:"M9 11l3 3l8 -8",key:"svg-0"}],["path",{d:"M20 12v6a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h9",key:"svg-1"}]],tm=cn("outline","checkbox","Checkbox",ose);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const sse=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],FS=cn("outline","chevron-down","ChevronDown",sse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const lse=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],qS=cn("outline","chevron-right","ChevronRight",lse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const use=[["path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2",key:"svg-0"}],["path",{d:"M9 5a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2",key:"svg-1"}],["path",{d:"M9 12l.01 0",key:"svg-2"}],["path",{d:"M13 12l2 0",key:"svg-3"}],["path",{d:"M9 16l.01 0",key:"svg-4"}],["path",{d:"M13 16l2 0",key:"svg-5"}]],dM=cn("outline","clipboard-list","ClipboardList",use);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const fse=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 12l3 2",key:"svg-1"}],["path",{d:"M12 7v5",key:"svg-2"}]],cse=cn("outline","clock-hour-4","ClockHour4",fse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const dse=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]],Yg=cn("outline","clock","Clock",dse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const hse=[["path",{d:"M3 4a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-16",key:"svg-0"}],["path",{d:"M9 3v18",key:"svg-1"}],["path",{d:"M15 3v18",key:"svg-2"}]],mse=cn("outline","columns-3","Columns3",hse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const pse=[["path",{d:"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]],vse=cn("outline","copy","Copy",pse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const gse=[["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14",key:"svg-0"}],["path",{d:"M8 8.5a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-1"}],["path",{d:"M15 8.5a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-2"}],["path",{d:"M15 15.5a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-3"}],["path",{d:"M8 15.5a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-4"}],["path",{d:"M11.5 12a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-5"}]],yse=cn("outline","dice-5","Dice5",gse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const bse=[["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M11 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],oq=cn("outline","dots-vertical","DotsVertical",bse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const wse=[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]],sq=cn("outline","download","Download",wse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const kse=[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]],_h=cn("outline","edit","Edit",kse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const _se=[["path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6",key:"svg-0"}],["path",{d:"M11 13l9 -9",key:"svg-1"}],["path",{d:"M15 4h5v5",key:"svg-2"}]],xse=cn("outline","external-link","ExternalLink",_se);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Sse=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2",key:"svg-1"}],["path",{d:"M8 11h8v7h-8l0 -7",key:"svg-2"}],["path",{d:"M8 15h8",key:"svg-3"}],["path",{d:"M11 11v7",key:"svg-4"}]],Cse=cn("outline","file-spreadsheet","FileSpreadsheet",Sse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Ase=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]],jse=cn("outline","file-text","FileText",Ase);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Ose=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4",key:"svg-1"}],["path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6",key:"svg-2"}],["path",{d:"M17 18h2",key:"svg-3"}],["path",{d:"M20 15h-3v6",key:"svg-4"}],["path",{d:"M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1",key:"svg-5"}]],Ese=cn("outline","file-type-pdf","FileTypePdf",Ose);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Tse=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2",key:"svg-1"}]],Mse=cn("outline","file","File",Tse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Dse=[["path",{d:"M8 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M8 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M8 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M14 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M14 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M14 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}]],lq=cn("outline","grip-vertical","GripVertical",Dse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Rse=[["path",{d:"M12 8l0 4l2 2",key:"svg-0"}],["path",{d:"M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5",key:"svg-1"}]],Pse=cn("outline","history","History",Rse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Nse=[["path",{d:"M6.5 7h11",key:"svg-0"}],["path",{d:"M6.5 17h11",key:"svg-1"}],["path",{d:"M6 20v-2a6 6 0 1 1 12 0v2a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1 -1",key:"svg-2"}],["path",{d:"M6 4v2a6 6 0 1 0 12 0v-2a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1",key:"svg-3"}]],Kg=cn("outline","hourglass","Hourglass",Nse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const $se=[["path",{d:"M4 4l6 0",key:"svg-0"}],["path",{d:"M14 4l6 0",key:"svg-1"}],["path",{d:"M4 10a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -8",key:"svg-2"}],["path",{d:"M14 10a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -2",key:"svg-3"}]],HS=cn("outline","layout-kanban","LayoutKanban",$se);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const zse=[["path",{d:"M9 15l6 -6",key:"svg-0"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-1"}],["path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463",key:"svg-2"}]],Lse=cn("outline","link","Link",zse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Ise=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2l0 -6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-5a4 4 0 0 1 8 0",key:"svg-2"}]],uq=cn("outline","lock-open","LockOpen",Ise);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Bse=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]],el=cn("outline","lock","Lock",Bse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Fse=[["path",{d:"M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M9 12h12l-3 -3",key:"svg-1"}],["path",{d:"M18 15l3 -3",key:"svg-2"}]],qse=cn("outline","logout","Logout",Fse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Hse=[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]],Use=cn("outline","menu-2","Menu2",Hse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Wse=[["path",{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12",key:"svg-0"}],["path",{d:"M9.5 9h.01",key:"svg-1"}],["path",{d:"M14.5 9h.01",key:"svg-2"}],["path",{d:"M9.5 13a3.5 3.5 0 0 0 5 0",key:"svg-3"}]],fq=cn("outline","message-chatbot","MessageChatbot",Wse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Vse=[["path",{d:"M8 9h8",key:"svg-0"}],["path",{d:"M8 13h6",key:"svg-1"}],["path",{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12",key:"svg-2"}]],Gse=cn("outline","message","Message",Vse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Yse=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 10l.01 0",key:"svg-1"}],["path",{d:"M15 10l.01 0",key:"svg-2"}],["path",{d:"M9.5 15a3.5 3.5 0 0 0 5 0",key:"svg-3"}]],Kse=cn("outline","mood-smile","MoodSmile",Yse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Xse=[["path",{d:"M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25",key:"svg-0"}],["path",{d:"M7.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M15.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}]],m9=cn("outline","palette","Palette",Xse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Zse=[["path",{d:"M15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3l6.5 -6.5a3 3 0 0 0 -6 -6l-6.5 6.5a4.5 4.5 0 0 0 9 9l6.5 -6.5",key:"svg-0"}]],cq=cn("outline","paperclip","Paperclip",Zse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Qse=[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]],Jse=cn("outline","pencil","Pencil",Qse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const ele=[["path",{d:"M15 8h.01",key:"svg-0"}],["path",{d:"M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12",key:"svg-1"}],["path",{d:"M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5",key:"svg-2"}],["path",{d:"M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3",key:"svg-3"}]],nle=cn("outline","photo","Photo",ele);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const tle=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],ic=cn("outline","plus","Plus",tle);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const ile=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],US=cn("outline","refresh","Refresh",ile);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const rle=[["path",{d:"M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]],ale=cn("outline","search","Search",rle);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const ole=[["path",{d:"M10 14l11 -11",key:"svg-0"}],["path",{d:"M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5",key:"svg-1"}]],dq=cn("outline","send","Send",ole);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const sle=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],lle=cn("outline","settings","Settings",sle);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const ule=[["path",{d:"M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6",key:"svg-0"}]],fle=cn("outline","sparkles","Sparkles",ule);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const cle=[["path",{d:"M6.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3",key:"svg-1"}]],dle=cn("outline","tag","Tag",cle);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const hle=[["path",{d:"M4 7h16",key:"svg-0"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-1"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-2"}],["path",{d:"M10 12l4 4m0 -4l-4 4",key:"svg-3"}]],mle=cn("outline","trash-x","TrashX",hle);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const ple=[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]],ml=cn("outline","trash","Trash",ple);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const vle=[["path",{d:"M3 17l6 -6l4 4l8 -8",key:"svg-0"}],["path",{d:"M14 7l7 0l0 7",key:"svg-1"}]],WS=cn("outline","trending-up","TrendingUp",vle);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const gle=[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 9l5 -5l5 5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]],yle=cn("outline","upload","Upload",gle);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const ble=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 10a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855",key:"svg-2"}]],wle=cn("outline","user-circle","UserCircle",ble);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const kle=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4c.348 0 .686 .045 1.009 .128",key:"svg-1"}],["path",{d:"M16 19h6",key:"svg-2"}]],_le=cn("outline","user-minus","UserMinus",kle);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const xle=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M16 19h6",key:"svg-1"}],["path",{d:"M19 16v6",key:"svg-2"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4",key:"svg-3"}]],Sle=cn("outline","user-plus","UserPlus",xle);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Cle=[["path",{d:"M9 10a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-0"}],["path",{d:"M6 21v-1a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v1",key:"svg-1"}],["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14",key:"svg-2"}]],Ale=cn("outline","user-square","UserSquare",Cle);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const jle=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]],Ole=cn("outline","user","User",jle);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Ele=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],xh=cn("outline","x","X",Ele);function Tle(e,n,t){const i=e.replace(/]/g,"");return t?`![${i}](${n})`:`[${i}](${n})`}function hq({initial:e,submitLabel:n="Guardar",users:t=[],requesterOptions:i=[],tagOptions:r=[],cardId:a,onFileUploaded:o,onSubmit:l,onCancel:f}){const[c,h]=A.useState((e==null?void 0:e.requester)??""),[d,p]=A.useState((e==null?void 0:e.title)??""),[v,b]=A.useState((e==null?void 0:e.description)??""),[w,k]=A.useState((e==null?void 0:e.assignee_id)??null),[_,C]=A.useState((e==null?void 0:e.tags)??[]),[S,E]=A.useState(!1),[j,O]=A.useState(!1),M=A.useRef(null),$=async N=>{N==null||N.preventDefault();const D=d.trim();D&&await l({requester:c.trim(),title:D,description:v,assignee_id:w,tags:_})},q=N=>{N.key==="Enter"&&(N.ctrlKey||N.metaKey)&&(N.preventDefault(),$())},P=N=>{const D=M.current;if(!D){b(I=>I?I+` +`+N:N);return}const L=D.selectionStart??v.length,H=D.selectionEnd??v.length,Y=v.slice(0,L),R=v.slice(H),G=Y&&!Y.endsWith(` +`)?` +`:"",W=Y+G+N+R;b(W),queueMicrotask(()=>{D.focus();const I=(Y+G+N).length;D.setSelectionRange(I,I)})},z=async N=>{if(!a){jn.show({color:"yellow",message:"Guarda la tarjeta antes de subir archivos."});return}O(!0);try{for(const D of Array.from(N))try{const L=await JC(a,D,"description");P(Tle(L.filename,L.url,L.mime.startsWith("image/"))),o==null||o()}catch(L){jn.show({color:"red",message:`${D.name}: ${L.message}`})}}finally{O(!1)}},B=N=>{N.preventDefault(),E(!1),!(!N.dataTransfer.files||N.dataTransfer.files.length===0)&&z(N.dataTransfer.files)},V=N=>{a&&N.dataTransfer.types.includes("Files")&&(N.preventDefault(),E(!0))},U=N=>{N.preventDefault(),E(!1)};return y.jsx("form",{onSubmit:$,children:y.jsxs(Pn,{gap:"sm",children:[y.jsx(ku,{label:"Tarea",value:d,onChange:N=>p(N.currentTarget.value),tabIndex:1,required:!0,autoComplete:"off","data-autofocus":!0,autosize:!0,minRows:1,maxRows:4,onKeyDown:N=>{N.key==="Enter"&&!N.shiftKey&&(N.preventDefault(),$())}}),y.jsx(jy,{label:"Solicitante",value:c,onChange:h,data:i,tabIndex:2,autoComplete:"off","data-field":"requester",placeholder:"Empieza a escribir y elige uno existente",limit:10,onKeyDown:N=>{N.key==="Enter"&&N.preventDefault()}}),y.jsxs(de,{onDrop:B,onDragOver:V,onDragLeave:U,style:{position:"relative",outline:S?"2px dashed var(--mantine-color-blue-5)":void 0,outlineOffset:S?2:void 0,borderRadius:4},children:[y.jsx(ku,{ref:M,label:"Descripcion",value:v,onChange:N=>b(N.currentTarget.value),tabIndex:3,autosize:!0,minRows:3,maxRows:8,onKeyDown:q,description:a?"Ctrl+Enter para guardar. Arrastra archivos para adjuntar.":"Ctrl+Enter para guardar"}),(S||j)&&y.jsx(de,{style:{position:"absolute",inset:0,background:"rgba(34,139,230,0.08)",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",borderRadius:4},children:y.jsx(je,{size:"sm",fw:500,c:"blue",children:j?"Subiendo...":"Suelta para adjuntar"})})]}),y.jsx(ya,{label:"Asignar a",placeholder:"Sin asignar",value:w,onChange:N=>k(N),data:t.map(N=>({value:N.id,label:N.display_name||N.username})),clearable:!0,searchable:!0,tabIndex:4}),y.jsx(GC,{label:"Tags",value:_,onChange:C,data:r,clearable:!0,tabIndex:5,placeholder:"Enter para añadir; sugiere existentes",splitChars:[","," "]}),y.jsxs(qe,{justify:"flex-end",gap:"xs",mt:"xs",children:[y.jsx(gt,{variant:"subtle",color:"gray",tabIndex:7,type:"button",onClick:f,children:"Cancelar"}),y.jsx(gt,{tabIndex:6,type:"submit",disabled:!d.trim(),children:n})]})]})})}function Mle(e,n){if(n.length===0)throw new Error("palette must not be empty");let t=0;for(let i=0;i>>0;return n[t%n.length]}const p9=new Set(["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo","gray","dark"]);function v9(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)}function mq(e){return e?v9(e)?`color-mix(in srgb, ${e} 18%, var(--mantine-color-dark-6))`:p9.has(e)?`color-mix(in srgb, var(--mantine-color-${e}-9) 18%, var(--mantine-color-dark-6))`:"var(--mantine-color-dark-6)":"var(--mantine-color-dark-6)"}function g9(e){return e?v9(e)?`color-mix(in srgb, ${e} 30%, var(--mantine-color-dark-4))`:p9.has(e)?`color-mix(in srgb, var(--mantine-color-${e}-7) 30%, var(--mantine-color-dark-4))`:"var(--mantine-color-dark-4)":"var(--mantine-color-dark-4)"}function Dle(e){return e?v9(e)?e:p9.has(e)?`var(--mantine-color-${e}-7)`:"var(--mantine-color-dark-3)":"var(--mantine-color-dark-3)"}const pq=[{value:"",label:"Default"},{value:"blue",label:"Azul"},{value:"cyan",label:"Cian"},{value:"teal",label:"Teal"},{value:"green",label:"Verde"},{value:"lime",label:"Lima"},{value:"yellow",label:"Amarillo"},{value:"orange",label:"Naranja"},{value:"red",label:"Rojo"},{value:"pink",label:"Rosa"},{value:"grape",label:"Uva"},{value:"violet",label:"Violeta"},{value:"indigo",label:"Indigo"},{value:"gray",label:"Gris"},{value:"#0ea5e9",label:"Sky"},{value:"#14b8a6",label:"Esmeralda"},{value:"#84cc16",label:"Lima fluor"},{value:"#ec4899",label:"Magenta"},{value:"#a855f7",label:"Lavanda"},{value:"#f97316",label:"Mandarina"},{value:"#dc2626",label:"Rubi"},{value:"#0891b2",label:"Petroleo"},{value:"#fde047",label:"Limon"},{value:"#10b981",label:"Menta"},{value:"#fb7185",label:"Coral"},{value:"#6366f1",label:"Iris"},{value:"#94a3b8",label:"Pizarra"}],Rle=pq,Ple=["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo"];function rc(e){return Mle(e,Ple)}const VS=6e4,Sh=60*VS,If=24*Sh,Vv=7*If,qk=30*If;function Qt(e){if(!Number.isFinite(e)||e<0)return"0m";if(et&&n.push({kind:"text",value:e.slice(t,i.index)}),i[1]){const r=Nle(i[3]);r?n.push({kind:"img",alt:i[2]||"",url:r}):n.push({kind:"text",value:i[0]})}else if(i[4]){const r=vq(i[6]);r?n.push({kind:"link",label:i[5],url:r}):n.push({kind:"text",value:i[0]})}t=Hk.lastIndex}return t{i.length!==0&&(r.push(y.jsx(je,{size:n,style:{whiteSpace:"pre-wrap",wordBreak:"break-word"},children:i.map((l,f)=>y.jsx(A.Fragment,{children:l},f))},`t-${a++}`)),i.length=0)};for(const l of t)l.kind==="img"?(o(),r.push(y.jsx(fl,{href:l.url,target:"_blank",rel:"noopener noreferrer",children:y.jsx(ep,{src:l.url,alt:l.alt,maw:220,mah:220,fit:"contain",radius:"sm"})},`i-${a++}`))):l.kind==="link"?i.push(y.jsx(fl,{href:l.url,target:"_blank",rel:"noopener noreferrer",children:l.label},`l-${a++}`)):i.push(l.value);return o(),y.jsx(y.Fragment,{children:r})}function Lle(e,n,t){const i=e.replace(/]/g,"");return t.startsWith("image/")?`![${i}](${n})`:`[${i}](${n})`}function Ile({cardId:e,users:n,currentUserId:t,onMessagesChange:i,onFileUploaded:r}){const[a,o]=A.useState([]),[l,f]=A.useState(!0),[c,h]=A.useState(""),[d,p]=A.useState(!1),[v,b]=A.useState(!1),[w,k]=A.useState(!1),_=A.useRef(null),C=new Map(n.map(z=>[z.id,z])),S=A.useCallback(async()=>{try{const z=await Yie(e);o(z),i==null||i(z)}catch(z){jn.show({color:"red",message:z.message})}finally{f(!1)}},[e,i]);A.useEffect(()=>{S()},[S]),A.useEffect(()=>{_.current&&_.current.scrollTo({top:_.current.scrollHeight,behavior:"smooth"})},[a.length]);const E=async()=>{const z=c.trim();if(!(!z||d)){p(!0);try{const B=await UT(e,z),V=[...a,B];o(V),i==null||i(V),h("")}catch(B){jn.show({color:"red",message:B.message})}finally{p(!1)}}},j=async z=>{try{await Kie(e,z);const B=a.filter(V=>V.id!==z);o(B),i==null||i(B)}catch(B){jn.show({color:"red",message:B.message})}},O=z=>{z.key==="Enter"&&!z.shiftKey&&(z.preventDefault(),E())},M=async z=>{b(!0);try{for(const B of Array.from(z))try{const V=await JC(e,B,"chat"),U=Lle(V.filename,V.url,V.mime),N=await UT(e,U);o(D=>{const L=[...D,N];return i==null||i(L),L}),r==null||r()}catch(V){jn.show({color:"red",message:`${B.name}: ${V.message}`})}}finally{b(!1)}},$=z=>{z.preventDefault(),k(!1),!(!z.dataTransfer.files||z.dataTransfer.files.length===0)&&M(z.dataTransfer.files)},q=z=>{z.dataTransfer.types.includes("Files")&&(z.preventDefault(),k(!0))},P=z=>{z.preventDefault(),k(!1)};return y.jsxs(Pn,{gap:"xs",style:{height:"100%",minHeight:0,position:"relative",outline:w?"2px dashed var(--mantine-color-blue-5)":void 0,outlineOffset:w?-2:void 0,borderRadius:4},onDrop:$,onDragOver:q,onDragLeave:P,children:[y.jsx(xa,{viewportRef:_,style:{flex:1,minHeight:200},type:"auto",offsetScrollbars:!0,children:l?y.jsx(qe,{justify:"center",p:"md",children:y.jsx(gi,{size:"sm"})}):a.length===0?y.jsx(je,{size:"sm",c:"dimmed",ta:"center",p:"md",children:"Sin mensajes aun. Escribe el primero o arrastra un archivo."}):y.jsx(Pn,{gap:6,p:4,children:a.map(z=>{const B=z.author_id?C.get(z.author_id):null,V=z.author_id&&z.author_id===t,U=B?B.display_name||B.username:"Anonimo";return y.jsx(Et,{withBorder:!0,p:"xs",radius:"sm",bg:V?"var(--mantine-color-blue-light)":void 0,children:y.jsxs(qe,{gap:6,wrap:"nowrap",align:"flex-start",children:[y.jsx(rs,{size:22,radius:"xl",color:(B==null?void 0:B.color)||rc(U),children:U.slice(0,2).toUpperCase()}),y.jsxs(de,{style:{flex:1,minWidth:0},children:[y.jsxs(qe,{gap:6,wrap:"nowrap",justify:"space-between",children:[y.jsxs(qe,{gap:6,wrap:"nowrap",children:[y.jsx(je,{size:"xs",fw:600,children:U}),y.jsx(je,{size:"xs",c:"dimmed",children:GS(z.created_at)})]}),V&&y.jsx(Gt,{label:"Borrar",withArrow:!0,children:y.jsx(ht,{size:"xs",variant:"subtle",color:"red",onClick:()=>j(z.id),children:y.jsx(ml,{size:12})})})]}),y.jsx(Pn,{gap:4,children:y.jsx(zle,{text:z.body})})]})]})},z.id)})})}),y.jsxs(qe,{gap:"xs",align:"flex-end",children:[y.jsx(ku,{value:c,onChange:z=>h(z.currentTarget.value),onKeyDown:O,placeholder:"Escribe un mensaje. Arrastra archivos o usa el clip.",autosize:!0,minRows:1,maxRows:6,style:{flex:1},disabled:d}),y.jsx(TC,{onChange:z=>z&&M([z]),disabled:v,children:z=>y.jsx(Gt,{label:"Adjuntar archivo",withArrow:!0,children:y.jsx(ht,{size:"lg",variant:"subtle",color:"gray","aria-label":"Adjuntar",loading:v,...z,children:y.jsx(cq,{size:16})})})}),y.jsx(Gt,{label:"Enviar",withArrow:!0,children:y.jsx(ht,{size:"lg",variant:"filled",color:"blue",onClick:E,disabled:!c.trim()||d,"aria-label":"Enviar",children:y.jsx(dq,{size:16})})})]}),(w||v)&&y.jsx(de,{style:{position:"absolute",inset:0,background:"rgba(34,139,230,0.08)",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",borderRadius:4},children:y.jsx(je,{size:"sm",fw:500,c:"blue",children:v?"Subiendo...":"Suelta para adjuntar"})})]})}function Ble(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(2)} MB`}function Fle(e){return e.startsWith("image/")}function qle(e,n=18){const t=e.toLowerCase();return t.startsWith("image/")?y.jsx(nle,{size:n}):t==="application/pdf"?y.jsx(Ese,{size:n}):t.includes("spreadsheet")||t.includes("excel")||t==="text/csv"||t==="application/vnd.ms-excel"?y.jsx(Cse,{size:n}):t.startsWith("text/")?y.jsx(jse,{size:n}):y.jsx(Mse,{size:n})}function Hle(e){return e==="description"?{color:"blue",label:"descripcion"}:e==="chat"?{color:"teal",label:"chat"}:{color:"gray",label:"subido"}}function Ule({cardId:e,refreshKey:n}){const[t,i]=A.useState([]),[r,a]=A.useState(!0),[o,l]=A.useState(!1),f=A.useCallback(async()=>{try{const d=await ire(e);i(d)}catch(d){jn.show({color:"red",message:d.message})}finally{a(!1)}},[e]);A.useEffect(()=>{f()},[f,n]);const c=async d=>{if(d){l(!0);try{const p=await JC(e,d,"upload");i(v=>[...v,p])}catch(p){jn.show({color:"red",message:p.message})}finally{l(!1)}}},h=async d=>{if(window.confirm("¿Borrar este archivo?"))try{await rre(d),i(p=>p.filter(v=>v.id!==d))}catch(p){jn.show({color:"red",message:p.message})}};return y.jsxs(Pn,{gap:"xs",p:4,children:[y.jsxs(qe,{justify:"space-between",children:[y.jsxs(je,{size:"xs",c:"dimmed",children:[t.length," archivo",t.length===1?"":"s"]}),y.jsx(TC,{onChange:c,disabled:o,children:d=>y.jsx(gt,{size:"xs",variant:"light",leftSection:y.jsx(yle,{size:14}),loading:o,...d,children:"Subir"})})]}),r?y.jsx(qe,{justify:"center",p:"md",children:y.jsx(gi,{size:"sm"})}):t.length===0?y.jsxs(Pn,{gap:"xs",p:"md",align:"center",justify:"center",style:{minHeight:160},children:[y.jsx(je,{size:"sm",c:"dimmed",children:"Sin archivos"}),y.jsx(je,{size:"xs",c:"dimmed",ta:"center",children:"Sube archivos con el boton, arrastra al chat o a la descripcion."})]}):y.jsx(Pn,{gap:6,children:t.map(d=>{const p=Hle(d.source);return y.jsx(Et,{withBorder:!0,p:"xs",radius:"sm",children:y.jsxs(qe,{gap:"xs",wrap:"nowrap",align:"flex-start",children:[Fle(d.mime)?y.jsx(fl,{href:d.url,target:"_blank",rel:"noopener noreferrer",children:y.jsx(ep,{src:d.url,alt:d.filename,w:64,h:64,fit:"cover",radius:"sm"})}):y.jsx(de,{style:{width:64,height:64,display:"flex",alignItems:"center",justifyContent:"center",background:"var(--mantine-color-gray-1)",borderRadius:4},children:qle(d.mime,28)}),y.jsxs(de,{style:{flex:1,minWidth:0},children:[y.jsx(fl,{href:d.url,target:"_blank",rel:"noopener noreferrer",size:"sm",style:{wordBreak:"break-all"},children:d.filename}),y.jsxs(qe,{gap:6,mt:4,children:[y.jsx(lt,{size:"xs",variant:"light",color:p.color,children:p.label}),y.jsx(je,{size:"xs",c:"dimmed",children:Ble(d.size)}),y.jsx(je,{size:"xs",c:"dimmed",children:d.mime||"?"})]})]}),y.jsxs(qe,{gap:4,wrap:"nowrap",children:[y.jsx(Gt,{label:"Descargar",withArrow:!0,children:y.jsx(ht,{component:"a",href:d.url,download:d.filename,variant:"subtle",size:"sm","aria-label":"Descargar",children:y.jsx(sq,{size:14})})}),y.jsx(Gt,{label:"Borrar",withArrow:!0,children:y.jsx(ht,{variant:"subtle",color:"red",size:"sm",onClick:()=>h(d.id),"aria-label":"Borrar",children:y.jsx(ml,{size:14})})})]})]})},d.id)})})]})}const hM=/(https?:\/\/[^\s<>()"']+)/gi;function Uk(e,n){if(!n)return[];const t=[],i=new Set;let r;for(hM.lastIndex=0;(r=hM.exec(n))!==null;){let a=r[1];a=a.replace(/[.,;:!?)\]}>]+$/,""),!i.has(a)&&(i.add(a),t.push({url:a,source:e,context:n}))}return t}function Wle(e){try{return new URL(e).hostname}catch{return e}}function Vle({card:e,messages:n}){const t=A.useMemo(()=>{const a=[...Uk("title",e.title),...Uk("description",e.description),...n.flatMap(l=>Uk("chat",l.body))],o=new Set;return a.filter(l=>o.has(l.url)?!1:(o.add(l.url),!0))},[e.title,e.description,n]);if(t.length===0)return y.jsxs(Pn,{gap:"xs",p:"md",align:"center",justify:"center",style:{minHeight:200},children:[y.jsx(je,{size:"sm",c:"dimmed",children:"Sin enlaces detectados"}),y.jsx(je,{size:"xs",c:"dimmed",ta:"center",children:"Pega URLs en el titulo, descripcion o chat y apareceran aqui."})]});const i=a=>a==="title"?"grape":a==="description"?"blue":"teal",r=a=>a==="title"?"titulo":a==="description"?"descripcion":"chat";return y.jsx(Pn,{gap:6,p:4,children:t.map(a=>y.jsx(Et,{withBorder:!0,p:"xs",radius:"sm",children:y.jsxs(qe,{gap:"xs",wrap:"nowrap",justify:"space-between",align:"flex-start",children:[y.jsxs(de,{style:{flex:1,minWidth:0},children:[y.jsx(fl,{href:a.url,target:"_blank",rel:"noopener noreferrer",size:"sm",style:{wordBreak:"break-all"},children:y.jsxs(qe,{gap:4,wrap:"nowrap",align:"center",children:[y.jsx(xse,{size:12}),y.jsx("span",{children:Wle(a.url)})]})}),y.jsx(je,{size:"xs",c:"dimmed",style:{wordBreak:"break-all"},children:a.url})]}),y.jsx(lt,{size:"xs",variant:"light",color:i(a.source),children:r(a.source)})]})},a.url))})}function Gle({card:e,users:n,currentUserId:t,requesterOptions:i,tagOptions:r,onSubmit:a,onCancel:o}){const[l,f]=A.useState([]),[c,h]=A.useState(e),[d,p]=A.useState(0),v=async w=>{h(k=>({...k,title:w.title,description:w.description,requester:w.requester,tags:w.tags,assignee_id:w.assignee_id})),await a(w)},b=()=>p(w=>w+1);return y.jsxs(qe,{align:"stretch",gap:"md",wrap:"nowrap",style:{minHeight:460},children:[y.jsx(de,{style:{flex:"1 1 0",minWidth:320},children:y.jsx(hq,{users:n,requesterOptions:i,tagOptions:r,initial:{requester:c.requester,title:c.title,description:c.description,assignee_id:c.assignee_id,tags:c.tags||[]},submitLabel:"Guardar",cardId:c.id,onFileUploaded:b,onSubmit:v,onCancel:o})}),y.jsx(Fc,{orientation:"vertical"}),y.jsx(de,{style:{flex:"1 1 0",minWidth:320,display:"flex",flexDirection:"column"},children:y.jsxs(_i,{defaultValue:"chat",keepMounted:!1,style:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[y.jsxs(_i.List,{children:[y.jsx(_i.Tab,{value:"chat",leftSection:y.jsx(Gse,{size:14}),children:"Chat"}),y.jsx(_i.Tab,{value:"links",leftSection:y.jsx(Lse,{size:14}),children:"Enlaces"}),y.jsx(_i.Tab,{value:"files",leftSection:y.jsx(cq,{size:14}),children:"Archivos"})]}),y.jsxs(de,{pt:"xs",style:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:[y.jsx(_i.Panel,{value:"chat",style:{flex:1,minHeight:0,display:"flex"},children:y.jsx(de,{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",width:"100%"},children:y.jsx(Ile,{cardId:c.id,users:n,currentUserId:t,onMessagesChange:f,onFileUploaded:b})})}),y.jsx(_i.Panel,{value:"links",children:y.jsx(Vle,{card:c,messages:l})}),y.jsx(_i.Panel,{value:"files",children:y.jsx(Ule,{cardId:c.id,refreshKey:d})})]})]})})]})}function Yle(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Kle=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Xle=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Zle={};function mM(e,n){return(Zle.jsx?Xle:Kle).test(e)}const Qle=/[ \t\n\f\r]/g;function Jle(e){return typeof e=="object"?e.type==="text"?pM(e.value):!1:pM(e)}function pM(e){return e.replace(Qle,"")===""}class dp{constructor(n,t,i){this.normal=t,this.property=n,i&&(this.space=i)}}dp.prototype.normal={};dp.prototype.property={};dp.prototype.space=void 0;function gq(e,n){const t={},i={};for(const r of e)Object.assign(t,r.property),Object.assign(i,r.normal);return new dp(t,i,n)}function YS(e){return e.toLowerCase()}class Cr{constructor(n,t){this.attribute=t,this.property=n}}Cr.prototype.attribute="";Cr.prototype.booleanish=!1;Cr.prototype.boolean=!1;Cr.prototype.commaOrSpaceSeparated=!1;Cr.prototype.commaSeparated=!1;Cr.prototype.defined=!1;Cr.prototype.mustUseProperty=!1;Cr.prototype.number=!1;Cr.prototype.overloadedBoolean=!1;Cr.prototype.property="";Cr.prototype.spaceSeparated=!1;Cr.prototype.space=void 0;let eue=0;const Hn=Lu(),mi=Lu(),KS=Lu(),Ue=Lu(),zt=Lu(),Vf=Lu(),Ir=Lu();function Lu(){return 2**++eue}const XS=Object.freeze(Object.defineProperty({__proto__:null,boolean:Hn,booleanish:mi,commaOrSpaceSeparated:Ir,commaSeparated:Vf,number:Ue,overloadedBoolean:KS,spaceSeparated:zt},Symbol.toStringTag,{value:"Module"})),Wk=Object.keys(XS);class y9 extends Cr{constructor(n,t,i,r){let a=-1;if(super(n,t),vM(this,"space",r),typeof i=="number")for(;++a4&&t.slice(0,4)==="data"&&aue.test(n)){if(n.charAt(4)==="-"){const a=n.slice(5).replace(gM,lue);i="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=n.slice(4);if(!gM.test(a)){let o=a.replace(rue,sue);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}r=y9}return new r(i,n)}function sue(e){return"-"+e.toLowerCase()}function lue(e){return e.charAt(1).toUpperCase()}const uue=gq([yq,nue,kq,_q,xq],"html"),b9=gq([yq,tue,kq,_q,xq],"svg");function fue(e){return e.join(" ").trim()}var Ef={},Vk,yM;function cue(){if(yM)return Vk;yM=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,r=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,f=` +`,c="/",h="*",d="",p="comment",v="declaration";function b(k,_){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];_=_||{};var C=1,S=1;function E(U){var N=U.match(n);N&&(C+=N.length);var D=U.lastIndexOf(f);S=~D?U.length-D:S+U.length}function j(){var U={line:C,column:S};return function(N){return N.position=new O(U),q(),N}}function O(U){this.start=U,this.end={line:C,column:S},this.source=_.source}O.prototype.content=k;function M(U){var N=new Error(_.source+":"+C+":"+S+": "+U);if(N.reason=U,N.filename=_.source,N.line=C,N.column=S,N.source=k,!_.silent)throw N}function $(U){var N=U.exec(k);if(N){var D=N[0];return E(D),k=k.slice(D.length),N}}function q(){$(t)}function P(U){var N;for(U=U||[];N=z();)N!==!1&&U.push(N);return U}function z(){var U=j();if(!(c!=k.charAt(0)||h!=k.charAt(1))){for(var N=2;d!=k.charAt(N)&&(h!=k.charAt(N)||c!=k.charAt(N+1));)++N;if(N+=2,d===k.charAt(N-1))return M("End of comment missing");var D=k.slice(2,N-2);return S+=2,E(D),k=k.slice(N),S+=2,U({type:p,comment:D})}}function B(){var U=j(),N=$(i);if(N){if(z(),!$(r))return M("property missing ':'");var D=$(a),L=U({type:v,property:w(N[0].replace(e,d)),value:D?w(D[0].replace(e,d)):d});return $(o),L}}function V(){var U=[];P(U);for(var N;N=B();)N!==!1&&(U.push(N),P(U));return U}return q(),V()}function w(k){return k?k.replace(l,d):d}return Vk=b,Vk}var bM;function due(){if(bM)return Ef;bM=1;var e=Ef&&Ef.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ef,"__esModule",{value:!0}),Ef.default=t;const n=e(cue());function t(i,r){let a=null;if(!i||typeof i!="string")return a;const o=(0,n.default)(i),l=typeof r=="function";return o.forEach(f=>{if(f.type!=="declaration")return;const{property:c,value:h}=f;l?r(c,h,f):h&&(a=a||{},a[c]=h)}),a}return Ef}var ih={},wM;function hue(){if(wM)return ih;wM=1,Object.defineProperty(ih,"__esModule",{value:!0}),ih.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,r=/^-(ms)-/,a=function(c){return!c||t.test(c)||e.test(c)},o=function(c,h){return h.toUpperCase()},l=function(c,h){return"".concat(h,"-")},f=function(c,h){return h===void 0&&(h={}),a(c)?c:(c=c.toLowerCase(),h.reactCompat?c=c.replace(r,l):c=c.replace(i,l),c.replace(n,o))};return ih.camelCase=f,ih}var rh,kM;function mue(){if(kM)return rh;kM=1;var e=rh&&rh.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},n=e(due()),t=hue();function i(r,a){var o={};return!r||typeof r!="string"||(0,n.default)(r,function(l,f){l&&f&&(o[(0,t.camelCase)(l,a)]=f)}),o}return i.default=i,rh=i,rh}var pue=mue();const vue=pt(pue),Sq=Cq("end"),w9=Cq("start");function Cq(e){return n;function n(t){const i=t&&t.position&&t.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function gue(e){const n=w9(e),t=Sq(e);if(n&&t)return{start:n,end:t}}function Ph(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?_M(e.position):"start"in e||"end"in e?_M(e):"line"in e||"column"in e?ZS(e):""}function ZS(e){return xM(e&&e.line)+":"+xM(e&&e.column)}function _M(e){return ZS(e&&e.start)+"-"+ZS(e&&e.end)}function xM(e){return e&&typeof e=="number"?e:1}class er extends Error{constructor(n,t,i){super(),typeof t=="string"&&(i=t,t=void 0);let r="",a={},o=!1;if(t&&("line"in t&&"column"in t?a={place:t}:"start"in t&&"end"in t?a={place:t}:"type"in t?a={ancestors:[t],place:t.position}:a={...t}),typeof n=="string"?r=n:!a.cause&&n&&(o=!0,r=n.message,a.cause=n),!a.ruleId&&!a.source&&typeof i=="string"){const f=i.indexOf(":");f===-1?a.ruleId=i:(a.source=i.slice(0,f),a.ruleId=i.slice(f+1))}if(!a.place&&a.ancestors&&a.ancestors){const f=a.ancestors[a.ancestors.length-1];f&&(a.place=f.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=l?l.line:void 0,this.name=Ph(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}er.prototype.file="";er.prototype.name="";er.prototype.reason="";er.prototype.message="";er.prototype.stack="";er.prototype.column=void 0;er.prototype.line=void 0;er.prototype.ancestors=void 0;er.prototype.cause=void 0;er.prototype.fatal=void 0;er.prototype.place=void 0;er.prototype.ruleId=void 0;er.prototype.source=void 0;const k9={}.hasOwnProperty,yue=new Map,bue=/[A-Z]/g,wue=new Set(["table","tbody","thead","tfoot","tr"]),kue=new Set(["td","th"]),Aq="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function _ue(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let i;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=Tue(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=Eue(t,n.jsx,n.jsxs)}const r={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:i,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?b9:uue,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},a=jq(r,e,void 0);return a&&typeof a!="string"?a:r.create(e,r.Fragment,{children:a||void 0},void 0)}function jq(e,n,t){if(n.type==="element")return xue(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Sue(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Aue(e,n,t);if(n.type==="mdxjsEsm")return Cue(e,n);if(n.type==="root")return jue(e,n,t);if(n.type==="text")return Oue(e,n)}function xue(e,n,t){const i=e.schema;let r=i;n.tagName.toLowerCase()==="svg"&&i.space==="html"&&(r=b9,e.schema=r),e.ancestors.push(n);const a=Eq(e,n.tagName,!1),o=Mue(e,n);let l=x9(e,n);return wue.has(n.tagName)&&(l=l.filter(function(f){return typeof f=="string"?!Jle(f):!0})),Oq(e,o,a,n),_9(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function Sue(e,n){if(n.data&&n.data.estree&&e.evaluater){const i=n.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}im(e,n.position)}function Cue(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);im(e,n.position)}function Aue(e,n,t){const i=e.schema;let r=i;n.name==="svg"&&i.space==="html"&&(r=b9,e.schema=r),e.ancestors.push(n);const a=n.name===null?e.Fragment:Eq(e,n.name,!0),o=Due(e,n),l=x9(e,n);return Oq(e,o,a,n),_9(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function jue(e,n,t){const i={};return _9(i,x9(e,n)),e.create(n,e.Fragment,i,t)}function Oue(e,n){return n.value}function Oq(e,n,t,i){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=i)}function _9(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Eue(e,n,t){return i;function i(r,a,o,l){const c=Array.isArray(o.children)?t:n;return l?c(a,o,l):c(a,o)}}function Tue(e,n){return t;function t(i,r,a,o){const l=Array.isArray(a.children),f=w9(i);return n(r,a,o,l,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function Mue(e,n){const t={};let i,r;for(r in n.properties)if(r!=="children"&&k9.call(n.properties,r)){const a=Rue(e,r,n.properties[r]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&kue.has(n.tagName)?i=l:t[o]=l}}if(i){const a=t.style||(t.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return t}function Due(e,n){const t={};for(const i of n.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const a=i.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(t,e.evaluater.evaluateExpression(l.argument))}else im(e,n.position);else{const r=i.name;let a;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const l=i.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else im(e,n.position);else a=i.value===null?!0:i.value;t[r]=a}return t}function x9(e,n){const t=[];let i=-1;const r=e.passKeys?new Map:yue;for(;++ir?0:r+n:n=n>r?r:n,t=t>0?t:0,i.length<1e4)o=Array.from(i),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);a0?(Vr(e,e.length,0,n),e):n}const AM={}.hasOwnProperty;function Mq(e){const n={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function qa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const lr=_l(/[A-Za-z]/),Ji=_l(/[\dA-Za-z]/),que=_l(/[#-'*+\--9=?A-Z^-~]/);function Xg(e){return e!==null&&(e<32||e===127)}const QS=_l(/\d/),Hue=_l(/[\dA-Fa-f]/),Uue=_l(/[!-/:-@[-`{-~]/);function kn(e){return e!==null&&e<-2}function Nt(e){return e!==null&&(e<0||e===32)}function Qn(e){return e===-2||e===-1||e===32}const p0=_l(new RegExp("\\p{P}|\\p{S}","u")),Su=_l(/\s/);function _l(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Zc(e){const n=[];let t=-1,i=0,r=0;for(;++t55295&&a<57344){const l=e.charCodeAt(t+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),r=1):o="�"}else o=String.fromCharCode(a);o&&(n.push(e.slice(i,t),encodeURIComponent(o)),i=t+r+1,o=""),r&&(t+=r,r=0)}return n.join("")+e.slice(i)}function ot(e,n,t,i){const r=i?i-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(f){return Qn(f)?(e.enter(t),l(f)):n(f)}function l(f){return Qn(f)&&a++o))return;const M=n.events.length;let $=M,q,P;for(;$--;)if(n.events[$][0]==="exit"&&n.events[$][1].type==="chunkFlow"){if(q){P=n.events[$][1].end;break}q=!0}for(_(i),O=M;OS;){const j=t[E];n.containerState=j[1],j[0].exit.call(n,e)}t.length=S}function C(){r.write([null]),a=void 0,r=void 0,n.containerState._closeFlow=void 0}}function Kue(e,n,t){return ot(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ac(e){if(e===null||Nt(e)||Su(e))return 1;if(p0(e))return 2}function v0(e,n,t){const i=[];let r=-1;for(;++r1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const d={...e[i][1].end},p={...e[t][1].start};OM(d,-f),OM(p,f),o={type:f>1?"strongSequence":"emphasisSequence",start:d,end:{...e[i][1].end}},l={type:f>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},a={type:f>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[t][1].start}},r={type:f>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[i][1].end={...o.start},e[t][1].start={...l.end},c=[],e[i][1].end.offset-e[i][1].start.offset&&(c=da(c,[["enter",e[i][1],n],["exit",e[i][1],n]])),c=da(c,[["enter",r,n],["enter",o,n],["exit",o,n],["enter",a,n]]),c=da(c,v0(n.parser.constructs.insideSpan.null,e.slice(i+1,t),n)),c=da(c,[["exit",a,n],["enter",l,n],["exit",l,n],["exit",r,n]]),e[t][1].end.offset-e[t][1].start.offset?(h=2,c=da(c,[["enter",e[t][1],n],["exit",e[t][1],n]])):h=0,Vr(e,i-1,t-i+3,c),t=i+c.length-h-2;break}}for(t=-1;++t0&&Qn(O)?ot(e,C,"linePrefix",a+1)(O):C(O)}function C(O){return O===null||kn(O)?e.check(EM,w,E)(O):(e.enter("codeFlowValue"),S(O))}function S(O){return O===null||kn(O)?(e.exit("codeFlowValue"),C(O)):(e.consume(O),S)}function E(O){return e.exit("codeFenced"),n(O)}function j(O,M,$){let q=0;return P;function P(N){return O.enter("lineEnding"),O.consume(N),O.exit("lineEnding"),z}function z(N){return O.enter("codeFencedFence"),Qn(N)?ot(O,B,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):B(N)}function B(N){return N===l?(O.enter("codeFencedFenceSequence"),V(N)):$(N)}function V(N){return N===l?(q++,O.consume(N),V):q>=o?(O.exit("codeFencedFenceSequence"),Qn(N)?ot(O,U,"whitespace")(N):U(N)):$(N)}function U(N){return N===null||kn(N)?(O.exit("codeFencedFence"),M(N)):$(N)}}}function sfe(e,n,t){const i=this;return r;function r(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return i.parser.lazy[i.now().line]?t(o):n(o)}}const Yk={name:"codeIndented",tokenize:ufe},lfe={partial:!0,tokenize:ffe};function ufe(e,n,t){const i=this;return r;function r(c){return e.enter("codeIndented"),ot(e,a,"linePrefix",5)(c)}function a(c){const h=i.events[i.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?o(c):t(c)}function o(c){return c===null?f(c):kn(c)?e.attempt(lfe,o,f)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||kn(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),l)}function f(c){return e.exit("codeIndented"),n(c)}}function ffe(e,n,t){const i=this;return r;function r(o){return i.parser.lazy[i.now().line]?t(o):kn(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r):ot(e,a,"linePrefix",5)(o)}function a(o){const l=i.events[i.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?n(o):kn(o)?r(o):t(o)}}const cfe={name:"codeText",previous:hfe,resolve:dfe,tokenize:mfe};function dfe(e){let n=e.length-4,t=3,i,r;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(i=t;++i=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return nthis.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(n,t,i){const r=t||0;this.setCursor(Math.trunc(n));const a=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return i&&ah(this.left,i),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),ah(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),ah(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?n(o):e.interrupt(i.parser.constructs.flow,t,n)(o)}}function zq(e,n,t,i,r,a,o,l,f){const c=f||Number.POSITIVE_INFINITY;let h=0;return d;function d(_){return _===60?(e.enter(i),e.enter(r),e.enter(a),e.consume(_),e.exit(a),p):_===null||_===32||_===41||Xg(_)?t(_):(e.enter(i),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),w(_))}function p(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(r),e.exit(i),n):(e.enter(l),e.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===62?(e.exit("chunkString"),e.exit(l),p(_)):_===null||_===60||kn(_)?t(_):(e.consume(_),_===92?b:v)}function b(_){return _===60||_===62||_===92?(e.consume(_),v):v(_)}function w(_){return!h&&(_===null||_===41||Nt(_))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(i),n(_)):h999||v===null||v===91||v===93&&!f||v===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?t(v):v===93?(e.exit(a),e.enter(r),e.consume(v),e.exit(r),e.exit(i),n):kn(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(v))}function d(v){return v===null||v===91||v===93||kn(v)||l++>999?(e.exit("chunkString"),h(v)):(e.consume(v),f||(f=!Qn(v)),v===92?p:d)}function p(v){return v===91||v===92||v===93?(e.consume(v),l++,d):d(v)}}function Iq(e,n,t,i,r,a){let o;return l;function l(p){return p===34||p===39||p===40?(e.enter(i),e.enter(r),e.consume(p),e.exit(r),o=p===40?41:p,f):t(p)}function f(p){return p===o?(e.enter(r),e.consume(p),e.exit(r),e.exit(i),n):(e.enter(a),c(p))}function c(p){return p===o?(e.exit(a),f(o)):p===null?t(p):kn(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),ot(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===o||p===null||kn(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?d:h)}function d(p){return p===o||p===92?(e.consume(p),h):h(p)}}function Nh(e,n){let t;return i;function i(r){return kn(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t=!0,i):Qn(r)?ot(e,i,t?"linePrefix":"lineSuffix")(r):n(r)}}const _fe={name:"definition",tokenize:Sfe},xfe={partial:!0,tokenize:Cfe};function Sfe(e,n,t){const i=this;let r;return a;function a(v){return e.enter("definition"),o(v)}function o(v){return Lq.call(i,e,l,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function l(v){return r=qa(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),f):t(v)}function f(v){return Nt(v)?Nh(e,c)(v):c(v)}function c(v){return zq(e,h,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function h(v){return e.attempt(xfe,d,d)(v)}function d(v){return Qn(v)?ot(e,p,"whitespace")(v):p(v)}function p(v){return v===null||kn(v)?(e.exit("definition"),i.parser.defined.push(r),n(v)):t(v)}}function Cfe(e,n,t){return i;function i(l){return Nt(l)?Nh(e,r)(l):t(l)}function r(l){return Iq(e,a,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Qn(l)?ot(e,o,"whitespace")(l):o(l)}function o(l){return l===null||kn(l)?n(l):t(l)}}const Afe={name:"hardBreakEscape",tokenize:jfe};function jfe(e,n,t){return i;function i(a){return e.enter("hardBreakEscape"),e.consume(a),r}function r(a){return kn(a)?(e.exit("hardBreakEscape"),n(a)):t(a)}}const Ofe={name:"headingAtx",resolve:Efe,tokenize:Tfe};function Efe(e,n){let t=e.length-2,i=3,r,a;return e[i][1].type==="whitespace"&&(i+=2),t-2>i&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(i===t-1||t-4>i&&e[t-2][1].type==="whitespace")&&(t-=i+1===t?2:4),t>i&&(r={type:"atxHeadingText",start:e[i][1].start,end:e[t][1].end},a={type:"chunkText",start:e[i][1].start,end:e[t][1].end,contentType:"text"},Vr(e,i,t-i+1,[["enter",r,n],["enter",a,n],["exit",a,n],["exit",r,n]])),e}function Tfe(e,n,t){let i=0;return r;function r(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),o(h)}function o(h){return h===35&&i++<6?(e.consume(h),o):h===null||Nt(h)?(e.exit("atxHeadingSequence"),l(h)):t(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),f(h)):h===null||kn(h)?(e.exit("atxHeading"),n(h)):Qn(h)?ot(e,l,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function f(h){return h===35?(e.consume(h),f):(e.exit("atxHeadingSequence"),l(h))}function c(h){return h===null||h===35||Nt(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),c)}}const Mfe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],MM=["pre","script","style","textarea"],Dfe={concrete:!0,name:"htmlFlow",resolveTo:Nfe,tokenize:$fe},Rfe={partial:!0,tokenize:Lfe},Pfe={partial:!0,tokenize:zfe};function Nfe(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function $fe(e,n,t){const i=this;let r,a,o,l,f;return c;function c(I){return h(I)}function h(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),d}function d(I){return I===33?(e.consume(I),p):I===47?(e.consume(I),a=!0,w):I===63?(e.consume(I),r=3,i.interrupt?n:R):lr(I)?(e.consume(I),o=String.fromCharCode(I),k):t(I)}function p(I){return I===45?(e.consume(I),r=2,v):I===91?(e.consume(I),r=5,l=0,b):lr(I)?(e.consume(I),r=4,i.interrupt?n:R):t(I)}function v(I){return I===45?(e.consume(I),i.interrupt?n:R):t(I)}function b(I){const X="CDATA[";return I===X.charCodeAt(l++)?(e.consume(I),l===X.length?i.interrupt?n:B:b):t(I)}function w(I){return lr(I)?(e.consume(I),o=String.fromCharCode(I),k):t(I)}function k(I){if(I===null||I===47||I===62||Nt(I)){const X=I===47,ee=o.toLowerCase();return!X&&!a&&MM.includes(ee)?(r=1,i.interrupt?n(I):B(I)):Mfe.includes(o.toLowerCase())?(r=6,X?(e.consume(I),_):i.interrupt?n(I):B(I)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?t(I):a?C(I):S(I))}return I===45||Ji(I)?(e.consume(I),o+=String.fromCharCode(I),k):t(I)}function _(I){return I===62?(e.consume(I),i.interrupt?n:B):t(I)}function C(I){return Qn(I)?(e.consume(I),C):P(I)}function S(I){return I===47?(e.consume(I),P):I===58||I===95||lr(I)?(e.consume(I),E):Qn(I)?(e.consume(I),S):P(I)}function E(I){return I===45||I===46||I===58||I===95||Ji(I)?(e.consume(I),E):j(I)}function j(I){return I===61?(e.consume(I),O):Qn(I)?(e.consume(I),j):S(I)}function O(I){return I===null||I===60||I===61||I===62||I===96?t(I):I===34||I===39?(e.consume(I),f=I,M):Qn(I)?(e.consume(I),O):$(I)}function M(I){return I===f?(e.consume(I),f=null,q):I===null||kn(I)?t(I):(e.consume(I),M)}function $(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||Nt(I)?j(I):(e.consume(I),$)}function q(I){return I===47||I===62||Qn(I)?S(I):t(I)}function P(I){return I===62?(e.consume(I),z):t(I)}function z(I){return I===null||kn(I)?B(I):Qn(I)?(e.consume(I),z):t(I)}function B(I){return I===45&&r===2?(e.consume(I),D):I===60&&r===1?(e.consume(I),L):I===62&&r===4?(e.consume(I),G):I===63&&r===3?(e.consume(I),R):I===93&&r===5?(e.consume(I),Y):kn(I)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(Rfe,W,V)(I)):I===null||kn(I)?(e.exit("htmlFlowData"),V(I)):(e.consume(I),B)}function V(I){return e.check(Pfe,U,W)(I)}function U(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),N}function N(I){return I===null||kn(I)?V(I):(e.enter("htmlFlowData"),B(I))}function D(I){return I===45?(e.consume(I),R):B(I)}function L(I){return I===47?(e.consume(I),o="",H):B(I)}function H(I){if(I===62){const X=o.toLowerCase();return MM.includes(X)?(e.consume(I),G):B(I)}return lr(I)&&o.length<8?(e.consume(I),o+=String.fromCharCode(I),H):B(I)}function Y(I){return I===93?(e.consume(I),R):B(I)}function R(I){return I===62?(e.consume(I),G):I===45&&r===2?(e.consume(I),R):B(I)}function G(I){return I===null||kn(I)?(e.exit("htmlFlowData"),W(I)):(e.consume(I),G)}function W(I){return e.exit("htmlFlow"),n(I)}}function zfe(e,n,t){const i=this;return r;function r(o){return kn(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):t(o)}function a(o){return i.parser.lazy[i.now().line]?t(o):n(o)}}function Lfe(e,n,t){return i;function i(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(hp,n,t)}}const Ife={name:"htmlText",tokenize:Bfe};function Bfe(e,n,t){const i=this;let r,a,o;return l;function l(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),f}function f(R){return R===33?(e.consume(R),c):R===47?(e.consume(R),j):R===63?(e.consume(R),S):lr(R)?(e.consume(R),$):t(R)}function c(R){return R===45?(e.consume(R),h):R===91?(e.consume(R),a=0,b):lr(R)?(e.consume(R),C):t(R)}function h(R){return R===45?(e.consume(R),v):t(R)}function d(R){return R===null?t(R):R===45?(e.consume(R),p):kn(R)?(o=d,L(R)):(e.consume(R),d)}function p(R){return R===45?(e.consume(R),v):d(R)}function v(R){return R===62?D(R):R===45?p(R):d(R)}function b(R){const G="CDATA[";return R===G.charCodeAt(a++)?(e.consume(R),a===G.length?w:b):t(R)}function w(R){return R===null?t(R):R===93?(e.consume(R),k):kn(R)?(o=w,L(R)):(e.consume(R),w)}function k(R){return R===93?(e.consume(R),_):w(R)}function _(R){return R===62?D(R):R===93?(e.consume(R),_):w(R)}function C(R){return R===null||R===62?D(R):kn(R)?(o=C,L(R)):(e.consume(R),C)}function S(R){return R===null?t(R):R===63?(e.consume(R),E):kn(R)?(o=S,L(R)):(e.consume(R),S)}function E(R){return R===62?D(R):S(R)}function j(R){return lr(R)?(e.consume(R),O):t(R)}function O(R){return R===45||Ji(R)?(e.consume(R),O):M(R)}function M(R){return kn(R)?(o=M,L(R)):Qn(R)?(e.consume(R),M):D(R)}function $(R){return R===45||Ji(R)?(e.consume(R),$):R===47||R===62||Nt(R)?q(R):t(R)}function q(R){return R===47?(e.consume(R),D):R===58||R===95||lr(R)?(e.consume(R),P):kn(R)?(o=q,L(R)):Qn(R)?(e.consume(R),q):D(R)}function P(R){return R===45||R===46||R===58||R===95||Ji(R)?(e.consume(R),P):z(R)}function z(R){return R===61?(e.consume(R),B):kn(R)?(o=z,L(R)):Qn(R)?(e.consume(R),z):q(R)}function B(R){return R===null||R===60||R===61||R===62||R===96?t(R):R===34||R===39?(e.consume(R),r=R,V):kn(R)?(o=B,L(R)):Qn(R)?(e.consume(R),B):(e.consume(R),U)}function V(R){return R===r?(e.consume(R),r=void 0,N):R===null?t(R):kn(R)?(o=V,L(R)):(e.consume(R),V)}function U(R){return R===null||R===34||R===39||R===60||R===61||R===96?t(R):R===47||R===62||Nt(R)?q(R):(e.consume(R),U)}function N(R){return R===47||R===62||Nt(R)?q(R):t(R)}function D(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),n):t(R)}function L(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),H}function H(R){return Qn(R)?ot(e,Y,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):Y(R)}function Y(R){return e.enter("htmlTextData"),o(R)}}const A9={name:"labelEnd",resolveAll:Ufe,resolveTo:Wfe,tokenize:Vfe},Ffe={tokenize:Gfe},qfe={tokenize:Yfe},Hfe={tokenize:Kfe};function Ufe(e){let n=-1;const t=[];for(;++n=3&&(c===null||kn(c))?(e.exit("thematicBreak"),n(c)):t(c)}function f(c){return c===r?(e.consume(c),i++,f):(e.exit("thematicBreakSequence"),Qn(c)?ot(e,l,"whitespace")(c):l(c))}}const br={continuation:{tokenize:ace},exit:sce,name:"list",tokenize:rce},tce={partial:!0,tokenize:lce},ice={partial:!0,tokenize:oce};function rce(e,n,t){const i=this,r=i.events[i.events.length-1];let a=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,o=0;return l;function l(v){const b=i.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!i.containerState.marker||v===i.containerState.marker:QS(v)){if(i.containerState.type||(i.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Ag,t,c)(v):c(v);if(!i.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(v)}return t(v)}function f(v){return QS(v)&&++o<10?(e.consume(v),f):(!i.interrupt||o<2)&&(i.containerState.marker?v===i.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),c(v)):t(v)}function c(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||v,e.check(hp,i.interrupt?t:h,e.attempt(tce,p,d))}function h(v){return i.containerState.initialBlankLine=!0,a++,p(v)}function d(v){return Qn(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),p):t(v)}function p(v){return i.containerState.size=a+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(v)}}function ace(e,n,t){const i=this;return i.containerState._closeFlow=void 0,e.check(hp,r,a);function r(l){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,ot(e,n,"listItemIndent",i.containerState.size+1)(l)}function a(l){return i.containerState.furtherBlankLines||!Qn(l)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,o(l)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(ice,n,o)(l))}function o(l){return i.containerState._closeFlow=!0,i.interrupt=void 0,ot(e,e.attempt(br,n,t),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function oce(e,n,t){const i=this;return ot(e,r,"listItemIndent",i.containerState.size+1);function r(a){const o=i.events[i.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===i.containerState.size?n(a):t(a)}}function sce(e){e.exit(this.containerState.type)}function lce(e,n,t){const i=this;return ot(e,r,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(a){const o=i.events[i.events.length-1];return!Qn(a)&&o&&o[1].type==="listItemPrefixWhitespace"?n(a):t(a)}}const DM={name:"setextUnderline",resolveTo:uce,tokenize:fce};function uce(e,n){let t=e.length,i,r,a;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){i=t;break}e[t][1].type==="paragraph"&&(r=t)}else e[t][1].type==="content"&&e.splice(t,1),!a&&e[t][1].type==="definition"&&(a=t);const o={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",a?(e.splice(r,0,["enter",o,n]),e.splice(a+1,0,["exit",e[i][1],n]),e[i][1].end={...e[a][1].end}):e[i][1]=o,e.push(["exit",o,n]),e}function fce(e,n,t){const i=this;let r;return a;function a(c){let h=i.events.length,d;for(;h--;)if(i.events[h][1].type!=="lineEnding"&&i.events[h][1].type!=="linePrefix"&&i.events[h][1].type!=="content"){d=i.events[h][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||d)?(e.enter("setextHeadingLine"),r=c,o(c)):t(c)}function o(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===r?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),Qn(c)?ot(e,f,"lineSuffix")(c):f(c))}function f(c){return c===null||kn(c)?(e.exit("setextHeadingLine"),n(c)):t(c)}}const cce={tokenize:dce};function dce(e){const n=this,t=e.attempt(hp,i,e.attempt(this.parser.constructs.flowInitial,r,ot(e,e.attempt(this.parser.constructs.flow,r,e.attempt(gfe,r)),"linePrefix")));return t;function i(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const hce={resolveAll:Fq()},mce=Bq("string"),pce=Bq("text");function Bq(e){return{resolveAll:Fq(e==="text"?vce:void 0),tokenize:n};function n(t){const i=this,r=this.parser.constructs[e],a=t.attempt(r,o,l);return o;function o(h){return c(h)?a(h):l(h)}function l(h){if(h===null){t.consume(h);return}return t.enter("data"),t.consume(h),f}function f(h){return c(h)?(t.exit("data"),a(h)):(t.consume(h),f)}function c(h){if(h===null)return!0;const d=r[h];let p=-1;if(d)for(;++p-1){const l=o[0];typeof l=="string"?o[0]=l.slice(i):o.shift()}a>0&&o.push(e[r].slice(0,a))}return o}function Ece(e,n){let t=-1;const i=[];let r;for(;++t0){const tn=Ye.tokenStack[Ye.tokenStack.length-1];(tn[1]||PM).call(Ye,void 0,tn[0])}for(me.position={start:Hs(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:Hs(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},Se=-1;++Se0&&(i.className=["language-"+r[0]]);let a={type:"element",tagName:"code",properties:i,children:[{type:"text",value:t}]};return n.meta&&(a.data={meta:n.meta}),e.patch(n,a),a=e.applyData(n,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(n,a),a}function Hce(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Uce(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Wce(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(n.identifier).toUpperCase(),r=Zc(i.toLowerCase()),a=e.footnoteOrder.indexOf(i);let o,l=e.footnoteCounts.get(i);l===void 0?(l=0,e.footnoteOrder.push(i),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(i,l);const f={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+r,id:t+"fnref-"+r+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,f);const c={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(n,c),e.applyData(n,c)}function Vce(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Gce(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function Uq(e,n){const t=n.referenceType;let i="]";if(t==="collapsed"?i+="[]":t==="full"&&(i+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+i}];const r=e.all(n),a=r[0];a&&a.type==="text"?a.value="["+a.value:r.unshift({type:"text",value:"["});const o=r[r.length-1];return o&&o.type==="text"?o.value+=i:r.push({type:"text",value:i}),r}function Yce(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return Uq(e,n);const r={src:Zc(i.url||""),alt:n.alt};i.title!==null&&i.title!==void 0&&(r.title=i.title);const a={type:"element",tagName:"img",properties:r,children:[]};return e.patch(n,a),e.applyData(n,a)}function Kce(e,n){const t={src:Zc(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const i={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,i),e.applyData(n,i)}function Xce(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const i={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,i),e.applyData(n,i)}function Zce(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return Uq(e,n);const r={href:Zc(i.url||"")};i.title!==null&&i.title!==void 0&&(r.title=i.title);const a={type:"element",tagName:"a",properties:r,children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function Qce(e,n){const t={href:Zc(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const i={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function Jce(e,n,t){const i=e.all(n),r=t?ede(t):Wq(n),a={},o=[];if(typeof n.checked=="boolean"){const h=i[0];let d;h&&h.type==="element"&&h.tagName==="p"?d=h:(d={type:"element",tagName:"p",properties:{},children:[]},i.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l1}function nde(e,n){const t={},i=e.all(n);let r=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++r0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},l=w9(n.children[1]),f=Sq(n.children[n.children.length-1]);l&&f&&(o.position={start:l,end:f}),r.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(r,!0)};return e.patch(n,a),e.applyData(n,a)}function ode(e,n,t){const i=t?t.children:void 0,a=(i?i.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,l=o?o.length:n.children.length;let f=-1;const c=[];for(;++f0,!0),i[0]),r=i.index+i[0].length,i=t.exec(n);return a.push(zM(n.slice(r),r>0,!1)),a.join("")}function zM(e,n,t){let i=0,r=e.length;if(n){let a=e.codePointAt(i);for(;a===NM||a===$M;)i++,a=e.codePointAt(i)}if(t){let a=e.codePointAt(r-1);for(;a===NM||a===$M;)r--,a=e.codePointAt(r-1)}return r>i?e.slice(i,r):""}function ude(e,n){const t={type:"text",value:lde(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function fde(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const cde={blockquote:Bce,break:Fce,code:qce,delete:Hce,emphasis:Uce,footnoteReference:Wce,heading:Vce,html:Gce,imageReference:Yce,image:Kce,inlineCode:Xce,linkReference:Zce,link:Qce,listItem:Jce,list:nde,paragraph:tde,root:ide,strong:rde,table:ade,tableCell:sde,tableRow:ode,text:ude,thematicBreak:fde,toml:Gv,yaml:Gv,definition:Gv,footnoteDefinition:Gv};function Gv(){}const Vq=-1,g0=0,$h=1,Zg=2,j9=3,O9=4,E9=5,T9=6,Gq=7,Yq=8,dde=typeof self=="object"?self:globalThis,LM=(e,n)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new dde[e](n)},hde=(e,n)=>{const t=(r,a)=>(e.set(a,r),r),i=r=>{if(e.has(r))return e.get(r);const[a,o]=n[r];switch(a){case g0:case Vq:return t(o,r);case $h:{const l=t([],r);for(const f of o)l.push(i(f));return l}case Zg:{const l=t({},r);for(const[f,c]of o)l[i(f)]=i(c);return l}case j9:return t(new Date(o),r);case O9:{const{source:l,flags:f}=o;return t(new RegExp(l,f),r)}case E9:{const l=t(new Map,r);for(const[f,c]of o)l.set(i(f),i(c));return l}case T9:{const l=t(new Set,r);for(const f of o)l.add(i(f));return l}case Gq:{const{name:l,message:f}=o;return t(LM(l,f),r)}case Yq:return t(BigInt(o),r);case"BigInt":return t(Object(BigInt(o)),r);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return t(new DataView(l),o)}}return t(LM(a,o),r)};return i},IM=e=>hde(new Map,e)(0),Tf="",{toString:mde}={},{keys:pde}=Object,oh=e=>{const n=typeof e;if(n!=="object"||!e)return[g0,n];const t=mde.call(e).slice(8,-1);switch(t){case"Array":return[$h,Tf];case"Object":return[Zg,Tf];case"Date":return[j9,Tf];case"RegExp":return[O9,Tf];case"Map":return[E9,Tf];case"Set":return[T9,Tf];case"DataView":return[$h,t]}return t.includes("Array")?[$h,t]:t.includes("Error")?[Gq,t]:[Zg,t]},Yv=([e,n])=>e===g0&&(n==="function"||n==="symbol"),vde=(e,n,t,i)=>{const r=(o,l)=>{const f=i.push(o)-1;return t.set(l,f),f},a=o=>{if(t.has(o))return t.get(o);let[l,f]=oh(o);switch(l){case g0:{let h=o;switch(f){case"bigint":l=Yq,h=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);h=null;break;case"undefined":return r([Vq],o)}return r([l,h],o)}case $h:{if(f){let p=o;return f==="DataView"?p=new Uint8Array(o.buffer):f==="ArrayBuffer"&&(p=new Uint8Array(o)),r([f,[...p]],o)}const h=[],d=r([l,h],o);for(const p of o)h.push(a(p));return d}case Zg:{if(f)switch(f){case"BigInt":return r([f,o.toString()],o);case"Boolean":case"Number":case"String":return r([f,o.valueOf()],o)}if(n&&"toJSON"in o)return a(o.toJSON());const h=[],d=r([l,h],o);for(const p of pde(o))(e||!Yv(oh(o[p])))&&h.push([a(p),a(o[p])]);return d}case j9:return r([l,o.toISOString()],o);case O9:{const{source:h,flags:d}=o;return r([l,{source:h,flags:d}],o)}case E9:{const h=[],d=r([l,h],o);for(const[p,v]of o)(e||!(Yv(oh(p))||Yv(oh(v))))&&h.push([a(p),a(v)]);return d}case T9:{const h=[],d=r([l,h],o);for(const p of o)(e||!Yv(oh(p)))&&h.push(a(p));return d}}const{message:c}=o;return r([l,{name:f,message:c}],o)};return a},BM=(e,{json:n,lossy:t}={})=>{const i=[];return vde(!(n||t),!!n,new Map,i)(e),i},Qg=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?IM(BM(e,n)):structuredClone(e):(e,n)=>IM(BM(e,n));function gde(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function yde(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function bde(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||gde,i=e.options.footnoteBackLabel||yde,r=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let f=-1;for(;++f0&&b.push({type:"text",value:" "});let C=typeof t=="string"?t:t(f,v);typeof C=="string"&&(C={type:"text",value:C}),b.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(f,v),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const k=h[h.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const C=k.children[k.children.length-1];C&&C.type==="text"?C.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...b)}else h.push(...b);const _={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(h,!0)};e.patch(c,_),l.push(_)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Qg(o),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:` +`}]}}const y0=(function(e){if(e==null)return xde;if(typeof e=="function")return b0(e);if(typeof e=="object")return Array.isArray(e)?wde(e):kde(e);if(typeof e=="string")return _de(e);throw new Error("Expected function, string, or object as test")});function wde(e){const n=[];let t=-1;for(;++t":""))+")"})}return p;function p(){let v=Kq,b,w,k;if((!n||a(f,c,h[h.length-1]||void 0))&&(v=jde(t(f,h)),v[0]===e4))return v;if("children"in f&&f.children){const _=f;if(_.children&&v[0]!==Ade)for(w=(i?_.children.length:-1)+o,k=h.concat(_);w>-1&&w<_.children.length;){const C=_.children[w];if(b=l(C,w,k)(),b[0]===e4)return b;w=typeof b[1]=="number"?b[1]:w+o}}return v}}}function jde(e){return Array.isArray(e)?e:typeof e=="number"?[Cde,e]:e==null?Kq:[e]}function M9(e,n,t,i){let r,a,o;typeof n=="function"&&typeof t!="function"?(a=void 0,o=n,r=t):(a=n,o=t,r=i),Xq(e,a,l,r);function l(f,c){const h=c[c.length-1],d=h?h.children.indexOf(f):void 0;return o(f,d,h)}}const n4={}.hasOwnProperty,Ode={};function Ede(e,n){const t=n||Ode,i=new Map,r=new Map,a=new Map,o={...cde,...t.handlers},l={all:c,applyData:Mde,definitionById:i,footnoteById:r,footnoteCounts:a,footnoteOrder:[],handlers:o,one:f,options:t,patch:Tde,wrap:Rde};return M9(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?i:r,p=String(h.identifier).toUpperCase();d.has(p)||d.set(p,h)}}),l;function f(h,d){const p=h.type,v=l.handlers[p];if(n4.call(l.handlers,p)&&v)return v(l,h,d);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in h){const{children:w,...k}=h,_=Qg(k);return _.children=l.all(h),_}return Qg(h)}return(l.options.unknownHandler||Dde)(l,h,d)}function c(h){const d=[];if("children"in h){const p=h.children;let v=-1;for(;++v0&&t.push({type:"text",value:` +`}),t}function FM(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function qM(e,n){const t=Ede(e,n),i=t.one(e,void 0),r=bde(t),a=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&a.children.push({type:"text",value:` +`},r),a}function Pde(e,n){return e&&"run"in e?async function(t,i){const r=qM(t,{file:i,...n});await e.run(r,i)}:function(t,i){return qM(t,{file:i,...e||n})}}function HM(e){if(e)throw e}var Xk,UM;function Nde(){if(UM)return Xk;UM=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,i=Object.getOwnPropertyDescriptor,r=function(c){return typeof Array.isArray=="function"?Array.isArray(c):n.call(c)==="[object Array]"},a=function(c){if(!c||n.call(c)!=="[object Object]")return!1;var h=e.call(c,"constructor"),d=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!h&&!d)return!1;var p;for(p in c);return typeof p>"u"||e.call(c,p)},o=function(c,h){t&&h.name==="__proto__"?t(c,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):c[h.name]=h.newValue},l=function(c,h){if(h==="__proto__")if(e.call(c,h)){if(i)return i(c,h).value}else return;return c[h]};return Xk=function f(){var c,h,d,p,v,b,w=arguments[0],k=1,_=arguments.length,C=!1;for(typeof w=="boolean"&&(C=w,w=arguments[1]||{},k=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});k<_;++k)if(c=arguments[k],c!=null)for(h in c)d=l(w,h),p=l(c,h),w!==p&&(C&&p&&(a(p)||(v=r(p)))?(v?(v=!1,b=d&&r(d)?d:[]):b=d&&a(d)?d:{},o(w,{name:h,newValue:f(C,b,p)})):typeof p<"u"&&o(w,{name:h,newValue:p}));return w},Xk}var $de=Nde();const Zk=pt($de);function t4(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function zde(){const e=[],n={run:t,use:i};return n;function t(...r){let a=-1;const o=r.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...r);function l(f,...c){const h=e[++a];let d=-1;if(f){o(f);return}for(;++do.length;let f;l&&o.push(r);try{f=e.apply(this,o)}catch(c){const h=c;if(l&&t)throw h;return r(h)}l||(f&&f.then&&typeof f.then=="function"?f.then(a,r):f instanceof Error?r(f):a(f))}function r(o,...l){t||(t=!0,n(o,...l))}function a(o){r(null,o)}}const to={basename:Ide,dirname:Bde,extname:Fde,join:qde,sep:"/"};function Ide(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');mp(e);let t=0,i=-1,r=e.length,a;if(n===void 0||n.length===0||n.length>e.length){for(;r--;)if(e.codePointAt(r)===47){if(a){t=r+1;break}}else i<0&&(a=!0,i=r+1);return i<0?"":e.slice(t,i)}if(n===e)return"";let o=-1,l=n.length-1;for(;r--;)if(e.codePointAt(r)===47){if(a){t=r+1;break}}else o<0&&(a=!0,o=r+1),l>-1&&(e.codePointAt(r)===n.codePointAt(l--)?l<0&&(i=r):(l=-1,i=o));return t===i?i=o:i<0&&(i=e.length),e.slice(t,i)}function Bde(e){if(mp(e),e.length===0)return".";let n=-1,t=e.length,i;for(;--t;)if(e.codePointAt(t)===47){if(i){n=t;break}}else i||(i=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Fde(e){mp(e);let n=e.length,t=-1,i=0,r=-1,a=0,o;for(;n--;){const l=e.codePointAt(n);if(l===47){if(o){i=n+1;break}continue}t<0&&(o=!0,t=n+1),l===46?r<0?r=n:a!==1&&(a=1):r>-1&&(a=-1)}return r<0||t<0||a===0||a===1&&r===t-1&&r===i+1?"":e.slice(r,t)}function qde(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Ude(e,n){let t="",i=0,r=-1,a=0,o=-1,l,f;for(;++o<=e.length;){if(o2){if(f=t.lastIndexOf("/"),f!==t.length-1){f<0?(t="",i=0):(t=t.slice(0,f),i=t.length-1-t.lastIndexOf("/")),r=o,a=0;continue}}else if(t.length>0){t="",i=0,r=o,a=0;continue}}n&&(t=t.length>0?t+"/..":"..",i=2)}else t.length>0?t+="/"+e.slice(r+1,o):t=e.slice(r+1,o),i=o-r-1;r=o,a=0}else l===46&&a>-1?a++:a=-1}return t}function mp(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Wde={cwd:Vde};function Vde(){return"/"}function i4(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Gde(e){if(typeof e=="string")e=new URL(e);else if(!i4(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Yde(e)}function Yde(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const n=e.pathname;let t=-1;for(;++t0){let[v,...b]=h;const w=i[p][1];t4(w)&&t4(v)&&(v=Zk(!0,w,v)),i[p]=[c,v,...b]}}}}const Qde=new D9().freeze();function n_(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function t_(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function i_(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function VM(e){if(!t4(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function GM(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Kv(e){return Jde(e)?e:new Zq(e)}function Jde(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function ehe(e){return typeof e=="string"||nhe(e)}function nhe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const the="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",YM=[],KM={allowDangerousHtml:!0},ihe=/^(https?|ircs?|mailto|xmpp)$/i,rhe=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ahe(e){const n=ohe(e),t=she(e);return lhe(n.runSync(n.parse(t),t),e)}function ohe(e){const n=e.rehypePlugins||YM,t=e.remarkPlugins||YM,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...KM}:KM;return Qde().use(Ice).use(t).use(Pde,i).use(n)}function she(e){const n=e.children||"",t=new Zq;return typeof n=="string"&&(t.value=n),t}function lhe(e,n){const t=n.allowedElements,i=n.allowElement,r=n.components,a=n.disallowedElements,o=n.skipHtml,l=n.unwrapDisallowed,f=n.urlTransform||uhe;for(const h of rhe)Object.hasOwn(n,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+the+h.id,void 0);return M9(e,c),_ue(e,{Fragment:y.Fragment,components:r,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function c(h,d,p){if(h.type==="raw"&&p&&typeof d=="number")return o?p.children.splice(d,1):p.children[d]={type:"text",value:h.value},d;if(h.type==="element"){let v;for(v in Gk)if(Object.hasOwn(Gk,v)&&Object.hasOwn(h.properties,v)){const b=h.properties[v],w=Gk[v];(w===null||w.includes(h.tagName))&&(h.properties[v]=f(String(b||""),v,h))}}if(h.type==="element"){let v=t?!t.includes(h.tagName):a?a.includes(h.tagName):!1;if(!v&&i&&typeof d=="number"&&(v=!i(h,d,p)),v&&p&&typeof d=="number")return l&&h.children?p.children.splice(d,1,...h.children):p.children.splice(d,1),d}}}function uhe(e){const n=e.indexOf(":"),t=e.indexOf("?"),i=e.indexOf("#"),r=e.indexOf("/");return n===-1||r!==-1&&n>r||t!==-1&&n>t||i!==-1&&n>i||ihe.test(e.slice(0,n))?e:""}function XM(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let i=0,r=t.indexOf(n);for(;r!==-1;)i++,r=t.indexOf(n,r+n.length);return i}function fhe(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function che(e,n,t){const r=y0((t||{}).ignore||[]),a=dhe(n);let o=-1;for(;++o0?{type:"text",value:O}:void 0),O===!1?p.lastIndex=E+1:(b!==E&&C.push({type:"text",value:c.value.slice(b,E)}),Array.isArray(O)?C.push(...O):O&&C.push(O),b=E+S[0].length,_=!0),!p.global)break;S=p.exec(c.value)}return _?(b?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],i=t.indexOf(")");const r=XM(e,"(");let a=XM(e,")");for(;i!==-1&&r>a;)e+=t.slice(0,i+1),t=t.slice(i+1),i=t.indexOf(")"),a++;return[e,t]}function Qq(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Su(t)||p0(t))&&(!n||t!==47)}Jq.peek=Nhe;function jhe(){this.buffer()}function Ohe(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Ehe(){this.buffer()}function The(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Mhe(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=qa(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Dhe(e){this.exit(e)}function Rhe(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=qa(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Phe(e){this.exit(e)}function Nhe(){return"["}function Jq(e,n,t,i){const r=t.createTracker(i);let a=r.move("[^");const o=t.enter("footnoteReference"),l=t.enter("reference");return a+=r.move(t.safe(t.associationId(e),{after:"]",before:a})),l(),o(),a+=r.move("]"),a}function $he(){return{enter:{gfmFootnoteCallString:jhe,gfmFootnoteCall:Ohe,gfmFootnoteDefinitionLabelString:Ehe,gfmFootnoteDefinition:The},exit:{gfmFootnoteCallString:Mhe,gfmFootnoteCall:Dhe,gfmFootnoteDefinitionLabelString:Rhe,gfmFootnoteDefinition:Phe}}}function zhe(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:Jq},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(i,r,a,o){const l=a.createTracker(o);let f=l.move("[^");const c=a.enter("footnoteDefinition"),h=a.enter("label");return f+=l.move(a.safe(a.associationId(i),{before:f,after:"]"})),h(),f+=l.move("]:"),i.children&&i.children.length>0&&(l.shift(4),f+=l.move((n?` +`:" ")+a.indentLines(a.containerFlow(i,l.current()),n?eH:Lhe))),c(),f}}function Lhe(e,n,t){return n===0?e:eH(e,n,t)}function eH(e,n,t){return(t?"":" ")+e}const Ihe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];nH.peek=Uhe;function Bhe(){return{canContainEols:["delete"],enter:{strikethrough:qhe},exit:{strikethrough:Hhe}}}function Fhe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Ihe}],handlers:{delete:nH}}}function qhe(e){this.enter({type:"delete",children:[]},e)}function Hhe(e){this.exit(e)}function nH(e,n,t,i){const r=t.createTracker(i),a=t.enter("strikethrough");let o=r.move("~~");return o+=t.containerPhrasing(e,{...r.current(),before:o,after:"~"}),o+=r.move("~~"),a(),o}function Uhe(){return"~"}function Whe(e){return e.length}function Vhe(e,n){const t=n||{},i=(t.align||[]).concat(),r=t.stringLength||Whe,a=[],o=[],l=[],f=[];let c=0,h=-1;for(;++hc&&(c=e[h].length);++_f[_])&&(f[_]=S)}w.push(C)}o[h]=w,l[h]=k}let d=-1;if(typeof i=="object"&&"length"in i)for(;++df[d]&&(f[d]=C),v[d]=C),p[d]=S}o.splice(1,0,p),l.splice(1,0,v),h=-1;const b=[];for(;++h "),a.shift(2);const o=t.indentLines(t.containerFlow(e,a.current()),Khe);return r(),o}function Khe(e,n,t){return">"+(t?"":" ")+e}function Xhe(e,n){return QM(e,n.inConstruct,!0)&&!QM(e,n.notInConstruct,!1)}function QM(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let i=-1;for(;++io&&(o=a):a=1,r=i+n.length,i=t.indexOf(n,r);return o}function Qhe(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Jhe(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function eme(e,n,t,i){const r=Jhe(t),a=e.value||"",o=r==="`"?"GraveAccent":"Tilde";if(Qhe(e,t)){const d=t.enter("codeIndented"),p=t.indentLines(a,nme);return d(),p}const l=t.createTracker(i),f=r.repeat(Math.max(Zhe(a,r)+1,3)),c=t.enter("codeFenced");let h=l.move(f);if(e.lang){const d=t.enter(`codeFencedLang${o}`);h+=l.move(t.safe(e.lang,{before:h,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=t.enter(`codeFencedMeta${o}`);h+=l.move(" "),h+=l.move(t.safe(e.meta,{before:h,after:` +`,encode:["`"],...l.current()})),d()}return h+=l.move(` +`),a&&(h+=l.move(a+` +`)),h+=l.move(f),c(),h}function nme(e,n,t){return(t?"":" ")+e}function R9(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function tme(e,n,t,i){const r=R9(t),a=r==='"'?"Quote":"Apostrophe",o=t.enter("definition");let l=t.enter("label");const f=t.createTracker(i);let c=f.move("[");return c+=f.move(t.safe(t.associationId(e),{before:c,after:"]",...f.current()})),c+=f.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),c+=f.move("<"),c+=f.move(t.safe(e.url,{before:c,after:">",...f.current()})),c+=f.move(">")):(l=t.enter("destinationRaw"),c+=f.move(t.safe(e.url,{before:c,after:e.title?" ":` +`,...f.current()}))),l(),e.title&&(l=t.enter(`title${a}`),c+=f.move(" "+r),c+=f.move(t.safe(e.title,{before:c,after:r,...f.current()})),c+=f.move(r),l()),o(),c}function ime(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function rm(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Jg(e,n,t){const i=ac(e),r=ac(n);return i===void 0?r===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}tH.peek=rme;function tH(e,n,t,i){const r=ime(t),a=t.enter("emphasis"),o=t.createTracker(i),l=o.move(r);let f=o.move(t.containerPhrasing(e,{after:r,before:l,...o.current()}));const c=f.charCodeAt(0),h=Jg(i.before.charCodeAt(i.before.length-1),c,r);h.inside&&(f=rm(c)+f.slice(1));const d=f.charCodeAt(f.length-1),p=Jg(i.after.charCodeAt(0),d,r);p.inside&&(f=f.slice(0,-1)+rm(d));const v=o.move(r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+f+v}function rme(e,n,t){return t.options.emphasis||"*"}function ame(e,n){let t=!1;return M9(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return t=!0,e4}),!!((!e.depth||e.depth<3)&&S9(e)&&(n.options.setext||t))}function ome(e,n,t,i){const r=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(i);if(ame(e,t)){const h=t.enter("headingSetext"),d=t.enter("phrasing"),p=t.containerPhrasing(e,{...a.current(),before:` +`,after:` +`});return d(),h(),p+` +`+(r===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(` +`))+1))}const o="#".repeat(r),l=t.enter("headingAtx"),f=t.enter("phrasing");a.move(o+" ");let c=t.containerPhrasing(e,{before:"# ",after:` +`,...a.current()});return/^[\t ]/.test(c)&&(c=rm(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,t.options.closeAtx&&(c+=" "+o),f(),l(),c}iH.peek=sme;function iH(e){return e.value||""}function sme(){return"<"}rH.peek=lme;function rH(e,n,t,i){const r=R9(t),a=r==='"'?"Quote":"Apostrophe",o=t.enter("image");let l=t.enter("label");const f=t.createTracker(i);let c=f.move("![");return c+=f.move(t.safe(e.alt,{before:c,after:"]",...f.current()})),c+=f.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),c+=f.move("<"),c+=f.move(t.safe(e.url,{before:c,after:">",...f.current()})),c+=f.move(">")):(l=t.enter("destinationRaw"),c+=f.move(t.safe(e.url,{before:c,after:e.title?" ":")",...f.current()}))),l(),e.title&&(l=t.enter(`title${a}`),c+=f.move(" "+r),c+=f.move(t.safe(e.title,{before:c,after:r,...f.current()})),c+=f.move(r),l()),c+=f.move(")"),o(),c}function lme(){return"!"}aH.peek=ume;function aH(e,n,t,i){const r=e.referenceType,a=t.enter("imageReference");let o=t.enter("label");const l=t.createTracker(i);let f=l.move("![");const c=t.safe(e.alt,{before:f,after:"]",...l.current()});f+=l.move(c+"]["),o();const h=t.stack;t.stack=[],o=t.enter("reference");const d=t.safe(t.associationId(e),{before:f,after:"]",...l.current()});return o(),t.stack=h,a(),r==="full"||!c||c!==d?f+=l.move(d+"]"):r==="shortcut"?f=f.slice(0,-1):f+=l.move("]"),f}function ume(){return"!"}oH.peek=fme;function oH(e,n,t){let i=e.value||"",r="`",a=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(i);)r+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++a\u007F]/.test(e.url))}lH.peek=cme;function lH(e,n,t,i){const r=R9(t),a=r==='"'?"Quote":"Apostrophe",o=t.createTracker(i);let l,f;if(sH(e,t)){const h=t.stack;t.stack=[],l=t.enter("autolink");let d=o.move("<");return d+=o.move(t.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),l(),t.stack=h,d}l=t.enter("link"),f=t.enter("label");let c=o.move("[");return c+=o.move(t.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=t.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(t.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(f=t.enter("destinationRaw"),c+=o.move(t.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),f(),e.title&&(f=t.enter(`title${a}`),c+=o.move(" "+r),c+=o.move(t.safe(e.title,{before:c,after:r,...o.current()})),c+=o.move(r),f()),c+=o.move(")"),l(),c}function cme(e,n,t){return sH(e,t)?"<":"["}uH.peek=dme;function uH(e,n,t,i){const r=e.referenceType,a=t.enter("linkReference");let o=t.enter("label");const l=t.createTracker(i);let f=l.move("[");const c=t.containerPhrasing(e,{before:f,after:"]",...l.current()});f+=l.move(c+"]["),o();const h=t.stack;t.stack=[],o=t.enter("reference");const d=t.safe(t.associationId(e),{before:f,after:"]",...l.current()});return o(),t.stack=h,a(),r==="full"||!c||c!==d?f+=l.move(d+"]"):r==="shortcut"?f=f.slice(0,-1):f+=l.move("]"),f}function dme(){return"["}function P9(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function hme(e){const n=P9(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function mme(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function fH(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function pme(e,n,t,i){const r=t.enter("list"),a=t.bulletCurrent;let o=e.ordered?mme(t):P9(t);const l=e.ordered?o==="."?")":".":hme(t);let f=n&&t.bulletLastUsed?o===t.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&h&&(!h.children||!h.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(f=!0),fH(t)===o&&h){let d=-1;for(;++d-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let o=a.length+1;(r==="tab"||r==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=t.createTracker(i);l.move(a+" ".repeat(o-a.length)),l.shift(o);const f=t.enter("listItem"),c=t.indentLines(t.containerFlow(e,l.current()),h);return f(),c;function h(d,p,v){return p?(v?"":" ".repeat(o))+d:(v?a:a+" ".repeat(o-a.length))+d}}function yme(e,n,t,i){const r=t.enter("paragraph"),a=t.enter("phrasing"),o=t.containerPhrasing(e,i);return a(),r(),o}const bme=y0(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function wme(e,n,t,i){return(e.children.some(function(o){return bme(o)})?t.containerPhrasing:t.containerFlow).call(t,e,i)}function kme(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}cH.peek=_me;function cH(e,n,t,i){const r=kme(t),a=t.enter("strong"),o=t.createTracker(i),l=o.move(r+r);let f=o.move(t.containerPhrasing(e,{after:r,before:l,...o.current()}));const c=f.charCodeAt(0),h=Jg(i.before.charCodeAt(i.before.length-1),c,r);h.inside&&(f=rm(c)+f.slice(1));const d=f.charCodeAt(f.length-1),p=Jg(i.after.charCodeAt(0),d,r);p.inside&&(f=f.slice(0,-1)+rm(d));const v=o.move(r+r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+f+v}function _me(e,n,t){return t.options.strong||"*"}function xme(e,n,t,i){return t.safe(e.value,i)}function Sme(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function Cme(e,n,t){const i=(fH(t)+(t.options.ruleSpaces?" ":"")).repeat(Sme(t));return t.options.ruleSpaces?i.slice(0,-1):i}const dH={blockquote:Yhe,break:JM,code:eme,definition:tme,emphasis:tH,hardBreak:JM,heading:ome,html:iH,image:rH,imageReference:aH,inlineCode:oH,link:lH,linkReference:uH,list:pme,listItem:gme,paragraph:yme,root:wme,strong:cH,text:xme,thematicBreak:Cme};function Ame(){return{enter:{table:jme,tableData:e8,tableHeader:e8,tableRow:Eme},exit:{codeText:Tme,table:Ome,tableData:s_,tableHeader:s_,tableRow:s_}}}function jme(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function Ome(e){this.exit(e),this.data.inTable=void 0}function Eme(e){this.enter({type:"tableRow",children:[]},e)}function s_(e){this.exit(e)}function e8(e){this.enter({type:"tableCell",children:[]},e)}function Tme(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Mme));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Mme(e,n){return n==="|"?n:e}function Dme(e){const n=e||{},t=n.tableCellPadding,i=n.tablePipeAlign,r=n.stringLength,a=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:o,tableCell:f,tableRow:l}};function o(v,b,w,k){return c(h(v,w,k),v.align)}function l(v,b,w,k){const _=d(v,w,k),C=c([_]);return C.slice(0,C.indexOf(` +`))}function f(v,b,w,k){const _=w.enter("tableCell"),C=w.enter("phrasing"),S=w.containerPhrasing(v,{...k,before:a,after:a});return C(),_(),S}function c(v,b){return Vhe(v,{align:b,alignDelimiters:i,padding:t,stringLength:r})}function h(v,b,w){const k=v.children;let _=-1;const C=[],S=b.enter("table");for(;++_0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const Xme={tokenize:rpe,partial:!0};function Zme(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:npe,continuation:{tokenize:tpe},exit:ipe}},text:{91:{name:"gfmFootnoteCall",tokenize:epe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Qme,resolveTo:Jme}}}}function Qme(e,n,t){const i=this;let r=i.events.length;const a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o;for(;r--;){const f=i.events[r][1];if(f.type==="labelImage"){o=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return l;function l(f){if(!o||!o._balanced)return t(f);const c=qa(i.sliceSerialize({start:o.end,end:i.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?t(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),n(f))}}function Jme(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[t+1],e[t+2],["enter",i,n],e[t+3],e[t+4],["enter",r,n],["exit",r,n],["enter",a,n],["enter",o,n],["exit",o,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",i,n]];return e.splice(t,e.length-t+1,...l),e}function epe(e,n,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a=0,o;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),f}function f(d){return d!==94?t(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(a>999||d===93&&!o||d===null||d===91||Nt(d))return t(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return r.includes(qa(i.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(d)}return Nt(d)||(o=!0),a++,e.consume(d),d===92?h:c}function h(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function npe(e,n,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a,o=0,l;return f;function f(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):t(b)}function h(b){if(o>999||b===93&&!l||b===null||b===91||Nt(b))return t(b);if(b===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=qa(i.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Nt(b)||(l=!0),o++,e.consume(b),b===92?d:h}function d(b){return b===91||b===92||b===93?(e.consume(b),o++,h):h(b)}function p(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),r.includes(a)||r.push(a),ot(e,v,"gfmFootnoteDefinitionWhitespace")):t(b)}function v(b){return n(b)}}function tpe(e,n,t){return e.check(hp,n,e.attempt(Xme,n,t))}function ipe(e){e.exit("gfmFootnoteDefinition")}function rpe(e,n,t){const i=this;return ot(e,r,"gfmFootnoteDefinitionIndent",5);function r(a){const o=i.events[i.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?n(a):t(a)}}function ape(e){let t=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:a,resolveAll:r};return t==null&&(t=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function r(o,l){let f=-1;for(;++f1?f(b):(o.consume(b),d++,v);if(d<2&&!t)return f(b);const k=o.exit("strikethroughSequenceTemporary"),_=ac(b);return k._open=!_||_===2&&!!w,k._close=!w||w===2&&!!_,l(b)}}}class ope{constructor(){this.map=[]}add(n,t,i){spe(this,n,t,i)}consume(n){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let t=this.map.length;const i=[];for(;t>0;)t-=1,i.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];i.push(n.slice()),n.length=0;let r=i.pop();for(;r;){for(const a of r)n.push(a);r=i.pop()}this.map.length=0}}function spe(e,n,t,i){let r=0;if(!(t===0&&i.length===0)){for(;r-1;){const U=i.events[z][1].type;if(U==="lineEnding"||U==="linePrefix")z--;else break}const B=z>-1?i.events[z][1].type:null,V=B==="tableHead"||B==="tableRow"?O:f;return V===O&&i.parser.lazy[i.now().line]?t(P):V(P)}function f(P){return e.enter("tableHead"),e.enter("tableRow"),c(P)}function c(P){return P===124||(o=!0,a+=1),h(P)}function h(P){return P===null?t(P):kn(P)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),v):t(P):Qn(P)?ot(e,h,"whitespace")(P):(a+=1,o&&(o=!1,r+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),o=!0,h):(e.enter("data"),d(P)))}function d(P){return P===null||P===124||Nt(P)?(e.exit("data"),h(P)):(e.consume(P),P===92?p:d)}function p(P){return P===92||P===124?(e.consume(P),d):d(P)}function v(P){return i.interrupt=!1,i.parser.lazy[i.now().line]?t(P):(e.enter("tableDelimiterRow"),o=!1,Qn(P)?ot(e,b,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):b(P))}function b(P){return P===45||P===58?k(P):P===124?(o=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),w):j(P)}function w(P){return Qn(P)?ot(e,k,"whitespace")(P):k(P)}function k(P){return P===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),_):P===45?(a+=1,_(P)):P===null||kn(P)?E(P):j(P)}function _(P){return P===45?(e.enter("tableDelimiterFiller"),C(P)):j(P)}function C(P){return P===45?(e.consume(P),C):P===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),S):(e.exit("tableDelimiterFiller"),S(P))}function S(P){return Qn(P)?ot(e,E,"whitespace")(P):E(P)}function E(P){return P===124?b(P):P===null||kn(P)?!o||r!==a?j(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(P)):j(P)}function j(P){return t(P)}function O(P){return e.enter("tableRow"),M(P)}function M(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),M):P===null||kn(P)?(e.exit("tableRow"),n(P)):Qn(P)?ot(e,M,"whitespace")(P):(e.enter("data"),$(P))}function $(P){return P===null||P===124||Nt(P)?(e.exit("data"),M(P)):(e.consume(P),P===92?q:$)}function q(P){return P===92||P===124?(e.consume(P),$):$(P)}}function cpe(e,n){let t=-1,i=!0,r=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,f=0,c,h,d;const p=new ope;for(;++tt[2]+1){const b=t[2]+1,w=t[3]-t[2]-1;e.add(b,w,[])}}e.add(t[3]+1,0,[["exit",d,n]])}return r!==void 0&&(a.end=Object.assign({},Lf(n.events,r)),e.add(r,0,[["exit",a,n]]),a=void 0),a}function t8(e,n,t,i,r){const a=[],o=Lf(n.events,t);r&&(r.end=Object.assign({},o),a.push(["exit",r,n])),i.end=Object.assign({},o),a.push(["exit",i,n]),e.add(t+1,0,a)}function Lf(e,n){const t=e[n],i=t[0]==="enter"?"start":"end";return t[1][i]}const dpe={name:"tasklistCheck",tokenize:mpe};function hpe(){return{text:{91:dpe}}}function mpe(e,n,t){const i=this;return r;function r(f){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?t(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),a)}function a(f){return Nt(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),o):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),o):t(f)}function o(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):t(f)}function l(f){return kn(f)?n(f):Qn(f)?e.check({tokenize:ppe},n,t)(f):t(f)}}function ppe(e,n,t){return ot(e,i,"whitespace");function i(r){return r===null?t(r):n(r)}}function vpe(e){return Mq([Fme(),Zme(),ape(e),upe(),hpe()])}const gpe={};function ype(e){const n=this,t=e||gpe,i=n.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),a=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),o=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(vpe(t)),a.push(zme()),o.push(Lme(t))}const a4="kanban_chat_v1";function bpe(){try{const e=localStorage.getItem(a4);if(!e)return[];const n=JSON.parse(e);if(Array.isArray(n))return n}catch{}return[]}function wpe({onBoardChange:e}){const[n,t]=A.useState(()=>bpe()),[i,r]=A.useState(""),[a,o]=A.useState(!1),[l,f]=A.useState(""),[c,h]=A.useState([]),d=A.useRef(null);A.useEffect(()=>{localStorage.setItem(a4,JSON.stringify(n))},[n]),A.useEffect(()=>{var w;(w=d.current)==null||w.scrollTo({top:d.current.scrollHeight,behavior:"smooth"})},[n,l,c,a]);const p=async()=>{const w=i.trim();if(!w||a)return;const k={role:"user",content:w,ts:Date.now()},_=[...n,k];t(_),r(""),o(!0),f(""),h([]);let C="";const S=[];let E=!1;const j=O=>{switch(O.type){case"delta":C+=O.text,f(C);break;case"tool_use":{const M={tool:O.tool,ok:!0,input:O.input};S.push(M),h([...S]);break}case"tool_result":{for(let M=S.length-1;M>=0;M--){const $=S[M];if($.error===void 0&&$.ok){O.is_error&&($.ok=!1,$.error=O.result||"tool error");break}}h([...S]);break}case"result":O.text&&C.trim()===""&&(C=O.text,f(C));break;case"done":O.board_changed&&(E=!0);break;case"error":C=`Error: ${O.error}`,f(C);break}};try{const O=_.map(M=>({role:M.role,content:M.content}));await Qie(O,j)}catch(O){const M=O.message;jn.show({color:"red",message:M}),C=C||`Error: ${M}`}finally{const O={role:"assistant",content:C,ts:Date.now(),tool_calls:S.length>0?S:void 0};t(M=>[...M,O]),f(""),h([]),o(!1),E&&e()}},v=w=>{w.key==="Enter"&&!w.shiftKey&&(w.preventDefault(),p())},b=()=>{t([]),localStorage.removeItem(a4)};return y.jsxs(Pn,{gap:0,h:"100%",children:[y.jsxs(qe,{justify:"space-between",p:"xs",style:{borderBottom:"1px solid var(--mantine-color-dark-4)"},children:[y.jsxs(qe,{gap:6,children:[y.jsx(fq,{size:18}),y.jsx(je,{fw:600,size:"sm",children:"Asistente"})]}),y.jsx(Gt,{label:"Limpiar conversacion",withArrow:!0,children:y.jsx(ht,{variant:"subtle",color:"gray",size:"sm",onClick:b,disabled:n.length===0,children:y.jsx(ml,{size:14})})})]}),y.jsx(xa,{viewportRef:d,style:{flex:1},type:"auto",p:"xs",children:y.jsxs(Pn,{gap:"xs",children:[n.length===0&&!a&&y.jsxs(je,{size:"sm",c:"dimmed",ta:"center",mt:"md",children:["Escribe algo. Ejemplos:",y.jsx("br",{}),'- "crea columna Backlog"',y.jsx("br",{}),'- "anade tarjeta para revisar PR de Lucas en Doing"',y.jsx("br",{}),'- "que hay en Doing?"']}),n.map((w,k)=>y.jsx(i8,{msg:w},k)),a&&y.jsx(i8,{msg:{role:"assistant",content:l,ts:Date.now(),tool_calls:c.length>0?c:void 0},streaming:!0}),a&&l===""&&c.length===0&&y.jsxs(qe,{gap:6,pl:"xs",children:[y.jsx(gi,{size:"xs"}),y.jsx(je,{size:"xs",c:"dimmed",children:"Pensando..."})]})]})}),y.jsx(Pn,{gap:4,p:"xs",style:{borderTop:"1px solid var(--mantine-color-dark-4)"},children:y.jsxs(qe,{align:"flex-end",gap:4,wrap:"nowrap",children:[y.jsx(ku,{placeholder:"Pide algo... (Enter envia, Shift+Enter newline)",value:i,onChange:w=>r(w.currentTarget.value),onKeyDown:v,disabled:a,autosize:!0,minRows:1,maxRows:6,style:{flex:1}}),y.jsx(ht,{size:"lg",variant:"filled",onClick:p,disabled:!i.trim()||a,"aria-label":"Send",children:a?y.jsx(gi,{size:"xs",color:"white"}):y.jsx(dq,{size:16})})]})})]})}function i8({msg:e,streaming:n=!1}){const t=e.role==="user";return y.jsx(Et,{p:"xs",radius:"md",withBorder:!0,bg:t?"blue.9":"dark.6",style:{alignSelf:t?"flex-end":"flex-start",maxWidth:"92%"},children:y.jsxs(Pn,{gap:4,children:[e.content&&y.jsx(de,{className:"kanban-md",style:{fontSize:13,lineHeight:1.45,color:"var(--mantine-color-text)"},children:y.jsx(ahe,{remarkPlugins:[ype],children:e.content})}),n&&e.content&&y.jsx(de,{style:{display:"inline-block",width:8,height:14,background:"currentColor",opacity:.6}}),e.tool_calls&&e.tool_calls.length>0&&y.jsx(qe,{gap:4,wrap:"wrap",children:e.tool_calls.map((i,r)=>y.jsxs(lt,{size:"xs",color:i.ok?"teal":"red",variant:"light",title:i.error||"",leftSection:i.ok&&n?y.jsx(gi,{size:8,color:"teal"}):null,children:[i.tool,!i.ok&&i.error?`: ${i.error}`:""]},r))})]})})}const kpe=["Lun","Mar","Mie","Jue","Vie","Sab","Dom"];function _pe({users:e,cards:n,onJumpToCard:t,onOpenDailyReport:i}){const[r,a]=A.useState(null),[o,l]=A.useState(new Date),[f,c]=A.useState(null),[h,d]=A.useState(null),[p,v]=A.useState(!1);A.useEffect(()=>{let S=!1;v(!0);const E=Ie(o).startOf("month").format("YYYY-MM-DD"),j=Ie(o).endOf("month").format("YYYY-MM-DD");return eF({from:E,to:j,assignee_id:f||void 0}).then(O=>{S||d(O)}).finally(()=>{S||v(!1)}),()=>{S=!0}},[o,f]);const b=A.useMemo(()=>e.map(S=>({value:S.id,label:S.display_name||S.username})),[e]),w=A.useMemo(()=>{const S=new Map;if(!h)return S;for(const E of h.created_daily){const j=S.get(E.date)??{created:0,done:0,deadlines:[]};j.created=E.count,S.set(E.date,j)}for(const E of h.throughput_daily){const j=S.get(E.date)??{created:0,done:0,deadlines:[]};j.done=E.count,S.set(E.date,j)}for(const E of n){if(!E.deadline||E.deleted_at)continue;const j=E.deadline.slice(0,10),O=S.get(j)??{created:0,done:0,deadlines:[]};O.deadlines.push(E),S.set(j,O)}return S},[h,n]),k=A.useMemo(()=>{const S=Ie(o).startOf("month"),E=Ie(o).endOf("month"),j=(S.day()+6)%7,O=[];for(let M=0;MArray.from(w.values()).reduce((S,E)=>S+E.created,0),[w]),C=A.useMemo(()=>Array.from(w.values()).reduce((S,E)=>S+E.done,0),[w]);return y.jsx(de,{p:"md",children:y.jsxs(Pn,{gap:"md",children:[y.jsxs(qe,{justify:"space-between",children:[y.jsx(bl,{order:3,children:"Calendario"}),y.jsxs(qe,{gap:"xs",wrap:"nowrap",children:[y.jsx(h9,{label:"Mes",size:"xs",value:o,onChange:S=>S&&l(typeof S=="string"?new Date(S):S),style:{minWidth:160},clearable:!1}),y.jsx(ya,{label:"Asignado",size:"xs",placeholder:"Todos",value:f,onChange:c,data:b,clearable:!0,searchable:!0,style:{minWidth:180}})]})]}),y.jsxs(qe,{gap:"md",children:[y.jsx(Et,{withBorder:!0,p:"sm",radius:"md",children:y.jsxs(qe,{gap:6,children:[y.jsx(ic,{size:14,color:"var(--mantine-color-blue-5)"}),y.jsx(je,{size:"sm",fw:600,children:_}),y.jsx(je,{size:"xs",c:"dimmed",children:"creadas"})]})}),y.jsx(Et,{withBorder:!0,p:"sm",radius:"md",children:y.jsxs(qe,{gap:6,children:[y.jsx(tm,{size:14,color:"var(--mantine-color-green-5)"}),y.jsx(je,{size:"sm",fw:600,children:C}),y.jsx(je,{size:"xs",c:"dimmed",children:"hechas"})]})})]}),p&&!h?y.jsx(Lc,{p:"xl",children:y.jsx(gi,{})}):y.jsxs(Et,{withBorder:!0,p:"md",radius:"md",children:[y.jsx(Uo,{cols:7,spacing:4,mb:4,children:kpe.map(S=>y.jsx(je,{size:"xs",c:"dimmed",ta:"center",fw:600,children:S},S))}),y.jsx(Uo,{cols:7,spacing:4,children:k.map((S,E)=>{if(!S.date)return y.jsx(de,{style:{minHeight:72}},E);const j=w.get(S.date)??{created:0,done:0,deadlines:[]},O=parseInt(S.date.slice(8,10),10),M=S.date===Ie().format("YYYY-MM-DD"),$=Ie().startOf("day").valueOf(),P=Ie(S.date).startOf("day").valueOf()<$;return y.jsx(Et,{p:6,withBorder:!0,radius:"sm",style:{minHeight:72,borderColor:M?"var(--mantine-color-blue-5)":void 0,background:j.done>0?"rgba(81, 207, 102, 0.08)":j.created>0?"rgba(34, 139, 230, 0.06)":void 0},children:y.jsxs(Pn,{gap:2,children:[y.jsx(Dt,{onClick:()=>S.date&&(i==null?void 0:i(S.date)),title:"Ver reporte diario",style:{alignSelf:"flex-start"},"data-test":`calendar-day-${S.date}`,children:y.jsx(je,{size:"xs",fw:M?700:500,c:M?"blue":void 0,td:i?"underline":void 0,style:{cursor:i?"pointer":"default"},children:O})}),j.created>0&&y.jsxs(qe,{gap:3,wrap:"nowrap",children:[y.jsx(ic,{size:10,color:"var(--mantine-color-blue-5)"}),y.jsx(je,{size:"xs",c:"blue",children:j.created})]}),j.done>0&&y.jsxs(qe,{gap:3,wrap:"nowrap",children:[y.jsx(tm,{size:10,color:"var(--mantine-color-green-5)"}),y.jsx(je,{size:"xs",c:"green",children:j.done})]}),j.deadlines.length>0&&y.jsxs(Tn,{opened:r===S.date,onChange:z=>a(z?S.date:null),position:"bottom",withArrow:!0,shadow:"md",width:280,children:[y.jsx(Tn.Target,{children:y.jsx(Dt,{onClick:()=>a(r===S.date?null:S.date),style:{textAlign:"left"},children:y.jsx(Pn,{gap:1,children:y.jsxs(qe,{gap:3,wrap:"nowrap",children:[y.jsx(Kg,{size:10,color:P?"var(--mantine-color-red-5)":"var(--mantine-color-orange-5)"}),y.jsxs(je,{size:"xs",c:P?"red":"orange",fw:700,td:"underline",children:[j.deadlines.length," deadline",j.deadlines.length===1?"":"s"]})]})})})}),y.jsx(Tn.Dropdown,{p:6,children:y.jsxs(Pn,{gap:2,children:[y.jsxs(je,{size:"xs",c:"dimmed",fw:600,mb:2,children:["Vencen el ",Ie(S.date).format("DD/MM/YYYY")]}),j.deadlines.map(z=>y.jsx(Dt,{onClick:()=>{a(null),t==null||t(z.id)},style:{padding:"4px 6px",borderRadius:4,background:"var(--mantine-color-dark-6)"},children:y.jsxs(qe,{gap:6,wrap:"nowrap",children:[y.jsxs(je,{size:"xs",c:"dimmed",ff:"monospace",children:["#",String(z.seq_num).padStart(5,"0")]}),y.jsx(je,{size:"xs",lineClamp:1,title:z.title,children:z.title})]})},z.id))]})})]})]})},E)})})]})]})})}function kH(e){return e?e.reduce((n,t)=>{const i=t.name.search(/\./);if(i>=0){const r=t.name.substring(i+1);return n[r]=t.label,n}return n[t.name]=t.label,n},{}):{}}var xpe={tooltip:"m_e4d36c9b",tooltipLabel:"m_7f4bcb19",tooltipBody:"m_3de554dd",tooltipItemColor:"m_b30369b5",tooltipItem:"m_3de8964e",tooltipItemBody:"m_50186d10",tooltipItemName:"m_501dadf9",tooltipItemData:"m_50192318"};function Spe(e){return e.map(n=>{if(!n.payload||n.payload[n.name])return n;const t=n.name.search(/\./);if(t>=0){const i=n.name.substring(0,t),r={...n.payload[i]},a=Object.entries(n.payload).reduce((o,l)=>{const[f,c]=l;return f===i?o:{...o,[f]:c}},{});return{...n,name:n.name.substring(t+1),payload:{...a,...r}}}return n})}function Cpe(e,n){const t=Spe(e.filter(i=>i.fill!=="none"||!i.color));return n?t.filter(i=>i.name===n):t}function r8(e,n){return n==="radial"||n==="scatter"?Array.isArray(e.value)?e.value[1]-e.value[0]:e.value:Array.isArray(e.payload[e.dataKey])?e.payload[e.dataKey][1]-e.payload[e.dataKey][0]:e.payload[e.name]}const Ape={type:"area",showColor:!0},$9=Re(e=>{var P,z;const n=be("ChartTooltip",Ape,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,payload:f,label:c,unit:h,type:d,segmentId:p,mod:v,series:b,valueFormatter:w,showColor:k,attributes:_,...C}=n,S=ui(),E=Xe({name:"ChartTooltip",classes:xpe,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_});if(!f)return null;const j=Cpe(f,p),O=d==="scatter"?(z=(P=f[0])==null?void 0:P.payload)==null?void 0:z.name:null,M=kH(b),$=c||O,q=j.map(B=>y.jsxs("div",{"data-type":d,...E("tooltipItem"),children:[y.jsxs("div",{...E("tooltipItemBody"),children:[k&&y.jsx("svg",{...E("tooltipItemColor"),children:y.jsx("circle",{r:6,fill:ut(B.color,S),width:12,height:12,cx:6,cy:6})}),y.jsx("div",{...E("tooltipItemName"),children:M[B.name]||B.name})]}),y.jsxs("div",{...E("tooltipItemData"),children:[typeof w=="function"?w(r8(B,d)):r8(B,d),h||B.unit]})]},(B==null?void 0:B.key)??B.name));return y.jsxs(de,{...E("tooltip"),mod:[{type:d},v],...C,children:[$&&y.jsx("div",{...E("tooltipLabel"),children:$}),y.jsx("div",{...E("tooltipBody"),children:q})]})});$9.displayName="@mantine/charts/ChartTooltip";var _H={legend:"m_847eaf",legendItem:"m_17da7e62",legendItemColor:"m_6e236e21",legendItemName:"m_8ff56c0d"};function jpe(e){return e.map(n=>{var i;const t=(i=n.dataKey)==null?void 0:i.split(".").pop();return{...n,dataKey:t,payload:{...n.payload,name:t,dataKey:t}}})}function Ope(e){return jpe(e.filter(n=>n.color!=="none"))}const w0=Re(e=>{const n=be("ChartLegend",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,payload:f,onHighlight:c,legendPosition:h,mod:d,series:p,showColor:v,centered:b,attributes:w,...k}=n,_=Xe({name:"ChartLegend",classes:_H,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,rootSelector:"legend"});if(!f)return null;const C=Ope(f),S=kH(p),E=C.map((j,O)=>y.jsxs("div",{..._("legendItem"),onMouseEnter:()=>c(j.dataKey),onMouseLeave:()=>c(null),"data-without-color":v===!1||void 0,children:[y.jsx(Ic,{color:j.color,size:12,..._("legendItemColor"),withShadow:!1}),y.jsx("p",{..._("legendItemName"),children:S[j.dataKey]||j.dataKey})]},O));return y.jsx(de,{mod:[{position:h,centered:b},d],..._("legend"),...k,children:E})});w0.displayName="@mantine/charts/ChartLegend";w0.classes=_H;function Epe({x:e,y:n,value:t,valueFormatter:i}){return y.jsx("g",{transform:`translate(${e},${n})`,children:y.jsx("text",{x:0,y:0,dy:-8,dx:-10,textAnchor:"start",fill:"var(--chart-text-color, var(--mantine-color-dimmed))",fontSize:8,children:i?i(t):t})})}var k0={root:"m_a50f3e58",container:"m_af9188cb",grid:"m_a50a48bc",axis:"m_a507a517",axisLabel:"m_2293801d",tooltip:"m_92b296cd"},l_,a8;function Ar(){if(a8)return l_;a8=1;var e=Array.isArray;return l_=e,l_}var u_,o8;function xH(){if(o8)return u_;o8=1;var e=typeof Pv=="object"&&Pv&&Pv.Object===Object&&Pv;return u_=e,u_}var f_,s8;function xo(){if(s8)return f_;s8=1;var e=xH(),n=typeof self=="object"&&self&&self.Object===Object&&self,t=e||n||Function("return this")();return f_=t,f_}var c_,l8;function pp(){if(l8)return c_;l8=1;var e=xo(),n=e.Symbol;return c_=n,c_}var d_,u8;function Tpe(){if(u8)return d_;u8=1;var e=pp(),n=Object.prototype,t=n.hasOwnProperty,i=n.toString,r=e?e.toStringTag:void 0;function a(o){var l=t.call(o,r),f=o[r];try{o[r]=void 0;var c=!0}catch{}var h=i.call(o);return c&&(l?o[r]=f:delete o[r]),h}return d_=a,d_}var h_,f8;function Mpe(){if(f8)return h_;f8=1;var e=Object.prototype,n=e.toString;function t(i){return n.call(i)}return h_=t,h_}var m_,c8;function vs(){if(c8)return m_;c8=1;var e=pp(),n=Tpe(),t=Mpe(),i="[object Null]",r="[object Undefined]",a=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?r:i:a&&a in Object(l)?n(l):t(l)}return m_=o,m_}var p_,d8;function gs(){if(d8)return p_;d8=1;function e(n){return n!=null&&typeof n=="object"}return p_=e,p_}var v_,h8;function Qc(){if(h8)return v_;h8=1;var e=vs(),n=gs(),t="[object Symbol]";function i(r){return typeof r=="symbol"||n(r)&&e(r)==t}return v_=i,v_}var g_,m8;function z9(){if(m8)return g_;m8=1;var e=Ar(),n=Qc(),t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function r(a,o){if(e(a))return!1;var l=typeof a;return l=="number"||l=="symbol"||l=="boolean"||a==null||n(a)?!0:i.test(a)||!t.test(a)||o!=null&&a in Object(o)}return g_=r,g_}var y_,p8;function xl(){if(p8)return y_;p8=1;function e(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}return y_=e,y_}var b_,v8;function L9(){if(v8)return b_;v8=1;var e=vs(),n=xl(),t="[object AsyncFunction]",i="[object Function]",r="[object GeneratorFunction]",a="[object Proxy]";function o(l){if(!n(l))return!1;var f=e(l);return f==i||f==r||f==t||f==a}return b_=o,b_}var w_,g8;function Dpe(){if(g8)return w_;g8=1;var e=xo(),n=e["__core-js_shared__"];return w_=n,w_}var k_,y8;function Rpe(){if(y8)return k_;y8=1;var e=Dpe(),n=(function(){var i=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function t(i){return!!n&&n in i}return k_=t,k_}var __,b8;function SH(){if(b8)return __;b8=1;var e=Function.prototype,n=e.toString;function t(i){if(i!=null){try{return n.call(i)}catch{}try{return i+""}catch{}}return""}return __=t,__}var x_,w8;function Ppe(){if(w8)return x_;w8=1;var e=L9(),n=Rpe(),t=xl(),i=SH(),r=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,f=o.toString,c=l.hasOwnProperty,h=RegExp("^"+f.call(c).replace(r,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(p){if(!t(p)||n(p))return!1;var v=e(p)?h:a;return v.test(i(p))}return x_=d,x_}var S_,k8;function Npe(){if(k8)return S_;k8=1;function e(n,t){return n==null?void 0:n[t]}return S_=e,S_}var C_,_8;function Iu(){if(_8)return C_;_8=1;var e=Ppe(),n=Npe();function t(i,r){var a=n(i,r);return e(a)?a:void 0}return C_=t,C_}var A_,x8;function _0(){if(x8)return A_;x8=1;var e=Iu(),n=e(Object,"create");return A_=n,A_}var j_,S8;function $pe(){if(S8)return j_;S8=1;var e=_0();function n(){this.__data__=e?e(null):{},this.size=0}return j_=n,j_}var O_,C8;function zpe(){if(C8)return O_;C8=1;function e(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}return O_=e,O_}var E_,A8;function Lpe(){if(A8)return E_;A8=1;var e=_0(),n="__lodash_hash_undefined__",t=Object.prototype,i=t.hasOwnProperty;function r(a){var o=this.__data__;if(e){var l=o[a];return l===n?void 0:l}return i.call(o,a)?o[a]:void 0}return E_=r,E_}var T_,j8;function Ipe(){if(j8)return T_;j8=1;var e=_0(),n=Object.prototype,t=n.hasOwnProperty;function i(r){var a=this.__data__;return e?a[r]!==void 0:t.call(a,r)}return T_=i,T_}var M_,O8;function Bpe(){if(O8)return M_;O8=1;var e=_0(),n="__lodash_hash_undefined__";function t(i,r){var a=this.__data__;return this.size+=this.has(i)?0:1,a[i]=e&&r===void 0?n:r,this}return M_=t,M_}var D_,E8;function Fpe(){if(E8)return D_;E8=1;var e=$pe(),n=zpe(),t=Lpe(),i=Ipe(),r=Bpe();function a(o){var l=-1,f=o==null?0:o.length;for(this.clear();++l-1}return L_=n,L_}var I_,$8;function Vpe(){if($8)return I_;$8=1;var e=x0();function n(t,i){var r=this.__data__,a=e(r,t);return a<0?(++this.size,r.push([t,i])):r[a][1]=i,this}return I_=n,I_}var B_,z8;function S0(){if(z8)return B_;z8=1;var e=qpe(),n=Hpe(),t=Upe(),i=Wpe(),r=Vpe();function a(o){var l=-1,f=o==null?0:o.length;for(this.clear();++l0?1:-1},fu=function(n){return Cu(n)&&n.indexOf("%")===n.length-1},Ve=function(n){return pve(n)&&!ed(n)},vve=function(n){return Gn(n)},Si=function(n){return Ve(n)||Cu(n)},gve=0,nd=function(n){var t=++gve;return"".concat(n||"").concat(t)},Au=function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ve(n)&&!Cu(n))return i;var a;if(fu(n)){var o=n.indexOf("%");a=t*parseFloat(n.slice(0,o))/100}else a=+n;return ed(a)&&(a=i),r&&a>t&&(a=t),a},Zs=function(n){if(!n)return null;var t=Object.keys(n);return t&&t.length?n[t[0]]:null},yve=function(n){if(!Array.isArray(n))return!1;for(var t=n.length,i={},r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Cve(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function s4(e){"@babel/helpers - typeof";return s4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},s4(e)}var cD={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Zo=function(n){return typeof n=="string"?n:n?n.displayName||n.name||"Component":""},dD=null,d2=null,W9=function e(n){if(n===dD&&Array.isArray(d2))return d2;var t=[];return A.Children.forEach(n,function(i){Gn(i)||(cve.isFragment(i)?t=t.concat(e(i.props.children)):t.push(i))}),d2=t,dD=n,t};function va(e,n){var t=[],i=[];return Array.isArray(n)?i=n.map(function(r){return Zo(r)}):i=[Zo(n)],W9(e).forEach(function(r){var a=pa(r,"type.displayName")||pa(r,"type.name");i.indexOf(a)!==-1&&t.push(r)}),t}function Hr(e,n){var t=va(e,n);return t&&t[0]}var hD=function(n){if(!n||!n.props)return!1;var t=n.props,i=t.width,r=t.height;return!(!Ve(i)||i<=0||!Ve(r)||r<=0)},Ave=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],jve=function(n){return n&&n.type&&Cu(n.type)&&Ave.indexOf(n.type)>=0},TH=function(n){return n&&s4(n)==="object"&&"clipDot"in n},Ove=function(n,t,i,r){var a,o=(a=c2==null?void 0:c2[r])!==null&&a!==void 0?a:[];return t.startsWith("data-")||!Bn(n)&&(r&&o.includes(t)||kve.includes(t))||i&&U9.includes(t)},Un=function(n,t,i){if(!n||typeof n=="function"||typeof n=="boolean")return null;var r=n;if(A.isValidElement(n)&&(r=n.props),!Jc(r))return null;var a={};return Object.keys(r).forEach(function(o){var l;Ove((l=r)===null||l===void 0?void 0:l[o],o,t,i)&&(a[o]=r[o])}),a},l4=function e(n,t){if(n===t)return!0;var i=A.Children.count(n);if(i!==A.Children.count(t))return!1;if(i===0)return!0;if(i===1)return mD(Array.isArray(n)?n[0]:n,Array.isArray(t)?t[0]:t);for(var r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Rve(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function f4(e){var n=e.children,t=e.width,i=e.height,r=e.viewBox,a=e.className,o=e.style,l=e.title,f=e.desc,c=Dve(e,Mve),h=r||{width:t,height:i,x:0,y:0},d=hn("recharts-surface",a);return Q.createElement("svg",u4({},Un(c,!0,"svg"),{className:d,width:t,height:i,style:o,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height)}),Q.createElement("title",null,l),Q.createElement("desc",null,f),n)}var Pve=["children","className"];function c4(){return c4=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function $ve(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var It=Q.forwardRef(function(e,n){var t=e.children,i=e.className,r=Nve(e,Pve),a=hn("recharts-layer",i);return Q.createElement("g",c4({className:a},Un(r,!0),{ref:n}),t)}),Qo=function(n,t){for(var i=arguments.length,r=new Array(i>2?i-2:0),a=2;aa?0:a+t),i=i>a?a:i,i<0&&(i+=a),a=t>i?0:i-t>>>0,t>>>=0;for(var o=Array(a);++r=a?t:e(t,i,r)}return m2=n,m2}var p2,yD;function MH(){if(yD)return p2;yD=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=n+t+i,a="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+r+a+"]");function f(c){return l.test(c)}return p2=f,p2}var v2,bD;function Ive(){if(bD)return v2;bD=1;function e(n){return n.split("")}return v2=e,v2}var g2,wD;function Bve(){if(wD)return g2;wD=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=n+t+i,a="\\ufe0e\\ufe0f",o="["+e+"]",l="["+r+"]",f="\\ud83c[\\udffb-\\udfff]",c="(?:"+l+"|"+f+")",h="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",b=c+"?",w="["+a+"]?",k="(?:"+v+"(?:"+[h,d,p].join("|")+")"+w+b+")*",_=w+b+k,C="(?:"+[h+l+"?",l,d,p,o].join("|")+")",S=RegExp(f+"(?="+f+")|"+C+_,"g");function E(j){return j.match(S)||[]}return g2=E,g2}var y2,kD;function Fve(){if(kD)return y2;kD=1;var e=Ive(),n=MH(),t=Bve();function i(r){return n(r)?t(r):e(r)}return y2=i,y2}var b2,_D;function qve(){if(_D)return b2;_D=1;var e=Lve(),n=MH(),t=Fve(),i=AH();function r(a){return function(o){o=i(o);var l=n(o)?t(o):void 0,f=l?l[0]:o.charAt(0),c=l?e(l,1).join(""):o.slice(1);return f[a]()+c}}return b2=r,b2}var w2,xD;function Hve(){if(xD)return w2;xD=1;var e=qve(),n=e("toUpperCase");return w2=n,w2}var Uve=Hve();const j0=pt(Uve);function Lt(e){return function(){return e}}const DH=Math.cos,i1=Math.sin,Ga=Math.sqrt,r1=Math.PI,O0=2*r1,d4=Math.PI,h4=2*d4,ru=1e-6,Wve=h4-ru;function RH(e){this._+=e[0];for(let n=1,t=e.length;n=0))throw new Error(`invalid digits: ${e}`);if(n>15)return RH;const t=10**n;return function(i){this._+=i[0];for(let r=1,a=i.length;rru)if(!(Math.abs(d*f-c*h)>ru)||!a)this._append`L${this._x1=n},${this._y1=t}`;else{let v=i-o,b=r-l,w=f*f+c*c,k=v*v+b*b,_=Math.sqrt(w),C=Math.sqrt(p),S=a*Math.tan((d4-Math.acos((w+p-k)/(2*_*C)))/2),E=S/C,j=S/_;Math.abs(E-1)>ru&&this._append`L${n+E*h},${t+E*d}`,this._append`A${a},${a},0,0,${+(d*v>h*b)},${this._x1=n+j*f},${this._y1=t+j*c}`}}arc(n,t,i,r,a,o){if(n=+n,t=+t,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let l=i*Math.cos(r),f=i*Math.sin(r),c=n+l,h=t+f,d=1^o,p=o?r-a:a-r;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>ru||Math.abs(this._y1-h)>ru)&&this._append`L${c},${h}`,i&&(p<0&&(p=p%h4+h4),p>Wve?this._append`A${i},${i},0,1,${d},${n-l},${t-f}A${i},${i},0,1,${d},${this._x1=c},${this._y1=h}`:p>ru&&this._append`A${i},${i},0,${+(p>=d4)},${d},${this._x1=n+i*Math.cos(a)},${this._y1=t+i*Math.sin(a)}`)}rect(n,t,i,r){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+t}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}function V9(e){let n=3;return e.digits=function(t){if(!arguments.length)return n;if(t==null)n=null;else{const i=Math.floor(t);if(!(i>=0))throw new RangeError(`invalid digits: ${t}`);n=i}return e},()=>new Gve(n)}function G9(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function PH(e){this._context=e}PH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;default:this._context.lineTo(e,n);break}}};function E0(e){return new PH(e)}function NH(e){return e[0]}function $H(e){return e[1]}function zH(e,n){var t=Lt(!0),i=null,r=E0,a=null,o=V9(l);e=typeof e=="function"?e:e===void 0?NH:Lt(e),n=typeof n=="function"?n:n===void 0?$H:Lt(n);function l(f){var c,h=(f=G9(f)).length,d,p=!1,v;for(i==null&&(a=r(v=o())),c=0;c<=h;++c)!(c=v;--b)l.point(S[b],E[b]);l.lineEnd(),l.areaEnd()}_&&(S[p]=+e(k,p,d),E[p]=+n(k,p,d),l.point(i?+i(k,p,d):S[p],t?+t(k,p,d):E[p]))}if(C)return l=null,C+""||null}function h(){return zH().defined(r).curve(o).context(a)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:Lt(+d),i=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Lt(+d),c):e},c.x1=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:Lt(+d),c):i},c.y=function(d){return arguments.length?(n=typeof d=="function"?d:Lt(+d),t=null,c):n},c.y0=function(d){return arguments.length?(n=typeof d=="function"?d:Lt(+d),c):n},c.y1=function(d){return arguments.length?(t=d==null?null:typeof d=="function"?d:Lt(+d),c):t},c.lineX0=c.lineY0=function(){return h().x(e).y(n)},c.lineY1=function(){return h().x(e).y(t)},c.lineX1=function(){return h().x(i).y(n)},c.defined=function(d){return arguments.length?(r=typeof d=="function"?d:Lt(!!d),c):r},c.curve=function(d){return arguments.length?(o=d,a!=null&&(l=o(a)),c):o},c.context=function(d){return arguments.length?(d==null?a=l=null:l=o(a=d),c):a},c}class LH{constructor(n,t){this._context=n,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(n,t){switch(n=+n,t=+t,this._point){case 0:{this._point=1,this._line?this._context.lineTo(n,t):this._context.moveTo(n,t);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+n)/2,this._y0,this._x0,t,n,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,n,this._y0,n,t);break}}this._x0=n,this._y0=t}}function Yve(e){return new LH(e,!0)}function Kve(e){return new LH(e,!1)}const Y9={draw(e,n){const t=Ga(n/r1);e.moveTo(t,0),e.arc(0,0,t,0,O0)}},Xve={draw(e,n){const t=Ga(n/5)/2;e.moveTo(-3*t,-t),e.lineTo(-t,-t),e.lineTo(-t,-3*t),e.lineTo(t,-3*t),e.lineTo(t,-t),e.lineTo(3*t,-t),e.lineTo(3*t,t),e.lineTo(t,t),e.lineTo(t,3*t),e.lineTo(-t,3*t),e.lineTo(-t,t),e.lineTo(-3*t,t),e.closePath()}},IH=Ga(1/3),Zve=IH*2,Qve={draw(e,n){const t=Ga(n/Zve),i=t*IH;e.moveTo(0,-t),e.lineTo(i,0),e.lineTo(0,t),e.lineTo(-i,0),e.closePath()}},Jve={draw(e,n){const t=Ga(n),i=-t/2;e.rect(i,i,t,t)}},ege=.8908130915292852,BH=i1(r1/10)/i1(7*r1/10),nge=i1(O0/10)*BH,tge=-DH(O0/10)*BH,ige={draw(e,n){const t=Ga(n*ege),i=nge*t,r=tge*t;e.moveTo(0,-t),e.lineTo(i,r);for(let a=1;a<5;++a){const o=O0*a/5,l=DH(o),f=i1(o);e.lineTo(f*t,-l*t),e.lineTo(l*i-f*r,f*i+l*r)}e.closePath()}},k2=Ga(3),rge={draw(e,n){const t=-Ga(n/(k2*3));e.moveTo(0,t*2),e.lineTo(-k2*t,-t),e.lineTo(k2*t,-t),e.closePath()}},aa=-.5,oa=Ga(3)/2,m4=1/Ga(12),age=(m4/2+1)*3,oge={draw(e,n){const t=Ga(n/age),i=t/2,r=t*m4,a=i,o=t*m4+t,l=-a,f=o;e.moveTo(i,r),e.lineTo(a,o),e.lineTo(l,f),e.lineTo(aa*i-oa*r,oa*i+aa*r),e.lineTo(aa*a-oa*o,oa*a+aa*o),e.lineTo(aa*l-oa*f,oa*l+aa*f),e.lineTo(aa*i+oa*r,aa*r-oa*i),e.lineTo(aa*a+oa*o,aa*o-oa*a),e.lineTo(aa*l+oa*f,aa*f-oa*l),e.closePath()}};function sge(e,n){let t=null,i=V9(r);e=typeof e=="function"?e:Lt(e||Y9),n=typeof n=="function"?n:Lt(n===void 0?64:+n);function r(){let a;if(t||(t=a=i()),e.apply(this,arguments).draw(t,+n.apply(this,arguments)),a)return t=null,a+""||null}return r.type=function(a){return arguments.length?(e=typeof a=="function"?a:Lt(a),r):e},r.size=function(a){return arguments.length?(n=typeof a=="function"?a:Lt(+a),r):n},r.context=function(a){return arguments.length?(t=a??null,r):t},r}function a1(){}function o1(e,n,t){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+n)/6,(e._y0+4*e._y1+t)/6)}function FH(e){this._context=e}FH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:o1(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:o1(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function lge(e){return new FH(e)}function qH(e){this._context=e}qH.prototype={areaStart:a1,areaEnd:a1,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._x2=e,this._y2=n;break;case 1:this._point=2,this._x3=e,this._y3=n;break;case 2:this._point=3,this._x4=e,this._y4=n,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+n)/6);break;default:o1(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function uge(e){return new qH(e)}function HH(e){this._context=e}HH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var t=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 3:this._point=4;default:o1(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function fge(e){return new HH(e)}function UH(e){this._context=e}UH.prototype={areaStart:a1,areaEnd:a1,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,n){e=+e,n=+n,this._point?this._context.lineTo(e,n):(this._point=1,this._context.moveTo(e,n))}};function cge(e){return new UH(e)}function SD(e){return e<0?-1:1}function CD(e,n,t){var i=e._x1-e._x0,r=n-e._x1,a=(e._y1-e._y0)/(i||r<0&&-0),o=(t-e._y1)/(r||i<0&&-0),l=(a*r+o*i)/(i+r);return(SD(a)+SD(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function AD(e,n){var t=e._x1-e._x0;return t?(3*(e._y1-e._y0)/t-n)/2:n}function _2(e,n,t){var i=e._x0,r=e._y0,a=e._x1,o=e._y1,l=(a-i)/3;e._context.bezierCurveTo(i+l,r+l*n,a-l,o-l*t,a,o)}function s1(e){this._context=e}s1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:_2(this,this._t0,AD(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){var t=NaN;if(e=+e,n=+n,!(e===this._x1&&n===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3,_2(this,AD(this,t=CD(this,e,n)),t);break;default:_2(this,this._t0,t=CD(this,e,n));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n,this._t0=t}}};function WH(e){this._context=new VH(e)}(WH.prototype=Object.create(s1.prototype)).point=function(e,n){s1.prototype.point.call(this,n,e)};function VH(e){this._context=e}VH.prototype={moveTo:function(e,n){this._context.moveTo(n,e)},closePath:function(){this._context.closePath()},lineTo:function(e,n){this._context.lineTo(n,e)},bezierCurveTo:function(e,n,t,i,r,a){this._context.bezierCurveTo(n,e,i,t,a,r)}};function dge(e){return new s1(e)}function hge(e){return new WH(e)}function GH(e){this._context=e}GH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,n=this._y,t=e.length;if(t)if(this._line?this._context.lineTo(e[0],n[0]):this._context.moveTo(e[0],n[0]),t===2)this._context.lineTo(e[1],n[1]);else for(var i=jD(e),r=jD(n),a=0,o=1;o=0;--n)r[n]=(o[n]-r[n+1])/a[n];for(a[t-1]=(e[t]+r[t-1])/2,n=0;n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(e,n);else{var t=this._x*(1-this._t)+e*this._t;this._context.lineTo(t,this._y),this._context.lineTo(t,n)}break}}this._x=e,this._y=n}};function pge(e){return new T0(e,.5)}function vge(e){return new T0(e,0)}function gge(e){return new T0(e,1)}function oc(e,n){if((o=e.length)>1)for(var t=1,i,r,a=e[n[0]],o,l=a.length;t=0;)t[n]=n;return t}function yge(e,n){return e[n]}function bge(e){const n=[];return n.key=e,n}function wge(){var e=Lt([]),n=p4,t=oc,i=yge;function r(a){var o=Array.from(e.apply(this,arguments),bge),l,f=o.length,c=-1,h;for(const d of a)for(l=0,++c;l0){for(var t,i,r=0,a=e[0].length,o;r0){for(var t=0,i=e[n[0]],r,a=i.length;t0)||!((a=(r=e[n[0]]).length)>0))){for(var t=0,i=1,r,a,o;i=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Ege(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var YH={symbolCircle:Y9,symbolCross:Xve,symbolDiamond:Qve,symbolSquare:Jve,symbolStar:ige,symbolTriangle:rge,symbolWye:oge},Tge=Math.PI/180,Mge=function(n){var t="symbol".concat(j0(n));return YH[t]||Y9},Dge=function(n,t,i){if(t==="area")return n;switch(i){case"cross":return 5*n*n/9;case"diamond":return .5*n*n/Math.sqrt(3);case"square":return n*n;case"star":{var r=18*Tge;return 1.25*n*n*(Math.tan(r)-Math.tan(r*2)*Math.pow(Math.tan(r),2))}case"triangle":return Math.sqrt(3)*n*n/4;case"wye":return(21-10*Math.sqrt(3))*n*n/8;default:return Math.PI*n*n/4}},Rge=function(n,t){YH["symbol".concat(j0(n))]=t},K9=function(n){var t=n.type,i=t===void 0?"circle":t,r=n.size,a=r===void 0?64:r,o=n.sizeType,l=o===void 0?"area":o,f=Oge(n,Sge),c=ED(ED({},f),{},{type:i,size:a,sizeType:l}),h=function(){var k=Mge(i),_=sge().type(k).size(Dge(a,l,i));return _()},d=c.className,p=c.cx,v=c.cy,b=Un(c,!0);return p===+p&&v===+v&&a===+a?Q.createElement("path",v4({},b,{className:hn("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(v,")"),d:h()})):null};K9.registerSymbol=Rge;function sc(e){"@babel/helpers - typeof";return sc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},sc(e)}function g4(){return g4=Object.assign?Object.assign.bind():function(e){for(var n=1;n`);var C=v.inactive?c:v.color;return Q.createElement("li",g4({className:k,style:d,key:"legend-item-".concat(b)},t1(i.props,v,b)),Q.createElement(f4,{width:o,height:o,viewBox:h,style:p},i.renderIcon(v)),Q.createElement("span",{className:"recharts-legend-item-text",style:{color:C}},w?w(_,v,b):_))})}},{key:"render",value:function(){var i=this.props,r=i.payload,a=i.layout,o=i.align;if(!r||!r.length)return null;var l={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return Q.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(A.PureComponent);om(X9,"displayName","Legend");om(X9,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var x2,MD;function Hge(){if(MD)return x2;MD=1;var e=S0();function n(){this.__data__=new e,this.size=0}return x2=n,x2}var S2,DD;function Uge(){if(DD)return S2;DD=1;function e(n){var t=this.__data__,i=t.delete(n);return this.size=t.size,i}return S2=e,S2}var C2,RD;function Wge(){if(RD)return C2;RD=1;function e(n){return this.__data__.get(n)}return C2=e,C2}var A2,PD;function Vge(){if(PD)return A2;PD=1;function e(n){return this.__data__.has(n)}return A2=e,A2}var j2,ND;function Gge(){if(ND)return j2;ND=1;var e=S0(),n=B9(),t=F9(),i=200;function r(a,o){var l=this.__data__;if(l instanceof e){var f=l.__data__;if(!n||f.lengthv))return!1;var w=d.get(o),k=d.get(l);if(w&&k)return w==l&&k==o;var _=-1,C=!0,S=f&r?new e:void 0;for(d.set(o,l),d.set(l,o);++_-1&&i%1==0&&i-1&&t%1==0&&t<=e}return K2=n,K2}var X2,a7;function o1e(){if(a7)return X2;a7=1;var e=vs(),n=eA(),t=gs(),i="[object Arguments]",r="[object Array]",a="[object Boolean]",o="[object Date]",l="[object Error]",f="[object Function]",c="[object Map]",h="[object Number]",d="[object Object]",p="[object RegExp]",v="[object Set]",b="[object String]",w="[object WeakMap]",k="[object ArrayBuffer]",_="[object DataView]",C="[object Float32Array]",S="[object Float64Array]",E="[object Int8Array]",j="[object Int16Array]",O="[object Int32Array]",M="[object Uint8Array]",$="[object Uint8ClampedArray]",q="[object Uint16Array]",P="[object Uint32Array]",z={};z[C]=z[S]=z[E]=z[j]=z[O]=z[M]=z[$]=z[q]=z[P]=!0,z[i]=z[r]=z[k]=z[a]=z[_]=z[o]=z[l]=z[f]=z[c]=z[h]=z[d]=z[p]=z[v]=z[b]=z[w]=!1;function B(V){return t(V)&&n(V.length)&&!!z[e(V)]}return X2=B,X2}var Z2,o7;function rU(){if(o7)return Z2;o7=1;function e(n){return function(t){return n(t)}}return Z2=e,Z2}var Ah={exports:{}};Ah.exports;var s7;function s1e(){return s7||(s7=1,(function(e,n){var t=xH(),i=n&&!n.nodeType&&n,r=i&&!0&&e&&!e.nodeType&&e,a=r&&r.exports===i,o=a&&t.process,l=(function(){try{var f=r&&r.require&&r.require("util").types;return f||o&&o.binding&&o.binding("util")}catch{}})();e.exports=l})(Ah,Ah.exports)),Ah.exports}var Q2,l7;function aU(){if(l7)return Q2;l7=1;var e=o1e(),n=rU(),t=s1e(),i=t&&t.isTypedArray,r=i?n(i):e;return Q2=r,Q2}var J2,u7;function l1e(){if(u7)return J2;u7=1;var e=i1e(),n=Q9(),t=Ar(),i=iU(),r=J9(),a=aU(),o=Object.prototype,l=o.hasOwnProperty;function f(c,h){var d=t(c),p=!d&&n(c),v=!d&&!p&&i(c),b=!d&&!p&&!v&&a(c),w=d||p||v||b,k=w?e(c.length,String):[],_=k.length;for(var C in c)(h||l.call(c,C))&&!(w&&(C=="length"||v&&(C=="offset"||C=="parent")||b&&(C=="buffer"||C=="byteLength"||C=="byteOffset")||r(C,_)))&&k.push(C);return k}return J2=f,J2}var ex,f7;function u1e(){if(f7)return ex;f7=1;var e=Object.prototype;function n(t){var i=t&&t.constructor,r=typeof i=="function"&&i.prototype||e;return t===r}return ex=n,ex}var nx,c7;function oU(){if(c7)return nx;c7=1;function e(n,t){return function(i){return n(t(i))}}return nx=e,nx}var tx,d7;function f1e(){if(d7)return tx;d7=1;var e=oU(),n=e(Object.keys,Object);return tx=n,tx}var ix,h7;function c1e(){if(h7)return ix;h7=1;var e=u1e(),n=f1e(),t=Object.prototype,i=t.hasOwnProperty;function r(a){if(!e(a))return n(a);var o=[];for(var l in Object(a))i.call(a,l)&&l!="constructor"&&o.push(l);return o}return ix=r,ix}var rx,m7;function vp(){if(m7)return rx;m7=1;var e=L9(),n=eA();function t(i){return i!=null&&n(i.length)&&!e(i)}return rx=t,rx}var ax,p7;function M0(){if(p7)return ax;p7=1;var e=l1e(),n=c1e(),t=vp();function i(r){return t(r)?e(r):n(r)}return ax=i,ax}var ox,v7;function d1e(){if(v7)return ox;v7=1;var e=Jge(),n=t1e(),t=M0();function i(r){return e(r,t,n)}return ox=i,ox}var sx,g7;function h1e(){if(g7)return sx;g7=1;var e=d1e(),n=1,t=Object.prototype,i=t.hasOwnProperty;function r(a,o,l,f,c,h){var d=l&n,p=e(a),v=p.length,b=e(o),w=b.length;if(v!=w&&!d)return!1;for(var k=v;k--;){var _=p[k];if(!(d?_ in o:i.call(o,_)))return!1}var C=h.get(a),S=h.get(o);if(C&&S)return C==o&&S==a;var E=!0;h.set(a,o),h.set(o,a);for(var j=d;++k-1}return Rx=n,Rx}var Px,U7;function R1e(){if(U7)return Px;U7=1;function e(n,t,i){for(var r=-1,a=n==null?0:n.length;++r=o){var _=c?null:r(f);if(_)return a(_);b=!1,p=i,k=new e}else k=c?[]:w;e:for(;++d=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Y1e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function K1e(e){return e.value}function X1e(e,n){if(Q.isValidElement(e))return Q.cloneElement(e,n);if(typeof e=="function")return Q.createElement(e,n);n.ref;var t=G1e(n,I1e);return Q.createElement(X9,t)}var Q7=1,Jo=(function(e){function n(){var t;B1e(this,n);for(var i=arguments.length,r=new Array(i),a=0;aQ7||Math.abs(r.height-this.lastBoundingBox.height)>Q7)&&(this.lastBoundingBox.width=r.width,this.lastBoundingBox.height=r.height,i&&i(r)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,i&&i(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Bo({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(i){var r=this.props,a=r.layout,o=r.align,l=r.verticalAlign,f=r.margin,c=r.chartWidth,h=r.chartHeight,d,p;if(!i||(i.left===void 0||i.left===null)&&(i.right===void 0||i.right===null))if(o==="center"&&a==="vertical"){var v=this.getBBoxSnapshot();d={left:((c||0)-v.width)/2}}else d=o==="right"?{right:f&&f.right||0}:{left:f&&f.left||0};if(!i||(i.top===void 0||i.top===null)&&(i.bottom===void 0||i.bottom===null))if(l==="middle"){var b=this.getBBoxSnapshot();p={top:((h||0)-b.height)/2}}else p=l==="bottom"?{bottom:f&&f.bottom||0}:{top:f&&f.top||0};return Bo(Bo({},d),p)}},{key:"render",value:function(){var i=this,r=this.props,a=r.content,o=r.width,l=r.height,f=r.wrapperStyle,c=r.payloadUniqBy,h=r.payload,d=Bo(Bo({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(f)),f);return Q.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(v){i.wrapperNode=v}},X1e(a,Bo(Bo({},this.props),{},{payload:cU(h,c,K1e)})))}}],[{key:"getWithHeight",value:function(i,r){var a=Bo(Bo({},this.defaultProps),i.props),o=a.layout;return o==="vertical"&&Ve(i.props.height)?{height:i.props.height}:o==="horizontal"?{width:i.props.width||r}:null}}])})(A.PureComponent);D0(Jo,"displayName","Legend");D0(Jo,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Ix,J7;function Z1e(){if(J7)return Ix;J7=1;var e=pp(),n=Q9(),t=Ar(),i=e?e.isConcatSpreadable:void 0;function r(a){return t(a)||n(a)||!!(i&&a&&a[i])}return Ix=r,Ix}var Bx,eR;function mU(){if(eR)return Bx;eR=1;var e=tU(),n=Z1e();function t(i,r,a,o,l){var f=-1,c=i.length;for(a||(a=n),l||(l=[]);++f0&&a(h)?r>1?t(h,r-1,a,o,l):e(l,h):o||(l[l.length]=h)}return l}return Bx=t,Bx}var Fx,nR;function Q1e(){if(nR)return Fx;nR=1;function e(n){return function(t,i,r){for(var a=-1,o=Object(t),l=r(t),f=l.length;f--;){var c=l[n?f:++a];if(i(o[c],c,o)===!1)break}return t}}return Fx=e,Fx}var qx,tR;function J1e(){if(tR)return qx;tR=1;var e=Q1e(),n=e();return qx=n,qx}var Hx,iR;function pU(){if(iR)return Hx;iR=1;var e=J1e(),n=M0();function t(i,r){return i&&e(i,r,n)}return Hx=t,Hx}var Ux,rR;function eye(){if(rR)return Ux;rR=1;var e=vp();function n(t,i){return function(r,a){if(r==null)return r;if(!e(r))return t(r,a);for(var o=r.length,l=i?o:-1,f=Object(r);(i?l--:++li||l&&f&&h&&!c&&!d||a&&f&&h||!r&&h||!o)return 1;if(!a&&!l&&!d&&t=c)return h;var d=r[a];return h*(d=="desc"?-1:1)}}return t.index-i.index}return Kx=n,Kx}var Xx,fR;function rye(){if(fR)return Xx;fR=1;var e=q9(),n=H9(),t=Sl(),i=vU(),r=nye(),a=rU(),o=iye(),l=td(),f=Ar();function c(h,d,p){d.length?d=e(d,function(w){return f(w)?function(k){return n(k,w.length===1?w[0]:w)}:w}):d=[l];var v=-1;d=e(d,a(t));var b=i(h,function(w,k,_){var C=e(d,function(S){return S(w)});return{criteria:C,index:++v,value:w}});return r(b,function(w,k){return o(w,k,p)})}return Xx=c,Xx}var Zx,cR;function aye(){if(cR)return Zx;cR=1;function e(n,t,i){switch(i.length){case 0:return n.call(t);case 1:return n.call(t,i[0]);case 2:return n.call(t,i[0],i[1]);case 3:return n.call(t,i[0],i[1],i[2])}return n.apply(t,i)}return Zx=e,Zx}var Qx,dR;function oye(){if(dR)return Qx;dR=1;var e=aye(),n=Math.max;function t(i,r,a){return r=n(r===void 0?i.length-1:r,0),function(){for(var o=arguments,l=-1,f=n(o.length-r,0),c=Array(f);++l0){if(++a>=e)return arguments[0]}else a=0;return r.apply(void 0,arguments)}}return t3=i,t3}var i3,gR;function fye(){if(gR)return i3;gR=1;var e=lye(),n=uye(),t=n(e);return i3=t,i3}var r3,yR;function cye(){if(yR)return r3;yR=1;var e=td(),n=oye(),t=fye();function i(r,a){return t(n(r,a,e),r+"")}return r3=i,r3}var a3,bR;function R0(){if(bR)return a3;bR=1;var e=I9(),n=vp(),t=J9(),i=xl();function r(a,o,l){if(!i(l))return!1;var f=typeof o;return(f=="number"?n(l)&&t(o,l.length):f=="string"&&o in l)?e(l[o],a):!1}return a3=r,a3}var o3,wR;function dye(){if(wR)return o3;wR=1;var e=mU(),n=rye(),t=cye(),i=R0(),r=t(function(a,o){if(a==null)return[];var l=o.length;return l>1&&i(a,o[0],o[1])?o=[]:l>2&&i(o[0],o[1],o[2])&&(o=[o[0]]),n(a,e(o,1),[])});return o3=r,o3}var hye=dye();const iA=pt(hye);function sm(e){"@babel/helpers - typeof";return sm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},sm(e)}function w4(){return w4=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=n.x),"".concat(sh,"-left"),Ve(t)&&n&&Ve(n.x)&&t=n.y),"".concat(sh,"-top"),Ve(i)&&n&&Ve(n.y)&&iw?Math.max(h,f[i]):Math.max(d,f[i])}function Oye(e){var n=e.translateX,t=e.translateY,i=e.useTranslate3d;return{transform:i?"translate3d(".concat(n,"px, ").concat(t,"px, 0)"):"translate(".concat(n,"px, ").concat(t,"px)")}}function Eye(e){var n=e.allowEscapeViewBox,t=e.coordinate,i=e.offsetTopLeft,r=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,f=e.viewBox,c,h,d;return o.height>0&&o.width>0&&t?(h=xR({allowEscapeViewBox:n,coordinate:t,key:"x",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.width,viewBox:f,viewBoxDimension:f.width}),d=xR({allowEscapeViewBox:n,coordinate:t,key:"y",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.height,viewBox:f,viewBoxDimension:f.height}),c=Oye({translateX:h,translateY:d,useTranslate3d:l})):c=Aye,{cssProperties:c,cssClasses:jye({translateX:h,translateY:d,coordinate:t})}}function uc(e){"@babel/helpers - typeof";return uc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},uc(e)}function SR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function CR(e){for(var n=1;nAR||Math.abs(i.height-this.state.lastBoundingBox.height)>AR)&&this.setState({lastBoundingBox:{width:i.width,height:i.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var i,r;this.props.active&&this.updateBBox(),this.state.dismissed&&(((i=this.props.coordinate)===null||i===void 0?void 0:i.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var i=this,r=this.props,a=r.active,o=r.allowEscapeViewBox,l=r.animationDuration,f=r.animationEasing,c=r.children,h=r.coordinate,d=r.hasPayload,p=r.isAnimationActive,v=r.offset,b=r.position,w=r.reverseDirection,k=r.useTranslate3d,_=r.viewBox,C=r.wrapperStyle,S=Eye({allowEscapeViewBox:o,coordinate:h,offsetTopLeft:v,position:b,reverseDirection:w,tooltipBox:this.state.lastBoundingBox,useTranslate3d:k,viewBox:_}),E=S.cssClasses,j=S.cssProperties,O=CR(CR({transition:p&&a?"transform ".concat(l,"ms ").concat(f):void 0},j),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&d?"visible":"hidden",position:"absolute",top:0,left:0},C);return Q.createElement("div",{tabIndex:-1,className:E,style:O,ref:function($){i.wrapperNode=$}},c)}}])})(A.PureComponent),Iye=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Bu={isSsr:Iye()};function fc(e){"@babel/helpers - typeof";return fc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fc(e)}function jR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function OR(e){for(var n=1;n0;return Q.createElement(Lye,{allowEscapeViewBox:o,animationDuration:l,animationEasing:f,isAnimationActive:p,active:a,coordinate:h,hasPayload:O,offset:v,position:k,reverseDirection:_,useTranslate3d:C,viewBox:S,wrapperStyle:E},Kye(c,OR(OR({},this.props),{},{payload:j})))}}])})(A.PureComponent);rA(ca,"displayName","Tooltip");rA(ca,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Bu.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var l3,ER;function Xye(){if(ER)return l3;ER=1;var e=xo(),n=function(){return e.Date.now()};return l3=n,l3}var u3,TR;function Zye(){if(TR)return u3;TR=1;var e=/\s/;function n(t){for(var i=t.length;i--&&e.test(t.charAt(i)););return i}return u3=n,u3}var f3,MR;function Qye(){if(MR)return f3;MR=1;var e=Zye(),n=/^\s+/;function t(i){return i&&i.slice(0,e(i)+1).replace(n,"")}return f3=t,f3}var c3,DR;function _U(){if(DR)return c3;DR=1;var e=Qye(),n=xl(),t=Qc(),i=NaN,r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function f(c){if(typeof c=="number")return c;if(t(c))return i;if(n(c)){var h=typeof c.valueOf=="function"?c.valueOf():c;c=n(h)?h+"":h}if(typeof c!="string")return c===0?c:+c;c=e(c);var d=a.test(c);return d||o.test(c)?l(c.slice(2),d?2:8):r.test(c)?i:+c}return c3=f,c3}var d3,RR;function Jye(){if(RR)return d3;RR=1;var e=xl(),n=Xye(),t=_U(),i="Expected a function",r=Math.max,a=Math.min;function o(l,f,c){var h,d,p,v,b,w,k=0,_=!1,C=!1,S=!0;if(typeof l!="function")throw new TypeError(i);f=t(f)||0,e(c)&&(_=!!c.leading,C="maxWait"in c,p=C?r(t(c.maxWait)||0,f):p,S="trailing"in c?!!c.trailing:S);function E(V){var U=h,N=d;return h=d=void 0,k=V,v=l.apply(N,U),v}function j(V){return k=V,b=setTimeout($,f),_?E(V):v}function O(V){var U=V-w,N=V-k,D=f-U;return C?a(D,p-N):D}function M(V){var U=V-w,N=V-k;return w===void 0||U>=f||U<0||C&&N>=p}function $(){var V=n();if(M(V))return q(V);b=setTimeout($,O(V))}function q(V){return b=void 0,S&&h?E(V):(h=d=void 0,v)}function P(){b!==void 0&&clearTimeout(b),k=0,h=w=d=b=void 0}function z(){return b===void 0?v:q(n())}function B(){var V=n(),U=M(V);if(h=arguments,d=this,w=V,U){if(b===void 0)return j(w);if(C)return clearTimeout(b),b=setTimeout($,f),E(w)}return b===void 0&&(b=setTimeout($,f)),v}return B.cancel=P,B.flush=z,B}return d3=o,d3}var h3,PR;function e0e(){if(PR)return h3;PR=1;var e=Jye(),n=xl(),t="Expected a function";function i(r,a,o){var l=!0,f=!0;if(typeof r!="function")throw new TypeError(t);return n(o)&&(l="leading"in o?!!o.leading:l,f="trailing"in o?!!o.trailing:f),e(r,a,{leading:l,maxWait:a,trailing:f})}return h3=i,h3}var n0e=e0e();const xU=pt(n0e);function um(e){"@babel/helpers - typeof";return um=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},um(e)}function NR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Jv(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t0&&(V=xU(V,w,{trailing:!0,leading:!1}));var U=new ResizeObserver(V),N=j.current.getBoundingClientRect(),D=N.width,L=N.height;return z(D,L),U.observe(j.current),function(){U.disconnect()}},[z,w]);var B=A.useMemo(function(){var V=q.containerWidth,U=q.containerHeight;if(V<0||U<0)return null;Qo(fu(o)||fu(f),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,o,f),Qo(!t||t>0,"The aspect(%s) must be greater than zero.",t);var N=fu(o)?V:o,D=fu(f)?U:f;t&&t>0&&(N?D=N/t:D&&(N=D*t),p&&D>p&&(D=p)),Qo(N>0||D>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,N,D,o,f,h,d,t);var L=!Array.isArray(v)&&Zo(v.type).endsWith("Chart");return Q.Children.map(v,function(H){return Q.isValidElement(H)?A.cloneElement(H,Jv({width:N,height:D},L?{style:Jv({height:"100%",width:"100%",maxHeight:D,maxWidth:N},H.props.style)}:{})):H})},[t,v,f,p,d,h,q,o]);return Q.createElement("div",{id:k?"".concat(k):void 0,className:hn("recharts-responsive-container",_),style:Jv(Jv({},E),{},{width:o,height:f,minWidth:h,minHeight:d,maxHeight:p}),ref:j},B)}),SU=function(n){return null};SU.displayName="Cell";function fm(e){"@babel/helpers - typeof";return fm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fm(e)}function zR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function S4(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:{};if(n==null||Bu.isSsr)return{width:0,height:0};var i=p0e(t),r=JSON.stringify({text:n,copyStyle:i});if(Mf.widthCache[r])return Mf.widthCache[r];try{var a=document.getElementById(LR);a||(a=document.createElement("span"),a.setAttribute("id",LR),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=S4(S4({},m0e),i);Object.assign(a.style,o),a.textContent="".concat(n);var l=a.getBoundingClientRect(),f={width:l.width,height:l.height};return Mf.widthCache[r]=f,++Mf.cacheCount>h0e&&(Mf.cacheCount=0,Mf.widthCache={}),f}catch{return{width:0,height:0}}},v0e=function(n){return{top:n.top+window.scrollY-document.documentElement.clientTop,left:n.left+window.scrollX-document.documentElement.clientLeft}};function cm(e){"@babel/helpers - typeof";return cm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},cm(e)}function d1(e,n){return w0e(e)||b0e(e,n)||y0e(e,n)||g0e()}function g0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y0e(e,n){if(e){if(typeof e=="string")return IR(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return IR(e,n)}}function IR(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function P0e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function WR(e,n){return L0e(e)||z0e(e,n)||$0e(e,n)||N0e()}function N0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $0e(e,n){if(e){if(typeof e=="string")return VR(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return VR(e,n)}}function VR(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t0&&arguments[0]!==void 0?arguments[0]:[];return N.reduce(function(D,L){var H=L.word,Y=L.width,R=D[D.length-1];if(R&&(r==null||a||R.width+Y+iL.width?D:L})};if(!h)return v;for(var w="…",k=function(N){var D=d.slice(0,N),L=OU({breakAll:c,style:f,children:D+w}).wordsWithComputedWidth,H=p(L),Y=H.length>o||b(H).width>Number(r);return[Y,H]},_=0,C=d.length-1,S=0,E;_<=C&&S<=d.length-1;){var j=Math.floor((_+C)/2),O=j-1,M=k(O),$=WR(M,2),q=$[0],P=$[1],z=k(j),B=WR(z,1),V=B[0];if(!q&&!V&&(_=j+1),q&&V&&(C=j-1),!q&&V){E=P;break}S++}return E||v},GR=function(n){var t=Gn(n)?[]:n.toString().split(jU);return[{words:t}]},B0e=function(n){var t=n.width,i=n.scaleToFit,r=n.children,a=n.style,o=n.breakAll,l=n.maxLines;if((t||i)&&!Bu.isSsr){var f,c,h=OU({breakAll:o,children:r,style:a});if(h){var d=h.wordsWithComputedWidth,p=h.spaceWidth;f=d,c=p}else return GR(r);return I0e({breakAll:o,children:r,maxLines:l,style:a},f,c,t,i)}return GR(r)},YR="#808080",h1=function(n){var t=n.x,i=t===void 0?0:t,r=n.y,a=r===void 0?0:r,o=n.lineHeight,l=o===void 0?"1em":o,f=n.capHeight,c=f===void 0?"0.71em":f,h=n.scaleToFit,d=h===void 0?!1:h,p=n.textAnchor,v=p===void 0?"start":p,b=n.verticalAnchor,w=b===void 0?"end":b,k=n.fill,_=k===void 0?YR:k,C=UR(n,D0e),S=A.useMemo(function(){return B0e({breakAll:C.breakAll,children:C.children,maxLines:C.maxLines,scaleToFit:d,style:C.style,width:C.width})},[C.breakAll,C.children,C.maxLines,d,C.style,C.width]),E=C.dx,j=C.dy,O=C.angle,M=C.className,$=C.breakAll,q=UR(C,R0e);if(!Si(i)||!Si(a))return null;var P=i+(Ve(E)?E:0),z=a+(Ve(j)?j:0),B;switch(w){case"start":B=m3("calc(".concat(c,")"));break;case"middle":B=m3("calc(".concat((S.length-1)/2," * -").concat(l," + (").concat(c," / 2))"));break;default:B=m3("calc(".concat(S.length-1," * -").concat(l,")"));break}var V=[];if(d){var U=S[0].width,N=C.width;V.push("scale(".concat((Ve(N)?N/U:1)/U,")"))}return O&&V.push("rotate(".concat(O,", ").concat(P,", ").concat(z,")")),V.length&&(q.transform=V.join(" ")),Q.createElement("text",C4({},Un(q,!0),{x:P,y:z,className:hn("recharts-text",M),textAnchor:v,fill:_.includes("url")?YR:_}),S.map(function(D,L){var H=D.words.join($?"":" ");return Q.createElement("tspan",{x:P,dy:L===0?B:l,key:"".concat(H,"-").concat(L)},H)}))};function ol(e,n){return e==null||n==null?NaN:en?1:e>=n?0:NaN}function F0e(e,n){return e==null||n==null?NaN:ne?1:n>=e?0:NaN}function oA(e){let n,t,i;e.length!==2?(n=ol,t=(l,f)=>ol(e(l),f),i=(l,f)=>e(l)-f):(n=e===ol||e===F0e?e:q0e,t=e,i=e);function r(l,f,c=0,h=l.length){if(c>>1;t(l[d],f)<0?c=d+1:h=d}while(c>>1;t(l[d],f)<=0?c=d+1:h=d}while(cc&&i(l[d-1],f)>-i(l[d],f)?d-1:d}return{left:r,center:o,right:a}}function q0e(){return 0}function EU(e){return e===null?NaN:+e}function*H0e(e,n){for(let t of e)t!=null&&(t=+t)>=t&&(yield t)}const U0e=oA(ol),gp=U0e.right;oA(EU).center;class KR extends Map{constructor(n,t=G0e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),n!=null)for(const[i,r]of n)this.set(i,r)}get(n){return super.get(XR(this,n))}has(n){return super.has(XR(this,n))}set(n,t){return super.set(W0e(this,n),t)}delete(n){return super.delete(V0e(this,n))}}function XR({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):t}function W0e({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):(e.set(i,t),t)}function V0e({_intern:e,_key:n},t){const i=n(t);return e.has(i)&&(t=e.get(i),e.delete(i)),t}function G0e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Y0e(e=ol){if(e===ol)return TU;if(typeof e!="function")throw new TypeError("compare is not a function");return(n,t)=>{const i=e(n,t);return i||i===0?i:(e(t,t)===0)-(e(n,n)===0)}}function TU(e,n){return(e==null||!(e>=e))-(n==null||!(n>=n))||(en?1:0)}const K0e=Math.sqrt(50),X0e=Math.sqrt(10),Z0e=Math.sqrt(2);function m1(e,n,t){const i=(n-e)/Math.max(0,t),r=Math.floor(Math.log10(i)),a=i/Math.pow(10,r),o=a>=K0e?10:a>=X0e?5:a>=Z0e?2:1;let l,f,c;return r<0?(c=Math.pow(10,-r)/o,l=Math.round(e*c),f=Math.round(n*c),l/cn&&--f,c=-c):(c=Math.pow(10,r)*o,l=Math.round(e/c),f=Math.round(n/c),l*cn&&--f),f0))return[];if(e===n)return[e];const i=n=r))return[];const l=a-r+1,f=new Array(l);if(i)if(o<0)for(let c=0;c=i)&&(t=i);return t}function QR(e,n){let t;for(const i of e)i!=null&&(t>i||t===void 0&&i>=i)&&(t=i);return t}function MU(e,n,t=0,i=1/0,r){if(n=Math.floor(n),t=Math.floor(Math.max(0,t)),i=Math.floor(Math.min(e.length-1,i)),!(t<=n&&n<=i))return e;for(r=r===void 0?TU:Y0e(r);i>t;){if(i-t>600){const f=i-t+1,c=n-t+1,h=Math.log(f),d=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*d*(f-d)/f)*(c-f/2<0?-1:1),v=Math.max(t,Math.floor(n-c*d/f+p)),b=Math.min(i,Math.floor(n+(f-c)*d/f+p));MU(e,n,v,b,r)}const a=e[n];let o=t,l=i;for(lh(e,t,n),r(e[i],a)>0&&lh(e,t,i);o0;)--l}r(e[t],a)===0?lh(e,t,l):(++l,lh(e,l,i)),l<=n&&(t=l+1),n<=l&&(i=l-1)}return e}function lh(e,n,t){const i=e[n];e[n]=e[t],e[t]=i}function Q0e(e,n,t){if(e=Float64Array.from(H0e(e)),!(!(i=e.length)||isNaN(n=+n))){if(n<=0||i<2)return QR(e);if(n>=1)return ZR(e);var i,r=(i-1)*n,a=Math.floor(r),o=ZR(MU(e,a).subarray(0,a+1)),l=QR(e.subarray(a+1));return o+(l-o)*(r-a)}}function J0e(e,n,t=EU){if(!(!(i=e.length)||isNaN(n=+n))){if(n<=0||i<2)return+t(e[0],0,e);if(n>=1)return+t(e[i-1],i-1,e);var i,r=(i-1)*n,a=Math.floor(r),o=+t(e[a],a,e),l=+t(e[a+1],a+1,e);return o+(l-o)*(r-a)}}function ebe(e,n,t){e=+e,n=+n,t=(r=arguments.length)<2?(n=e,e=0,1):r<3?1:+t;for(var i=-1,r=Math.max(0,Math.ceil((n-e)/t))|0,a=new Array(r);++i>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):t===8?ng(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?ng(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=tbe.exec(e))?new _r(n[1],n[2],n[3],1):(n=ibe.exec(e))?new _r(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=rbe.exec(e))?ng(n[1],n[2],n[3],n[4]):(n=abe.exec(e))?ng(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=obe.exec(e))?aP(n[1],n[2]/100,n[3]/100,1):(n=sbe.exec(e))?aP(n[1],n[2]/100,n[3]/100,n[4]):JR.hasOwnProperty(e)?tP(JR[e]):e==="transparent"?new _r(NaN,NaN,NaN,0):null}function tP(e){return new _r(e>>16&255,e>>8&255,e&255,1)}function ng(e,n,t,i){return i<=0&&(e=n=t=NaN),new _r(e,n,t,i)}function fbe(e){return e instanceof yp||(e=pm(e)),e?(e=e.rgb(),new _r(e.r,e.g,e.b,e.opacity)):new _r}function T4(e,n,t,i){return arguments.length===1?fbe(e):new _r(e,n,t,i??1)}function _r(e,n,t,i){this.r=+e,this.g=+n,this.b=+t,this.opacity=+i}lA(_r,T4,RU(yp,{brighter(e){return e=e==null?p1:Math.pow(p1,e),new _r(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?hm:Math.pow(hm,e),new _r(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new _r(vu(this.r),vu(this.g),vu(this.b),v1(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:iP,formatHex:iP,formatHex8:cbe,formatRgb:rP,toString:rP}));function iP(){return`#${cu(this.r)}${cu(this.g)}${cu(this.b)}`}function cbe(){return`#${cu(this.r)}${cu(this.g)}${cu(this.b)}${cu((isNaN(this.opacity)?1:this.opacity)*255)}`}function rP(){const e=v1(this.opacity);return`${e===1?"rgb(":"rgba("}${vu(this.r)}, ${vu(this.g)}, ${vu(this.b)}${e===1?")":`, ${e})`}`}function v1(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function vu(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function cu(e){return e=vu(e),(e<16?"0":"")+e.toString(16)}function aP(e,n,t,i){return i<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new La(e,n,t,i)}function PU(e){if(e instanceof La)return new La(e.h,e.s,e.l,e.opacity);if(e instanceof yp||(e=pm(e)),!e)return new La;if(e instanceof La)return e;e=e.rgb();var n=e.r/255,t=e.g/255,i=e.b/255,r=Math.min(n,t,i),a=Math.max(n,t,i),o=NaN,l=a-r,f=(a+r)/2;return l?(n===a?o=(t-i)/l+(t0&&f<1?0:o,new La(o,l,f,e.opacity)}function dbe(e,n,t,i){return arguments.length===1?PU(e):new La(e,n,t,i??1)}function La(e,n,t,i){this.h=+e,this.s=+n,this.l=+t,this.opacity=+i}lA(La,dbe,RU(yp,{brighter(e){return e=e==null?p1:Math.pow(p1,e),new La(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?hm:Math.pow(hm,e),new La(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,i=t+(t<.5?t:1-t)*n,r=2*t-i;return new _r(p3(e>=240?e-240:e+120,r,i),p3(e,r,i),p3(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new La(oP(this.h),tg(this.s),tg(this.l),v1(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=v1(this.opacity);return`${e===1?"hsl(":"hsla("}${oP(this.h)}, ${tg(this.s)*100}%, ${tg(this.l)*100}%${e===1?")":`, ${e})`}`}}));function oP(e){return e=(e||0)%360,e<0?e+360:e}function tg(e){return Math.max(0,Math.min(1,e||0))}function p3(e,n,t){return(e<60?n+(t-n)*e/60:e<180?t:e<240?n+(t-n)*(240-e)/60:n)*255}const uA=e=>()=>e;function hbe(e,n){return function(t){return e+t*n}}function mbe(e,n,t){return e=Math.pow(e,t),n=Math.pow(n,t)-e,t=1/t,function(i){return Math.pow(e+i*n,t)}}function pbe(e){return(e=+e)==1?NU:function(n,t){return t-n?mbe(n,t,e):uA(isNaN(n)?t:n)}}function NU(e,n){var t=n-e;return t?hbe(e,t):uA(isNaN(e)?n:e)}const sP=(function e(n){var t=pbe(n);function i(r,a){var o=t((r=T4(r)).r,(a=T4(a)).r),l=t(r.g,a.g),f=t(r.b,a.b),c=NU(r.opacity,a.opacity);return function(h){return r.r=o(h),r.g=l(h),r.b=f(h),r.opacity=c(h),r+""}}return i.gamma=e,i})(1);function vbe(e,n){n||(n=[]);var t=e?Math.min(n.length,e.length):0,i=n.slice(),r;return function(a){for(r=0;rt&&(a=n.slice(t,a),l[o]?l[o]+=a:l[++o]=a),(i=i[0])===(r=r[0])?l[o]?l[o]+=r:l[++o]=r:(l[++o]=null,f.push({i:o,x:g1(i,r)})),t=v3.lastIndex;return tn&&(t=e,e=n,n=t),function(i){return Math.max(e,Math.min(n,i))}}function jbe(e,n,t){var i=e[0],r=e[1],a=n[0],o=n[1];return r2?Obe:jbe,f=c=null,d}function d(p){return p==null||isNaN(p=+p)?a:(f||(f=l(e.map(i),n,t)))(i(o(p)))}return d.invert=function(p){return o(r((c||(c=l(n,e.map(i),g1)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,y1),h()):e.slice()},d.range=function(p){return arguments.length?(n=Array.from(p),h()):n.slice()},d.rangeRound=function(p){return n=Array.from(p),t=fA,h()},d.clamp=function(p){return arguments.length?(o=p?!0:ur,h()):o!==ur},d.interpolate=function(p){return arguments.length?(t=p,h()):t},d.unknown=function(p){return arguments.length?(a=p,d):a},function(p,v){return i=p,r=v,h()}}function cA(){return P0()(ur,ur)}function Ebe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function b1(e,n){if(!isFinite(e)||e===0)return null;var t=(e=n?e.toExponential(n-1):e.toExponential()).indexOf("e"),i=e.slice(0,t);return[i.length>1?i[0]+i.slice(2):i,+e.slice(t+1)]}function cc(e){return e=b1(Math.abs(e)),e?e[1]:NaN}function Tbe(e,n){return function(t,i){for(var r=t.length,a=[],o=0,l=e[0],f=0;r>0&&l>0&&(f+l+1>i&&(l=Math.max(1,i-f)),a.push(t.substring(r-=l,r+l)),!((f+=l+1)>i));)l=e[o=(o+1)%e.length];return a.reverse().join(n)}}function Mbe(e){return function(n){return n.replace(/[0-9]/g,function(t){return e[+t]})}}var Dbe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function vm(e){if(!(n=Dbe.exec(e)))throw new Error("invalid format: "+e);var n;return new dA({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}vm.prototype=dA.prototype;function dA(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}dA.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Rbe(e){e:for(var n=e.length,t=1,i=-1,r;t0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(r+1):e}var w1;function Pbe(e,n){var t=b1(e,n);if(!t)return w1=void 0,e.toPrecision(n);var i=t[0],r=t[1],a=r-(w1=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,o=i.length;return a===o?i:a>o?i+new Array(a-o+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+b1(e,Math.max(0,n+a-1))[0]}function uP(e,n){var t=b1(e,n);if(!t)return e+"";var i=t[0],r=t[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const fP={"%":(e,n)=>(e*100).toFixed(n),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Ebe,e:(e,n)=>e.toExponential(n),f:(e,n)=>e.toFixed(n),g:(e,n)=>e.toPrecision(n),o:e=>Math.round(e).toString(8),p:(e,n)=>uP(e*100,n),r:uP,s:Pbe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function cP(e){return e}var dP=Array.prototype.map,hP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Nbe(e){var n=e.grouping===void 0||e.thousands===void 0?cP:Tbe(dP.call(e.grouping,Number),e.thousands+""),t=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",r=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?cP:Mbe(dP.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function c(d,p){d=vm(d);var v=d.fill,b=d.align,w=d.sign,k=d.symbol,_=d.zero,C=d.width,S=d.comma,E=d.precision,j=d.trim,O=d.type;O==="n"?(S=!0,O="g"):fP[O]||(E===void 0&&(E=12),j=!0,O="g"),(_||v==="0"&&b==="=")&&(_=!0,v="0",b="=");var M=(p&&p.prefix!==void 0?p.prefix:"")+(k==="$"?t:k==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():""),$=(k==="$"?i:/[%p]/.test(O)?o:"")+(p&&p.suffix!==void 0?p.suffix:""),q=fP[O],P=/[defgprs%]/.test(O);E=E===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function z(B){var V=M,U=$,N,D,L;if(O==="c")U=q(B)+U,B="";else{B=+B;var H=B<0||1/B<0;if(B=isNaN(B)?f:q(Math.abs(B),E),j&&(B=Rbe(B)),H&&+B==0&&w!=="+"&&(H=!1),V=(H?w==="("?w:l:w==="-"||w==="("?"":w)+V,U=(O==="s"&&!isNaN(B)&&w1!==void 0?hP[8+w1/3]:"")+U+(H&&w==="("?")":""),P){for(N=-1,D=B.length;++NL||L>57){U=(L===46?r+B.slice(N+1):B.slice(N))+U,B=B.slice(0,N);break}}}S&&!_&&(B=n(B,1/0));var Y=V.length+B.length+U.length,R=Y>1)+V+B+U+R.slice(Y);break;default:B=R+V+B+U;break}return a(B)}return z.toString=function(){return d+""},z}function h(d,p){var v=Math.max(-8,Math.min(8,Math.floor(cc(p)/3)))*3,b=Math.pow(10,-v),w=c((d=vm(d),d.type="f",d),{suffix:hP[8+v/3]});return function(k){return w(b*k)}}return{format:c,formatPrefix:h}}var ig,hA,$U;$be({thousands:",",grouping:[3],currency:["$",""]});function $be(e){return ig=Nbe(e),hA=ig.format,$U=ig.formatPrefix,ig}function zbe(e){return Math.max(0,-cc(Math.abs(e)))}function Lbe(e,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(cc(n)/3)))*3-cc(Math.abs(e)))}function Ibe(e,n){return e=Math.abs(e),n=Math.abs(n)-e,Math.max(0,cc(n)-cc(e))+1}function zU(e,n,t,i){var r=O4(e,n,t),a;switch(i=vm(i??",f"),i.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(n));return i.precision==null&&!isNaN(a=Lbe(r,o))&&(i.precision=a),$U(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(a=Ibe(r,Math.max(Math.abs(e),Math.abs(n))))&&(i.precision=a-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(a=zbe(r))&&(i.precision=a-(i.type==="%")*2);break}}return hA(i)}function Cl(e){var n=e.domain;return e.ticks=function(t){var i=n();return A4(i[0],i[i.length-1],t??10)},e.tickFormat=function(t,i){var r=n();return zU(r[0],r[r.length-1],t??10,i)},e.nice=function(t){t==null&&(t=10);var i=n(),r=0,a=i.length-1,o=i[r],l=i[a],f,c,h=10;for(l0;){if(c=j4(o,l,t),c===f)return i[r]=o,i[a]=l,n(i);if(c>0)o=Math.floor(o/c)*c,l=Math.ceil(l/c)*c;else if(c<0)o=Math.ceil(o*c)/c,l=Math.floor(l*c)/c;else break;f=c}return e},e}function k1(){var e=cA();return e.copy=function(){return bp(e,k1())},Aa.apply(e,arguments),Cl(e)}function LU(e){var n;function t(i){return i==null||isNaN(i=+i)?n:i}return t.invert=t,t.domain=t.range=function(i){return arguments.length?(e=Array.from(i,y1),t):e.slice()},t.unknown=function(i){return arguments.length?(n=i,t):n},t.copy=function(){return LU(e).unknown(n)},e=arguments.length?Array.from(e,y1):[0,1],Cl(t)}function IU(e,n){e=e.slice();var t=0,i=e.length-1,r=e[t],a=e[i],o;return aMath.pow(e,n)}function Ube(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),n=>Math.log(n)/e)}function vP(e){return(n,t)=>-e(-n,t)}function mA(e){const n=e(mP,pP),t=n.domain;let i=10,r,a;function o(){return r=Ube(i),a=Hbe(i),t()[0]<0?(r=vP(r),a=vP(a),e(Bbe,Fbe)):e(mP,pP),n}return n.base=function(l){return arguments.length?(i=+l,o()):i},n.domain=function(l){return arguments.length?(t(l),o()):t()},n.ticks=l=>{const f=t();let c=f[0],h=f[f.length-1];const d=h0){for(;p<=v;++p)for(b=1;bh)break;_.push(w)}}else for(;p<=v;++p)for(b=i-1;b>=1;--b)if(w=p>0?b/a(-p):b*a(p),!(wh)break;_.push(w)}_.length*2{if(l==null&&(l=10),f==null&&(f=i===10?"s":","),typeof f!="function"&&(!(i%1)&&(f=vm(f)).precision==null&&(f.trim=!0),f=hA(f)),l===1/0)return f;const c=Math.max(1,i*l/n.ticks().length);return h=>{let d=h/a(Math.round(r(h)));return d*it(IU(t(),{floor:l=>a(Math.floor(r(l))),ceil:l=>a(Math.ceil(r(l)))})),n}function BU(){const e=mA(P0()).domain([1,10]);return e.copy=()=>bp(e,BU()).base(e.base()),Aa.apply(e,arguments),e}function gP(e){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/e))}}function yP(e){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*e}}function pA(e){var n=1,t=e(gP(n),yP(n));return t.constant=function(i){return arguments.length?e(gP(n=+i),yP(n)):n},Cl(t)}function FU(){var e=pA(P0());return e.copy=function(){return bp(e,FU()).constant(e.constant())},Aa.apply(e,arguments)}function bP(e){return function(n){return n<0?-Math.pow(-n,e):Math.pow(n,e)}}function Wbe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Vbe(e){return e<0?-e*e:e*e}function vA(e){var n=e(ur,ur),t=1;function i(){return t===1?e(ur,ur):t===.5?e(Wbe,Vbe):e(bP(t),bP(1/t))}return n.exponent=function(r){return arguments.length?(t=+r,i()):t},Cl(n)}function gA(){var e=vA(P0());return e.copy=function(){return bp(e,gA()).exponent(e.exponent())},Aa.apply(e,arguments),e}function Gbe(){return gA.apply(null,arguments).exponent(.5)}function wP(e){return Math.sign(e)*e*e}function Ybe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function qU(){var e=cA(),n=[0,1],t=!1,i;function r(a){var o=Ybe(e(a));return isNaN(o)?i:t?Math.round(o):o}return r.invert=function(a){return e.invert(wP(a))},r.domain=function(a){return arguments.length?(e.domain(a),r):e.domain()},r.range=function(a){return arguments.length?(e.range((n=Array.from(a,y1)).map(wP)),r):n.slice()},r.rangeRound=function(a){return r.range(a).round(!0)},r.round=function(a){return arguments.length?(t=!!a,r):t},r.clamp=function(a){return arguments.length?(e.clamp(a),r):e.clamp()},r.unknown=function(a){return arguments.length?(i=a,r):i},r.copy=function(){return qU(e.domain(),n).round(t).clamp(e.clamp()).unknown(i)},Aa.apply(r,arguments),Cl(r)}function HU(){var e=[],n=[],t=[],i;function r(){var o=0,l=Math.max(1,n.length);for(t=new Array(l-1);++o0?t[l-1]:e[0],l=t?[i[t-1],n]:[i[c-1],i[c]]},o.unknown=function(f){return arguments.length&&(a=f),o},o.thresholds=function(){return i.slice()},o.copy=function(){return UU().domain([e,n]).range(r).unknown(a)},Aa.apply(Cl(o),arguments)}function WU(){var e=[.5],n=[0,1],t,i=1;function r(a){return a!=null&&a<=a?n[gp(e,a,0,i)]:t}return r.domain=function(a){return arguments.length?(e=Array.from(a),i=Math.min(e.length,n.length-1),r):e.slice()},r.range=function(a){return arguments.length?(n=Array.from(a),i=Math.min(e.length,n.length-1),r):n.slice()},r.invertExtent=function(a){var o=n.indexOf(a);return[e[o-1],e[o]]},r.unknown=function(a){return arguments.length?(t=a,r):t},r.copy=function(){return WU().domain(e).range(n).unknown(t)},Aa.apply(r,arguments)}const g3=new Date,y3=new Date;function Ci(e,n,t,i){function r(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return r.floor=a=>(e(a=new Date(+a)),a),r.ceil=a=>(e(a=new Date(a-1)),n(a,1),e(a),a),r.round=a=>{const o=r(a),l=r.ceil(a);return a-o(n(a=new Date(+a),o==null?1:Math.floor(o)),a),r.range=(a,o,l)=>{const f=[];if(a=r.ceil(a),l=l==null?1:Math.floor(l),!(a0))return f;let c;do f.push(c=new Date(+a)),n(a,l),e(a);while(cCi(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;n(o,-1),!a(o););else for(;--l>=0;)for(;n(o,1),!a(o););}),t&&(r.count=(a,o)=>(g3.setTime(+a),y3.setTime(+o),e(g3),e(y3),Math.floor(t(g3,y3))),r.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?r.filter(i?o=>i(o)%a===0:o=>r.count(0,o)%a===0):r)),r}const _1=Ci(()=>{},(e,n)=>{e.setTime(+e+n)},(e,n)=>n-e);_1.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ci(n=>{n.setTime(Math.floor(n/e)*e)},(n,t)=>{n.setTime(+n+t*e)},(n,t)=>(t-n)/e):_1);_1.range;const Wo=1e3,ma=Wo*60,Vo=ma*60,as=Vo*24,yA=as*7,kP=as*30,b3=as*365,du=Ci(e=>{e.setTime(e-e.getMilliseconds())},(e,n)=>{e.setTime(+e+n*Wo)},(e,n)=>(n-e)/Wo,e=>e.getUTCSeconds());du.range;const bA=Ci(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Wo)},(e,n)=>{e.setTime(+e+n*ma)},(e,n)=>(n-e)/ma,e=>e.getMinutes());bA.range;const wA=Ci(e=>{e.setUTCSeconds(0,0)},(e,n)=>{e.setTime(+e+n*ma)},(e,n)=>(n-e)/ma,e=>e.getUTCMinutes());wA.range;const kA=Ci(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Wo-e.getMinutes()*ma)},(e,n)=>{e.setTime(+e+n*Vo)},(e,n)=>(n-e)/Vo,e=>e.getHours());kA.range;const _A=Ci(e=>{e.setUTCMinutes(0,0,0)},(e,n)=>{e.setTime(+e+n*Vo)},(e,n)=>(n-e)/Vo,e=>e.getUTCHours());_A.range;const wp=Ci(e=>e.setHours(0,0,0,0),(e,n)=>e.setDate(e.getDate()+n),(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ma)/as,e=>e.getDate()-1);wp.range;const N0=Ci(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/as,e=>e.getUTCDate()-1);N0.range;const VU=Ci(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/as,e=>Math.floor(e/as));VU.range;function Fu(e){return Ci(n=>{n.setDate(n.getDate()-(n.getDay()+7-e)%7),n.setHours(0,0,0,0)},(n,t)=>{n.setDate(n.getDate()+t*7)},(n,t)=>(t-n-(t.getTimezoneOffset()-n.getTimezoneOffset())*ma)/yA)}const $0=Fu(0),x1=Fu(1),Kbe=Fu(2),Xbe=Fu(3),dc=Fu(4),Zbe=Fu(5),Qbe=Fu(6);$0.range;x1.range;Kbe.range;Xbe.range;dc.range;Zbe.range;Qbe.range;function qu(e){return Ci(n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-e)%7),n.setUTCHours(0,0,0,0)},(n,t)=>{n.setUTCDate(n.getUTCDate()+t*7)},(n,t)=>(t-n)/yA)}const z0=qu(0),S1=qu(1),Jbe=qu(2),ewe=qu(3),hc=qu(4),nwe=qu(5),twe=qu(6);z0.range;S1.range;Jbe.range;ewe.range;hc.range;nwe.range;twe.range;const xA=Ci(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,n)=>{e.setMonth(e.getMonth()+n)},(e,n)=>n.getMonth()-e.getMonth()+(n.getFullYear()-e.getFullYear())*12,e=>e.getMonth());xA.range;const SA=Ci(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCMonth(e.getUTCMonth()+n)},(e,n)=>n.getUTCMonth()-e.getUTCMonth()+(n.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());SA.range;const os=Ci(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n)},(e,n)=>n.getFullYear()-e.getFullYear(),e=>e.getFullYear());os.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ci(n=>{n.setFullYear(Math.floor(n.getFullYear()/e)*e),n.setMonth(0,1),n.setHours(0,0,0,0)},(n,t)=>{n.setFullYear(n.getFullYear()+t*e)});os.range;const ss=Ci(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n)},(e,n)=>n.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ss.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ci(n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/e)*e),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},(n,t)=>{n.setUTCFullYear(n.getUTCFullYear()+t*e)});ss.range;function GU(e,n,t,i,r,a){const o=[[du,1,Wo],[du,5,5*Wo],[du,15,15*Wo],[du,30,30*Wo],[a,1,ma],[a,5,5*ma],[a,15,15*ma],[a,30,30*ma],[r,1,Vo],[r,3,3*Vo],[r,6,6*Vo],[r,12,12*Vo],[i,1,as],[i,2,2*as],[t,1,yA],[n,1,kP],[n,3,3*kP],[e,1,b3]];function l(c,h,d){const p=hk).right(o,p);if(v===o.length)return e.every(O4(c/b3,h/b3,d));if(v===0)return _1.every(Math.max(O4(c,h,d),1));const[b,w]=o[p/o[v-1][2]53)return null;"w"in ne||(ne.w=1),"Z"in ne?(we=k3(uh(ne.y,0,1)),Ce=we.getUTCDay(),we=Ce>4||Ce===0?S1.ceil(we):S1(we),we=N0.offset(we,(ne.V-1)*7),ne.y=we.getUTCFullYear(),ne.m=we.getUTCMonth(),ne.d=we.getUTCDate()+(ne.w+6)%7):(we=w3(uh(ne.y,0,1)),Ce=we.getDay(),we=Ce>4||Ce===0?x1.ceil(we):x1(we),we=wp.offset(we,(ne.V-1)*7),ne.y=we.getFullYear(),ne.m=we.getMonth(),ne.d=we.getDate()+(ne.w+6)%7)}else("W"in ne||"U"in ne)&&("w"in ne||(ne.w="u"in ne?ne.u%7:"W"in ne?1:0),Ce="Z"in ne?k3(uh(ne.y,0,1)).getUTCDay():w3(uh(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+ne.W*7-(Ce+5)%7:ne.w+ne.U*7-(Ce+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,k3(ne)):w3(ne)}}function $(ae,le,_e,ne){for(var ze=0,we=le.length,Ce=_e.length,Ne,ge;ze=Ce)return-1;if(Ne=le.charCodeAt(ze++),Ne===37){if(Ne=le.charAt(ze++),ge=j[Ne in _P?le.charAt(ze++):Ne],!ge||(ne=ge(ae,_e,ne))<0)return-1}else if(Ne!=_e.charCodeAt(ne++))return-1}return ne}function q(ae,le,_e){var ne=c.exec(le.slice(_e));return ne?(ae.p=h.get(ne[0].toLowerCase()),_e+ne[0].length):-1}function P(ae,le,_e){var ne=v.exec(le.slice(_e));return ne?(ae.w=b.get(ne[0].toLowerCase()),_e+ne[0].length):-1}function z(ae,le,_e){var ne=d.exec(le.slice(_e));return ne?(ae.w=p.get(ne[0].toLowerCase()),_e+ne[0].length):-1}function B(ae,le,_e){var ne=_.exec(le.slice(_e));return ne?(ae.m=C.get(ne[0].toLowerCase()),_e+ne[0].length):-1}function V(ae,le,_e){var ne=w.exec(le.slice(_e));return ne?(ae.m=k.get(ne[0].toLowerCase()),_e+ne[0].length):-1}function U(ae,le,_e){return $(ae,n,le,_e)}function N(ae,le,_e){return $(ae,t,le,_e)}function D(ae,le,_e){return $(ae,i,le,_e)}function L(ae){return o[ae.getDay()]}function H(ae){return a[ae.getDay()]}function Y(ae){return f[ae.getMonth()]}function R(ae){return l[ae.getMonth()]}function G(ae){return r[+(ae.getHours()>=12)]}function W(ae){return 1+~~(ae.getMonth()/3)}function I(ae){return o[ae.getUTCDay()]}function X(ae){return a[ae.getUTCDay()]}function ee(ae){return f[ae.getUTCMonth()]}function re(ae){return l[ae.getUTCMonth()]}function se(ae){return r[+(ae.getUTCHours()>=12)]}function ye(ae){return 1+~~(ae.getUTCMonth()/3)}return{format:function(ae){var le=O(ae+="",S);return le.toString=function(){return ae},le},parse:function(ae){var le=M(ae+="",!1);return le.toString=function(){return ae},le},utcFormat:function(ae){var le=O(ae+="",E);return le.toString=function(){return ae},le},utcParse:function(ae){var le=M(ae+="",!0);return le.toString=function(){return ae},le}}}var _P={"-":"",_:" ",0:"0"},Di=/^\s*\d+/,lwe=/^%/,uwe=/[\\^$*+?|[\]().{}]/g;function mt(e,n,t){var i=e<0?"-":"",r=(i?-e:e)+"",a=r.length;return i+(a[n.toLowerCase(),t]))}function cwe(e,n,t){var i=Di.exec(n.slice(t,t+1));return i?(e.w=+i[0],t+i[0].length):-1}function dwe(e,n,t){var i=Di.exec(n.slice(t,t+1));return i?(e.u=+i[0],t+i[0].length):-1}function hwe(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.U=+i[0],t+i[0].length):-1}function mwe(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.V=+i[0],t+i[0].length):-1}function pwe(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.W=+i[0],t+i[0].length):-1}function xP(e,n,t){var i=Di.exec(n.slice(t,t+4));return i?(e.y=+i[0],t+i[0].length):-1}function SP(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),t+i[0].length):-1}function vwe(e,n,t){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(t,t+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),t+i[0].length):-1}function gwe(e,n,t){var i=Di.exec(n.slice(t,t+1));return i?(e.q=i[0]*3-3,t+i[0].length):-1}function ywe(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.m=i[0]-1,t+i[0].length):-1}function CP(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.d=+i[0],t+i[0].length):-1}function bwe(e,n,t){var i=Di.exec(n.slice(t,t+3));return i?(e.m=0,e.d=+i[0],t+i[0].length):-1}function AP(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.H=+i[0],t+i[0].length):-1}function wwe(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.M=+i[0],t+i[0].length):-1}function kwe(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.S=+i[0],t+i[0].length):-1}function _we(e,n,t){var i=Di.exec(n.slice(t,t+3));return i?(e.L=+i[0],t+i[0].length):-1}function xwe(e,n,t){var i=Di.exec(n.slice(t,t+6));return i?(e.L=Math.floor(i[0]/1e3),t+i[0].length):-1}function Swe(e,n,t){var i=lwe.exec(n.slice(t,t+1));return i?t+i[0].length:-1}function Cwe(e,n,t){var i=Di.exec(n.slice(t));return i?(e.Q=+i[0],t+i[0].length):-1}function Awe(e,n,t){var i=Di.exec(n.slice(t));return i?(e.s=+i[0],t+i[0].length):-1}function jP(e,n){return mt(e.getDate(),n,2)}function jwe(e,n){return mt(e.getHours(),n,2)}function Owe(e,n){return mt(e.getHours()%12||12,n,2)}function Ewe(e,n){return mt(1+wp.count(os(e),e),n,3)}function YU(e,n){return mt(e.getMilliseconds(),n,3)}function Twe(e,n){return YU(e,n)+"000"}function Mwe(e,n){return mt(e.getMonth()+1,n,2)}function Dwe(e,n){return mt(e.getMinutes(),n,2)}function Rwe(e,n){return mt(e.getSeconds(),n,2)}function Pwe(e){var n=e.getDay();return n===0?7:n}function Nwe(e,n){return mt($0.count(os(e)-1,e),n,2)}function KU(e){var n=e.getDay();return n>=4||n===0?dc(e):dc.ceil(e)}function $we(e,n){return e=KU(e),mt(dc.count(os(e),e)+(os(e).getDay()===4),n,2)}function zwe(e){return e.getDay()}function Lwe(e,n){return mt(x1.count(os(e)-1,e),n,2)}function Iwe(e,n){return mt(e.getFullYear()%100,n,2)}function Bwe(e,n){return e=KU(e),mt(e.getFullYear()%100,n,2)}function Fwe(e,n){return mt(e.getFullYear()%1e4,n,4)}function qwe(e,n){var t=e.getDay();return e=t>=4||t===0?dc(e):dc.ceil(e),mt(e.getFullYear()%1e4,n,4)}function Hwe(e){var n=e.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+mt(n/60|0,"0",2)+mt(n%60,"0",2)}function OP(e,n){return mt(e.getUTCDate(),n,2)}function Uwe(e,n){return mt(e.getUTCHours(),n,2)}function Wwe(e,n){return mt(e.getUTCHours()%12||12,n,2)}function Vwe(e,n){return mt(1+N0.count(ss(e),e),n,3)}function XU(e,n){return mt(e.getUTCMilliseconds(),n,3)}function Gwe(e,n){return XU(e,n)+"000"}function Ywe(e,n){return mt(e.getUTCMonth()+1,n,2)}function Kwe(e,n){return mt(e.getUTCMinutes(),n,2)}function Xwe(e,n){return mt(e.getUTCSeconds(),n,2)}function Zwe(e){var n=e.getUTCDay();return n===0?7:n}function Qwe(e,n){return mt(z0.count(ss(e)-1,e),n,2)}function ZU(e){var n=e.getUTCDay();return n>=4||n===0?hc(e):hc.ceil(e)}function Jwe(e,n){return e=ZU(e),mt(hc.count(ss(e),e)+(ss(e).getUTCDay()===4),n,2)}function eke(e){return e.getUTCDay()}function nke(e,n){return mt(S1.count(ss(e)-1,e),n,2)}function tke(e,n){return mt(e.getUTCFullYear()%100,n,2)}function ike(e,n){return e=ZU(e),mt(e.getUTCFullYear()%100,n,2)}function rke(e,n){return mt(e.getUTCFullYear()%1e4,n,4)}function ake(e,n){var t=e.getUTCDay();return e=t>=4||t===0?hc(e):hc.ceil(e),mt(e.getUTCFullYear()%1e4,n,4)}function oke(){return"+0000"}function EP(){return"%"}function TP(e){return+e}function MP(e){return Math.floor(+e/1e3)}var Df,QU,JU;ske({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function ske(e){return Df=swe(e),QU=Df.format,Df.parse,JU=Df.utcFormat,Df.utcParse,Df}function lke(e){return new Date(e)}function uke(e){return e instanceof Date?+e:+new Date(+e)}function CA(e,n,t,i,r,a,o,l,f,c){var h=cA(),d=h.invert,p=h.domain,v=c(".%L"),b=c(":%S"),w=c("%I:%M"),k=c("%I %p"),_=c("%a %d"),C=c("%b %d"),S=c("%B"),E=c("%Y");function j(O){return(f(O)n(r/(e.length-1)))},t.quantiles=function(i){return Array.from({length:i+1},(r,a)=>Q0e(e,a/i))},t.copy=function(){return iW(n).domain(e)},ys.apply(t,arguments)}function I0(){var e=0,n=.5,t=1,i=1,r,a,o,l,f,c=ur,h,d=!1,p;function v(w){return isNaN(w=+w)?p:(w=.5+((w=+h(w))-a)*(i*wt}return x3=e,x3}var S3,NP;function pke(){if(NP)return S3;NP=1;var e=sW(),n=mke(),t=td();function i(r){return r&&r.length?e(r,t,n):void 0}return S3=i,S3}var vke=pke();const nl=pt(vke);var C3,$P;function gke(){if($P)return C3;$P=1;function e(n,t){return ne.e^a.s<0?1:-1;for(i=a.d.length,r=e.d.length,n=0,t=ie.d[n]^a.s<0?1:-1;return i===r?0:i>r^a.s<0?1:-1};sn.decimalPlaces=sn.dp=function(){var e=this,n=e.d.length-1,t=(n-e.e)*Ht;if(n=e.d[n],n)for(;n%10==0;n/=10)t--;return t<0?0:t};sn.dividedBy=sn.div=function(e){return es(this,new this.constructor(e))};sn.dividedToIntegerBy=sn.idiv=function(e){var n=this,t=n.constructor;return Rt(es(n,new t(e),0,1),t.precision)};sn.equals=sn.eq=function(e){return!this.cmp(e)};sn.exponent=function(){return vi(this)};sn.greaterThan=sn.gt=function(e){return this.cmp(e)>0};sn.greaterThanOrEqualTo=sn.gte=function(e){return this.cmp(e)>=0};sn.isInteger=sn.isint=function(){return this.e>this.d.length-2};sn.isNegative=sn.isneg=function(){return this.s<0};sn.isPositive=sn.ispos=function(){return this.s>0};sn.isZero=function(){return this.s===0};sn.lessThan=sn.lt=function(e){return this.cmp(e)<0};sn.lessThanOrEqualTo=sn.lte=function(e){return this.cmp(e)<1};sn.logarithm=sn.log=function(e){var n,t=this,i=t.constructor,r=i.precision,a=r+5;if(e===void 0)e=new i(10);else if(e=new i(e),e.s<1||e.eq(Ur))throw Error(ba+"NaN");if(t.s<1)throw Error(ba+(t.s?"NaN":"-Infinity"));return t.eq(Ur)?new i(0):(Xt=!1,n=es(gm(t,a),gm(e,a),a),Xt=!0,Rt(n,r))};sn.minus=sn.sub=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?cW(n,e):uW(n,(e.s=-e.s,e))};sn.modulo=sn.mod=function(e){var n,t=this,i=t.constructor,r=i.precision;if(e=new i(e),!e.s)throw Error(ba+"NaN");return t.s?(Xt=!1,n=es(t,e,0,1).times(e),Xt=!0,t.minus(n)):Rt(new i(t),r)};sn.naturalExponential=sn.exp=function(){return fW(this)};sn.naturalLogarithm=sn.ln=function(){return gm(this)};sn.negated=sn.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};sn.plus=sn.add=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?uW(n,e):cW(n,(e.s=-e.s,e))};sn.precision=sn.sd=function(e){var n,t,i,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(gu+e);if(n=vi(r)+1,i=r.d.length-1,t=i*Ht+1,i=r.d[i],i){for(;i%10==0;i/=10)t--;for(i=r.d[0];i>=10;i/=10)t++}return e&&n>t?n:t};sn.squareRoot=sn.sqrt=function(){var e,n,t,i,r,a,o,l=this,f=l.constructor;if(l.s<1){if(!l.s)return new f(0);throw Error(ba+"NaN")}for(e=vi(l),Xt=!1,r=Math.sqrt(+l),r==0||r==1/0?(n=ao(l.d),(n.length+e)%2==0&&(n+="0"),r=Math.sqrt(n),e=ad((e+1)/2)-(e<0||e%2),r==1/0?n="5e"+e:(n=r.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),i=new f(n)):i=new f(r.toString()),t=f.precision,r=o=t+3;;)if(a=i,i=a.plus(es(l,a,o+2)).times(.5),ao(a.d).slice(0,o)===(n=ao(i.d)).slice(0,o)){if(n=n.slice(o-3,o+1),r==o&&n=="4999"){if(Rt(a,t+1,0),a.times(a).eq(l)){i=a;break}}else if(n!="9999")break;o+=4}return Xt=!0,Rt(i,t)};sn.times=sn.mul=function(e){var n,t,i,r,a,o,l,f,c,h=this,d=h.constructor,p=h.d,v=(e=new d(e)).d;if(!h.s||!e.s)return new d(0);for(e.s*=h.s,t=h.e+e.e,f=p.length,c=v.length,f=0;){for(n=0,r=f+i;r>i;)l=a[r]+v[i]*p[r-i-1]+n,a[r--]=l%Ei|0,n=l/Ei|0;a[r]=(a[r]+n)%Ei|0}for(;!a[--o];)a.pop();return n?++t:a.shift(),e.d=a,e.e=t,Xt?Rt(e,d.precision):e};sn.toDecimalPlaces=sn.todp=function(e,n){var t=this,i=t.constructor;return t=new i(t),e===void 0?t:(vo(e,0,rd),n===void 0?n=i.rounding:vo(n,0,8),Rt(t,e+vi(t)+1,n))};sn.toExponential=function(e,n){var t,i=this,r=i.constructor;return e===void 0?t=ju(i,!0):(vo(e,0,rd),n===void 0?n=r.rounding:vo(n,0,8),i=Rt(new r(i),e+1,n),t=ju(i,!0,e+1)),t};sn.toFixed=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?ju(r):(vo(e,0,rd),n===void 0?n=a.rounding:vo(n,0,8),i=Rt(new a(r),e+vi(r)+1,n),t=ju(i.abs(),!1,e+vi(i)+1),r.isneg()&&!r.isZero()?"-"+t:t)};sn.toInteger=sn.toint=function(){var e=this,n=e.constructor;return Rt(new n(e),vi(e)+1,n.rounding)};sn.toNumber=function(){return+this};sn.toPower=sn.pow=function(e){var n,t,i,r,a,o,l=this,f=l.constructor,c=12,h=+(e=new f(e));if(!e.s)return new f(Ur);if(l=new f(l),!l.s){if(e.s<1)throw Error(ba+"Infinity");return l}if(l.eq(Ur))return l;if(i=f.precision,e.eq(Ur))return Rt(l,i);if(n=e.e,t=e.d.length-1,o=n>=t,a=l.s,o){if((t=h<0?-h:h)<=lW){for(r=new f(Ur),n=Math.ceil(i/Ht+4),Xt=!1;t%2&&(r=r.times(l),qP(r.d,n)),t=ad(t/2),t!==0;)l=l.times(l),qP(l.d,n);return Xt=!0,e.s<0?new f(Ur).div(r):Rt(r,i)}}else if(a<0)throw Error(ba+"NaN");return a=a<0&&e.d[Math.max(n,t)]&1?-1:1,l.s=1,Xt=!1,r=e.times(gm(l,i+c)),Xt=!0,r=fW(r),r.s=a,r};sn.toPrecision=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?(t=vi(r),i=ju(r,t<=a.toExpNeg||t>=a.toExpPos)):(vo(e,1,rd),n===void 0?n=a.rounding:vo(n,0,8),r=Rt(new a(r),e,n),t=vi(r),i=ju(r,e<=t||t<=a.toExpNeg,e)),i};sn.toSignificantDigits=sn.tosd=function(e,n){var t=this,i=t.constructor;return e===void 0?(e=i.precision,n=i.rounding):(vo(e,1,rd),n===void 0?n=i.rounding:vo(n,0,8)),Rt(new i(t),e,n)};sn.toString=sn.valueOf=sn.val=sn.toJSON=sn[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,n=vi(e),t=e.constructor;return ju(e,n<=t.toExpNeg||n>=t.toExpPos)};function uW(e,n){var t,i,r,a,o,l,f,c,h=e.constructor,d=h.precision;if(!e.s||!n.s)return n.s||(n=new h(e)),Xt?Rt(n,d):n;if(f=e.d,c=n.d,o=e.e,r=n.e,f=f.slice(),a=o-r,a){for(a<0?(i=f,a=-a,l=c.length):(i=c,r=o,l=f.length),o=Math.ceil(d/Ht),l=o>l?o+1:l+1,a>l&&(a=l,i.length=1),i.reverse();a--;)i.push(0);i.reverse()}for(l=f.length,a=c.length,l-a<0&&(a=l,i=c,c=f,f=i),t=0;a;)t=(f[--a]=f[a]+c[a]+t)/Ei|0,f[a]%=Ei;for(t&&(f.unshift(t),++r),l=f.length;f[--l]==0;)f.pop();return n.d=f,n.e=r,Xt?Rt(n,d):n}function vo(e,n,t){if(e!==~~e||et)throw Error(gu+e)}function ao(e){var n,t,i,r=e.length-1,a="",o=e[0];if(r>0){for(a+=o,n=1;no?1:-1;else for(l=f=0;lr[l]?1:-1;break}return f}function t(i,r,a){for(var o=0;a--;)i[a]-=o,o=i[a]1;)i.shift()}return function(i,r,a,o){var l,f,c,h,d,p,v,b,w,k,_,C,S,E,j,O,M,$,q=i.constructor,P=i.s==r.s?1:-1,z=i.d,B=r.d;if(!i.s)return new q(i);if(!r.s)throw Error(ba+"Division by zero");for(f=i.e-r.e,M=B.length,j=z.length,v=new q(P),b=v.d=[],c=0;B[c]==(z[c]||0);)++c;if(B[c]>(z[c]||0)&&--f,a==null?C=a=q.precision:o?C=a+(vi(i)-vi(r))+1:C=a,C<0)return new q(0);if(C=C/Ht+2|0,c=0,M==1)for(h=0,B=B[0],C++;(c1&&(B=e(B,h),z=e(z,h),M=B.length,j=z.length),E=M,w=z.slice(0,M),k=w.length;k=Ei/2&&++O;do h=0,l=n(B,w,M,k),l<0?(_=w[0],M!=k&&(_=_*Ei+(w[1]||0)),h=_/O|0,h>1?(h>=Ei&&(h=Ei-1),d=e(B,h),p=d.length,k=w.length,l=n(d,w,p,k),l==1&&(h--,t(d,M16)throw Error(OA+vi(e));if(!e.s)return new h(Ur);for(Xt=!1,l=d,o=new h(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(i=Math.log(au(2,c))/Math.LN10*2+5|0,l+=i,t=r=a=new h(Ur),h.precision=l;;){if(r=Rt(r.times(e),l),t=t.times(++f),o=a.plus(es(r,t,l)),ao(o.d).slice(0,l)===ao(a.d).slice(0,l)){for(;c--;)a=Rt(a.times(a),l);return h.precision=d,n==null?(Xt=!0,Rt(a,d)):a}a=o}}function vi(e){for(var n=e.e*Ht,t=e.d[0];t>=10;t/=10)n++;return n}function T3(e,n,t){if(n>e.LN10.sd())throw Xt=!0,t&&(e.precision=t),Error(ba+"LN10 precision limit exceeded");return Rt(new e(e.LN10),n)}function Ks(e){for(var n="";e--;)n+="0";return n}function gm(e,n){var t,i,r,a,o,l,f,c,h,d=1,p=10,v=e,b=v.d,w=v.constructor,k=w.precision;if(v.s<1)throw Error(ba+(v.s?"NaN":"-Infinity"));if(v.eq(Ur))return new w(0);if(n==null?(Xt=!1,c=k):c=n,v.eq(10))return n==null&&(Xt=!0),T3(w,c);if(c+=p,w.precision=c,t=ao(b),i=t.charAt(0),a=vi(v),Math.abs(a)<15e14){for(;i<7&&i!=1||i==1&&t.charAt(1)>3;)v=v.times(e),t=ao(v.d),i=t.charAt(0),d++;a=vi(v),i>1?(v=new w("0."+t),a++):v=new w(i+"."+t.slice(1))}else return f=T3(w,c+2,k).times(a+""),v=gm(new w(i+"."+t.slice(1)),c-p).plus(f),w.precision=k,n==null?(Xt=!0,Rt(v,k)):v;for(l=o=v=es(v.minus(Ur),v.plus(Ur),c),h=Rt(v.times(v),c),r=3;;){if(o=Rt(o.times(h),c),f=l.plus(es(o,new w(r),c)),ao(f.d).slice(0,c)===ao(l.d).slice(0,c))return l=l.times(2),a!==0&&(l=l.plus(T3(w,c+2,k).times(a+""))),l=es(l,new w(d),c),w.precision=k,n==null?(Xt=!0,Rt(l,k)):l;l=f,r+=2}}function FP(e,n){var t,i,r;for((t=n.indexOf("."))>-1&&(n=n.replace(".","")),(i=n.search(/e/i))>0?(t<0&&(t=i),t+=+n.slice(i+1),n=n.substring(0,i)):t<0&&(t=n.length),i=0;n.charCodeAt(i)===48;)++i;for(r=n.length;n.charCodeAt(r-1)===48;)--r;if(n=n.slice(i,r),n){if(r-=i,t=t-i-1,e.e=ad(t/Ht),e.d=[],i=(t+1)%Ht,t<0&&(i+=Ht),iC1||e.e<-C1))throw Error(OA+t)}else e.s=0,e.e=0,e.d=[0];return e}function Rt(e,n,t){var i,r,a,o,l,f,c,h,d=e.d;for(o=1,a=d[0];a>=10;a/=10)o++;if(i=n-o,i<0)i+=Ht,r=n,c=d[h=0];else{if(h=Math.ceil((i+1)/Ht),a=d.length,h>=a)return e;for(c=a=d[h],o=1;a>=10;a/=10)o++;i%=Ht,r=i-Ht+o}if(t!==void 0&&(a=au(10,o-r-1),l=c/a%10|0,f=n<0||d[h+1]!==void 0||c%a,f=t<4?(l||f)&&(t==0||t==(e.s<0?3:2)):l>5||l==5&&(t==4||f||t==6&&(i>0?r>0?c/au(10,o-r):0:d[h-1])%10&1||t==(e.s<0?8:7))),n<1||!d[0])return f?(a=vi(e),d.length=1,n=n-a-1,d[0]=au(10,(Ht-n%Ht)%Ht),e.e=ad(-n/Ht)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(i==0?(d.length=h,a=1,h--):(d.length=h+1,a=au(10,Ht-i),d[h]=r>0?(c/au(10,o-r)%au(10,r)|0)*a:0),f)for(;;)if(h==0){(d[0]+=a)==Ei&&(d[0]=1,++e.e);break}else{if(d[h]+=a,d[h]!=Ei)break;d[h--]=0,a=1}for(i=d.length;d[--i]===0;)d.pop();if(Xt&&(e.e>C1||e.e<-C1))throw Error(OA+vi(e));return e}function cW(e,n){var t,i,r,a,o,l,f,c,h,d,p=e.constructor,v=p.precision;if(!e.s||!n.s)return n.s?n.s=-n.s:n=new p(e),Xt?Rt(n,v):n;if(f=e.d,d=n.d,i=n.e,c=e.e,f=f.slice(),o=c-i,o){for(h=o<0,h?(t=f,o=-o,l=d.length):(t=d,i=c,l=f.length),r=Math.max(Math.ceil(v/Ht),l)+2,o>r&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for(r=f.length,l=d.length,h=r0;--r)f[l++]=0;for(r=d.length;r>o;){if(f[--r]0?a=a.charAt(0)+"."+a.slice(1)+Ks(i):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(r<0?"e":"e+")+r):r<0?(a="0."+Ks(-r-1)+a,t&&(i=t-o)>0&&(a+=Ks(i))):r>=o?(a+=Ks(r+1-o),t&&(i=t-r-1)>0&&(a=a+"."+Ks(i))):((i=r+1)0&&(r+1===o&&(a+="."),a+=Ks(i))),e.s<0?"-"+a:a}function qP(e,n){if(e.length>n)return e.length=n,!0}function dW(e){var n,t,i;function r(a){var o=this;if(!(o instanceof r))return new r(a);if(o.constructor=r,a instanceof r){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(gu+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return FP(o,a.toString())}else if(typeof a!="string")throw Error(gu+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,jke.test(a))FP(o,a);else throw Error(gu+a)}if(r.prototype=sn,r.ROUND_UP=0,r.ROUND_DOWN=1,r.ROUND_CEIL=2,r.ROUND_FLOOR=3,r.ROUND_HALF_UP=4,r.ROUND_HALF_DOWN=5,r.ROUND_HALF_EVEN=6,r.ROUND_HALF_CEIL=7,r.ROUND_HALF_FLOOR=8,r.clone=dW,r.config=r.set=Oke,e===void 0&&(e={}),e)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n=r[n+1]&&i<=r[n+2])this[t]=i;else throw Error(gu+t+": "+i);if((i=e[t="LN10"])!==void 0)if(i==Math.LN10)this[t]=new this(i);else throw Error(gu+t+": "+i);return this}var EA=dW(Ake);Ur=new EA(1);const Ot=EA;function Eke(e){return Rke(e)||Dke(e)||Mke(e)||Tke()}function Tke(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mke(e,n){if(e){if(typeof e=="string")return R4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return R4(e,n)}}function Dke(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Rke(e){if(Array.isArray(e))return R4(e)}function R4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=n?t.apply(void 0,r):e(n-o,HP(function(){for(var l=arguments.length,f=new Array(l),c=0;ce.length)&&(n=e.length);for(var t=0,i=new Array(n);t"u"||!(Symbol.iterator in Object(e)))){var t=[],i=!0,r=!1,a=void 0;try{for(var o=e[Symbol.iterator](),l;!(i=(l=o.next()).done)&&(t.push(l.value),!(n&&t.length===n));i=!0);}catch(f){r=!0,a=f}finally{try{!i&&o.return!=null&&o.return()}finally{if(r)throw a}}return t}}function Yke(e){if(Array.isArray(e))return e}function gW(e){var n=ym(e,2),t=n[0],i=n[1],r=t,a=i;return t>i&&(r=i,a=t),[r,a]}function yW(e,n,t){if(e.lte(0))return new Ot(0);var i=q0.getDigitCount(e.toNumber()),r=new Ot(10).pow(i),a=e.div(r),o=i!==1?.05:.1,l=new Ot(Math.ceil(a.div(o).toNumber())).add(t).mul(o),f=l.mul(r);return n?f:new Ot(Math.ceil(f))}function Kke(e,n,t){var i=1,r=new Ot(e);if(!r.isint()&&t){var a=Math.abs(e);a<1?(i=new Ot(10).pow(q0.getDigitCount(e)-1),r=new Ot(Math.floor(r.div(i).toNumber())).mul(i)):a>1&&(r=new Ot(Math.floor(e)))}else e===0?r=new Ot(Math.floor((n-1)/2)):t||(r=new Ot(Math.floor(e)));var o=Math.floor((n-1)/2),l=zke($ke(function(f){return r.add(new Ot(f-o).mul(i)).toNumber()}),P4);return l(0,n)}function bW(e,n,t,i){var r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-e)/(t-1)))return{step:new Ot(0),tickMin:new Ot(0),tickMax:new Ot(0)};var a=yW(new Ot(n).sub(e).div(t-1),i,r),o;e<=0&&n>=0?o=new Ot(0):(o=new Ot(e).add(n).div(2),o=o.sub(new Ot(o).mod(a)));var l=Math.ceil(o.sub(e).div(a).toNumber()),f=Math.ceil(new Ot(n).sub(o).div(a).toNumber()),c=l+f+1;return c>t?bW(e,n,t,i,r+1):(c0?f+(t-c):f,l=n>0?l:l+(t-c)),{step:a,tickMin:o.sub(new Ot(l).mul(a)),tickMax:o.add(new Ot(f).mul(a))})}function Xke(e){var n=ym(e,2),t=n[0],i=n[1],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(r,2),l=gW([t,i]),f=ym(l,2),c=f[0],h=f[1];if(c===-1/0||h===1/0){var d=h===1/0?[c].concat($4(P4(0,r-1).map(function(){return 1/0}))):[].concat($4(P4(0,r-1).map(function(){return-1/0})),[h]);return t>i?N4(d):d}if(c===h)return Kke(c,r,a);var p=bW(c,h,o,a),v=p.step,b=p.tickMin,w=p.tickMax,k=q0.rangeStep(b,w.add(new Ot(.1).mul(v)),v);return t>i?N4(k):k}function Zke(e,n){var t=ym(e,2),i=t[0],r=t[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=gW([i,r]),l=ym(o,2),f=l[0],c=l[1];if(f===-1/0||c===1/0)return[i,r];if(f===c)return[f];var h=Math.max(n,2),d=yW(new Ot(c).sub(f).div(h-1),a,0),p=[].concat($4(q0.rangeStep(new Ot(f),new Ot(c).sub(new Ot(.99).mul(d)),d)),[c]);return i>r?N4(p):p}var Qke=pW(Xke),Jke=pW(Zke),e_e="Invariant failed";function Ou(e,n){throw new Error(e_e)}var n_e=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function pc(e){"@babel/helpers - typeof";return pc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},pc(e)}function A1(){return A1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function l_e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function u_e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function f_e(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,l=(t=i==null?void 0:i.length)!==null&&t!==void 0?t:0;if(l<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var f=a.range,c=0;c0?r[c-1].coordinate:r[l-1].coordinate,d=r[c].coordinate,p=c>=l-1?r[0].coordinate:r[c+1].coordinate,v=void 0;if(Fa(d-h)!==Fa(p-d)){var b=[];if(Fa(p-d)===Fa(f[1]-f[0])){v=p;var w=d+f[1]-f[0];b[0]=Math.min(w,(w+h)/2),b[1]=Math.max(w,(w+h)/2)}else{v=h;var k=p+f[1]-f[0];b[0]=Math.min(d,(k+d)/2),b[1]=Math.max(d,(k+d)/2)}var _=[Math.min(d,(v+d)/2),Math.max(d,(v+d)/2)];if(n>_[0]&&n<=_[1]||n>=b[0]&&n<=b[1]){o=r[c].index;break}}else{var C=Math.min(h,p),S=Math.max(h,p);if(n>(C+d)/2&&n<=(S+d)/2){o=r[c].index;break}}}else for(var E=0;E0&&E(i[E].coordinate+i[E-1].coordinate)/2&&n<=(i[E].coordinate+i[E+1].coordinate)/2||E===l-1&&n>(i[E].coordinate+i[E-1].coordinate)/2){o=i[E].index;break}return o},TA=function(n){var t,i=n,r=i.type.displayName,a=(t=n.type)!==null&&t!==void 0&&t.defaultProps?ti(ti({},n.type.defaultProps),n.props):n.props,o=a.stroke,l=a.fill,f;switch(r){case"Line":f=o;break;case"Area":case"Radar":f=o&&o!=="none"?o:l;break;default:f=l;break}return f},j_e=function(n){var t=n.barSize,i=n.totalSize,r=n.stackGroups,a=r===void 0?{}:r;if(!a)return{};for(var o={},l=Object.keys(a),f=0,c=l.length;f=0});if(_&&_.length){var C=_[0].type.defaultProps,S=C!==void 0?ti(ti({},C),_[0].props):_[0].props,E=S.barSize,j=S[k];o[j]||(o[j]=[]);var O=Gn(E)?t:E;o[j].push({item:_[0],stackList:_.slice(1),barSize:Gn(O)?void 0:Au(O,i,0)})}}return o},O_e=function(n){var t=n.barGap,i=n.barCategoryGap,r=n.bandSize,a=n.sizeList,o=a===void 0?[]:a,l=n.maxBarSize,f=o.length;if(f<1)return null;var c=Au(t,r,0,!0),h,d=[];if(o[0].barSize===+o[0].barSize){var p=!1,v=r/f,b=o.reduce(function(E,j){return E+j.barSize||0},0);b+=(f-1)*c,b>=r&&(b-=(f-1)*c,c=0),b>=r&&v>0&&(p=!0,v*=.9,b=f*v);var w=(r-b)/2>>0,k={offset:w-c,size:0};h=o.reduce(function(E,j){var O={item:j.item,position:{offset:k.offset+k.size+c,size:p?v:j.barSize}},M=[].concat(VP(E),[O]);return k=M[M.length-1].position,j.stackList&&j.stackList.length&&j.stackList.forEach(function($){M.push({item:$,position:k})}),M},d)}else{var _=Au(i,r,0,!0);r-2*_-(f-1)*c<=0&&(c=0);var C=(r-2*_-(f-1)*c)/f;C>1&&(C>>=0);var S=l===+l?Math.min(C,l):C;h=o.reduce(function(E,j,O){var M=[].concat(VP(E),[{item:j.item,position:{offset:_+(C+c)*O+(C-S)/2,size:S}}]);return j.stackList&&j.stackList.length&&j.stackList.forEach(function($){M.push({item:$,position:M[M.length-1].position})}),M},d)}return h},E_e=function(n,t,i,r){var a=i.children,o=i.width,l=i.margin,f=o-(l.left||0)-(l.right||0),c=xW({children:a,legendWidth:f});if(c){var h=r||{},d=h.width,p=h.height,v=c.align,b=c.verticalAlign,w=c.layout;if((w==="vertical"||w==="horizontal"&&b==="middle")&&v!=="center"&&Ve(n[v]))return ti(ti({},n),{},Kf({},v,n[v]+(d||0)));if((w==="horizontal"||w==="vertical"&&v==="center")&&b!=="middle"&&Ve(n[b]))return ti(ti({},n),{},Kf({},b,n[b]+(p||0)))}return n},T_e=function(n,t,i){return Gn(t)?!0:n==="horizontal"?t==="yAxis":n==="vertical"||i==="x"?t==="xAxis":i==="y"?t==="yAxis":!0},SW=function(n,t,i,r,a){var o=t.props.children,l=va(o,kp).filter(function(c){return T_e(r,a,c.props.direction)});if(l&&l.length){var f=l.map(function(c){return c.props.dataKey});return n.reduce(function(c,h){var d=cr(h,i);if(Gn(d))return c;var p=Array.isArray(d)?[B0(d),nl(d)]:[d,d],v=f.reduce(function(b,w){var k=cr(h,w,0),_=p[0]-Math.abs(Array.isArray(k)?k[0]:k),C=p[1]+Math.abs(Array.isArray(k)?k[1]:k);return[Math.min(_,b[0]),Math.max(C,b[1])]},[1/0,-1/0]);return[Math.min(v[0],c[0]),Math.max(v[1],c[1])]},[1/0,-1/0])}return null},M_e=function(n,t,i,r,a){var o=t.map(function(l){return SW(n,l,i,a,r)}).filter(function(l){return!Gn(l)});return o&&o.length?o.reduce(function(l,f){return[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]):null},CW=function(n,t,i,r,a){var o=t.map(function(f){var c=f.props.dataKey;return i==="number"&&c&&SW(n,f,c,r)||Ih(n,c,i,a)});if(i==="number")return o.reduce(function(f,c){return[Math.min(f[0],c[0]),Math.max(f[1],c[1])]},[1/0,-1/0]);var l={};return o.reduce(function(f,c){for(var h=0,d=c.length;h=2?Fa(l[0]-l[1])*2*c:c,t&&(n.ticks||n.niceTicks)){var h=(n.ticks||n.niceTicks).map(function(d){var p=a?a.indexOf(d):d;return{coordinate:r(p)+c,value:d,offset:c}});return h.filter(function(d){return!ed(d.coordinate)})}return n.isCategorical&&n.categoricalDomain?n.categoricalDomain.map(function(d,p){return{coordinate:r(d)+c,value:d,index:p,offset:c}}):r.ticks&&!i?r.ticks(n.tickCount).map(function(d){return{coordinate:r(d)+c,value:d,offset:c}}):r.domain().map(function(d,p){return{coordinate:r(d)+c,value:a?a[d]:d,index:p,offset:c}})},M3=new WeakMap,rg=function(n,t){if(typeof t!="function")return n;M3.has(n)||M3.set(n,new WeakMap);var i=M3.get(n);if(i.has(t))return i.get(t);var r=function(){n.apply(void 0,arguments),t.apply(void 0,arguments)};return i.set(t,r),r},D_e=function(n,t,i){var r=n.scale,a=n.type,o=n.layout,l=n.axisType;if(r==="auto")return o==="radial"&&l==="radiusAxis"?{scale:dm(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:k1(),realScaleType:"linear"}:a==="category"&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!i)?{scale:Lh(),realScaleType:"point"}:a==="category"?{scale:dm(),realScaleType:"band"}:{scale:k1(),realScaleType:"linear"};if(Cu(r)){var f="scale".concat(j0(r));return{scale:(DP[f]||Lh)(),realScaleType:DP[f]?f:"point"}}return Bn(r)?{scale:r}:{scale:Lh(),realScaleType:"point"}},YP=1e-4,R_e=function(n){var t=n.domain();if(!(!t||t.length<=2)){var i=t.length,r=n.range(),a=Math.min(r[0],r[1])-YP,o=Math.max(r[0],r[1])+YP,l=n(t[0]),f=n(t[i-1]);(lo||fo)&&n.domain([t[0],t[i-1]])}},P_e=function(n,t){if(!n)return null;for(var i=0,r=n.length;ir)&&(a[1]=r),a[0]>r&&(a[0]=r),a[1]=0?(n[l][i][0]=a,n[l][i][1]=a+f,a=n[l][i][1]):(n[l][i][0]=o,n[l][i][1]=o+f,o=n[l][i][1])}},z_e=function(n){var t=n.length;if(!(t<=0))for(var i=0,r=n[0].length;i=0?(n[o][i][0]=a,n[o][i][1]=a+l,a=n[o][i][1]):(n[o][i][0]=0,n[o][i][1]=0)}},L_e={sign:$_e,expand:kge,none:oc,silhouette:_ge,wiggle:xge,positive:z_e},I_e=function(n,t,i){var r=t.map(function(l){return l.props.dataKey}),a=L_e[i],o=wge().keys(r).value(function(l,f){return+cr(l,f,0)}).order(p4).offset(a);return o(n)},B_e=function(n,t,i,r,a,o){if(!n)return null;var l=o?t.reverse():t,f={},c=l.reduce(function(d,p){var v,b=(v=p.type)!==null&&v!==void 0&&v.defaultProps?ti(ti({},p.type.defaultProps),p.props):p.props,w=b.stackId,k=b.hide;if(k)return d;var _=b[i],C=d[_]||{hasStack:!1,stackGroups:{}};if(Si(w)){var S=C.stackGroups[w]||{numericAxisId:i,cateAxisId:r,items:[]};S.items.push(p),C.hasStack=!0,C.stackGroups[w]=S}else C.stackGroups[nd("_stackId_")]={numericAxisId:i,cateAxisId:r,items:[p]};return ti(ti({},d),{},Kf({},_,C))},f),h={};return Object.keys(c).reduce(function(d,p){var v=c[p];if(v.hasStack){var b={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(w,k){var _=v.stackGroups[k];return ti(ti({},w),{},Kf({},k,{numericAxisId:i,cateAxisId:r,items:_.items,stackedData:I_e(n,_.items,a)}))},b)}return ti(ti({},d),{},Kf({},p,v))},h)},F_e=function(n,t){var i=t.realScaleType,r=t.type,a=t.tickCount,o=t.originalDomain,l=t.allowDecimals,f=i||t.scale;if(f!=="auto"&&f!=="linear")return null;if(a&&r==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var c=n.domain();if(!c.length)return null;var h=Qke(c,a,l);return n.domain([B0(h),nl(h)]),{niceTicks:h}}if(a&&r==="number"){var d=n.domain(),p=Jke(d,a,l);return{niceTicks:p}}return null};function O1(e){var n=e.axis,t=e.ticks,i=e.bandSize,r=e.entry,a=e.index,o=e.dataKey;if(n.type==="category"){if(!n.allowDuplicatedCategory&&n.dataKey&&!Gn(r[n.dataKey])){var l=e1(t,"value",r[n.dataKey]);if(l)return l.coordinate+i/2}return t[a]?t[a].coordinate+i/2:null}var f=cr(r,Gn(o)?n.dataKey:o);return Gn(f)?null:n.scale(f)}var KP=function(n){var t=n.axis,i=n.ticks,r=n.offset,a=n.bandSize,o=n.entry,l=n.index;if(t.type==="category")return i[l]?i[l].coordinate+r:null;var f=cr(o,t.dataKey,t.domain[l]);return Gn(f)?null:t.scale(f)-a/2+r},q_e=function(n){var t=n.numericAxis,i=t.scale.domain();if(t.type==="number"){var r=Math.min(i[0],i[1]),a=Math.max(i[0],i[1]);return r<=0&&a>=0?0:a<0?a:r}return i[0]},H_e=function(n,t){var i,r=(i=n.type)!==null&&i!==void 0&&i.defaultProps?ti(ti({},n.type.defaultProps),n.props):n.props,a=r.stackId;if(Si(a)){var o=t[a];if(o){var l=o.items.indexOf(n);return l>=0?o.stackedData[l]:null}}return null},U_e=function(n){return n.reduce(function(t,i){return[B0(i.concat([t[0]]).filter(Ve)),nl(i.concat([t[1]]).filter(Ve))]},[1/0,-1/0])},OW=function(n,t,i){return Object.keys(n).reduce(function(r,a){var o=n[a],l=o.stackedData,f=l.reduce(function(c,h){var d=U_e(h.slice(t,i+1));return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);return[Math.min(f[0],r[0]),Math.max(f[1],r[1])]},[1/0,-1/0]).map(function(r){return r===1/0||r===-1/0?0:r})},XP=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,ZP=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,B4=function(n,t,i){if(Bn(n))return n(t,i);if(!Array.isArray(n))return t;var r=[];if(Ve(n[0]))r[0]=i?n[0]:Math.min(n[0],t[0]);else if(XP.test(n[0])){var a=+XP.exec(n[0])[1];r[0]=t[0]-a}else Bn(n[0])?r[0]=n[0](t[0]):r[0]=t[0];if(Ve(n[1]))r[1]=i?n[1]:Math.max(n[1],t[1]);else if(ZP.test(n[1])){var o=+ZP.exec(n[1])[1];r[1]=t[1]+o}else Bn(n[1])?r[1]=n[1](t[1]):r[1]=t[1];return r},E1=function(n,t,i){if(n&&n.scale&&n.scale.bandwidth){var r=n.scale.bandwidth();if(!i||r>0)return r}if(n&&t&&t.length>=2){for(var a=iA(t,function(d){return d.coordinate}),o=1/0,l=1,f=a.length;lo&&(c=2*Math.PI-c),{radius:l,angle:Y_e(c),angleInRadian:c}},Z_e=function(n){var t=n.startAngle,i=n.endAngle,r=Math.floor(t/360),a=Math.floor(i/360),o=Math.min(r,a);return{startAngle:t-o*360,endAngle:i-o*360}},Q_e=function(n,t){var i=t.startAngle,r=t.endAngle,a=Math.floor(i/360),o=Math.floor(r/360),l=Math.min(a,o);return n+l*360},nN=function(n,t){var i=n.x,r=n.y,a=X_e({x:i,y:r},t),o=a.radius,l=a.angle,f=t.innerRadius,c=t.outerRadius;if(oc)return!1;if(o===0)return!0;var h=Z_e(t),d=h.startAngle,p=h.endAngle,v=l,b;if(d<=p){for(;v>p;)v-=360;for(;v=d&&v<=p}else{for(;v>d;)v-=360;for(;v=p&&v<=d}return b?eN(eN({},t),{},{radius:o,angle:Q_e(v,t)}):null};function _m(e){"@babel/helpers - typeof";return _m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_m(e)}var J_e=["offset"];function e2e(e){return r2e(e)||i2e(e)||t2e(e)||n2e()}function n2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t2e(e,n){if(e){if(typeof e=="string")return F4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return F4(e,n)}}function i2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function r2e(e){if(Array.isArray(e))return F4(e)}function F4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function o2e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function tN(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function ki(e){for(var n=1;n=0?1:-1,S,E;r==="insideStart"?(S=v+C*o,E=w):r==="insideEnd"?(S=b-C*o,E=!w):r==="end"&&(S=b+C*o,E=w),E=_<=0?E:!E;var j=Fi(c,h,k,S),O=Fi(c,h,k,S+(E?1:-1)*359),M="M".concat(j.x,",").concat(j.y,` + A`).concat(k,",").concat(k,",0,1,").concat(E?0:1,`, + `).concat(O.x,",").concat(O.y),$=Gn(n.id)?nd("recharts-radial-line-"):n.id;return Q.createElement("text",xm({},i,{dominantBaseline:"central",className:hn("recharts-radial-bar-label",l)}),Q.createElement("defs",null,Q.createElement("path",{id:$,d:M})),Q.createElement("textPath",{xlinkHref:"#".concat($)},t))},h2e=function(n){var t=n.viewBox,i=n.offset,r=n.position,a=t,o=a.cx,l=a.cy,f=a.innerRadius,c=a.outerRadius,h=a.startAngle,d=a.endAngle,p=(h+d)/2;if(r==="outside"){var v=Fi(o,l,c+i,p),b=v.x,w=v.y;return{x:b,y:w,textAnchor:b>=o?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var k=(f+c)/2,_=Fi(o,l,k,p),C=_.x,S=_.y;return{x:C,y:S,textAnchor:"middle",verticalAnchor:"middle"}},m2e=function(n){var t=n.viewBox,i=n.parentViewBox,r=n.offset,a=n.position,o=t,l=o.x,f=o.y,c=o.width,h=o.height,d=h>=0?1:-1,p=d*r,v=d>0?"end":"start",b=d>0?"start":"end",w=c>=0?1:-1,k=w*r,_=w>0?"end":"start",C=w>0?"start":"end";if(a==="top"){var S={x:l+c/2,y:f-d*r,textAnchor:"middle",verticalAnchor:v};return ki(ki({},S),i?{height:Math.max(f-i.y,0),width:c}:{})}if(a==="bottom"){var E={x:l+c/2,y:f+h+p,textAnchor:"middle",verticalAnchor:b};return ki(ki({},E),i?{height:Math.max(i.y+i.height-(f+h),0),width:c}:{})}if(a==="left"){var j={x:l-k,y:f+h/2,textAnchor:_,verticalAnchor:"middle"};return ki(ki({},j),i?{width:Math.max(j.x-i.x,0),height:h}:{})}if(a==="right"){var O={x:l+c+k,y:f+h/2,textAnchor:C,verticalAnchor:"middle"};return ki(ki({},O),i?{width:Math.max(i.x+i.width-O.x,0),height:h}:{})}var M=i?{width:c,height:h}:{};return a==="insideLeft"?ki({x:l+k,y:f+h/2,textAnchor:C,verticalAnchor:"middle"},M):a==="insideRight"?ki({x:l+c-k,y:f+h/2,textAnchor:_,verticalAnchor:"middle"},M):a==="insideTop"?ki({x:l+c/2,y:f+p,textAnchor:"middle",verticalAnchor:b},M):a==="insideBottom"?ki({x:l+c/2,y:f+h-p,textAnchor:"middle",verticalAnchor:v},M):a==="insideTopLeft"?ki({x:l+k,y:f+p,textAnchor:C,verticalAnchor:b},M):a==="insideTopRight"?ki({x:l+c-k,y:f+p,textAnchor:_,verticalAnchor:b},M):a==="insideBottomLeft"?ki({x:l+k,y:f+h-p,textAnchor:C,verticalAnchor:v},M):a==="insideBottomRight"?ki({x:l+c-k,y:f+h-p,textAnchor:_,verticalAnchor:v},M):Jc(a)&&(Ve(a.x)||fu(a.x))&&(Ve(a.y)||fu(a.y))?ki({x:l+Au(a.x,c),y:f+Au(a.y,h),textAnchor:"end",verticalAnchor:"end"},M):ki({x:l+c/2,y:f+h/2,textAnchor:"middle",verticalAnchor:"middle"},M)},p2e=function(n){return"cx"in n&&Ve(n.cx)};function ii(e){var n=e.offset,t=n===void 0?5:n,i=a2e(e,J_e),r=ki({offset:t},i),a=r.viewBox,o=r.position,l=r.value,f=r.children,c=r.content,h=r.className,d=h===void 0?"":h,p=r.textBreakAll;if(!a||Gn(l)&&Gn(f)&&!A.isValidElement(c)&&!Bn(c))return null;if(A.isValidElement(c))return A.cloneElement(c,r);var v;if(Bn(c)){if(v=A.createElement(c,r),A.isValidElement(v))return v}else v=f2e(r);var b=p2e(a),w=Un(r,!0);if(b&&(o==="insideStart"||o==="insideEnd"||o==="end"))return d2e(r,v,w);var k=b?h2e(r):m2e(r);return Q.createElement(h1,xm({className:hn("recharts-label",d)},w,k,{breakAll:p}),v)}ii.displayName="Label";var TW=function(n){var t=n.cx,i=n.cy,r=n.angle,a=n.startAngle,o=n.endAngle,l=n.r,f=n.radius,c=n.innerRadius,h=n.outerRadius,d=n.x,p=n.y,v=n.top,b=n.left,w=n.width,k=n.height,_=n.clockWise,C=n.labelViewBox;if(C)return C;if(Ve(w)&&Ve(k)){if(Ve(d)&&Ve(p))return{x:d,y:p,width:w,height:k};if(Ve(v)&&Ve(b))return{x:v,y:b,width:w,height:k}}return Ve(d)&&Ve(p)?{x:d,y:p,width:0,height:0}:Ve(t)&&Ve(i)?{cx:t,cy:i,startAngle:a||r||0,endAngle:o||r||0,innerRadius:c||0,outerRadius:h||f||l||0,clockWise:_}:n.viewBox?n.viewBox:{}},v2e=function(n,t){return n?n===!0?Q.createElement(ii,{key:"label-implicit",viewBox:t}):Si(n)?Q.createElement(ii,{key:"label-implicit",viewBox:t,value:n}):A.isValidElement(n)?n.type===ii?A.cloneElement(n,{key:"label-implicit",viewBox:t}):Q.createElement(ii,{key:"label-implicit",content:n,viewBox:t}):Bn(n)?Q.createElement(ii,{key:"label-implicit",content:n,viewBox:t}):Jc(n)?Q.createElement(ii,xm({viewBox:t},n,{key:"label-implicit"})):null:null},g2e=function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!n||!n.children&&i&&!n.label)return null;var r=n.children,a=TW(n),o=va(r,ii).map(function(f,c){return A.cloneElement(f,{viewBox:t||a,key:"label-".concat(c)})});if(!i)return o;var l=v2e(n.label,t||a);return[l].concat(e2e(o))};ii.parseViewBox=TW;ii.renderCallByParent=g2e;var D3,iN;function y2e(){if(iN)return D3;iN=1;function e(n){var t=n==null?0:n.length;return t?n[t-1]:void 0}return D3=e,D3}var b2e=y2e();const w2e=pt(b2e);function Sm(e){"@babel/helpers - typeof";return Sm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Sm(e)}var k2e=["valueAccessor"],_2e=["data","dataKey","clockWise","id","textBreakAll"];function x2e(e){return j2e(e)||A2e(e)||C2e(e)||S2e()}function S2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C2e(e,n){if(e){if(typeof e=="string")return q4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return q4(e,n)}}function A2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function j2e(e){if(Array.isArray(e))return q4(e)}function q4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function M2e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var D2e=function(n){return Array.isArray(n.value)?w2e(n.value):n.value};function fo(e){var n=e.valueAccessor,t=n===void 0?D2e:n,i=oN(e,k2e),r=i.data,a=i.dataKey,o=i.clockWise,l=i.id,f=i.textBreakAll,c=oN(i,_2e);return!r||!r.length?null:Q.createElement(It,{className:"recharts-label-list"},r.map(function(h,d){var p=Gn(a)?t(h,d):cr(h&&h.payload,a),v=Gn(l)?{}:{id:"".concat(l,"-").concat(d)};return Q.createElement(ii,M1({},Un(h,!0),c,v,{parentViewBox:h.parentViewBox,value:p,textBreakAll:f,viewBox:ii.parseViewBox(Gn(o)?h:aN(aN({},h),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}fo.displayName="LabelList";function R2e(e,n){return e?e===!0?Q.createElement(fo,{key:"labelList-implicit",data:n}):Q.isValidElement(e)||Bn(e)?Q.createElement(fo,{key:"labelList-implicit",data:n,content:e}):Jc(e)?Q.createElement(fo,M1({data:n},e,{key:"labelList-implicit"})):null:null}function P2e(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&t&&!e.label)return null;var i=e.children,r=va(i,fo).map(function(o,l){return A.cloneElement(o,{data:n,key:"labelList-".concat(l)})});if(!t)return r;var a=R2e(e.label,n);return[a].concat(x2e(r))}fo.renderCallByParent=P2e;function Cm(e){"@babel/helpers - typeof";return Cm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Cm(e)}function H4(){return H4=Object.assign?Object.assign.bind():function(e){for(var n=1;n180),",").concat(+(o>c),`, + `).concat(d.x,",").concat(d.y,` + `);if(r>0){var v=Fi(t,i,r,o),b=Fi(t,i,r,c);p+="L ".concat(b.x,",").concat(b.y,` + A `).concat(r,",").concat(r,`,0, + `).concat(+(Math.abs(f)>180),",").concat(+(o<=c),`, + `).concat(v.x,",").concat(v.y," Z")}else p+="L ".concat(t,",").concat(i," Z");return p},I2e=function(n){var t=n.cx,i=n.cy,r=n.innerRadius,a=n.outerRadius,o=n.cornerRadius,l=n.forceCornerRadius,f=n.cornerIsExternal,c=n.startAngle,h=n.endAngle,d=Fa(h-c),p=ag({cx:t,cy:i,radius:a,angle:c,sign:d,cornerRadius:o,cornerIsExternal:f}),v=p.circleTangency,b=p.lineTangency,w=p.theta,k=ag({cx:t,cy:i,radius:a,angle:h,sign:-d,cornerRadius:o,cornerIsExternal:f}),_=k.circleTangency,C=k.lineTangency,S=k.theta,E=f?Math.abs(c-h):Math.abs(c-h)-w-S;if(E<0)return l?"M ".concat(b.x,",").concat(b.y,` + a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 + a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 + `):MW({cx:t,cy:i,innerRadius:r,outerRadius:a,startAngle:c,endAngle:h});var j="M ".concat(b.x,",").concat(b.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(v.x,",").concat(v.y,` + A`).concat(a,",").concat(a,",0,").concat(+(E>180),",").concat(+(d<0),",").concat(_.x,",").concat(_.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(C.x,",").concat(C.y,` + `);if(r>0){var O=ag({cx:t,cy:i,radius:r,angle:c,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:f}),M=O.circleTangency,$=O.lineTangency,q=O.theta,P=ag({cx:t,cy:i,radius:r,angle:h,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:f}),z=P.circleTangency,B=P.lineTangency,V=P.theta,U=f?Math.abs(c-h):Math.abs(c-h)-q-V;if(U<0&&o===0)return"".concat(j,"L").concat(t,",").concat(i,"Z");j+="L".concat(B.x,",").concat(B.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(z.x,",").concat(z.y,` + A`).concat(r,",").concat(r,",0,").concat(+(U>180),",").concat(+(d>0),",").concat(M.x,",").concat(M.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat($.x,",").concat($.y,"Z")}else j+="L".concat(t,",").concat(i,"Z");return j},B2e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},DW=function(n){var t=lN(lN({},B2e),n),i=t.cx,r=t.cy,a=t.innerRadius,o=t.outerRadius,l=t.cornerRadius,f=t.forceCornerRadius,c=t.cornerIsExternal,h=t.startAngle,d=t.endAngle,p=t.className;if(o0&&Math.abs(h-d)<360?k=I2e({cx:i,cy:r,innerRadius:a,outerRadius:o,cornerRadius:Math.min(w,b/2),forceCornerRadius:f,cornerIsExternal:c,startAngle:h,endAngle:d}):k=MW({cx:i,cy:r,innerRadius:a,outerRadius:o,startAngle:h,endAngle:d}),Q.createElement("path",H4({},Un(t,!0),{className:v,d:k,role:"img"}))};function Am(e){"@babel/helpers - typeof";return Am=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Am(e)}function U4(){return U4=Object.assign?Object.assign.bind():function(e){for(var n=1;nY2e.call(e,n));function Hu(e,n){return e===n||!e&&!n&&e!==e&&n!==n}const Z2e="__v",Q2e="__o",J2e="_owner",{getOwnPropertyDescriptor:hN,keys:mN}=Object;function exe(e,n){return e.byteLength===n.byteLength&&D1(new Uint8Array(e),new Uint8Array(n))}function nxe(e,n,t){let i=e.length;if(n.length!==i)return!1;for(;i-- >0;)if(!t.equals(e[i],n[i],i,i,e,n,t))return!1;return!0}function txe(e,n){return e.byteLength===n.byteLength&&D1(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(n.buffer,n.byteOffset,n.byteLength))}function ixe(e,n){return Hu(e.getTime(),n.getTime())}function rxe(e,n){return e.name===n.name&&e.message===n.message&&e.cause===n.cause&&e.stack===n.stack}function axe(e,n){return e===n}function pN(e,n,t){const i=e.size;if(i!==n.size)return!1;if(!i)return!0;const r=new Array(i),a=e.entries();let o,l,f=0;for(;(o=a.next())&&!o.done;){const c=n.entries();let h=!1,d=0;for(;(l=c.next())&&!l.done;){if(r[d]){d++;continue}const p=o.value,v=l.value;if(t.equals(p[0],v[0],f,d,e,n,t)&&t.equals(p[1],v[1],p[0],v[0],e,n,t)){h=r[d]=!0;break}d++}if(!h)return!1;f++}return!0}const oxe=Hu;function sxe(e,n,t){const i=mN(e);let r=i.length;if(mN(n).length!==r)return!1;for(;r-- >0;)if(!RW(e,n,t,i[r]))return!1;return!0}function mh(e,n,t){const i=dN(e);let r=i.length;if(dN(n).length!==r)return!1;let a,o,l;for(;r-- >0;)if(a=i[r],!RW(e,n,t,a)||(o=hN(e,a),l=hN(n,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function lxe(e,n){return Hu(e.valueOf(),n.valueOf())}function uxe(e,n){return e.source===n.source&&e.flags===n.flags}function vN(e,n,t){const i=e.size;if(i!==n.size)return!1;if(!i)return!0;const r=new Array(i),a=e.values();let o,l;for(;(o=a.next())&&!o.done;){const f=n.values();let c=!1,h=0;for(;(l=f.next())&&!l.done;){if(!r[h]&&t.equals(o.value,l.value,o.value,l.value,e,n,t)){c=r[h]=!0;break}h++}if(!c)return!1}return!0}function D1(e,n){let t=e.byteLength;if(n.byteLength!==t||e.byteOffset!==n.byteOffset)return!1;for(;t-- >0;)if(e[t]!==n[t])return!1;return!0}function fxe(e,n){return e.hostname===n.hostname&&e.pathname===n.pathname&&e.protocol===n.protocol&&e.port===n.port&&e.hash===n.hash&&e.username===n.username&&e.password===n.password}function RW(e,n,t,i){return(i===J2e||i===Q2e||i===Z2e)&&(e.$$typeof||n.$$typeof)?!0:X2e(n,i)&&t.equals(e[i],n[i],i,i,e,n,t)}const cxe="[object ArrayBuffer]",dxe="[object Arguments]",hxe="[object Boolean]",mxe="[object DataView]",pxe="[object Date]",vxe="[object Error]",gxe="[object Map]",yxe="[object Number]",bxe="[object Object]",wxe="[object RegExp]",kxe="[object Set]",_xe="[object String]",xxe={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},Sxe="[object URL]",Cxe=Object.prototype.toString;function Axe({areArrayBuffersEqual:e,areArraysEqual:n,areDataViewsEqual:t,areDatesEqual:i,areErrorsEqual:r,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:l,areObjectsEqual:f,arePrimitiveWrappersEqual:c,areRegExpsEqual:h,areSetsEqual:d,areTypedArraysEqual:p,areUrlsEqual:v,unknownTagComparators:b}){return function(k,_,C){if(k===_)return!0;if(k==null||_==null)return!1;const S=typeof k;if(S!==typeof _)return!1;if(S!=="object")return S==="number"?l(k,_,C):S==="function"?a(k,_,C):!1;const E=k.constructor;if(E!==_.constructor)return!1;if(E===Object)return f(k,_,C);if(Array.isArray(k))return n(k,_,C);if(E===Date)return i(k,_,C);if(E===RegExp)return h(k,_,C);if(E===Map)return o(k,_,C);if(E===Set)return d(k,_,C);const j=Cxe.call(k);if(j===pxe)return i(k,_,C);if(j===wxe)return h(k,_,C);if(j===gxe)return o(k,_,C);if(j===kxe)return d(k,_,C);if(j===bxe)return typeof k.then!="function"&&typeof _.then!="function"&&f(k,_,C);if(j===Sxe)return v(k,_,C);if(j===vxe)return r(k,_,C);if(j===dxe)return f(k,_,C);if(xxe[j])return p(k,_,C);if(j===cxe)return e(k,_,C);if(j===mxe)return t(k,_,C);if(j===hxe||j===yxe||j===_xe)return c(k,_,C);if(b){let O=b[j];if(!O){const M=K2e(k);M&&(O=b[M])}if(O)return O(k,_,C)}return!1}}function jxe({circular:e,createCustomConfig:n,strict:t}){let i={areArrayBuffersEqual:exe,areArraysEqual:t?mh:nxe,areDataViewsEqual:txe,areDatesEqual:ixe,areErrorsEqual:rxe,areFunctionsEqual:axe,areMapsEqual:t?R3(pN,mh):pN,areNumbersEqual:oxe,areObjectsEqual:t?mh:sxe,arePrimitiveWrappersEqual:lxe,areRegExpsEqual:uxe,areSetsEqual:t?R3(vN,mh):vN,areTypedArraysEqual:t?R3(D1,mh):D1,areUrlsEqual:fxe,unknownTagComparators:void 0};if(n&&(i=Object.assign({},i,n(i))),e){const r=sg(i.areArraysEqual),a=sg(i.areMapsEqual),o=sg(i.areObjectsEqual),l=sg(i.areSetsEqual);i=Object.assign({},i,{areArraysEqual:r,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:l})}return i}function Oxe(e){return function(n,t,i,r,a,o,l){return e(n,t,l)}}function Exe({circular:e,comparator:n,createState:t,equals:i,strict:r}){if(t)return function(l,f){const{cache:c=e?new WeakMap:void 0,meta:h}=t();return n(l,f,{cache:c,equals:i,meta:h,strict:r})};if(e)return function(l,f){return n(l,f,{cache:new WeakMap,equals:i,meta:void 0,strict:r})};const a={cache:void 0,equals:i,meta:void 0,strict:r};return function(l,f){return n(l,f,a)}}const Txe=jl();jl({strict:!0});jl({circular:!0});jl({circular:!0,strict:!0});jl({createInternalComparator:()=>Hu});jl({strict:!0,createInternalComparator:()=>Hu});jl({circular:!0,createInternalComparator:()=>Hu});jl({circular:!0,createInternalComparator:()=>Hu,strict:!0});function jl(e={}){const{circular:n=!1,createInternalComparator:t,createState:i,strict:r=!1}=e,a=jxe(e),o=Axe(a),l=t?t(o):Oxe(o);return Exe({circular:n,comparator:o,createState:i,equals:l,strict:r})}function Mxe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function gN(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=-1,i=function r(a){t<0&&(t=a),a-t>n?(e(a),t=-1):Mxe(r)};requestAnimationFrame(i)}function W4(e){"@babel/helpers - typeof";return W4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},W4(e)}function Dxe(e){return $xe(e)||Nxe(e)||Pxe(e)||Rxe()}function Rxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pxe(e,n){if(e){if(typeof e=="string")return yN(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return yN(e,n)}}function yN(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);te.length)&&(n=e.length);for(var t=0,i=new Array(n);t1?1:_<0?0:_},w=function(_){for(var C=_>1?1:_,S=C,E=0;E<8;++E){var j=d(S)-C,O=v(S);if(Math.abs(j-C)0&&arguments[0]!==void 0?arguments[0]:{},t=n.stiff,i=t===void 0?100:t,r=n.damping,a=r===void 0?8:r,o=n.dt,l=o===void 0?17:o,f=function(h,d,p){var v=-(h-d)*i,b=p*a,w=p+(v-b)*l/1e3,k=p*l/1e3+h;return Math.abs(k-d)e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function h3e(e,n){if(e==null)return{};var t={},i=Object.keys(e),r,a;for(a=0;a=0)&&(t[r]=e[r]);return t}function P3(e){return g3e(e)||v3e(e)||p3e(e)||m3e()}function m3e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p3e(e,n){if(e){if(typeof e=="string")return X4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return X4(e,n)}}function v3e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function g3e(e){if(Array.isArray(e))return X4(e)}function X4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function N1(e){return N1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},N1(e)}var go=(function(e){_3e(t,e);var n=x3e(t);function t(i,r){var a;y3e(this,t),a=n.call(this,i,r);var o=a.props,l=o.isActive,f=o.attributeName,c=o.from,h=o.to,d=o.steps,p=o.children,v=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(J4(a)),a.changeStyle=a.changeStyle.bind(J4(a)),!l||v<=0)return a.state={style:{}},typeof p=="function"&&(a.state={style:h}),Q4(a);if(d&&d.length)a.state={style:d[0].style};else if(c){if(typeof p=="function")return a.state={style:c},Q4(a);a.state={style:f?jh({},f,c):c}}else a.state={style:{}};return a}return w3e(t,[{key:"componentDidMount",value:function(){var r=this.props,a=r.isActive,o=r.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(r){var a=this.props,o=a.isActive,l=a.canBegin,f=a.attributeName,c=a.shouldReAnimate,h=a.to,d=a.from,p=this.state.style;if(l){if(!o){var v={style:f?jh({},f,h):h};this.state&&p&&(f&&p[f]!==h||!f&&p!==h)&&this.setState(v);return}if(!(Txe(r.to,h)&&r.canBegin&&r.isActive)){var b=!r.canBegin||!r.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var w=b||c?d:r.to;if(this.state&&p){var k={style:f?jh({},f,w):w};(f&&p[f]!==w||!f&&p!==w)&&this.setState(k)}this.runAnimation(Pa(Pa({},this.props),{},{from:w,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var r=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),r&&r()}},{key:"handleStyleChange",value:function(r){this.changeStyle(r)}},{key:"changeStyle",value:function(r){this.mounted&&this.setState({style:r})}},{key:"runJSAnimation",value:function(r){var a=this,o=r.from,l=r.to,f=r.duration,c=r.easing,h=r.begin,d=r.onAnimationEnd,p=r.onAnimationStart,v=f3e(o,l,Jxe(c),f,this.changeStyle),b=function(){a.stopJSAnimation=v()};this.manager.start([p,h,b,f,d])}},{key:"runStepAnimation",value:function(r){var a=this,o=r.steps,l=r.begin,f=r.onAnimationStart,c=o[0],h=c.style,d=c.duration,p=d===void 0?0:d,v=function(w,k,_){if(_===0)return w;var C=k.duration,S=k.easing,E=S===void 0?"ease":S,j=k.style,O=k.properties,M=k.onAnimationEnd,$=_>0?o[_-1]:k,q=O||Object.keys(j);if(typeof E=="function"||E==="spring")return[].concat(P3(w),[a.runJSAnimation.bind(a,{from:$.style,to:j,duration:C,easing:E}),C]);var P=kN(q,C,E),z=Pa(Pa(Pa({},$.style),j),{},{transition:P});return[].concat(P3(w),[z,C,M]).filter(Fxe)};return this.manager.start([f].concat(P3(o.reduce(v,[h,Math.max(p,l)])),[r.onAnimationEnd]))}},{key:"runAnimation",value:function(r){this.manager||(this.manager=zxe());var a=r.begin,o=r.duration,l=r.attributeName,f=r.to,c=r.easing,h=r.onAnimationStart,d=r.onAnimationEnd,p=r.steps,v=r.children,b=this.manager;if(this.unSubscribe=b.subscribe(this.handleStyleChange),typeof c=="function"||typeof v=="function"||c==="spring"){this.runJSAnimation(r);return}if(p.length>1){this.runStepAnimation(r);return}var w=l?jh({},l,f):f,k=kN(Object.keys(w),o,c);b.start([h,a,Pa(Pa({},w),{},{transition:k}),o,d])}},{key:"render",value:function(){var r=this.props,a=r.children;r.begin;var o=r.duration;r.attributeName,r.easing;var l=r.isActive;r.steps,r.from,r.to,r.canBegin,r.onAnimationEnd,r.shouldReAnimate,r.onAnimationReStart;var f=d3e(r,c3e),c=A.Children.count(a),h=this.state.style;if(typeof a=="function")return a(h);if(!l||c===0||o<=0)return a;var d=function(v){var b=v.props,w=b.style,k=w===void 0?{}:w,_=b.className,C=A.cloneElement(v,Pa(Pa({},f),{},{style:Pa(Pa({},k),h),className:_}));return C};return c===1?d(A.Children.only(a)):Q.createElement("div",null,A.Children.map(a,function(p){return d(p)}))}}]),t})(A.PureComponent);go.displayName="Animate";go.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};go.propTypes={from:yt.oneOfType([yt.object,yt.string]),to:yt.oneOfType([yt.object,yt.string]),attributeName:yt.string,duration:yt.number,begin:yt.number,easing:yt.oneOfType([yt.string,yt.func]),steps:yt.arrayOf(yt.shape({duration:yt.number.isRequired,style:yt.object.isRequired,easing:yt.oneOfType([yt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),yt.func]),properties:yt.arrayOf("string"),onAnimationEnd:yt.func})),children:yt.oneOfType([yt.node,yt.func]),isActive:yt.bool,canBegin:yt.bool,onAnimationEnd:yt.func,shouldReAnimate:yt.bool,onAnimationStart:yt.func,onAnimationReStart:yt.func};function Em(e){"@babel/helpers - typeof";return Em=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Em(e)}function $1(){return $1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0?1:-1,f=i>=0?1:-1,c=r>=0&&i>=0||r<0&&i<0?1:0,h;if(o>0&&a instanceof Array){for(var d=[0,0,0,0],p=0,v=4;po?o:a[p];h="M".concat(n,",").concat(t+l*d[0]),d[0]>0&&(h+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(c,",").concat(n+f*d[0],",").concat(t)),h+="L ".concat(n+i-f*d[1],",").concat(t),d[1]>0&&(h+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(c,`, + `).concat(n+i,",").concat(t+l*d[1])),h+="L ".concat(n+i,",").concat(t+r-l*d[2]),d[2]>0&&(h+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(c,`, + `).concat(n+i-f*d[2],",").concat(t+r)),h+="L ".concat(n+f*d[3],",").concat(t+r),d[3]>0&&(h+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(c,`, + `).concat(n,",").concat(t+r-l*d[3])),h+="Z"}else if(o>0&&a===+a&&a>0){var b=Math.min(o,a);h="M ".concat(n,",").concat(t+l*b,` + A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(n+f*b,",").concat(t,` + L `).concat(n+i-f*b,",").concat(t,` + A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(n+i,",").concat(t+l*b,` + L `).concat(n+i,",").concat(t+r-l*b,` + A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(n+i-f*b,",").concat(t+r,` + L `).concat(n+f*b,",").concat(t+r,` + A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(n,",").concat(t+r-l*b," Z")}else h="M ".concat(n,",").concat(t," h ").concat(i," v ").concat(r," h ").concat(-i," Z");return h},R3e=function(n,t){if(!n||!t)return!1;var i=n.x,r=n.y,a=t.x,o=t.y,l=t.width,f=t.height;if(Math.abs(l)>0&&Math.abs(f)>0){var c=Math.min(a,a+l),h=Math.max(a,a+l),d=Math.min(o,o+f),p=Math.max(o,o+f);return i>=c&&i<=h&&r>=d&&r<=p}return!1},P3e={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Tm=function(n){var t=EN(EN({},P3e),n),i=A.useRef(),r=A.useState(-1),a=C3e(r,2),o=a[0],l=a[1];A.useEffect(function(){if(i.current&&i.current.getTotalLength)try{var E=i.current.getTotalLength();E&&l(E)}catch{}},[]);var f=t.x,c=t.y,h=t.width,d=t.height,p=t.radius,v=t.className,b=t.animationEasing,w=t.animationDuration,k=t.animationBegin,_=t.isAnimationActive,C=t.isUpdateAnimationActive;if(f!==+f||c!==+c||h!==+h||d!==+d||h===0||d===0)return null;var S=hn("recharts-rectangle",v);return C?Q.createElement(go,{canBegin:o>0,from:{width:h,height:d,x:f,y:c},to:{width:h,height:d,x:f,y:c},duration:w,animationEasing:b,isActive:C},function(E){var j=E.width,O=E.height,M=E.x,$=E.y;return Q.createElement(go,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:k,duration:w,isActive:_,easing:b},Q.createElement("path",$1({},Un(t,!0),{className:S,d:TN(M,$,j,O,p),ref:i})))}):Q.createElement("path",$1({},Un(t,!0),{className:S,d:TN(f,c,h,d,p)}))};function e6(){return e6=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function F3e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var q3e=function(n,t,i,r,a,o){return"M".concat(n,",").concat(a,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(i)},H3e=function(n){var t=n.x,i=t===void 0?0:t,r=n.y,a=r===void 0?0:r,o=n.top,l=o===void 0?0:o,f=n.left,c=f===void 0?0:f,h=n.width,d=h===void 0?0:h,p=n.height,v=p===void 0?0:p,b=n.className,w=B3e(n,N3e),k=$3e({x:i,y:a,top:l,left:c,width:d,height:v},w);return!Ve(i)||!Ve(a)||!Ve(d)||!Ve(v)||!Ve(l)||!Ve(c)?null:Q.createElement("path",n6({},Un(k,!0),{className:hn("recharts-cross",b),d:q3e(i,a,d,v,l,c)}))},N3,DN;function U3e(){if(DN)return N3;DN=1;var e=oU(),n=e(Object.getPrototypeOf,Object);return N3=n,N3}var $3,RN;function W3e(){if(RN)return $3;RN=1;var e=vs(),n=U3e(),t=gs(),i="[object Object]",r=Function.prototype,a=Object.prototype,o=r.toString,l=a.hasOwnProperty,f=o.call(Object);function c(h){if(!t(h)||e(h)!=i)return!1;var d=n(h);if(d===null)return!0;var p=l.call(d,"constructor")&&d.constructor;return typeof p=="function"&&p instanceof p&&o.call(p)==f}return $3=c,$3}var V3e=W3e();const G3e=pt(V3e);var z3,PN;function Y3e(){if(PN)return z3;PN=1;var e=vs(),n=gs(),t="[object Boolean]";function i(r){return r===!0||r===!1||n(r)&&e(r)==t}return z3=i,z3}var K3e=Y3e();const X3e=pt(K3e);function Dm(e){"@babel/helpers - typeof";return Dm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Dm(e)}function z1(){return z1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t0,from:{upperWidth:0,lowerWidth:0,height:p,x:f,y:c},to:{upperWidth:h,lowerWidth:d,height:p,x:f,y:c},duration:w,animationEasing:b,isActive:_},function(S){var E=S.upperWidth,j=S.lowerWidth,O=S.height,M=S.x,$=S.y;return Q.createElement(go,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:k,duration:w,easing:b},Q.createElement("path",z1({},Un(t,!0),{className:C,d:LN(M,$,E,j,O),ref:i})))}):Q.createElement("g",null,Q.createElement("path",z1({},Un(t,!0),{className:C,d:LN(f,c,h,d,p)})))},sSe=["option","shapeType","propTransformer","activeClassName","isActive"];function Rm(e){"@babel/helpers - typeof";return Rm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Rm(e)}function lSe(e,n){if(e==null)return{};var t=uSe(e,n),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function uSe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function IN(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function L1(e){for(var n=1;n0&&i.handleDrag(r.changedTouches[0])}),Fr(i,"handleDragEnd",function(){i.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var r=i.props,a=r.endIndex,o=r.onDragEnd,l=r.startIndex;o==null||o({endIndex:a,startIndex:l})}),i.detachDragEndListener()}),Fr(i,"handleLeaveWrapper",function(){(i.state.isTravellerMoving||i.state.isSlideMoving)&&(i.leaveTimer=window.setTimeout(i.handleDragEnd,i.props.leaveTimeOut))}),Fr(i,"handleEnterSlideOrTraveller",function(){i.setState({isTextActive:!0})}),Fr(i,"handleLeaveSlideOrTraveller",function(){i.setState({isTextActive:!1})}),Fr(i,"handleSlideDragStart",function(r){var a=KN(r)?r.changedTouches[0]:r;i.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),i.attachDragEndListener()}),i.travellerDragStartHandlers={startX:i.handleTravellerDragStart.bind(i,"startX"),endX:i.handleTravellerDragStart.bind(i,"endX")},i.state={},i}return zSe(n,e),RSe(n,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(i){var r=i.startX,a=i.endX,o=this.state.scaleValues,l=this.props,f=l.gap,c=l.data,h=c.length-1,d=Math.min(r,a),p=Math.max(r,a),v=n.getIndexInRange(o,d),b=n.getIndexInRange(o,p);return{startIndex:v-v%f,endIndex:b===h?h:b-b%f}}},{key:"getTextOfTick",value:function(i){var r=this.props,a=r.data,o=r.tickFormatter,l=r.dataKey,f=cr(a[i],l,i);return Bn(o)?o(f,i):f}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(i){var r=this.state,a=r.slideMoveStartX,o=r.startX,l=r.endX,f=this.props,c=f.x,h=f.width,d=f.travellerWidth,p=f.startIndex,v=f.endIndex,b=f.onChange,w=i.pageX-a;w>0?w=Math.min(w,c+h-d-l,c+h-d-o):w<0&&(w=Math.max(w,c-o,c-l));var k=this.getIndex({startX:o+w,endX:l+w});(k.startIndex!==p||k.endIndex!==v)&&b&&b(k),this.setState({startX:o+w,endX:l+w,slideMoveStartX:i.pageX})}},{key:"handleTravellerDragStart",value:function(i,r){var a=KN(r)?r.changedTouches[0]:r;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:i,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(i){var r=this.state,a=r.brushMoveStartX,o=r.movingTravellerId,l=r.endX,f=r.startX,c=this.state[o],h=this.props,d=h.x,p=h.width,v=h.travellerWidth,b=h.onChange,w=h.gap,k=h.data,_={startX:this.state.startX,endX:this.state.endX},C=i.pageX-a;C>0?C=Math.min(C,d+p-v-c):C<0&&(C=Math.max(C,d-c)),_[o]=c+C;var S=this.getIndex(_),E=S.startIndex,j=S.endIndex,O=function(){var $=k.length-1;return o==="startX"&&(l>f?E%w===0:j%w===0)||lf?j%w===0:E%w===0)||l>f&&j===$};this.setState(Fr(Fr({},o,c+C),"brushMoveStartX",i.pageX),function(){b&&O()&&b(S)})}},{key:"handleTravellerMoveKeyboard",value:function(i,r){var a=this,o=this.state,l=o.scaleValues,f=o.startX,c=o.endX,h=this.state[r],d=l.indexOf(h);if(d!==-1){var p=d+i;if(!(p===-1||p>=l.length)){var v=l[p];r==="startX"&&v>=c||r==="endX"&&v<=f||this.setState(Fr({},r,v),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var i=this.props,r=i.x,a=i.y,o=i.width,l=i.height,f=i.fill,c=i.stroke;return Q.createElement("rect",{stroke:c,fill:f,x:r,y:a,width:o,height:l})}},{key:"renderPanorama",value:function(){var i=this.props,r=i.x,a=i.y,o=i.width,l=i.height,f=i.data,c=i.children,h=i.padding,d=A.Children.only(c);return d?Q.cloneElement(d,{x:r,y:a,width:o,height:l,margin:h,compact:!0,data:f}):null}},{key:"renderTravellerLayer",value:function(i,r){var a,o,l=this,f=this.props,c=f.y,h=f.travellerWidth,d=f.height,p=f.traveller,v=f.ariaLabel,b=f.data,w=f.startIndex,k=f.endIndex,_=Math.max(i,this.props.x),C=q3(q3({},Un(this.props,!1)),{},{x:_,y:c,width:h,height:d}),S=v||"Min value: ".concat((a=b[w])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=b[k])===null||o===void 0?void 0:o.name);return Q.createElement(It,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":i,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[r],onTouchStart:this.travellerDragStartHandlers[r],onKeyDown:function(j){["ArrowLeft","ArrowRight"].includes(j.key)&&(j.preventDefault(),j.stopPropagation(),l.handleTravellerMoveKeyboard(j.key==="ArrowRight"?1:-1,r))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},n.renderTraveller(p,C))}},{key:"renderSlide",value:function(i,r){var a=this.props,o=a.y,l=a.height,f=a.stroke,c=a.travellerWidth,h=Math.min(i,r)+c,d=Math.max(Math.abs(r-i)-c,0);return Q.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:f,fillOpacity:.2,x:h,y:o,width:d,height:l})}},{key:"renderText",value:function(){var i=this.props,r=i.startIndex,a=i.endIndex,o=i.y,l=i.height,f=i.travellerWidth,c=i.stroke,h=this.state,d=h.startX,p=h.endX,v=5,b={pointerEvents:"none",fill:c};return Q.createElement(It,{className:"recharts-brush-texts"},Q.createElement(h1,B1({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-v,y:o+l/2},b),this.getTextOfTick(r)),Q.createElement(h1,B1({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,p)+f+v,y:o+l/2},b),this.getTextOfTick(a)))}},{key:"render",value:function(){var i=this.props,r=i.data,a=i.className,o=i.children,l=i.x,f=i.y,c=i.width,h=i.height,d=i.alwaysShowText,p=this.state,v=p.startX,b=p.endX,w=p.isTextActive,k=p.isSlideMoving,_=p.isTravellerMoving,C=p.isTravellerFocused;if(!r||!r.length||!Ve(l)||!Ve(f)||!Ve(c)||!Ve(h)||c<=0||h<=0)return null;var S=hn("recharts-brush",a),E=Q.Children.count(o)===1,j=MSe("userSelect","none");return Q.createElement(It,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:j},this.renderBackground(),E&&this.renderPanorama(),this.renderSlide(v,b),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(b,"endX"),(w||k||_||C||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(i){var r=i.x,a=i.y,o=i.width,l=i.height,f=i.stroke,c=Math.floor(a+l/2)-1;return Q.createElement(Q.Fragment,null,Q.createElement("rect",{x:r,y:a,width:o,height:l,fill:f,stroke:"none"}),Q.createElement("line",{x1:r+1,y1:c,x2:r+o-1,y2:c,fill:"none",stroke:"#fff"}),Q.createElement("line",{x1:r+1,y1:c+2,x2:r+o-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(i,r){var a;return Q.isValidElement(i)?a=Q.cloneElement(i,r):Bn(i)?a=i(r):a=n.renderDefaultTraveller(r),a}},{key:"getDerivedStateFromProps",value:function(i,r){var a=i.data,o=i.width,l=i.x,f=i.travellerWidth,c=i.updateId,h=i.startIndex,d=i.endIndex;if(a!==r.prevData||c!==r.prevUpdateId)return q3({prevData:a,prevTravellerWidth:f,prevUpdateId:c,prevX:l,prevWidth:o},a&&a.length?ISe({data:a,width:o,x:l,travellerWidth:f,startIndex:h,endIndex:d}):{scale:null,scaleValues:null});if(r.scale&&(o!==r.prevWidth||l!==r.prevX||f!==r.prevTravellerWidth)){r.scale.range([l,l+o-f]);var p=r.scale.domain().map(function(v){return r.scale(v)});return{prevData:a,prevTravellerWidth:f,prevUpdateId:c,prevX:l,prevWidth:o,startX:r.scale(i.startIndex),endX:r.scale(i.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(i,r){for(var a=i.length,o=0,l=a-1;l-o>1;){var f=Math.floor((o+l)/2);i[f]>r?l=f:o=f}return r>=i[l]?l:o}}])})(A.PureComponent);Fr(yc,"displayName","Brush");Fr(yc,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var H3,XN;function BSe(){if(XN)return H3;XN=1;var e=tA();function n(t,i){var r;return e(t,function(a,o,l){return r=i(a,o,l),!r}),!!r}return H3=n,H3}var U3,ZN;function FSe(){if(ZN)return U3;ZN=1;var e=JH(),n=Sl(),t=BSe(),i=Ar(),r=R0();function a(o,l,f){var c=i(o)?e:t;return f&&r(o,l,f)&&(l=void 0),c(o,n(l,3))}return U3=a,U3}var qSe=FSe();const HSe=pt(qSe);var co=function(n,t){var i=n.alwaysShow,r=n.ifOverflow;return i&&(r="extendDomain"),r===t},W3,QN;function USe(){if(QN)return W3;QN=1;var e=gU();function n(t,i,r){i=="__proto__"&&e?e(t,i,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[i]=r}return W3=n,W3}var V3,JN;function WSe(){if(JN)return V3;JN=1;var e=USe(),n=pU(),t=Sl();function i(r,a){var o={};return a=t(a,3),n(r,function(l,f,c){e(o,f,a(l,f,c))}),o}return V3=i,V3}var VSe=WSe();const GSe=pt(VSe);var G3,e$;function YSe(){if(e$)return G3;e$=1;function e(n,t){for(var i=-1,r=n==null?0:n.length;++i=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function i4e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function r4e(e,n){var t=e.x,i=e.y,r=t4e(e,QSe),a="".concat(t),o=parseInt(a,10),l="".concat(i),f=parseInt(l,10),c="".concat(n.height||r.height),h=parseInt(c,10),d="".concat(n.width||r.width),p=parseInt(d,10);return ph(ph(ph(ph(ph({},n),r),o?{x:o}:{}),f?{y:f}:{}),{},{height:h,width:p,name:n.name,radius:n.radius})}function r$(e){return Q.createElement(vSe,i6({shapeType:"rectangle",propTransformer:r4e,activeClassName:"recharts-active-bar"},e))}var a4e=function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(i,r){if(typeof n=="number")return n;var a=Ve(i)||vve(i);return a?n(i,r):(a||Ou(),t)}},o4e=["value","background"],WW;function bc(e){"@babel/helpers - typeof";return bc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},bc(e)}function s4e(e,n){if(e==null)return{};var t=l4e(e,n),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function l4e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function q1(){return q1=Object.assign?Object.assign.bind():function(e){for(var n=1;n0&&Math.abs(N)0&&Math.abs(U)0&&(V=Math.min((X||0)-(U[ee-1]||0),V))}),Number.isFinite(V)){var N=V/B,D=w.layout==="vertical"?i.height:i.width;if(w.padding==="gap"&&(M=N*D/2),w.padding==="no-gap"){var L=Au(n.barCategoryGap,N*D),H=N*D/2;M=H-L-(H-L)/D*L}}}r==="xAxis"?$=[i.left+(S.left||0)+(M||0),i.left+i.width-(S.right||0)-(M||0)]:r==="yAxis"?$=f==="horizontal"?[i.top+i.height-(S.bottom||0),i.top+(S.top||0)]:[i.top+(S.top||0)+(M||0),i.top+i.height-(S.bottom||0)-(M||0)]:$=w.range,j&&($=[$[1],$[0]]);var Y=D_e(w,a,p),R=Y.scale,G=Y.realScaleType;R.domain(_).range($),R_e(R);var W=F_e(R,Na(Na({},w),{},{realScaleType:G}));r==="xAxis"?(z=k==="top"&&!E||k==="bottom"&&E,q=i.left,P=d[O]-z*w.height):r==="yAxis"&&(z=k==="left"&&!E||k==="right"&&E,q=d[O]-z*w.width,P=i.top);var I=Na(Na(Na({},w),W),{},{realScaleType:G,x:q,y:P,scale:R,width:r==="xAxis"?i.width:w.width,height:r==="yAxis"?i.height:w.height});return I.bandSize=E1(I,W),!w.hide&&r==="xAxis"?d[O]+=(z?-1:1)*I.height:w.hide||(d[O]+=(z?-1:1)*I.width),Na(Na({},v),{},V0({},b,I))},{})},KW=function(n,t){var i=n.x,r=n.y,a=t.x,o=t.y;return{x:Math.min(i,a),y:Math.min(r,o),width:Math.abs(a-i),height:Math.abs(o-r)}},b4e=function(n){var t=n.x1,i=n.y1,r=n.x2,a=n.y2;return KW({x:t,y:i},{x:r,y:a})},XW=(function(){function e(n){v4e(this,e),this.scale=n}return g4e(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=i.bandAware,a=i.position;if(t!==void 0){if(a)switch(a){case"start":return this.scale(t);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(t)+l}default:return this.scale(t)}if(r){var f=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+f}return this.scale(t)}}},{key:"isInRange",value:function(t){var i=this.range(),r=i[0],a=i[i.length-1];return r<=a?t>=r&&t<=a:t>=a&&t<=r}}],[{key:"create",value:function(t){return new e(t)}}])})();V0(XW,"EPS",1e-4);var DA=function(n){var t=Object.keys(n).reduce(function(i,r){return Na(Na({},i),{},V0({},r,XW.create(n[r])))},{});return Na(Na({},t),{},{apply:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return GSe(r,function(f,c){return t[c].apply(f,{bandAware:o,position:l})})},isInRange:function(r){return UW(r,function(a,o){return t[o].isInRange(a)})}})};function w4e(e){return(e%180+180)%180}var k4e=function(n){var t=n.width,i=n.height,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=w4e(r),o=a*Math.PI/180,l=Math.atan(i/t),f=o>l&&o-1?f[c?a[h]:h]:void 0}}return X3=i,X3}var Z3,f$;function x4e(){if(f$)return Z3;f$=1;var e=BW();function n(t){var i=e(t),r=i%1;return i===i?r?i-r:i:0}return Z3=n,Z3}var Q3,c$;function S4e(){if(c$)return Q3;c$=1;var e=fU(),n=Sl(),t=x4e(),i=Math.max;function r(a,o,l){var f=a==null?0:a.length;if(!f)return-1;var c=l==null?0:t(l);return c<0&&(c=i(f+c,0)),e(a,n(o,3),c)}return Q3=r,Q3}var J3,d$;function C4e(){if(d$)return J3;d$=1;var e=_4e(),n=S4e(),t=e(n);return J3=t,J3}var A4e=C4e();const j4e=pt(A4e);var O4e=CH();const E4e=pt(O4e);var T4e=E4e(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),RA=A.createContext(void 0),PA=A.createContext(void 0),ZW=A.createContext(void 0),QW=A.createContext({}),JW=A.createContext(void 0),eV=A.createContext(0),nV=A.createContext(0),h$=function(n){var t=n.state,i=t.xAxisMap,r=t.yAxisMap,a=t.offset,o=n.clipPathId,l=n.children,f=n.width,c=n.height,h=T4e(a);return Q.createElement(RA.Provider,{value:i},Q.createElement(PA.Provider,{value:r},Q.createElement(QW.Provider,{value:a},Q.createElement(ZW.Provider,{value:h},Q.createElement(JW.Provider,{value:o},Q.createElement(eV.Provider,{value:c},Q.createElement(nV.Provider,{value:f},l)))))))},M4e=function(){return A.useContext(JW)},tV=function(n){var t=A.useContext(RA);t==null&&Ou();var i=t[n];return i==null&&Ou(),i},D4e=function(){var n=A.useContext(RA);return Zs(n)},R4e=function(){var n=A.useContext(PA),t=j4e(n,function(i){return UW(i.domain,Number.isFinite)});return t||Zs(n)},iV=function(n){var t=A.useContext(PA);t==null&&Ou();var i=t[n];return i==null&&Ou(),i},P4e=function(){var n=A.useContext(ZW);return n},N4e=function(){return A.useContext(QW)},NA=function(){return A.useContext(nV)},$A=function(){return A.useContext(eV)};function wc(e){"@babel/helpers - typeof";return wc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},wc(e)}function $4e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function z4e(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);te*r)return!1;var a=t();return e*(n-e*a/2-i)>=0&&e*(n+e*a/2-r)<=0}function y6e(e,n){return fV(e,n+1)}function b6e(e,n,t,i,r){for(var a=(i||[]).slice(),o=n.start,l=n.end,f=0,c=1,h=o,d=function(){var b=i==null?void 0:i[f];if(b===void 0)return{v:fV(i,c)};var w=f,k,_=function(){return k===void 0&&(k=t(b,w)),k},C=b.coordinate,S=f===0||G1(e,C,_,h,l);S||(f=0,h=o,c+=1),S&&(h=C+e*(_()/2+r),f+=c)},p;c<=a.length;)if(p=d(),p)return p.v;return[]}function Lm(e){"@babel/helpers - typeof";return Lm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Lm(e)}function k$(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Ki(e){for(var n=1;n0?v.coordinate-k*e:v.coordinate})}else a[p]=v=Ki(Ki({},v),{},{tickCoord:v.coordinate});var _=G1(e,v.tickCoord,w,l,f);_&&(f=v.tickCoord-e*(w()/2+r),a[p]=Ki(Ki({},v),{},{isShow:!0}))},h=o-1;h>=0;h--)c(h);return a}function S6e(e,n,t,i,r,a){var o=(i||[]).slice(),l=o.length,f=n.start,c=n.end;if(a){var h=i[l-1],d=t(h,l-1),p=e*(h.coordinate+e*d/2-c);o[l-1]=h=Ki(Ki({},h),{},{tickCoord:p>0?h.coordinate-p*e:h.coordinate});var v=G1(e,h.tickCoord,function(){return d},f,c);v&&(c=h.tickCoord-e*(d/2+r),o[l-1]=Ki(Ki({},h),{},{isShow:!0}))}for(var b=a?l-1:l,w=function(C){var S=o[C],E,j=function(){return E===void 0&&(E=t(S,C)),E};if(C===0){var O=e*(S.coordinate-e*j()/2-f);o[C]=S=Ki(Ki({},S),{},{tickCoord:O<0?S.coordinate-O*e:S.coordinate})}else o[C]=S=Ki(Ki({},S),{},{tickCoord:S.coordinate});var M=G1(e,S.tickCoord,j,f,c);M&&(f=S.tickCoord+e*(j()/2+r),o[C]=Ki(Ki({},S),{},{isShow:!0}))},k=0;k=2?Fa(r[1].coordinate-r[0].coordinate):1,_=g6e(a,k,v);return f==="equidistantPreserveStart"?b6e(k,_,w,r,o):(f==="preserveStart"||f==="preserveStartEnd"?p=S6e(k,_,w,r,o,f==="preserveStartEnd"):p=x6e(k,_,w,r,o),p.filter(function(C){return C.isShow}))}var C6e=["viewBox"],A6e=["viewBox"],j6e=["ticks"];function xc(e){"@babel/helpers - typeof";return xc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xc(e)}function Ff(){return Ff=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function O6e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function E6e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function x$(e,n){for(var t=0;t0?f(this.props):f(v)),o<=0||l<=0||!b||!b.length?null:Q.createElement(It,{className:hn("recharts-cartesian-axis",c),ref:function(k){i.layerReference=k}},a&&this.renderAxisLine(),this.renderTicks(b,this.state.fontSize,this.state.letterSpacing),ii.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(i,r,a){var o,l=hn(r.className,"recharts-cartesian-axis-tick-value");return Q.isValidElement(i)?o=Q.cloneElement(i,wi(wi({},r),{},{className:l})):Bn(i)?o=i(wi(wi({},r),{},{className:l})):o=Q.createElement(h1,Ff({},r,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(A.Component);IA(od,"displayName","CartesianAxis");IA(od,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var $6e=["x1","y1","x2","y2","key"],z6e=["offset"];function Eu(e){"@babel/helpers - typeof";return Eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Eu(e)}function S$(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Zi(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function F6e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var q6e=function(n){var t=n.fill;if(!t||t==="none")return null;var i=n.fillOpacity,r=n.x,a=n.y,o=n.width,l=n.height,f=n.ry;return Q.createElement("rect",{x:r,y:a,ry:f,width:o,height:l,stroke:"none",fill:t,fillOpacity:i,className:"recharts-cartesian-grid-bg"})};function hV(e,n){var t;if(Q.isValidElement(e))t=Q.cloneElement(e,n);else if(Bn(e))t=e(n);else{var i=n.x1,r=n.y1,a=n.x2,o=n.y2,l=n.key,f=C$(n,$6e),c=Un(f,!1);c.offset;var h=C$(c,z6e);t=Q.createElement("line",hu({},h,{x1:i,y1:r,x2:a,y2:o,fill:"none",key:l}))}return t}function H6e(e){var n=e.x,t=e.width,i=e.horizontal,r=i===void 0?!0:i,a=e.horizontalPoints;if(!r||!a||!a.length)return null;var o=a.map(function(l,f){var c=Zi(Zi({},e),{},{x1:n,y1:l,x2:n+t,y2:l,key:"line-".concat(f),index:f});return hV(r,c)});return Q.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function U6e(e){var n=e.y,t=e.height,i=e.vertical,r=i===void 0?!0:i,a=e.verticalPoints;if(!r||!a||!a.length)return null;var o=a.map(function(l,f){var c=Zi(Zi({},e),{},{x1:l,y1:n,x2:l,y2:n+t,key:"line-".concat(f),index:f});return hV(r,c)});return Q.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function W6e(e){var n=e.horizontalFill,t=e.fillOpacity,i=e.x,r=e.y,a=e.width,o=e.height,l=e.horizontalPoints,f=e.horizontal,c=f===void 0?!0:f;if(!c||!n||!n.length)return null;var h=l.map(function(p){return Math.round(p+r-r)}).sort(function(p,v){return p-v});r!==h[0]&&h.unshift(0);var d=h.map(function(p,v){var b=!h[v+1],w=b?r+o-p:h[v+1]-p;if(w<=0)return null;var k=v%n.length;return Q.createElement("rect",{key:"react-".concat(v),y:p,x:i,height:w,width:a,stroke:"none",fill:n[k],fillOpacity:t,className:"recharts-cartesian-grid-bg"})});return Q.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function V6e(e){var n=e.vertical,t=n===void 0?!0:n,i=e.verticalFill,r=e.fillOpacity,a=e.x,o=e.y,l=e.width,f=e.height,c=e.verticalPoints;if(!t||!i||!i.length)return null;var h=c.map(function(p){return Math.round(p+a-a)}).sort(function(p,v){return p-v});a!==h[0]&&h.unshift(0);var d=h.map(function(p,v){var b=!h[v+1],w=b?a+l-p:h[v+1]-p;if(w<=0)return null;var k=v%i.length;return Q.createElement("rect",{key:"react-".concat(v),x:p,y:o,width:w,height:f,stroke:"none",fill:i[k],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return Q.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var G6e=function(n,t){var i=n.xAxis,r=n.width,a=n.height,o=n.offset;return jW(LA(Zi(Zi(Zi({},od.defaultProps),i),{},{ticks:Go(i,!0),viewBox:{x:0,y:0,width:r,height:a}})),o.left,o.left+o.width,t)},Y6e=function(n,t){var i=n.yAxis,r=n.width,a=n.height,o=n.offset;return jW(LA(Zi(Zi(Zi({},od.defaultProps),i),{},{ticks:Go(i,!0),viewBox:{x:0,y:0,width:r,height:a}})),o.top,o.top+o.height,t)},Rf={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Z0(e){var n,t,i,r,a,o,l=NA(),f=$A(),c=N4e(),h=Zi(Zi({},e),{},{stroke:(n=e.stroke)!==null&&n!==void 0?n:Rf.stroke,fill:(t=e.fill)!==null&&t!==void 0?t:Rf.fill,horizontal:(i=e.horizontal)!==null&&i!==void 0?i:Rf.horizontal,horizontalFill:(r=e.horizontalFill)!==null&&r!==void 0?r:Rf.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Rf.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Rf.verticalFill,x:Ve(e.x)?e.x:c.left,y:Ve(e.y)?e.y:c.top,width:Ve(e.width)?e.width:c.width,height:Ve(e.height)?e.height:c.height}),d=h.x,p=h.y,v=h.width,b=h.height,w=h.syncWithTicks,k=h.horizontalValues,_=h.verticalValues,C=D4e(),S=R4e();if(!Ve(v)||v<=0||!Ve(b)||b<=0||!Ve(d)||d!==+d||!Ve(p)||p!==+p)return null;var E=h.verticalCoordinatesGenerator||G6e,j=h.horizontalCoordinatesGenerator||Y6e,O=h.horizontalPoints,M=h.verticalPoints;if((!O||!O.length)&&Bn(j)){var $=k&&k.length,q=j({yAxis:S?Zi(Zi({},S),{},{ticks:$?k:S.ticks}):void 0,width:l,height:f,offset:c},$?!0:w);Qo(Array.isArray(q),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Eu(q),"]")),Array.isArray(q)&&(O=q)}if((!M||!M.length)&&Bn(E)){var P=_&&_.length,z=E({xAxis:C?Zi(Zi({},C),{},{ticks:P?_:C.ticks}):void 0,width:l,height:f,offset:c},P?!0:w);Qo(Array.isArray(z),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Eu(z),"]")),Array.isArray(z)&&(M=z)}return Q.createElement("g",{className:"recharts-cartesian-grid"},Q.createElement(q6e,{fill:h.fill,fillOpacity:h.fillOpacity,x:h.x,y:h.y,width:h.width,height:h.height,ry:h.ry}),Q.createElement(H6e,hu({},h,{offset:c,horizontalPoints:O,xAxis:C,yAxis:S})),Q.createElement(U6e,hu({},h,{offset:c,verticalPoints:M,xAxis:C,yAxis:S})),Q.createElement(W6e,hu({},h,{horizontalPoints:O})),Q.createElement(V6e,hu({},h,{verticalPoints:M})))}Z0.displayName="CartesianGrid";var K6e=["type","layout","connectNulls","ref"],X6e=["key"];function Sc(e){"@babel/helpers - typeof";return Sc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Sc(e)}function A$(e,n){if(e==null)return{};var t=Z6e(e,n),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Z6e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function Fh(){return Fh=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);td){v=[].concat(Pf(f.slice(0,b)),[d-w]);break}var k=v.length%2===0?[0,p]:[p];return[].concat(Pf(n.repeat(f,h)),Pf(v),k).map(function(_){return"".concat(_,"px")}).join(", ")}),$a(t,"id",nd("recharts-line-")),$a(t,"pathRef",function(o){t.mainCurve=o}),$a(t,"handleAnimationEnd",function(){t.setState({isAnimationFinished:!0}),t.props.onAnimationEnd&&t.props.onAnimationEnd()}),$a(t,"handleAnimationStart",function(){t.setState({isAnimationFinished:!1}),t.props.onAnimationStart&&t.props.onAnimationStart()}),t}return sCe(n,e),iCe(n,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var i=this.getTotalLength();this.setState({totalLength:i})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var i=this.getTotalLength();i!==this.state.totalLength&&this.setState({totalLength:i})}}},{key:"getTotalLength",value:function(){var i=this.mainCurve;try{return i&&i.getTotalLength&&i.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(i,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,l=a.xAxis,f=a.yAxis,c=a.layout,h=a.children,d=va(h,kp);if(!d)return null;var p=function(w,k){return{x:w.x,y:w.y,value:w.value,errorVal:cr(w.payload,k)}},v={clipPath:i?"url(#clipPath-".concat(r,")"):null};return Q.createElement(It,v,d.map(function(b){return Q.cloneElement(b,{key:"bar-".concat(b.props.dataKey),data:o,xAxis:l,yAxis:f,layout:c,dataPointFormatter:p})}))}},{key:"renderDots",value:function(i,r,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var l=this.props,f=l.dot,c=l.points,h=l.dataKey,d=Un(this.props,!1),p=Un(f,!0),v=c.map(function(w,k){var _=Br(Br(Br({key:"dot-".concat(k),r:3},d),p),{},{index:k,cx:w.x,cy:w.y,value:w.value,dataKey:h,payload:w.payload,points:c});return n.renderDotItem(f,_)}),b={clipPath:i?"url(#clipPath-".concat(r?"":"dots-").concat(a,")"):null};return Q.createElement(It,Fh({className:"recharts-line-dots",key:"dots"},b),v)}},{key:"renderCurveStatically",value:function(i,r,a,o){var l=this.props,f=l.type,c=l.layout,h=l.connectNulls;l.ref;var d=A$(l,K6e),p=Br(Br(Br({},Un(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:r?"url(#clipPath-".concat(a,")"):null,points:i},o),{},{type:f,layout:c,connectNulls:h});return Q.createElement(Xf,Fh({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(i,r){var a=this,o=this.props,l=o.points,f=o.strokeDasharray,c=o.isAnimationActive,h=o.animationBegin,d=o.animationDuration,p=o.animationEasing,v=o.animationId,b=o.animateNewValues,w=o.width,k=o.height,_=this.state,C=_.prevPoints,S=_.totalLength;return Q.createElement(go,{begin:h,duration:d,isActive:c,easing:p,from:{t:0},to:{t:1},key:"line-".concat(v),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(E){var j=E.t;if(C){var O=C.length/l.length,M=l.map(function(B,V){var U=Math.floor(V*O);if(C[U]){var N=C[U],D=Bi(N.x,B.x),L=Bi(N.y,B.y);return Br(Br({},B),{},{x:D(j),y:L(j)})}if(b){var H=Bi(w*2,B.x),Y=Bi(k/2,B.y);return Br(Br({},B),{},{x:H(j),y:Y(j)})}return Br(Br({},B),{},{x:B.x,y:B.y})});return a.renderCurveStatically(M,i,r)}var $=Bi(0,S),q=$(j),P;if(f){var z="".concat(f).split(/[,\s]+/gim).map(function(B){return parseFloat(B)});P=a.getStrokeDasharray(q,S,z)}else P=a.generateSimpleStrokeDasharray(S,q);return a.renderCurveStatically(l,i,r,{strokeDasharray:P})})}},{key:"renderCurve",value:function(i,r){var a=this.props,o=a.points,l=a.isAnimationActive,f=this.state,c=f.prevPoints,h=f.totalLength;return l&&o&&o.length&&(!c&&h>0||!mc(c,o))?this.renderCurveWithAnimation(i,r):this.renderCurveStatically(o,i,r)}},{key:"render",value:function(){var i,r=this.props,a=r.hide,o=r.dot,l=r.points,f=r.className,c=r.xAxis,h=r.yAxis,d=r.top,p=r.left,v=r.width,b=r.height,w=r.isAnimationActive,k=r.id;if(a||!l||!l.length)return null;var _=this.state.isAnimationFinished,C=l.length===1,S=hn("recharts-line",f),E=c&&c.allowDataOverflow,j=h&&h.allowDataOverflow,O=E||j,M=Gn(k)?this.id:k,$=(i=Un(o,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},q=$.r,P=q===void 0?3:q,z=$.strokeWidth,B=z===void 0?2:z,V=TH(o)?o:{},U=V.clipDot,N=U===void 0?!0:U,D=P*2+B;return Q.createElement(It,{className:S},E||j?Q.createElement("defs",null,Q.createElement("clipPath",{id:"clipPath-".concat(M)},Q.createElement("rect",{x:E?p:p-v/2,y:j?d:d-b/2,width:E?v:v*2,height:j?b:b*2})),!N&&Q.createElement("clipPath",{id:"clipPath-dots-".concat(M)},Q.createElement("rect",{x:p-D/2,y:d-D/2,width:v+D,height:b+D}))):null,!C&&this.renderCurve(O,M),this.renderErrorBar(O,M),(C||o)&&this.renderDots(O,N,M),(!w||_)&&fo.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(i,r){return i.animationId!==r.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,prevPoints:r.curPoints}:i.points!==r.curPoints?{curPoints:i.points}:null}},{key:"repeat",value:function(i,r){for(var a=i.length%2!==0?[].concat(Pf(i),[0]):i,o=[],l=0;l=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function cCe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function mu(){return mu=Object.assign?Object.assign.bind():function(e){for(var n=1;n0||!mc(h,o)||!mc(d,l))?this.renderAreaWithAnimation(i,r):this.renderAreaStatically(o,l,i,r)}},{key:"render",value:function(){var i,r=this.props,a=r.hide,o=r.dot,l=r.points,f=r.className,c=r.top,h=r.left,d=r.xAxis,p=r.yAxis,v=r.width,b=r.height,w=r.isAnimationActive,k=r.id;if(a||!l||!l.length)return null;var _=this.state.isAnimationFinished,C=l.length===1,S=hn("recharts-area",f),E=d&&d.allowDataOverflow,j=p&&p.allowDataOverflow,O=E||j,M=Gn(k)?this.id:k,$=(i=Un(o,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},q=$.r,P=q===void 0?3:q,z=$.strokeWidth,B=z===void 0?2:z,V=TH(o)?o:{},U=V.clipDot,N=U===void 0?!0:U,D=P*2+B;return Q.createElement(It,{className:S},E||j?Q.createElement("defs",null,Q.createElement("clipPath",{id:"clipPath-".concat(M)},Q.createElement("rect",{x:E?h:h-v/2,y:j?c:c-b/2,width:E?v:v*2,height:j?b:b*2})),!N&&Q.createElement("clipPath",{id:"clipPath-dots-".concat(M)},Q.createElement("rect",{x:h-D/2,y:c-D/2,width:v+D,height:b+D}))):null,C?null:this.renderArea(O,M),(o||C)&&this.renderDots(O,N,M),(!w||_)&&fo.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(i,r){return i.animationId!==r.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,curBaseLine:i.baseLine,prevPoints:r.curPoints,prevBaseLine:r.curBaseLine}:i.points!==r.curPoints||i.baseLine!==r.curBaseLine?{curPoints:i.points,curBaseLine:i.baseLine}:null}}])})(A.PureComponent);vV=ls;oo(ls,"displayName","Area");oo(ls,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Bu.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});oo(ls,"getBaseValue",function(e,n,t,i){var r=e.layout,a=e.baseValue,o=n.props.baseValue,l=o??a;if(Ve(l)&&typeof l=="number")return l;var f=r==="horizontal"?i:t,c=f.scale.domain();if(f.type==="number"){var h=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return l==="dataMin"?d:l==="dataMax"||h<0?h:Math.max(Math.min(c[0],c[1]),0)}return l==="dataMin"?c[0]:l==="dataMax"?c[1]:c[0]});oo(ls,"getComposedData",function(e){var n=e.props,t=e.item,i=e.xAxis,r=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,l=e.bandSize,f=e.dataKey,c=e.stackedData,h=e.dataStartIndex,d=e.displayedData,p=e.offset,v=n.layout,b=c&&c.length,w=vV.getBaseValue(n,t,i,r),k=v==="horizontal",_=!1,C=d.map(function(E,j){var O;b?O=c[h+j]:(O=cr(E,f),Array.isArray(O)?_=!0:O=[w,O]);var M=O[1]==null||b&&cr(E,f)==null;return k?{x:O1({axis:i,ticks:a,bandSize:l,entry:E,index:j}),y:M?null:r.scale(O[1]),value:O,payload:E}:{x:M?null:i.scale(O[1]),y:O1({axis:r,ticks:o,bandSize:l,entry:E,index:j}),value:O,payload:E}}),S;return b||_?S=C.map(function(E){var j=Array.isArray(E.value)?E.value[0]:null;return k?{x:E.x,y:j!=null&&E.y!=null?r.scale(j):null}:{x:j!=null?i.scale(j):null,y:E.y}}):S=k?r.scale(w):i.scale(w),Ws({points:C,baseLine:S,layout:v,isRange:_},p)});oo(ls,"renderDotItem",function(e,n){var t;if(Q.isValidElement(e))t=Q.cloneElement(e,n);else if(Bn(e))t=e(n);else{var i=hn("recharts-area-dot",typeof e!="boolean"?e.className:""),r=n.key,a=gV(n,fCe);t=Q.createElement(H0,mu({},a,{key:r,className:i}))}return t});function Ac(e){"@babel/helpers - typeof";return Ac=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ac(e)}function bCe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function wCe(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function s9e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function l9e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function u9e(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t0?o:n&&n.length&&Ve(r)&&Ve(a)?n.slice(r,a+1):[]};function DV(e){return e==="number"?[0,"auto"]:void 0}var x6=function(n,t,i,r){var a=n.graphicalItems,o=n.tooltipAxis,l=Q0(t,n);return i<0||!a||!a.length||i>=l.length?null:a.reduce(function(f,c){var h,d=(h=c.props.data)!==null&&h!==void 0?h:t;d&&n.dataStartIndex+n.dataEndIndex!==0&&n.dataEndIndex-n.dataStartIndex>=i&&(d=d.slice(n.dataStartIndex,n.dataEndIndex+1));var p;if(o.dataKey&&!o.allowDuplicatedCategory){var v=d===void 0?l:d;p=e1(v,o.dataKey,r)}else p=d&&d[i]||l[i];return p?[].concat(Ec(f),[EW(c,p)]):f},[])},z$=function(n,t,i,r){var a=r||{x:n.chartX,y:n.chartY},o=k9e(a,i),l=n.orderedTooltipTicks,f=n.tooltipAxis,c=n.tooltipTicks,h=A_e(o,l,c,f);if(h>=0&&c){var d=c[h]&&c[h].value,p=x6(n,t,h,d),v=_9e(i,l,h,a);return{activeTooltipIndex:h,activeLabel:d,activePayload:p,activeCoordinate:v}}return null},x9e=function(n,t){var i=t.axes,r=t.graphicalItems,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,f=t.dataStartIndex,c=t.dataEndIndex,h=n.layout,d=n.children,p=n.stackOffset,v=AW(h,a);return i.reduce(function(b,w){var k,_=w.type.defaultProps!==void 0?Ee(Ee({},w.type.defaultProps),w.props):w.props,C=_.type,S=_.dataKey,E=_.allowDataOverflow,j=_.allowDuplicatedCategory,O=_.scale,M=_.ticks,$=_.includeHidden,q=_[o];if(b[q])return b;var P=Q0(n.data,{graphicalItems:r.filter(function(W){var I,X=o in W.props?W.props[o]:(I=W.type.defaultProps)===null||I===void 0?void 0:I[o];return X===q}),dataStartIndex:f,dataEndIndex:c}),z=P.length,B,V,U;KCe(_.domain,E,C)&&(B=B4(_.domain,null,E),v&&(C==="number"||O!=="auto")&&(U=Ih(P,S,"category")));var N=DV(C);if(!B||B.length===0){var D,L=(D=_.domain)!==null&&D!==void 0?D:N;if(S){if(B=Ih(P,S,C),C==="category"&&v){var H=yve(B);j&&H?(V=B,B=I1(0,z)):j||(B=QP(L,B,w).reduce(function(W,I){return W.indexOf(I)>=0?W:[].concat(Ec(W),[I])},[]))}else if(C==="category")j?B=B.filter(function(W){return W!==""&&!Gn(W)}):B=QP(L,B,w).reduce(function(W,I){return W.indexOf(I)>=0||I===""||Gn(I)?W:[].concat(Ec(W),[I])},[]);else if(C==="number"){var Y=M_e(P,r.filter(function(W){var I,X,ee=o in W.props?W.props[o]:(I=W.type.defaultProps)===null||I===void 0?void 0:I[o],re="hide"in W.props?W.props.hide:(X=W.type.defaultProps)===null||X===void 0?void 0:X.hide;return ee===q&&($||!re)}),S,a,h);Y&&(B=Y)}v&&(C==="number"||O!=="auto")&&(U=Ih(P,S,"category"))}else v?B=I1(0,z):l&&l[q]&&l[q].hasStack&&C==="number"?B=p==="expand"?[0,1]:OW(l[q].stackGroups,f,c):B=CW(P,r.filter(function(W){var I=o in W.props?W.props[o]:W.type.defaultProps[o],X="hide"in W.props?W.props.hide:W.type.defaultProps.hide;return I===q&&($||!X)}),C,h,!0);if(C==="number")B=w6(d,B,q,a,M),L&&(B=B4(L,B,E));else if(C==="category"&&L){var R=L,G=B.every(function(W){return R.indexOf(W)>=0});G&&(B=R)}}return Ee(Ee({},b),{},Sn({},q,Ee(Ee({},_),{},{axisType:a,domain:B,categoricalDomain:U,duplicateDomain:V,originalDomain:(k=_.domain)!==null&&k!==void 0?k:N,isCategorical:v,layout:h})))},{})},S9e=function(n,t){var i=t.graphicalItems,r=t.Axis,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,f=t.dataStartIndex,c=t.dataEndIndex,h=n.layout,d=n.children,p=Q0(n.data,{graphicalItems:i,dataStartIndex:f,dataEndIndex:c}),v=p.length,b=AW(h,a),w=-1;return i.reduce(function(k,_){var C=_.type.defaultProps!==void 0?Ee(Ee({},_.type.defaultProps),_.props):_.props,S=C[o],E=DV("number");if(!k[S]){w++;var j;return b?j=I1(0,v):l&&l[S]&&l[S].hasStack?(j=OW(l[S].stackGroups,f,c),j=w6(d,j,S,a)):(j=B4(E,CW(p,i.filter(function(O){var M,$,q=o in O.props?O.props[o]:(M=O.type.defaultProps)===null||M===void 0?void 0:M[o],P="hide"in O.props?O.props.hide:($=O.type.defaultProps)===null||$===void 0?void 0:$.hide;return q===S&&!P}),"number",h),r.defaultProps.allowDataOverflow),j=w6(d,j,S,a)),Ee(Ee({},k),{},Sn({},S,Ee(Ee({axisType:a},r.defaultProps),{},{hide:!0,orientation:pa(b9e,"".concat(a,".").concat(w%2),null),domain:j,originalDomain:E,isCategorical:b,layout:h})))}return k},{})},C9e=function(n,t){var i=t.axisType,r=i===void 0?"xAxis":i,a=t.AxisComp,o=t.graphicalItems,l=t.stackGroups,f=t.dataStartIndex,c=t.dataEndIndex,h=n.children,d="".concat(r,"Id"),p=va(h,a),v={};return p&&p.length?v=x9e(n,{axes:p,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:f,dataEndIndex:c}):o&&o.length&&(v=S9e(n,{Axis:a,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:f,dataEndIndex:c})),v},A9e=function(n){var t=Zs(n),i=Go(t,!1,!0);return{tooltipTicks:i,orderedTooltipTicks:iA(i,function(r){return r.coordinate}),tooltipAxis:t,tooltipAxisBandSize:E1(t,i)}},L$=function(n){var t=n.children,i=n.defaultShowTooltip,r=Hr(t,yc),a=0,o=0;return n.data&&n.data.length!==0&&(o=n.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(a=r.props.startIndex),r.props.endIndex>=0&&(o=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!i}},j9e=function(n){return!n||!n.length?!1:n.some(function(t){var i=Zo(t&&t.type);return i&&i.indexOf("Bar")>=0})},I$=function(n){return n==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:n==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:n==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},O9e=function(n,t){var i=n.props,r=n.graphicalItems,a=n.xAxisMap,o=a===void 0?{}:a,l=n.yAxisMap,f=l===void 0?{}:l,c=i.width,h=i.height,d=i.children,p=i.margin||{},v=Hr(d,yc),b=Hr(d,Jo),w=Object.keys(f).reduce(function(j,O){var M=f[O],$=M.orientation;return!M.mirror&&!M.hide?Ee(Ee({},j),{},Sn({},$,j[$]+M.width)):j},{left:p.left||0,right:p.right||0}),k=Object.keys(o).reduce(function(j,O){var M=o[O],$=M.orientation;return!M.mirror&&!M.hide?Ee(Ee({},j),{},Sn({},$,pa(j,"".concat($))+M.height)):j},{top:p.top||0,bottom:p.bottom||0}),_=Ee(Ee({},k),w),C=_.bottom;v&&(_.bottom+=v.props.height||yc.defaultProps.height),b&&t&&(_=E_e(_,r,i,t));var S=c-_.left-_.right,E=h-_.top-_.bottom;return Ee(Ee({brushBottom:C},_),{},{width:Math.max(S,0),height:Math.max(E,0)})},E9e=function(n,t){if(t==="xAxis")return n[t].width;if(t==="yAxis")return n[t].height},BA=function(n){var t=n.chartName,i=n.GraphicalChild,r=n.defaultTooltipEventType,a=r===void 0?"axis":r,o=n.validateTooltipEventTypes,l=o===void 0?["axis"]:o,f=n.axisComponents,c=n.legendContent,h=n.formatAxisMap,d=n.defaultProps,p=function(_,C){var S=C.graphicalItems,E=C.stackGroups,j=C.offset,O=C.updateId,M=C.dataStartIndex,$=C.dataEndIndex,q=_.barSize,P=_.layout,z=_.barGap,B=_.barCategoryGap,V=_.maxBarSize,U=I$(P),N=U.numericAxisName,D=U.cateAxisName,L=j9e(S),H=[];return S.forEach(function(Y,R){var G=Q0(_.data,{graphicalItems:[Y],dataStartIndex:M,dataEndIndex:$}),W=Y.type.defaultProps!==void 0?Ee(Ee({},Y.type.defaultProps),Y.props):Y.props,I=W.dataKey,X=W.maxBarSize,ee=W["".concat(N,"Id")],re=W["".concat(D,"Id")],se={},ye=f.reduce(function(Be,Ge){var We=C["".concat(Ge.axisType,"Map")],Ze=W["".concat(Ge.axisType,"Id")];We&&We[Ze]||Ge.axisType==="zAxis"||Ou();var Qe=We[Ze];return Ee(Ee({},Be),{},Sn(Sn({},Ge.axisType,Qe),"".concat(Ge.axisType,"Ticks"),Go(Qe)))},se),ae=ye[D],le=ye["".concat(D,"Ticks")],_e=E&&E[ee]&&E[ee].hasStack&&H_e(Y,E[ee].stackGroups),ne=Zo(Y.type).indexOf("Bar")>=0,ze=E1(ae,le),we=[],Ce=L&&j_e({barSize:q,stackGroups:E,totalSize:E9e(ye,D)});if(ne){var Ne,ge,xe=Gn(X)?V:X,Pe=(Ne=(ge=E1(ae,le,!0))!==null&&ge!==void 0?ge:xe)!==null&&Ne!==void 0?Ne:0;we=O_e({barGap:z,barCategoryGap:B,bandSize:Pe!==ze?Pe:ze,sizeList:Ce[re],maxBarSize:xe}),Pe!==ze&&(we=we.map(function(Be){return Ee(Ee({},Be),{},{position:Ee(Ee({},Be.position),{},{offset:Be.position.offset-Pe/2})})}))}var ue=Y&&Y.type&&Y.type.getComposedData;ue&&H.push({props:Ee(Ee({},ue(Ee(Ee({},ye),{},{displayedData:G,props:_,dataKey:I,item:Y,bandSize:ze,barPosition:we,offset:j,stackedData:_e,layout:P,dataStartIndex:M,dataEndIndex:$}))),{},Sn(Sn(Sn({key:Y.key||"item-".concat(R)},N,ye[N]),D,ye[D]),"animationId",O)),childIndex:Tve(Y,_.children),item:Y})}),H},v=function(_,C){var S=_.props,E=_.dataStartIndex,j=_.dataEndIndex,O=_.updateId;if(!hD({props:S}))return null;var M=S.children,$=S.layout,q=S.stackOffset,P=S.data,z=S.reverseStackOrder,B=I$($),V=B.numericAxisName,U=B.cateAxisName,N=va(M,i),D=B_e(P,N,"".concat(V,"Id"),"".concat(U,"Id"),q,z),L=f.reduce(function(W,I){var X="".concat(I.axisType,"Map");return Ee(Ee({},W),{},Sn({},X,C9e(S,Ee(Ee({},I),{},{graphicalItems:N,stackGroups:I.axisType===V&&D,dataStartIndex:E,dataEndIndex:j}))))},{}),H=O9e(Ee(Ee({},L),{},{props:S,graphicalItems:N}),C==null?void 0:C.legendBBox);Object.keys(L).forEach(function(W){L[W]=h(S,L[W],H,W.replace("Map",""),t)});var Y=L["".concat(U,"Map")],R=A9e(Y),G=p(S,Ee(Ee({},L),{},{dataStartIndex:E,dataEndIndex:j,updateId:O,graphicalItems:N,stackGroups:D,offset:H}));return Ee(Ee({formattedGraphicalItems:G,graphicalItems:N,offset:H,stackGroups:D},R),L)},b=(function(k){function _(C){var S,E,j;return l9e(this,_),j=c9e(this,_,[C]),Sn(j,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Sn(j,"accessibilityManager",new YCe),Sn(j,"handleLegendBBoxUpdate",function(O){if(O){var M=j.state,$=M.dataStartIndex,q=M.dataEndIndex,P=M.updateId;j.setState(Ee({legendBBox:O},v({props:j.props,dataStartIndex:$,dataEndIndex:q,updateId:P},Ee(Ee({},j.state),{},{legendBBox:O}))))}}),Sn(j,"handleReceiveSyncEvent",function(O,M,$){if(j.props.syncId===O){if($===j.eventEmitterSymbol&&typeof j.props.syncMethod!="function")return;j.applySyncEvent(M)}}),Sn(j,"handleBrushChange",function(O){var M=O.startIndex,$=O.endIndex;if(M!==j.state.dataStartIndex||$!==j.state.dataEndIndex){var q=j.state.updateId;j.setState(function(){return Ee({dataStartIndex:M,dataEndIndex:$},v({props:j.props,dataStartIndex:M,dataEndIndex:$,updateId:q},j.state))}),j.triggerSyncEvent({dataStartIndex:M,dataEndIndex:$})}}),Sn(j,"handleMouseEnter",function(O){var M=j.getMouseInfo(O);if(M){var $=Ee(Ee({},M),{},{isTooltipActive:!0});j.setState($),j.triggerSyncEvent($);var q=j.props.onMouseEnter;Bn(q)&&q($,O)}}),Sn(j,"triggeredAfterMouseMove",function(O){var M=j.getMouseInfo(O),$=M?Ee(Ee({},M),{},{isTooltipActive:!0}):{isTooltipActive:!1};j.setState($),j.triggerSyncEvent($);var q=j.props.onMouseMove;Bn(q)&&q($,O)}),Sn(j,"handleItemMouseEnter",function(O){j.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),Sn(j,"handleItemMouseLeave",function(){j.setState(function(){return{isTooltipActive:!1}})}),Sn(j,"handleMouseMove",function(O){O.persist(),j.throttleTriggeredAfterMouseMove(O)}),Sn(j,"handleMouseLeave",function(O){j.throttleTriggeredAfterMouseMove.cancel();var M={isTooltipActive:!1};j.setState(M),j.triggerSyncEvent(M);var $=j.props.onMouseLeave;Bn($)&&$(M,O)}),Sn(j,"handleOuterEvent",function(O){var M=Eve(O),$=pa(j.props,"".concat(M));if(M&&Bn($)){var q,P;/.*touch.*/i.test(M)?P=j.getMouseInfo(O.changedTouches[0]):P=j.getMouseInfo(O),$((q=P)!==null&&q!==void 0?q:{},O)}}),Sn(j,"handleClick",function(O){var M=j.getMouseInfo(O);if(M){var $=Ee(Ee({},M),{},{isTooltipActive:!0});j.setState($),j.triggerSyncEvent($);var q=j.props.onClick;Bn(q)&&q($,O)}}),Sn(j,"handleMouseDown",function(O){var M=j.props.onMouseDown;if(Bn(M)){var $=j.getMouseInfo(O);M($,O)}}),Sn(j,"handleMouseUp",function(O){var M=j.props.onMouseUp;if(Bn(M)){var $=j.getMouseInfo(O);M($,O)}}),Sn(j,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&j.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),Sn(j,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&j.handleMouseDown(O.changedTouches[0])}),Sn(j,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&j.handleMouseUp(O.changedTouches[0])}),Sn(j,"handleDoubleClick",function(O){var M=j.props.onDoubleClick;if(Bn(M)){var $=j.getMouseInfo(O);M($,O)}}),Sn(j,"handleContextMenu",function(O){var M=j.props.onContextMenu;if(Bn(M)){var $=j.getMouseInfo(O);M($,O)}}),Sn(j,"triggerSyncEvent",function(O){j.props.syncId!==void 0&&tS.emit(iS,j.props.syncId,O,j.eventEmitterSymbol)}),Sn(j,"applySyncEvent",function(O){var M=j.props,$=M.layout,q=M.syncMethod,P=j.state.updateId,z=O.dataStartIndex,B=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)j.setState(Ee({dataStartIndex:z,dataEndIndex:B},v({props:j.props,dataStartIndex:z,dataEndIndex:B,updateId:P},j.state)));else if(O.activeTooltipIndex!==void 0){var V=O.chartX,U=O.chartY,N=O.activeTooltipIndex,D=j.state,L=D.offset,H=D.tooltipTicks;if(!L)return;if(typeof q=="function")N=q(H,O);else if(q==="value"){N=-1;for(var Y=0;Y=0){var _e,ne;if(V.dataKey&&!V.allowDuplicatedCategory){var ze=typeof V.dataKey=="function"?le:"payload.".concat(V.dataKey.toString());_e=e1(Y,ze,N),ne=R&&G&&e1(G,ze,N)}else _e=Y==null?void 0:Y[U],ne=R&&G&&G[U];if(re||ee){var we=O.props.activeIndex!==void 0?O.props.activeIndex:U;return[A.cloneElement(O,Ee(Ee(Ee({},q.props),ye),{},{activeIndex:we})),null,null]}if(!Gn(_e))return[ae].concat(Ec(j.renderActivePoints({item:q,activePoint:_e,basePoint:ne,childIndex:U,isRange:R})))}else{var Ce,Ne=(Ce=j.getItemByXY(j.state.activeCoordinate))!==null&&Ce!==void 0?Ce:{graphicalItem:ae},ge=Ne.graphicalItem,xe=ge.item,Pe=xe===void 0?O:xe,ue=ge.childIndex,Be=Ee(Ee(Ee({},q.props),ye),{},{activeIndex:ue});return[A.cloneElement(Pe,Be),null,null]}return R?[ae,null,null]:[ae,null]}),Sn(j,"renderCustomized",function(O,M,$){return A.cloneElement(O,Ee(Ee({key:"recharts-customized-".concat($)},j.props),j.state))}),Sn(j,"renderMap",{CartesianGrid:{handler:ug,once:!0},ReferenceArea:{handler:j.renderReferenceElement},ReferenceLine:{handler:ug},ReferenceDot:{handler:j.renderReferenceElement},XAxis:{handler:ug},YAxis:{handler:ug},Brush:{handler:j.renderBrush,once:!0},Bar:{handler:j.renderGraphicChild},Line:{handler:j.renderGraphicChild},Area:{handler:j.renderGraphicChild},Radar:{handler:j.renderGraphicChild},RadialBar:{handler:j.renderGraphicChild},Scatter:{handler:j.renderGraphicChild},Pie:{handler:j.renderGraphicChild},Funnel:{handler:j.renderGraphicChild},Tooltip:{handler:j.renderCursor,once:!0},PolarGrid:{handler:j.renderPolarGrid,once:!0},PolarAngleAxis:{handler:j.renderPolarAxis},PolarRadiusAxis:{handler:j.renderPolarAxis},Customized:{handler:j.renderCustomized}}),j.clipPathId="".concat((S=C.id)!==null&&S!==void 0?S:nd("recharts"),"-clip"),j.throttleTriggeredAfterMouseMove=xU(j.triggeredAfterMouseMove,(E=C.throttleDelay)!==null&&E!==void 0?E:1e3/60),j.state={},j}return m9e(_,k),f9e(_,[{key:"componentDidMount",value:function(){var S,E;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,E=S.children,j=S.data,O=S.height,M=S.layout,$=Hr(E,ca);if($){var q=$.props.defaultIndex;if(!(typeof q!="number"||q<0||q>this.state.tooltipTicks.length-1)){var P=this.state.tooltipTicks[q]&&this.state.tooltipTicks[q].value,z=x6(this.state,j,q,P),B=this.state.tooltipTicks[q].coordinate,V=(this.state.offset.top+O)/2,U=M==="horizontal",N=U?{x:B,y:V}:{y:B,x:V},D=this.state.formattedGraphicalItems.find(function(H){var Y=H.item;return Y.type.name==="Scatter"});D&&(N=Ee(Ee({},N),D.props.points[q].tooltipPosition),z=D.props.points[q].tooltipPayload);var L={activeTooltipIndex:q,isTooltipActive:!0,activeLabel:P,activePayload:z,activeCoordinate:N};this.setState(L),this.renderCursor($),this.accessibilityManager.setIndex(q)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,E){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==E.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var j,O;this.accessibilityManager.setDetails({offset:{left:(j=this.props.margin.left)!==null&&j!==void 0?j:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(S){l4([Hr(S.children,ca)],[Hr(this.props.children,ca)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=Hr(this.props.children,ca);if(S&&typeof S.props.shared=="boolean"){var E=S.props.shared?"axis":"item";return l.indexOf(E)>=0?E:a}return a}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var E=this.container,j=E.getBoundingClientRect(),O=v0e(j),M={chartX:Math.round(S.pageX-O.left),chartY:Math.round(S.pageY-O.top)},$=j.width/E.offsetWidth||1,q=this.inRange(M.chartX,M.chartY,$);if(!q)return null;var P=this.state,z=P.xAxisMap,B=P.yAxisMap,V=this.getTooltipEventType(),U=z$(this.state,this.props.data,this.props.layout,q);if(V!=="axis"&&z&&B){var N=Zs(z).scale,D=Zs(B).scale,L=N&&N.invert?N.invert(M.chartX):null,H=D&&D.invert?D.invert(M.chartY):null;return Ee(Ee({},M),{},{xValue:L,yValue:H},U)}return U?Ee(Ee({},M),U):null}},{key:"inRange",value:function(S,E){var j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,M=S/j,$=E/j;if(O==="horizontal"||O==="vertical"){var q=this.state.offset,P=M>=q.left&&M<=q.left+q.width&&$>=q.top&&$<=q.top+q.height;return P?{x:M,y:$}:null}var z=this.state,B=z.angleAxisMap,V=z.radiusAxisMap;if(B&&V){var U=Zs(B);return nN({x:M,y:$},U)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,E=this.getTooltipEventType(),j=Hr(S,ca),O={};j&&E==="axis"&&(j.props.trigger==="click"?O={onClick:this.handleClick}:O={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var M=n1(this.props,this.handleOuterEvent);return Ee(Ee({},M),O)}},{key:"addListener",value:function(){tS.on(iS,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){tS.removeListener(iS,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,E,j){for(var O=this.state.formattedGraphicalItems,M=0,$=O.length;M<$;M++){var q=O[M];if(q.item===S||q.props.key===S.key||E===Zo(q.item.type)&&j===q.childIndex)return q}return null}},{key:"renderClipPath",value:function(){var S=this.clipPathId,E=this.state.offset,j=E.left,O=E.top,M=E.height,$=E.width;return Q.createElement("defs",null,Q.createElement("clipPath",{id:S},Q.createElement("rect",{x:j,y:O,height:M,width:$})))}},{key:"getXScales",value:function(){var S=this.state.xAxisMap;return S?Object.entries(S).reduce(function(E,j){var O=P$(j,2),M=O[0],$=O[1];return Ee(Ee({},E),{},Sn({},M,$.scale))},{}):null}},{key:"getYScales",value:function(){var S=this.state.yAxisMap;return S?Object.entries(S).reduce(function(E,j){var O=P$(j,2),M=O[0],$=O[1];return Ee(Ee({},E),{},Sn({},M,$.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(S){var E;return(E=this.state.xAxisMap)===null||E===void 0||(E=E[S])===null||E===void 0?void 0:E.scale}},{key:"getYScaleByAxisId",value:function(S){var E;return(E=this.state.yAxisMap)===null||E===void 0||(E=E[S])===null||E===void 0?void 0:E.scale}},{key:"getItemByXY",value:function(S){var E=this.state,j=E.formattedGraphicalItems,O=E.activeItem;if(j&&j.length)for(var M=0,$=j.length;M<$;M++){var q=j[M],P=q.props,z=q.item,B=z.type.defaultProps!==void 0?Ee(Ee({},z.type.defaultProps),z.props):z.props,V=Zo(z.type);if(V==="Bar"){var U=(P.data||[]).find(function(H){return R3e(S,H)});if(U)return{graphicalItem:q,payload:U}}else if(V==="RadialBar"){var N=(P.data||[]).find(function(H){return nN(S,H)});if(N)return{graphicalItem:q,payload:N}}else if(U0(q,O)||W0(q,O)||Pm(q,O)){var D=xSe({graphicalItem:q,activeTooltipItem:O,itemData:B.data}),L=B.activeIndex===void 0?D:B.activeIndex;return{graphicalItem:Ee(Ee({},q),{},{childIndex:L}),payload:Pm(q,O)?B.data[D]:q.props.data[D]}}}return null}},{key:"render",value:function(){var S=this;if(!hD(this))return null;var E=this.props,j=E.children,O=E.className,M=E.width,$=E.height,q=E.style,P=E.compact,z=E.title,B=E.desc,V=N$(E,i9e),U=Un(V,!1);if(P)return Q.createElement(h$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},Q.createElement(f4,qf({},U,{width:M,height:$,title:z,desc:B}),this.renderClipPath(),pD(j,this.renderMap)));if(this.props.accessibilityLayer){var N,D;U.tabIndex=(N=this.props.tabIndex)!==null&&N!==void 0?N:0,U.role=(D=this.props.role)!==null&&D!==void 0?D:"application",U.onKeyDown=function(H){S.accessibilityManager.keyboardEvent(H)},U.onFocus=function(){S.accessibilityManager.focus()}}var L=this.parseEventsOfWrapper();return Q.createElement(h$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},Q.createElement("div",qf({className:hn("recharts-wrapper",O),style:Ee({position:"relative",cursor:"default",width:M,height:$},q)},L,{ref:function(Y){S.container=Y}}),Q.createElement(f4,qf({},U,{width:M,height:$,title:z,desc:B,style:w9e}),this.renderClipPath(),pD(j,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(A.Component);Sn(b,"displayName",t),Sn(b,"defaultProps",Ee({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),Sn(b,"getDerivedStateFromProps",function(k,_){var C=k.dataKey,S=k.data,E=k.children,j=k.width,O=k.height,M=k.layout,$=k.stackOffset,q=k.margin,P=_.dataStartIndex,z=_.dataEndIndex;if(_.updateId===void 0){var B=L$(k);return Ee(Ee(Ee({},B),{},{updateId:0},v(Ee(Ee({props:k},B),{},{updateId:0}),_)),{},{prevDataKey:C,prevData:S,prevWidth:j,prevHeight:O,prevLayout:M,prevStackOffset:$,prevMargin:q,prevChildren:E})}if(C!==_.prevDataKey||S!==_.prevData||j!==_.prevWidth||O!==_.prevHeight||M!==_.prevLayout||$!==_.prevStackOffset||!Gf(q,_.prevMargin)){var V=L$(k),U={chartX:_.chartX,chartY:_.chartY,isTooltipActive:_.isTooltipActive},N=Ee(Ee({},z$(_,S,M)),{},{updateId:_.updateId+1}),D=Ee(Ee(Ee({},V),U),N);return Ee(Ee(Ee({},D),v(Ee({props:k},D),_)),{},{prevDataKey:C,prevData:S,prevWidth:j,prevHeight:O,prevLayout:M,prevStackOffset:$,prevMargin:q,prevChildren:E})}if(!l4(E,_.prevChildren)){var L,H,Y,R,G=Hr(E,yc),W=G&&(L=(H=G.props)===null||H===void 0?void 0:H.startIndex)!==null&&L!==void 0?L:P,I=G&&(Y=(R=G.props)===null||R===void 0?void 0:R.endIndex)!==null&&Y!==void 0?Y:z,X=W!==P||I!==z,ee=!Gn(S),re=ee&&!X?_.updateId:_.updateId+1;return Ee(Ee({updateId:re},v(Ee(Ee({props:k},_),{},{updateId:re,dataStartIndex:W,dataEndIndex:I}),_)),{},{prevChildren:E,dataStartIndex:W,dataEndIndex:I})}return null}),Sn(b,"renderActiveDot",function(k,_,C){var S;return A.isValidElement(k)?S=A.cloneElement(k,_):Bn(k)?S=k(_):S=Q.createElement(H0,_),Q.createElement(It,{className:"recharts-active-dot",key:C},S)});var w=A.forwardRef(function(_,C){return Q.createElement(b,qf({},_,{ref:C}))});return w.displayName=b.displayName,w},T9e=BA({chartName:"LineChart",GraphicalChild:xp,axisComponents:[{axisType:"xAxis",AxisComp:Ol},{axisType:"yAxis",AxisComp:yo}],formatAxisMap:MA}),M9e=BA({chartName:"BarChart",GraphicalChild:Uu,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Ol},{axisType:"yAxis",AxisComp:yo}],formatAxisMap:MA}),D9e=BA({chartName:"AreaChart",GraphicalChild:ls,axisComponents:[{axisType:"xAxis",AxisComp:Ol},{axisType:"yAxis",AxisComp:yo}],formatAxisMap:MA});function R9e(e){return`${(e*100).toFixed(0)}%`}const P9e={withXAxis:!0,withYAxis:!0,withTooltip:!0,tooltipAnimationDuration:0,fillOpacity:1,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x",type:"default"},RV=(e,{textColor:n,gridColor:t,cursorFill:i,barLabelColor:r})=>({root:{"--chart-text-color":n?ut(n,e):void 0,"--chart-grid-color":t?ut(t,e):void 0,"--chart-cursor-fill":i?ut(i,e):void 0,"--chart-bar-label-color":r?ut(r,e):void 0}});function N9e(e,n){let t=0,i=0;return e.map(r=>{if(r.standalone)for(const a in r)typeof r[a]=="number"&&a!==n&&(r[a]=[0,r[a]]);else for(const a in r)typeof r[a]=="number"&&a!==n&&(i+=r[a],r[a]=[t,i],t=i);return r})}function $9e(e,n){return typeof e=="function"?e(n).fill:e==null?void 0:e.fill}const il=Re(e=>{const n=be("BarChart",P9e,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,data:f,withLegend:c,legendProps:h,series:d,onMouseLeave:p,dataKey:v,withTooltip:b,withXAxis:w,withYAxis:k,gridAxis:_,tickLine:C,xAxisProps:S,yAxisProps:E,unit:j,tooltipAnimationDuration:O,strokeDasharray:M,gridProps:$,tooltipProps:q,referenceLines:P,fillOpacity:z,barChartProps:B,type:V,orientation:U,dir:N,valueFormatter:D,children:L,barProps:H,xAxisLabel:Y,yAxisLabel:R,withBarValueLabel:G,valueLabelProps:W,withRightYAxis:I,rightYAxisLabel:X,rightYAxisProps:ee,minBarSize:re,maxBarWidth:se,mod:ye,getBarColor:ae,gridColor:le,textColor:_e,attributes:ne,...ze}=n,we=ui(),Ce=_!=="none"&&(C==="x"||C==="xy"),Ne=_!=="none"&&(C==="y"||C==="xy"),[ge,xe]=A.useState(null),Pe=ge!==null,ue=V==="stacked"||V==="percent",Be=V==="percent"?R9e:D,Ge=Se=>{xe(null),p==null||p(Se)},{resolvedClassNames:We,resolvedStyles:Ze}=Hi({classNames:t,styles:a,props:n}),Qe=V==="waterfall"?N9e(f,v):f,ie=Xe({name:"BarChart",classes:k0,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:ne,vars:l,varsResolver:RV}),me=d.map(Se=>{const tn=ut(Se.color,we),dn=Pe&&ge!==Se.name,On=typeof H=="function"?H(Se):H,pn=On==null?void 0:On.shape;return A.createElement(Uu,{...ie("bar"),key:Se.name,name:Se.name,dataKey:Se.name,fill:tn,stroke:tn,isAnimationActive:!1,fillOpacity:dn?.1:z,strokeOpacity:dn?.2:0,stackId:ue?"stack":Se.stackId||void 0,yAxisId:Se.yAxisId||void 0,minPointSize:re,...On,shape:an=>{const en=an.payload,Nn=en!=null&&en.color?ut(en.color,we):typeof ae=="function"?ut(ae(en==null?void 0:en[Se.name],Se),we):$9e(H,Se)||tn,De={...an,fill:Nn};return typeof pn=="function"?pn(De):Q.isValidElement(pn)?Q.cloneElement(pn,De):typeof pn=="object"&&pn?y.jsx(Tm,{...De,...pn}):y.jsx(Tm,{...De})}},G&&y.jsx(fo,{position:U==="vertical"?"right":"top",fontSize:12,fill:"var(--chart-bar-label-color, var(--mantine-color-dimmed))",formatter:an=>Be==null?void 0:Be(an),...typeof W=="function"?W(Se):W}))}),Ye=P==null?void 0:P.map((Se,tn)=>{const dn=ut(Se.color,we);return y.jsx(_p,{stroke:Se.color?dn:"var(--chart-grid-color)",strokeWidth:1,yAxisId:Se.yAxisId||void 0,...Se,label:{fill:Se.color?dn:"currentColor",fontSize:12,position:Se.labelPosition??"insideBottomLeft",...typeof Se.label=="object"?Se.label:{value:Se.label}},...ie("referenceLine")},tn)}),Je={axisLine:!1,...U==="vertical"?{dataKey:v,type:"category"}:{type:"number"},tickLine:Ne?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:j,tickFormatter:U==="vertical"?void 0:Be,...ie("axis")};return y.jsx(de,{...ie("root"),onMouseLeave:Ge,dir:N||"ltr",mod:[{orientation:U},ye],...ze,children:y.jsx(aA,{...ie("container"),children:y.jsxs(M9e,{data:Qe,stackOffset:V==="percent"?"expand":void 0,layout:U,maxBarSize:se,margin:{bottom:Y?30:void 0,left:R?10:void 0,right:R?5:void 0},...B,children:[c&&y.jsx(Jo,{verticalAlign:"top",content:Se=>y.jsx(w0,{payload:Se.payload,onHighlight:xe,legendPosition:(h==null?void 0:h.verticalAlign)||"top",classNames:We,styles:Ze,series:d,showColor:V!=="waterfall",attributes:ne}),...h}),y.jsxs(Ol,{hide:!w,...U==="vertical"?{type:"number"}:{dataKey:v},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:Ce?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:U==="vertical"?Be:void 0,...ie("axis"),...S,children:[Y&&y.jsx(ii,{position:"insideBottom",offset:-20,fontSize:12,...ie("axisLabel"),children:Y}),S==null?void 0:S.children]}),y.jsxs(yo,{orientation:"left",tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!k,...Je,...E,children:[R&&y.jsx(ii,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...ie("axisLabel"),children:R}),E==null?void 0:E.children]}),y.jsxs(yo,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!I,...Je,...ee,children:[X&&y.jsx(ii,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...ie("axisLabel"),children:X}),E==null?void 0:E.children]}),y.jsx(Z0,{strokeDasharray:M,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...ie("grid"),...$}),b&&y.jsx(ca,{animationDuration:O,isAnimationActive:O!==0,position:U==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:M,fill:"var(--chart-cursor-fill)"},content:({label:Se,payload:tn,labelFormatter:dn})=>y.jsx($9,{label:dn&&tn?dn(Se,tn):Se,payload:tn,type:V==="waterfall"?"scatter":void 0,unit:j,classNames:We,styles:Ze,series:d,valueFormatter:D,attributes:ne}),...q}),me,Ye,L]})})})});il.displayName="@mantine/charts/BarChart";il.classes=k0;il.varsResolver=RV;const z9e={withXAxis:!0,withYAxis:!0,withTooltip:!0,tooltipAnimationDuration:0,fillOpacity:1,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x",withDots:!0,connectNulls:!0,strokeWidth:2,curveType:"monotone",gradientStops:[{offset:0,color:"red"},{offset:100,color:"blue"}]},PV=(e,{textColor:n,gridColor:t})=>({root:{"--chart-text-color":n?ut(n,e):void 0,"--chart-grid-color":t?ut(t,e):void 0}}),J0=Re(e=>{const n=be("LineChart",z9e,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,data:f,withLegend:c,legendProps:h,series:d,onMouseLeave:p,dataKey:v,withTooltip:b,withXAxis:w,withYAxis:k,gridAxis:_,tickLine:C,xAxisProps:S,yAxisProps:E,unit:j,tooltipAnimationDuration:O,strokeDasharray:M,gridProps:$,tooltipProps:q,referenceLines:P,withDots:z,dotProps:B,activeDotProps:V,strokeWidth:U,lineChartProps:N,connectNulls:D,fillOpacity:L,curveType:H,orientation:Y,dir:R,valueFormatter:G,children:W,lineProps:I,xAxisLabel:X,yAxisLabel:ee,type:re,gradientStops:se,withRightYAxis:ye,rightYAxisLabel:ae,rightYAxisProps:le,withPointLabels:_e,attributes:ne,gridColor:ze,...we}=n,Ce=ui(),Ne=_!=="none"&&(C==="x"||C==="xy"),ge=_!=="none"&&(C==="y"||C==="xy"),[xe,Pe]=A.useState(null),ue=xe!==null,Be=Se=>{Pe(null),p==null||p(Se)},{resolvedClassNames:Ge,resolvedStyles:We}=Hi({classNames:t,styles:a,props:n}),Ze=Xe({name:"LineChart",classes:k0,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:ne,vars:l,varsResolver:PV}),Qe=`line-chart-gradient-${qi()}`,ie=se==null?void 0:se.map(Se=>y.jsx("stop",{offset:`${Se.offset}%`,stopColor:ut(Se.color,Ce)},Se.color)),me=d.map(Se=>{const tn=ut(Se.color,Ce),dn=ue&&xe!==Se.name;return A.createElement(xp,{...Ze("line"),key:Se.name,name:Se.name,dataKey:Se.name,dot:z?{fillOpacity:dn?0:1,strokeOpacity:dn?0:1,strokeWidth:1,fill:re==="gradient"?"var(--mantine-color-gray-7)":tn,stroke:re==="gradient"?"white":tn,...B}:!1,activeDot:z?{fill:re==="gradient"?"var(--mantine-color-gray-7)":tn,stroke:re==="gradient"?"white":tn,...V}:!1,fill:tn,stroke:re==="gradient"?`url(#${Qe})`:tn,strokeWidth:U,isAnimationActive:!1,fillOpacity:dn?0:L,strokeOpacity:dn?.5:L,connectNulls:D,type:Se.curveType??H,strokeDasharray:Se.strokeDasharray,yAxisId:Se.yAxisId||void 0,label:_e?y.jsx(Epe,{valueFormatter:G}):void 0,...typeof I=="function"?I(Se):I})}),Ye=P==null?void 0:P.map((Se,tn)=>{const dn=ut(Se.color,Ce);return y.jsx(_p,{stroke:Se.color?dn:"var(--chart-grid-color)",strokeWidth:1,yAxisId:Se.yAxisId||void 0,...Se,label:{fill:Se.color?dn:"currentColor",fontSize:12,position:Se.labelPosition??"insideBottomLeft",...typeof Se.label=="object"?Se.label:{value:Se.label}},...Ze("referenceLine")},tn)}),Je={axisLine:!1,...Y==="vertical"?{dataKey:v,type:"category"}:{type:"number"},tickLine:ge?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:j,tickFormatter:Y==="vertical"?void 0:G,...Ze("axis")};return y.jsx(de,{...Ze("root"),onMouseLeave:Be,dir:R||"ltr",...we,children:y.jsx(aA,{...Ze("container"),children:y.jsxs(T9e,{data:f,layout:Y,margin:{bottom:X?30:void 0,left:ee?10:void 0,right:ee?5:void 0},...N,children:[re==="gradient"&&y.jsx("defs",{children:y.jsx("linearGradient",{id:Qe,x1:"0",y1:"0",x2:"0",y2:"1",children:ie})}),c&&y.jsx(Jo,{verticalAlign:"top",content:Se=>y.jsx(w0,{payload:Se.payload,onHighlight:Pe,legendPosition:(h==null?void 0:h.verticalAlign)||"top",classNames:Ge,styles:We,series:d,showColor:re!=="gradient",attributes:ne}),...h}),y.jsxs(Ol,{hide:!w,...Y==="vertical"?{type:"number"}:{dataKey:v},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:Ne?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:Y==="vertical"?G:void 0,...Ze("axis"),...S,children:[X&&y.jsx(ii,{position:"insideBottom",offset:-20,fontSize:12,...Ze("axisLabel"),children:X}),S==null?void 0:S.children]}),y.jsxs(yo,{tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!k,...Je,...E,children:[ee&&y.jsx(ii,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...Ze("axisLabel"),children:ee}),E==null?void 0:E.children]}),y.jsxs(yo,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!ye,...Je,...le,children:[ae&&y.jsx(ii,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...Ze("axisLabel"),children:ae}),E==null?void 0:E.children]}),y.jsx(Z0,{strokeDasharray:M,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...Ze("grid"),...$}),b&&y.jsx(ca,{animationDuration:O,isAnimationActive:O!==0,position:Y==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:M},content:({label:Se,payload:tn,labelFormatter:dn})=>y.jsx($9,{label:dn&&tn?dn(Se,tn):Se,payload:tn,unit:j,classNames:Ge,styles:We,series:d,valueFormatter:G,showColor:re!=="gradient",attributes:ne}),...q}),me,Ye,W]})})})});J0.displayName="@mantine/charts/LineChart";J0.classes=k0;J0.varsResolver=PV;const B$="daily_report_prompt",aS="Eres un coach de equipo. Resume el reporte diario en un MAXIMO de 4 frases cortas, mencionando: (1) total de tareas hechas y quien destaco, (2) cualquier card reabierta o deadline vencido que merezca atencion, (3) cards estancadas criticas (30+ dias) si las hay, (4) una frase corta de animo o aviso si toca. Tono natural, primera persona del plural, sin emojis. No inventes datos; usa solo los del JSON del reporte.";function L9e(e){try{return new Date(e+"T00:00:00").toLocaleDateString("es-ES",{weekday:"long",day:"2-digit",month:"long",year:"numeric"})}catch{return e}}function Nf({label:e,value:n,color:t,icon:i,sub:r}){return y.jsxs(Et,{p:"sm",withBorder:!0,radius:"md",children:[y.jsxs(qe,{gap:6,mb:2,align:"center",children:[i,y.jsx(je,{size:"xs",c:"dimmed",tt:"uppercase",fw:600,children:e})]}),y.jsx(je,{fz:28,fw:700,c:t,children:n}),r&&y.jsx(je,{size:"xs",c:"dimmed",children:r})]})}function fg({title:e,rows:n,emptyText:t,withAvatar:i=!1}){return y.jsxs(za,{withBorder:!0,radius:"md",p:"sm",children:[y.jsx(je,{fw:600,size:"sm",mb:6,children:e}),n.length===0?y.jsx(je,{size:"xs",c:"dimmed",children:t}):y.jsx(Pn,{gap:4,children:n.map((r,a)=>y.jsxs(qe,{gap:6,wrap:"nowrap",justify:"space-between",children:[y.jsxs(qe,{gap:6,wrap:"nowrap",style:{minWidth:0,flex:1},children:[i&&y.jsx(rs,{size:22,radius:"xl",color:rc(r.name||String(a)),children:(r.name||"?").slice(0,2).toUpperCase()}),y.jsx(je,{size:"sm",truncate:!0,children:r.name||"(sin nombre)"})]}),y.jsx(lt,{size:"sm",variant:"light",color:a===0?"teal":"gray",children:r.count})]},(r.user_id||r.name)+a))})]})}function I9e({date:e,onJumpToCard:n}){const[t,i]=A.useState(null),[r,a]=A.useState(null),[o,l]=A.useState(null),[f,c]=A.useState(!1),[h,d]=A.useState(null),[p,v]=A.useState(!1),[b,w]=A.useState(""),[k,_]=A.useState(null),[C,S]=A.useState(null);A.useEffect(()=>{i(null),a(null),Fie(e).then(i).catch(N=>a(N.message)),l(null),d(null),qie(e).then(N=>l(N.exists?N:null)).catch(()=>{})},[e]);const E=async()=>{c(!0),d(null);try{const N=await Hie(e);l({...N,exists:!0})}catch(N){d(N.message)}finally{c(!1)}},j=async()=>{try{const N=await Uie(B$);w(N.value||aS)}catch{w(aS)}v(!0)},O=async()=>{await Wie(B$,b),v(!1)},M=()=>w(aS),$=A.useMemo(()=>t?t.hourly_moves.map((N,D)=>({hora:String(D).padStart(2,"0")+":00",movimientos:N})):[],[t]),q=A.useMemo(()=>{if(!t)return[];const N=new Set;for(const D of t.done_cards)D.requester&&N.add(D.requester);return Array.from(N).sort()},[t]),P=A.useMemo(()=>{if(!t)return[];const N=new Map;for(const D of t.done_cards)D.assignee_id&&N.set(D.assignee_id,D.assignee_name||D.assignee_id);return Array.from(N.entries()).map(([D,L])=>({value:D,label:L}))},[t]),z=A.useMemo(()=>t?t.done_cards.filter(N=>!(k&&N.requester!==k||C&&N.assignee_id!==C)):[],[t,k,C]),B=()=>{if(!t)return;const N=window.open("","_blank");if(!N)return;const D=window.location.origin,L=(()=>{try{return new Date(t.date+"T00:00:00").toLocaleDateString("es-ES",{weekday:"long",day:"2-digit",month:"long",year:"numeric"})}catch{return t.date}})(),H=[];if(k&&H.push(`solicitante=${k}`),C){const W=P.find(I=>I.value===C);H.push(`asignado=${(W==null?void 0:W.label)||C}`)}const Y=W=>W.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""),R=z.map(W=>{const I=(W.tags||[]).map(Y).join(", "),X=`${D}/?card=${W.id}`;return` + ${String(W.seq_num).padStart(5,"0")} + ${Y(W.title)} + ${Y(W.requester||"")} + ${Y(W.assignee_name||"")} + ${Y(I)} + ${Qt(W.lead_time_ms)} + `}).join(""),G=` + +Reporte ${t.date} + +

Reporte diario · ${Y(L)}

+
${Y(t.date)} · ${Y(t.tz)}${H.length?" · filtros: "+H.map(Y).join(", "):""}
+
+
Hechas
${z.length}
+
Lead time avg
${Qt(t.lead_time.avg_ms)}
+
Deadlines on-time
${t.deadlines.met}/${t.deadlines.met+t.deadlines.missed}
+
Reabiertas
${t.kpis.reopened}
+
+${o!=null&&o.summary?`

${Y(o.summary)}

`:""} + + + + + + + + + + ${R||''} +
#TituloSolicitanteAsignadoTagsLead time
Sin tareas que cumplan el filtro.
+
Generado por kanban · ${Y(D)}
+ + diff --git a/backend/files.go b/backend/files.go new file mode 100644 index 0000000..fbc069e --- /dev/null +++ b/backend/files.go @@ -0,0 +1,346 @@ +package main + +import ( + "crypto/rand" + "database/sql" + "encoding/hex" + "errors" + "fmt" + "io" + "mime" + "net/http" + "os" + "path/filepath" + "strings" + "time" + + "fn-registry/functions/infra" +) + +// Issue 0128: adjuntos de archivos por card. + +const ( + maxUploadBytes = 10 << 20 // 10 MiB + uploadsSubdir = "uploads" +) + +type CardFile struct { + ID string `json:"id"` + CardID string `json:"card_id"` + UploaderID string `json:"uploader_id"` + Filename string `json:"filename"` + MIME string `json:"mime"` + Size int64 `json:"size"` + Source string `json:"source"` + URL string `json:"url"` + CreatedAt string `json:"created_at"` +} + +func (db *DB) CreateCardFile(cardID, uploaderID, filename, mimeType, storedPath, source string, size int64) (*CardFile, error) { + id := newID() + now := nowRFC3339() + if source == "" { + source = "upload" + } + _, err := db.conn.Exec( + `INSERT INTO card_files + (id, card_id, uploader_id, filename, mime, size, stored_path, source, created_at) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`, + id, cardID, uploaderID, filename, mimeType, size, storedPath, source, now, + ) + if err != nil { + return nil, err + } + return &CardFile{ + ID: id, + CardID: cardID, + UploaderID: uploaderID, + Filename: filename, + MIME: mimeType, + Size: size, + Source: source, + URL: "/api/files/" + id, + CreatedAt: now, + }, nil +} + +func (db *DB) ListCardFiles(cardID string) ([]CardFile, error) { + rows, err := db.conn.Query( + `SELECT id, card_id, uploader_id, filename, mime, size, source, created_at + FROM card_files + WHERE card_id = ? AND deleted_at IS NULL + ORDER BY created_at ASC`, + cardID, + ) + if err != nil { + return nil, err + } + defer rows.Close() + out := []CardFile{} + for rows.Next() { + var f CardFile + if err := rows.Scan(&f.ID, &f.CardID, &f.UploaderID, &f.Filename, &f.MIME, &f.Size, &f.Source, &f.CreatedAt); err != nil { + return nil, err + } + f.URL = "/api/files/" + f.ID + out = append(out, f) + } + return out, rows.Err() +} + +type storedCardFile struct { + ID string + CardID string + Filename string + MIME string + Size int64 + StoredPath string +} + +func (db *DB) GetCardFile(id string) (*storedCardFile, error) { + var f storedCardFile + err := db.conn.QueryRow( + `SELECT id, card_id, filename, mime, size, stored_path + FROM card_files + WHERE id = ? AND deleted_at IS NULL`, + id, + ).Scan(&f.ID, &f.CardID, &f.Filename, &f.MIME, &f.Size, &f.StoredPath) + if errors.Is(err, sql.ErrNoRows) { + return nil, nil + } + if err != nil { + return nil, err + } + return &f, nil +} + +func (db *DB) SoftDeleteCardFile(id string) (int64, error) { + res, err := db.conn.Exec( + `UPDATE card_files SET deleted_at = ? WHERE id = ? AND deleted_at IS NULL`, + nowRFC3339(), id, + ) + if err != nil { + return 0, err + } + return res.RowsAffected() +} + +func uploadsDir(workdir string) string { + return filepath.Join(workdir, uploadsSubdir) +} + +func safeFilename(name string) string { + name = filepath.Base(name) + name = strings.ReplaceAll(name, string(os.PathSeparator), "_") + name = strings.ReplaceAll(name, "/", "_") + name = strings.ReplaceAll(name, "\\", "_") + name = strings.TrimSpace(name) + if name == "" || name == "." || name == ".." { + return "file" + } + return name +} + +func randomFilePrefix() string { + b := make([]byte, 8) + if _, err := rand.Read(b); err != nil { + return fmt.Sprintf("%d", time.Now().UnixNano()) + } + return hex.EncodeToString(b) +} + +// POST /api/cards/{id}/files (multipart, field "file", optional "source") +func handleUploadCardFile(db *DB, workdir string) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + cardID := r.PathValue("id") + if cardID == "" { + badRequest(w, "card id required") + return + } + + r.Body = http.MaxBytesReader(w, r.Body, maxUploadBytes+1<<20) + if err := r.ParseMultipartForm(maxUploadBytes); err != nil { + badRequest(w, "multipart parse: "+err.Error()) + return + } + + file, header, err := r.FormFile("file") + if err != nil { + badRequest(w, "missing 'file' field: "+err.Error()) + return + } + defer file.Close() + + if header.Size > maxUploadBytes { + infra.HTTPErrorResponse(w, infra.HTTPError{ + Status: http.StatusRequestEntityTooLarge, + Code: "file_too_large", + Message: fmt.Sprintf("file exceeds %d bytes", maxUploadBytes), + }) + return + } + + source := r.FormValue("source") + switch source { + case "", "upload": + source = "upload" + case "description", "chat": + // keep + default: + source = "upload" + } + + dir := filepath.Join(uploadsDir(workdir), cardID) + if err := os.MkdirAll(dir, 0o755); err != nil { + serverError(w, fmt.Errorf("mkdir uploads: %w", err)) + return + } + + fname := safeFilename(header.Filename) + storedPath := filepath.Join(dir, randomFilePrefix()+"__"+fname) + + out, err := os.Create(storedPath) + if err != nil { + serverError(w, fmt.Errorf("create file: %w", err)) + return + } + written, copyErr := io.Copy(out, file) + closeErr := out.Close() + if copyErr != nil { + os.Remove(storedPath) + serverError(w, fmt.Errorf("write file: %w", copyErr)) + return + } + if closeErr != nil { + os.Remove(storedPath) + serverError(w, fmt.Errorf("close file: %w", closeErr)) + return + } + if written > maxUploadBytes { + os.Remove(storedPath) + infra.HTTPErrorResponse(w, infra.HTTPError{ + Status: http.StatusRequestEntityTooLarge, + Code: "file_too_large", + Message: fmt.Sprintf("file exceeds %d bytes", maxUploadBytes), + }) + return + } + + mimeType := header.Header.Get("Content-Type") + if mimeType == "" { + mimeType = mime.TypeByExtension(filepath.Ext(fname)) + } + if mimeType == "" { + mimeType = "application/octet-stream" + } + + actor, _ := infra.UserIDFromContext(r.Context(), userCtxKey) + + cf, err := db.CreateCardFile(cardID, actor, fname, mimeType, storedPath, source, written) + if err != nil { + os.Remove(storedPath) + serverError(w, err) + return + } + + infra.HTTPJSONResponse(w, http.StatusCreated, cf) + } +} + +// GET /api/cards/{id}/files +func handleListCardFiles(db *DB) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + cardID := r.PathValue("id") + if cardID == "" { + badRequest(w, "card id required") + return + } + files, err := db.ListCardFiles(cardID) + if err != nil { + serverError(w, err) + return + } + infra.HTTPJSONResponse(w, http.StatusOK, files) + } +} + +// GET /api/files/{id} +func handleServeFile(db *DB) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + id := r.PathValue("id") + if id == "" { + badRequest(w, "file id required") + return + } + f, err := db.GetCardFile(id) + if err != nil { + serverError(w, err) + return + } + if f == nil { + notFound(w, "file not found") + return + } + fh, err := os.Open(f.StoredPath) + if err != nil { + notFound(w, "file missing on disk") + return + } + defer fh.Close() + if f.MIME != "" { + w.Header().Set("Content-Type", f.MIME) + } + w.Header().Set("Content-Length", fmt.Sprintf("%d", f.Size)) + disposition := "inline" + if !isInlineMIME(f.MIME) { + disposition = "attachment" + } + w.Header().Set("Content-Disposition", fmt.Sprintf(`%s; filename="%s"`, disposition, sanitizeHeaderFilename(f.Filename))) + w.Header().Set("Cache-Control", "private, max-age=3600") + _, _ = io.Copy(w, fh) + } +} + +// DELETE /api/files/{id} +func handleDeleteCardFile(db *DB) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + id := r.PathValue("id") + if id == "" { + badRequest(w, "file id required") + return + } + n, err := db.SoftDeleteCardFile(id) + if err != nil { + serverError(w, err) + return + } + if n == 0 { + notFound(w, "file not found") + return + } + w.WriteHeader(http.StatusNoContent) + } +} + +func isInlineMIME(m string) bool { + if m == "" { + return false + } + m = strings.ToLower(m) + switch { + case strings.HasPrefix(m, "image/"): + return true + case m == "application/pdf": + return true + case strings.HasPrefix(m, "text/"): + return true + } + return false +} + +func sanitizeHeaderFilename(name string) string { + name = strings.ReplaceAll(name, `"`, "") + name = strings.ReplaceAll(name, "\n", "") + name = strings.ReplaceAll(name, "\r", "") + return name +} diff --git a/backend/handlers.go b/backend/handlers.go index 13d74ca..34db7f8 100644 --- a/backend/handlers.go +++ b/backend/handlers.go @@ -629,6 +629,11 @@ func apiRoutes(db *DB, chatWorkdir string, logger *ChatLogger, internalToken str {Method: "GET", Path: "/api/metrics", Handler: handleMetrics(db)}, {Method: "GET", Path: "/api/tags", Handler: handleListTags(db)}, {Method: "GET", Path: "/api/requesters", Handler: handleListRequesters(db)}, + // Issue 0128: adjuntos de archivos. + {Method: "POST", Path: "/api/cards/{id}/files", Handler: handleUploadCardFile(db, chatWorkdir)}, + {Method: "GET", Path: "/api/cards/{id}/files", Handler: handleListCardFiles(db)}, + {Method: "GET", Path: "/api/files/{id}", Handler: handleServeFile(db)}, + {Method: "DELETE", Path: "/api/files/{id}", Handler: handleDeleteCardFile(db)}, } } diff --git a/backend/migrations/014_card_files.sql b/backend/migrations/014_card_files.sql new file mode 100644 index 0000000..111ad61 --- /dev/null +++ b/backend/migrations/014_card_files.sql @@ -0,0 +1,16 @@ +-- Issue 0128: adjuntos de archivos por card. +CREATE TABLE IF NOT EXISTS card_files ( + id TEXT PRIMARY KEY, + card_id TEXT NOT NULL, + uploader_id TEXT NOT NULL DEFAULT '', + filename TEXT NOT NULL, + mime TEXT NOT NULL DEFAULT '', + size INTEGER NOT NULL DEFAULT 0, + stored_path TEXT NOT NULL, + source TEXT NOT NULL DEFAULT 'upload', + created_at TEXT NOT NULL, + deleted_at TEXT +); + +CREATE INDEX IF NOT EXISTS idx_card_files_card_active + ON card_files(card_id, deleted_at); diff --git a/e2e/files_smoke.sh b/e2e/files_smoke.sh new file mode 100755 index 0000000..21cfe8e --- /dev/null +++ b/e2e/files_smoke.sh @@ -0,0 +1,82 @@ +#!/usr/bin/env bash +# Issue 0128 — smoke test of card file attachments. +# Builds kanban (assumes ./kanban present or builds it), boots on ephemeral port, +# exercises POST upload, GET list, GET serve, DELETE, GET list-after-delete. +# Exits 0 on success, non-zero on any failure. + +set -euo pipefail + +PORT=${PORT:-18095} +BASE="http://127.0.0.1:${PORT}" +DB=$(mktemp /tmp/kanban_files_smoke.XXXXXX.db) +COOKIE=$(mktemp /tmp/kanban_files_smoke.cookie.XXXXXX) +UPLOAD_DIR=$(dirname "$DB")/uploads +PNG=$(mktemp /tmp/kanban_files_smoke.XXXXXX.png) +PID_FILE=$(mktemp /tmp/kanban_files_smoke.pid.XXXXXX) + +cleanup() { + if [ -s "$PID_FILE" ]; then + kill "$(cat "$PID_FILE")" 2>/dev/null || true + fi + rm -f "$DB" "$DB-shm" "$DB-wal" "$COOKIE" "$PNG" "$PID_FILE" + rm -rf "$UPLOAD_DIR" +} +trap cleanup EXIT + +# Build if missing. +if [ ! -x ./kanban ]; then + echo "[smoke] building kanban binary..." + (cd backend && CGO_ENABLED=1 go build -tags fts5 -o ../kanban .) +fi + +# Boot. +./kanban --port "$PORT" --db "$DB" --initial-admin admin:adminpw \ + > /tmp/kanban_files_smoke.log 2>&1 & +echo $! > "$PID_FILE" + +# Wait for /api/board. +for _ in $(seq 1 30); do + if curl -sf -o /dev/null "$BASE/api/board"; then break; fi + sleep 0.2 +done + +# Login. +curl -sf -c "$COOKIE" -X POST "$BASE/api/auth/login" \ + -H 'Content-Type: application/json' \ + -d '{"username":"admin","password":"adminpw"}' > /dev/null + +# Column + card. +COL=$(curl -sf -b "$COOKIE" -X POST "$BASE/api/columns" \ + -H 'Content-Type: application/json' \ + -d '{"name":"To Do"}' | python3 -c 'import sys,json;print(json.load(sys.stdin)["id"])') +CARD=$(curl -sf -b "$COOKIE" -X POST "$BASE/api/cards" \ + -H 'Content-Type: application/json' \ + -d "{\"column_id\":\"$COL\",\"title\":\"smoke\",\"requester\":\"r\"}" \ + | python3 -c 'import sys,json;print(json.load(sys.stdin)["id"])') + +# Minimal PNG. +printf '\x89PNG\r\n\x1a\n' > "$PNG" + +# Upload. +UP=$(curl -sf -b "$COOKIE" -X POST "$BASE/api/cards/$CARD/files" \ + -F "file=@$PNG;type=image/png") +FID=$(echo "$UP" | python3 -c 'import sys,json;print(json.load(sys.stdin)["id"])') +[ -n "$FID" ] || { echo "[smoke] upload missing id"; exit 1; } + +# List active. +N=$(curl -sf -b "$COOKIE" "$BASE/api/cards/$CARD/files" | python3 -c 'import sys,json;print(len(json.load(sys.stdin)))') +[ "$N" = "1" ] || { echo "[smoke] expected 1 file, got $N"; exit 1; } + +# Serve. +CT=$(curl -sf -b "$COOKIE" -I "$BASE/api/files/$FID" | awk '/^[Cc]ontent-[Tt]ype/ {print $2}' | tr -d '\r\n') +echo "$CT" | grep -q image/png || { echo "[smoke] wrong content-type: $CT"; exit 1; } + +# Delete. +HTTP=$(curl -sb "$COOKIE" -X DELETE -o /dev/null -w "%{http_code}" "$BASE/api/files/$FID") +[ "$HTTP" = "204" ] || { echo "[smoke] expected 204 on delete, got $HTTP"; exit 1; } + +# List after delete. +N=$(curl -sf -b "$COOKIE" "$BASE/api/cards/$CARD/files" | python3 -c 'import sys,json;print(len(json.load(sys.stdin)))') +[ "$N" = "0" ] || { echo "[smoke] expected 0 after delete, got $N"; exit 1; } + +echo "[smoke] OK" diff --git a/frontend/src/api.ts b/frontend/src/api.ts index ecaabc1..59c3649 100644 --- a/frontend/src/api.ts +++ b/frontend/src/api.ts @@ -1,6 +1,7 @@ import type { Board, Card, + CardFile, CardHistoryResponse, CardMessage, Column, @@ -380,6 +381,42 @@ export function listRequesters(): Promise { return fetchJSON("/requesters"); } +// --- Files (issue 0128) ----------------------------------------------------- + +export function listCardFiles(cardId: string): Promise { + return fetchJSON(`/cards/${cardId}/files`); +} + +export async function uploadCardFile( + cardId: string, + file: File, + source: "upload" | "description" | "chat" = "upload" +): Promise { + const fd = new FormData(); + fd.append("file", file); + fd.append("source", source); + const res = await fetch(`${BASE}/cards/${cardId}/files`, { + method: "POST", + credentials: "same-origin", + body: fd, + }); + if (!res.ok) { + let msg = `upload failed: ${res.status}`; + try { + const body = (await res.json()) as { Message?: string; message?: string }; + if (body.Message || body.message) msg = body.Message || body.message || msg; + } catch { + /* ignore */ + } + throw new HTTPError(res.status, msg); + } + return (await res.json()) as CardFile; +} + +export function deleteCardFile(fileId: string): Promise { + return fetchJSON(`/files/${fileId}`, { method: "DELETE" }); +} + export function getMetrics(f: MetricsFilter): Promise { const qs = new URLSearchParams(); if (f.from) qs.set("from", f.from); diff --git a/frontend/src/components/CardChatPanel.tsx b/frontend/src/components/CardChatPanel.tsx index 45b7360..00284dd 100644 --- a/frontend/src/components/CardChatPanel.tsx +++ b/frontend/src/components/CardChatPanel.tsx @@ -2,6 +2,7 @@ import { ActionIcon, Avatar, Box, + FileButton, Group, Loader, Paper, @@ -11,26 +12,35 @@ import { Textarea, Tooltip, } from "@mantine/core"; -import { IconSend, IconTrash } from "@tabler/icons-react"; +import { IconPaperclip, IconSend, IconTrash } from "@tabler/icons-react"; import { notifications } from "@mantine/notifications"; -import { KeyboardEvent, useCallback, useEffect, useRef, useState } from "react"; +import { DragEvent, KeyboardEvent, useCallback, useEffect, useRef, useState } from "react"; import * as api from "../api"; import type { CardMessage, User } from "../types"; import { tagColor } from "./colors"; import { formatDateTimeShort } from "./format"; +import { MessageBody } from "./MessageBody"; interface Props { cardId: string; users: User[]; currentUserId?: string; onMessagesChange?: (messages: CardMessage[]) => void; + onFileUploaded?: () => void; } -export function CardChatPanel({ cardId, users, currentUserId, onMessagesChange }: Props) { +function refForFile(filename: string, url: string, mime: string): string { + const safe = filename.replace(/]/g, ""); + return mime.startsWith("image/") ? `![${safe}](${url})` : `[${safe}](${url})`; +} + +export function CardChatPanel({ cardId, users, currentUserId, onMessagesChange, onFileUploaded }: Props) { const [messages, setMessages] = useState([]); const [loading, setLoading] = useState(true); const [body, setBody] = useState(""); const [sending, setSending] = useState(false); + const [uploading, setUploading] = useState(false); + const [dragOver, setDragOver] = useState(false); const viewportRef = useRef(null); const usersById = new Map(users.map((u) => [u.id, u])); @@ -92,8 +102,62 @@ export function CardChatPanel({ cardId, users, currentUserId, onMessagesChange } } }; + const handleFiles = async (files: FileList | File[]) => { + setUploading(true); + try { + for (const file of Array.from(files)) { + try { + const cf = await api.uploadCardFile(cardId, file, "chat"); + const ref = refForFile(cf.filename, cf.url, cf.mime); + const m = await api.createCardMessage(cardId, ref); + setMessages((prev) => { + const next = [...prev, m]; + onMessagesChange?.(next); + return next; + }); + onFileUploaded?.(); + } catch (e) { + notifications.show({ color: "red", message: `${file.name}: ${(e as Error).message}` }); + } + } + } finally { + setUploading(false); + } + }; + + const onDrop = (e: DragEvent) => { + e.preventDefault(); + setDragOver(false); + if (!e.dataTransfer.files || e.dataTransfer.files.length === 0) return; + handleFiles(e.dataTransfer.files); + }; + + const onDragOver = (e: DragEvent) => { + if (!e.dataTransfer.types.includes("Files")) return; + e.preventDefault(); + setDragOver(true); + }; + + const onDragLeave = (e: DragEvent) => { + e.preventDefault(); + setDragOver(false); + }; + return ( - + ) : messages.length === 0 ? ( - Sin mensajes aun. Escribe el primero. + Sin mensajes aun. Escribe el primero o arrastra un archivo. ) : ( @@ -138,9 +202,9 @@ export function CardChatPanel({ cardId, users, currentUserId, onMessagesChange } )} - - {m.body} - + + + @@ -154,13 +218,29 @@ export function CardChatPanel({ cardId, users, currentUserId, onMessagesChange } value={body} onChange={(e) => setBody(e.currentTarget.value)} onKeyDown={onKeyDown} - placeholder="Escribe un mensaje (Enter = enviar, Shift+Enter = salto)" + placeholder="Escribe un mensaje. Arrastra archivos o usa el clip." autosize minRows={1} maxRows={6} style={{ flex: 1 }} disabled={sending} /> + file && handleFiles([file])} disabled={uploading}> + {(props) => ( + + + + + + )} + + {(dragOver || uploading) && ( + + + {uploading ? "Subiendo..." : "Suelta para adjuntar"} + + + )} ); } diff --git a/frontend/src/components/CardEditPanel.tsx b/frontend/src/components/CardEditPanel.tsx index 843b9c9..c9eb7a6 100644 --- a/frontend/src/components/CardEditPanel.tsx +++ b/frontend/src/components/CardEditPanel.tsx @@ -1,8 +1,9 @@ -import { Box, Divider, Group, Tabs, Text } from "@mantine/core"; +import { Box, Divider, Group, Tabs } from "@mantine/core"; import { IconLink, IconMessage, IconPaperclip } from "@tabler/icons-react"; import { useState } from "react"; import type { Card, CardMessage, User } from "../types"; import { CardChatPanel } from "./CardChatPanel"; +import { CardFilesPanel } from "./CardFilesPanel"; import { CardLinksPanel } from "./CardLinksPanel"; import { CardForm, CardFormValues } from "./CardForm"; @@ -27,12 +28,15 @@ export function CardEditPanel({ }: Props) { const [messages, setMessages] = useState([]); const [liveCard, setLiveCard] = useState(card); + const [filesRefreshKey, setFilesRefreshKey] = useState(0); const wrappedSubmit = async (v: CardFormValues) => { setLiveCard((c) => ({ ...c, title: v.title, description: v.description, requester: v.requester, tags: v.tags, assignee_id: v.assignee_id })); await onSubmit(v); }; + const bumpFiles = () => setFilesRefreshKey((k) => k + 1); + return ( @@ -48,6 +52,8 @@ export function CardEditPanel({ tags: liveCard.tags || [], }} submitLabel="Guardar" + cardId={liveCard.id} + onFileUploaded={bumpFiles} onSubmit={wrappedSubmit} onCancel={onCancel} /> @@ -58,7 +64,7 @@ export function CardEditPanel({ }>Chat }>Enlaces - } disabled>Archivos + }>Archivos @@ -68,6 +74,7 @@ export function CardEditPanel({ users={users} currentUserId={currentUserId} onMessagesChange={setMessages} + onFileUploaded={bumpFiles} /> @@ -75,9 +82,7 @@ export function CardEditPanel({ - - Proximamente: adjuntos de archivos. - + diff --git a/frontend/src/components/CardFilesPanel.tsx b/frontend/src/components/CardFilesPanel.tsx new file mode 100644 index 0000000..127d673 --- /dev/null +++ b/frontend/src/components/CardFilesPanel.tsx @@ -0,0 +1,223 @@ +import { + ActionIcon, + Anchor, + Badge, + Box, + Button, + FileButton, + Group, + Image, + Loader, + Paper, + Stack, + Text, + Tooltip, +} from "@mantine/core"; +import { notifications } from "@mantine/notifications"; +import { + IconDownload, + IconFile, + IconFileSpreadsheet, + IconFileText, + IconFileTypePdf, + IconPhoto, + IconTrash, + IconUpload, +} from "@tabler/icons-react"; +import { useCallback, useEffect, useState } from "react"; +import * as api from "../api"; +import type { CardFile } from "../types"; + +interface Props { + cardId: string; + refreshKey?: number; +} + +function formatSize(bytes: number): string { + if (bytes < 1024) return `${bytes} B`; + if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`; + return `${(bytes / 1024 / 1024).toFixed(2)} MB`; +} + +function isImage(mime: string): boolean { + return mime.startsWith("image/"); +} + +function fileIcon(mime: string, size = 18) { + const m = mime.toLowerCase(); + if (m.startsWith("image/")) return ; + if (m === "application/pdf") return ; + if ( + m.includes("spreadsheet") || + m.includes("excel") || + m === "text/csv" || + m === "application/vnd.ms-excel" + ) { + return ; + } + if (m.startsWith("text/")) return ; + return ; +} + +function sourceBadge(s: CardFile["source"]) { + if (s === "description") return { color: "blue", label: "descripcion" }; + if (s === "chat") return { color: "teal", label: "chat" }; + return { color: "gray", label: "subido" }; +} + +export function CardFilesPanel({ cardId, refreshKey }: Props) { + const [files, setFiles] = useState([]); + const [loading, setLoading] = useState(true); + const [uploading, setUploading] = useState(false); + + const reload = useCallback(async () => { + try { + const list = await api.listCardFiles(cardId); + setFiles(list); + } catch (e) { + notifications.show({ color: "red", message: (e as Error).message }); + } finally { + setLoading(false); + } + }, [cardId]); + + useEffect(() => { + reload(); + }, [reload, refreshKey]); + + const onUpload = async (file: File | null) => { + if (!file) return; + setUploading(true); + try { + const cf = await api.uploadCardFile(cardId, file, "upload"); + setFiles((prev) => [...prev, cf]); + } catch (e) { + notifications.show({ color: "red", message: (e as Error).message }); + } finally { + setUploading(false); + } + }; + + const onDelete = async (id: string) => { + if (!window.confirm("¿Borrar este archivo?")) return; + try { + await api.deleteCardFile(id); + setFiles((prev) => prev.filter((f) => f.id !== id)); + } catch (e) { + notifications.show({ color: "red", message: (e as Error).message }); + } + }; + + return ( + + + + {files.length} archivo{files.length === 1 ? "" : "s"} + + + {(props) => ( + + )} + + + + {loading ? ( + + + + ) : files.length === 0 ? ( + + + Sin archivos + + + Sube archivos con el boton, arrastra al chat o a la descripcion. + + + ) : ( + + {files.map((f) => { + const badge = sourceBadge(f.source); + return ( + + + {isImage(f.mime) ? ( + + {f.filename} + + ) : ( + + {fileIcon(f.mime, 28)} + + )} + + + {f.filename} + + + + {badge.label} + + {formatSize(f.size)} + {f.mime || "?"} + + + + + + + + + + onDelete(f.id)} + aria-label="Borrar" + > + + + + + + + ); + })} + + )} + + ); +} diff --git a/frontend/src/components/CardForm.tsx b/frontend/src/components/CardForm.tsx index 6bc9933..274a14e 100644 --- a/frontend/src/components/CardForm.tsx +++ b/frontend/src/components/CardForm.tsx @@ -1,5 +1,7 @@ -import { Autocomplete, Button, Group, Select, Stack, TagsInput, Textarea } from "@mantine/core"; -import { FormEvent, KeyboardEvent, useState } from "react"; +import { Autocomplete, Box, Button, Group, Select, Stack, TagsInput, Text, Textarea } from "@mantine/core"; +import { notifications } from "@mantine/notifications"; +import { DragEvent, FormEvent, KeyboardEvent, useRef, useState } from "react"; +import * as api from "../api"; import type { User } from "../types"; // CardForm: Solicitante (Autocomplete) intencionadamente NO hace submit en Enter. @@ -21,16 +23,25 @@ interface Props { users?: User[]; requesterOptions?: string[]; tagOptions?: string[]; + cardId?: string; + onFileUploaded?: () => void; onSubmit: (v: CardFormValues) => Promise | void; onCancel: () => void; } +function markdownRef(filename: string, url: string, isImage: boolean): string { + const safeName = filename.replace(/]/g, ""); + return isImage ? `![${safeName}](${url})` : `[${safeName}](${url})`; +} + export function CardForm({ initial, submitLabel = "Guardar", users = [], requesterOptions = [], tagOptions = [], + cardId, + onFileUploaded, onSubmit, onCancel, }: Props) { @@ -39,6 +50,9 @@ export function CardForm({ const [description, setDescription] = useState(initial?.description ?? ""); const [assigneeId, setAssigneeId] = useState(initial?.assignee_id ?? null); const [tags, setTags] = useState(initial?.tags ?? []); + const [dragOver, setDragOver] = useState(false); + const [uploading, setUploading] = useState(false); + const textareaRef = useRef(null); const submit = async (e?: FormEvent) => { e?.preventDefault(); @@ -60,6 +74,66 @@ export function CardForm({ } }; + const insertAtCursor = (snippet: string) => { + const ta = textareaRef.current; + if (!ta) { + setDescription((d) => (d ? d + "\n" + snippet : snippet)); + return; + } + const start = ta.selectionStart ?? description.length; + const end = ta.selectionEnd ?? description.length; + const before = description.slice(0, start); + const after = description.slice(end); + const sep = before && !before.endsWith("\n") ? "\n" : ""; + const next = before + sep + snippet + after; + setDescription(next); + queueMicrotask(() => { + ta.focus(); + const pos = (before + sep + snippet).length; + ta.setSelectionRange(pos, pos); + }); + }; + + const handleFiles = async (files: FileList | File[]) => { + if (!cardId) { + notifications.show({ color: "yellow", message: "Guarda la tarjeta antes de subir archivos." }); + return; + } + setUploading(true); + try { + for (const file of Array.from(files)) { + try { + const cf = await api.uploadCardFile(cardId, file, "description"); + insertAtCursor(markdownRef(cf.filename, cf.url, cf.mime.startsWith("image/"))); + onFileUploaded?.(); + } catch (e) { + notifications.show({ color: "red", message: `${file.name}: ${(e as Error).message}` }); + } + } + } finally { + setUploading(false); + } + }; + + const onDrop = (e: DragEvent) => { + e.preventDefault(); + setDragOver(false); + if (!e.dataTransfer.files || e.dataTransfer.files.length === 0) return; + handleFiles(e.dataTransfer.files); + }; + + const onDragOver = (e: DragEvent) => { + if (!cardId) return; + if (!e.dataTransfer.types.includes("Files")) return; + e.preventDefault(); + setDragOver(true); + }; + + const onDragLeave = (e: DragEvent) => { + e.preventDefault(); + setDragOver(false); + }; + return (
@@ -95,17 +169,48 @@ export function CardForm({ if (e.key === "Enter") e.preventDefault(); }} /> -