diff --git a/backend/dist/assets/index-BbedqQPY.js b/backend/dist/assets/index-Zozqj0rw.js similarity index 57% rename from backend/dist/assets/index-BbedqQPY.js rename to backend/dist/assets/index-Zozqj0rw.js index a50f96d..0e4eada 100644 --- a/backend/dist/assets/index-BbedqQPY.js +++ b/backend/dist/assets/index-Zozqj0rw.js @@ -1,4 +1,4 @@ -function WK(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 Xv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vk={exports:{}},gh={};/** +function GK(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 Xv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vk={exports:{}},gh={};/** * @license React * react-jsx-runtime.production.js * @@ -6,7 +6,7 @@ function WK(e,n){for(var t=0;t{gk(i[r])&&r in e?t[r]=Y6(t[r],i[r]):t[r]=i[r]}),t}function KK(e){return e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}function XK(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 lm(e){const n=XK(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 $T(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function Nz(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?$T(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?$T(a):a}}return i}return t}const ve=Nz("rem",{shouldScale:!0}),Vg=Nz("em");function Bu(e){return Object.keys(e).reduce((n,t)=>(e[t]!==void 0&&(n[t]=e[t]),n),{})}function $z(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 yk={exports:{}},Nn={};/** + */var PT;function YK(){if(PT)return gh;PT=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 gh.Fragment=n,gh.jsx=t,gh.jsxs=t,gh}var NT;function KK(){return NT||(NT=1,vk.exports=YK()),vk.exports}var v=KK();function $t(e){return Object.keys(e)}function gk(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Y6(e,n){const t={...e},i=n;return gk(e)&&gk(n)&&Object.keys(n).forEach(r=>{gk(i[r])&&r in e?t[r]=Y6(t[r],i[r]):t[r]=i[r]}),t}function XK(e){return e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}function ZK(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 lm(e){const n=ZK(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 $T(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function $z(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?$T(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?$T(a):a}}return i}return t}const ve=$z("rem",{shouldScale:!0}),Vg=$z("em");function Bu(e){return Object.keys(e).reduce((n,t)=>(e[t]!==void 0&&(n[t]=e[t]),n),{})}function zz(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 yk={exports:{}},Nn={};/** * @license React * react.production.js * @@ -14,7 +14,7 @@ function WK(e,n){for(var t=0;t{const i=x.use(n);if(i===null)throw new Error(e);return i}]}function IT(e,n){return t=>{if(typeof t!="string"||t.trim().length===0)throw new Error(n);return`${e}-${t}`}}function Wg(e,n){let t=e;for(;(t=t.parentElement)&&!t.matches(n););return t}function QK(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 JK(e,n,t){for(let i=e+1;i{var b;t==null||t(l);const u=Array.from(((b=Wg(l.currentTarget,e))==null?void 0:b.querySelectorAll(n))||[]).filter(w=>eX(l.currentTarget,w,e)),f=u.findIndex(w=>l.currentTarget===w),h=JK(f,u,i),d=QK(f,u,i),p=a==="rtl"?d:h,g=a==="rtl"?h:d;switch(l.key){case"ArrowRight":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),u[p].focus(),r&&u[p].click());break;case"ArrowLeft":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),u[g].focus(),r&&u[g].click());break;case"ArrowUp":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),u[d].focus(),r&&u[d].click());break;case"ArrowDown":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),u[h].focus(),r&&u[h].click());break;case"Home":l.stopPropagation(),l.preventDefault(),!u[0].disabled&&u[0].focus();break;case"End":{l.stopPropagation(),l.preventDefault();const w=u.length-1;!u[w].disabled&&u[w].focus();break}}}}const nX={app:100,modal:200,popover:300,overlay:400,max:9999};function xa(e){return nX[e]}const jS=()=>{};function tX(e,n={active:!0}){return typeof e!="function"||!n.active?n.onKeyDown||jS:t=>{var i;t.key==="Escape"&&(e(t),(i=n.onTrigger)==null||i.call(n))}}function Ln(e,n="size",t=!0){if(e!==void 0)return $z(e)?t?ve(e):e:`var(--${n}-${e})`}function Yt(e){return Ln(e,"mantine-spacing")}function qt(e){return e===void 0?"var(--mantine-radius-default)":Ln(e,"mantine-radius")}function ai(e){return Ln(e,"mantine-font-size")}function iX(e){return Ln(e,"mantine-line-height",!1)}function Q6(e){if(e)return Ln(e,"mantine-shadow",!1)}function bi(e,n){return t=>{e==null||e(t),n==null||n(t)}}function J6(e,n){return e in n?lm(n[e]):lm(e)}function um(e,n){const t=e.map(i=>({value:i,px:J6(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 rX(e,n,t){var i;return t?Array.from(((i=Wg(t,n))==null?void 0:i.querySelectorAll(e))||[]).findIndex(r=>r===t):null}function Jo(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 ml(e="mantine-"){return`${e}${Math.random().toString(36).slice(2,11)}`}function zh(e){const n=x.useRef(e);return x.useEffect(()=>{n.current=e}),x.useMemo(()=>((...t)=>{var i;return(i=n.current)==null?void 0:i.call(n,...t)}),[])}function _y(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=zh(e),l=x.useRef(0),u=x.useRef(0),f=x.useRef(null),h=x.useMemo(()=>{const d=Object.assign((...p)=>{window.clearTimeout(l.current),f.current=p;const g=d._isFirstCall;d._isFirstCall=!1;function b(){window.clearTimeout(l.current),window.clearTimeout(u.current),l.current=0,u.current=0,d._isFirstCall=!0,d._hasPendingCallback=!1}function w(){a!==void 0&&u.current===0&&(u.current=window.setTimeout(()=>{if(l.current!==0){const S=f.current;b(),o(...S)}},a))}if(r&&g){o(...p);const S=()=>{b()},j=()=>{l.current!==0&&(b(),o(...p))},T=()=>{b()};d.flush=j,d.cancel=T,l.current=window.setTimeout(S,t),w();return}if(r&&!g){d._hasPendingCallback=!0;const S=()=>{l.current!==0&&(b(),o(...p))},j=()=>{b()};d.flush=S,d.cancel=j;const T=()=>{b()};l.current=window.setTimeout(T,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 x.useEffect(()=>()=>{i?h.flush():h.cancel()},[h,i]),h}const aX=["mousedown","touchstart"];function oX(e,n,t,i=!0){const r=x.useRef(null),a=n||aX,o=x.useEffectEvent(u=>{const{target:f}=u??{};if(!document.body.contains(f)&&(f==null?void 0:f.tagName)!=="HTML")return;const h=u.composedPath();Array.isArray(t)?t.every(d=>!!d&&!h.includes(d))&&e(u):r.current&&!h.includes(r.current)&&e(u)}),l=a.join(",");return x.useEffect(()=>{if(!i)return;const u=l.split(",");return u.forEach(f=>document.addEventListener(f,o)),()=>{u.forEach(f=>document.removeEventListener(f,o))}},[l,i]),r}function sX(e={}){const n=e.timeout??2e3,[t,i]=x.useState(null),[r,a]=x.useState(!1),o=x.useRef(null);x.useEffect(()=>()=>{window.clearTimeout(o.current)},[]);const l=h=>{window.clearTimeout(o.current),o.current=window.setTimeout(()=>a(!1),n),a(h)};return{copy:h=>{"clipboard"in navigator?navigator.clipboard.writeText(h).then(()=>{i(null),l(!0)}).catch(d=>i(d)):i(new Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{a(!1),i(null),window.clearTimeout(o.current)},error:t,copied:r}}function lX(e,n){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function uX(e,n,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){const[i,r]=x.useState(t?n:lX(e));return x.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 ps=typeof document<"u"?x.useLayoutEffect:x.useEffect;function os(e,n){const t=x.useRef(!1);x.useEffect(()=>()=>{t.current=!1},[]),x.useEffect(()=>{if(t.current)return e();t.current=!0},n)}function Lz({opened:e,shouldReturnFocus:n=!0}){const t=x.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 os(()=>{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 cX=/input|select|textarea|button|object/,Iz="a, input, select, textarea, button, object, [tabindex]";function fX(e){return e.style.display==="none"}function dX(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(fX(n))return!1;n=n.parentNode}return!0}function Bz(e){let n=e.getAttribute("tabindex");return n===null&&(n=void 0),parseInt(n,10)}function AS(e){const n=e.nodeName.toLowerCase(),t=!Number.isNaN(Bz(e));return(cX.test(n)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||t)&&dX(e)}function Fz(e){const n=Bz(e);return(Number.isNaN(n)||n>=0)&&AS(e)}function hX(e){return Array.from(e.querySelectorAll(Iz)).filter(Fz)}function mX(e,n){const t=hX(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(u=>u.getAttribute("type")==="radio"&&u.getAttribute("name")===o.getAttribute("name")).includes(i)),!a)return;n.preventDefault();const l=t[n.shiftKey?t.length-1:0];l&&l.focus()}function pX(e=!0){const n=x.useRef(null),t=r=>{let a=r.querySelector("[data-autofocus]");if(!a){const o=Array.from(r.querySelectorAll(Iz));a=o.find(Fz)||o.find(AS)||null,!a&&AS(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=x.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 x.useEffect(()=>{if(!e)return;n.current&&setTimeout(()=>{n.current&&t(n.current)});const r=a=>{a.key==="Tab"&&n.current&&mX(n.current,a)};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),i}const vX=e=>(e+1)%1e6;function gX(){const[,e]=x.useReducer(vX,0);return e}function Pi(e){const[n,t]=x.useState(`mantine-${x.useId().replace(/:/g,"")}`);return ps(()=>{t(ml())},[]),typeof e=="string"?e:n}function qz(e,n,t){const i=x.useEffectEvent(n);x.useEffect(()=>(window.addEventListener(e,i,t),()=>window.removeEventListener(e,i,t)),[e])}function cm(e,n){if(typeof e=="function")return e(n);typeof e=="object"&&e!==null&&"current"in e&&(e.current=n)}function yX(...e){const n=new Map;return t=>{if(e.forEach(i=>{const r=cm(i,t);r&&n.set(i,r)}),n.size>0)return()=>{e.forEach(i=>{const r=n.get(i);r&&typeof r=="function"?r():cm(i,null)}),n.clear()}}}function Ht(...e){return x.useCallback(yX(...e),e)}function Hz(e){return{x:Jo(e.x,0,1),y:Jo(e.y,0,1)}}function Uz(e,n,t="ltr"){const i=x.useRef(!1),r=x.useRef(!1),a=x.useRef(0),o=x.useRef(null),[l,u]=x.useState(!1);return x.useEffect(()=>(i.current=!0,()=>{var f;(f=o.current)==null||f.call(o)}),[]),{ref:x.useCallback(f=>{const h=({x:j,y:T})=>{cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{if(i.current&&f){f.style.userSelect="none";const A=f.getBoundingClientRect();if(A.width&&A.height){const O=Jo((j-A.left)/A.width,0,1);e({x:t==="ltr"?O:1-O,y:Jo((T-A.top)/A.height,0,1)})}}})},d=()=>{document.addEventListener("mousemove",k),document.addEventListener("mouseup",b),document.addEventListener("touchmove",S,{passive:!1}),document.addEventListener("touchend",b)},p=()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",b),document.removeEventListener("touchmove",S),document.removeEventListener("touchend",b)},g=()=>{!r.current&&i.current&&(r.current=!0,typeof(n==null?void 0:n.onScrubStart)=="function"&&n.onScrubStart(),u(!0),d())},b=()=>{r.current&&i.current&&(r.current=!1,u(!1),p(),setTimeout(()=>{typeof(n==null?void 0:n.onScrubEnd)=="function"&&n.onScrubEnd()},0))},w=j=>{g(),j.preventDefault(),k(j)},k=j=>h({x:j.clientX,y:j.clientY}),_=j=>{j.cancelable&&j.preventDefault(),g(),S(j)},S=j=>{j.cancelable&&j.preventDefault(),h({x:j.changedTouches[0].clientX,y:j.changedTouches[0].clientY})};return f==null||f.addEventListener("mousedown",w),f==null||f.addEventListener("touchstart",_,{passive:!1}),o.current=()=>{p(),cancelAnimationFrame(a.current)},()=>{f&&(f.removeEventListener("mousedown",w),f.removeEventListener("touchstart",_))}},[t,e]),active:l}}function Ai({value:e,defaultValue:n,finalValue:t,onChange:i=()=>{}}){const[r,a]=x.useState(n!==void 0?n:t),o=(l,...u)=>{a(l),i==null||i(l,...u)};return e!==void 0?[e,i,!0]:[r,o,!1]}function eC(e,n){return uX("(prefers-reduced-motion: reduce)",e,n)}function Vz(e=!1,n={}){const[t,i]=x.useState(e),r=x.useCallback(()=>{i(o=>{var l;return o||((l=n.onOpen)==null||l.call(n),!0)})},[n.onOpen]),a=x.useCallback(()=>{i(o=>{var l;return o&&((l=n.onClose)==null||l.call(n),!1)})},[n.onClose]);return[t,{open:r,close:a,toggle:x.useCallback(()=>{t?a():r()},[a,r,t]),set:i}]}function bX(e){const n=x.useRef(void 0);return x.useEffect(()=>{n.current=e},[e]),n.current}var bk={exports:{}},Yi={};/** + */var zT;function QK(){if(zT)return Nn;zT=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"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),p=Symbol.iterator;function g(W){return W===null||typeof W!="object"?null:(W=p&&W[p]||W["@@iterator"],typeof W=="function"?W:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,k={};function _(W,V,I){this.props=W,this.context=V,this.refs=k,this.updater=I||b}_.prototype.isReactComponent={},_.prototype.setState=function(W,V){if(typeof W!="object"&&typeof W!="function"&&W!=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,W,V,"setState")},_.prototype.forceUpdate=function(W){this.updater.enqueueForceUpdate(this,W,"forceUpdate")};function S(){}S.prototype=_.prototype;function j(W,V,I){this.props=W,this.context=V,this.refs=k,this.updater=I||b}var T=j.prototype=new S;T.constructor=j,w(T,_.prototype),T.isPureReactComponent=!0;var A=Array.isArray;function O(){}var M={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function q(W,V,I){var Q=I.ref;return{$$typeof:e,type:W,key:V,ref:Q!==void 0?Q:null,props:I}}function P(W,V){return q(W.type,V,W.props)}function L(W){return typeof W=="object"&&W!==null&&W.$$typeof===e}function U(W){var V={"=":"=0",":":"=2"};return"$"+W.replace(/[=:]/g,function(I){return V[I]})}var G=/\/+/g;function B(W,V){return typeof W=="object"&&W!==null&&W.key!=null?U(""+W.key):V.toString(36)}function R(W){switch(W.status){case"fulfilled":return W.value;case"rejected":throw W.reason;default:switch(typeof W.status=="string"?W.then(O,O):(W.status="pending",W.then(function(V){W.status==="pending"&&(W.status="fulfilled",W.value=V)},function(V){W.status==="pending"&&(W.status="rejected",W.reason=V)})),W.status){case"fulfilled":return W.value;case"rejected":throw W.reason}}throw W}function D(W,V,I,Q,ie){var re=typeof W;(re==="undefined"||re==="boolean")&&(W=null);var Z=!1;if(W===null)Z=!0;else switch(re){case"bigint":case"string":case"number":Z=!0;break;case"object":switch(W.$$typeof){case e:case n:Z=!0;break;case h:return Z=W._init,D(Z(W._payload),V,I,Q,ie)}}if(Z)return ie=ie(W),Z=Q===""?"."+B(W,0):Q,A(ie)?(I="",Z!=null&&(I=Z.replace(G,"$&/")+"/"),D(ie,V,I,"",function(se){return se})):ie!=null&&(L(ie)&&(ie=P(ie,I+(ie.key==null||W&&W.key===ie.key?"":(""+ie.key).replace(G,"$&/")+"/")+Z)),V.push(ie)),1;Z=0;var le=Q===""?".":Q+":";if(A(W))for(var ee=0;ee{const i=x.use(n);if(i===null)throw new Error(e);return i}]}function IT(e,n){return t=>{if(typeof t!="string"||t.trim().length===0)throw new Error(n);return`${e}-${t}`}}function Wg(e,n){let t=e;for(;(t=t.parentElement)&&!t.matches(n););return t}function JK(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 eX(e,n,t){for(let i=e+1;i{var b;t==null||t(l);const u=Array.from(((b=Wg(l.currentTarget,e))==null?void 0:b.querySelectorAll(n))||[]).filter(w=>nX(l.currentTarget,w,e)),f=u.findIndex(w=>l.currentTarget===w),h=eX(f,u,i),d=JK(f,u,i),p=a==="rtl"?d:h,g=a==="rtl"?h:d;switch(l.key){case"ArrowRight":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),u[p].focus(),r&&u[p].click());break;case"ArrowLeft":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),u[g].focus(),r&&u[g].click());break;case"ArrowUp":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),u[d].focus(),r&&u[d].click());break;case"ArrowDown":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),u[h].focus(),r&&u[h].click());break;case"Home":l.stopPropagation(),l.preventDefault(),!u[0].disabled&&u[0].focus();break;case"End":{l.stopPropagation(),l.preventDefault();const w=u.length-1;!u[w].disabled&&u[w].focus();break}}}}const tX={app:100,modal:200,popover:300,overlay:400,max:9999};function xa(e){return tX[e]}const jS=()=>{};function iX(e,n={active:!0}){return typeof e!="function"||!n.active?n.onKeyDown||jS:t=>{var i;t.key==="Escape"&&(e(t),(i=n.onTrigger)==null||i.call(n))}}function Ln(e,n="size",t=!0){if(e!==void 0)return zz(e)?t?ve(e):e:`var(--${n}-${e})`}function Yt(e){return Ln(e,"mantine-spacing")}function qt(e){return e===void 0?"var(--mantine-radius-default)":Ln(e,"mantine-radius")}function ai(e){return Ln(e,"mantine-font-size")}function rX(e){return Ln(e,"mantine-line-height",!1)}function Q6(e){if(e)return Ln(e,"mantine-shadow",!1)}function bi(e,n){return t=>{e==null||e(t),n==null||n(t)}}function J6(e,n){return e in n?lm(n[e]):lm(e)}function um(e,n){const t=e.map(i=>({value:i,px:J6(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 aX(e,n,t){var i;return t?Array.from(((i=Wg(t,n))==null?void 0:i.querySelectorAll(e))||[]).findIndex(r=>r===t):null}function Jo(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 ml(e="mantine-"){return`${e}${Math.random().toString(36).slice(2,11)}`}function zh(e){const n=x.useRef(e);return x.useEffect(()=>{n.current=e}),x.useMemo(()=>((...t)=>{var i;return(i=n.current)==null?void 0:i.call(n,...t)}),[])}function _y(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=zh(e),l=x.useRef(0),u=x.useRef(0),f=x.useRef(null),h=x.useMemo(()=>{const d=Object.assign((...p)=>{window.clearTimeout(l.current),f.current=p;const g=d._isFirstCall;d._isFirstCall=!1;function b(){window.clearTimeout(l.current),window.clearTimeout(u.current),l.current=0,u.current=0,d._isFirstCall=!0,d._hasPendingCallback=!1}function w(){a!==void 0&&u.current===0&&(u.current=window.setTimeout(()=>{if(l.current!==0){const S=f.current;b(),o(...S)}},a))}if(r&&g){o(...p);const S=()=>{b()},j=()=>{l.current!==0&&(b(),o(...p))},T=()=>{b()};d.flush=j,d.cancel=T,l.current=window.setTimeout(S,t),w();return}if(r&&!g){d._hasPendingCallback=!0;const S=()=>{l.current!==0&&(b(),o(...p))},j=()=>{b()};d.flush=S,d.cancel=j;const T=()=>{b()};l.current=window.setTimeout(T,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 x.useEffect(()=>()=>{i?h.flush():h.cancel()},[h,i]),h}const oX=["mousedown","touchstart"];function sX(e,n,t,i=!0){const r=x.useRef(null),a=n||oX,o=x.useEffectEvent(u=>{const{target:f}=u??{};if(!document.body.contains(f)&&(f==null?void 0:f.tagName)!=="HTML")return;const h=u.composedPath();Array.isArray(t)?t.every(d=>!!d&&!h.includes(d))&&e(u):r.current&&!h.includes(r.current)&&e(u)}),l=a.join(",");return x.useEffect(()=>{if(!i)return;const u=l.split(",");return u.forEach(f=>document.addEventListener(f,o)),()=>{u.forEach(f=>document.removeEventListener(f,o))}},[l,i]),r}function lX(e={}){const n=e.timeout??2e3,[t,i]=x.useState(null),[r,a]=x.useState(!1),o=x.useRef(null);x.useEffect(()=>()=>{window.clearTimeout(o.current)},[]);const l=h=>{window.clearTimeout(o.current),o.current=window.setTimeout(()=>a(!1),n),a(h)};return{copy:h=>{"clipboard"in navigator?navigator.clipboard.writeText(h).then(()=>{i(null),l(!0)}).catch(d=>i(d)):i(new Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{a(!1),i(null),window.clearTimeout(o.current)},error:t,copied:r}}function uX(e,n){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function cX(e,n,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){const[i,r]=x.useState(t?n:uX(e));return x.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 ps=typeof document<"u"?x.useLayoutEffect:x.useEffect;function os(e,n){const t=x.useRef(!1);x.useEffect(()=>()=>{t.current=!1},[]),x.useEffect(()=>{if(t.current)return e();t.current=!0},n)}function Iz({opened:e,shouldReturnFocus:n=!0}){const t=x.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 os(()=>{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 fX=/input|select|textarea|button|object/,Bz="a, input, select, textarea, button, object, [tabindex]";function dX(e){return e.style.display==="none"}function hX(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(dX(n))return!1;n=n.parentNode}return!0}function Fz(e){let n=e.getAttribute("tabindex");return n===null&&(n=void 0),parseInt(n,10)}function AS(e){const n=e.nodeName.toLowerCase(),t=!Number.isNaN(Fz(e));return(fX.test(n)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||t)&&hX(e)}function qz(e){const n=Fz(e);return(Number.isNaN(n)||n>=0)&&AS(e)}function mX(e){return Array.from(e.querySelectorAll(Bz)).filter(qz)}function pX(e,n){const t=mX(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(u=>u.getAttribute("type")==="radio"&&u.getAttribute("name")===o.getAttribute("name")).includes(i)),!a)return;n.preventDefault();const l=t[n.shiftKey?t.length-1:0];l&&l.focus()}function vX(e=!0){const n=x.useRef(null),t=r=>{let a=r.querySelector("[data-autofocus]");if(!a){const o=Array.from(r.querySelectorAll(Bz));a=o.find(qz)||o.find(AS)||null,!a&&AS(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=x.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 x.useEffect(()=>{if(!e)return;n.current&&setTimeout(()=>{n.current&&t(n.current)});const r=a=>{a.key==="Tab"&&n.current&&pX(n.current,a)};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),i}const gX=e=>(e+1)%1e6;function yX(){const[,e]=x.useReducer(gX,0);return e}function Pi(e){const[n,t]=x.useState(`mantine-${x.useId().replace(/:/g,"")}`);return ps(()=>{t(ml())},[]),typeof e=="string"?e:n}function Hz(e,n,t){const i=x.useEffectEvent(n);x.useEffect(()=>(window.addEventListener(e,i,t),()=>window.removeEventListener(e,i,t)),[e])}function cm(e,n){if(typeof e=="function")return e(n);typeof e=="object"&&e!==null&&"current"in e&&(e.current=n)}function bX(...e){const n=new Map;return t=>{if(e.forEach(i=>{const r=cm(i,t);r&&n.set(i,r)}),n.size>0)return()=>{e.forEach(i=>{const r=n.get(i);r&&typeof r=="function"?r():cm(i,null)}),n.clear()}}}function Ht(...e){return x.useCallback(bX(...e),e)}function Uz(e){return{x:Jo(e.x,0,1),y:Jo(e.y,0,1)}}function Vz(e,n,t="ltr"){const i=x.useRef(!1),r=x.useRef(!1),a=x.useRef(0),o=x.useRef(null),[l,u]=x.useState(!1);return x.useEffect(()=>(i.current=!0,()=>{var f;(f=o.current)==null||f.call(o)}),[]),{ref:x.useCallback(f=>{const h=({x:j,y:T})=>{cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{if(i.current&&f){f.style.userSelect="none";const A=f.getBoundingClientRect();if(A.width&&A.height){const O=Jo((j-A.left)/A.width,0,1);e({x:t==="ltr"?O:1-O,y:Jo((T-A.top)/A.height,0,1)})}}})},d=()=>{document.addEventListener("mousemove",k),document.addEventListener("mouseup",b),document.addEventListener("touchmove",S,{passive:!1}),document.addEventListener("touchend",b)},p=()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",b),document.removeEventListener("touchmove",S),document.removeEventListener("touchend",b)},g=()=>{!r.current&&i.current&&(r.current=!0,typeof(n==null?void 0:n.onScrubStart)=="function"&&n.onScrubStart(),u(!0),d())},b=()=>{r.current&&i.current&&(r.current=!1,u(!1),p(),setTimeout(()=>{typeof(n==null?void 0:n.onScrubEnd)=="function"&&n.onScrubEnd()},0))},w=j=>{g(),j.preventDefault(),k(j)},k=j=>h({x:j.clientX,y:j.clientY}),_=j=>{j.cancelable&&j.preventDefault(),g(),S(j)},S=j=>{j.cancelable&&j.preventDefault(),h({x:j.changedTouches[0].clientX,y:j.changedTouches[0].clientY})};return f==null||f.addEventListener("mousedown",w),f==null||f.addEventListener("touchstart",_,{passive:!1}),o.current=()=>{p(),cancelAnimationFrame(a.current)},()=>{f&&(f.removeEventListener("mousedown",w),f.removeEventListener("touchstart",_))}},[t,e]),active:l}}function Ai({value:e,defaultValue:n,finalValue:t,onChange:i=()=>{}}){const[r,a]=x.useState(n!==void 0?n:t),o=(l,...u)=>{a(l),i==null||i(l,...u)};return e!==void 0?[e,i,!0]:[r,o,!1]}function eC(e,n){return cX("(prefers-reduced-motion: reduce)",e,n)}function Wz(e=!1,n={}){const[t,i]=x.useState(e),r=x.useCallback(()=>{i(o=>{var l;return o||((l=n.onOpen)==null||l.call(n),!0)})},[n.onOpen]),a=x.useCallback(()=>{i(o=>{var l;return o&&((l=n.onClose)==null||l.call(n),!1)})},[n.onClose]);return[t,{open:r,close:a,toggle:x.useCallback(()=>{t?a():r()},[a,r,t]),set:i}]}function wX(e){const n=x.useRef(void 0);return x.useEffect(()=>{n.current=e},[e]),n.current}var bk={exports:{}},Yi={};/** * @license React * react-dom.production.js * @@ -22,12 +22,12 @@ function WK(e,n){for(var 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(),bk.exports=wX(),bk.exports}var sl=Wz();const Lh=yt(sl);function kX(e,n){window.dispatchEvent(new CustomEvent(e,{detail:n}))}function _X(e){function n(i){const r=Object.keys(i).reduce((a,o)=>(a[`${e}:${o}`]=l=>i[o](l.detail),a),{});ps(()=>(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)=>kX(`${e}:${String(i)}`,r[0])}return[n,t]}var xX={};function SX(){return"development"}function xy(e){var t;const n=J.version;return typeof J.version!="string"||n.startsWith("18.")?e==null?void 0:e.ref:(t=e==null?void 0:e.props)==null?void 0:t.ref}function Eg(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]=vn(n[i],r):n[i]=r})}),n}function fm({theme:e,classNames:n,props:t,stylesCtx:i}){return jX((Array.isArray(n)?n:[n]).map(r=>typeof r=="function"?r(e,t,i):r||CX))}function Gg({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 qT(e){return e==="auto"||e==="dark"||e==="light"}function AX({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 qT(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&&qT(i.newValue)&&t(i.newValue)},window.addEventListener("storage",n)},unsubscribe:()=>{window.removeEventListener("storage",n)},clear:()=>{window.localStorage.removeItem(e)}}}function dm(e,n){return typeof e.primaryShade=="number"?e.primaryShade:n==="dark"?e.primaryShade.dark:e.primaryShade.light}function OX(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function TX(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 EX(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 MX(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,u=o*(1-Math.abs(l%2-1)),f=r-o/2;let h,d,p;return l>=0&&l<1?(h=o,d=u,p=0):l>=1&&l<2?(h=u,d=o,p=0):l>=2&&l<3?(h=0,d=o,p=u):l>=3&&l<4?(h=0,d=u,p=o):l>=4&&l<5?(h=u,d=0,p=o):(h=o,d=0,p=u),{r:Math.round((h+f)*255),g:Math.round((d+f)*255),b:Math.round((p+f)*255),a:a||1}}function nC(e){return OX(e)?TX(e):e.startsWith("rgb")?EX(e):e.startsWith("hsl")?MX(e):{r:0,g:0,b:0,a:1}}function wk(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function DX(e){const n=e.match(/oklch\((.*?)%\s/);return n?parseFloat(n[1]):null}function Yz(e){if(e.startsWith("oklch("))return(DX(e)||0)/100;const{r:n,g:t,b:i}=nC(e),r=n/255,a=t/255,o=i/255,l=wk(r),u=wk(a),f=wk(o);return .2126*l+.7152*u+.0722*f}function yh(e,n=.179){return e.startsWith("var(")?!1:Yz(e)>n}function vs({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:yh(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:yh(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:yh(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][dm(n,t||"light")];return{color:i,value:l,shade:a,isThemeColor:o,isLight:yh(l,n.luminanceThreshold),variable:r?`--mantine-color-${i}-${a}`:`--mantine-color-${i}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:yh(e,n.luminanceThreshold),shade:a,variable:void 0}}function ft(e,n){const t=vs({color:e||n.primaryColor,theme:n});return t.variable?`var(${t.variable})`:e}function vu(e,n){if(e.startsWith("var("))return`color-mix(in srgb, ${e}, black ${n*100}%)`;const{r:t,g:i,b:r,a}=nC(e),o=1-n,l=u=>Math.round(u*o);return`rgba(${l(t)}, ${l(i)}, ${l(r)}, ${a})`}function OS(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=ft(t.from,n),r=ft(t.to,n);return`linear-gradient(${t.deg}deg, ${i} 0%, ${r} 100%)`}function nl(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}=nC(e);return`rgba(${t}, ${i}, ${r}, ${n})`}const HT=nl,RX=({color:e,theme:n,variant:t,gradient:i,autoContrast:r})=>{const a=vs({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:`${ve(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:`${ve(1)} solid transparent`}:{background:e,hover:vu(e,.1),color:l,border:`${ve(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:`${ve(1)} solid transparent`};const l=n.colors[a.color][a.shade];return{background:l,hover:vu(l,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${ve(1)} solid transparent`}}return{background:nl(e,.1),hover:nl(e,.12),color:e,border:`${ve(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:`${ve(1)} solid var(--mantine-color-${e}-outline)`}:{background:"transparent",hover:nl(n.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${ve(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:"transparent",hover:nl(e,.05),color:e,border:`${ve(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:`${ve(1)} solid transparent`};const l=n.colors[a.color][a.shade];return{background:"transparent",hover:nl(l,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${ve(1)} solid transparent`}}return{background:"transparent",hover:nl(e,.12),color:e,border:`${ve(1)} solid transparent`}}return t==="transparent"?a.isThemeColor?a.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${e}-light-color)`,border:`${ve(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${ve(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:e,border:`${ve(1)} solid transparent`}:t==="white"?a.isThemeColor?a.shade===void 0?{background:"var(--mantine-color-white)",hover:vu(n.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${ve(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:vu(n.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${ve(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:vu(n.white,.01),color:e,border:`${ve(1)} solid transparent`}:t==="gradient"?{background:OS(i,n),hover:OS(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:`${ve(1)} solid var(--mantine-color-default-border)`}:{}};function If({color:e,theme:n,autoContrast:t}){return(typeof t=="boolean"?t:n.autoContrast)&&vs({color:e||n.primaryColor,theme:n}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function UT(e,n){return If({color:e.colors[e.primaryColor][dm(e,n)],theme:e,autoContrast:null})}function ap(e,n){return typeof e=="boolean"?e:n.autoContrast}const Kz=x.createContext(null);function wo(){const e=x.use(Kz);if(!e)throw new Error("[@mantine/core] MantineProvider was not found in tree");return e}function PX(){return wo().cssVariablesResolver}function NX(){return wo().classNamesPrefix}function tC(){return wo().getStyleNonce}function $X(){return wo().withStaticClasses}function zX(){return wo().headless}function LX(){var e;return(e=wo().stylesTransform)==null?void 0:e.sx}function IX(){var e;return(e=wo().stylesTransform)==null?void 0:e.styles}function op(){return wo().env||"default"}function BX(){return wo().deduplicateInlineStyles}function Mc(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 FX({manager:e,defaultColorScheme:n,getRootElement:t,forceColorScheme:i}){const r=x.useRef(null),[a,o]=x.useState(()=>e.get(n)),l=i||a,u=x.useCallback(h=>{i||(Mc(h,t),o(h),e.set(h))},[e.set,l,i]),f=x.useCallback(()=>{o(n),Mc(n,t),e.clear()},[e.clear,n]);return x.useEffect(()=>(e.subscribe(u),e.unsubscribe),[e.subscribe,e.unsubscribe]),ps(()=>{Mc(e.get(n),t)},[]),x.useEffect(()=>{var d;if(i)return Mc(i,t),()=>{};i===void 0&&Mc(a,t),typeof window<"u"&&"matchMedia"in window&&(r.current=window.matchMedia("(prefers-color-scheme: dark)"));const h=p=>{a==="auto"&&Mc(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:u,clearColorScheme:f}}const qX={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"]},VT="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",iC={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:qX,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:RX,autoContrast:!1,luminanceThreshold:.3,fontFamily:VT,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:VT,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:ve(34),lineHeight:"1.3"},h2:{fontSize:ve(26),lineHeight:"1.35"},h3:{fontSize:ve(22),lineHeight:"1.4"},h4:{fontSize:ve(18),lineHeight:"1.45"},h5:{fontSize:ve(16),lineHeight:"1.5"},h6:{fontSize:ve(14),lineHeight:"1.5"}}},fontSizes:{xs:ve(12),sm:ve(14),md:ve(16),lg:ve(18),xl:ve(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:ve(2),sm:ve(4),md:ve(8),lg:ve(16),xl:ve(32)},spacing:{xs:ve(10),sm:ve(12),md:ve(16),lg:ve(20),xl:ve(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${ve(1)} ${ve(3)} rgba(0, 0, 0, 0.05), 0 ${ve(1)} ${ve(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${ve(1)} ${ve(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${ve(10)} ${ve(15)} ${ve(-5)}, rgba(0, 0, 0, 0.04) 0 ${ve(7)} ${ve(7)} ${ve(-5)}`,md:`0 ${ve(1)} ${ve(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${ve(20)} ${ve(25)} ${ve(-5)}, rgba(0, 0, 0, 0.04) 0 ${ve(10)} ${ve(10)} ${ve(-5)}`,lg:`0 ${ve(1)} ${ve(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${ve(28)} ${ve(23)} ${ve(-7)}, rgba(0, 0, 0, 0.04) 0 ${ve(12)} ${ve(12)} ${ve(-7)}`,xl:`0 ${ve(1)} ${ve(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${ve(36)} ${ve(28)} ${ve(-7)}, rgba(0, 0, 0, 0.04) 0 ${ve(17)} ${ve(17)} ${ve(-7)}`},other:{},components:{}},HX="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",WT="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function kk(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function GT(e){if(!(e.primaryColor in e.colors))throw new Error(HX);if(typeof e.primaryShade=="object"&&(!kk(e.primaryShade.dark)||!kk(e.primaryShade.light)))throw new Error(WT);if(typeof e.primaryShade=="number"&&!kk(e.primaryShade))throw new Error(WT)}function UX(e,n){var i;if(!n)return GT(e),e;const t=Y6(e,n);return n.fontFamily&&!((i=n.headings)!=null&&i.fontFamily)&&(t.headings.fontFamily=n.fontFamily),GT(t),t}const rC=x.createContext(null),VX=()=>x.use(rC)||iC;function ci(){const e=x.use(rC);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 Xz({theme:e,children:n,inherit:t=!0}){const i=VX();return v.jsx(rC,{value:x.useMemo(()=>UX(t?i:iC,e),[e,i,t]),children:n})}Xz.displayName="@mantine/core/MantineThemeProvider";function _k(e){return Object.entries(e).map(([n,t])=>`${n}: ${t};`).join("")}function Zz(e,n){const t=n?[n]:[":root",":host"],i=_k(e.variables),r=i?`${t.join(", ")}{${i}}`:"",a=_k(e.dark),o=_k(e.light),l=u=>t.map(f=>f===":host"?`${f}([data-mantine-color-scheme="${u}"])`:`${f}[data-mantine-color-scheme="${u}"]`).join(", ");return`${r} + */var BT;function kX(){if(BT)return Yi;BT=1;var e=K6();function n(u){var f="https://react.dev/errors/"+u;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),bk.exports=kX(),bk.exports}var sl=Gz();const Lh=yt(sl);function _X(e,n){window.dispatchEvent(new CustomEvent(e,{detail:n}))}function xX(e){function n(i){const r=Object.keys(i).reduce((a,o)=>(a[`${e}:${o}`]=l=>i[o](l.detail),a),{});ps(()=>(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)=>_X(`${e}:${String(i)}`,r[0])}return[n,t]}var SX={};function CX(){return"development"}function xy(e){var t;const n=J.version;return typeof J.version!="string"||n.startsWith("18.")?e==null?void 0:e.ref:(t=e==null?void 0:e.props)==null?void 0:t.ref}function Eg(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]=vn(n[i],r):n[i]=r})}),n}function fm({theme:e,classNames:n,props:t,stylesCtx:i}){return AX((Array.isArray(n)?n:[n]).map(r=>typeof r=="function"?r(e,t,i):r||jX))}function Gg({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 qT(e){return e==="auto"||e==="dark"||e==="light"}function OX({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 qT(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&&qT(i.newValue)&&t(i.newValue)},window.addEventListener("storage",n)},unsubscribe:()=>{window.removeEventListener("storage",n)},clear:()=>{window.localStorage.removeItem(e)}}}function dm(e,n){return typeof e.primaryShade=="number"?e.primaryShade:n==="dark"?e.primaryShade.dark:e.primaryShade.light}function TX(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function EX(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 MX(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 DX(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,u=o*(1-Math.abs(l%2-1)),f=r-o/2;let h,d,p;return l>=0&&l<1?(h=o,d=u,p=0):l>=1&&l<2?(h=u,d=o,p=0):l>=2&&l<3?(h=0,d=o,p=u):l>=3&&l<4?(h=0,d=u,p=o):l>=4&&l<5?(h=u,d=0,p=o):(h=o,d=0,p=u),{r:Math.round((h+f)*255),g:Math.round((d+f)*255),b:Math.round((p+f)*255),a:a||1}}function nC(e){return TX(e)?EX(e):e.startsWith("rgb")?MX(e):e.startsWith("hsl")?DX(e):{r:0,g:0,b:0,a:1}}function wk(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function RX(e){const n=e.match(/oklch\((.*?)%\s/);return n?parseFloat(n[1]):null}function Kz(e){if(e.startsWith("oklch("))return(RX(e)||0)/100;const{r:n,g:t,b:i}=nC(e),r=n/255,a=t/255,o=i/255,l=wk(r),u=wk(a),f=wk(o);return .2126*l+.7152*u+.0722*f}function yh(e,n=.179){return e.startsWith("var(")?!1:Kz(e)>n}function vs({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:yh(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:yh(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:yh(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][dm(n,t||"light")];return{color:i,value:l,shade:a,isThemeColor:o,isLight:yh(l,n.luminanceThreshold),variable:r?`--mantine-color-${i}-${a}`:`--mantine-color-${i}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:yh(e,n.luminanceThreshold),shade:a,variable:void 0}}function ft(e,n){const t=vs({color:e||n.primaryColor,theme:n});return t.variable?`var(${t.variable})`:e}function vu(e,n){if(e.startsWith("var("))return`color-mix(in srgb, ${e}, black ${n*100}%)`;const{r:t,g:i,b:r,a}=nC(e),o=1-n,l=u=>Math.round(u*o);return`rgba(${l(t)}, ${l(i)}, ${l(r)}, ${a})`}function OS(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=ft(t.from,n),r=ft(t.to,n);return`linear-gradient(${t.deg}deg, ${i} 0%, ${r} 100%)`}function nl(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}=nC(e);return`rgba(${t}, ${i}, ${r}, ${n})`}const HT=nl,PX=({color:e,theme:n,variant:t,gradient:i,autoContrast:r})=>{const a=vs({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:`${ve(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:`${ve(1)} solid transparent`}:{background:e,hover:vu(e,.1),color:l,border:`${ve(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:`${ve(1)} solid transparent`};const l=n.colors[a.color][a.shade];return{background:l,hover:vu(l,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${ve(1)} solid transparent`}}return{background:nl(e,.1),hover:nl(e,.12),color:e,border:`${ve(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:`${ve(1)} solid var(--mantine-color-${e}-outline)`}:{background:"transparent",hover:nl(n.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${ve(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:"transparent",hover:nl(e,.05),color:e,border:`${ve(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:`${ve(1)} solid transparent`};const l=n.colors[a.color][a.shade];return{background:"transparent",hover:nl(l,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${ve(1)} solid transparent`}}return{background:"transparent",hover:nl(e,.12),color:e,border:`${ve(1)} solid transparent`}}return t==="transparent"?a.isThemeColor?a.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${e}-light-color)`,border:`${ve(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${ve(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:e,border:`${ve(1)} solid transparent`}:t==="white"?a.isThemeColor?a.shade===void 0?{background:"var(--mantine-color-white)",hover:vu(n.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${ve(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:vu(n.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${ve(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:vu(n.white,.01),color:e,border:`${ve(1)} solid transparent`}:t==="gradient"?{background:OS(i,n),hover:OS(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:`${ve(1)} solid var(--mantine-color-default-border)`}:{}};function If({color:e,theme:n,autoContrast:t}){return(typeof t=="boolean"?t:n.autoContrast)&&vs({color:e||n.primaryColor,theme:n}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function UT(e,n){return If({color:e.colors[e.primaryColor][dm(e,n)],theme:e,autoContrast:null})}function ap(e,n){return typeof e=="boolean"?e:n.autoContrast}const Xz=x.createContext(null);function wo(){const e=x.use(Xz);if(!e)throw new Error("[@mantine/core] MantineProvider was not found in tree");return e}function NX(){return wo().cssVariablesResolver}function $X(){return wo().classNamesPrefix}function tC(){return wo().getStyleNonce}function zX(){return wo().withStaticClasses}function LX(){return wo().headless}function IX(){var e;return(e=wo().stylesTransform)==null?void 0:e.sx}function BX(){var e;return(e=wo().stylesTransform)==null?void 0:e.styles}function op(){return wo().env||"default"}function FX(){return wo().deduplicateInlineStyles}function Mc(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 qX({manager:e,defaultColorScheme:n,getRootElement:t,forceColorScheme:i}){const r=x.useRef(null),[a,o]=x.useState(()=>e.get(n)),l=i||a,u=x.useCallback(h=>{i||(Mc(h,t),o(h),e.set(h))},[e.set,l,i]),f=x.useCallback(()=>{o(n),Mc(n,t),e.clear()},[e.clear,n]);return x.useEffect(()=>(e.subscribe(u),e.unsubscribe),[e.subscribe,e.unsubscribe]),ps(()=>{Mc(e.get(n),t)},[]),x.useEffect(()=>{var d;if(i)return Mc(i,t),()=>{};i===void 0&&Mc(a,t),typeof window<"u"&&"matchMedia"in window&&(r.current=window.matchMedia("(prefers-color-scheme: dark)"));const h=p=>{a==="auto"&&Mc(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:u,clearColorScheme:f}}const HX={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"]},VT="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",iC={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:HX,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:PX,autoContrast:!1,luminanceThreshold:.3,fontFamily:VT,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:VT,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:ve(34),lineHeight:"1.3"},h2:{fontSize:ve(26),lineHeight:"1.35"},h3:{fontSize:ve(22),lineHeight:"1.4"},h4:{fontSize:ve(18),lineHeight:"1.45"},h5:{fontSize:ve(16),lineHeight:"1.5"},h6:{fontSize:ve(14),lineHeight:"1.5"}}},fontSizes:{xs:ve(12),sm:ve(14),md:ve(16),lg:ve(18),xl:ve(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:ve(2),sm:ve(4),md:ve(8),lg:ve(16),xl:ve(32)},spacing:{xs:ve(10),sm:ve(12),md:ve(16),lg:ve(20),xl:ve(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${ve(1)} ${ve(3)} rgba(0, 0, 0, 0.05), 0 ${ve(1)} ${ve(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${ve(1)} ${ve(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${ve(10)} ${ve(15)} ${ve(-5)}, rgba(0, 0, 0, 0.04) 0 ${ve(7)} ${ve(7)} ${ve(-5)}`,md:`0 ${ve(1)} ${ve(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${ve(20)} ${ve(25)} ${ve(-5)}, rgba(0, 0, 0, 0.04) 0 ${ve(10)} ${ve(10)} ${ve(-5)}`,lg:`0 ${ve(1)} ${ve(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${ve(28)} ${ve(23)} ${ve(-7)}, rgba(0, 0, 0, 0.04) 0 ${ve(12)} ${ve(12)} ${ve(-7)}`,xl:`0 ${ve(1)} ${ve(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${ve(36)} ${ve(28)} ${ve(-7)}, rgba(0, 0, 0, 0.04) 0 ${ve(17)} ${ve(17)} ${ve(-7)}`},other:{},components:{}},UX="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",WT="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function kk(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function GT(e){if(!(e.primaryColor in e.colors))throw new Error(UX);if(typeof e.primaryShade=="object"&&(!kk(e.primaryShade.dark)||!kk(e.primaryShade.light)))throw new Error(WT);if(typeof e.primaryShade=="number"&&!kk(e.primaryShade))throw new Error(WT)}function VX(e,n){var i;if(!n)return GT(e),e;const t=Y6(e,n);return n.fontFamily&&!((i=n.headings)!=null&&i.fontFamily)&&(t.headings.fontFamily=n.fontFamily),GT(t),t}const rC=x.createContext(null),WX=()=>x.use(rC)||iC;function ci(){const e=x.use(rC);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 Zz({theme:e,children:n,inherit:t=!0}){const i=WX();return v.jsx(rC,{value:x.useMemo(()=>VX(t?i:iC,e),[e,i,t]),children:n})}Zz.displayName="@mantine/core/MantineThemeProvider";function _k(e){return Object.entries(e).map(([n,t])=>`${n}: ${t};`).join("")}function Qz(e,n){const t=n?[n]:[":root",":host"],i=_k(e.variables),r=i?`${t.join(", ")}{${i}}`:"",a=_k(e.dark),o=_k(e.light),l=u=>t.map(f=>f===":host"?`${f}([data-mantine-color-scheme="${u}"])`:`${f}[data-mantine-color-scheme="${u}"]`).join(", ");return`${r} ${a?`${l("dark")}{${a}}`:""} -${o?`${l("light")}{${o}}`:""}`}function Zv({theme:e,color:n,colorScheme:t,name:i=n,withColorValues:r=!0}){if(!e.colors[n])return{};if(t==="light"){const l=dm(e,"light"),u={[`--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`]:HT(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],...u}:u}const a=dm(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`]:vu(e.colors[n][9],.5),[`--mantine-color-${i}-light-hover`]:vu(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`]:HT(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 WX(e){return!!e&&typeof e=="object"&&"mantine-virtual-color"in e}function su(e,n,t){$t(n).forEach(i=>Object.assign(e,{[`--mantine-${t}-${i}`]:n[i]}))}const Qz=e=>{const n=dm(e,"light"),t=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:ve(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":UT(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":UT(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)"}};su(i.variables,e.breakpoints,"breakpoint"),su(i.variables,e.spacing,"spacing"),su(i.variables,e.fontSizes,"font-size"),su(i.variables,e.lineHeights,"line-height"),su(i.variables,e.shadows,"shadow"),su(i.variables,e.radius,"radius"),su(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})`}),$t(e.colors).forEach(a=>{const o=e.colors[a];if(WX(o)){Object.assign(i.light,Zv({theme:e,name:o.name,color:o.light,colorScheme:"light",withColorValues:!0})),Object.assign(i.dark,Zv({theme:e,name:o.name,color:o.dark,colorScheme:"dark",withColorValues:!0}));return}o.forEach((l,u)=>{i.variables[`--mantine-color-${a}-${u}`]=l}),Object.assign(i.light,Zv({theme:e,color:a,colorScheme:"light",withColorValues:!1})),Object.assign(i.dark,Zv({theme:e,color:a,colorScheme:"dark",withColorValues:!1}))});const r=e.headings.sizes;return $t(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 GX(){const e=ci(),n=tC(),t=$t(e.breakpoints).reduce((i,r)=>{const a=e.breakpoints[r].includes("px"),o=lm(e.breakpoints[r]);return`${i}@media (max-width: ${a?`${o-.1}px`:Vg(o-.1)}) {.mantine-visible-from-${r} {display: none !important;}}@media (min-width: ${a?`${o}px`:Vg(o)}) {.mantine-hidden-from-${r} {display: none !important;}}`},"");return v.jsx("style",{"data-mantine-styles":"classes",nonce:n==null?void 0:n(),dangerouslySetInnerHTML:{__html:t}})}function YX({theme:e,generator:n}){const t=Qz(e),i=n==null?void 0:n(e);return i?Y6(t,i):t}const xk=Qz(iC);function KX(e){const n={variables:{},light:{},dark:{}};return $t(e.variables).forEach(t=>{xk.variables[t]!==e.variables[t]&&(n.variables[t]=e.variables[t])}),$t(e.light).forEach(t=>{xk.light[t]!==e.light[t]&&(n.light[t]=e.light[t])}),$t(e.dark).forEach(t=>{xk.dark[t]!==e.dark[t]&&(n.dark[t]=e.dark[t])}),n}function XX(e){return Zz({variables:{},dark:{"--mantine-color-scheme":"dark"},light:{"--mantine-color-scheme":"light"}},e)}function Jz({cssVariablesSelector:e,deduplicateCssVariables:n}){const t=ci(),i=tC(),r=YX({theme:t,generator:PX()}),a=(e===void 0||e===":root"||e===":host")&&n,o=Zz(a?KX(r):r,e);return o?v.jsx("style",{"data-mantine-styles":!0,nonce:i==null?void 0:i(),dangerouslySetInnerHTML:{__html:`${o}${a?"":XX(e)}`}}):null}Jz.displayName="@mantine/CssVariables";function ZX({respectReducedMotion:e,getRootElement:n}){ps(()=>{var t;e&&((t=n())==null||t.setAttribute("data-respect-reduced-motion","true"))},[e])}function eL({theme:e,children:n,getStyleNonce:t,withStaticClasses:i=!0,withGlobalClasses:r=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:l,classNamesPrefix:u="mantine",colorSchemeManager:f=AX(),defaultColorScheme:h="light",getRootElement:d=()=>document.documentElement,cssVariablesResolver:p,forceColorScheme:g,stylesTransform:b,env:w,deduplicateInlineStyles:k=!1}){const{colorScheme:_,setColorScheme:S,clearColorScheme:j}=FX({defaultColorScheme:h,forceColorScheme:g,manager:f,getRootElement:d});return ZX({respectReducedMotion:(e==null?void 0:e.respectReducedMotion)||!1,getRootElement:d}),v.jsx(Kz,{value:{colorScheme:_,setColorScheme:S,clearColorScheme:j,getRootElement:d,classNamesPrefix:u,getStyleNonce:t,cssVariablesResolver:p,cssVariablesSelector:l??":root",withStaticClasses:i,stylesTransform:b,env:w,deduplicateInlineStyles:k},children:v.jsxs(Xz,{theme:e,children:[o&&v.jsx(Jz,{cssVariablesSelector:l,deduplicateCssVariables:a}),r&&v.jsx(GX,{}),n]})})}eL.displayName="@mantine/core/MantineProvider";function ye(e,n,t){var o;const i=ci(),r=(o=i.components[e])==null?void 0:o.defaultProps,a=typeof r=="function"?r(i):r;return{...n,...a,...Bu(t)}}function Wi({classNames:e,styles:n,props:t,stylesCtx:i}){const r=ci();return{resolvedClassNames:e===void 0?void 0:fm({theme:r,classNames:e,props:t,stylesCtx:i||void 0}),resolvedStyles:n===void 0?void 0:Gg({theme:r,styles:n,props:t,stylesCtx:i||void 0})}}const QX={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function JX({theme:e,options:n,unstyled:t}){return vn((n==null?void 0:n.focusable)&&!t&&(e.focusClassName||QX[e.focusRing]),(n==null?void 0:n.active)&&!t&&e.activeClassName)}function eZ({selector:e,stylesCtx:n,options:t,props:i,theme:r}){return fm({theme:r,classNames:t==null?void 0:t.classNames,props:(t==null?void 0:t.props)||i,stylesCtx:n})[e]}function nZ({selector:e,stylesCtx:n,theme:t,classNames:i,props:r}){return fm({theme:t,classNames:i,props:r,stylesCtx:n})[e]}function tZ({rootSelector:e,selector:n,className:t}){return e===n?t:void 0}function iZ({selector:e,classes:n,unstyled:t}){return t?void 0:n[e]}function rZ({themeName:e,classNamesPrefix:n,selector:t,withStaticClass:i}){return i===!1?[]:e.map(r=>`${n}-${r}-${t}`)}function aZ({options:e,classes:n,selector:t,unstyled:i}){return e!=null&&e.variant&&!i?n[`${t}--${e.variant}`]:void 0}function oZ({theme:e,options:n,themeName:t,selector:i,classNamesPrefix:r,resolvedClassNames:a,resolvedThemeClassNames:o,classes:l,unstyled:u,className:f,rootSelector:h,props:d,stylesCtx:p,withStaticClasses:g,headless:b,transformedStyles:w}){return vn(JX({theme:e,options:n,unstyled:u||b}),o.map(k=>k[i]),aZ({options:n,classes:l,selector:i,unstyled:u||b}),a[i],nZ({selector:i,stylesCtx:p,theme:e,classNames:w,props:d}),eZ({selector:i,stylesCtx:p,options:n,props:d,theme:e}),tZ({rootSelector:h,selector:i,className:f}),iZ({selector:i,classes:l,unstyled:u||b}),g&&!b&&rZ({themeName:t,classNamesPrefix:r,selector:i,withStaticClass:n==null?void 0:n.withStaticClass}),n==null?void 0:n.className)}function aC({style:e,theme:n}){return Array.isArray(e)?e.reduce((t,i)=>({...t,...aC({style:i,theme:n})}),{}):typeof e=="function"?e(n):e??{}}function sZ({theme:e,selector:n,options:t,props:i,stylesCtx:r,rootSelector:a,withStylesTransform:o,resolvedStyles:l,resolvedThemeStyles:u,resolvedVars:f,resolvedRootStyle:h}){return{...u[n],...l[n],...!o&&Gg({theme:e,styles:t==null?void 0:t.styles,props:(t==null?void 0:t.props)||i,stylesCtx:r})[n],...f[n],...a===n?h:null,...aC({style:t==null?void 0:t.style,theme:e})}}function lZ(e){return e.reduce((n,t)=>(t&&Object.keys(t).forEach(i=>{n[i]={...n[i],...Bu(t[i])}}),n),{})}function uZ({props:e,stylesCtx:n,themeName:t,theme:i}){var o;const r=(o=IX())==null?void 0:o();return{getTransformedStyles:l=>r?[...l.map(u=>r(u,{props:e,theme:i,ctx:n})),...t.map(u=>{var f;return r((f=i.components[u])==null?void 0:f.styles,{props:e,theme:i,ctx:n})})].filter(Boolean):[],withStylesTransform:!!r}}function Ze({name:e,classes:n,props:t,stylesCtx:i,className:r,style:a,rootSelector:o="root",unstyled:l,classNames:u,styles:f,vars:h,varsResolver:d,attributes:p}){var P;const g=ci(),b=NX(),w=$X(),k=zX(),_=(Array.isArray(e)?e:[e]).filter(L=>L),{withStylesTransform:S,getTransformedStyles:j}=uZ({props:t,stylesCtx:i,themeName:_,theme:g}),T=fm({theme:g,classNames:u,props:t,stylesCtx:i}),A=_.map(L=>{var U;return fm({theme:g,classNames:(U=g.components[L])==null?void 0:U.classNames,props:t,stylesCtx:i})}),O=S?{}:Gg({theme:g,styles:f,props:t,stylesCtx:i}),M={};if(!S)for(const L of _){const U=Gg({theme:g,styles:(P=g.components[L])==null?void 0:P.styles,props:t,stylesCtx:i});for(const G of Object.keys(U))M[G]={...M[G],...U[G]}}const $=lZ([k?{}:d==null?void 0:d(g,t,i),..._.map(L=>{var U,G,B;return(B=(G=(U=g.components)==null?void 0:U[L])==null?void 0:G.vars)==null?void 0:B.call(G,g,t,i)}),h==null?void 0:h(g,t,i)]),q=aC({style:a,theme:g});return(L,U)=>({...p==null?void 0:p[L],className:oZ({theme:g,options:U,themeName:_,selector:L,classNamesPrefix:b,resolvedClassNames:T,resolvedThemeClassNames:A,classes:n,unstyled:l,className:r,rootSelector:o,props:t,stylesCtx:i,withStaticClasses:w,headless:k,transformedStyles:j([U==null?void 0:U.styles,f])}),style:sZ({theme:g,selector:L,options:U,props:t,stylesCtx:i,rootSelector:o,withStylesTransform:S,resolvedStyles:O,resolvedThemeStyles:M,resolvedVars:$,resolvedRootStyle:q})})}function Yh(e){return $t(e).reduce((n,t)=>e[t]!==void 0?`${n}${KK(t)}:${e[t]};`:n,"").trim()}function cZ({selector:e,styles:n,media:t,container:i}){const r=n?Yh(n):"",a=Array.isArray(t)?t.map(l=>`@media${l.query}{${e}{${Yh(l.styles)}}}`):[],o=Array.isArray(i)?i.map(l=>`@container ${l.query}{${e}{${Yh(l.styles)}}}`):[];return`${r?`${e}{${r}}`:""}${a.join("")}${o.join("")}`.trim()}function fZ(e){let n=5381;for(let t=0;t>>0).toString(36)}function Bf({deduplicate:e,...n}){const t=tC(),i=cZ(n);return e?v.jsx("style",{href:`mantine-${fZ(i)}`,precedence:"mantine",nonce:t==null?void 0:t(),children:i}):v.jsx("style",{"data-mantine-styles":"inline",nonce:t==null?void 0:t(),dangerouslySetInnerHTML:{__html:i}})}function dZ(e){let n=5381;for(let t=0;t>>0).toString(36)}function hZ(e,n){return`__mdi__-${dZ(`${e?Yh(e):""}|${Array.isArray(n)?n.map(t=>`${t.query}:${Yh(t.styles)}`).join("|"):""}`)}`}function Fu(e){const{m:n,mx:t,my:i,mt:r,mb:a,ml:o,mr:l,me:u,ms:f,mis:h,mie:d,p,px:g,py:b,pt:w,pb:k,pl:_,pr:S,pe:j,ps:T,pis:A,pie:O,bd:M,bdrs:$,bg:q,c:P,opacity:L,ff:U,fz:G,fw:B,lts:R,ta:D,lh:z,fs:H,tt:Y,td:N,w:W,miw:V,maw:I,h:Q,mih:ie,mah:re,bgsz:Z,bgp:le,bgr:ee,bga:se,pos:ke,top:te,left:$e,bottom:xe,right:Ae,inset:ze,display:we,flex:Ce,hiddenFrom:Ne,visibleFrom:he,lightHidden:He,darkHidden:Ye,sx:We,...Qe}=e;return{styleProps:Bu({m:n,mx:t,my:i,mt:r,mb:a,ml:o,mr:l,me:u,ms:f,mis:h,mie:d,p,px:g,py:b,pt:w,pb:k,pl:_,pr:S,pis:A,pie:O,pe:j,ps:T,bd:M,bg:q,c:P,opacity:L,ff:U,fz:G,fw:B,lts:R,ta:D,lh:z,fs:H,tt:Y,td:N,w:W,miw:V,maw:I,h:Q,mih:ie,mah:re,bgsz:Z,bgp:le,bgr:ee,bga:se,pos:ke,top:te,left:$e,bottom:xe,right:Ae,inset:ze,display:we,flex:Ce,bdrs:$,hiddenFrom:Ne,visibleFrom:he,lightHidden:He,darkHidden:Ye,sx:We}),rest:Qe}}const mZ={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 oC(e,n){const t=vs({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 pZ(e,n){const t=vs({color:e,theme:n});return t.isThemeColor&&t.shade===void 0?`var(--mantine-color-${t.color}-text)`:oC(e,n)}function vZ(e,n){if(typeof e=="number")return ve(e);if(typeof e=="string"){const[t,i,...r]=e.split(" ").filter(o=>o.trim()!=="");let a=`${ve(t)}`;return i&&(a+=` ${i}`),r.length>0&&(a+=` ${oC(r.join(" "),n)}`),a.trim()}return e}const YT={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 gZ(e){return typeof e=="string"&&e in YT?YT[e]:e}const yZ=["h1","h2","h3","h4","h5","h6"];function bZ(e,n){return typeof e=="string"&&e in n.fontSizes?`var(--mantine-font-size-${e})`:typeof e=="string"&&yZ.includes(e)?`var(--mantine-${e}-font-size)`:typeof e=="number"||typeof e=="string"?ve(e):e}function wZ(e){return e}const kZ=["h1","h2","h3","h4","h5","h6"];function _Z(e,n){return typeof e=="string"&&e in n.lineHeights?`var(--mantine-line-height-${e})`:typeof e=="string"&&kZ.includes(e)?`var(--mantine-${e}-line-height)`:e}function xZ(e,n){return typeof e=="string"&&e in n.radius?`var(--mantine-radius-${e})`:typeof e=="number"||typeof e=="string"?ve(e):e}function SZ(e){return typeof e=="number"?ve(e):e}function CZ(e,n){if(typeof e=="number")return ve(e);if(typeof e=="string"){const t=e.replace("-","");if(!(t in n.spacing))return ve(e);const i=`--mantine-spacing-${t}`;return e.startsWith("-")?`calc(var(${i}) * -1)`:`var(${i})`}return e}const Sk={color:oC,textColor:pZ,fontSize:bZ,spacing:CZ,radius:xZ,identity:wZ,size:SZ,lineHeight:_Z,fontFamily:gZ,border:vZ};function KT(e){return e.replace("(min-width: ","").replace("em)","")}function jZ({media:e,...n}){const t=Object.keys(e).sort((i,r)=>Number(KT(i))-Number(KT(r))).map(i=>({query:i,styles:e[i]}));return{...n,media:t}}function AZ(e){if(typeof e!="object"||e===null)return!1;const n=Object.keys(e);return!(n.length===1&&n[0]==="base")}function OZ(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function TZ(e){return typeof e=="object"&&e!==null?$t(e).filter(n=>n!=="base"):[]}function EZ(e,n){return typeof e=="object"&&e!==null&&n in e?e[n]:e}function MZ({styleProps:e,data:n,theme:t}){return jZ($t(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=OZ(e[r]);if(!AZ(e[r]))return o.forEach(f=>{i.inlineStyles[f]=Sk[a.type](l,t)}),i;i.hasResponsiveStyles=!0;const u=TZ(e[r]);return o.forEach(f=>{l!=null&&(i.styles[f]=Sk[a.type](l,t)),u.forEach(h=>{const d=`(min-width: ${t.breakpoints[h]})`;i.media[d]={...i.media[d],[f]:Sk[a.type](EZ(e[r],h),t)}})}),i},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function Sy(){return`__m__-${x.useId().replace(/[:«»]/g,"")}`}function nL(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...nL(i,n)}),{}):typeof e=="function"?e(n):e??{}}function DZ(e){return e}const RZ=DZ;function tL(e){return e}function Pe(e){const n=e;return n.extend=tL,n.withProps=t=>{const i=r=>v.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n}function sp(e){return Pe(e)}function ki(e){const n=e;return n.withProps=t=>{const i=r=>v.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n.extend=tL,n}function iL(e){return`data-${(e.startsWith("data-")?e.slice(5):e).replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`}function PZ(e){return Object.keys(e).reduce((n,t)=>{const i=e[t];return i===void 0||i===""||i===!1||i===null||(n[iL(t)]=e[t]),n},{})}function rL(e){return e?typeof e=="string"?{[iL(e)]:!0}:Array.isArray(e)?[...e].reduce((n,t)=>({...n,...rL(t)}),{}):PZ(e):null}function TS(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...TS(i,n)}),{}):typeof e=="function"?e(n):e??{}}function NZ({theme:e,style:n,vars:t,styleProps:i}){const r=TS(n,e),a=TS(t,e);return{...r,...a,...i}}function aL({component:e,style:n,__vars:t,className:i,variant:r,mod:a,size:o,hiddenFrom:l,visibleFrom:u,lightHidden:f,darkHidden:h,renderRoot:d,__size:p,ref:g,...b}){var q,P;const w=ci(),k=e||"div",{styleProps:_,rest:S}=Fu(b),j=(P=(q=LX())==null?void 0:q())==null?void 0:P(_.sx),T=Sy(),A=MZ({styleProps:_,theme:w,data:mZ}),O=BX(),M=O&&A.hasResponsiveStyles?hZ(A.styles,A.media):T,$={ref:g,style:NZ({theme:w,style:n,vars:t,styleProps:A.inlineStyles}),className:vn(i,j,{[M]:A.hasResponsiveStyles,"mantine-light-hidden":f,"mantine-dark-hidden":h,[`mantine-hidden-from-${l}`]:l,[`mantine-visible-from-${u}`]:u}),"data-variant":r,"data-size":$z(o)?void 0:o||void 0,size:p,...rL(a),...S};return v.jsxs(v.Fragment,{children:[A.hasResponsiveStyles&&v.jsx(Bf,{selector:`.${M}`,styles:A.styles,media:A.media,deduplicate:O}),typeof d=="function"?d($):v.jsx(k,{...$})]})}aL.displayName="@mantine/core/Box";const fe=RZ(aL),$Z=x.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function qu(){return x.use($Z)}const[zZ,Sa]=Ar("ScrollArea.Root component was not found in tree");function bl(e,n){const t=x.useEffectEvent(n);ps(()=>{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 LZ(e){const{style:n,...t}=e,i=Sa(),[r,a]=x.useState(0),[o,l]=x.useState(0),u=!!(r&&o);return bl(i.scrollbarX,()=>{var h;const f=((h=i.scrollbarX)==null?void 0:h.offsetHeight)||0;i.onCornerHeightChange(f),l(f)}),bl(i.scrollbarY,()=>{var h;const f=((h=i.scrollbarY)==null?void 0:h.offsetWidth)||0;i.onCornerWidthChange(f),a(f)}),u?v.jsx("div",{...t,style:{...n,width:r,height:o}}):null}function IZ(e){const n=Sa(),t=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&t?v.jsx(LZ,{...e}):null}const BZ={scrollHideDelay:1e3,type:"hover"};function oL(e){const{type:n,scrollHideDelay:t,scrollbars:i,getStyles:r,ref:a,...o}=ye("ScrollAreaRoot",BZ,e),[l,u]=x.useState(null),[f,h]=x.useState(null),[d,p]=x.useState(null),[g,b]=x.useState(null),[w,k]=x.useState(null),[_,S]=x.useState(0),[j,T]=x.useState(0),[A,O]=x.useState(!1),[M,$]=x.useState(!1),q=Ht(a,P=>u(P));return v.jsx(zZ,{value:{type:n,scrollHideDelay:t,scrollArea:l,viewport:f,onViewportChange:h,content:d,onContentChange:p,scrollbarX:g,onScrollbarXChange:b,scrollbarXEnabled:A,onScrollbarXEnabledChange:O,scrollbarY:w,onScrollbarYChange:k,scrollbarYEnabled:M,onScrollbarYEnabledChange:$,onCornerWidthChange:S,onCornerHeightChange:T,getStyles:r},children:v.jsx(fe,{...o,ref:q,__vars:{"--sa-corner-width":i!=="xy"?"0px":`${_}px`,"--sa-corner-height":i!=="xy"?"0px":`${j}px`}})})}oL.displayName="@mantine/core/ScrollAreaRoot";function sL(e,n){const t=e/n;return Number.isNaN(t)?0:t}function Cy(e){const n=sL(e.viewport,e.content),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-t)*n;return Math.max(i,18)}function lL(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 FZ(e,[n,t]){return Math.min(t,Math.max(n,e))}function XT(e,n,t="ltr"){const i=Cy(n),r=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,a=n.scrollbar.size-r,o=n.content-n.viewport,l=a-i,u=FZ(e,t==="ltr"?[0,o]:[o*-1,0]);return lL([0,o],[0,l])(u)}function qZ(e,n,t,i="ltr"){const r=Cy(t),a=r/2,o=n||a,l=r-o,u=t.scrollbar.paddingStart+o,f=t.scrollbar.size-t.scrollbar.paddingEnd-l,h=t.content-t.viewport,d=i==="ltr"?[0,h]:[h*-1,0];return lL([u,f],d)(e)}function uL(e,n){return e>0&&e{e==null||e(i),(t===!1||!i.defaultPrevented)&&(n==null||n(i))}}const[HZ,cL]=Ar("ScrollAreaScrollbar was not found in tree");function fL(e){const{sizes:n,hasThumb:t,onThumbChange:i,onThumbPointerUp:r,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:l,onWheelScroll:u,onResize:f,ref:h,...d}=e,p=Sa(),[g,b]=x.useState(null),w=Ht(h,$=>b($)),k=x.useRef(null),_=x.useRef(""),{viewport:S}=p,j=n.content-n.viewport,T=x.useEffectEvent(u),A=zh(o),O=_y(f,10),M=$=>{k.current&&l({x:$.clientX-k.current.left,y:$.clientY-k.current.top})};return x.useEffect(()=>{const $=q=>{const P=q.target;g!=null&&g.contains(P)&&T(q,j)};return document.addEventListener("wheel",$,{passive:!1}),()=>document.removeEventListener("wheel",$,{passive:!1})},[S,g,j]),x.useEffect(A,[n,A]),bl(g,O),bl(p.content,O),v.jsx(HZ,{value:{scrollbar:g,hasThumb:t,onThumbChange:zh(i),onThumbPointerUp:zh(r),onThumbPositionChange:A,onThumbPointerDown:zh(a)},children:v.jsx("div",{...d,ref:w,"data-mantine-scrollbar":!0,style:{position:"absolute",...d.style},onPointerDown:Cu(e.onPointerDown,$=>{$.preventDefault(),$.button===0&&($.target.setPointerCapture($.pointerId),k.current=g.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",M($))}),onPointerMove:Cu(e.onPointerMove,M),onPointerUp:Cu(e.onPointerUp,$=>{const q=$.target;q.hasPointerCapture($.pointerId)&&($.preventDefault(),q.releasePointerCapture($.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,k.current=null}})})}const dL=e=>{const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=Sa(),[l,u]=x.useState(),f=x.useRef(null),h=Ht(r,f,o.onScrollbarXChange);return x.useEffect(()=>{f.current&&u(getComputedStyle(f.current))},[f]),v.jsx(fL,{"data-orientation":"horizontal",...a,ref:h,sizes:n,style:{...i,"--sa-thumb-width":`${Cy(n)}px`},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,p)=>{if(o.viewport){const g=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(g),uL(g,p)&&d.preventDefault()}},onResize:()=>{f.current&&o.viewport&&l&&t({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:Yg(l.paddingLeft),paddingEnd:Yg(l.paddingRight)}})}})};dL.displayName="@mantine/core/ScrollAreaScrollbarX";function hL(e){const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=Sa(),[l,u]=x.useState(),f=x.useRef(null),h=Ht(r,f,o.onScrollbarYChange);return x.useEffect(()=>{f.current&&u(window.getComputedStyle(f.current))},[]),v.jsx(fL,{...a,"data-orientation":"vertical",ref:h,sizes:n,style:{"--sa-thumb-height":`${Cy(n)}px`,...i},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,p)=>{if(o.viewport){const g=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(g),uL(g,p)&&d.preventDefault()}},onResize:()=>{f.current&&o.viewport&&l&&t({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:Yg(l.paddingTop),paddingEnd:Yg(l.paddingBottom)}})}})}hL.displayName="@mantine/core/ScrollAreaScrollbarY";function jy(e){const{orientation:n="vertical",...t}=e,{dir:i}=qu(),r=Sa(),a=x.useRef(null),o=x.useRef(0),[l,u]=x.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=sL(l.viewport,l.content),h={...t,sizes:l,onSizesChange:u,hasThumb:f>0&&f<1,onThumbChange:p=>{a.current=p},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:p=>{o.current=p}},d=(p,g)=>qZ(p,o.current,l,g);return n==="horizontal"?v.jsx(dL,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollLeft,g=XT(p,l,i);a.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollLeft=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollLeft=d(p,i))}}):n==="vertical"?v.jsx(hL,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollTop,g=XT(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, ${g}px, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollTop=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollTop=d(p))}}):null}jy.displayName="@mantine/core/ScrollAreaScrollbarVisible";function sC(e){const n=Sa(),{forceMount:t,...i}=e,[r,a]=x.useState(!1),o=e.orientation==="horizontal",l=_y(()=>{if(n.viewport){const u=n.viewport.offsetWidth{const{scrollArea:o}=i;let l=0;if(o){const u=()=>{window.clearTimeout(l),a(!0)},f=()=>{l=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return o.addEventListener("pointerenter",u),o.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),o.removeEventListener("pointerenter",u),o.removeEventListener("pointerleave",f)}}},[i.scrollArea,i.scrollHideDelay]),n||r?v.jsx(sC,{"data-state":r?"visible":"hidden",...t}):null}mL.displayName="@mantine/core/ScrollAreaScrollbarHover";function UZ(e){const{forceMount:n,...t}=e,i=Sa(),r=e.orientation==="horizontal",[a,o]=x.useState("hidden"),l=_y(()=>o("idle"),100);return x.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>o("hidden"),i.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,i.scrollHideDelay]),x.useEffect(()=>{const{viewport:u}=i,f=r?"scrollLeft":"scrollTop";if(u){let h=u[f];const d=()=>{const p=u[f];h!==p&&(o("scrolling"),l()),h=p};return u.addEventListener("scroll",d),()=>u.removeEventListener("scroll",d)}},[i.viewport,r,l]),n||a!=="hidden"?v.jsx(jy,{"data-state":a==="hidden"?"hidden":"visible",...t,onPointerEnter:Cu(e.onPointerEnter,()=>o("interacting")),onPointerLeave:Cu(e.onPointerLeave,()=>o("idle"))}):null}function ES(e){const{forceMount:n,...t}=e,i=Sa(),{onScrollbarXEnabledChange:r,onScrollbarYEnabledChange:a}=i,o=e.orientation==="horizontal";return x.useEffect(()=>(o?r(!0):a(!0),()=>{o?r(!1):a(!1)}),[o,r,a]),i.type==="hover"?v.jsx(mL,{...t,forceMount:n}):i.type==="scroll"?v.jsx(UZ,{...t,forceMount:n}):i.type==="auto"?v.jsx(sC,{...t,forceMount:n}):i.type==="always"?v.jsx(jy,{...t}):null}ES.displayName="@mantine/core/ScrollAreaScrollbar";function VZ(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 pL(e){const{style:n,ref:t,...i}=e,r=Sa(),a=cL(),{onThumbPositionChange:o}=a,l=Ht(t,h=>a.onThumbChange(h)),u=x.useRef(void 0),f=_y(()=>{u.current&&(u.current(),u.current=void 0)},100);return x.useEffect(()=>{const{viewport:h}=r;if(h){const d=()=>{f(),u.current||(u.current=VZ(h,o),o())};return o(),h.addEventListener("scroll",d),()=>h.removeEventListener("scroll",d)}},[r.viewport,f,o]),v.jsx("div",{"data-state":a.hasThumb?"visible":"hidden",...i,ref:l,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...n},onPointerDownCapture:Cu(e.onPointerDownCapture,h=>{const d=h.target.getBoundingClientRect(),p=h.clientX-d.left,g=h.clientY-d.top;a.onThumbPointerDown({x:p,y:g})}),onPointerUp:Cu(e.onPointerUp,a.onThumbPointerUp)})}pL.displayName="@mantine/core/ScrollAreaThumb";function MS(e){const{forceMount:n,...t}=e,i=cL();return n||i.hasThumb?v.jsx(pL,{...t}):null}MS.displayName="@mantine/core/ScrollAreaThumb";function vL({children:e,style:n,ref:t,onWheel:i,...r}){const a=Sa(),o=Ht(t,a.onViewportChange),l=u=>{if(i==null||i(u),a.scrollbarXEnabled&&a.viewport&&u.shiftKey){const{scrollTop:f,scrollHeight:h,clientHeight:d,scrollWidth:p,clientWidth:g}=a.viewport,b=f<1,w=f>=h-d-1;p>g&&(b||w)&&u.stopPropagation()}};return v.jsx(fe,{...r,ref:o,onWheel:l,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...n},children:v.jsx("div",{...a.getStyles("content"),ref:a.onContentChange,children:e})})}vL.displayName="@mantine/core/ScrollAreaViewport";var lC={root:"m_d57069b5",content:"m_b1336c6",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};function Ay(){return typeof window<"u"}function Ff(e){return gL(e)?(e.nodeName||"").toLowerCase():"#document"}function Cr(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function ko(e){var n;return(n=(gL(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function gL(e){return Ay()?e instanceof Node||e instanceof Cr(e).Node:!1}function Kt(e){return Ay()?e instanceof Element||e instanceof Cr(e).Element:!1}function Ca(e){return Ay()?e instanceof HTMLElement||e instanceof Cr(e).HTMLElement:!1}function DS(e){return!Ay()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Cr(e).ShadowRoot}function lp(e){const{overflow:n,overflowX:t,overflowY:i,display:r}=ka(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+t)&&r!=="inline"&&r!=="contents"}function WZ(e){return/^(table|td|th)$/.test(Ff(e))}function Oy(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const GZ=/transform|translate|scale|rotate|perspective|filter/,YZ=/paint|layout|strict|content/,lu=e=>!!e&&e!=="none";let Ck;function uC(e){const n=Kt(e)?ka(e):e;return lu(n.transform)||lu(n.translate)||lu(n.scale)||lu(n.rotate)||lu(n.perspective)||!Ty()&&(lu(n.backdropFilter)||lu(n.filter))||GZ.test(n.willChange||"")||YZ.test(n.contain||"")}function KZ(e){let n=ss(e);for(;Ca(n)&&!es(n);){if(uC(n))return n;if(Oy(n))return null;n=ss(n)}return null}function Ty(){return Ck==null&&(Ck=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ck}function es(e){return/^(html|body|#document)$/.test(Ff(e))}function ka(e){return Cr(e).getComputedStyle(e)}function Ey(e){return Kt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ss(e){if(Ff(e)==="html")return e;const n=e.assignedSlot||e.parentNode||DS(e)&&e.host||ko(e);return DS(n)?n.host:n}function yL(e){const n=ss(e);return es(n)?e.ownerDocument?e.ownerDocument.body:e.body:Ca(n)&&lp(n)?n:yL(n)}function ns(e,n,t){var i;n===void 0&&(n=[]),t===void 0&&(t=!0);const r=yL(e),a=r===((i=e.ownerDocument)==null?void 0:i.body),o=Cr(r);if(a){const l=RS(o);return n.concat(o,o.visualViewport||[],lp(r)?r:[],l&&t?ns(l):[])}else return n.concat(r,ns(r,[],t))}function RS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const XZ=["top","right","bottom","left"],Ha=Math.min,Zi=Math.max,Kg=Math.round,Qv=Math.floor,ao=e=>({x:e,y:e}),ZZ={left:"right",right:"left",bottom:"top",top:"bottom"};function PS(e,n,t){return Zi(e,Ha(n,t))}function fo(e,n){return typeof e=="function"?e(n):e}function Ua(e){return e.split("-")[0]}function qf(e){return e.split("-")[1]}function cC(e){return e==="x"?"y":"x"}function fC(e){return e==="y"?"height":"width"}function Ia(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function dC(e){return cC(Ia(e))}function QZ(e,n,t){t===void 0&&(t=!1);const i=qf(e),r=dC(e),a=fC(r);let o=r==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[a]>n.floating[a]&&(o=Xg(o)),[o,Xg(o)]}function JZ(e){const n=Xg(e);return[NS(e),n,NS(n)]}function NS(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const ZT=["left","right"],QT=["right","left"],eQ=["top","bottom"],nQ=["bottom","top"];function tQ(e,n,t){switch(e){case"top":case"bottom":return t?n?QT:ZT:n?ZT:QT;case"left":case"right":return n?eQ:nQ;default:return[]}}function iQ(e,n,t,i){const r=qf(e);let a=tQ(Ua(e),t==="start",i);return r&&(a=a.map(o=>o+"-"+r),n&&(a=a.concat(a.map(NS)))),a}function Xg(e){const n=Ua(e);return ZZ[n]+e.slice(n.length)}function rQ(e){return{top:0,right:0,bottom:0,left:0,...e}}function hC(e){return typeof e!="number"?rQ(e):{top:e,right:e,bottom:e,left:e}}function of(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 aQ(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function oQ(){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 sQ(){return/apple/i.test(navigator.vendor)}function lQ(){return aQ().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function uQ(){return oQ().includes("jsdom/")}const JT="data-floating-ui-focusable",cQ="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function eE(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 hm(e,n){if(!e||!n)return!1;const t=n.getRootNode==null?void 0:n.getRootNode();if(e.contains(n))return!0;if(t&&DS(t)){let i=n;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Hc(e){return"composedPath"in e?e.composedPath()[0]:e.target}function jk(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 fQ(e){return e.matches("html,body")}function yu(e){return(e==null?void 0:e.ownerDocument)||document}function dQ(e){return Ca(e)&&e.matches(cQ)}function hQ(e){if(!e||uQ())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function mQ(e){return e?e.hasAttribute(JT)?e:e.querySelector("["+JT+"]")||e:null}function Mg(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,...Mg(e,r.id,t)])}function pQ(e){return"nativeEvent"in e}function $S(e,n){const t=["mouse","pen"];return t.push("",void 0),t.includes(e)}var vQ=typeof document<"u",gQ=function(){},oo=vQ?x.useLayoutEffect:gQ;const yQ={...zz};function Jv(e){const n=x.useRef(e);return oo(()=>{n.current=e}),n}const bQ=yQ.useInsertionEffect,wQ=bQ||(e=>e());function no(e){const n=x.useRef(()=>{});return wQ(()=>{n.current=e}),x.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:kQ},u=await(o.isRTL==null?void 0:o.isRTL(n));let f=await o.getElementRects({reference:e,floating:n,strategy:r}),{x:h,y:d}=nE(f,i,u),p=i,g=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:u}=n,{element:f,padding:h=0}=fo(e,n)||{};if(f==null)return{};const d=hC(h),p={x:t,y:i},g=dC(r),b=fC(g),w=await o.getDimensions(f),k=g==="y",_=k?"top":"left",S=k?"bottom":"right",j=k?"clientHeight":"clientWidth",T=a.reference[b]+a.reference[g]-p[g]-a.floating[b],A=p[g]-a.reference[g],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(f));let M=O?O[j]:0;(!M||!await(o.isElement==null?void 0:o.isElement(O)))&&(M=l.floating[j]||a.floating[b]);const $=T/2-A/2,q=M/2-w[b]/2-1,P=Ha(d[_],q),L=Ha(d[S],q),U=P,G=M-w[b]-L,B=M/2-w[b]/2+$,R=PS(U,B,G),D=!u.arrow&&qf(r)!=null&&B!==R&&a.reference[b]/2-(BB<=0)){var L,U;const B=(((L=a.flip)==null?void 0:L.index)||0)+1,R=M[B];if(R&&(!(d==="alignment"?S!==Ia(R):!1)||P.every(H=>Ia(H.placement)===S?H.overflows[0]>0:!0)))return{data:{index:B,overflows:P},reset:{placement:R}};let D=(U=P.filter(z=>z.overflows[0]<=0).sort((z,H)=>z.overflows[1]-H.overflows[1])[0])==null?void 0:U.placement;if(!D)switch(g){case"bestFit":{var G;const z=(G=P.filter(H=>{if(O){const Y=Ia(H.placement);return Y===S||Y==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(Y=>Y>0).reduce((Y,N)=>Y+N,0)]).sort((H,Y)=>H[1]-Y[1])[0])==null?void 0:G[0];z&&(D=z);break}case"initialPlacement":D=l;break}if(r!==D)return{reset:{placement:D}}}return{}}}};function tE(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function iE(e){return XZ.some(n=>e[n]>=0)}const jQ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:t,platform:i}=n,{strategy:r="referenceHidden",...a}=fo(e,n);switch(r){case"referenceHidden":{const o=await i.detectOverflow(n,{...a,elementContext:"reference"}),l=tE(o,t.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:iE(l)}}}case"escaped":{const o=await i.detectOverflow(n,{...a,altBoundary:!0}),l=tE(o,t.floating);return{data:{escapedOffsets:l,escaped:iE(l)}}}default:return{}}}}};function bL(e){const n=Ha(...e.map(a=>a.left)),t=Ha(...e.map(a=>a.top)),i=Zi(...e.map(a=>a.right)),r=Zi(...e.map(a=>a.bottom));return{x:n,y:t,width:i-n,height:r-t}}function AQ(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=>of(bL(r)))}const OQ=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:u,y:f}=fo(e,n),h=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(i.reference))||[]),d=AQ(h),p=of(bL(h)),g=hC(l);function b(){if(d.length===2&&d[0].left>d[1].right&&u!=null&&f!=null)return d.find(k=>u>k.left-g.left&&uk.top-g.top&&f=2){if(Ia(t)==="y"){const P=d[0],L=d[d.length-1],U=Ua(t)==="top",G=P.top,B=L.bottom,R=U?P.left:L.left,D=U?P.right:L.right,z=D-R,H=B-G;return{top:G,bottom:B,left:R,right:D,width:z,height:H,x:R,y:G}}const k=Ua(t)==="left",_=Zi(...d.map(P=>P.right)),S=Ha(...d.map(P=>P.left)),j=d.filter(P=>k?P.left===S:P.right===_),T=j[0].top,A=j[j.length-1].bottom,O=S,M=_,$=M-O,q=A-T;return{top:T,bottom:A,left:O,right:M,width:$,height:q,x:O,y:T}}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}}:{}}}},wL=new Set(["left","top"]);async function TQ(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=qf(t),u=Ia(t)==="y",f=wL.has(o)?-1:1,h=a&&u?-1:1,d=fo(n,e);let{mainAxis:p,crossAxis:g,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"&&(g=l==="end"?b*-1:b),u?{x:g*h,y:p*f}:{x:p*f,y:g*h}}const EQ=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,u=await TQ(n,e);return o===((t=l.offset)==null?void 0:t.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:r+u.x,y:a+u.y,data:{...u,placement:o}}}}},MQ=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:u={fn:_=>{let{x:S,y:j}=_;return{x:S,y:j}}},...f}=fo(e,n),h={x:t,y:i},d=await a.detectOverflow(n,f),p=Ia(Ua(r)),g=cC(p);let b=h[g],w=h[p];if(o){const _=g==="y"?"top":"left",S=g==="y"?"bottom":"right",j=b+d[_],T=b-d[S];b=PS(j,b,T)}if(l){const _=p==="y"?"top":"left",S=p==="y"?"bottom":"right",j=w+d[_],T=w-d[S];w=PS(j,w,T)}const k=u.fn({...n,[g]:b,[p]:w});return{...k,data:{x:k.x-t,y:k.y-i,enabled:{[g]:o,[p]:l}}}}}},DQ=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:u=!0,crossAxis:f=!0}=fo(e,n),h={x:t,y:i},d=Ia(r),p=cC(d);let g=h[p],b=h[d];const w=fo(l,n),k=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(u){const j=p==="y"?"height":"width",T=a.reference[p]-a.floating[j]+k.mainAxis,A=a.reference[p]+a.reference[j]-k.mainAxis;gA&&(g=A)}if(f){var _,S;const j=p==="y"?"width":"height",T=wL.has(Ua(r)),A=a.reference[d]-a.floating[j]+(T&&((_=o.offset)==null?void 0:_[d])||0)+(T?0:k.crossAxis),O=a.reference[d]+a.reference[j]+(T?0:((S=o.offset)==null?void 0:S[d])||0)-(T?k.crossAxis:0);bO&&(b=O)}return{[p]:g,[d]:b}}}},RQ=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:u=()=>{},...f}=fo(e,n),h=await o.detectOverflow(n,f),d=Ua(r),p=qf(r),g=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 S=w-h.top-h.bottom,j=b-h.left-h.right,T=Ha(w-h[k],S),A=Ha(b-h[_],j),O=!n.middlewareData.shift;let M=T,$=A;if((t=n.middlewareData.shift)!=null&&t.enabled.x&&($=j),(i=n.middlewareData.shift)!=null&&i.enabled.y&&(M=S),O&&!p){const P=Zi(h.left,0),L=Zi(h.right,0),U=Zi(h.top,0),G=Zi(h.bottom,0);g?$=b-2*(P!==0||L!==0?P+L:Zi(h.left,h.right)):M=w-2*(U!==0||G!==0?U+G:Zi(h.top,h.bottom))}await u({...n,availableWidth:$,availableHeight:M});const q=await o.getDimensions(l.floating);return b!==q.width||w!==q.height?{reset:{rects:!0}}:{}}}};function kL(e){const n=ka(e);let t=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const r=Ca(e),a=r?e.offsetWidth:t,o=r?e.offsetHeight:i,l=Kg(t)!==a||Kg(i)!==o;return l&&(t=a,i=o),{width:t,height:i,$:l}}function mC(e){return Kt(e)?e:e.contextElement}function Xc(e){const n=mC(e);if(!Ca(n))return ao(1);const t=n.getBoundingClientRect(),{width:i,height:r,$:a}=kL(n);let o=(a?Kg(t.width):t.width)/i,l=(a?Kg(t.height):t.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const PQ=ao(0);function _L(e){const n=Cr(e);return!Ty()||!n.visualViewport?PQ:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function NQ(e,n,t){return n===void 0&&(n=!1),!t||n&&t!==Cr(e)?!1:n}function Ou(e,n,t,i){n===void 0&&(n=!1),t===void 0&&(t=!1);const r=e.getBoundingClientRect(),a=mC(e);let o=ao(1);n&&(i?Kt(i)&&(o=Xc(i)):o=Xc(e));const l=NQ(a,t,i)?_L(a):ao(0);let u=(r.left+l.x)/o.x,f=(r.top+l.y)/o.y,h=r.width/o.x,d=r.height/o.y;if(a){const p=Cr(a),g=i&&Kt(i)?Cr(i):i;let b=p,w=RS(b);for(;w&&i&&g!==b;){const k=Xc(w),_=w.getBoundingClientRect(),S=ka(w),j=_.left+(w.clientLeft+parseFloat(S.paddingLeft))*k.x,T=_.top+(w.clientTop+parseFloat(S.paddingTop))*k.y;u*=k.x,f*=k.y,h*=k.x,d*=k.y,u+=j,f+=T,b=Cr(w),w=RS(b)}}return of({width:h,height:d,x:u,y:f})}function My(e,n){const t=Ey(e).scrollLeft;return n?n.left+t:Ou(ko(e)).left+t}function xL(e,n){const t=e.getBoundingClientRect(),i=t.left+n.scrollLeft-My(e,t),r=t.top+n.scrollTop;return{x:i,y:r}}function $Q(e){let{elements:n,rect:t,offsetParent:i,strategy:r}=e;const a=r==="fixed",o=ko(i),l=n?Oy(n.floating):!1;if(i===o||l&&a)return t;let u={scrollLeft:0,scrollTop:0},f=ao(1);const h=ao(0),d=Ca(i);if((d||!d&&!a)&&((Ff(i)!=="body"||lp(o))&&(u=Ey(i)),d)){const g=Ou(i);f=Xc(i),h.x=g.x+i.clientLeft,h.y=g.y+i.clientTop}const p=o&&!d&&!a?xL(o,u):ao(0);return{width:t.width*f.x,height:t.height*f.y,x:t.x*f.x-u.scrollLeft*f.x+h.x+p.x,y:t.y*f.y-u.scrollTop*f.y+h.y+p.y}}function zQ(e){return Array.from(e.getClientRects())}function LQ(e){const n=ko(e),t=Ey(e),i=e.ownerDocument.body,r=Zi(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),a=Zi(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let o=-t.scrollLeft+My(e);const l=-t.scrollTop;return ka(i).direction==="rtl"&&(o+=Zi(n.clientWidth,i.clientWidth)-r),{width:r,height:a,x:o,y:l}}const rE=25;function IQ(e,n){const t=Cr(e),i=ko(e),r=t.visualViewport;let a=i.clientWidth,o=i.clientHeight,l=0,u=0;if(r){a=r.width,o=r.height;const h=Ty();(!h||h&&n==="fixed")&&(l=r.offsetLeft,u=r.offsetTop)}const f=My(i);if(f<=0){const h=i.ownerDocument,d=h.body,p=getComputedStyle(d),g=h.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,b=Math.abs(i.clientWidth-d.clientWidth-g);b<=rE&&(a-=b)}else f<=rE&&(a+=f);return{width:a,height:o,x:l,y:u}}function BQ(e,n){const t=Ou(e,!0,n==="fixed"),i=t.top+e.clientTop,r=t.left+e.clientLeft,a=Ca(e)?Xc(e):ao(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,u=r*a.x,f=i*a.y;return{width:o,height:l,x:u,y:f}}function aE(e,n,t){let i;if(n==="viewport")i=IQ(e,t);else if(n==="document")i=LQ(ko(e));else if(Kt(n))i=BQ(n,t);else{const r=_L(e);i={x:n.x-r.x,y:n.y-r.y,width:n.width,height:n.height}}return of(i)}function SL(e,n){const t=ss(e);return t===n||!Kt(t)||es(t)?!1:ka(t).position==="fixed"||SL(t,n)}function FQ(e,n){const t=n.get(e);if(t)return t;let i=ns(e,[],!1).filter(l=>Kt(l)&&Ff(l)!=="body"),r=null;const a=ka(e).position==="fixed";let o=a?ss(e):e;for(;Kt(o)&&!es(o);){const l=ka(o),u=uC(o);!u&&l.position==="fixed"&&(r=null),(a?!u&&!r:!u&&l.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||lp(o)&&!u&&SL(e,o))?i=i.filter(h=>h!==o):r=l,o=ss(o)}return n.set(e,i),i}function qQ(e){let{element:n,boundary:t,rootBoundary:i,strategy:r}=e;const o=[...t==="clippingAncestors"?Oy(n)?[]:FQ(n,this._c):[].concat(t),i],l=aE(n,o[0],r);let u=l.top,f=l.right,h=l.bottom,d=l.left;for(let p=1;p{o(!1,1e-7)},1e3)}M===1&&!jL(f,e.getBoundingClientRect())&&o(),T=!1}try{t=new IntersectionObserver(A,{...j,root:r.ownerDocument})}catch{t=new IntersectionObserver(A,j)}t.observe(e)}return o(!0),a}function zS(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:u=!1}=i,f=mC(e),h=r||a?[...f?ns(f):[],...n?ns(n):[]]:[];h.forEach(_=>{r&&_.addEventListener("scroll",t,{passive:!0}),a&&_.addEventListener("resize",t)});const d=f&&l?YQ(f,t):null;let p=-1,g=null;o&&(g=new ResizeObserver(_=>{let[S]=_;S&&S.target===f&&g&&n&&(g.unobserve(n),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var j;(j=g)==null||j.observe(n)})),t()}),f&&!u&&g.observe(f),n&&g.observe(n));let b,w=u?Ou(e):null;u&&k();function k(){const _=Ou(e);w&&!jL(w,_)&&t(),w=_,b=requestAnimationFrame(k)}return t(),()=>{var _;h.forEach(S=>{r&&S.removeEventListener("scroll",t),a&&S.removeEventListener("resize",t)}),d==null||d(),(_=g)==null||_.disconnect(),g=null,u&&cancelAnimationFrame(b)}}const KQ=EQ,XQ=MQ,ZQ=CQ,QQ=RQ,JQ=jQ,sE=SQ,eJ=OQ,nJ=DQ,tJ=(e,n,t)=>{const i=new Map,r={platform:GQ,...t},a={...r.platform,_c:i};return xQ(e,n,{...r,platform:a})};var iJ=typeof document<"u",rJ=function(){},Dg=iJ?x.useLayoutEffect:rJ;function Zg(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(!Zg(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)&&!Zg(e[a],n[a]))return!1}return!0}return e!==e&&n!==n}function AL(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lE(e,n){const t=AL(e);return Math.round(n*t)/t}function Ok(e){const n=x.useRef(e);return Dg(()=>{n.current=e}),n}function aJ(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:u,open:f}=e,[h,d]=x.useState({x:0,y:0,strategy:t,placement:n,middlewareData:{},isPositioned:!1}),[p,g]=x.useState(i);Zg(p,i)||g(i);const[b,w]=x.useState(null),[k,_]=x.useState(null),S=x.useCallback(H=>{H!==O.current&&(O.current=H,w(H))},[]),j=x.useCallback(H=>{H!==M.current&&(M.current=H,_(H))},[]),T=a||b,A=o||k,O=x.useRef(null),M=x.useRef(null),$=x.useRef(h),q=u!=null,P=Ok(u),L=Ok(r),U=Ok(f),G=x.useCallback(()=>{if(!O.current||!M.current)return;const H={placement:n,strategy:t,middleware:p};L.current&&(H.platform=L.current),tJ(O.current,M.current,H).then(Y=>{const N={...Y,isPositioned:U.current!==!1};B.current&&!Zg($.current,N)&&($.current=N,sl.flushSync(()=>{d(N)}))})},[p,n,t,L,U]);Dg(()=>{f===!1&&$.current.isPositioned&&($.current.isPositioned=!1,d(H=>({...H,isPositioned:!1})))},[f]);const B=x.useRef(!1);Dg(()=>(B.current=!0,()=>{B.current=!1}),[]),Dg(()=>{if(T&&(O.current=T),A&&(M.current=A),T&&A){if(P.current)return P.current(T,A,G);G()}},[T,A,G,P,q]);const R=x.useMemo(()=>({reference:O,floating:M,setReference:S,setFloating:j}),[S,j]),D=x.useMemo(()=>({reference:T,floating:A}),[T,A]),z=x.useMemo(()=>{const H={position:t,left:0,top:0};if(!D.floating)return H;const Y=lE(D.floating,h.x),N=lE(D.floating,h.y);return l?{...H,transform:"translate("+Y+"px, "+N+"px)",...AL(D.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:Y,top:N}},[t,l,D.floating,h.x,h.y]);return x.useMemo(()=>({...h,update:G,refs:R,elements:D,floatingStyles:z}),[h,G,R,D,z])}const oJ=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?sE({element:i.current,padding:r}).fn(t):{}:i?sE({element:i,padding:r}).fn(t):{}}}},OL=(e,n)=>{const t=KQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},pC=(e,n)=>{const t=XQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},uE=(e,n)=>({fn:nJ(e).fn,options:[e,n]}),Qg=(e,n)=>{const t=ZQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},sJ=(e,n)=>{const t=QQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},lJ=(e,n)=>{const t=JQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},Kh=(e,n)=>{const t=eJ(e);return{name:t.name,fn:t.fn,options:[e,n]}},TL=(e,n)=>{const t=oJ(e);return{name:t.name,fn:t.fn,options:[e,n]}};function EL(e){const n=x.useRef(void 0),t=x.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 x.useMemo(()=>e.every(i=>i==null)?null:i=>{n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=t(i))},e)}const uJ="data-floating-ui-focusable",cE="active",fE="selected",cJ={...zz};let dE=!1,fJ=0;const hE=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+fJ++;function dJ(){const[e,n]=x.useState(()=>dE?hE():void 0);return oo(()=>{e==null&&n(hE())},[]),x.useEffect(()=>{dE=!0},[]),e}const hJ=cJ.useId,ML=hJ||dJ;function mJ(){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 pJ=x.createContext(null),vJ=x.createContext(null),vC=()=>{var e;return((e=x.useContext(pJ))==null?void 0:e.id)||null},gC=()=>x.useContext(vJ);function yC(e){return"data-floating-ui-"+e}function da(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const mE=yC("safe-polygon");function Rg(e,n,t){if(t&&!$S(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 Tk(e){return typeof e=="function"?e():e}function DL(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,dataRef:r,events:a,elements:o}=e,{enabled:l=!0,delay:u=0,handleClose:f=null,mouseOnly:h=!1,restMs:d=0,move:p=!0}=n,g=gC(),b=vC(),w=Jv(f),k=Jv(u),_=Jv(t),S=Jv(d),j=x.useRef(),T=x.useRef(-1),A=x.useRef(),O=x.useRef(-1),M=x.useRef(!0),$=x.useRef(!1),q=x.useRef(()=>{}),P=x.useRef(!1),L=no(()=>{var z;const H=(z=r.current.openEvent)==null?void 0:z.type;return(H==null?void 0:H.includes("mouse"))&&H!=="mousedown"});x.useEffect(()=>{if(!l)return;function z(H){let{open:Y}=H;Y||(da(T),da(O),M.current=!0,P.current=!1)}return a.on("openchange",z),()=>{a.off("openchange",z)}},[l,a]),x.useEffect(()=>{if(!l||!w.current||!t)return;function z(Y){L()&&i(!1,Y,"hover")}const H=yu(o.floating).documentElement;return H.addEventListener("mouseleave",z),()=>{H.removeEventListener("mouseleave",z)}},[o.floating,t,i,l,w,L]);const U=x.useCallback(function(z,H,Y){H===void 0&&(H=!0),Y===void 0&&(Y="hover");const N=Rg(k.current,"close",j.current);N&&!A.current?(da(T),T.current=window.setTimeout(()=>i(!1,z,Y),N)):H&&(da(T),i(!1,z,Y))},[k,i]),G=no(()=>{q.current(),A.current=void 0}),B=no(()=>{if($.current){const z=yu(o.floating).body;z.style.pointerEvents="",z.removeAttribute(mE),$.current=!1}}),R=no(()=>r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1);x.useEffect(()=>{if(!l)return;function z(V){if(da(T),M.current=!1,h&&!$S(j.current)||Tk(S.current)>0&&!Rg(k.current,"open"))return;const I=Rg(k.current,"open",j.current);I?T.current=window.setTimeout(()=>{_.current||i(!0,V,"hover")},I):t||i(!0,V,"hover")}function H(V){if(R()){B();return}q.current();const I=yu(o.floating);if(da(O),P.current=!1,w.current&&r.current.floatingContext){t||da(T),A.current=w.current({...r.current.floatingContext,tree:g,x:V.clientX,y:V.clientY,onClose(){B(),G(),R()||U(V,!0,"safe-polygon")}});const ie=A.current;I.addEventListener("mousemove",ie),q.current=()=>{I.removeEventListener("mousemove",ie)};return}(j.current==="touch"?!hm(o.floating,V.relatedTarget):!0)&&U(V)}function Y(V){R()||r.current.floatingContext&&(w.current==null||w.current({...r.current.floatingContext,tree:g,x:V.clientX,y:V.clientY,onClose(){B(),G(),R()||U(V)}})(V))}function N(){da(T)}function W(V){R()||U(V,!1)}if(Kt(o.domReference)){const V=o.domReference,I=o.floating;return t&&V.addEventListener("mouseleave",Y),p&&V.addEventListener("mousemove",z,{once:!0}),V.addEventListener("mouseenter",z),V.addEventListener("mouseleave",H),I&&(I.addEventListener("mouseleave",Y),I.addEventListener("mouseenter",N),I.addEventListener("mouseleave",W)),()=>{t&&V.removeEventListener("mouseleave",Y),p&&V.removeEventListener("mousemove",z),V.removeEventListener("mouseenter",z),V.removeEventListener("mouseleave",H),I&&(I.removeEventListener("mouseleave",Y),I.removeEventListener("mouseenter",N),I.removeEventListener("mouseleave",W))}}},[o,l,e,h,p,U,G,B,i,t,_,g,k,w,r,R,S]),oo(()=>{var z;if(l&&t&&(z=w.current)!=null&&(z=z.__options)!=null&&z.blockPointerEvents&&L()){$.current=!0;const Y=o.floating;if(Kt(o.domReference)&&Y){var H;const N=yu(o.floating).body;N.setAttribute(mE,"");const W=o.domReference,V=g==null||(H=g.nodesRef.current.find(I=>I.id===b))==null||(H=H.context)==null?void 0:H.elements.floating;return V&&(V.style.pointerEvents=""),N.style.pointerEvents="none",W.style.pointerEvents="auto",Y.style.pointerEvents="auto",()=>{N.style.pointerEvents="",W.style.pointerEvents="",Y.style.pointerEvents=""}}}},[l,t,b,o,g,w,L]),oo(()=>{t||(j.current=void 0,P.current=!1,G(),B())},[t,G,B]),x.useEffect(()=>()=>{G(),da(T),da(O),B()},[l,o.domReference,G,B]);const D=x.useMemo(()=>{function z(H){j.current=H.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(H){const{nativeEvent:Y}=H;function N(){!M.current&&!_.current&&i(!0,Y,"hover")}h&&!$S(j.current)||t||Tk(S.current)===0||P.current&&H.movementX**2+H.movementY**2<2||(da(O),j.current==="touch"?N():(P.current=!0,O.current=window.setTimeout(N,Tk(S.current))))}}},[h,i,t,_,S]);return x.useMemo(()=>l?{reference:D}:{},[l,D])}const LS=()=>{},RL=x.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:LS,setState:LS,isInstantPhase:!1}),gJ=()=>x.useContext(RL);function PL(e){const{children:n,delay:t,timeoutMs:i=0}=e,[r,a]=x.useReducer((u,f)=>({...u,...f}),{delay:t,timeoutMs:i,initialDelay:t,currentId:null,isInstantPhase:!1}),o=x.useRef(null),l=x.useCallback(u=>{a({currentId:u})},[]);return oo(()=>{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]),v.jsx(RL.Provider,{value:x.useMemo(()=>({...r,setState:a,setCurrentId:l}),[r,l]),children:n})}function NL(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,floatingId:r}=e,{id:a,enabled:o=!0}=n,l=a??r,u=gJ(),{currentId:f,setCurrentId:h,initialDelay:d,setState:p,timeoutMs:g}=u;return oo(()=>{o&&f&&(p({delay:{open:1,close:Rg(d,"close")}}),f!==l&&i(!1))},[o,l,i,p,f,d]),oo(()=>{function b(){i(!1),p({delay:d,currentId:null})}if(o&&f&&!t&&f===l){if(g){const w=window.setTimeout(b,g);return()=>{clearTimeout(w)}}b()}},[o,t,p,f,l,i,d,g]),oo(()=>{o&&(h===LS||!t||h(l))},[o,t,h,l]),u}const yJ={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},bJ={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},pE=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 $L(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,elements:r,dataRef:a}=e,{enabled:o=!0,escapeKey:l=!0,outsidePress:u=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:g,capture:b}=n,w=gC(),k=no(typeof u=="function"?u:()=>!1),_=typeof u=="function"?k:u,S=x.useRef(!1),{escapeKey:j,outsidePress:T}=pE(g),{escapeKey:A,outsidePress:O}=pE(b),M=x.useRef(!1),$=no(B=>{var R;if(!t||!o||!l||B.key!=="Escape"||M.current)return;const D=(R=a.current.floatingContext)==null?void 0:R.nodeId,z=w?Mg(w.nodesRef.current,D):[];if(!j&&(B.stopPropagation(),z.length>0)){let H=!0;if(z.forEach(Y=>{var N;if((N=Y.context)!=null&&N.open&&!Y.context.dataRef.current.__escapeKeyBubbles){H=!1;return}}),!H)return}i(!1,pQ(B)?B.nativeEvent:B,"escape-key")}),q=no(B=>{var R;const D=()=>{var z;$(B),(z=Hc(B))==null||z.removeEventListener("keydown",D)};(R=Hc(B))==null||R.addEventListener("keydown",D)}),P=no(B=>{var R;const D=a.current.insideReactTree;a.current.insideReactTree=!1;const z=S.current;if(S.current=!1,f==="click"&&z||D||typeof _=="function"&&!_(B))return;const H=Hc(B),Y="["+yC("inert")+"]",N=yu(r.floating).querySelectorAll(Y);let W=Kt(H)?H:null;for(;W&&!es(W);){const ie=ss(W);if(es(ie)||!Kt(ie))break;W=ie}if(N.length&&Kt(H)&&!fQ(H)&&!hm(H,r.floating)&&Array.from(N).every(ie=>!hm(W,ie)))return;if(Ca(H)&&G){const ie=es(H),re=ka(H),Z=/auto|scroll/,le=ie||Z.test(re.overflowX),ee=ie||Z.test(re.overflowY),se=le&&H.clientWidth>0&&H.scrollWidth>H.clientWidth,ke=ee&&H.clientHeight>0&&H.scrollHeight>H.clientHeight,te=re.direction==="rtl",$e=ke&&(te?B.offsetX<=H.offsetWidth-H.clientWidth:B.offsetX>H.clientWidth),xe=se&&B.offsetY>H.clientHeight;if($e||xe)return}const V=(R=a.current.floatingContext)==null?void 0:R.nodeId,I=w&&Mg(w.nodesRef.current,V).some(ie=>{var re;return jk(B,(re=ie.context)==null?void 0:re.elements.floating)});if(jk(B,r.floating)||jk(B,r.domReference)||I)return;const Q=w?Mg(w.nodesRef.current,V):[];if(Q.length>0){let ie=!0;if(Q.forEach(re=>{var Z;if((Z=re.context)!=null&&Z.open&&!re.context.dataRef.current.__outsidePressBubbles){ie=!1;return}}),!ie)return}i(!1,B,"outside-press")}),L=no(B=>{var R;const D=()=>{var z;P(B),(z=Hc(B))==null||z.removeEventListener(f,D)};(R=Hc(B))==null||R.addEventListener(f,D)});x.useEffect(()=>{if(!t||!o)return;a.current.__escapeKeyBubbles=j,a.current.__outsidePressBubbles=T;let B=-1;function R(N){i(!1,N,"ancestor-scroll")}function D(){window.clearTimeout(B),M.current=!0}function z(){B=window.setTimeout(()=>{M.current=!1},Ty()?5:0)}const H=yu(r.floating);l&&(H.addEventListener("keydown",A?q:$,A),H.addEventListener("compositionstart",D),H.addEventListener("compositionend",z)),_&&H.addEventListener(f,O?L:P,O);let Y=[];return p&&(Kt(r.domReference)&&(Y=ns(r.domReference)),Kt(r.floating)&&(Y=Y.concat(ns(r.floating))),!Kt(r.reference)&&r.reference&&r.reference.contextElement&&(Y=Y.concat(ns(r.reference.contextElement)))),Y=Y.filter(N=>{var W;return N!==((W=H.defaultView)==null?void 0:W.visualViewport)}),Y.forEach(N=>{N.addEventListener("scroll",R,{passive:!0})}),()=>{l&&(H.removeEventListener("keydown",A?q:$,A),H.removeEventListener("compositionstart",D),H.removeEventListener("compositionend",z)),_&&H.removeEventListener(f,O?L:P,O),Y.forEach(N=>{N.removeEventListener("scroll",R)}),window.clearTimeout(B)}},[a,r,l,_,f,t,i,p,o,j,T,$,A,q,P,O,L]),x.useEffect(()=>{a.current.insideReactTree=!1},[a,_,f]);const U=x.useMemo(()=>({onKeyDown:$,...h&&{[yJ[d]]:B=>{i(!1,B.nativeEvent,"reference-press")},...d!=="click"&&{onClick(B){i(!1,B.nativeEvent,"reference-press")}}}}),[$,i,h,d]),G=x.useMemo(()=>{function B(R){R.button===0&&(S.current=!0)}return{onKeyDown:$,onMouseDown:B,onMouseUp:B,[bJ[f]]:()=>{a.current.insideReactTree=!0}}},[$,f,a]);return x.useMemo(()=>o?{reference:U,floating:G}:{},[o,U,G])}function wJ(e){const{open:n=!1,onOpenChange:t,elements:i}=e,r=ML(),a=x.useRef({}),[o]=x.useState(()=>mJ()),l=vC()!=null,[u,f]=x.useState(i.reference),h=no((g,b,w)=>{a.current.openEvent=g?b:void 0,o.emit("openchange",{open:g,event:b,reason:w,nested:l}),t==null||t(g,b,w)}),d=x.useMemo(()=>({setPositionReference:f}),[]),p=x.useMemo(()=>({reference:u||i.reference||null,floating:i.floating||null,domReference:i.reference}),[u,i.reference,i.floating]);return x.useMemo(()=>({dataRef:a,open:n,onOpenChange:h,elements:p,events:o,floatingId:r,refs:d}),[n,h,p,o,r,d])}function Dy(e){e===void 0&&(e={});const{nodeId:n}=e,t=wJ({...e,elements:{reference:null,floating:null,...e.elements}}),i=e.rootContext||t,r=i.elements,[a,o]=x.useState(null),[l,u]=x.useState(null),h=(r==null?void 0:r.domReference)||a,d=x.useRef(null),p=gC();oo(()=>{h&&(d.current=h)},[h]);const g=aJ({...e,elements:{...r,...l&&{reference:l}}}),b=x.useCallback(j=>{const T=Kt(j)?{getBoundingClientRect:()=>j.getBoundingClientRect(),getClientRects:()=>j.getClientRects(),contextElement:j}:j;u(T),g.refs.setReference(T)},[g.refs]),w=x.useCallback(j=>{(Kt(j)||j===null)&&(d.current=j,o(j)),(Kt(g.refs.reference.current)||g.refs.reference.current===null||j!==null&&!Kt(j))&&g.refs.setReference(j)},[g.refs]),k=x.useMemo(()=>({...g.refs,setReference:w,setPositionReference:b,domReference:d}),[g.refs,w,b]),_=x.useMemo(()=>({...g.elements,domReference:h}),[g.elements,h]),S=x.useMemo(()=>({...g,...i,refs:k,elements:_,nodeId:n}),[g,k,_,n,i]);return oo(()=>{i.dataRef.current.floatingContext=S;const j=p==null?void 0:p.nodesRef.current.find(T=>T.id===n);j&&(j.context=S)}),x.useMemo(()=>({...g,context:S,refs:k,elements:_}),[g,k,_,S])}function Ek(){return lQ()&&sQ()}function kJ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,events:r,dataRef:a,elements:o}=e,{enabled:l=!0,visibleOnly:u=!0}=n,f=x.useRef(!1),h=x.useRef(-1),d=x.useRef(!0);x.useEffect(()=>{if(!l)return;const g=Cr(o.domReference);function b(){!t&&Ca(o.domReference)&&o.domReference===eE(yu(o.domReference))&&(f.current=!0)}function w(){d.current=!0}function k(){d.current=!1}return g.addEventListener("blur",b),Ek()&&(g.addEventListener("keydown",w,!0),g.addEventListener("pointerdown",k,!0)),()=>{g.removeEventListener("blur",b),Ek()&&(g.removeEventListener("keydown",w,!0),g.removeEventListener("pointerdown",k,!0))}},[o.domReference,t,l]),x.useEffect(()=>{if(!l)return;function g(b){let{reason:w}=b;(w==="reference-press"||w==="escape-key")&&(f.current=!0)}return r.on("openchange",g),()=>{r.off("openchange",g)}},[r,l]),x.useEffect(()=>()=>{da(h)},[]);const p=x.useMemo(()=>({onMouseLeave(){f.current=!1},onFocus(g){if(f.current)return;const b=Hc(g.nativeEvent);if(u&&Kt(b)){if(Ek()&&!g.relatedTarget){if(!d.current&&!dQ(b))return}else if(!hQ(b))return}i(!0,g.nativeEvent,"focus")},onBlur(g){f.current=!1;const b=g.relatedTarget,w=g.nativeEvent,k=Kt(b)&&b.hasAttribute(yC("focus-guard"))&&b.getAttribute("data-type")==="outside";h.current=window.setTimeout(()=>{var _;const S=eE(o.domReference?o.domReference.ownerDocument:document);!b&&S===o.domReference||hm((_=a.current.floatingContext)==null?void 0:_.refs.floating.current,S)||hm(o.domReference,S)||k||i(!1,w,"focus")})}}),[a,o.domReference,i,u]);return x.useMemo(()=>l?{reference:p}:{},[l,p])}function Mk(e,n,t){const i=new Map,r=t==="item";let a=e;if(r&&e){const{[cE]:o,[fE]:l,...u}=e;a=u}return{...t==="floating"&&{tabIndex:-1,[uJ]:""},...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(u=>{let[f,h]=u;if(!(r&&[cE,fE].includes(f)))if(f.indexOf("on")===0){if(i.has(f)||i.set(f,[]),typeof h=="function"){var d;(d=i.get(f))==null||d.push(h),o[f]=function(){for(var p,g=arguments.length,b=new Array(g),w=0;wk(...b)).find(k=>k!==void 0)}}}else o[f]=h}),o),{})}}function zL(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=x.useCallback(l=>Mk(l,e,"reference"),n),a=x.useCallback(l=>Mk(l,e,"floating"),t),o=x.useCallback(l=>Mk(l,e,"item"),i);return x.useMemo(()=>({getReferenceProps:r,getFloatingProps:a,getItemProps:o}),[r,a,o])}const _J=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function LL(e,n){var t,i;n===void 0&&(n={});const{open:r,elements:a,floatingId:o}=e,{enabled:l=!0,role:u="dialog"}=n,f=ML(),h=((t=a.domReference)==null?void 0:t.id)||f,d=x.useMemo(()=>{var S;return((S=mQ(a.floating))==null?void 0:S.id)||o},[a.floating,o]),p=(i=_J.get(u))!=null?i:u,b=vC()!=null,w=x.useMemo(()=>p==="tooltip"||u==="label"?{["aria-"+(u==="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"},...u==="select"&&{"aria-autocomplete":"none"},...u==="combobox"&&{"aria-autocomplete":"list"}},[p,d,b,r,h,u]),k=x.useMemo(()=>{const S={id:d,...p&&{role:p}};return p==="tooltip"||u==="label"?S:{...S,...p==="menu"&&{"aria-labelledby":h}}},[p,d,h,u]),_=x.useCallback(S=>{let{active:j,selected:T}=S;const A={role:"option",...j&&{id:d+"-fui-option"}};switch(u){case"select":case"combobox":return{...A,"aria-selected":T}}return{}},[d,u]);return x.useMemo(()=>l?{reference:w,floating:k,item:_}:{},[l,w,k,_])}const IL={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},BL=(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":ve(n),"--scrollarea-over-scroll-behavior":r}}},ur=Pe(e=>{const n=ye("ScrollArea",IL,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,scrollbarSize:l,vars:u,type:f,scrollHideDelay:h,viewportProps:d,viewportRef:p,onScrollPositionChange:g,children:b,offsetScrollbars:w,scrollbars:k,onBottomReached:_,onTopReached:S,onLeftReached:j,onRightReached:T,overscrollBehavior:A,startScrollPosition:O,attributes:M,...$}=n,[q,P]=x.useState(!1),[L,U]=x.useState(!1),[G,B]=x.useState(!1),R=x.useRef(!0),D=x.useRef(!1),z=x.useRef(!0),H=x.useRef(!1),Y=Ze({name:"ScrollArea",props:n,classes:lC,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:M,vars:u,varsResolver:BL}),N=x.useRef(null),[W,V]=x.useState(null),I=EL([p,N,x.useCallback(Q=>{V(ie=>ie===Q?ie:Q)},[])]);return bl(w==="present"?W:null,()=>{const Q=N.current;Q&&(U(Q.scrollHeight>Q.clientHeight),B(Q.scrollWidth>Q.clientWidth))}),ps(()=>{O&&N.current&&N.current.scrollTo({left:O.x??0,top:O.y??0})},[]),v.jsxs(oL,{getStyles:Y,type:f==="never"?"always":f,scrollHideDelay:h,scrollbars:k,...Y("root"),...$,children:[v.jsx(vL,{...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"&&!G?"true":void 0,"data-vertical-hidden":w==="present"&&!L?"true":void 0,onScroll:Q=>{var Ae;(Ae=d==null?void 0:d.onScroll)==null||Ae.call(d,Q),g==null||g({x:Q.currentTarget.scrollLeft,y:Q.currentTarget.scrollTop});const{scrollTop:ie,scrollHeight:re,clientHeight:Z,scrollLeft:le,scrollWidth:ee,clientWidth:se}=Q.currentTarget,ke=ie-(re-Z)>=-.8,te=ie===0;ke&&!D.current&&(_==null||_()),te&&!R.current&&(S==null||S()),D.current=ke,R.current=te;const $e=le-(ee-se)>=-.8,xe=le===0;$e&&!H.current&&(T==null||T()),xe&&!z.current&&(j==null||j()),H.current=$e,z.current=xe},children:b}),(k==="xy"||k==="x")&&v.jsx(ES,{...Y("scrollbar"),orientation:"horizontal","data-hidden":f==="never"||w==="present"&&!G?!0:void 0,forceMount:!0,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:v.jsx(MS,{...Y("thumb")})}),(k==="xy"||k==="y")&&v.jsx(ES,{...Y("scrollbar"),orientation:"vertical","data-hidden":f==="never"||w==="present"&&!L?!0:void 0,forceMount:!0,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:v.jsx(MS,{...Y("thumb")})}),v.jsx(IZ,{...Y("corner"),"data-hovered":q||void 0,"data-hidden":f==="never"||void 0})]})});ur.displayName="@mantine/core/ScrollArea";const bC=Pe(e=>{const{children:n,classNames:t,styles:i,scrollbarSize:r,scrollHideDelay:a,type:o,dir:l,offsetScrollbars:u,overscrollBehavior:f,viewportRef:h,onScrollPositionChange:d,unstyled:p,variant:g,viewportProps:b,scrollbars:w,style:k,vars:_,onBottomReached:S,onTopReached:j,startScrollPosition:T,onOverflowChange:A,...O}=ye("ScrollAreaAutosize",IL,e),M=x.useRef(null),[$,q]=x.useState(null),P=EL([h,M,x.useCallback(B=>{q(R=>R===B?R:B)},[])]),L=x.useRef(!1),U=x.useRef(!1),G=x.useEffectEvent(()=>{const B=M.current;if(!B||!A)return;const R=B.scrollHeight>B.clientHeight;R!==L.current&&(U.current?A(R):(U.current=!0,R&&A(!0)),L.current=R)});return bl(A?$:null,G),v.jsx(fe,{...O,variant:g,style:[{display:"flex",overflow:"hidden"},k],children:v.jsx(fe,{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:v.jsx(ur,{classNames:t,styles:i,scrollHideDelay:a,scrollbarSize:r,type:o,dir:l,offsetScrollbars:u,overscrollBehavior:f,viewportRef:P,onScrollPositionChange:d,unstyled:p,variant:g,viewportProps:b,vars:_,scrollbars:w,onBottomReached:S,onTopReached:j,startScrollPosition:T,"data-autosize":"true",children:n})})})});ur.classes=lC;ur.varsResolver=BL;bC.displayName="@mantine/core/ScrollAreaAutosize";bC.classes=lC;ur.Autosize=bC;var FL={root:"m_87cf2631"};const xJ={__staticSelector:"UnstyledButton"},Et=ki(e=>{const n=ye("UnstyledButton",xJ,e),{className:t,component:i="button",__staticSelector:r,unstyled:a,classNames:o,styles:l,style:u,attributes:f,...h}=n;return v.jsx(fe,{...Ze({name:r,props:n,classes:FL,className:t,style:u,classNames:o,styles:l,unstyled:a,attributes:f})("root",{focusable:!0}),component:i,type:i==="button"?"button":void 0,...h})});Et.classes=FL;Et.displayName="@mantine/core/UnstyledButton";var qL={root:"m_515a97f8"};const wC=Pe(e=>{const n=ye("VisuallyHidden",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:u,...f}=n;return v.jsx(fe,{component:"span",...Ze({name:"VisuallyHidden",classes:qL,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:u})("root"),...f})});wC.classes=qL;wC.displayName="@mantine/core/VisuallyHidden";var HL={root:"m_1b7284a3"};const UL=(e,{radius:n,shadow:t})=>({root:{"--paper-radius":n===void 0?void 0:qt(n),"--paper-shadow":Q6(t)}}),Tt=ki(e=>{const n=ye("Paper",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,withBorder:l,vars:u,radius:f,shadow:h,variant:d,mod:p,attributes:g,...b}=n,w=Ze({name:"Paper",props:n,classes:HL,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:g,vars:u,varsResolver:UL});return v.jsx(fe,{mod:[{"data-with-border":l},p],...w("root"),variant:d,...b})});Tt.classes=HL;Tt.varsResolver=UL;Tt.displayName="@mantine/core/Paper";function vE(e,n,t,i){return e==="center"||i==="center"?{top:n}:e==="end"?{bottom:t}:e==="start"?{top:t}:{}}function gE(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 SJ={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function CJ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,arrowX:a,arrowY:o,dir:l}){const[u,f="center"]=e.split("-"),h={width:n,height:n,transform:"rotate(45deg)",position:"absolute",[SJ[u]]:i},d=-n/2;return u==="left"?{...h,...vE(f,o,t,r),right:d,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:u==="right"?{...h,...vE(f,o,t,r),left:d,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:u==="top"?{...h,...gE(f,a,t,r,l),bottom:d,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:u==="bottom"?{...h,...gE(f,a,t,r,l),top:d,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}function Jg({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,visible:a,arrowX:o,arrowY:l,style:u,...f}){const{dir:h}=qu();return a?v.jsx("div",{...f,style:{...u,...CJ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,dir:h,arrowX:o,arrowY:l})}}):null}Jg.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 WL({open:e,close:n,openDelay:t,closeDelay:i}){const r=x.useRef(-1),a=x.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)},u=()=>{o(),i===0||i===void 0?n():a.current=window.setTimeout(n,i)};return x.useEffect(()=>o,[]),{openDropdown:l,closeDropdown:u}}var GL={root:"m_9814e45f"};const jJ={zIndex:xa("modal")},YL=(e,{gradient:n,color:t,backgroundOpacity:i,blur:r,radius:a,zIndex:o})=>({root:{"--overlay-bg":n||(t!==void 0||i!==void 0)&&nl(t||"#000",i??.6)||void 0,"--overlay-filter":r?`blur(${ve(r)})`:void 0,"--overlay-radius":a===void 0?void 0:qt(a),"--overlay-z-index":o==null?void 0:o.toString()}}),up=ki(e=>{const n=ye("Overlay",jJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,fixed:u,center:f,children:h,radius:d,zIndex:p,gradient:g,blur:b,color:w,backgroundOpacity:k,mod:_,attributes:S,...j}=n;return v.jsx(fe,{...Ze({name:"Overlay",props:n,classes:GL,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:YL})("root"),mod:[{center:f,fixed:u},_],...j,children:h})});up.classes=GL;up.varsResolver=YL;up.displayName="@mantine/core/Overlay";function Dk(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 AJ({target:e,reuseTargetNode:n,...t}){if(e)return typeof e=="string"?document.querySelector(e)||Dk(t):e;if(n){const i=document.querySelector("[data-mantine-shared-portal-node]");if(i)return i;const r=Dk(t);return r.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(r),r}return Dk(t)}const OJ={reuseTargetNode:!0},KL=Pe(e=>{const{children:n,target:t,reuseTargetNode:i,ref:r,...a}=ye("Portal",OJ,e),[o,l]=x.useState(!1),u=x.useRef(null);return ps(()=>(l(!0),u.current=AJ({target:t,reuseTargetNode:i,...a}),cm(r,u.current),!t&&!i&&u.current&&document.body.appendChild(u.current),()=>{!t&&!i&&u.current&&document.body.removeChild(u.current)}),[t]),!o||!u.current?null:sl.createPortal(v.jsx(v.Fragment,{children:n}),u.current)});KL.displayName="@mantine/core/Portal";const wl=Pe(({withinPortal:e=!0,children:n,...t})=>op()==="test"||!e?v.jsx(v.Fragment,{children:n}):v.jsx(KL,{...t,children:n}));wl.displayName="@mantine/core/OptionalPortal";const bh=e=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${e==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),eg={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:{...bh("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...bh("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...bh("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...bh("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...bh("top"),common:{transformOrigin:"top right"}}},yE={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function bE({transition:e,state:n,duration:t,timingFunction:i}){const r={WebkitBackfaceVisibility:"hidden",transitionDuration:`${t}ms`,transitionTimingFunction:i};return typeof e=="string"?e in eg?{transitionProperty:eg[e].transitionProperty,...r,...eg[e].common,...eg[e][yE[n]]}:{}:{transitionProperty:e.transitionProperty,...r,...e.common,...e[yE[n]]}}function TJ({duration:e,exitDuration:n,timingFunction:t,mounted:i,onEnter:r,onExit:a,onEntered:o,onExited:l,enterDelay:u,exitDelay:f}){const h=ci(),d=eC(),p=h.respectReducedMotion?d:!1,[g,b]=x.useState(p?0:e),[w,k]=x.useState(i?"entered":"exited"),_=x.useRef(-1),S=x.useRef(-1),j=x.useRef(-1);function T(){window.clearTimeout(_.current),window.clearTimeout(S.current),cancelAnimationFrame(j.current)}const A=M=>{T();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")):j.current=requestAnimationFrame(()=>{Lh.flushSync(()=>{k(M?"pre-entering":"pre-exiting")}),j.current=requestAnimationFrame(()=>{typeof $=="function"&&$(),k(M?"entering":"exiting"),_.current=window.setTimeout(()=>{typeof q=="function"&&q(),k(M?"entered":"exited")},P)})})},O=M=>{if(T(),typeof(M?u:f)!="number"){A(M);return}S.current=window.setTimeout(()=>{A(M)},M?u:f)};return os(()=>{O(i)},[i]),x.useEffect(()=>()=>{T()},[]),{transitionDuration:g,transitionStatus:w,transitionTimingFunction:t||"ease"}}function ls({keepMounted:e,transition:n="fade",duration:t=250,exitDuration:i=t,mounted:r,children:a,timingFunction:o="ease",onExit:l,onEntered:u,onEnter:f,onExited:h,enterDelay:d,exitDelay:p}){const g=op(),{transitionDuration:b,transitionStatus:w,transitionTimingFunction:k}=TJ({mounted:r,exitDuration:i,duration:t,timingFunction:o,onExit:l,onEntered:u,onEnter:f,onExited:h,enterDelay:d,exitDelay:p});if(g==="test")return r?v.jsx(v.Fragment,{children:a({})}):e?a({display:"none"}):null;if(b===0)return e?v.jsx(x.Activity,{mode:r?"visible":"hidden",children:a({})}):r?v.jsx(v.Fragment,{children:a({})}):null;const _=w==="exited";return e?v.jsx(x.Activity,{mode:_?"hidden":"visible",children:a(_?{}:bE({transition:n,duration:b,state:w,timingFunction:k}))}):_?null:v.jsx(v.Fragment,{children:a(bE({transition:n,duration:b,state:w,timingFunction:k}))})}ls.displayName="@mantine/core/Transition";const EJ={duration:100,transition:"fade"};function wE(e,n){return{...EJ,...n,...e}}const[MJ,XL]=Ar("Popover component was not found in the tree");function Ry({children:e,active:n=!0,refProp:t="ref",innerRef:i}){const r=Ht(pX(n),i),a=Cl(e);return a?x.cloneElement(a,{[t]:r}):e}function ZL(e){return v.jsx(wC,{tabIndex:-1,"data-autofocus":!0,...e})}Ry.displayName="@mantine/core/FocusTrap";ZL.displayName="@mantine/core/FocusTrapInitialFocus";Ry.InitialFocus=ZL;var QL={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const kC=Pe(e=>{var k,_,S,j;const n=ye("PopoverDropdown",null,e),{className:t,style:i,vars:r,children:a,onKeyDownCapture:o,variant:l,classNames:u,styles:f,ref:h,...d}=n,p=XL(),g=Lz({opened:p.opened,shouldReturnFocus:p.returnFocus}),b=p.withRoles?{"aria-labelledby":p.getTargetId(),id:p.getDropdownId(),role:"dialog",tabIndex:-1}:{},w=Ht(h,p.floating);return p.disabled?null:v.jsx(wl,{...p.portalProps,withinPortal:p.withinPortal,children:v.jsx(ls,{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((S=p.transitionProps)==null?void 0:S.exitDuration)=="number"?p.transitionProps.exitDuration:(j=p.transitionProps)==null?void 0:j.duration,children:T=>{var A;return v.jsx(Ry,{active:p.trapFocus&&p.opened,innerRef:w,children:v.jsxs(fe,{...b,...d,variant:l,onKeyDownCapture:tX(()=>{var O,M;(O=p.onClose)==null||O.call(p),(M=p.onDismiss)==null||M.call(p)},{active:p.closeOnEscape,onTrigger:g,onKeyDown:o}),"data-position":p.placement,"data-fixed":p.floatingStrategy==="fixed"||void 0,...p.getStyles("dropdown",{className:t,props:n,classNames:u,styles:f,style:[{...T,zIndex:p.zIndex,top:p.y??0,left:p.x??0,width:p.width==="target"?void 0:ve(p.width),...p.referenceHidden?{display:"none"}:null},(A=p.resolvedStyles)==null?void 0:A.dropdown,f==null?void 0:f.dropdown,i]}),children:[a,v.jsx(Jg,{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:u,styles:f})})]})})}})})});kC.classes=QL;kC.displayName="@mantine/core/PopoverDropdown";const DJ={refProp:"ref",popupType:"dialog"},JL=Pe(e=>{const{children:n,refProp:t,popupType:i,ref:r,...a}=ye("PopoverTarget",DJ,e),o=Cl(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,u=XL(),f=Ht(u.reference,xy(o),r),h=u.withRoles?{"aria-haspopup":i,"aria-expanded":u.opened,"aria-controls":u.opened?u.getDropdownId():void 0,id:u.getTargetId()}:{},d=o.props;return x.cloneElement(o,{...l,...h,...u.targetProps,className:vn(u.targetProps.className,l.className,d.className),[t]:f,...u.controlled?null:{onClick:p=>{var g;u.onToggle(),(g=d.onClick)==null||g.call(d,p)}}})});JL.displayName="@mantine/core/PopoverTarget";function RJ(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 PJ(e,n,t){const i=RJ(e.middlewares),r=[OL(e.offset),lJ()];return e.dropdownVisible&&t!=="test"&&e.preventPositionChangeWhenVisible&&(i.flip=!1),i.flip&&r.push(typeof i.flip=="boolean"?Qg():Qg(i.flip)),i.shift&&r.push(pC(typeof i.shift=="boolean"?{limiter:uE(),padding:5}:{limiter:uE(),padding:5,...i.shift})),i.inline&&r.push(typeof i.inline=="boolean"?Kh():Kh(i.inline)),r.push(TL({element:e.arrowRef,padding:e.arrowOffset})),(i.size||e.width==="target")&&r.push(sJ({...typeof i.size=="boolean"?{}:i.size,apply({rects:a,availableWidth:o,availableHeight:l,...u}){var h;const f=((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,...u}):Object.assign(f,{maxWidth:`${o}px`,maxHeight:`${l}px`})),e.width==="target"&&Object.assign(f,{width:`${a.reference.width}px`})}})),r}function NJ(e){const n=op(),[t,i]=Ai({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=x.useRef(t),a=()=>{t&&!e.disabled&&i(!1)},o=()=>{e.disabled||i(!t)},l=Dy({strategy:e.strategy,placement:e.preventPositionChangeWhenVisible?e.positionRef.current:e.position,middleware:PJ(e,()=>l,n),whileElementsMounted:e.keepMounted?void 0:zS});return x.useEffect(()=>{if(!(!l.refs.reference.current||!l.refs.floating.current)&&t)return zS(l.refs.reference.current,l.refs.floating.current,l.update)},[t,l.update]),os(()=>{var u;(u=e.onPositionChange)==null||u.call(e,l.placement),e.positionRef.current=l.placement},[l.placement,e.preventPositionChangeWhenVisible]),os(()=>{var u,f;t!==r.current&&(t?(f=e.onOpen)==null||f.call(e):(u=e.onClose)==null||u.call(e)),r.current=t},[t,e.onClose,e.onOpen]),ps(()=>{let u=-1;return t&&(u=window.setTimeout(()=>e.setDropdownVisible(!0),4)),()=>{window.clearTimeout(u)}},[t,e.position]),{floating:l,controlled:typeof e.opened=="boolean",opened:t,onClose:a,onToggle:o}}const $J={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:xa("popover"),__staticSelector:"Popover",width:"max-content"},eI=(e,{radius:n,shadow:t})=>({dropdown:{"--popover-radius":n===void 0?void 0:qt(n),"--popover-shadow":Q6(t)}});function Sn(e){var an,pn,Dn,bn,sn,nn,$n;const n=ye("Popover",$J,e),{children:t,position:i,offset:r,onPositionChange:a,opened:o,transitionProps:l,onExitTransitionEnd:u,onEnterTransitionEnd:f,width:h,middlewares:d,withArrow:p,arrowSize:g,arrowOffset:b,arrowRadius:w,arrowPosition:k,unstyled:_,classNames:S,styles:j,closeOnClickOutside:T,withinPortal:A,portalProps:O,closeOnEscape:M,clickOutsideEvents:$,trapFocus:q,onClose:P,onDismiss:L,onOpen:U,onChange:G,zIndex:B,radius:R,shadow:D,id:z,defaultOpened:H,__staticSelector:Y,withRoles:N,disabled:W,returnFocus:V,variant:I,keepMounted:Q,vars:ie,floatingStrategy:re,withOverlay:Z,overlayProps:le,hideDetached:ee,attributes:se,preventPositionChangeWhenVisible:ke,...te}=n,$e=Ze({name:Y,props:n,classes:QL,classNames:S,styles:j,unstyled:_,attributes:se,rootSelector:"dropdown",vars:ie,varsResolver:eI}),{resolvedStyles:xe}=Wi({classNames:S,styles:j,props:n}),[Ae,ze]=x.useState(o??H??!1),we=x.useRef(i),Ce=x.useRef(null),[Ne,he]=x.useState(null),[He,Ye]=x.useState(null),{dir:We}=qu(),Qe=op(),Je=Pi(z),oe=NJ({middlewares:d,width:h,position:VL(We,i),offset:typeof r=="number"?r+(p?g/2:0):r,arrowRef:Ce,arrowOffset:b,onPositionChange:a,opened:o,defaultOpened:H,onChange:G,onOpen:U,onClose:P,onDismiss:L,strategy:re,dropdownVisible:Ae,setDropdownVisible:ze,positionRef:we,disabled:W,preventPositionChangeWhenVisible:ke,keepMounted:Q});oX(()=>{T&&(oe.onClose(),L==null||L())},$,[Ne,He]);const be=x.useCallback(De=>{he(De),oe.floating.refs.setReference(De)},[oe.floating.refs.setReference]),Ke=x.useCallback(De=>{Ye(De),oe.floating.refs.setFloating(De)},[oe.floating.refs.setFloating]),en=x.useCallback(()=>{var De;(De=l==null?void 0:l.onExited)==null||De.call(l),u==null||u(),ze(!1),ke||(we.current=i)},[l==null?void 0:l.onExited,u,ke,i]),je=x.useCallback(()=>{var De;(De=l==null?void 0:l.onEntered)==null||De.call(l),f==null||f()},[l==null?void 0:l.onEntered,f]);return v.jsxs(MJ,{value:{returnFocus:V,disabled:W,controlled:oe.controlled,reference:be,floating:Ke,x:oe.floating.x,y:oe.floating.y,arrowX:(Dn=(pn=(an=oe.floating)==null?void 0:an.middlewareData)==null?void 0:pn.arrow)==null?void 0:Dn.x,arrowY:(nn=(sn=(bn=oe.floating)==null?void 0:bn.middlewareData)==null?void 0:sn.arrow)==null?void 0:nn.y,opened:oe.opened,arrowRef:Ce,transitionProps:{...l,onExited:en,onEntered:je},width:h,withArrow:p,arrowSize:g,arrowOffset:b,arrowRadius:w,arrowPosition:k,placement:oe.floating.placement,trapFocus:q,withinPortal:A,portalProps:O,zIndex:B,radius:R,shadow:D,closeOnEscape:M,onDismiss:L,onClose:oe.onClose,onToggle:oe.onToggle,getTargetId:()=>Je,getDropdownId:()=>`${Je}-dropdown`,withRoles:N,targetProps:te,__staticSelector:Y,classNames:S,styles:j,unstyled:_,variant:I,keepMounted:Q,getStyles:$e,resolvedStyles:xe,floatingStrategy:re,referenceHidden:ee&&Qe!=="test"?($n=oe.floating.middlewareData.hide)==null?void 0:$n.referenceHidden:!1},children:[t,Z&&v.jsx(ls,{transition:"fade",mounted:oe.opened,duration:(l==null?void 0:l.duration)||250,exitDuration:(l==null?void 0:l.exitDuration)||250,children:De=>v.jsx(wl,{withinPortal:A,children:v.jsx(up,{...le,...$e("overlay",{className:le==null?void 0:le.className,style:[De,le==null?void 0:le.style]})})})})]})}Sn.Target=JL;Sn.Dropdown=kC;Sn.varsResolver=eI;Sn.displayName="@mantine/core/Popover";Sn.extend=e=>e;Sn.withProps=e=>{const n=t=>v.jsx(Sn,{...e,...t});return n.extend=Sn.extend,n.displayName=`WithProps(${Sn.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 nI=({className:e,...n})=>v.jsxs(fe,{component:"span",className:vn(Ba.barsLoader,e),...n,children:[v.jsx("span",{className:Ba.bar}),v.jsx("span",{className:Ba.bar}),v.jsx("span",{className:Ba.bar})]});nI.displayName="@mantine/core/Bars";const tI=({className:e,...n})=>v.jsxs(fe,{component:"span",className:vn(Ba.dotsLoader,e),...n,children:[v.jsx("span",{className:Ba.dot}),v.jsx("span",{className:Ba.dot}),v.jsx("span",{className:Ba.dot})]});tI.displayName="@mantine/core/Dots";const iI=({className:e,...n})=>v.jsx(fe,{component:"span",className:vn(Ba.ovalLoader,e),...n});iI.displayName="@mantine/core/Oval";const rI={bars:nI,oval:iI,dots:tI},zJ={loaders:rI,type:"oval"},aI=(e,{size:n,color:t})=>({root:{"--loader-size":Ln(n,"loader-size"),"--loader-color":t?ft(t,e):void 0}}),Zt=Pe(e=>{const n=ye("Loader",zJ,e),{size:t,color:i,type:r,vars:a,className:o,style:l,classNames:u,styles:f,unstyled:h,loaders:d,variant:p,children:g,attributes:b,...w}=n,k=Ze({name:"Loader",props:n,classes:Ba,className:o,style:l,classNames:u,styles:f,unstyled:h,attributes:b,vars:a,varsResolver:aI});return g?v.jsx(fe,{...k("root"),...w,children:g}):v.jsx(fe,{...k("root"),component:d[r],variant:p,size:t,...w})});Zt.defaultLoaders=rI;Zt.classes=Ba;Zt.varsResolver=aI;Zt.displayName="@mantine/core/Loader";var Hf={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const kE={orientation:"horizontal"},oI=(e,{borderWidth:n})=>({group:{"--ai-border-width":ve(n)}}),Py=Pe(e=>{const n=ye("ActionIconGroup",kE,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:u,borderWidth:f,variant:h,mod:d,attributes:p,...g}=ye("ActionIconGroup",kE,e);return v.jsx(fe,{...Ze({name:"ActionIconGroup",props:n,classes:Hf,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:u,varsResolver:oI,rootSelector:"group"})("group"),variant:h,mod:[{"data-orientation":l},d],role:"group",...g})});Py.classes=Hf;Py.varsResolver=oI;Py.displayName="@mantine/core/ActionIconGroup";const sI=(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":Ln(o,"section-height"),"--section-padding-x":Ln(o,"section-padding-x"),"--section-fz":ai(o),"--section-radius":n===void 0?void 0:qt(n),"--section-bg":t||r?l.background:void 0,"--section-color":l.color,"--section-bd":t||r?l.border:void 0}}},Ny=Pe(e=>{const n=ye("ActionIconGroupSection",null,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,vars:l,variant:u,gradient:f,radius:h,autoContrast:d,attributes:p,...g}=n;return v.jsx(fe,{...Ze({name:"ActionIconGroupSection",props:n,classes:Hf,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:sI,rootSelector:"groupSection"})("groupSection"),variant:u,...g})});Ny.classes=Hf;Ny.varsResolver=sI;Ny.displayName="@mantine/core/ActionIconGroupSection";const lI=(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":Ln(n,"ai-size"),"--ai-radius":t===void 0?void 0:qt(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}}},Jn=ki(e=>{const n=ye("ActionIcon",null,e),{className:t,unstyled:i,variant:r,classNames:a,styles:o,style:l,loading:u,loaderProps:f,size:h,color:d,radius:p,__staticSelector:g,gradient:b,vars:w,children:k,disabled:_,"data-disabled":S,autoContrast:j,mod:T,attributes:A,...O}=n,M=Ze({name:["ActionIcon",g],props:n,className:t,style:l,classes:Hf,classNames:a,styles:o,unstyled:i,attributes:A,vars:w,varsResolver:lI});return v.jsxs(Et,{...M("root",{active:!_&&!u&&!S}),...O,unstyled:i,variant:r,size:h,disabled:_||u,mod:[{loading:u,disabled:_||S},T],children:[typeof u=="boolean"&&v.jsx(ls,{mounted:u,transition:"slide-down",duration:150,children:$=>v.jsx(fe,{component:"span",...M("loader",{style:$}),"aria-hidden":!0,children:v.jsx(Zt,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...f})})}),v.jsx(fe,{component:"span",mod:{loading:u},...M("icon"),children:k})]})});Jn.classes=Hf;Jn.varsResolver=lI;Jn.displayName="@mantine/core/ActionIcon";Jn.Group=Py;Jn.GroupSection=Ny;function uI({size:e="var(--cb-icon-size, 70%)",style:n,...t}){return v.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...n,width:e,height:e},...t,children:v.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"})})}uI.displayName="@mantine/core/CloseIcon";var cI={root:"m_86a44da5","root--subtle":"m_220c80f2"};const LJ={variant:"subtle"},fI=(e,{size:n,radius:t,iconSize:i})=>({root:{"--cb-size":Ln(n,"cb-size"),"--cb-radius":t===void 0?void 0:qt(t),"--cb-icon-size":ve(i)}}),jl=ki(e=>{const n=ye("CloseButton",LJ,e),{iconSize:t,children:i,vars:r,radius:a,className:o,classNames:l,style:u,styles:f,unstyled:h,"data-disabled":d,disabled:p,variant:g,icon:b,mod:w,attributes:k,__staticSelector:_,...S}=n,j=Ze({name:_||"CloseButton",props:n,className:o,style:u,classes:cI,classNames:l,styles:f,unstyled:h,attributes:k,vars:r,varsResolver:fI});return v.jsxs(Et,{...S,unstyled:h,variant:g,disabled:p,mod:[{disabled:p||d},w],...j("root",{variant:g,active:!p&&!d}),children:[b||v.jsx(uI,{}),i]})});jl.classes=cI;jl.varsResolver=fI;jl.displayName="@mantine/core/CloseButton";function IJ(e){return x.Children.toArray(e).filter(Boolean)}var dI={root:"m_4081bf90"};const BJ={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},hI=(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":Yt(i),"--group-align":r,"--group-justify":a,"--group-wrap":o}}),Ee=Pe(e=>{const n=ye("Group",BJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,children:l,gap:u,align:f,justify:h,wrap:d,grow:p,preventGrowOverflow:g,vars:b,variant:w,__size:k,mod:_,attributes:S,...j}=n,T=IJ(l),A=T.length,O=Yt(u??"md");return v.jsx(fe,{...Ze({name:"Group",props:n,stylesCtx:{childWidth:`calc(${100/A}% - (${O} - ${O} / ${A}))`},className:i,style:r,classes:dI,classNames:t,styles:a,unstyled:o,attributes:S,vars:b,varsResolver:hI})("root"),variant:w,mod:[{grow:p},_],size:k,...j,children:T})});Ee.classes=dI;Ee.varsResolver=hI;Ee.displayName="@mantine/core/Group";const[FJ,gs]=Ar("ModalBase component was not found in tree");function qJ({opened:e,transitionDuration:n}){const[t,i]=x.useState(e),r=x.useRef(-1),a=eC()?0:n;return x.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 HJ({id:e,transitionProps:n,opened:t,trapFocus:i,closeOnEscape:r,onClose:a,returnFocus:o}){const l=Pi(e),[u,f]=x.useState(!1),[h,d]=x.useState(!1),p=qJ({opened:t,transitionDuration:typeof(n==null?void 0:n.duration)=="number"?n==null?void 0:n.duration:200});return qz("keydown",g=>{var b;g.key==="Escape"&&r&&!g.isComposing&&t&&((b=g.target)==null?void 0:b.getAttribute("data-mantine-stop-propagation"))!=="true"&&a()},{capture:!0}),Lz({opened:t,shouldReturnFocus:i&&o}),{_id:l,titleMounted:u,bodyMounted:h,shouldLockScroll:p,setTitleMounted:f,setBodyMounted:d}}var to=function(){return to=Object.assign||function(n){for(var t,i=1,r=arguments.length;i"u")return oee;var n=see(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])}},uee=gI(),Zc="data-scroll-locked",cee=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(VJ,` { +${o?`${l("light")}{${o}}`:""}`}function Zv({theme:e,color:n,colorScheme:t,name:i=n,withColorValues:r=!0}){if(!e.colors[n])return{};if(t==="light"){const l=dm(e,"light"),u={[`--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`]:HT(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],...u}:u}const a=dm(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`]:vu(e.colors[n][9],.5),[`--mantine-color-${i}-light-hover`]:vu(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`]:HT(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 GX(e){return!!e&&typeof e=="object"&&"mantine-virtual-color"in e}function su(e,n,t){$t(n).forEach(i=>Object.assign(e,{[`--mantine-${t}-${i}`]:n[i]}))}const Jz=e=>{const n=dm(e,"light"),t=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:ve(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":UT(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":UT(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)"}};su(i.variables,e.breakpoints,"breakpoint"),su(i.variables,e.spacing,"spacing"),su(i.variables,e.fontSizes,"font-size"),su(i.variables,e.lineHeights,"line-height"),su(i.variables,e.shadows,"shadow"),su(i.variables,e.radius,"radius"),su(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})`}),$t(e.colors).forEach(a=>{const o=e.colors[a];if(GX(o)){Object.assign(i.light,Zv({theme:e,name:o.name,color:o.light,colorScheme:"light",withColorValues:!0})),Object.assign(i.dark,Zv({theme:e,name:o.name,color:o.dark,colorScheme:"dark",withColorValues:!0}));return}o.forEach((l,u)=>{i.variables[`--mantine-color-${a}-${u}`]=l}),Object.assign(i.light,Zv({theme:e,color:a,colorScheme:"light",withColorValues:!1})),Object.assign(i.dark,Zv({theme:e,color:a,colorScheme:"dark",withColorValues:!1}))});const r=e.headings.sizes;return $t(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 YX(){const e=ci(),n=tC(),t=$t(e.breakpoints).reduce((i,r)=>{const a=e.breakpoints[r].includes("px"),o=lm(e.breakpoints[r]);return`${i}@media (max-width: ${a?`${o-.1}px`:Vg(o-.1)}) {.mantine-visible-from-${r} {display: none !important;}}@media (min-width: ${a?`${o}px`:Vg(o)}) {.mantine-hidden-from-${r} {display: none !important;}}`},"");return v.jsx("style",{"data-mantine-styles":"classes",nonce:n==null?void 0:n(),dangerouslySetInnerHTML:{__html:t}})}function KX({theme:e,generator:n}){const t=Jz(e),i=n==null?void 0:n(e);return i?Y6(t,i):t}const xk=Jz(iC);function XX(e){const n={variables:{},light:{},dark:{}};return $t(e.variables).forEach(t=>{xk.variables[t]!==e.variables[t]&&(n.variables[t]=e.variables[t])}),$t(e.light).forEach(t=>{xk.light[t]!==e.light[t]&&(n.light[t]=e.light[t])}),$t(e.dark).forEach(t=>{xk.dark[t]!==e.dark[t]&&(n.dark[t]=e.dark[t])}),n}function ZX(e){return Qz({variables:{},dark:{"--mantine-color-scheme":"dark"},light:{"--mantine-color-scheme":"light"}},e)}function eL({cssVariablesSelector:e,deduplicateCssVariables:n}){const t=ci(),i=tC(),r=KX({theme:t,generator:NX()}),a=(e===void 0||e===":root"||e===":host")&&n,o=Qz(a?XX(r):r,e);return o?v.jsx("style",{"data-mantine-styles":!0,nonce:i==null?void 0:i(),dangerouslySetInnerHTML:{__html:`${o}${a?"":ZX(e)}`}}):null}eL.displayName="@mantine/CssVariables";function QX({respectReducedMotion:e,getRootElement:n}){ps(()=>{var t;e&&((t=n())==null||t.setAttribute("data-respect-reduced-motion","true"))},[e])}function nL({theme:e,children:n,getStyleNonce:t,withStaticClasses:i=!0,withGlobalClasses:r=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:l,classNamesPrefix:u="mantine",colorSchemeManager:f=OX(),defaultColorScheme:h="light",getRootElement:d=()=>document.documentElement,cssVariablesResolver:p,forceColorScheme:g,stylesTransform:b,env:w,deduplicateInlineStyles:k=!1}){const{colorScheme:_,setColorScheme:S,clearColorScheme:j}=qX({defaultColorScheme:h,forceColorScheme:g,manager:f,getRootElement:d});return QX({respectReducedMotion:(e==null?void 0:e.respectReducedMotion)||!1,getRootElement:d}),v.jsx(Xz,{value:{colorScheme:_,setColorScheme:S,clearColorScheme:j,getRootElement:d,classNamesPrefix:u,getStyleNonce:t,cssVariablesResolver:p,cssVariablesSelector:l??":root",withStaticClasses:i,stylesTransform:b,env:w,deduplicateInlineStyles:k},children:v.jsxs(Zz,{theme:e,children:[o&&v.jsx(eL,{cssVariablesSelector:l,deduplicateCssVariables:a}),r&&v.jsx(YX,{}),n]})})}nL.displayName="@mantine/core/MantineProvider";function ye(e,n,t){var o;const i=ci(),r=(o=i.components[e])==null?void 0:o.defaultProps,a=typeof r=="function"?r(i):r;return{...n,...a,...Bu(t)}}function Wi({classNames:e,styles:n,props:t,stylesCtx:i}){const r=ci();return{resolvedClassNames:e===void 0?void 0:fm({theme:r,classNames:e,props:t,stylesCtx:i||void 0}),resolvedStyles:n===void 0?void 0:Gg({theme:r,styles:n,props:t,stylesCtx:i||void 0})}}const JX={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function eZ({theme:e,options:n,unstyled:t}){return vn((n==null?void 0:n.focusable)&&!t&&(e.focusClassName||JX[e.focusRing]),(n==null?void 0:n.active)&&!t&&e.activeClassName)}function nZ({selector:e,stylesCtx:n,options:t,props:i,theme:r}){return fm({theme:r,classNames:t==null?void 0:t.classNames,props:(t==null?void 0:t.props)||i,stylesCtx:n})[e]}function tZ({selector:e,stylesCtx:n,theme:t,classNames:i,props:r}){return fm({theme:t,classNames:i,props:r,stylesCtx:n})[e]}function iZ({rootSelector:e,selector:n,className:t}){return e===n?t:void 0}function rZ({selector:e,classes:n,unstyled:t}){return t?void 0:n[e]}function aZ({themeName:e,classNamesPrefix:n,selector:t,withStaticClass:i}){return i===!1?[]:e.map(r=>`${n}-${r}-${t}`)}function oZ({options:e,classes:n,selector:t,unstyled:i}){return e!=null&&e.variant&&!i?n[`${t}--${e.variant}`]:void 0}function sZ({theme:e,options:n,themeName:t,selector:i,classNamesPrefix:r,resolvedClassNames:a,resolvedThemeClassNames:o,classes:l,unstyled:u,className:f,rootSelector:h,props:d,stylesCtx:p,withStaticClasses:g,headless:b,transformedStyles:w}){return vn(eZ({theme:e,options:n,unstyled:u||b}),o.map(k=>k[i]),oZ({options:n,classes:l,selector:i,unstyled:u||b}),a[i],tZ({selector:i,stylesCtx:p,theme:e,classNames:w,props:d}),nZ({selector:i,stylesCtx:p,options:n,props:d,theme:e}),iZ({rootSelector:h,selector:i,className:f}),rZ({selector:i,classes:l,unstyled:u||b}),g&&!b&&aZ({themeName:t,classNamesPrefix:r,selector:i,withStaticClass:n==null?void 0:n.withStaticClass}),n==null?void 0:n.className)}function aC({style:e,theme:n}){return Array.isArray(e)?e.reduce((t,i)=>({...t,...aC({style:i,theme:n})}),{}):typeof e=="function"?e(n):e??{}}function lZ({theme:e,selector:n,options:t,props:i,stylesCtx:r,rootSelector:a,withStylesTransform:o,resolvedStyles:l,resolvedThemeStyles:u,resolvedVars:f,resolvedRootStyle:h}){return{...u[n],...l[n],...!o&&Gg({theme:e,styles:t==null?void 0:t.styles,props:(t==null?void 0:t.props)||i,stylesCtx:r})[n],...f[n],...a===n?h:null,...aC({style:t==null?void 0:t.style,theme:e})}}function uZ(e){return e.reduce((n,t)=>(t&&Object.keys(t).forEach(i=>{n[i]={...n[i],...Bu(t[i])}}),n),{})}function cZ({props:e,stylesCtx:n,themeName:t,theme:i}){var o;const r=(o=BX())==null?void 0:o();return{getTransformedStyles:l=>r?[...l.map(u=>r(u,{props:e,theme:i,ctx:n})),...t.map(u=>{var f;return r((f=i.components[u])==null?void 0:f.styles,{props:e,theme:i,ctx:n})})].filter(Boolean):[],withStylesTransform:!!r}}function Ze({name:e,classes:n,props:t,stylesCtx:i,className:r,style:a,rootSelector:o="root",unstyled:l,classNames:u,styles:f,vars:h,varsResolver:d,attributes:p}){var P;const g=ci(),b=$X(),w=zX(),k=LX(),_=(Array.isArray(e)?e:[e]).filter(L=>L),{withStylesTransform:S,getTransformedStyles:j}=cZ({props:t,stylesCtx:i,themeName:_,theme:g}),T=fm({theme:g,classNames:u,props:t,stylesCtx:i}),A=_.map(L=>{var U;return fm({theme:g,classNames:(U=g.components[L])==null?void 0:U.classNames,props:t,stylesCtx:i})}),O=S?{}:Gg({theme:g,styles:f,props:t,stylesCtx:i}),M={};if(!S)for(const L of _){const U=Gg({theme:g,styles:(P=g.components[L])==null?void 0:P.styles,props:t,stylesCtx:i});for(const G of Object.keys(U))M[G]={...M[G],...U[G]}}const $=uZ([k?{}:d==null?void 0:d(g,t,i),..._.map(L=>{var U,G,B;return(B=(G=(U=g.components)==null?void 0:U[L])==null?void 0:G.vars)==null?void 0:B.call(G,g,t,i)}),h==null?void 0:h(g,t,i)]),q=aC({style:a,theme:g});return(L,U)=>({...p==null?void 0:p[L],className:sZ({theme:g,options:U,themeName:_,selector:L,classNamesPrefix:b,resolvedClassNames:T,resolvedThemeClassNames:A,classes:n,unstyled:l,className:r,rootSelector:o,props:t,stylesCtx:i,withStaticClasses:w,headless:k,transformedStyles:j([U==null?void 0:U.styles,f])}),style:lZ({theme:g,selector:L,options:U,props:t,stylesCtx:i,rootSelector:o,withStylesTransform:S,resolvedStyles:O,resolvedThemeStyles:M,resolvedVars:$,resolvedRootStyle:q})})}function Yh(e){return $t(e).reduce((n,t)=>e[t]!==void 0?`${n}${XK(t)}:${e[t]};`:n,"").trim()}function fZ({selector:e,styles:n,media:t,container:i}){const r=n?Yh(n):"",a=Array.isArray(t)?t.map(l=>`@media${l.query}{${e}{${Yh(l.styles)}}}`):[],o=Array.isArray(i)?i.map(l=>`@container ${l.query}{${e}{${Yh(l.styles)}}}`):[];return`${r?`${e}{${r}}`:""}${a.join("")}${o.join("")}`.trim()}function dZ(e){let n=5381;for(let t=0;t>>0).toString(36)}function Bf({deduplicate:e,...n}){const t=tC(),i=fZ(n);return e?v.jsx("style",{href:`mantine-${dZ(i)}`,precedence:"mantine",nonce:t==null?void 0:t(),children:i}):v.jsx("style",{"data-mantine-styles":"inline",nonce:t==null?void 0:t(),dangerouslySetInnerHTML:{__html:i}})}function hZ(e){let n=5381;for(let t=0;t>>0).toString(36)}function mZ(e,n){return`__mdi__-${hZ(`${e?Yh(e):""}|${Array.isArray(n)?n.map(t=>`${t.query}:${Yh(t.styles)}`).join("|"):""}`)}`}function Fu(e){const{m:n,mx:t,my:i,mt:r,mb:a,ml:o,mr:l,me:u,ms:f,mis:h,mie:d,p,px:g,py:b,pt:w,pb:k,pl:_,pr:S,pe:j,ps:T,pis:A,pie:O,bd:M,bdrs:$,bg:q,c:P,opacity:L,ff:U,fz:G,fw:B,lts:R,ta:D,lh:z,fs:H,tt:Y,td:N,w:W,miw:V,maw:I,h:Q,mih:ie,mah:re,bgsz:Z,bgp:le,bgr:ee,bga:se,pos:ke,top:te,left:$e,bottom:xe,right:Ae,inset:ze,display:we,flex:Ce,hiddenFrom:Ne,visibleFrom:he,lightHidden:He,darkHidden:Ye,sx:We,...Qe}=e;return{styleProps:Bu({m:n,mx:t,my:i,mt:r,mb:a,ml:o,mr:l,me:u,ms:f,mis:h,mie:d,p,px:g,py:b,pt:w,pb:k,pl:_,pr:S,pis:A,pie:O,pe:j,ps:T,bd:M,bg:q,c:P,opacity:L,ff:U,fz:G,fw:B,lts:R,ta:D,lh:z,fs:H,tt:Y,td:N,w:W,miw:V,maw:I,h:Q,mih:ie,mah:re,bgsz:Z,bgp:le,bgr:ee,bga:se,pos:ke,top:te,left:$e,bottom:xe,right:Ae,inset:ze,display:we,flex:Ce,bdrs:$,hiddenFrom:Ne,visibleFrom:he,lightHidden:He,darkHidden:Ye,sx:We}),rest:Qe}}const pZ={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 oC(e,n){const t=vs({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 vZ(e,n){const t=vs({color:e,theme:n});return t.isThemeColor&&t.shade===void 0?`var(--mantine-color-${t.color}-text)`:oC(e,n)}function gZ(e,n){if(typeof e=="number")return ve(e);if(typeof e=="string"){const[t,i,...r]=e.split(" ").filter(o=>o.trim()!=="");let a=`${ve(t)}`;return i&&(a+=` ${i}`),r.length>0&&(a+=` ${oC(r.join(" "),n)}`),a.trim()}return e}const YT={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 yZ(e){return typeof e=="string"&&e in YT?YT[e]:e}const bZ=["h1","h2","h3","h4","h5","h6"];function wZ(e,n){return typeof e=="string"&&e in n.fontSizes?`var(--mantine-font-size-${e})`:typeof e=="string"&&bZ.includes(e)?`var(--mantine-${e}-font-size)`:typeof e=="number"||typeof e=="string"?ve(e):e}function kZ(e){return e}const _Z=["h1","h2","h3","h4","h5","h6"];function xZ(e,n){return typeof e=="string"&&e in n.lineHeights?`var(--mantine-line-height-${e})`:typeof e=="string"&&_Z.includes(e)?`var(--mantine-${e}-line-height)`:e}function SZ(e,n){return typeof e=="string"&&e in n.radius?`var(--mantine-radius-${e})`:typeof e=="number"||typeof e=="string"?ve(e):e}function CZ(e){return typeof e=="number"?ve(e):e}function jZ(e,n){if(typeof e=="number")return ve(e);if(typeof e=="string"){const t=e.replace("-","");if(!(t in n.spacing))return ve(e);const i=`--mantine-spacing-${t}`;return e.startsWith("-")?`calc(var(${i}) * -1)`:`var(${i})`}return e}const Sk={color:oC,textColor:vZ,fontSize:wZ,spacing:jZ,radius:SZ,identity:kZ,size:CZ,lineHeight:xZ,fontFamily:yZ,border:gZ};function KT(e){return e.replace("(min-width: ","").replace("em)","")}function AZ({media:e,...n}){const t=Object.keys(e).sort((i,r)=>Number(KT(i))-Number(KT(r))).map(i=>({query:i,styles:e[i]}));return{...n,media:t}}function OZ(e){if(typeof e!="object"||e===null)return!1;const n=Object.keys(e);return!(n.length===1&&n[0]==="base")}function TZ(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function EZ(e){return typeof e=="object"&&e!==null?$t(e).filter(n=>n!=="base"):[]}function MZ(e,n){return typeof e=="object"&&e!==null&&n in e?e[n]:e}function DZ({styleProps:e,data:n,theme:t}){return AZ($t(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=TZ(e[r]);if(!OZ(e[r]))return o.forEach(f=>{i.inlineStyles[f]=Sk[a.type](l,t)}),i;i.hasResponsiveStyles=!0;const u=EZ(e[r]);return o.forEach(f=>{l!=null&&(i.styles[f]=Sk[a.type](l,t)),u.forEach(h=>{const d=`(min-width: ${t.breakpoints[h]})`;i.media[d]={...i.media[d],[f]:Sk[a.type](MZ(e[r],h),t)}})}),i},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function Sy(){return`__m__-${x.useId().replace(/[:«»]/g,"")}`}function tL(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...tL(i,n)}),{}):typeof e=="function"?e(n):e??{}}function RZ(e){return e}const PZ=RZ;function iL(e){return e}function Pe(e){const n=e;return n.extend=iL,n.withProps=t=>{const i=r=>v.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n}function sp(e){return Pe(e)}function ki(e){const n=e;return n.withProps=t=>{const i=r=>v.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n.extend=iL,n}function rL(e){return`data-${(e.startsWith("data-")?e.slice(5):e).replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`}function NZ(e){return Object.keys(e).reduce((n,t)=>{const i=e[t];return i===void 0||i===""||i===!1||i===null||(n[rL(t)]=e[t]),n},{})}function aL(e){return e?typeof e=="string"?{[rL(e)]:!0}:Array.isArray(e)?[...e].reduce((n,t)=>({...n,...aL(t)}),{}):NZ(e):null}function TS(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...TS(i,n)}),{}):typeof e=="function"?e(n):e??{}}function $Z({theme:e,style:n,vars:t,styleProps:i}){const r=TS(n,e),a=TS(t,e);return{...r,...a,...i}}function oL({component:e,style:n,__vars:t,className:i,variant:r,mod:a,size:o,hiddenFrom:l,visibleFrom:u,lightHidden:f,darkHidden:h,renderRoot:d,__size:p,ref:g,...b}){var q,P;const w=ci(),k=e||"div",{styleProps:_,rest:S}=Fu(b),j=(P=(q=IX())==null?void 0:q())==null?void 0:P(_.sx),T=Sy(),A=DZ({styleProps:_,theme:w,data:pZ}),O=FX(),M=O&&A.hasResponsiveStyles?mZ(A.styles,A.media):T,$={ref:g,style:$Z({theme:w,style:n,vars:t,styleProps:A.inlineStyles}),className:vn(i,j,{[M]:A.hasResponsiveStyles,"mantine-light-hidden":f,"mantine-dark-hidden":h,[`mantine-hidden-from-${l}`]:l,[`mantine-visible-from-${u}`]:u}),"data-variant":r,"data-size":zz(o)?void 0:o||void 0,size:p,...aL(a),...S};return v.jsxs(v.Fragment,{children:[A.hasResponsiveStyles&&v.jsx(Bf,{selector:`.${M}`,styles:A.styles,media:A.media,deduplicate:O}),typeof d=="function"?d($):v.jsx(k,{...$})]})}oL.displayName="@mantine/core/Box";const fe=PZ(oL),zZ=x.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function qu(){return x.use(zZ)}const[LZ,Sa]=Ar("ScrollArea.Root component was not found in tree");function bl(e,n){const t=x.useEffectEvent(n);ps(()=>{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 IZ(e){const{style:n,...t}=e,i=Sa(),[r,a]=x.useState(0),[o,l]=x.useState(0),u=!!(r&&o);return bl(i.scrollbarX,()=>{var h;const f=((h=i.scrollbarX)==null?void 0:h.offsetHeight)||0;i.onCornerHeightChange(f),l(f)}),bl(i.scrollbarY,()=>{var h;const f=((h=i.scrollbarY)==null?void 0:h.offsetWidth)||0;i.onCornerWidthChange(f),a(f)}),u?v.jsx("div",{...t,style:{...n,width:r,height:o}}):null}function BZ(e){const n=Sa(),t=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&t?v.jsx(IZ,{...e}):null}const FZ={scrollHideDelay:1e3,type:"hover"};function sL(e){const{type:n,scrollHideDelay:t,scrollbars:i,getStyles:r,ref:a,...o}=ye("ScrollAreaRoot",FZ,e),[l,u]=x.useState(null),[f,h]=x.useState(null),[d,p]=x.useState(null),[g,b]=x.useState(null),[w,k]=x.useState(null),[_,S]=x.useState(0),[j,T]=x.useState(0),[A,O]=x.useState(!1),[M,$]=x.useState(!1),q=Ht(a,P=>u(P));return v.jsx(LZ,{value:{type:n,scrollHideDelay:t,scrollArea:l,viewport:f,onViewportChange:h,content:d,onContentChange:p,scrollbarX:g,onScrollbarXChange:b,scrollbarXEnabled:A,onScrollbarXEnabledChange:O,scrollbarY:w,onScrollbarYChange:k,scrollbarYEnabled:M,onScrollbarYEnabledChange:$,onCornerWidthChange:S,onCornerHeightChange:T,getStyles:r},children:v.jsx(fe,{...o,ref:q,__vars:{"--sa-corner-width":i!=="xy"?"0px":`${_}px`,"--sa-corner-height":i!=="xy"?"0px":`${j}px`}})})}sL.displayName="@mantine/core/ScrollAreaRoot";function lL(e,n){const t=e/n;return Number.isNaN(t)?0:t}function Cy(e){const n=lL(e.viewport,e.content),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-t)*n;return Math.max(i,18)}function uL(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 qZ(e,[n,t]){return Math.min(t,Math.max(n,e))}function XT(e,n,t="ltr"){const i=Cy(n),r=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,a=n.scrollbar.size-r,o=n.content-n.viewport,l=a-i,u=qZ(e,t==="ltr"?[0,o]:[o*-1,0]);return uL([0,o],[0,l])(u)}function HZ(e,n,t,i="ltr"){const r=Cy(t),a=r/2,o=n||a,l=r-o,u=t.scrollbar.paddingStart+o,f=t.scrollbar.size-t.scrollbar.paddingEnd-l,h=t.content-t.viewport,d=i==="ltr"?[0,h]:[h*-1,0];return uL([u,f],d)(e)}function cL(e,n){return e>0&&e{e==null||e(i),(t===!1||!i.defaultPrevented)&&(n==null||n(i))}}const[UZ,fL]=Ar("ScrollAreaScrollbar was not found in tree");function dL(e){const{sizes:n,hasThumb:t,onThumbChange:i,onThumbPointerUp:r,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:l,onWheelScroll:u,onResize:f,ref:h,...d}=e,p=Sa(),[g,b]=x.useState(null),w=Ht(h,$=>b($)),k=x.useRef(null),_=x.useRef(""),{viewport:S}=p,j=n.content-n.viewport,T=x.useEffectEvent(u),A=zh(o),O=_y(f,10),M=$=>{k.current&&l({x:$.clientX-k.current.left,y:$.clientY-k.current.top})};return x.useEffect(()=>{const $=q=>{const P=q.target;g!=null&&g.contains(P)&&T(q,j)};return document.addEventListener("wheel",$,{passive:!1}),()=>document.removeEventListener("wheel",$,{passive:!1})},[S,g,j]),x.useEffect(A,[n,A]),bl(g,O),bl(p.content,O),v.jsx(UZ,{value:{scrollbar:g,hasThumb:t,onThumbChange:zh(i),onThumbPointerUp:zh(r),onThumbPositionChange:A,onThumbPointerDown:zh(a)},children:v.jsx("div",{...d,ref:w,"data-mantine-scrollbar":!0,style:{position:"absolute",...d.style},onPointerDown:Cu(e.onPointerDown,$=>{$.preventDefault(),$.button===0&&($.target.setPointerCapture($.pointerId),k.current=g.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",M($))}),onPointerMove:Cu(e.onPointerMove,M),onPointerUp:Cu(e.onPointerUp,$=>{const q=$.target;q.hasPointerCapture($.pointerId)&&($.preventDefault(),q.releasePointerCapture($.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,k.current=null}})})}const hL=e=>{const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=Sa(),[l,u]=x.useState(),f=x.useRef(null),h=Ht(r,f,o.onScrollbarXChange);return x.useEffect(()=>{f.current&&u(getComputedStyle(f.current))},[f]),v.jsx(dL,{"data-orientation":"horizontal",...a,ref:h,sizes:n,style:{...i,"--sa-thumb-width":`${Cy(n)}px`},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,p)=>{if(o.viewport){const g=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(g),cL(g,p)&&d.preventDefault()}},onResize:()=>{f.current&&o.viewport&&l&&t({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:Yg(l.paddingLeft),paddingEnd:Yg(l.paddingRight)}})}})};hL.displayName="@mantine/core/ScrollAreaScrollbarX";function mL(e){const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=Sa(),[l,u]=x.useState(),f=x.useRef(null),h=Ht(r,f,o.onScrollbarYChange);return x.useEffect(()=>{f.current&&u(window.getComputedStyle(f.current))},[]),v.jsx(dL,{...a,"data-orientation":"vertical",ref:h,sizes:n,style:{"--sa-thumb-height":`${Cy(n)}px`,...i},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,p)=>{if(o.viewport){const g=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(g),cL(g,p)&&d.preventDefault()}},onResize:()=>{f.current&&o.viewport&&l&&t({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:Yg(l.paddingTop),paddingEnd:Yg(l.paddingBottom)}})}})}mL.displayName="@mantine/core/ScrollAreaScrollbarY";function jy(e){const{orientation:n="vertical",...t}=e,{dir:i}=qu(),r=Sa(),a=x.useRef(null),o=x.useRef(0),[l,u]=x.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=lL(l.viewport,l.content),h={...t,sizes:l,onSizesChange:u,hasThumb:f>0&&f<1,onThumbChange:p=>{a.current=p},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:p=>{o.current=p}},d=(p,g)=>HZ(p,o.current,l,g);return n==="horizontal"?v.jsx(hL,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollLeft,g=XT(p,l,i);a.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollLeft=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollLeft=d(p,i))}}):n==="vertical"?v.jsx(mL,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollTop,g=XT(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, ${g}px, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollTop=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollTop=d(p))}}):null}jy.displayName="@mantine/core/ScrollAreaScrollbarVisible";function sC(e){const n=Sa(),{forceMount:t,...i}=e,[r,a]=x.useState(!1),o=e.orientation==="horizontal",l=_y(()=>{if(n.viewport){const u=n.viewport.offsetWidth{const{scrollArea:o}=i;let l=0;if(o){const u=()=>{window.clearTimeout(l),a(!0)},f=()=>{l=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return o.addEventListener("pointerenter",u),o.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),o.removeEventListener("pointerenter",u),o.removeEventListener("pointerleave",f)}}},[i.scrollArea,i.scrollHideDelay]),n||r?v.jsx(sC,{"data-state":r?"visible":"hidden",...t}):null}pL.displayName="@mantine/core/ScrollAreaScrollbarHover";function VZ(e){const{forceMount:n,...t}=e,i=Sa(),r=e.orientation==="horizontal",[a,o]=x.useState("hidden"),l=_y(()=>o("idle"),100);return x.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>o("hidden"),i.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,i.scrollHideDelay]),x.useEffect(()=>{const{viewport:u}=i,f=r?"scrollLeft":"scrollTop";if(u){let h=u[f];const d=()=>{const p=u[f];h!==p&&(o("scrolling"),l()),h=p};return u.addEventListener("scroll",d),()=>u.removeEventListener("scroll",d)}},[i.viewport,r,l]),n||a!=="hidden"?v.jsx(jy,{"data-state":a==="hidden"?"hidden":"visible",...t,onPointerEnter:Cu(e.onPointerEnter,()=>o("interacting")),onPointerLeave:Cu(e.onPointerLeave,()=>o("idle"))}):null}function ES(e){const{forceMount:n,...t}=e,i=Sa(),{onScrollbarXEnabledChange:r,onScrollbarYEnabledChange:a}=i,o=e.orientation==="horizontal";return x.useEffect(()=>(o?r(!0):a(!0),()=>{o?r(!1):a(!1)}),[o,r,a]),i.type==="hover"?v.jsx(pL,{...t,forceMount:n}):i.type==="scroll"?v.jsx(VZ,{...t,forceMount:n}):i.type==="auto"?v.jsx(sC,{...t,forceMount:n}):i.type==="always"?v.jsx(jy,{...t}):null}ES.displayName="@mantine/core/ScrollAreaScrollbar";function WZ(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 vL(e){const{style:n,ref:t,...i}=e,r=Sa(),a=fL(),{onThumbPositionChange:o}=a,l=Ht(t,h=>a.onThumbChange(h)),u=x.useRef(void 0),f=_y(()=>{u.current&&(u.current(),u.current=void 0)},100);return x.useEffect(()=>{const{viewport:h}=r;if(h){const d=()=>{f(),u.current||(u.current=WZ(h,o),o())};return o(),h.addEventListener("scroll",d),()=>h.removeEventListener("scroll",d)}},[r.viewport,f,o]),v.jsx("div",{"data-state":a.hasThumb?"visible":"hidden",...i,ref:l,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...n},onPointerDownCapture:Cu(e.onPointerDownCapture,h=>{const d=h.target.getBoundingClientRect(),p=h.clientX-d.left,g=h.clientY-d.top;a.onThumbPointerDown({x:p,y:g})}),onPointerUp:Cu(e.onPointerUp,a.onThumbPointerUp)})}vL.displayName="@mantine/core/ScrollAreaThumb";function MS(e){const{forceMount:n,...t}=e,i=fL();return n||i.hasThumb?v.jsx(vL,{...t}):null}MS.displayName="@mantine/core/ScrollAreaThumb";function gL({children:e,style:n,ref:t,onWheel:i,...r}){const a=Sa(),o=Ht(t,a.onViewportChange),l=u=>{if(i==null||i(u),a.scrollbarXEnabled&&a.viewport&&u.shiftKey){const{scrollTop:f,scrollHeight:h,clientHeight:d,scrollWidth:p,clientWidth:g}=a.viewport,b=f<1,w=f>=h-d-1;p>g&&(b||w)&&u.stopPropagation()}};return v.jsx(fe,{...r,ref:o,onWheel:l,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...n},children:v.jsx("div",{...a.getStyles("content"),ref:a.onContentChange,children:e})})}gL.displayName="@mantine/core/ScrollAreaViewport";var lC={root:"m_d57069b5",content:"m_b1336c6",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};function Ay(){return typeof window<"u"}function Ff(e){return yL(e)?(e.nodeName||"").toLowerCase():"#document"}function Cr(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function ko(e){var n;return(n=(yL(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function yL(e){return Ay()?e instanceof Node||e instanceof Cr(e).Node:!1}function Kt(e){return Ay()?e instanceof Element||e instanceof Cr(e).Element:!1}function Ca(e){return Ay()?e instanceof HTMLElement||e instanceof Cr(e).HTMLElement:!1}function DS(e){return!Ay()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Cr(e).ShadowRoot}function lp(e){const{overflow:n,overflowX:t,overflowY:i,display:r}=ka(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+t)&&r!=="inline"&&r!=="contents"}function GZ(e){return/^(table|td|th)$/.test(Ff(e))}function Oy(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const YZ=/transform|translate|scale|rotate|perspective|filter/,KZ=/paint|layout|strict|content/,lu=e=>!!e&&e!=="none";let Ck;function uC(e){const n=Kt(e)?ka(e):e;return lu(n.transform)||lu(n.translate)||lu(n.scale)||lu(n.rotate)||lu(n.perspective)||!Ty()&&(lu(n.backdropFilter)||lu(n.filter))||YZ.test(n.willChange||"")||KZ.test(n.contain||"")}function XZ(e){let n=ss(e);for(;Ca(n)&&!es(n);){if(uC(n))return n;if(Oy(n))return null;n=ss(n)}return null}function Ty(){return Ck==null&&(Ck=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ck}function es(e){return/^(html|body|#document)$/.test(Ff(e))}function ka(e){return Cr(e).getComputedStyle(e)}function Ey(e){return Kt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ss(e){if(Ff(e)==="html")return e;const n=e.assignedSlot||e.parentNode||DS(e)&&e.host||ko(e);return DS(n)?n.host:n}function bL(e){const n=ss(e);return es(n)?e.ownerDocument?e.ownerDocument.body:e.body:Ca(n)&&lp(n)?n:bL(n)}function ns(e,n,t){var i;n===void 0&&(n=[]),t===void 0&&(t=!0);const r=bL(e),a=r===((i=e.ownerDocument)==null?void 0:i.body),o=Cr(r);if(a){const l=RS(o);return n.concat(o,o.visualViewport||[],lp(r)?r:[],l&&t?ns(l):[])}else return n.concat(r,ns(r,[],t))}function RS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const ZZ=["top","right","bottom","left"],Ha=Math.min,Zi=Math.max,Kg=Math.round,Qv=Math.floor,ao=e=>({x:e,y:e}),QZ={left:"right",right:"left",bottom:"top",top:"bottom"};function PS(e,n,t){return Zi(e,Ha(n,t))}function fo(e,n){return typeof e=="function"?e(n):e}function Ua(e){return e.split("-")[0]}function qf(e){return e.split("-")[1]}function cC(e){return e==="x"?"y":"x"}function fC(e){return e==="y"?"height":"width"}function Ia(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function dC(e){return cC(Ia(e))}function JZ(e,n,t){t===void 0&&(t=!1);const i=qf(e),r=dC(e),a=fC(r);let o=r==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[a]>n.floating[a]&&(o=Xg(o)),[o,Xg(o)]}function eQ(e){const n=Xg(e);return[NS(e),n,NS(n)]}function NS(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const ZT=["left","right"],QT=["right","left"],nQ=["top","bottom"],tQ=["bottom","top"];function iQ(e,n,t){switch(e){case"top":case"bottom":return t?n?QT:ZT:n?ZT:QT;case"left":case"right":return n?nQ:tQ;default:return[]}}function rQ(e,n,t,i){const r=qf(e);let a=iQ(Ua(e),t==="start",i);return r&&(a=a.map(o=>o+"-"+r),n&&(a=a.concat(a.map(NS)))),a}function Xg(e){const n=Ua(e);return QZ[n]+e.slice(n.length)}function aQ(e){return{top:0,right:0,bottom:0,left:0,...e}}function hC(e){return typeof e!="number"?aQ(e):{top:e,right:e,bottom:e,left:e}}function of(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 oQ(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function sQ(){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 lQ(){return/apple/i.test(navigator.vendor)}function uQ(){return oQ().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function cQ(){return sQ().includes("jsdom/")}const JT="data-floating-ui-focusable",fQ="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function eE(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 hm(e,n){if(!e||!n)return!1;const t=n.getRootNode==null?void 0:n.getRootNode();if(e.contains(n))return!0;if(t&&DS(t)){let i=n;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Hc(e){return"composedPath"in e?e.composedPath()[0]:e.target}function jk(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 dQ(e){return e.matches("html,body")}function yu(e){return(e==null?void 0:e.ownerDocument)||document}function hQ(e){return Ca(e)&&e.matches(fQ)}function mQ(e){if(!e||cQ())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function pQ(e){return e?e.hasAttribute(JT)?e:e.querySelector("["+JT+"]")||e:null}function Mg(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,...Mg(e,r.id,t)])}function vQ(e){return"nativeEvent"in e}function $S(e,n){const t=["mouse","pen"];return t.push("",void 0),t.includes(e)}var gQ=typeof document<"u",yQ=function(){},oo=gQ?x.useLayoutEffect:yQ;const bQ={...Lz};function Jv(e){const n=x.useRef(e);return oo(()=>{n.current=e}),n}const wQ=bQ.useInsertionEffect,kQ=wQ||(e=>e());function no(e){const n=x.useRef(()=>{});return kQ(()=>{n.current=e}),x.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:_Q},u=await(o.isRTL==null?void 0:o.isRTL(n));let f=await o.getElementRects({reference:e,floating:n,strategy:r}),{x:h,y:d}=nE(f,i,u),p=i,g=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:u}=n,{element:f,padding:h=0}=fo(e,n)||{};if(f==null)return{};const d=hC(h),p={x:t,y:i},g=dC(r),b=fC(g),w=await o.getDimensions(f),k=g==="y",_=k?"top":"left",S=k?"bottom":"right",j=k?"clientHeight":"clientWidth",T=a.reference[b]+a.reference[g]-p[g]-a.floating[b],A=p[g]-a.reference[g],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(f));let M=O?O[j]:0;(!M||!await(o.isElement==null?void 0:o.isElement(O)))&&(M=l.floating[j]||a.floating[b]);const $=T/2-A/2,q=M/2-w[b]/2-1,P=Ha(d[_],q),L=Ha(d[S],q),U=P,G=M-w[b]-L,B=M/2-w[b]/2+$,R=PS(U,B,G),D=!u.arrow&&qf(r)!=null&&B!==R&&a.reference[b]/2-(BB<=0)){var L,U;const B=(((L=a.flip)==null?void 0:L.index)||0)+1,R=M[B];if(R&&(!(d==="alignment"?S!==Ia(R):!1)||P.every(H=>Ia(H.placement)===S?H.overflows[0]>0:!0)))return{data:{index:B,overflows:P},reset:{placement:R}};let D=(U=P.filter(z=>z.overflows[0]<=0).sort((z,H)=>z.overflows[1]-H.overflows[1])[0])==null?void 0:U.placement;if(!D)switch(g){case"bestFit":{var G;const z=(G=P.filter(H=>{if(O){const Y=Ia(H.placement);return Y===S||Y==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(Y=>Y>0).reduce((Y,N)=>Y+N,0)]).sort((H,Y)=>H[1]-Y[1])[0])==null?void 0:G[0];z&&(D=z);break}case"initialPlacement":D=l;break}if(r!==D)return{reset:{placement:D}}}return{}}}};function tE(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function iE(e){return ZZ.some(n=>e[n]>=0)}const AQ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:t,platform:i}=n,{strategy:r="referenceHidden",...a}=fo(e,n);switch(r){case"referenceHidden":{const o=await i.detectOverflow(n,{...a,elementContext:"reference"}),l=tE(o,t.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:iE(l)}}}case"escaped":{const o=await i.detectOverflow(n,{...a,altBoundary:!0}),l=tE(o,t.floating);return{data:{escapedOffsets:l,escaped:iE(l)}}}default:return{}}}}};function wL(e){const n=Ha(...e.map(a=>a.left)),t=Ha(...e.map(a=>a.top)),i=Zi(...e.map(a=>a.right)),r=Zi(...e.map(a=>a.bottom));return{x:n,y:t,width:i-n,height:r-t}}function OQ(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=>of(wL(r)))}const TQ=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:u,y:f}=fo(e,n),h=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(i.reference))||[]),d=OQ(h),p=of(wL(h)),g=hC(l);function b(){if(d.length===2&&d[0].left>d[1].right&&u!=null&&f!=null)return d.find(k=>u>k.left-g.left&&uk.top-g.top&&f=2){if(Ia(t)==="y"){const P=d[0],L=d[d.length-1],U=Ua(t)==="top",G=P.top,B=L.bottom,R=U?P.left:L.left,D=U?P.right:L.right,z=D-R,H=B-G;return{top:G,bottom:B,left:R,right:D,width:z,height:H,x:R,y:G}}const k=Ua(t)==="left",_=Zi(...d.map(P=>P.right)),S=Ha(...d.map(P=>P.left)),j=d.filter(P=>k?P.left===S:P.right===_),T=j[0].top,A=j[j.length-1].bottom,O=S,M=_,$=M-O,q=A-T;return{top:T,bottom:A,left:O,right:M,width:$,height:q,x:O,y:T}}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}}:{}}}},kL=new Set(["left","top"]);async function EQ(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=qf(t),u=Ia(t)==="y",f=kL.has(o)?-1:1,h=a&&u?-1:1,d=fo(n,e);let{mainAxis:p,crossAxis:g,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"&&(g=l==="end"?b*-1:b),u?{x:g*h,y:p*f}:{x:p*f,y:g*h}}const MQ=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,u=await EQ(n,e);return o===((t=l.offset)==null?void 0:t.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:r+u.x,y:a+u.y,data:{...u,placement:o}}}}},DQ=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:u={fn:_=>{let{x:S,y:j}=_;return{x:S,y:j}}},...f}=fo(e,n),h={x:t,y:i},d=await a.detectOverflow(n,f),p=Ia(Ua(r)),g=cC(p);let b=h[g],w=h[p];if(o){const _=g==="y"?"top":"left",S=g==="y"?"bottom":"right",j=b+d[_],T=b-d[S];b=PS(j,b,T)}if(l){const _=p==="y"?"top":"left",S=p==="y"?"bottom":"right",j=w+d[_],T=w-d[S];w=PS(j,w,T)}const k=u.fn({...n,[g]:b,[p]:w});return{...k,data:{x:k.x-t,y:k.y-i,enabled:{[g]:o,[p]:l}}}}}},RQ=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:u=!0,crossAxis:f=!0}=fo(e,n),h={x:t,y:i},d=Ia(r),p=cC(d);let g=h[p],b=h[d];const w=fo(l,n),k=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(u){const j=p==="y"?"height":"width",T=a.reference[p]-a.floating[j]+k.mainAxis,A=a.reference[p]+a.reference[j]-k.mainAxis;gA&&(g=A)}if(f){var _,S;const j=p==="y"?"width":"height",T=kL.has(Ua(r)),A=a.reference[d]-a.floating[j]+(T&&((_=o.offset)==null?void 0:_[d])||0)+(T?0:k.crossAxis),O=a.reference[d]+a.reference[j]+(T?0:((S=o.offset)==null?void 0:S[d])||0)-(T?k.crossAxis:0);bO&&(b=O)}return{[p]:g,[d]:b}}}},PQ=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:u=()=>{},...f}=fo(e,n),h=await o.detectOverflow(n,f),d=Ua(r),p=qf(r),g=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 S=w-h.top-h.bottom,j=b-h.left-h.right,T=Ha(w-h[k],S),A=Ha(b-h[_],j),O=!n.middlewareData.shift;let M=T,$=A;if((t=n.middlewareData.shift)!=null&&t.enabled.x&&($=j),(i=n.middlewareData.shift)!=null&&i.enabled.y&&(M=S),O&&!p){const P=Zi(h.left,0),L=Zi(h.right,0),U=Zi(h.top,0),G=Zi(h.bottom,0);g?$=b-2*(P!==0||L!==0?P+L:Zi(h.left,h.right)):M=w-2*(U!==0||G!==0?U+G:Zi(h.top,h.bottom))}await u({...n,availableWidth:$,availableHeight:M});const q=await o.getDimensions(l.floating);return b!==q.width||w!==q.height?{reset:{rects:!0}}:{}}}};function _L(e){const n=ka(e);let t=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const r=Ca(e),a=r?e.offsetWidth:t,o=r?e.offsetHeight:i,l=Kg(t)!==a||Kg(i)!==o;return l&&(t=a,i=o),{width:t,height:i,$:l}}function mC(e){return Kt(e)?e:e.contextElement}function Xc(e){const n=mC(e);if(!Ca(n))return ao(1);const t=n.getBoundingClientRect(),{width:i,height:r,$:a}=_L(n);let o=(a?Kg(t.width):t.width)/i,l=(a?Kg(t.height):t.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const NQ=ao(0);function xL(e){const n=Cr(e);return!Ty()||!n.visualViewport?NQ:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function $Q(e,n,t){return n===void 0&&(n=!1),!t||n&&t!==Cr(e)?!1:n}function Ou(e,n,t,i){n===void 0&&(n=!1),t===void 0&&(t=!1);const r=e.getBoundingClientRect(),a=mC(e);let o=ao(1);n&&(i?Kt(i)&&(o=Xc(i)):o=Xc(e));const l=$Q(a,t,i)?xL(a):ao(0);let u=(r.left+l.x)/o.x,f=(r.top+l.y)/o.y,h=r.width/o.x,d=r.height/o.y;if(a){const p=Cr(a),g=i&&Kt(i)?Cr(i):i;let b=p,w=RS(b);for(;w&&i&&g!==b;){const k=Xc(w),_=w.getBoundingClientRect(),S=ka(w),j=_.left+(w.clientLeft+parseFloat(S.paddingLeft))*k.x,T=_.top+(w.clientTop+parseFloat(S.paddingTop))*k.y;u*=k.x,f*=k.y,h*=k.x,d*=k.y,u+=j,f+=T,b=Cr(w),w=RS(b)}}return of({width:h,height:d,x:u,y:f})}function My(e,n){const t=Ey(e).scrollLeft;return n?n.left+t:Ou(ko(e)).left+t}function SL(e,n){const t=e.getBoundingClientRect(),i=t.left+n.scrollLeft-My(e,t),r=t.top+n.scrollTop;return{x:i,y:r}}function zQ(e){let{elements:n,rect:t,offsetParent:i,strategy:r}=e;const a=r==="fixed",o=ko(i),l=n?Oy(n.floating):!1;if(i===o||l&&a)return t;let u={scrollLeft:0,scrollTop:0},f=ao(1);const h=ao(0),d=Ca(i);if((d||!d&&!a)&&((Ff(i)!=="body"||lp(o))&&(u=Ey(i)),d)){const g=Ou(i);f=Xc(i),h.x=g.x+i.clientLeft,h.y=g.y+i.clientTop}const p=o&&!d&&!a?SL(o,u):ao(0);return{width:t.width*f.x,height:t.height*f.y,x:t.x*f.x-u.scrollLeft*f.x+h.x+p.x,y:t.y*f.y-u.scrollTop*f.y+h.y+p.y}}function LQ(e){return Array.from(e.getClientRects())}function IQ(e){const n=ko(e),t=Ey(e),i=e.ownerDocument.body,r=Zi(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),a=Zi(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let o=-t.scrollLeft+My(e);const l=-t.scrollTop;return ka(i).direction==="rtl"&&(o+=Zi(n.clientWidth,i.clientWidth)-r),{width:r,height:a,x:o,y:l}}const rE=25;function BQ(e,n){const t=Cr(e),i=ko(e),r=t.visualViewport;let a=i.clientWidth,o=i.clientHeight,l=0,u=0;if(r){a=r.width,o=r.height;const h=Ty();(!h||h&&n==="fixed")&&(l=r.offsetLeft,u=r.offsetTop)}const f=My(i);if(f<=0){const h=i.ownerDocument,d=h.body,p=getComputedStyle(d),g=h.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,b=Math.abs(i.clientWidth-d.clientWidth-g);b<=rE&&(a-=b)}else f<=rE&&(a+=f);return{width:a,height:o,x:l,y:u}}function FQ(e,n){const t=Ou(e,!0,n==="fixed"),i=t.top+e.clientTop,r=t.left+e.clientLeft,a=Ca(e)?Xc(e):ao(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,u=r*a.x,f=i*a.y;return{width:o,height:l,x:u,y:f}}function aE(e,n,t){let i;if(n==="viewport")i=BQ(e,t);else if(n==="document")i=IQ(ko(e));else if(Kt(n))i=FQ(n,t);else{const r=xL(e);i={x:n.x-r.x,y:n.y-r.y,width:n.width,height:n.height}}return of(i)}function CL(e,n){const t=ss(e);return t===n||!Kt(t)||es(t)?!1:ka(t).position==="fixed"||CL(t,n)}function qQ(e,n){const t=n.get(e);if(t)return t;let i=ns(e,[],!1).filter(l=>Kt(l)&&Ff(l)!=="body"),r=null;const a=ka(e).position==="fixed";let o=a?ss(e):e;for(;Kt(o)&&!es(o);){const l=ka(o),u=uC(o);!u&&l.position==="fixed"&&(r=null),(a?!u&&!r:!u&&l.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||lp(o)&&!u&&CL(e,o))?i=i.filter(h=>h!==o):r=l,o=ss(o)}return n.set(e,i),i}function HQ(e){let{element:n,boundary:t,rootBoundary:i,strategy:r}=e;const o=[...t==="clippingAncestors"?Oy(n)?[]:qQ(n,this._c):[].concat(t),i],l=aE(n,o[0],r);let u=l.top,f=l.right,h=l.bottom,d=l.left;for(let p=1;p{o(!1,1e-7)},1e3)}M===1&&!AL(f,e.getBoundingClientRect())&&o(),T=!1}try{t=new IntersectionObserver(A,{...j,root:r.ownerDocument})}catch{t=new IntersectionObserver(A,j)}t.observe(e)}return o(!0),a}function zS(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:u=!1}=i,f=mC(e),h=r||a?[...f?ns(f):[],...n?ns(n):[]]:[];h.forEach(_=>{r&&_.addEventListener("scroll",t,{passive:!0}),a&&_.addEventListener("resize",t)});const d=f&&l?KQ(f,t):null;let p=-1,g=null;o&&(g=new ResizeObserver(_=>{let[S]=_;S&&S.target===f&&g&&n&&(g.unobserve(n),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var j;(j=g)==null||j.observe(n)})),t()}),f&&!u&&g.observe(f),n&&g.observe(n));let b,w=u?Ou(e):null;u&&k();function k(){const _=Ou(e);w&&!AL(w,_)&&t(),w=_,b=requestAnimationFrame(k)}return t(),()=>{var _;h.forEach(S=>{r&&S.removeEventListener("scroll",t),a&&S.removeEventListener("resize",t)}),d==null||d(),(_=g)==null||_.disconnect(),g=null,u&&cancelAnimationFrame(b)}}const XQ=MQ,ZQ=DQ,QQ=jQ,JQ=PQ,eJ=AQ,sE=CQ,nJ=TQ,tJ=RQ,iJ=(e,n,t)=>{const i=new Map,r={platform:YQ,...t},a={...r.platform,_c:i};return SQ(e,n,{...r,platform:a})};var rJ=typeof document<"u",aJ=function(){},Dg=rJ?x.useLayoutEffect:aJ;function Zg(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(!Zg(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)&&!Zg(e[a],n[a]))return!1}return!0}return e!==e&&n!==n}function OL(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lE(e,n){const t=OL(e);return Math.round(n*t)/t}function Ok(e){const n=x.useRef(e);return Dg(()=>{n.current=e}),n}function oJ(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:u,open:f}=e,[h,d]=x.useState({x:0,y:0,strategy:t,placement:n,middlewareData:{},isPositioned:!1}),[p,g]=x.useState(i);Zg(p,i)||g(i);const[b,w]=x.useState(null),[k,_]=x.useState(null),S=x.useCallback(H=>{H!==O.current&&(O.current=H,w(H))},[]),j=x.useCallback(H=>{H!==M.current&&(M.current=H,_(H))},[]),T=a||b,A=o||k,O=x.useRef(null),M=x.useRef(null),$=x.useRef(h),q=u!=null,P=Ok(u),L=Ok(r),U=Ok(f),G=x.useCallback(()=>{if(!O.current||!M.current)return;const H={placement:n,strategy:t,middleware:p};L.current&&(H.platform=L.current),iJ(O.current,M.current,H).then(Y=>{const N={...Y,isPositioned:U.current!==!1};B.current&&!Zg($.current,N)&&($.current=N,sl.flushSync(()=>{d(N)}))})},[p,n,t,L,U]);Dg(()=>{f===!1&&$.current.isPositioned&&($.current.isPositioned=!1,d(H=>({...H,isPositioned:!1})))},[f]);const B=x.useRef(!1);Dg(()=>(B.current=!0,()=>{B.current=!1}),[]),Dg(()=>{if(T&&(O.current=T),A&&(M.current=A),T&&A){if(P.current)return P.current(T,A,G);G()}},[T,A,G,P,q]);const R=x.useMemo(()=>({reference:O,floating:M,setReference:S,setFloating:j}),[S,j]),D=x.useMemo(()=>({reference:T,floating:A}),[T,A]),z=x.useMemo(()=>{const H={position:t,left:0,top:0};if(!D.floating)return H;const Y=lE(D.floating,h.x),N=lE(D.floating,h.y);return l?{...H,transform:"translate("+Y+"px, "+N+"px)",...OL(D.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:Y,top:N}},[t,l,D.floating,h.x,h.y]);return x.useMemo(()=>({...h,update:G,refs:R,elements:D,floatingStyles:z}),[h,G,R,D,z])}const sJ=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?sE({element:i.current,padding:r}).fn(t):{}:i?sE({element:i,padding:r}).fn(t):{}}}},TL=(e,n)=>{const t=XQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},pC=(e,n)=>{const t=ZQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},uE=(e,n)=>({fn:tJ(e).fn,options:[e,n]}),Qg=(e,n)=>{const t=QQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},lJ=(e,n)=>{const t=JQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},uJ=(e,n)=>{const t=eJ(e);return{name:t.name,fn:t.fn,options:[e,n]}},Kh=(e,n)=>{const t=nJ(e);return{name:t.name,fn:t.fn,options:[e,n]}},EL=(e,n)=>{const t=sJ(e);return{name:t.name,fn:t.fn,options:[e,n]}};function ML(e){const n=x.useRef(void 0),t=x.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 x.useMemo(()=>e.every(i=>i==null)?null:i=>{n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=t(i))},e)}const cJ="data-floating-ui-focusable",cE="active",fE="selected",fJ={...Lz};let dE=!1,dJ=0;const hE=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+dJ++;function hJ(){const[e,n]=x.useState(()=>dE?hE():void 0);return oo(()=>{e==null&&n(hE())},[]),x.useEffect(()=>{dE=!0},[]),e}const mJ=fJ.useId,DL=mJ||hJ;function pJ(){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 vJ=x.createContext(null),gJ=x.createContext(null),vC=()=>{var e;return((e=x.useContext(vJ))==null?void 0:e.id)||null},gC=()=>x.useContext(gJ);function yC(e){return"data-floating-ui-"+e}function da(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const mE=yC("safe-polygon");function Rg(e,n,t){if(t&&!$S(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 Tk(e){return typeof e=="function"?e():e}function RL(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,dataRef:r,events:a,elements:o}=e,{enabled:l=!0,delay:u=0,handleClose:f=null,mouseOnly:h=!1,restMs:d=0,move:p=!0}=n,g=gC(),b=vC(),w=Jv(f),k=Jv(u),_=Jv(t),S=Jv(d),j=x.useRef(),T=x.useRef(-1),A=x.useRef(),O=x.useRef(-1),M=x.useRef(!0),$=x.useRef(!1),q=x.useRef(()=>{}),P=x.useRef(!1),L=no(()=>{var z;const H=(z=r.current.openEvent)==null?void 0:z.type;return(H==null?void 0:H.includes("mouse"))&&H!=="mousedown"});x.useEffect(()=>{if(!l)return;function z(H){let{open:Y}=H;Y||(da(T),da(O),M.current=!0,P.current=!1)}return a.on("openchange",z),()=>{a.off("openchange",z)}},[l,a]),x.useEffect(()=>{if(!l||!w.current||!t)return;function z(Y){L()&&i(!1,Y,"hover")}const H=yu(o.floating).documentElement;return H.addEventListener("mouseleave",z),()=>{H.removeEventListener("mouseleave",z)}},[o.floating,t,i,l,w,L]);const U=x.useCallback(function(z,H,Y){H===void 0&&(H=!0),Y===void 0&&(Y="hover");const N=Rg(k.current,"close",j.current);N&&!A.current?(da(T),T.current=window.setTimeout(()=>i(!1,z,Y),N)):H&&(da(T),i(!1,z,Y))},[k,i]),G=no(()=>{q.current(),A.current=void 0}),B=no(()=>{if($.current){const z=yu(o.floating).body;z.style.pointerEvents="",z.removeAttribute(mE),$.current=!1}}),R=no(()=>r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1);x.useEffect(()=>{if(!l)return;function z(V){if(da(T),M.current=!1,h&&!$S(j.current)||Tk(S.current)>0&&!Rg(k.current,"open"))return;const I=Rg(k.current,"open",j.current);I?T.current=window.setTimeout(()=>{_.current||i(!0,V,"hover")},I):t||i(!0,V,"hover")}function H(V){if(R()){B();return}q.current();const I=yu(o.floating);if(da(O),P.current=!1,w.current&&r.current.floatingContext){t||da(T),A.current=w.current({...r.current.floatingContext,tree:g,x:V.clientX,y:V.clientY,onClose(){B(),G(),R()||U(V,!0,"safe-polygon")}});const ie=A.current;I.addEventListener("mousemove",ie),q.current=()=>{I.removeEventListener("mousemove",ie)};return}(j.current==="touch"?!hm(o.floating,V.relatedTarget):!0)&&U(V)}function Y(V){R()||r.current.floatingContext&&(w.current==null||w.current({...r.current.floatingContext,tree:g,x:V.clientX,y:V.clientY,onClose(){B(),G(),R()||U(V)}})(V))}function N(){da(T)}function W(V){R()||U(V,!1)}if(Kt(o.domReference)){const V=o.domReference,I=o.floating;return t&&V.addEventListener("mouseleave",Y),p&&V.addEventListener("mousemove",z,{once:!0}),V.addEventListener("mouseenter",z),V.addEventListener("mouseleave",H),I&&(I.addEventListener("mouseleave",Y),I.addEventListener("mouseenter",N),I.addEventListener("mouseleave",W)),()=>{t&&V.removeEventListener("mouseleave",Y),p&&V.removeEventListener("mousemove",z),V.removeEventListener("mouseenter",z),V.removeEventListener("mouseleave",H),I&&(I.removeEventListener("mouseleave",Y),I.removeEventListener("mouseenter",N),I.removeEventListener("mouseleave",W))}}},[o,l,e,h,p,U,G,B,i,t,_,g,k,w,r,R,S]),oo(()=>{var z;if(l&&t&&(z=w.current)!=null&&(z=z.__options)!=null&&z.blockPointerEvents&&L()){$.current=!0;const Y=o.floating;if(Kt(o.domReference)&&Y){var H;const N=yu(o.floating).body;N.setAttribute(mE,"");const W=o.domReference,V=g==null||(H=g.nodesRef.current.find(I=>I.id===b))==null||(H=H.context)==null?void 0:H.elements.floating;return V&&(V.style.pointerEvents=""),N.style.pointerEvents="none",W.style.pointerEvents="auto",Y.style.pointerEvents="auto",()=>{N.style.pointerEvents="",W.style.pointerEvents="",Y.style.pointerEvents=""}}}},[l,t,b,o,g,w,L]),oo(()=>{t||(j.current=void 0,P.current=!1,G(),B())},[t,G,B]),x.useEffect(()=>()=>{G(),da(T),da(O),B()},[l,o.domReference,G,B]);const D=x.useMemo(()=>{function z(H){j.current=H.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(H){const{nativeEvent:Y}=H;function N(){!M.current&&!_.current&&i(!0,Y,"hover")}h&&!$S(j.current)||t||Tk(S.current)===0||P.current&&H.movementX**2+H.movementY**2<2||(da(O),j.current==="touch"?N():(P.current=!0,O.current=window.setTimeout(N,Tk(S.current))))}}},[h,i,t,_,S]);return x.useMemo(()=>l?{reference:D}:{},[l,D])}const LS=()=>{},PL=x.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:LS,setState:LS,isInstantPhase:!1}),yJ=()=>x.useContext(PL);function NL(e){const{children:n,delay:t,timeoutMs:i=0}=e,[r,a]=x.useReducer((u,f)=>({...u,...f}),{delay:t,timeoutMs:i,initialDelay:t,currentId:null,isInstantPhase:!1}),o=x.useRef(null),l=x.useCallback(u=>{a({currentId:u})},[]);return oo(()=>{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]),v.jsx(PL.Provider,{value:x.useMemo(()=>({...r,setState:a,setCurrentId:l}),[r,l]),children:n})}function $L(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,floatingId:r}=e,{id:a,enabled:o=!0}=n,l=a??r,u=yJ(),{currentId:f,setCurrentId:h,initialDelay:d,setState:p,timeoutMs:g}=u;return oo(()=>{o&&f&&(p({delay:{open:1,close:Rg(d,"close")}}),f!==l&&i(!1))},[o,l,i,p,f,d]),oo(()=>{function b(){i(!1),p({delay:d,currentId:null})}if(o&&f&&!t&&f===l){if(g){const w=window.setTimeout(b,g);return()=>{clearTimeout(w)}}b()}},[o,t,p,f,l,i,d,g]),oo(()=>{o&&(h===LS||!t||h(l))},[o,t,h,l]),u}const bJ={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},wJ={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},pE=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 zL(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,elements:r,dataRef:a}=e,{enabled:o=!0,escapeKey:l=!0,outsidePress:u=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:g,capture:b}=n,w=gC(),k=no(typeof u=="function"?u:()=>!1),_=typeof u=="function"?k:u,S=x.useRef(!1),{escapeKey:j,outsidePress:T}=pE(g),{escapeKey:A,outsidePress:O}=pE(b),M=x.useRef(!1),$=no(B=>{var R;if(!t||!o||!l||B.key!=="Escape"||M.current)return;const D=(R=a.current.floatingContext)==null?void 0:R.nodeId,z=w?Mg(w.nodesRef.current,D):[];if(!j&&(B.stopPropagation(),z.length>0)){let H=!0;if(z.forEach(Y=>{var N;if((N=Y.context)!=null&&N.open&&!Y.context.dataRef.current.__escapeKeyBubbles){H=!1;return}}),!H)return}i(!1,vQ(B)?B.nativeEvent:B,"escape-key")}),q=no(B=>{var R;const D=()=>{var z;$(B),(z=Hc(B))==null||z.removeEventListener("keydown",D)};(R=Hc(B))==null||R.addEventListener("keydown",D)}),P=no(B=>{var R;const D=a.current.insideReactTree;a.current.insideReactTree=!1;const z=S.current;if(S.current=!1,f==="click"&&z||D||typeof _=="function"&&!_(B))return;const H=Hc(B),Y="["+yC("inert")+"]",N=yu(r.floating).querySelectorAll(Y);let W=Kt(H)?H:null;for(;W&&!es(W);){const ie=ss(W);if(es(ie)||!Kt(ie))break;W=ie}if(N.length&&Kt(H)&&!dQ(H)&&!hm(H,r.floating)&&Array.from(N).every(ie=>!hm(W,ie)))return;if(Ca(H)&&G){const ie=es(H),re=ka(H),Z=/auto|scroll/,le=ie||Z.test(re.overflowX),ee=ie||Z.test(re.overflowY),se=le&&H.clientWidth>0&&H.scrollWidth>H.clientWidth,ke=ee&&H.clientHeight>0&&H.scrollHeight>H.clientHeight,te=re.direction==="rtl",$e=ke&&(te?B.offsetX<=H.offsetWidth-H.clientWidth:B.offsetX>H.clientWidth),xe=se&&B.offsetY>H.clientHeight;if($e||xe)return}const V=(R=a.current.floatingContext)==null?void 0:R.nodeId,I=w&&Mg(w.nodesRef.current,V).some(ie=>{var re;return jk(B,(re=ie.context)==null?void 0:re.elements.floating)});if(jk(B,r.floating)||jk(B,r.domReference)||I)return;const Q=w?Mg(w.nodesRef.current,V):[];if(Q.length>0){let ie=!0;if(Q.forEach(re=>{var Z;if((Z=re.context)!=null&&Z.open&&!re.context.dataRef.current.__outsidePressBubbles){ie=!1;return}}),!ie)return}i(!1,B,"outside-press")}),L=no(B=>{var R;const D=()=>{var z;P(B),(z=Hc(B))==null||z.removeEventListener(f,D)};(R=Hc(B))==null||R.addEventListener(f,D)});x.useEffect(()=>{if(!t||!o)return;a.current.__escapeKeyBubbles=j,a.current.__outsidePressBubbles=T;let B=-1;function R(N){i(!1,N,"ancestor-scroll")}function D(){window.clearTimeout(B),M.current=!0}function z(){B=window.setTimeout(()=>{M.current=!1},Ty()?5:0)}const H=yu(r.floating);l&&(H.addEventListener("keydown",A?q:$,A),H.addEventListener("compositionstart",D),H.addEventListener("compositionend",z)),_&&H.addEventListener(f,O?L:P,O);let Y=[];return p&&(Kt(r.domReference)&&(Y=ns(r.domReference)),Kt(r.floating)&&(Y=Y.concat(ns(r.floating))),!Kt(r.reference)&&r.reference&&r.reference.contextElement&&(Y=Y.concat(ns(r.reference.contextElement)))),Y=Y.filter(N=>{var W;return N!==((W=H.defaultView)==null?void 0:W.visualViewport)}),Y.forEach(N=>{N.addEventListener("scroll",R,{passive:!0})}),()=>{l&&(H.removeEventListener("keydown",A?q:$,A),H.removeEventListener("compositionstart",D),H.removeEventListener("compositionend",z)),_&&H.removeEventListener(f,O?L:P,O),Y.forEach(N=>{N.removeEventListener("scroll",R)}),window.clearTimeout(B)}},[a,r,l,_,f,t,i,p,o,j,T,$,A,q,P,O,L]),x.useEffect(()=>{a.current.insideReactTree=!1},[a,_,f]);const U=x.useMemo(()=>({onKeyDown:$,...h&&{[bJ[d]]:B=>{i(!1,B.nativeEvent,"reference-press")},...d!=="click"&&{onClick(B){i(!1,B.nativeEvent,"reference-press")}}}}),[$,i,h,d]),G=x.useMemo(()=>{function B(R){R.button===0&&(S.current=!0)}return{onKeyDown:$,onMouseDown:B,onMouseUp:B,[wJ[f]]:()=>{a.current.insideReactTree=!0}}},[$,f,a]);return x.useMemo(()=>o?{reference:U,floating:G}:{},[o,U,G])}function kJ(e){const{open:n=!1,onOpenChange:t,elements:i}=e,r=DL(),a=x.useRef({}),[o]=x.useState(()=>pJ()),l=vC()!=null,[u,f]=x.useState(i.reference),h=no((g,b,w)=>{a.current.openEvent=g?b:void 0,o.emit("openchange",{open:g,event:b,reason:w,nested:l}),t==null||t(g,b,w)}),d=x.useMemo(()=>({setPositionReference:f}),[]),p=x.useMemo(()=>({reference:u||i.reference||null,floating:i.floating||null,domReference:i.reference}),[u,i.reference,i.floating]);return x.useMemo(()=>({dataRef:a,open:n,onOpenChange:h,elements:p,events:o,floatingId:r,refs:d}),[n,h,p,o,r,d])}function Dy(e){e===void 0&&(e={});const{nodeId:n}=e,t=kJ({...e,elements:{reference:null,floating:null,...e.elements}}),i=e.rootContext||t,r=i.elements,[a,o]=x.useState(null),[l,u]=x.useState(null),h=(r==null?void 0:r.domReference)||a,d=x.useRef(null),p=gC();oo(()=>{h&&(d.current=h)},[h]);const g=oJ({...e,elements:{...r,...l&&{reference:l}}}),b=x.useCallback(j=>{const T=Kt(j)?{getBoundingClientRect:()=>j.getBoundingClientRect(),getClientRects:()=>j.getClientRects(),contextElement:j}:j;u(T),g.refs.setReference(T)},[g.refs]),w=x.useCallback(j=>{(Kt(j)||j===null)&&(d.current=j,o(j)),(Kt(g.refs.reference.current)||g.refs.reference.current===null||j!==null&&!Kt(j))&&g.refs.setReference(j)},[g.refs]),k=x.useMemo(()=>({...g.refs,setReference:w,setPositionReference:b,domReference:d}),[g.refs,w,b]),_=x.useMemo(()=>({...g.elements,domReference:h}),[g.elements,h]),S=x.useMemo(()=>({...g,...i,refs:k,elements:_,nodeId:n}),[g,k,_,n,i]);return oo(()=>{i.dataRef.current.floatingContext=S;const j=p==null?void 0:p.nodesRef.current.find(T=>T.id===n);j&&(j.context=S)}),x.useMemo(()=>({...g,context:S,refs:k,elements:_}),[g,k,_,S])}function Ek(){return uQ()&&lQ()}function _J(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,events:r,dataRef:a,elements:o}=e,{enabled:l=!0,visibleOnly:u=!0}=n,f=x.useRef(!1),h=x.useRef(-1),d=x.useRef(!0);x.useEffect(()=>{if(!l)return;const g=Cr(o.domReference);function b(){!t&&Ca(o.domReference)&&o.domReference===eE(yu(o.domReference))&&(f.current=!0)}function w(){d.current=!0}function k(){d.current=!1}return g.addEventListener("blur",b),Ek()&&(g.addEventListener("keydown",w,!0),g.addEventListener("pointerdown",k,!0)),()=>{g.removeEventListener("blur",b),Ek()&&(g.removeEventListener("keydown",w,!0),g.removeEventListener("pointerdown",k,!0))}},[o.domReference,t,l]),x.useEffect(()=>{if(!l)return;function g(b){let{reason:w}=b;(w==="reference-press"||w==="escape-key")&&(f.current=!0)}return r.on("openchange",g),()=>{r.off("openchange",g)}},[r,l]),x.useEffect(()=>()=>{da(h)},[]);const p=x.useMemo(()=>({onMouseLeave(){f.current=!1},onFocus(g){if(f.current)return;const b=Hc(g.nativeEvent);if(u&&Kt(b)){if(Ek()&&!g.relatedTarget){if(!d.current&&!hQ(b))return}else if(!mQ(b))return}i(!0,g.nativeEvent,"focus")},onBlur(g){f.current=!1;const b=g.relatedTarget,w=g.nativeEvent,k=Kt(b)&&b.hasAttribute(yC("focus-guard"))&&b.getAttribute("data-type")==="outside";h.current=window.setTimeout(()=>{var _;const S=eE(o.domReference?o.domReference.ownerDocument:document);!b&&S===o.domReference||hm((_=a.current.floatingContext)==null?void 0:_.refs.floating.current,S)||hm(o.domReference,S)||k||i(!1,w,"focus")})}}),[a,o.domReference,i,u]);return x.useMemo(()=>l?{reference:p}:{},[l,p])}function Mk(e,n,t){const i=new Map,r=t==="item";let a=e;if(r&&e){const{[cE]:o,[fE]:l,...u}=e;a=u}return{...t==="floating"&&{tabIndex:-1,[cJ]:""},...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(u=>{let[f,h]=u;if(!(r&&[cE,fE].includes(f)))if(f.indexOf("on")===0){if(i.has(f)||i.set(f,[]),typeof h=="function"){var d;(d=i.get(f))==null||d.push(h),o[f]=function(){for(var p,g=arguments.length,b=new Array(g),w=0;wk(...b)).find(k=>k!==void 0)}}}else o[f]=h}),o),{})}}function LL(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=x.useCallback(l=>Mk(l,e,"reference"),n),a=x.useCallback(l=>Mk(l,e,"floating"),t),o=x.useCallback(l=>Mk(l,e,"item"),i);return x.useMemo(()=>({getReferenceProps:r,getFloatingProps:a,getItemProps:o}),[r,a,o])}const xJ=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function IL(e,n){var t,i;n===void 0&&(n={});const{open:r,elements:a,floatingId:o}=e,{enabled:l=!0,role:u="dialog"}=n,f=DL(),h=((t=a.domReference)==null?void 0:t.id)||f,d=x.useMemo(()=>{var S;return((S=pQ(a.floating))==null?void 0:S.id)||o},[a.floating,o]),p=(i=xJ.get(u))!=null?i:u,b=vC()!=null,w=x.useMemo(()=>p==="tooltip"||u==="label"?{["aria-"+(u==="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"},...u==="select"&&{"aria-autocomplete":"none"},...u==="combobox"&&{"aria-autocomplete":"list"}},[p,d,b,r,h,u]),k=x.useMemo(()=>{const S={id:d,...p&&{role:p}};return p==="tooltip"||u==="label"?S:{...S,...p==="menu"&&{"aria-labelledby":h}}},[p,d,h,u]),_=x.useCallback(S=>{let{active:j,selected:T}=S;const A={role:"option",...j&&{id:d+"-fui-option"}};switch(u){case"select":case"combobox":return{...A,"aria-selected":T}}return{}},[d,u]);return x.useMemo(()=>l?{reference:w,floating:k,item:_}:{},[l,w,k,_])}const BL={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},FL=(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":ve(n),"--scrollarea-over-scroll-behavior":r}}},ur=Pe(e=>{const n=ye("ScrollArea",BL,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,scrollbarSize:l,vars:u,type:f,scrollHideDelay:h,viewportProps:d,viewportRef:p,onScrollPositionChange:g,children:b,offsetScrollbars:w,scrollbars:k,onBottomReached:_,onTopReached:S,onLeftReached:j,onRightReached:T,overscrollBehavior:A,startScrollPosition:O,attributes:M,...$}=n,[q,P]=x.useState(!1),[L,U]=x.useState(!1),[G,B]=x.useState(!1),R=x.useRef(!0),D=x.useRef(!1),z=x.useRef(!0),H=x.useRef(!1),Y=Ze({name:"ScrollArea",props:n,classes:lC,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:M,vars:u,varsResolver:FL}),N=x.useRef(null),[W,V]=x.useState(null),I=ML([p,N,x.useCallback(Q=>{V(ie=>ie===Q?ie:Q)},[])]);return bl(w==="present"?W:null,()=>{const Q=N.current;Q&&(U(Q.scrollHeight>Q.clientHeight),B(Q.scrollWidth>Q.clientWidth))}),ps(()=>{O&&N.current&&N.current.scrollTo({left:O.x??0,top:O.y??0})},[]),v.jsxs(sL,{getStyles:Y,type:f==="never"?"always":f,scrollHideDelay:h,scrollbars:k,...Y("root"),...$,children:[v.jsx(gL,{...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"&&!G?"true":void 0,"data-vertical-hidden":w==="present"&&!L?"true":void 0,onScroll:Q=>{var Ae;(Ae=d==null?void 0:d.onScroll)==null||Ae.call(d,Q),g==null||g({x:Q.currentTarget.scrollLeft,y:Q.currentTarget.scrollTop});const{scrollTop:ie,scrollHeight:re,clientHeight:Z,scrollLeft:le,scrollWidth:ee,clientWidth:se}=Q.currentTarget,ke=ie-(re-Z)>=-.8,te=ie===0;ke&&!D.current&&(_==null||_()),te&&!R.current&&(S==null||S()),D.current=ke,R.current=te;const $e=le-(ee-se)>=-.8,xe=le===0;$e&&!H.current&&(T==null||T()),xe&&!z.current&&(j==null||j()),H.current=$e,z.current=xe},children:b}),(k==="xy"||k==="x")&&v.jsx(ES,{...Y("scrollbar"),orientation:"horizontal","data-hidden":f==="never"||w==="present"&&!G?!0:void 0,forceMount:!0,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:v.jsx(MS,{...Y("thumb")})}),(k==="xy"||k==="y")&&v.jsx(ES,{...Y("scrollbar"),orientation:"vertical","data-hidden":f==="never"||w==="present"&&!L?!0:void 0,forceMount:!0,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:v.jsx(MS,{...Y("thumb")})}),v.jsx(BZ,{...Y("corner"),"data-hovered":q||void 0,"data-hidden":f==="never"||void 0})]})});ur.displayName="@mantine/core/ScrollArea";const bC=Pe(e=>{const{children:n,classNames:t,styles:i,scrollbarSize:r,scrollHideDelay:a,type:o,dir:l,offsetScrollbars:u,overscrollBehavior:f,viewportRef:h,onScrollPositionChange:d,unstyled:p,variant:g,viewportProps:b,scrollbars:w,style:k,vars:_,onBottomReached:S,onTopReached:j,startScrollPosition:T,onOverflowChange:A,...O}=ye("ScrollAreaAutosize",BL,e),M=x.useRef(null),[$,q]=x.useState(null),P=ML([h,M,x.useCallback(B=>{q(R=>R===B?R:B)},[])]),L=x.useRef(!1),U=x.useRef(!1),G=x.useEffectEvent(()=>{const B=M.current;if(!B||!A)return;const R=B.scrollHeight>B.clientHeight;R!==L.current&&(U.current?A(R):(U.current=!0,R&&A(!0)),L.current=R)});return bl(A?$:null,G),v.jsx(fe,{...O,variant:g,style:[{display:"flex",overflow:"hidden"},k],children:v.jsx(fe,{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:v.jsx(ur,{classNames:t,styles:i,scrollHideDelay:a,scrollbarSize:r,type:o,dir:l,offsetScrollbars:u,overscrollBehavior:f,viewportRef:P,onScrollPositionChange:d,unstyled:p,variant:g,viewportProps:b,vars:_,scrollbars:w,onBottomReached:S,onTopReached:j,startScrollPosition:T,"data-autosize":"true",children:n})})})});ur.classes=lC;ur.varsResolver=FL;bC.displayName="@mantine/core/ScrollAreaAutosize";bC.classes=lC;ur.Autosize=bC;var qL={root:"m_87cf2631"};const SJ={__staticSelector:"UnstyledButton"},Et=ki(e=>{const n=ye("UnstyledButton",SJ,e),{className:t,component:i="button",__staticSelector:r,unstyled:a,classNames:o,styles:l,style:u,attributes:f,...h}=n;return v.jsx(fe,{...Ze({name:r,props:n,classes:qL,className:t,style:u,classNames:o,styles:l,unstyled:a,attributes:f})("root",{focusable:!0}),component:i,type:i==="button"?"button":void 0,...h})});Et.classes=qL;Et.displayName="@mantine/core/UnstyledButton";var HL={root:"m_515a97f8"};const wC=Pe(e=>{const n=ye("VisuallyHidden",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:u,...f}=n;return v.jsx(fe,{component:"span",...Ze({name:"VisuallyHidden",classes:HL,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:u})("root"),...f})});wC.classes=HL;wC.displayName="@mantine/core/VisuallyHidden";var UL={root:"m_1b7284a3"};const VL=(e,{radius:n,shadow:t})=>({root:{"--paper-radius":n===void 0?void 0:qt(n),"--paper-shadow":Q6(t)}}),Tt=ki(e=>{const n=ye("Paper",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,withBorder:l,vars:u,radius:f,shadow:h,variant:d,mod:p,attributes:g,...b}=n,w=Ze({name:"Paper",props:n,classes:UL,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:g,vars:u,varsResolver:VL});return v.jsx(fe,{mod:[{"data-with-border":l},p],...w("root"),variant:d,...b})});Tt.classes=UL;Tt.varsResolver=VL;Tt.displayName="@mantine/core/Paper";function vE(e,n,t,i){return e==="center"||i==="center"?{top:n}:e==="end"?{bottom:t}:e==="start"?{top:t}:{}}function gE(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 CJ={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function jJ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,arrowX:a,arrowY:o,dir:l}){const[u,f="center"]=e.split("-"),h={width:n,height:n,transform:"rotate(45deg)",position:"absolute",[CJ[u]]:i},d=-n/2;return u==="left"?{...h,...vE(f,o,t,r),right:d,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:u==="right"?{...h,...vE(f,o,t,r),left:d,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:u==="top"?{...h,...gE(f,a,t,r,l),bottom:d,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:u==="bottom"?{...h,...gE(f,a,t,r,l),top:d,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}function Jg({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,visible:a,arrowX:o,arrowY:l,style:u,...f}){const{dir:h}=qu();return a?v.jsx("div",{...f,style:{...u,...jJ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,dir:h,arrowX:o,arrowY:l})}}):null}Jg.displayName="@mantine/core/FloatingArrow";function WL(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=x.useRef(-1),a=x.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)},u=()=>{o(),i===0||i===void 0?n():a.current=window.setTimeout(n,i)};return x.useEffect(()=>o,[]),{openDropdown:l,closeDropdown:u}}var YL={root:"m_9814e45f"};const AJ={zIndex:xa("modal")},KL=(e,{gradient:n,color:t,backgroundOpacity:i,blur:r,radius:a,zIndex:o})=>({root:{"--overlay-bg":n||(t!==void 0||i!==void 0)&&nl(t||"#000",i??.6)||void 0,"--overlay-filter":r?`blur(${ve(r)})`:void 0,"--overlay-radius":a===void 0?void 0:qt(a),"--overlay-z-index":o==null?void 0:o.toString()}}),up=ki(e=>{const n=ye("Overlay",AJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,fixed:u,center:f,children:h,radius:d,zIndex:p,gradient:g,blur:b,color:w,backgroundOpacity:k,mod:_,attributes:S,...j}=n;return v.jsx(fe,{...Ze({name:"Overlay",props:n,classes:YL,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:KL})("root"),mod:[{center:f,fixed:u},_],...j,children:h})});up.classes=YL;up.varsResolver=KL;up.displayName="@mantine/core/Overlay";function Dk(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 OJ({target:e,reuseTargetNode:n,...t}){if(e)return typeof e=="string"?document.querySelector(e)||Dk(t):e;if(n){const i=document.querySelector("[data-mantine-shared-portal-node]");if(i)return i;const r=Dk(t);return r.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(r),r}return Dk(t)}const TJ={reuseTargetNode:!0},XL=Pe(e=>{const{children:n,target:t,reuseTargetNode:i,ref:r,...a}=ye("Portal",TJ,e),[o,l]=x.useState(!1),u=x.useRef(null);return ps(()=>(l(!0),u.current=OJ({target:t,reuseTargetNode:i,...a}),cm(r,u.current),!t&&!i&&u.current&&document.body.appendChild(u.current),()=>{!t&&!i&&u.current&&document.body.removeChild(u.current)}),[t]),!o||!u.current?null:sl.createPortal(v.jsx(v.Fragment,{children:n}),u.current)});XL.displayName="@mantine/core/Portal";const wl=Pe(({withinPortal:e=!0,children:n,...t})=>op()==="test"||!e?v.jsx(v.Fragment,{children:n}):v.jsx(XL,{...t,children:n}));wl.displayName="@mantine/core/OptionalPortal";const bh=e=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${e==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),eg={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:{...bh("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...bh("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...bh("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...bh("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...bh("top"),common:{transformOrigin:"top right"}}},yE={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function bE({transition:e,state:n,duration:t,timingFunction:i}){const r={WebkitBackfaceVisibility:"hidden",transitionDuration:`${t}ms`,transitionTimingFunction:i};return typeof e=="string"?e in eg?{transitionProperty:eg[e].transitionProperty,...r,...eg[e].common,...eg[e][yE[n]]}:{}:{transitionProperty:e.transitionProperty,...r,...e.common,...e[yE[n]]}}function EJ({duration:e,exitDuration:n,timingFunction:t,mounted:i,onEnter:r,onExit:a,onEntered:o,onExited:l,enterDelay:u,exitDelay:f}){const h=ci(),d=eC(),p=h.respectReducedMotion?d:!1,[g,b]=x.useState(p?0:e),[w,k]=x.useState(i?"entered":"exited"),_=x.useRef(-1),S=x.useRef(-1),j=x.useRef(-1);function T(){window.clearTimeout(_.current),window.clearTimeout(S.current),cancelAnimationFrame(j.current)}const A=M=>{T();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")):j.current=requestAnimationFrame(()=>{Lh.flushSync(()=>{k(M?"pre-entering":"pre-exiting")}),j.current=requestAnimationFrame(()=>{typeof $=="function"&&$(),k(M?"entering":"exiting"),_.current=window.setTimeout(()=>{typeof q=="function"&&q(),k(M?"entered":"exited")},P)})})},O=M=>{if(T(),typeof(M?u:f)!="number"){A(M);return}S.current=window.setTimeout(()=>{A(M)},M?u:f)};return os(()=>{O(i)},[i]),x.useEffect(()=>()=>{T()},[]),{transitionDuration:g,transitionStatus:w,transitionTimingFunction:t||"ease"}}function ls({keepMounted:e,transition:n="fade",duration:t=250,exitDuration:i=t,mounted:r,children:a,timingFunction:o="ease",onExit:l,onEntered:u,onEnter:f,onExited:h,enterDelay:d,exitDelay:p}){const g=op(),{transitionDuration:b,transitionStatus:w,transitionTimingFunction:k}=EJ({mounted:r,exitDuration:i,duration:t,timingFunction:o,onExit:l,onEntered:u,onEnter:f,onExited:h,enterDelay:d,exitDelay:p});if(g==="test")return r?v.jsx(v.Fragment,{children:a({})}):e?a({display:"none"}):null;if(b===0)return e?v.jsx(x.Activity,{mode:r?"visible":"hidden",children:a({})}):r?v.jsx(v.Fragment,{children:a({})}):null;const _=w==="exited";return e?v.jsx(x.Activity,{mode:_?"hidden":"visible",children:a(_?{}:bE({transition:n,duration:b,state:w,timingFunction:k}))}):_?null:v.jsx(v.Fragment,{children:a(bE({transition:n,duration:b,state:w,timingFunction:k}))})}ls.displayName="@mantine/core/Transition";const MJ={duration:100,transition:"fade"};function wE(e,n){return{...MJ,...n,...e}}const[DJ,ZL]=Ar("Popover component was not found in the tree");function Ry({children:e,active:n=!0,refProp:t="ref",innerRef:i}){const r=Ht(vX(n),i),a=Cl(e);return a?x.cloneElement(a,{[t]:r}):e}function QL(e){return v.jsx(wC,{tabIndex:-1,"data-autofocus":!0,...e})}Ry.displayName="@mantine/core/FocusTrap";QL.displayName="@mantine/core/FocusTrapInitialFocus";Ry.InitialFocus=QL;var JL={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const kC=Pe(e=>{var k,_,S,j;const n=ye("PopoverDropdown",null,e),{className:t,style:i,vars:r,children:a,onKeyDownCapture:o,variant:l,classNames:u,styles:f,ref:h,...d}=n,p=ZL(),g=Iz({opened:p.opened,shouldReturnFocus:p.returnFocus}),b=p.withRoles?{"aria-labelledby":p.getTargetId(),id:p.getDropdownId(),role:"dialog",tabIndex:-1}:{},w=Ht(h,p.floating);return p.disabled?null:v.jsx(wl,{...p.portalProps,withinPortal:p.withinPortal,children:v.jsx(ls,{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((S=p.transitionProps)==null?void 0:S.exitDuration)=="number"?p.transitionProps.exitDuration:(j=p.transitionProps)==null?void 0:j.duration,children:T=>{var A;return v.jsx(Ry,{active:p.trapFocus&&p.opened,innerRef:w,children:v.jsxs(fe,{...b,...d,variant:l,onKeyDownCapture:iX(()=>{var O,M;(O=p.onClose)==null||O.call(p),(M=p.onDismiss)==null||M.call(p)},{active:p.closeOnEscape,onTrigger:g,onKeyDown:o}),"data-position":p.placement,"data-fixed":p.floatingStrategy==="fixed"||void 0,...p.getStyles("dropdown",{className:t,props:n,classNames:u,styles:f,style:[{...T,zIndex:p.zIndex,top:p.y??0,left:p.x??0,width:p.width==="target"?void 0:ve(p.width),...p.referenceHidden?{display:"none"}:null},(A=p.resolvedStyles)==null?void 0:A.dropdown,f==null?void 0:f.dropdown,i]}),children:[a,v.jsx(Jg,{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:u,styles:f})})]})})}})})});kC.classes=JL;kC.displayName="@mantine/core/PopoverDropdown";const RJ={refProp:"ref",popupType:"dialog"},eI=Pe(e=>{const{children:n,refProp:t,popupType:i,ref:r,...a}=ye("PopoverTarget",RJ,e),o=Cl(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,u=ZL(),f=Ht(u.reference,xy(o),r),h=u.withRoles?{"aria-haspopup":i,"aria-expanded":u.opened,"aria-controls":u.opened?u.getDropdownId():void 0,id:u.getTargetId()}:{},d=o.props;return x.cloneElement(o,{...l,...h,...u.targetProps,className:vn(u.targetProps.className,l.className,d.className),[t]:f,...u.controlled?null:{onClick:p=>{var g;u.onToggle(),(g=d.onClick)==null||g.call(d,p)}}})});eI.displayName="@mantine/core/PopoverTarget";function PJ(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 NJ(e,n,t){const i=PJ(e.middlewares),r=[TL(e.offset),uJ()];return e.dropdownVisible&&t!=="test"&&e.preventPositionChangeWhenVisible&&(i.flip=!1),i.flip&&r.push(typeof i.flip=="boolean"?Qg():Qg(i.flip)),i.shift&&r.push(pC(typeof i.shift=="boolean"?{limiter:uE(),padding:5}:{limiter:uE(),padding:5,...i.shift})),i.inline&&r.push(typeof i.inline=="boolean"?Kh():Kh(i.inline)),r.push(EL({element:e.arrowRef,padding:e.arrowOffset})),(i.size||e.width==="target")&&r.push(lJ({...typeof i.size=="boolean"?{}:i.size,apply({rects:a,availableWidth:o,availableHeight:l,...u}){var h;const f=((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,...u}):Object.assign(f,{maxWidth:`${o}px`,maxHeight:`${l}px`})),e.width==="target"&&Object.assign(f,{width:`${a.reference.width}px`})}})),r}function $J(e){const n=op(),[t,i]=Ai({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=x.useRef(t),a=()=>{t&&!e.disabled&&i(!1)},o=()=>{e.disabled||i(!t)},l=Dy({strategy:e.strategy,placement:e.preventPositionChangeWhenVisible?e.positionRef.current:e.position,middleware:NJ(e,()=>l,n),whileElementsMounted:e.keepMounted?void 0:zS});return x.useEffect(()=>{if(!(!l.refs.reference.current||!l.refs.floating.current)&&t)return zS(l.refs.reference.current,l.refs.floating.current,l.update)},[t,l.update]),os(()=>{var u;(u=e.onPositionChange)==null||u.call(e,l.placement),e.positionRef.current=l.placement},[l.placement,e.preventPositionChangeWhenVisible]),os(()=>{var u,f;t!==r.current&&(t?(f=e.onOpen)==null||f.call(e):(u=e.onClose)==null||u.call(e)),r.current=t},[t,e.onClose,e.onOpen]),ps(()=>{let u=-1;return t&&(u=window.setTimeout(()=>e.setDropdownVisible(!0),4)),()=>{window.clearTimeout(u)}},[t,e.position]),{floating:l,controlled:typeof e.opened=="boolean",opened:t,onClose:a,onToggle:o}}const zJ={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:xa("popover"),__staticSelector:"Popover",width:"max-content"},nI=(e,{radius:n,shadow:t})=>({dropdown:{"--popover-radius":n===void 0?void 0:qt(n),"--popover-shadow":Q6(t)}});function Sn(e){var an,pn,Dn,bn,sn,nn,$n;const n=ye("Popover",zJ,e),{children:t,position:i,offset:r,onPositionChange:a,opened:o,transitionProps:l,onExitTransitionEnd:u,onEnterTransitionEnd:f,width:h,middlewares:d,withArrow:p,arrowSize:g,arrowOffset:b,arrowRadius:w,arrowPosition:k,unstyled:_,classNames:S,styles:j,closeOnClickOutside:T,withinPortal:A,portalProps:O,closeOnEscape:M,clickOutsideEvents:$,trapFocus:q,onClose:P,onDismiss:L,onOpen:U,onChange:G,zIndex:B,radius:R,shadow:D,id:z,defaultOpened:H,__staticSelector:Y,withRoles:N,disabled:W,returnFocus:V,variant:I,keepMounted:Q,vars:ie,floatingStrategy:re,withOverlay:Z,overlayProps:le,hideDetached:ee,attributes:se,preventPositionChangeWhenVisible:ke,...te}=n,$e=Ze({name:Y,props:n,classes:JL,classNames:S,styles:j,unstyled:_,attributes:se,rootSelector:"dropdown",vars:ie,varsResolver:nI}),{resolvedStyles:xe}=Wi({classNames:S,styles:j,props:n}),[Ae,ze]=x.useState(o??H??!1),we=x.useRef(i),Ce=x.useRef(null),[Ne,he]=x.useState(null),[He,Ye]=x.useState(null),{dir:We}=qu(),Qe=op(),Je=Pi(z),oe=$J({middlewares:d,width:h,position:WL(We,i),offset:typeof r=="number"?r+(p?g/2:0):r,arrowRef:Ce,arrowOffset:b,onPositionChange:a,opened:o,defaultOpened:H,onChange:G,onOpen:U,onClose:P,onDismiss:L,strategy:re,dropdownVisible:Ae,setDropdownVisible:ze,positionRef:we,disabled:W,preventPositionChangeWhenVisible:ke,keepMounted:Q});sX(()=>{T&&(oe.onClose(),L==null||L())},$,[Ne,He]);const be=x.useCallback(De=>{he(De),oe.floating.refs.setReference(De)},[oe.floating.refs.setReference]),Ke=x.useCallback(De=>{Ye(De),oe.floating.refs.setFloating(De)},[oe.floating.refs.setFloating]),en=x.useCallback(()=>{var De;(De=l==null?void 0:l.onExited)==null||De.call(l),u==null||u(),ze(!1),ke||(we.current=i)},[l==null?void 0:l.onExited,u,ke,i]),je=x.useCallback(()=>{var De;(De=l==null?void 0:l.onEntered)==null||De.call(l),f==null||f()},[l==null?void 0:l.onEntered,f]);return v.jsxs(DJ,{value:{returnFocus:V,disabled:W,controlled:oe.controlled,reference:be,floating:Ke,x:oe.floating.x,y:oe.floating.y,arrowX:(Dn=(pn=(an=oe.floating)==null?void 0:an.middlewareData)==null?void 0:pn.arrow)==null?void 0:Dn.x,arrowY:(nn=(sn=(bn=oe.floating)==null?void 0:bn.middlewareData)==null?void 0:sn.arrow)==null?void 0:nn.y,opened:oe.opened,arrowRef:Ce,transitionProps:{...l,onExited:en,onEntered:je},width:h,withArrow:p,arrowSize:g,arrowOffset:b,arrowRadius:w,arrowPosition:k,placement:oe.floating.placement,trapFocus:q,withinPortal:A,portalProps:O,zIndex:B,radius:R,shadow:D,closeOnEscape:M,onDismiss:L,onClose:oe.onClose,onToggle:oe.onToggle,getTargetId:()=>Je,getDropdownId:()=>`${Je}-dropdown`,withRoles:N,targetProps:te,__staticSelector:Y,classNames:S,styles:j,unstyled:_,variant:I,keepMounted:Q,getStyles:$e,resolvedStyles:xe,floatingStrategy:re,referenceHidden:ee&&Qe!=="test"?($n=oe.floating.middlewareData.hide)==null?void 0:$n.referenceHidden:!1},children:[t,Z&&v.jsx(ls,{transition:"fade",mounted:oe.opened,duration:(l==null?void 0:l.duration)||250,exitDuration:(l==null?void 0:l.exitDuration)||250,children:De=>v.jsx(wl,{withinPortal:A,children:v.jsx(up,{...le,...$e("overlay",{className:le==null?void 0:le.className,style:[De,le==null?void 0:le.style]})})})})]})}Sn.Target=eI;Sn.Dropdown=kC;Sn.varsResolver=nI;Sn.displayName="@mantine/core/Popover";Sn.extend=e=>e;Sn.withProps=e=>{const n=t=>v.jsx(Sn,{...e,...t});return n.extend=Sn.extend,n.displayName=`WithProps(${Sn.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 tI=({className:e,...n})=>v.jsxs(fe,{component:"span",className:vn(Ba.barsLoader,e),...n,children:[v.jsx("span",{className:Ba.bar}),v.jsx("span",{className:Ba.bar}),v.jsx("span",{className:Ba.bar})]});tI.displayName="@mantine/core/Bars";const iI=({className:e,...n})=>v.jsxs(fe,{component:"span",className:vn(Ba.dotsLoader,e),...n,children:[v.jsx("span",{className:Ba.dot}),v.jsx("span",{className:Ba.dot}),v.jsx("span",{className:Ba.dot})]});iI.displayName="@mantine/core/Dots";const rI=({className:e,...n})=>v.jsx(fe,{component:"span",className:vn(Ba.ovalLoader,e),...n});rI.displayName="@mantine/core/Oval";const aI={bars:tI,oval:rI,dots:iI},LJ={loaders:aI,type:"oval"},oI=(e,{size:n,color:t})=>({root:{"--loader-size":Ln(n,"loader-size"),"--loader-color":t?ft(t,e):void 0}}),Zt=Pe(e=>{const n=ye("Loader",LJ,e),{size:t,color:i,type:r,vars:a,className:o,style:l,classNames:u,styles:f,unstyled:h,loaders:d,variant:p,children:g,attributes:b,...w}=n,k=Ze({name:"Loader",props:n,classes:Ba,className:o,style:l,classNames:u,styles:f,unstyled:h,attributes:b,vars:a,varsResolver:oI});return g?v.jsx(fe,{...k("root"),...w,children:g}):v.jsx(fe,{...k("root"),component:d[r],variant:p,size:t,...w})});Zt.defaultLoaders=aI;Zt.classes=Ba;Zt.varsResolver=oI;Zt.displayName="@mantine/core/Loader";var Hf={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const kE={orientation:"horizontal"},sI=(e,{borderWidth:n})=>({group:{"--ai-border-width":ve(n)}}),Py=Pe(e=>{const n=ye("ActionIconGroup",kE,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:u,borderWidth:f,variant:h,mod:d,attributes:p,...g}=ye("ActionIconGroup",kE,e);return v.jsx(fe,{...Ze({name:"ActionIconGroup",props:n,classes:Hf,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:u,varsResolver:sI,rootSelector:"group"})("group"),variant:h,mod:[{"data-orientation":l},d],role:"group",...g})});Py.classes=Hf;Py.varsResolver=sI;Py.displayName="@mantine/core/ActionIconGroup";const lI=(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":Ln(o,"section-height"),"--section-padding-x":Ln(o,"section-padding-x"),"--section-fz":ai(o),"--section-radius":n===void 0?void 0:qt(n),"--section-bg":t||r?l.background:void 0,"--section-color":l.color,"--section-bd":t||r?l.border:void 0}}},Ny=Pe(e=>{const n=ye("ActionIconGroupSection",null,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,vars:l,variant:u,gradient:f,radius:h,autoContrast:d,attributes:p,...g}=n;return v.jsx(fe,{...Ze({name:"ActionIconGroupSection",props:n,classes:Hf,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:lI,rootSelector:"groupSection"})("groupSection"),variant:u,...g})});Ny.classes=Hf;Ny.varsResolver=lI;Ny.displayName="@mantine/core/ActionIconGroupSection";const uI=(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":Ln(n,"ai-size"),"--ai-radius":t===void 0?void 0:qt(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}}},Jn=ki(e=>{const n=ye("ActionIcon",null,e),{className:t,unstyled:i,variant:r,classNames:a,styles:o,style:l,loading:u,loaderProps:f,size:h,color:d,radius:p,__staticSelector:g,gradient:b,vars:w,children:k,disabled:_,"data-disabled":S,autoContrast:j,mod:T,attributes:A,...O}=n,M=Ze({name:["ActionIcon",g],props:n,className:t,style:l,classes:Hf,classNames:a,styles:o,unstyled:i,attributes:A,vars:w,varsResolver:uI});return v.jsxs(Et,{...M("root",{active:!_&&!u&&!S}),...O,unstyled:i,variant:r,size:h,disabled:_||u,mod:[{loading:u,disabled:_||S},T],children:[typeof u=="boolean"&&v.jsx(ls,{mounted:u,transition:"slide-down",duration:150,children:$=>v.jsx(fe,{component:"span",...M("loader",{style:$}),"aria-hidden":!0,children:v.jsx(Zt,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...f})})}),v.jsx(fe,{component:"span",mod:{loading:u},...M("icon"),children:k})]})});Jn.classes=Hf;Jn.varsResolver=uI;Jn.displayName="@mantine/core/ActionIcon";Jn.Group=Py;Jn.GroupSection=Ny;function cI({size:e="var(--cb-icon-size, 70%)",style:n,...t}){return v.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...n,width:e,height:e},...t,children:v.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"})})}cI.displayName="@mantine/core/CloseIcon";var fI={root:"m_86a44da5","root--subtle":"m_220c80f2"};const IJ={variant:"subtle"},dI=(e,{size:n,radius:t,iconSize:i})=>({root:{"--cb-size":Ln(n,"cb-size"),"--cb-radius":t===void 0?void 0:qt(t),"--cb-icon-size":ve(i)}}),jl=ki(e=>{const n=ye("CloseButton",IJ,e),{iconSize:t,children:i,vars:r,radius:a,className:o,classNames:l,style:u,styles:f,unstyled:h,"data-disabled":d,disabled:p,variant:g,icon:b,mod:w,attributes:k,__staticSelector:_,...S}=n,j=Ze({name:_||"CloseButton",props:n,className:o,style:u,classes:fI,classNames:l,styles:f,unstyled:h,attributes:k,vars:r,varsResolver:dI});return v.jsxs(Et,{...S,unstyled:h,variant:g,disabled:p,mod:[{disabled:p||d},w],...j("root",{variant:g,active:!p&&!d}),children:[b||v.jsx(cI,{}),i]})});jl.classes=fI;jl.varsResolver=dI;jl.displayName="@mantine/core/CloseButton";function BJ(e){return x.Children.toArray(e).filter(Boolean)}var hI={root:"m_4081bf90"};const FJ={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},mI=(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":Yt(i),"--group-align":r,"--group-justify":a,"--group-wrap":o}}),Ee=Pe(e=>{const n=ye("Group",FJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,children:l,gap:u,align:f,justify:h,wrap:d,grow:p,preventGrowOverflow:g,vars:b,variant:w,__size:k,mod:_,attributes:S,...j}=n,T=BJ(l),A=T.length,O=Yt(u??"md");return v.jsx(fe,{...Ze({name:"Group",props:n,stylesCtx:{childWidth:`calc(${100/A}% - (${O} - ${O} / ${A}))`},className:i,style:r,classes:hI,classNames:t,styles:a,unstyled:o,attributes:S,vars:b,varsResolver:mI})("root"),variant:w,mod:[{grow:p},_],size:k,...j,children:T})});Ee.classes=hI;Ee.varsResolver=mI;Ee.displayName="@mantine/core/Group";const[qJ,gs]=Ar("ModalBase component was not found in tree");function HJ({opened:e,transitionDuration:n}){const[t,i]=x.useState(e),r=x.useRef(-1),a=eC()?0:n;return x.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 UJ({id:e,transitionProps:n,opened:t,trapFocus:i,closeOnEscape:r,onClose:a,returnFocus:o}){const l=Pi(e),[u,f]=x.useState(!1),[h,d]=x.useState(!1),p=HJ({opened:t,transitionDuration:typeof(n==null?void 0:n.duration)=="number"?n==null?void 0:n.duration:200});return Hz("keydown",g=>{var b;g.key==="Escape"&&r&&!g.isComposing&&t&&((b=g.target)==null?void 0:b.getAttribute("data-mantine-stop-propagation"))!=="true"&&a()},{capture:!0}),Iz({opened:t,shouldReturnFocus:i&&o}),{_id:l,titleMounted:u,bodyMounted:h,shouldLockScroll:p,setTitleMounted:f,setBodyMounted:d}}var to=function(){return to=Object.assign||function(n){for(var t,i=1,r=arguments.length;i"u")return see;var n=lee(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])}},cee=yI(),Zc="data-scroll-locked",fee=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(WJ,` { overflow: hidden `).concat(i,`; padding-right: `).concat(l,"px ").concat(i,`; } @@ -61,12 +61,12 @@ ${o?`${l("light")}{${o}}`:""}`}function Zv({theme:e,color:n,colorScheme:t,name:i } body[`).concat(Zc,`] { - `).concat(WJ,": ").concat(l,`px; + `).concat(GJ,": ").concat(l,`px; } -`)},xE=function(){var e=parseInt(document.body.getAttribute(Zc)||"0",10);return isFinite(e)?e:0},fee=function(){x.useEffect(function(){return document.body.setAttribute(Zc,(xE()+1).toString()),function(){var e=xE()-1;e<=0?document.body.removeAttribute(Zc):document.body.setAttribute(Zc,e.toString())}},[])},dee=function(e){var n=e.noRelative,t=e.noImportant,i=e.gapMode,r=i===void 0?"margin":i;fee();var a=x.useMemo(function(){return lee(r)},[r]);return x.createElement(uee,{styles:cee(a,!n,r,t?"":"!important")})},IS=!1;if(typeof window<"u")try{var ng=Object.defineProperty({},"passive",{get:function(){return IS=!0,!0}});window.addEventListener("test",ng,ng),window.removeEventListener("test",ng,ng)}catch{IS=!1}var Dc=IS?{passive:!1}:!1,hee=function(e){return e.tagName==="TEXTAREA"},yI=function(e,n){if(!(e instanceof Element))return!1;var t=window.getComputedStyle(e);return t[n]!=="hidden"&&!(t.overflowY===t.overflowX&&!hee(e)&&t[n]==="visible")},mee=function(e){return yI(e,"overflowY")},pee=function(e){return yI(e,"overflowX")},SE=function(e,n){var t=n.ownerDocument,i=n;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=bI(e,i);if(r){var a=wI(e,i),o=a[1],l=a[2];if(o>l)return!0}i=i.parentNode}while(i&&i!==t.body);return!1},vee=function(e){var n=e.scrollTop,t=e.scrollHeight,i=e.clientHeight;return[n,t,i]},gee=function(e){var n=e.scrollLeft,t=e.scrollWidth,i=e.clientWidth;return[n,t,i]},bI=function(e,n){return e==="v"?mee(n):pee(n)},wI=function(e,n){return e==="v"?vee(n):gee(n)},yee=function(e,n){return e==="h"&&n==="rtl"?-1:1},bee=function(e,n,t,i,r){var a=yee(e,window.getComputedStyle(n).direction),o=a*i,l=t.target,u=n.contains(l),f=!1,h=o>0,d=0,p=0;do{if(!l)break;var g=wI(e,l),b=g[0],w=g[1],k=g[2],_=w-k-a*b;(b||_)&&bI(e,l)&&(d+=_,p+=b);var S=l.parentNode;l=S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?S.host:S}while(!u&&l!==document.body||u&&(n.contains(l)||n===l));return(h&&Math.abs(d)<1||!h&&Math.abs(p)<1)&&(f=!0),f},tg=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},CE=function(e){return[e.deltaX,e.deltaY]},jE=function(e){return e&&"current"in e?e.current:e},wee=function(e,n){return e[0]===n[0]&&e[1]===n[1]},kee=function(e){return` +`)},xE=function(){var e=parseInt(document.body.getAttribute(Zc)||"0",10);return isFinite(e)?e:0},dee=function(){x.useEffect(function(){return document.body.setAttribute(Zc,(xE()+1).toString()),function(){var e=xE()-1;e<=0?document.body.removeAttribute(Zc):document.body.setAttribute(Zc,e.toString())}},[])},hee=function(e){var n=e.noRelative,t=e.noImportant,i=e.gapMode,r=i===void 0?"margin":i;dee();var a=x.useMemo(function(){return uee(r)},[r]);return x.createElement(cee,{styles:fee(a,!n,r,t?"":"!important")})},IS=!1;if(typeof window<"u")try{var ng=Object.defineProperty({},"passive",{get:function(){return IS=!0,!0}});window.addEventListener("test",ng,ng),window.removeEventListener("test",ng,ng)}catch{IS=!1}var Dc=IS?{passive:!1}:!1,mee=function(e){return e.tagName==="TEXTAREA"},bI=function(e,n){if(!(e instanceof Element))return!1;var t=window.getComputedStyle(e);return t[n]!=="hidden"&&!(t.overflowY===t.overflowX&&!mee(e)&&t[n]==="visible")},pee=function(e){return bI(e,"overflowY")},vee=function(e){return bI(e,"overflowX")},SE=function(e,n){var t=n.ownerDocument,i=n;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=wI(e,i);if(r){var a=kI(e,i),o=a[1],l=a[2];if(o>l)return!0}i=i.parentNode}while(i&&i!==t.body);return!1},gee=function(e){var n=e.scrollTop,t=e.scrollHeight,i=e.clientHeight;return[n,t,i]},yee=function(e){var n=e.scrollLeft,t=e.scrollWidth,i=e.clientWidth;return[n,t,i]},wI=function(e,n){return e==="v"?pee(n):vee(n)},kI=function(e,n){return e==="v"?gee(n):yee(n)},bee=function(e,n){return e==="h"&&n==="rtl"?-1:1},wee=function(e,n,t,i,r){var a=bee(e,window.getComputedStyle(n).direction),o=a*i,l=t.target,u=n.contains(l),f=!1,h=o>0,d=0,p=0;do{if(!l)break;var g=kI(e,l),b=g[0],w=g[1],k=g[2],_=w-k-a*b;(b||_)&&wI(e,l)&&(d+=_,p+=b);var S=l.parentNode;l=S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?S.host:S}while(!u&&l!==document.body||u&&(n.contains(l)||n===l));return(h&&Math.abs(d)<1||!h&&Math.abs(p)<1)&&(f=!0),f},tg=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},CE=function(e){return[e.deltaX,e.deltaY]},jE=function(e){return e&&"current"in e?e.current:e},kee=function(e,n){return e[0]===n[0]&&e[1]===n[1]},_ee=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},_ee=0,Rc=[];function xee(e){var n=x.useRef([]),t=x.useRef([0,0]),i=x.useRef(),r=x.useState(_ee++)[0],a=x.useState(gI)[0],o=x.useRef(e);x.useEffect(function(){o.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var w=UJ([e.lockRef.current],(e.shards||[]).map(jE),!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=x.useCallback(function(w,k){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!o.current.allowPinchZoom;var _=tg(w),S=t.current,j="deltaX"in w?w.deltaX:S[0]-_[0],T="deltaY"in w?w.deltaY:S[1]-_[1],A,O=w.target,M=Math.abs(j)>Math.abs(T)?"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 L=SE(M,O);if(!L)return!0;if(L?A=M:(A=M==="v"?"h":"v",L=SE(M,O)),!L)return!1;if(!i.current&&"changedTouches"in w&&(j||T)&&(i.current=A),!A)return!0;var U=i.current||A;return bee(U,k,w,U==="h"?j:T)},[]),u=x.useCallback(function(w){var k=w;if(!(!Rc.length||Rc[Rc.length-1]!==a)){var _="deltaY"in k?CE(k):tg(k),S=n.current.filter(function(A){return A.name===k.type&&(A.target===k.target||k.target===A.shadowParent)&&wee(A.delta,_)})[0];if(S&&S.should){k.cancelable&&k.preventDefault();return}if(!S){var j=(o.current.shards||[]).map(jE).filter(Boolean).filter(function(A){return A.contains(k.target)}),T=j.length>0?l(k,j[0]):!o.current.noIsolation;T&&k.cancelable&&k.preventDefault()}}},[]),f=x.useCallback(function(w,k,_,S){var j={name:w,delta:k,target:_,should:S,shadowParent:See(_)};n.current.push(j),setTimeout(function(){n.current=n.current.filter(function(T){return T!==j})},1)},[]),h=x.useCallback(function(w){t.current=tg(w),i.current=void 0},[]),d=x.useCallback(function(w){f(w.type,CE(w),w.target,l(w,e.lockRef.current))},[]),p=x.useCallback(function(w){f(w.type,tg(w),w.target,l(w,e.lockRef.current))},[]);x.useEffect(function(){return Rc.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",u,Dc),document.addEventListener("touchmove",u,Dc),document.addEventListener("touchstart",h,Dc),function(){Rc=Rc.filter(function(w){return w!==a}),document.removeEventListener("wheel",u,Dc),document.removeEventListener("touchmove",u,Dc),document.removeEventListener("touchstart",h,Dc)}},[]);var g=e.removeScrollBar,b=e.inert;return x.createElement(x.Fragment,null,b?x.createElement(a,{styles:kee(r)}):null,g?x.createElement(dee,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function See(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const Cee=JJ(vI,xee);var Tu=x.forwardRef(function(e,n){return x.createElement($y,to({},e,{ref:n,sideCar:Cee}))});Tu.classNames=$y.classNames;function kI({keepMounted:e,opened:n,onClose:t,id:i,transitionProps:r,onExitTransitionEnd:a,onEnterTransitionEnd:o,trapFocus:l,closeOnEscape:u,returnFocus:f,closeOnClickOutside:h,withinPortal:d,portalProps:p,lockScroll:g,children:b,zIndex:w,shadow:k,padding:_,__vars:S,unstyled:j,removeScrollProps:T,...A}){const{_id:O,titleMounted:M,bodyMounted:$,shouldLockScroll:q,setTitleMounted:P,setBodyMounted:L}=HJ({id:i,transitionProps:r,opened:n,trapFocus:l,closeOnEscape:u,onClose:t,returnFocus:f}),{key:U,...G}=T||{};return v.jsx(wl,{...p,withinPortal:d,children:v.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:L,trapFocus:l,closeOnEscape:u,zIndex:w,unstyled:j},children:v.jsx(Tu,{enabled:q&&g,...G,children:v.jsx(fe,{...A,id:O,__vars:{...S,"--mb-z-index":(w||xa("modal")).toString(),"--mb-shadow":Q6(k),"--mb-padding":Yt(_)},children:b})},U)})})}kI.displayName="@mantine/core/ModalBase";function jee(){const e=gs();return x.useEffect(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var sf={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};function _I({className:e,...n}){const t=jee(),i=gs();return v.jsx(fe,{id:t,className:vn({[sf.body]:!i.unstyled},e),...n})}_I.displayName="@mantine/core/ModalBaseBody";function xI({className:e,onClick:n,...t}){const i=gs();return v.jsx(jl,{...t,onClick:r=>{i.onClose(),n==null||n(r)},className:vn({[sf.close]:!i.unstyled},e),unstyled:i.unstyled})}xI.displayName="@mantine/core/ModalBaseCloseButton";function SI({transitionProps:e,className:n,innerProps:t,onKeyDown:i,style:r,ref:a,...o}){const l=gs();return v.jsx(ls,{mounted:l.opened,transition:"pop",...l.transitionProps,onExited:()=>{var u,f,h;(u=l.onExitTransitionEnd)==null||u.call(l),(h=(f=l.transitionProps)==null?void 0:f.onExited)==null||h.call(f)},onEntered:()=>{var u,f,h;(u=l.onEnterTransitionEnd)==null||u.call(l),(h=(f=l.transitionProps)==null?void 0:f.onEntered)==null||h.call(f)},...e,children:u=>v.jsx("div",{...t,className:vn({[sf.inner]:!l.unstyled},t.className),children:v.jsx(Ry,{active:l.opened&&l.trapFocus,innerRef:a,children:v.jsx(Tt,{...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,u],className:vn({[sf.content]:!l.unstyled},n),unstyled:l.unstyled,children:o.children})})})})}SI.displayName="@mantine/core/ModalBaseContent";function CI({className:e,...n}){const t=gs();return v.jsx(fe,{component:"header",className:vn({[sf.header]:!t.unstyled},e),...n})}CI.displayName="@mantine/core/ModalBaseHeader";const Aee={duration:200,timingFunction:"ease",transition:"fade"};function Oee(e){const n=gs();return{...Aee,...n.transitionProps,...e}}function jI({onClick:e,transitionProps:n,style:t,visible:i,...r}){const a=gs(),o=Oee(n);return v.jsx(ls,{mounted:i!==void 0?i:a.opened,...o,transition:"fade",children:l=>v.jsx(up,{fixed:!0,style:[t,l],zIndex:a.zIndex,unstyled:a.unstyled,onClick:u=>{e==null||e(u),a.closeOnClickOutside&&a.onClose()},...r})})}jI.displayName="@mantine/core/ModalBaseOverlay";function Tee(){const e=gs();return x.useEffect(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function AI({className:e,...n}){const t=Tee(),i=gs();return v.jsx(fe,{component:"h2",className:vn({[sf.title]:!i.unstyled},e),id:t,...n})}AI.displayName="@mantine/core/ModalBaseTitle";function Eee({children:e}){return v.jsx(v.Fragment,{children:e})}const OI=x.createContext({size:"sm"}),TI=Pe(e=>{const n=ye("InputClearButton",null,e),{size:t,variant:i,vars:r,classNames:a,styles:o,...l}=n,u=x.use(OI),{resolvedClassNames:f,resolvedStyles:h}=Wi({classNames:a,styles:o,props:n});return v.jsx(jl,{variant:i||"transparent",size:t||(u==null?void 0:u.size)||"sm",classNames:f,styles:h,__staticSelector:"InputClearButton",style:{pointerEvents:"all",background:"var(--input-bg)",...l.style},...l})});TI.displayName="@mantine/core/InputClearButton";const Mee={xs:7,sm:8,md:10,lg:12,xl:15};function Dee({__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)?v.jsxs("div",{"data-combined-clear-section":!0,style:{display:"flex",gap:2,alignItems:"center",paddingInlineEnd:Mee[r]},children:[o,t||i]}):t===null?null:t||o||i}const Hu=x.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var ja={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 EI=(e,{size:n})=>({description:{"--input-description-size":n===void 0?void 0:`calc(${ai(n)} - ${ve(2)})`}}),cp=Pe(e=>{const n=ye("InputDescription",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:u,__inheritStyles:f=!0,attributes:h,...d}=ye("InputDescription",null,n),p=x.use(Hu),g=Ze({name:["InputWrapper",u],props:n,classes:ja,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,rootSelector:"description",vars:l,varsResolver:EI});return v.jsx(fe,{component:"p",...(f&&(p==null?void 0:p.getStyles)||g)("description",p!=null&&p.getStyles?{className:i,style:r}:void 0),...d})});cp.classes=ja;cp.varsResolver=EI;cp.displayName="@mantine/core/InputDescription";const MI=(e,{size:n})=>({error:{"--input-error-size":n===void 0?void 0:`calc(${ai(n)} - ${ve(2)})`}}),fp=Pe(e=>{const n=ye("InputError",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:u,__staticSelector:f,__inheritStyles:h=!0,...d}=n,p=Ze({name:["InputWrapper",f],props:n,classes:ja,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:u,rootSelector:"error",vars:l,varsResolver:MI}),g=x.use(Hu);return v.jsx(fe,{component:"p",...(h&&(g==null?void 0:g.getStyles)||p)("error",g!=null&&g.getStyles?{className:i,style:r}:void 0),...d})});fp.classes=ja;fp.varsResolver=MI;fp.displayName="@mantine/core/InputError";const Ree={labelElement:"label"},DI=(e,{size:n})=>({label:{"--input-label-size":ai(n),"--input-asterisk-color":void 0}}),dp=Pe(e=>{const n=ye("InputLabel",Ree,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,labelElement:u,required:f,htmlFor:h,onMouseDown:d,children:p,__staticSelector:g,mod:b,attributes:w,...k}=n,_=Ze({name:["InputWrapper",g],props:n,classes:ja,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,rootSelector:"label",vars:l,varsResolver:DI}),S=x.use(Hu),j=(S==null?void 0:S.getStyles)||_;return v.jsxs(fe,{...j("label",S!=null&&S.getStyles?{className:i,style:r}:void 0),component:u,htmlFor:u==="label"?h:void 0,mod:[{required:f},b],onMouseDown:T=>{d==null||d(T),!T.defaultPrevented&&T.detail>1&&T.preventDefault()},...k,children:[p,f&&v.jsx("span",{...j("required"),"aria-hidden":!0,children:" *"})]})});dp.classes=ja;dp.varsResolver=DI;dp.displayName="@mantine/core/InputLabel";const _C=Pe(e=>{const n=ye("InputPlaceholder",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:u,error:f,mod:h,attributes:d,...p}=n;return v.jsx(fe,{...Ze({name:["InputPlaceholder",u],props:n,classes:ja,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:d,rootSelector:"placeholder"})("placeholder"),mod:[{error:!!f},h],component:"span",...p})});_C.classes=ja;_C.displayName="@mantine/core/InputPlaceholder";function Pee(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 Nee={labelElement:"label",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},RI=(e,{size:n})=>({label:{"--input-label-size":ai(n),"--input-asterisk-color":void 0},error:{"--input-error-size":n===void 0?void 0:`calc(${ai(n)} - ${ve(2)})`},description:{"--input-description-size":n===void 0?void 0:`calc(${ai(n)} - ${ve(2)})`}}),zy=Pe(e=>{const n=ye("InputWrapper",Nee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:u,variant:f,__staticSelector:h,inputContainer:d,inputWrapperOrder:p,label:g,error:b,description:w,labelProps:k,descriptionProps:_,errorProps:S,labelElement:j,children:T,withAsterisk:A,id:O,required:M,__stylesApiProps:$,mod:q,attributes:P,...L}=n,U=Ze({name:["InputWrapper",h],props:$||n,classes:ja,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:P,vars:l,varsResolver:RI}),G={size:u,variant:f,__staticSelector:h},B=Pi(O),R=typeof A=="boolean"?A:M,D=(S==null?void 0:S.id)||`${B}-error`,z=(_==null?void 0:_.id)||`${B}-description`,H=B,Y=!!b&&typeof b!="boolean",N=!!w,W=`${Y?D:""} ${N?z:""}`,V=W.trim().length>0?W.trim():void 0,I=(k==null?void 0:k.id)||`${B}-label`,Q=g&&v.jsx(dp,{labelElement:j,id:I,htmlFor:H,required:R,...G,...k,children:g},"label"),ie=N&&v.jsx(cp,{..._,...G,size:(_==null?void 0:_.size)||G.size,id:(_==null?void 0:_.id)||z,children:w},"description"),re=v.jsx(x.Fragment,{children:d(T)},"input"),Z=Y&&x.createElement(fp,{...S,...G,size:(S==null?void 0:S.size)||G.size,key:"error",id:(S==null?void 0:S.id)||D},b),le=p.map(ee=>{switch(ee){case"label":return Q;case"input":return re;case"description":return ie;case"error":return Z;default:return null}});return v.jsx(Hu,{value:{getStyles:U,describedBy:V,inputId:H,labelId:I,...Pee(p,{hasDescription:N,hasError:Y})},children:v.jsx(fe,{variant:f,size:u,mod:[{error:!!b},q],id:j==="label"?void 0:O,...U("root"),...L,children:le})})});zy.classes=ja;zy.varsResolver=RI;zy.displayName="@mantine/core/InputWrapper";const $ee={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0,size:"sm",loading:!1,loadingPosition:"right"},PI=(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":Ln(n.size,"input-height"),"--input-fz":ai(n.size),"--input-radius":n.radius===void 0?void 0:qt(n.radius),"--input-left-section-width":n.leftSectionWidth!==void 0?ve(n.leftSectionWidth):void 0,"--input-right-section-width":n.rightSectionWidth!==void 0?ve(n.rightSectionWidth):void 0,"--input-padding-y":n.multiline?Ln(n.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":n.leftSectionPointerEvents,"--input-right-section-pointer-events":n.rightSectionPointerEvents}}),Xt=ki(e=>{const n=ye("Input",$ee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,required:l,__staticSelector:u,__stylesApiProps:f,size:h,wrapperProps:d,error:p,disabled:g,leftSection:b,leftSectionProps:w,leftSectionWidth:k,rightSection:_,rightSectionProps:S,rightSectionWidth:j,rightSectionPointerEvents:T,leftSectionPointerEvents:A,variant:O,vars:M,pointer:$,multiline:q,radius:P,id:L,withAria:U,withErrorStyles:G,mod:B,inputSize:R,attributes:D,__clearSection:z,__clearable:H,__clearSectionMode:Y,__defaultRightSection:N,loading:W,loadingPosition:V,rootRef:I,...Q}=n,{styleProps:ie,rest:re}=Fu(Q),Z=x.use(Hu),le={offsetBottom:Z==null?void 0:Z.offsetBottom,offsetTop:Z==null?void 0:Z.offsetTop},ee=Ze({name:["Input",u],props:f||n,classes:ja,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:D,stylesCtx:le,rootSelector:"wrapper",vars:M,varsResolver:PI}),se=U?{required:l,disabled:g,"aria-invalid":p?!0:void 0,"aria-describedby":Z==null?void 0:Z.describedBy,id:(Z==null?void 0:Z.inputId)||L}:{},ke=W?v.jsx(Zt,{size:V==="left"?"calc(var(--input-left-section-size) / 2)":"calc(var(--input-right-section-size) / 2)"}):null,te=W&&V==="left"?ke:b,$e=Dee({__clearable:H,__clearSection:z,rightSection:W&&V==="right"?ke:_,__defaultRightSection:N,size:h,__clearSectionMode:Y});return v.jsx(OI,{value:{size:h||"sm"},children:v.jsxs(fe,{ref:I,...ee("wrapper"),...ie,...d,mod:[{error:!!p&&G,pointer:$,disabled:g,multiline:q,"data-with-right-section":!!$e,"data-with-left-section":!!te},B],variant:O,size:h,children:[te&&v.jsx("div",{...w,"data-position":"left",...ee("section",{className:w==null?void 0:w.className,style:w==null?void 0:w.style}),children:te}),v.jsx(fe,{component:"input",...re,...se,required:l,mod:{disabled:g,error:!!p&&G},variant:O,__size:R,...ee("input")}),$e&&v.jsx("div",{...S,"data-position":"right",...ee("section",{className:S==null?void 0:S.className,style:S==null?void 0:S.style}),children:$e})]})})});Xt.classes=ja;Xt.varsResolver=PI;Xt.Wrapper=zy;Xt.Label=dp;Xt.Error=fp;Xt.Description=cp;Xt.Placeholder=_C;Xt.ClearButton=TI;Xt.displayName="@mantine/core/Input";function NI(e,n,t){const i=ye(e,n,t),{label:r,description:a,error:o,required:l,classNames:u,styles:f,className:h,unstyled:d,__staticSelector:p,__stylesApiProps:g,errorProps:b,labelProps:w,descriptionProps:k,wrapperProps:_,id:S,size:j,style:T,inputContainer:A,inputWrapperOrder:O,withAsterisk:M,variant:$,vars:q,mod:P,attributes:L,...U}=i,{styleProps:G,rest:B}=Fu(U),R={label:r,description:a,error:o,required:l,classNames:u,className:h,__staticSelector:p,__stylesApiProps:g||i,errorProps:b,labelProps:w,descriptionProps:k,unstyled:d,styles:f,size:j,style:T,inputContainer:A,inputWrapperOrder:O,withAsterisk:M,variant:$,id:S,mod:P,attributes:L,..._};return{...B,classNames:u,styles:f,unstyled:d,wrapperProps:{...R,...G},inputProps:{required:l,classNames:u,styles:f,unstyled:d,size:j,__staticSelector:p,__stylesApiProps:g||i,error:o,variant:$,id:S,attributes:L}}}const zee={__staticSelector:"InputBase",withAria:!0,size:"sm"},Ni=ki(e=>{const{inputProps:n,wrapperProps:t,...i}=NI("InputBase",zee,e);return v.jsx(Xt.Wrapper,{...t,children:v.jsx(Xt,{...n,...i})})});Ni.classes={...Xt.classes,...Xt.Wrapper.classes};Ni.displayName="@mantine/core/InputBase";function e1({style:e,size:n=16,...t}){return v.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:ve(n),height:ve(n),display:"block"},...t,children:v.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"})})}e1.displayName="@mantine/core/AccordionChevron";var $I={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 zI=(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:qt(n),"--alert-bg":t||i?a.background:void 0,"--alert-color":a.color,"--alert-bd":t||i?a.border:void 0}}},kl=Pe(e=>{const n=ye("Alert",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,radius:u,color:f,title:h,children:d,id:p,icon:g,withCloseButton:b,onClose:w,closeButtonLabel:k,variant:_,autoContrast:S,role:j,attributes:T,...A}=n,O=Ze({name:"Alert",classes:$I,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:T,vars:l,varsResolver:zI}),M=Pi(p),$=h&&`${M}-title`||void 0,q=`${M}-body`;return v.jsx(fe,{id:M,...O("root",{variant:_}),variant:_,...A,role:j||"alert","aria-describedby":d?q:void 0,"aria-labelledby":h?$:void 0,children:v.jsxs("div",{...O("wrapper"),children:[g&&v.jsx("div",{...O("icon"),children:g}),v.jsxs("div",{...O("body"),children:[h&&v.jsx("div",{...O("title"),"data-with-close-button":b||void 0,children:v.jsx("span",{id:$,...O("label"),children:h})}),d&&v.jsx("div",{id:q,...O("message"),"data-variant":_,children:d})]}),b&&v.jsx(jl,{...O("closeButton"),onClick:w,variant:"transparent",size:16,iconSize:16,"aria-label":k,unstyled:o})]})})});kl.classes=$I;kl.varsResolver=zI;kl.displayName="@mantine/core/Alert";var LI={root:"m_b6d8b162"};function Lee(e){if(e==="start")return"start";if(e==="end"||e)return"end"}const Iee={inherit:!1},II=(e,{variant:n,lineClamp:t,gradient:i,size:r})=>({root:{"--text-fz":ai(r),"--text-lh":iX(r),"--text-gradient":n==="gradient"?OS(i,e):void 0,"--text-line-clamp":typeof t=="number"?t.toString():void 0}}),de=ki(e=>{const n=ye("Text",Iee,e),{lineClamp:t,truncate:i,inline:r,inherit:a,gradient:o,span:l,__staticSelector:u,vars:f,className:h,style:d,classNames:p,styles:g,unstyled:b,variant:w,mod:k,size:_,attributes:S,...j}=n;return v.jsx(fe,{...Ze({name:["Text",u],props:n,classes:LI,className:h,style:d,classNames:p,styles:g,unstyled:b,attributes:S,vars:f,varsResolver:II})("root",{focusable:!0}),component:l?"span":"p",variant:w,mod:[{"data-truncate":Lee(i),"data-line-clamp":typeof t=="number","data-inline":r,"data-inherit":a},k],size:_,...j})});de.classes=LI;de.varsResolver=II;de.displayName="@mantine/core/Text";var BI={root:"m_849cf0da"};const Bee={underline:"hover"},ho=ki(e=>{const{underline:n,className:t,unstyled:i,mod:r,...a}=ye("Anchor",Bee,e);return v.jsx(de,{component:"a",className:vn({[BI.root]:!i},t),...a,mod:[{underline:n},r],__staticSelector:"Anchor",unstyled:i})});ho.classes=BI;ho.displayName="@mantine/core/Anchor";const[Fee,Uf]=Ar("AppShell was not found in tree");var Al={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};const xC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:u,mod:f,...h}=ye("AppShellAside",null,e),d=Uf();return d.disabled?null:v.jsx(fe,{component:"aside",mod:[{"with-border":l??d.withBorder},f],...d.getStyles("aside",{className:vn({[Tu.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-aside-z-index":`calc(${u??d.zIndex} + 1)`}})});xC.classes=Al;xC.displayName="@mantine/core/AppShellAside";const SC=Pe(e=>{var p;const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:u,mod:f,...h}=ye("AppShellFooter",null,e),d=Uf();return d.disabled?null:v.jsx(fe,{component:"footer",mod:[{"with-border":l??d.withBorder},f],...d.getStyles("footer",{className:vn({[Tu.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-footer-z-index":(p=u??d.zIndex)==null?void 0:p.toString()}})});SC.classes=Al;SC.displayName="@mantine/core/AppShellFooter";const CC=Pe(e=>{var p;const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:u,mod:f,...h}=ye("AppShellHeader",null,e),d=Uf();return d.disabled?null:v.jsx(fe,{component:"header",mod:[{"with-border":l??d.withBorder},f],...d.getStyles("header",{className:vn({[Tu.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-header-z-index":(p=u??d.zIndex)==null?void 0:p.toString()}})});CC.classes=Al;CC.displayName="@mantine/core/AppShellHeader";const jC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("AppShellMain",null,e);return v.jsx(fe,{component:"main",...Uf().getStyles("main",{className:t,style:i,classNames:n,styles:r}),...o})});jC.classes=Al;jC.displayName="@mantine/core/AppShellMain";const AC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:u,mod:f,...h}=ye("AppShellNavbar",null,e),d=Uf();return d.disabled?null:v.jsx(fe,{component:"nav",mod:[{"with-border":l??d.withBorder},f],...d.getStyles("navbar",{className:t,classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-navbar-z-index":`calc(${u??d.zIndex} + 1)`}})});AC.classes=Al;AC.displayName="@mantine/core/AppShellNavbar";const OC=ki(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,grow:o,mod:l,...u}=ye("AppShellSection",null,e),f=Uf();return v.jsx(fe,{mod:[{grow:o},l],...f.getStyles("section",{className:t,style:i,classNames:n,styles:r}),...u})});OC.classes=Al;OC.displayName="@mantine/core/AppShellSection";function hp(e){return typeof e=="object"?e.base:e}function mp(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 pp(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function qee({baseStyles:e,minMediaStyles:n,maxMediaStyles:t,aside:i,theme:r,mode:a}){var f,h,d;const o=i==null?void 0:i.width,l="translateX(var(--app-shell-aside-width))",u="translateX(calc(var(--app-shell-aside-width) * -1))";if(i!=null&&i.breakpoint&&!((f=i==null?void 0:i.collapsed)!=null&&f.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")),mp(o)){const p=ve(hp(o));e["--app-shell-aside-width"]=p,e["--app-shell-aside-offset"]=p}if(pp(o)&&(typeof o.base<"u"&&(e["--app-shell-aside-width"]=ve(o.base),e["--app-shell-aside-offset"]=ve(o.base)),$t(o).forEach(p=>{p!=="base"&&(n[p]=n[p]||{},n[p]["--app-shell-aside-width"]=ve(o[p]),n[p]["--app-shell-aside-offset"]=ve(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"]=u,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=J6(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"]=u,t[p]["--app-shell-aside-scroll-locked-visibility"]="hidden"}}function Hee({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"),mp(r)){const l=ve(hp(r));e["--app-shell-footer-height"]=l,o&&(e["--app-shell-footer-offset"]=l)}pp(r)&&(typeof r.base<"u"&&(e["--app-shell-footer-height"]=ve(r.base),o&&(e["--app-shell-footer-offset"]=ve(r.base))),$t(r).forEach(l=>{l!=="base"&&(n[l]=n[l]||{},n[l]["--app-shell-footer-height"]=ve(r[l]),o&&(n[l]["--app-shell-footer-offset"]=ve(r[l])))})),t!=null&&t.collapsed&&(e["--app-shell-footer-transform"]=a,i==="fixed"&&(e["--app-shell-footer-offset"]="0px !important"))}function Uee({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"),mp(r)){const l=ve(hp(r));e["--app-shell-header-height"]=l,o&&(e["--app-shell-header-offset"]=l)}pp(r)&&(typeof r.base<"u"&&(e["--app-shell-header-height"]=ve(r.base),o&&(e["--app-shell-header-offset"]=ve(r.base))),$t(r).forEach(l=>{l!=="base"&&(n[l]=n[l]||{},n[l]["--app-shell-header-height"]=ve(r[l]),o&&(n[l]["--app-shell-header-offset"]=ve(r[l])))})),t!=null&&t.collapsed&&(e["--app-shell-header-transform"]=a,i==="fixed"&&(e["--app-shell-header-offset"]="0px !important"))}function Vee({baseStyles:e,minMediaStyles:n,maxMediaStyles:t,navbar:i,theme:r,mode:a}){var f,h,d;const o=i==null?void 0:i.width,l="translateX(calc(var(--app-shell-navbar-width) * -1))",u="translateX(var(--app-shell-navbar-width))";if(i!=null&&i.breakpoint&&!((f=i==null?void 0:i.collapsed)!=null&&f.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")),mp(o)){const p=ve(hp(o));e["--app-shell-navbar-width"]=p,e["--app-shell-navbar-offset"]=p,a==="static"&&(e["--app-shell-navbar-grid-width"]=p)}if(pp(o)&&(typeof o.base<"u"&&(e["--app-shell-navbar-width"]=ve(o.base),e["--app-shell-navbar-offset"]=ve(o.base),a==="static"&&(e["--app-shell-navbar-grid-width"]=ve(o.base))),$t(o).forEach(p=>{p!=="base"&&(n[p]=n[p]||{},n[p]["--app-shell-navbar-width"]=ve(o[p]),n[p]["--app-shell-navbar-offset"]=ve(o[p]),a==="static"&&(n[p]["--app-shell-navbar-grid-width"]=ve(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"]=u,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=J6(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"]=u}}function $k(e){return Number(e)===0?"0px":Yt(e)}function Wee({padding:e,baseStyles:n,minMediaStyles:t}){mp(e)&&(n["--app-shell-padding"]=$k(hp(e))),pp(e)&&(e.base&&(n["--app-shell-padding"]=$k(e.base)),$t(e).forEach(i=>{i!=="base"&&(t[i]=t[i]||{},t[i]["--app-shell-padding"]=$k(e[i]))}))}function Gee({navbar:e,header:n,footer:t,aside:i,padding:r,theme:a,mode:o}){const l={},u={},f={};o==="static"&&(f["--app-shell-main-grid-column"]="1 / -1",f["--app-shell-main-grid-row"]="2"),Vee({baseStyles:f,minMediaStyles:l,maxMediaStyles:u,navbar:e,theme:a,mode:o}),qee({baseStyles:f,minMediaStyles:l,maxMediaStyles:u,aside:i,theme:a,mode:o}),Uee({baseStyles:f,minMediaStyles:l,header:n,mode:o}),Hee({baseStyles:f,minMediaStyles:l,footer:t,mode:o}),Wee({baseStyles:f,minMediaStyles:l,padding:r});const h=um($t(l),a.breakpoints).map(p=>({query:`(min-width: ${Vg(p.px)})`,styles:l[p.value]})),d=um($t(u),a.breakpoints).map(p=>({query:`(max-width: ${Vg(p.px)})`,styles:u[p.value]}));return{baseStyles:f,media:[...h,...d]}}function Yee({navbar:e,header:n,aside:t,footer:i,padding:r,mode:a,selector:o}){const l=ci(),u=wo(),{media:f,baseStyles:h}=Gee({navbar:e,header:n,footer:i,aside:t,padding:r,theme:l,mode:a});return v.jsx(Bf,{media:f,styles:h,selector:o||u.cssVariablesSelector})}function Kee({transitionDuration:e,disabled:n}){const[t,i]=x.useState(!0),r=x.useRef(-1),a=x.useRef(-1);return qz("resize",()=>{i(!0),clearTimeout(r.current),r.current=window.setTimeout(()=>x.startTransition(()=>{i(!1)}),200)}),ps(()=>{i(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>x.startTransition(()=>{i(!1)}),e||0)},[n,e]),t}const Xee={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:xa("app"),mode:"fixed"},FI=(e,{transitionDuration:n,transitionTimingFunction:t})=>({root:{"--app-shell-transition-duration":`${n}ms`,"--app-shell-transition-timing-function":t}}),xr=Pe(e=>{const n=ye("AppShell",Xee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,navbar:u,withBorder:f,padding:h,transitionDuration:d,transitionTimingFunction:p,header:g,zIndex:b,layout:w,disabled:k,aside:_,footer:S,offsetScrollbars:j=!0,mode:T,mod:A,attributes:O,id:M,...$}=n,q=Ze({name:"AppShell",classes:Al,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:O,vars:l,varsResolver:FI}),P=Kee({disabled:k,transitionDuration:d}),L=Pi(M);return v.jsxs(Fee,{value:{getStyles:q,withBorder:f,zIndex:b,disabled:k,offsetScrollbars:j,mode:T},children:[v.jsx(Yee,{navbar:u,header:g,aside:_,footer:S,padding:h,mode:T,selector:T==="static"?`#${L}`:void 0}),v.jsx(fe,{...q("root"),id:L,mod:[{resizing:P,layout:w,disabled:k,mode:T},A],...$})]})});xr.classes=Al;xr.varsResolver=FI;xr.displayName="@mantine/core/AppShell";xr.Navbar=AC;xr.Header=CC;xr.Main=jC;xr.Aside=xC;xr.Footer=SC;xr.Section=OC;function qI(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=>qI(n))}:typeof e=="number"||typeof e=="bigint"||typeof e=="boolean"?{value:e,label:`${e}`}:e}function Ly(e){return e?e.map(n=>qI(n)):[]}function vp(e){return e.reduce((n,t)=>"group"in t?{...n,...vp(t.items)}:(n[`${t.value}`]=t,n),{})}var lr={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 Zee={error:null},HI=(e,{size:n,color:t})=>({chevron:{"--combobox-chevron-size":Ln(n,"combobox-chevron-size"),"--combobox-chevron-color":t?ft(t,e):void 0}}),Iy=Pe(e=>{const n=ye("ComboboxChevron",Zee,e),{size:t,error:i,style:r,className:a,classNames:o,styles:l,unstyled:u,vars:f,attributes:h,mod:d,...p}=n,g=Ze({name:"ComboboxChevron",classes:lr,props:n,style:r,className:a,classNames:o,styles:l,unstyled:u,vars:f,varsResolver:HI,attributes:h,rootSelector:"chevron"});return v.jsx(fe,{component:"svg",...p,...g("chevron"),size:t,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:i},d],children:v.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"})})});Iy.classes=lr;Iy.varsResolver=HI;Iy.displayName="@mantine/core/ComboboxChevron";const[Qee,Aa]=Ar("Combobox component was not found in tree");function UI({onMouseDown:e,onClick:n,onClear:t,...i}){return v.jsx(Xt.ClearButton,{tabIndex:-1,"aria-hidden":!0,...i,onMouseDown:r=>{r.preventDefault(),e==null||e(r)},onClick:r=>{t(),n==null||n(r)}})}UI.displayName="@mantine/core/ComboboxClearButton";const TC=Pe(e=>{const{classNames:n,styles:t,className:i,style:r,hidden:a,...o}=ye("ComboboxDropdown",null,e),l=Aa();return v.jsx(Sn.Dropdown,{...o,role:"presentation","data-hidden":a||void 0,...l.getStyles("dropdown",{className:i,style:r,classNames:n,styles:t})})});TC.classes=lr;TC.displayName="@mantine/core/ComboboxDropdown";const Jee={refProp:"ref"},VI=Pe(e=>{const{children:n,refProp:t,ref:i}=ye("ComboboxDropdownTarget",Jee,e);if(Aa(),!X6(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 v.jsx(Sn.Target,{ref:i,refProp:t,children:n})});VI.displayName="@mantine/core/ComboboxDropdownTarget";const EC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ComboboxEmpty",null,e);return v.jsx(fe,{...Aa().getStyles("empty",{className:t,classNames:n,styles:r,style:i}),...o})});EC.classes=lr;EC.displayName="@mantine/core/ComboboxEmpty";function MC({onKeyDown:e,onClick:n,withKeyboardNavigation:t,withAriaAttributes:i,withExpandedAttribute:r,targetType:a,autoComplete:o}){const l=Aa(),[u,f]=x.useState(null),h=g=>{if(e==null||e(g),!l.readOnly&&t){if(g.nativeEvent.isComposing)return;if(g.nativeEvent.code==="ArrowDown"&&(g.preventDefault(),l.store.dropdownOpened?f(l.store.selectNextOption()):(l.store.openDropdown("keyboard"),f(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),g.nativeEvent.code==="ArrowUp"&&(g.preventDefault(),l.store.dropdownOpened?f(l.store.selectPreviousOption()):(l.store.openDropdown("keyboard"),f(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),g.nativeEvent.code==="Enter"||g.nativeEvent.code==="NumpadEnter"){if(g.nativeEvent.keyCode===229)return;const b=l.store.getSelectedOptionIndex();l.store.dropdownOpened&&b!==-1?(g.preventDefault(),l.store.clickSelectedOption()):a==="button"&&(g.preventDefault(),l.store.openDropdown("keyboard"))}g.key==="Escape"&&l.store.closeDropdown("keyboard"),g.nativeEvent.code==="Space"&&a==="button"&&(g.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&&u||void 0,autoComplete:o,"data-expanded":l.store.dropdownOpened||void 0,"data-mantine-stop-propagation":l.store.dropdownOpened||void 0}:{},onKeyDown:h,onClick:g=>{a==="button"&&g.currentTarget.focus(),n==null||n(g)}}}const ene={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},WI=Pe(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:u,...f}=ye("ComboboxEventsTarget",ene,e),h=Cl(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=Aa();return x.cloneElement(h,{...MC({targetType:o,withAriaAttributes:r,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:h.props.onKeyDown,onClick:h.props.onClick,autoComplete:l}),...f,[t]:Ht(u,d.store.targetRef,xy(h))})});WI.displayName="@mantine/core/ComboboxEventsTarget";const DC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ComboboxFooter",null,e);return v.jsx(fe,{...Aa().getStyles("footer",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});DC.classes=lr;DC.displayName="@mantine/core/ComboboxFooter";const RC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,children:o,label:l,id:u,...f}=ye("ComboboxGroup",null,e),h=Aa(),d=Pi(u);return v.jsxs(fe,{role:"group","aria-labelledby":l?d:void 0,...h.getStyles("group",{className:t,classNames:n,style:i,styles:r}),...f,children:[l&&v.jsx("div",{id:d,...h.getStyles("groupLabel",{classNames:n,styles:r}),children:l}),o]})});RC.classes=lr;RC.displayName="@mantine/core/ComboboxGroup";const PC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ComboboxHeader",null,e);return v.jsx(fe,{...Aa().getStyles("header",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});PC.classes=lr;PC.displayName="@mantine/core/ComboboxHeader";function GI({value:e,valuesDivider:n=",",...t}){return v.jsx("input",{type:"hidden",value:Array.isArray(e)?e.join(n):e?`${e}`:"",...t})}GI.displayName="@mantine/core/ComboboxHiddenInput";const NC=Pe(e=>{const n=ye("ComboboxOption",null,e),{classNames:t,className:i,style:r,styles:a,vars:o,onClick:l,id:u,active:f,onMouseDown:h,onMouseOver:d,disabled:p,selected:g,mod:b,...w}=n,k=Aa(),_=x.useId(),S=u||_;return v.jsx(fe,{...k.getStyles("option",{className:i,classNames:t,styles:a,style:r}),...w,id:S,mod:["combobox-option",{"combobox-active":f,"combobox-disabled":p,"combobox-selected":g},b],role:"option",onClick:j=>{var T;p?j.preventDefault():((T=k.onOptionSubmit)==null||T.call(k,n.value,n),l==null||l(j))},onMouseDown:j=>{j.preventDefault(),h==null||h(j)},onMouseOver:j=>{k.resetSelectionOnOptionHover&&k.store.resetSelectedOption(),d==null||d(j)}})});NC.classes=lr;NC.displayName="@mantine/core/ComboboxOption";const $C=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,id:a,onMouseDown:o,labelledBy:l,...u}=ye("ComboboxOptions",null,e),f=Aa(),h=Pi(a);return x.useEffect(()=>{f.store.setListId(h)},[h]),v.jsx(fe,{...f.getStyles("options",{className:t,style:i,classNames:n,styles:r}),...u,id:h,role:"listbox","aria-labelledby":l,onMouseDown:d=>{d.preventDefault(),o==null||o(d)}})});$C.classes=lr;$C.displayName="@mantine/core/ComboboxOptions";const nne={withAriaAttributes:!0,withKeyboardNavigation:!0},zC=Pe(e=>{const{classNames:n,styles:t,unstyled:i,vars:r,withAriaAttributes:a,onKeyDown:o,onClick:l,withKeyboardNavigation:u,size:f,ref:h,...d}=ye("ComboboxSearch",nne,e),p=Aa(),g=p.getStyles("search"),b=MC({targetType:"input",withAriaAttributes:a,withKeyboardNavigation:u,withExpandedAttribute:!1,onKeyDown:o,onClick:l,autoComplete:"off"});return v.jsx(Xt,{ref:Ht(h,p.store.searchRef),classNames:[{input:g.className},n],styles:[{input:g.style},t],size:f||p.size,...b,...d,__staticSelector:"Combobox"})});zC.classes=lr;zC.displayName="@mantine/core/ComboboxSearch";const tne={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},YI=Pe(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:u,...f}=ye("ComboboxTarget",tne,e),h=Cl(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=Aa(),p=x.cloneElement(h,{...MC({targetType:o,withAriaAttributes:r,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:h.props.onKeyDown,onClick:h.props.onClick,autoComplete:l}),...f});return v.jsx(Sn.Target,{refProp:t,ref:Ht(u,d.store.targetRef),children:p})});YI.displayName="@mantine/core/ComboboxTarget";function ine(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 rne(e,n,t){for(let i=e+1;i{l||(u(!0),r==null||r(D))},[u,r,l]),_=x.useCallback((D="unknown")=>{l&&(u(!1),i==null||i(D))},[u,i,l]),S=x.useCallback((D="unknown")=>{l?_(D):k(D)},[_,k,l]),j=x.useCallback(()=>{const D=Uo(p.current),z=Eg(`#${f.current} [data-combobox-selected]`,D);z==null||z.removeAttribute("data-combobox-selected"),z==null||z.removeAttribute("aria-selected")},[]),T=x.useCallback(D=>{const z=Uo(p.current),H=Eg(`#${f.current}`,z),Y=H?Go("[data-combobox-option]",H):null;if(!Y)return null;const N=D>=Y.length?0:D<0?Y.length-1:D;return h.current=N,Y!=null&&Y[N]&&!Y[N].hasAttribute("data-combobox-disabled")?(j(),Y[N].setAttribute("data-combobox-selected","true"),Y[N].setAttribute("aria-selected","true"),Y[N].scrollIntoView({block:"nearest",behavior:o}),Y[N].id):null},[o,j]),A=x.useCallback(()=>{const D=Uo(p.current),z=Eg(`#${f.current} [data-combobox-active]`,D);return T(z?Go(`#${f.current} [data-combobox-option]`,D).findIndex(H=>H===z):0)},[T]),O=x.useCallback(()=>{const D=Uo(p.current),z=Go(`#${f.current} [data-combobox-option]`,D);return T(rne(h.current,z,a))},[T,a]),M=x.useCallback(()=>{const D=Uo(p.current),z=Go(`#${f.current} [data-combobox-option]`,D);return T(ine(h.current,z,a))},[T,a]),$=x.useCallback(()=>{const D=Uo(p.current);return T(ane(Go(`#${f.current} [data-combobox-option]`,D)))},[T]),q=x.useCallback((D="selected",z)=>{var H;if(typeof D=="number"){h.current=D;const Y=Uo(p.current),N=Go(`#${f.current} [data-combobox-option]`,Y);z!=null&&z.scrollIntoView&&((H=N[D])==null||H.scrollIntoView({block:"nearest",behavior:o}));return}w.current=window.setTimeout(()=>{var V;const Y=Uo(p.current),N=Go(`#${f.current} [data-combobox-option]`,Y),W=N.findIndex(I=>I.hasAttribute(`data-combobox-${D}`));h.current=W,z!=null&&z.scrollIntoView&&((V=N[W])==null||V.scrollIntoView({block:"nearest",behavior:o}))},0)},[]),P=x.useCallback(()=>{h.current=-1,j()},[j]),L=x.useCallback(()=>{var z,H;const D=Uo(p.current);(H=(z=Go(`#${f.current} [data-combobox-option]`,D))==null?void 0:z[h.current])==null||H.click()},[]),U=x.useCallback(D=>{f.current=D},[]),G=x.useCallback(()=>{g.current=window.setTimeout(()=>{var D;return(D=d.current)==null?void 0:D.focus()},0)},[]),B=x.useCallback(()=>{b.current=window.setTimeout(()=>{var D;return(D=p.current)==null?void 0:D.focus()},0)},[]),R=x.useCallback(()=>h.current,[]);return x.useEffect(()=>()=>{window.clearTimeout(g.current),window.clearTimeout(b.current),window.clearTimeout(w.current)},[]),{dropdownOpened:l,openDropdown:k,closeDropdown:_,toggleDropdown:S,selectedOptionIndex:h.current,getSelectedOptionIndex:R,selectOption:T,selectFirstOption:$,selectActiveOption:A,selectNextOption:O,selectPreviousOption:M,resetSelectedOption:P,updateSelectedOptionIndex:q,listId:f.current,setListId:U,clickSelectedOption:L,searchRef:d,focusSearchInput:G,targetRef:p,focusTarget:B}}const one={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0},size:"sm"},KI=(e,{size:n,dropdownPadding:t})=>({options:{"--combobox-option-fz":ai(n),"--combobox-option-padding":Ln(n,"combobox-option-padding")},dropdown:{"--combobox-padding":t===void 0?void 0:ve(t),"--combobox-option-fz":ai(n),"--combobox-option-padding":Ln(n,"combobox-option-padding")}}),On=e=>{const n=ye("Combobox",one,e),{classNames:t,styles:i,unstyled:r,children:a,store:o,vars:l,onOptionSubmit:u,onClose:f,size:h,dropdownPadding:d,resetSelectionOnOptionHover:p,__staticSelector:g,readOnly:b,attributes:w,...k}=n,_=Vf(),S=o||_,j=Ze({name:g||"Combobox",classes:lr,props:n,classNames:t,styles:i,unstyled:r,attributes:w,vars:l,varsResolver:KI}),T=()=>{f==null||f(),S.closeDropdown()};return v.jsx(Qee,{value:{getStyles:j,store:S,onOptionSubmit:u,size:h,resetSelectionOnOptionHover:p,readOnly:b},children:v.jsx(Sn,{opened:S.dropdownOpened,preventPositionChangeWhenVisible:!1,...k,onChange:A=>!A&&T(),withRoles:!1,unstyled:r,children:a})})},sne=e=>e;On.extend=sne;On.classes=lr;On.varsResolver=KI;On.displayName="@mantine/core/Combobox";On.Target=YI;On.Dropdown=TC;On.Options=$C;On.Option=NC;On.Search=zC;On.Empty=EC;On.Chevron=Iy;On.Footer=DC;On.Header=PC;On.EventsTarget=WI;On.DropdownTarget=VI;On.Group=RC;On.ClearButton=UI;On.HiddenInput=GI;function lne({children:e,role:n}){const t=x.use(Hu);return t?v.jsx("div",{role:n,"aria-labelledby":t.labelId,"aria-describedby":t.describedBy,children:e}):v.jsx(v.Fragment,{children:e})}const LC=x.createContext(null),une={hiddenInputValuesSeparator:","},IC=sp((e=>{const{value:n,defaultValue:t,onChange:i,size:r,wrapperProps:a,children:o,readOnly:l,name:u,hiddenInputValuesSeparator:f,hiddenInputProps:h,maxSelectedValues:d,disabled:p,...g}=ye("CheckboxGroup",une,e),[b,w]=Ai({value:n,defaultValue:t,finalValue:[],onChange:i}),k=j=>{const T=typeof j=="string"?j:j.currentTarget.value;if(l)return;const A=b.includes(T);!A&&d&&b.length>=d||w(A?b.filter(O=>O!==T):[...b,T])},_=j=>{if(p)return!0;if(!d)return!1;const T=b.includes(j),A=b.length>=d;return!T&&A},S=b.join(f);return v.jsx(LC,{value:{value:b,onChange:k,size:r,isDisabled:_},children:v.jsxs(Xt.Wrapper,{size:r,...a,...g,labelElement:"div",__staticSelector:"CheckboxGroup",children:[v.jsx(lne,{role:"group",children:o}),v.jsx("input",{type:"hidden",name:u,value:S,...h})]})})}));IC.classes=Xt.Wrapper.classes;IC.displayName="@mantine/core/CheckboxGroup";var XI={card:"m_26775b0a"};const ZI=x.createContext(null),cne={withBorder:!0},QI=(e,{radius:n})=>({card:{"--card-radius":qt(n)}}),By=Pe(e=>{const n=ye("CheckboxCard",cne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,checked:u,mod:f,withBorder:h,value:d,onClick:p,defaultChecked:g,onChange:b,attributes:w,...k}=n,_=Ze({name:"CheckboxCard",classes:XI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:QI,rootSelector:"card"}),S=x.use(LC),[j,T]=Ai({value:typeof u=="boolean"?u:S?S.value.includes(d||""):void 0,defaultValue:g,finalValue:!1,onChange:b});return v.jsx(ZI,{value:{checked:j},children:v.jsx(Et,{mod:[{"with-border":h,checked:j},f],..._("card"),...k,role:"checkbox","aria-checked":j,onClick:A=>{p==null||p(A),S==null||S.onChange(d||""),T(!j)}})})});By.displayName="@mantine/core/CheckboxCard";By.classes=XI;By.varsResolver=QI;function BC({size:e,style:n,...t}){return v.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e!==void 0?{width:ve(e),height:ve(e),...n}:n,"aria-hidden":!0,...t,children:v.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 JI({indeterminate:e,...n}){return e?v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...n,children:v.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):v.jsx(BC,{...n})}var eB={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const fne={icon:JI,variant:"filled",radius:"sm"},nB=(e,{radius:n,color:t,size:i,iconColor:r,variant:a,autoContrast:o})=>{const l=vs({color:t||e.primaryColor,theme:e}),u=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{indicator:{"--checkbox-size":Ln(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:qt(n),"--checkbox-color":a==="outline"?u:ft(t,e),"--checkbox-icon-color":r?ft(r,e):ap(o,e)?If({color:t,theme:e,autoContrast:o}):void 0}}},Fy=Pe(e=>{const n=ye("CheckboxIndicator",fne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,icon:u,indeterminate:f,radius:h,color:d,iconColor:p,autoContrast:g,checked:b,mod:w,variant:k,disabled:_,attributes:S,...j}=n,T=Ze({name:"CheckboxIndicator",classes:eB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:nB,rootSelector:"indicator"}),A=x.use(ZI),O=typeof b=="boolean"||typeof f=="boolean"?b||f:(A==null?void 0:A.checked)||!1;return v.jsx(fe,{...T("indicator",{variant:k}),variant:k,mod:[{checked:O,disabled:_},w],...j,children:v.jsx(u,{indeterminate:f,...T("icon")})})});Fy.displayName="@mantine/core/CheckboxIndicator";Fy.classes=eB;Fy.varsResolver=nB;var tB={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const dne=tB;function iB({__staticSelector:e,__stylesApiProps:n,className:t,classNames:i,styles:r,unstyled:a,children:o,label:l,description:u,id:f,disabled:h,error:d,size:p,labelPosition:g="left",bodyElement:b="div",labelElement:w="label",variant:k,style:_,vars:S,mod:j,attributes:T,...A}){const O=Ze({name:e,props:n,className:t,style:_,classes:tB,classNames:i,styles:r,unstyled:a,attributes:T});return v.jsx(fe,{...O("root"),__vars:{"--label-fz":ai(p),"--label-lh":Ln(p,"label-lh")},mod:[{"label-position":g},j],variant:k,size:p,...A,children:v.jsxs(fe,{component:b,htmlFor:b==="label"?f:void 0,...O("body"),children:[o,v.jsxs("div",{...O("labelWrapper"),"data-disabled":h||void 0,children:[l&&v.jsx(fe,{component:w,htmlFor:w==="label"?f:void 0,...O("label"),"data-disabled":h||void 0,children:l}),u&&v.jsx(Xt.Description,{size:p,__inheritStyles:!1,...O("description"),children:u}),d&&typeof d!="boolean"&&v.jsx(Xt.Error,{size:p,__inheritStyles:!1,...O("error"),children:d})]})]})})}iB.displayName="@mantine/core/InlineInput";var rB={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const hne={labelPosition:"right",icon:JI,withErrorStyles:!0,variant:"filled",radius:"sm"},aB=(e,{radius:n,color:t,size:i,iconColor:r,variant:a,autoContrast:o})=>{const l=vs({color:t||e.primaryColor,theme:e}),u=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{root:{"--checkbox-size":Ln(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:qt(n),"--checkbox-color":a==="outline"?u:ft(t,e),"--checkbox-icon-color":r?ft(r,e):ap(o,e)?If({color:t,theme:e,autoContrast:o}):void 0}}},Gr=Pe(e=>{var Z;const n=ye("Checkbox",hne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:u,label:f,id:h,size:d,radius:p,wrapperProps:g,checked:b,labelPosition:w,description:k,error:_,disabled:S,variant:j,indeterminate:T,icon:A,rootRef:O,iconColor:M,onChange:$,autoContrast:q,mod:P,attributes:L,readOnly:U,onClick:G,withErrorStyles:B,ref:R,...D}=n,z=x.useRef(null),H=x.use(LC),Y=d||(H==null?void 0:H.size),N=Ze({name:"Checkbox",props:n,classes:rB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:L,vars:l,varsResolver:aB}),{styleProps:W,rest:V}=Fu(D),I=Pi(h),Q={checked:(H==null?void 0:H.value.includes(V.value))??b,onChange:le=>{H==null||H.onChange(le),$==null||$(le)}},ie=((Z=H==null?void 0:H.isDisabled)==null?void 0:Z.call(H,V.value))??!1,re=S||ie;return x.useEffect(()=>{z.current&&(z.current.indeterminate=T||!1,T?z.current.setAttribute("data-indeterminate","true"):z.current.removeAttribute("data-indeterminate"))},[T]),v.jsx(iB,{...N("root"),__staticSelector:"Checkbox",__stylesApiProps:n,id:I,size:Y,labelPosition:w,label:f,description:k,error:_,disabled:re,classNames:t,styles:a,unstyled:o,"data-checked":Q.checked||b||void 0,variant:j,ref:O,mod:P,attributes:L,inert:V.inert,...W,...g,children:v.jsxs(fe,{...N("inner"),mod:{"data-label-position":w},children:[v.jsx(fe,{component:"input",id:I,ref:Ht(z,R),mod:{error:!!_},...N("input",{focusable:!0,variant:j}),...V,...Q,disabled:re,inert:V.inert,type:"checkbox",onClick:le=>{U&&le.preventDefault(),G==null||G(le)}}),v.jsx(A,{indeterminate:T,...N("icon")})]})})});Gr.classes={...rB,...dne};Gr.varsResolver=aB;Gr.displayName="@mantine/core/Checkbox";Gr.Group=IC;Gr.Indicator=Fy;Gr.Card=By;function Eu(e){return"group"in e}function oB({options:e,search:n,limit:t}){const i=n.trim().toLowerCase(),r=[];for(let a=0;a0)return!1;return!0}function sB(e,n=new Set){if(Array.isArray(e))for(const t of e)if(Eu(t))sB(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 pne(e,n){return Array.isArray(e)?e.includes(n):e===n}function lB({data:e,withCheckIcon:n,withAlignedLabels:t,value:i,checkIconPosition:r,unstyled:a,renderOption:o}){if(!Eu(e)){const u=pne(i,e.value),f=n&&(u?v.jsx(BC,{className:lr.optionsDropdownCheckIcon}):t?v.jsx("div",{className:lr.optionsDropdownCheckPlaceholder}):null),h=v.jsxs(v.Fragment,{children:[r==="left"&&f,v.jsx("span",{children:e.label}),r==="right"&&f]});return v.jsx(On.Option,{value:e.value,disabled:e.disabled,className:vn({[lr.optionsDropdownOption]:!a}),"data-reverse":r==="right"||void 0,"data-checked":u||void 0,"aria-selected":u,active:u,children:typeof o=="function"?o({option:e,checked:u}):h})}const l=e.items.map(u=>v.jsx(lB,{data:u,value:i,unstyled:a,withCheckIcon:n,withAlignedLabels:t,checkIconPosition:r,renderOption:o},`${u.value}`));return v.jsx(On.Group,{label:e.group,children:l})}function qy({data:e,hidden:n,hiddenWhenEmpty:t,filter:i,search:r,limit:a,maxDropdownHeight:o,withScrollArea:l=!0,filterOptions:u=!0,withCheckIcon:f=!1,withAlignedLabels:h=!1,value:d,checkIconPosition:p,nothingFoundMessage:g,unstyled:b,labelId:w,renderOption:k,scrollAreaProps:_,"aria-label":S}){sB(e);const j=typeof r=="string"?(i||oB)({options:e,search:u?r:"",limit:a??1/0}):e,T=mne(j),A=j.map(O=>v.jsx(lB,{data:O,withCheckIcon:f,withAlignedLabels:h,value:d,checkIconPosition:p,unstyled:b,renderOption:k},Eu(O)?O.group:`${O.value}`));return v.jsx(On.Dropdown,{hidden:n||t&&T,"data-composed":!0,children:v.jsxs(On.Options,{labelledBy:w,"aria-label":S,children:[l?v.jsx(ur.Autosize,{mah:o??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",..._,children:A}):A,T&&g&&v.jsx(On.Empty,{children:g})]})})}const Hy=Pe(e=>{const n=ye("Autocomplete",{size:"sm"},e),{classNames:t,styles:i,unstyled:r,vars:a,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:u,onDropdownOpen:f,onFocus:h,onBlur:d,onClick:p,onChange:g,data:b,value:w,defaultValue:k,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:S,onOptionSubmit:j,comboboxProps:T,readOnly:A,disabled:O,filter:M,limit:$,withScrollArea:q,maxDropdownHeight:P,size:L,id:U,renderOption:G,autoComplete:B,scrollAreaProps:R,onClear:D,clearButtonProps:z,error:H,clearable:Y,clearSectionMode:N,rightSection:W,autoSelectOnBlur:V,openOnFocus:I=!0,attributes:Q,...ie}=n,re=Pi(U),Z=Ly(b),le=vp(Z),[ee,se]=Ai({value:w,defaultValue:k,finalValue:"",onChange:g}),ke=Vf({opened:o,defaultOpened:l,onDropdownOpen:()=>{f==null||f(),S&&ke.selectFirstOption()},onDropdownClose:()=>{u==null||u(),setTimeout(ke.resetSelectedOption,0)}}),te=ze=>{se(ze),ke.resetSelectedOption()},{resolvedClassNames:$e,resolvedStyles:xe}=Wi({props:n,styles:i,classNames:t});x.useEffect(()=>{_&&ke.selectFirstOption()},[_,ee]);const Ae=v.jsx(On.ClearButton,{...z,onClear:()=>{te(""),D==null||D()}});return v.jsxs(On,{store:ke,__staticSelector:"Autocomplete",classNames:$e,styles:xe,unstyled:r,readOnly:A,size:L,attributes:Q,keepMounted:V,onOptionSubmit:ze=>{j==null||j(ze),te(le[ze].label),ke.closeDropdown()},...T,children:[v.jsx(On.Target,{autoComplete:B,withExpandedAttribute:!0,children:v.jsx(Ni,{...ie,size:L,__staticSelector:"Autocomplete",__clearSection:Ae,__clearable:Y&&!!ee&&!O&&!A,__clearSectionMode:N,rightSection:W,disabled:O,readOnly:A,value:ee,error:H,onChange:ze=>{te(ze.currentTarget.value),ke.openDropdown(),_&&ke.selectFirstOption()},onFocus:ze=>{I&&ke.openDropdown(),h==null||h(ze)},onBlur:ze=>{V&&ke.clickSelectedOption(),ke.closeDropdown(),d==null||d(ze)},onClick:ze=>{ke.openDropdown(),p==null||p(ze)},classNames:$e,styles:xe,unstyled:r,attributes:Q,id:re})}),v.jsx(qy,{data:Z,hidden:A||O,filter:M,search:ee,limit:$,hiddenWhenEmpty:!0,withScrollArea:q,maxDropdownHeight:P,unstyled:r,labelId:ie.label?`${re}-label`:void 0,"aria-label":ie.label?void 0:ie["aria-label"],renderOption:G,scrollAreaProps:R})]})});Hy.classes={...Ni.classes,...On.classes};Hy.displayName="@mantine/core/Autocomplete";var Uy={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};const uB=x.createContext({withinGroup:!1}),cB=(e,{spacing:n})=>({group:{"--ag-spacing":Yt(n)}}),Vy=Pe(e=>{const n=ye("AvatarGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,spacing:u,attributes:f,...h}=n;return v.jsx(uB,{value:{withinGroup:!0},children:v.jsx(fe,{...Ze({name:"AvatarGroup",classes:Uy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f,vars:l,varsResolver:cB,rootSelector:"group"})("group"),...h})})});Vy.classes=Uy;Vy.varsResolver=cB;Vy.displayName="@mantine/core/AvatarGroup";function vne(e){return v.jsx("svg",{...e,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:v.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 gne(e){let n=0;for(let t=0;ti[0]).slice(0,n).join("").toUpperCase()}const fB=(e,{size:n,radius:t,variant:i,gradient:r,color:a,autoContrast:o,name:l,allowedInitialsColors:u})=>{const f=a==="initials"&&typeof l=="string"?bne(l,u):a,h=e.variantColorResolver({color:f||"gray",theme:e,gradient:r,variant:i||"light",autoContrast:o});return{root:{"--avatar-size":Ln(n,"avatar-size"),"--avatar-radius":t===void 0?void 0:qt(t),"--avatar-bg":f||i?h.background:void 0,"--avatar-color":f||i?h.color:void 0,"--avatar-bd":f||i?h.border:void 0}}},mo=ki(e=>{const n=ye("Avatar",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,src:u,alt:f,radius:h,color:d,gradient:p,imageProps:g,children:b,autoContrast:w,mod:k,name:_,allowedInitialsColors:S,attributes:j,...T}=n,A=x.use(uB),[O,M]=x.useState(!u),$=Ze({name:"Avatar",props:n,classes:Uy,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:j,vars:l,varsResolver:fB});return x.useEffect(()=>M(!u),[u]),v.jsx(fe,{...$("root"),mod:[{"within-group":A.withinGroup},k],...T,children:O||!u?v.jsx("span",{...$("placeholder"),title:f,children:b||typeof _=="string"&&wne(_)||v.jsx(vne,{})}):v.jsx("img",{...g,...$("image"),src:u,alt:f,onError:q=>{var P;M(!0),(P=g==null?void 0:g.onError)==null||P.call(g,q)}})})});mo.classes=Uy;mo.varsResolver=fB;mo.displayName="@mantine/core/Avatar";mo.Group=Vy;var dB={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const hB=(e,{radius:n,color:t,gradient:i,variant:r,size:a,autoContrast:o,circle:l})=>{const u=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:o});return{root:{"--badge-height":Ln(a,"badge-height"),"--badge-padding-x":Ln(a,"badge-padding-x"),"--badge-fz":Ln(a,"badge-fz"),"--badge-radius":l||n===void 0?void 0:qt(n),"--badge-bg":t||r?u.background:void 0,"--badge-color":t||r?u.color:void 0,"--badge-bd":t||r?u.border:void 0,"--badge-dot-color":r==="dot"?ft(t,e):void 0}}},Gn=ki(e=>{const n=ye("Badge",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,radius:u,color:f,gradient:h,leftSection:d,rightSection:p,children:g,variant:b,fullWidth:w,autoContrast:k,circle:_,mod:S,attributes:j,...T}=n,A=Ze({name:"Badge",props:n,classes:dB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:j,vars:l,varsResolver:hB});return v.jsxs(fe,{variant:b,mod:[{block:w,circle:_,"with-right-section":!!p,"with-left-section":!!d},S],...A("root",{variant:b}),...T,children:[d&&v.jsx("span",{...A("section"),"data-position":"left",children:d}),v.jsx("span",{...A("label"),children:g}),p&&v.jsx("span",{...A("section"),"data-position":"right",children:p})]})});Gn.classes=dB;Gn.varsResolver=hB;Gn.displayName="@mantine/core/Badge";var Wf={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const AE={orientation:"horizontal"},mB=(e,{borderWidth:n})=>({group:{"--button-border-width":ve(n)}}),Wy=Pe(e=>{const n=ye("ButtonGroup",AE,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:u,borderWidth:f,mod:h,attributes:d,...p}=ye("ButtonGroup",AE,e);return v.jsx(fe,{...Ze({name:"ButtonGroup",props:n,classes:Wf,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:u,varsResolver:mB,rootSelector:"group"})("group"),mod:[{"data-orientation":l},h],role:"group",...p})});Wy.classes=Wf;Wy.varsResolver=mB;Wy.displayName="@mantine/core/ButtonGroup";const pB=(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":Ln(o,"section-height"),"--section-padding-x":Ln(o,"section-padding-x"),"--section-fz":o!=null&&o.includes("compact")?ai(o.replace("compact-","")):ai(o),"--section-radius":n===void 0?void 0:qt(n),"--section-bg":t||r?l.background:void 0,"--section-color":l.color,"--section-bd":t||r?l.border:void 0}}},Gy=Pe(e=>{const n=ye("ButtonGroupSection",null,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,vars:l,gradient:u,radius:f,autoContrast:h,attributes:d,...p}=n;return v.jsx(fe,{...Ze({name:"ButtonGroupSection",props:n,classes:Wf,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:l,varsResolver:pB,rootSelector:"groupSection"})("groupSection"),...p})});Gy.classes=Wf;Gy.varsResolver=pB;Gy.displayName="@mantine/core/ButtonGroupSection";const kne={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${ve(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},vB=(e,{radius:n,color:t,gradient:i,variant:r,size:a,justify:o,autoContrast:l})=>{const u=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:l});return{root:{"--button-justify":o,"--button-height":Ln(a,"button-height"),"--button-padding-x":Ln(a,"button-padding-x"),"--button-fz":a!=null&&a.includes("compact")?ai(a.replace("compact-","")):ai(a),"--button-radius":n===void 0?void 0:qt(n),"--button-bg":t||r?u.background:void 0,"--button-hover":t||r?u.hover:void 0,"--button-color":u.color,"--button-bd":t||r?u.border:void 0,"--button-hover-color":t||r?u.hoverColor:void 0}}},Yn=ki(e=>{const n=ye("Button",null,e),{style:t,vars:i,className:r,color:a,disabled:o,children:l,leftSection:u,rightSection:f,fullWidth:h,variant:d,radius:p,loading:g,loaderProps:b,gradient:w,classNames:k,styles:_,unstyled:S,"data-disabled":j,autoContrast:T,mod:A,attributes:O,...M}=n,$=Ze({name:"Button",props:n,classes:Wf,className:r,style:t,classNames:k,styles:_,unstyled:S,attributes:O,vars:i,varsResolver:vB}),q=!!u,P=!!f;return v.jsxs(Et,{...$("root",{active:!o&&!g&&!j}),unstyled:S,variant:d,disabled:o||g,mod:[{disabled:o||j,loading:g,block:h,"with-left-section":q,"with-right-section":P},A],...M,children:[typeof g=="boolean"&&v.jsx(ls,{mounted:g,transition:kne,duration:150,children:L=>v.jsx(fe,{component:"span",...$("loader",{style:L}),"aria-hidden":!0,children:v.jsx(Zt,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...b})})}),v.jsxs("span",{...$("inner"),children:[u&&v.jsx(fe,{component:"span",...$("section"),mod:{position:"left"},children:u}),v.jsx(fe,{component:"span",mod:{loading:g},...$("label"),children:l}),f&&v.jsx(fe,{component:"span",...$("section"),mod:{position:"right"},children:f})]})]})});Yn.classes=Wf;Yn.varsResolver=vB;Yn.displayName="@mantine/core/Button";Yn.Group=Wy;Yn.GroupSection=Gy;const[_ne,xne]=Ar("Card component was not found in tree");var FC={root:"m_e615b15f",section:"m_599a2148"};const Yy=ki(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,withBorder:o,inheritPadding:l,mod:u,...f}=ye("CardSection",null,e),h=xne();return v.jsx(fe,{mod:[{"with-border":o,"inherit-padding":l},u],...h.getStyles("section",{className:t,style:i,styles:r,classNames:n}),...f})});Yy.classes=FC;Yy.displayName="@mantine/core/CardSection";const gB=(e,{padding:n})=>({root:{"--card-padding":Yt(n)}}),Sne={orientation:"vertical"},za=ki(e=>{const n=ye("Card",Sne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:u,padding:f,attributes:h,orientation:d,...p}=n,g=Ze({name:"Card",props:n,classes:FC,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,varsResolver:gB}),b=x.Children.toArray(u),w=b.map((k,_)=>{var S;return typeof k=="object"&&k&&"type"in k&&(k.type===Yy||((S=k.type)==null?void 0:S.displayName)==="@mantine/core/CardSection")?x.cloneElement(k,{"data-orientation":d,"data-first-section":_===0||void 0,"data-last-section":_===b.length-1||void 0}):k});return v.jsx(_ne,{value:{getStyles:g},children:v.jsx(Tt,{unstyled:o,"data-orientation":d,...g("root"),...p,children:w})})});za.classes=FC;za.varsResolver=gB;za.displayName="@mantine/core/Card";za.Section=Yy;var yB={root:"m_4451eb3a"};const Gf=ki(e=>{const n=ye("Center",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,inline:u,mod:f,attributes:h,...d}=n,p=Ze({name:"Center",props:n,classes:yB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l});return v.jsx(fe,{mod:[{inline:u},f],...p("root"),...d})});Gf.classes=yB;Gf.displayName="@mantine/core/Center";var bB={root:"m_b183c0a2"};const wB=(e,{color:n})=>({root:{"--code-bg":n?ft(n,e):void 0}}),pl=Pe(e=>{const n=ye("Code",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:u,block:f,mod:h,attributes:d,...p}=n,g=Ze({name:"Code",props:n,classes:bB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:d,vars:l,varsResolver:wB});return v.jsx(fe,{component:f?"pre":"code",mod:[{block:f},h],...g("root"),...p,dir:"ltr"})});pl.classes=bB;pl.varsResolver=wB;pl.displayName="@mantine/core/Code";var kB={root:"m_de3d2490",colorOverlay:"m_862f3d1b",shadowOverlay:"m_98ae7f22",alphaOverlay:"m_95709ac0",childrenOverlay:"m_93e74e3"};const OE={withShadow:!0},_B=(e,{radius:n,size:t})=>({root:{"--cs-radius":n===void 0?void 0:qt(n),"--cs-size":ve(t)}}),Yf=ki(e=>{const n=ye("ColorSwatch",OE,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:u,radius:f,withShadow:h,children:d,attributes:p,...g}=ye("ColorSwatch",OE,n),b=Ze({name:"ColorSwatch",props:n,classes:kB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:_B});return v.jsxs(fe,{...b("root",{focusable:!0}),...g,children:[v.jsx("span",{...b("alphaOverlay")}),h&&v.jsx("span",{...b("shadowOverlay")}),v.jsx("span",{...b("colorOverlay",{style:{backgroundColor:u}})}),v.jsx("span",{...b("childrenOverlay"),children:d})]})});Yf.classes=kB;Yf.varsResolver=_B;Yf.displayName="@mantine/core/ColorSwatch";function ga(e,n=0,t=10**n){return Math.round(t*e)/t}function Cne({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 jne={grad:360/400,turn:360,rad:360/(Math.PI*2)};function Ane(e,n="deg"){return Number(e)*(jne[n]||1)}const One=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function TE(e){const n=One.exec(e);return n?Cne({h:Ane(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 BS({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:ga(60*(o<0?o+6:o),3),s:ga(r?a/r*100:0,3),v:ga(r/255*100,3),a:i}}function FS(e){const n=e[0]==="#"?e.slice(1):e;return n.length===3?BS({r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:1}):BS({r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:1})}function Tne(e){const n=e[0]==="#"?e.slice(1):e,t=a=>ga(parseInt(a,16)/255,3);if(n.length===4){const a=n.slice(0,3),o=t(n[3]+n[3]);return{...FS(a),a:o}}const i=n.slice(0,6),r=t(n.slice(6,8));return{...FS(i),a:r}}const Ene=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function EE(e){const n=Ene.exec(e);return n?BS({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 xB={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},Mne={hex:FS,hexa:Tne,rgb:EE,rgba:EE,hsl:TE,hsla:TE};function Dne(e){for(const[,n]of Object.entries(xB))if(n.test(e))return!0;return!1}function ig(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(xB))if(i.test(n))return Mne[t](n);return{h:0,s:0,v:0,a:1}}const Ky=x.createContext(null);function qC({position:e,...n}){return v.jsx(fe,{__vars:{"--thumb-y-offset":`${e.y*100}%`,"--thumb-x-offset":`${e.x*100}%`},...n})}qC.displayName="@mantine/core/ColorPickerThumb";var Xy={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 Kf=Pe(e=>{var H;const n=ye("ColorSlider",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,onChange:u,onChangeEnd:f,maxValue:h,round:d,size:p="md",focusable:g=!0,value:b,overlays:w,thumbColor:k="transparent",onScrubStart:_,onScrubEnd:S,__staticSelector:j="ColorPicker",attributes:T,ref:A,...O}=n,M=Ze({name:j,classes:Xy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:T,rootSelector:"slider"}),$=((H=x.use(Ky))==null?void 0:H.getStyles)||M,q=ci(),[P,L]=x.useState({y:0,x:b/h}),U=x.useRef(P),G=Y=>d?Math.round(Y*h):Y*h,{ref:B}=Uz(({x:Y,y:N})=>{U.current={x:Y,y:N},u==null||u(G(Y))},{onScrubEnd:()=>{const{x:Y}=U.current;f==null||f(G(Y)),S==null||S()},onScrubStart:_});os(()=>{L({y:0,x:b/h})},[b]);const R=(Y,N)=>{Y.preventDefault();const W=Hz(N);u==null||u(G(W.x)),f==null||f(G(W.x))},D=Y=>{switch(Y.key){case"ArrowRight":R(Y,{x:P.x+.05,y:P.y});break;case"ArrowLeft":R(Y,{x:P.x-.05,y:P.y});break}},z=w.map((Y,N)=>x.createElement("div",{...$("sliderOverlay"),style:Y,key:N}));return v.jsxs(fe,{...O,ref:Ht(B,A),...$("slider"),size:p,role:"slider","aria-valuenow":b,"aria-valuemax":h,"aria-valuemin":0,tabIndex:g?0:-1,onKeyDown:D,"data-focus-ring":q.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${p})`},children:[z,v.jsx(qC,{position:P,...$("thumb",{style:{top:ve(1),background:k}})})]})});Kf.displayName="@mantine/core/ColorSlider";Kf.classes=Xy;const Rne={__staticSelector:"AlphaSlider"},HC=Pe(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=ye("AlphaSlider",Rne,e);return v.jsx(Kf,{...a,value:n,onChange:o=>t==null?void 0:t(ga(o,2)),onChangeEnd:o=>i==null?void 0:i(ga(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:`${ve(8)} ${ve(8)}`,backgroundPosition:`0 0, 0 ${ve(4)}, ${ve(4)} ${ve(-4)}, ${ve(-4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${r})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${ve(1)} inset, rgb(0, 0, 0, .15) 0 0 ${ve(4)} inset`}]})});HC.displayName="@mantine/core/AlphaSlider";HC.classes=Kf.classes;function SB({h:e,s:n,v:t,a:i}){const r=e/360*6,a=n/100,o=t/100,l=Math.floor(r),u=o*(1-a),f=o*(1-(r-l)*a),h=o*(1-(1-r+l)*a),d=l%6;return{r:ga([o,f,u,u,h,o][d]*255),g:ga([h,o,o,f,u,u][d]*255),b:ga([u,u,h,o,o,f][d]*255),a:ga(i,2)}}function ME(e,n){const{r:t,g:i,b:r,a}=SB(e);return n?`rgba(${t}, ${i}, ${r}, ${ga(a,2)})`:`rgb(${t}, ${i}, ${r})`}function DE({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}%, ${ga(i,2)})`:`hsl(${o.h}, ${o.s}%, ${o.l}%)`}function $g(e){const n=e.toString(16);return n.length<2?`0${n}`:n}function CB(e){const{r:n,g:t,b:i}=SB(e);return`#${$g(n)}${$g(t)}${$g(i)}`}function Pne(e){const n=Math.round(e.a*255);return`${CB(e)}${$g(n)}`}const zk={hex:CB,hexa:e=>Pne(e),rgb:e=>ME(e,!1),rgba:e=>ME(e,!0),hsl:e=>DE(e,!1),hsla:e=>DE(e,!0)};function Js(e,n){return n?e in zk?zk[e](n):zk.hex(n):"#000000"}const Nne={__staticSelector:"HueSlider"},UC=Pe(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=ye("HueSlider",Nne,e);return v.jsx(Kf,{...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 ${ve(1)} inset, rgb(0, 0, 0, .15) 0 0 ${ve(4)} inset`}]})});UC.displayName="@mantine/core/HueSlider";UC.classes=Kf.classes;function jB({className:e,onChange:n,onChangeEnd:t,value:i,saturationLabel:r,focusable:a=!0,size:o,color:l,onScrubStart:u,onScrubEnd:f,...h}){const{getStyles:d}=x.use(Ky),[p,g]=x.useState({x:i.s/100,y:1-i.v/100}),b=x.useRef(p),{ref:w}=Uz(({x:S,y:j})=>{b.current={x:S,y:j},n({s:Math.round(S*100),v:Math.round((1-j)*100)})},{onScrubEnd:()=>{const{x:S,y:j}=b.current;t({s:Math.round(S*100),v:Math.round((1-j)*100)}),f==null||f()},onScrubStart:u});x.useEffect(()=>{g({x:i.s/100,y:1-i.v/100})},[i.s,i.v]);const k=(S,j)=>{S.preventDefault();const T=Hz(j);n({s:Math.round(T.x*100),v:Math.round((1-T.y)*100)}),t({s:Math.round(T.x*100),v:Math.round((1-T.y)*100)})},_=S=>{switch(S.key){case"ArrowUp":k(S,{y:p.y-.05,x:p.x});break;case"ArrowDown":k(S,{y:p.y+.05,x:p.x});break;case"ArrowRight":k(S,{x:p.x+.05,y:p.y});break;case"ArrowLeft":k(S,{x:p.x-.05,y:p.y});break}};return v.jsxs(fe,{...d("saturation"),ref:w,...h,role:"slider","aria-label":r,"aria-valuenow":p.x,"aria-valuetext":Js("rgba",i),tabIndex:a?0:-1,onKeyDown:_,children:[v.jsx("div",{...d("saturationOverlay",{style:{backgroundColor:`hsl(${i.h}, 100%, 50%)`}})}),v.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}})}),v.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}})}),v.jsx(qC,{position:p,...d("thumb",{style:{backgroundColor:l}})})]})}jB.displayName="@mantine/core/Saturation";function AB({className:e,datatype:n,setValue:t,onChangeEnd:i,size:r,focusable:a,data:o,swatchesPerRow:l,value:u,...f}){const h=x.use(Ky),d=o.map((p,g)=>x.createElement(Yf,{...h.getStyles("swatch"),unstyled:h.unstyled,component:"button",type:"button",color:p,key:g,radius:"sm",onClick:()=>{t(p),i==null||i(p)},"aria-label":p,tabIndex:a?0:-1,"data-swatch":!0},u===p&&v.jsx(BC,{size:"35%",color:Yz(p)<.5?"white":"black"})));return v.jsx(fe,{...h.getStyles("swatches"),...f,children:d})}AB.displayName="@mantine/core/Swatches";const $ne={swatchesPerRow:7,withPicker:!0,focusable:!0,size:"md",__staticSelector:"ColorPicker"},OB=(e,{size:n,swatchesPerRow:t})=>({wrapper:{"--cp-preview-size":Ln(n,"cp-preview-size"),"--cp-width":Ln(n,"cp-width"),"--cp-body-spacing":Yt(n),"--cp-swatch-size":`${100/t}%`,"--cp-thumb-size":Ln(n,"cp-thumb-size"),"--cp-saturation-height":Ln(n,"cp-saturation-height")}}),Zy=Pe(e=>{const n=ye("ColorPicker",$ne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,format:u="hex",value:f,defaultValue:h,onChange:d,onChangeEnd:p,withPicker:g,size:b,saturationLabel:w,hueLabel:k,alphaLabel:_,focusable:S,swatches:j,swatchesPerRow:T,fullWidth:A,onColorSwatchClick:O,__staticSelector:M,mod:$,attributes:q,name:P,hiddenInputProps:L,...U}=n,G=Ze({name:M,props:n,classes:Xy,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:q,rootSelector:"wrapper",vars:l,varsResolver:OB}),B=x.useRef(u||"hex"),R=x.useRef(""),D=x.useRef(-1),z=x.useRef(!1),H=u==="hexa"||u==="rgba"||u==="hsla",[Y,N,W]=Ai({value:f,defaultValue:h,finalValue:"#FFFFFF",onChange:d}),[V,I]=x.useState(ig(Y)),Q=()=>{window.clearTimeout(D.current),z.current=!0},ie=()=>{window.clearTimeout(D.current),D.current=window.setTimeout(()=>{z.current=!1},200)},re=Z=>{I(le=>{const ee={...le,...Z};return R.current=Js(B.current,ee),ee}),N(R.current)};return os(()=>{typeof f=="string"&&Dne(f)&&!z.current&&I(ig(f))},[f]),os(()=>{B.current=u||"hex",N(Js(B.current,V))},[u]),v.jsx(Ky,{value:{getStyles:G,unstyled:o},children:v.jsxs(fe,{...G("wrapper"),size:b,mod:[{"full-width":A},$],...U,children:[P&&v.jsx("input",{type:"hidden",name:P,value:Y,...L}),g&&v.jsxs(v.Fragment,{children:[v.jsx(jB,{value:V,onChange:re,onChangeEnd:({s:Z,v:le})=>p==null?void 0:p(Js(B.current,{...V,s:Z,v:le})),color:Y,size:b,focusable:S,saturationLabel:w,onScrubStart:Q,onScrubEnd:ie}),v.jsxs("div",{...G("body"),children:[v.jsxs("div",{...G("sliders"),children:[v.jsx(UC,{value:V.h,onChange:Z=>re({h:Z}),onChangeEnd:Z=>p==null?void 0:p(Js(B.current,{...V,h:Z})),size:b,focusable:S,"aria-label":k,onScrubStart:Q,onScrubEnd:ie}),H&&v.jsx(HC,{value:V.a,onChange:Z=>re({a:Z}),onChangeEnd:Z=>{p==null||p(Js(B.current,{...V,a:Z}))},size:b,color:Js("hex",V),focusable:S,"aria-label":_,onScrubStart:Q,onScrubEnd:ie})]}),H&&v.jsx(Yf,{color:Y,radius:"sm",size:"var(--cp-preview-size)",...G("preview")})]})]}),Array.isArray(j)&&v.jsx(AB,{data:j,swatchesPerRow:T,focusable:S,setValue:N,value:Y,onChangeEnd:Z=>{const le=Js(u,ig(Z));O==null||O(le),p==null||p(le),W||I(ig(Z))}})]})})});Zy.classes=Xy;Zy.varsResolver=OB;Zy.displayName="@mantine/core/ColorPicker";const zne={timeout:1e3};function qS(e){const{children:n,timeout:t,value:i,...r}=ye("CopyButton",zne,e),a=sX({timeout:t}),o=()=>a.copy(i);return v.jsx(v.Fragment,{children:n({copy:o,copied:a.copied,...r})})}qS.displayName="@mantine/core/CopyButton";var TB={root:"m_3eebeb36",label:"m_9e365f20"};const Lne={orientation:"horizontal"},EB=(e,{color:n,variant:t,size:i})=>({root:{"--divider-color":n?ft(n,e):void 0,"--divider-border-style":t,"--divider-size":Ln(i,"divider-size")}}),us=Pe(e=>{const n=ye("Divider",Lne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:u,orientation:f,label:h,labelPosition:d,mod:p,attributes:g,...b}=n,w=Ze({name:"Divider",classes:TB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:g,vars:l,varsResolver:EB});return v.jsx(fe,{mod:[{orientation:f,withLabel:!!h},p],role:"separator",...w("root"),...b,children:h&&v.jsx(fe,{component:"span",mod:{position:d},...w("label"),children:h})})});us.classes=TB;us.varsResolver=EB;us.displayName="@mantine/core/Divider";const VC=sp(e=>{const{onChange:n,children:t,multiple:i,accept:r,name:a,form:o,resetRef:l,disabled:u,capture:f,inputProps:h,ref:d,...p}=ye("FileButton",null,e),g=x.useRef(null),b=()=>{var _;!u&&((_=g.current)==null||_.click())},w=_=>{if(_.currentTarget.files===null)return n(i?[]:null);n(i?Array.from(_.currentTarget.files):_.currentTarget.files[0]||null)};return cm(l,()=>{g.current&&(g.current.value="")}),v.jsxs(v.Fragment,{children:[v.jsx("input",{style:{display:"none"},type:"file",accept:r,multiple:i,onChange:w,ref:Ht(d,g),name:a,form:o,capture:f,...h}),t({onClick:b,...p})]})});VC.displayName="@mantine/core/FileButton";const[RE,MB]=Ar("Grid component was not found in tree"),HS=(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))`},PE=(e,n,t)=>t||e==="auto"?"100%":e==="content"?"unset":HS(e,n),NE=(e,n)=>{if(e)return e==="auto"||n?"1":"auto"},$E=(e,n)=>{if(e===0)return"0";if(e)return`calc(${100*e/n}% + ${e/n} * var(--grid-column-gap))`};function Ine({span:e,order:n,offset:t,align:i,selector:r}){var g;const a=ci(),o=MB(),l=o.breakpoints||a.breakpoints,u=Wr(e),f=u===void 0?12:u,h=Bu({"--col-order":(g=Wr(n))==null?void 0:g.toString(),"--col-flex-grow":NE(f,o.grow),"--col-flex-basis":HS(f,o.columns),"--col-width":f==="content"?"auto":void 0,"--col-max-width":PE(f,o.columns,o.grow),"--col-offset":$E(Wr(t),o.columns),"--col-align-self":Wr(i)}),d=$t(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"]=NE(e[w],o.grow),b[w]["--col-flex-basis"]=HS(e[w],o.columns),b[w]["--col-width"]=e[w]==="content"?"auto":void 0,b[w]["--col-max-width"]=PE(e[w],o.columns,o.grow)),typeof t=="object"&&t[w]!==void 0&&(b[w]["--col-offset"]=$E(t[w],o.columns)),typeof i=="object"&&i[w]!==void 0&&(b[w]["--col-align-self"]=i[w]),b},{}),p=um($t(d),l).filter(b=>$t(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 v.jsx(Bf,{styles:h,media:o.type==="container"?void 0:p,container:o.type==="container"?p:void 0,selector:r})}var WC={container:"m_8478a6da",root:"m_410352e9",inner:"m_dee7bd2f",col:"m_96bdd299"};const Bne={span:12},GC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,span:o,order:l,offset:u,align:f,...h}=ye("GridCol",Bne,e),d=MB(),p=Sy();return v.jsxs(v.Fragment,{children:[v.jsx(Ine,{selector:`.${p}`,span:o,order:l,offset:u,align:f}),v.jsx(fe,{...d.getStyles("col",{className:vn(t,p),style:i,classNames:n,styles:r}),...h})]})});GC.classes=WC;GC.displayName="@mantine/core/GridCol";function zE({gap:e,rowGap:n,columnGap:t,selector:i,breakpoints:r,type:a}){const o=ci(),l=r||o.breakpoints,u=Bu({"--grid-gap":Yt(Wr(e)),"--grid-row-gap":Yt(Wr(n)),"--grid-column-gap":Yt(Wr(t))}),f=$t(l).reduce((d,p)=>(d[p]||(d[p]={}),typeof e=="object"&&e[p]!==void 0&&(d[p]["--grid-gap"]=Yt(e[p])),typeof n=="object"&&n[p]!==void 0&&(d[p]["--grid-row-gap"]=Yt(n[p])),typeof t=="object"&&t[p]!==void 0&&(d[p]["--grid-column-gap"]=Yt(t[p])),d),{}),h=um($t(f),l).filter(d=>$t(f[d.value]).length>0).map(d=>({query:a==="container"?`mantine-grid (min-width: ${l[d.value]})`:`(min-width: ${l[d.value]})`,styles:f[d.value]}));return v.jsx(Bf,{styles:u,media:a==="container"?void 0:h,container:a==="container"?h:void 0,selector:i})}const Fne={gap:"md",columns:12},DB=(e,{justify:n,align:t,overflow:i})=>({root:{"--grid-justify":n,"--grid-align":t,"--grid-overflow":i}}),Hr=Pe(e=>{const n=ye("Grid",Fne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,grow:u,gap:f,rowGap:h,columnGap:d,columns:p,align:g,justify:b,children:w,breakpoints:k,type:_,attributes:S,...j}=n,T=Ze({name:"Grid",classes:WC,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:DB}),A=Sy();return _==="container"&&k?v.jsxs(RE,{value:{getStyles:T,grow:u,columns:p,breakpoints:k,type:_},children:[v.jsx(zE,{selector:`.${A}`,...n}),v.jsx("div",{...T("container"),children:v.jsx(fe,{...T("root",{className:A}),...j,children:v.jsx("div",{...T("inner"),children:w})})})]}):v.jsxs(RE,{value:{getStyles:T,grow:u,columns:p,breakpoints:k,type:_},children:[v.jsx(zE,{selector:`.${A}`,...n}),v.jsx(fe,{...T("root",{className:A}),...j,children:v.jsx("div",{...T("inner"),children:w})})]})});Hr.classes=WC;Hr.varsResolver=DB;Hr.displayName="@mantine/core/Grid";Hr.Col=GC;const[qne,RB]=Ar("HoverCard component was not found in the tree"),Qy=x.createContext({withinGroup:!1}),Hne={openDelay:0,closeDelay:0};function YC(e){const{openDelay:n,closeDelay:t,children:i}=ye("HoverCardGroup",Hne,e);return v.jsx(Qy,{value:{withinGroup:!0},children:v.jsx(PL,{delay:{open:n,close:t},children:i})})}YC.displayName="@mantine/core/HoverCardGroup";YC.extend=e=>e;function PB(e){const{children:n,onMouseEnter:t,onMouseLeave:i,...r}=ye("HoverCardDropdown",null,e),a=RB();if(x.use(Qy).withinGroup&&a.getFloatingProps&&a.floating){const u=a.getFloatingProps();return v.jsx(Sn.Dropdown,{ref:a.floating,...u,onMouseEnter:bi(t,u.onMouseEnter),onMouseLeave:bi(i,u.onMouseLeave),...r,children:n})}const o=bi(t,a.openDropdown),l=bi(i,a.closeDropdown);return v.jsx(Sn.Dropdown,{onMouseEnter:o,onMouseLeave:l,...r,children:n})}PB.displayName="@mantine/core/HoverCardDropdown";const Une={refProp:"ref"};function NB(e){const{children:n,refProp:t,eventPropsWrapperName:i,...r}=ye("HoverCardTarget",Une,e),a=Cl(n);if(!a)throw new Error("HoverCard.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const o=RB();if(x.use(Qy).withinGroup&&o.getReferenceProps&&o.reference){const u=o.getReferenceProps();return v.jsx(Sn.Target,{refProp:t,...r,children:x.cloneElement(a,i?{[i]:{...u,ref:o.reference}}:{...u,ref:o.reference})})}const l={onMouseEnter:bi(a.props.onMouseEnter,o.openDropdown),onMouseLeave:bi(a.props.onMouseLeave,o.closeDropdown)};return v.jsx(Sn.Target,{refProp:t,...r,children:x.cloneElement(a,i?{[i]:l}:l)})}NB.displayName="@mantine/core/HoverCardTarget";function Vne(e){const[n,t]=x.useState(e.defaultOpened),i=typeof e.opened=="boolean"?e.opened:n,r=x.use(Qy).withinGroup,a=Pi(),o=x.useRef(-1),l=x.useRef(-1),u=x.useCallback(()=>{window.clearTimeout(o.current),window.clearTimeout(l.current)},[]),f=x.useCallback(S=>{var j,T;t(S),S?(g(a),(j=e.onOpen)==null||j.call(e)):(T=e.onClose)==null||T.call(e)},[a,e.onOpen,e.onClose]),{context:h,refs:d}=Dy({open:i,onOpenChange:f}),{delay:p,setCurrentId:g}=NL(h,{id:a}),{getReferenceProps:b,getFloatingProps:w}=zL([DL(h,{enabled:!0,delay:r?p:{open:e.openDelay,close:e.closeDelay}}),LL(h,{role:"dialog"}),$L(h,{enabled:r})]),k=x.useCallback(()=>{r||(u(),e.openDelay===0||e.openDelay===void 0?f(!0):o.current=window.setTimeout(()=>f(!0),e.openDelay))},[r,u,e.openDelay,f]),_=x.useCallback(()=>{r||(u(),e.closeDelay===0||e.closeDelay===void 0?f(!1):l.current=window.setTimeout(()=>f(!1),e.closeDelay))},[r,u,e.closeDelay,f]);return x.useEffect(()=>()=>u(),[u]),{opened:i,reference:d.setReference,floating:d.setFloating,getReferenceProps:b,getFloatingProps:w,openDropdown:k,closeDropdown:_}}const Wne={openDelay:0,closeDelay:150,initiallyOpened:!1};function vl(e){const{children:n,onOpen:t,onClose:i,openDelay:r,closeDelay:a,initiallyOpened:o,...l}=ye("HoverCard",Wne,e),u=Vne({openDelay:r,closeDelay:a,defaultOpened:o,onOpen:t,onClose:i});return v.jsx(qne,{value:{openDropdown:u.openDropdown,closeDropdown:u.closeDropdown,getReferenceProps:u.getReferenceProps,getFloatingProps:u.getFloatingProps,reference:u.reference,floating:u.floating},children:v.jsx(Sn,{...l,opened:u.opened,__staticSelector:"HoverCard",children:n})})}vl.displayName="@mantine/core/HoverCard";vl.Target=NB;vl.Dropdown=PB;vl.Group=YC;vl.extend=e=>e;var $B={root:"m_9e117634"};const zB=(e,{radius:n,fit:t})=>({root:{"--image-radius":n===void 0?void 0:qt(n),"--image-object-fit":t}}),Xf=ki(e=>{const n=ye("Image",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,onError:u,src:f,radius:h,fit:d,fallbackSrc:p,mod:g,attributes:b,...w}=n,[k,_]=x.useState(!f);x.useEffect(()=>_(!f),[f]);const S=Ze({name:"Image",classes:$B,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l,varsResolver:zB});return k&&p?v.jsx(fe,{component:"img",src:p,...S("root"),onError:u,mod:["fallback",g],...w}):v.jsx(fe,{component:"img",...S("root"),src:f,onError:j=>{u==null||u(j),_(!0)},mod:g,...w})});Xf.classes=$B;Xf.varsResolver=zB;Xf.displayName="@mantine/core/Image";function Gne(e="top-end",n=0){const t={"--indicator-top":void 0,"--indicator-bottom":void 0,"--indicator-left":void 0,"--indicator-right":void 0,"--indicator-translate-x":void 0,"--indicator-translate-y":void 0},i=typeof n=="number"?n:n.x,r=typeof n=="number"?n:n.y,a=ve(i),o=ve(r),[l,u]=e.split("-");return l==="top"&&(t["--indicator-top"]=o,t["--indicator-translate-y"]="-50%"),l==="middle"&&(t["--indicator-top"]="50%",t["--indicator-translate-y"]="-50%"),l==="bottom"&&(t["--indicator-bottom"]=o,t["--indicator-translate-y"]="50%"),u==="start"&&(t["--indicator-left"]=a,t["--indicator-translate-x"]="-50%"),u==="center"&&(t["--indicator-left"]="50%",t["--indicator-translate-x"]="-50%"),u==="end"&&(t["--indicator-right"]=a,t["--indicator-translate-x"]="50%"),t}var LB={root:"m_e5262200",indicator:"m_760d1fb1",processing:"m_885901b1"};const Yne={position:"top-end",offset:0,showZero:!0},IB=(e,{color:n,position:t,offset:i,size:r,radius:a,zIndex:o,autoContrast:l})=>({root:{"--indicator-color":n?ft(n,e):void 0,"--indicator-text-color":ap(l,e)?If({color:n,theme:e,autoContrast:l}):void 0,"--indicator-size":ve(r),"--indicator-radius":a===void 0?void 0:qt(a),"--indicator-z-index":o==null?void 0:o.toString(),...Gne(t,i)}}),Jy=Pe(e=>{const n=ye("Indicator",Yne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:u,position:f,offset:h,inline:d,label:p,radius:g,color:b,withBorder:w,disabled:k,processing:_,zIndex:S,autoContrast:j,maxValue:T,showZero:A,mod:O,attributes:M,...$}=n,q=Ze({name:"Indicator",classes:LB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:M,vars:l,varsResolver:IB}),P=!A&&(p===0||p==="0"),L=T!==void 0&&typeof p=="number"&&p>T?`${T}+`:p;return v.jsxs(fe,{...q("root"),mod:[{inline:d},O],...$,children:[!k&&!P&&v.jsx(fe,{mod:{"with-label":!!p,"with-border":w,processing:_},...q("indicator"),children:L}),u]})});Jy.classes=LB;Jy.varsResolver=IB;Jy.displayName="@mantine/core/Indicator";const Kne=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],LE={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"};function IE(e){Object.keys(LE).forEach(n=>{e.style.setProperty(n,LE[n],"important")})}function Xne(e){const n=window.getComputedStyle(e);if(n===null)return null;const t={};for(const i of Kne)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 Mi=null;function Zne(e,n,t=1,i=1/0){Mi||(Mi=document.createElement("textarea"),Mi.setAttribute("tabindex","-1"),Mi.setAttribute("aria-hidden","true"),Mi.setAttribute("aria-label","autosize measurement"),IE(Mi)),Mi.parentNode===null&&document.body.appendChild(Mi);const{paddingSize:r,borderSize:a,sizingStyle:o}=e,{boxSizing:l}=o;Object.keys(o).forEach(p=>{Mi.style[p]=o[p]}),IE(Mi),Mi.value=n;let u=l==="border-box"?Mi.scrollHeight+a:Mi.scrollHeight-r;Mi.value=n,u=l==="border-box"?Mi.scrollHeight+a:Mi.scrollHeight-r,Mi.value="x";const f=Mi.scrollHeight-r;let h=f*t;l==="border-box"&&(h=h+r+a),u=Math.max(h,u);let d=f*i;return l==="border-box"&&(d=d+r+a),u=Math.min(d,u),[u,f]}function Qne({maxRows:e,minRows:n,onChange:t,ref:i,...r}){const a=r.value!==void 0,o=x.useRef(null),l=Ht(o,i),u=x.useRef(0),f=()=>{const d=o.current;if(!d)return;const p=Xne(d);if(!p)return;const[g]=Zne(p,d.value||d.placeholder||"x",n,e);u.current!==g&&(u.current=g,d.style.setProperty("height",`${g}px`,"important"))},h=d=>{a||f(),t==null||t(d)};return x.useLayoutEffect(f),x.useEffect(()=>{const d=()=>f();return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]),x.useEffect(()=>{const d=()=>f();return document.fonts.addEventListener("loadingdone",d),()=>document.fonts.removeEventListener("loadingdone",d)},[]),x.useEffect(()=>{const d=p=>{var g;if(((g=o.current)==null?void 0:g.form)===p.target&&!a){const b=o.current.value;requestAnimationFrame(()=>{o.current&&b!==o.current.value&&f()})}};return document.body.addEventListener("reset",d),()=>document.body.removeEventListener("reset",d)},[a]),v.jsx("textarea",{...r,onChange:h,ref:l})}const Jne={size:"sm"},_l=Pe(e=>{const{autosize:n,maxRows:t,minRows:i,__staticSelector:r,resize:a,...o}=ye("Textarea",Jne,e),l=n&&SX()!=="test",u=l?{maxRows:t,minRows:i}:{};return v.jsx(Ni,{component:l?Qne:"textarea",...o,__staticSelector:r||"Textarea",multiline:!0,"data-no-overflow":n&&t===void 0||void 0,__vars:{"--input-resize":a},...u})});_l.classes=Ni.classes;_l.displayName="@mantine/core/Textarea";function BE(e,n){if(typeof e=="string"&&e.trim().length===0)return!0;try{return n(e),!0}catch{return!1}}const ete={serialize:JSON.stringify,deserialize:JSON.parse,size:"sm",indentSpaces:2},KC=Pe(e=>{const{value:n,defaultValue:t,onChange:i,formatOnBlur:r,validationError:a,serialize:o,deserialize:l,onFocus:u,onBlur:f,readOnly:h,error:d,indentSpaces:p,...g}=ye("JsonInput",ete,e),[b,w]=Ai({value:n,defaultValue:t,finalValue:"",onChange:i}),[k,_]=x.useState(BE(b,l)),S=T=>{u==null||u(T),_(!0)},j=T=>{f==null||f(T);const A=BE(T.currentTarget.value,l);r&&!h&&A&&T.currentTarget.value.trim()!==""&&w(o(l(T.currentTarget.value),null,p)),_(A)};return v.jsx(_l,{value:b,onChange:T=>w(T.currentTarget.value),onFocus:S,onBlur:j,readOnly:h,...g,autoComplete:"off",__staticSelector:"JsonInput",error:k?d:a||!0,"data-monospace":!0})});KC.classes=Ni.classes;KC.displayName="@mantine/core/JsonInput";const[nte,Ol]=Ar("Menu component was not found in the tree");var Tl={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504",chevron:"m_b85b0bed"};const XC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("MenuDivider",null,e);return v.jsx(fe,{...Ol().getStyles("divider",{className:t,style:i,styles:r,classNames:n}),...o})});XC.classes=Tl;XC.displayName="@mantine/core/MenuDivider";const ZC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,onMouseEnter:o,onMouseLeave:l,onKeyDown:u,children:f,ref:h,...d}=ye("MenuDropdown",null,e),p=x.useRef(null),g=Ol(),b=bi(u,_=>{var S,j;(_.key==="ArrowUp"||_.key==="ArrowDown")&&(_.preventDefault(),(j=(S=p.current)==null?void 0:S.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||j.focus())}),w=bi(o,()=>(g.trigger==="hover"||g.trigger==="click-hover")&&g.openDropdown()),k=bi(l,()=>(g.trigger==="hover"||g.trigger==="click-hover")&&g.closeDropdown());return v.jsxs(Sn.Dropdown,{...d,onMouseEnter:w,onMouseLeave:k,role:"menu","aria-orientation":"vertical",ref:Ht(h,p),...g.getStyles("dropdown",{className:t,style:i,styles:r,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:b,children:[g.withInitialFocusPlaceholder&&v.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),f]})});ZC.classes=Tl;ZC.displayName="@mantine/core/MenuDropdown";const mm=x.createContext(null),QC=ki(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,color:o,closeMenuOnClick:l,leftSection:u,rightSection:f,children:h,disabled:d,"data-disabled":p,ref:g,...b}=ye("MenuItem",null,e),w=Ol(),k=x.use(mm),_=ci(),{dir:S}=qu(),j=x.useRef(null),T=b,A=bi(T.onClick,()=>{p||(typeof l=="boolean"?l&&w.closeDropdownImmediately():w.closeOnItemClick&&w.closeDropdownImmediately())}),O=o?_.variantColorResolver({color:o,theme:_,variant:"light"}):void 0,M=o?vs({color:o,theme:_}):null,$=bi(T.onKeyDown,q=>{q.key==="ArrowLeft"&&k&&(k.close(),k.focusParentItem())});return v.jsxs(Et,{onMouseDown:q=>q.preventDefault(),...b,unstyled:w.unstyled,tabIndex:w.menuItemTabIndex,...w.getStyles("item",{className:t,style:i,styles:r,classNames:n}),ref:Ht(j,g),role:"menuitem",disabled:d,"data-menu-item":!0,"data-disabled":d||p||void 0,"data-mantine-stop-propagation":!0,onClick:A,onKeyDown:Z6({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:w.loop,dir:S,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:[u&&v.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"left",children:u}),h&&v.jsx("div",{...w.getStyles("itemLabel",{styles:r,classNames:n}),children:h}),f&&v.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"right",children:f})]})});QC.classes=Tl;QC.displayName="@mantine/core/MenuItem";const JC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("MenuLabel",null,e);return v.jsx(fe,{...Ol().getStyles("label",{className:t,style:i,styles:r,classNames:n}),...o})});JC.classes=Tl;JC.displayName="@mantine/core/MenuLabel";const e9=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,onMouseEnter:o,onMouseLeave:l,onKeyDown:u,children:f,ref:h,...d}=ye("MenuSubDropdown",null,e),p=x.useRef(null),g=Ol(),b=x.use(mm),w=bi(o,b==null?void 0:b.open),k=bi(l,b==null?void 0:b.close);return v.jsx(Sn.Dropdown,{...d,onMouseEnter:w,onMouseLeave:k,role:"menu","aria-orientation":"vertical",ref:Ht(h,p),...g.getStyles("dropdown",{className:t,style:i,styles:r,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:f})});e9.classes=Tl;e9.displayName="@mantine/core/MenuSubDropdown";const n9=ki(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,color:o,leftSection:l,rightSection:u,children:f,disabled:h,"data-disabled":d,closeMenuOnClick:p,ref:g,...b}=ye("MenuSubItem",null,e),w=Ol(),k=x.use(mm),_=ci(),{dir:S}=qu(),j=x.useRef(null),T=b,A=o?_.variantColorResolver({color:o,theme:_,variant:"light"}):void 0,O=o?vs({color:o,theme:_}):null,M=bi(T.onKeyDown,L=>{L.key==="ArrowRight"&&(k==null||k.open(),k==null||k.focusFirstItem()),L.key==="ArrowLeft"&&(k!=null&&k.parentContext)&&(k.parentContext.close(),k.parentContext.focusParentItem())}),$=bi(T.onClick,()=>{!d&&p&&w.closeDropdownImmediately()}),q=bi(T.onMouseEnter,k==null?void 0:k.open),P=bi(T.onMouseLeave,k==null?void 0:k.close);return v.jsxs(Et,{onMouseDown:L=>L.preventDefault(),...b,unstyled:w.unstyled,tabIndex:w.menuItemTabIndex,...w.getStyles("item",{className:t,style:i,styles:r,classNames:n}),ref:Ht(j,g),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:Z6({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:w.loop,dir:S,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)`:A==null?void 0:A.color,"--menu-item-hover":A==null?void 0:A.hover},children:[l&&v.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"left",children:l}),f&&v.jsx("div",{...w.getStyles("itemLabel",{styles:r,classNames:n}),children:f}),v.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"right",children:u||v.jsx(e1,{...w.getStyles("chevron"),size:14})})]})});n9.classes=Tl;n9.displayName="@mantine/core/MenuSubItem";function BB({children:e,refProp:n}){if(!X6(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 Ol(),v.jsx(Sn.Target,{refProp:n,popupType:"menu",children:e})}BB.displayName="@mantine/core/MenuSubTarget";const tte={offset:0,position:"right-start",transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function Zf(e){const{children:n,closeDelay:t,openDelay:i,...r}=ye("MenuSub",tte,e),a=Pi(),[o,{open:l,close:u}]=Vz(!1),f=x.use(mm),{openDropdown:h,closeDropdown:d}=WL({open:l,close:u,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),g=()=>window.setTimeout(()=>{var b;(b=document.getElementById(`${a}-target`))==null||b.focus()},16);return v.jsx(mm,{value:{opened:o,close:d,open:h,focusFirstItem:p,focusParentItem:g,parentContext:f},children:v.jsx(Sn,{opened:o,withinPortal:!1,withArrow:!1,id:a,...r,children:n})})}Zf.extend=e=>e;Zf.displayName="@mantine/core/MenuSub";Zf.Target=BB;Zf.Dropdown=e9;Zf.Item=n9;const ite={refProp:"ref"};function FB(e){const{children:n,refProp:t,...i}=ye("MenuTarget",ite,e),r=Cl(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=Ol(),o=r.props,l=bi(o.onClick,()=>{a.trigger==="click"?a.toggleDropdown():a.trigger==="click-hover"&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),u=bi(o.onMouseEnter,()=>(a.trigger==="hover"||a.trigger==="click-hover")&&a.openDropdown()),f=bi(o.onMouseLeave,()=>{(a.trigger==="hover"||a.trigger==="click-hover"&&!a.openedViaClick)&&a.closeDropdown()});return v.jsx(Sn.Target,{refProp:t,popupType:"menu",...i,children:x.cloneElement(r,{onClick:l,onMouseEnter:u,onMouseLeave:f,"data-expanded":a.opened?!0:void 0})})}FB.displayName="@mantine/core/MenuTarget";const rte={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1},zn=Pe(e=>{const n=ye("Menu",rte,e),{children:t,onOpen:i,onClose:r,opened:a,defaultOpened:o,trapFocus:l,onChange:u,closeOnItemClick:f,loop:h,closeOnEscape:d,trigger:p,openDelay:g,closeDelay:b,classNames:w,styles:k,unstyled:_,variant:S,vars:j,menuItemTabIndex:T,keepMounted:A,withInitialFocusPlaceholder:O,attributes:M,...$}=n,q=Ze({name:"Menu",classes:Tl,props:n,classNames:w,styles:k,unstyled:_,attributes:M}),[P,L]=Ai({value:a,defaultValue:o,finalValue:!1,onChange:u}),[U,G]=x.useState(!1),B=()=>{L(!1),G(!1),P&&(r==null||r())},R=()=>{L(!0),!P&&(i==null||i())},D=()=>{P?B():R()},{openDropdown:z,closeDropdown:H}=WL({open:R,close:B,closeDelay:b,openDelay:g}),Y=V=>rX("[data-menu-item]","[data-menu-dropdown]",V),{resolvedClassNames:N,resolvedStyles:W}=Wi({classNames:w,styles:k,props:n});return v.jsx(nte,{value:{getStyles:q,opened:P,toggleDropdown:D,getItemIndex:Y,openedViaClick:U,setOpenedViaClick:G,closeOnItemClick:f,closeDropdown:p==="click"?B:H,openDropdown:p==="click"?R:z,closeDropdownImmediately:B,loop:h,trigger:p,unstyled:_,menuItemTabIndex:T,withInitialFocusPlaceholder:O},children:v.jsx(Sn,{returnFocus:!0,...$,opened:P,onChange:D,defaultOpened:o,trapFocus:A?!1:l,closeOnEscape:d,__staticSelector:"Menu",classNames:N,styles:W,unstyled:_,variant:S,keepMounted:A,children:t})})});zn.displayName="@mantine/core/Menu";zn.classes=Tl;zn.Item=QC;zn.Label=JC;zn.Dropdown=ZC;zn.Target=FB;zn.Divider=XC;zn.Sub=Zf;const[ate,Qf]=Ar("Modal component was not found in tree");var ys={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};const e0=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ModalBody",null,e);return v.jsx(_I,{...Qf().getStyles("body",{classNames:n,style:i,styles:r,className:t}),...o})});e0.classes=ys;e0.displayName="@mantine/core/ModalBody";const n0=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ModalCloseButton",null,e);return v.jsx(xI,{...Qf().getStyles("close",{classNames:n,style:i,styles:r,className:t}),...o})});n0.classes=ys;n0.displayName="@mantine/core/ModalCloseButton";const t0=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,children:o,__hidden:l,...u}=ye("ModalContent",null,e),f=Qf(),h=f.scrollAreaComponent||Eee;return v.jsx(SI,{...f.getStyles("content",{className:t,style:i,styles:r,classNames:n}),innerProps:f.getStyles("inner",{className:t,style:i,styles:r,classNames:n}),"data-full-screen":f.fullScreen||void 0,"data-modal-content":!0,"data-hidden":l||void 0,...u,children:v.jsx(h,{style:{maxHeight:f.fullScreen?"100dvh":`calc(100dvh - (${ve(f.yOffset)} * 2))`},children:o})})});t0.classes=ys;t0.displayName="@mantine/core/ModalContent";const i0=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ModalHeader",null,e);return v.jsx(CI,{...Qf().getStyles("header",{classNames:n,style:i,styles:r,className:t}),...o})});i0.classes=ys;i0.displayName="@mantine/core/ModalHeader";const r0=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ModalOverlay",null,e);return v.jsx(jI,{...Qf().getStyles("overlay",{classNames:n,style:i,styles:r,className:t}),...o})});r0.classes=ys;r0.displayName="@mantine/core/ModalOverlay";const ote={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:xa("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},qB=(e,{radius:n,size:t,yOffset:i,xOffset:r})=>({root:{"--modal-radius":n===void 0?void 0:qt(n),"--modal-size":Ln(t,"modal-size"),"--modal-y-offset":ve(i),"--modal-x-offset":ve(r)}}),gp=Pe(e=>{const n=ye("ModalRoot",ote,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,yOffset:u,scrollAreaComponent:f,radius:h,fullScreen:d,centered:p,xOffset:g,__staticSelector:b,attributes:w,...k}=n,_=Ze({name:b,classes:ys,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:qB});return v.jsx(ate,{value:{yOffset:u,scrollAreaComponent:f,getStyles:_,fullScreen:d},children:v.jsx(kI,{..._("root"),"data-full-screen":d||void 0,"data-centered":p||void 0,"data-offset-scrollbars":f===ur.Autosize||void 0,unstyled:o,...k})})});gp.classes=ys;gp.varsResolver=qB;gp.displayName="@mantine/core/ModalRoot";const HB=x.createContext(null);function UB({children:e}){const[n,t]=x.useState([]),[i,r]=x.useState(xa("modal"));return v.jsx(HB,{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})}UB.displayName="@mantine/core/ModalStack";const a0=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ModalTitle",null,e);return v.jsx(AI,{...Qf().getStyles("title",{classNames:n,style:i,styles:r,className:t}),...o})});a0.classes=ys;a0.displayName="@mantine/core/ModalTitle";const ste={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:xa("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},Gi=Pe(e=>{const{title:n,withOverlay:t,overlayProps:i,withCloseButton:r,closeButtonProps:a,children:o,radius:l,opened:u,stackId:f,zIndex:h,...d}=ye("Modal",ste,e),p=x.use(HB),g=!!n||r,b=p&&f?{closeOnEscape:p.currentId===f,trapFocus:p.currentId===f,zIndex:p.getZIndex(f)}:{},w=t===!1?!1:f&&p?p.currentId===f:u;return x.useEffect(()=>{p&&f&&(u?p.addModal(f,h||xa("modal")):p.removeModal(f))},[u,f,h]),v.jsxs(gp,{radius:l,opened:u,zIndex:p&&f?p.getZIndex(f):h,...d,...b,children:[t&&v.jsx(r0,{visible:w,transitionProps:p&&f?{duration:0}:void 0,...i}),v.jsxs(t0,{radius:l,__hidden:p&&f&&u?f!==p.currentId:!1,children:[g&&v.jsxs(i0,{children:[n&&v.jsx(a0,{children:n}),r&&v.jsx(n0,{...a})]}),v.jsx(e0,{children:o})]})]})});Gi.classes=ys;Gi.displayName="@mantine/core/Modal";Gi.Root=gp;Gi.Overlay=r0;Gi.Content=t0;Gi.Body=e0;Gi.Header=i0;Gi.Title=a0;Gi.CloseButton=n0;Gi.Stack=UB;const o0=x.createContext(null);var s0={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};const VB=x.createContext(null),WB=(e,{gap:n},{size:t})=>({group:{"--pg-gap":n!==void 0?Ln(n):Ln(t,"pg-gap")}}),l0=Pe(e=>{var b;const n=ye("PillGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:u,disabled:f,attributes:h,...d}=n,p=((b=x.use(o0))==null?void 0:b.size)||u||void 0,g=Ze({name:"PillGroup",classes:s0,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,varsResolver:WB,stylesCtx:{size:p},rootSelector:"group"});return v.jsx(VB,{value:{size:p,disabled:f},children:v.jsx(fe,{size:p,...g("group"),...d})})});l0.classes=s0;l0.varsResolver=WB;l0.displayName="@mantine/core/PillGroup";const lte={variant:"default"},GB=(e,{radius:n},{size:t})=>({root:{"--pill-fz":Ln(t,"pill-fz"),"--pill-height":Ln(t,"pill-height"),"--pill-radius":n===void 0?void 0:qt(n)}}),xl=Pe(e=>{const n=ye("Pill",lte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,variant:u,children:f,withRemoveButton:h,onRemove:d,removeButtonProps:p,radius:g,size:b,disabled:w,mod:k,attributes:_,...S}=n,j=x.use(VB),T=x.use(o0),A=b||(j==null?void 0:j.size)||void 0,O=(T==null?void 0:T.variant)==="filled"?"contrast":u||"default",M=Ze({name:"Pill",classes:s0,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_,vars:l,varsResolver:GB,stylesCtx:{size:A}});return v.jsxs(fe,{component:"span",variant:O,size:A,...M("root",{variant:O}),mod:[{"with-remove":h&&!w,disabled:w||(j==null?void 0:j.disabled)},k],...S,children:[v.jsx("span",{...M("label"),children:f}),h&&v.jsx(jl,{variant:"transparent",radius:g,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,$)}})]})});xl.classes=s0;xl.varsResolver=GB;xl.displayName="@mantine/core/Pill";xl.Group=l0;var YB={field:"m_45c4369d"};const ute={type:"visible"},t9=Pe(e=>{const n=ye("PillsInputField",ute,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,type:u,disabled:f,id:h,pointer:d,mod:p,attributes:g,ref:b,...w}=n,k=x.use(o0),_=x.use(Hu),S=Ze({name:"PillsInputField",classes:YB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:g,rootSelector:"field"}),j=f||(k==null?void 0:k.disabled);return v.jsx(fe,{component:"input",ref:Ht(b,k==null?void 0:k.fieldRef),"data-type":u,disabled:j,mod:[{disabled:j,pointer:d},p],...S("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:T=>!d&&T.stopPropagation()})});t9.classes=YB;t9.displayName="@mantine/core/PillsInputField";const cte={size:"sm"},Mu=Pe(e=>{const{children:n,onMouseDown:t,onClick:i,size:r,disabled:a,__staticSelector:o,error:l,variant:u,...f}=ye("PillsInput",cte,e),h=x.useRef(null);return v.jsx(o0,{value:{fieldRef:h,size:r,disabled:a,hasError:!!l,variant:u},children:v.jsx(Ni,{size:r,error:l,variant:u,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,g;d.preventDefault(),(p=d.currentTarget.closest("fieldset"))!=null&&p.disabled||((g=h.current)==null||g.focus(),i==null||i(d))},...f,multiline:!0,disabled:a,__staticSelector:o||"PillsInput",withAria:!1,children:n})})});Mu.displayName="@mantine/core/PillsInput";Mu.classes=Ni.classes;Mu.Field=t9;function Lk(e){return typeof e=="string"?e.trim().toLowerCase():e}function fte({data:e,value:n}){const t=n.map(Lk);return e.reduce((i,r)=>(Eu(r)?i.push({group:r.group,items:r.items.filter(a=>t.indexOf(Lk(a.value))===-1)}):t.indexOf(Lk(r.value))===-1&&i.push(r),i),[])}const FE={xs:41,sm:50,md:60,lg:72,xl:89},dte={maxValues:1/0,withCheckIcon:!0,checkIconPosition:"left",hiddenInputValuesDivider:",",clearSearchOnChange:!0,openOnFocus:!0,size:"sm"},u0=sp(e=>{const n=ye("MultiSelect",dte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:u,value:f,defaultValue:h,onChange:d,onKeyDown:p,variant:g,data:b,dropdownOpened:w,defaultDropdownOpened:k,onDropdownOpen:_,onDropdownClose:S,selectFirstOptionOnChange:j,selectFirstOptionOnDropdownOpen:T,onOptionSubmit:A,comboboxProps:O,filter:M,limit:$,withScrollArea:q,maxDropdownHeight:P,searchValue:L,defaultSearchValue:U,onSearchChange:G,readOnly:B,disabled:R,onFocus:D,onBlur:z,radius:H,rightSection:Y,rightSectionWidth:N,rightSectionPointerEvents:W,rightSectionProps:V,leftSection:I,leftSectionWidth:Q,leftSectionPointerEvents:ie,leftSectionProps:re,inputContainer:Z,inputWrapperOrder:le,withAsterisk:ee,labelProps:se,descriptionProps:ke,errorProps:te,wrapperProps:$e,description:xe,label:Ae,error:ze,maxValues:we,searchable:Ce,nothingFoundMessage:Ne,withCheckIcon:he,withAlignedLabels:He,checkIconPosition:Ye,hidePickedOptions:We,withErrorStyles:Qe,name:Je,form:oe,id:be,clearable:Ke,clearSectionMode:en,clearButtonProps:je,hiddenInputProps:an,placeholder:pn,hiddenInputValuesDivider:Dn,required:bn,mod:sn,renderOption:nn,renderPill:$n,onRemove:De,onClear:Fe,onMaxValues:Vn,scrollAreaProps:En,chevronColor:gn,attributes:xn,clearSearchOnChange:at,openOnFocus:Mt,loading:qe,loadingPosition:Ue,...In}=n,ot=Pi(be),Pn=Ly(b),rn=vp(Pn),on=x.useRef({}),ln=Vf({opened:w,defaultOpened:k,onDropdownOpen:()=>{_==null||_(),T&&ln.selectFirstOption()},onDropdownClose:()=>{S==null||S(),ln.resetSelectedOption()}}),{styleProps:Kn,rest:{type:Xn,autoComplete:Lt,...Rn}}=Fu(In),[Mn,Qn]=Ai({value:f,defaultValue:h,finalValue:[],onChange:d}),[Dt,fi]=Ai({value:L,defaultValue:U,finalValue:"",onChange:G}),zi=cn=>{fi(cn),ln.resetSelectedOption()},Ya=Ze({name:"MultiSelect",classes:{},props:n,classNames:t,styles:a,unstyled:o,attributes:xn}),{resolvedClassNames:Co,resolvedStyles:Ta}=Wi({props:n,styles:a,classNames:t}),dr=cn=>{p==null||p(cn),cn.key===" "&&!Ce&&(cn.preventDefault(),ln.toggleDropdown()),cn.key==="Backspace"&&Dt.length===0&&Mn.length>0&&(De==null||De(Mn[Mn.length-1]),Qn(Mn.slice(0,Mn.length-1)))},jo=Mn.map((cn,Mr)=>{var Kr;const Ao=rn[`${cn}`]||on.current[`${cn}`];return $n?v.jsx(x.Fragment,{children:$n({option:Ao,value:cn,onRemove:()=>{Qn(Mn.filter(Xr=>cn!==Xr)),De==null||De(cn)},disabled:R})},`${cn}-${Mr}`):v.jsx(xl,{withRemoveButton:!B&&!((Kr=rn[`${cn}`])!=null&&Kr.disabled),onRemove:()=>{Qn(Mn.filter(Xr=>cn!==Xr)),De==null||De(cn)},unstyled:o,disabled:R,...Ya("pill"),children:(Ao==null?void 0:Ao.label)||cn},`${cn}-${Mr}`)});x.useEffect(()=>{j&&ln.selectFirstOption()},[j,Dt]),x.useEffect(()=>{Mn.forEach(cn=>{`${cn}`in rn&&(on.current[`${cn}`]=rn[`${cn}`])})},[rn,Mn]);const Er=v.jsx(On.ClearButton,{...je,onClear:()=>{Fe==null||Fe(),Qn([]),zi("")}}),hr=fte({data:Pn,value:Mn}),yn=Ke&&Mn.length>0&&!R&&!B,oi=yn?{paddingInlineEnd:FE[u]??FE.sm}:void 0;return v.jsxs(v.Fragment,{children:[v.jsxs(On,{store:ln,classNames:Co,styles:Ta,unstyled:o,size:u,readOnly:B,__staticSelector:"MultiSelect",attributes:xn,onOptionSubmit:cn=>{A==null||A(cn),at&&zi(""),ln.updateSelectedOptionIndex("selected"),Mn.includes(rn[`${cn}`].value)?(Qn(Mn.filter(Mr=>Mr!==rn[`${cn}`].value)),De==null||De(rn[`${cn}`].value)):Mn.lengthCe?ln.openDropdown():ln.toggleDropdown(),"data-expanded":ln.dropdownOpened||void 0,id:ot,required:bn,mod:sn,attributes:xn,children:v.jsxs(xl.Group,{attributes:xn,disabled:R,unstyled:o,...Ya("pillsList",{style:oi}),children:[jo,v.jsx(On.EventsTarget,{autoComplete:Lt,withExpandedAttribute:!0,children:v.jsx(Mu.Field,{...Rn,id:ot,placeholder:pn,type:!Ce&&!pn?"hidden":"visible",...Ya("inputField"),unstyled:o,onFocus:cn=>{D==null||D(cn),Mt&&Ce&&ln.openDropdown()},onBlur:cn=>{z==null||z(cn),ln.closeDropdown(),zi("")},onKeyDown:dr,value:Dt,onChange:cn=>{zi(cn.currentTarget.value),Ce&&ln.openDropdown(),j&&ln.selectFirstOption()},disabled:R,readOnly:B||!Ce,pointer:!Ce})})]})})}),v.jsx(qy,{data:We?hr:Pn,hidden:B||R,filter:M,search:Dt,limit:$,hiddenWhenEmpty:!Ne,withScrollArea:q,maxDropdownHeight:P,filterOptions:Ce,value:Mn,checkIconPosition:Ye,withCheckIcon:he,withAlignedLabels:He,nothingFoundMessage:Ne,unstyled:o,labelId:Ae?`${ot}-label`:void 0,"aria-label":Ae?void 0:In["aria-label"],renderOption:nn,scrollAreaProps:En})]}),v.jsx(On.HiddenInput,{name:Je,valuesDivider:Dn,value:Mn,form:oe,disabled:R,...an})]})});u0.classes={...Ni.classes,...On.classes};u0.displayName="@mantine/core/MultiSelect";var KB={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};const hte={withCloseButton:!0},XB=(e,{radius:n,color:t})=>({root:{"--notification-radius":n===void 0?void 0:qt(n),"--notification-color":t?ft(t,e):void 0}}),c0=Pe(e=>{const n=ye("Notification",hte,e),{className:t,color:i,radius:r,loading:a,withCloseButton:o,withBorder:l,title:u,icon:f,children:h,onClose:d,closeButtonProps:p,classNames:g,style:b,styles:w,unstyled:k,vars:_,mod:S,loaderProps:j,role:T,attributes:A,...O}=n,M=Ze({name:"Notification",classes:KB,props:n,className:t,style:b,classNames:g,styles:w,unstyled:k,attributes:A,vars:_,varsResolver:XB});return v.jsxs(fe,{...M("root"),mod:[{"data-with-icon":!!f||a,"data-with-border":l},S],role:T||"alert",...O,children:[f&&!a&&v.jsx("div",{...M("icon"),children:f}),a&&v.jsx(Zt,{size:28,color:i,...M("loader"),...j}),v.jsxs("div",{...M("body"),children:[u&&v.jsx("div",{...M("title"),children:u}),v.jsx(fe,{...M("description"),mod:{"data-with-title":!!u},children:h})]}),o&&v.jsx(jl,{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")})]})});c0.classes=KB;c0.varsResolver=XB;c0.displayName="@mantine/core/Notification";function ZB(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+HE("0",o-l):r=(r.substring(0,o)||"0")+"."+r.substring(o),t+r}function UE(e,n,t){if(["","-"].indexOf(e)!==-1)return e;var i=(e.indexOf(".")!==-1||t)&&n,r=i9(e),a=r.beforeDecimal,o=r.afterDecimal,l=r.hasNegation,u=parseFloat("0."+(o||"0")),f=o.length<=n?"0."+o:u.toFixed(n),h=f.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=eF(h[1]||"",n,t),g=l?"-":"",b=i?".":"";return""+g+d+b+p}function gu(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 tF=mte(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}}}),bte=function(e,n){var t=Math.min(e.selectionStart,n);return{from:{start:t,end:e.selectionEnd},to:{start:t,end:n}}};function wte(e,n,t){return Math.min(Math.max(e,n),t)}function Ik(e){return Math.max(e.selectionStart,e.selectionEnd)}function kte(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function _te(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function xte(e){var n=e.currentValue,t=e.formattedValue,i=e.currentValueIndex,r=e.formattedValueIndex;return n[i]===t[r]}function Ste(e,n,t,i,r,a,o){o===void 0&&(o=xte);var l=r.findIndex(function(T){return T}),u=e.slice(0,l);!n&&!t.startsWith(u)&&(n=u,t=u+t,i=i+u.length);for(var f=t.length,h=e.length,d={},p=new Array(f),g=0;g0&&p[_]===-1;)_--;var j=_===-1||p[_]===-1?0:p[_]+1;return j>S?S:i-j=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 Cte(e){for(var n=Array.from({length:e.length+1}).map(function(){return!0}),t=0,i=n.length;tM.length-o.length||OL||d>e.length-o.length)&&(P=d),e=e.substring(0,P),e=Tte(j?"-"+e:e,r),e=(e.match(Ete(b))||[]).join("");var U=e.indexOf(b);e=e.replace(new RegExp(JB(b),"g"),function(z,H){return H===U?".":""});var G=i9(e,r),B=G.beforeDecimal,R=G.afterDecimal,D=G.addNegation;return f.end-f.startMath.abs(T)?"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 L=SE(M,O);if(!L)return!0;if(L?A=M:(A=M==="v"?"h":"v",L=SE(M,O)),!L)return!1;if(!i.current&&"changedTouches"in w&&(j||T)&&(i.current=A),!A)return!0;var U=i.current||A;return wee(U,k,w,U==="h"?j:T)},[]),u=x.useCallback(function(w){var k=w;if(!(!Rc.length||Rc[Rc.length-1]!==a)){var _="deltaY"in k?CE(k):tg(k),S=n.current.filter(function(A){return A.name===k.type&&(A.target===k.target||k.target===A.shadowParent)&&kee(A.delta,_)})[0];if(S&&S.should){k.cancelable&&k.preventDefault();return}if(!S){var j=(o.current.shards||[]).map(jE).filter(Boolean).filter(function(A){return A.contains(k.target)}),T=j.length>0?l(k,j[0]):!o.current.noIsolation;T&&k.cancelable&&k.preventDefault()}}},[]),f=x.useCallback(function(w,k,_,S){var j={name:w,delta:k,target:_,should:S,shadowParent:Cee(_)};n.current.push(j),setTimeout(function(){n.current=n.current.filter(function(T){return T!==j})},1)},[]),h=x.useCallback(function(w){t.current=tg(w),i.current=void 0},[]),d=x.useCallback(function(w){f(w.type,CE(w),w.target,l(w,e.lockRef.current))},[]),p=x.useCallback(function(w){f(w.type,tg(w),w.target,l(w,e.lockRef.current))},[]);x.useEffect(function(){return Rc.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",u,Dc),document.addEventListener("touchmove",u,Dc),document.addEventListener("touchstart",h,Dc),function(){Rc=Rc.filter(function(w){return w!==a}),document.removeEventListener("wheel",u,Dc),document.removeEventListener("touchmove",u,Dc),document.removeEventListener("touchstart",h,Dc)}},[]);var g=e.removeScrollBar,b=e.inert;return x.createElement(x.Fragment,null,b?x.createElement(a,{styles:_ee(r)}):null,g?x.createElement(hee,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Cee(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const jee=eee(gI,See);var Tu=x.forwardRef(function(e,n){return x.createElement($y,to({},e,{ref:n,sideCar:jee}))});Tu.classNames=$y.classNames;function _I({keepMounted:e,opened:n,onClose:t,id:i,transitionProps:r,onExitTransitionEnd:a,onEnterTransitionEnd:o,trapFocus:l,closeOnEscape:u,returnFocus:f,closeOnClickOutside:h,withinPortal:d,portalProps:p,lockScroll:g,children:b,zIndex:w,shadow:k,padding:_,__vars:S,unstyled:j,removeScrollProps:T,...A}){const{_id:O,titleMounted:M,bodyMounted:$,shouldLockScroll:q,setTitleMounted:P,setBodyMounted:L}=UJ({id:i,transitionProps:r,opened:n,trapFocus:l,closeOnEscape:u,onClose:t,returnFocus:f}),{key:U,...G}=T||{};return v.jsx(wl,{...p,withinPortal:d,children:v.jsx(qJ,{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:L,trapFocus:l,closeOnEscape:u,zIndex:w,unstyled:j},children:v.jsx(Tu,{enabled:q&&g,...G,children:v.jsx(fe,{...A,id:O,__vars:{...S,"--mb-z-index":(w||xa("modal")).toString(),"--mb-shadow":Q6(k),"--mb-padding":Yt(_)},children:b})},U)})})}_I.displayName="@mantine/core/ModalBase";function Aee(){const e=gs();return x.useEffect(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var sf={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};function xI({className:e,...n}){const t=Aee(),i=gs();return v.jsx(fe,{id:t,className:vn({[sf.body]:!i.unstyled},e),...n})}xI.displayName="@mantine/core/ModalBaseBody";function SI({className:e,onClick:n,...t}){const i=gs();return v.jsx(jl,{...t,onClick:r=>{i.onClose(),n==null||n(r)},className:vn({[sf.close]:!i.unstyled},e),unstyled:i.unstyled})}SI.displayName="@mantine/core/ModalBaseCloseButton";function CI({transitionProps:e,className:n,innerProps:t,onKeyDown:i,style:r,ref:a,...o}){const l=gs();return v.jsx(ls,{mounted:l.opened,transition:"pop",...l.transitionProps,onExited:()=>{var u,f,h;(u=l.onExitTransitionEnd)==null||u.call(l),(h=(f=l.transitionProps)==null?void 0:f.onExited)==null||h.call(f)},onEntered:()=>{var u,f,h;(u=l.onEnterTransitionEnd)==null||u.call(l),(h=(f=l.transitionProps)==null?void 0:f.onEntered)==null||h.call(f)},...e,children:u=>v.jsx("div",{...t,className:vn({[sf.inner]:!l.unstyled},t.className),children:v.jsx(Ry,{active:l.opened&&l.trapFocus,innerRef:a,children:v.jsx(Tt,{...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,u],className:vn({[sf.content]:!l.unstyled},n),unstyled:l.unstyled,children:o.children})})})})}CI.displayName="@mantine/core/ModalBaseContent";function jI({className:e,...n}){const t=gs();return v.jsx(fe,{component:"header",className:vn({[sf.header]:!t.unstyled},e),...n})}jI.displayName="@mantine/core/ModalBaseHeader";const Oee={duration:200,timingFunction:"ease",transition:"fade"};function Tee(e){const n=gs();return{...Oee,...n.transitionProps,...e}}function AI({onClick:e,transitionProps:n,style:t,visible:i,...r}){const a=gs(),o=Tee(n);return v.jsx(ls,{mounted:i!==void 0?i:a.opened,...o,transition:"fade",children:l=>v.jsx(up,{fixed:!0,style:[t,l],zIndex:a.zIndex,unstyled:a.unstyled,onClick:u=>{e==null||e(u),a.closeOnClickOutside&&a.onClose()},...r})})}AI.displayName="@mantine/core/ModalBaseOverlay";function Eee(){const e=gs();return x.useEffect(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function OI({className:e,...n}){const t=Eee(),i=gs();return v.jsx(fe,{component:"h2",className:vn({[sf.title]:!i.unstyled},e),id:t,...n})}OI.displayName="@mantine/core/ModalBaseTitle";function Mee({children:e}){return v.jsx(v.Fragment,{children:e})}const TI=x.createContext({size:"sm"}),EI=Pe(e=>{const n=ye("InputClearButton",null,e),{size:t,variant:i,vars:r,classNames:a,styles:o,...l}=n,u=x.use(TI),{resolvedClassNames:f,resolvedStyles:h}=Wi({classNames:a,styles:o,props:n});return v.jsx(jl,{variant:i||"transparent",size:t||(u==null?void 0:u.size)||"sm",classNames:f,styles:h,__staticSelector:"InputClearButton",style:{pointerEvents:"all",background:"var(--input-bg)",...l.style},...l})});EI.displayName="@mantine/core/InputClearButton";const Dee={xs:7,sm:8,md:10,lg:12,xl:15};function Ree({__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)?v.jsxs("div",{"data-combined-clear-section":!0,style:{display:"flex",gap:2,alignItems:"center",paddingInlineEnd:Dee[r]},children:[o,t||i]}):t===null?null:t||o||i}const Hu=x.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var ja={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 MI=(e,{size:n})=>({description:{"--input-description-size":n===void 0?void 0:`calc(${ai(n)} - ${ve(2)})`}}),cp=Pe(e=>{const n=ye("InputDescription",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:u,__inheritStyles:f=!0,attributes:h,...d}=ye("InputDescription",null,n),p=x.use(Hu),g=Ze({name:["InputWrapper",u],props:n,classes:ja,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,rootSelector:"description",vars:l,varsResolver:MI});return v.jsx(fe,{component:"p",...(f&&(p==null?void 0:p.getStyles)||g)("description",p!=null&&p.getStyles?{className:i,style:r}:void 0),...d})});cp.classes=ja;cp.varsResolver=MI;cp.displayName="@mantine/core/InputDescription";const DI=(e,{size:n})=>({error:{"--input-error-size":n===void 0?void 0:`calc(${ai(n)} - ${ve(2)})`}}),fp=Pe(e=>{const n=ye("InputError",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:u,__staticSelector:f,__inheritStyles:h=!0,...d}=n,p=Ze({name:["InputWrapper",f],props:n,classes:ja,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:u,rootSelector:"error",vars:l,varsResolver:DI}),g=x.use(Hu);return v.jsx(fe,{component:"p",...(h&&(g==null?void 0:g.getStyles)||p)("error",g!=null&&g.getStyles?{className:i,style:r}:void 0),...d})});fp.classes=ja;fp.varsResolver=DI;fp.displayName="@mantine/core/InputError";const Pee={labelElement:"label"},RI=(e,{size:n})=>({label:{"--input-label-size":ai(n),"--input-asterisk-color":void 0}}),dp=Pe(e=>{const n=ye("InputLabel",Pee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,labelElement:u,required:f,htmlFor:h,onMouseDown:d,children:p,__staticSelector:g,mod:b,attributes:w,...k}=n,_=Ze({name:["InputWrapper",g],props:n,classes:ja,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,rootSelector:"label",vars:l,varsResolver:RI}),S=x.use(Hu),j=(S==null?void 0:S.getStyles)||_;return v.jsxs(fe,{...j("label",S!=null&&S.getStyles?{className:i,style:r}:void 0),component:u,htmlFor:u==="label"?h:void 0,mod:[{required:f},b],onMouseDown:T=>{d==null||d(T),!T.defaultPrevented&&T.detail>1&&T.preventDefault()},...k,children:[p,f&&v.jsx("span",{...j("required"),"aria-hidden":!0,children:" *"})]})});dp.classes=ja;dp.varsResolver=RI;dp.displayName="@mantine/core/InputLabel";const _C=Pe(e=>{const n=ye("InputPlaceholder",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:u,error:f,mod:h,attributes:d,...p}=n;return v.jsx(fe,{...Ze({name:["InputPlaceholder",u],props:n,classes:ja,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:d,rootSelector:"placeholder"})("placeholder"),mod:[{error:!!f},h],component:"span",...p})});_C.classes=ja;_C.displayName="@mantine/core/InputPlaceholder";function Nee(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 $ee={labelElement:"label",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},PI=(e,{size:n})=>({label:{"--input-label-size":ai(n),"--input-asterisk-color":void 0},error:{"--input-error-size":n===void 0?void 0:`calc(${ai(n)} - ${ve(2)})`},description:{"--input-description-size":n===void 0?void 0:`calc(${ai(n)} - ${ve(2)})`}}),zy=Pe(e=>{const n=ye("InputWrapper",$ee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:u,variant:f,__staticSelector:h,inputContainer:d,inputWrapperOrder:p,label:g,error:b,description:w,labelProps:k,descriptionProps:_,errorProps:S,labelElement:j,children:T,withAsterisk:A,id:O,required:M,__stylesApiProps:$,mod:q,attributes:P,...L}=n,U=Ze({name:["InputWrapper",h],props:$||n,classes:ja,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:P,vars:l,varsResolver:PI}),G={size:u,variant:f,__staticSelector:h},B=Pi(O),R=typeof A=="boolean"?A:M,D=(S==null?void 0:S.id)||`${B}-error`,z=(_==null?void 0:_.id)||`${B}-description`,H=B,Y=!!b&&typeof b!="boolean",N=!!w,W=`${Y?D:""} ${N?z:""}`,V=W.trim().length>0?W.trim():void 0,I=(k==null?void 0:k.id)||`${B}-label`,Q=g&&v.jsx(dp,{labelElement:j,id:I,htmlFor:H,required:R,...G,...k,children:g},"label"),ie=N&&v.jsx(cp,{..._,...G,size:(_==null?void 0:_.size)||G.size,id:(_==null?void 0:_.id)||z,children:w},"description"),re=v.jsx(x.Fragment,{children:d(T)},"input"),Z=Y&&x.createElement(fp,{...S,...G,size:(S==null?void 0:S.size)||G.size,key:"error",id:(S==null?void 0:S.id)||D},b),le=p.map(ee=>{switch(ee){case"label":return Q;case"input":return re;case"description":return ie;case"error":return Z;default:return null}});return v.jsx(Hu,{value:{getStyles:U,describedBy:V,inputId:H,labelId:I,...Nee(p,{hasDescription:N,hasError:Y})},children:v.jsx(fe,{variant:f,size:u,mod:[{error:!!b},q],id:j==="label"?void 0:O,...U("root"),...L,children:le})})});zy.classes=ja;zy.varsResolver=PI;zy.displayName="@mantine/core/InputWrapper";const zee={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0,size:"sm",loading:!1,loadingPosition:"right"},NI=(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":Ln(n.size,"input-height"),"--input-fz":ai(n.size),"--input-radius":n.radius===void 0?void 0:qt(n.radius),"--input-left-section-width":n.leftSectionWidth!==void 0?ve(n.leftSectionWidth):void 0,"--input-right-section-width":n.rightSectionWidth!==void 0?ve(n.rightSectionWidth):void 0,"--input-padding-y":n.multiline?Ln(n.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":n.leftSectionPointerEvents,"--input-right-section-pointer-events":n.rightSectionPointerEvents}}),Xt=ki(e=>{const n=ye("Input",zee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,required:l,__staticSelector:u,__stylesApiProps:f,size:h,wrapperProps:d,error:p,disabled:g,leftSection:b,leftSectionProps:w,leftSectionWidth:k,rightSection:_,rightSectionProps:S,rightSectionWidth:j,rightSectionPointerEvents:T,leftSectionPointerEvents:A,variant:O,vars:M,pointer:$,multiline:q,radius:P,id:L,withAria:U,withErrorStyles:G,mod:B,inputSize:R,attributes:D,__clearSection:z,__clearable:H,__clearSectionMode:Y,__defaultRightSection:N,loading:W,loadingPosition:V,rootRef:I,...Q}=n,{styleProps:ie,rest:re}=Fu(Q),Z=x.use(Hu),le={offsetBottom:Z==null?void 0:Z.offsetBottom,offsetTop:Z==null?void 0:Z.offsetTop},ee=Ze({name:["Input",u],props:f||n,classes:ja,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:D,stylesCtx:le,rootSelector:"wrapper",vars:M,varsResolver:NI}),se=U?{required:l,disabled:g,"aria-invalid":p?!0:void 0,"aria-describedby":Z==null?void 0:Z.describedBy,id:(Z==null?void 0:Z.inputId)||L}:{},ke=W?v.jsx(Zt,{size:V==="left"?"calc(var(--input-left-section-size) / 2)":"calc(var(--input-right-section-size) / 2)"}):null,te=W&&V==="left"?ke:b,$e=Ree({__clearable:H,__clearSection:z,rightSection:W&&V==="right"?ke:_,__defaultRightSection:N,size:h,__clearSectionMode:Y});return v.jsx(TI,{value:{size:h||"sm"},children:v.jsxs(fe,{ref:I,...ee("wrapper"),...ie,...d,mod:[{error:!!p&&G,pointer:$,disabled:g,multiline:q,"data-with-right-section":!!$e,"data-with-left-section":!!te},B],variant:O,size:h,children:[te&&v.jsx("div",{...w,"data-position":"left",...ee("section",{className:w==null?void 0:w.className,style:w==null?void 0:w.style}),children:te}),v.jsx(fe,{component:"input",...re,...se,required:l,mod:{disabled:g,error:!!p&&G},variant:O,__size:R,...ee("input")}),$e&&v.jsx("div",{...S,"data-position":"right",...ee("section",{className:S==null?void 0:S.className,style:S==null?void 0:S.style}),children:$e})]})})});Xt.classes=ja;Xt.varsResolver=NI;Xt.Wrapper=zy;Xt.Label=dp;Xt.Error=fp;Xt.Description=cp;Xt.Placeholder=_C;Xt.ClearButton=EI;Xt.displayName="@mantine/core/Input";function $I(e,n,t){const i=ye(e,n,t),{label:r,description:a,error:o,required:l,classNames:u,styles:f,className:h,unstyled:d,__staticSelector:p,__stylesApiProps:g,errorProps:b,labelProps:w,descriptionProps:k,wrapperProps:_,id:S,size:j,style:T,inputContainer:A,inputWrapperOrder:O,withAsterisk:M,variant:$,vars:q,mod:P,attributes:L,...U}=i,{styleProps:G,rest:B}=Fu(U),R={label:r,description:a,error:o,required:l,classNames:u,className:h,__staticSelector:p,__stylesApiProps:g||i,errorProps:b,labelProps:w,descriptionProps:k,unstyled:d,styles:f,size:j,style:T,inputContainer:A,inputWrapperOrder:O,withAsterisk:M,variant:$,id:S,mod:P,attributes:L,..._};return{...B,classNames:u,styles:f,unstyled:d,wrapperProps:{...R,...G},inputProps:{required:l,classNames:u,styles:f,unstyled:d,size:j,__staticSelector:p,__stylesApiProps:g||i,error:o,variant:$,id:S,attributes:L}}}const Lee={__staticSelector:"InputBase",withAria:!0,size:"sm"},Ni=ki(e=>{const{inputProps:n,wrapperProps:t,...i}=$I("InputBase",Lee,e);return v.jsx(Xt.Wrapper,{...t,children:v.jsx(Xt,{...n,...i})})});Ni.classes={...Xt.classes,...Xt.Wrapper.classes};Ni.displayName="@mantine/core/InputBase";function e1({style:e,size:n=16,...t}){return v.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:ve(n),height:ve(n),display:"block"},...t,children:v.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"})})}e1.displayName="@mantine/core/AccordionChevron";var zI={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:qt(n),"--alert-bg":t||i?a.background:void 0,"--alert-color":a.color,"--alert-bd":t||i?a.border:void 0}}},kl=Pe(e=>{const n=ye("Alert",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,radius:u,color:f,title:h,children:d,id:p,icon:g,withCloseButton:b,onClose:w,closeButtonLabel:k,variant:_,autoContrast:S,role:j,attributes:T,...A}=n,O=Ze({name:"Alert",classes:zI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:T,vars:l,varsResolver:LI}),M=Pi(p),$=h&&`${M}-title`||void 0,q=`${M}-body`;return v.jsx(fe,{id:M,...O("root",{variant:_}),variant:_,...A,role:j||"alert","aria-describedby":d?q:void 0,"aria-labelledby":h?$:void 0,children:v.jsxs("div",{...O("wrapper"),children:[g&&v.jsx("div",{...O("icon"),children:g}),v.jsxs("div",{...O("body"),children:[h&&v.jsx("div",{...O("title"),"data-with-close-button":b||void 0,children:v.jsx("span",{id:$,...O("label"),children:h})}),d&&v.jsx("div",{id:q,...O("message"),"data-variant":_,children:d})]}),b&&v.jsx(jl,{...O("closeButton"),onClick:w,variant:"transparent",size:16,iconSize:16,"aria-label":k,unstyled:o})]})})});kl.classes=zI;kl.varsResolver=LI;kl.displayName="@mantine/core/Alert";var II={root:"m_b6d8b162"};function Iee(e){if(e==="start")return"start";if(e==="end"||e)return"end"}const Bee={inherit:!1},BI=(e,{variant:n,lineClamp:t,gradient:i,size:r})=>({root:{"--text-fz":ai(r),"--text-lh":rX(r),"--text-gradient":n==="gradient"?OS(i,e):void 0,"--text-line-clamp":typeof t=="number"?t.toString():void 0}}),de=ki(e=>{const n=ye("Text",Bee,e),{lineClamp:t,truncate:i,inline:r,inherit:a,gradient:o,span:l,__staticSelector:u,vars:f,className:h,style:d,classNames:p,styles:g,unstyled:b,variant:w,mod:k,size:_,attributes:S,...j}=n;return v.jsx(fe,{...Ze({name:["Text",u],props:n,classes:II,className:h,style:d,classNames:p,styles:g,unstyled:b,attributes:S,vars:f,varsResolver:BI})("root",{focusable:!0}),component:l?"span":"p",variant:w,mod:[{"data-truncate":Iee(i),"data-line-clamp":typeof t=="number","data-inline":r,"data-inherit":a},k],size:_,...j})});de.classes=II;de.varsResolver=BI;de.displayName="@mantine/core/Text";var FI={root:"m_849cf0da"};const Fee={underline:"hover"},ho=ki(e=>{const{underline:n,className:t,unstyled:i,mod:r,...a}=ye("Anchor",Fee,e);return v.jsx(de,{component:"a",className:vn({[FI.root]:!i},t),...a,mod:[{underline:n},r],__staticSelector:"Anchor",unstyled:i})});ho.classes=FI;ho.displayName="@mantine/core/Anchor";const[qee,Uf]=Ar("AppShell was not found in tree");var Al={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};const xC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:u,mod:f,...h}=ye("AppShellAside",null,e),d=Uf();return d.disabled?null:v.jsx(fe,{component:"aside",mod:[{"with-border":l??d.withBorder},f],...d.getStyles("aside",{className:vn({[Tu.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-aside-z-index":`calc(${u??d.zIndex} + 1)`}})});xC.classes=Al;xC.displayName="@mantine/core/AppShellAside";const SC=Pe(e=>{var p;const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:u,mod:f,...h}=ye("AppShellFooter",null,e),d=Uf();return d.disabled?null:v.jsx(fe,{component:"footer",mod:[{"with-border":l??d.withBorder},f],...d.getStyles("footer",{className:vn({[Tu.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-footer-z-index":(p=u??d.zIndex)==null?void 0:p.toString()}})});SC.classes=Al;SC.displayName="@mantine/core/AppShellFooter";const CC=Pe(e=>{var p;const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:u,mod:f,...h}=ye("AppShellHeader",null,e),d=Uf();return d.disabled?null:v.jsx(fe,{component:"header",mod:[{"with-border":l??d.withBorder},f],...d.getStyles("header",{className:vn({[Tu.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-header-z-index":(p=u??d.zIndex)==null?void 0:p.toString()}})});CC.classes=Al;CC.displayName="@mantine/core/AppShellHeader";const jC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("AppShellMain",null,e);return v.jsx(fe,{component:"main",...Uf().getStyles("main",{className:t,style:i,classNames:n,styles:r}),...o})});jC.classes=Al;jC.displayName="@mantine/core/AppShellMain";const AC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:u,mod:f,...h}=ye("AppShellNavbar",null,e),d=Uf();return d.disabled?null:v.jsx(fe,{component:"nav",mod:[{"with-border":l??d.withBorder},f],...d.getStyles("navbar",{className:t,classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-navbar-z-index":`calc(${u??d.zIndex} + 1)`}})});AC.classes=Al;AC.displayName="@mantine/core/AppShellNavbar";const OC=ki(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,grow:o,mod:l,...u}=ye("AppShellSection",null,e),f=Uf();return v.jsx(fe,{mod:[{grow:o},l],...f.getStyles("section",{className:t,style:i,classNames:n,styles:r}),...u})});OC.classes=Al;OC.displayName="@mantine/core/AppShellSection";function hp(e){return typeof e=="object"?e.base:e}function mp(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 pp(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function Hee({baseStyles:e,minMediaStyles:n,maxMediaStyles:t,aside:i,theme:r,mode:a}){var f,h,d;const o=i==null?void 0:i.width,l="translateX(var(--app-shell-aside-width))",u="translateX(calc(var(--app-shell-aside-width) * -1))";if(i!=null&&i.breakpoint&&!((f=i==null?void 0:i.collapsed)!=null&&f.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")),mp(o)){const p=ve(hp(o));e["--app-shell-aside-width"]=p,e["--app-shell-aside-offset"]=p}if(pp(o)&&(typeof o.base<"u"&&(e["--app-shell-aside-width"]=ve(o.base),e["--app-shell-aside-offset"]=ve(o.base)),$t(o).forEach(p=>{p!=="base"&&(n[p]=n[p]||{},n[p]["--app-shell-aside-width"]=ve(o[p]),n[p]["--app-shell-aside-offset"]=ve(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"]=u,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=J6(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"]=u,t[p]["--app-shell-aside-scroll-locked-visibility"]="hidden"}}function Uee({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"),mp(r)){const l=ve(hp(r));e["--app-shell-footer-height"]=l,o&&(e["--app-shell-footer-offset"]=l)}pp(r)&&(typeof r.base<"u"&&(e["--app-shell-footer-height"]=ve(r.base),o&&(e["--app-shell-footer-offset"]=ve(r.base))),$t(r).forEach(l=>{l!=="base"&&(n[l]=n[l]||{},n[l]["--app-shell-footer-height"]=ve(r[l]),o&&(n[l]["--app-shell-footer-offset"]=ve(r[l])))})),t!=null&&t.collapsed&&(e["--app-shell-footer-transform"]=a,i==="fixed"&&(e["--app-shell-footer-offset"]="0px !important"))}function Vee({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"),mp(r)){const l=ve(hp(r));e["--app-shell-header-height"]=l,o&&(e["--app-shell-header-offset"]=l)}pp(r)&&(typeof r.base<"u"&&(e["--app-shell-header-height"]=ve(r.base),o&&(e["--app-shell-header-offset"]=ve(r.base))),$t(r).forEach(l=>{l!=="base"&&(n[l]=n[l]||{},n[l]["--app-shell-header-height"]=ve(r[l]),o&&(n[l]["--app-shell-header-offset"]=ve(r[l])))})),t!=null&&t.collapsed&&(e["--app-shell-header-transform"]=a,i==="fixed"&&(e["--app-shell-header-offset"]="0px !important"))}function Wee({baseStyles:e,minMediaStyles:n,maxMediaStyles:t,navbar:i,theme:r,mode:a}){var f,h,d;const o=i==null?void 0:i.width,l="translateX(calc(var(--app-shell-navbar-width) * -1))",u="translateX(var(--app-shell-navbar-width))";if(i!=null&&i.breakpoint&&!((f=i==null?void 0:i.collapsed)!=null&&f.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")),mp(o)){const p=ve(hp(o));e["--app-shell-navbar-width"]=p,e["--app-shell-navbar-offset"]=p,a==="static"&&(e["--app-shell-navbar-grid-width"]=p)}if(pp(o)&&(typeof o.base<"u"&&(e["--app-shell-navbar-width"]=ve(o.base),e["--app-shell-navbar-offset"]=ve(o.base),a==="static"&&(e["--app-shell-navbar-grid-width"]=ve(o.base))),$t(o).forEach(p=>{p!=="base"&&(n[p]=n[p]||{},n[p]["--app-shell-navbar-width"]=ve(o[p]),n[p]["--app-shell-navbar-offset"]=ve(o[p]),a==="static"&&(n[p]["--app-shell-navbar-grid-width"]=ve(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"]=u,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=J6(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"]=u}}function $k(e){return Number(e)===0?"0px":Yt(e)}function Gee({padding:e,baseStyles:n,minMediaStyles:t}){mp(e)&&(n["--app-shell-padding"]=$k(hp(e))),pp(e)&&(e.base&&(n["--app-shell-padding"]=$k(e.base)),$t(e).forEach(i=>{i!=="base"&&(t[i]=t[i]||{},t[i]["--app-shell-padding"]=$k(e[i]))}))}function Yee({navbar:e,header:n,footer:t,aside:i,padding:r,theme:a,mode:o}){const l={},u={},f={};o==="static"&&(f["--app-shell-main-grid-column"]="1 / -1",f["--app-shell-main-grid-row"]="2"),Wee({baseStyles:f,minMediaStyles:l,maxMediaStyles:u,navbar:e,theme:a,mode:o}),Hee({baseStyles:f,minMediaStyles:l,maxMediaStyles:u,aside:i,theme:a,mode:o}),Vee({baseStyles:f,minMediaStyles:l,header:n,mode:o}),Uee({baseStyles:f,minMediaStyles:l,footer:t,mode:o}),Gee({baseStyles:f,minMediaStyles:l,padding:r});const h=um($t(l),a.breakpoints).map(p=>({query:`(min-width: ${Vg(p.px)})`,styles:l[p.value]})),d=um($t(u),a.breakpoints).map(p=>({query:`(max-width: ${Vg(p.px)})`,styles:u[p.value]}));return{baseStyles:f,media:[...h,...d]}}function Kee({navbar:e,header:n,aside:t,footer:i,padding:r,mode:a,selector:o}){const l=ci(),u=wo(),{media:f,baseStyles:h}=Yee({navbar:e,header:n,footer:i,aside:t,padding:r,theme:l,mode:a});return v.jsx(Bf,{media:f,styles:h,selector:o||u.cssVariablesSelector})}function Xee({transitionDuration:e,disabled:n}){const[t,i]=x.useState(!0),r=x.useRef(-1),a=x.useRef(-1);return Hz("resize",()=>{i(!0),clearTimeout(r.current),r.current=window.setTimeout(()=>x.startTransition(()=>{i(!1)}),200)}),ps(()=>{i(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>x.startTransition(()=>{i(!1)}),e||0)},[n,e]),t}const Zee={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:xa("app"),mode:"fixed"},qI=(e,{transitionDuration:n,transitionTimingFunction:t})=>({root:{"--app-shell-transition-duration":`${n}ms`,"--app-shell-transition-timing-function":t}}),xr=Pe(e=>{const n=ye("AppShell",Zee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,navbar:u,withBorder:f,padding:h,transitionDuration:d,transitionTimingFunction:p,header:g,zIndex:b,layout:w,disabled:k,aside:_,footer:S,offsetScrollbars:j=!0,mode:T,mod:A,attributes:O,id:M,...$}=n,q=Ze({name:"AppShell",classes:Al,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:O,vars:l,varsResolver:qI}),P=Xee({disabled:k,transitionDuration:d}),L=Pi(M);return v.jsxs(qee,{value:{getStyles:q,withBorder:f,zIndex:b,disabled:k,offsetScrollbars:j,mode:T},children:[v.jsx(Kee,{navbar:u,header:g,aside:_,footer:S,padding:h,mode:T,selector:T==="static"?`#${L}`:void 0}),v.jsx(fe,{...q("root"),id:L,mod:[{resizing:P,layout:w,disabled:k,mode:T},A],...$})]})});xr.classes=Al;xr.varsResolver=qI;xr.displayName="@mantine/core/AppShell";xr.Navbar=AC;xr.Header=CC;xr.Main=jC;xr.Aside=xC;xr.Footer=SC;xr.Section=OC;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 Ly(e){return e?e.map(n=>HI(n)):[]}function vp(e){return e.reduce((n,t)=>"group"in t?{...n,...vp(t.items)}:(n[`${t.value}`]=t,n),{})}var lr={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 Qee={error:null},UI=(e,{size:n,color:t})=>({chevron:{"--combobox-chevron-size":Ln(n,"combobox-chevron-size"),"--combobox-chevron-color":t?ft(t,e):void 0}}),Iy=Pe(e=>{const n=ye("ComboboxChevron",Qee,e),{size:t,error:i,style:r,className:a,classNames:o,styles:l,unstyled:u,vars:f,attributes:h,mod:d,...p}=n,g=Ze({name:"ComboboxChevron",classes:lr,props:n,style:r,className:a,classNames:o,styles:l,unstyled:u,vars:f,varsResolver:UI,attributes:h,rootSelector:"chevron"});return v.jsx(fe,{component:"svg",...p,...g("chevron"),size:t,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:i},d],children:v.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"})})});Iy.classes=lr;Iy.varsResolver=UI;Iy.displayName="@mantine/core/ComboboxChevron";const[Jee,Aa]=Ar("Combobox component was not found in tree");function VI({onMouseDown:e,onClick:n,onClear:t,...i}){return v.jsx(Xt.ClearButton,{tabIndex:-1,"aria-hidden":!0,...i,onMouseDown:r=>{r.preventDefault(),e==null||e(r)},onClick:r=>{t(),n==null||n(r)}})}VI.displayName="@mantine/core/ComboboxClearButton";const TC=Pe(e=>{const{classNames:n,styles:t,className:i,style:r,hidden:a,...o}=ye("ComboboxDropdown",null,e),l=Aa();return v.jsx(Sn.Dropdown,{...o,role:"presentation","data-hidden":a||void 0,...l.getStyles("dropdown",{className:i,style:r,classNames:n,styles:t})})});TC.classes=lr;TC.displayName="@mantine/core/ComboboxDropdown";const ene={refProp:"ref"},WI=Pe(e=>{const{children:n,refProp:t,ref:i}=ye("ComboboxDropdownTarget",ene,e);if(Aa(),!X6(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 v.jsx(Sn.Target,{ref:i,refProp:t,children:n})});WI.displayName="@mantine/core/ComboboxDropdownTarget";const EC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ComboboxEmpty",null,e);return v.jsx(fe,{...Aa().getStyles("empty",{className:t,classNames:n,styles:r,style:i}),...o})});EC.classes=lr;EC.displayName="@mantine/core/ComboboxEmpty";function MC({onKeyDown:e,onClick:n,withKeyboardNavigation:t,withAriaAttributes:i,withExpandedAttribute:r,targetType:a,autoComplete:o}){const l=Aa(),[u,f]=x.useState(null),h=g=>{if(e==null||e(g),!l.readOnly&&t){if(g.nativeEvent.isComposing)return;if(g.nativeEvent.code==="ArrowDown"&&(g.preventDefault(),l.store.dropdownOpened?f(l.store.selectNextOption()):(l.store.openDropdown("keyboard"),f(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),g.nativeEvent.code==="ArrowUp"&&(g.preventDefault(),l.store.dropdownOpened?f(l.store.selectPreviousOption()):(l.store.openDropdown("keyboard"),f(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),g.nativeEvent.code==="Enter"||g.nativeEvent.code==="NumpadEnter"){if(g.nativeEvent.keyCode===229)return;const b=l.store.getSelectedOptionIndex();l.store.dropdownOpened&&b!==-1?(g.preventDefault(),l.store.clickSelectedOption()):a==="button"&&(g.preventDefault(),l.store.openDropdown("keyboard"))}g.key==="Escape"&&l.store.closeDropdown("keyboard"),g.nativeEvent.code==="Space"&&a==="button"&&(g.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&&u||void 0,autoComplete:o,"data-expanded":l.store.dropdownOpened||void 0,"data-mantine-stop-propagation":l.store.dropdownOpened||void 0}:{},onKeyDown:h,onClick:g=>{a==="button"&&g.currentTarget.focus(),n==null||n(g)}}}const nne={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},GI=Pe(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:u,...f}=ye("ComboboxEventsTarget",nne,e),h=Cl(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=Aa();return x.cloneElement(h,{...MC({targetType:o,withAriaAttributes:r,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:h.props.onKeyDown,onClick:h.props.onClick,autoComplete:l}),...f,[t]:Ht(u,d.store.targetRef,xy(h))})});GI.displayName="@mantine/core/ComboboxEventsTarget";const DC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ComboboxFooter",null,e);return v.jsx(fe,{...Aa().getStyles("footer",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});DC.classes=lr;DC.displayName="@mantine/core/ComboboxFooter";const RC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,children:o,label:l,id:u,...f}=ye("ComboboxGroup",null,e),h=Aa(),d=Pi(u);return v.jsxs(fe,{role:"group","aria-labelledby":l?d:void 0,...h.getStyles("group",{className:t,classNames:n,style:i,styles:r}),...f,children:[l&&v.jsx("div",{id:d,...h.getStyles("groupLabel",{classNames:n,styles:r}),children:l}),o]})});RC.classes=lr;RC.displayName="@mantine/core/ComboboxGroup";const PC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ComboboxHeader",null,e);return v.jsx(fe,{...Aa().getStyles("header",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});PC.classes=lr;PC.displayName="@mantine/core/ComboboxHeader";function YI({value:e,valuesDivider:n=",",...t}){return v.jsx("input",{type:"hidden",value:Array.isArray(e)?e.join(n):e?`${e}`:"",...t})}YI.displayName="@mantine/core/ComboboxHiddenInput";const NC=Pe(e=>{const n=ye("ComboboxOption",null,e),{classNames:t,className:i,style:r,styles:a,vars:o,onClick:l,id:u,active:f,onMouseDown:h,onMouseOver:d,disabled:p,selected:g,mod:b,...w}=n,k=Aa(),_=x.useId(),S=u||_;return v.jsx(fe,{...k.getStyles("option",{className:i,classNames:t,styles:a,style:r}),...w,id:S,mod:["combobox-option",{"combobox-active":f,"combobox-disabled":p,"combobox-selected":g},b],role:"option",onClick:j=>{var T;p?j.preventDefault():((T=k.onOptionSubmit)==null||T.call(k,n.value,n),l==null||l(j))},onMouseDown:j=>{j.preventDefault(),h==null||h(j)},onMouseOver:j=>{k.resetSelectionOnOptionHover&&k.store.resetSelectedOption(),d==null||d(j)}})});NC.classes=lr;NC.displayName="@mantine/core/ComboboxOption";const $C=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,id:a,onMouseDown:o,labelledBy:l,...u}=ye("ComboboxOptions",null,e),f=Aa(),h=Pi(a);return x.useEffect(()=>{f.store.setListId(h)},[h]),v.jsx(fe,{...f.getStyles("options",{className:t,style:i,classNames:n,styles:r}),...u,id:h,role:"listbox","aria-labelledby":l,onMouseDown:d=>{d.preventDefault(),o==null||o(d)}})});$C.classes=lr;$C.displayName="@mantine/core/ComboboxOptions";const tne={withAriaAttributes:!0,withKeyboardNavigation:!0},zC=Pe(e=>{const{classNames:n,styles:t,unstyled:i,vars:r,withAriaAttributes:a,onKeyDown:o,onClick:l,withKeyboardNavigation:u,size:f,ref:h,...d}=ye("ComboboxSearch",tne,e),p=Aa(),g=p.getStyles("search"),b=MC({targetType:"input",withAriaAttributes:a,withKeyboardNavigation:u,withExpandedAttribute:!1,onKeyDown:o,onClick:l,autoComplete:"off"});return v.jsx(Xt,{ref:Ht(h,p.store.searchRef),classNames:[{input:g.className},n],styles:[{input:g.style},t],size:f||p.size,...b,...d,__staticSelector:"Combobox"})});zC.classes=lr;zC.displayName="@mantine/core/ComboboxSearch";const ine={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},KI=Pe(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:u,...f}=ye("ComboboxTarget",ine,e),h=Cl(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=Aa(),p=x.cloneElement(h,{...MC({targetType:o,withAriaAttributes:r,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:h.props.onKeyDown,onClick:h.props.onClick,autoComplete:l}),...f});return v.jsx(Sn.Target,{refProp:t,ref:Ht(u,d.store.targetRef),children:p})});KI.displayName="@mantine/core/ComboboxTarget";function rne(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 ane(e,n,t){for(let i=e+1;i{l||(u(!0),r==null||r(D))},[u,r,l]),_=x.useCallback((D="unknown")=>{l&&(u(!1),i==null||i(D))},[u,i,l]),S=x.useCallback((D="unknown")=>{l?_(D):k(D)},[_,k,l]),j=x.useCallback(()=>{const D=Uo(p.current),z=Eg(`#${f.current} [data-combobox-selected]`,D);z==null||z.removeAttribute("data-combobox-selected"),z==null||z.removeAttribute("aria-selected")},[]),T=x.useCallback(D=>{const z=Uo(p.current),H=Eg(`#${f.current}`,z),Y=H?Go("[data-combobox-option]",H):null;if(!Y)return null;const N=D>=Y.length?0:D<0?Y.length-1:D;return h.current=N,Y!=null&&Y[N]&&!Y[N].hasAttribute("data-combobox-disabled")?(j(),Y[N].setAttribute("data-combobox-selected","true"),Y[N].setAttribute("aria-selected","true"),Y[N].scrollIntoView({block:"nearest",behavior:o}),Y[N].id):null},[o,j]),A=x.useCallback(()=>{const D=Uo(p.current),z=Eg(`#${f.current} [data-combobox-active]`,D);return T(z?Go(`#${f.current} [data-combobox-option]`,D).findIndex(H=>H===z):0)},[T]),O=x.useCallback(()=>{const D=Uo(p.current),z=Go(`#${f.current} [data-combobox-option]`,D);return T(ane(h.current,z,a))},[T,a]),M=x.useCallback(()=>{const D=Uo(p.current),z=Go(`#${f.current} [data-combobox-option]`,D);return T(rne(h.current,z,a))},[T,a]),$=x.useCallback(()=>{const D=Uo(p.current);return T(one(Go(`#${f.current} [data-combobox-option]`,D)))},[T]),q=x.useCallback((D="selected",z)=>{var H;if(typeof D=="number"){h.current=D;const Y=Uo(p.current),N=Go(`#${f.current} [data-combobox-option]`,Y);z!=null&&z.scrollIntoView&&((H=N[D])==null||H.scrollIntoView({block:"nearest",behavior:o}));return}w.current=window.setTimeout(()=>{var V;const Y=Uo(p.current),N=Go(`#${f.current} [data-combobox-option]`,Y),W=N.findIndex(I=>I.hasAttribute(`data-combobox-${D}`));h.current=W,z!=null&&z.scrollIntoView&&((V=N[W])==null||V.scrollIntoView({block:"nearest",behavior:o}))},0)},[]),P=x.useCallback(()=>{h.current=-1,j()},[j]),L=x.useCallback(()=>{var z,H;const D=Uo(p.current);(H=(z=Go(`#${f.current} [data-combobox-option]`,D))==null?void 0:z[h.current])==null||H.click()},[]),U=x.useCallback(D=>{f.current=D},[]),G=x.useCallback(()=>{g.current=window.setTimeout(()=>{var D;return(D=d.current)==null?void 0:D.focus()},0)},[]),B=x.useCallback(()=>{b.current=window.setTimeout(()=>{var D;return(D=p.current)==null?void 0:D.focus()},0)},[]),R=x.useCallback(()=>h.current,[]);return x.useEffect(()=>()=>{window.clearTimeout(g.current),window.clearTimeout(b.current),window.clearTimeout(w.current)},[]),{dropdownOpened:l,openDropdown:k,closeDropdown:_,toggleDropdown:S,selectedOptionIndex:h.current,getSelectedOptionIndex:R,selectOption:T,selectFirstOption:$,selectActiveOption:A,selectNextOption:O,selectPreviousOption:M,resetSelectedOption:P,updateSelectedOptionIndex:q,listId:f.current,setListId:U,clickSelectedOption:L,searchRef:d,focusSearchInput:G,targetRef:p,focusTarget:B}}const sne={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0},size:"sm"},XI=(e,{size:n,dropdownPadding:t})=>({options:{"--combobox-option-fz":ai(n),"--combobox-option-padding":Ln(n,"combobox-option-padding")},dropdown:{"--combobox-padding":t===void 0?void 0:ve(t),"--combobox-option-fz":ai(n),"--combobox-option-padding":Ln(n,"combobox-option-padding")}}),On=e=>{const n=ye("Combobox",sne,e),{classNames:t,styles:i,unstyled:r,children:a,store:o,vars:l,onOptionSubmit:u,onClose:f,size:h,dropdownPadding:d,resetSelectionOnOptionHover:p,__staticSelector:g,readOnly:b,attributes:w,...k}=n,_=Vf(),S=o||_,j=Ze({name:g||"Combobox",classes:lr,props:n,classNames:t,styles:i,unstyled:r,attributes:w,vars:l,varsResolver:XI}),T=()=>{f==null||f(),S.closeDropdown()};return v.jsx(Jee,{value:{getStyles:j,store:S,onOptionSubmit:u,size:h,resetSelectionOnOptionHover:p,readOnly:b},children:v.jsx(Sn,{opened:S.dropdownOpened,preventPositionChangeWhenVisible:!1,...k,onChange:A=>!A&&T(),withRoles:!1,unstyled:r,children:a})})},lne=e=>e;On.extend=lne;On.classes=lr;On.varsResolver=XI;On.displayName="@mantine/core/Combobox";On.Target=KI;On.Dropdown=TC;On.Options=$C;On.Option=NC;On.Search=zC;On.Empty=EC;On.Chevron=Iy;On.Footer=DC;On.Header=PC;On.EventsTarget=GI;On.DropdownTarget=WI;On.Group=RC;On.ClearButton=VI;On.HiddenInput=YI;function une({children:e,role:n}){const t=x.use(Hu);return t?v.jsx("div",{role:n,"aria-labelledby":t.labelId,"aria-describedby":t.describedBy,children:e}):v.jsx(v.Fragment,{children:e})}const LC=x.createContext(null),cne={hiddenInputValuesSeparator:","},IC=sp((e=>{const{value:n,defaultValue:t,onChange:i,size:r,wrapperProps:a,children:o,readOnly:l,name:u,hiddenInputValuesSeparator:f,hiddenInputProps:h,maxSelectedValues:d,disabled:p,...g}=ye("CheckboxGroup",cne,e),[b,w]=Ai({value:n,defaultValue:t,finalValue:[],onChange:i}),k=j=>{const T=typeof j=="string"?j:j.currentTarget.value;if(l)return;const A=b.includes(T);!A&&d&&b.length>=d||w(A?b.filter(O=>O!==T):[...b,T])},_=j=>{if(p)return!0;if(!d)return!1;const T=b.includes(j),A=b.length>=d;return!T&&A},S=b.join(f);return v.jsx(LC,{value:{value:b,onChange:k,size:r,isDisabled:_},children:v.jsxs(Xt.Wrapper,{size:r,...a,...g,labelElement:"div",__staticSelector:"CheckboxGroup",children:[v.jsx(une,{role:"group",children:o}),v.jsx("input",{type:"hidden",name:u,value:S,...h})]})})}));IC.classes=Xt.Wrapper.classes;IC.displayName="@mantine/core/CheckboxGroup";var ZI={card:"m_26775b0a"};const QI=x.createContext(null),fne={withBorder:!0},JI=(e,{radius:n})=>({card:{"--card-radius":qt(n)}}),By=Pe(e=>{const n=ye("CheckboxCard",fne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,checked:u,mod:f,withBorder:h,value:d,onClick:p,defaultChecked:g,onChange:b,attributes:w,...k}=n,_=Ze({name:"CheckboxCard",classes:ZI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:JI,rootSelector:"card"}),S=x.use(LC),[j,T]=Ai({value:typeof u=="boolean"?u:S?S.value.includes(d||""):void 0,defaultValue:g,finalValue:!1,onChange:b});return v.jsx(QI,{value:{checked:j},children:v.jsx(Et,{mod:[{"with-border":h,checked:j},f],..._("card"),...k,role:"checkbox","aria-checked":j,onClick:A=>{p==null||p(A),S==null||S.onChange(d||""),T(!j)}})})});By.displayName="@mantine/core/CheckboxCard";By.classes=ZI;By.varsResolver=JI;function BC({size:e,style:n,...t}){return v.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e!==void 0?{width:ve(e),height:ve(e),...n}:n,"aria-hidden":!0,...t,children:v.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 eB({indeterminate:e,...n}){return e?v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...n,children:v.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):v.jsx(BC,{...n})}var nB={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const dne={icon:eB,variant:"filled",radius:"sm"},tB=(e,{radius:n,color:t,size:i,iconColor:r,variant:a,autoContrast:o})=>{const l=vs({color:t||e.primaryColor,theme:e}),u=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{indicator:{"--checkbox-size":Ln(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:qt(n),"--checkbox-color":a==="outline"?u:ft(t,e),"--checkbox-icon-color":r?ft(r,e):ap(o,e)?If({color:t,theme:e,autoContrast:o}):void 0}}},Fy=Pe(e=>{const n=ye("CheckboxIndicator",dne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,icon:u,indeterminate:f,radius:h,color:d,iconColor:p,autoContrast:g,checked:b,mod:w,variant:k,disabled:_,attributes:S,...j}=n,T=Ze({name:"CheckboxIndicator",classes:nB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:tB,rootSelector:"indicator"}),A=x.use(QI),O=typeof b=="boolean"||typeof f=="boolean"?b||f:(A==null?void 0:A.checked)||!1;return v.jsx(fe,{...T("indicator",{variant:k}),variant:k,mod:[{checked:O,disabled:_},w],...j,children:v.jsx(u,{indeterminate:f,...T("icon")})})});Fy.displayName="@mantine/core/CheckboxIndicator";Fy.classes=nB;Fy.varsResolver=tB;var iB={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const hne=iB;function rB({__staticSelector:e,__stylesApiProps:n,className:t,classNames:i,styles:r,unstyled:a,children:o,label:l,description:u,id:f,disabled:h,error:d,size:p,labelPosition:g="left",bodyElement:b="div",labelElement:w="label",variant:k,style:_,vars:S,mod:j,attributes:T,...A}){const O=Ze({name:e,props:n,className:t,style:_,classes:iB,classNames:i,styles:r,unstyled:a,attributes:T});return v.jsx(fe,{...O("root"),__vars:{"--label-fz":ai(p),"--label-lh":Ln(p,"label-lh")},mod:[{"label-position":g},j],variant:k,size:p,...A,children:v.jsxs(fe,{component:b,htmlFor:b==="label"?f:void 0,...O("body"),children:[o,v.jsxs("div",{...O("labelWrapper"),"data-disabled":h||void 0,children:[l&&v.jsx(fe,{component:w,htmlFor:w==="label"?f:void 0,...O("label"),"data-disabled":h||void 0,children:l}),u&&v.jsx(Xt.Description,{size:p,__inheritStyles:!1,...O("description"),children:u}),d&&typeof d!="boolean"&&v.jsx(Xt.Error,{size:p,__inheritStyles:!1,...O("error"),children:d})]})]})})}rB.displayName="@mantine/core/InlineInput";var aB={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const mne={labelPosition:"right",icon:eB,withErrorStyles:!0,variant:"filled",radius:"sm"},oB=(e,{radius:n,color:t,size:i,iconColor:r,variant:a,autoContrast:o})=>{const l=vs({color:t||e.primaryColor,theme:e}),u=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{root:{"--checkbox-size":Ln(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:qt(n),"--checkbox-color":a==="outline"?u:ft(t,e),"--checkbox-icon-color":r?ft(r,e):ap(o,e)?If({color:t,theme:e,autoContrast:o}):void 0}}},Gr=Pe(e=>{var Z;const n=ye("Checkbox",mne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:u,label:f,id:h,size:d,radius:p,wrapperProps:g,checked:b,labelPosition:w,description:k,error:_,disabled:S,variant:j,indeterminate:T,icon:A,rootRef:O,iconColor:M,onChange:$,autoContrast:q,mod:P,attributes:L,readOnly:U,onClick:G,withErrorStyles:B,ref:R,...D}=n,z=x.useRef(null),H=x.use(LC),Y=d||(H==null?void 0:H.size),N=Ze({name:"Checkbox",props:n,classes:aB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:L,vars:l,varsResolver:oB}),{styleProps:W,rest:V}=Fu(D),I=Pi(h),Q={checked:(H==null?void 0:H.value.includes(V.value))??b,onChange:le=>{H==null||H.onChange(le),$==null||$(le)}},ie=((Z=H==null?void 0:H.isDisabled)==null?void 0:Z.call(H,V.value))??!1,re=S||ie;return x.useEffect(()=>{z.current&&(z.current.indeterminate=T||!1,T?z.current.setAttribute("data-indeterminate","true"):z.current.removeAttribute("data-indeterminate"))},[T]),v.jsx(rB,{...N("root"),__staticSelector:"Checkbox",__stylesApiProps:n,id:I,size:Y,labelPosition:w,label:f,description:k,error:_,disabled:re,classNames:t,styles:a,unstyled:o,"data-checked":Q.checked||b||void 0,variant:j,ref:O,mod:P,attributes:L,inert:V.inert,...W,...g,children:v.jsxs(fe,{...N("inner"),mod:{"data-label-position":w},children:[v.jsx(fe,{component:"input",id:I,ref:Ht(z,R),mod:{error:!!_},...N("input",{focusable:!0,variant:j}),...V,...Q,disabled:re,inert:V.inert,type:"checkbox",onClick:le=>{U&&le.preventDefault(),G==null||G(le)}}),v.jsx(A,{indeterminate:T,...N("icon")})]})})});Gr.classes={...aB,...hne};Gr.varsResolver=oB;Gr.displayName="@mantine/core/Checkbox";Gr.Group=IC;Gr.Indicator=Fy;Gr.Card=By;function Eu(e){return"group"in e}function sB({options:e,search:n,limit:t}){const i=n.trim().toLowerCase(),r=[];for(let a=0;a0)return!1;return!0}function lB(e,n=new Set){if(Array.isArray(e))for(const t of e)if(Eu(t))lB(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 vne(e,n){return Array.isArray(e)?e.includes(n):e===n}function uB({data:e,withCheckIcon:n,withAlignedLabels:t,value:i,checkIconPosition:r,unstyled:a,renderOption:o}){if(!Eu(e)){const u=vne(i,e.value),f=n&&(u?v.jsx(BC,{className:lr.optionsDropdownCheckIcon}):t?v.jsx("div",{className:lr.optionsDropdownCheckPlaceholder}):null),h=v.jsxs(v.Fragment,{children:[r==="left"&&f,v.jsx("span",{children:e.label}),r==="right"&&f]});return v.jsx(On.Option,{value:e.value,disabled:e.disabled,className:vn({[lr.optionsDropdownOption]:!a}),"data-reverse":r==="right"||void 0,"data-checked":u||void 0,"aria-selected":u,active:u,children:typeof o=="function"?o({option:e,checked:u}):h})}const l=e.items.map(u=>v.jsx(uB,{data:u,value:i,unstyled:a,withCheckIcon:n,withAlignedLabels:t,checkIconPosition:r,renderOption:o},`${u.value}`));return v.jsx(On.Group,{label:e.group,children:l})}function qy({data:e,hidden:n,hiddenWhenEmpty:t,filter:i,search:r,limit:a,maxDropdownHeight:o,withScrollArea:l=!0,filterOptions:u=!0,withCheckIcon:f=!1,withAlignedLabels:h=!1,value:d,checkIconPosition:p,nothingFoundMessage:g,unstyled:b,labelId:w,renderOption:k,scrollAreaProps:_,"aria-label":S}){lB(e);const j=typeof r=="string"?(i||sB)({options:e,search:u?r:"",limit:a??1/0}):e,T=pne(j),A=j.map(O=>v.jsx(uB,{data:O,withCheckIcon:f,withAlignedLabels:h,value:d,checkIconPosition:p,unstyled:b,renderOption:k},Eu(O)?O.group:`${O.value}`));return v.jsx(On.Dropdown,{hidden:n||t&&T,"data-composed":!0,children:v.jsxs(On.Options,{labelledBy:w,"aria-label":S,children:[l?v.jsx(ur.Autosize,{mah:o??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",..._,children:A}):A,T&&g&&v.jsx(On.Empty,{children:g})]})})}const Hy=Pe(e=>{const n=ye("Autocomplete",{size:"sm"},e),{classNames:t,styles:i,unstyled:r,vars:a,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:u,onDropdownOpen:f,onFocus:h,onBlur:d,onClick:p,onChange:g,data:b,value:w,defaultValue:k,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:S,onOptionSubmit:j,comboboxProps:T,readOnly:A,disabled:O,filter:M,limit:$,withScrollArea:q,maxDropdownHeight:P,size:L,id:U,renderOption:G,autoComplete:B,scrollAreaProps:R,onClear:D,clearButtonProps:z,error:H,clearable:Y,clearSectionMode:N,rightSection:W,autoSelectOnBlur:V,openOnFocus:I=!0,attributes:Q,...ie}=n,re=Pi(U),Z=Ly(b),le=vp(Z),[ee,se]=Ai({value:w,defaultValue:k,finalValue:"",onChange:g}),ke=Vf({opened:o,defaultOpened:l,onDropdownOpen:()=>{f==null||f(),S&&ke.selectFirstOption()},onDropdownClose:()=>{u==null||u(),setTimeout(ke.resetSelectedOption,0)}}),te=ze=>{se(ze),ke.resetSelectedOption()},{resolvedClassNames:$e,resolvedStyles:xe}=Wi({props:n,styles:i,classNames:t});x.useEffect(()=>{_&&ke.selectFirstOption()},[_,ee]);const Ae=v.jsx(On.ClearButton,{...z,onClear:()=>{te(""),D==null||D()}});return v.jsxs(On,{store:ke,__staticSelector:"Autocomplete",classNames:$e,styles:xe,unstyled:r,readOnly:A,size:L,attributes:Q,keepMounted:V,onOptionSubmit:ze=>{j==null||j(ze),te(le[ze].label),ke.closeDropdown()},...T,children:[v.jsx(On.Target,{autoComplete:B,withExpandedAttribute:!0,children:v.jsx(Ni,{...ie,size:L,__staticSelector:"Autocomplete",__clearSection:Ae,__clearable:Y&&!!ee&&!O&&!A,__clearSectionMode:N,rightSection:W,disabled:O,readOnly:A,value:ee,error:H,onChange:ze=>{te(ze.currentTarget.value),ke.openDropdown(),_&&ke.selectFirstOption()},onFocus:ze=>{I&&ke.openDropdown(),h==null||h(ze)},onBlur:ze=>{V&&ke.clickSelectedOption(),ke.closeDropdown(),d==null||d(ze)},onClick:ze=>{ke.openDropdown(),p==null||p(ze)},classNames:$e,styles:xe,unstyled:r,attributes:Q,id:re})}),v.jsx(qy,{data:Z,hidden:A||O,filter:M,search:ee,limit:$,hiddenWhenEmpty:!0,withScrollArea:q,maxDropdownHeight:P,unstyled:r,labelId:ie.label?`${re}-label`:void 0,"aria-label":ie.label?void 0:ie["aria-label"],renderOption:G,scrollAreaProps:R})]})});Hy.classes={...Ni.classes,...On.classes};Hy.displayName="@mantine/core/Autocomplete";var Uy={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};const cB=x.createContext({withinGroup:!1}),fB=(e,{spacing:n})=>({group:{"--ag-spacing":Yt(n)}}),Vy=Pe(e=>{const n=ye("AvatarGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,spacing:u,attributes:f,...h}=n;return v.jsx(cB,{value:{withinGroup:!0},children:v.jsx(fe,{...Ze({name:"AvatarGroup",classes:Uy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f,vars:l,varsResolver:fB,rootSelector:"group"})("group"),...h})})});Vy.classes=Uy;Vy.varsResolver=fB;Vy.displayName="@mantine/core/AvatarGroup";function gne(e){return v.jsx("svg",{...e,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:v.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 yne(e){let n=0;for(let t=0;ti[0]).slice(0,n).join("").toUpperCase()}const dB=(e,{size:n,radius:t,variant:i,gradient:r,color:a,autoContrast:o,name:l,allowedInitialsColors:u})=>{const f=a==="initials"&&typeof l=="string"?wne(l,u):a,h=e.variantColorResolver({color:f||"gray",theme:e,gradient:r,variant:i||"light",autoContrast:o});return{root:{"--avatar-size":Ln(n,"avatar-size"),"--avatar-radius":t===void 0?void 0:qt(t),"--avatar-bg":f||i?h.background:void 0,"--avatar-color":f||i?h.color:void 0,"--avatar-bd":f||i?h.border:void 0}}},mo=ki(e=>{const n=ye("Avatar",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,src:u,alt:f,radius:h,color:d,gradient:p,imageProps:g,children:b,autoContrast:w,mod:k,name:_,allowedInitialsColors:S,attributes:j,...T}=n,A=x.use(cB),[O,M]=x.useState(!u),$=Ze({name:"Avatar",props:n,classes:Uy,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:j,vars:l,varsResolver:dB});return x.useEffect(()=>M(!u),[u]),v.jsx(fe,{...$("root"),mod:[{"within-group":A.withinGroup},k],...T,children:O||!u?v.jsx("span",{...$("placeholder"),title:f,children:b||typeof _=="string"&&kne(_)||v.jsx(gne,{})}):v.jsx("img",{...g,...$("image"),src:u,alt:f,onError:q=>{var P;M(!0),(P=g==null?void 0:g.onError)==null||P.call(g,q)}})})});mo.classes=Uy;mo.varsResolver=dB;mo.displayName="@mantine/core/Avatar";mo.Group=Vy;var hB={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const mB=(e,{radius:n,color:t,gradient:i,variant:r,size:a,autoContrast:o,circle:l})=>{const u=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:o});return{root:{"--badge-height":Ln(a,"badge-height"),"--badge-padding-x":Ln(a,"badge-padding-x"),"--badge-fz":Ln(a,"badge-fz"),"--badge-radius":l||n===void 0?void 0:qt(n),"--badge-bg":t||r?u.background:void 0,"--badge-color":t||r?u.color:void 0,"--badge-bd":t||r?u.border:void 0,"--badge-dot-color":r==="dot"?ft(t,e):void 0}}},Gn=ki(e=>{const n=ye("Badge",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,radius:u,color:f,gradient:h,leftSection:d,rightSection:p,children:g,variant:b,fullWidth:w,autoContrast:k,circle:_,mod:S,attributes:j,...T}=n,A=Ze({name:"Badge",props:n,classes:hB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:j,vars:l,varsResolver:mB});return v.jsxs(fe,{variant:b,mod:[{block:w,circle:_,"with-right-section":!!p,"with-left-section":!!d},S],...A("root",{variant:b}),...T,children:[d&&v.jsx("span",{...A("section"),"data-position":"left",children:d}),v.jsx("span",{...A("label"),children:g}),p&&v.jsx("span",{...A("section"),"data-position":"right",children:p})]})});Gn.classes=hB;Gn.varsResolver=mB;Gn.displayName="@mantine/core/Badge";var Wf={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const AE={orientation:"horizontal"},pB=(e,{borderWidth:n})=>({group:{"--button-border-width":ve(n)}}),Wy=Pe(e=>{const n=ye("ButtonGroup",AE,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:u,borderWidth:f,mod:h,attributes:d,...p}=ye("ButtonGroup",AE,e);return v.jsx(fe,{...Ze({name:"ButtonGroup",props:n,classes:Wf,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:u,varsResolver:pB,rootSelector:"group"})("group"),mod:[{"data-orientation":l},h],role:"group",...p})});Wy.classes=Wf;Wy.varsResolver=pB;Wy.displayName="@mantine/core/ButtonGroup";const vB=(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":Ln(o,"section-height"),"--section-padding-x":Ln(o,"section-padding-x"),"--section-fz":o!=null&&o.includes("compact")?ai(o.replace("compact-","")):ai(o),"--section-radius":n===void 0?void 0:qt(n),"--section-bg":t||r?l.background:void 0,"--section-color":l.color,"--section-bd":t||r?l.border:void 0}}},Gy=Pe(e=>{const n=ye("ButtonGroupSection",null,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,vars:l,gradient:u,radius:f,autoContrast:h,attributes:d,...p}=n;return v.jsx(fe,{...Ze({name:"ButtonGroupSection",props:n,classes:Wf,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:l,varsResolver:vB,rootSelector:"groupSection"})("groupSection"),...p})});Gy.classes=Wf;Gy.varsResolver=vB;Gy.displayName="@mantine/core/ButtonGroupSection";const _ne={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${ve(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},gB=(e,{radius:n,color:t,gradient:i,variant:r,size:a,justify:o,autoContrast:l})=>{const u=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:l});return{root:{"--button-justify":o,"--button-height":Ln(a,"button-height"),"--button-padding-x":Ln(a,"button-padding-x"),"--button-fz":a!=null&&a.includes("compact")?ai(a.replace("compact-","")):ai(a),"--button-radius":n===void 0?void 0:qt(n),"--button-bg":t||r?u.background:void 0,"--button-hover":t||r?u.hover:void 0,"--button-color":u.color,"--button-bd":t||r?u.border:void 0,"--button-hover-color":t||r?u.hoverColor:void 0}}},Yn=ki(e=>{const n=ye("Button",null,e),{style:t,vars:i,className:r,color:a,disabled:o,children:l,leftSection:u,rightSection:f,fullWidth:h,variant:d,radius:p,loading:g,loaderProps:b,gradient:w,classNames:k,styles:_,unstyled:S,"data-disabled":j,autoContrast:T,mod:A,attributes:O,...M}=n,$=Ze({name:"Button",props:n,classes:Wf,className:r,style:t,classNames:k,styles:_,unstyled:S,attributes:O,vars:i,varsResolver:gB}),q=!!u,P=!!f;return v.jsxs(Et,{...$("root",{active:!o&&!g&&!j}),unstyled:S,variant:d,disabled:o||g,mod:[{disabled:o||j,loading:g,block:h,"with-left-section":q,"with-right-section":P},A],...M,children:[typeof g=="boolean"&&v.jsx(ls,{mounted:g,transition:_ne,duration:150,children:L=>v.jsx(fe,{component:"span",...$("loader",{style:L}),"aria-hidden":!0,children:v.jsx(Zt,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...b})})}),v.jsxs("span",{...$("inner"),children:[u&&v.jsx(fe,{component:"span",...$("section"),mod:{position:"left"},children:u}),v.jsx(fe,{component:"span",mod:{loading:g},...$("label"),children:l}),f&&v.jsx(fe,{component:"span",...$("section"),mod:{position:"right"},children:f})]})]})});Yn.classes=Wf;Yn.varsResolver=gB;Yn.displayName="@mantine/core/Button";Yn.Group=Wy;Yn.GroupSection=Gy;const[xne,Sne]=Ar("Card component was not found in tree");var FC={root:"m_e615b15f",section:"m_599a2148"};const Yy=ki(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,withBorder:o,inheritPadding:l,mod:u,...f}=ye("CardSection",null,e),h=Sne();return v.jsx(fe,{mod:[{"with-border":o,"inherit-padding":l},u],...h.getStyles("section",{className:t,style:i,styles:r,classNames:n}),...f})});Yy.classes=FC;Yy.displayName="@mantine/core/CardSection";const yB=(e,{padding:n})=>({root:{"--card-padding":Yt(n)}}),Cne={orientation:"vertical"},za=ki(e=>{const n=ye("Card",Cne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:u,padding:f,attributes:h,orientation:d,...p}=n,g=Ze({name:"Card",props:n,classes:FC,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,varsResolver:yB}),b=x.Children.toArray(u),w=b.map((k,_)=>{var S;return typeof k=="object"&&k&&"type"in k&&(k.type===Yy||((S=k.type)==null?void 0:S.displayName)==="@mantine/core/CardSection")?x.cloneElement(k,{"data-orientation":d,"data-first-section":_===0||void 0,"data-last-section":_===b.length-1||void 0}):k});return v.jsx(xne,{value:{getStyles:g},children:v.jsx(Tt,{unstyled:o,"data-orientation":d,...g("root"),...p,children:w})})});za.classes=FC;za.varsResolver=yB;za.displayName="@mantine/core/Card";za.Section=Yy;var bB={root:"m_4451eb3a"};const Gf=ki(e=>{const n=ye("Center",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,inline:u,mod:f,attributes:h,...d}=n,p=Ze({name:"Center",props:n,classes:bB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l});return v.jsx(fe,{mod:[{inline:u},f],...p("root"),...d})});Gf.classes=bB;Gf.displayName="@mantine/core/Center";var wB={root:"m_b183c0a2"};const kB=(e,{color:n})=>({root:{"--code-bg":n?ft(n,e):void 0}}),pl=Pe(e=>{const n=ye("Code",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:u,block:f,mod:h,attributes:d,...p}=n,g=Ze({name:"Code",props:n,classes:wB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:d,vars:l,varsResolver:kB});return v.jsx(fe,{component:f?"pre":"code",mod:[{block:f},h],...g("root"),...p,dir:"ltr"})});pl.classes=wB;pl.varsResolver=kB;pl.displayName="@mantine/core/Code";var _B={root:"m_de3d2490",colorOverlay:"m_862f3d1b",shadowOverlay:"m_98ae7f22",alphaOverlay:"m_95709ac0",childrenOverlay:"m_93e74e3"};const OE={withShadow:!0},xB=(e,{radius:n,size:t})=>({root:{"--cs-radius":n===void 0?void 0:qt(n),"--cs-size":ve(t)}}),Yf=ki(e=>{const n=ye("ColorSwatch",OE,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:u,radius:f,withShadow:h,children:d,attributes:p,...g}=ye("ColorSwatch",OE,n),b=Ze({name:"ColorSwatch",props:n,classes:_B,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:xB});return v.jsxs(fe,{...b("root",{focusable:!0}),...g,children:[v.jsx("span",{...b("alphaOverlay")}),h&&v.jsx("span",{...b("shadowOverlay")}),v.jsx("span",{...b("colorOverlay",{style:{backgroundColor:u}})}),v.jsx("span",{...b("childrenOverlay"),children:d})]})});Yf.classes=_B;Yf.varsResolver=xB;Yf.displayName="@mantine/core/ColorSwatch";function ga(e,n=0,t=10**n){return Math.round(t*e)/t}function jne({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 Ane={grad:360/400,turn:360,rad:360/(Math.PI*2)};function One(e,n="deg"){return Number(e)*(Ane[n]||1)}const Tne=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function TE(e){const n=Tne.exec(e);return n?jne({h:One(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 BS({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:ga(60*(o<0?o+6:o),3),s:ga(r?a/r*100:0,3),v:ga(r/255*100,3),a:i}}function FS(e){const n=e[0]==="#"?e.slice(1):e;return n.length===3?BS({r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:1}):BS({r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:1})}function Ene(e){const n=e[0]==="#"?e.slice(1):e,t=a=>ga(parseInt(a,16)/255,3);if(n.length===4){const a=n.slice(0,3),o=t(n[3]+n[3]);return{...FS(a),a:o}}const i=n.slice(0,6),r=t(n.slice(6,8));return{...FS(i),a:r}}const Mne=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function EE(e){const n=Mne.exec(e);return n?BS({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 SB={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},Dne={hex:FS,hexa:Ene,rgb:EE,rgba:EE,hsl:TE,hsla:TE};function Rne(e){for(const[,n]of Object.entries(SB))if(n.test(e))return!0;return!1}function ig(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(SB))if(i.test(n))return Dne[t](n);return{h:0,s:0,v:0,a:1}}const Ky=x.createContext(null);function qC({position:e,...n}){return v.jsx(fe,{__vars:{"--thumb-y-offset":`${e.y*100}%`,"--thumb-x-offset":`${e.x*100}%`},...n})}qC.displayName="@mantine/core/ColorPickerThumb";var Xy={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 Kf=Pe(e=>{var H;const n=ye("ColorSlider",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,onChange:u,onChangeEnd:f,maxValue:h,round:d,size:p="md",focusable:g=!0,value:b,overlays:w,thumbColor:k="transparent",onScrubStart:_,onScrubEnd:S,__staticSelector:j="ColorPicker",attributes:T,ref:A,...O}=n,M=Ze({name:j,classes:Xy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:T,rootSelector:"slider"}),$=((H=x.use(Ky))==null?void 0:H.getStyles)||M,q=ci(),[P,L]=x.useState({y:0,x:b/h}),U=x.useRef(P),G=Y=>d?Math.round(Y*h):Y*h,{ref:B}=Vz(({x:Y,y:N})=>{U.current={x:Y,y:N},u==null||u(G(Y))},{onScrubEnd:()=>{const{x:Y}=U.current;f==null||f(G(Y)),S==null||S()},onScrubStart:_});os(()=>{L({y:0,x:b/h})},[b]);const R=(Y,N)=>{Y.preventDefault();const W=Uz(N);u==null||u(G(W.x)),f==null||f(G(W.x))},D=Y=>{switch(Y.key){case"ArrowRight":R(Y,{x:P.x+.05,y:P.y});break;case"ArrowLeft":R(Y,{x:P.x-.05,y:P.y});break}},z=w.map((Y,N)=>x.createElement("div",{...$("sliderOverlay"),style:Y,key:N}));return v.jsxs(fe,{...O,ref:Ht(B,A),...$("slider"),size:p,role:"slider","aria-valuenow":b,"aria-valuemax":h,"aria-valuemin":0,tabIndex:g?0:-1,onKeyDown:D,"data-focus-ring":q.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${p})`},children:[z,v.jsx(qC,{position:P,...$("thumb",{style:{top:ve(1),background:k}})})]})});Kf.displayName="@mantine/core/ColorSlider";Kf.classes=Xy;const Pne={__staticSelector:"AlphaSlider"},HC=Pe(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=ye("AlphaSlider",Pne,e);return v.jsx(Kf,{...a,value:n,onChange:o=>t==null?void 0:t(ga(o,2)),onChangeEnd:o=>i==null?void 0:i(ga(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:`${ve(8)} ${ve(8)}`,backgroundPosition:`0 0, 0 ${ve(4)}, ${ve(4)} ${ve(-4)}, ${ve(-4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${r})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${ve(1)} inset, rgb(0, 0, 0, .15) 0 0 ${ve(4)} inset`}]})});HC.displayName="@mantine/core/AlphaSlider";HC.classes=Kf.classes;function CB({h:e,s:n,v:t,a:i}){const r=e/360*6,a=n/100,o=t/100,l=Math.floor(r),u=o*(1-a),f=o*(1-(r-l)*a),h=o*(1-(1-r+l)*a),d=l%6;return{r:ga([o,f,u,u,h,o][d]*255),g:ga([h,o,o,f,u,u][d]*255),b:ga([u,u,h,o,o,f][d]*255),a:ga(i,2)}}function ME(e,n){const{r:t,g:i,b:r,a}=CB(e);return n?`rgba(${t}, ${i}, ${r}, ${ga(a,2)})`:`rgb(${t}, ${i}, ${r})`}function DE({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}%, ${ga(i,2)})`:`hsl(${o.h}, ${o.s}%, ${o.l}%)`}function $g(e){const n=e.toString(16);return n.length<2?`0${n}`:n}function jB(e){const{r:n,g:t,b:i}=CB(e);return`#${$g(n)}${$g(t)}${$g(i)}`}function Nne(e){const n=Math.round(e.a*255);return`${jB(e)}${$g(n)}`}const zk={hex:jB,hexa:e=>Nne(e),rgb:e=>ME(e,!1),rgba:e=>ME(e,!0),hsl:e=>DE(e,!1),hsla:e=>DE(e,!0)};function Js(e,n){return n?e in zk?zk[e](n):zk.hex(n):"#000000"}const $ne={__staticSelector:"HueSlider"},UC=Pe(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=ye("HueSlider",$ne,e);return v.jsx(Kf,{...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 ${ve(1)} inset, rgb(0, 0, 0, .15) 0 0 ${ve(4)} inset`}]})});UC.displayName="@mantine/core/HueSlider";UC.classes=Kf.classes;function AB({className:e,onChange:n,onChangeEnd:t,value:i,saturationLabel:r,focusable:a=!0,size:o,color:l,onScrubStart:u,onScrubEnd:f,...h}){const{getStyles:d}=x.use(Ky),[p,g]=x.useState({x:i.s/100,y:1-i.v/100}),b=x.useRef(p),{ref:w}=Vz(({x:S,y:j})=>{b.current={x:S,y:j},n({s:Math.round(S*100),v:Math.round((1-j)*100)})},{onScrubEnd:()=>{const{x:S,y:j}=b.current;t({s:Math.round(S*100),v:Math.round((1-j)*100)}),f==null||f()},onScrubStart:u});x.useEffect(()=>{g({x:i.s/100,y:1-i.v/100})},[i.s,i.v]);const k=(S,j)=>{S.preventDefault();const T=Uz(j);n({s:Math.round(T.x*100),v:Math.round((1-T.y)*100)}),t({s:Math.round(T.x*100),v:Math.round((1-T.y)*100)})},_=S=>{switch(S.key){case"ArrowUp":k(S,{y:p.y-.05,x:p.x});break;case"ArrowDown":k(S,{y:p.y+.05,x:p.x});break;case"ArrowRight":k(S,{x:p.x+.05,y:p.y});break;case"ArrowLeft":k(S,{x:p.x-.05,y:p.y});break}};return v.jsxs(fe,{...d("saturation"),ref:w,...h,role:"slider","aria-label":r,"aria-valuenow":p.x,"aria-valuetext":Js("rgba",i),tabIndex:a?0:-1,onKeyDown:_,children:[v.jsx("div",{...d("saturationOverlay",{style:{backgroundColor:`hsl(${i.h}, 100%, 50%)`}})}),v.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}})}),v.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}})}),v.jsx(qC,{position:p,...d("thumb",{style:{backgroundColor:l}})})]})}AB.displayName="@mantine/core/Saturation";function OB({className:e,datatype:n,setValue:t,onChangeEnd:i,size:r,focusable:a,data:o,swatchesPerRow:l,value:u,...f}){const h=x.use(Ky),d=o.map((p,g)=>x.createElement(Yf,{...h.getStyles("swatch"),unstyled:h.unstyled,component:"button",type:"button",color:p,key:g,radius:"sm",onClick:()=>{t(p),i==null||i(p)},"aria-label":p,tabIndex:a?0:-1,"data-swatch":!0},u===p&&v.jsx(BC,{size:"35%",color:Kz(p)<.5?"white":"black"})));return v.jsx(fe,{...h.getStyles("swatches"),...f,children:d})}OB.displayName="@mantine/core/Swatches";const zne={swatchesPerRow:7,withPicker:!0,focusable:!0,size:"md",__staticSelector:"ColorPicker"},TB=(e,{size:n,swatchesPerRow:t})=>({wrapper:{"--cp-preview-size":Ln(n,"cp-preview-size"),"--cp-width":Ln(n,"cp-width"),"--cp-body-spacing":Yt(n),"--cp-swatch-size":`${100/t}%`,"--cp-thumb-size":Ln(n,"cp-thumb-size"),"--cp-saturation-height":Ln(n,"cp-saturation-height")}}),Zy=Pe(e=>{const n=ye("ColorPicker",zne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,format:u="hex",value:f,defaultValue:h,onChange:d,onChangeEnd:p,withPicker:g,size:b,saturationLabel:w,hueLabel:k,alphaLabel:_,focusable:S,swatches:j,swatchesPerRow:T,fullWidth:A,onColorSwatchClick:O,__staticSelector:M,mod:$,attributes:q,name:P,hiddenInputProps:L,...U}=n,G=Ze({name:M,props:n,classes:Xy,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:q,rootSelector:"wrapper",vars:l,varsResolver:TB}),B=x.useRef(u||"hex"),R=x.useRef(""),D=x.useRef(-1),z=x.useRef(!1),H=u==="hexa"||u==="rgba"||u==="hsla",[Y,N,W]=Ai({value:f,defaultValue:h,finalValue:"#FFFFFF",onChange:d}),[V,I]=x.useState(ig(Y)),Q=()=>{window.clearTimeout(D.current),z.current=!0},ie=()=>{window.clearTimeout(D.current),D.current=window.setTimeout(()=>{z.current=!1},200)},re=Z=>{I(le=>{const ee={...le,...Z};return R.current=Js(B.current,ee),ee}),N(R.current)};return os(()=>{typeof f=="string"&&Rne(f)&&!z.current&&I(ig(f))},[f]),os(()=>{B.current=u||"hex",N(Js(B.current,V))},[u]),v.jsx(Ky,{value:{getStyles:G,unstyled:o},children:v.jsxs(fe,{...G("wrapper"),size:b,mod:[{"full-width":A},$],...U,children:[P&&v.jsx("input",{type:"hidden",name:P,value:Y,...L}),g&&v.jsxs(v.Fragment,{children:[v.jsx(AB,{value:V,onChange:re,onChangeEnd:({s:Z,v:le})=>p==null?void 0:p(Js(B.current,{...V,s:Z,v:le})),color:Y,size:b,focusable:S,saturationLabel:w,onScrubStart:Q,onScrubEnd:ie}),v.jsxs("div",{...G("body"),children:[v.jsxs("div",{...G("sliders"),children:[v.jsx(UC,{value:V.h,onChange:Z=>re({h:Z}),onChangeEnd:Z=>p==null?void 0:p(Js(B.current,{...V,h:Z})),size:b,focusable:S,"aria-label":k,onScrubStart:Q,onScrubEnd:ie}),H&&v.jsx(HC,{value:V.a,onChange:Z=>re({a:Z}),onChangeEnd:Z=>{p==null||p(Js(B.current,{...V,a:Z}))},size:b,color:Js("hex",V),focusable:S,"aria-label":_,onScrubStart:Q,onScrubEnd:ie})]}),H&&v.jsx(Yf,{color:Y,radius:"sm",size:"var(--cp-preview-size)",...G("preview")})]})]}),Array.isArray(j)&&v.jsx(OB,{data:j,swatchesPerRow:T,focusable:S,setValue:N,value:Y,onChangeEnd:Z=>{const le=Js(u,ig(Z));O==null||O(le),p==null||p(le),W||I(ig(Z))}})]})})});Zy.classes=Xy;Zy.varsResolver=TB;Zy.displayName="@mantine/core/ColorPicker";const Lne={timeout:1e3};function qS(e){const{children:n,timeout:t,value:i,...r}=ye("CopyButton",Lne,e),a=lX({timeout:t}),o=()=>a.copy(i);return v.jsx(v.Fragment,{children:n({copy:o,copied:a.copied,...r})})}qS.displayName="@mantine/core/CopyButton";var EB={root:"m_3eebeb36",label:"m_9e365f20"};const Ine={orientation:"horizontal"},MB=(e,{color:n,variant:t,size:i})=>({root:{"--divider-color":n?ft(n,e):void 0,"--divider-border-style":t,"--divider-size":Ln(i,"divider-size")}}),us=Pe(e=>{const n=ye("Divider",Ine,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:u,orientation:f,label:h,labelPosition:d,mod:p,attributes:g,...b}=n,w=Ze({name:"Divider",classes:EB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:g,vars:l,varsResolver:MB});return v.jsx(fe,{mod:[{orientation:f,withLabel:!!h},p],role:"separator",...w("root"),...b,children:h&&v.jsx(fe,{component:"span",mod:{position:d},...w("label"),children:h})})});us.classes=EB;us.varsResolver=MB;us.displayName="@mantine/core/Divider";const VC=sp(e=>{const{onChange:n,children:t,multiple:i,accept:r,name:a,form:o,resetRef:l,disabled:u,capture:f,inputProps:h,ref:d,...p}=ye("FileButton",null,e),g=x.useRef(null),b=()=>{var _;!u&&((_=g.current)==null||_.click())},w=_=>{if(_.currentTarget.files===null)return n(i?[]:null);n(i?Array.from(_.currentTarget.files):_.currentTarget.files[0]||null)};return cm(l,()=>{g.current&&(g.current.value="")}),v.jsxs(v.Fragment,{children:[v.jsx("input",{style:{display:"none"},type:"file",accept:r,multiple:i,onChange:w,ref:Ht(d,g),name:a,form:o,capture:f,...h}),t({onClick:b,...p})]})});VC.displayName="@mantine/core/FileButton";const[RE,DB]=Ar("Grid component was not found in tree"),HS=(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))`},PE=(e,n,t)=>t||e==="auto"?"100%":e==="content"?"unset":HS(e,n),NE=(e,n)=>{if(e)return e==="auto"||n?"1":"auto"},$E=(e,n)=>{if(e===0)return"0";if(e)return`calc(${100*e/n}% + ${e/n} * var(--grid-column-gap))`};function Bne({span:e,order:n,offset:t,align:i,selector:r}){var g;const a=ci(),o=DB(),l=o.breakpoints||a.breakpoints,u=Wr(e),f=u===void 0?12:u,h=Bu({"--col-order":(g=Wr(n))==null?void 0:g.toString(),"--col-flex-grow":NE(f,o.grow),"--col-flex-basis":HS(f,o.columns),"--col-width":f==="content"?"auto":void 0,"--col-max-width":PE(f,o.columns,o.grow),"--col-offset":$E(Wr(t),o.columns),"--col-align-self":Wr(i)}),d=$t(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"]=NE(e[w],o.grow),b[w]["--col-flex-basis"]=HS(e[w],o.columns),b[w]["--col-width"]=e[w]==="content"?"auto":void 0,b[w]["--col-max-width"]=PE(e[w],o.columns,o.grow)),typeof t=="object"&&t[w]!==void 0&&(b[w]["--col-offset"]=$E(t[w],o.columns)),typeof i=="object"&&i[w]!==void 0&&(b[w]["--col-align-self"]=i[w]),b},{}),p=um($t(d),l).filter(b=>$t(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 v.jsx(Bf,{styles:h,media:o.type==="container"?void 0:p,container:o.type==="container"?p:void 0,selector:r})}var WC={container:"m_8478a6da",root:"m_410352e9",inner:"m_dee7bd2f",col:"m_96bdd299"};const Fne={span:12},GC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,span:o,order:l,offset:u,align:f,...h}=ye("GridCol",Fne,e),d=DB(),p=Sy();return v.jsxs(v.Fragment,{children:[v.jsx(Bne,{selector:`.${p}`,span:o,order:l,offset:u,align:f}),v.jsx(fe,{...d.getStyles("col",{className:vn(t,p),style:i,classNames:n,styles:r}),...h})]})});GC.classes=WC;GC.displayName="@mantine/core/GridCol";function zE({gap:e,rowGap:n,columnGap:t,selector:i,breakpoints:r,type:a}){const o=ci(),l=r||o.breakpoints,u=Bu({"--grid-gap":Yt(Wr(e)),"--grid-row-gap":Yt(Wr(n)),"--grid-column-gap":Yt(Wr(t))}),f=$t(l).reduce((d,p)=>(d[p]||(d[p]={}),typeof e=="object"&&e[p]!==void 0&&(d[p]["--grid-gap"]=Yt(e[p])),typeof n=="object"&&n[p]!==void 0&&(d[p]["--grid-row-gap"]=Yt(n[p])),typeof t=="object"&&t[p]!==void 0&&(d[p]["--grid-column-gap"]=Yt(t[p])),d),{}),h=um($t(f),l).filter(d=>$t(f[d.value]).length>0).map(d=>({query:a==="container"?`mantine-grid (min-width: ${l[d.value]})`:`(min-width: ${l[d.value]})`,styles:f[d.value]}));return v.jsx(Bf,{styles:u,media:a==="container"?void 0:h,container:a==="container"?h:void 0,selector:i})}const qne={gap:"md",columns:12},RB=(e,{justify:n,align:t,overflow:i})=>({root:{"--grid-justify":n,"--grid-align":t,"--grid-overflow":i}}),Hr=Pe(e=>{const n=ye("Grid",qne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,grow:u,gap:f,rowGap:h,columnGap:d,columns:p,align:g,justify:b,children:w,breakpoints:k,type:_,attributes:S,...j}=n,T=Ze({name:"Grid",classes:WC,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:RB}),A=Sy();return _==="container"&&k?v.jsxs(RE,{value:{getStyles:T,grow:u,columns:p,breakpoints:k,type:_},children:[v.jsx(zE,{selector:`.${A}`,...n}),v.jsx("div",{...T("container"),children:v.jsx(fe,{...T("root",{className:A}),...j,children:v.jsx("div",{...T("inner"),children:w})})})]}):v.jsxs(RE,{value:{getStyles:T,grow:u,columns:p,breakpoints:k,type:_},children:[v.jsx(zE,{selector:`.${A}`,...n}),v.jsx(fe,{...T("root",{className:A}),...j,children:v.jsx("div",{...T("inner"),children:w})})]})});Hr.classes=WC;Hr.varsResolver=RB;Hr.displayName="@mantine/core/Grid";Hr.Col=GC;const[Hne,PB]=Ar("HoverCard component was not found in the tree"),Qy=x.createContext({withinGroup:!1}),Une={openDelay:0,closeDelay:0};function YC(e){const{openDelay:n,closeDelay:t,children:i}=ye("HoverCardGroup",Une,e);return v.jsx(Qy,{value:{withinGroup:!0},children:v.jsx(NL,{delay:{open:n,close:t},children:i})})}YC.displayName="@mantine/core/HoverCardGroup";YC.extend=e=>e;function NB(e){const{children:n,onMouseEnter:t,onMouseLeave:i,...r}=ye("HoverCardDropdown",null,e),a=PB();if(x.use(Qy).withinGroup&&a.getFloatingProps&&a.floating){const u=a.getFloatingProps();return v.jsx(Sn.Dropdown,{ref:a.floating,...u,onMouseEnter:bi(t,u.onMouseEnter),onMouseLeave:bi(i,u.onMouseLeave),...r,children:n})}const o=bi(t,a.openDropdown),l=bi(i,a.closeDropdown);return v.jsx(Sn.Dropdown,{onMouseEnter:o,onMouseLeave:l,...r,children:n})}NB.displayName="@mantine/core/HoverCardDropdown";const Vne={refProp:"ref"};function $B(e){const{children:n,refProp:t,eventPropsWrapperName:i,...r}=ye("HoverCardTarget",Vne,e),a=Cl(n);if(!a)throw new Error("HoverCard.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const o=PB();if(x.use(Qy).withinGroup&&o.getReferenceProps&&o.reference){const u=o.getReferenceProps();return v.jsx(Sn.Target,{refProp:t,...r,children:x.cloneElement(a,i?{[i]:{...u,ref:o.reference}}:{...u,ref:o.reference})})}const l={onMouseEnter:bi(a.props.onMouseEnter,o.openDropdown),onMouseLeave:bi(a.props.onMouseLeave,o.closeDropdown)};return v.jsx(Sn.Target,{refProp:t,...r,children:x.cloneElement(a,i?{[i]:l}:l)})}$B.displayName="@mantine/core/HoverCardTarget";function Wne(e){const[n,t]=x.useState(e.defaultOpened),i=typeof e.opened=="boolean"?e.opened:n,r=x.use(Qy).withinGroup,a=Pi(),o=x.useRef(-1),l=x.useRef(-1),u=x.useCallback(()=>{window.clearTimeout(o.current),window.clearTimeout(l.current)},[]),f=x.useCallback(S=>{var j,T;t(S),S?(g(a),(j=e.onOpen)==null||j.call(e)):(T=e.onClose)==null||T.call(e)},[a,e.onOpen,e.onClose]),{context:h,refs:d}=Dy({open:i,onOpenChange:f}),{delay:p,setCurrentId:g}=$L(h,{id:a}),{getReferenceProps:b,getFloatingProps:w}=LL([RL(h,{enabled:!0,delay:r?p:{open:e.openDelay,close:e.closeDelay}}),IL(h,{role:"dialog"}),zL(h,{enabled:r})]),k=x.useCallback(()=>{r||(u(),e.openDelay===0||e.openDelay===void 0?f(!0):o.current=window.setTimeout(()=>f(!0),e.openDelay))},[r,u,e.openDelay,f]),_=x.useCallback(()=>{r||(u(),e.closeDelay===0||e.closeDelay===void 0?f(!1):l.current=window.setTimeout(()=>f(!1),e.closeDelay))},[r,u,e.closeDelay,f]);return x.useEffect(()=>()=>u(),[u]),{opened:i,reference:d.setReference,floating:d.setFloating,getReferenceProps:b,getFloatingProps:w,openDropdown:k,closeDropdown:_}}const Gne={openDelay:0,closeDelay:150,initiallyOpened:!1};function vl(e){const{children:n,onOpen:t,onClose:i,openDelay:r,closeDelay:a,initiallyOpened:o,...l}=ye("HoverCard",Gne,e),u=Wne({openDelay:r,closeDelay:a,defaultOpened:o,onOpen:t,onClose:i});return v.jsx(Hne,{value:{openDropdown:u.openDropdown,closeDropdown:u.closeDropdown,getReferenceProps:u.getReferenceProps,getFloatingProps:u.getFloatingProps,reference:u.reference,floating:u.floating},children:v.jsx(Sn,{...l,opened:u.opened,__staticSelector:"HoverCard",children:n})})}vl.displayName="@mantine/core/HoverCard";vl.Target=$B;vl.Dropdown=NB;vl.Group=YC;vl.extend=e=>e;var zB={root:"m_9e117634"};const LB=(e,{radius:n,fit:t})=>({root:{"--image-radius":n===void 0?void 0:qt(n),"--image-object-fit":t}}),Xf=ki(e=>{const n=ye("Image",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,onError:u,src:f,radius:h,fit:d,fallbackSrc:p,mod:g,attributes:b,...w}=n,[k,_]=x.useState(!f);x.useEffect(()=>_(!f),[f]);const S=Ze({name:"Image",classes:zB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l,varsResolver:LB});return k&&p?v.jsx(fe,{component:"img",src:p,...S("root"),onError:u,mod:["fallback",g],...w}):v.jsx(fe,{component:"img",...S("root"),src:f,onError:j=>{u==null||u(j),_(!0)},mod:g,...w})});Xf.classes=zB;Xf.varsResolver=LB;Xf.displayName="@mantine/core/Image";function Yne(e="top-end",n=0){const t={"--indicator-top":void 0,"--indicator-bottom":void 0,"--indicator-left":void 0,"--indicator-right":void 0,"--indicator-translate-x":void 0,"--indicator-translate-y":void 0},i=typeof n=="number"?n:n.x,r=typeof n=="number"?n:n.y,a=ve(i),o=ve(r),[l,u]=e.split("-");return l==="top"&&(t["--indicator-top"]=o,t["--indicator-translate-y"]="-50%"),l==="middle"&&(t["--indicator-top"]="50%",t["--indicator-translate-y"]="-50%"),l==="bottom"&&(t["--indicator-bottom"]=o,t["--indicator-translate-y"]="50%"),u==="start"&&(t["--indicator-left"]=a,t["--indicator-translate-x"]="-50%"),u==="center"&&(t["--indicator-left"]="50%",t["--indicator-translate-x"]="-50%"),u==="end"&&(t["--indicator-right"]=a,t["--indicator-translate-x"]="50%"),t}var IB={root:"m_e5262200",indicator:"m_760d1fb1",processing:"m_885901b1"};const Kne={position:"top-end",offset:0,showZero:!0},BB=(e,{color:n,position:t,offset:i,size:r,radius:a,zIndex:o,autoContrast:l})=>({root:{"--indicator-color":n?ft(n,e):void 0,"--indicator-text-color":ap(l,e)?If({color:n,theme:e,autoContrast:l}):void 0,"--indicator-size":ve(r),"--indicator-radius":a===void 0?void 0:qt(a),"--indicator-z-index":o==null?void 0:o.toString(),...Yne(t,i)}}),Jy=Pe(e=>{const n=ye("Indicator",Kne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:u,position:f,offset:h,inline:d,label:p,radius:g,color:b,withBorder:w,disabled:k,processing:_,zIndex:S,autoContrast:j,maxValue:T,showZero:A,mod:O,attributes:M,...$}=n,q=Ze({name:"Indicator",classes:IB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:M,vars:l,varsResolver:BB}),P=!A&&(p===0||p==="0"),L=T!==void 0&&typeof p=="number"&&p>T?`${T}+`:p;return v.jsxs(fe,{...q("root"),mod:[{inline:d},O],...$,children:[!k&&!P&&v.jsx(fe,{mod:{"with-label":!!p,"with-border":w,processing:_},...q("indicator"),children:L}),u]})});Jy.classes=IB;Jy.varsResolver=BB;Jy.displayName="@mantine/core/Indicator";const Xne=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],LE={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"};function IE(e){Object.keys(LE).forEach(n=>{e.style.setProperty(n,LE[n],"important")})}function Zne(e){const n=window.getComputedStyle(e);if(n===null)return null;const t={};for(const i of Xne)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 Mi=null;function Qne(e,n,t=1,i=1/0){Mi||(Mi=document.createElement("textarea"),Mi.setAttribute("tabindex","-1"),Mi.setAttribute("aria-hidden","true"),Mi.setAttribute("aria-label","autosize measurement"),IE(Mi)),Mi.parentNode===null&&document.body.appendChild(Mi);const{paddingSize:r,borderSize:a,sizingStyle:o}=e,{boxSizing:l}=o;Object.keys(o).forEach(p=>{Mi.style[p]=o[p]}),IE(Mi),Mi.value=n;let u=l==="border-box"?Mi.scrollHeight+a:Mi.scrollHeight-r;Mi.value=n,u=l==="border-box"?Mi.scrollHeight+a:Mi.scrollHeight-r,Mi.value="x";const f=Mi.scrollHeight-r;let h=f*t;l==="border-box"&&(h=h+r+a),u=Math.max(h,u);let d=f*i;return l==="border-box"&&(d=d+r+a),u=Math.min(d,u),[u,f]}function Jne({maxRows:e,minRows:n,onChange:t,ref:i,...r}){const a=r.value!==void 0,o=x.useRef(null),l=Ht(o,i),u=x.useRef(0),f=()=>{const d=o.current;if(!d)return;const p=Zne(d);if(!p)return;const[g]=Qne(p,d.value||d.placeholder||"x",n,e);u.current!==g&&(u.current=g,d.style.setProperty("height",`${g}px`,"important"))},h=d=>{a||f(),t==null||t(d)};return x.useLayoutEffect(f),x.useEffect(()=>{const d=()=>f();return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]),x.useEffect(()=>{const d=()=>f();return document.fonts.addEventListener("loadingdone",d),()=>document.fonts.removeEventListener("loadingdone",d)},[]),x.useEffect(()=>{const d=p=>{var g;if(((g=o.current)==null?void 0:g.form)===p.target&&!a){const b=o.current.value;requestAnimationFrame(()=>{o.current&&b!==o.current.value&&f()})}};return document.body.addEventListener("reset",d),()=>document.body.removeEventListener("reset",d)},[a]),v.jsx("textarea",{...r,onChange:h,ref:l})}const ete={size:"sm"},_l=Pe(e=>{const{autosize:n,maxRows:t,minRows:i,__staticSelector:r,resize:a,...o}=ye("Textarea",ete,e),l=n&&CX()!=="test",u=l?{maxRows:t,minRows:i}:{};return v.jsx(Ni,{component:l?Jne:"textarea",...o,__staticSelector:r||"Textarea",multiline:!0,"data-no-overflow":n&&t===void 0||void 0,__vars:{"--input-resize":a},...u})});_l.classes=Ni.classes;_l.displayName="@mantine/core/Textarea";function BE(e,n){if(typeof e=="string"&&e.trim().length===0)return!0;try{return n(e),!0}catch{return!1}}const nte={serialize:JSON.stringify,deserialize:JSON.parse,size:"sm",indentSpaces:2},KC=Pe(e=>{const{value:n,defaultValue:t,onChange:i,formatOnBlur:r,validationError:a,serialize:o,deserialize:l,onFocus:u,onBlur:f,readOnly:h,error:d,indentSpaces:p,...g}=ye("JsonInput",nte,e),[b,w]=Ai({value:n,defaultValue:t,finalValue:"",onChange:i}),[k,_]=x.useState(BE(b,l)),S=T=>{u==null||u(T),_(!0)},j=T=>{f==null||f(T);const A=BE(T.currentTarget.value,l);r&&!h&&A&&T.currentTarget.value.trim()!==""&&w(o(l(T.currentTarget.value),null,p)),_(A)};return v.jsx(_l,{value:b,onChange:T=>w(T.currentTarget.value),onFocus:S,onBlur:j,readOnly:h,...g,autoComplete:"off",__staticSelector:"JsonInput",error:k?d:a||!0,"data-monospace":!0})});KC.classes=Ni.classes;KC.displayName="@mantine/core/JsonInput";const[tte,Ol]=Ar("Menu component was not found in the tree");var Tl={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504",chevron:"m_b85b0bed"};const XC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("MenuDivider",null,e);return v.jsx(fe,{...Ol().getStyles("divider",{className:t,style:i,styles:r,classNames:n}),...o})});XC.classes=Tl;XC.displayName="@mantine/core/MenuDivider";const ZC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,onMouseEnter:o,onMouseLeave:l,onKeyDown:u,children:f,ref:h,...d}=ye("MenuDropdown",null,e),p=x.useRef(null),g=Ol(),b=bi(u,_=>{var S,j;(_.key==="ArrowUp"||_.key==="ArrowDown")&&(_.preventDefault(),(j=(S=p.current)==null?void 0:S.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||j.focus())}),w=bi(o,()=>(g.trigger==="hover"||g.trigger==="click-hover")&&g.openDropdown()),k=bi(l,()=>(g.trigger==="hover"||g.trigger==="click-hover")&&g.closeDropdown());return v.jsxs(Sn.Dropdown,{...d,onMouseEnter:w,onMouseLeave:k,role:"menu","aria-orientation":"vertical",ref:Ht(h,p),...g.getStyles("dropdown",{className:t,style:i,styles:r,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:b,children:[g.withInitialFocusPlaceholder&&v.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),f]})});ZC.classes=Tl;ZC.displayName="@mantine/core/MenuDropdown";const mm=x.createContext(null),QC=ki(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,color:o,closeMenuOnClick:l,leftSection:u,rightSection:f,children:h,disabled:d,"data-disabled":p,ref:g,...b}=ye("MenuItem",null,e),w=Ol(),k=x.use(mm),_=ci(),{dir:S}=qu(),j=x.useRef(null),T=b,A=bi(T.onClick,()=>{p||(typeof l=="boolean"?l&&w.closeDropdownImmediately():w.closeOnItemClick&&w.closeDropdownImmediately())}),O=o?_.variantColorResolver({color:o,theme:_,variant:"light"}):void 0,M=o?vs({color:o,theme:_}):null,$=bi(T.onKeyDown,q=>{q.key==="ArrowLeft"&&k&&(k.close(),k.focusParentItem())});return v.jsxs(Et,{onMouseDown:q=>q.preventDefault(),...b,unstyled:w.unstyled,tabIndex:w.menuItemTabIndex,...w.getStyles("item",{className:t,style:i,styles:r,classNames:n}),ref:Ht(j,g),role:"menuitem",disabled:d,"data-menu-item":!0,"data-disabled":d||p||void 0,"data-mantine-stop-propagation":!0,onClick:A,onKeyDown:Z6({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:w.loop,dir:S,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:[u&&v.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"left",children:u}),h&&v.jsx("div",{...w.getStyles("itemLabel",{styles:r,classNames:n}),children:h}),f&&v.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"right",children:f})]})});QC.classes=Tl;QC.displayName="@mantine/core/MenuItem";const JC=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("MenuLabel",null,e);return v.jsx(fe,{...Ol().getStyles("label",{className:t,style:i,styles:r,classNames:n}),...o})});JC.classes=Tl;JC.displayName="@mantine/core/MenuLabel";const e9=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,onMouseEnter:o,onMouseLeave:l,onKeyDown:u,children:f,ref:h,...d}=ye("MenuSubDropdown",null,e),p=x.useRef(null),g=Ol(),b=x.use(mm),w=bi(o,b==null?void 0:b.open),k=bi(l,b==null?void 0:b.close);return v.jsx(Sn.Dropdown,{...d,onMouseEnter:w,onMouseLeave:k,role:"menu","aria-orientation":"vertical",ref:Ht(h,p),...g.getStyles("dropdown",{className:t,style:i,styles:r,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:f})});e9.classes=Tl;e9.displayName="@mantine/core/MenuSubDropdown";const n9=ki(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,color:o,leftSection:l,rightSection:u,children:f,disabled:h,"data-disabled":d,closeMenuOnClick:p,ref:g,...b}=ye("MenuSubItem",null,e),w=Ol(),k=x.use(mm),_=ci(),{dir:S}=qu(),j=x.useRef(null),T=b,A=o?_.variantColorResolver({color:o,theme:_,variant:"light"}):void 0,O=o?vs({color:o,theme:_}):null,M=bi(T.onKeyDown,L=>{L.key==="ArrowRight"&&(k==null||k.open(),k==null||k.focusFirstItem()),L.key==="ArrowLeft"&&(k!=null&&k.parentContext)&&(k.parentContext.close(),k.parentContext.focusParentItem())}),$=bi(T.onClick,()=>{!d&&p&&w.closeDropdownImmediately()}),q=bi(T.onMouseEnter,k==null?void 0:k.open),P=bi(T.onMouseLeave,k==null?void 0:k.close);return v.jsxs(Et,{onMouseDown:L=>L.preventDefault(),...b,unstyled:w.unstyled,tabIndex:w.menuItemTabIndex,...w.getStyles("item",{className:t,style:i,styles:r,classNames:n}),ref:Ht(j,g),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:Z6({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:w.loop,dir:S,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)`:A==null?void 0:A.color,"--menu-item-hover":A==null?void 0:A.hover},children:[l&&v.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"left",children:l}),f&&v.jsx("div",{...w.getStyles("itemLabel",{styles:r,classNames:n}),children:f}),v.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"right",children:u||v.jsx(e1,{...w.getStyles("chevron"),size:14})})]})});n9.classes=Tl;n9.displayName="@mantine/core/MenuSubItem";function FB({children:e,refProp:n}){if(!X6(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 Ol(),v.jsx(Sn.Target,{refProp:n,popupType:"menu",children:e})}FB.displayName="@mantine/core/MenuSubTarget";const ite={offset:0,position:"right-start",transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function Zf(e){const{children:n,closeDelay:t,openDelay:i,...r}=ye("MenuSub",ite,e),a=Pi(),[o,{open:l,close:u}]=Wz(!1),f=x.use(mm),{openDropdown:h,closeDropdown:d}=GL({open:l,close:u,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),g=()=>window.setTimeout(()=>{var b;(b=document.getElementById(`${a}-target`))==null||b.focus()},16);return v.jsx(mm,{value:{opened:o,close:d,open:h,focusFirstItem:p,focusParentItem:g,parentContext:f},children:v.jsx(Sn,{opened:o,withinPortal:!1,withArrow:!1,id:a,...r,children:n})})}Zf.extend=e=>e;Zf.displayName="@mantine/core/MenuSub";Zf.Target=FB;Zf.Dropdown=e9;Zf.Item=n9;const rte={refProp:"ref"};function qB(e){const{children:n,refProp:t,...i}=ye("MenuTarget",rte,e),r=Cl(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=Ol(),o=r.props,l=bi(o.onClick,()=>{a.trigger==="click"?a.toggleDropdown():a.trigger==="click-hover"&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),u=bi(o.onMouseEnter,()=>(a.trigger==="hover"||a.trigger==="click-hover")&&a.openDropdown()),f=bi(o.onMouseLeave,()=>{(a.trigger==="hover"||a.trigger==="click-hover"&&!a.openedViaClick)&&a.closeDropdown()});return v.jsx(Sn.Target,{refProp:t,popupType:"menu",...i,children:x.cloneElement(r,{onClick:l,onMouseEnter:u,onMouseLeave:f,"data-expanded":a.opened?!0:void 0})})}qB.displayName="@mantine/core/MenuTarget";const ate={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1},zn=Pe(e=>{const n=ye("Menu",ate,e),{children:t,onOpen:i,onClose:r,opened:a,defaultOpened:o,trapFocus:l,onChange:u,closeOnItemClick:f,loop:h,closeOnEscape:d,trigger:p,openDelay:g,closeDelay:b,classNames:w,styles:k,unstyled:_,variant:S,vars:j,menuItemTabIndex:T,keepMounted:A,withInitialFocusPlaceholder:O,attributes:M,...$}=n,q=Ze({name:"Menu",classes:Tl,props:n,classNames:w,styles:k,unstyled:_,attributes:M}),[P,L]=Ai({value:a,defaultValue:o,finalValue:!1,onChange:u}),[U,G]=x.useState(!1),B=()=>{L(!1),G(!1),P&&(r==null||r())},R=()=>{L(!0),!P&&(i==null||i())},D=()=>{P?B():R()},{openDropdown:z,closeDropdown:H}=GL({open:R,close:B,closeDelay:b,openDelay:g}),Y=V=>aX("[data-menu-item]","[data-menu-dropdown]",V),{resolvedClassNames:N,resolvedStyles:W}=Wi({classNames:w,styles:k,props:n});return v.jsx(tte,{value:{getStyles:q,opened:P,toggleDropdown:D,getItemIndex:Y,openedViaClick:U,setOpenedViaClick:G,closeOnItemClick:f,closeDropdown:p==="click"?B:H,openDropdown:p==="click"?R:z,closeDropdownImmediately:B,loop:h,trigger:p,unstyled:_,menuItemTabIndex:T,withInitialFocusPlaceholder:O},children:v.jsx(Sn,{returnFocus:!0,...$,opened:P,onChange:D,defaultOpened:o,trapFocus:A?!1:l,closeOnEscape:d,__staticSelector:"Menu",classNames:N,styles:W,unstyled:_,variant:S,keepMounted:A,children:t})})});zn.displayName="@mantine/core/Menu";zn.classes=Tl;zn.Item=QC;zn.Label=JC;zn.Dropdown=ZC;zn.Target=qB;zn.Divider=XC;zn.Sub=Zf;const[ote,Qf]=Ar("Modal component was not found in tree");var ys={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};const e0=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ModalBody",null,e);return v.jsx(xI,{...Qf().getStyles("body",{classNames:n,style:i,styles:r,className:t}),...o})});e0.classes=ys;e0.displayName="@mantine/core/ModalBody";const n0=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ModalCloseButton",null,e);return v.jsx(SI,{...Qf().getStyles("close",{classNames:n,style:i,styles:r,className:t}),...o})});n0.classes=ys;n0.displayName="@mantine/core/ModalCloseButton";const t0=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,children:o,__hidden:l,...u}=ye("ModalContent",null,e),f=Qf(),h=f.scrollAreaComponent||Mee;return v.jsx(CI,{...f.getStyles("content",{className:t,style:i,styles:r,classNames:n}),innerProps:f.getStyles("inner",{className:t,style:i,styles:r,classNames:n}),"data-full-screen":f.fullScreen||void 0,"data-modal-content":!0,"data-hidden":l||void 0,...u,children:v.jsx(h,{style:{maxHeight:f.fullScreen?"100dvh":`calc(100dvh - (${ve(f.yOffset)} * 2))`},children:o})})});t0.classes=ys;t0.displayName="@mantine/core/ModalContent";const i0=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ModalHeader",null,e);return v.jsx(jI,{...Qf().getStyles("header",{classNames:n,style:i,styles:r,className:t}),...o})});i0.classes=ys;i0.displayName="@mantine/core/ModalHeader";const r0=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ModalOverlay",null,e);return v.jsx(AI,{...Qf().getStyles("overlay",{classNames:n,style:i,styles:r,className:t}),...o})});r0.classes=ys;r0.displayName="@mantine/core/ModalOverlay";const ste={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:xa("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},HB=(e,{radius:n,size:t,yOffset:i,xOffset:r})=>({root:{"--modal-radius":n===void 0?void 0:qt(n),"--modal-size":Ln(t,"modal-size"),"--modal-y-offset":ve(i),"--modal-x-offset":ve(r)}}),gp=Pe(e=>{const n=ye("ModalRoot",ste,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,yOffset:u,scrollAreaComponent:f,radius:h,fullScreen:d,centered:p,xOffset:g,__staticSelector:b,attributes:w,...k}=n,_=Ze({name:b,classes:ys,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:HB});return v.jsx(ote,{value:{yOffset:u,scrollAreaComponent:f,getStyles:_,fullScreen:d},children:v.jsx(_I,{..._("root"),"data-full-screen":d||void 0,"data-centered":p||void 0,"data-offset-scrollbars":f===ur.Autosize||void 0,unstyled:o,...k})})});gp.classes=ys;gp.varsResolver=HB;gp.displayName="@mantine/core/ModalRoot";const UB=x.createContext(null);function VB({children:e}){const[n,t]=x.useState([]),[i,r]=x.useState(xa("modal"));return v.jsx(UB,{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})}VB.displayName="@mantine/core/ModalStack";const a0=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ye("ModalTitle",null,e);return v.jsx(OI,{...Qf().getStyles("title",{classNames:n,style:i,styles:r,className:t}),...o})});a0.classes=ys;a0.displayName="@mantine/core/ModalTitle";const lte={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:xa("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},Gi=Pe(e=>{const{title:n,withOverlay:t,overlayProps:i,withCloseButton:r,closeButtonProps:a,children:o,radius:l,opened:u,stackId:f,zIndex:h,...d}=ye("Modal",lte,e),p=x.use(UB),g=!!n||r,b=p&&f?{closeOnEscape:p.currentId===f,trapFocus:p.currentId===f,zIndex:p.getZIndex(f)}:{},w=t===!1?!1:f&&p?p.currentId===f:u;return x.useEffect(()=>{p&&f&&(u?p.addModal(f,h||xa("modal")):p.removeModal(f))},[u,f,h]),v.jsxs(gp,{radius:l,opened:u,zIndex:p&&f?p.getZIndex(f):h,...d,...b,children:[t&&v.jsx(r0,{visible:w,transitionProps:p&&f?{duration:0}:void 0,...i}),v.jsxs(t0,{radius:l,__hidden:p&&f&&u?f!==p.currentId:!1,children:[g&&v.jsxs(i0,{children:[n&&v.jsx(a0,{children:n}),r&&v.jsx(n0,{...a})]}),v.jsx(e0,{children:o})]})]})});Gi.classes=ys;Gi.displayName="@mantine/core/Modal";Gi.Root=gp;Gi.Overlay=r0;Gi.Content=t0;Gi.Body=e0;Gi.Header=i0;Gi.Title=a0;Gi.CloseButton=n0;Gi.Stack=VB;const o0=x.createContext(null);var s0={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};const WB=x.createContext(null),GB=(e,{gap:n},{size:t})=>({group:{"--pg-gap":n!==void 0?Ln(n):Ln(t,"pg-gap")}}),l0=Pe(e=>{var b;const n=ye("PillGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:u,disabled:f,attributes:h,...d}=n,p=((b=x.use(o0))==null?void 0:b.size)||u||void 0,g=Ze({name:"PillGroup",classes:s0,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,varsResolver:GB,stylesCtx:{size:p},rootSelector:"group"});return v.jsx(WB,{value:{size:p,disabled:f},children:v.jsx(fe,{size:p,...g("group"),...d})})});l0.classes=s0;l0.varsResolver=GB;l0.displayName="@mantine/core/PillGroup";const ute={variant:"default"},YB=(e,{radius:n},{size:t})=>({root:{"--pill-fz":Ln(t,"pill-fz"),"--pill-height":Ln(t,"pill-height"),"--pill-radius":n===void 0?void 0:qt(n)}}),xl=Pe(e=>{const n=ye("Pill",ute,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,variant:u,children:f,withRemoveButton:h,onRemove:d,removeButtonProps:p,radius:g,size:b,disabled:w,mod:k,attributes:_,...S}=n,j=x.use(WB),T=x.use(o0),A=b||(j==null?void 0:j.size)||void 0,O=(T==null?void 0:T.variant)==="filled"?"contrast":u||"default",M=Ze({name:"Pill",classes:s0,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_,vars:l,varsResolver:YB,stylesCtx:{size:A}});return v.jsxs(fe,{component:"span",variant:O,size:A,...M("root",{variant:O}),mod:[{"with-remove":h&&!w,disabled:w||(j==null?void 0:j.disabled)},k],...S,children:[v.jsx("span",{...M("label"),children:f}),h&&v.jsx(jl,{variant:"transparent",radius:g,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,$)}})]})});xl.classes=s0;xl.varsResolver=YB;xl.displayName="@mantine/core/Pill";xl.Group=l0;var KB={field:"m_45c4369d"};const cte={type:"visible"},t9=Pe(e=>{const n=ye("PillsInputField",cte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,type:u,disabled:f,id:h,pointer:d,mod:p,attributes:g,ref:b,...w}=n,k=x.use(o0),_=x.use(Hu),S=Ze({name:"PillsInputField",classes:KB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:g,rootSelector:"field"}),j=f||(k==null?void 0:k.disabled);return v.jsx(fe,{component:"input",ref:Ht(b,k==null?void 0:k.fieldRef),"data-type":u,disabled:j,mod:[{disabled:j,pointer:d},p],...S("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:T=>!d&&T.stopPropagation()})});t9.classes=KB;t9.displayName="@mantine/core/PillsInputField";const fte={size:"sm"},Mu=Pe(e=>{const{children:n,onMouseDown:t,onClick:i,size:r,disabled:a,__staticSelector:o,error:l,variant:u,...f}=ye("PillsInput",fte,e),h=x.useRef(null);return v.jsx(o0,{value:{fieldRef:h,size:r,disabled:a,hasError:!!l,variant:u},children:v.jsx(Ni,{size:r,error:l,variant:u,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,g;d.preventDefault(),(p=d.currentTarget.closest("fieldset"))!=null&&p.disabled||((g=h.current)==null||g.focus(),i==null||i(d))},...f,multiline:!0,disabled:a,__staticSelector:o||"PillsInput",withAria:!1,children:n})})});Mu.displayName="@mantine/core/PillsInput";Mu.classes=Ni.classes;Mu.Field=t9;function Lk(e){return typeof e=="string"?e.trim().toLowerCase():e}function dte({data:e,value:n}){const t=n.map(Lk);return e.reduce((i,r)=>(Eu(r)?i.push({group:r.group,items:r.items.filter(a=>t.indexOf(Lk(a.value))===-1)}):t.indexOf(Lk(r.value))===-1&&i.push(r),i),[])}const FE={xs:41,sm:50,md:60,lg:72,xl:89},hte={maxValues:1/0,withCheckIcon:!0,checkIconPosition:"left",hiddenInputValuesDivider:",",clearSearchOnChange:!0,openOnFocus:!0,size:"sm"},u0=sp(e=>{const n=ye("MultiSelect",hte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:u,value:f,defaultValue:h,onChange:d,onKeyDown:p,variant:g,data:b,dropdownOpened:w,defaultDropdownOpened:k,onDropdownOpen:_,onDropdownClose:S,selectFirstOptionOnChange:j,selectFirstOptionOnDropdownOpen:T,onOptionSubmit:A,comboboxProps:O,filter:M,limit:$,withScrollArea:q,maxDropdownHeight:P,searchValue:L,defaultSearchValue:U,onSearchChange:G,readOnly:B,disabled:R,onFocus:D,onBlur:z,radius:H,rightSection:Y,rightSectionWidth:N,rightSectionPointerEvents:W,rightSectionProps:V,leftSection:I,leftSectionWidth:Q,leftSectionPointerEvents:ie,leftSectionProps:re,inputContainer:Z,inputWrapperOrder:le,withAsterisk:ee,labelProps:se,descriptionProps:ke,errorProps:te,wrapperProps:$e,description:xe,label:Ae,error:ze,maxValues:we,searchable:Ce,nothingFoundMessage:Ne,withCheckIcon:he,withAlignedLabels:He,checkIconPosition:Ye,hidePickedOptions:We,withErrorStyles:Qe,name:Je,form:oe,id:be,clearable:Ke,clearSectionMode:en,clearButtonProps:je,hiddenInputProps:an,placeholder:pn,hiddenInputValuesDivider:Dn,required:bn,mod:sn,renderOption:nn,renderPill:$n,onRemove:De,onClear:Fe,onMaxValues:Vn,scrollAreaProps:En,chevronColor:gn,attributes:xn,clearSearchOnChange:at,openOnFocus:Mt,loading:qe,loadingPosition:Ue,...In}=n,ot=Pi(be),Pn=Ly(b),rn=vp(Pn),on=x.useRef({}),ln=Vf({opened:w,defaultOpened:k,onDropdownOpen:()=>{_==null||_(),T&&ln.selectFirstOption()},onDropdownClose:()=>{S==null||S(),ln.resetSelectedOption()}}),{styleProps:Kn,rest:{type:Xn,autoComplete:Lt,...Rn}}=Fu(In),[Mn,Qn]=Ai({value:f,defaultValue:h,finalValue:[],onChange:d}),[Dt,fi]=Ai({value:L,defaultValue:U,finalValue:"",onChange:G}),zi=cn=>{fi(cn),ln.resetSelectedOption()},Ya=Ze({name:"MultiSelect",classes:{},props:n,classNames:t,styles:a,unstyled:o,attributes:xn}),{resolvedClassNames:Co,resolvedStyles:Ta}=Wi({props:n,styles:a,classNames:t}),dr=cn=>{p==null||p(cn),cn.key===" "&&!Ce&&(cn.preventDefault(),ln.toggleDropdown()),cn.key==="Backspace"&&Dt.length===0&&Mn.length>0&&(De==null||De(Mn[Mn.length-1]),Qn(Mn.slice(0,Mn.length-1)))},jo=Mn.map((cn,Mr)=>{var Kr;const Ao=rn[`${cn}`]||on.current[`${cn}`];return $n?v.jsx(x.Fragment,{children:$n({option:Ao,value:cn,onRemove:()=>{Qn(Mn.filter(Xr=>cn!==Xr)),De==null||De(cn)},disabled:R})},`${cn}-${Mr}`):v.jsx(xl,{withRemoveButton:!B&&!((Kr=rn[`${cn}`])!=null&&Kr.disabled),onRemove:()=>{Qn(Mn.filter(Xr=>cn!==Xr)),De==null||De(cn)},unstyled:o,disabled:R,...Ya("pill"),children:(Ao==null?void 0:Ao.label)||cn},`${cn}-${Mr}`)});x.useEffect(()=>{j&&ln.selectFirstOption()},[j,Dt]),x.useEffect(()=>{Mn.forEach(cn=>{`${cn}`in rn&&(on.current[`${cn}`]=rn[`${cn}`])})},[rn,Mn]);const Er=v.jsx(On.ClearButton,{...je,onClear:()=>{Fe==null||Fe(),Qn([]),zi("")}}),hr=dte({data:Pn,value:Mn}),yn=Ke&&Mn.length>0&&!R&&!B,oi=yn?{paddingInlineEnd:FE[u]??FE.sm}:void 0;return v.jsxs(v.Fragment,{children:[v.jsxs(On,{store:ln,classNames:Co,styles:Ta,unstyled:o,size:u,readOnly:B,__staticSelector:"MultiSelect",attributes:xn,onOptionSubmit:cn=>{A==null||A(cn),at&&zi(""),ln.updateSelectedOptionIndex("selected"),Mn.includes(rn[`${cn}`].value)?(Qn(Mn.filter(Mr=>Mr!==rn[`${cn}`].value)),De==null||De(rn[`${cn}`].value)):Mn.lengthCe?ln.openDropdown():ln.toggleDropdown(),"data-expanded":ln.dropdownOpened||void 0,id:ot,required:bn,mod:sn,attributes:xn,children:v.jsxs(xl.Group,{attributes:xn,disabled:R,unstyled:o,...Ya("pillsList",{style:oi}),children:[jo,v.jsx(On.EventsTarget,{autoComplete:Lt,withExpandedAttribute:!0,children:v.jsx(Mu.Field,{...Rn,id:ot,placeholder:pn,type:!Ce&&!pn?"hidden":"visible",...Ya("inputField"),unstyled:o,onFocus:cn=>{D==null||D(cn),Mt&&Ce&&ln.openDropdown()},onBlur:cn=>{z==null||z(cn),ln.closeDropdown(),zi("")},onKeyDown:dr,value:Dt,onChange:cn=>{zi(cn.currentTarget.value),Ce&&ln.openDropdown(),j&&ln.selectFirstOption()},disabled:R,readOnly:B||!Ce,pointer:!Ce})})]})})}),v.jsx(qy,{data:We?hr:Pn,hidden:B||R,filter:M,search:Dt,limit:$,hiddenWhenEmpty:!Ne,withScrollArea:q,maxDropdownHeight:P,filterOptions:Ce,value:Mn,checkIconPosition:Ye,withCheckIcon:he,withAlignedLabels:He,nothingFoundMessage:Ne,unstyled:o,labelId:Ae?`${ot}-label`:void 0,"aria-label":Ae?void 0:In["aria-label"],renderOption:nn,scrollAreaProps:En})]}),v.jsx(On.HiddenInput,{name:Je,valuesDivider:Dn,value:Mn,form:oe,disabled:R,...an})]})});u0.classes={...Ni.classes,...On.classes};u0.displayName="@mantine/core/MultiSelect";var XB={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};const mte={withCloseButton:!0},ZB=(e,{radius:n,color:t})=>({root:{"--notification-radius":n===void 0?void 0:qt(n),"--notification-color":t?ft(t,e):void 0}}),c0=Pe(e=>{const n=ye("Notification",mte,e),{className:t,color:i,radius:r,loading:a,withCloseButton:o,withBorder:l,title:u,icon:f,children:h,onClose:d,closeButtonProps:p,classNames:g,style:b,styles:w,unstyled:k,vars:_,mod:S,loaderProps:j,role:T,attributes:A,...O}=n,M=Ze({name:"Notification",classes:XB,props:n,className:t,style:b,classNames:g,styles:w,unstyled:k,attributes:A,vars:_,varsResolver:ZB});return v.jsxs(fe,{...M("root"),mod:[{"data-with-icon":!!f||a,"data-with-border":l},S],role:T||"alert",...O,children:[f&&!a&&v.jsx("div",{...M("icon"),children:f}),a&&v.jsx(Zt,{size:28,color:i,...M("loader"),...j}),v.jsxs("div",{...M("body"),children:[u&&v.jsx("div",{...M("title"),children:u}),v.jsx(fe,{...M("description"),mod:{"data-with-title":!!u},children:h})]}),o&&v.jsx(jl,{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")})]})});c0.classes=XB;c0.varsResolver=ZB;c0.displayName="@mantine/core/Notification";function QB(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+HE("0",o-l):r=(r.substring(0,o)||"0")+"."+r.substring(o),t+r}function UE(e,n,t){if(["","-"].indexOf(e)!==-1)return e;var i=(e.indexOf(".")!==-1||t)&&n,r=i9(e),a=r.beforeDecimal,o=r.afterDecimal,l=r.hasNegation,u=parseFloat("0."+(o||"0")),f=o.length<=n?"0."+o:u.toFixed(n),h=f.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=nF(h[1]||"",n,t),g=l?"-":"",b=i?".":"";return""+g+d+b+p}function gu(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 iF=pte(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}}}),wte=function(e,n){var t=Math.min(e.selectionStart,n);return{from:{start:t,end:e.selectionEnd},to:{start:t,end:n}}};function kte(e,n,t){return Math.min(Math.max(e,n),t)}function Ik(e){return Math.max(e.selectionStart,e.selectionEnd)}function _te(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function xte(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function Ste(e){var n=e.currentValue,t=e.formattedValue,i=e.currentValueIndex,r=e.formattedValueIndex;return n[i]===t[r]}function Cte(e,n,t,i,r,a,o){o===void 0&&(o=Ste);var l=r.findIndex(function(T){return T}),u=e.slice(0,l);!n&&!t.startsWith(u)&&(n=u,t=u+t,i=i+u.length);for(var f=t.length,h=e.length,d={},p=new Array(f),g=0;g0&&p[_]===-1;)_--;var j=_===-1||p[_]===-1?0:p[_]+1;return j>S?S:i-j=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 jte(e){for(var n=Array.from({length:e.length+1}).map(function(){return!0}),t=0,i=n.length;tM.length-o.length||OL||d>e.length-o.length)&&(P=d),e=e.substring(0,P),e=Ete(j?"-"+e:e,r),e=(e.match(Mte(b))||[]).join("");var U=e.indexOf(b);e=e.replace(new RegExp(eF(b),"g"),function(z,H){return H===U?".":""});var G=i9(e,r),B=G.beforeDecimal,R=G.afterDecimal,D=G.addNegation;return f.end-f.startW?!1:N>=ie.start&&Nt?t:e}function Ite(e){return e.toString().replace(".","").length}function Bte(e,n){return(typeof e=="number"?e=n)&&(t===void 0||e<=t)}const Hk={size:"sm",step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[".",","]},oF=(e,{size:n})=>({controls:{"--ni-chevron-size":Ln(n,"ni-chevron-size")}});function qte(e,n,t){const i=e.toString(),r=rF.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=Jo(o,t,n);return r?`${l.toString().replace(/^0+(?=\d)/,"")}.`:l}function Hte(e,n){if(e===""||e==="-")return e;const t=Ih(e);return t===null?e:n.clampBehavior==="blur"?zg(t,n.min,n.max):t}const vm=sp(e=>{const n=ye("NumberInput",Hk,e),{className:t,classNames:i,styles:r,unstyled:a,vars:o,onChange:l,onValueChange:u,value:f,defaultValue:h,max:d,min:p,step:g,hideControls:b,rightSection:w,isAllowed:k,clampBehavior:_,onBlur:S,allowDecimal:j,decimalScale:T,onKeyDown:A,onKeyDownCapture:O,handlersRef:M,startValue:$,disabled:q,rightSectionPointerEvents:P,allowNegative:L,readOnly:U,size:G,rightSectionWidth:B,stepHoldInterval:R,stepHoldDelay:D,allowLeadingZeros:z,withKeyboardEvents:H,trimLeadingZeroesOnBlur:Y,allowedDecimalSeparators:N,selectAllOnFocus:W,onMinReached:V,onMaxReached:I,onFocus:Q,attributes:ie,ref:re,...Z}=n,le=L??!0,ee=z??!0,se=Ze({name:"NumberInput",classes:US,props:n,classNames:i,styles:r,unstyled:a,attributes:ie,vars:o,varsResolver:oF}),{resolvedClassNames:ke,resolvedStyles:te}=Wi({classNames:i,styles:r,props:n}),$e=x.useRef(Bk(f)||Bk(h)?"bigint":"number");Bk(f)?$e.current="bigint":typeof f=="number"&&($e.current="number");const xe=$e.current==="bigint",[Ae,ze]=Ai({value:f,defaultValue:h,finalValue:"",onChange:l}),we=D!==void 0&&R!==void 0,Ce=x.useRef(null),Ne=x.useRef(null),he=x.useRef(0),He=typeof p=="number"?p:void 0,Ye=typeof d=="number"?d:void 0,We=typeof g=="number"?g:Hk.step,Qe=typeof $=="number"?$:Hk.startValue,Je=rg(p),oe=rg(d),be=rg(g)??BigInt(1),Ke=rg($)??BigInt(0),en=qe=>!aF(qe,le)||ee&&YE.test(qe)?qe:Ih(qe)??qe,je=qe=>{const Ue=Number(qe);return Number.isSafeInteger(Ue)?Ue:void 0},an=(qe,Ue)=>{Ue.source==="event"&&ze(xe?en(qe.value):Bte(qe.floatValue,qe.value)&&!zte.test(qe.value)&&!(ee&&YE.test(qe.value))&&!Lte.test(qe.value)&&!rF.test(qe.value)?qe.floatValue:qe.value),u==null||u(qe,Ue)},pn=qe=>{const Ue=String(qe).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return Ue?Math.max(0,(Ue[1]?Ue[1].length:0)-(Ue[2]?+Ue[2]:0)):0},Dn=qe=>{Ce.current&&typeof qe<"u"&&Ce.current.setSelectionRange(qe,qe)},bn=x.useRef(jS);bn.current=()=>{if(xe){if(!qk(Ae,le))return;let on;const ln=Ae;if(typeof ln=="bigint"){const Xn=ln+be;oe!==void 0&&Xn>oe&&(I==null||I()),on=oe!==void 0&&Xn>oe?oe:Xn}else if(typeof ln=="string"&&ln!==""){const Xn=Ih(ln);if(Xn===null)return;const Lt=Xn+be;oe!==void 0&&Lt>oe&&(I==null||I()),on=oe!==void 0&&Lt>oe?oe:Lt}else on=zg(Ke,Je,oe);const Kn=on.toString();ze(on),u==null||u({floatValue:je(on),formattedValue:Kn,value:Kn},{source:"increment"}),setTimeout(()=>{var Xn;return Dn((Xn=Ce.current)==null?void 0:Xn.value.length)},0);return}if(!Fk(Ae))return;let qe;const Ue=pn(Ae),In=pn(We),ot=Math.max(Ue,In),Pn=10**ot;if(!VS(Ae)&&(typeof Ae!="number"||Number.isNaN(Ae)))qe=Jo(Qe,He,Ye);else if(Ye!==void 0){const on=(Math.round(Number(Ae)*Pn)+Math.round(We*Pn))/Pn;on>Ye&&(I==null||I()),qe=on<=Ye?on:Ye}else qe=(Math.round(Number(Ae)*Pn)+Math.round(We*Pn))/Pn;const rn=qe.toFixed(ot);ze(parseFloat(rn)),u==null||u({floatValue:parseFloat(rn),formattedValue:rn,value:rn},{source:"increment"}),setTimeout(()=>{var on;return Dn((on=Ce.current)==null?void 0:on.value.length)},0)};const sn=x.useRef(jS);sn.current=()=>{if(xe){if(!qk(Ae,le))return;let ln;const Kn=Je!==void 0?Je:le?void 0:BigInt(0),Xn=Ae;if(typeof Xn=="bigint"){const Rn=Xn-be;Kn!==void 0&&Rn{var Rn;return Dn((Rn=Ce.current)==null?void 0:Rn.value.length)},0);return}if(!Fk(Ae))return;let qe;const Ue=He!==void 0?He:le?Number.MIN_SAFE_INTEGER:0,In=pn(Ae),ot=pn(We),Pn=Math.max(In,ot),rn=10**Pn;if(!VS(Ae)&&typeof Ae!="number"||Number.isNaN(Ae))qe=Jo(Qe,Ue,Ye);else{const ln=(Math.round(Number(Ae)*rn)-Math.round(We*rn))/rn;Ue!==void 0&&ln{var ln;return Dn((ln=Ce.current)==null?void 0:ln.value.length)},0)};const nn=qe=>{var Pn,rn,on;const Ue=qe.clipboardData.getData("text"),In=Z.decimalSeparator||".",ot=(N||[".",","]).filter(ln=>ln!==In);if(ot.some(ln=>Ue.includes(ln))){qe.preventDefault();let ln=Ue;ot.forEach(Xn=>{ln=ln.split(Xn).join(In)});const Kn=Ce.current;if(Kn){const Xn=Kn.selectionStart??0,Lt=Kn.selectionEnd??0,Rn=Kn.value,Mn=Rn.substring(0,Xn)+ln+Rn.substring(Lt);(rn=(Pn=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:Pn.set)==null||rn.call(Kn,Mn),Kn.dispatchEvent(new Event("change",{bubbles:!0}));const Qn=Xn+ln.length;setTimeout(()=>Dn(Qn),0)}}(on=Z.onPaste)==null||on.call(Z,qe)},$n=qe=>{var Ue,In;A==null||A(qe),!(U||!H)&&(qe.key==="ArrowUp"&&(qe.preventDefault(),(Ue=bn.current)==null||Ue.call(bn)),qe.key==="ArrowDown"&&(qe.preventDefault(),(In=sn.current)==null||In.call(sn)))},De=qe=>{if(O==null||O(qe),qe.key==="Backspace"){const Ue=Ce.current;Ue&&Ue.selectionStart===0&&Ue.selectionStart===Ue.selectionEnd&&(qe.preventDefault(),window.setTimeout(()=>Dn(0),0))}},Fe=qe=>{W&&setTimeout(()=>qe.currentTarget.select(),0),Q==null||Q(qe)},Vn=qe=>{let Ue=Ae;xe?(_==="blur"&&typeof Ue=="bigint"&&(Ue=zg(Ue,Je,oe)),Y&&typeof Ue=="string"&&(Ue=Hte(Ue,{min:Je,max:oe,clampBehavior:_}))):(_==="blur"&&typeof Ue=="number"&&(Ue=Jo(Ue,He,Ye)),Y&&typeof Ue=="string"&&pn(Ue)<15&&(Ue=qte(Ue,Ye,He))),Ae!==Ue&&ze(Ue),S==null||S(qe)};cm(M,{increment:bn.current,decrement:sn.current});const En=qe=>{var Ue,In;qe?(Ue=bn.current)==null||Ue.call(bn):(In=sn.current)==null||In.call(sn),he.current+=1},gn=qe=>{if(En(qe),we){const Ue=typeof R=="number"?R:R(he.current);Ne.current=window.setTimeout(()=>gn(qe),Ue)}},xn=(qe,Ue)=>{var In;qe.preventDefault(),(In=Ce.current)==null||In.focus(),En(Ue),we&&(Ne.current=window.setTimeout(()=>gn(Ue),D))},at=()=>{Ne.current&&window.clearTimeout(Ne.current),Ne.current=null,he.current=0},Mt=v.jsxs("div",{...se("controls"),children:[v.jsx(Et,{...se("control"),tabIndex:-1,"aria-hidden":!0,disabled:q||typeof Ae=="number"&&Ye!==void 0&&Ae>=Ye||typeof Ae=="bigint"&&oe!==void 0&&Ae>=oe,mod:{direction:"up"},onMouseDown:qe=>qe.preventDefault(),onPointerDown:qe=>{xn(qe,!0)},onPointerUp:at,onPointerLeave:at,children:v.jsx(GE,{direction:"up"})}),v.jsx(Et,{...se("control"),tabIndex:-1,"aria-hidden":!0,disabled:q||typeof Ae=="number"&&He!==void 0&&Ae<=He||typeof Ae=="bigint"&&Je!==void 0&&Ae<=Je,mod:{direction:"down"},onMouseDown:qe=>qe.preventDefault(),onPointerDown:qe=>{xn(qe,!1)},onPointerUp:at,onPointerLeave:at,children:v.jsx(GE,{direction:"down"})})]});return v.jsx(Ni,{component:$te,allowNegative:L,className:vn(US.root,t),size:G,...Z,inputMode:xe?"numeric":"decimal",readOnly:U,disabled:q,value:typeof Ae=="bigint"?Ae.toString():Ae,getInputRef:Ht(re,Ce),onValueChange:an,rightSection:b||U||!(xe?qk(Ae,le):Fk(Ae))?w:w||Mt,classNames:ke,styles:te,unstyled:a,__staticSelector:"NumberInput",decimalScale:xe?0:j?T:0,onPaste:nn,onFocus:Fe,onKeyDown:$n,onKeyDownCapture:De,rightSectionPointerEvents:P??(q?"none":void 0),rightSectionWidth:B??`var(--ni-right-section-width-${G||"sm"})`,allowLeadingZeros:z,allowedDecimalSeparators:N,onBlur:Vn,attributes:ie,isAllowed:qe=>{if(!(!k||k(qe)))return!1;if(_!=="strict")return!0;if(!xe)return Fte(qe.floatValue,He,Ye);if(qe.value===""||qe.value==="-")return!0;const Ue=Ih(qe.value);return Ue===null?!0:(Je===void 0||Ue>=Je)&&(oe===void 0||Ue<=oe)}})});vm.classes={...Ni.classes,...US};vm.varsResolver=oF;vm.displayName="@mantine/core/NumberInput";function Ute({reveal:e}){return v.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?v.jsxs(v.Fragment,{children:[v.jsx("path",{fill:"none",d:"M0 0h256v256H0z"}),v.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"}),v.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"})]}):v.jsxs(v.Fragment,{children:[v.jsx("path",{fill:"none",d:"M0 0h256v256H0z"}),v.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"}),v.jsx("circle",{cx:"128",cy:"128",r:"40",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"})]})})}var WS={root:"m_f61ca620",input:"m_ccf8da4c",innerInput:"m_f2d85dd2",visibilityToggle:"m_b1072d44"};const Vte={visibilityToggleIcon:Ute,size:"sm"},sF=(e,{size:n})=>({root:{"--psi-icon-size":Ln(n,"psi-icon-size"),"--psi-button-size":Ln(n,"psi-button-size")}}),d0=Pe(e=>{const n=ye("PasswordInput",Vte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,required:u,error:f,leftSection:h,disabled:d,id:p,variant:g,inputContainer:b,description:w,label:k,size:_,errorProps:S,descriptionProps:j,labelProps:T,withAsterisk:A,inputWrapperOrder:O,wrapperProps:M,radius:$,rightSection:q,rightSectionWidth:P,rightSectionPointerEvents:L,leftSectionWidth:U,visible:G,defaultVisible:B,onVisibilityChange:R,visibilityToggleIcon:D,visibilityToggleButtonProps:z,rightSectionProps:H,leftSectionProps:Y,leftSectionPointerEvents:N,withErrorStyles:W,mod:V,attributes:I,...Q}=n,ie=Pi(p),[re,Z]=Ai({value:G,defaultValue:B,finalValue:!1,onChange:R}),le=()=>Z(!re),ee=Ze({name:"PasswordInput",classes:WS,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:I,vars:l,varsResolver:sF}),{resolvedClassNames:se,resolvedStyles:ke}=Wi({classNames:t,styles:a,props:n}),{styleProps:te,rest:$e}=Fu(Q),xe=(S==null?void 0:S.id)||`${ie}-error`,Ae=(j==null?void 0:j.id)||`${ie}-description`,ze=`${f&&typeof f!="boolean"?xe:""} ${w?Ae:""}`,we=ze.trim().length>0?ze.trim():void 0,Ce=v.jsx(Jn,{...ee("visibilityToggle"),disabled:d,radius:$,"aria-pressed":re,tabIndex:-1,"aria-label":"Toggle password visibility",...z,variant:(z==null?void 0:z.variant)??"subtle",color:"gray",unstyled:o,onTouchEnd:Ne=>{var he;Ne.preventDefault(),(he=z==null?void 0:z.onTouchEnd)==null||he.call(z,Ne),le()},onMouseDown:Ne=>{var he;Ne.preventDefault(),(he=z==null?void 0:z.onMouseDown)==null||he.call(z,Ne),le()},onKeyDown:Ne=>{var he;(he=z==null?void 0:z.onKeyDown)==null||he.call(z,Ne),Ne.key===" "&&(Ne.preventDefault(),le())},children:v.jsx(D,{reveal:re})});return v.jsx(Xt.Wrapper,{required:u,id:ie,label:k,error:f,description:w,size:_,classNames:se,styles:ke,__staticSelector:"PasswordInput",__stylesApiProps:n,unstyled:o,withAsterisk:A,inputWrapperOrder:O,inputContainer:b,variant:g,labelProps:{...T,htmlFor:ie},descriptionProps:{...j,id:Ae},errorProps:{...S,id:xe},mod:V,attributes:I,...ee("root"),...te,...M,children:v.jsx(Xt,{component:"div",error:f,leftSection:h,size:_,classNames:{...se,input:vn(WS.input,se==null?void 0:se.input)},styles:ke,radius:$,disabled:d,__staticSelector:"PasswordInput",__stylesApiProps:n,rightSectionWidth:P,rightSection:q??Ce,variant:g,unstyled:o,leftSectionWidth:U,rightSectionPointerEvents:L||"all",rightSectionProps:H,leftSectionProps:Y,leftSectionPointerEvents:N,withAria:!1,withErrorStyles:W,attributes:I,children:v.jsx("input",{required:u,"data-invalid":!!f||void 0,"data-with-left-section":!!h||void 0,...ee("innerInput"),disabled:d,id:ie,...$e,"aria-describedby":we,autoComplete:$e.autoComplete||"off",type:re?"text":"password"})})})});d0.classes={...Ni.classes,...WS};d0.varsResolver=sF;d0.displayName="@mantine/core/PasswordInput";function Wte({offset:e,position:n,defaultOpened:t}){const[i,r]=x.useState(t),a=x.useRef(null),{x:o,y:l,elements:u,refs:f,update:h,placement:d}=Dy({placement:n,middleware:[pC({crossAxis:!0,padding:5,rootBoundary:"document"})]}),p=d.includes("right")?e:n.includes("left")?e*-1:0,g=d.includes("bottom")?e:n.includes("top")?e*-1:0,b=x.useCallback(({clientX:w,clientY:k})=>{f.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:w,y:k,left:w+p,top:k+g,right:w,bottom:k}}})},[u.reference]);return x.useEffect(()=>{if(f.floating.current){const w=a.current;w.addEventListener("mousemove",b);const k=ns(f.floating.current);return k.forEach(_=>{_.addEventListener("scroll",h)}),()=>{w.removeEventListener("mousemove",b),k.forEach(_=>{_.removeEventListener("scroll",h)})}}},[u.reference,f.floating.current,h,b,i]),{handleMouseMove:b,x:o,y:l,opened:i,setOpened:r,boundaryRef:a,floating:f.setFloating}}var h0={tooltip:"m_1b3c8819",arrow:"m_f898399f"};const Gte={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:xa("popover")},lF=(e,{radius:n,color:t})=>({tooltip:{"--tooltip-radius":n===void 0?void 0:qt(n),"--tooltip-bg":t?ft(t,e):void 0,"--tooltip-color":t?"var(--mantine-color-white)":void 0}}),m0=Pe(e=>{const n=ye("TooltipFloating",Gte,e),{children:t,refProp:i,withinPortal:r,style:a,className:o,classNames:l,styles:u,unstyled:f,radius:h,color:d,label:p,offset:g,position:b,multiline:w,zIndex:k,disabled:_,defaultOpened:S,variant:j,vars:T,portalProps:A,attributes:O,ref:M,...$}=n,q=ci(),P=Ze({name:"TooltipFloating",props:n,classes:h0,className:o,style:a,classNames:l,styles:u,unstyled:f,attributes:O,rootSelector:"tooltip",vars:T,varsResolver:lF}),{handleMouseMove:L,x:U,y:G,opened:B,boundaryRef:R,floating:D,setOpened:z}=Wte({offset:g,position:b,defaultOpened:S}),H=Cl(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=Ht(R,xy(H),M),N=H.props,W=I=>{var Q;(Q=N.onMouseEnter)==null||Q.call(N,I),L(I),z(!0)},V=I=>{var Q;(Q=N.onMouseLeave)==null||Q.call(N,I),z(!1)};return v.jsxs(v.Fragment,{children:[v.jsx(wl,{...A,withinPortal:r,children:v.jsx(fe,{...$,...P("tooltip",{style:{...nL(a,q),zIndex:k,display:!_&&B?"block":"none",top:(G&&Math.round(G))??"",left:(U&&Math.round(U))??""}}),variant:j,ref:D,mod:{multiline:w},children:p})}),x.cloneElement(H,{...N,[i]:Y,onMouseEnter:W,onMouseLeave:V})]})});m0.classes=h0;m0.varsResolver=lF;m0.displayName="@mantine/core/TooltipFloating";const uF=x.createContext({withinGroup:!1}),Yte={openDelay:0,closeDelay:0};function r9(e){const{openDelay:n,closeDelay:t,children:i}=ye("TooltipGroup",Yte,e);return v.jsx(uF,{value:{withinGroup:!0},children:v.jsx(PL,{delay:{open:n,close:t},children:i})})}r9.displayName="@mantine/core/TooltipGroup";r9.extend=e=>e;function Kte(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 Xte(e){const n=Kte(e.middlewares),t=[OL(e.offset)];return n.shift&&t.push(pC(typeof n.shift=="boolean"?{padding:8}:{padding:8,...n.shift})),n.flip&&t.push(typeof n.flip=="boolean"?Qg():Qg(n.flip)),t.push(TL({element:e.arrowRef,padding:e.arrowOffset})),n.inline?t.push(typeof n.inline=="boolean"?Kh():Kh(n.inline)):e.inline&&t.push(Kh()),t}function Zte(e){var T,A,O;const[n,t]=x.useState(e.defaultOpened),i=typeof e.opened=="boolean"?e.opened:n,r=x.use(uF).withinGroup,a=Pi(),o=x.useCallback(M=>{t(M),M&&k(a)},[a]),{x:l,y:u,context:f,refs:h,placement:d,middlewareData:{arrow:{x:p,y:g}={}}}=Dy({strategy:e.strategy,placement:e.position,open:i,onOpenChange:o,middleware:Xte(e),whileElementsMounted:zS}),{delay:b,currentId:w,setCurrentId:k}=NL(f,{id:a}),{getReferenceProps:_,getFloatingProps:S}=zL([DL(f,{enabled:(T=e.events)==null?void 0:T.hover,delay:r?b:{open:e.openDelay,close:e.closeDelay},mouseOnly:!((A=e.events)!=null&&A.touch)}),kJ(f,{enabled:(O=e.events)==null?void 0:O.focus,visibleOnly:!0}),LL(f,{role:"tooltip"}),$L(f,{enabled:typeof e.opened>"u"})]);os(()=>{var M;(M=e.onPositionChange)==null||M.call(e,d)},[d]);const j=i&&w&&w!==a;return{x:l,y:u,arrowX:p,arrowY:g,reference:h.setReference,floating:h.setFloating,getFloatingProps:S,getReferenceProps:_,isGroupPhase:j,opened:i,placement:d}}const Qte={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:xa("popover"),middlewares:{flip:!0,shift:!0,inline:!1}},cF=(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:qt(n),"--tooltip-bg":t?a.background:void 0,"--tooltip-color":t?a.color:void 0}}},wt=Pe(e=>{const n=ye("Tooltip",Qte,e),{children:t,position:i,refProp:r,label:a,openDelay:o,closeDelay:l,onPositionChange:u,opened:f,defaultOpened:h,withinPortal:d,radius:p,color:g,classNames:b,styles:w,unstyled:k,style:_,className:S,withArrow:j,arrowSize:T,arrowOffset:A,arrowRadius:O,arrowPosition:M,offset:$,transitionProps:q,multiline:P,events:L,zIndex:U,disabled:G,onClick:B,onMouseEnter:R,onMouseLeave:D,inline:z,variant:H,keepMounted:Y,vars:N,portalProps:W,mod:V,floatingStrategy:I,middlewares:Q,autoContrast:ie,attributes:re,target:Z,ref:le,...ee}=n,{dir:se}=qu(),ke=x.useRef(null),te=Zte({position:VL(se,i),closeDelay:l,openDelay:o,onPositionChange:u,opened:f,defaultOpened:h,events:L,arrowRef:ke,arrowOffset:A,offset:typeof $=="number"?$+(j?T/2:0):$,inline:z,strategy:I,middlewares:Q});x.useEffect(()=>{const Ne=Z instanceof HTMLElement?Z:typeof Z=="string"?document.querySelector(Z):(Z==null?void 0:Z.current)||null;Ne&&te.reference(Ne)},[Z,te]);const $e=Ze({name:"Tooltip",props:n,classes:h0,className:S,style:_,classNames:b,styles:w,unstyled:k,attributes:re,rootSelector:"tooltip",vars:N,varsResolver:cF}),xe=Cl(t);if(!Z&&!xe)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 Ae=$e("tooltip");if(Z){const Ne=wE(q,{duration:100,transition:"fade"});return v.jsx(v.Fragment,{children:v.jsx(wl,{...W,withinPortal:d,children:v.jsx(ls,{...Ne,keepMounted:Y,mounted:!G&&!!te.opened,duration:te.isGroupPhase?10:Ne.duration,children:he=>v.jsxs(fe,{...ee,"data-fixed":I==="fixed"||void 0,variant:H,mod:[{multiline:P},V],...Ae,...te.getFloatingProps({ref:te.floating,className:Ae.className,style:{...Ae.style,...he,zIndex:U,top:te.y??0,left:te.x??0}}),children:[a,v.jsx(Jg,{ref:ke,arrowX:te.arrowX,arrowY:te.arrowY,visible:j,position:te.placement,arrowSize:T,arrowOffset:A,arrowRadius:O,arrowPosition:M,...$e("arrow")})]})})})})}const ze=xe.props,we=Ht(te.reference,xy(xe),le),Ce=wE(q,{duration:100,transition:"fade"});return v.jsxs(v.Fragment,{children:[v.jsx(wl,{...W,withinPortal:d,children:v.jsx(ls,{...Ce,keepMounted:Y,mounted:!G&&!!te.opened,duration:te.isGroupPhase?10:Ce.duration,children:Ne=>v.jsxs(fe,{...ee,"data-fixed":I==="fixed"||void 0,variant:H,mod:[{multiline:P},V],...te.getFloatingProps({ref:te.floating,className:$e("tooltip").className,style:{...$e("tooltip").style,...Ne,zIndex:U,top:te.y??0,left:te.x??0}}),children:[a,v.jsx(Jg,{ref:ke,arrowX:te.arrowX,arrowY:te.arrowY,visible:j,position:te.placement,arrowSize:T,arrowOffset:A,arrowRadius:O,arrowPosition:M,...$e("arrow")})]})})}),x.cloneElement(xe,te.getReferenceProps({onClick:B,onMouseEnter:R,onMouseLeave:D,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,...ze,className:vn(S,ze.className),[r]:we}))]})});wt.classes=h0;wt.varsResolver=cF;wt.displayName="@mantine/core/Tooltip";wt.Floating=m0;wt.Group=r9;const Jte={size:"sm",withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left",openOnFocus:!0},jr=sp(e=>{const n=ye("Select",Jte,e),{classNames:t,styles:i,unstyled:r,vars:a,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:u,onDropdownOpen:f,onFocus:h,onBlur:d,onClick:p,onChange:g,data:b,value:w,defaultValue:k,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:S,onOptionSubmit:j,comboboxProps:T,readOnly:A,disabled:O,filter:M,limit:$,withScrollArea:q,maxDropdownHeight:P,size:L,searchable:U,rightSection:G,checkIconPosition:B,withCheckIcon:R,withAlignedLabels:D,nothingFoundMessage:z,name:H,form:Y,searchValue:N,defaultSearchValue:W,onSearchChange:V,allowDeselect:I,error:Q,rightSectionPointerEvents:ie,id:re,clearable:Z,clearSectionMode:le,clearButtonProps:ee,hiddenInputProps:se,renderOption:ke,onClear:te,autoComplete:$e,scrollAreaProps:xe,__defaultRightSection:Ae,__clearSection:ze,__clearable:we,chevronColor:Ce,autoSelectOnBlur:Ne,openOnFocus:he,attributes:He,...Ye}=n,We=x.useMemo(()=>Ly(b),[b]),Qe=x.useRef({}),Je=x.useMemo(()=>vp(We),[We]),oe=Pi(re),[be,Ke,en]=Ai({value:w,defaultValue:k,finalValue:null,onChange:g}),je=be!=null?`${be}`in Je?Je[`${be}`]:Qe.current[`${be}`]:void 0,an=bX(je),[pn,Dn,bn]=Ai({value:N,defaultValue:W,finalValue:je?je.label:"",onChange:V}),sn=Vf({opened:o,defaultOpened:l,onDropdownOpen:()=>{f==null||f(),S?sn.selectFirstOption():sn.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{u==null||u(),setTimeout(sn.resetSelectedOption,0)}}),nn=En=>{Dn(En),sn.resetSelectedOption()},{resolvedClassNames:$n,resolvedStyles:De}=Wi({props:n,styles:i,classNames:t});x.useEffect(()=>{_&&sn.selectFirstOption()},[_,pn]),x.useEffect(()=>{w===null&&nn(""),w!=null&&je&&((an==null?void 0:an.value)!==je.value||(an==null?void 0:an.label)!==je.label)&&nn(je.label)},[w,je]),x.useEffect(()=>{var En,gn;!en&&!bn&&nn(be!=null?`${be}`in Je?(En=Je[`${be}`])==null?void 0:En.label:((gn=Qe.current[`${be}`])==null?void 0:gn.label)||"":"")},[Je,be]),x.useEffect(()=>{be&&`${be}`in Je&&(Qe.current[`${be}`]=Je[`${be}`])},[Je,be]);const Fe=v.jsx(On.ClearButton,{...ee,onClear:()=>{Ke(null,null),nn(""),te==null||te()}}),Vn=Z&&!!be&&!O&&!A;return v.jsxs(v.Fragment,{children:[v.jsxs(On,{store:sn,__staticSelector:"Select",classNames:$n,styles:De,unstyled:r,readOnly:A,size:L,attributes:He,keepMounted:Ne,onOptionSubmit:En=>{j==null||j(En);const gn=I&&`${Je[En].value}`==`${be}`?null:Je[En],xn=gn?gn.value:null;xn!==be&&Ke(xn,gn),!en&&nn(xn!=null&&(gn==null?void 0:gn.label)||""),sn.closeDropdown()},...T,children:[v.jsx(On.Target,{targetType:U?"input":"button",autoComplete:$e,withExpandedAttribute:!0,children:v.jsx(Ni,{id:oe,__defaultRightSection:v.jsx(On.Chevron,{size:L,error:Q,unstyled:r,color:Ce}),__clearSection:Fe,__clearable:Vn,__clearSectionMode:le,rightSection:G,rightSectionPointerEvents:ie||"none",...Ye,size:L,__staticSelector:"Select",disabled:O,readOnly:A||!U,value:pn,onChange:En=>{nn(En.currentTarget.value),sn.openDropdown(),_&&sn.selectFirstOption()},onFocus:En=>{he&&U&&sn.openDropdown(),h==null||h(En)},onBlur:En=>{Ne&&sn.clickSelectedOption(),U&&sn.closeDropdown();const gn=be!=null&&(`${be}`in Je?Je[`${be}`]:Qe.current[`${be}`]);nn(gn&&gn.label||""),d==null||d(En)},onClick:En=>{U?sn.openDropdown():sn.toggleDropdown(),p==null||p(En)},classNames:$n,styles:De,unstyled:r,pointer:!U,error:Q,attributes:He})}),v.jsx(qy,{data:We,hidden:A||O,filter:M,search:pn,limit:$,hiddenWhenEmpty:!z,withScrollArea:q,maxDropdownHeight:P,filterOptions:!!U&&(je==null?void 0:je.label)!==pn,value:be,checkIconPosition:B,withCheckIcon:R,withAlignedLabels:D,nothingFoundMessage:z,unstyled:r,labelId:Ye.label?`${oe}-label`:void 0,"aria-label":Ye.label?void 0:Ye["aria-label"],renderOption:ke,scrollAreaProps:xe})]}),v.jsx(On.HiddenInput,{value:be,name:H,form:Y,disabled:O,...se})]})});jr.classes={...Ni.classes,...On.classes};jr.displayName="@mantine/core/Select";function fF(e){if(e!==void 0)return typeof e=="number"?ve(e):e}function eie({spacing:e,verticalSpacing:n,cols:t,minColWidth:i,autoRows:r,selector:a}){var d;const o=ci(),l=n===void 0?e:n,u=i!==void 0,f=Bu({"--sg-spacing-x":Yt(Wr(e)),"--sg-spacing-y":Yt(Wr(l)),"--sg-auto-rows":r,...u?{"--sg-min-col-width":fF(i)}:{"--sg-cols":(d=Wr(t))==null?void 0:d.toString()}}),h=$t(o.breakpoints).reduce((p,g)=>(p[g]||(p[g]={}),typeof e=="object"&&e[g]!==void 0&&(p[g]["--sg-spacing-x"]=Yt(e[g])),typeof l=="object"&&l[g]!==void 0&&(p[g]["--sg-spacing-y"]=Yt(l[g])),!u&&typeof t=="object"&&t[g]!==void 0&&(p[g]["--sg-cols"]=t[g]),p),{});return v.jsx(Bf,{styles:f,media:um($t(h),o.breakpoints).filter(p=>$t(h[p.value]).length>0).map(p=>({query:`(min-width: ${o.breakpoints[p.value]})`,styles:h[p.value]})),selector:a})}function Uk(e){return typeof e=="object"&&e!==null?$t(e):[]}function nie(e){return e.sort((n,t)=>lm(n)-lm(t))}function tie({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}){return nie(Array.from(new Set([...Uk(e),...Uk(n),...i!==void 0?[]:Uk(t)])))}function iie({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,u=Bu({"--sg-spacing-x":Yt(Wr(e)),"--sg-spacing-y":Yt(Wr(o)),"--sg-auto-rows":r,...l?{"--sg-min-col-width":fF(i)}:{"--sg-cols":(d=Wr(t))==null?void 0:d.toString()}}),f=tie({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}),h=f.reduce((p,g)=>(p[g]||(p[g]={}),typeof e=="object"&&e[g]!==void 0&&(p[g]["--sg-spacing-x"]=Yt(e[g])),typeof o=="object"&&o[g]!==void 0&&(p[g]["--sg-spacing-y"]=Yt(o[g])),!l&&typeof t=="object"&&t[g]!==void 0&&(p[g]["--sg-cols"]=t[g]),p),{});return v.jsx(Bf,{styles:u,container:f.map(p=>({query:`simple-grid (min-width: ${p})`,styles:h[p]})),selector:a})}var dF={container:"m_925c2d2c",root:"m_2415a157"};const rie={cols:1,spacing:"md",type:"media"},Ko=Pe(e=>{const n=ye("SimpleGrid",rie,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,cols:u,verticalSpacing:f,spacing:h,type:d,minColWidth:p,autoFlow:g,autoRows:b,attributes:w,...k}=n,_=Ze({name:"SimpleGrid",classes:dF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l}),S=Sy(),j=p!==void 0?g||"auto-fill":void 0;return d==="container"?v.jsxs(v.Fragment,{children:[v.jsx(iie,{...n,selector:`.${S}`}),v.jsx("div",{..._("container"),children:v.jsx(fe,{..._("root",{className:S}),...k,"data-auto-cols":j})})]}):v.jsxs(v.Fragment,{children:[v.jsx(eie,{...n,selector:`.${S}`}),v.jsx(fe,{..._("root",{className:S}),...k,"data-auto-cols":j})]})});Ko.classes=dF;Ko.displayName="@mantine/core/SimpleGrid";var hF={root:"m_6d731127"};const aie={gap:"md",align:"stretch",justify:"flex-start"},mF=(e,{gap:n,align:t,justify:i})=>({root:{"--stack-gap":Yt(n),"--stack-align":t,"--stack-justify":i}}),kn=Pe(e=>{const n=ye("Stack",aie,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,align:u,justify:f,gap:h,variant:d,attributes:p,...g}=n;return v.jsx(fe,{...Ze({name:"Stack",props:n,classes:hF,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:mF})("root"),variant:d,...g})});kn.classes=hF;kn.varsResolver=mF;kn.displayName="@mantine/core/Stack";const[oie,sie]=Ar("Table component was not found in the tree");var yp={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 lie(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 Uu(e,n){const t=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,i=Pe(r=>{const a=ye(t,{},r),{classNames:o,className:l,style:u,styles:f,...h}=a,d=sie();return v.jsx(fe,{component:e,...lie(d,n),...d.getStyles(e,{className:l,classNames:o,style:u,styles:f,props:a}),...h})});return i.displayName=`@mantine/core/${t}`,i.classes=yp,i}const GS=Uu("th",{columnBorder:!0}),pF=Uu("td",{columnBorder:!0}),Lg=Uu("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),vF=Uu("thead",{stickyHeader:!0}),gF=Uu("tbody"),yF=Uu("tfoot"),bF=Uu("caption",{captionSide:!0}),uie={type:"scrollarea"},wF=(e,{minWidth:n,maxHeight:t,type:i})=>({scrollContainer:{"--table-min-width":ve(n),"--table-max-height":ve(t),"--table-overflow":i==="native"?"auto":void 0}}),p0=Pe(e=>{const n=ye("TableScrollContainer",uie,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:u,minWidth:f,maxHeight:h,type:d,scrollAreaProps:p,attributes:g,...b}=n,w=Ze({name:"TableScrollContainer",classes:yp,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:g,vars:l,varsResolver:wF,rootSelector:"scrollContainer"});return v.jsx(fe,{component:d==="scrollarea"?ur:"div",...d==="scrollarea"?h?{offsetScrollbars:"xy",...p}:{offsetScrollbars:"x",...p}:{},...w("scrollContainer"),...b,children:v.jsx("div",{...w("scrollContainerInner"),children:u})})});p0.classes=yp;p0.varsResolver=wF;p0.displayName="@mantine/core/TableScrollContainer";function a9({data:e}){return v.jsxs(v.Fragment,{children:[e.caption&&v.jsx(bF,{children:e.caption}),e.head&&v.jsx(vF,{children:v.jsx(Lg,{children:e.head.map((n,t)=>v.jsx(GS,{children:n},t))})}),e.body&&v.jsx(gF,{children:e.body.map((n,t)=>v.jsx(Lg,{children:n.map((i,r)=>v.jsx(pF,{children:i},r))},t))}),e.foot&&v.jsx(yF,{children:v.jsx(Lg,{children:e.foot.map((n,t)=>v.jsx(GS,{children:n},t))})})]})}a9.displayName="@mantine/core/TableDataRenderer";const cie={withRowBorders:!0,verticalSpacing:7},kF=(e,{layout:n,captionSide:t,horizontalSpacing:i,verticalSpacing:r,borderColor:a,stripedColor:o,highlightOnHoverColor:l,striped:u,highlightOnHover:f,stickyHeaderOffset:h,stickyHeader:d})=>({table:{"--table-layout":n,"--table-caption-side":t,"--table-horizontal-spacing":Yt(i),"--table-vertical-spacing":Yt(r),"--table-border-color":a?ft(a,e):void 0,"--table-striped-color":u&&o?ft(o,e):void 0,"--table-highlight-on-hover-color":f&&l?ft(l,e):void 0,"--table-sticky-header-offset":d?ve(h):void 0}}),Xe=Pe(e=>{const n=ye("Table",cie,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,horizontalSpacing:u,verticalSpacing:f,captionSide:h,stripedColor:d,highlightOnHoverColor:p,striped:g,highlightOnHover:b,withColumnBorders:w,withRowBorders:k,withTableBorder:_,borderColor:S,layout:j,data:T,children:A,stickyHeader:O,stickyHeaderOffset:M,mod:$,tabularNums:q,attributes:P,...L}=n,U=Ze({name:"Table",props:n,className:i,style:r,classes:yp,classNames:t,styles:a,unstyled:o,attributes:P,rootSelector:"table",vars:l,varsResolver:kF});return v.jsx(oie,{value:{getStyles:U,stickyHeader:O,striped:g===!0?"odd":g||void 0,highlightOnHover:b,withColumnBorders:w,withRowBorders:k,captionSide:h||"bottom"},children:v.jsx(fe,{component:"table",mod:[{"data-with-table-border":_,"data-tabular-nums":q},$],...U("table"),...L,children:A||!!T&&v.jsx(a9,{data:T})})})});Xe.classes=yp;Xe.varsResolver=kF;Xe.displayName="@mantine/core/Table";Xe.Td=pF;Xe.Th=GS;Xe.Tr=Lg;Xe.Thead=vF;Xe.Tbody=gF;Xe.Tfoot=yF;Xe.Caption=bF;Xe.ScrollContainer=p0;Xe.DataRenderer=a9;const[fie,o9]=Ar("Tabs component was not found in the tree");var bp={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 s9=Pe(e=>{const n=ye("TabsList",null,e),{children:t,className:i,grow:r,justify:a,classNames:o,styles:l,style:u,mod:f,...h}=n,d=o9();return v.jsx(fe,{...d.getStyles("list",{className:i,style:u,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},f],"aria-orientation":d.orientation,__vars:{"--tabs-justify":a},...h,children:t})});s9.classes=bp;s9.displayName="@mantine/core/TabsList";const l9=Pe(e=>{const n=ye("TabsPanel",null,e),{children:t,className:i,value:r,classNames:a,styles:o,style:l,mod:u,keepMounted:f,...h}=n,d=op(),p=o9(),g=p.value===r,b=p.keepMounted||f,w=p.keepMountedMode!=="display-none",k=b&&w&&d!=="test"?v.jsx(x.Activity,{mode:g?"visible":"hidden",children:t}):b||g?t:null;return v.jsx(fe,{...p.getStyles("panel",{className:i,classNames:a,styles:o,style:[l,g?void 0:{display:"none"}],props:n}),mod:[{orientation:p.orientation},u],role:"tabpanel",id:p.getPanelId(r),"aria-labelledby":p.getTabId(r),...h,children:k})});l9.classes=bp;l9.displayName="@mantine/core/TabsPanel";const u9=Pe(e=>{const n=ye("TabsTab",null,e),{className:t,children:i,rightSection:r,leftSection:a,value:o,onClick:l,onKeyDown:u,disabled:f,color:h,style:d,classNames:p,styles:g,vars:b,mod:w,tabIndex:k,..._}=n,S=ci(),{dir:j}=qu(),T=o9(),A=o===T.value,O=$=>{T.onChange(T.allowTabDeactivation&&o===T.value?null:o),l==null||l($)},M={classNames:p,styles:g,props:n};return v.jsxs(Et,{...T.getStyles("tab",{className:t,style:d,variant:T.variant,...M}),disabled:f,unstyled:T.unstyled,variant:T.variant,mod:[{active:A,disabled:f,orientation:T.orientation,inverted:T.inverted,placement:T.orientation==="vertical"&&T.placement},w],role:"tab",id:T.getTabId(o),"aria-selected":A,tabIndex:k!==void 0?k:A||T.value===null?0:-1,"aria-controls":T.getPanelId(o),onClick:O,__vars:{"--tabs-color":h?ft(h,S):void 0},onKeyDown:Z6({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:T.activateTabWithKeyboard,loop:T.loop,orientation:T.orientation||"horizontal",dir:j,onKeyDown:u}),..._,children:[a&&v.jsx("span",{...T.getStyles("tabSection",M),"data-position":"left",children:a}),i&&v.jsx("span",{...T.getStyles("tabLabel",M),children:i}),r&&v.jsx("span",{...T.getStyles("tabSection",M),"data-position":"right",children:r})]})});u9.classes=bp;u9.displayName="@mantine/core/TabsTab";const KE="Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value",die={keepMounted:!0,keepMountedMode:"activity",orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,variant:"default",placement:"left"},_F=(e,{radius:n,color:t,autoContrast:i})=>({root:{"--tabs-radius":qt(n),"--tabs-color":ft(t,e),"--tabs-text-color":ap(i,e)?If({color:t,theme:e,autoContrast:i}):void 0}}),Gt=Pe(e=>{const n=ye("Tabs",die,e),{defaultValue:t,value:i,onChange:r,orientation:a,children:o,loop:l,id:u,activateTabWithKeyboard:f,allowTabDeactivation:h,variant:d,color:p,radius:g,inverted:b,placement:w,keepMounted:k,keepMountedMode:_,classNames:S,styles:j,unstyled:T,className:A,style:O,vars:M,autoContrast:$,mod:q,attributes:P,...L}=n,U=Pi(u),[G,B]=Ai({value:i,defaultValue:t,finalValue:null,onChange:r}),R=Ze({name:"Tabs",props:n,classes:bp,className:A,style:O,classNames:S,styles:j,unstyled:T,attributes:P,vars:M,varsResolver:_F});return v.jsx(fie,{value:{placement:w,value:G,orientation:a,id:U,loop:l,activateTabWithKeyboard:f,getTabId:IT(`${U}-tab`,KE),getPanelId:IT(`${U}-panel`,KE),onChange:B,allowTabDeactivation:h,variant:d,color:p,radius:g,inverted:b,keepMounted:k,keepMountedMode:_,unstyled:T,getStyles:R},children:v.jsx(fe,{id:U,variant:d,mod:[{orientation:a,inverted:a==="horizontal"&&b,placement:a==="vertical"&&w},q],...R("root"),...L,children:o})})});Gt.classes=bp;Gt.varsResolver=_F;Gt.displayName="@mantine/core/Tabs";Gt.Tab=u9;Gt.Panel=l9;Gt.List=s9;function hie({data:e,value:n}){const t=n.map(i=>i.trim().toLowerCase());return e.reduce((i,r)=>(Eu(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 mie(e,n){return e?n.split(new RegExp(`[${e.join("")}]`)).map(t=>t.trim()).filter(t=>t!==""):[n]}function XE({splitChars:e,allowDuplicates:n,maxTags:t,value:i,currentTags:r,isDuplicate:a,onDuplicate:o}){const l=mie(e,i),u=[];if(n)u.push(...r,...l);else{u.push(...r);for(const f of l)(a?h=>a(h,u):h=>u.some(d=>d.toLowerCase()===h.toLowerCase()))(f)?o==null||o(f):u.push(f)}return t?u.slice(0,t):u}const pie={maxTags:1/0,acceptValueOnBlur:!0,splitChars:[","],hiddenInputValuesDivider:",",openOnFocus:!0,size:"sm"},c9=Pe(e=>{const n=ye("TagsInput",pie,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:u,value:f,defaultValue:h,onChange:d,onKeyDown:p,maxTags:g,allowDuplicates:b,onDuplicate:w,variant:k,data:_,dropdownOpened:S,defaultDropdownOpened:j,onDropdownOpen:T,onDropdownClose:A,selectFirstOptionOnChange:O,selectFirstOptionOnDropdownOpen:M,onOptionSubmit:$,comboboxProps:q,filter:P,limit:L,withScrollArea:U,maxDropdownHeight:G,searchValue:B,defaultSearchValue:R,onSearchChange:D,readOnly:z,disabled:H,splitChars:Y,onFocus:N,onBlur:W,onPaste:V,radius:I,rightSection:Q,rightSectionWidth:ie,rightSectionPointerEvents:re,rightSectionProps:Z,leftSection:le,leftSectionWidth:ee,leftSectionPointerEvents:se,leftSectionProps:ke,inputContainer:te,inputWrapperOrder:$e,withAsterisk:xe,required:Ae,labelProps:ze,descriptionProps:we,errorProps:Ce,wrapperProps:Ne,description:he,label:He,error:Ye,withErrorStyles:We,name:Qe,form:Je,id:oe,clearable:be,clearSectionMode:Ke,clearButtonProps:en,hiddenInputProps:je,hiddenInputValuesDivider:an,mod:pn,renderOption:Dn,renderPill:bn,onRemove:sn,onClear:nn,onMaxTags:$n,scrollAreaProps:De,acceptValueOnBlur:Fe,isDuplicate:Vn,openOnFocus:En,attributes:gn,ref:xn,loading:at,loadingPosition:Mt,...qe}=n,Ue=Pi(oe),In=Ly(_),ot=vp(In),Pn=x.useRef(null),rn=Ht(Pn,xn),on=Vf({opened:S,defaultOpened:j,onDropdownOpen:()=>{T==null||T(),M&&on.selectFirstOption()},onDropdownClose:()=>{A==null||A(),on.resetSelectedOption()}}),{styleProps:ln,rest:{type:Kn,autoComplete:Xn,...Lt}}=Fu(qe),[Rn,Mn]=Ai({value:f,defaultValue:h,finalValue:[],onChange:d}),[Qn,Dt]=Ai({value:B,defaultValue:R,finalValue:"",onChange:D}),fi=yn=>{Dt(yn),on.resetSelectedOption()},zi=Ze({name:"TagsInput",classes:{},props:n,classNames:t,styles:a,unstyled:o}),{resolvedClassNames:Ya,resolvedStyles:Co}=Wi({props:n,styles:a,classNames:t}),Ta=yn=>{if((Vn?Vn(yn,Rn):Rn.some(oi=>oi.toLowerCase()===yn.toLowerCase()))&&(w==null||w(yn),!b)){fi("");return}if(Rn.length>=g){$n==null||$n(yn);return}$==null||$(yn),fi(""),yn.length>0&&Mn([...Rn,yn])},dr=yn=>{if(p==null||p(yn),yn.isPropagationStopped())return;const oi=Qn.trim(),{length:cn}=oi;if(Y.includes(yn.key)&&cn>0&&(Mn(XE({splitChars:Y,allowDuplicates:b,maxTags:g,value:Qn,currentTags:Rn,isDuplicate:Vn,onDuplicate:w})),fi(""),yn.preventDefault()),yn.key==="Enter"&&cn>0&&!yn.nativeEvent.isComposing){if(yn.preventDefault(),document.querySelector(`#${on.listId} [data-combobox-option][data-combobox-selected]`))return;Ta(oi)}yn.key==="Backspace"&&cn===0&&Rn.length>0&&!yn.nativeEvent.isComposing&&!z&&(sn==null||sn(Rn[Rn.length-1]),Mn(Rn.slice(0,Rn.length-1)))},jo=yn=>{V==null||V(yn),yn.preventDefault(),yn.clipboardData&&(Mn(XE({splitChars:Y,allowDuplicates:b,maxTags:g,value:`${Qn}${yn.clipboardData.getData("text/plain")}`,currentTags:Rn,isDuplicate:Vn,onDuplicate:w})),fi(""))},Er=Rn.map((yn,oi)=>{const cn=()=>{const Mr=Rn.slice();Mr.splice(oi,1),Mn(Mr),sn==null||sn(yn)};return bn?v.jsx(x.Fragment,{children:bn({option:ot[yn]||{value:yn,label:yn,disabled:!1},value:yn,onRemove:cn,disabled:H||z})},`${yn}-${oi}`):v.jsx(xl,{withRemoveButton:!z,onRemove:cn,unstyled:o,disabled:H,attributes:gn,...zi("pill"),children:yn},`${yn}-${oi}`)});x.useEffect(()=>{O&&on.selectFirstOption()},[O,Rn,Qn]);const hr=v.jsx(On.ClearButton,{...en,onClear:()=>{var yn;Mn([]),fi(""),(yn=Pn.current)==null||yn.focus(),on.openDropdown(),nn==null||nn()}});return v.jsxs(v.Fragment,{children:[v.jsxs(On,{store:on,classNames:Ya,styles:Co,unstyled:o,size:u,readOnly:z,__staticSelector:"TagsInput",attributes:gn,onOptionSubmit:yn=>{$==null||$(yn),fi(""),Rn.length>=g?$n==null||$n(yn):Mn([...Rn,ot[yn].value]),on.resetSelectedOption()},...q,children:[v.jsx(On.DropdownTarget,{children:v.jsx(Mu,{...ln,__staticSelector:"TagsInput",classNames:Ya,styles:Co,unstyled:o,size:u,className:i,style:r,variant:k,disabled:H,radius:I,rightSection:Q,__clearSection:hr,__clearable:be&&Rn.length>0&&!H&&!z,__clearSectionMode:Ke,rightSectionWidth:ie,rightSectionPointerEvents:re,rightSectionProps:Z,leftSection:le,leftSectionWidth:ee,leftSectionPointerEvents:se,leftSectionProps:ke,loading:at,loadingPosition:Mt,inputContainer:te,inputWrapperOrder:$e,withAsterisk:xe,required:Ae,labelProps:ze,descriptionProps:we,errorProps:Ce,wrapperProps:Ne,description:he,label:He,error:Ye,withErrorStyles:We,__stylesApiProps:{...n,multiline:!0},id:Ue,mod:pn,attributes:gn,children:v.jsxs(xl.Group,{disabled:H,unstyled:o,...zi("pillsList"),children:[Er,v.jsx(On.EventsTarget,{autoComplete:Xn,withExpandedAttribute:!0,children:v.jsx(Mu.Field,{...Lt,ref:rn,...zi("inputField"),unstyled:o,onKeyDown:dr,onFocus:yn=>{N==null||N(yn),En&&on.openDropdown()},onBlur:yn=>{W==null||W(yn),Fe&&Ta(Qn),on.closeDropdown()},onPaste:jo,value:Qn,onChange:yn=>fi(yn.currentTarget.value),required:Ae&&Rn.length===0,disabled:H,readOnly:z,id:Ue})})]})})}),v.jsx(qy,{data:hie({data:In,value:Rn}),hidden:z||H,filter:P,search:Qn,limit:L,hiddenWhenEmpty:!0,withScrollArea:U,maxDropdownHeight:G,unstyled:o,labelId:He?`${Ue}-label`:void 0,"aria-label":He?void 0:qe["aria-label"],renderOption:Dn,scrollAreaProps:De})]}),v.jsx(On.HiddenInput,{name:Qe,form:Je,value:Rn,valuesDivider:an,disabled:H,...je})]})});c9.classes={...Ni.classes,...On.classes};c9.displayName="@mantine/core/TagsInput";const or=Pe(e=>v.jsx(Ni,{component:"input",...ye("TextInput",null,e),__staticSelector:"TextInput"}));or.classes=Ni.classes;or.displayName="@mantine/core/TextInput";const[vie,gie]=Ar("Timeline component was not found in tree");var f9={root:"m_43657ece",itemTitle:"m_2ebe8099",item:"m_436178ff",itemBullet:"m_8affcee1",itemBody:"m_540e8f41"};const d9=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,__active:o,__align:l,__lineActive:u,__vars:f,bullet:h,radius:d,color:p,lineVariant:g,children:b,title:w,mod:k,..._}=ye("TimelineItem",null,e),S=gie(),j=ci(),T={classNames:n,styles:r};return v.jsxs(fe,{...S.getStyles("item",{...T,className:t,style:i}),mod:[{"line-active":u,active:o},k],__vars:{"--tli-radius":d!==void 0?qt(d):void 0,"--tli-color":p?ft(p,j):void 0,"--tli-border-style":g||void 0},..._,children:[v.jsx(fe,{...S.getStyles("itemBullet",T),mod:{"with-child":!!h,align:l,active:o},children:h}),v.jsxs("div",{...S.getStyles("itemBody",T),children:[w&&v.jsx("div",{...S.getStyles("itemTitle",T),children:w}),v.jsx("div",{...S.getStyles("itemContent",T),children:b})]})]})});d9.classes=f9;d9.displayName="@mantine/core/TimelineItem";const yie={active:-1,align:"left"},xF=(e,{bulletSize:n,lineWidth:t,radius:i,color:r,autoContrast:a})=>({root:{"--tl-bullet-size":ve(n),"--tl-line-width":ve(t),"--tl-radius":i===void 0?void 0:qt(i),"--tl-color":r?ft(r,e):void 0,"--tl-icon-color":ap(a,e)?If({color:r,theme:e,autoContrast:a}):void 0}}),uf=Pe(e=>{const n=ye("Timeline",yie,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:u,active:f,color:h,radius:d,bulletSize:p,align:g,lineWidth:b,reverseActive:w,mod:k,autoContrast:_,attributes:S,...j}=n,T=Ze({name:"Timeline",classes:f9,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:xF}),A=x.Children.toArray(u),O=A.map((M,$)=>{var q,P;return x.cloneElement(M,{unstyled:o,__align:g,__active:((q=M.props)==null?void 0:q.active)||(w?f>=A.length-$-1:f>=$),__lineActive:((P=M.props)==null?void 0:P.lineActive)||(w?f>=A.length-$-1:f-1>=$)})});return v.jsx(vie,{value:{getStyles:T},children:v.jsx(fe,{...T("root"),mod:[{align:g},k],...j,children:O})})});uf.classes=f9;uf.varsResolver=xF;uf.displayName="@mantine/core/Timeline";uf.Item=d9;const bie=["h1","h2","h3","h4","h5","h6"],wie=["xs","sm","md","lg","xl"];function kie(e,n){const t=n!==void 0?n:`h${e}`;return bie.includes(t)?{fontSize:`var(--mantine-${t}-font-size)`,fontWeight:`var(--mantine-${t}-font-weight)`,lineHeight:`var(--mantine-${t}-line-height)`}:wie.includes(t)?{fontSize:`var(--mantine-font-size-${t})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:ve(t),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var SF={root:"m_8a5d1357"};const _ie={order:1},CF=(e,{order:n,size:t,lineClamp:i,textWrap:r})=>{const a=kie(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}}},El=Pe(e=>{const n=ye("Title",_ie,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,order:l,vars:u,size:f,variant:h,lineClamp:d,textWrap:p,mod:g,attributes:b,...w}=n,k=Ze({name:"Title",props:n,classes:SF,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:u,varsResolver:CF});return[1,2,3,4,5,6].includes(l)?v.jsx(fe,{...k("root"),component:`h${l}`,variant:h,mod:[{order:l,"data-line-clamp":typeof d=="number"},g],size:f,...w}):null});El.classes=SF;El.varsResolver=CF;El.displayName="@mantine/core/Title";const h9=x.createContext(null);h9.displayName="@mantine/modals/ModalsContext";function xie(){const e=x.use(h9);if(!e)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return e}const[Sie,Vu]=_X("mantine-modals"),Cie=e=>{const n=e.modalId||ml();return Vu("openModal")({...e,modalId:n}),n},jie=e=>{const n=e.modalId||ml();return Vu("openConfirmModal")({...e,modalId:n}),n},Aie=e=>{const n=e.modalId||ml();return Vu("openContextModal")({...e,modalId:n}),n},Oie=Vu("closeModal"),Tie=Vu("closeAllModals"),Eie=e=>Vu("updateModal")(e),Mie=e=>Vu("updateContextModal")(e),Ra={open:Cie,close:Oie,closeAll:Tie,openConfirmModal:jie,openContextModal:Aie,updateModal:Eie,updateContextModal:Mie};function Die({id:e,cancelProps:n,confirmProps:t,labels:i={cancel:"",confirm:""},closeOnConfirm:r=!0,closeOnCancel:a=!0,groupProps:o,onCancel:l,onConfirm:u,children:f}){const{cancel:h,confirm:d}=i,p=xie(),g=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 u=="function"&&u(),r&&p.closeModal(e)};return v.jsxs(v.Fragment,{children:[f&&v.jsx(fe,{mb:"md",children:f}),v.jsxs(Ee,{mt:f?0:"md",justify:"flex-end",...o,children:[v.jsx(Yn,{variant:"default",...n,onClick:g,children:(n==null?void 0:n.children)||h}),v.jsx(Yn,{...t,onClick:b,children:(t==null?void 0:t.children)||d})]})]})}function ZE(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 Rie(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 Pie(e){if(!e)return{confirmProps:{},modalProps:{}};const{id:n,children:t,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:l,confirmProps:u,groupProps:f,labels:h,...d}=e;return{confirmProps:{id:n,children:t,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:l,confirmProps:u,groupProps:f,labels:h},modalProps:{id:n,...d}}}function Nie({children:e,modalProps:n,labels:t,modals:i}){const[r,a]=x.useReducer(Rie,{modals:[],current:null}),o=x.useRef(r);o.current=r;const l=x.useRef(!1),u=x.useCallback(j=>{l.current||(l.current=!0,o.current.modals.concat().reverse().forEach(T=>{ZE(T,j)}),l.current=!1),a({type:"CLOSE_ALL",canceled:j})},[o,a]),f=x.useCallback(({modalId:j,...T})=>{const A=j||ml();return a({type:"OPEN",modal:{id:A,type:"content",props:T}}),A},[a]),h=x.useCallback(({modalId:j,...T})=>{const A=j||ml();return a({type:"OPEN",modal:{id:A,type:"confirm",props:T}}),A},[a]),d=x.useCallback((j,{modalId:T,...A})=>{const O=T||ml();return a({type:"OPEN",modal:{id:O,type:"context",props:A,ctx:j}}),O},[a]),p=x.useCallback((j,T)=>{if(!l.current){const A=o.current.modals.find(O=>O.id===j);A&&(l.current=!0,ZE(A,T),l.current=!1)}a({type:"CLOSE",modalId:j,canceled:T})},[o,a]),g=x.useCallback(({modalId:j,...T})=>{a({type:"UPDATE",modalId:j,newProps:T})},[a]),b=x.useCallback(({modalId:j,...T})=>{a({type:"UPDATE",modalId:j,newProps:T})},[a]);Sie({openModal:f,openConfirmModal:h,openContextModal:({modal:j,...T})=>d(j,T),closeModal:p,closeContextModal:p,closeAllModals:u,updateModal:g,updateContextModal:b});const w={modalProps:n||{},modals:r.modals,openModal:f,openConfirmModal:h,openContextModal:d,closeModal:p,closeContextModal:p,closeAll:u,updateModal:g,updateContextModal:b},k=()=>{const j=o.current.current;switch(j==null?void 0:j.type){case"context":{const{innerProps:T,...A}=j.props,O=i[j.ctx];return{modalProps:A,content:v.jsx(O,{innerProps:T,context:w,id:j.id})}}case"confirm":{const{modalProps:T,confirmProps:A}=Pie(j.props);return{modalProps:T,content:v.jsx(Die,{...A,id:j.id,labels:j.props.labels||t})}}case"content":{const{children:T,...A}=j.props;return{modalProps:A,content:T}}default:return{modalProps:{},content:null}}},{modalProps:_,content:S}=k();return v.jsxs(h9,{value:w,children:[v.jsx(Gi,{zIndex:xa("modal")+1,...n,..._,opened:r.modals.length>0,onClose:()=>{var j;return p((j=r.current)==null?void 0:j.id)},children:S}),e]})}function $ie(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 zie(e){return x.useSyncExternalStore(e.subscribe,()=>e.getState(),()=>e.getState())}function Lie(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 Iie=()=>$ie({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),Wu=Iie(),Bie=(e=Wu)=>zie(e);function Jf(e,n){const t=e.getState(),i=Lie(n([...t.notifications,...t.queue]),t.defaultPosition,t.limit);e.setState({notifications:i.notifications,queue:i.queue,limit:t.limit,defaultPosition:t.defaultPosition})}function Fie(e,n=Wu){const t=e.id||ml();return Jf(n,i=>e.id&&i.some(r=>r.id===e.id)?i:[...i,{...e,id:t}]),t}function jF(e,n=Wu){return Jf(n,t=>t.filter(i=>{var r;return i.id===e?((r=i.onClose)==null||r.call(i,i),!1):!0})),e}function qie(e,n=Wu){return Jf(n,t=>t.map(i=>i.id===e.id?{...i,...e}:i)),e.id}function Hie(e=Wu){Jf(e,()=>[])}function Uie(e=Wu){Jf(e,n=>n.slice(0,e.getState().limit))}const hn={show:Fie,hide:jF,update:qie,clean:Hie,cleanQueue:Uie,updateState:Jf},AF=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function Vie(e,n){return e.reduce((t,i)=>(t[i.position||n].push(i),t),AF.reduce((t,i)=>(t[i]=[],t),{}))}const QE={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},Wie={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function Gie({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:QE[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"},u={opacity:1,transform:Wie[o]},f={opacity:0,maxHeight:0,transform:QE[o]};return{...l,...{entering:u,entered:u,exiting:f,exited:f}[e]}}function Yie(e,n){return typeof n=="number"?n:n===!1||e===!1?!1:e}function OF({data:e,onHide:n,autoClose:t,paused:i,onHoverStart:r,onHoverEnd:a,...o}){const{autoClose:l,message:u,onOpen:f,...h}=e,d=Yie(t,e.autoClose),p=x.useRef(-1),[g,b]=x.useState(!1),w=()=>window.clearTimeout(p.current),k=()=>{n(e.id),w()},_=()=>{w(),typeof d=="number"&&(p.current=window.setTimeout(k,d))},S=()=>{b(!0),r==null||r()},j=()=>{b(!1),a==null||a()};return x.useEffect(()=>{var T;(T=e.onOpen)==null||T.call(e,e)},[]),x.useEffect(()=>(_(),w),[d]),x.useEffect(()=>(i||g?w():_(),w),[i,g]),v.jsx(c0,{...o,...h,onClose:k,onMouseEnter:S,onMouseLeave:j,children:u})}OF.displayName="@mantine/notifications/NotificationContainer";var TF={root:"m_b37d9ac7",notification:"m_5ed0edd0"};function YS(){return YS=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":ve(t)}}),_o=Pe(e=>{const n=ye("Notifications",sre,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:u,position:f,autoClose:h,transitionDuration:d,containerWidth:p,notificationMaxHeight:g,limit:b,zIndex:w,store:k,portalProps:_,withinPortal:S,pauseResetOnHover:j,...T}=n,A=ci(),O=Bie(k),M=gX(),$=eC(),q=x.useRef({}),P=x.useRef(0),[L,U]=x.useState(0),G=x.useCallback(()=>U(Y=>Y+1),[]),B=x.useCallback(()=>U(Y=>Math.max(0,Y-1)),[]),R=A.respectReducedMotion&&$?1:d,D=Ze({name:"Notifications",classes:TF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:u,vars:l,varsResolver:DF});x.useEffect(()=>{k==null||k.updateState(Y=>({...Y,limit:b||5,defaultPosition:f}))},[b,f]),os(()=>{O.notifications.length>P.current&&setTimeout(()=>M(),0),P.current=O.notifications.length},[O.notifications]);const z=Vie(O.notifications,f),H=AF.reduce((Y,N)=>(Y[N]=z[N].map(({style:W,...V})=>v.jsx(ore,{timeout:R,onEnter:()=>q.current[V.id].offsetHeight,nodeRef:{current:q.current[V.id]},children:I=>v.jsx(OF,{ref:Q=>{Q&&(q.current[V.id]=Q)},data:V,onHide:Q=>jF(Q,k),autoClose:h,paused:j==="all"?L>0:!1,onHoverStart:G,onHoverEnd:B,...D("notification",{style:{...Gie({state:I,position:N,transitionDuration:R,maxHeight:g}),...W}})})},V.id)),Y),{});return v.jsxs(wl,{withinPortal:S,..._,children:[v.jsx(fe,{...D("root"),"data-position":"top-center",...T,children:v.jsx(tl,{children:H["top-center"]})}),v.jsx(fe,{...D("root"),"data-position":"top-left",...T,children:v.jsx(tl,{children:H["top-left"]})}),v.jsx(fe,{...D("root",{className:Tu.classNames.fullWidth}),"data-position":"top-right",...T,children:v.jsx(tl,{children:H["top-right"]})}),v.jsx(fe,{...D("root",{className:Tu.classNames.fullWidth}),"data-position":"bottom-right",...T,children:v.jsx(tl,{children:H["bottom-right"]})}),v.jsx(fe,{...D("root"),"data-position":"bottom-left",...T,children:v.jsx(tl,{children:H["bottom-left"]})}),v.jsx(fe,{...D("root"),"data-position":"bottom-center",...T,children:v.jsx(tl,{children:H["bottom-center"]})})]})});_o.classes=TF;_o.varsResolver=DF;_o.displayName="@mantine/notifications/Notifications";_o.show=hn.show;_o.hide=hn.hide;_o.update=hn.update;_o.clean=hn.clean;_o.cleanQueue=hn.cleanQueue;_o.updateState=hn.updateState;var Yk={exports:{}},wh={},Kk={exports:{}},Xk={};/** + `),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function $te(e){e=Nte(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var n=e.suffix,t=e.allowNegative,i=e.allowLeadingZeros,r=e.onKeyDown;r===void 0&&(r=al);var a=e.onBlur;a===void 0&&(a=al);var o=e.thousandSeparator,l=e.decimalScale,u=e.fixedDecimalScale,f=e.prefix;f===void 0&&(f="");var h=e.defaultValue,d=e.value,p=e.valueIsNumericString,g=e.onValueChange,b=QB(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),w=f0(e),k=w.decimalSeparator,_=w.allowedDecimalSeparators,S=function(D){return WE(D,e)},j=function(D,z){return Rte(D,z,e)},T=ll(d)?h:d,A=p??Dte(T,f,n);ll(d)?ll(h)||(A=A||typeof h=="number"):A=A||typeof d=="number";var O=function(D){return JB(D)?D:(typeof D=="number"&&(D=tF(D)),A&&typeof l=="number"?UE(D,l,!!u):D)},M=rF(O(d),O(h),!!A,S,j,g),$=M[0],q=$.numAsString,P=$.formattedValue,L=M[1],U=function(D){var z=D.target,H=D.key,Y=z.selectionStart,N=z.selectionEnd,W=z.value;if(W===void 0&&(W=""),(H==="Backspace"||H==="Delete")&&NW?!1:N>=ie.start&&Nt?t:e}function Bte(e){return e.toString().replace(".","").length}function Fte(e,n){return(typeof e=="number"?e=n)&&(t===void 0||e<=t)}const Hk={size:"sm",step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[".",","]},sF=(e,{size:n})=>({controls:{"--ni-chevron-size":Ln(n,"ni-chevron-size")}});function Hte(e,n,t){const i=e.toString(),r=aF.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=Jo(o,t,n);return r?`${l.toString().replace(/^0+(?=\d)/,"")}.`:l}function Ute(e,n){if(e===""||e==="-")return e;const t=Ih(e);return t===null?e:n.clampBehavior==="blur"?zg(t,n.min,n.max):t}const vm=sp(e=>{const n=ye("NumberInput",Hk,e),{className:t,classNames:i,styles:r,unstyled:a,vars:o,onChange:l,onValueChange:u,value:f,defaultValue:h,max:d,min:p,step:g,hideControls:b,rightSection:w,isAllowed:k,clampBehavior:_,onBlur:S,allowDecimal:j,decimalScale:T,onKeyDown:A,onKeyDownCapture:O,handlersRef:M,startValue:$,disabled:q,rightSectionPointerEvents:P,allowNegative:L,readOnly:U,size:G,rightSectionWidth:B,stepHoldInterval:R,stepHoldDelay:D,allowLeadingZeros:z,withKeyboardEvents:H,trimLeadingZeroesOnBlur:Y,allowedDecimalSeparators:N,selectAllOnFocus:W,onMinReached:V,onMaxReached:I,onFocus:Q,attributes:ie,ref:re,...Z}=n,le=L??!0,ee=z??!0,se=Ze({name:"NumberInput",classes:US,props:n,classNames:i,styles:r,unstyled:a,attributes:ie,vars:o,varsResolver:sF}),{resolvedClassNames:ke,resolvedStyles:te}=Wi({classNames:i,styles:r,props:n}),$e=x.useRef(Bk(f)||Bk(h)?"bigint":"number");Bk(f)?$e.current="bigint":typeof f=="number"&&($e.current="number");const xe=$e.current==="bigint",[Ae,ze]=Ai({value:f,defaultValue:h,finalValue:"",onChange:l}),we=D!==void 0&&R!==void 0,Ce=x.useRef(null),Ne=x.useRef(null),he=x.useRef(0),He=typeof p=="number"?p:void 0,Ye=typeof d=="number"?d:void 0,We=typeof g=="number"?g:Hk.step,Qe=typeof $=="number"?$:Hk.startValue,Je=rg(p),oe=rg(d),be=rg(g)??BigInt(1),Ke=rg($)??BigInt(0),en=qe=>!oF(qe,le)||ee&&YE.test(qe)?qe:Ih(qe)??qe,je=qe=>{const Ue=Number(qe);return Number.isSafeInteger(Ue)?Ue:void 0},an=(qe,Ue)=>{Ue.source==="event"&&ze(xe?en(qe.value):Fte(qe.floatValue,qe.value)&&!Lte.test(qe.value)&&!(ee&&YE.test(qe.value))&&!Ite.test(qe.value)&&!aF.test(qe.value)?qe.floatValue:qe.value),u==null||u(qe,Ue)},pn=qe=>{const Ue=String(qe).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return Ue?Math.max(0,(Ue[1]?Ue[1].length:0)-(Ue[2]?+Ue[2]:0)):0},Dn=qe=>{Ce.current&&typeof qe<"u"&&Ce.current.setSelectionRange(qe,qe)},bn=x.useRef(jS);bn.current=()=>{if(xe){if(!qk(Ae,le))return;let on;const ln=Ae;if(typeof ln=="bigint"){const Xn=ln+be;oe!==void 0&&Xn>oe&&(I==null||I()),on=oe!==void 0&&Xn>oe?oe:Xn}else if(typeof ln=="string"&&ln!==""){const Xn=Ih(ln);if(Xn===null)return;const Lt=Xn+be;oe!==void 0&&Lt>oe&&(I==null||I()),on=oe!==void 0&&Lt>oe?oe:Lt}else on=zg(Ke,Je,oe);const Kn=on.toString();ze(on),u==null||u({floatValue:je(on),formattedValue:Kn,value:Kn},{source:"increment"}),setTimeout(()=>{var Xn;return Dn((Xn=Ce.current)==null?void 0:Xn.value.length)},0);return}if(!Fk(Ae))return;let qe;const Ue=pn(Ae),In=pn(We),ot=Math.max(Ue,In),Pn=10**ot;if(!VS(Ae)&&(typeof Ae!="number"||Number.isNaN(Ae)))qe=Jo(Qe,He,Ye);else if(Ye!==void 0){const on=(Math.round(Number(Ae)*Pn)+Math.round(We*Pn))/Pn;on>Ye&&(I==null||I()),qe=on<=Ye?on:Ye}else qe=(Math.round(Number(Ae)*Pn)+Math.round(We*Pn))/Pn;const rn=qe.toFixed(ot);ze(parseFloat(rn)),u==null||u({floatValue:parseFloat(rn),formattedValue:rn,value:rn},{source:"increment"}),setTimeout(()=>{var on;return Dn((on=Ce.current)==null?void 0:on.value.length)},0)};const sn=x.useRef(jS);sn.current=()=>{if(xe){if(!qk(Ae,le))return;let ln;const Kn=Je!==void 0?Je:le?void 0:BigInt(0),Xn=Ae;if(typeof Xn=="bigint"){const Rn=Xn-be;Kn!==void 0&&Rn{var Rn;return Dn((Rn=Ce.current)==null?void 0:Rn.value.length)},0);return}if(!Fk(Ae))return;let qe;const Ue=He!==void 0?He:le?Number.MIN_SAFE_INTEGER:0,In=pn(Ae),ot=pn(We),Pn=Math.max(In,ot),rn=10**Pn;if(!VS(Ae)&&typeof Ae!="number"||Number.isNaN(Ae))qe=Jo(Qe,Ue,Ye);else{const ln=(Math.round(Number(Ae)*rn)-Math.round(We*rn))/rn;Ue!==void 0&&ln{var ln;return Dn((ln=Ce.current)==null?void 0:ln.value.length)},0)};const nn=qe=>{var Pn,rn,on;const Ue=qe.clipboardData.getData("text"),In=Z.decimalSeparator||".",ot=(N||[".",","]).filter(ln=>ln!==In);if(ot.some(ln=>Ue.includes(ln))){qe.preventDefault();let ln=Ue;ot.forEach(Xn=>{ln=ln.split(Xn).join(In)});const Kn=Ce.current;if(Kn){const Xn=Kn.selectionStart??0,Lt=Kn.selectionEnd??0,Rn=Kn.value,Mn=Rn.substring(0,Xn)+ln+Rn.substring(Lt);(rn=(Pn=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:Pn.set)==null||rn.call(Kn,Mn),Kn.dispatchEvent(new Event("change",{bubbles:!0}));const Qn=Xn+ln.length;setTimeout(()=>Dn(Qn),0)}}(on=Z.onPaste)==null||on.call(Z,qe)},$n=qe=>{var Ue,In;A==null||A(qe),!(U||!H)&&(qe.key==="ArrowUp"&&(qe.preventDefault(),(Ue=bn.current)==null||Ue.call(bn)),qe.key==="ArrowDown"&&(qe.preventDefault(),(In=sn.current)==null||In.call(sn)))},De=qe=>{if(O==null||O(qe),qe.key==="Backspace"){const Ue=Ce.current;Ue&&Ue.selectionStart===0&&Ue.selectionStart===Ue.selectionEnd&&(qe.preventDefault(),window.setTimeout(()=>Dn(0),0))}},Fe=qe=>{W&&setTimeout(()=>qe.currentTarget.select(),0),Q==null||Q(qe)},Vn=qe=>{let Ue=Ae;xe?(_==="blur"&&typeof Ue=="bigint"&&(Ue=zg(Ue,Je,oe)),Y&&typeof Ue=="string"&&(Ue=Ute(Ue,{min:Je,max:oe,clampBehavior:_}))):(_==="blur"&&typeof Ue=="number"&&(Ue=Jo(Ue,He,Ye)),Y&&typeof Ue=="string"&&pn(Ue)<15&&(Ue=Hte(Ue,Ye,He))),Ae!==Ue&&ze(Ue),S==null||S(qe)};cm(M,{increment:bn.current,decrement:sn.current});const En=qe=>{var Ue,In;qe?(Ue=bn.current)==null||Ue.call(bn):(In=sn.current)==null||In.call(sn),he.current+=1},gn=qe=>{if(En(qe),we){const Ue=typeof R=="number"?R:R(he.current);Ne.current=window.setTimeout(()=>gn(qe),Ue)}},xn=(qe,Ue)=>{var In;qe.preventDefault(),(In=Ce.current)==null||In.focus(),En(Ue),we&&(Ne.current=window.setTimeout(()=>gn(Ue),D))},at=()=>{Ne.current&&window.clearTimeout(Ne.current),Ne.current=null,he.current=0},Mt=v.jsxs("div",{...se("controls"),children:[v.jsx(Et,{...se("control"),tabIndex:-1,"aria-hidden":!0,disabled:q||typeof Ae=="number"&&Ye!==void 0&&Ae>=Ye||typeof Ae=="bigint"&&oe!==void 0&&Ae>=oe,mod:{direction:"up"},onMouseDown:qe=>qe.preventDefault(),onPointerDown:qe=>{xn(qe,!0)},onPointerUp:at,onPointerLeave:at,children:v.jsx(GE,{direction:"up"})}),v.jsx(Et,{...se("control"),tabIndex:-1,"aria-hidden":!0,disabled:q||typeof Ae=="number"&&He!==void 0&&Ae<=He||typeof Ae=="bigint"&&Je!==void 0&&Ae<=Je,mod:{direction:"down"},onMouseDown:qe=>qe.preventDefault(),onPointerDown:qe=>{xn(qe,!1)},onPointerUp:at,onPointerLeave:at,children:v.jsx(GE,{direction:"down"})})]});return v.jsx(Ni,{component:zte,allowNegative:L,className:vn(US.root,t),size:G,...Z,inputMode:xe?"numeric":"decimal",readOnly:U,disabled:q,value:typeof Ae=="bigint"?Ae.toString():Ae,getInputRef:Ht(re,Ce),onValueChange:an,rightSection:b||U||!(xe?qk(Ae,le):Fk(Ae))?w:w||Mt,classNames:ke,styles:te,unstyled:a,__staticSelector:"NumberInput",decimalScale:xe?0:j?T:0,onPaste:nn,onFocus:Fe,onKeyDown:$n,onKeyDownCapture:De,rightSectionPointerEvents:P??(q?"none":void 0),rightSectionWidth:B??`var(--ni-right-section-width-${G||"sm"})`,allowLeadingZeros:z,allowedDecimalSeparators:N,onBlur:Vn,attributes:ie,isAllowed:qe=>{if(!(!k||k(qe)))return!1;if(_!=="strict")return!0;if(!xe)return qte(qe.floatValue,He,Ye);if(qe.value===""||qe.value==="-")return!0;const Ue=Ih(qe.value);return Ue===null?!0:(Je===void 0||Ue>=Je)&&(oe===void 0||Ue<=oe)}})});vm.classes={...Ni.classes,...US};vm.varsResolver=sF;vm.displayName="@mantine/core/NumberInput";function Vte({reveal:e}){return v.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?v.jsxs(v.Fragment,{children:[v.jsx("path",{fill:"none",d:"M0 0h256v256H0z"}),v.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"}),v.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"})]}):v.jsxs(v.Fragment,{children:[v.jsx("path",{fill:"none",d:"M0 0h256v256H0z"}),v.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"}),v.jsx("circle",{cx:"128",cy:"128",r:"40",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"})]})})}var WS={root:"m_f61ca620",input:"m_ccf8da4c",innerInput:"m_f2d85dd2",visibilityToggle:"m_b1072d44"};const Wte={visibilityToggleIcon:Vte,size:"sm"},lF=(e,{size:n})=>({root:{"--psi-icon-size":Ln(n,"psi-icon-size"),"--psi-button-size":Ln(n,"psi-button-size")}}),d0=Pe(e=>{const n=ye("PasswordInput",Wte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,required:u,error:f,leftSection:h,disabled:d,id:p,variant:g,inputContainer:b,description:w,label:k,size:_,errorProps:S,descriptionProps:j,labelProps:T,withAsterisk:A,inputWrapperOrder:O,wrapperProps:M,radius:$,rightSection:q,rightSectionWidth:P,rightSectionPointerEvents:L,leftSectionWidth:U,visible:G,defaultVisible:B,onVisibilityChange:R,visibilityToggleIcon:D,visibilityToggleButtonProps:z,rightSectionProps:H,leftSectionProps:Y,leftSectionPointerEvents:N,withErrorStyles:W,mod:V,attributes:I,...Q}=n,ie=Pi(p),[re,Z]=Ai({value:G,defaultValue:B,finalValue:!1,onChange:R}),le=()=>Z(!re),ee=Ze({name:"PasswordInput",classes:WS,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:I,vars:l,varsResolver:lF}),{resolvedClassNames:se,resolvedStyles:ke}=Wi({classNames:t,styles:a,props:n}),{styleProps:te,rest:$e}=Fu(Q),xe=(S==null?void 0:S.id)||`${ie}-error`,Ae=(j==null?void 0:j.id)||`${ie}-description`,ze=`${f&&typeof f!="boolean"?xe:""} ${w?Ae:""}`,we=ze.trim().length>0?ze.trim():void 0,Ce=v.jsx(Jn,{...ee("visibilityToggle"),disabled:d,radius:$,"aria-pressed":re,tabIndex:-1,"aria-label":"Toggle password visibility",...z,variant:(z==null?void 0:z.variant)??"subtle",color:"gray",unstyled:o,onTouchEnd:Ne=>{var he;Ne.preventDefault(),(he=z==null?void 0:z.onTouchEnd)==null||he.call(z,Ne),le()},onMouseDown:Ne=>{var he;Ne.preventDefault(),(he=z==null?void 0:z.onMouseDown)==null||he.call(z,Ne),le()},onKeyDown:Ne=>{var he;(he=z==null?void 0:z.onKeyDown)==null||he.call(z,Ne),Ne.key===" "&&(Ne.preventDefault(),le())},children:v.jsx(D,{reveal:re})});return v.jsx(Xt.Wrapper,{required:u,id:ie,label:k,error:f,description:w,size:_,classNames:se,styles:ke,__staticSelector:"PasswordInput",__stylesApiProps:n,unstyled:o,withAsterisk:A,inputWrapperOrder:O,inputContainer:b,variant:g,labelProps:{...T,htmlFor:ie},descriptionProps:{...j,id:Ae},errorProps:{...S,id:xe},mod:V,attributes:I,...ee("root"),...te,...M,children:v.jsx(Xt,{component:"div",error:f,leftSection:h,size:_,classNames:{...se,input:vn(WS.input,se==null?void 0:se.input)},styles:ke,radius:$,disabled:d,__staticSelector:"PasswordInput",__stylesApiProps:n,rightSectionWidth:P,rightSection:q??Ce,variant:g,unstyled:o,leftSectionWidth:U,rightSectionPointerEvents:L||"all",rightSectionProps:H,leftSectionProps:Y,leftSectionPointerEvents:N,withAria:!1,withErrorStyles:W,attributes:I,children:v.jsx("input",{required:u,"data-invalid":!!f||void 0,"data-with-left-section":!!h||void 0,...ee("innerInput"),disabled:d,id:ie,...$e,"aria-describedby":we,autoComplete:$e.autoComplete||"off",type:re?"text":"password"})})})});d0.classes={...Ni.classes,...WS};d0.varsResolver=lF;d0.displayName="@mantine/core/PasswordInput";function Gte({offset:e,position:n,defaultOpened:t}){const[i,r]=x.useState(t),a=x.useRef(null),{x:o,y:l,elements:u,refs:f,update:h,placement:d}=Dy({placement:n,middleware:[pC({crossAxis:!0,padding:5,rootBoundary:"document"})]}),p=d.includes("right")?e:n.includes("left")?e*-1:0,g=d.includes("bottom")?e:n.includes("top")?e*-1:0,b=x.useCallback(({clientX:w,clientY:k})=>{f.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:w,y:k,left:w+p,top:k+g,right:w,bottom:k}}})},[u.reference]);return x.useEffect(()=>{if(f.floating.current){const w=a.current;w.addEventListener("mousemove",b);const k=ns(f.floating.current);return k.forEach(_=>{_.addEventListener("scroll",h)}),()=>{w.removeEventListener("mousemove",b),k.forEach(_=>{_.removeEventListener("scroll",h)})}}},[u.reference,f.floating.current,h,b,i]),{handleMouseMove:b,x:o,y:l,opened:i,setOpened:r,boundaryRef:a,floating:f.setFloating}}var h0={tooltip:"m_1b3c8819",arrow:"m_f898399f"};const Yte={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:xa("popover")},uF=(e,{radius:n,color:t})=>({tooltip:{"--tooltip-radius":n===void 0?void 0:qt(n),"--tooltip-bg":t?ft(t,e):void 0,"--tooltip-color":t?"var(--mantine-color-white)":void 0}}),m0=Pe(e=>{const n=ye("TooltipFloating",Yte,e),{children:t,refProp:i,withinPortal:r,style:a,className:o,classNames:l,styles:u,unstyled:f,radius:h,color:d,label:p,offset:g,position:b,multiline:w,zIndex:k,disabled:_,defaultOpened:S,variant:j,vars:T,portalProps:A,attributes:O,ref:M,...$}=n,q=ci(),P=Ze({name:"TooltipFloating",props:n,classes:h0,className:o,style:a,classNames:l,styles:u,unstyled:f,attributes:O,rootSelector:"tooltip",vars:T,varsResolver:uF}),{handleMouseMove:L,x:U,y:G,opened:B,boundaryRef:R,floating:D,setOpened:z}=Gte({offset:g,position:b,defaultOpened:S}),H=Cl(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=Ht(R,xy(H),M),N=H.props,W=I=>{var Q;(Q=N.onMouseEnter)==null||Q.call(N,I),L(I),z(!0)},V=I=>{var Q;(Q=N.onMouseLeave)==null||Q.call(N,I),z(!1)};return v.jsxs(v.Fragment,{children:[v.jsx(wl,{...A,withinPortal:r,children:v.jsx(fe,{...$,...P("tooltip",{style:{...tL(a,q),zIndex:k,display:!_&&B?"block":"none",top:(G&&Math.round(G))??"",left:(U&&Math.round(U))??""}}),variant:j,ref:D,mod:{multiline:w},children:p})}),x.cloneElement(H,{...N,[i]:Y,onMouseEnter:W,onMouseLeave:V})]})});m0.classes=h0;m0.varsResolver=uF;m0.displayName="@mantine/core/TooltipFloating";const cF=x.createContext({withinGroup:!1}),Kte={openDelay:0,closeDelay:0};function r9(e){const{openDelay:n,closeDelay:t,children:i}=ye("TooltipGroup",Kte,e);return v.jsx(cF,{value:{withinGroup:!0},children:v.jsx(NL,{delay:{open:n,close:t},children:i})})}r9.displayName="@mantine/core/TooltipGroup";r9.extend=e=>e;function Xte(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 Zte(e){const n=Xte(e.middlewares),t=[TL(e.offset)];return n.shift&&t.push(pC(typeof n.shift=="boolean"?{padding:8}:{padding:8,...n.shift})),n.flip&&t.push(typeof n.flip=="boolean"?Qg():Qg(n.flip)),t.push(EL({element:e.arrowRef,padding:e.arrowOffset})),n.inline?t.push(typeof n.inline=="boolean"?Kh():Kh(n.inline)):e.inline&&t.push(Kh()),t}function Qte(e){var T,A,O;const[n,t]=x.useState(e.defaultOpened),i=typeof e.opened=="boolean"?e.opened:n,r=x.use(cF).withinGroup,a=Pi(),o=x.useCallback(M=>{t(M),M&&k(a)},[a]),{x:l,y:u,context:f,refs:h,placement:d,middlewareData:{arrow:{x:p,y:g}={}}}=Dy({strategy:e.strategy,placement:e.position,open:i,onOpenChange:o,middleware:Zte(e),whileElementsMounted:zS}),{delay:b,currentId:w,setCurrentId:k}=$L(f,{id:a}),{getReferenceProps:_,getFloatingProps:S}=LL([RL(f,{enabled:(T=e.events)==null?void 0:T.hover,delay:r?b:{open:e.openDelay,close:e.closeDelay},mouseOnly:!((A=e.events)!=null&&A.touch)}),_J(f,{enabled:(O=e.events)==null?void 0:O.focus,visibleOnly:!0}),IL(f,{role:"tooltip"}),zL(f,{enabled:typeof e.opened>"u"})]);os(()=>{var M;(M=e.onPositionChange)==null||M.call(e,d)},[d]);const j=i&&w&&w!==a;return{x:l,y:u,arrowX:p,arrowY:g,reference:h.setReference,floating:h.setFloating,getFloatingProps:S,getReferenceProps:_,isGroupPhase:j,opened:i,placement:d}}const Jte={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:xa("popover"),middlewares:{flip:!0,shift:!0,inline:!1}},fF=(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:qt(n),"--tooltip-bg":t?a.background:void 0,"--tooltip-color":t?a.color:void 0}}},wt=Pe(e=>{const n=ye("Tooltip",Jte,e),{children:t,position:i,refProp:r,label:a,openDelay:o,closeDelay:l,onPositionChange:u,opened:f,defaultOpened:h,withinPortal:d,radius:p,color:g,classNames:b,styles:w,unstyled:k,style:_,className:S,withArrow:j,arrowSize:T,arrowOffset:A,arrowRadius:O,arrowPosition:M,offset:$,transitionProps:q,multiline:P,events:L,zIndex:U,disabled:G,onClick:B,onMouseEnter:R,onMouseLeave:D,inline:z,variant:H,keepMounted:Y,vars:N,portalProps:W,mod:V,floatingStrategy:I,middlewares:Q,autoContrast:ie,attributes:re,target:Z,ref:le,...ee}=n,{dir:se}=qu(),ke=x.useRef(null),te=Qte({position:WL(se,i),closeDelay:l,openDelay:o,onPositionChange:u,opened:f,defaultOpened:h,events:L,arrowRef:ke,arrowOffset:A,offset:typeof $=="number"?$+(j?T/2:0):$,inline:z,strategy:I,middlewares:Q});x.useEffect(()=>{const Ne=Z instanceof HTMLElement?Z:typeof Z=="string"?document.querySelector(Z):(Z==null?void 0:Z.current)||null;Ne&&te.reference(Ne)},[Z,te]);const $e=Ze({name:"Tooltip",props:n,classes:h0,className:S,style:_,classNames:b,styles:w,unstyled:k,attributes:re,rootSelector:"tooltip",vars:N,varsResolver:fF}),xe=Cl(t);if(!Z&&!xe)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 Ae=$e("tooltip");if(Z){const Ne=wE(q,{duration:100,transition:"fade"});return v.jsx(v.Fragment,{children:v.jsx(wl,{...W,withinPortal:d,children:v.jsx(ls,{...Ne,keepMounted:Y,mounted:!G&&!!te.opened,duration:te.isGroupPhase?10:Ne.duration,children:he=>v.jsxs(fe,{...ee,"data-fixed":I==="fixed"||void 0,variant:H,mod:[{multiline:P},V],...Ae,...te.getFloatingProps({ref:te.floating,className:Ae.className,style:{...Ae.style,...he,zIndex:U,top:te.y??0,left:te.x??0}}),children:[a,v.jsx(Jg,{ref:ke,arrowX:te.arrowX,arrowY:te.arrowY,visible:j,position:te.placement,arrowSize:T,arrowOffset:A,arrowRadius:O,arrowPosition:M,...$e("arrow")})]})})})})}const ze=xe.props,we=Ht(te.reference,xy(xe),le),Ce=wE(q,{duration:100,transition:"fade"});return v.jsxs(v.Fragment,{children:[v.jsx(wl,{...W,withinPortal:d,children:v.jsx(ls,{...Ce,keepMounted:Y,mounted:!G&&!!te.opened,duration:te.isGroupPhase?10:Ce.duration,children:Ne=>v.jsxs(fe,{...ee,"data-fixed":I==="fixed"||void 0,variant:H,mod:[{multiline:P},V],...te.getFloatingProps({ref:te.floating,className:$e("tooltip").className,style:{...$e("tooltip").style,...Ne,zIndex:U,top:te.y??0,left:te.x??0}}),children:[a,v.jsx(Jg,{ref:ke,arrowX:te.arrowX,arrowY:te.arrowY,visible:j,position:te.placement,arrowSize:T,arrowOffset:A,arrowRadius:O,arrowPosition:M,...$e("arrow")})]})})}),x.cloneElement(xe,te.getReferenceProps({onClick:B,onMouseEnter:R,onMouseLeave:D,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,...ze,className:vn(S,ze.className),[r]:we}))]})});wt.classes=h0;wt.varsResolver=fF;wt.displayName="@mantine/core/Tooltip";wt.Floating=m0;wt.Group=r9;const eie={size:"sm",withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left",openOnFocus:!0},jr=sp(e=>{const n=ye("Select",eie,e),{classNames:t,styles:i,unstyled:r,vars:a,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:u,onDropdownOpen:f,onFocus:h,onBlur:d,onClick:p,onChange:g,data:b,value:w,defaultValue:k,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:S,onOptionSubmit:j,comboboxProps:T,readOnly:A,disabled:O,filter:M,limit:$,withScrollArea:q,maxDropdownHeight:P,size:L,searchable:U,rightSection:G,checkIconPosition:B,withCheckIcon:R,withAlignedLabels:D,nothingFoundMessage:z,name:H,form:Y,searchValue:N,defaultSearchValue:W,onSearchChange:V,allowDeselect:I,error:Q,rightSectionPointerEvents:ie,id:re,clearable:Z,clearSectionMode:le,clearButtonProps:ee,hiddenInputProps:se,renderOption:ke,onClear:te,autoComplete:$e,scrollAreaProps:xe,__defaultRightSection:Ae,__clearSection:ze,__clearable:we,chevronColor:Ce,autoSelectOnBlur:Ne,openOnFocus:he,attributes:He,...Ye}=n,We=x.useMemo(()=>Ly(b),[b]),Qe=x.useRef({}),Je=x.useMemo(()=>vp(We),[We]),oe=Pi(re),[be,Ke,en]=Ai({value:w,defaultValue:k,finalValue:null,onChange:g}),je=be!=null?`${be}`in Je?Je[`${be}`]:Qe.current[`${be}`]:void 0,an=wX(je),[pn,Dn,bn]=Ai({value:N,defaultValue:W,finalValue:je?je.label:"",onChange:V}),sn=Vf({opened:o,defaultOpened:l,onDropdownOpen:()=>{f==null||f(),S?sn.selectFirstOption():sn.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{u==null||u(),setTimeout(sn.resetSelectedOption,0)}}),nn=En=>{Dn(En),sn.resetSelectedOption()},{resolvedClassNames:$n,resolvedStyles:De}=Wi({props:n,styles:i,classNames:t});x.useEffect(()=>{_&&sn.selectFirstOption()},[_,pn]),x.useEffect(()=>{w===null&&nn(""),w!=null&&je&&((an==null?void 0:an.value)!==je.value||(an==null?void 0:an.label)!==je.label)&&nn(je.label)},[w,je]),x.useEffect(()=>{var En,gn;!en&&!bn&&nn(be!=null?`${be}`in Je?(En=Je[`${be}`])==null?void 0:En.label:((gn=Qe.current[`${be}`])==null?void 0:gn.label)||"":"")},[Je,be]),x.useEffect(()=>{be&&`${be}`in Je&&(Qe.current[`${be}`]=Je[`${be}`])},[Je,be]);const Fe=v.jsx(On.ClearButton,{...ee,onClear:()=>{Ke(null,null),nn(""),te==null||te()}}),Vn=Z&&!!be&&!O&&!A;return v.jsxs(v.Fragment,{children:[v.jsxs(On,{store:sn,__staticSelector:"Select",classNames:$n,styles:De,unstyled:r,readOnly:A,size:L,attributes:He,keepMounted:Ne,onOptionSubmit:En=>{j==null||j(En);const gn=I&&`${Je[En].value}`==`${be}`?null:Je[En],xn=gn?gn.value:null;xn!==be&&Ke(xn,gn),!en&&nn(xn!=null&&(gn==null?void 0:gn.label)||""),sn.closeDropdown()},...T,children:[v.jsx(On.Target,{targetType:U?"input":"button",autoComplete:$e,withExpandedAttribute:!0,children:v.jsx(Ni,{id:oe,__defaultRightSection:v.jsx(On.Chevron,{size:L,error:Q,unstyled:r,color:Ce}),__clearSection:Fe,__clearable:Vn,__clearSectionMode:le,rightSection:G,rightSectionPointerEvents:ie||"none",...Ye,size:L,__staticSelector:"Select",disabled:O,readOnly:A||!U,value:pn,onChange:En=>{nn(En.currentTarget.value),sn.openDropdown(),_&&sn.selectFirstOption()},onFocus:En=>{he&&U&&sn.openDropdown(),h==null||h(En)},onBlur:En=>{Ne&&sn.clickSelectedOption(),U&&sn.closeDropdown();const gn=be!=null&&(`${be}`in Je?Je[`${be}`]:Qe.current[`${be}`]);nn(gn&&gn.label||""),d==null||d(En)},onClick:En=>{U?sn.openDropdown():sn.toggleDropdown(),p==null||p(En)},classNames:$n,styles:De,unstyled:r,pointer:!U,error:Q,attributes:He})}),v.jsx(qy,{data:We,hidden:A||O,filter:M,search:pn,limit:$,hiddenWhenEmpty:!z,withScrollArea:q,maxDropdownHeight:P,filterOptions:!!U&&(je==null?void 0:je.label)!==pn,value:be,checkIconPosition:B,withCheckIcon:R,withAlignedLabels:D,nothingFoundMessage:z,unstyled:r,labelId:Ye.label?`${oe}-label`:void 0,"aria-label":Ye.label?void 0:Ye["aria-label"],renderOption:ke,scrollAreaProps:xe})]}),v.jsx(On.HiddenInput,{value:be,name:H,form:Y,disabled:O,...se})]})});jr.classes={...Ni.classes,...On.classes};jr.displayName="@mantine/core/Select";function dF(e){if(e!==void 0)return typeof e=="number"?ve(e):e}function nie({spacing:e,verticalSpacing:n,cols:t,minColWidth:i,autoRows:r,selector:a}){var d;const o=ci(),l=n===void 0?e:n,u=i!==void 0,f=Bu({"--sg-spacing-x":Yt(Wr(e)),"--sg-spacing-y":Yt(Wr(l)),"--sg-auto-rows":r,...u?{"--sg-min-col-width":dF(i)}:{"--sg-cols":(d=Wr(t))==null?void 0:d.toString()}}),h=$t(o.breakpoints).reduce((p,g)=>(p[g]||(p[g]={}),typeof e=="object"&&e[g]!==void 0&&(p[g]["--sg-spacing-x"]=Yt(e[g])),typeof l=="object"&&l[g]!==void 0&&(p[g]["--sg-spacing-y"]=Yt(l[g])),!u&&typeof t=="object"&&t[g]!==void 0&&(p[g]["--sg-cols"]=t[g]),p),{});return v.jsx(Bf,{styles:f,media:um($t(h),o.breakpoints).filter(p=>$t(h[p.value]).length>0).map(p=>({query:`(min-width: ${o.breakpoints[p.value]})`,styles:h[p.value]})),selector:a})}function Uk(e){return typeof e=="object"&&e!==null?$t(e):[]}function tie(e){return e.sort((n,t)=>lm(n)-lm(t))}function iie({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}){return tie(Array.from(new Set([...Uk(e),...Uk(n),...i!==void 0?[]:Uk(t)])))}function rie({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,u=Bu({"--sg-spacing-x":Yt(Wr(e)),"--sg-spacing-y":Yt(Wr(o)),"--sg-auto-rows":r,...l?{"--sg-min-col-width":dF(i)}:{"--sg-cols":(d=Wr(t))==null?void 0:d.toString()}}),f=iie({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}),h=f.reduce((p,g)=>(p[g]||(p[g]={}),typeof e=="object"&&e[g]!==void 0&&(p[g]["--sg-spacing-x"]=Yt(e[g])),typeof o=="object"&&o[g]!==void 0&&(p[g]["--sg-spacing-y"]=Yt(o[g])),!l&&typeof t=="object"&&t[g]!==void 0&&(p[g]["--sg-cols"]=t[g]),p),{});return v.jsx(Bf,{styles:u,container:f.map(p=>({query:`simple-grid (min-width: ${p})`,styles:h[p]})),selector:a})}var hF={container:"m_925c2d2c",root:"m_2415a157"};const aie={cols:1,spacing:"md",type:"media"},Ko=Pe(e=>{const n=ye("SimpleGrid",aie,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,cols:u,verticalSpacing:f,spacing:h,type:d,minColWidth:p,autoFlow:g,autoRows:b,attributes:w,...k}=n,_=Ze({name:"SimpleGrid",classes:hF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l}),S=Sy(),j=p!==void 0?g||"auto-fill":void 0;return d==="container"?v.jsxs(v.Fragment,{children:[v.jsx(rie,{...n,selector:`.${S}`}),v.jsx("div",{..._("container"),children:v.jsx(fe,{..._("root",{className:S}),...k,"data-auto-cols":j})})]}):v.jsxs(v.Fragment,{children:[v.jsx(nie,{...n,selector:`.${S}`}),v.jsx(fe,{..._("root",{className:S}),...k,"data-auto-cols":j})]})});Ko.classes=hF;Ko.displayName="@mantine/core/SimpleGrid";var mF={root:"m_6d731127"};const oie={gap:"md",align:"stretch",justify:"flex-start"},pF=(e,{gap:n,align:t,justify:i})=>({root:{"--stack-gap":Yt(n),"--stack-align":t,"--stack-justify":i}}),kn=Pe(e=>{const n=ye("Stack",oie,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,align:u,justify:f,gap:h,variant:d,attributes:p,...g}=n;return v.jsx(fe,{...Ze({name:"Stack",props:n,classes:mF,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:pF})("root"),variant:d,...g})});kn.classes=mF;kn.varsResolver=pF;kn.displayName="@mantine/core/Stack";const[sie,lie]=Ar("Table component was not found in the tree");var yp={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 uie(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 Uu(e,n){const t=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,i=Pe(r=>{const a=ye(t,{},r),{classNames:o,className:l,style:u,styles:f,...h}=a,d=lie();return v.jsx(fe,{component:e,...uie(d,n),...d.getStyles(e,{className:l,classNames:o,style:u,styles:f,props:a}),...h})});return i.displayName=`@mantine/core/${t}`,i.classes=yp,i}const GS=Uu("th",{columnBorder:!0}),vF=Uu("td",{columnBorder:!0}),Lg=Uu("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),gF=Uu("thead",{stickyHeader:!0}),yF=Uu("tbody"),bF=Uu("tfoot"),wF=Uu("caption",{captionSide:!0}),cie={type:"scrollarea"},kF=(e,{minWidth:n,maxHeight:t,type:i})=>({scrollContainer:{"--table-min-width":ve(n),"--table-max-height":ve(t),"--table-overflow":i==="native"?"auto":void 0}}),p0=Pe(e=>{const n=ye("TableScrollContainer",cie,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:u,minWidth:f,maxHeight:h,type:d,scrollAreaProps:p,attributes:g,...b}=n,w=Ze({name:"TableScrollContainer",classes:yp,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:g,vars:l,varsResolver:kF,rootSelector:"scrollContainer"});return v.jsx(fe,{component:d==="scrollarea"?ur:"div",...d==="scrollarea"?h?{offsetScrollbars:"xy",...p}:{offsetScrollbars:"x",...p}:{},...w("scrollContainer"),...b,children:v.jsx("div",{...w("scrollContainerInner"),children:u})})});p0.classes=yp;p0.varsResolver=kF;p0.displayName="@mantine/core/TableScrollContainer";function a9({data:e}){return v.jsxs(v.Fragment,{children:[e.caption&&v.jsx(wF,{children:e.caption}),e.head&&v.jsx(gF,{children:v.jsx(Lg,{children:e.head.map((n,t)=>v.jsx(GS,{children:n},t))})}),e.body&&v.jsx(yF,{children:e.body.map((n,t)=>v.jsx(Lg,{children:n.map((i,r)=>v.jsx(vF,{children:i},r))},t))}),e.foot&&v.jsx(bF,{children:v.jsx(Lg,{children:e.foot.map((n,t)=>v.jsx(GS,{children:n},t))})})]})}a9.displayName="@mantine/core/TableDataRenderer";const fie={withRowBorders:!0,verticalSpacing:7},_F=(e,{layout:n,captionSide:t,horizontalSpacing:i,verticalSpacing:r,borderColor:a,stripedColor:o,highlightOnHoverColor:l,striped:u,highlightOnHover:f,stickyHeaderOffset:h,stickyHeader:d})=>({table:{"--table-layout":n,"--table-caption-side":t,"--table-horizontal-spacing":Yt(i),"--table-vertical-spacing":Yt(r),"--table-border-color":a?ft(a,e):void 0,"--table-striped-color":u&&o?ft(o,e):void 0,"--table-highlight-on-hover-color":f&&l?ft(l,e):void 0,"--table-sticky-header-offset":d?ve(h):void 0}}),Xe=Pe(e=>{const n=ye("Table",fie,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,horizontalSpacing:u,verticalSpacing:f,captionSide:h,stripedColor:d,highlightOnHoverColor:p,striped:g,highlightOnHover:b,withColumnBorders:w,withRowBorders:k,withTableBorder:_,borderColor:S,layout:j,data:T,children:A,stickyHeader:O,stickyHeaderOffset:M,mod:$,tabularNums:q,attributes:P,...L}=n,U=Ze({name:"Table",props:n,className:i,style:r,classes:yp,classNames:t,styles:a,unstyled:o,attributes:P,rootSelector:"table",vars:l,varsResolver:_F});return v.jsx(sie,{value:{getStyles:U,stickyHeader:O,striped:g===!0?"odd":g||void 0,highlightOnHover:b,withColumnBorders:w,withRowBorders:k,captionSide:h||"bottom"},children:v.jsx(fe,{component:"table",mod:[{"data-with-table-border":_,"data-tabular-nums":q},$],...U("table"),...L,children:A||!!T&&v.jsx(a9,{data:T})})})});Xe.classes=yp;Xe.varsResolver=_F;Xe.displayName="@mantine/core/Table";Xe.Td=vF;Xe.Th=GS;Xe.Tr=Lg;Xe.Thead=gF;Xe.Tbody=yF;Xe.Tfoot=bF;Xe.Caption=wF;Xe.ScrollContainer=p0;Xe.DataRenderer=a9;const[die,o9]=Ar("Tabs component was not found in the tree");var bp={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 s9=Pe(e=>{const n=ye("TabsList",null,e),{children:t,className:i,grow:r,justify:a,classNames:o,styles:l,style:u,mod:f,...h}=n,d=o9();return v.jsx(fe,{...d.getStyles("list",{className:i,style:u,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},f],"aria-orientation":d.orientation,__vars:{"--tabs-justify":a},...h,children:t})});s9.classes=bp;s9.displayName="@mantine/core/TabsList";const l9=Pe(e=>{const n=ye("TabsPanel",null,e),{children:t,className:i,value:r,classNames:a,styles:o,style:l,mod:u,keepMounted:f,...h}=n,d=op(),p=o9(),g=p.value===r,b=p.keepMounted||f,w=p.keepMountedMode!=="display-none",k=b&&w&&d!=="test"?v.jsx(x.Activity,{mode:g?"visible":"hidden",children:t}):b||g?t:null;return v.jsx(fe,{...p.getStyles("panel",{className:i,classNames:a,styles:o,style:[l,g?void 0:{display:"none"}],props:n}),mod:[{orientation:p.orientation},u],role:"tabpanel",id:p.getPanelId(r),"aria-labelledby":p.getTabId(r),...h,children:k})});l9.classes=bp;l9.displayName="@mantine/core/TabsPanel";const u9=Pe(e=>{const n=ye("TabsTab",null,e),{className:t,children:i,rightSection:r,leftSection:a,value:o,onClick:l,onKeyDown:u,disabled:f,color:h,style:d,classNames:p,styles:g,vars:b,mod:w,tabIndex:k,..._}=n,S=ci(),{dir:j}=qu(),T=o9(),A=o===T.value,O=$=>{T.onChange(T.allowTabDeactivation&&o===T.value?null:o),l==null||l($)},M={classNames:p,styles:g,props:n};return v.jsxs(Et,{...T.getStyles("tab",{className:t,style:d,variant:T.variant,...M}),disabled:f,unstyled:T.unstyled,variant:T.variant,mod:[{active:A,disabled:f,orientation:T.orientation,inverted:T.inverted,placement:T.orientation==="vertical"&&T.placement},w],role:"tab",id:T.getTabId(o),"aria-selected":A,tabIndex:k!==void 0?k:A||T.value===null?0:-1,"aria-controls":T.getPanelId(o),onClick:O,__vars:{"--tabs-color":h?ft(h,S):void 0},onKeyDown:Z6({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:T.activateTabWithKeyboard,loop:T.loop,orientation:T.orientation||"horizontal",dir:j,onKeyDown:u}),..._,children:[a&&v.jsx("span",{...T.getStyles("tabSection",M),"data-position":"left",children:a}),i&&v.jsx("span",{...T.getStyles("tabLabel",M),children:i}),r&&v.jsx("span",{...T.getStyles("tabSection",M),"data-position":"right",children:r})]})});u9.classes=bp;u9.displayName="@mantine/core/TabsTab";const KE="Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value",hie={keepMounted:!0,keepMountedMode:"activity",orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,variant:"default",placement:"left"},xF=(e,{radius:n,color:t,autoContrast:i})=>({root:{"--tabs-radius":qt(n),"--tabs-color":ft(t,e),"--tabs-text-color":ap(i,e)?If({color:t,theme:e,autoContrast:i}):void 0}}),Gt=Pe(e=>{const n=ye("Tabs",hie,e),{defaultValue:t,value:i,onChange:r,orientation:a,children:o,loop:l,id:u,activateTabWithKeyboard:f,allowTabDeactivation:h,variant:d,color:p,radius:g,inverted:b,placement:w,keepMounted:k,keepMountedMode:_,classNames:S,styles:j,unstyled:T,className:A,style:O,vars:M,autoContrast:$,mod:q,attributes:P,...L}=n,U=Pi(u),[G,B]=Ai({value:i,defaultValue:t,finalValue:null,onChange:r}),R=Ze({name:"Tabs",props:n,classes:bp,className:A,style:O,classNames:S,styles:j,unstyled:T,attributes:P,vars:M,varsResolver:xF});return v.jsx(die,{value:{placement:w,value:G,orientation:a,id:U,loop:l,activateTabWithKeyboard:f,getTabId:IT(`${U}-tab`,KE),getPanelId:IT(`${U}-panel`,KE),onChange:B,allowTabDeactivation:h,variant:d,color:p,radius:g,inverted:b,keepMounted:k,keepMountedMode:_,unstyled:T,getStyles:R},children:v.jsx(fe,{id:U,variant:d,mod:[{orientation:a,inverted:a==="horizontal"&&b,placement:a==="vertical"&&w},q],...R("root"),...L,children:o})})});Gt.classes=bp;Gt.varsResolver=xF;Gt.displayName="@mantine/core/Tabs";Gt.Tab=u9;Gt.Panel=l9;Gt.List=s9;function mie({data:e,value:n}){const t=n.map(i=>i.trim().toLowerCase());return e.reduce((i,r)=>(Eu(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 pie(e,n){return e?n.split(new RegExp(`[${e.join("")}]`)).map(t=>t.trim()).filter(t=>t!==""):[n]}function XE({splitChars:e,allowDuplicates:n,maxTags:t,value:i,currentTags:r,isDuplicate:a,onDuplicate:o}){const l=pie(e,i),u=[];if(n)u.push(...r,...l);else{u.push(...r);for(const f of l)(a?h=>a(h,u):h=>u.some(d=>d.toLowerCase()===h.toLowerCase()))(f)?o==null||o(f):u.push(f)}return t?u.slice(0,t):u}const vie={maxTags:1/0,acceptValueOnBlur:!0,splitChars:[","],hiddenInputValuesDivider:",",openOnFocus:!0,size:"sm"},c9=Pe(e=>{const n=ye("TagsInput",vie,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:u,value:f,defaultValue:h,onChange:d,onKeyDown:p,maxTags:g,allowDuplicates:b,onDuplicate:w,variant:k,data:_,dropdownOpened:S,defaultDropdownOpened:j,onDropdownOpen:T,onDropdownClose:A,selectFirstOptionOnChange:O,selectFirstOptionOnDropdownOpen:M,onOptionSubmit:$,comboboxProps:q,filter:P,limit:L,withScrollArea:U,maxDropdownHeight:G,searchValue:B,defaultSearchValue:R,onSearchChange:D,readOnly:z,disabled:H,splitChars:Y,onFocus:N,onBlur:W,onPaste:V,radius:I,rightSection:Q,rightSectionWidth:ie,rightSectionPointerEvents:re,rightSectionProps:Z,leftSection:le,leftSectionWidth:ee,leftSectionPointerEvents:se,leftSectionProps:ke,inputContainer:te,inputWrapperOrder:$e,withAsterisk:xe,required:Ae,labelProps:ze,descriptionProps:we,errorProps:Ce,wrapperProps:Ne,description:he,label:He,error:Ye,withErrorStyles:We,name:Qe,form:Je,id:oe,clearable:be,clearSectionMode:Ke,clearButtonProps:en,hiddenInputProps:je,hiddenInputValuesDivider:an,mod:pn,renderOption:Dn,renderPill:bn,onRemove:sn,onClear:nn,onMaxTags:$n,scrollAreaProps:De,acceptValueOnBlur:Fe,isDuplicate:Vn,openOnFocus:En,attributes:gn,ref:xn,loading:at,loadingPosition:Mt,...qe}=n,Ue=Pi(oe),In=Ly(_),ot=vp(In),Pn=x.useRef(null),rn=Ht(Pn,xn),on=Vf({opened:S,defaultOpened:j,onDropdownOpen:()=>{T==null||T(),M&&on.selectFirstOption()},onDropdownClose:()=>{A==null||A(),on.resetSelectedOption()}}),{styleProps:ln,rest:{type:Kn,autoComplete:Xn,...Lt}}=Fu(qe),[Rn,Mn]=Ai({value:f,defaultValue:h,finalValue:[],onChange:d}),[Qn,Dt]=Ai({value:B,defaultValue:R,finalValue:"",onChange:D}),fi=yn=>{Dt(yn),on.resetSelectedOption()},zi=Ze({name:"TagsInput",classes:{},props:n,classNames:t,styles:a,unstyled:o}),{resolvedClassNames:Ya,resolvedStyles:Co}=Wi({props:n,styles:a,classNames:t}),Ta=yn=>{if((Vn?Vn(yn,Rn):Rn.some(oi=>oi.toLowerCase()===yn.toLowerCase()))&&(w==null||w(yn),!b)){fi("");return}if(Rn.length>=g){$n==null||$n(yn);return}$==null||$(yn),fi(""),yn.length>0&&Mn([...Rn,yn])},dr=yn=>{if(p==null||p(yn),yn.isPropagationStopped())return;const oi=Qn.trim(),{length:cn}=oi;if(Y.includes(yn.key)&&cn>0&&(Mn(XE({splitChars:Y,allowDuplicates:b,maxTags:g,value:Qn,currentTags:Rn,isDuplicate:Vn,onDuplicate:w})),fi(""),yn.preventDefault()),yn.key==="Enter"&&cn>0&&!yn.nativeEvent.isComposing){if(yn.preventDefault(),document.querySelector(`#${on.listId} [data-combobox-option][data-combobox-selected]`))return;Ta(oi)}yn.key==="Backspace"&&cn===0&&Rn.length>0&&!yn.nativeEvent.isComposing&&!z&&(sn==null||sn(Rn[Rn.length-1]),Mn(Rn.slice(0,Rn.length-1)))},jo=yn=>{V==null||V(yn),yn.preventDefault(),yn.clipboardData&&(Mn(XE({splitChars:Y,allowDuplicates:b,maxTags:g,value:`${Qn}${yn.clipboardData.getData("text/plain")}`,currentTags:Rn,isDuplicate:Vn,onDuplicate:w})),fi(""))},Er=Rn.map((yn,oi)=>{const cn=()=>{const Mr=Rn.slice();Mr.splice(oi,1),Mn(Mr),sn==null||sn(yn)};return bn?v.jsx(x.Fragment,{children:bn({option:ot[yn]||{value:yn,label:yn,disabled:!1},value:yn,onRemove:cn,disabled:H||z})},`${yn}-${oi}`):v.jsx(xl,{withRemoveButton:!z,onRemove:cn,unstyled:o,disabled:H,attributes:gn,...zi("pill"),children:yn},`${yn}-${oi}`)});x.useEffect(()=>{O&&on.selectFirstOption()},[O,Rn,Qn]);const hr=v.jsx(On.ClearButton,{...en,onClear:()=>{var yn;Mn([]),fi(""),(yn=Pn.current)==null||yn.focus(),on.openDropdown(),nn==null||nn()}});return v.jsxs(v.Fragment,{children:[v.jsxs(On,{store:on,classNames:Ya,styles:Co,unstyled:o,size:u,readOnly:z,__staticSelector:"TagsInput",attributes:gn,onOptionSubmit:yn=>{$==null||$(yn),fi(""),Rn.length>=g?$n==null||$n(yn):Mn([...Rn,ot[yn].value]),on.resetSelectedOption()},...q,children:[v.jsx(On.DropdownTarget,{children:v.jsx(Mu,{...ln,__staticSelector:"TagsInput",classNames:Ya,styles:Co,unstyled:o,size:u,className:i,style:r,variant:k,disabled:H,radius:I,rightSection:Q,__clearSection:hr,__clearable:be&&Rn.length>0&&!H&&!z,__clearSectionMode:Ke,rightSectionWidth:ie,rightSectionPointerEvents:re,rightSectionProps:Z,leftSection:le,leftSectionWidth:ee,leftSectionPointerEvents:se,leftSectionProps:ke,loading:at,loadingPosition:Mt,inputContainer:te,inputWrapperOrder:$e,withAsterisk:xe,required:Ae,labelProps:ze,descriptionProps:we,errorProps:Ce,wrapperProps:Ne,description:he,label:He,error:Ye,withErrorStyles:We,__stylesApiProps:{...n,multiline:!0},id:Ue,mod:pn,attributes:gn,children:v.jsxs(xl.Group,{disabled:H,unstyled:o,...zi("pillsList"),children:[Er,v.jsx(On.EventsTarget,{autoComplete:Xn,withExpandedAttribute:!0,children:v.jsx(Mu.Field,{...Lt,ref:rn,...zi("inputField"),unstyled:o,onKeyDown:dr,onFocus:yn=>{N==null||N(yn),En&&on.openDropdown()},onBlur:yn=>{W==null||W(yn),Fe&&Ta(Qn),on.closeDropdown()},onPaste:jo,value:Qn,onChange:yn=>fi(yn.currentTarget.value),required:Ae&&Rn.length===0,disabled:H,readOnly:z,id:Ue})})]})})}),v.jsx(qy,{data:mie({data:In,value:Rn}),hidden:z||H,filter:P,search:Qn,limit:L,hiddenWhenEmpty:!0,withScrollArea:U,maxDropdownHeight:G,unstyled:o,labelId:He?`${Ue}-label`:void 0,"aria-label":He?void 0:qe["aria-label"],renderOption:Dn,scrollAreaProps:De})]}),v.jsx(On.HiddenInput,{name:Qe,form:Je,value:Rn,valuesDivider:an,disabled:H,...je})]})});c9.classes={...Ni.classes,...On.classes};c9.displayName="@mantine/core/TagsInput";const or=Pe(e=>v.jsx(Ni,{component:"input",...ye("TextInput",null,e),__staticSelector:"TextInput"}));or.classes=Ni.classes;or.displayName="@mantine/core/TextInput";const[gie,yie]=Ar("Timeline component was not found in tree");var f9={root:"m_43657ece",itemTitle:"m_2ebe8099",item:"m_436178ff",itemBullet:"m_8affcee1",itemBody:"m_540e8f41"};const d9=Pe(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,__active:o,__align:l,__lineActive:u,__vars:f,bullet:h,radius:d,color:p,lineVariant:g,children:b,title:w,mod:k,..._}=ye("TimelineItem",null,e),S=yie(),j=ci(),T={classNames:n,styles:r};return v.jsxs(fe,{...S.getStyles("item",{...T,className:t,style:i}),mod:[{"line-active":u,active:o},k],__vars:{"--tli-radius":d!==void 0?qt(d):void 0,"--tli-color":p?ft(p,j):void 0,"--tli-border-style":g||void 0},..._,children:[v.jsx(fe,{...S.getStyles("itemBullet",T),mod:{"with-child":!!h,align:l,active:o},children:h}),v.jsxs("div",{...S.getStyles("itemBody",T),children:[w&&v.jsx("div",{...S.getStyles("itemTitle",T),children:w}),v.jsx("div",{...S.getStyles("itemContent",T),children:b})]})]})});d9.classes=f9;d9.displayName="@mantine/core/TimelineItem";const bie={active:-1,align:"left"},SF=(e,{bulletSize:n,lineWidth:t,radius:i,color:r,autoContrast:a})=>({root:{"--tl-bullet-size":ve(n),"--tl-line-width":ve(t),"--tl-radius":i===void 0?void 0:qt(i),"--tl-color":r?ft(r,e):void 0,"--tl-icon-color":ap(a,e)?If({color:r,theme:e,autoContrast:a}):void 0}}),uf=Pe(e=>{const n=ye("Timeline",bie,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:u,active:f,color:h,radius:d,bulletSize:p,align:g,lineWidth:b,reverseActive:w,mod:k,autoContrast:_,attributes:S,...j}=n,T=Ze({name:"Timeline",classes:f9,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:S,vars:l,varsResolver:SF}),A=x.Children.toArray(u),O=A.map((M,$)=>{var q,P;return x.cloneElement(M,{unstyled:o,__align:g,__active:((q=M.props)==null?void 0:q.active)||(w?f>=A.length-$-1:f>=$),__lineActive:((P=M.props)==null?void 0:P.lineActive)||(w?f>=A.length-$-1:f-1>=$)})});return v.jsx(gie,{value:{getStyles:T},children:v.jsx(fe,{...T("root"),mod:[{align:g},k],...j,children:O})})});uf.classes=f9;uf.varsResolver=SF;uf.displayName="@mantine/core/Timeline";uf.Item=d9;const wie=["h1","h2","h3","h4","h5","h6"],kie=["xs","sm","md","lg","xl"];function _ie(e,n){const t=n!==void 0?n:`h${e}`;return wie.includes(t)?{fontSize:`var(--mantine-${t}-font-size)`,fontWeight:`var(--mantine-${t}-font-weight)`,lineHeight:`var(--mantine-${t}-line-height)`}:kie.includes(t)?{fontSize:`var(--mantine-font-size-${t})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:ve(t),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var CF={root:"m_8a5d1357"};const xie={order:1},jF=(e,{order:n,size:t,lineClamp:i,textWrap:r})=>{const a=_ie(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}}},El=Pe(e=>{const n=ye("Title",xie,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,order:l,vars:u,size:f,variant:h,lineClamp:d,textWrap:p,mod:g,attributes:b,...w}=n,k=Ze({name:"Title",props:n,classes:CF,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:u,varsResolver:jF});return[1,2,3,4,5,6].includes(l)?v.jsx(fe,{...k("root"),component:`h${l}`,variant:h,mod:[{order:l,"data-line-clamp":typeof d=="number"},g],size:f,...w}):null});El.classes=CF;El.varsResolver=jF;El.displayName="@mantine/core/Title";const h9=x.createContext(null);h9.displayName="@mantine/modals/ModalsContext";function Sie(){const e=x.use(h9);if(!e)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return e}const[Cie,Vu]=xX("mantine-modals"),jie=e=>{const n=e.modalId||ml();return Vu("openModal")({...e,modalId:n}),n},Aie=e=>{const n=e.modalId||ml();return Vu("openConfirmModal")({...e,modalId:n}),n},Oie=e=>{const n=e.modalId||ml();return Vu("openContextModal")({...e,modalId:n}),n},Tie=Vu("closeModal"),Eie=Vu("closeAllModals"),Mie=e=>Vu("updateModal")(e),Die=e=>Vu("updateContextModal")(e),Ra={open:jie,close:Tie,closeAll:Eie,openConfirmModal:Aie,openContextModal:Oie,updateModal:Mie,updateContextModal:Die};function Rie({id:e,cancelProps:n,confirmProps:t,labels:i={cancel:"",confirm:""},closeOnConfirm:r=!0,closeOnCancel:a=!0,groupProps:o,onCancel:l,onConfirm:u,children:f}){const{cancel:h,confirm:d}=i,p=Sie(),g=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 u=="function"&&u(),r&&p.closeModal(e)};return v.jsxs(v.Fragment,{children:[f&&v.jsx(fe,{mb:"md",children:f}),v.jsxs(Ee,{mt:f?0:"md",justify:"flex-end",...o,children:[v.jsx(Yn,{variant:"default",...n,onClick:g,children:(n==null?void 0:n.children)||h}),v.jsx(Yn,{...t,onClick:b,children:(t==null?void 0:t.children)||d})]})]})}function ZE(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 Pie(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 Nie(e){if(!e)return{confirmProps:{},modalProps:{}};const{id:n,children:t,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:l,confirmProps:u,groupProps:f,labels:h,...d}=e;return{confirmProps:{id:n,children:t,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:l,confirmProps:u,groupProps:f,labels:h},modalProps:{id:n,...d}}}function $ie({children:e,modalProps:n,labels:t,modals:i}){const[r,a]=x.useReducer(Pie,{modals:[],current:null}),o=x.useRef(r);o.current=r;const l=x.useRef(!1),u=x.useCallback(j=>{l.current||(l.current=!0,o.current.modals.concat().reverse().forEach(T=>{ZE(T,j)}),l.current=!1),a({type:"CLOSE_ALL",canceled:j})},[o,a]),f=x.useCallback(({modalId:j,...T})=>{const A=j||ml();return a({type:"OPEN",modal:{id:A,type:"content",props:T}}),A},[a]),h=x.useCallback(({modalId:j,...T})=>{const A=j||ml();return a({type:"OPEN",modal:{id:A,type:"confirm",props:T}}),A},[a]),d=x.useCallback((j,{modalId:T,...A})=>{const O=T||ml();return a({type:"OPEN",modal:{id:O,type:"context",props:A,ctx:j}}),O},[a]),p=x.useCallback((j,T)=>{if(!l.current){const A=o.current.modals.find(O=>O.id===j);A&&(l.current=!0,ZE(A,T),l.current=!1)}a({type:"CLOSE",modalId:j,canceled:T})},[o,a]),g=x.useCallback(({modalId:j,...T})=>{a({type:"UPDATE",modalId:j,newProps:T})},[a]),b=x.useCallback(({modalId:j,...T})=>{a({type:"UPDATE",modalId:j,newProps:T})},[a]);Cie({openModal:f,openConfirmModal:h,openContextModal:({modal:j,...T})=>d(j,T),closeModal:p,closeContextModal:p,closeAllModals:u,updateModal:g,updateContextModal:b});const w={modalProps:n||{},modals:r.modals,openModal:f,openConfirmModal:h,openContextModal:d,closeModal:p,closeContextModal:p,closeAll:u,updateModal:g,updateContextModal:b},k=()=>{const j=o.current.current;switch(j==null?void 0:j.type){case"context":{const{innerProps:T,...A}=j.props,O=i[j.ctx];return{modalProps:A,content:v.jsx(O,{innerProps:T,context:w,id:j.id})}}case"confirm":{const{modalProps:T,confirmProps:A}=Nie(j.props);return{modalProps:T,content:v.jsx(Rie,{...A,id:j.id,labels:j.props.labels||t})}}case"content":{const{children:T,...A}=j.props;return{modalProps:A,content:T}}default:return{modalProps:{},content:null}}},{modalProps:_,content:S}=k();return v.jsxs(h9,{value:w,children:[v.jsx(Gi,{zIndex:xa("modal")+1,...n,..._,opened:r.modals.length>0,onClose:()=>{var j;return p((j=r.current)==null?void 0:j.id)},children:S}),e]})}function zie(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 Lie(e){return x.useSyncExternalStore(e.subscribe,()=>e.getState(),()=>e.getState())}function Iie(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 Bie=()=>zie({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),Wu=Bie(),Fie=(e=Wu)=>Lie(e);function Jf(e,n){const t=e.getState(),i=Iie(n([...t.notifications,...t.queue]),t.defaultPosition,t.limit);e.setState({notifications:i.notifications,queue:i.queue,limit:t.limit,defaultPosition:t.defaultPosition})}function qie(e,n=Wu){const t=e.id||ml();return Jf(n,i=>e.id&&i.some(r=>r.id===e.id)?i:[...i,{...e,id:t}]),t}function AF(e,n=Wu){return Jf(n,t=>t.filter(i=>{var r;return i.id===e?((r=i.onClose)==null||r.call(i,i),!1):!0})),e}function Hie(e,n=Wu){return Jf(n,t=>t.map(i=>i.id===e.id?{...i,...e}:i)),e.id}function Uie(e=Wu){Jf(e,()=>[])}function Vie(e=Wu){Jf(e,n=>n.slice(0,e.getState().limit))}const hn={show:qie,hide:AF,update:Hie,clean:Uie,cleanQueue:Vie,updateState:Jf},OF=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function Wie(e,n){return e.reduce((t,i)=>(t[i.position||n].push(i),t),OF.reduce((t,i)=>(t[i]=[],t),{}))}const QE={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},Gie={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function Yie({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:QE[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"},u={opacity:1,transform:Gie[o]},f={opacity:0,maxHeight:0,transform:QE[o]};return{...l,...{entering:u,entered:u,exiting:f,exited:f}[e]}}function Kie(e,n){return typeof n=="number"?n:n===!1||e===!1?!1:e}function TF({data:e,onHide:n,autoClose:t,paused:i,onHoverStart:r,onHoverEnd:a,...o}){const{autoClose:l,message:u,onOpen:f,...h}=e,d=Kie(t,e.autoClose),p=x.useRef(-1),[g,b]=x.useState(!1),w=()=>window.clearTimeout(p.current),k=()=>{n(e.id),w()},_=()=>{w(),typeof d=="number"&&(p.current=window.setTimeout(k,d))},S=()=>{b(!0),r==null||r()},j=()=>{b(!1),a==null||a()};return x.useEffect(()=>{var T;(T=e.onOpen)==null||T.call(e,e)},[]),x.useEffect(()=>(_(),w),[d]),x.useEffect(()=>(i||g?w():_(),w),[i,g]),v.jsx(c0,{...o,...h,onClose:k,onMouseEnter:S,onMouseLeave:j,children:u})}TF.displayName="@mantine/notifications/NotificationContainer";var EF={root:"m_b37d9ac7",notification:"m_5ed0edd0"};function YS(){return YS=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":ve(t)}}),_o=Pe(e=>{const n=ye("Notifications",lre,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:u,position:f,autoClose:h,transitionDuration:d,containerWidth:p,notificationMaxHeight:g,limit:b,zIndex:w,store:k,portalProps:_,withinPortal:S,pauseResetOnHover:j,...T}=n,A=ci(),O=Fie(k),M=yX(),$=eC(),q=x.useRef({}),P=x.useRef(0),[L,U]=x.useState(0),G=x.useCallback(()=>U(Y=>Y+1),[]),B=x.useCallback(()=>U(Y=>Math.max(0,Y-1)),[]),R=A.respectReducedMotion&&$?1:d,D=Ze({name:"Notifications",classes:EF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:u,vars:l,varsResolver:RF});x.useEffect(()=>{k==null||k.updateState(Y=>({...Y,limit:b||5,defaultPosition:f}))},[b,f]),os(()=>{O.notifications.length>P.current&&setTimeout(()=>M(),0),P.current=O.notifications.length},[O.notifications]);const z=Wie(O.notifications,f),H=OF.reduce((Y,N)=>(Y[N]=z[N].map(({style:W,...V})=>v.jsx(sre,{timeout:R,onEnter:()=>q.current[V.id].offsetHeight,nodeRef:{current:q.current[V.id]},children:I=>v.jsx(TF,{ref:Q=>{Q&&(q.current[V.id]=Q)},data:V,onHide:Q=>AF(Q,k),autoClose:h,paused:j==="all"?L>0:!1,onHoverStart:G,onHoverEnd:B,...D("notification",{style:{...Yie({state:I,position:N,transitionDuration:R,maxHeight:g}),...W}})})},V.id)),Y),{});return v.jsxs(wl,{withinPortal:S,..._,children:[v.jsx(fe,{...D("root"),"data-position":"top-center",...T,children:v.jsx(tl,{children:H["top-center"]})}),v.jsx(fe,{...D("root"),"data-position":"top-left",...T,children:v.jsx(tl,{children:H["top-left"]})}),v.jsx(fe,{...D("root",{className:Tu.classNames.fullWidth}),"data-position":"top-right",...T,children:v.jsx(tl,{children:H["top-right"]})}),v.jsx(fe,{...D("root",{className:Tu.classNames.fullWidth}),"data-position":"bottom-right",...T,children:v.jsx(tl,{children:H["bottom-right"]})}),v.jsx(fe,{...D("root"),"data-position":"bottom-left",...T,children:v.jsx(tl,{children:H["bottom-left"]})}),v.jsx(fe,{...D("root"),"data-position":"bottom-center",...T,children:v.jsx(tl,{children:H["bottom-center"]})})]})});_o.classes=EF;_o.varsResolver=RF;_o.displayName="@mantine/notifications/Notifications";_o.show=hn.show;_o.hide=hn.hide;_o.update=hn.update;_o.clean=hn.clean;_o.cleanQueue=hn.cleanQueue;_o.updateState=hn.updateState;var Yk={exports:{}},wh={},Kk={exports:{}},Xk={};/** * @license React * scheduler.production.js * @@ -82,7 +82,7 @@ ${o?`${l("light")}{${o}}`:""}`}function Zv({theme:e,color:n,colorScheme:t,name:i * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var iM;function lre(){return iM||(iM=1,(function(e){function n(D,z){var H=D.length;D.push(z);e:for(;0>>1,N=D[Y];if(0>>1;Yr(I,H))Qr(ie,I)?(D[Y]=ie,D[Q]=H,Y=Q):(D[Y]=I,D[V]=H,Y=V);else if(Qr(ie,H))D[Y]=ie,D[Q]=H,Y=Q;else break e}}return z}function r(D,z){var H=D.sortIndex-z.sortIndex;return H!==0?H:D.id-z.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 u=[],f=[],h=1,d=null,p=3,g=!1,b=!1,w=!1,k=!1,_=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function T(D){for(var z=t(f);z!==null;){if(z.callback===null)i(f);else if(z.startTime<=D)i(f),z.sortIndex=z.expirationTime,n(u,z);else break;z=t(f)}}function A(D){if(w=!1,T(D),!b)if(t(u)!==null)b=!0,O||(O=!0,U());else{var z=t(f);z!==null&&R(A,z.startTime-D)}}var O=!1,M=-1,$=5,q=-1;function P(){return k?!0:!(e.unstable_now()-q<$)}function L(){if(k=!1,O){var D=e.unstable_now();q=D;var z=!0;try{e:{b=!1,w&&(w=!1,S(M),M=-1),g=!0;var H=p;try{n:{for(T(D),d=t(u);d!==null&&!(d.expirationTime>D&&P());){var Y=d.callback;if(typeof Y=="function"){d.callback=null,p=d.priorityLevel;var N=Y(d.expirationTime<=D);if(D=e.unstable_now(),typeof N=="function"){d.callback=N,T(D),z=!0;break n}d===t(u)&&i(u),T(D)}else i(u);d=t(u)}if(d!==null)z=!0;else{var W=t(f);W!==null&&R(A,W.startTime-D),z=!1}}break e}finally{d=null,p=H,g=!1}z=void 0}}finally{z?U():O=!1}}}var U;if(typeof j=="function")U=function(){j(L)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,B=G.port2;G.port1.onmessage=L,U=function(){B.postMessage(null)}}else U=function(){_(L,0)};function R(D,z){M=_(function(){D(e.unstable_now())},z)}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(f,D),t(u)===null&&D===t(f)&&(w?(S(M),M=-1):w=!0,R(A,H-Y))):(D.sortIndex=N,n(u,D),b||g||(b=!0,O||(O=!0,U()))),D},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(D){var z=p;return function(){var H=p;p=z;try{return D.apply(this,arguments)}finally{p=H}}}})(Xk)),Xk}var rM;function ure(){return rM||(rM=1,Kk.exports=lre()),Kk.exports}/** + */var iM;function ure(){return iM||(iM=1,(function(e){function n(D,z){var H=D.length;D.push(z);e:for(;0>>1,N=D[Y];if(0>>1;Yr(I,H))Qr(ie,I)?(D[Y]=ie,D[Q]=H,Y=Q):(D[Y]=I,D[V]=H,Y=V);else if(Qr(ie,H))D[Y]=ie,D[Q]=H,Y=Q;else break e}}return z}function r(D,z){var H=D.sortIndex-z.sortIndex;return H!==0?H:D.id-z.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 u=[],f=[],h=1,d=null,p=3,g=!1,b=!1,w=!1,k=!1,_=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function T(D){for(var z=t(f);z!==null;){if(z.callback===null)i(f);else if(z.startTime<=D)i(f),z.sortIndex=z.expirationTime,n(u,z);else break;z=t(f)}}function A(D){if(w=!1,T(D),!b)if(t(u)!==null)b=!0,O||(O=!0,U());else{var z=t(f);z!==null&&R(A,z.startTime-D)}}var O=!1,M=-1,$=5,q=-1;function P(){return k?!0:!(e.unstable_now()-q<$)}function L(){if(k=!1,O){var D=e.unstable_now();q=D;var z=!0;try{e:{b=!1,w&&(w=!1,S(M),M=-1),g=!0;var H=p;try{n:{for(T(D),d=t(u);d!==null&&!(d.expirationTime>D&&P());){var Y=d.callback;if(typeof Y=="function"){d.callback=null,p=d.priorityLevel;var N=Y(d.expirationTime<=D);if(D=e.unstable_now(),typeof N=="function"){d.callback=N,T(D),z=!0;break n}d===t(u)&&i(u),T(D)}else i(u);d=t(u)}if(d!==null)z=!0;else{var W=t(f);W!==null&&R(A,W.startTime-D),z=!1}}break e}finally{d=null,p=H,g=!1}z=void 0}}finally{z?U():O=!1}}}var U;if(typeof j=="function")U=function(){j(L)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,B=G.port2;G.port1.onmessage=L,U=function(){B.postMessage(null)}}else U=function(){_(L,0)};function R(D,z){M=_(function(){D(e.unstable_now())},z)}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(f,D),t(u)===null&&D===t(f)&&(w?(S(M),M=-1):w=!0,R(A,H-Y))):(D.sortIndex=N,n(u,D),b||g||(b=!0,O||(O=!0,U()))),D},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(D){var z=p;return function(){var H=p;p=z;try{return D.apply(this,arguments)}finally{p=H}}}})(Xk)),Xk}var rM;function cre(){return rM||(rM=1,Kk.exports=ure()),Kk.exports}/** * @license React * react-dom-client.production.js * @@ -90,410 +90,410 @@ ${o?`${l("light")}{${o}}`:""}`}function Zv({theme:e,color:n,colorScheme:t,name:i * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var aM;function cre(){if(aM)return wh;aM=1;var e=ure(),n=K6(),t=Wz();function i(s){var c="https://react.dev/errors/"+s;if(1N||(s.current=Y[N],Y[N]=null,N--)}function I(s,c){N++,Y[N]=s.current,s.current=c}var Q=W(null),ie=W(null),re=W(null),Z=W(null);function le(s,c){switch(I(re,c),I(ie,s),I(Q,null),c.nodeType){case 9:case 11:s=(s=c.documentElement)&&(s=s.namespaceURI)?iT(s):0;break;default:if(s=c.tagName,c=c.namespaceURI)c=iT(c),s=rT(c,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}V(Q),I(Q,s)}function ee(){V(Q),V(ie),V(re)}function se(s){s.memoizedState!==null&&I(Z,s);var c=Q.current,m=rT(c,s.type);c!==m&&(I(ie,s),I(Q,m))}function ke(s){ie.current===s&&(V(Q),V(ie)),Z.current===s&&(V(Z),hh._currentValue=H)}var te,$e;function xe(s){if(te===void 0)try{throw Error()}catch(m){var c=m.stack.trim().match(/\n( *(at )?)/);te=c&&c[1]||"",$e=-1N||(s.current=Y[N],Y[N]=null,N--)}function I(s,c){N++,Y[N]=s.current,s.current=c}var Q=W(null),ie=W(null),re=W(null),Z=W(null);function le(s,c){switch(I(re,c),I(ie,s),I(Q,null),c.nodeType){case 9:case 11:s=(s=c.documentElement)&&(s=s.namespaceURI)?iT(s):0;break;default:if(s=c.tagName,c=c.namespaceURI)c=iT(c),s=rT(c,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}V(Q),I(Q,s)}function ee(){V(Q),V(ie),V(re)}function se(s){s.memoizedState!==null&&I(Z,s);var c=Q.current,m=rT(c,s.type);c!==m&&(I(ie,s),I(Q,m))}function ke(s){ie.current===s&&(V(Q),V(ie)),Z.current===s&&(V(Z),hh._currentValue=H)}var te,$e;function xe(s){if(te===void 0)try{throw Error()}catch(m){var c=m.stack.trim().match(/\n( *(at )?)/);te=c&&c[1]||"",$e=-1)":-1C||ne[y]!==pe[C]){var Oe=` `+ne[y].replace(" at new "," at ");return s.displayName&&Oe.includes("")&&(Oe=Oe.replace("",s.displayName)),Oe}while(1<=y&&0<=C);break}}}finally{Ae=!1,Error.prepareStackTrace=m}return(m=s?s.displayName||s.name:"")?xe(m):""}function we(s,c){switch(s.tag){case 26:case 27:case 5:return xe(s.type);case 16:return xe("Lazy");case 13:return s.child!==c&&c!==null?xe("Suspense Fallback"):xe("Suspense");case 19:return xe("SuspenseList");case 0:case 15:return ze(s.type,!1);case 11:return ze(s.type.render,!1);case 1:return ze(s.type,!0);case 31:return xe("Activity");default:return""}}function Ce(s){try{var c="",m=null;do c+=we(s,m),m=s,s=s.return;while(s);return c}catch(y){return` Error generating stack: `+y.message+` -`+y.stack}}var Ne=Object.prototype.hasOwnProperty,he=e.unstable_scheduleCallback,He=e.unstable_cancelCallback,Ye=e.unstable_shouldYield,We=e.unstable_requestPaint,Qe=e.unstable_now,Je=e.unstable_getCurrentPriorityLevel,oe=e.unstable_ImmediatePriority,be=e.unstable_UserBlockingPriority,Ke=e.unstable_NormalPriority,en=e.unstable_LowPriority,je=e.unstable_IdlePriority,an=e.log,pn=e.unstable_setDisableYieldValue,Dn=null,bn=null;function sn(s){if(typeof an=="function"&&pn(s),bn&&typeof bn.setStrictMode=="function")try{bn.setStrictMode(Dn,s)}catch{}}var nn=Math.clz32?Math.clz32:Fe,$n=Math.log,De=Math.LN2;function Fe(s){return s>>>=0,s===0?32:31-($n(s)/De|0)|0}var Vn=256,En=262144,gn=4194304;function xn(s){var c=s&42;if(c!==0)return c;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 at(s,c,m){var y=s.pendingLanes;if(y===0)return 0;var C=0,E=s.suspendedLanes,F=s.pingedLanes;s=s.warmLanes;var K=y&134217727;return K!==0?(y=K&~E,y!==0?C=xn(y):(F&=K,F!==0?C=xn(F):m||(m=K&~s,m!==0&&(C=xn(m))))):(K=y&~E,K!==0?C=xn(K):F!==0?C=xn(F):m||(m=y&~s,m!==0&&(C=xn(m)))),C===0?0:c!==0&&c!==C&&(c&E)===0&&(E=C&-C,m=c&-c,E>=m||E===32&&(m&4194048)!==0)?c:C}function Mt(s,c){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&c)===0}function qe(s,c){switch(s){case 1:case 2:case 4:case 8:case 64:return c+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 c+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 Ue(){var s=gn;return gn<<=1,(gn&62914560)===0&&(gn=4194304),s}function In(s){for(var c=[],m=0;31>m;m++)c.push(s);return c}function ot(s,c){s.pendingLanes|=c,c!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Pn(s,c,m,y,C,E){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,ne=s.expirationTimes,pe=s.hiddenUpdates;for(m=F&~m;0"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var qp=/[\n"\\]/g;function mr(s){return s.replace(qp,function(c){return"\\"+c.charCodeAt(0).toString(16)+" "})}function _d(s,c,m,y,C,E,F,K){s.name="",F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"?s.type=F:s.removeAttribute("type"),c!=null?F==="number"?(c===0&&s.value===""||s.value!=c)&&(s.value=""+tr(c)):s.value!==""+tr(c)&&(s.value=""+tr(c)):F!=="submit"&&F!=="reset"||s.removeAttribute("value"),c!=null?Sd(s,F,tr(c)):m!=null?Sd(s,F,tr(m)):y!=null&&s.removeAttribute("value"),C==null&&E!=null&&(s.defaultChecked=!!E),C!=null&&(s.checked=C&&typeof C!="function"&&typeof C!="symbol"),K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?s.name=""+tr(K):s.removeAttribute("name")}function xd(s,c,m,y,C,E,F,K){if(E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(s.type=E),c!=null||m!=null){if(!(E!=="submit"&&E!=="reset"||c!=null)){wd(s);return}m=m!=null?""+tr(m):"",c=c!=null?""+tr(c):m,K||c===s.value||(s.value=c),s.defaultValue=c}y=y??C,y=typeof y!="function"&&typeof y!="symbol"&&!!y,s.checked=K?s.checked:!!y,s.defaultChecked=!!y,F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"&&(s.name=F),wd(s)}function Sd(s,c,m){c==="number"&&ql(s.ownerDocument)===s||s.defaultValue===""+m||(s.defaultValue=""+m)}function Ka(s,c,m,y){if(s=s.options,c){c={};for(var C=0;C"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ce=!1;if(X)try{var _e={};Object.defineProperty(_e,"passive",{get:function(){ce=!0}}),window.addEventListener("test",_e,_e),window.removeEventListener("test",_e,_e)}catch{ce=!1}var Ie=null,fn=null,Wn=null;function ht(){if(Wn)return Wn;var s,c=fn,m=c.length,y,C="value"in Ie?Ie.value:Ie.textContent,E=C.length;for(s=0;s=Pd),cA=" ",fA=!1;function dA(s,c){switch(s){case"keyup":return mY.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hA(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var tc=!1;function vY(s,c){switch(s){case"compositionend":return hA(c);case"keypress":return c.which!==32?null:(fA=!0,cA);case"textInput":return s=c.data,s===cA&&fA?null:s;default:return null}}function gY(s,c){if(tc)return s==="compositionend"||!_b&&dA(s,c)?(s=ht(),Wn=fn=Ie=null,tc=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1=c)return{node:m,offset:c-s};s=y}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=kA(m)}}function xA(s,c){return s&&c?s===c?!0:s&&s.nodeType===3?!1:c&&c.nodeType===3?xA(s,c.parentNode):"contains"in s?s.contains(c):s.compareDocumentPosition?!!(s.compareDocumentPosition(c)&16):!1:!1}function SA(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var c=ql(s.document);c instanceof s.HTMLIFrameElement;){try{var m=typeof c.contentWindow.location.href=="string"}catch{m=!1}if(m)s=c.contentWindow;else break;c=ql(s.document)}return c}function Cb(s){var c=s&&s.nodeName&&s.nodeName.toLowerCase();return c&&(c==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||c==="textarea"||s.contentEditable==="true")}var CY=X&&"documentMode"in document&&11>=document.documentMode,ic=null,jb=null,Ld=null,Ab=!1;function CA(s,c,m){var y=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;Ab||ic==null||ic!==ql(y)||(y=ic,"selectionStart"in y&&Cb(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),Ld&&zd(Ld,y)||(Ld=y,y=Nv(jb,"onSelect"),0>=F,C-=F,Xa=1<<32-nn(c)+C|m<qn?(lt=mn,mn=null):lt=mn.sibling;var vt=ge(ue,mn,me[qn],Me);if(vt===null){mn===null&&(mn=lt);break}s&&mn&&vt.alternate===null&&c(ue,mn),ae=E(vt,ae,qn),pt===null?wn=vt:pt.sibling=vt,pt=vt,mn=lt}if(qn===me.length)return m(ue,mn),ut&&Eo(ue,qn),wn;if(mn===null){for(;qnqn?(lt=mn,mn=null):lt=mn.sibling;var Zs=ge(ue,mn,vt.value,Me);if(Zs===null){mn===null&&(mn=lt);break}s&&mn&&Zs.alternate===null&&c(ue,mn),ae=E(Zs,ae,qn),pt===null?wn=Zs:pt.sibling=Zs,pt=Zs,mn=lt}if(vt.done)return m(ue,mn),ut&&Eo(ue,qn),wn;if(mn===null){for(;!vt.done;qn++,vt=me.next())vt=Re(ue,vt.value,Me),vt!==null&&(ae=E(vt,ae,qn),pt===null?wn=vt:pt.sibling=vt,pt=vt);return ut&&Eo(ue,qn),wn}for(mn=y(mn);!vt.done;qn++,vt=me.next())vt=Se(mn,ue,qn,vt.value,Me),vt!==null&&(s&&vt.alternate!==null&&mn.delete(vt.key===null?qn:vt.key),ae=E(vt,ae,qn),pt===null?wn=vt:pt.sibling=vt,pt=vt);return s&&mn.forEach(function(VK){return c(ue,VK)}),ut&&Eo(ue,qn),wn}function At(ue,ae,me,Me){if(typeof me=="object"&&me!==null&&me.type===w&&me.key===null&&(me=me.props.children),typeof me=="object"&&me!==null){switch(me.$$typeof){case g:e:{for(var wn=me.key;ae!==null;){if(ae.key===wn){if(wn=me.type,wn===w){if(ae.tag===7){m(ue,ae.sibling),Me=C(ae,me.props.children),Me.return=ue,ue=Me;break e}}else if(ae.elementType===wn||typeof wn=="object"&&wn!==null&&wn.$$typeof===$&&eu(wn)===ae.type){m(ue,ae.sibling),Me=C(ae,me.props),Ud(Me,me),Me.return=ue,ue=Me;break e}m(ue,ae);break}else c(ue,ae);ae=ae.sibling}me.type===w?(Me=Kl(me.props.children,ue.mode,Me,me.key),Me.return=ue,ue=Me):(Me=Qp(me.type,me.key,me.props,null,ue.mode,Me),Ud(Me,me),Me.return=ue,ue=Me)}return F(ue);case b:e:{for(wn=me.key;ae!==null;){if(ae.key===wn)if(ae.tag===4&&ae.stateNode.containerInfo===me.containerInfo&&ae.stateNode.implementation===me.implementation){m(ue,ae.sibling),Me=C(ae,me.children||[]),Me.return=ue,ue=Me;break e}else{m(ue,ae);break}else c(ue,ae);ae=ae.sibling}Me=Pb(me,ue.mode,Me),Me.return=ue,ue=Me}return F(ue);case $:return me=eu(me),At(ue,ae,me,Me)}if(R(me))return dn(ue,ae,me,Me);if(U(me)){if(wn=U(me),typeof wn!="function")throw Error(i(150));return me=wn.call(me),jn(ue,ae,me,Me)}if(typeof me.then=="function")return At(ue,ae,av(me),Me);if(me.$$typeof===j)return At(ue,ae,nv(ue,me),Me);ov(ue,me)}return typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint"?(me=""+me,ae!==null&&ae.tag===6?(m(ue,ae.sibling),Me=C(ae,me),Me.return=ue,ue=Me):(m(ue,ae),Me=Rb(me,ue.mode,Me),Me.return=ue,ue=Me),F(ue)):m(ue,ae)}return function(ue,ae,me,Me){try{Hd=0;var wn=At(ue,ae,me,Me);return mc=null,wn}catch(mn){if(mn===hc||mn===iv)throw mn;var pt=Pr(29,mn,null,ue.mode);return pt.lanes=Me,pt.return=ue,pt}finally{}}}var tu=YA(!0),KA=YA(!1),Ps=!1;function Wb(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gb(s,c){s=s.updateQueue,c.updateQueue===s&&(c.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Ns(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function $s(s,c,m){var y=s.updateQueue;if(y===null)return null;if(y=y.shared,(bt&2)!==0){var C=y.pending;return C===null?c.next=c:(c.next=C.next,C.next=c),y.pending=c,c=Zp(s),DA(s,null,m),c}return Xp(s,y,c,m),Zp(s)}function Vd(s,c,m){if(c=c.updateQueue,c!==null&&(c=c.shared,(m&4194048)!==0)){var y=c.lanes;y&=s.pendingLanes,m|=y,c.lanes=m,on(s,m)}}function Yb(s,c){var m=s.updateQueue,y=s.alternate;if(y!==null&&(y=y.updateQueue,m===y)){var C=null,E=null;if(m=m.firstBaseUpdate,m!==null){do{var F={lane:m.lane,tag:m.tag,payload:m.payload,callback:null,next:null};E===null?C=E=F:E=E.next=F,m=m.next}while(m!==null);E===null?C=E=c:E=E.next=c}else C=E=c;m={baseState:y.baseState,firstBaseUpdate:C,lastBaseUpdate:E,shared:y.shared,callbacks:y.callbacks},s.updateQueue=m;return}s=m.lastBaseUpdate,s===null?m.firstBaseUpdate=c:s.next=c,m.lastBaseUpdate=c}var Kb=!1;function Wd(){if(Kb){var s=dc;if(s!==null)throw s}}function Gd(s,c,m,y){Kb=!1;var C=s.updateQueue;Ps=!1;var E=C.firstBaseUpdate,F=C.lastBaseUpdate,K=C.shared.pending;if(K!==null){C.shared.pending=null;var ne=K,pe=ne.next;ne.next=null,F===null?E=pe:F.next=pe,F=ne;var Oe=s.alternate;Oe!==null&&(Oe=Oe.updateQueue,K=Oe.lastBaseUpdate,K!==F&&(K===null?Oe.firstBaseUpdate=pe:K.next=pe,Oe.lastBaseUpdate=ne))}if(E!==null){var Re=C.baseState;F=0,Oe=pe=ne=null,K=E;do{var ge=K.lane&-536870913,Se=ge!==K.lane;if(Se?(st&ge)===ge:(y&ge)===ge){ge!==0&&ge===fc&&(Kb=!0),Oe!==null&&(Oe=Oe.next={lane:0,tag:K.tag,payload:K.payload,callback:null,next:null});e:{var dn=s,jn=K;ge=c;var At=m;switch(jn.tag){case 1:if(dn=jn.payload,typeof dn=="function"){Re=dn.call(At,Re,ge);break e}Re=dn;break e;case 3:dn.flags=dn.flags&-65537|128;case 0:if(dn=jn.payload,ge=typeof dn=="function"?dn.call(At,Re,ge):dn,ge==null)break e;Re=d({},Re,ge);break e;case 2:Ps=!0}}ge=K.callback,ge!==null&&(s.flags|=64,Se&&(s.flags|=8192),Se=C.callbacks,Se===null?C.callbacks=[ge]:Se.push(ge))}else Se={lane:ge,tag:K.tag,payload:K.payload,callback:K.callback,next:null},Oe===null?(pe=Oe=Se,ne=Re):Oe=Oe.next=Se,F|=ge;if(K=K.next,K===null){if(K=C.shared.pending,K===null)break;Se=K,K=Se.next,Se.next=null,C.lastBaseUpdate=Se,C.shared.pending=null}}while(!0);Oe===null&&(ne=Re),C.baseState=ne,C.firstBaseUpdate=pe,C.lastBaseUpdate=Oe,E===null&&(C.shared.lanes=0),Fs|=F,s.lanes=F,s.memoizedState=Re}}function XA(s,c){if(typeof s!="function")throw Error(i(191,s));s.call(c)}function ZA(s,c){var m=s.callbacks;if(m!==null)for(s.callbacks=null,s=0;sE?E:8;var F=D.T,K={};D.T=K,mw(s,!1,c,m);try{var ne=C(),pe=D.S;if(pe!==null&&pe(K,ne),ne!==null&&typeof ne=="object"&&typeof ne.then=="function"){var Oe=PY(ne,y);Xd(s,c,Oe,Ir(s))}else Xd(s,c,y,Ir(s))}catch(Re){Xd(s,c,{then:function(){},status:"rejected",reason:Re},Ir())}finally{z.p=E,F!==null&&K.types!==null&&(F.types=K.types),D.T=F}}function BY(){}function dw(s,c,m,y){if(s.tag!==5)throw Error(i(476));var C=TO(s).queue;OO(s,C,c,H,m===null?BY:function(){return EO(s),m(y)})}function TO(s){var c=s.memoizedState;if(c!==null)return c;c={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:H},next:null};var m={};return c.next={memoizedState:m,baseState:m,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:m},next:null},s.memoizedState=c,s=s.alternate,s!==null&&(s.memoizedState=c),c}function EO(s){var c=TO(s);c.next===null&&(c=s.alternate.memoizedState),Xd(s,c.next.queue,{},Ir())}function hw(){return Ii(hh)}function MO(){return ui().memoizedState}function DO(){return ui().memoizedState}function FY(s){for(var c=s.return;c!==null;){switch(c.tag){case 24:case 3:var m=Ir();s=Ns(m);var y=$s(c,s,m);y!==null&&(kr(y,c,m),Vd(y,c,m)),c={cache:qb()},s.payload=c;return}c=c.return}}function qY(s,c,m){var y=Ir();m={lane:y,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},vv(s)?PO(c,m):(m=Mb(s,c,m,y),m!==null&&(kr(m,s,y),NO(m,c,y)))}function RO(s,c,m){var y=Ir();Xd(s,c,m,y)}function Xd(s,c,m,y){var C={lane:y,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null};if(vv(s))PO(c,C);else{var E=s.alternate;if(s.lanes===0&&(E===null||E.lanes===0)&&(E=c.lastRenderedReducer,E!==null))try{var F=c.lastRenderedState,K=E(F,m);if(C.hasEagerState=!0,C.eagerState=K,Rr(K,F))return Xp(s,c,C,0),Pt===null&&Kp(),!1}catch{}finally{}if(m=Mb(s,c,C,y),m!==null)return kr(m,s,y),NO(m,c,y),!0}return!1}function mw(s,c,m,y){if(y={lane:2,revertLane:Ww(),gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null},vv(s)){if(c)throw Error(i(479))}else c=Mb(s,m,y,2),c!==null&&kr(c,s,2)}function vv(s){var c=s.alternate;return s===Bn||c!==null&&c===Bn}function PO(s,c){vc=uv=!0;var m=s.pending;m===null?c.next=c:(c.next=m.next,m.next=c),s.pending=c}function NO(s,c,m){if((m&4194048)!==0){var y=c.lanes;y&=s.pendingLanes,m|=y,c.lanes=m,on(s,m)}}var Zd={readContext:Ii,use:dv,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useLayoutEffect:ni,useInsertionEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useSyncExternalStore:ni,useId:ni,useHostTransitionStatus:ni,useFormState:ni,useActionState:ni,useOptimistic:ni,useMemoCache:ni,useCacheRefresh:ni};Zd.useEffectEvent=ni;var $O={readContext:Ii,use:dv,useCallback:function(s,c){return rr().memoizedState=[s,c===void 0?null:c],s},useContext:Ii,useEffect:bO,useImperativeHandle:function(s,c,m){m=m!=null?m.concat([s]):null,mv(4194308,4,xO.bind(null,c,s),m)},useLayoutEffect:function(s,c){return mv(4194308,4,s,c)},useInsertionEffect:function(s,c){mv(4,2,s,c)},useMemo:function(s,c){var m=rr();c=c===void 0?null:c;var y=s();if(iu){sn(!0);try{s()}finally{sn(!1)}}return m.memoizedState=[y,c],y},useReducer:function(s,c,m){var y=rr();if(m!==void 0){var C=m(c);if(iu){sn(!0);try{m(c)}finally{sn(!1)}}}else C=c;return y.memoizedState=y.baseState=C,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:C},y.queue=s,s=s.dispatch=qY.bind(null,Bn,s),[y.memoizedState,s]},useRef:function(s){var c=rr();return s={current:s},c.memoizedState=s},useState:function(s){s=sw(s);var c=s.queue,m=RO.bind(null,Bn,c);return c.dispatch=m,[s.memoizedState,m]},useDebugValue:cw,useDeferredValue:function(s,c){var m=rr();return fw(m,s,c)},useTransition:function(){var s=sw(!1);return s=OO.bind(null,Bn,s.queue,!0,!1),rr().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,c,m){var y=Bn,C=rr();if(ut){if(m===void 0)throw Error(i(407));m=m()}else{if(m=c(),Pt===null)throw Error(i(349));(st&127)!==0||iO(y,c,m)}C.memoizedState=m;var E={value:m,getSnapshot:c};return C.queue=E,bO(aO.bind(null,y,E,s),[s]),y.flags|=2048,yc(9,{destroy:void 0},rO.bind(null,y,E,m,c),null),m},useId:function(){var s=rr(),c=Pt.identifierPrefix;if(ut){var m=Za,y=Xa;m=(y&~(1<<32-nn(y)-1)).toString(32)+m,c="_"+c+"R_"+m,m=cv++,0<\/script>",E=E.removeChild(E.firstChild);break;case"select":E=typeof y.is=="string"?F.createElement("select",{is:y.is}):F.createElement("select"),y.multiple?E.multiple=!0:y.size&&(E.size=y.size);break;default:E=typeof y.is=="string"?F.createElement(C,{is:y.is}):F.createElement(C)}}E[Qn]=c,E[Dt]=y;e:for(F=c.child;F!==null;){if(F.tag===5||F.tag===6)E.appendChild(F.stateNode);else if(F.tag!==4&&F.tag!==27&&F.child!==null){F.child.return=F,F=F.child;continue}if(F===c)break e;for(;F.sibling===null;){if(F.return===null||F.return===c)break e;F=F.return}F.sibling.return=F.return,F=F.sibling}c.stateNode=E;e:switch(Fi(E,C,y),C){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}y&&$o(c)}}return Vt(c),Ow(c,c.type,s===null?null:s.memoizedProps,c.pendingProps,m),null;case 6:if(s&&c.stateNode!=null)s.memoizedProps!==y&&$o(c);else{if(typeof y!="string"&&c.stateNode===null)throw Error(i(166));if(s=re.current,uc(c)){if(s=c.stateNode,m=c.memoizedProps,y=null,C=Li,C!==null)switch(C.tag){case 27:case 5:y=C.memoizedProps}s[Qn]=c,s=!!(s.nodeValue===m||y!==null&&y.suppressHydrationWarning===!0||nT(s.nodeValue,m)),s||Ds(c,!0)}else s=$v(s).createTextNode(y),s[Qn]=c,c.stateNode=s}return Vt(c),null;case 31:if(m=c.memoizedState,s===null||s.memoizedState!==null){if(y=uc(c),m!==null){if(s===null){if(!y)throw Error(i(318));if(s=c.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(i(557));s[Qn]=c}else Xl(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;Vt(c),s=!1}else m=Lb(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=m),s=!0;if(!s)return c.flags&256?($r(c),c):($r(c),null);if((c.flags&128)!==0)throw Error(i(558))}return Vt(c),null;case 13:if(y=c.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(C=uc(c),y!==null&&y.dehydrated!==null){if(s===null){if(!C)throw Error(i(318));if(C=c.memoizedState,C=C!==null?C.dehydrated:null,!C)throw Error(i(317));C[Qn]=c}else Xl(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;Vt(c),C=!1}else C=Lb(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=C),C=!0;if(!C)return c.flags&256?($r(c),c):($r(c),null)}return $r(c),(c.flags&128)!==0?(c.lanes=m,c):(m=y!==null,s=s!==null&&s.memoizedState!==null,m&&(y=c.child,C=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(C=y.alternate.memoizedState.cachePool.pool),E=null,y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(E=y.memoizedState.cachePool.pool),E!==C&&(y.flags|=2048)),m!==s&&m&&(c.child.flags|=8192),kv(c,c.updateQueue),Vt(c),null);case 4:return ee(),s===null&&Xw(c.stateNode.containerInfo),Vt(c),null;case 10:return Do(c.type),Vt(c),null;case 19:if(V(li),y=c.memoizedState,y===null)return Vt(c),null;if(C=(c.flags&128)!==0,E=y.rendering,E===null)if(C)Jd(y,!1);else{if(ti!==0||s!==null&&(s.flags&128)!==0)for(s=c.child;s!==null;){if(E=lv(s),E!==null){for(c.flags|=128,Jd(y,!1),s=E.updateQueue,c.updateQueue=s,kv(c,s),c.subtreeFlags=0,s=m,m=c.child;m!==null;)RA(m,s),m=m.sibling;return I(li,li.current&1|2),ut&&Eo(c,y.treeForkCount),c.child}s=s.sibling}y.tail!==null&&Qe()>jv&&(c.flags|=128,C=!0,Jd(y,!1),c.lanes=4194304)}else{if(!C)if(s=lv(E),s!==null){if(c.flags|=128,C=!0,s=s.updateQueue,c.updateQueue=s,kv(c,s),Jd(y,!0),y.tail===null&&y.tailMode==="hidden"&&!E.alternate&&!ut)return Vt(c),null}else 2*Qe()-y.renderingStartTime>jv&&m!==536870912&&(c.flags|=128,C=!0,Jd(y,!1),c.lanes=4194304);y.isBackwards?(E.sibling=c.child,c.child=E):(s=y.last,s!==null?s.sibling=E:c.child=E,y.last=E)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=Qe(),s.sibling=null,m=li.current,I(li,C?m&1|2:m&1),ut&&Eo(c,y.treeForkCount),s):(Vt(c),null);case 22:case 23:return $r(c),Zb(),y=c.memoizedState!==null,s!==null?s.memoizedState!==null!==y&&(c.flags|=8192):y&&(c.flags|=8192),y?(m&536870912)!==0&&(c.flags&128)===0&&(Vt(c),c.subtreeFlags&6&&(c.flags|=8192)):Vt(c),m=c.updateQueue,m!==null&&kv(c,m.retryQueue),m=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),y=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(y=c.memoizedState.cachePool.pool),y!==m&&(c.flags|=2048),s!==null&&V(Jl),null;case 24:return m=null,s!==null&&(m=s.memoizedState.cache),c.memoizedState.cache!==m&&(c.flags|=2048),Do(hi),Vt(c),null;case 25:return null;case 30:return null}throw Error(i(156,c.tag))}function GY(s,c){switch($b(c),c.tag){case 1:return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 3:return Do(hi),ee(),s=c.flags,(s&65536)!==0&&(s&128)===0?(c.flags=s&-65537|128,c):null;case 26:case 27:case 5:return ke(c),null;case 31:if(c.memoizedState!==null){if($r(c),c.alternate===null)throw Error(i(340));Xl()}return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 13:if($r(c),s=c.memoizedState,s!==null&&s.dehydrated!==null){if(c.alternate===null)throw Error(i(340));Xl()}return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 19:return V(li),null;case 4:return ee(),null;case 10:return Do(c.type),null;case 22:case 23:return $r(c),Zb(),s!==null&&V(Jl),s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 24:return Do(hi),null;case 25:return null;default:return null}}function o5(s,c){switch($b(c),c.tag){case 3:Do(hi),ee();break;case 26:case 27:case 5:ke(c);break;case 4:ee();break;case 31:c.memoizedState!==null&&$r(c);break;case 13:$r(c);break;case 19:V(li);break;case 10:Do(c.type);break;case 22:case 23:$r(c),Zb(),s!==null&&V(Jl);break;case 24:Do(hi)}}function eh(s,c){try{var m=c.updateQueue,y=m!==null?m.lastEffect:null;if(y!==null){var C=y.next;m=C;do{if((m.tag&s)===s){y=void 0;var E=m.create,F=m.inst;y=E(),F.destroy=y}m=m.next}while(m!==C)}}catch(K){St(c,c.return,K)}}function Is(s,c,m){try{var y=c.updateQueue,C=y!==null?y.lastEffect:null;if(C!==null){var E=C.next;y=E;do{if((y.tag&s)===s){var F=y.inst,K=F.destroy;if(K!==void 0){F.destroy=void 0,C=c;var ne=m,pe=K;try{pe()}catch(Oe){St(C,ne,Oe)}}}y=y.next}while(y!==E)}}catch(Oe){St(c,c.return,Oe)}}function s5(s){var c=s.updateQueue;if(c!==null){var m=s.stateNode;try{ZA(c,m)}catch(y){St(s,s.return,y)}}}function l5(s,c,m){m.props=ru(s.type,s.memoizedProps),m.state=s.memoizedState;try{m.componentWillUnmount()}catch(y){St(s,c,y)}}function nh(s,c){try{var m=s.ref;if(m!==null){switch(s.tag){case 26:case 27:case 5:var y=s.stateNode;break;case 30:y=s.stateNode;break;default:y=s.stateNode}typeof m=="function"?s.refCleanup=m(y):m.current=y}}catch(C){St(s,c,C)}}function Qa(s,c){var m=s.ref,y=s.refCleanup;if(m!==null)if(typeof y=="function")try{y()}catch(C){St(s,c,C)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof m=="function")try{m(null)}catch(C){St(s,c,C)}else m.current=null}function u5(s){var c=s.type,m=s.memoizedProps,y=s.stateNode;try{e:switch(c){case"button":case"input":case"select":case"textarea":m.autoFocus&&y.focus();break e;case"img":m.src?y.src=m.src:m.srcSet&&(y.srcset=m.srcSet)}}catch(C){St(s,s.return,C)}}function Tw(s,c,m){try{var y=s.stateNode;pK(y,s.type,m,c),y[Dt]=c}catch(C){St(s,s.return,C)}}function c5(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&Ws(s.type)||s.tag===4}function Ew(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||c5(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&&Ws(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 Mw(s,c,m){var y=s.tag;if(y===5||y===6)s=s.stateNode,c?(m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m).insertBefore(s,c):(c=m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m,c.appendChild(s),m=m._reactRootContainer,m!=null||c.onclick!==null||(c.onclick=Zr));else if(y!==4&&(y===27&&Ws(s.type)&&(m=s.stateNode,c=null),s=s.child,s!==null))for(Mw(s,c,m),s=s.sibling;s!==null;)Mw(s,c,m),s=s.sibling}function _v(s,c,m){var y=s.tag;if(y===5||y===6)s=s.stateNode,c?m.insertBefore(s,c):m.appendChild(s);else if(y!==4&&(y===27&&Ws(s.type)&&(m=s.stateNode),s=s.child,s!==null))for(_v(s,c,m),s=s.sibling;s!==null;)_v(s,c,m),s=s.sibling}function f5(s){var c=s.stateNode,m=s.memoizedProps;try{for(var y=s.type,C=c.attributes;C.length;)c.removeAttributeNode(C[0]);Fi(c,y,m),c[Qn]=s,c[Dt]=m}catch(E){St(s,s.return,E)}}var zo=!1,vi=!1,Dw=!1,d5=typeof WeakSet=="function"?WeakSet:Set,Ei=null;function YY(s,c){if(s=s.containerInfo,Jw=Hv,s=SA(s),Cb(s)){if("selectionStart"in s)var m={start:s.selectionStart,end:s.selectionEnd};else e:{m=(m=s.ownerDocument)&&m.defaultView||window;var y=m.getSelection&&m.getSelection();if(y&&y.rangeCount!==0){m=y.anchorNode;var C=y.anchorOffset,E=y.focusNode;y=y.focusOffset;try{m.nodeType,E.nodeType}catch{m=null;break e}var F=0,K=-1,ne=-1,pe=0,Oe=0,Re=s,ge=null;n:for(;;){for(var Se;Re!==m||C!==0&&Re.nodeType!==3||(K=F+C),Re!==E||y!==0&&Re.nodeType!==3||(ne=F+y),Re.nodeType===3&&(F+=Re.nodeValue.length),(Se=Re.firstChild)!==null;)ge=Re,Re=Se;for(;;){if(Re===s)break n;if(ge===m&&++pe===C&&(K=F),ge===E&&++Oe===y&&(ne=F),(Se=Re.nextSibling)!==null)break;Re=ge,ge=Re.parentNode}Re=Se}m=K===-1||ne===-1?null:{start:K,end:ne}}else m=null}m=m||{start:0,end:0}}else m=null;for(ek={focusedElem:s,selectionRange:m},Hv=!1,Ei=c;Ei!==null;)if(c=Ei,s=c.child,(c.subtreeFlags&1028)!==0&&s!==null)s.return=c,Ei=s;else for(;Ei!==null;){switch(c=Ei,E=c.alternate,s=c.flags,c.tag){case 0:if((s&4)!==0&&(s=c.updateQueue,s=s!==null?s.events:null,s!==null))for(m=0;m title"))),Fi(E,y,m),E[Qn]=s,cn(E),y=E;break e;case"link":var F=yT("link","href",C).get(y+(m.href||""));if(F){for(var K=0;KAt&&(F=At,At=jn,jn=F);var ue=_A(K,jn),ae=_A(K,At);if(ue&&ae&&(Se.rangeCount!==1||Se.anchorNode!==ue.node||Se.anchorOffset!==ue.offset||Se.focusNode!==ae.node||Se.focusOffset!==ae.offset)){var me=Re.createRange();me.setStart(ue.node,ue.offset),Se.removeAllRanges(),jn>At?(Se.addRange(me),Se.extend(ae.node,ae.offset)):(me.setEnd(ae.node,ae.offset),Se.addRange(me))}}}}for(Re=[],Se=K;Se=Se.parentNode;)Se.nodeType===1&&Re.push({element:Se,left:Se.scrollLeft,top:Se.scrollTop});for(typeof K.focus=="function"&&K.focus(),K=0;Km?32:m,D.T=null,m=Iw,Iw=null;var E=Hs,F=qo;if(_i=0,xc=Hs=null,qo=0,(bt&6)!==0)throw Error(i(331));var K=bt;if(bt|=4,x5(E.current),w5(E,E.current,F,m),bt=K,sh(0,!1),bn&&typeof bn.onPostCommitFiberRoot=="function")try{bn.onPostCommitFiberRoot(Dn,E)}catch{}return!0}finally{z.p=C,D.T=y,F5(s,c)}}function H5(s,c,m){c=ta(m,c),c=yw(s.stateNode,c,2),s=$s(s,c,2),s!==null&&(ot(s,2),Ja(s))}function St(s,c,m){if(s.tag===3)H5(s,s,m);else for(;c!==null;){if(c.tag===3){H5(c,s,m);break}else if(c.tag===1){var y=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(qs===null||!qs.has(y))){s=ta(m,s),m=UO(2),y=$s(c,m,2),y!==null&&(VO(m,y,c,s),ot(y,2),Ja(y));break}}c=c.return}}function Hw(s,c,m){var y=s.pingCache;if(y===null){y=s.pingCache=new ZY;var C=new Set;y.set(c,C)}else C=y.get(c),C===void 0&&(C=new Set,y.set(c,C));C.has(m)||(Nw=!0,C.add(m),s=tK.bind(null,s,c,m),c.then(s,s))}function tK(s,c,m){var y=s.pingCache;y!==null&&y.delete(c),s.pingedLanes|=s.suspendedLanes&m,s.warmLanes&=~m,Pt===s&&(st&m)===m&&(ti===4||ti===3&&(st&62914560)===st&&300>Qe()-Cv?(bt&2)===0&&Sc(s,0):$w|=m,_c===st&&(_c=0)),Ja(s)}function U5(s,c){c===0&&(c=Ue()),s=Yl(s,c),s!==null&&(ot(s,c),Ja(s))}function iK(s){var c=s.memoizedState,m=0;c!==null&&(m=c.retryLane),U5(s,m)}function rK(s,c){var m=0;switch(s.tag){case 31:case 13:var y=s.stateNode,C=s.memoizedState;C!==null&&(m=C.retryLane);break;case 19:y=s.stateNode;break;case 22:y=s.stateNode._retryCache;break;default:throw Error(i(314))}y!==null&&y.delete(c),U5(s,m)}function aK(s,c){return he(s,c)}var Dv=null,jc=null,Uw=!1,Rv=!1,Vw=!1,Vs=0;function Ja(s){s!==jc&&s.next===null&&(jc===null?Dv=jc=s:jc=jc.next=s),Rv=!0,Uw||(Uw=!0,sK())}function sh(s,c){if(!Vw&&Rv){Vw=!0;do for(var m=!1,y=Dv;y!==null;){if(s!==0){var C=y.pendingLanes;if(C===0)var E=0;else{var F=y.suspendedLanes,K=y.pingedLanes;E=(1<<31-nn(42|s)+1)-1,E&=C&~(F&~K),E=E&201326741?E&201326741|1:E?E|2:0}E!==0&&(m=!0,Y5(y,E))}else E=st,E=at(y,y===Pt?E:0,y.cancelPendingCommit!==null||y.timeoutHandle!==-1),(E&3)===0||Mt(y,E)||(m=!0,Y5(y,E));y=y.next}while(m);Vw=!1}}function oK(){V5()}function V5(){Rv=Uw=!1;var s=0;Vs!==0&&gK()&&(s=Vs);for(var c=Qe(),m=null,y=Dv;y!==null;){var C=y.next,E=W5(y,c);E===0?(y.next=null,m===null?Dv=C:m.next=C,C===null&&(jc=m)):(m=y,(s!==0||(E&3)!==0)&&(Rv=!0)),y=C}_i!==0&&_i!==5||sh(s),Vs!==0&&(Vs=0)}function W5(s,c){for(var m=s.suspendedLanes,y=s.pingedLanes,C=s.expirationTimes,E=s.pendingLanes&-62914561;0K)break;var Oe=ne.transferSize,Re=ne.initiatorType;Oe&&tT(Re)&&(ne=ne.responseEnd,F+=Oe*(ne"u"?null:document;function mT(s,c,m){var y=Ac;if(y&&typeof c=="string"&&c){var C=mr(c);C='link[rel="'+s+'"][href="'+C+'"]',typeof m=="string"&&(C+='[crossorigin="'+m+'"]'),hT.has(C)||(hT.add(C),s={rel:s,crossOrigin:m,href:c},y.querySelector(C)===null&&(c=y.createElement("link"),Fi(c,"link",s),cn(c),y.head.appendChild(c)))}}function jK(s){Ho.D(s),mT("dns-prefetch",s,null)}function AK(s,c){Ho.C(s,c),mT("preconnect",s,c)}function OK(s,c,m){Ho.L(s,c,m);var y=Ac;if(y&&s&&c){var C='link[rel="preload"][as="'+mr(c)+'"]';c==="image"&&m&&m.imageSrcSet?(C+='[imagesrcset="'+mr(m.imageSrcSet)+'"]',typeof m.imageSizes=="string"&&(C+='[imagesizes="'+mr(m.imageSizes)+'"]')):C+='[href="'+mr(s)+'"]';var E=C;switch(c){case"style":E=Oc(s);break;case"script":E=Tc(s)}la.has(E)||(s=d({rel:"preload",href:c==="image"&&m&&m.imageSrcSet?void 0:s,as:c},m),la.set(E,s),y.querySelector(C)!==null||c==="style"&&y.querySelector(fh(E))||c==="script"&&y.querySelector(dh(E))||(c=y.createElement("link"),Fi(c,"link",s),cn(c),y.head.appendChild(c)))}}function TK(s,c){Ho.m(s,c);var m=Ac;if(m&&s){var y=c&&typeof c.as=="string"?c.as:"script",C='link[rel="modulepreload"][as="'+mr(y)+'"][href="'+mr(s)+'"]',E=C;switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":E=Tc(s)}if(!la.has(E)&&(s=d({rel:"modulepreload",href:s},c),la.set(E,s),m.querySelector(C)===null)){switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(m.querySelector(dh(E)))return}y=m.createElement("link"),Fi(y,"link",s),cn(y),m.head.appendChild(y)}}}function EK(s,c,m){Ho.S(s,c,m);var y=Ac;if(y&&s){var C=oi(y).hoistableStyles,E=Oc(s);c=c||"default";var F=C.get(E);if(!F){var K={loading:0,preload:null};if(F=y.querySelector(fh(E)))K.loading=5;else{s=d({rel:"stylesheet",href:s,"data-precedence":c},m),(m=la.get(E))&&sk(s,m);var ne=F=y.createElement("link");cn(ne),Fi(ne,"link",s),ne._p=new Promise(function(pe,Oe){ne.onload=pe,ne.onerror=Oe}),ne.addEventListener("load",function(){K.loading|=1}),ne.addEventListener("error",function(){K.loading|=2}),K.loading|=4,Lv(F,c,y)}F={type:"stylesheet",instance:F,count:1,state:K},C.set(E,F)}}}function MK(s,c){Ho.X(s,c);var m=Ac;if(m&&s){var y=oi(m).hoistableScripts,C=Tc(s),E=y.get(C);E||(E=m.querySelector(dh(C)),E||(s=d({src:s,async:!0},c),(c=la.get(C))&&lk(s,c),E=m.createElement("script"),cn(E),Fi(E,"link",s),m.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},y.set(C,E))}}function DK(s,c){Ho.M(s,c);var m=Ac;if(m&&s){var y=oi(m).hoistableScripts,C=Tc(s),E=y.get(C);E||(E=m.querySelector(dh(C)),E||(s=d({src:s,async:!0,type:"module"},c),(c=la.get(C))&&lk(s,c),E=m.createElement("script"),cn(E),Fi(E,"link",s),m.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},y.set(C,E))}}function pT(s,c,m,y){var C=(C=re.current)?zv(C):null;if(!C)throw Error(i(446));switch(s){case"meta":case"title":return null;case"style":return typeof m.precedence=="string"&&typeof m.href=="string"?(c=Oc(m.href),m=oi(C).hoistableStyles,y=m.get(c),y||(y={type:"style",instance:null,count:0,state:null},m.set(c,y)),y):{type:"void",instance:null,count:0,state:null};case"link":if(m.rel==="stylesheet"&&typeof m.href=="string"&&typeof m.precedence=="string"){s=Oc(m.href);var E=oi(C).hoistableStyles,F=E.get(s);if(F||(C=C.ownerDocument||C,F={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},E.set(s,F),(E=C.querySelector(fh(s)))&&!E._p&&(F.instance=E,F.state.loading=5),la.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},la.set(s,m),E||RK(C,s,m,F.state))),c&&y===null)throw Error(i(528,""));return F}if(c&&y!==null)throw Error(i(529,""));return null;case"script":return c=m.async,m=m.src,typeof m=="string"&&c&&typeof c!="function"&&typeof c!="symbol"?(c=Tc(m),m=oi(C).hoistableScripts,y=m.get(c),y||(y={type:"script",instance:null,count:0,state:null},m.set(c,y)),y):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,s))}}function Oc(s){return'href="'+mr(s)+'"'}function fh(s){return'link[rel="stylesheet"]['+s+"]"}function vT(s){return d({},s,{"data-precedence":s.precedence,precedence:null})}function RK(s,c,m,y){s.querySelector('link[rel="preload"][as="style"]['+c+"]")?y.loading=1:(c=s.createElement("link"),y.preload=c,c.addEventListener("load",function(){return y.loading|=1}),c.addEventListener("error",function(){return y.loading|=2}),Fi(c,"link",m),cn(c),s.head.appendChild(c))}function Tc(s){return'[src="'+mr(s)+'"]'}function dh(s){return"script[async]"+s}function gT(s,c,m){if(c.count++,c.instance===null)switch(c.type){case"style":var y=s.querySelector('style[data-href~="'+mr(m.href)+'"]');if(y)return c.instance=y,cn(y),y;var C=d({},m,{"data-href":m.href,"data-precedence":m.precedence,href:null,precedence:null});return y=(s.ownerDocument||s).createElement("style"),cn(y),Fi(y,"style",C),Lv(y,m.precedence,s),c.instance=y;case"stylesheet":C=Oc(m.href);var E=s.querySelector(fh(C));if(E)return c.state.loading|=4,c.instance=E,cn(E),E;y=vT(m),(C=la.get(C))&&sk(y,C),E=(s.ownerDocument||s).createElement("link"),cn(E);var F=E;return F._p=new Promise(function(K,ne){F.onload=K,F.onerror=ne}),Fi(E,"link",y),c.state.loading|=4,Lv(E,m.precedence,s),c.instance=E;case"script":return E=Tc(m.src),(C=s.querySelector(dh(E)))?(c.instance=C,cn(C),C):(y=m,(C=la.get(E))&&(y=d({},m),lk(y,C)),s=s.ownerDocument||s,C=s.createElement("script"),cn(C),Fi(C,"link",y),s.head.appendChild(C),c.instance=C);case"void":return null;default:throw Error(i(443,c.type))}else c.type==="stylesheet"&&(c.state.loading&4)===0&&(y=c.instance,c.state.loading|=4,Lv(y,m.precedence,s));return c.instance}function Lv(s,c,m){for(var y=m.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),C=y.length?y[y.length-1]:null,E=C,F=0;F title"):null)}function PK(s,c,m){if(m===1||c.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof c.precedence!="string"||typeof c.href!="string"||c.href==="")break;return!0;case"link":if(typeof c.rel!="string"||typeof c.href!="string"||c.href===""||c.onLoad||c.onError)break;switch(c.rel){case"stylesheet":return s=c.disabled,typeof c.precedence=="string"&&s==null;default:return!0}case"script":if(c.async&&typeof c.async!="function"&&typeof c.async!="symbol"&&!c.onLoad&&!c.onError&&c.src&&typeof c.src=="string")return!0}return!1}function wT(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function NK(s,c,m,y){if(m.type==="stylesheet"&&(typeof y.media!="string"||matchMedia(y.media).matches!==!1)&&(m.state.loading&4)===0){if(m.instance===null){var C=Oc(y.href),E=c.querySelector(fh(C));if(E){c=E._p,c!==null&&typeof c=="object"&&typeof c.then=="function"&&(s.count++,s=Bv.bind(s),c.then(s,s)),m.state.loading|=4,m.instance=E,cn(E);return}E=c.ownerDocument||c,y=vT(y),(C=la.get(C))&&sk(y,C),E=E.createElement("link"),cn(E);var F=E;F._p=new Promise(function(K,ne){F.onload=K,F.onerror=ne}),Fi(E,"link",y),m.instance=E}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(m,c),(c=m.state.preload)&&(m.state.loading&3)===0&&(s.count++,m=Bv.bind(s),c.addEventListener("load",m),c.addEventListener("error",m))}}var uk=0;function $K(s,c){return s.stylesheets&&s.count===0&&qv(s,s.stylesheets),0uk?50:800)+c);return s.unsuspend=m,function(){s.unsuspend=null,clearTimeout(y),clearTimeout(C)}}:null}function Bv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qv(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Fv=null;function qv(s,c){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Fv=new Map,c.forEach(zK,s),Fv=null,Bv.call(s))}function zK(s,c){if(!(c.state.loading&4)){var m=Fv.get(s);if(m)var y=m.get(null);else{m=new Map,Fv.set(s,m);for(var C=s.querySelectorAll("link[data-precedence],style[data-precedence]"),E=0;E"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Yk.exports=cre(),Yk.exports}var dre=fre();class p9 extends Error{constructor(n,t){super(t),this.status=n,this.name="HTTPError"}}async function hre(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 p9(i.status,r.Message??r.message??i.statusText)}if(i.status!==204)return i.json()}const RF="/api";function _n(e,n){return hre(e,n,RF)}function sM(){return _n("/board")}function mre(){return _n("/flags")}function PF(){return _n("/version")}function pre(e){return _n("/columns",{method:"POST",body:JSON.stringify({name:e})})}function uu(e,n){return _n(`/columns/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function vre(e){return _n(`/columns/${e}`,{method:"DELETE"})}function gre(e){return _n("/columns/reorder",{method:"POST",body:JSON.stringify({ids:e})})}function yre(e){return _n("/cards",{method:"POST",body:JSON.stringify(e)})}function Nc(e,n){return _n(`/cards/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function bre(e){return _n(`/cards/${e}`,{method:"DELETE"})}function Zk(e,n){return _n(`/cards/${e}/stickers`,{method:"PUT",body:JSON.stringify({stickers:n})})}function lM(){return _n("/trash")}function wre(e){return _n(`/cards/${e}/restore`,{method:"POST"})}function kre(e){return _n(`/cards/${e}/purge`,{method:"DELETE"})}function uM(){return _n("/archive")}function _re(e){return _n(`/cards/${e}/archive`,{method:"POST"})}function xre(e){return _n(`/cards/${e}/unarchive`,{method:"POST"})}function Sre(e,n){const t=new URLSearchParams({date:e});return _n(`/reports/daily?${t.toString()}`)}function Cre(e){return _n(`/reports/daily/summary?date=${encodeURIComponent(e)}`)}function jre(e,n){const t=new URLSearchParams({date:e});return _n(`/reports/daily/summary?${t.toString()}`,{method:"POST"})}function Are(e){return _n(`/settings/${encodeURIComponent(e)}`)}function Ore(e,n){return _n(`/settings/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify({value:n})})}function Tre(e,n,t){return _n(`/cards/${e}/move`,{method:"POST",body:JSON.stringify({column_id:n,ordered_ids:t})})}function Ere(e){return _n(`/cards/${e}/history`)}function Mre(e){return _n(`/cards/${e}/messages`)}function cM(e,n){return _n(`/cards/${e}/messages`,{method:"POST",body:JSON.stringify({body:n})})}function Dre(e,n){return _n(`/cards/${e}/messages/${n}`,{method:"DELETE"})}function Rre(e){return _n(`/cards/${e}/duplicate`,{method:"POST"})}function Pre(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/chat/ws`}function Nre(e){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/cards/${e}/chat/ws`}function NF(e=!1){return _n(`/notifications${e?"?unread=1":""}`)}function $F(){return _n("/notifications/unread-count")}function $re(e){return _n(`/notifications/${e}/read`,{method:"POST"})}function zre(){return _n("/notifications/read-all",{method:"POST"})}function Lre(){return _n("/modules")}function Ire(e){return _n("/modules",{method:"POST",body:JSON.stringify(e)})}function Bre(e,n){return _n(`/modules/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function Fre(e){return _n(`/modules/${e}`,{method:"DELETE"})}function qre(e,n=100){return _n(`/modules/${e}/logs?limit=${n}`)}function fM(e,n){const t={method:"POST"};return n&&(t.body=JSON.stringify(n)),_n(`/modules/${e}/test`,t)}function Hre(e,n,t){return new Promise((i,r)=>{const a=new WebSocket(Pre());let o=!1;const l=u=>{if(!o){o=!0;try{a.close()}catch{}u?r(u):i()}};a.onopen=()=>{a.send(JSON.stringify({messages:e}))},a.onmessage=u=>{try{const f=JSON.parse(typeof u.data=="string"?u.data:"");n(f),(f.type==="done"||f.type==="error")&&l(f.type==="error"?new Error(f.error):void 0)}catch(f){l(f)}},a.onerror=()=>l(new Error("websocket error")),a.onclose=()=>l()})}function dM(e,n){return _n("/auth/login",{method:"POST",body:JSON.stringify({username:e,password:n})})}function Ure(e,n,t){return _n("/auth/register",{method:"POST",body:JSON.stringify({username:e,password:n,display_name:t})})}function Vre(){return _n("/auth/logout",{method:"POST"})}function Wre(){return _n("/me")}function hM(e){return _n("/me",{method:"PATCH",body:JSON.stringify(e)})}function zF(){return _n("/users")}function LF(){return _n("/tags")}function Gre(){return _n("/requesters")}function Yre(e){return _n(`/cards/${e}/files`)}async function v9(e,n,t="upload"){const i=new FormData;i.append("file",n),i.append("source",t);const r=await fetch(`${RF}/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 p9(r.status,a)}return await r.json()}function Kre(e){return _n(`/files/${e}`,{method:"DELETE"})}function Xre(e){return _n("/mcp-tokens",{method:"POST",body:JSON.stringify({name:e})})}function Zre(){return _n("/mcp-tokens")}function Qre(e){return _n(`/mcp-tokens/${e}`,{method:"DELETE"})}function Jre(e){return _n(`/cards/${e}/jira-sync`)}function eae(e){const n=new URLSearchParams;e!=null&&e.includeImported&&n.set("include_imported","true"),n.set("limit",String(e.limit));const t=n.toString();return _n(`/jira/issues${t?`?${t}`:""}`)}function nae(e,n){return _n("/jira/import",{method:"POST",body:JSON.stringify({issue_keys:e,fallback_column_id:n||""})})}function IF(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 _n(`/metrics${t?`?${t}`:""}`)}const BF=x.createContext(null);function tae({children:e}){const[n,t]=x.useState(null),[i,r]=x.useState(!0);x.useEffect(()=>{Wre().then(t).catch(u=>{(!(u instanceof p9)||u.status!==401)&&console.warn("getMe failed",u)}).finally(()=>r(!1))},[]);const a=x.useCallback(async(u,f)=>{const h=await dM(u,f);t(h)},[]),o=x.useCallback(async(u,f,h)=>{await Ure(u,f,h);const d=await dM(u,f);t(d)},[]),l=x.useCallback(async()=>{await Vre(),t(null)},[]);return v.jsx(BF.Provider,{value:{user:n,loading:i,login:a,register:o,logout:l,setUser:t},children:e})}function g9(){const e=x.useContext(BF);if(!e)throw new Error("useAuth: missing AuthProvider");return e}function iae(){for(var e=arguments.length,n=new Array(e),t=0;ti=>{n.forEach(r=>r(i))},n)}const v0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ed(e){const n=Object.prototype.toString.call(e);return n==="[object Window]"||n==="[object global]"}function y9(e){return"nodeType"in e}function fr(e){var n,t;return e?ed(e)?e:y9(e)&&(n=(t=e.ownerDocument)==null?void 0:t.defaultView)!=null?n:window:window}function b9(e){const{Document:n}=fr(e);return e instanceof n}function wp(e){return ed(e)?!1:e instanceof fr(e).HTMLElement}function FF(e){return e instanceof fr(e).SVGElement}function nd(e){return e?ed(e)?e.document:y9(e)?b9(e)?e:wp(e)||FF(e)?e.ownerDocument:document:document:document}const Va=v0?x.useLayoutEffect:x.useEffect;function g0(e){const n=x.useRef(e);return Va(()=>{n.current=e}),x.useCallback(function(){for(var t=arguments.length,i=new Array(t),r=0;r{e.current=setInterval(i,r)},[]),t=x.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[n,t]}function gm(e,n){n===void 0&&(n=[e]);const t=x.useRef(e);return Va(()=>{t.current!==e&&(t.current=e)},n),t}function kp(e,n){const t=x.useRef();return x.useMemo(()=>{const i=e(t.current);return t.current=i,i},[...n])}function t1(e){const n=g0(e),t=x.useRef(null),i=x.useCallback(r=>{r!==t.current&&(n==null||n(r,t.current)),t.current=r},[]);return[t,i]}function i1(e){const n=x.useRef();return x.useEffect(()=>{n.current=e},[e]),n.current}let Qk={};function _p(e,n){return x.useMemo(()=>{if(n)return n;const t=Qk[e]==null?0:Qk[e]+1;return Qk[e]=t,e+"-"+t},[e,n])}function qF(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[u,f]of l){const h=a[u];h!=null&&(a[u]=h+e*f)}return a},{...n})}}const Qc=qF(1),ym=qF(-1);function aae(e){return"clientX"in e&&"clientY"in e}function y0(e){if(!e)return!1;const{KeyboardEvent:n}=fr(e.target);return n&&e instanceof n}function oae(e){if(!e)return!1;const{TouchEvent:n}=fr(e.target);return n&&e instanceof n}function r1(e){if(oae(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 aae(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}}}),mM="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function sae(e){return e.matches(mM)?e:e.querySelector(mM)}const lae={display:"none"};function uae(e){let{id:n,value:t}=e;return J.createElement("div",{id:n,style:lae},t)}function cae(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 J.createElement("div",{id:n,style:r,role:"status","aria-live":i,"aria-atomic":!0},t)}function fae(){const[e,n]=x.useState("");return{announce:x.useCallback(i=>{i!=null&&n(i)},[]),announcement:e}}const HF=x.createContext(null);function dae(e){const n=x.useContext(HF);x.useEffect(()=>{if(!n)throw new Error("useDndMonitor must be used within a children of ");return n(e)},[e,n])}function hae(){const[e]=x.useState(()=>new Set),n=x.useCallback(i=>(e.add(i),()=>e.delete(i)),[e]);return[x.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 mae={draggable:` +`+y.stack}}var Ne=Object.prototype.hasOwnProperty,he=e.unstable_scheduleCallback,He=e.unstable_cancelCallback,Ye=e.unstable_shouldYield,We=e.unstable_requestPaint,Qe=e.unstable_now,Je=e.unstable_getCurrentPriorityLevel,oe=e.unstable_ImmediatePriority,be=e.unstable_UserBlockingPriority,Ke=e.unstable_NormalPriority,en=e.unstable_LowPriority,je=e.unstable_IdlePriority,an=e.log,pn=e.unstable_setDisableYieldValue,Dn=null,bn=null;function sn(s){if(typeof an=="function"&&pn(s),bn&&typeof bn.setStrictMode=="function")try{bn.setStrictMode(Dn,s)}catch{}}var nn=Math.clz32?Math.clz32:Fe,$n=Math.log,De=Math.LN2;function Fe(s){return s>>>=0,s===0?32:31-($n(s)/De|0)|0}var Vn=256,En=262144,gn=4194304;function xn(s){var c=s&42;if(c!==0)return c;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 at(s,c,m){var y=s.pendingLanes;if(y===0)return 0;var C=0,E=s.suspendedLanes,F=s.pingedLanes;s=s.warmLanes;var K=y&134217727;return K!==0?(y=K&~E,y!==0?C=xn(y):(F&=K,F!==0?C=xn(F):m||(m=K&~s,m!==0&&(C=xn(m))))):(K=y&~E,K!==0?C=xn(K):F!==0?C=xn(F):m||(m=y&~s,m!==0&&(C=xn(m)))),C===0?0:c!==0&&c!==C&&(c&E)===0&&(E=C&-C,m=c&-c,E>=m||E===32&&(m&4194048)!==0)?c:C}function Mt(s,c){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&c)===0}function qe(s,c){switch(s){case 1:case 2:case 4:case 8:case 64:return c+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 c+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 Ue(){var s=gn;return gn<<=1,(gn&62914560)===0&&(gn=4194304),s}function In(s){for(var c=[],m=0;31>m;m++)c.push(s);return c}function ot(s,c){s.pendingLanes|=c,c!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Pn(s,c,m,y,C,E){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,ne=s.expirationTimes,pe=s.hiddenUpdates;for(m=F&~m;0"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var qp=/[\n"\\]/g;function mr(s){return s.replace(qp,function(c){return"\\"+c.charCodeAt(0).toString(16)+" "})}function _d(s,c,m,y,C,E,F,K){s.name="",F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"?s.type=F:s.removeAttribute("type"),c!=null?F==="number"?(c===0&&s.value===""||s.value!=c)&&(s.value=""+tr(c)):s.value!==""+tr(c)&&(s.value=""+tr(c)):F!=="submit"&&F!=="reset"||s.removeAttribute("value"),c!=null?Sd(s,F,tr(c)):m!=null?Sd(s,F,tr(m)):y!=null&&s.removeAttribute("value"),C==null&&E!=null&&(s.defaultChecked=!!E),C!=null&&(s.checked=C&&typeof C!="function"&&typeof C!="symbol"),K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?s.name=""+tr(K):s.removeAttribute("name")}function xd(s,c,m,y,C,E,F,K){if(E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(s.type=E),c!=null||m!=null){if(!(E!=="submit"&&E!=="reset"||c!=null)){wd(s);return}m=m!=null?""+tr(m):"",c=c!=null?""+tr(c):m,K||c===s.value||(s.value=c),s.defaultValue=c}y=y??C,y=typeof y!="function"&&typeof y!="symbol"&&!!y,s.checked=K?s.checked:!!y,s.defaultChecked=!!y,F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"&&(s.name=F),wd(s)}function Sd(s,c,m){c==="number"&&ql(s.ownerDocument)===s||s.defaultValue===""+m||(s.defaultValue=""+m)}function Ka(s,c,m,y){if(s=s.options,c){c={};for(var C=0;C"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ce=!1;if(X)try{var _e={};Object.defineProperty(_e,"passive",{get:function(){ce=!0}}),window.addEventListener("test",_e,_e),window.removeEventListener("test",_e,_e)}catch{ce=!1}var Ie=null,fn=null,Wn=null;function ht(){if(Wn)return Wn;var s,c=fn,m=c.length,y,C="value"in Ie?Ie.value:Ie.textContent,E=C.length;for(s=0;s=Pd),cA=" ",fA=!1;function dA(s,c){switch(s){case"keyup":return pY.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hA(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var tc=!1;function gY(s,c){switch(s){case"compositionend":return hA(c);case"keypress":return c.which!==32?null:(fA=!0,cA);case"textInput":return s=c.data,s===cA&&fA?null:s;default:return null}}function yY(s,c){if(tc)return s==="compositionend"||!_b&&dA(s,c)?(s=ht(),Wn=fn=Ie=null,tc=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1=c)return{node:m,offset:c-s};s=y}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=kA(m)}}function xA(s,c){return s&&c?s===c?!0:s&&s.nodeType===3?!1:c&&c.nodeType===3?xA(s,c.parentNode):"contains"in s?s.contains(c):s.compareDocumentPosition?!!(s.compareDocumentPosition(c)&16):!1:!1}function SA(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var c=ql(s.document);c instanceof s.HTMLIFrameElement;){try{var m=typeof c.contentWindow.location.href=="string"}catch{m=!1}if(m)s=c.contentWindow;else break;c=ql(s.document)}return c}function Cb(s){var c=s&&s.nodeName&&s.nodeName.toLowerCase();return c&&(c==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||c==="textarea"||s.contentEditable==="true")}var jY=X&&"documentMode"in document&&11>=document.documentMode,ic=null,jb=null,Ld=null,Ab=!1;function CA(s,c,m){var y=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;Ab||ic==null||ic!==ql(y)||(y=ic,"selectionStart"in y&&Cb(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),Ld&&zd(Ld,y)||(Ld=y,y=Nv(jb,"onSelect"),0>=F,C-=F,Xa=1<<32-nn(c)+C|m<qn?(lt=mn,mn=null):lt=mn.sibling;var vt=ge(ue,mn,me[qn],Me);if(vt===null){mn===null&&(mn=lt);break}s&&mn&&vt.alternate===null&&c(ue,mn),ae=E(vt,ae,qn),pt===null?wn=vt:pt.sibling=vt,pt=vt,mn=lt}if(qn===me.length)return m(ue,mn),ut&&Eo(ue,qn),wn;if(mn===null){for(;qnqn?(lt=mn,mn=null):lt=mn.sibling;var Zs=ge(ue,mn,vt.value,Me);if(Zs===null){mn===null&&(mn=lt);break}s&&mn&&Zs.alternate===null&&c(ue,mn),ae=E(Zs,ae,qn),pt===null?wn=Zs:pt.sibling=Zs,pt=Zs,mn=lt}if(vt.done)return m(ue,mn),ut&&Eo(ue,qn),wn;if(mn===null){for(;!vt.done;qn++,vt=me.next())vt=Re(ue,vt.value,Me),vt!==null&&(ae=E(vt,ae,qn),pt===null?wn=vt:pt.sibling=vt,pt=vt);return ut&&Eo(ue,qn),wn}for(mn=y(mn);!vt.done;qn++,vt=me.next())vt=Se(mn,ue,qn,vt.value,Me),vt!==null&&(s&&vt.alternate!==null&&mn.delete(vt.key===null?qn:vt.key),ae=E(vt,ae,qn),pt===null?wn=vt:pt.sibling=vt,pt=vt);return s&&mn.forEach(function(WK){return c(ue,WK)}),ut&&Eo(ue,qn),wn}function At(ue,ae,me,Me){if(typeof me=="object"&&me!==null&&me.type===w&&me.key===null&&(me=me.props.children),typeof me=="object"&&me!==null){switch(me.$$typeof){case g:e:{for(var wn=me.key;ae!==null;){if(ae.key===wn){if(wn=me.type,wn===w){if(ae.tag===7){m(ue,ae.sibling),Me=C(ae,me.props.children),Me.return=ue,ue=Me;break e}}else if(ae.elementType===wn||typeof wn=="object"&&wn!==null&&wn.$$typeof===$&&eu(wn)===ae.type){m(ue,ae.sibling),Me=C(ae,me.props),Ud(Me,me),Me.return=ue,ue=Me;break e}m(ue,ae);break}else c(ue,ae);ae=ae.sibling}me.type===w?(Me=Kl(me.props.children,ue.mode,Me,me.key),Me.return=ue,ue=Me):(Me=Qp(me.type,me.key,me.props,null,ue.mode,Me),Ud(Me,me),Me.return=ue,ue=Me)}return F(ue);case b:e:{for(wn=me.key;ae!==null;){if(ae.key===wn)if(ae.tag===4&&ae.stateNode.containerInfo===me.containerInfo&&ae.stateNode.implementation===me.implementation){m(ue,ae.sibling),Me=C(ae,me.children||[]),Me.return=ue,ue=Me;break e}else{m(ue,ae);break}else c(ue,ae);ae=ae.sibling}Me=Pb(me,ue.mode,Me),Me.return=ue,ue=Me}return F(ue);case $:return me=eu(me),At(ue,ae,me,Me)}if(R(me))return dn(ue,ae,me,Me);if(U(me)){if(wn=U(me),typeof wn!="function")throw Error(i(150));return me=wn.call(me),jn(ue,ae,me,Me)}if(typeof me.then=="function")return At(ue,ae,av(me),Me);if(me.$$typeof===j)return At(ue,ae,nv(ue,me),Me);ov(ue,me)}return typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint"?(me=""+me,ae!==null&&ae.tag===6?(m(ue,ae.sibling),Me=C(ae,me),Me.return=ue,ue=Me):(m(ue,ae),Me=Rb(me,ue.mode,Me),Me.return=ue,ue=Me),F(ue)):m(ue,ae)}return function(ue,ae,me,Me){try{Hd=0;var wn=At(ue,ae,me,Me);return mc=null,wn}catch(mn){if(mn===hc||mn===iv)throw mn;var pt=Pr(29,mn,null,ue.mode);return pt.lanes=Me,pt.return=ue,pt}finally{}}}var tu=YA(!0),KA=YA(!1),Ps=!1;function Wb(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gb(s,c){s=s.updateQueue,c.updateQueue===s&&(c.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Ns(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function $s(s,c,m){var y=s.updateQueue;if(y===null)return null;if(y=y.shared,(bt&2)!==0){var C=y.pending;return C===null?c.next=c:(c.next=C.next,C.next=c),y.pending=c,c=Zp(s),DA(s,null,m),c}return Xp(s,y,c,m),Zp(s)}function Vd(s,c,m){if(c=c.updateQueue,c!==null&&(c=c.shared,(m&4194048)!==0)){var y=c.lanes;y&=s.pendingLanes,m|=y,c.lanes=m,on(s,m)}}function Yb(s,c){var m=s.updateQueue,y=s.alternate;if(y!==null&&(y=y.updateQueue,m===y)){var C=null,E=null;if(m=m.firstBaseUpdate,m!==null){do{var F={lane:m.lane,tag:m.tag,payload:m.payload,callback:null,next:null};E===null?C=E=F:E=E.next=F,m=m.next}while(m!==null);E===null?C=E=c:E=E.next=c}else C=E=c;m={baseState:y.baseState,firstBaseUpdate:C,lastBaseUpdate:E,shared:y.shared,callbacks:y.callbacks},s.updateQueue=m;return}s=m.lastBaseUpdate,s===null?m.firstBaseUpdate=c:s.next=c,m.lastBaseUpdate=c}var Kb=!1;function Wd(){if(Kb){var s=dc;if(s!==null)throw s}}function Gd(s,c,m,y){Kb=!1;var C=s.updateQueue;Ps=!1;var E=C.firstBaseUpdate,F=C.lastBaseUpdate,K=C.shared.pending;if(K!==null){C.shared.pending=null;var ne=K,pe=ne.next;ne.next=null,F===null?E=pe:F.next=pe,F=ne;var Oe=s.alternate;Oe!==null&&(Oe=Oe.updateQueue,K=Oe.lastBaseUpdate,K!==F&&(K===null?Oe.firstBaseUpdate=pe:K.next=pe,Oe.lastBaseUpdate=ne))}if(E!==null){var Re=C.baseState;F=0,Oe=pe=ne=null,K=E;do{var ge=K.lane&-536870913,Se=ge!==K.lane;if(Se?(st&ge)===ge:(y&ge)===ge){ge!==0&&ge===fc&&(Kb=!0),Oe!==null&&(Oe=Oe.next={lane:0,tag:K.tag,payload:K.payload,callback:null,next:null});e:{var dn=s,jn=K;ge=c;var At=m;switch(jn.tag){case 1:if(dn=jn.payload,typeof dn=="function"){Re=dn.call(At,Re,ge);break e}Re=dn;break e;case 3:dn.flags=dn.flags&-65537|128;case 0:if(dn=jn.payload,ge=typeof dn=="function"?dn.call(At,Re,ge):dn,ge==null)break e;Re=d({},Re,ge);break e;case 2:Ps=!0}}ge=K.callback,ge!==null&&(s.flags|=64,Se&&(s.flags|=8192),Se=C.callbacks,Se===null?C.callbacks=[ge]:Se.push(ge))}else Se={lane:ge,tag:K.tag,payload:K.payload,callback:K.callback,next:null},Oe===null?(pe=Oe=Se,ne=Re):Oe=Oe.next=Se,F|=ge;if(K=K.next,K===null){if(K=C.shared.pending,K===null)break;Se=K,K=Se.next,Se.next=null,C.lastBaseUpdate=Se,C.shared.pending=null}}while(!0);Oe===null&&(ne=Re),C.baseState=ne,C.firstBaseUpdate=pe,C.lastBaseUpdate=Oe,E===null&&(C.shared.lanes=0),Fs|=F,s.lanes=F,s.memoizedState=Re}}function XA(s,c){if(typeof s!="function")throw Error(i(191,s));s.call(c)}function ZA(s,c){var m=s.callbacks;if(m!==null)for(s.callbacks=null,s=0;sE?E:8;var F=D.T,K={};D.T=K,mw(s,!1,c,m);try{var ne=C(),pe=D.S;if(pe!==null&&pe(K,ne),ne!==null&&typeof ne=="object"&&typeof ne.then=="function"){var Oe=NY(ne,y);Xd(s,c,Oe,Ir(s))}else Xd(s,c,y,Ir(s))}catch(Re){Xd(s,c,{then:function(){},status:"rejected",reason:Re},Ir())}finally{z.p=E,F!==null&&K.types!==null&&(F.types=K.types),D.T=F}}function FY(){}function dw(s,c,m,y){if(s.tag!==5)throw Error(i(476));var C=TO(s).queue;OO(s,C,c,H,m===null?FY:function(){return EO(s),m(y)})}function TO(s){var c=s.memoizedState;if(c!==null)return c;c={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:H},next:null};var m={};return c.next={memoizedState:m,baseState:m,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:m},next:null},s.memoizedState=c,s=s.alternate,s!==null&&(s.memoizedState=c),c}function EO(s){var c=TO(s);c.next===null&&(c=s.alternate.memoizedState),Xd(s,c.next.queue,{},Ir())}function hw(){return Ii(hh)}function MO(){return ui().memoizedState}function DO(){return ui().memoizedState}function qY(s){for(var c=s.return;c!==null;){switch(c.tag){case 24:case 3:var m=Ir();s=Ns(m);var y=$s(c,s,m);y!==null&&(kr(y,c,m),Vd(y,c,m)),c={cache:qb()},s.payload=c;return}c=c.return}}function HY(s,c,m){var y=Ir();m={lane:y,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},vv(s)?PO(c,m):(m=Mb(s,c,m,y),m!==null&&(kr(m,s,y),NO(m,c,y)))}function RO(s,c,m){var y=Ir();Xd(s,c,m,y)}function Xd(s,c,m,y){var C={lane:y,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null};if(vv(s))PO(c,C);else{var E=s.alternate;if(s.lanes===0&&(E===null||E.lanes===0)&&(E=c.lastRenderedReducer,E!==null))try{var F=c.lastRenderedState,K=E(F,m);if(C.hasEagerState=!0,C.eagerState=K,Rr(K,F))return Xp(s,c,C,0),Pt===null&&Kp(),!1}catch{}finally{}if(m=Mb(s,c,C,y),m!==null)return kr(m,s,y),NO(m,c,y),!0}return!1}function mw(s,c,m,y){if(y={lane:2,revertLane:Ww(),gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null},vv(s)){if(c)throw Error(i(479))}else c=Mb(s,m,y,2),c!==null&&kr(c,s,2)}function vv(s){var c=s.alternate;return s===Bn||c!==null&&c===Bn}function PO(s,c){vc=uv=!0;var m=s.pending;m===null?c.next=c:(c.next=m.next,m.next=c),s.pending=c}function NO(s,c,m){if((m&4194048)!==0){var y=c.lanes;y&=s.pendingLanes,m|=y,c.lanes=m,on(s,m)}}var Zd={readContext:Ii,use:dv,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useLayoutEffect:ni,useInsertionEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useSyncExternalStore:ni,useId:ni,useHostTransitionStatus:ni,useFormState:ni,useActionState:ni,useOptimistic:ni,useMemoCache:ni,useCacheRefresh:ni};Zd.useEffectEvent=ni;var $O={readContext:Ii,use:dv,useCallback:function(s,c){return rr().memoizedState=[s,c===void 0?null:c],s},useContext:Ii,useEffect:bO,useImperativeHandle:function(s,c,m){m=m!=null?m.concat([s]):null,mv(4194308,4,xO.bind(null,c,s),m)},useLayoutEffect:function(s,c){return mv(4194308,4,s,c)},useInsertionEffect:function(s,c){mv(4,2,s,c)},useMemo:function(s,c){var m=rr();c=c===void 0?null:c;var y=s();if(iu){sn(!0);try{s()}finally{sn(!1)}}return m.memoizedState=[y,c],y},useReducer:function(s,c,m){var y=rr();if(m!==void 0){var C=m(c);if(iu){sn(!0);try{m(c)}finally{sn(!1)}}}else C=c;return y.memoizedState=y.baseState=C,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:C},y.queue=s,s=s.dispatch=HY.bind(null,Bn,s),[y.memoizedState,s]},useRef:function(s){var c=rr();return s={current:s},c.memoizedState=s},useState:function(s){s=sw(s);var c=s.queue,m=RO.bind(null,Bn,c);return c.dispatch=m,[s.memoizedState,m]},useDebugValue:cw,useDeferredValue:function(s,c){var m=rr();return fw(m,s,c)},useTransition:function(){var s=sw(!1);return s=OO.bind(null,Bn,s.queue,!0,!1),rr().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,c,m){var y=Bn,C=rr();if(ut){if(m===void 0)throw Error(i(407));m=m()}else{if(m=c(),Pt===null)throw Error(i(349));(st&127)!==0||iO(y,c,m)}C.memoizedState=m;var E={value:m,getSnapshot:c};return C.queue=E,bO(aO.bind(null,y,E,s),[s]),y.flags|=2048,yc(9,{destroy:void 0},rO.bind(null,y,E,m,c),null),m},useId:function(){var s=rr(),c=Pt.identifierPrefix;if(ut){var m=Za,y=Xa;m=(y&~(1<<32-nn(y)-1)).toString(32)+m,c="_"+c+"R_"+m,m=cv++,0<\/script>",E=E.removeChild(E.firstChild);break;case"select":E=typeof y.is=="string"?F.createElement("select",{is:y.is}):F.createElement("select"),y.multiple?E.multiple=!0:y.size&&(E.size=y.size);break;default:E=typeof y.is=="string"?F.createElement(C,{is:y.is}):F.createElement(C)}}E[Qn]=c,E[Dt]=y;e:for(F=c.child;F!==null;){if(F.tag===5||F.tag===6)E.appendChild(F.stateNode);else if(F.tag!==4&&F.tag!==27&&F.child!==null){F.child.return=F,F=F.child;continue}if(F===c)break e;for(;F.sibling===null;){if(F.return===null||F.return===c)break e;F=F.return}F.sibling.return=F.return,F=F.sibling}c.stateNode=E;e:switch(Fi(E,C,y),C){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}y&&$o(c)}}return Vt(c),Ow(c,c.type,s===null?null:s.memoizedProps,c.pendingProps,m),null;case 6:if(s&&c.stateNode!=null)s.memoizedProps!==y&&$o(c);else{if(typeof y!="string"&&c.stateNode===null)throw Error(i(166));if(s=re.current,uc(c)){if(s=c.stateNode,m=c.memoizedProps,y=null,C=Li,C!==null)switch(C.tag){case 27:case 5:y=C.memoizedProps}s[Qn]=c,s=!!(s.nodeValue===m||y!==null&&y.suppressHydrationWarning===!0||nT(s.nodeValue,m)),s||Ds(c,!0)}else s=$v(s).createTextNode(y),s[Qn]=c,c.stateNode=s}return Vt(c),null;case 31:if(m=c.memoizedState,s===null||s.memoizedState!==null){if(y=uc(c),m!==null){if(s===null){if(!y)throw Error(i(318));if(s=c.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(i(557));s[Qn]=c}else Xl(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;Vt(c),s=!1}else m=Lb(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=m),s=!0;if(!s)return c.flags&256?($r(c),c):($r(c),null);if((c.flags&128)!==0)throw Error(i(558))}return Vt(c),null;case 13:if(y=c.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(C=uc(c),y!==null&&y.dehydrated!==null){if(s===null){if(!C)throw Error(i(318));if(C=c.memoizedState,C=C!==null?C.dehydrated:null,!C)throw Error(i(317));C[Qn]=c}else Xl(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;Vt(c),C=!1}else C=Lb(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=C),C=!0;if(!C)return c.flags&256?($r(c),c):($r(c),null)}return $r(c),(c.flags&128)!==0?(c.lanes=m,c):(m=y!==null,s=s!==null&&s.memoizedState!==null,m&&(y=c.child,C=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(C=y.alternate.memoizedState.cachePool.pool),E=null,y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(E=y.memoizedState.cachePool.pool),E!==C&&(y.flags|=2048)),m!==s&&m&&(c.child.flags|=8192),kv(c,c.updateQueue),Vt(c),null);case 4:return ee(),s===null&&Xw(c.stateNode.containerInfo),Vt(c),null;case 10:return Do(c.type),Vt(c),null;case 19:if(V(li),y=c.memoizedState,y===null)return Vt(c),null;if(C=(c.flags&128)!==0,E=y.rendering,E===null)if(C)Jd(y,!1);else{if(ti!==0||s!==null&&(s.flags&128)!==0)for(s=c.child;s!==null;){if(E=lv(s),E!==null){for(c.flags|=128,Jd(y,!1),s=E.updateQueue,c.updateQueue=s,kv(c,s),c.subtreeFlags=0,s=m,m=c.child;m!==null;)RA(m,s),m=m.sibling;return I(li,li.current&1|2),ut&&Eo(c,y.treeForkCount),c.child}s=s.sibling}y.tail!==null&&Qe()>jv&&(c.flags|=128,C=!0,Jd(y,!1),c.lanes=4194304)}else{if(!C)if(s=lv(E),s!==null){if(c.flags|=128,C=!0,s=s.updateQueue,c.updateQueue=s,kv(c,s),Jd(y,!0),y.tail===null&&y.tailMode==="hidden"&&!E.alternate&&!ut)return Vt(c),null}else 2*Qe()-y.renderingStartTime>jv&&m!==536870912&&(c.flags|=128,C=!0,Jd(y,!1),c.lanes=4194304);y.isBackwards?(E.sibling=c.child,c.child=E):(s=y.last,s!==null?s.sibling=E:c.child=E,y.last=E)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=Qe(),s.sibling=null,m=li.current,I(li,C?m&1|2:m&1),ut&&Eo(c,y.treeForkCount),s):(Vt(c),null);case 22:case 23:return $r(c),Zb(),y=c.memoizedState!==null,s!==null?s.memoizedState!==null!==y&&(c.flags|=8192):y&&(c.flags|=8192),y?(m&536870912)!==0&&(c.flags&128)===0&&(Vt(c),c.subtreeFlags&6&&(c.flags|=8192)):Vt(c),m=c.updateQueue,m!==null&&kv(c,m.retryQueue),m=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),y=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(y=c.memoizedState.cachePool.pool),y!==m&&(c.flags|=2048),s!==null&&V(Jl),null;case 24:return m=null,s!==null&&(m=s.memoizedState.cache),c.memoizedState.cache!==m&&(c.flags|=2048),Do(hi),Vt(c),null;case 25:return null;case 30:return null}throw Error(i(156,c.tag))}function YY(s,c){switch($b(c),c.tag){case 1:return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 3:return Do(hi),ee(),s=c.flags,(s&65536)!==0&&(s&128)===0?(c.flags=s&-65537|128,c):null;case 26:case 27:case 5:return ke(c),null;case 31:if(c.memoizedState!==null){if($r(c),c.alternate===null)throw Error(i(340));Xl()}return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 13:if($r(c),s=c.memoizedState,s!==null&&s.dehydrated!==null){if(c.alternate===null)throw Error(i(340));Xl()}return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 19:return V(li),null;case 4:return ee(),null;case 10:return Do(c.type),null;case 22:case 23:return $r(c),Zb(),s!==null&&V(Jl),s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 24:return Do(hi),null;case 25:return null;default:return null}}function o5(s,c){switch($b(c),c.tag){case 3:Do(hi),ee();break;case 26:case 27:case 5:ke(c);break;case 4:ee();break;case 31:c.memoizedState!==null&&$r(c);break;case 13:$r(c);break;case 19:V(li);break;case 10:Do(c.type);break;case 22:case 23:$r(c),Zb(),s!==null&&V(Jl);break;case 24:Do(hi)}}function eh(s,c){try{var m=c.updateQueue,y=m!==null?m.lastEffect:null;if(y!==null){var C=y.next;m=C;do{if((m.tag&s)===s){y=void 0;var E=m.create,F=m.inst;y=E(),F.destroy=y}m=m.next}while(m!==C)}}catch(K){St(c,c.return,K)}}function Is(s,c,m){try{var y=c.updateQueue,C=y!==null?y.lastEffect:null;if(C!==null){var E=C.next;y=E;do{if((y.tag&s)===s){var F=y.inst,K=F.destroy;if(K!==void 0){F.destroy=void 0,C=c;var ne=m,pe=K;try{pe()}catch(Oe){St(C,ne,Oe)}}}y=y.next}while(y!==E)}}catch(Oe){St(c,c.return,Oe)}}function s5(s){var c=s.updateQueue;if(c!==null){var m=s.stateNode;try{ZA(c,m)}catch(y){St(s,s.return,y)}}}function l5(s,c,m){m.props=ru(s.type,s.memoizedProps),m.state=s.memoizedState;try{m.componentWillUnmount()}catch(y){St(s,c,y)}}function nh(s,c){try{var m=s.ref;if(m!==null){switch(s.tag){case 26:case 27:case 5:var y=s.stateNode;break;case 30:y=s.stateNode;break;default:y=s.stateNode}typeof m=="function"?s.refCleanup=m(y):m.current=y}}catch(C){St(s,c,C)}}function Qa(s,c){var m=s.ref,y=s.refCleanup;if(m!==null)if(typeof y=="function")try{y()}catch(C){St(s,c,C)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof m=="function")try{m(null)}catch(C){St(s,c,C)}else m.current=null}function u5(s){var c=s.type,m=s.memoizedProps,y=s.stateNode;try{e:switch(c){case"button":case"input":case"select":case"textarea":m.autoFocus&&y.focus();break e;case"img":m.src?y.src=m.src:m.srcSet&&(y.srcset=m.srcSet)}}catch(C){St(s,s.return,C)}}function Tw(s,c,m){try{var y=s.stateNode;vK(y,s.type,m,c),y[Dt]=c}catch(C){St(s,s.return,C)}}function c5(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&Ws(s.type)||s.tag===4}function Ew(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||c5(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&&Ws(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 Mw(s,c,m){var y=s.tag;if(y===5||y===6)s=s.stateNode,c?(m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m).insertBefore(s,c):(c=m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m,c.appendChild(s),m=m._reactRootContainer,m!=null||c.onclick!==null||(c.onclick=Zr));else if(y!==4&&(y===27&&Ws(s.type)&&(m=s.stateNode,c=null),s=s.child,s!==null))for(Mw(s,c,m),s=s.sibling;s!==null;)Mw(s,c,m),s=s.sibling}function _v(s,c,m){var y=s.tag;if(y===5||y===6)s=s.stateNode,c?m.insertBefore(s,c):m.appendChild(s);else if(y!==4&&(y===27&&Ws(s.type)&&(m=s.stateNode),s=s.child,s!==null))for(_v(s,c,m),s=s.sibling;s!==null;)_v(s,c,m),s=s.sibling}function f5(s){var c=s.stateNode,m=s.memoizedProps;try{for(var y=s.type,C=c.attributes;C.length;)c.removeAttributeNode(C[0]);Fi(c,y,m),c[Qn]=s,c[Dt]=m}catch(E){St(s,s.return,E)}}var zo=!1,vi=!1,Dw=!1,d5=typeof WeakSet=="function"?WeakSet:Set,Ei=null;function KY(s,c){if(s=s.containerInfo,Jw=Hv,s=SA(s),Cb(s)){if("selectionStart"in s)var m={start:s.selectionStart,end:s.selectionEnd};else e:{m=(m=s.ownerDocument)&&m.defaultView||window;var y=m.getSelection&&m.getSelection();if(y&&y.rangeCount!==0){m=y.anchorNode;var C=y.anchorOffset,E=y.focusNode;y=y.focusOffset;try{m.nodeType,E.nodeType}catch{m=null;break e}var F=0,K=-1,ne=-1,pe=0,Oe=0,Re=s,ge=null;n:for(;;){for(var Se;Re!==m||C!==0&&Re.nodeType!==3||(K=F+C),Re!==E||y!==0&&Re.nodeType!==3||(ne=F+y),Re.nodeType===3&&(F+=Re.nodeValue.length),(Se=Re.firstChild)!==null;)ge=Re,Re=Se;for(;;){if(Re===s)break n;if(ge===m&&++pe===C&&(K=F),ge===E&&++Oe===y&&(ne=F),(Se=Re.nextSibling)!==null)break;Re=ge,ge=Re.parentNode}Re=Se}m=K===-1||ne===-1?null:{start:K,end:ne}}else m=null}m=m||{start:0,end:0}}else m=null;for(ek={focusedElem:s,selectionRange:m},Hv=!1,Ei=c;Ei!==null;)if(c=Ei,s=c.child,(c.subtreeFlags&1028)!==0&&s!==null)s.return=c,Ei=s;else for(;Ei!==null;){switch(c=Ei,E=c.alternate,s=c.flags,c.tag){case 0:if((s&4)!==0&&(s=c.updateQueue,s=s!==null?s.events:null,s!==null))for(m=0;m title"))),Fi(E,y,m),E[Qn]=s,cn(E),y=E;break e;case"link":var F=yT("link","href",C).get(y+(m.href||""));if(F){for(var K=0;KAt&&(F=At,At=jn,jn=F);var ue=_A(K,jn),ae=_A(K,At);if(ue&&ae&&(Se.rangeCount!==1||Se.anchorNode!==ue.node||Se.anchorOffset!==ue.offset||Se.focusNode!==ae.node||Se.focusOffset!==ae.offset)){var me=Re.createRange();me.setStart(ue.node,ue.offset),Se.removeAllRanges(),jn>At?(Se.addRange(me),Se.extend(ae.node,ae.offset)):(me.setEnd(ae.node,ae.offset),Se.addRange(me))}}}}for(Re=[],Se=K;Se=Se.parentNode;)Se.nodeType===1&&Re.push({element:Se,left:Se.scrollLeft,top:Se.scrollTop});for(typeof K.focus=="function"&&K.focus(),K=0;Km?32:m,D.T=null,m=Iw,Iw=null;var E=Hs,F=qo;if(_i=0,xc=Hs=null,qo=0,(bt&6)!==0)throw Error(i(331));var K=bt;if(bt|=4,x5(E.current),w5(E,E.current,F,m),bt=K,sh(0,!1),bn&&typeof bn.onPostCommitFiberRoot=="function")try{bn.onPostCommitFiberRoot(Dn,E)}catch{}return!0}finally{z.p=C,D.T=y,F5(s,c)}}function H5(s,c,m){c=ta(m,c),c=yw(s.stateNode,c,2),s=$s(s,c,2),s!==null&&(ot(s,2),Ja(s))}function St(s,c,m){if(s.tag===3)H5(s,s,m);else for(;c!==null;){if(c.tag===3){H5(c,s,m);break}else if(c.tag===1){var y=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(qs===null||!qs.has(y))){s=ta(m,s),m=UO(2),y=$s(c,m,2),y!==null&&(VO(m,y,c,s),ot(y,2),Ja(y));break}}c=c.return}}function Hw(s,c,m){var y=s.pingCache;if(y===null){y=s.pingCache=new QY;var C=new Set;y.set(c,C)}else C=y.get(c),C===void 0&&(C=new Set,y.set(c,C));C.has(m)||(Nw=!0,C.add(m),s=iK.bind(null,s,c,m),c.then(s,s))}function iK(s,c,m){var y=s.pingCache;y!==null&&y.delete(c),s.pingedLanes|=s.suspendedLanes&m,s.warmLanes&=~m,Pt===s&&(st&m)===m&&(ti===4||ti===3&&(st&62914560)===st&&300>Qe()-Cv?(bt&2)===0&&Sc(s,0):$w|=m,_c===st&&(_c=0)),Ja(s)}function U5(s,c){c===0&&(c=Ue()),s=Yl(s,c),s!==null&&(ot(s,c),Ja(s))}function rK(s){var c=s.memoizedState,m=0;c!==null&&(m=c.retryLane),U5(s,m)}function aK(s,c){var m=0;switch(s.tag){case 31:case 13:var y=s.stateNode,C=s.memoizedState;C!==null&&(m=C.retryLane);break;case 19:y=s.stateNode;break;case 22:y=s.stateNode._retryCache;break;default:throw Error(i(314))}y!==null&&y.delete(c),U5(s,m)}function oK(s,c){return he(s,c)}var Dv=null,jc=null,Uw=!1,Rv=!1,Vw=!1,Vs=0;function Ja(s){s!==jc&&s.next===null&&(jc===null?Dv=jc=s:jc=jc.next=s),Rv=!0,Uw||(Uw=!0,lK())}function sh(s,c){if(!Vw&&Rv){Vw=!0;do for(var m=!1,y=Dv;y!==null;){if(s!==0){var C=y.pendingLanes;if(C===0)var E=0;else{var F=y.suspendedLanes,K=y.pingedLanes;E=(1<<31-nn(42|s)+1)-1,E&=C&~(F&~K),E=E&201326741?E&201326741|1:E?E|2:0}E!==0&&(m=!0,Y5(y,E))}else E=st,E=at(y,y===Pt?E:0,y.cancelPendingCommit!==null||y.timeoutHandle!==-1),(E&3)===0||Mt(y,E)||(m=!0,Y5(y,E));y=y.next}while(m);Vw=!1}}function sK(){V5()}function V5(){Rv=Uw=!1;var s=0;Vs!==0&&yK()&&(s=Vs);for(var c=Qe(),m=null,y=Dv;y!==null;){var C=y.next,E=W5(y,c);E===0?(y.next=null,m===null?Dv=C:m.next=C,C===null&&(jc=m)):(m=y,(s!==0||(E&3)!==0)&&(Rv=!0)),y=C}_i!==0&&_i!==5||sh(s),Vs!==0&&(Vs=0)}function W5(s,c){for(var m=s.suspendedLanes,y=s.pingedLanes,C=s.expirationTimes,E=s.pendingLanes&-62914561;0K)break;var Oe=ne.transferSize,Re=ne.initiatorType;Oe&&tT(Re)&&(ne=ne.responseEnd,F+=Oe*(ne"u"?null:document;function mT(s,c,m){var y=Ac;if(y&&typeof c=="string"&&c){var C=mr(c);C='link[rel="'+s+'"][href="'+C+'"]',typeof m=="string"&&(C+='[crossorigin="'+m+'"]'),hT.has(C)||(hT.add(C),s={rel:s,crossOrigin:m,href:c},y.querySelector(C)===null&&(c=y.createElement("link"),Fi(c,"link",s),cn(c),y.head.appendChild(c)))}}function AK(s){Ho.D(s),mT("dns-prefetch",s,null)}function OK(s,c){Ho.C(s,c),mT("preconnect",s,c)}function TK(s,c,m){Ho.L(s,c,m);var y=Ac;if(y&&s&&c){var C='link[rel="preload"][as="'+mr(c)+'"]';c==="image"&&m&&m.imageSrcSet?(C+='[imagesrcset="'+mr(m.imageSrcSet)+'"]',typeof m.imageSizes=="string"&&(C+='[imagesizes="'+mr(m.imageSizes)+'"]')):C+='[href="'+mr(s)+'"]';var E=C;switch(c){case"style":E=Oc(s);break;case"script":E=Tc(s)}la.has(E)||(s=d({rel:"preload",href:c==="image"&&m&&m.imageSrcSet?void 0:s,as:c},m),la.set(E,s),y.querySelector(C)!==null||c==="style"&&y.querySelector(fh(E))||c==="script"&&y.querySelector(dh(E))||(c=y.createElement("link"),Fi(c,"link",s),cn(c),y.head.appendChild(c)))}}function EK(s,c){Ho.m(s,c);var m=Ac;if(m&&s){var y=c&&typeof c.as=="string"?c.as:"script",C='link[rel="modulepreload"][as="'+mr(y)+'"][href="'+mr(s)+'"]',E=C;switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":E=Tc(s)}if(!la.has(E)&&(s=d({rel:"modulepreload",href:s},c),la.set(E,s),m.querySelector(C)===null)){switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(m.querySelector(dh(E)))return}y=m.createElement("link"),Fi(y,"link",s),cn(y),m.head.appendChild(y)}}}function MK(s,c,m){Ho.S(s,c,m);var y=Ac;if(y&&s){var C=oi(y).hoistableStyles,E=Oc(s);c=c||"default";var F=C.get(E);if(!F){var K={loading:0,preload:null};if(F=y.querySelector(fh(E)))K.loading=5;else{s=d({rel:"stylesheet",href:s,"data-precedence":c},m),(m=la.get(E))&&sk(s,m);var ne=F=y.createElement("link");cn(ne),Fi(ne,"link",s),ne._p=new Promise(function(pe,Oe){ne.onload=pe,ne.onerror=Oe}),ne.addEventListener("load",function(){K.loading|=1}),ne.addEventListener("error",function(){K.loading|=2}),K.loading|=4,Lv(F,c,y)}F={type:"stylesheet",instance:F,count:1,state:K},C.set(E,F)}}}function DK(s,c){Ho.X(s,c);var m=Ac;if(m&&s){var y=oi(m).hoistableScripts,C=Tc(s),E=y.get(C);E||(E=m.querySelector(dh(C)),E||(s=d({src:s,async:!0},c),(c=la.get(C))&&lk(s,c),E=m.createElement("script"),cn(E),Fi(E,"link",s),m.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},y.set(C,E))}}function RK(s,c){Ho.M(s,c);var m=Ac;if(m&&s){var y=oi(m).hoistableScripts,C=Tc(s),E=y.get(C);E||(E=m.querySelector(dh(C)),E||(s=d({src:s,async:!0,type:"module"},c),(c=la.get(C))&&lk(s,c),E=m.createElement("script"),cn(E),Fi(E,"link",s),m.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},y.set(C,E))}}function pT(s,c,m,y){var C=(C=re.current)?zv(C):null;if(!C)throw Error(i(446));switch(s){case"meta":case"title":return null;case"style":return typeof m.precedence=="string"&&typeof m.href=="string"?(c=Oc(m.href),m=oi(C).hoistableStyles,y=m.get(c),y||(y={type:"style",instance:null,count:0,state:null},m.set(c,y)),y):{type:"void",instance:null,count:0,state:null};case"link":if(m.rel==="stylesheet"&&typeof m.href=="string"&&typeof m.precedence=="string"){s=Oc(m.href);var E=oi(C).hoistableStyles,F=E.get(s);if(F||(C=C.ownerDocument||C,F={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},E.set(s,F),(E=C.querySelector(fh(s)))&&!E._p&&(F.instance=E,F.state.loading=5),la.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},la.set(s,m),E||PK(C,s,m,F.state))),c&&y===null)throw Error(i(528,""));return F}if(c&&y!==null)throw Error(i(529,""));return null;case"script":return c=m.async,m=m.src,typeof m=="string"&&c&&typeof c!="function"&&typeof c!="symbol"?(c=Tc(m),m=oi(C).hoistableScripts,y=m.get(c),y||(y={type:"script",instance:null,count:0,state:null},m.set(c,y)),y):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,s))}}function Oc(s){return'href="'+mr(s)+'"'}function fh(s){return'link[rel="stylesheet"]['+s+"]"}function vT(s){return d({},s,{"data-precedence":s.precedence,precedence:null})}function PK(s,c,m,y){s.querySelector('link[rel="preload"][as="style"]['+c+"]")?y.loading=1:(c=s.createElement("link"),y.preload=c,c.addEventListener("load",function(){return y.loading|=1}),c.addEventListener("error",function(){return y.loading|=2}),Fi(c,"link",m),cn(c),s.head.appendChild(c))}function Tc(s){return'[src="'+mr(s)+'"]'}function dh(s){return"script[async]"+s}function gT(s,c,m){if(c.count++,c.instance===null)switch(c.type){case"style":var y=s.querySelector('style[data-href~="'+mr(m.href)+'"]');if(y)return c.instance=y,cn(y),y;var C=d({},m,{"data-href":m.href,"data-precedence":m.precedence,href:null,precedence:null});return y=(s.ownerDocument||s).createElement("style"),cn(y),Fi(y,"style",C),Lv(y,m.precedence,s),c.instance=y;case"stylesheet":C=Oc(m.href);var E=s.querySelector(fh(C));if(E)return c.state.loading|=4,c.instance=E,cn(E),E;y=vT(m),(C=la.get(C))&&sk(y,C),E=(s.ownerDocument||s).createElement("link"),cn(E);var F=E;return F._p=new Promise(function(K,ne){F.onload=K,F.onerror=ne}),Fi(E,"link",y),c.state.loading|=4,Lv(E,m.precedence,s),c.instance=E;case"script":return E=Tc(m.src),(C=s.querySelector(dh(E)))?(c.instance=C,cn(C),C):(y=m,(C=la.get(E))&&(y=d({},m),lk(y,C)),s=s.ownerDocument||s,C=s.createElement("script"),cn(C),Fi(C,"link",y),s.head.appendChild(C),c.instance=C);case"void":return null;default:throw Error(i(443,c.type))}else c.type==="stylesheet"&&(c.state.loading&4)===0&&(y=c.instance,c.state.loading|=4,Lv(y,m.precedence,s));return c.instance}function Lv(s,c,m){for(var y=m.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),C=y.length?y[y.length-1]:null,E=C,F=0;F title"):null)}function NK(s,c,m){if(m===1||c.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof c.precedence!="string"||typeof c.href!="string"||c.href==="")break;return!0;case"link":if(typeof c.rel!="string"||typeof c.href!="string"||c.href===""||c.onLoad||c.onError)break;switch(c.rel){case"stylesheet":return s=c.disabled,typeof c.precedence=="string"&&s==null;default:return!0}case"script":if(c.async&&typeof c.async!="function"&&typeof c.async!="symbol"&&!c.onLoad&&!c.onError&&c.src&&typeof c.src=="string")return!0}return!1}function wT(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function $K(s,c,m,y){if(m.type==="stylesheet"&&(typeof y.media!="string"||matchMedia(y.media).matches!==!1)&&(m.state.loading&4)===0){if(m.instance===null){var C=Oc(y.href),E=c.querySelector(fh(C));if(E){c=E._p,c!==null&&typeof c=="object"&&typeof c.then=="function"&&(s.count++,s=Bv.bind(s),c.then(s,s)),m.state.loading|=4,m.instance=E,cn(E);return}E=c.ownerDocument||c,y=vT(y),(C=la.get(C))&&sk(y,C),E=E.createElement("link"),cn(E);var F=E;F._p=new Promise(function(K,ne){F.onload=K,F.onerror=ne}),Fi(E,"link",y),m.instance=E}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(m,c),(c=m.state.preload)&&(m.state.loading&3)===0&&(s.count++,m=Bv.bind(s),c.addEventListener("load",m),c.addEventListener("error",m))}}var uk=0;function zK(s,c){return s.stylesheets&&s.count===0&&qv(s,s.stylesheets),0uk?50:800)+c);return s.unsuspend=m,function(){s.unsuspend=null,clearTimeout(y),clearTimeout(C)}}:null}function Bv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qv(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Fv=null;function qv(s,c){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Fv=new Map,c.forEach(LK,s),Fv=null,Bv.call(s))}function LK(s,c){if(!(c.state.loading&4)){var m=Fv.get(s);if(m)var y=m.get(null);else{m=new Map,Fv.set(s,m);for(var C=s.querySelectorAll("link[data-precedence],style[data-precedence]"),E=0;E"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Yk.exports=fre(),Yk.exports}var hre=dre();class p9 extends Error{constructor(n,t){super(t),this.status=n,this.name="HTTPError"}}async function mre(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 p9(i.status,r.Message??r.message??i.statusText)}if(i.status!==204)return i.json()}const PF="/api";function _n(e,n){return mre(e,n,PF)}function sM(){return _n("/board")}function pre(){return _n("/flags")}function NF(){return _n("/version")}function vre(e){return _n("/columns",{method:"POST",body:JSON.stringify({name:e})})}function uu(e,n){return _n(`/columns/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function gre(e){return _n(`/columns/${e}`,{method:"DELETE"})}function yre(e){return _n("/columns/reorder",{method:"POST",body:JSON.stringify({ids:e})})}function bre(e){return _n("/cards",{method:"POST",body:JSON.stringify(e)})}function Nc(e,n){return _n(`/cards/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function wre(e){return _n(`/cards/${e}`,{method:"DELETE"})}function Zk(e,n){return _n(`/cards/${e}/stickers`,{method:"PUT",body:JSON.stringify({stickers:n})})}function lM(){return _n("/trash")}function kre(e){return _n(`/cards/${e}/restore`,{method:"POST"})}function _re(e){return _n(`/cards/${e}/purge`,{method:"DELETE"})}function uM(){return _n("/archive")}function xre(e){return _n(`/cards/${e}/archive`,{method:"POST"})}function Sre(e){return _n(`/cards/${e}/unarchive`,{method:"POST"})}function Cre(e,n){const t=new URLSearchParams({date:e});return _n(`/reports/daily?${t.toString()}`)}function jre(e){return _n(`/reports/daily/summary?date=${encodeURIComponent(e)}`)}function Are(e,n){const t=new URLSearchParams({date:e});return _n(`/reports/daily/summary?${t.toString()}`,{method:"POST"})}function Ore(e){return _n(`/settings/${encodeURIComponent(e)}`)}function Tre(e,n){return _n(`/settings/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify({value:n})})}function Ere(e,n,t){return _n(`/cards/${e}/move`,{method:"POST",body:JSON.stringify({column_id:n,ordered_ids:t})})}function Mre(e){return _n(`/cards/${e}/history`)}function Dre(e){return _n(`/cards/${e}/messages`)}function cM(e,n){return _n(`/cards/${e}/messages`,{method:"POST",body:JSON.stringify({body:n})})}function Rre(e,n){return _n(`/cards/${e}/messages/${n}`,{method:"DELETE"})}function Pre(e){return _n(`/cards/${e}/duplicate`,{method:"POST"})}function Nre(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/chat/ws`}function $re(e){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/cards/${e}/chat/ws`}function $F(e=!1){return _n(`/notifications${e?"?unread=1":""}`)}function zF(){return _n("/notifications/unread-count")}function zre(e){return _n(`/notifications/${e}/read`,{method:"POST"})}function Lre(){return _n("/notifications/read-all",{method:"POST"})}function Ire(){return _n("/modules")}function Bre(e){return _n("/modules",{method:"POST",body:JSON.stringify(e)})}function Fre(e,n){return _n(`/modules/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function qre(e){return _n(`/modules/${e}`,{method:"DELETE"})}function Hre(e,n=100){return _n(`/modules/${e}/logs?limit=${n}`)}function fM(e,n){const t={method:"POST"};return n&&(t.body=JSON.stringify(n)),_n(`/modules/${e}/test`,t)}function Ure(e,n,t){return new Promise((i,r)=>{const a=new WebSocket(Nre());let o=!1;const l=u=>{if(!o){o=!0;try{a.close()}catch{}u?r(u):i()}};a.onopen=()=>{a.send(JSON.stringify({messages:e}))},a.onmessage=u=>{try{const f=JSON.parse(typeof u.data=="string"?u.data:"");n(f),(f.type==="done"||f.type==="error")&&l(f.type==="error"?new Error(f.error):void 0)}catch(f){l(f)}},a.onerror=()=>l(new Error("websocket error")),a.onclose=()=>l()})}function dM(e,n){return _n("/auth/login",{method:"POST",body:JSON.stringify({username:e,password:n})})}function Vre(e,n,t){return _n("/auth/register",{method:"POST",body:JSON.stringify({username:e,password:n,display_name:t})})}function Wre(){return _n("/auth/logout",{method:"POST"})}function Gre(){return _n("/me")}function hM(e){return _n("/me",{method:"PATCH",body:JSON.stringify(e)})}function LF(){return _n("/users")}function IF(){return _n("/tags")}function Yre(){return _n("/requesters")}function Kre(e){return _n(`/cards/${e}/files`)}async function v9(e,n,t="upload"){const i=new FormData;i.append("file",n),i.append("source",t);const r=await fetch(`${PF}/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 p9(r.status,a)}return await r.json()}function Xre(e){return _n(`/files/${e}`,{method:"DELETE"})}function Zre(e){return _n("/mcp-tokens",{method:"POST",body:JSON.stringify({name:e})})}function Qre(){return _n("/mcp-tokens")}function Jre(e){return _n(`/mcp-tokens/${e}`,{method:"DELETE"})}function eae(e){return _n(`/cards/${e}/jira-sync`)}function nae(e){const n=new URLSearchParams;e!=null&&e.includeImported&&n.set("include_imported","true"),n.set("limit",String(e.limit));const t=n.toString();return _n(`/jira/issues${t?`?${t}`:""}`)}function tae(e,n){return _n("/jira/import",{method:"POST",body:JSON.stringify({issue_keys:e,fallback_column_id:n||""})})}function BF(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 _n(`/metrics${t?`?${t}`:""}`)}const FF=x.createContext(null);function iae({children:e}){const[n,t]=x.useState(null),[i,r]=x.useState(!0);x.useEffect(()=>{Gre().then(t).catch(u=>{(!(u instanceof p9)||u.status!==401)&&console.warn("getMe failed",u)}).finally(()=>r(!1))},[]);const a=x.useCallback(async(u,f)=>{const h=await dM(u,f);t(h)},[]),o=x.useCallback(async(u,f,h)=>{await Vre(u,f,h);const d=await dM(u,f);t(d)},[]),l=x.useCallback(async()=>{await Wre(),t(null)},[]);return v.jsx(FF.Provider,{value:{user:n,loading:i,login:a,register:o,logout:l,setUser:t},children:e})}function g9(){const e=x.useContext(FF);if(!e)throw new Error("useAuth: missing AuthProvider");return e}function rae(){for(var e=arguments.length,n=new Array(e),t=0;ti=>{n.forEach(r=>r(i))},n)}const v0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ed(e){const n=Object.prototype.toString.call(e);return n==="[object Window]"||n==="[object global]"}function y9(e){return"nodeType"in e}function fr(e){var n,t;return e?ed(e)?e:y9(e)&&(n=(t=e.ownerDocument)==null?void 0:t.defaultView)!=null?n:window:window}function b9(e){const{Document:n}=fr(e);return e instanceof n}function wp(e){return ed(e)?!1:e instanceof fr(e).HTMLElement}function qF(e){return e instanceof fr(e).SVGElement}function nd(e){return e?ed(e)?e.document:y9(e)?b9(e)?e:wp(e)||qF(e)?e.ownerDocument:document:document:document}const Va=v0?x.useLayoutEffect:x.useEffect;function g0(e){const n=x.useRef(e);return Va(()=>{n.current=e}),x.useCallback(function(){for(var t=arguments.length,i=new Array(t),r=0;r{e.current=setInterval(i,r)},[]),t=x.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[n,t]}function gm(e,n){n===void 0&&(n=[e]);const t=x.useRef(e);return Va(()=>{t.current!==e&&(t.current=e)},n),t}function kp(e,n){const t=x.useRef();return x.useMemo(()=>{const i=e(t.current);return t.current=i,i},[...n])}function t1(e){const n=g0(e),t=x.useRef(null),i=x.useCallback(r=>{r!==t.current&&(n==null||n(r,t.current)),t.current=r},[]);return[t,i]}function i1(e){const n=x.useRef();return x.useEffect(()=>{n.current=e},[e]),n.current}let Qk={};function _p(e,n){return x.useMemo(()=>{if(n)return n;const t=Qk[e]==null?0:Qk[e]+1;return Qk[e]=t,e+"-"+t},[e,n])}function HF(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[u,f]of l){const h=a[u];h!=null&&(a[u]=h+e*f)}return a},{...n})}}const Qc=HF(1),ym=HF(-1);function oae(e){return"clientX"in e&&"clientY"in e}function y0(e){if(!e)return!1;const{KeyboardEvent:n}=fr(e.target);return n&&e instanceof n}function sae(e){if(!e)return!1;const{TouchEvent:n}=fr(e.target);return n&&e instanceof n}function r1(e){if(sae(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 oae(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}}}),mM="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function lae(e){return e.matches(mM)?e:e.querySelector(mM)}const uae={display:"none"};function cae(e){let{id:n,value:t}=e;return J.createElement("div",{id:n,style:uae},t)}function fae(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 J.createElement("div",{id:n,style:r,role:"status","aria-live":i,"aria-atomic":!0},t)}function dae(){const[e,n]=x.useState("");return{announce:x.useCallback(i=>{i!=null&&n(i)},[]),announcement:e}}const UF=x.createContext(null);function hae(e){const n=x.useContext(UF);x.useEffect(()=>{if(!n)throw new Error("useDndMonitor must be used within a children of ");return n(e)},[e,n])}function mae(){const[e]=x.useState(()=>new Set),n=x.useCallback(i=>(e.add(i),()=>e.delete(i)),[e]);return[x.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 pae={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. - `},pae={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 vae(e){let{announcements:n=pae,container:t,hiddenTextDescribedById:i,screenReaderInstructions:r=mae}=e;const{announce:a,announcement:o}=fae(),l=_p("DndLiveRegion"),[u,f]=x.useState(!1);if(x.useEffect(()=>{f(!0)},[]),dae(x.useMemo(()=>({onDragStart(d){let{active:p}=d;a(n.onDragStart({active:p}))},onDragMove(d){let{active:p,over:g}=d;n.onDragMove&&a(n.onDragMove({active:p,over:g}))},onDragOver(d){let{active:p,over:g}=d;a(n.onDragOver({active:p,over:g}))},onDragEnd(d){let{active:p,over:g}=d;a(n.onDragEnd({active:p,over:g}))},onDragCancel(d){let{active:p,over:g}=d;a(n.onDragCancel({active:p,over:g}))}}),[a,n])),!u)return null;const h=J.createElement(J.Fragment,null,J.createElement(uae,{id:i,value:r.draggable}),J.createElement(cae,{id:l,announcement:o}));return t?sl.createPortal(h,t):h}var Ci;(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"})(Ci||(Ci={}));function a1(){}function pM(e,n){return x.useMemo(()=>({sensor:e,options:n??{}}),[e,n])}function gae(){for(var e=arguments.length,n=new Array(e),t=0;t[...n].filter(i=>i!=null),[...n])}const Wa=Object.freeze({x:0,y:0});function w9(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function yae(e,n){const t=r1(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 k9(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return t-i}function bae(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return i-t}function ZS(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 UF(e,n){if(!e||e.length===0)return null;const[t]=e;return t[n]}function vM(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 wae=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=vM(n,n.left,n.top),a=[];for(const o of i){const{id:l}=o,u=t.get(l);if(u){const f=w9(vM(u),r);a.push({id:l,data:{droppableContainer:o,value:f}})}}return a.sort(k9)},VF=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=ZS(n),a=[];for(const o of i){const{id:l}=o,u=t.get(l);if(u){const f=ZS(u),h=r.reduce((p,g,b)=>p+w9(f[b],g),0),d=Number((h/4).toFixed(4));a.push({id:l,data:{droppableContainer:o,value:d}})}}return a.sort(k9)};function kae(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 u=kae(l,n);u>0&&r.push({id:o,data:{droppableContainer:a,value:u}})}}return r.sort(bae)};function _ae(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 xae=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&&_ae(i,l)){const f=ZS(l).reduce((d,p)=>d+w9(i,p),0),h=Number((f/4).toFixed(4));r.push({id:o,data:{droppableContainer:a,value:h}})}}return r.sort(k9)};function Sae(e,n,t){return{...e,scaleX:n&&t?n.width/t.width:1,scaleY:n&&t?n.height/t.height:1}}function GF(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:Wa}function Cae(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 jae=Cae(1);function YF(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 Aae(e,n,t){const i=YF(n);if(!i)return e;const{scaleX:r,scaleY:a,x:o,y:l}=i,u=e.left-o-(1-r)*parseFloat(t),f=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:f,right:u+h,bottom:f+d,left:u}}const Oae={ignoreTransform:!1};function td(e,n){n===void 0&&(n=Oae);let t=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:f,transformOrigin:h}=fr(e).getComputedStyle(e);f&&(t=Aae(t,f,h))}const{top:i,left:r,width:a,height:o,bottom:l,right:u}=t;return{top:i,left:r,width:a,height:o,bottom:l,right:u}}function gM(e){return td(e,{ignoreTransform:!0})}function Tae(e){const n=e.innerWidth,t=e.innerHeight;return{top:0,left:0,right:n,bottom:t,width:n,height:t}}function Eae(e,n){return n===void 0&&(n=fr(e).getComputedStyle(e)),n.position==="fixed"}function Mae(e,n){n===void 0&&(n=fr(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 b0(e,n){const t=[];function i(r){if(n!=null&&t.length>=n||!r)return t;if(b9(r)&&r.scrollingElement!=null&&!t.includes(r.scrollingElement))return t.push(r.scrollingElement),t;if(!wp(r)||FF(r)||t.includes(r))return t;const a=fr(e).getComputedStyle(r);return r!==e&&Mae(r,a)&&t.push(r),Eae(r,a)?t:i(r.parentNode)}return e?i(e):t}function KF(e){const[n]=b0(e,1);return n??null}function Jk(e){return!v0||!e?null:ed(e)?e:y9(e)?b9(e)||e===nd(e).scrollingElement?window:wp(e)?e:null:null}function XF(e){return ed(e)?e.scrollX:e.scrollLeft}function ZF(e){return ed(e)?e.scrollY:e.scrollTop}function QS(e){return{x:XF(e),y:ZF(e)}}var Ri;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ri||(Ri={}));function QF(e){return!v0||!e?!1:e===document.scrollingElement}function JF(e){const n={x:0,y:0},t=QF(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 Dae={x:.2,y:.2};function Rae(e,n,t,i,r){let{top:a,left:o,right:l,bottom:u}=t;i===void 0&&(i=10),r===void 0&&(r=Dae);const{isTop:f,isBottom:h,isLeft:d,isRight:p}=JF(e),g={x:0,y:0},b={x:0,y:0},w={height:n.height*r.y,width:n.width*r.x};return!f&&a<=n.top+w.height?(g.y=Ri.Backward,b.y=i*Math.abs((n.top+w.height-a)/w.height)):!h&&u>=n.bottom-w.height&&(g.y=Ri.Forward,b.y=i*Math.abs((n.bottom-w.height-u)/w.height)),!p&&l>=n.right-w.width?(g.x=Ri.Forward,b.x=i*Math.abs((n.right-w.width-l)/w.width)):!d&&o<=n.left+w.width&&(g.x=Ri.Backward,b.x=i*Math.abs((n.left+w.width-o)/w.width)),{direction:g,speed:b}}function Pae(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 eq(e){return e.reduce((n,t)=>Qc(n,QS(t)),Wa)}function Nae(e){return e.reduce((n,t)=>n+XF(t),0)}function $ae(e){return e.reduce((n,t)=>n+ZF(t),0)}function nq(e,n){if(n===void 0&&(n=td),!e)return;const{top:t,left:i,bottom:r,right:a}=n(e);KF(e)&&(r<=0||a<=0||t>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const zae=[["x",["left","right"],Nae],["y",["top","bottom"],$ae]];class _9{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=b0(t),r=eq(i);this.rect={...n},this.width=n.width,this.height=n.height;for(const[a,o,l]of zae)for(const u of o)Object.defineProperty(this,u,{get:()=>{const f=l(i),h=r[a]-f;return this.rect[u]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Xh{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 Lae(e){const{EventTarget:n}=fr(e);return e instanceof n?e:nd(e)}function e_(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 ma;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ma||(ma={}));function yM(e){e.preventDefault()}function Iae(e){e.stopPropagation()}var ct;(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"})(ct||(ct={}));const tq={start:[ct.Space,ct.Enter],cancel:[ct.Esc],end:[ct.Space,ct.Enter,ct.Tab]},Bae=(e,n)=>{let{currentCoordinates:t}=n;switch(e.code){case ct.Right:return{...t,x:t.x+25};case ct.Left:return{...t,x:t.x-25};case ct.Down:return{...t,y:t.y+25};case ct.Up:return{...t,y:t.y-25}}};class x9{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 Xh(nd(t)),this.windowListeners=new Xh(fr(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ma.Resize,this.handleCancel),this.windowListeners.add(ma.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ma.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:n,onStart:t}=this.props,i=n.node.current;i&&nq(i),t(Wa)}handleKeyDown(n){if(y0(n)){const{active:t,context:i,options:r}=this.props,{keyboardCodes:a=tq,coordinateGetter:o=Bae,scrollBehavior:l="smooth"}=r,{code:u}=n;if(a.end.includes(u)){this.handleEnd(n);return}if(a.cancel.includes(u)){this.handleCancel(n);return}const{collisionRect:f}=i.current,h=f?{x:f.left,y:f.top}:Wa;this.referenceCoordinates||(this.referenceCoordinates=h);const d=o(n,{active:t,context:i.current,currentCoordinates:h});if(d){const p=ym(d,h),g={x:0,y:0},{scrollableAncestors:b}=i.current;for(const w of b){const k=n.code,{isTop:_,isRight:S,isLeft:j,isBottom:T,maxScroll:A,minScroll:O}=JF(w),M=Pae(w),$={x:Math.min(k===ct.Right?M.right-M.width/2:M.right,Math.max(k===ct.Right?M.left:M.left+M.width/2,d.x)),y:Math.min(k===ct.Down?M.bottom-M.height/2:M.bottom,Math.max(k===ct.Down?M.top:M.top+M.height/2,d.y))},q=k===ct.Right&&!S||k===ct.Left&&!j,P=k===ct.Down&&!T||k===ct.Up&&!_;if(q&&$.x!==d.x){const L=w.scrollLeft+p.x,U=k===ct.Right&&L<=A.x||k===ct.Left&&L>=O.x;if(U&&!p.y){w.scrollTo({left:L,behavior:l});return}U?g.x=w.scrollLeft-L:g.x=k===ct.Right?w.scrollLeft-A.x:w.scrollLeft-O.x,g.x&&w.scrollBy({left:-g.x,behavior:l});break}else if(P&&$.y!==d.y){const L=w.scrollTop+p.y,U=k===ct.Down&&L<=A.y||k===ct.Up&&L>=O.y;if(U&&!p.x){w.scrollTo({top:L,behavior:l});return}U?g.y=w.scrollTop-L:g.y=k===ct.Down?w.scrollTop-A.y:w.scrollTop-O.y,g.y&&w.scrollBy({top:-g.y,behavior:l});break}}this.handleMove(n,Qc(ym(d,this.referenceCoordinates),g))}}}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()}}x9.activators=[{eventName:"onKeyDown",handler:(e,n,t)=>{let{keyboardCodes:i=tq,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 bM(e){return!!(e&&"distance"in e)}function wM(e){return!!(e&&"delay"in e)}class S9{constructor(n,t,i){var r;i===void 0&&(i=Lae(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=nd(o),this.documentListeners=new Xh(this.document),this.listeners=new Xh(i),this.windowListeners=new Xh(fr(o)),this.initialCoordinates=(r=r1(a))!=null?r:Wa,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(ma.Resize,this.handleCancel),this.windowListeners.add(ma.DragStart,yM),this.windowListeners.add(ma.VisibilityChange,this.handleCancel),this.windowListeners.add(ma.ContextMenu,yM),this.documentListeners.add(ma.Keydown,this.handleKeydown),t){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(wM(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(bM(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(ma.Click,Iae,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ma.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 u=(t=r1(n))!=null?t:Wa,f=ym(r,u);if(!i&&l){if(bM(l)){if(l.tolerance!=null&&e_(f,l.tolerance))return this.handleCancel();if(e_(f,l.distance))return this.handleStart()}if(wM(l)&&e_(f,l.tolerance))return this.handleCancel();this.handlePending(l,f);return}n.cancelable&&n.preventDefault(),o(u)}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===ct.Esc&&this.handleCancel()}removeTextSelection(){var n;(n=this.document.getSelection())==null||n.removeAllRanges()}}const Fae={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class C9 extends S9{constructor(n){const{event:t}=n,i=nd(t.target);super(n,Fae,i)}}C9.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 qae={move:{name:"mousemove"},end:{name:"mouseup"}};var JS;(function(e){e[e.RightClick=2]="RightClick"})(JS||(JS={}));class Hae extends S9{constructor(n){super(n,qae,nd(n.event.target))}}Hae.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;return t.button===JS.RightClick?!1:(i==null||i({event:t}),!0)}}];const n_={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Uae extends S9{constructor(n){super(n,n_)}static setup(){return window.addEventListener(n_.move.name,n,{capture:!1,passive:!1}),function(){window.removeEventListener(n_.move.name,n)};function n(){}}}Uae.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 Zh;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Zh||(Zh={}));var o1;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(o1||(o1={}));function Vae(e){let{acceleration:n,activator:t=Zh.Pointer,canScroll:i,draggingRect:r,enabled:a,interval:o=5,order:l=o1.TreeOrder,pointerCoordinates:u,scrollableAncestors:f,scrollableAncestorRects:h,delta:d,threshold:p}=e;const g=Gae({delta:d,disabled:!a}),[b,w]=rae(),k=x.useRef({x:0,y:0}),_=x.useRef({x:0,y:0}),S=x.useMemo(()=>{switch(t){case Zh.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case Zh.DraggableRect:return r}},[t,r,u]),j=x.useRef(null),T=x.useCallback(()=>{const O=j.current;if(!O)return;const M=k.current.x*_.current.x,$=k.current.y*_.current.y;O.scrollBy(M,$)},[]),A=x.useMemo(()=>l===o1.TreeOrder?[...f].reverse():f,[l,f]);x.useEffect(()=>{if(!a||!f.length||!S){w();return}for(const O of A){if((i==null?void 0:i(O))===!1)continue;const M=f.indexOf(O),$=h[M];if(!$)continue;const{direction:q,speed:P}=Rae(O,$,S,n,p);for(const L of["x","y"])g[L][q[L]]||(P[L]=0,q[L]=0);if(P.x>0||P.y>0){w(),j.current=O,b(T,o),k.current=P,_.current=q;return}}k.current={x:0,y:0},_.current={x:0,y:0},w()},[n,T,i,w,a,o,JSON.stringify(S),JSON.stringify(g),b,f,A,h,JSON.stringify(p)])}const Wae={x:{[Ri.Backward]:!1,[Ri.Forward]:!1},y:{[Ri.Backward]:!1,[Ri.Forward]:!1}};function Gae(e){let{delta:n,disabled:t}=e;const i=i1(n);return kp(r=>{if(t||!i||!r)return Wae;const a={x:Math.sign(n.x-i.x),y:Math.sign(n.y-i.y)};return{x:{[Ri.Backward]:r.x[Ri.Backward]||a.x===-1,[Ri.Forward]:r.x[Ri.Forward]||a.x===1},y:{[Ri.Backward]:r.y[Ri.Backward]||a.y===-1,[Ri.Forward]:r.y[Ri.Forward]||a.y===1}}},[t,n,i])}function Yae(e,n){const t=n!=null?e.get(n):void 0,i=t?t.node.current:null;return kp(r=>{var a;return n==null?null:(a=i??r)!=null?a:null},[i,n])}function Kae(e,n){return x.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 bm;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(bm||(bm={}));var e4;(function(e){e.Optimized="optimized"})(e4||(e4={}));const kM=new Map;function Xae(e,n){let{dragging:t,dependencies:i,config:r}=n;const[a,o]=x.useState(null),{frequency:l,measure:u,strategy:f}=r,h=x.useRef(e),d=k(),p=gm(d),g=x.useCallback(function(_){_===void 0&&(_=[]),!p.current&&o(S=>S===null?_:S.concat(_.filter(j=>!S.includes(j))))},[p]),b=x.useRef(null),w=kp(_=>{if(d&&!t)return kM;if(!_||_===kM||h.current!==e||a!=null){const S=new Map;for(let j of e){if(!j)continue;if(a&&a.length>0&&!a.includes(j.id)&&j.rect.current){S.set(j.id,j.rect.current);continue}const T=j.node.current,A=T?new _9(u(T),T):null;j.rect.current=A,A&&S.set(j.id,A)}return S}return _},[e,a,t,d,u]);return x.useEffect(()=>{h.current=e},[e]),x.useEffect(()=>{d||g()},[t,d]),x.useEffect(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),x.useEffect(()=>{d||typeof l!="number"||b.current!==null||(b.current=setTimeout(()=>{g(),b.current=null},l))},[l,d,g,...i]),{droppableRects:w,measureDroppableContainers:g,measuringScheduled:a!=null};function k(){switch(f){case bm.Always:return!1;case bm.BeforeDragging:return t;default:return!t}}}function j9(e,n){return kp(t=>e?t||(typeof n=="function"?n(e):e):null,[n,e])}function Zae(e,n){return j9(e,n)}function Qae(e){let{callback:n,disabled:t}=e;const i=g0(n),r=x.useMemo(()=>{if(t||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(i)},[i,t]);return x.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function w0(e){let{callback:n,disabled:t}=e;const i=g0(n),r=x.useMemo(()=>{if(t||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(i)},[t]);return x.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function Jae(e){return new _9(td(e),e)}function _M(e,n,t){n===void 0&&(n=Jae);const[i,r]=x.useState(null);function a(){r(u=>{if(!e)return null;if(e.isConnected===!1){var f;return(f=u??t)!=null?f:null}const h=n(e);return JSON.stringify(u)===JSON.stringify(h)?u:h})}const o=Qae({callback(u){if(e)for(const f of u){const{type:h,target:d}=f;if(h==="childList"&&d instanceof HTMLElement&&d.contains(e)){a();break}}}}),l=w0({callback:a});return Va(()=>{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 eoe(e){const n=j9(e);return GF(e,n)}const xM=[];function noe(e){const n=x.useRef(e),t=kp(i=>e?i&&i!==xM&&e&&n.current&&e.parentNode===n.current.parentNode?i:b0(e):xM,[e]);return x.useEffect(()=>{n.current=e},[e]),t}function toe(e){const[n,t]=x.useState(null),i=x.useRef(e),r=x.useCallback(a=>{const o=Jk(a.target);o&&t(l=>l?(l.set(o,QS(o)),new Map(l)):null)},[]);return x.useEffect(()=>{const a=i.current;if(e!==a){o(a);const l=e.map(u=>{const f=Jk(u);return f?(f.addEventListener("scroll",r,{passive:!0}),[f,QS(f)]):null}).filter(u=>u!=null);t(l.length?new Map(l):null),i.current=e}return()=>{o(e),o(a)};function o(l){l.forEach(u=>{const f=Jk(u);f==null||f.removeEventListener("scroll",r)})}},[r,e]),x.useMemo(()=>e.length?n?Array.from(n.values()).reduce((a,o)=>Qc(a,o),Wa):eq(e):Wa,[e,n])}function SM(e,n){n===void 0&&(n=[]);const t=x.useRef(null);return x.useEffect(()=>{t.current=null},n),x.useEffect(()=>{const i=e!==Wa;i&&!t.current&&(t.current=e),!i&&t.current&&(t.current=null)},[e]),t.current?ym(e,t.current):Wa}function ioe(e){x.useEffect(()=>{if(!v0)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 roe(e,n){return x.useMemo(()=>e.reduce((t,i)=>{let{eventName:r,handler:a}=i;return t[r]=o=>{a(o,n)},t},{}),[e,n])}function iq(e){return x.useMemo(()=>e?Tae(e):null,[e])}const CM=[];function aoe(e,n){n===void 0&&(n=td);const[t]=e,i=iq(t?fr(t):null),[r,a]=x.useState(CM);function o(){a(()=>e.length?e.map(u=>QF(u)?i:new _9(n(u),u)):CM)}const l=w0({callback:o});return Va(()=>{l==null||l.disconnect(),o(),e.forEach(u=>l==null?void 0:l.observe(u))},[e]),r}function rq(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return wp(n)?n:e}function ooe(e){let{measure:n}=e;const[t,i]=x.useState(null),r=x.useCallback(f=>{for(const{target:h}of f)if(wp(h)){i(d=>{const p=n(h);return d?{...d,width:p.width,height:p.height}:p});break}},[n]),a=w0({callback:r}),o=x.useCallback(f=>{const h=rq(f);a==null||a.disconnect(),h&&(a==null||a.observe(h)),i(h?n(h):null)},[n,a]),[l,u]=t1(o);return x.useMemo(()=>({nodeRef:l,rect:t,setRef:u}),[t,l,u])}const soe=[{sensor:C9,options:{}},{sensor:x9,options:{}}],loe={current:{}},Ig={draggable:{measure:gM},droppable:{measure:gM,strategy:bm.WhileDragging,frequency:e4.Optimized},dragOverlay:{measure:td}};class Qh 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 uoe={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Qh,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:a1},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ig,measureDroppableContainers:a1,windowRect:null,measuringScheduled:!1},aq={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:a1,draggableNodes:new Map,over:null,measureDroppableContainers:a1},xp=x.createContext(aq),oq=x.createContext(uoe);function coe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Qh}}}function foe(e,n){switch(n.type){case Ci.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case Ci.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 Ci.DragEnd:case Ci.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ci.RegisterDroppable:{const{element:t}=n,{id:i}=t,r=new Qh(e.droppable.containers);return r.set(i,t),{...e,droppable:{...e.droppable,containers:r}}}case Ci.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 Qh(e.droppable.containers);return o.set(t,{...a,disabled:r}),{...e,droppable:{...e.droppable,containers:o}}}case Ci.UnregisterDroppable:{const{id:t,key:i}=n,r=e.droppable.containers.get(t);if(!r||i!==r.key)return e;const a=new Qh(e.droppable.containers);return a.delete(t),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function doe(e){let{disabled:n}=e;const{active:t,activatorEvent:i,draggableNodes:r}=x.useContext(xp),a=i1(i),o=i1(t==null?void 0:t.id);return x.useEffect(()=>{if(!n&&!i&&a&&o!=null){if(!y0(a)||document.activeElement===a.target)return;const l=r.get(o);if(!l)return;const{activatorNode:u,node:f}=l;if(!u.current&&!f.current)return;requestAnimationFrame(()=>{for(const h of[u.current,f.current]){if(!h)continue;const d=sae(h);if(d){d.focus();break}}})}},[i,n,r,o,a]),null}function sq(e,n){let{transform:t,...i}=n;return e!=null&&e.length?e.reduce((r,a)=>a({transform:r,...i}),t):t}function hoe(e){return x.useMemo(()=>({draggable:{...Ig.draggable,...e==null?void 0:e.draggable},droppable:{...Ig.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Ig.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 moe(e){let{activeNode:n,measure:t,initialRect:i,config:r=!0}=e;const a=x.useRef(!1),{x:o,y:l}=typeof r=="boolean"?{x:r,y:r}:r;Va(()=>{if(!o&&!l||!n){a.current=!1;return}if(a.current||!i)return;const f=n==null?void 0:n.node.current;if(!f||f.isConnected===!1)return;const h=t(f),d=GF(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=KF(f);p&&p.scrollBy({top:d.y,left:d.x})}},[n,o,l,i,t])}const k0=x.createContext({...Wa,scaleX:1,scaleY:1});var il;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(il||(il={}));const poe=x.memo(function(n){var t,i,r,a;let{id:o,accessibility:l,autoScroll:u=!0,children:f,sensors:h=soe,collisionDetection:d=WF,measuring:p,modifiers:g,...b}=n;const w=x.useReducer(foe,void 0,coe),[k,_]=w,[S,j]=hae(),[T,A]=x.useState(il.Uninitialized),O=T===il.Initialized,{draggable:{active:M,nodes:$,translate:q},droppable:{containers:P}}=k,L=M!=null?$.get(M):null,U=x.useRef({initial:null,translated:null}),G=x.useMemo(()=>{var gn;return M!=null?{id:M,data:(gn=L==null?void 0:L.data)!=null?gn:loe,rect:U}:null},[M,L]),B=x.useRef(null),[R,D]=x.useState(null),[z,H]=x.useState(null),Y=gm(b,Object.values(b)),N=_p("DndDescribedBy",o),W=x.useMemo(()=>P.getEnabled(),[P]),V=hoe(p),{droppableRects:I,measureDroppableContainers:Q,measuringScheduled:ie}=Xae(W,{dragging:O,dependencies:[q.x,q.y],config:V.droppable}),re=Yae($,M),Z=x.useMemo(()=>z?r1(z):null,[z]),le=En(),ee=Zae(re,V.draggable.measure);moe({activeNode:M!=null?$.get(M):null,config:le.layoutShiftCompensation,initialRect:ee,measure:V.draggable.measure});const se=_M(re,V.draggable.measure,ee),ke=_M(re?re.parentElement:null),te=x.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}),$e=P.getNodeFor((t=te.current.over)==null?void 0:t.id),xe=ooe({measure:V.dragOverlay.measure}),Ae=(i=xe.nodeRef.current)!=null?i:re,ze=O?(r=xe.rect)!=null?r:se:null,we=!!(xe.nodeRef.current&&xe.rect),Ce=eoe(we?null:se),Ne=iq(Ae?fr(Ae):null),he=noe(O?$e??re:null),He=aoe(he),Ye=sq(g,{transform:{x:q.x-Ce.x,y:q.y-Ce.y,scaleX:1,scaleY:1},activatorEvent:z,active:G,activeNodeRect:se,containerNodeRect:ke,draggingNodeRect:ze,over:te.current.over,overlayNodeRect:xe.rect,scrollableAncestors:he,scrollableAncestorRects:He,windowRect:Ne}),We=Z?Qc(Z,q):null,Qe=toe(he),Je=SM(Qe),oe=SM(Qe,[se]),be=Qc(Ye,Je),Ke=ze?jae(ze,Ye):null,en=G&&Ke?d({active:G,collisionRect:Ke,droppableRects:I,droppableContainers:W,pointerCoordinates:We}):null,je=UF(en,"id"),[an,pn]=x.useState(null),Dn=we?Ye:Qc(Ye,oe),bn=Sae(Dn,(a=an==null?void 0:an.rect)!=null?a:null,se),sn=x.useRef(null),nn=x.useCallback((gn,xn)=>{let{sensor:at,options:Mt}=xn;if(B.current==null)return;const qe=$.get(B.current);if(!qe)return;const Ue=gn.nativeEvent,In=new at({active:B.current,activeNode:qe,event:Ue,options:Mt,context:te,onAbort(Pn){if(!$.get(Pn))return;const{onDragAbort:on}=Y.current,ln={id:Pn};on==null||on(ln),S({type:"onDragAbort",event:ln})},onPending(Pn,rn,on,ln){if(!$.get(Pn))return;const{onDragPending:Xn}=Y.current,Lt={id:Pn,constraint:rn,initialCoordinates:on,offset:ln};Xn==null||Xn(Lt),S({type:"onDragPending",event:Lt})},onStart(Pn){const rn=B.current;if(rn==null)return;const on=$.get(rn);if(!on)return;const{onDragStart:ln}=Y.current,Kn={activatorEvent:Ue,active:{id:rn,data:on.data,rect:U}};sl.unstable_batchedUpdates(()=>{ln==null||ln(Kn),A(il.Initializing),_({type:Ci.DragStart,initialCoordinates:Pn,active:rn}),S({type:"onDragStart",event:Kn}),D(sn.current),H(Ue)})},onMove(Pn){_({type:Ci.DragMove,coordinates:Pn})},onEnd:ot(Ci.DragEnd),onCancel:ot(Ci.DragCancel)});sn.current=In;function ot(Pn){return async function(){const{active:on,collisions:ln,over:Kn,scrollAdjustedTranslate:Xn}=te.current;let Lt=null;if(on&&Xn){const{cancelDrop:Rn}=Y.current;Lt={activatorEvent:Ue,active:on,collisions:ln,delta:Xn,over:Kn},Pn===Ci.DragEnd&&typeof Rn=="function"&&await Promise.resolve(Rn(Lt))&&(Pn=Ci.DragCancel)}B.current=null,sl.unstable_batchedUpdates(()=>{_({type:Pn}),A(il.Uninitialized),pn(null),D(null),H(null),sn.current=null;const Rn=Pn===Ci.DragEnd?"onDragEnd":"onDragCancel";if(Lt){const Mn=Y.current[Rn];Mn==null||Mn(Lt),S({type:Rn,event:Lt})}})}}},[$]),$n=x.useCallback((gn,xn)=>(at,Mt)=>{const qe=at.nativeEvent,Ue=$.get(Mt);if(B.current!==null||!Ue||qe.dndKit||qe.defaultPrevented)return;const In={active:Ue};gn(at,xn.options,In)===!0&&(qe.dndKit={capturedBy:xn.sensor},B.current=Mt,nn(at,xn))},[$,nn]),De=Kae(h,$n);ioe(h),Va(()=>{se&&T===il.Initializing&&A(il.Initialized)},[se,T]),x.useEffect(()=>{const{onDragMove:gn}=Y.current,{active:xn,activatorEvent:at,collisions:Mt,over:qe}=te.current;if(!xn||!at)return;const Ue={active:xn,activatorEvent:at,collisions:Mt,delta:{x:be.x,y:be.y},over:qe};sl.unstable_batchedUpdates(()=>{gn==null||gn(Ue),S({type:"onDragMove",event:Ue})})},[be.x,be.y]),x.useEffect(()=>{const{active:gn,activatorEvent:xn,collisions:at,droppableContainers:Mt,scrollAdjustedTranslate:qe}=te.current;if(!gn||B.current==null||!xn||!qe)return;const{onDragOver:Ue}=Y.current,In=Mt.get(je),ot=In&&In.rect.current?{id:In.id,rect:In.rect.current,data:In.data,disabled:In.disabled}:null,Pn={active:gn,activatorEvent:xn,collisions:at,delta:{x:qe.x,y:qe.y},over:ot};sl.unstable_batchedUpdates(()=>{pn(ot),Ue==null||Ue(Pn),S({type:"onDragOver",event:Pn})})},[je]),Va(()=>{te.current={activatorEvent:z,active:G,activeNode:re,collisionRect:Ke,collisions:en,droppableRects:I,draggableNodes:$,draggingNode:Ae,draggingNodeRect:ze,droppableContainers:P,over:an,scrollableAncestors:he,scrollAdjustedTranslate:be},U.current={initial:ze,translated:Ke}},[G,re,en,Ke,$,Ae,ze,I,P,an,he,be]),Vae({...le,delta:q,draggingRect:Ke,pointerCoordinates:We,scrollableAncestors:he,scrollableAncestorRects:He});const Fe=x.useMemo(()=>({active:G,activeNode:re,activeNodeRect:se,activatorEvent:z,collisions:en,containerNodeRect:ke,dragOverlay:xe,draggableNodes:$,droppableContainers:P,droppableRects:I,over:an,measureDroppableContainers:Q,scrollableAncestors:he,scrollableAncestorRects:He,measuringConfiguration:V,measuringScheduled:ie,windowRect:Ne}),[G,re,se,z,en,ke,xe,$,P,I,an,Q,he,He,V,ie,Ne]),Vn=x.useMemo(()=>({activatorEvent:z,activators:De,active:G,activeNodeRect:se,ariaDescribedById:{draggable:N},dispatch:_,draggableNodes:$,over:an,measureDroppableContainers:Q}),[z,De,G,se,_,N,$,an,Q]);return J.createElement(HF.Provider,{value:j},J.createElement(xp.Provider,{value:Vn},J.createElement(oq.Provider,{value:Fe},J.createElement(k0.Provider,{value:bn},f)),J.createElement(doe,{disabled:(l==null?void 0:l.restoreFocus)===!1})),J.createElement(vae,{...l,hiddenTextDescribedById:N}));function En(){const gn=(R==null?void 0:R.autoScrollEnabled)===!1,xn=typeof u=="object"?u.enabled===!1:u===!1,at=O&&!gn&&!xn;return typeof u=="object"?{...u,enabled:at}:{enabled:at}}}),voe=x.createContext(null),jM="button",goe="Draggable";function yoe(e){let{id:n,data:t,disabled:i=!1,attributes:r}=e;const a=_p(goe),{activators:o,activatorEvent:l,active:u,activeNodeRect:f,ariaDescribedById:h,draggableNodes:d,over:p}=x.useContext(xp),{role:g=jM,roleDescription:b="draggable",tabIndex:w=0}=r??{},k=(u==null?void 0:u.id)===n,_=x.useContext(k?k0:voe),[S,j]=t1(),[T,A]=t1(),O=roe(o,n),M=gm(t);Va(()=>(d.set(n,{id:n,key:a,node:S,activatorNode:T,data:M}),()=>{const q=d.get(n);q&&q.key===a&&d.delete(n)}),[d,n]);const $=x.useMemo(()=>({role:g,tabIndex:w,"aria-disabled":i,"aria-pressed":k&&g===jM?!0:void 0,"aria-roledescription":b,"aria-describedby":h.draggable}),[i,g,w,k,b,h.draggable]);return{active:u,activatorEvent:l,activeNodeRect:f,attributes:$,isDragging:k,listeners:i?void 0:O,node:S,over:p,setNodeRef:j,setActivatorNodeRef:A,transform:_}}function lq(){return x.useContext(oq)}const boe="Droppable",woe={timeout:25};function koe(e){let{data:n,disabled:t=!1,id:i,resizeObserverConfig:r}=e;const a=_p(boe),{active:o,dispatch:l,over:u,measureDroppableContainers:f}=x.useContext(xp),h=x.useRef({disabled:t}),d=x.useRef(!1),p=x.useRef(null),g=x.useRef(null),{disabled:b,updateMeasurementsFor:w,timeout:k}={...woe,...r},_=gm(w??i),S=x.useCallback(()=>{if(!d.current){d.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{f(Array.isArray(_.current)?_.current:[_.current]),g.current=null},k)},[k]),j=w0({callback:S,disabled:b||!o}),T=x.useCallback(($,q)=>{j&&(q&&(j.unobserve(q),d.current=!1),$&&j.observe($))},[j]),[A,O]=t1(T),M=gm(n);return x.useEffect(()=>{!j||!A.current||(j.disconnect(),d.current=!1,j.observe(A.current))},[A,j]),x.useEffect(()=>(l({type:Ci.RegisterDroppable,element:{id:i,key:a,disabled:t,node:A,rect:p,data:M}}),()=>l({type:Ci.UnregisterDroppable,key:a,id:i})),[i]),x.useEffect(()=>{t!==h.current.disabled&&(l({type:Ci.SetDroppableDisabled,id:i,key:a,disabled:t}),h.current.disabled=t)},[i,a,t,l]),{active:o,rect:p,isOver:(u==null?void 0:u.id)===i,node:A,over:u,setNodeRef:O}}function _oe(e){let{animation:n,children:t}=e;const[i,r]=x.useState(null),[a,o]=x.useState(null),l=i1(t);return!t&&!i&&l&&r(l),Va(()=>{if(!a)return;const u=i==null?void 0:i.key,f=i==null?void 0:i.props.id;if(u==null||f==null){r(null);return}Promise.resolve(n(f,a)).then(()=>{r(null)})},[n,i,a]),J.createElement(J.Fragment,null,t,i?x.cloneElement(i,{ref:o}):null)}const xoe={x:0,y:0,scaleX:1,scaleY:1};function Soe(e){let{children:n}=e;return J.createElement(xp.Provider,{value:aq},J.createElement(k0.Provider,{value:xoe},n))}const Coe={position:"fixed",touchAction:"none"},joe=e=>y0(e)?"transform 250ms ease":void 0,Aoe=x.forwardRef((e,n)=>{let{as:t,activatorEvent:i,adjustScale:r,children:a,className:o,rect:l,style:u,transform:f,transition:h=joe}=e;if(!l)return null;const d=r?f:{...f,scaleX:1,scaleY:1},p={...Coe,width:l.width,height:l.height,top:l.top,left:l.left,transform:po.Transform.toString(d),transformOrigin:r&&i?yae(i,l):void 0,transition:typeof h=="function"?h(i):h,...u};return J.createElement(t,{className:o,style:p,ref:n},a)}),Ooe=e=>n=>{let{active:t,dragOverlay:i}=n;const r={},{styles:a,className:o}=e;if(a!=null&&a.active)for(const[l,u]of Object.entries(a.active))u!==void 0&&(r[l]=t.node.style.getPropertyValue(l),t.node.style.setProperty(l,u));if(a!=null&&a.dragOverlay)for(const[l,u]of Object.entries(a.dragOverlay))u!==void 0&&i.node.style.setProperty(l,u);return o!=null&&o.active&&t.node.classList.add(o.active),o!=null&&o.dragOverlay&&i.node.classList.add(o.dragOverlay),function(){for(const[u,f]of Object.entries(r))t.node.style.setProperty(u,f);o!=null&&o.active&&t.node.classList.remove(o.active)}},Toe=e=>{let{transform:{initial:n,final:t}}=e;return[{transform:po.Transform.toString(n)},{transform:po.Transform.toString(t)}]},Eoe={duration:250,easing:"ease",keyframes:Toe,sideEffects:Ooe({styles:{active:{opacity:"0"}}})};function Moe(e){let{config:n,draggableNodes:t,droppableContainers:i,measuringConfiguration:r}=e;return g0((a,o)=>{if(n===null)return;const l=t.get(a);if(!l)return;const u=l.node.current;if(!u)return;const f=rq(o);if(!f)return;const{transform:h}=fr(o).getComputedStyle(o),d=YF(h);if(!d)return;const p=typeof n=="function"?n:Doe(n);return nq(u,r.draggable.measure),p({active:{id:a,data:l.data,node:u,rect:r.draggable.measure(u)},draggableNodes:t,dragOverlay:{node:o,rect:r.dragOverlay.measure(f)},droppableContainers:i,measuringConfiguration:r,transform:d})})}function Doe(e){const{duration:n,easing:t,sideEffects:i,keyframes:r}={...Eoe,...e};return a=>{let{active:o,dragOverlay:l,transform:u,...f}=a;if(!n)return;const h={x:l.rect.left-o.rect.left,y:l.rect.top-o.rect.top},d={scaleX:u.scaleX!==1?o.rect.width*u.scaleX/l.rect.width:1,scaleY:u.scaleY!==1?o.rect.height*u.scaleY/l.rect.height:1},p={x:u.x-h.x,y:u.y-h.y,...d},g=r({...f,active:o,dragOverlay:l,transform:{initial:u,final:p}}),[b]=g,w=g[g.length-1];if(JSON.stringify(b)===JSON.stringify(w))return;const k=i==null?void 0:i({active:o,dragOverlay:l,...f}),_=l.node.animate(g,{duration:n,easing:t,fill:"forwards"});return new Promise(S=>{_.onfinish=()=>{k==null||k(),S()}})}}let AM=0;function Roe(e){return x.useMemo(()=>{if(e!=null)return AM++,AM},[e])}const Poe=J.memo(e=>{let{adjustScale:n=!1,children:t,dropAnimation:i,style:r,transition:a,modifiers:o,wrapperElement:l="div",className:u,zIndex:f=999}=e;const{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:g,draggableNodes:b,droppableContainers:w,dragOverlay:k,over:_,measuringConfiguration:S,scrollableAncestors:j,scrollableAncestorRects:T,windowRect:A}=lq(),O=x.useContext(k0),M=Roe(d==null?void 0:d.id),$=sq(o,{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:g,draggingNodeRect:k.rect,over:_,overlayNodeRect:k.rect,scrollableAncestors:j,scrollableAncestorRects:T,transform:O,windowRect:A}),q=j9(p),P=Moe({config:i,draggableNodes:b,droppableContainers:w,measuringConfiguration:S}),L=q?k.setRef:void 0;return J.createElement(Soe,null,J.createElement(_oe,{animation:P},d&&M?J.createElement(Aoe,{key:M,id:d.id,ref:L,as:l,activatorEvent:h,adjustScale:n,className:u,transition:a,rect:q,style:{zIndex:f,...r},transform:$},t):null))});function s1(e,n,t){const i=e.slice();return i.splice(t<0?i.length+t:t,0,i.splice(n,1)[0]),i}function Noe(e,n){return e.reduce((t,i,r)=>{const a=n.get(i);return a&&(t[r]=a),t},Array(e.length))}function ag(e){return e!==null&&e>=0}function $oe(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 u=Ioe(t,o,r);if(o===r){const f=t[a];return f?{x:rr&&o<=a?{x:-l.width-u,y:0,...og}:o=a?{x:l.width+u,y:0,...og}:{x:0,y:0,...og}};function Ioe(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=s1(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}},sg={scaleX:1,scaleY:1},cq=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 f=a[o];return f?{x:0,y:tt&&r<=o?{x:0,y:-l.height-u,...sg}:r=o?{x:0,y:l.height+u,...sg}:{x:0,y:0,...sg}};function Boe(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?g.indexOf(o.id):-1,k=f?g.indexOf(f.id):-1,_=x.useRef(g),S=!$oe(g,_.current),j=k!==-1&&w===-1||S,T=zoe(a);Va(()=>{S&&b&&h(g)},[S,g,b,h]),x.useEffect(()=>{_.current=g},[g]);const A=x.useMemo(()=>({activeIndex:w,containerId:d,disabled:T,disableTransforms:j,items:g,overIndex:k,useDragOverlay:p,sortedRects:Noe(g,u),strategy:r}),[w,d,T.draggable,T.droppable,j,g,k,u,p,r]);return J.createElement(dq.Provider,{value:A},n)}const Foe=e=>{let{id:n,items:t,activeIndex:i,overIndex:r}=e;return s1(t,i,r).indexOf(n)},qoe=e=>{let{containerId:n,isSorting:t,wasDragging:i,index:r,items:a,newIndex:o,previousItems:l,previousContainerId:u,transition:f}=e;return!f||!i||l!==a&&r===o?!1:t?!0:o!==r&&n===u},Hoe={duration:200,easing:"ease"},hq="transform",Uoe=po.Transition.toString({property:hq,duration:0,easing:"linear"}),Voe={roleDescription:"sortable"};function Woe(e){let{disabled:n,index:t,node:i,rect:r}=e;const[a,o]=x.useState(null),l=x.useRef(t);return Va(()=>{if(!n&&t!==l.current&&i.current){const u=r.current;if(u){const f=td(i.current,{ignoreTransform:!0}),h={x:u.left-f.left,y:u.top-f.top,scaleX:u.width/f.width,scaleY:u.height/f.height};(h.x||h.y)&&o(h)}}t!==l.current&&(l.current=t)},[n,t,i,r]),x.useEffect(()=>{a&&o(null)},[a]),a}function mq(e){let{animateLayoutChanges:n=qoe,attributes:t,disabled:i,data:r,getNewIndex:a=Foe,id:o,strategy:l,resizeObserverConfig:u,transition:f=Hoe}=e;const{items:h,containerId:d,activeIndex:p,disabled:g,disableTransforms:b,sortedRects:w,overIndex:k,useDragOverlay:_,strategy:S}=x.useContext(dq),j=Goe(i,g),T=h.indexOf(o),A=x.useMemo(()=>({sortable:{containerId:d,index:T,items:h},...r}),[d,r,T,h]),O=x.useMemo(()=>h.slice(h.indexOf(o)),[h,o]),{rect:M,node:$,isOver:q,setNodeRef:P}=koe({id:o,data:A,disabled:j.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...u}}),{active:L,activatorEvent:U,activeNodeRect:G,attributes:B,setNodeRef:R,listeners:D,isDragging:z,over:H,setActivatorNodeRef:Y,transform:N}=yoe({id:o,data:A,attributes:{...Voe,...t},disabled:j.draggable}),W=iae(P,R),V=!!L,I=V&&!b&&ag(p)&&ag(k),Q=!_&&z,ie=Q&&I?N:null,Z=I?ie??(l??S)({rects:w,activeNodeRect:G,activeIndex:p,overIndex:k,index:T}):null,le=ag(p)&&ag(k)?a({id:o,items:h,activeIndex:p,overIndex:k}):T,ee=L==null?void 0:L.id,se=x.useRef({activeId:ee,items:h,newIndex:le,containerId:d}),ke=h!==se.current.items,te=n({active:L,containerId:d,isDragging:z,isSorting:V,id:o,index:T,items:h,newIndex:se.current.newIndex,previousItems:se.current.items,previousContainerId:se.current.containerId,transition:f,wasDragging:se.current.activeId!=null}),$e=Woe({disabled:!te,index:T,node:$,rect:M});return x.useEffect(()=>{V&&se.current.newIndex!==le&&(se.current.newIndex=le),d!==se.current.containerId&&(se.current.containerId=d),h!==se.current.items&&(se.current.items=h)},[V,le,d,h]),x.useEffect(()=>{if(ee===se.current.activeId)return;if(ee!=null&&se.current.activeId==null){se.current.activeId=ee;return}const Ae=setTimeout(()=>{se.current.activeId=ee},50);return()=>clearTimeout(Ae)},[ee]),{active:L,activeIndex:p,attributes:B,data:A,rect:M,index:T,newIndex:le,items:h,isOver:q,isSorting:V,isDragging:z,listeners:D,node:$,overIndex:k,over:H,setNodeRef:W,setActivatorNodeRef:Y,setDroppableNodeRef:P,setDraggableNodeRef:R,transform:$e??Z,transition:xe()};function xe(){if($e||ke&&se.current.newIndex===T)return Uoe;if(!(Q&&!y0(U)||!f)&&(V||te))return po.Transition.toString({...f,property:hq})}}function Goe(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 l1(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 Yoe=[ct.Down,ct.Right,ct.Up,ct.Left],Koe=(e,n)=>{let{context:{active:t,collisionRect:i,droppableRects:r,droppableContainers:a,over:o,scrollableAncestors:l}}=n;if(Yoe.includes(e.code)){if(e.preventDefault(),!t||!i)return;const u=[];a.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const p=r.get(d.id);if(p)switch(e.code){case ct.Down:i.topp.top&&u.push(d);break;case ct.Left:i.left>p.left&&u.push(d);break;case ct.Right:i.left1&&(h=f[1].id),h!=null){const d=a.get(t.id),p=a.get(h),g=p?r.get(p.id):null,b=p==null?void 0:p.node.current;if(b&&g&&d&&p){const k=b0(b).some((O,M)=>l[M]!==O),_=pq(d,p),S=Xoe(d,p),j=k||!_?{x:0,y:0}:{x:S?i.width-g.width:0,y:S?i.height-g.height:0},T={x:g.left,y:g.top};return j.x&&j.y?T:ym(T,j)}}}};function pq(e,n){return!l1(e)||!l1(n)?!1:e.data.current.sortable.containerId===n.data.current.sortable.containerId}function Xoe(e,n){return!l1(e)||!l1(n)||!pq(e,n)?!1:e.data.current.sortable.index=R?B:""+Array(R+1-z.length).join(D)+B},T={s:j,z:function(B){var R=-B.utcOffset(),D=Math.abs(R),z=Math.floor(D/60),H=D%60;return(R<=0?"+":"-")+j(z,2,"0")+":"+j(H,2,"0")},m:function B(R,D){if(R.date()1)return B(N[0])}else{var W=R.name;O[W]=R,H=W}return!z&&H&&(A=H),H||!z&&A},P=function(B,R){if($(B))return B.clone();var D=typeof R=="object"?R:{};return D.date=B,D.args=arguments,new U(D)},L=T;L.l=q,L.i=$,L.w=function(B,R){return P(B,{locale:R.$L,utc:R.$u,x:R.$x,$offset:R.$offset})};var U=(function(){function B(D){this.$L=q(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[M]=!0}var R=B.prototype;return R.parse=function(D){this.$d=(function(z){var H=z.date,Y=z.utc;if(H===null)return new Date(NaN);if(L.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var N=H.match(k);if(N){var W=N[2]-1||0,V=(N[7]||"0").substring(0,3);return Y?new Date(Date.UTC(N[1],W,N[3]||1,N[4]||0,N[5]||0,N[6]||0,V)):new Date(N[1],W,N[3]||1,N[4]||0,N[5]||0,N[6]||0,V)}}return new Date(H)})(D),this.init()},R.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()},R.$utils=function(){return L},R.isValid=function(){return this.$d.toString()!==w},R.isSame=function(D,z){var H=P(D);return this.startOf(z)<=H&&H<=this.endOf(z)},R.isAfter=function(D,z){return P(D)Be(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 nse({formatter:e,...n}){return(e||ese)(n)}function tse({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 vq({controlsRef:e,direction:n,levelIndex:t,rowIndex:i,cellIndex:r,size:a}){var u,f,h;const o=tse({direction:n,size:a,rowIndex:i,cellIndex:r,levelIndex:t});if(!o)return;const l=(h=(f=(u=e.current)==null?void 0:u[o.levelIndex])==null?void 0:f[o.rowIndex])==null?void 0:h[o.cellIndex];l&&(l.disabled||l.getAttribute("data-hidden")||l.getAttribute("data-outside")?vq({controlsRef:e,direction:n,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):l.focus())}function ise(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function rse(e){var n;return(n=e.current)==null?void 0:n.map(t=>t.map(i=>i.length))}function A9({controlsRef:e,levelIndex:n,rowIndex:t,cellIndex:i,event:r}){const a=ise(r.key);a&&(r.preventDefault(),vq({controlsRef:e,direction:a,levelIndex:n,rowIndex:t,cellIndex:i,size:rse(e)}))}function Ji(e){return e==null||e===""?e:Be(e).format("YYYY-MM-DD")}function gq(e){return e==null||e===""?e:Be(e).format("YYYY-MM-DD HH:mm:ss")}function t4({minDate:e,maxDate:n}){const t=Be();return!e&&!n?Ji(t):e&&Be(t).isBefore(e)?Ji(e):n&&Be(t).isAfter(n)?Ji(n):Ji(t)}const ase={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},ose=x.createContext(ase);function Ml(){const e=x.use(ose),n=x.useCallback(a=>a||e.locale,[e.locale]),t=x.useCallback(a=>typeof a=="number"?a:e.firstDayOfWeek,[e.firstDayOfWeek]),i=x.useCallback(a=>Array.isArray(a)?a:e.weekendDays,[e.weekendDays]),r=x.useCallback(a=>typeof a=="string"?a:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:n,getFirstDayOfWeek:t,getWeekendDays:i,getLabelSeparator:r}}function sse({value:e,type:n,withTime:t}){const i=t?gq:Ji;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 yq({value:e,type:n,name:t,form:i,withTime:r=!1}){return v.jsx("input",{type:"hidden",value:sse({value:e,type:n,withTime:r}),name:t,form:i})}yq.displayName="@mantine/dates/HiddenDatesInput";var bq={day:"m_396ce5cb"};const wq=(e,{size:n})=>({day:{"--day-size":Ln(n,"day-size")}}),_0=Pe(e=>{const n=ye("Day",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,date:u,disabled:f,__staticSelector:h,weekend:d,outside:p,selected:g,renderDay:b,inRange:w,firstInRange:k,lastInRange:_,hidden:S,static:j,highlightToday:T,fullWidth:A,attributes:O,...M}=n;return v.jsx(Et,{...Ze({name:h||"Day",classes:bq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:O,vars:l,varsResolver:wq,rootSelector:"day"})("day",{style:S?{display:"none"}:void 0}),component:j?"div":"button",disabled:f,"data-today":Be(u).isSame(new Date,"day")||void 0,"data-hidden":S||void 0,"data-highlight-today":T||void 0,"data-disabled":f||void 0,"data-weekend":!f&&!p&&d||void 0,"data-outside":!f&&p||void 0,"data-selected":!f&&g||void 0,"data-in-range":w&&!f||void 0,"data-first-in-range":k&&!f||void 0,"data-last-in-range":_&&!f||void 0,"data-static":j||void 0,"data-full-width":A||void 0,unstyled:o,...M,children:(b==null?void 0:b(u))||Be(u).date()})});_0.classes=bq;_0.varsResolver=wq;_0.displayName="@mantine/dates/Day";function lse({locale:e,format:n="dd",firstDayOfWeek:t=1}){const i=Be().day(t),r=[];for(let a=0;a<7;a+=1)typeof n=="string"?r.push(Be(i).add(a,"days").locale(e).format(n)):r.push(n(Be(i).add(a,"days").format("YYYY-MM-DD")));return r}var kq={weekday:"m_18a3eca"};const _q=(e,{size:n})=>({weekdaysRow:{"--wr-fz":ai(n),"--wr-spacing":Yt(n)}}),x0=Pe(e=>{const n=ye("WeekdaysRow",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,locale:u,firstDayOfWeek:f,weekdayFormat:h,cellComponent:d="th",__staticSelector:p,withWeekNumbers:g,attributes:b,...w}=n,k=Ze({name:p||"WeekdaysRow",classes:kq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l,varsResolver:_q,rootSelector:"weekdaysRow"}),_=Ml(),S=lse({locale:_.getLocale(u),format:h,firstDayOfWeek:_.getFirstDayOfWeek(f)}).map((j,T)=>v.jsx(d,{...k("weekday"),children:j},T));return v.jsxs(fe,{component:"tr",...k("weekdaysRow"),...w,children:[g&&v.jsx(d,{...k("weekday"),children:"#"}),S]})});x0.classes=kq;x0.varsResolver=_q;x0.displayName="@mantine/dates/WeekdaysRow";function use(e,n=1){let t=Be(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 cse(e,n=1){let t=Be(e);for(;t.day()!==n;)t=t.subtract(1,"day");return t.format("YYYY-MM-DD")}function fse({month:e,firstDayOfWeek:n=1,consistentWeeks:t}){const i=Be(Be(e).subtract(Be(e).date()-1,"day").format("YYYY-M-D")),r=i.format("YYYY-MM-DD"),a=use(i.add(+i.daysInMonth()-1,"day").format("YYYY-MM-DD"),n),o=[];let l=Be(cse(r,n));for(;Be(l).isBefore(a,"day");){const u=[];for(let f=0;f<7;f+=1)u.push(l.format("YYYY-MM-DD")),l=l.add(1,"day");o.push(u)}if(t&&o.length<6){const u=o[o.length-1],f=u[u.length-1];let h=Be(f).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 O9(e,n){return Be(e).format("YYYY-MM")===Be(n).format("YYYY-MM")}function xq(e,n){return n?Be(e).isAfter(Be(n).subtract(1,"day"),"day"):!0}function Sq(e,n){return n?Be(e).isBefore(Be(n).add(1,"day"),"day"):!0}function dse({dates:e,minDate:n,maxDate:t,getDayProps:i,excludeDate:r,hideOutsideDates:a,month:o}){const l=e.flat().filter(h=>{var d;return Sq(h,t)&&xq(h,n)&&!(r!=null&&r(h))&&!((d=i==null?void 0:i(h))!=null&&d.disabled)&&(!a||O9(h,o))}),u=l.find(h=>{var d;return(d=i==null?void 0:i(h))==null?void 0:d.selected});if(u)return u;const f=l.find(h=>Be().isSame(h,"date"));return f||l[0]}var Fg={exports:{}},hse=Fg.exports,TM;function mse(){return TM||(TM=1,(function(e,n){(function(t,i){e.exports=i()})(hse,(function(){var t="day";return function(i,r,a){var o=function(f){return f.add(4-f.isoWeekday(),t)},l=r.prototype;l.isoWeekYear=function(){return o(this).year()},l.isoWeek=function(f){if(!this.$utils().u(f))return this.add(7*(f-this.isoWeek()),t);var h,d,p,g,b=o(this),w=(h=this.isoWeekYear(),d=this.$u,p=(d?a.utc:a)().year(h).startOf("year"),g=4-p.isoWeekday(),p.isoWeekday()>4&&(g+=7),p.add(g,t));return b.diff(w,"week")+1},l.isoWeekday=function(f){return this.$utils().u(f)?this.day()||7:this.day(this.day()%7?f:f-7)};var u=l.startOf;l.startOf=function(f,h){var d=this.$utils(),p=!!d.u(h)||h;return d.p(f)==="isoweek"?p?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):u.bind(this)(f,h)}}}))})(Fg)),Fg.exports}var pse=mse();const vse=yt(pse);Be.extend(vse);function gse(e){return Be(e.find(n=>Be(n).day()===1)).isoWeek()}var Cq={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const yse={withCellSpacing:!0},jq=(e,{size:n})=>({weekNumber:{"--wn-fz":ai(n),"--wn-size":Ln(n,"wn-size")}}),Sp=Pe(e=>{const n=ye("Month",yse,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:u,locale:f,firstDayOfWeek:h,weekdayFormat:d,month:p,weekendDays:g,getDayProps:b,excludeDate:w,minDate:k,maxDate:_,renderDay:S,hideOutsideDates:j,hideWeekdays:T,getDayAriaLabel:A,static:O,__getDayRef:M,__onDayKeyDown:$,__onDayClick:q,__onDayMouseEnter:P,__preventFocus:L,__stopPropagation:U,withCellSpacing:G,size:B,highlightToday:R,withWeekNumbers:D,fullWidth:z,attributes:H,...Y}=n,N=Ze({name:u||"Month",classes:Cq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:H,vars:l,varsResolver:jq,rootSelector:"month"}),W=Ml(),V=fse({month:p,firstDayOfWeek:W.getFirstDayOfWeek(h),consistentWeeks:W.consistentWeeks}),I=dse({dates:V,minDate:Ji(k),maxDate:Ji(_),getDayProps:b,excludeDate:w,hideOutsideDates:j,month:p}),{resolvedClassNames:Q,resolvedStyles:ie}=Wi({classNames:t,styles:a,props:n}),re=V.map((Z,le)=>{const ee=Z.map((se,ke)=>{const te=!O9(se,p),$e=(A==null?void 0:A(se))||Be(se).locale(f||W.locale).format("D MMMM YYYY"),xe=b==null?void 0:b(se),Ae=Be(se).isSame(I,"date");return v.jsx("td",{...N("monthCell"),"data-with-spacing":G||void 0,children:v.jsx(_0,{__staticSelector:u||"Month",classNames:Q,styles:ie,attributes:H,unstyled:o,"data-mantine-stop-propagation":U||void 0,highlightToday:R,renderDay:S,date:se,size:B,weekend:W.getWeekendDays(g).includes(Be(se).get("day")),outside:te,hidden:j?te:!1,"aria-label":$e,static:O,fullWidth:z,disabled:(w==null?void 0:w(se))||!Sq(se,Ji(_))||!xq(se,Ji(k)),ref:ze=>{ze&&(M==null||M(le,ke,ze))},...xe,onKeyDown:ze=>{var we;(we=xe==null?void 0:xe.onKeyDown)==null||we.call(xe,ze),$==null||$(ze,{rowIndex:le,cellIndex:ke,date:se})},onMouseEnter:ze=>{var we;(we=xe==null?void 0:xe.onMouseEnter)==null||we.call(xe,ze),P==null||P(ze,se)},onClick:ze=>{var we;(we=xe==null?void 0:xe.onClick)==null||we.call(xe,ze),q==null||q(ze,se)},onMouseDown:ze=>{var we;(we=xe==null?void 0:xe.onMouseDown)==null||we.call(xe,ze),L&&ze.preventDefault()},tabIndex:L||!Ae?-1:0})},se.toString())});return v.jsxs("tr",{...N("monthRow"),children:[D&&v.jsx("td",{...N("weekNumber"),children:gse(Z)}),ee]},le)});return v.jsxs(fe,{component:"table",...N("month"),size:B,"data-full-width":z||void 0,...Y,children:[!T&&v.jsx("thead",{...N("monthThead"),children:v.jsx(x0,{__staticSelector:u||"Month",locale:f,firstDayOfWeek:h,weekdayFormat:d,withWeekNumbers:D,size:B,classNames:Q,styles:ie,unstyled:o,attributes:H})}),v.jsx("tbody",{...N("monthTbody"),children:re})]})});Sp.classes=Cq;Sp.varsResolver=jq;Sp.displayName="@mantine/dates/Month";var Aq={pickerControl:"m_dc6a3c71"};const Oq=(e,{size:n})=>({pickerControl:{"--dpc-fz":ai(n),"--dpc-size":Ln(n,"dpc-size")}}),Cp=Pe(e=>{const n=ye("PickerControl",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,firstInRange:u,lastInRange:f,inRange:h,__staticSelector:d,selected:p,disabled:g,fullWidth:b,attributes:w,...k}=n;return v.jsx(Et,{...Ze({name:d||"PickerControl",classes:Aq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:Oq,rootSelector:"pickerControl"})("pickerControl"),unstyled:o,"data-picker-control":!0,"data-full-width":b||void 0,"data-selected":p&&!g||void 0,"data-disabled":g||void 0,"data-in-range":h&&!g&&!p||void 0,"data-first-in-range":u&&!g||void 0,"data-last-in-range":f&&!g||void 0,disabled:g,...k})});Cp.classes=Aq;Cp.varsResolver=Oq;Cp.displayName="@mantine/dates/PickerControl";function Tq({year:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&Be(e).isBefore(n,"year")||t&&Be(e).isAfter(t,"year"))}function bse({years:e,minDate:n,maxDate:t,getYearControlProps:i}){const r=e.flat().filter(l=>{var u;return!Tq({year:l,minDate:n,maxDate:t})&&!((u=i==null?void 0:i(l))!=null&&u.disabled)}),a=r.find(l=>{var u;return(u=i==null?void 0:i(l))==null?void 0:u.selected});if(a)return a;const o=r.find(l=>Be().isSame(l,"year"));return o||r[0]}function Eq(e){const n=Be(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=ye("YearsList",wse,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,decade:u,yearsListFormat:f,locale:h,minDate:d,maxDate:p,getYearControlProps:g,__staticSelector:b,__getControlRef:w,__onControlKeyDown:k,__onControlClick:_,__onControlMouseEnter:S,__preventFocus:j,__stopPropagation:T,withCellSpacing:A,fullWidth:O,size:M,attributes:$,...q}=n,P=Ze({name:b||"YearsList",classes:Mq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:$,vars:l,rootSelector:"yearsList"}),L=Ml(),U=Eq(u),G=bse({years:U,minDate:d,maxDate:p,getYearControlProps:g}),B=U.map((R,D)=>{const z=R.map((H,Y)=>{const N=g==null?void 0:g(H),W=Be(H).isSame(G,"year");return v.jsx("td",{...P("yearsListCell"),"data-with-spacing":A||void 0,children:v.jsx(Cp,{...P("yearsListControl"),size:M,unstyled:o,fullWidth:O,"data-mantine-stop-propagation":T||void 0,disabled:Tq({year:H,minDate:d,maxDate:p}),ref:V=>{V&&(w==null||w(D,Y,V))},...N,onKeyDown:V=>{var I;(I=N==null?void 0:N.onKeyDown)==null||I.call(N,V),k==null||k(V,{rowIndex:D,cellIndex:Y,date:H})},onClick:V=>{var I;(I=N==null?void 0:N.onClick)==null||I.call(N,V),_==null||_(V,H)},onMouseEnter:V=>{var I;(I=N==null?void 0:N.onMouseEnter)==null||I.call(N,V),S==null||S(V,H)},onMouseDown:V=>{var I;(I=N==null?void 0:N.onMouseDown)==null||I.call(N,V),j&&V.preventDefault()},tabIndex:j||!W?-1:0,children:(N==null?void 0:N.children)??Be(H).locale(L.getLocale(h)).format(f)})},Y)});return v.jsx("tr",{...P("yearsListRow"),children:z},D)});return v.jsx(fe,{component:"table",size:M,...P("yearsList"),"data-full-width":O||void 0,...q,children:v.jsx("tbody",{children:B})})});S0.classes=Mq;S0.displayName="@mantine/dates/YearsList";function Dq({month:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&Be(e).isBefore(n,"month")||t&&Be(e).isAfter(t,"month"))}function kse({months:e,minDate:n,maxDate:t,getMonthControlProps:i}){const r=e.flat().filter(l=>{var u;return!Dq({month:l,minDate:n,maxDate:t})&&!((u=i==null?void 0:i(l))!=null&&u.disabled)}),a=r.find(l=>{var u;return(u=i==null?void 0:i(l))==null?void 0:u.selected});if(a)return a;const o=r.find(l=>Be().isSame(l,"month"));return o||r[0]}function _se(e){const n=Be(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(Be(n).add(i,"months").format("YYYY-MM-DD")),i+=1;return t}var Rq={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const xse={monthsListFormat:"MMM",withCellSpacing:!0},C0=Pe(e=>{const n=ye("MonthsList",xse,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:u,year:f,monthsListFormat:h,locale:d,minDate:p,maxDate:g,getMonthControlProps:b,__getControlRef:w,__onControlKeyDown:k,__onControlClick:_,__onControlMouseEnter:S,__preventFocus:j,__stopPropagation:T,withCellSpacing:A,fullWidth:O,size:M,attributes:$,...q}=n,P=Ze({name:u||"MonthsList",classes:Rq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:$,vars:l,rootSelector:"monthsList"}),L=Ml(),U=_se(f),G=kse({months:U,minDate:Ji(p),maxDate:Ji(g),getMonthControlProps:b}),B=U.map((R,D)=>{const z=R.map((H,Y)=>{const N=b==null?void 0:b(H),W=Be(H).isSame(G,"month");return v.jsx("td",{...P("monthsListCell"),"data-with-spacing":A||void 0,children:v.jsx(Cp,{...P("monthsListControl"),size:M,unstyled:o,fullWidth:O,__staticSelector:u||"MonthsList","data-mantine-stop-propagation":T||void 0,disabled:Dq({month:H,minDate:Ji(p),maxDate:Ji(g)}),ref:V=>{V&&(w==null||w(D,Y,V))},...N,onKeyDown:V=>{var I;(I=N==null?void 0:N.onKeyDown)==null||I.call(N,V),k==null||k(V,{rowIndex:D,cellIndex:Y,date:H})},onClick:V=>{var I;(I=N==null?void 0:N.onClick)==null||I.call(N,V),_==null||_(V,H)},onMouseEnter:V=>{var I;(I=N==null?void 0:N.onMouseEnter)==null||I.call(N,V),S==null||S(V,H)},onMouseDown:V=>{var I;(I=N==null?void 0:N.onMouseDown)==null||I.call(N,V),j&&V.preventDefault()},tabIndex:j||!W?-1:0,children:(N==null?void 0:N.children)??Be(H).locale(L.getLocale(d)).format(h)})},Y)});return v.jsx("tr",{...P("monthsListRow"),children:z},D)});return v.jsx(fe,{component:"table",size:M,...P("monthsList"),"data-full-width":O||void 0,...q,children:v.jsx("tbody",{children:B})})});C0.classes=Rq;C0.displayName="@mantine/dates/MonthsList";var Pq={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const Sse={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:["previous","level","next"]},Nq=(e,{size:n})=>({calendarHeader:{"--dch-control-size":Ln(n,"dch-control-size"),"--dch-fz":ai(n)}}),ws=Pe(e=>{const n=ye("CalendarHeader",Sse,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,nextIcon:u,previousIcon:f,nextLabel:h,previousLabel:d,onNext:p,onPrevious:g,onLevelClick:b,label:w,nextDisabled:k,previousDisabled:_,hasNextLevel:S,levelControlAriaLabel:j,withNext:T,withPrevious:A,headerControlsOrder:O,fullWidth:M,__staticSelector:$,__preventFocus:q,__stopPropagation:P,attributes:L,...U}=n,G=Ze({name:$||"CalendarHeader",classes:Pq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:L,vars:l,varsResolver:Nq,rootSelector:"calendarHeader"}),B=q?Y=>Y.preventDefault():void 0,R=A&&x.createElement(Et,{...G("calendarHeaderControl"),key:"previous","data-direction":"previous","aria-label":d,onClick:g,unstyled:o,onMouseDown:B,disabled:_,"data-disabled":_||void 0,tabIndex:q||_?-1:0,"data-mantine-stop-propagation":P||void 0},f||v.jsx(e1,{...G("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})),D=x.createElement(Et,{component:S?"button":"div",...G("calendarHeaderLevel"),key:"level",onClick:S?b:void 0,unstyled:o,onMouseDown:S?B:void 0,disabled:!S,"data-static":!S||void 0,"aria-label":j,tabIndex:q||!S?-1:0,"data-mantine-stop-propagation":P||void 0},w),z=T&&x.createElement(Et,{...G("calendarHeaderControl"),key:"next","data-direction":"next","aria-label":h,onClick:p,unstyled:o,onMouseDown:B,disabled:k,"data-disabled":k||void 0,tabIndex:q||k?-1:0,"data-mantine-stop-propagation":P||void 0},u||v.jsx(e1,{...G("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})),H=O.map(Y=>Y==="previous"?R:Y==="level"?D:Y==="next"?z:null);return v.jsx(fe,{...G("calendarHeader"),"data-full-width":M||void 0,...U,children:H})});ws.classes=Pq;ws.varsResolver=Nq;ws.displayName="@mantine/dates/CalendarHeader";function Cse(e){const n=Eq(e);return[n[0][0],n[3][0]]}const jse={decadeLabelFormat:"YYYY"},j0=Pe(e=>{const{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:u,__onControlClick:f,__onControlMouseEnter:h,withCellSpacing:d,__preventFocus:p,nextIcon:g,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:S,nextDisabled:j,previousDisabled:T,levelControlAriaLabel:A,withNext:O,withPrevious:M,headerControlsOrder:$,decadeLabelFormat:q,classNames:P,styles:L,unstyled:U,__staticSelector:G,__stopPropagation:B,size:R,fullWidth:D,attributes:z,...H}=ye("DecadeLevel",jse,e),Y=Ml(),[N,W]=Cse(n),V={__staticSelector:G||"DecadeLevel",classNames:P,styles:L,unstyled:U,size:R,attributes:z},I=typeof j=="boolean"?j:r?!Be(W).endOf("year").isBefore(r):!1,Q=typeof T=="boolean"?T:i?!Be(N).startOf("year").isAfter(i):!1,ie=(re,Z)=>Be(re).locale(t||Y.locale).format(Z);return v.jsxs(fe,{"data-decade-level":!0,size:R,...H,children:[v.jsx(ws,{label:typeof q=="function"?q(N,W):`${ie(N,q)} – ${ie(W,q)}`,__preventFocus:p,__stopPropagation:B,nextIcon:g,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:S,nextDisabled:I,previousDisabled:Q,hasNextLevel:!1,levelControlAriaLabel:A,withNext:O,withPrevious:M,headerControlsOrder:$,fullWidth:D,...V}),v.jsx(S0,{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:u,__onControlClick:f,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:B,withCellSpacing:d,fullWidth:D,...V})]})});j0.classes={...S0.classes,...ws.classes};j0.displayName="@mantine/dates/DecadeLevel";const Ase={yearLabelFormat:"YYYY"},A0=Pe(e=>{const{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:u,__onControlClick:f,__onControlMouseEnter:h,withCellSpacing:d,__preventFocus:p,nextIcon:g,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:S,onLevelClick:j,nextDisabled:T,previousDisabled:A,hasNextLevel:O,levelControlAriaLabel:M,withNext:$,withPrevious:q,headerControlsOrder:P,yearLabelFormat:L,__staticSelector:U,__stopPropagation:G,size:B,classNames:R,styles:D,unstyled:z,fullWidth:H,attributes:Y,...N}=ye("YearLevel",Ase,e),W=Ml(),V={__staticSelector:U||"YearLevel",classNames:R,styles:D,unstyled:z,size:B,attributes:Y},I=typeof T=="boolean"?T:r?!Be(n).endOf("year").isBefore(r):!1,Q=typeof A=="boolean"?A:i?!Be(n).startOf("year").isAfter(i):!1;return v.jsxs(fe,{"data-year-level":!0,size:B,...N,children:[v.jsx(ws,{label:typeof L=="function"?L(n):Be(n).locale(t||W.locale).format(L),__preventFocus:p,__stopPropagation:G,nextIcon:g,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:S,onLevelClick:j,nextDisabled:I,previousDisabled:Q,hasNextLevel:O,levelControlAriaLabel:M,withNext:$,withPrevious:q,headerControlsOrder:P,fullWidth:H,...V}),v.jsx(C0,{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:u,__onControlClick:f,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:G,withCellSpacing:d,fullWidth:H,...V})]})});A0.classes={...ws.classes,...C0.classes};A0.displayName="@mantine/dates/YearLevel";const Ose={monthLabelFormat:"MMMM YYYY"},O0=Pe(e=>{const{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:u,maxDate:f,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:g,__getDayRef:b,__onDayKeyDown:w,__onDayClick:k,__onDayMouseEnter:_,withCellSpacing:S,highlightToday:j,withWeekNumbers:T,__preventFocus:A,__stopPropagation:O,nextIcon:M,previousIcon:$,nextLabel:q,previousLabel:P,onNext:L,onPrevious:U,onLevelClick:G,nextDisabled:B,previousDisabled:R,hasNextLevel:D,levelControlAriaLabel:z,withNext:H,withPrevious:Y,headerControlsOrder:N,monthLabelFormat:W,classNames:V,styles:I,unstyled:Q,__staticSelector:ie,size:re,static:Z,fullWidth:le,attributes:ee,...se}=ye("MonthLevel",Ose,e),ke=Ml(),te={__staticSelector:ie||"MonthLevel",classNames:V,styles:I,unstyled:Q,size:re,attributes:ee},$e=typeof B=="boolean"?B:f?!Be(n).endOf("month").isBefore(f):!1,xe=typeof R=="boolean"?R:u?!Be(n).startOf("month").isAfter(u):!1;return v.jsxs(fe,{"data-month-level":!0,size:re,...se,children:[v.jsx(ws,{label:typeof W=="function"?W(n):Be(n).locale(t||ke.locale).format(W),__preventFocus:A,__stopPropagation:O,nextIcon:M,previousIcon:$,nextLabel:q,previousLabel:P,onNext:L,onPrevious:U,onLevelClick:G,nextDisabled:$e,previousDisabled:xe,hasNextLevel:D,levelControlAriaLabel:z,withNext:H,withPrevious:Y,headerControlsOrder:N,fullWidth:le,...te}),v.jsx(Sp,{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:u,maxDate:f,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:g,__getDayRef:b,__onDayKeyDown:w,__onDayClick:k,__onDayMouseEnter:_,__preventFocus:A,__stopPropagation:O,static:Z,withCellSpacing:S,highlightToday:j,withWeekNumbers:T,fullWidth:le,...te})]})});O0.classes={...Sp.classes,...ws.classes};O0.displayName="@mantine/dates/MonthLevel";var $q={levelsGroup:"m_30b26e33"};const Dl=Pe(e=>{const n=ye("LevelsGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:u,fullWidth:f,attributes:h,...d}=n;return v.jsx(fe,{...Ze({name:u||"LevelsGroup",classes:$q,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,rootSelector:"levelsGroup"})("levelsGroup"),"data-full-width":f||void 0,...d})});Dl.classes=$q;Dl.displayName="@mantine/dates/LevelsGroup";const Tse={numberOfColumns:1},T0=Pe(e=>{const{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__onControlClick:l,__onControlMouseEnter:u,withCellSpacing:f,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:g,previousLabel:b,onNext:w,onPrevious:k,nextDisabled:_,previousDisabled:S,headerControlsOrder:j,classNames:T,styles:A,unstyled:O,__staticSelector:M,__stopPropagation:$,numberOfColumns:q,levelControlAriaLabel:P,decadeLabelFormat:L,size:U,fullWidth:G,vars:B,attributes:R,...D}=ye("DecadeLevelGroup",Tse,e),z=x.useRef([]),H=Array(q).fill(0).map((Y,N)=>{const W=Be(n).add(N*10,"years").format("YYYY-MM-DD");return v.jsx(j0,{size:U,yearsListFormat:a,decade:W,withNext:N===q-1,withPrevious:N===0,decadeLabelFormat:L,__onControlClick:l,__onControlMouseEnter:u,__onControlKeyDown:(V,I)=>A9({levelIndex:N,rowIndex:I.rowIndex,cellIndex:I.cellIndex,event:V,controlsRef:z}),__getControlRef:(V,I,Q)=>{Array.isArray(z.current[N])||(z.current[N]=[]),Array.isArray(z.current[N][V])||(z.current[N][V]=[]),z.current[N][V][I]=Q},levelControlAriaLabel:typeof P=="function"?P(W):P,locale:t,minDate:i,maxDate:r,__preventFocus:h,__stopPropagation:$,nextIcon:d,previousIcon:p,nextLabel:g,previousLabel:b,onNext:w,onPrevious:k,nextDisabled:_,previousDisabled:S,getYearControlProps:o,__staticSelector:M||"DecadeLevelGroup",classNames:T,styles:A,unstyled:O,withCellSpacing:f,headerControlsOrder:j,fullWidth:G,attributes:R},N)});return v.jsx(Dl,{classNames:T,styles:A,__staticSelector:M||"DecadeLevelGroup",size:U,unstyled:O,fullWidth:G,attributes:R,...D,children:H})});T0.classes={...Dl.classes,...j0.classes};T0.displayName="@mantine/dates/DecadeLevelGroup";const Ese={numberOfColumns:1},E0=Pe(e=>{const{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__onControlClick:l,__onControlMouseEnter:u,withCellSpacing:f,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:g,previousLabel:b,onNext:w,onPrevious:k,onLevelClick:_,nextDisabled:S,previousDisabled:j,hasNextLevel:T,headerControlsOrder:A,classNames:O,styles:M,unstyled:$,__staticSelector:q,__stopPropagation:P,numberOfColumns:L,levelControlAriaLabel:U,yearLabelFormat:G,size:B,fullWidth:R,vars:D,attributes:z,...H}=ye("YearLevelGroup",Ese,e),Y=x.useRef([]),N=Array(L).fill(0).map((W,V)=>{const I=Be(n).add(V,"years").format("YYYY-MM-DD");return v.jsx(A0,{size:B,monthsListFormat:a,year:I,withNext:V===L-1,withPrevious:V===0,yearLabelFormat:G,__stopPropagation:P,__onControlClick:l,__onControlMouseEnter:u,__onControlKeyDown:(Q,ie)=>A9({levelIndex:V,rowIndex:ie.rowIndex,cellIndex:ie.cellIndex,event:Q,controlsRef:Y}),__getControlRef:(Q,ie,re)=>{Array.isArray(Y.current[V])||(Y.current[V]=[]),Array.isArray(Y.current[V][Q])||(Y.current[V][Q]=[]),Y.current[V][Q][ie]=re},levelControlAriaLabel:typeof U=="function"?U(I):U,locale:t,minDate:i,maxDate:r,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:g,previousLabel:b,onNext:w,onPrevious:k,onLevelClick:_,nextDisabled:S,previousDisabled:j,hasNextLevel:T,getMonthControlProps:o,classNames:O,styles:M,unstyled:$,__staticSelector:q||"YearLevelGroup",withCellSpacing:f,headerControlsOrder:A,fullWidth:R,attributes:z},V)});return v.jsx(Dl,{classNames:O,styles:M,__staticSelector:q||"YearLevelGroup",size:B,unstyled:$,fullWidth:R,attributes:z,...H,children:N})});E0.classes={...A0.classes,...Dl.classes};E0.displayName="@mantine/dates/YearLevelGroup";const Mse={numberOfColumns:1},M0=Pe(e=>{const{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:u,maxDate:f,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:g,__onDayClick:b,__onDayMouseEnter:w,withCellSpacing:k,highlightToday:_,withWeekNumbers:S,__preventFocus:j,nextIcon:T,previousIcon:A,nextLabel:O,previousLabel:M,onNext:$,onPrevious:q,onLevelClick:P,nextDisabled:L,previousDisabled:U,hasNextLevel:G,headerControlsOrder:B,classNames:R,styles:D,unstyled:z,numberOfColumns:H,levelControlAriaLabel:Y,monthLabelFormat:N,__staticSelector:W,__stopPropagation:V,size:I,static:Q,fullWidth:ie,vars:re,attributes:Z,...le}=ye("MonthLevelGroup",Mse,e),ee=x.useRef([]),se=Array(H).fill(0).map((ke,te)=>{const $e=Be(n).add(te,"months").format("YYYY-MM-DD");return v.jsx(O0,{month:$e,withNext:te===H-1,withPrevious:te===0,monthLabelFormat:N,__stopPropagation:V,__onDayClick:b,__onDayMouseEnter:w,__onDayKeyDown:(xe,Ae)=>A9({levelIndex:te,rowIndex:Ae.rowIndex,cellIndex:Ae.cellIndex,event:xe,controlsRef:ee}),__getDayRef:(xe,Ae,ze)=>{Array.isArray(ee.current[te])||(ee.current[te]=[]),Array.isArray(ee.current[te][xe])||(ee.current[te][xe]=[]),ee.current[te][xe][Ae]=ze},levelControlAriaLabel:typeof Y=="function"?Y($e):Y,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:u,maxDate:f,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:g,__preventFocus:j,nextIcon:T,previousIcon:A,nextLabel:O,previousLabel:M,onNext:$,onPrevious:q,onLevelClick:P,nextDisabled:L,previousDisabled:U,hasNextLevel:G,classNames:R,styles:D,unstyled:z,__staticSelector:W||"MonthLevelGroup",size:I,static:Q,withCellSpacing:k,highlightToday:_,withWeekNumbers:S,headerControlsOrder:B,fullWidth:ie,attributes:Z},te)});return v.jsx(Dl,{classNames:R,styles:D,__staticSelector:W||"MonthLevelGroup",size:I,fullWidth:ie,attributes:Z,...le,children:se})});M0.classes={...Dl.classes,...O0.classes};M0.displayName="@mantine/dates/MonthLevelGroup";var zq={input:"m_6fa5e2aa"};const id=Pe(e=>{const{inputProps:n,wrapperProps:t,placeholder:i,classNames:r,styles:a,unstyled:o,popoverProps:l,modalProps:u,dropdownType:f,children:h,formattedValue:d,dropdownHandlers:p,dropdownOpened:g,onClick:b,clearable:w,clearSectionMode:k,onClear:_,clearButtonProps:S,rightSection:j,shouldClear:T,readOnly:A,disabled:O,value:M,name:$,form:q,type:P,onDropdownClose:L,withTime:U,...G}=NI("PickerInputBase",{size:"sm"},e),B=v.jsx(Xt.ClearButton,{onClick:_,unstyled:o,...S}),R=()=>{P==="range"&&Array.isArray(M)&&M[0]&&!M[1]&&_(),p.close()};return v.jsxs(v.Fragment,{children:[f==="modal"&&!A&&v.jsx(Gi,{opened:g,onClose:R,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:o,...u,children:h}),v.jsx(Xt.Wrapper,{...t,children:v.jsxs(Sn,{position:"bottom-start",opened:g,trapFocus:!0,returnFocus:!1,unstyled:o,onClose:L,...l,disabled:(l==null?void 0:l.disabled)||f==="modal"||A,onChange:D=>{var z;D||((z=l==null?void 0:l.onClose)==null||z.call(l),R())},children:[v.jsx(Sn.Target,{children:v.jsx(Xt,{"data-dates-input":!0,"data-read-only":A||void 0,disabled:O,component:"button",type:"button",multiline:!0,onClick:D=>{b==null||b(D),p.toggle()},__clearSection:B,__clearable:w&&T&&!A&&!O,__clearSectionMode:k,rightSection:j,...n,classNames:{...r,input:vn(zq.input,r==null?void 0:r.input)},...G,children:d||v.jsx(Xt.Placeholder,{error:n.error,unstyled:o,classNames:r,styles:a,__staticSelector:n.__staticSelector,children:i})})}),v.jsx(Sn.Dropdown,{"data-dates-dropdown":!0,children:h})]})}),v.jsx(yq,{value:M,name:$,form:q,type:P,withTime:U})]})});id.classes=zq;id.displayName="@mantine/dates/PickerInputBase";const EM=e=>e==="range"?[null,null]:e==="multiple"?[]:null,MM=(e,n)=>{const t=n?gq:Ji;return Array.isArray(e)?e.map(t):t(e)};function T9({type:e,value:n,defaultValue:t,onChange:i,withTime:r=!1}){const a=x.useRef(e),[o,l,u]=Ai({value:MM(n,r),defaultValue:MM(t,r),finalValue:EM(e),onChange:i});let f=o;return a.current!==e&&(a.current=e,n===void 0&&(f=t!==void 0?t:EM(e),l(f))),[f,l,u]}function t_(e,n){return e?e==="month"?0:e==="year"?1:2:n||0}function Dse(e){return e===0?"month":e===1?"year":"decade"}function kh(e,n,t){return Dse(Jo(t_(e,0),t_(n,0),t_(t,2)))}const Rse={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},rd=Pe(e=>{const n=ye("Calendar",Rse,e),{vars:t,maxLevel:i,minLevel:r,defaultLevel:a,level:o,onLevelChange:l,date:u,defaultDate:f,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:g,nextLabel:b,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:S,onMonthMouseEnter:j,headerControlsOrder:T,__updateDateOnYearSelect:A,__updateDateOnMonthSelect:O,__setDateRef:M,__setLevelRef:$,firstDayOfWeek:q,weekdayFormat:P,weekendDays:L,getDayProps:U,excludeDate:G,renderDay:B,hideOutsideDates:R,hideWeekdays:D,getDayAriaLabel:z,monthLabelFormat:H,nextIcon:Y,previousIcon:N,__onDayClick:W,__onDayMouseEnter:V,withCellSpacing:I,highlightToday:Q,withWeekNumbers:ie,monthsListFormat:re,getMonthControlProps:Z,yearLabelFormat:le,yearsListFormat:ee,getYearControlProps:se,decadeLabelFormat:ke,classNames:te,styles:$e,unstyled:xe,minDate:Ae,maxDate:ze,locale:we,__staticSelector:Ce,size:Ne,__preventFocus:he,__stopPropagation:He,onNextDecade:Ye,onPreviousDecade:We,onNextYear:Qe,onPreviousYear:Je,onNextMonth:oe,onPreviousMonth:be,static:Ke,enableKeyboardNavigation:en,fullWidth:je,attributes:an,ref:pn,...Dn}=n,{resolvedClassNames:bn,resolvedStyles:sn}=Wi({classNames:te,styles:$e,props:n}),[nn,$n]=Ai({value:o?kh(o,r,i):void 0,defaultValue:a?kh(a,r,i):void 0,finalValue:kh(void 0,r,i),onChange:l}),[De,Fe]=T9({type:"default",value:Ji(u),defaultValue:Ji(f),onChange:h});x.useImperativeHandle(M,()=>rn=>{Fe(rn)}),x.useImperativeHandle($,()=>rn=>{$n(rn)});const Vn={__staticSelector:Ce||"Calendar",styles:sn,classNames:bn,unstyled:xe,size:Ne,attributes:an},En=p||d||1,gn=x.useRef(null);if(gn.current===null){const rn=new Date;gn.current=Ae&&Be(rn).isAfter(Ae)?Ae:Be(rn).format("YYYY-MM-DD")}const xn=De||gn.current,at=()=>{const rn=Be(xn).add(En,"month").format("YYYY-MM-DD");oe==null||oe(rn),Fe(rn)},Mt=()=>{const rn=Be(xn).subtract(En,"month").format("YYYY-MM-DD");be==null||be(rn),Fe(rn)},qe=()=>{const rn=Be(xn).add(En,"year").format("YYYY-MM-DD");Qe==null||Qe(rn),Fe(rn)},Ue=()=>{const rn=Be(xn).subtract(En,"year").format("YYYY-MM-DD");Je==null||Je(rn),Fe(rn)},In=()=>{const rn=Be(xn).add(10*En,"year").format("YYYY-MM-DD");Ye==null||Ye(rn),Fe(rn)},ot=()=>{const rn=Be(xn).subtract(10*En,"year").format("YYYY-MM-DD");We==null||We(rn),Fe(rn)},Pn=x.useRef(null);return x.useEffect(()=>{if(!en||Ke)return;const rn=on=>{var Xn;if(!((Xn=Pn.current)!=null&&Xn.contains(document.activeElement)))return;const ln=on.ctrlKey||on.metaKey,Kn=on.shiftKey;switch(on.key){case"ArrowUp":ln&&Kn?(on.preventDefault(),ot()):ln&&(on.preventDefault(),Ue());break;case"ArrowDown":ln&&Kn?(on.preventDefault(),In()):ln&&(on.preventDefault(),qe());break;case"y":case"Y":nn==="month"&&(on.preventDefault(),$n("year"));break}};return document.addEventListener("keydown",rn),()=>{document.removeEventListener("keydown",rn)}},[en,Ke,nn,qe,Ue,In,ot]),v.jsxs(fe,{ref:Ht(Pn,pn),size:Ne,"data-calendar":!0,"data-full-width":je||void 0,...Dn,children:[nn==="month"&&v.jsx(M0,{month:xn,minDate:Ae,maxDate:ze,firstDayOfWeek:q,weekdayFormat:P,weekendDays:L,getDayProps:U,excludeDate:G,renderDay:B,hideOutsideDates:R,hideWeekdays:D,getDayAriaLabel:z,onNext:at,onPrevious:Mt,hasNextLevel:i!=="month",onLevelClick:()=>$n("year"),numberOfColumns:d,locale:we,levelControlAriaLabel:g==null?void 0:g.monthLevelControl,nextLabel:(g==null?void 0:g.nextMonth)??b,nextIcon:Y,previousLabel:(g==null?void 0:g.previousMonth)??w,previousIcon:N,monthLabelFormat:H,__onDayClick:W,__onDayMouseEnter:V,__preventFocus:he,__stopPropagation:He,static:Ke,withCellSpacing:I,highlightToday:Q,withWeekNumbers:ie,headerControlsOrder:T,fullWidth:je,...Vn}),nn==="year"&&v.jsx(E0,{year:xn,numberOfColumns:d,minDate:Ae,maxDate:ze,monthsListFormat:re,getMonthControlProps:Z,locale:we,onNext:qe,onPrevious:Ue,hasNextLevel:i!=="month"&&i!=="year",onLevelClick:()=>$n("decade"),levelControlAriaLabel:g==null?void 0:g.yearLevelControl,nextLabel:(g==null?void 0:g.nextYear)??b,nextIcon:Y,previousLabel:(g==null?void 0:g.previousYear)??w,previousIcon:N,yearLabelFormat:le,__onControlMouseEnter:j,__onControlClick:(rn,on)=>{O&&Fe(on),$n(kh("month",r,i)),_==null||_(on)},__preventFocus:he,__stopPropagation:He,withCellSpacing:I,headerControlsOrder:T,fullWidth:je,...Vn}),nn==="decade"&&v.jsx(T0,{decade:xn,minDate:Ae,maxDate:ze,yearsListFormat:ee,getYearControlProps:se,locale:we,onNext:In,onPrevious:ot,numberOfColumns:d,nextLabel:(g==null?void 0:g.nextDecade)??b,nextIcon:Y,previousLabel:(g==null?void 0:g.previousDecade)??w,previousIcon:N,decadeLabelFormat:ke,__onControlMouseEnter:S,__onControlClick:(rn,on)=>{A&&Fe(on),$n(kh("year",r,i)),k==null||k(on)},__preventFocus:he,__stopPropagation:He,withCellSpacing:I,headerControlsOrder:T,fullWidth:je,...Vn})]})});rd.classes={...T0.classes,...E0.classes,...M0.classes};rd.displayName="@mantine/dates/Calendar";function D0(e){const{maxLevel:n,minLevel:t,defaultLevel:i,level:r,onLevelChange:a,nextIcon:o,previousIcon:l,date:u,defaultDate:f,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:g,nextLabel:b,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:S,onMonthMouseEnter:j,onNextMonth:T,onPreviousMonth:A,onNextYear:O,onPreviousYear:M,onNextDecade:$,onPreviousDecade:q,withCellSpacing:P,highlightToday:L,__updateDateOnYearSelect:U,__updateDateOnMonthSelect:G,__setDateRef:B,__setLevelRef:R,withWeekNumbers:D,headerControlsOrder:z,firstDayOfWeek:H,weekdayFormat:Y,weekendDays:N,getDayProps:W,excludeDate:V,renderDay:I,hideOutsideDates:Q,hideWeekdays:ie,getDayAriaLabel:re,monthLabelFormat:Z,monthsListFormat:le,getMonthControlProps:ee,yearLabelFormat:se,yearsListFormat:ke,getYearControlProps:te,decadeLabelFormat:$e,allowSingleDateInRange:xe,allowDeselect:Ae,minDate:ze,maxDate:we,locale:Ce,...Ne}=e;return{calendarProps:{maxLevel:n,minLevel:t,defaultLevel:i,level:r,onLevelChange:a,nextIcon:o,previousIcon:l,date:u,defaultDate:f,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:g,nextLabel:b,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:S,onMonthMouseEnter:j,onNextMonth:T,onPreviousMonth:A,onNextYear:O,onPreviousYear:M,onNextDecade:$,onPreviousDecade:q,withCellSpacing:P,highlightToday:L,__updateDateOnYearSelect:U,__updateDateOnMonthSelect:G,__setDateRef:B,withWeekNumbers:D,headerControlsOrder:z,firstDayOfWeek:H,weekdayFormat:Y,weekendDays:N,getDayProps:W,excludeDate:V,renderDay:I,hideOutsideDates:Q,hideWeekdays:ie,getDayAriaLabel:re,monthLabelFormat:Z,monthsListFormat:le,getMonthControlProps:ee,yearLabelFormat:se,yearsListFormat:ke,getYearControlProps:te,decadeLabelFormat:$e,allowSingleDateInRange:xe,allowDeselect:Ae,minDate:ze,maxDate:we,locale:Ce},others:Ne}}function DM(e,n){const t=[...n].sort((i,r)=>Be(i).isAfter(Be(r))?1:-1);return Be(t[0]).startOf("day").subtract(1,"ms").isBefore(e)&&Be(t[1]).endOf("day").add(1,"ms").isAfter(e)}function Lq({type:e,level:n,value:t,defaultValue:i,onChange:r,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:l}){const[u,f]=T9({type:e,value:t,defaultValue:i,onChange:r}),[h,d]=x.useState(e==="range"&&u[0]&&!u[1]?u[0]:null),[p,g]=x.useState(null),b=A=>{if(e==="range"){if(h&&!u[1]){if(Be(A).isSame(h,n)&&!a){d(null),g(null),f([null,null]);return}const O=[A,h];O.sort((M,$)=>Be(M).isAfter(Be($))?1:-1),f(O),g(null),d(null);return}if(u[0]&&!u[1]&&Be(A).isSame(u[0],n)&&!a){d(null),g(null),f([null,null]);return}f([A,null]),g(null),d(A);return}if(e==="multiple"){u.some(O=>Be(O).isSame(A,n))?f(u.filter(O=>!Be(O).isSame(A,n))):f([...u,A]);return}u&&o&&Be(A).isSame(u,n)?f(null):f(A)},w=A=>h&&p?DM(A,[p,h]):u[0]&&u[1]?DM(A,u):!1,k=e==="range"?A=>{l==null||l(A),g(null)}:l,_=A=>u[0]&&Be(A).isSame(u[0],n)?!(p&&Be(p).isBefore(u[0])):!1,S=A=>u[1]?Be(A).isSame(u[1],n):!u[0]||!p?!1:Be(p).isBefore(u[0])&&Be(A).isSame(u[0],n),j=A=>{if(e==="range")return{selected:u.some(M=>M&&Be(M).isSame(A,n)),inRange:w(A),firstInRange:_(A),lastInRange:S(A),"data-autofocus":!!u[0]&&Be(u[0]).isSame(A,n)||void 0};if(e==="multiple")return{selected:u.some(M=>M&&Be(M).isSame(A,n)),"data-autofocus":!!u[0]&&Be(u[0]).isSame(A,n)||void 0};const O=Be(u).isSame(A,n);return{selected:O,"data-autofocus":O||void 0}},T=e==="range"&&h?g:()=>{};return x.useEffect(()=>{if(e==="range")if(u[0]&&!u[1])d(u[0]);else{const A=u[0]==null&&u[1]==null,O=u[0]!=null&&u[1]!=null;(A||O)&&(d(null),g(null))}},[u]),{onDateChange:b,onRootMouseLeave:k,onHoveredDateChange:T,getControlProps:j,_value:u,setValue:f}}var Iq={monthPickerRoot:"m_53c9e871",presetsList:"m_cccb8ff3",presetButton:"m_7b4fbf50"};const Bq=(e,{size:n})=>({monthPickerRoot:{"--preset-font-size":ai(n)}}),Pse={type:"default"},jp=Pe(e=>{const n=ye("MonthPicker",Pse,e),{classNames:t,styles:i,vars:r,type:a,defaultValue:o,value:l,onChange:u,__staticSelector:f,getMonthControlProps:h,allowSingleDateInRange:d,allowDeselect:p,onMouseLeave:g,onMonthSelect:b,__updateDateOnMonthSelect:w,__onPresetSelect:k,__stopPropagation:_,presets:S,className:j,style:T,unstyled:A,size:O,attributes:M,onLevelChange:$,...q}=n,{calendarProps:P,others:L}=D0(q),U=x.useRef(null),G=x.useRef(null),B=Ze({name:f||"MonthPicker",classes:Iq,props:n,className:j,style:T,classNames:t,styles:i,unstyled:A,attributes:M,rootSelector:S?"monthPickerRoot":void 0,varsResolver:Bq,vars:r}),{onDateChange:R,onRootMouseLeave:D,onHoveredDateChange:z,getControlProps:H,setValue:Y}=Lq({type:a,level:"month",allowDeselect:p,allowSingleDateInRange:d,value:l,defaultValue:o,onChange:u,onMouseLeave:g}),{resolvedClassNames:N,resolvedStyles:W}=Wi({classNames:t,styles:i,props:n}),V=v.jsx(rd,{classNames:N,styles:W,size:O,...P,...S?{}:L,minLevel:"year",__updateDateOnMonthSelect:w??!1,__staticSelector:f||"MonthPicker",onMouseLeave:D,onMonthMouseEnter:(ie,re)=>z(re),onMonthSelect:ie=>{R(ie),b==null||b(ie)},getMonthControlProps:ie=>({...H(ie),...h==null?void 0:h(ie)}),onLevelChange:$,__setDateRef:U,__setLevelRef:G,__stopPropagation:_,attributes:M,...S?{}:{className:j,style:T}});if(!S)return V;const I=ie=>{var Z,le;const re=Array.isArray(ie)?ie[0]:ie;re!==void 0&&((Z=U.current)==null||Z.call(U,re),(le=G.current)==null||le.call(G,"year"),k?k(re):Y(ie))},Q=S.map((ie,re)=>v.jsx(Et,{...B("presetButton"),onClick:()=>I(ie.value),onMouseDown:Z=>Z.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:ie.label},re));return v.jsxs(fe,{...B("monthPickerRoot"),size:O,...L,children:[v.jsx("div",{...B("presetsList"),children:Q}),V]})});jp.classes={...rd.classes,...Iq};jp.varsResolver=Bq;jp.displayName="@mantine/dates/MonthPicker";var Nse={datePickerRoot:"m_765a40cf",presetsList:"m_d6a681e1",presetButton:"m_acd30b22"};const Fq=(e,{size:n})=>({datePickerRoot:{"--preset-font-size":ai(n)}}),$se={type:"default",defaultLevel:"month",numberOfColumns:1,size:"sm"},Ap=Pe(e=>{const n=ye("DatePicker",$se,e),{allowDeselect:t,allowSingleDateInRange:i,value:r,defaultValue:a,onChange:o,onMouseLeave:l,classNames:u,styles:f,__staticSelector:h,__onDayClick:d,__onDayMouseEnter:p,__onPresetSelect:g,__stopPropagation:b,presets:w,className:k,style:_,unstyled:S,size:j,vars:T,attributes:A,...O}=n,{calendarProps:M,others:$}=D0(O),q=x.useRef(null),P=x.useRef(null),L=Ze({name:h||"DatePicker",classes:Nse,props:n,className:k,style:_,classNames:u,styles:f,unstyled:S,attributes:A,rootSelector:w?"datePickerRoot":void 0,varsResolver:Fq,vars:T}),{onDateChange:U,onRootMouseLeave:G,onHoveredDateChange:B,getControlProps:R,_value:D,setValue:z}=Lq({type:$.type,level:"day",allowDeselect:t,allowSingleDateInRange:i,value:r,defaultValue:a,onChange:o,onMouseLeave:l}),{resolvedClassNames:H,resolvedStyles:Y}=Wi({classNames:u,styles:f,props:n}),N=v.jsx(rd,{classNames:H,styles:Y,__staticSelector:h||"DatePicker",onMouseLeave:G,size:j,...M,...w?{}:$,__stopPropagation:b,__setDateRef:q,__setLevelRef:P,minLevel:M.minLevel||"month",__onDayMouseEnter:(I,Q)=>{B(Q),p==null||p(I,Q)},__onDayClick:(I,Q)=>{U(Q),d==null||d(I,Q)},getDayProps:I=>{var Q;return{...R(I),...(Q=M.getDayProps)==null?void 0:Q.call(M,I)}},getMonthControlProps:I=>{var Q;return{selected:typeof D=="string"?O9(I,D):!1,...(Q=M.getMonthControlProps)==null?void 0:Q.call(M,I)}},getYearControlProps:I=>{var Q;return{selected:typeof D=="string"?Be(I).isSame(D,"year"):!1,...(Q=M.getYearControlProps)==null?void 0:Q.call(M,I)}},hideOutsideDates:M.hideOutsideDates??M.numberOfColumns!==1,attributes:A,...w?{}:{className:k,style:_}});if(!w)return N;const W=I=>{var ie,re;const Q=Array.isArray(I)?I[0]:I;Q!==void 0&&((ie=q.current)==null||ie.call(q,Q),(re=P.current)==null||re.call(P,"month"),g?g(Q):z(I))},V=w.map((I,Q)=>v.jsx(Et,{...L("presetButton"),onClick:()=>W(I.value),onMouseDown:ie=>ie.preventDefault(),"data-mantine-stop-propagation":b||void 0,children:I.label},Q));return v.jsxs(fe,{...L("datePickerRoot"),size:j,...$,children:[v.jsx("div",{...L("presetsList"),children:V}),N]})});Ap.classes=rd.classes;Ap.varsResolver=Fq;Ap.displayName="@mantine/dates/DatePicker";function qq({type:e,value:n,defaultValue:t,onChange:i,locale:r,format:a,closeOnChange:o,sortDates:l,labelSeparator:u,valueFormatter:f}){const h=Ml(),[d,p]=Vz(!1),[g,b]=T9({type:e,value:n,defaultValue:t,onChange:i}),w=nse({type:e,date:g,locale:h.getLocale(r),format:a,labelSeparator:h.getLabelSeparator(u),formatter:f}),k=S=>{o&&(e==="default"&&p.close(),e==="range"&&S[0]&&S[1]&&p.close()),b(l&&e==="multiple"?[...S].sort((j,T)=>Be(j).isAfter(Be(T))?1:-1):S)};return{_value:g,setValue:k,onClear:()=>k(e==="range"?[null,null]:e==="multiple"?[]:null),shouldClear:e==="range"?!!g[0]:e==="multiple"?g.length>0:g!==null,formattedValue:w,dropdownOpened:d,dropdownHandlers:p}}const zse={type:"default",size:"sm",valueFormat:"MMMM YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},E9=Pe(e=>{const n=ye("MonthPickerInput",zse,e),{type:t,value:i,defaultValue:r,onChange:a,valueFormat:o,labelSeparator:l,locale:u,classNames:f,styles:h,unstyled:d,closeOnChange:p,size:g,variant:b,dropdownType:w,sortDates:k,minDate:_,maxDate:S,vars:j,valueFormatter:T,presets:A,attributes:O,...M}=n,{resolvedClassNames:$,resolvedStyles:q}=Wi({classNames:f,styles:h,props:n}),{calendarProps:P,others:L}=D0(M),{_value:U,setValue:G,formattedValue:B,dropdownHandlers:R,dropdownOpened:D,onClear:z,shouldClear:H}=qq({type:t,value:i,defaultValue:r,onChange:a,locale:u,format:o,labelSeparator:l,closeOnChange:p,sortDates:k,valueFormatter:T});return v.jsx(id,{formattedValue:B,dropdownOpened:D,dropdownHandlers:R,classNames:$,styles:q,unstyled:d,onClear:z,shouldClear:H,value:U,size:g,variant:b,dropdownType:w,...L,attributes:O,type:t,__staticSelector:"MonthPickerInput",children:v.jsx(jp,{...P,size:g,variant:b,type:t,value:U,defaultDate:P.defaultDate||(Array.isArray(U)?U[0]||t4({maxDate:S,minDate:_}):U||t4({maxDate:S,minDate:_})),onChange:G,locale:u,classNames:$,styles:q,unstyled:d,__staticSelector:"MonthPickerInput",__stopPropagation:w==="popover",minDate:_,maxDate:S,presets:A,attributes:O})})});E9.classes={...id.classes,...jp.classes};E9.displayName="@mantine/dates/MonthPickerInput";const Lse={type:"default",size:"sm",valueFormat:"MMMM D, YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},Du=Pe(e=>{const n=ye("DatePickerInput",Lse,e),{type:t,value:i,defaultValue:r,onChange:a,valueFormat:o,labelSeparator:l,locale:u,classNames:f,styles:h,unstyled:d,closeOnChange:p,size:g,variant:b,dropdownType:w,sortDates:k,minDate:_,maxDate:S,vars:j,defaultDate:T,valueFormatter:A,presets:O,attributes:M,...$}=n,{resolvedClassNames:q,resolvedStyles:P}=Wi({classNames:f,styles:h,props:n}),{calendarProps:L,others:U}=D0($),{_value:G,setValue:B,formattedValue:R,dropdownHandlers:D,dropdownOpened:z,onClear:H,shouldClear:Y}=qq({type:t,value:i,defaultValue:r,onChange:a,locale:u,format:o,labelSeparator:l,closeOnChange:p,sortDates:k,valueFormatter:A}),N=Array.isArray(G)?G[0]||T:G||T;return v.jsx(id,{formattedValue:R,dropdownOpened:z,dropdownHandlers:D,classNames:q,styles:P,unstyled:d,onClear:H,shouldClear:Y,value:G,size:g,variant:b,dropdownType:w,...U,type:t,__staticSelector:"DatePickerInput",attributes:M,children:v.jsx(Ap,{...L,size:g,variant:b,type:t,value:G,defaultDate:N||t4({maxDate:S,minDate:_}),onChange:B,locale:u,classNames:q,styles:P,unstyled:d,__staticSelector:"DatePickerInput",__stopPropagation:w==="popover",minDate:_,maxDate:S,presets:O,attributes:M})})});Du.classes={...id.classes,...Ap.classes};Du.displayName="@mantine/dates/DatePickerInput";/** + `},vae={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 gae(e){let{announcements:n=vae,container:t,hiddenTextDescribedById:i,screenReaderInstructions:r=pae}=e;const{announce:a,announcement:o}=dae(),l=_p("DndLiveRegion"),[u,f]=x.useState(!1);if(x.useEffect(()=>{f(!0)},[]),hae(x.useMemo(()=>({onDragStart(d){let{active:p}=d;a(n.onDragStart({active:p}))},onDragMove(d){let{active:p,over:g}=d;n.onDragMove&&a(n.onDragMove({active:p,over:g}))},onDragOver(d){let{active:p,over:g}=d;a(n.onDragOver({active:p,over:g}))},onDragEnd(d){let{active:p,over:g}=d;a(n.onDragEnd({active:p,over:g}))},onDragCancel(d){let{active:p,over:g}=d;a(n.onDragCancel({active:p,over:g}))}}),[a,n])),!u)return null;const h=J.createElement(J.Fragment,null,J.createElement(cae,{id:i,value:r.draggable}),J.createElement(fae,{id:l,announcement:o}));return t?sl.createPortal(h,t):h}var Ci;(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"})(Ci||(Ci={}));function a1(){}function pM(e,n){return x.useMemo(()=>({sensor:e,options:n??{}}),[e,n])}function yae(){for(var e=arguments.length,n=new Array(e),t=0;t[...n].filter(i=>i!=null),[...n])}const Wa=Object.freeze({x:0,y:0});function w9(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function bae(e,n){const t=r1(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 k9(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return t-i}function wae(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return i-t}function ZS(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 VF(e,n){if(!e||e.length===0)return null;const[t]=e;return t[n]}function vM(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 kae=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=vM(n,n.left,n.top),a=[];for(const o of i){const{id:l}=o,u=t.get(l);if(u){const f=w9(vM(u),r);a.push({id:l,data:{droppableContainer:o,value:f}})}}return a.sort(k9)},WF=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=ZS(n),a=[];for(const o of i){const{id:l}=o,u=t.get(l);if(u){const f=ZS(u),h=r.reduce((p,g,b)=>p+w9(f[b],g),0),d=Number((h/4).toFixed(4));a.push({id:l,data:{droppableContainer:o,value:d}})}}return a.sort(k9)};function _ae(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 u=_ae(l,n);u>0&&r.push({id:o,data:{droppableContainer:a,value:u}})}}return r.sort(wae)};function xae(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 Sae=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&&xae(i,l)){const f=ZS(l).reduce((d,p)=>d+w9(i,p),0),h=Number((f/4).toFixed(4));r.push({id:o,data:{droppableContainer:a,value:h}})}}return r.sort(k9)};function Cae(e,n,t){return{...e,scaleX:n&&t?n.width/t.width:1,scaleY:n&&t?n.height/t.height:1}}function YF(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:Wa}function jae(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 Aae=jae(1);function KF(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 Oae(e,n,t){const i=KF(n);if(!i)return e;const{scaleX:r,scaleY:a,x:o,y:l}=i,u=e.left-o-(1-r)*parseFloat(t),f=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:f,right:u+h,bottom:f+d,left:u}}const Tae={ignoreTransform:!1};function td(e,n){n===void 0&&(n=Tae);let t=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:f,transformOrigin:h}=fr(e).getComputedStyle(e);f&&(t=Oae(t,f,h))}const{top:i,left:r,width:a,height:o,bottom:l,right:u}=t;return{top:i,left:r,width:a,height:o,bottom:l,right:u}}function gM(e){return td(e,{ignoreTransform:!0})}function Eae(e){const n=e.innerWidth,t=e.innerHeight;return{top:0,left:0,right:n,bottom:t,width:n,height:t}}function Mae(e,n){return n===void 0&&(n=fr(e).getComputedStyle(e)),n.position==="fixed"}function Dae(e,n){n===void 0&&(n=fr(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 b0(e,n){const t=[];function i(r){if(n!=null&&t.length>=n||!r)return t;if(b9(r)&&r.scrollingElement!=null&&!t.includes(r.scrollingElement))return t.push(r.scrollingElement),t;if(!wp(r)||qF(r)||t.includes(r))return t;const a=fr(e).getComputedStyle(r);return r!==e&&Dae(r,a)&&t.push(r),Mae(r,a)?t:i(r.parentNode)}return e?i(e):t}function XF(e){const[n]=b0(e,1);return n??null}function Jk(e){return!v0||!e?null:ed(e)?e:y9(e)?b9(e)||e===nd(e).scrollingElement?window:wp(e)?e:null:null}function ZF(e){return ed(e)?e.scrollX:e.scrollLeft}function QF(e){return ed(e)?e.scrollY:e.scrollTop}function QS(e){return{x:ZF(e),y:QF(e)}}var Ri;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ri||(Ri={}));function JF(e){return!v0||!e?!1:e===document.scrollingElement}function eq(e){const n={x:0,y:0},t=JF(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 Rae={x:.2,y:.2};function Pae(e,n,t,i,r){let{top:a,left:o,right:l,bottom:u}=t;i===void 0&&(i=10),r===void 0&&(r=Rae);const{isTop:f,isBottom:h,isLeft:d,isRight:p}=eq(e),g={x:0,y:0},b={x:0,y:0},w={height:n.height*r.y,width:n.width*r.x};return!f&&a<=n.top+w.height?(g.y=Ri.Backward,b.y=i*Math.abs((n.top+w.height-a)/w.height)):!h&&u>=n.bottom-w.height&&(g.y=Ri.Forward,b.y=i*Math.abs((n.bottom-w.height-u)/w.height)),!p&&l>=n.right-w.width?(g.x=Ri.Forward,b.x=i*Math.abs((n.right-w.width-l)/w.width)):!d&&o<=n.left+w.width&&(g.x=Ri.Backward,b.x=i*Math.abs((n.left+w.width-o)/w.width)),{direction:g,speed:b}}function Nae(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 nq(e){return e.reduce((n,t)=>Qc(n,QS(t)),Wa)}function $ae(e){return e.reduce((n,t)=>n+ZF(t),0)}function zae(e){return e.reduce((n,t)=>n+QF(t),0)}function tq(e,n){if(n===void 0&&(n=td),!e)return;const{top:t,left:i,bottom:r,right:a}=n(e);XF(e)&&(r<=0||a<=0||t>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Lae=[["x",["left","right"],$ae],["y",["top","bottom"],zae]];class _9{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=b0(t),r=nq(i);this.rect={...n},this.width=n.width,this.height=n.height;for(const[a,o,l]of Lae)for(const u of o)Object.defineProperty(this,u,{get:()=>{const f=l(i),h=r[a]-f;return this.rect[u]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Xh{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 Iae(e){const{EventTarget:n}=fr(e);return e instanceof n?e:nd(e)}function e_(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 ma;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ma||(ma={}));function yM(e){e.preventDefault()}function Bae(e){e.stopPropagation()}var ct;(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"})(ct||(ct={}));const iq={start:[ct.Space,ct.Enter],cancel:[ct.Esc],end:[ct.Space,ct.Enter,ct.Tab]},Fae=(e,n)=>{let{currentCoordinates:t}=n;switch(e.code){case ct.Right:return{...t,x:t.x+25};case ct.Left:return{...t,x:t.x-25};case ct.Down:return{...t,y:t.y+25};case ct.Up:return{...t,y:t.y-25}}};class x9{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 Xh(nd(t)),this.windowListeners=new Xh(fr(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ma.Resize,this.handleCancel),this.windowListeners.add(ma.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ma.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:n,onStart:t}=this.props,i=n.node.current;i&&tq(i),t(Wa)}handleKeyDown(n){if(y0(n)){const{active:t,context:i,options:r}=this.props,{keyboardCodes:a=iq,coordinateGetter:o=Fae,scrollBehavior:l="smooth"}=r,{code:u}=n;if(a.end.includes(u)){this.handleEnd(n);return}if(a.cancel.includes(u)){this.handleCancel(n);return}const{collisionRect:f}=i.current,h=f?{x:f.left,y:f.top}:Wa;this.referenceCoordinates||(this.referenceCoordinates=h);const d=o(n,{active:t,context:i.current,currentCoordinates:h});if(d){const p=ym(d,h),g={x:0,y:0},{scrollableAncestors:b}=i.current;for(const w of b){const k=n.code,{isTop:_,isRight:S,isLeft:j,isBottom:T,maxScroll:A,minScroll:O}=eq(w),M=Nae(w),$={x:Math.min(k===ct.Right?M.right-M.width/2:M.right,Math.max(k===ct.Right?M.left:M.left+M.width/2,d.x)),y:Math.min(k===ct.Down?M.bottom-M.height/2:M.bottom,Math.max(k===ct.Down?M.top:M.top+M.height/2,d.y))},q=k===ct.Right&&!S||k===ct.Left&&!j,P=k===ct.Down&&!T||k===ct.Up&&!_;if(q&&$.x!==d.x){const L=w.scrollLeft+p.x,U=k===ct.Right&&L<=A.x||k===ct.Left&&L>=O.x;if(U&&!p.y){w.scrollTo({left:L,behavior:l});return}U?g.x=w.scrollLeft-L:g.x=k===ct.Right?w.scrollLeft-A.x:w.scrollLeft-O.x,g.x&&w.scrollBy({left:-g.x,behavior:l});break}else if(P&&$.y!==d.y){const L=w.scrollTop+p.y,U=k===ct.Down&&L<=A.y||k===ct.Up&&L>=O.y;if(U&&!p.x){w.scrollTo({top:L,behavior:l});return}U?g.y=w.scrollTop-L:g.y=k===ct.Down?w.scrollTop-A.y:w.scrollTop-O.y,g.y&&w.scrollBy({top:-g.y,behavior:l});break}}this.handleMove(n,Qc(ym(d,this.referenceCoordinates),g))}}}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()}}x9.activators=[{eventName:"onKeyDown",handler:(e,n,t)=>{let{keyboardCodes:i=iq,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 bM(e){return!!(e&&"distance"in e)}function wM(e){return!!(e&&"delay"in e)}class S9{constructor(n,t,i){var r;i===void 0&&(i=Iae(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=nd(o),this.documentListeners=new Xh(this.document),this.listeners=new Xh(i),this.windowListeners=new Xh(fr(o)),this.initialCoordinates=(r=r1(a))!=null?r:Wa,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(ma.Resize,this.handleCancel),this.windowListeners.add(ma.DragStart,yM),this.windowListeners.add(ma.VisibilityChange,this.handleCancel),this.windowListeners.add(ma.ContextMenu,yM),this.documentListeners.add(ma.Keydown,this.handleKeydown),t){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(wM(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(bM(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(ma.Click,Bae,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ma.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 u=(t=r1(n))!=null?t:Wa,f=ym(r,u);if(!i&&l){if(bM(l)){if(l.tolerance!=null&&e_(f,l.tolerance))return this.handleCancel();if(e_(f,l.distance))return this.handleStart()}if(wM(l)&&e_(f,l.tolerance))return this.handleCancel();this.handlePending(l,f);return}n.cancelable&&n.preventDefault(),o(u)}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===ct.Esc&&this.handleCancel()}removeTextSelection(){var n;(n=this.document.getSelection())==null||n.removeAllRanges()}}const qae={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class C9 extends S9{constructor(n){const{event:t}=n,i=nd(t.target);super(n,qae,i)}}C9.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 Hae={move:{name:"mousemove"},end:{name:"mouseup"}};var JS;(function(e){e[e.RightClick=2]="RightClick"})(JS||(JS={}));class Uae extends S9{constructor(n){super(n,Hae,nd(n.event.target))}}Uae.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;return t.button===JS.RightClick?!1:(i==null||i({event:t}),!0)}}];const n_={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Vae extends S9{constructor(n){super(n,n_)}static setup(){return window.addEventListener(n_.move.name,n,{capture:!1,passive:!1}),function(){window.removeEventListener(n_.move.name,n)};function n(){}}}Vae.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 Zh;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Zh||(Zh={}));var o1;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(o1||(o1={}));function Wae(e){let{acceleration:n,activator:t=Zh.Pointer,canScroll:i,draggingRect:r,enabled:a,interval:o=5,order:l=o1.TreeOrder,pointerCoordinates:u,scrollableAncestors:f,scrollableAncestorRects:h,delta:d,threshold:p}=e;const g=Yae({delta:d,disabled:!a}),[b,w]=aae(),k=x.useRef({x:0,y:0}),_=x.useRef({x:0,y:0}),S=x.useMemo(()=>{switch(t){case Zh.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case Zh.DraggableRect:return r}},[t,r,u]),j=x.useRef(null),T=x.useCallback(()=>{const O=j.current;if(!O)return;const M=k.current.x*_.current.x,$=k.current.y*_.current.y;O.scrollBy(M,$)},[]),A=x.useMemo(()=>l===o1.TreeOrder?[...f].reverse():f,[l,f]);x.useEffect(()=>{if(!a||!f.length||!S){w();return}for(const O of A){if((i==null?void 0:i(O))===!1)continue;const M=f.indexOf(O),$=h[M];if(!$)continue;const{direction:q,speed:P}=Pae(O,$,S,n,p);for(const L of["x","y"])g[L][q[L]]||(P[L]=0,q[L]=0);if(P.x>0||P.y>0){w(),j.current=O,b(T,o),k.current=P,_.current=q;return}}k.current={x:0,y:0},_.current={x:0,y:0},w()},[n,T,i,w,a,o,JSON.stringify(S),JSON.stringify(g),b,f,A,h,JSON.stringify(p)])}const Gae={x:{[Ri.Backward]:!1,[Ri.Forward]:!1},y:{[Ri.Backward]:!1,[Ri.Forward]:!1}};function Yae(e){let{delta:n,disabled:t}=e;const i=i1(n);return kp(r=>{if(t||!i||!r)return Gae;const a={x:Math.sign(n.x-i.x),y:Math.sign(n.y-i.y)};return{x:{[Ri.Backward]:r.x[Ri.Backward]||a.x===-1,[Ri.Forward]:r.x[Ri.Forward]||a.x===1},y:{[Ri.Backward]:r.y[Ri.Backward]||a.y===-1,[Ri.Forward]:r.y[Ri.Forward]||a.y===1}}},[t,n,i])}function Kae(e,n){const t=n!=null?e.get(n):void 0,i=t?t.node.current:null;return kp(r=>{var a;return n==null?null:(a=i??r)!=null?a:null},[i,n])}function Xae(e,n){return x.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 bm;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(bm||(bm={}));var e4;(function(e){e.Optimized="optimized"})(e4||(e4={}));const kM=new Map;function Zae(e,n){let{dragging:t,dependencies:i,config:r}=n;const[a,o]=x.useState(null),{frequency:l,measure:u,strategy:f}=r,h=x.useRef(e),d=k(),p=gm(d),g=x.useCallback(function(_){_===void 0&&(_=[]),!p.current&&o(S=>S===null?_:S.concat(_.filter(j=>!S.includes(j))))},[p]),b=x.useRef(null),w=kp(_=>{if(d&&!t)return kM;if(!_||_===kM||h.current!==e||a!=null){const S=new Map;for(let j of e){if(!j)continue;if(a&&a.length>0&&!a.includes(j.id)&&j.rect.current){S.set(j.id,j.rect.current);continue}const T=j.node.current,A=T?new _9(u(T),T):null;j.rect.current=A,A&&S.set(j.id,A)}return S}return _},[e,a,t,d,u]);return x.useEffect(()=>{h.current=e},[e]),x.useEffect(()=>{d||g()},[t,d]),x.useEffect(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),x.useEffect(()=>{d||typeof l!="number"||b.current!==null||(b.current=setTimeout(()=>{g(),b.current=null},l))},[l,d,g,...i]),{droppableRects:w,measureDroppableContainers:g,measuringScheduled:a!=null};function k(){switch(f){case bm.Always:return!1;case bm.BeforeDragging:return t;default:return!t}}}function j9(e,n){return kp(t=>e?t||(typeof n=="function"?n(e):e):null,[n,e])}function Qae(e,n){return j9(e,n)}function Jae(e){let{callback:n,disabled:t}=e;const i=g0(n),r=x.useMemo(()=>{if(t||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(i)},[i,t]);return x.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function w0(e){let{callback:n,disabled:t}=e;const i=g0(n),r=x.useMemo(()=>{if(t||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(i)},[t]);return x.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function eoe(e){return new _9(td(e),e)}function _M(e,n,t){n===void 0&&(n=eoe);const[i,r]=x.useState(null);function a(){r(u=>{if(!e)return null;if(e.isConnected===!1){var f;return(f=u??t)!=null?f:null}const h=n(e);return JSON.stringify(u)===JSON.stringify(h)?u:h})}const o=Jae({callback(u){if(e)for(const f of u){const{type:h,target:d}=f;if(h==="childList"&&d instanceof HTMLElement&&d.contains(e)){a();break}}}}),l=w0({callback:a});return Va(()=>{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 noe(e){const n=j9(e);return YF(e,n)}const xM=[];function toe(e){const n=x.useRef(e),t=kp(i=>e?i&&i!==xM&&e&&n.current&&e.parentNode===n.current.parentNode?i:b0(e):xM,[e]);return x.useEffect(()=>{n.current=e},[e]),t}function ioe(e){const[n,t]=x.useState(null),i=x.useRef(e),r=x.useCallback(a=>{const o=Jk(a.target);o&&t(l=>l?(l.set(o,QS(o)),new Map(l)):null)},[]);return x.useEffect(()=>{const a=i.current;if(e!==a){o(a);const l=e.map(u=>{const f=Jk(u);return f?(f.addEventListener("scroll",r,{passive:!0}),[f,QS(f)]):null}).filter(u=>u!=null);t(l.length?new Map(l):null),i.current=e}return()=>{o(e),o(a)};function o(l){l.forEach(u=>{const f=Jk(u);f==null||f.removeEventListener("scroll",r)})}},[r,e]),x.useMemo(()=>e.length?n?Array.from(n.values()).reduce((a,o)=>Qc(a,o),Wa):nq(e):Wa,[e,n])}function SM(e,n){n===void 0&&(n=[]);const t=x.useRef(null);return x.useEffect(()=>{t.current=null},n),x.useEffect(()=>{const i=e!==Wa;i&&!t.current&&(t.current=e),!i&&t.current&&(t.current=null)},[e]),t.current?ym(e,t.current):Wa}function roe(e){x.useEffect(()=>{if(!v0)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 aoe(e,n){return x.useMemo(()=>e.reduce((t,i)=>{let{eventName:r,handler:a}=i;return t[r]=o=>{a(o,n)},t},{}),[e,n])}function rq(e){return x.useMemo(()=>e?Eae(e):null,[e])}const CM=[];function ooe(e,n){n===void 0&&(n=td);const[t]=e,i=rq(t?fr(t):null),[r,a]=x.useState(CM);function o(){a(()=>e.length?e.map(u=>JF(u)?i:new _9(n(u),u)):CM)}const l=w0({callback:o});return Va(()=>{l==null||l.disconnect(),o(),e.forEach(u=>l==null?void 0:l.observe(u))},[e]),r}function aq(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return wp(n)?n:e}function soe(e){let{measure:n}=e;const[t,i]=x.useState(null),r=x.useCallback(f=>{for(const{target:h}of f)if(wp(h)){i(d=>{const p=n(h);return d?{...d,width:p.width,height:p.height}:p});break}},[n]),a=w0({callback:r}),o=x.useCallback(f=>{const h=aq(f);a==null||a.disconnect(),h&&(a==null||a.observe(h)),i(h?n(h):null)},[n,a]),[l,u]=t1(o);return x.useMemo(()=>({nodeRef:l,rect:t,setRef:u}),[t,l,u])}const loe=[{sensor:C9,options:{}},{sensor:x9,options:{}}],uoe={current:{}},Ig={draggable:{measure:gM},droppable:{measure:gM,strategy:bm.WhileDragging,frequency:e4.Optimized},dragOverlay:{measure:td}};class Qh 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 coe={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Qh,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:a1},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ig,measureDroppableContainers:a1,windowRect:null,measuringScheduled:!1},oq={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:a1,draggableNodes:new Map,over:null,measureDroppableContainers:a1},xp=x.createContext(oq),sq=x.createContext(coe);function foe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Qh}}}function doe(e,n){switch(n.type){case Ci.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case Ci.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 Ci.DragEnd:case Ci.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ci.RegisterDroppable:{const{element:t}=n,{id:i}=t,r=new Qh(e.droppable.containers);return r.set(i,t),{...e,droppable:{...e.droppable,containers:r}}}case Ci.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 Qh(e.droppable.containers);return o.set(t,{...a,disabled:r}),{...e,droppable:{...e.droppable,containers:o}}}case Ci.UnregisterDroppable:{const{id:t,key:i}=n,r=e.droppable.containers.get(t);if(!r||i!==r.key)return e;const a=new Qh(e.droppable.containers);return a.delete(t),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function hoe(e){let{disabled:n}=e;const{active:t,activatorEvent:i,draggableNodes:r}=x.useContext(xp),a=i1(i),o=i1(t==null?void 0:t.id);return x.useEffect(()=>{if(!n&&!i&&a&&o!=null){if(!y0(a)||document.activeElement===a.target)return;const l=r.get(o);if(!l)return;const{activatorNode:u,node:f}=l;if(!u.current&&!f.current)return;requestAnimationFrame(()=>{for(const h of[u.current,f.current]){if(!h)continue;const d=lae(h);if(d){d.focus();break}}})}},[i,n,r,o,a]),null}function lq(e,n){let{transform:t,...i}=n;return e!=null&&e.length?e.reduce((r,a)=>a({transform:r,...i}),t):t}function moe(e){return x.useMemo(()=>({draggable:{...Ig.draggable,...e==null?void 0:e.draggable},droppable:{...Ig.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Ig.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 poe(e){let{activeNode:n,measure:t,initialRect:i,config:r=!0}=e;const a=x.useRef(!1),{x:o,y:l}=typeof r=="boolean"?{x:r,y:r}:r;Va(()=>{if(!o&&!l||!n){a.current=!1;return}if(a.current||!i)return;const f=n==null?void 0:n.node.current;if(!f||f.isConnected===!1)return;const h=t(f),d=YF(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=XF(f);p&&p.scrollBy({top:d.y,left:d.x})}},[n,o,l,i,t])}const k0=x.createContext({...Wa,scaleX:1,scaleY:1});var il;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(il||(il={}));const voe=x.memo(function(n){var t,i,r,a;let{id:o,accessibility:l,autoScroll:u=!0,children:f,sensors:h=loe,collisionDetection:d=GF,measuring:p,modifiers:g,...b}=n;const w=x.useReducer(doe,void 0,foe),[k,_]=w,[S,j]=mae(),[T,A]=x.useState(il.Uninitialized),O=T===il.Initialized,{draggable:{active:M,nodes:$,translate:q},droppable:{containers:P}}=k,L=M!=null?$.get(M):null,U=x.useRef({initial:null,translated:null}),G=x.useMemo(()=>{var gn;return M!=null?{id:M,data:(gn=L==null?void 0:L.data)!=null?gn:uoe,rect:U}:null},[M,L]),B=x.useRef(null),[R,D]=x.useState(null),[z,H]=x.useState(null),Y=gm(b,Object.values(b)),N=_p("DndDescribedBy",o),W=x.useMemo(()=>P.getEnabled(),[P]),V=moe(p),{droppableRects:I,measureDroppableContainers:Q,measuringScheduled:ie}=Zae(W,{dragging:O,dependencies:[q.x,q.y],config:V.droppable}),re=Kae($,M),Z=x.useMemo(()=>z?r1(z):null,[z]),le=En(),ee=Qae(re,V.draggable.measure);poe({activeNode:M!=null?$.get(M):null,config:le.layoutShiftCompensation,initialRect:ee,measure:V.draggable.measure});const se=_M(re,V.draggable.measure,ee),ke=_M(re?re.parentElement:null),te=x.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}),$e=P.getNodeFor((t=te.current.over)==null?void 0:t.id),xe=soe({measure:V.dragOverlay.measure}),Ae=(i=xe.nodeRef.current)!=null?i:re,ze=O?(r=xe.rect)!=null?r:se:null,we=!!(xe.nodeRef.current&&xe.rect),Ce=noe(we?null:se),Ne=rq(Ae?fr(Ae):null),he=toe(O?$e??re:null),He=ooe(he),Ye=lq(g,{transform:{x:q.x-Ce.x,y:q.y-Ce.y,scaleX:1,scaleY:1},activatorEvent:z,active:G,activeNodeRect:se,containerNodeRect:ke,draggingNodeRect:ze,over:te.current.over,overlayNodeRect:xe.rect,scrollableAncestors:he,scrollableAncestorRects:He,windowRect:Ne}),We=Z?Qc(Z,q):null,Qe=ioe(he),Je=SM(Qe),oe=SM(Qe,[se]),be=Qc(Ye,Je),Ke=ze?Aae(ze,Ye):null,en=G&&Ke?d({active:G,collisionRect:Ke,droppableRects:I,droppableContainers:W,pointerCoordinates:We}):null,je=VF(en,"id"),[an,pn]=x.useState(null),Dn=we?Ye:Qc(Ye,oe),bn=Cae(Dn,(a=an==null?void 0:an.rect)!=null?a:null,se),sn=x.useRef(null),nn=x.useCallback((gn,xn)=>{let{sensor:at,options:Mt}=xn;if(B.current==null)return;const qe=$.get(B.current);if(!qe)return;const Ue=gn.nativeEvent,In=new at({active:B.current,activeNode:qe,event:Ue,options:Mt,context:te,onAbort(Pn){if(!$.get(Pn))return;const{onDragAbort:on}=Y.current,ln={id:Pn};on==null||on(ln),S({type:"onDragAbort",event:ln})},onPending(Pn,rn,on,ln){if(!$.get(Pn))return;const{onDragPending:Xn}=Y.current,Lt={id:Pn,constraint:rn,initialCoordinates:on,offset:ln};Xn==null||Xn(Lt),S({type:"onDragPending",event:Lt})},onStart(Pn){const rn=B.current;if(rn==null)return;const on=$.get(rn);if(!on)return;const{onDragStart:ln}=Y.current,Kn={activatorEvent:Ue,active:{id:rn,data:on.data,rect:U}};sl.unstable_batchedUpdates(()=>{ln==null||ln(Kn),A(il.Initializing),_({type:Ci.DragStart,initialCoordinates:Pn,active:rn}),S({type:"onDragStart",event:Kn}),D(sn.current),H(Ue)})},onMove(Pn){_({type:Ci.DragMove,coordinates:Pn})},onEnd:ot(Ci.DragEnd),onCancel:ot(Ci.DragCancel)});sn.current=In;function ot(Pn){return async function(){const{active:on,collisions:ln,over:Kn,scrollAdjustedTranslate:Xn}=te.current;let Lt=null;if(on&&Xn){const{cancelDrop:Rn}=Y.current;Lt={activatorEvent:Ue,active:on,collisions:ln,delta:Xn,over:Kn},Pn===Ci.DragEnd&&typeof Rn=="function"&&await Promise.resolve(Rn(Lt))&&(Pn=Ci.DragCancel)}B.current=null,sl.unstable_batchedUpdates(()=>{_({type:Pn}),A(il.Uninitialized),pn(null),D(null),H(null),sn.current=null;const Rn=Pn===Ci.DragEnd?"onDragEnd":"onDragCancel";if(Lt){const Mn=Y.current[Rn];Mn==null||Mn(Lt),S({type:Rn,event:Lt})}})}}},[$]),$n=x.useCallback((gn,xn)=>(at,Mt)=>{const qe=at.nativeEvent,Ue=$.get(Mt);if(B.current!==null||!Ue||qe.dndKit||qe.defaultPrevented)return;const In={active:Ue};gn(at,xn.options,In)===!0&&(qe.dndKit={capturedBy:xn.sensor},B.current=Mt,nn(at,xn))},[$,nn]),De=Xae(h,$n);roe(h),Va(()=>{se&&T===il.Initializing&&A(il.Initialized)},[se,T]),x.useEffect(()=>{const{onDragMove:gn}=Y.current,{active:xn,activatorEvent:at,collisions:Mt,over:qe}=te.current;if(!xn||!at)return;const Ue={active:xn,activatorEvent:at,collisions:Mt,delta:{x:be.x,y:be.y},over:qe};sl.unstable_batchedUpdates(()=>{gn==null||gn(Ue),S({type:"onDragMove",event:Ue})})},[be.x,be.y]),x.useEffect(()=>{const{active:gn,activatorEvent:xn,collisions:at,droppableContainers:Mt,scrollAdjustedTranslate:qe}=te.current;if(!gn||B.current==null||!xn||!qe)return;const{onDragOver:Ue}=Y.current,In=Mt.get(je),ot=In&&In.rect.current?{id:In.id,rect:In.rect.current,data:In.data,disabled:In.disabled}:null,Pn={active:gn,activatorEvent:xn,collisions:at,delta:{x:qe.x,y:qe.y},over:ot};sl.unstable_batchedUpdates(()=>{pn(ot),Ue==null||Ue(Pn),S({type:"onDragOver",event:Pn})})},[je]),Va(()=>{te.current={activatorEvent:z,active:G,activeNode:re,collisionRect:Ke,collisions:en,droppableRects:I,draggableNodes:$,draggingNode:Ae,draggingNodeRect:ze,droppableContainers:P,over:an,scrollableAncestors:he,scrollAdjustedTranslate:be},U.current={initial:ze,translated:Ke}},[G,re,en,Ke,$,Ae,ze,I,P,an,he,be]),Wae({...le,delta:q,draggingRect:Ke,pointerCoordinates:We,scrollableAncestors:he,scrollableAncestorRects:He});const Fe=x.useMemo(()=>({active:G,activeNode:re,activeNodeRect:se,activatorEvent:z,collisions:en,containerNodeRect:ke,dragOverlay:xe,draggableNodes:$,droppableContainers:P,droppableRects:I,over:an,measureDroppableContainers:Q,scrollableAncestors:he,scrollableAncestorRects:He,measuringConfiguration:V,measuringScheduled:ie,windowRect:Ne}),[G,re,se,z,en,ke,xe,$,P,I,an,Q,he,He,V,ie,Ne]),Vn=x.useMemo(()=>({activatorEvent:z,activators:De,active:G,activeNodeRect:se,ariaDescribedById:{draggable:N},dispatch:_,draggableNodes:$,over:an,measureDroppableContainers:Q}),[z,De,G,se,_,N,$,an,Q]);return J.createElement(UF.Provider,{value:j},J.createElement(xp.Provider,{value:Vn},J.createElement(sq.Provider,{value:Fe},J.createElement(k0.Provider,{value:bn},f)),J.createElement(hoe,{disabled:(l==null?void 0:l.restoreFocus)===!1})),J.createElement(gae,{...l,hiddenTextDescribedById:N}));function En(){const gn=(R==null?void 0:R.autoScrollEnabled)===!1,xn=typeof u=="object"?u.enabled===!1:u===!1,at=O&&!gn&&!xn;return typeof u=="object"?{...u,enabled:at}:{enabled:at}}}),goe=x.createContext(null),jM="button",yoe="Draggable";function boe(e){let{id:n,data:t,disabled:i=!1,attributes:r}=e;const a=_p(yoe),{activators:o,activatorEvent:l,active:u,activeNodeRect:f,ariaDescribedById:h,draggableNodes:d,over:p}=x.useContext(xp),{role:g=jM,roleDescription:b="draggable",tabIndex:w=0}=r??{},k=(u==null?void 0:u.id)===n,_=x.useContext(k?k0:goe),[S,j]=t1(),[T,A]=t1(),O=aoe(o,n),M=gm(t);Va(()=>(d.set(n,{id:n,key:a,node:S,activatorNode:T,data:M}),()=>{const q=d.get(n);q&&q.key===a&&d.delete(n)}),[d,n]);const $=x.useMemo(()=>({role:g,tabIndex:w,"aria-disabled":i,"aria-pressed":k&&g===jM?!0:void 0,"aria-roledescription":b,"aria-describedby":h.draggable}),[i,g,w,k,b,h.draggable]);return{active:u,activatorEvent:l,activeNodeRect:f,attributes:$,isDragging:k,listeners:i?void 0:O,node:S,over:p,setNodeRef:j,setActivatorNodeRef:A,transform:_}}function uq(){return x.useContext(sq)}const woe="Droppable",koe={timeout:25};function _oe(e){let{data:n,disabled:t=!1,id:i,resizeObserverConfig:r}=e;const a=_p(woe),{active:o,dispatch:l,over:u,measureDroppableContainers:f}=x.useContext(xp),h=x.useRef({disabled:t}),d=x.useRef(!1),p=x.useRef(null),g=x.useRef(null),{disabled:b,updateMeasurementsFor:w,timeout:k}={...koe,...r},_=gm(w??i),S=x.useCallback(()=>{if(!d.current){d.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{f(Array.isArray(_.current)?_.current:[_.current]),g.current=null},k)},[k]),j=w0({callback:S,disabled:b||!o}),T=x.useCallback(($,q)=>{j&&(q&&(j.unobserve(q),d.current=!1),$&&j.observe($))},[j]),[A,O]=t1(T),M=gm(n);return x.useEffect(()=>{!j||!A.current||(j.disconnect(),d.current=!1,j.observe(A.current))},[A,j]),x.useEffect(()=>(l({type:Ci.RegisterDroppable,element:{id:i,key:a,disabled:t,node:A,rect:p,data:M}}),()=>l({type:Ci.UnregisterDroppable,key:a,id:i})),[i]),x.useEffect(()=>{t!==h.current.disabled&&(l({type:Ci.SetDroppableDisabled,id:i,key:a,disabled:t}),h.current.disabled=t)},[i,a,t,l]),{active:o,rect:p,isOver:(u==null?void 0:u.id)===i,node:A,over:u,setNodeRef:O}}function xoe(e){let{animation:n,children:t}=e;const[i,r]=x.useState(null),[a,o]=x.useState(null),l=i1(t);return!t&&!i&&l&&r(l),Va(()=>{if(!a)return;const u=i==null?void 0:i.key,f=i==null?void 0:i.props.id;if(u==null||f==null){r(null);return}Promise.resolve(n(f,a)).then(()=>{r(null)})},[n,i,a]),J.createElement(J.Fragment,null,t,i?x.cloneElement(i,{ref:o}):null)}const Soe={x:0,y:0,scaleX:1,scaleY:1};function Coe(e){let{children:n}=e;return J.createElement(xp.Provider,{value:oq},J.createElement(k0.Provider,{value:Soe},n))}const joe={position:"fixed",touchAction:"none"},Aoe=e=>y0(e)?"transform 250ms ease":void 0,Ooe=x.forwardRef((e,n)=>{let{as:t,activatorEvent:i,adjustScale:r,children:a,className:o,rect:l,style:u,transform:f,transition:h=Aoe}=e;if(!l)return null;const d=r?f:{...f,scaleX:1,scaleY:1},p={...joe,width:l.width,height:l.height,top:l.top,left:l.left,transform:po.Transform.toString(d),transformOrigin:r&&i?bae(i,l):void 0,transition:typeof h=="function"?h(i):h,...u};return J.createElement(t,{className:o,style:p,ref:n},a)}),Toe=e=>n=>{let{active:t,dragOverlay:i}=n;const r={},{styles:a,className:o}=e;if(a!=null&&a.active)for(const[l,u]of Object.entries(a.active))u!==void 0&&(r[l]=t.node.style.getPropertyValue(l),t.node.style.setProperty(l,u));if(a!=null&&a.dragOverlay)for(const[l,u]of Object.entries(a.dragOverlay))u!==void 0&&i.node.style.setProperty(l,u);return o!=null&&o.active&&t.node.classList.add(o.active),o!=null&&o.dragOverlay&&i.node.classList.add(o.dragOverlay),function(){for(const[u,f]of Object.entries(r))t.node.style.setProperty(u,f);o!=null&&o.active&&t.node.classList.remove(o.active)}},Eoe=e=>{let{transform:{initial:n,final:t}}=e;return[{transform:po.Transform.toString(n)},{transform:po.Transform.toString(t)}]},Moe={duration:250,easing:"ease",keyframes:Eoe,sideEffects:Toe({styles:{active:{opacity:"0"}}})};function Doe(e){let{config:n,draggableNodes:t,droppableContainers:i,measuringConfiguration:r}=e;return g0((a,o)=>{if(n===null)return;const l=t.get(a);if(!l)return;const u=l.node.current;if(!u)return;const f=aq(o);if(!f)return;const{transform:h}=fr(o).getComputedStyle(o),d=KF(h);if(!d)return;const p=typeof n=="function"?n:Roe(n);return tq(u,r.draggable.measure),p({active:{id:a,data:l.data,node:u,rect:r.draggable.measure(u)},draggableNodes:t,dragOverlay:{node:o,rect:r.dragOverlay.measure(f)},droppableContainers:i,measuringConfiguration:r,transform:d})})}function Roe(e){const{duration:n,easing:t,sideEffects:i,keyframes:r}={...Moe,...e};return a=>{let{active:o,dragOverlay:l,transform:u,...f}=a;if(!n)return;const h={x:l.rect.left-o.rect.left,y:l.rect.top-o.rect.top},d={scaleX:u.scaleX!==1?o.rect.width*u.scaleX/l.rect.width:1,scaleY:u.scaleY!==1?o.rect.height*u.scaleY/l.rect.height:1},p={x:u.x-h.x,y:u.y-h.y,...d},g=r({...f,active:o,dragOverlay:l,transform:{initial:u,final:p}}),[b]=g,w=g[g.length-1];if(JSON.stringify(b)===JSON.stringify(w))return;const k=i==null?void 0:i({active:o,dragOverlay:l,...f}),_=l.node.animate(g,{duration:n,easing:t,fill:"forwards"});return new Promise(S=>{_.onfinish=()=>{k==null||k(),S()}})}}let AM=0;function Poe(e){return x.useMemo(()=>{if(e!=null)return AM++,AM},[e])}const Noe=J.memo(e=>{let{adjustScale:n=!1,children:t,dropAnimation:i,style:r,transition:a,modifiers:o,wrapperElement:l="div",className:u,zIndex:f=999}=e;const{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:g,draggableNodes:b,droppableContainers:w,dragOverlay:k,over:_,measuringConfiguration:S,scrollableAncestors:j,scrollableAncestorRects:T,windowRect:A}=uq(),O=x.useContext(k0),M=Poe(d==null?void 0:d.id),$=lq(o,{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:g,draggingNodeRect:k.rect,over:_,overlayNodeRect:k.rect,scrollableAncestors:j,scrollableAncestorRects:T,transform:O,windowRect:A}),q=j9(p),P=Doe({config:i,draggableNodes:b,droppableContainers:w,measuringConfiguration:S}),L=q?k.setRef:void 0;return J.createElement(Coe,null,J.createElement(xoe,{animation:P},d&&M?J.createElement(Ooe,{key:M,id:d.id,ref:L,as:l,activatorEvent:h,adjustScale:n,className:u,transition:a,rect:q,style:{zIndex:f,...r},transform:$},t):null))});function s1(e,n,t){const i=e.slice();return i.splice(t<0?i.length+t:t,0,i.splice(n,1)[0]),i}function $oe(e,n){return e.reduce((t,i,r)=>{const a=n.get(i);return a&&(t[r]=a),t},Array(e.length))}function ag(e){return e!==null&&e>=0}function zoe(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 u=Boe(t,o,r);if(o===r){const f=t[a];return f?{x:rr&&o<=a?{x:-l.width-u,y:0,...og}:o=a?{x:l.width+u,y:0,...og}:{x:0,y:0,...og}};function Boe(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=s1(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}},sg={scaleX:1,scaleY:1},fq=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 f=a[o];return f?{x:0,y:tt&&r<=o?{x:0,y:-l.height-u,...sg}:r=o?{x:0,y:l.height+u,...sg}:{x:0,y:0,...sg}};function Foe(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?g.indexOf(o.id):-1,k=f?g.indexOf(f.id):-1,_=x.useRef(g),S=!zoe(g,_.current),j=k!==-1&&w===-1||S,T=Loe(a);Va(()=>{S&&b&&h(g)},[S,g,b,h]),x.useEffect(()=>{_.current=g},[g]);const A=x.useMemo(()=>({activeIndex:w,containerId:d,disabled:T,disableTransforms:j,items:g,overIndex:k,useDragOverlay:p,sortedRects:$oe(g,u),strategy:r}),[w,d,T.draggable,T.droppable,j,g,k,u,p,r]);return J.createElement(hq.Provider,{value:A},n)}const qoe=e=>{let{id:n,items:t,activeIndex:i,overIndex:r}=e;return s1(t,i,r).indexOf(n)},Hoe=e=>{let{containerId:n,isSorting:t,wasDragging:i,index:r,items:a,newIndex:o,previousItems:l,previousContainerId:u,transition:f}=e;return!f||!i||l!==a&&r===o?!1:t?!0:o!==r&&n===u},Uoe={duration:200,easing:"ease"},mq="transform",Voe=po.Transition.toString({property:mq,duration:0,easing:"linear"}),Woe={roleDescription:"sortable"};function Goe(e){let{disabled:n,index:t,node:i,rect:r}=e;const[a,o]=x.useState(null),l=x.useRef(t);return Va(()=>{if(!n&&t!==l.current&&i.current){const u=r.current;if(u){const f=td(i.current,{ignoreTransform:!0}),h={x:u.left-f.left,y:u.top-f.top,scaleX:u.width/f.width,scaleY:u.height/f.height};(h.x||h.y)&&o(h)}}t!==l.current&&(l.current=t)},[n,t,i,r]),x.useEffect(()=>{a&&o(null)},[a]),a}function pq(e){let{animateLayoutChanges:n=Hoe,attributes:t,disabled:i,data:r,getNewIndex:a=qoe,id:o,strategy:l,resizeObserverConfig:u,transition:f=Uoe}=e;const{items:h,containerId:d,activeIndex:p,disabled:g,disableTransforms:b,sortedRects:w,overIndex:k,useDragOverlay:_,strategy:S}=x.useContext(hq),j=Yoe(i,g),T=h.indexOf(o),A=x.useMemo(()=>({sortable:{containerId:d,index:T,items:h},...r}),[d,r,T,h]),O=x.useMemo(()=>h.slice(h.indexOf(o)),[h,o]),{rect:M,node:$,isOver:q,setNodeRef:P}=_oe({id:o,data:A,disabled:j.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...u}}),{active:L,activatorEvent:U,activeNodeRect:G,attributes:B,setNodeRef:R,listeners:D,isDragging:z,over:H,setActivatorNodeRef:Y,transform:N}=boe({id:o,data:A,attributes:{...Woe,...t},disabled:j.draggable}),W=rae(P,R),V=!!L,I=V&&!b&&ag(p)&&ag(k),Q=!_&&z,ie=Q&&I?N:null,Z=I?ie??(l??S)({rects:w,activeNodeRect:G,activeIndex:p,overIndex:k,index:T}):null,le=ag(p)&&ag(k)?a({id:o,items:h,activeIndex:p,overIndex:k}):T,ee=L==null?void 0:L.id,se=x.useRef({activeId:ee,items:h,newIndex:le,containerId:d}),ke=h!==se.current.items,te=n({active:L,containerId:d,isDragging:z,isSorting:V,id:o,index:T,items:h,newIndex:se.current.newIndex,previousItems:se.current.items,previousContainerId:se.current.containerId,transition:f,wasDragging:se.current.activeId!=null}),$e=Goe({disabled:!te,index:T,node:$,rect:M});return x.useEffect(()=>{V&&se.current.newIndex!==le&&(se.current.newIndex=le),d!==se.current.containerId&&(se.current.containerId=d),h!==se.current.items&&(se.current.items=h)},[V,le,d,h]),x.useEffect(()=>{if(ee===se.current.activeId)return;if(ee!=null&&se.current.activeId==null){se.current.activeId=ee;return}const Ae=setTimeout(()=>{se.current.activeId=ee},50);return()=>clearTimeout(Ae)},[ee]),{active:L,activeIndex:p,attributes:B,data:A,rect:M,index:T,newIndex:le,items:h,isOver:q,isSorting:V,isDragging:z,listeners:D,node:$,overIndex:k,over:H,setNodeRef:W,setActivatorNodeRef:Y,setDroppableNodeRef:P,setDraggableNodeRef:R,transform:$e??Z,transition:xe()};function xe(){if($e||ke&&se.current.newIndex===T)return Voe;if(!(Q&&!y0(U)||!f)&&(V||te))return po.Transition.toString({...f,property:mq})}}function Yoe(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 l1(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 Koe=[ct.Down,ct.Right,ct.Up,ct.Left],Xoe=(e,n)=>{let{context:{active:t,collisionRect:i,droppableRects:r,droppableContainers:a,over:o,scrollableAncestors:l}}=n;if(Koe.includes(e.code)){if(e.preventDefault(),!t||!i)return;const u=[];a.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const p=r.get(d.id);if(p)switch(e.code){case ct.Down:i.topp.top&&u.push(d);break;case ct.Left:i.left>p.left&&u.push(d);break;case ct.Right:i.left1&&(h=f[1].id),h!=null){const d=a.get(t.id),p=a.get(h),g=p?r.get(p.id):null,b=p==null?void 0:p.node.current;if(b&&g&&d&&p){const k=b0(b).some((O,M)=>l[M]!==O),_=vq(d,p),S=Zoe(d,p),j=k||!_?{x:0,y:0}:{x:S?i.width-g.width:0,y:S?i.height-g.height:0},T={x:g.left,y:g.top};return j.x&&j.y?T:ym(T,j)}}}};function vq(e,n){return!l1(e)||!l1(n)?!1:e.data.current.sortable.containerId===n.data.current.sortable.containerId}function Zoe(e,n){return!l1(e)||!l1(n)||!vq(e,n)?!1:e.data.current.sortable.index=R?B:""+Array(R+1-z.length).join(D)+B},T={s:j,z:function(B){var R=-B.utcOffset(),D=Math.abs(R),z=Math.floor(D/60),H=D%60;return(R<=0?"+":"-")+j(z,2,"0")+":"+j(H,2,"0")},m:function B(R,D){if(R.date()1)return B(N[0])}else{var W=R.name;O[W]=R,H=W}return!z&&H&&(A=H),H||!z&&A},P=function(B,R){if($(B))return B.clone();var D=typeof R=="object"?R:{};return D.date=B,D.args=arguments,new U(D)},L=T;L.l=q,L.i=$,L.w=function(B,R){return P(B,{locale:R.$L,utc:R.$u,x:R.$x,$offset:R.$offset})};var U=(function(){function B(D){this.$L=q(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[M]=!0}var R=B.prototype;return R.parse=function(D){this.$d=(function(z){var H=z.date,Y=z.utc;if(H===null)return new Date(NaN);if(L.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var N=H.match(k);if(N){var W=N[2]-1||0,V=(N[7]||"0").substring(0,3);return Y?new Date(Date.UTC(N[1],W,N[3]||1,N[4]||0,N[5]||0,N[6]||0,V)):new Date(N[1],W,N[3]||1,N[4]||0,N[5]||0,N[6]||0,V)}}return new Date(H)})(D),this.init()},R.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()},R.$utils=function(){return L},R.isValid=function(){return this.$d.toString()!==w},R.isSame=function(D,z){var H=P(D);return this.startOf(z)<=H&&H<=this.endOf(z)},R.isAfter=function(D,z){return P(D)Be(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 tse({formatter:e,...n}){return(e||nse)(n)}function ise({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 gq({controlsRef:e,direction:n,levelIndex:t,rowIndex:i,cellIndex:r,size:a}){var u,f,h;const o=ise({direction:n,size:a,rowIndex:i,cellIndex:r,levelIndex:t});if(!o)return;const l=(h=(f=(u=e.current)==null?void 0:u[o.levelIndex])==null?void 0:f[o.rowIndex])==null?void 0:h[o.cellIndex];l&&(l.disabled||l.getAttribute("data-hidden")||l.getAttribute("data-outside")?gq({controlsRef:e,direction:n,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):l.focus())}function rse(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function ase(e){var n;return(n=e.current)==null?void 0:n.map(t=>t.map(i=>i.length))}function A9({controlsRef:e,levelIndex:n,rowIndex:t,cellIndex:i,event:r}){const a=rse(r.key);a&&(r.preventDefault(),gq({controlsRef:e,direction:a,levelIndex:n,rowIndex:t,cellIndex:i,size:ase(e)}))}function Ji(e){return e==null||e===""?e:Be(e).format("YYYY-MM-DD")}function yq(e){return e==null||e===""?e:Be(e).format("YYYY-MM-DD HH:mm:ss")}function t4({minDate:e,maxDate:n}){const t=Be();return!e&&!n?Ji(t):e&&Be(t).isBefore(e)?Ji(e):n&&Be(t).isAfter(n)?Ji(n):Ji(t)}const ose={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},sse=x.createContext(ose);function Ml(){const e=x.use(sse),n=x.useCallback(a=>a||e.locale,[e.locale]),t=x.useCallback(a=>typeof a=="number"?a:e.firstDayOfWeek,[e.firstDayOfWeek]),i=x.useCallback(a=>Array.isArray(a)?a:e.weekendDays,[e.weekendDays]),r=x.useCallback(a=>typeof a=="string"?a:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:n,getFirstDayOfWeek:t,getWeekendDays:i,getLabelSeparator:r}}function lse({value:e,type:n,withTime:t}){const i=t?yq:Ji;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 bq({value:e,type:n,name:t,form:i,withTime:r=!1}){return v.jsx("input",{type:"hidden",value:lse({value:e,type:n,withTime:r}),name:t,form:i})}bq.displayName="@mantine/dates/HiddenDatesInput";var wq={day:"m_396ce5cb"};const kq=(e,{size:n})=>({day:{"--day-size":Ln(n,"day-size")}}),_0=Pe(e=>{const n=ye("Day",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,date:u,disabled:f,__staticSelector:h,weekend:d,outside:p,selected:g,renderDay:b,inRange:w,firstInRange:k,lastInRange:_,hidden:S,static:j,highlightToday:T,fullWidth:A,attributes:O,...M}=n;return v.jsx(Et,{...Ze({name:h||"Day",classes:wq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:O,vars:l,varsResolver:kq,rootSelector:"day"})("day",{style:S?{display:"none"}:void 0}),component:j?"div":"button",disabled:f,"data-today":Be(u).isSame(new Date,"day")||void 0,"data-hidden":S||void 0,"data-highlight-today":T||void 0,"data-disabled":f||void 0,"data-weekend":!f&&!p&&d||void 0,"data-outside":!f&&p||void 0,"data-selected":!f&&g||void 0,"data-in-range":w&&!f||void 0,"data-first-in-range":k&&!f||void 0,"data-last-in-range":_&&!f||void 0,"data-static":j||void 0,"data-full-width":A||void 0,unstyled:o,...M,children:(b==null?void 0:b(u))||Be(u).date()})});_0.classes=wq;_0.varsResolver=kq;_0.displayName="@mantine/dates/Day";function use({locale:e,format:n="dd",firstDayOfWeek:t=1}){const i=Be().day(t),r=[];for(let a=0;a<7;a+=1)typeof n=="string"?r.push(Be(i).add(a,"days").locale(e).format(n)):r.push(n(Be(i).add(a,"days").format("YYYY-MM-DD")));return r}var _q={weekday:"m_18a3eca"};const xq=(e,{size:n})=>({weekdaysRow:{"--wr-fz":ai(n),"--wr-spacing":Yt(n)}}),x0=Pe(e=>{const n=ye("WeekdaysRow",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,locale:u,firstDayOfWeek:f,weekdayFormat:h,cellComponent:d="th",__staticSelector:p,withWeekNumbers:g,attributes:b,...w}=n,k=Ze({name:p||"WeekdaysRow",classes:_q,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l,varsResolver:xq,rootSelector:"weekdaysRow"}),_=Ml(),S=use({locale:_.getLocale(u),format:h,firstDayOfWeek:_.getFirstDayOfWeek(f)}).map((j,T)=>v.jsx(d,{...k("weekday"),children:j},T));return v.jsxs(fe,{component:"tr",...k("weekdaysRow"),...w,children:[g&&v.jsx(d,{...k("weekday"),children:"#"}),S]})});x0.classes=_q;x0.varsResolver=xq;x0.displayName="@mantine/dates/WeekdaysRow";function cse(e,n=1){let t=Be(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 fse(e,n=1){let t=Be(e);for(;t.day()!==n;)t=t.subtract(1,"day");return t.format("YYYY-MM-DD")}function dse({month:e,firstDayOfWeek:n=1,consistentWeeks:t}){const i=Be(Be(e).subtract(Be(e).date()-1,"day").format("YYYY-M-D")),r=i.format("YYYY-MM-DD"),a=cse(i.add(+i.daysInMonth()-1,"day").format("YYYY-MM-DD"),n),o=[];let l=Be(fse(r,n));for(;Be(l).isBefore(a,"day");){const u=[];for(let f=0;f<7;f+=1)u.push(l.format("YYYY-MM-DD")),l=l.add(1,"day");o.push(u)}if(t&&o.length<6){const u=o[o.length-1],f=u[u.length-1];let h=Be(f).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 O9(e,n){return Be(e).format("YYYY-MM")===Be(n).format("YYYY-MM")}function Sq(e,n){return n?Be(e).isAfter(Be(n).subtract(1,"day"),"day"):!0}function Cq(e,n){return n?Be(e).isBefore(Be(n).add(1,"day"),"day"):!0}function hse({dates:e,minDate:n,maxDate:t,getDayProps:i,excludeDate:r,hideOutsideDates:a,month:o}){const l=e.flat().filter(h=>{var d;return Cq(h,t)&&Sq(h,n)&&!(r!=null&&r(h))&&!((d=i==null?void 0:i(h))!=null&&d.disabled)&&(!a||O9(h,o))}),u=l.find(h=>{var d;return(d=i==null?void 0:i(h))==null?void 0:d.selected});if(u)return u;const f=l.find(h=>Be().isSame(h,"date"));return f||l[0]}var Fg={exports:{}},mse=Fg.exports,TM;function pse(){return TM||(TM=1,(function(e,n){(function(t,i){e.exports=i()})(mse,(function(){var t="day";return function(i,r,a){var o=function(f){return f.add(4-f.isoWeekday(),t)},l=r.prototype;l.isoWeekYear=function(){return o(this).year()},l.isoWeek=function(f){if(!this.$utils().u(f))return this.add(7*(f-this.isoWeek()),t);var h,d,p,g,b=o(this),w=(h=this.isoWeekYear(),d=this.$u,p=(d?a.utc:a)().year(h).startOf("year"),g=4-p.isoWeekday(),p.isoWeekday()>4&&(g+=7),p.add(g,t));return b.diff(w,"week")+1},l.isoWeekday=function(f){return this.$utils().u(f)?this.day()||7:this.day(this.day()%7?f:f-7)};var u=l.startOf;l.startOf=function(f,h){var d=this.$utils(),p=!!d.u(h)||h;return d.p(f)==="isoweek"?p?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):u.bind(this)(f,h)}}}))})(Fg)),Fg.exports}var vse=pse();const gse=yt(vse);Be.extend(gse);function yse(e){return Be(e.find(n=>Be(n).day()===1)).isoWeek()}var jq={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const bse={withCellSpacing:!0},Aq=(e,{size:n})=>({weekNumber:{"--wn-fz":ai(n),"--wn-size":Ln(n,"wn-size")}}),Sp=Pe(e=>{const n=ye("Month",bse,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:u,locale:f,firstDayOfWeek:h,weekdayFormat:d,month:p,weekendDays:g,getDayProps:b,excludeDate:w,minDate:k,maxDate:_,renderDay:S,hideOutsideDates:j,hideWeekdays:T,getDayAriaLabel:A,static:O,__getDayRef:M,__onDayKeyDown:$,__onDayClick:q,__onDayMouseEnter:P,__preventFocus:L,__stopPropagation:U,withCellSpacing:G,size:B,highlightToday:R,withWeekNumbers:D,fullWidth:z,attributes:H,...Y}=n,N=Ze({name:u||"Month",classes:jq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:H,vars:l,varsResolver:Aq,rootSelector:"month"}),W=Ml(),V=dse({month:p,firstDayOfWeek:W.getFirstDayOfWeek(h),consistentWeeks:W.consistentWeeks}),I=hse({dates:V,minDate:Ji(k),maxDate:Ji(_),getDayProps:b,excludeDate:w,hideOutsideDates:j,month:p}),{resolvedClassNames:Q,resolvedStyles:ie}=Wi({classNames:t,styles:a,props:n}),re=V.map((Z,le)=>{const ee=Z.map((se,ke)=>{const te=!O9(se,p),$e=(A==null?void 0:A(se))||Be(se).locale(f||W.locale).format("D MMMM YYYY"),xe=b==null?void 0:b(se),Ae=Be(se).isSame(I,"date");return v.jsx("td",{...N("monthCell"),"data-with-spacing":G||void 0,children:v.jsx(_0,{__staticSelector:u||"Month",classNames:Q,styles:ie,attributes:H,unstyled:o,"data-mantine-stop-propagation":U||void 0,highlightToday:R,renderDay:S,date:se,size:B,weekend:W.getWeekendDays(g).includes(Be(se).get("day")),outside:te,hidden:j?te:!1,"aria-label":$e,static:O,fullWidth:z,disabled:(w==null?void 0:w(se))||!Cq(se,Ji(_))||!Sq(se,Ji(k)),ref:ze=>{ze&&(M==null||M(le,ke,ze))},...xe,onKeyDown:ze=>{var we;(we=xe==null?void 0:xe.onKeyDown)==null||we.call(xe,ze),$==null||$(ze,{rowIndex:le,cellIndex:ke,date:se})},onMouseEnter:ze=>{var we;(we=xe==null?void 0:xe.onMouseEnter)==null||we.call(xe,ze),P==null||P(ze,se)},onClick:ze=>{var we;(we=xe==null?void 0:xe.onClick)==null||we.call(xe,ze),q==null||q(ze,se)},onMouseDown:ze=>{var we;(we=xe==null?void 0:xe.onMouseDown)==null||we.call(xe,ze),L&&ze.preventDefault()},tabIndex:L||!Ae?-1:0})},se.toString())});return v.jsxs("tr",{...N("monthRow"),children:[D&&v.jsx("td",{...N("weekNumber"),children:yse(Z)}),ee]},le)});return v.jsxs(fe,{component:"table",...N("month"),size:B,"data-full-width":z||void 0,...Y,children:[!T&&v.jsx("thead",{...N("monthThead"),children:v.jsx(x0,{__staticSelector:u||"Month",locale:f,firstDayOfWeek:h,weekdayFormat:d,withWeekNumbers:D,size:B,classNames:Q,styles:ie,unstyled:o,attributes:H})}),v.jsx("tbody",{...N("monthTbody"),children:re})]})});Sp.classes=jq;Sp.varsResolver=Aq;Sp.displayName="@mantine/dates/Month";var Oq={pickerControl:"m_dc6a3c71"};const Tq=(e,{size:n})=>({pickerControl:{"--dpc-fz":ai(n),"--dpc-size":Ln(n,"dpc-size")}}),Cp=Pe(e=>{const n=ye("PickerControl",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,firstInRange:u,lastInRange:f,inRange:h,__staticSelector:d,selected:p,disabled:g,fullWidth:b,attributes:w,...k}=n;return v.jsx(Et,{...Ze({name:d||"PickerControl",classes:Oq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:Tq,rootSelector:"pickerControl"})("pickerControl"),unstyled:o,"data-picker-control":!0,"data-full-width":b||void 0,"data-selected":p&&!g||void 0,"data-disabled":g||void 0,"data-in-range":h&&!g&&!p||void 0,"data-first-in-range":u&&!g||void 0,"data-last-in-range":f&&!g||void 0,disabled:g,...k})});Cp.classes=Oq;Cp.varsResolver=Tq;Cp.displayName="@mantine/dates/PickerControl";function Eq({year:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&Be(e).isBefore(n,"year")||t&&Be(e).isAfter(t,"year"))}function wse({years:e,minDate:n,maxDate:t,getYearControlProps:i}){const r=e.flat().filter(l=>{var u;return!Eq({year:l,minDate:n,maxDate:t})&&!((u=i==null?void 0:i(l))!=null&&u.disabled)}),a=r.find(l=>{var u;return(u=i==null?void 0:i(l))==null?void 0:u.selected});if(a)return a;const o=r.find(l=>Be().isSame(l,"year"));return o||r[0]}function Mq(e){const n=Be(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=ye("YearsList",kse,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,decade:u,yearsListFormat:f,locale:h,minDate:d,maxDate:p,getYearControlProps:g,__staticSelector:b,__getControlRef:w,__onControlKeyDown:k,__onControlClick:_,__onControlMouseEnter:S,__preventFocus:j,__stopPropagation:T,withCellSpacing:A,fullWidth:O,size:M,attributes:$,...q}=n,P=Ze({name:b||"YearsList",classes:Dq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:$,vars:l,rootSelector:"yearsList"}),L=Ml(),U=Mq(u),G=wse({years:U,minDate:d,maxDate:p,getYearControlProps:g}),B=U.map((R,D)=>{const z=R.map((H,Y)=>{const N=g==null?void 0:g(H),W=Be(H).isSame(G,"year");return v.jsx("td",{...P("yearsListCell"),"data-with-spacing":A||void 0,children:v.jsx(Cp,{...P("yearsListControl"),size:M,unstyled:o,fullWidth:O,"data-mantine-stop-propagation":T||void 0,disabled:Eq({year:H,minDate:d,maxDate:p}),ref:V=>{V&&(w==null||w(D,Y,V))},...N,onKeyDown:V=>{var I;(I=N==null?void 0:N.onKeyDown)==null||I.call(N,V),k==null||k(V,{rowIndex:D,cellIndex:Y,date:H})},onClick:V=>{var I;(I=N==null?void 0:N.onClick)==null||I.call(N,V),_==null||_(V,H)},onMouseEnter:V=>{var I;(I=N==null?void 0:N.onMouseEnter)==null||I.call(N,V),S==null||S(V,H)},onMouseDown:V=>{var I;(I=N==null?void 0:N.onMouseDown)==null||I.call(N,V),j&&V.preventDefault()},tabIndex:j||!W?-1:0,children:(N==null?void 0:N.children)??Be(H).locale(L.getLocale(h)).format(f)})},Y)});return v.jsx("tr",{...P("yearsListRow"),children:z},D)});return v.jsx(fe,{component:"table",size:M,...P("yearsList"),"data-full-width":O||void 0,...q,children:v.jsx("tbody",{children:B})})});S0.classes=Dq;S0.displayName="@mantine/dates/YearsList";function Rq({month:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&Be(e).isBefore(n,"month")||t&&Be(e).isAfter(t,"month"))}function _se({months:e,minDate:n,maxDate:t,getMonthControlProps:i}){const r=e.flat().filter(l=>{var u;return!Rq({month:l,minDate:n,maxDate:t})&&!((u=i==null?void 0:i(l))!=null&&u.disabled)}),a=r.find(l=>{var u;return(u=i==null?void 0:i(l))==null?void 0:u.selected});if(a)return a;const o=r.find(l=>Be().isSame(l,"month"));return o||r[0]}function xse(e){const n=Be(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(Be(n).add(i,"months").format("YYYY-MM-DD")),i+=1;return t}var Pq={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const Sse={monthsListFormat:"MMM",withCellSpacing:!0},C0=Pe(e=>{const n=ye("MonthsList",Sse,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:u,year:f,monthsListFormat:h,locale:d,minDate:p,maxDate:g,getMonthControlProps:b,__getControlRef:w,__onControlKeyDown:k,__onControlClick:_,__onControlMouseEnter:S,__preventFocus:j,__stopPropagation:T,withCellSpacing:A,fullWidth:O,size:M,attributes:$,...q}=n,P=Ze({name:u||"MonthsList",classes:Pq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:$,vars:l,rootSelector:"monthsList"}),L=Ml(),U=xse(f),G=_se({months:U,minDate:Ji(p),maxDate:Ji(g),getMonthControlProps:b}),B=U.map((R,D)=>{const z=R.map((H,Y)=>{const N=b==null?void 0:b(H),W=Be(H).isSame(G,"month");return v.jsx("td",{...P("monthsListCell"),"data-with-spacing":A||void 0,children:v.jsx(Cp,{...P("monthsListControl"),size:M,unstyled:o,fullWidth:O,__staticSelector:u||"MonthsList","data-mantine-stop-propagation":T||void 0,disabled:Rq({month:H,minDate:Ji(p),maxDate:Ji(g)}),ref:V=>{V&&(w==null||w(D,Y,V))},...N,onKeyDown:V=>{var I;(I=N==null?void 0:N.onKeyDown)==null||I.call(N,V),k==null||k(V,{rowIndex:D,cellIndex:Y,date:H})},onClick:V=>{var I;(I=N==null?void 0:N.onClick)==null||I.call(N,V),_==null||_(V,H)},onMouseEnter:V=>{var I;(I=N==null?void 0:N.onMouseEnter)==null||I.call(N,V),S==null||S(V,H)},onMouseDown:V=>{var I;(I=N==null?void 0:N.onMouseDown)==null||I.call(N,V),j&&V.preventDefault()},tabIndex:j||!W?-1:0,children:(N==null?void 0:N.children)??Be(H).locale(L.getLocale(d)).format(h)})},Y)});return v.jsx("tr",{...P("monthsListRow"),children:z},D)});return v.jsx(fe,{component:"table",size:M,...P("monthsList"),"data-full-width":O||void 0,...q,children:v.jsx("tbody",{children:B})})});C0.classes=Pq;C0.displayName="@mantine/dates/MonthsList";var Nq={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const Cse={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:["previous","level","next"]},$q=(e,{size:n})=>({calendarHeader:{"--dch-control-size":Ln(n,"dch-control-size"),"--dch-fz":ai(n)}}),ws=Pe(e=>{const n=ye("CalendarHeader",Cse,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,nextIcon:u,previousIcon:f,nextLabel:h,previousLabel:d,onNext:p,onPrevious:g,onLevelClick:b,label:w,nextDisabled:k,previousDisabled:_,hasNextLevel:S,levelControlAriaLabel:j,withNext:T,withPrevious:A,headerControlsOrder:O,fullWidth:M,__staticSelector:$,__preventFocus:q,__stopPropagation:P,attributes:L,...U}=n,G=Ze({name:$||"CalendarHeader",classes:Nq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:L,vars:l,varsResolver:$q,rootSelector:"calendarHeader"}),B=q?Y=>Y.preventDefault():void 0,R=A&&x.createElement(Et,{...G("calendarHeaderControl"),key:"previous","data-direction":"previous","aria-label":d,onClick:g,unstyled:o,onMouseDown:B,disabled:_,"data-disabled":_||void 0,tabIndex:q||_?-1:0,"data-mantine-stop-propagation":P||void 0},f||v.jsx(e1,{...G("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})),D=x.createElement(Et,{component:S?"button":"div",...G("calendarHeaderLevel"),key:"level",onClick:S?b:void 0,unstyled:o,onMouseDown:S?B:void 0,disabled:!S,"data-static":!S||void 0,"aria-label":j,tabIndex:q||!S?-1:0,"data-mantine-stop-propagation":P||void 0},w),z=T&&x.createElement(Et,{...G("calendarHeaderControl"),key:"next","data-direction":"next","aria-label":h,onClick:p,unstyled:o,onMouseDown:B,disabled:k,"data-disabled":k||void 0,tabIndex:q||k?-1:0,"data-mantine-stop-propagation":P||void 0},u||v.jsx(e1,{...G("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})),H=O.map(Y=>Y==="previous"?R:Y==="level"?D:Y==="next"?z:null);return v.jsx(fe,{...G("calendarHeader"),"data-full-width":M||void 0,...U,children:H})});ws.classes=Nq;ws.varsResolver=$q;ws.displayName="@mantine/dates/CalendarHeader";function jse(e){const n=Mq(e);return[n[0][0],n[3][0]]}const Ase={decadeLabelFormat:"YYYY"},j0=Pe(e=>{const{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:u,__onControlClick:f,__onControlMouseEnter:h,withCellSpacing:d,__preventFocus:p,nextIcon:g,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:S,nextDisabled:j,previousDisabled:T,levelControlAriaLabel:A,withNext:O,withPrevious:M,headerControlsOrder:$,decadeLabelFormat:q,classNames:P,styles:L,unstyled:U,__staticSelector:G,__stopPropagation:B,size:R,fullWidth:D,attributes:z,...H}=ye("DecadeLevel",Ase,e),Y=Ml(),[N,W]=jse(n),V={__staticSelector:G||"DecadeLevel",classNames:P,styles:L,unstyled:U,size:R,attributes:z},I=typeof j=="boolean"?j:r?!Be(W).endOf("year").isBefore(r):!1,Q=typeof T=="boolean"?T:i?!Be(N).startOf("year").isAfter(i):!1,ie=(re,Z)=>Be(re).locale(t||Y.locale).format(Z);return v.jsxs(fe,{"data-decade-level":!0,size:R,...H,children:[v.jsx(ws,{label:typeof q=="function"?q(N,W):`${ie(N,q)} – ${ie(W,q)}`,__preventFocus:p,__stopPropagation:B,nextIcon:g,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:S,nextDisabled:I,previousDisabled:Q,hasNextLevel:!1,levelControlAriaLabel:A,withNext:O,withPrevious:M,headerControlsOrder:$,fullWidth:D,...V}),v.jsx(S0,{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:u,__onControlClick:f,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:B,withCellSpacing:d,fullWidth:D,...V})]})});j0.classes={...S0.classes,...ws.classes};j0.displayName="@mantine/dates/DecadeLevel";const Ose={yearLabelFormat:"YYYY"},A0=Pe(e=>{const{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:u,__onControlClick:f,__onControlMouseEnter:h,withCellSpacing:d,__preventFocus:p,nextIcon:g,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:S,onLevelClick:j,nextDisabled:T,previousDisabled:A,hasNextLevel:O,levelControlAriaLabel:M,withNext:$,withPrevious:q,headerControlsOrder:P,yearLabelFormat:L,__staticSelector:U,__stopPropagation:G,size:B,classNames:R,styles:D,unstyled:z,fullWidth:H,attributes:Y,...N}=ye("YearLevel",Ose,e),W=Ml(),V={__staticSelector:U||"YearLevel",classNames:R,styles:D,unstyled:z,size:B,attributes:Y},I=typeof T=="boolean"?T:r?!Be(n).endOf("year").isBefore(r):!1,Q=typeof A=="boolean"?A:i?!Be(n).startOf("year").isAfter(i):!1;return v.jsxs(fe,{"data-year-level":!0,size:B,...N,children:[v.jsx(ws,{label:typeof L=="function"?L(n):Be(n).locale(t||W.locale).format(L),__preventFocus:p,__stopPropagation:G,nextIcon:g,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:S,onLevelClick:j,nextDisabled:I,previousDisabled:Q,hasNextLevel:O,levelControlAriaLabel:M,withNext:$,withPrevious:q,headerControlsOrder:P,fullWidth:H,...V}),v.jsx(C0,{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:u,__onControlClick:f,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:G,withCellSpacing:d,fullWidth:H,...V})]})});A0.classes={...ws.classes,...C0.classes};A0.displayName="@mantine/dates/YearLevel";const Tse={monthLabelFormat:"MMMM YYYY"},O0=Pe(e=>{const{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:u,maxDate:f,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:g,__getDayRef:b,__onDayKeyDown:w,__onDayClick:k,__onDayMouseEnter:_,withCellSpacing:S,highlightToday:j,withWeekNumbers:T,__preventFocus:A,__stopPropagation:O,nextIcon:M,previousIcon:$,nextLabel:q,previousLabel:P,onNext:L,onPrevious:U,onLevelClick:G,nextDisabled:B,previousDisabled:R,hasNextLevel:D,levelControlAriaLabel:z,withNext:H,withPrevious:Y,headerControlsOrder:N,monthLabelFormat:W,classNames:V,styles:I,unstyled:Q,__staticSelector:ie,size:re,static:Z,fullWidth:le,attributes:ee,...se}=ye("MonthLevel",Tse,e),ke=Ml(),te={__staticSelector:ie||"MonthLevel",classNames:V,styles:I,unstyled:Q,size:re,attributes:ee},$e=typeof B=="boolean"?B:f?!Be(n).endOf("month").isBefore(f):!1,xe=typeof R=="boolean"?R:u?!Be(n).startOf("month").isAfter(u):!1;return v.jsxs(fe,{"data-month-level":!0,size:re,...se,children:[v.jsx(ws,{label:typeof W=="function"?W(n):Be(n).locale(t||ke.locale).format(W),__preventFocus:A,__stopPropagation:O,nextIcon:M,previousIcon:$,nextLabel:q,previousLabel:P,onNext:L,onPrevious:U,onLevelClick:G,nextDisabled:$e,previousDisabled:xe,hasNextLevel:D,levelControlAriaLabel:z,withNext:H,withPrevious:Y,headerControlsOrder:N,fullWidth:le,...te}),v.jsx(Sp,{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:u,maxDate:f,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:g,__getDayRef:b,__onDayKeyDown:w,__onDayClick:k,__onDayMouseEnter:_,__preventFocus:A,__stopPropagation:O,static:Z,withCellSpacing:S,highlightToday:j,withWeekNumbers:T,fullWidth:le,...te})]})});O0.classes={...Sp.classes,...ws.classes};O0.displayName="@mantine/dates/MonthLevel";var zq={levelsGroup:"m_30b26e33"};const Dl=Pe(e=>{const n=ye("LevelsGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:u,fullWidth:f,attributes:h,...d}=n;return v.jsx(fe,{...Ze({name:u||"LevelsGroup",classes:zq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,rootSelector:"levelsGroup"})("levelsGroup"),"data-full-width":f||void 0,...d})});Dl.classes=zq;Dl.displayName="@mantine/dates/LevelsGroup";const Ese={numberOfColumns:1},T0=Pe(e=>{const{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__onControlClick:l,__onControlMouseEnter:u,withCellSpacing:f,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:g,previousLabel:b,onNext:w,onPrevious:k,nextDisabled:_,previousDisabled:S,headerControlsOrder:j,classNames:T,styles:A,unstyled:O,__staticSelector:M,__stopPropagation:$,numberOfColumns:q,levelControlAriaLabel:P,decadeLabelFormat:L,size:U,fullWidth:G,vars:B,attributes:R,...D}=ye("DecadeLevelGroup",Ese,e),z=x.useRef([]),H=Array(q).fill(0).map((Y,N)=>{const W=Be(n).add(N*10,"years").format("YYYY-MM-DD");return v.jsx(j0,{size:U,yearsListFormat:a,decade:W,withNext:N===q-1,withPrevious:N===0,decadeLabelFormat:L,__onControlClick:l,__onControlMouseEnter:u,__onControlKeyDown:(V,I)=>A9({levelIndex:N,rowIndex:I.rowIndex,cellIndex:I.cellIndex,event:V,controlsRef:z}),__getControlRef:(V,I,Q)=>{Array.isArray(z.current[N])||(z.current[N]=[]),Array.isArray(z.current[N][V])||(z.current[N][V]=[]),z.current[N][V][I]=Q},levelControlAriaLabel:typeof P=="function"?P(W):P,locale:t,minDate:i,maxDate:r,__preventFocus:h,__stopPropagation:$,nextIcon:d,previousIcon:p,nextLabel:g,previousLabel:b,onNext:w,onPrevious:k,nextDisabled:_,previousDisabled:S,getYearControlProps:o,__staticSelector:M||"DecadeLevelGroup",classNames:T,styles:A,unstyled:O,withCellSpacing:f,headerControlsOrder:j,fullWidth:G,attributes:R},N)});return v.jsx(Dl,{classNames:T,styles:A,__staticSelector:M||"DecadeLevelGroup",size:U,unstyled:O,fullWidth:G,attributes:R,...D,children:H})});T0.classes={...Dl.classes,...j0.classes};T0.displayName="@mantine/dates/DecadeLevelGroup";const Mse={numberOfColumns:1},E0=Pe(e=>{const{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__onControlClick:l,__onControlMouseEnter:u,withCellSpacing:f,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:g,previousLabel:b,onNext:w,onPrevious:k,onLevelClick:_,nextDisabled:S,previousDisabled:j,hasNextLevel:T,headerControlsOrder:A,classNames:O,styles:M,unstyled:$,__staticSelector:q,__stopPropagation:P,numberOfColumns:L,levelControlAriaLabel:U,yearLabelFormat:G,size:B,fullWidth:R,vars:D,attributes:z,...H}=ye("YearLevelGroup",Mse,e),Y=x.useRef([]),N=Array(L).fill(0).map((W,V)=>{const I=Be(n).add(V,"years").format("YYYY-MM-DD");return v.jsx(A0,{size:B,monthsListFormat:a,year:I,withNext:V===L-1,withPrevious:V===0,yearLabelFormat:G,__stopPropagation:P,__onControlClick:l,__onControlMouseEnter:u,__onControlKeyDown:(Q,ie)=>A9({levelIndex:V,rowIndex:ie.rowIndex,cellIndex:ie.cellIndex,event:Q,controlsRef:Y}),__getControlRef:(Q,ie,re)=>{Array.isArray(Y.current[V])||(Y.current[V]=[]),Array.isArray(Y.current[V][Q])||(Y.current[V][Q]=[]),Y.current[V][Q][ie]=re},levelControlAriaLabel:typeof U=="function"?U(I):U,locale:t,minDate:i,maxDate:r,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:g,previousLabel:b,onNext:w,onPrevious:k,onLevelClick:_,nextDisabled:S,previousDisabled:j,hasNextLevel:T,getMonthControlProps:o,classNames:O,styles:M,unstyled:$,__staticSelector:q||"YearLevelGroup",withCellSpacing:f,headerControlsOrder:A,fullWidth:R,attributes:z},V)});return v.jsx(Dl,{classNames:O,styles:M,__staticSelector:q||"YearLevelGroup",size:B,unstyled:$,fullWidth:R,attributes:z,...H,children:N})});E0.classes={...A0.classes,...Dl.classes};E0.displayName="@mantine/dates/YearLevelGroup";const Dse={numberOfColumns:1},M0=Pe(e=>{const{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:u,maxDate:f,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:g,__onDayClick:b,__onDayMouseEnter:w,withCellSpacing:k,highlightToday:_,withWeekNumbers:S,__preventFocus:j,nextIcon:T,previousIcon:A,nextLabel:O,previousLabel:M,onNext:$,onPrevious:q,onLevelClick:P,nextDisabled:L,previousDisabled:U,hasNextLevel:G,headerControlsOrder:B,classNames:R,styles:D,unstyled:z,numberOfColumns:H,levelControlAriaLabel:Y,monthLabelFormat:N,__staticSelector:W,__stopPropagation:V,size:I,static:Q,fullWidth:ie,vars:re,attributes:Z,...le}=ye("MonthLevelGroup",Dse,e),ee=x.useRef([]),se=Array(H).fill(0).map((ke,te)=>{const $e=Be(n).add(te,"months").format("YYYY-MM-DD");return v.jsx(O0,{month:$e,withNext:te===H-1,withPrevious:te===0,monthLabelFormat:N,__stopPropagation:V,__onDayClick:b,__onDayMouseEnter:w,__onDayKeyDown:(xe,Ae)=>A9({levelIndex:te,rowIndex:Ae.rowIndex,cellIndex:Ae.cellIndex,event:xe,controlsRef:ee}),__getDayRef:(xe,Ae,ze)=>{Array.isArray(ee.current[te])||(ee.current[te]=[]),Array.isArray(ee.current[te][xe])||(ee.current[te][xe]=[]),ee.current[te][xe][Ae]=ze},levelControlAriaLabel:typeof Y=="function"?Y($e):Y,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:u,maxDate:f,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:g,__preventFocus:j,nextIcon:T,previousIcon:A,nextLabel:O,previousLabel:M,onNext:$,onPrevious:q,onLevelClick:P,nextDisabled:L,previousDisabled:U,hasNextLevel:G,classNames:R,styles:D,unstyled:z,__staticSelector:W||"MonthLevelGroup",size:I,static:Q,withCellSpacing:k,highlightToday:_,withWeekNumbers:S,headerControlsOrder:B,fullWidth:ie,attributes:Z},te)});return v.jsx(Dl,{classNames:R,styles:D,__staticSelector:W||"MonthLevelGroup",size:I,fullWidth:ie,attributes:Z,...le,children:se})});M0.classes={...Dl.classes,...O0.classes};M0.displayName="@mantine/dates/MonthLevelGroup";var Lq={input:"m_6fa5e2aa"};const id=Pe(e=>{const{inputProps:n,wrapperProps:t,placeholder:i,classNames:r,styles:a,unstyled:o,popoverProps:l,modalProps:u,dropdownType:f,children:h,formattedValue:d,dropdownHandlers:p,dropdownOpened:g,onClick:b,clearable:w,clearSectionMode:k,onClear:_,clearButtonProps:S,rightSection:j,shouldClear:T,readOnly:A,disabled:O,value:M,name:$,form:q,type:P,onDropdownClose:L,withTime:U,...G}=$I("PickerInputBase",{size:"sm"},e),B=v.jsx(Xt.ClearButton,{onClick:_,unstyled:o,...S}),R=()=>{P==="range"&&Array.isArray(M)&&M[0]&&!M[1]&&_(),p.close()};return v.jsxs(v.Fragment,{children:[f==="modal"&&!A&&v.jsx(Gi,{opened:g,onClose:R,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:o,...u,children:h}),v.jsx(Xt.Wrapper,{...t,children:v.jsxs(Sn,{position:"bottom-start",opened:g,trapFocus:!0,returnFocus:!1,unstyled:o,onClose:L,...l,disabled:(l==null?void 0:l.disabled)||f==="modal"||A,onChange:D=>{var z;D||((z=l==null?void 0:l.onClose)==null||z.call(l),R())},children:[v.jsx(Sn.Target,{children:v.jsx(Xt,{"data-dates-input":!0,"data-read-only":A||void 0,disabled:O,component:"button",type:"button",multiline:!0,onClick:D=>{b==null||b(D),p.toggle()},__clearSection:B,__clearable:w&&T&&!A&&!O,__clearSectionMode:k,rightSection:j,...n,classNames:{...r,input:vn(Lq.input,r==null?void 0:r.input)},...G,children:d||v.jsx(Xt.Placeholder,{error:n.error,unstyled:o,classNames:r,styles:a,__staticSelector:n.__staticSelector,children:i})})}),v.jsx(Sn.Dropdown,{"data-dates-dropdown":!0,children:h})]})}),v.jsx(bq,{value:M,name:$,form:q,type:P,withTime:U})]})});id.classes=Lq;id.displayName="@mantine/dates/PickerInputBase";const EM=e=>e==="range"?[null,null]:e==="multiple"?[]:null,MM=(e,n)=>{const t=n?yq:Ji;return Array.isArray(e)?e.map(t):t(e)};function T9({type:e,value:n,defaultValue:t,onChange:i,withTime:r=!1}){const a=x.useRef(e),[o,l,u]=Ai({value:MM(n,r),defaultValue:MM(t,r),finalValue:EM(e),onChange:i});let f=o;return a.current!==e&&(a.current=e,n===void 0&&(f=t!==void 0?t:EM(e),l(f))),[f,l,u]}function t_(e,n){return e?e==="month"?0:e==="year"?1:2:n||0}function Rse(e){return e===0?"month":e===1?"year":"decade"}function kh(e,n,t){return Rse(Jo(t_(e,0),t_(n,0),t_(t,2)))}const Pse={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},rd=Pe(e=>{const n=ye("Calendar",Pse,e),{vars:t,maxLevel:i,minLevel:r,defaultLevel:a,level:o,onLevelChange:l,date:u,defaultDate:f,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:g,nextLabel:b,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:S,onMonthMouseEnter:j,headerControlsOrder:T,__updateDateOnYearSelect:A,__updateDateOnMonthSelect:O,__setDateRef:M,__setLevelRef:$,firstDayOfWeek:q,weekdayFormat:P,weekendDays:L,getDayProps:U,excludeDate:G,renderDay:B,hideOutsideDates:R,hideWeekdays:D,getDayAriaLabel:z,monthLabelFormat:H,nextIcon:Y,previousIcon:N,__onDayClick:W,__onDayMouseEnter:V,withCellSpacing:I,highlightToday:Q,withWeekNumbers:ie,monthsListFormat:re,getMonthControlProps:Z,yearLabelFormat:le,yearsListFormat:ee,getYearControlProps:se,decadeLabelFormat:ke,classNames:te,styles:$e,unstyled:xe,minDate:Ae,maxDate:ze,locale:we,__staticSelector:Ce,size:Ne,__preventFocus:he,__stopPropagation:He,onNextDecade:Ye,onPreviousDecade:We,onNextYear:Qe,onPreviousYear:Je,onNextMonth:oe,onPreviousMonth:be,static:Ke,enableKeyboardNavigation:en,fullWidth:je,attributes:an,ref:pn,...Dn}=n,{resolvedClassNames:bn,resolvedStyles:sn}=Wi({classNames:te,styles:$e,props:n}),[nn,$n]=Ai({value:o?kh(o,r,i):void 0,defaultValue:a?kh(a,r,i):void 0,finalValue:kh(void 0,r,i),onChange:l}),[De,Fe]=T9({type:"default",value:Ji(u),defaultValue:Ji(f),onChange:h});x.useImperativeHandle(M,()=>rn=>{Fe(rn)}),x.useImperativeHandle($,()=>rn=>{$n(rn)});const Vn={__staticSelector:Ce||"Calendar",styles:sn,classNames:bn,unstyled:xe,size:Ne,attributes:an},En=p||d||1,gn=x.useRef(null);if(gn.current===null){const rn=new Date;gn.current=Ae&&Be(rn).isAfter(Ae)?Ae:Be(rn).format("YYYY-MM-DD")}const xn=De||gn.current,at=()=>{const rn=Be(xn).add(En,"month").format("YYYY-MM-DD");oe==null||oe(rn),Fe(rn)},Mt=()=>{const rn=Be(xn).subtract(En,"month").format("YYYY-MM-DD");be==null||be(rn),Fe(rn)},qe=()=>{const rn=Be(xn).add(En,"year").format("YYYY-MM-DD");Qe==null||Qe(rn),Fe(rn)},Ue=()=>{const rn=Be(xn).subtract(En,"year").format("YYYY-MM-DD");Je==null||Je(rn),Fe(rn)},In=()=>{const rn=Be(xn).add(10*En,"year").format("YYYY-MM-DD");Ye==null||Ye(rn),Fe(rn)},ot=()=>{const rn=Be(xn).subtract(10*En,"year").format("YYYY-MM-DD");We==null||We(rn),Fe(rn)},Pn=x.useRef(null);return x.useEffect(()=>{if(!en||Ke)return;const rn=on=>{var Xn;if(!((Xn=Pn.current)!=null&&Xn.contains(document.activeElement)))return;const ln=on.ctrlKey||on.metaKey,Kn=on.shiftKey;switch(on.key){case"ArrowUp":ln&&Kn?(on.preventDefault(),ot()):ln&&(on.preventDefault(),Ue());break;case"ArrowDown":ln&&Kn?(on.preventDefault(),In()):ln&&(on.preventDefault(),qe());break;case"y":case"Y":nn==="month"&&(on.preventDefault(),$n("year"));break}};return document.addEventListener("keydown",rn),()=>{document.removeEventListener("keydown",rn)}},[en,Ke,nn,qe,Ue,In,ot]),v.jsxs(fe,{ref:Ht(Pn,pn),size:Ne,"data-calendar":!0,"data-full-width":je||void 0,...Dn,children:[nn==="month"&&v.jsx(M0,{month:xn,minDate:Ae,maxDate:ze,firstDayOfWeek:q,weekdayFormat:P,weekendDays:L,getDayProps:U,excludeDate:G,renderDay:B,hideOutsideDates:R,hideWeekdays:D,getDayAriaLabel:z,onNext:at,onPrevious:Mt,hasNextLevel:i!=="month",onLevelClick:()=>$n("year"),numberOfColumns:d,locale:we,levelControlAriaLabel:g==null?void 0:g.monthLevelControl,nextLabel:(g==null?void 0:g.nextMonth)??b,nextIcon:Y,previousLabel:(g==null?void 0:g.previousMonth)??w,previousIcon:N,monthLabelFormat:H,__onDayClick:W,__onDayMouseEnter:V,__preventFocus:he,__stopPropagation:He,static:Ke,withCellSpacing:I,highlightToday:Q,withWeekNumbers:ie,headerControlsOrder:T,fullWidth:je,...Vn}),nn==="year"&&v.jsx(E0,{year:xn,numberOfColumns:d,minDate:Ae,maxDate:ze,monthsListFormat:re,getMonthControlProps:Z,locale:we,onNext:qe,onPrevious:Ue,hasNextLevel:i!=="month"&&i!=="year",onLevelClick:()=>$n("decade"),levelControlAriaLabel:g==null?void 0:g.yearLevelControl,nextLabel:(g==null?void 0:g.nextYear)??b,nextIcon:Y,previousLabel:(g==null?void 0:g.previousYear)??w,previousIcon:N,yearLabelFormat:le,__onControlMouseEnter:j,__onControlClick:(rn,on)=>{O&&Fe(on),$n(kh("month",r,i)),_==null||_(on)},__preventFocus:he,__stopPropagation:He,withCellSpacing:I,headerControlsOrder:T,fullWidth:je,...Vn}),nn==="decade"&&v.jsx(T0,{decade:xn,minDate:Ae,maxDate:ze,yearsListFormat:ee,getYearControlProps:se,locale:we,onNext:In,onPrevious:ot,numberOfColumns:d,nextLabel:(g==null?void 0:g.nextDecade)??b,nextIcon:Y,previousLabel:(g==null?void 0:g.previousDecade)??w,previousIcon:N,decadeLabelFormat:ke,__onControlMouseEnter:S,__onControlClick:(rn,on)=>{A&&Fe(on),$n(kh("year",r,i)),k==null||k(on)},__preventFocus:he,__stopPropagation:He,withCellSpacing:I,headerControlsOrder:T,fullWidth:je,...Vn})]})});rd.classes={...T0.classes,...E0.classes,...M0.classes};rd.displayName="@mantine/dates/Calendar";function D0(e){const{maxLevel:n,minLevel:t,defaultLevel:i,level:r,onLevelChange:a,nextIcon:o,previousIcon:l,date:u,defaultDate:f,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:g,nextLabel:b,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:S,onMonthMouseEnter:j,onNextMonth:T,onPreviousMonth:A,onNextYear:O,onPreviousYear:M,onNextDecade:$,onPreviousDecade:q,withCellSpacing:P,highlightToday:L,__updateDateOnYearSelect:U,__updateDateOnMonthSelect:G,__setDateRef:B,__setLevelRef:R,withWeekNumbers:D,headerControlsOrder:z,firstDayOfWeek:H,weekdayFormat:Y,weekendDays:N,getDayProps:W,excludeDate:V,renderDay:I,hideOutsideDates:Q,hideWeekdays:ie,getDayAriaLabel:re,monthLabelFormat:Z,monthsListFormat:le,getMonthControlProps:ee,yearLabelFormat:se,yearsListFormat:ke,getYearControlProps:te,decadeLabelFormat:$e,allowSingleDateInRange:xe,allowDeselect:Ae,minDate:ze,maxDate:we,locale:Ce,...Ne}=e;return{calendarProps:{maxLevel:n,minLevel:t,defaultLevel:i,level:r,onLevelChange:a,nextIcon:o,previousIcon:l,date:u,defaultDate:f,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:g,nextLabel:b,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:S,onMonthMouseEnter:j,onNextMonth:T,onPreviousMonth:A,onNextYear:O,onPreviousYear:M,onNextDecade:$,onPreviousDecade:q,withCellSpacing:P,highlightToday:L,__updateDateOnYearSelect:U,__updateDateOnMonthSelect:G,__setDateRef:B,withWeekNumbers:D,headerControlsOrder:z,firstDayOfWeek:H,weekdayFormat:Y,weekendDays:N,getDayProps:W,excludeDate:V,renderDay:I,hideOutsideDates:Q,hideWeekdays:ie,getDayAriaLabel:re,monthLabelFormat:Z,monthsListFormat:le,getMonthControlProps:ee,yearLabelFormat:se,yearsListFormat:ke,getYearControlProps:te,decadeLabelFormat:$e,allowSingleDateInRange:xe,allowDeselect:Ae,minDate:ze,maxDate:we,locale:Ce},others:Ne}}function DM(e,n){const t=[...n].sort((i,r)=>Be(i).isAfter(Be(r))?1:-1);return Be(t[0]).startOf("day").subtract(1,"ms").isBefore(e)&&Be(t[1]).endOf("day").add(1,"ms").isAfter(e)}function Iq({type:e,level:n,value:t,defaultValue:i,onChange:r,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:l}){const[u,f]=T9({type:e,value:t,defaultValue:i,onChange:r}),[h,d]=x.useState(e==="range"&&u[0]&&!u[1]?u[0]:null),[p,g]=x.useState(null),b=A=>{if(e==="range"){if(h&&!u[1]){if(Be(A).isSame(h,n)&&!a){d(null),g(null),f([null,null]);return}const O=[A,h];O.sort((M,$)=>Be(M).isAfter(Be($))?1:-1),f(O),g(null),d(null);return}if(u[0]&&!u[1]&&Be(A).isSame(u[0],n)&&!a){d(null),g(null),f([null,null]);return}f([A,null]),g(null),d(A);return}if(e==="multiple"){u.some(O=>Be(O).isSame(A,n))?f(u.filter(O=>!Be(O).isSame(A,n))):f([...u,A]);return}u&&o&&Be(A).isSame(u,n)?f(null):f(A)},w=A=>h&&p?DM(A,[p,h]):u[0]&&u[1]?DM(A,u):!1,k=e==="range"?A=>{l==null||l(A),g(null)}:l,_=A=>u[0]&&Be(A).isSame(u[0],n)?!(p&&Be(p).isBefore(u[0])):!1,S=A=>u[1]?Be(A).isSame(u[1],n):!u[0]||!p?!1:Be(p).isBefore(u[0])&&Be(A).isSame(u[0],n),j=A=>{if(e==="range")return{selected:u.some(M=>M&&Be(M).isSame(A,n)),inRange:w(A),firstInRange:_(A),lastInRange:S(A),"data-autofocus":!!u[0]&&Be(u[0]).isSame(A,n)||void 0};if(e==="multiple")return{selected:u.some(M=>M&&Be(M).isSame(A,n)),"data-autofocus":!!u[0]&&Be(u[0]).isSame(A,n)||void 0};const O=Be(u).isSame(A,n);return{selected:O,"data-autofocus":O||void 0}},T=e==="range"&&h?g:()=>{};return x.useEffect(()=>{if(e==="range")if(u[0]&&!u[1])d(u[0]);else{const A=u[0]==null&&u[1]==null,O=u[0]!=null&&u[1]!=null;(A||O)&&(d(null),g(null))}},[u]),{onDateChange:b,onRootMouseLeave:k,onHoveredDateChange:T,getControlProps:j,_value:u,setValue:f}}var Bq={monthPickerRoot:"m_53c9e871",presetsList:"m_cccb8ff3",presetButton:"m_7b4fbf50"};const Fq=(e,{size:n})=>({monthPickerRoot:{"--preset-font-size":ai(n)}}),Nse={type:"default"},jp=Pe(e=>{const n=ye("MonthPicker",Nse,e),{classNames:t,styles:i,vars:r,type:a,defaultValue:o,value:l,onChange:u,__staticSelector:f,getMonthControlProps:h,allowSingleDateInRange:d,allowDeselect:p,onMouseLeave:g,onMonthSelect:b,__updateDateOnMonthSelect:w,__onPresetSelect:k,__stopPropagation:_,presets:S,className:j,style:T,unstyled:A,size:O,attributes:M,onLevelChange:$,...q}=n,{calendarProps:P,others:L}=D0(q),U=x.useRef(null),G=x.useRef(null),B=Ze({name:f||"MonthPicker",classes:Bq,props:n,className:j,style:T,classNames:t,styles:i,unstyled:A,attributes:M,rootSelector:S?"monthPickerRoot":void 0,varsResolver:Fq,vars:r}),{onDateChange:R,onRootMouseLeave:D,onHoveredDateChange:z,getControlProps:H,setValue:Y}=Iq({type:a,level:"month",allowDeselect:p,allowSingleDateInRange:d,value:l,defaultValue:o,onChange:u,onMouseLeave:g}),{resolvedClassNames:N,resolvedStyles:W}=Wi({classNames:t,styles:i,props:n}),V=v.jsx(rd,{classNames:N,styles:W,size:O,...P,...S?{}:L,minLevel:"year",__updateDateOnMonthSelect:w??!1,__staticSelector:f||"MonthPicker",onMouseLeave:D,onMonthMouseEnter:(ie,re)=>z(re),onMonthSelect:ie=>{R(ie),b==null||b(ie)},getMonthControlProps:ie=>({...H(ie),...h==null?void 0:h(ie)}),onLevelChange:$,__setDateRef:U,__setLevelRef:G,__stopPropagation:_,attributes:M,...S?{}:{className:j,style:T}});if(!S)return V;const I=ie=>{var Z,le;const re=Array.isArray(ie)?ie[0]:ie;re!==void 0&&((Z=U.current)==null||Z.call(U,re),(le=G.current)==null||le.call(G,"year"),k?k(re):Y(ie))},Q=S.map((ie,re)=>v.jsx(Et,{...B("presetButton"),onClick:()=>I(ie.value),onMouseDown:Z=>Z.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:ie.label},re));return v.jsxs(fe,{...B("monthPickerRoot"),size:O,...L,children:[v.jsx("div",{...B("presetsList"),children:Q}),V]})});jp.classes={...rd.classes,...Bq};jp.varsResolver=Fq;jp.displayName="@mantine/dates/MonthPicker";var $se={datePickerRoot:"m_765a40cf",presetsList:"m_d6a681e1",presetButton:"m_acd30b22"};const qq=(e,{size:n})=>({datePickerRoot:{"--preset-font-size":ai(n)}}),zse={type:"default",defaultLevel:"month",numberOfColumns:1,size:"sm"},Ap=Pe(e=>{const n=ye("DatePicker",zse,e),{allowDeselect:t,allowSingleDateInRange:i,value:r,defaultValue:a,onChange:o,onMouseLeave:l,classNames:u,styles:f,__staticSelector:h,__onDayClick:d,__onDayMouseEnter:p,__onPresetSelect:g,__stopPropagation:b,presets:w,className:k,style:_,unstyled:S,size:j,vars:T,attributes:A,...O}=n,{calendarProps:M,others:$}=D0(O),q=x.useRef(null),P=x.useRef(null),L=Ze({name:h||"DatePicker",classes:$se,props:n,className:k,style:_,classNames:u,styles:f,unstyled:S,attributes:A,rootSelector:w?"datePickerRoot":void 0,varsResolver:qq,vars:T}),{onDateChange:U,onRootMouseLeave:G,onHoveredDateChange:B,getControlProps:R,_value:D,setValue:z}=Iq({type:$.type,level:"day",allowDeselect:t,allowSingleDateInRange:i,value:r,defaultValue:a,onChange:o,onMouseLeave:l}),{resolvedClassNames:H,resolvedStyles:Y}=Wi({classNames:u,styles:f,props:n}),N=v.jsx(rd,{classNames:H,styles:Y,__staticSelector:h||"DatePicker",onMouseLeave:G,size:j,...M,...w?{}:$,__stopPropagation:b,__setDateRef:q,__setLevelRef:P,minLevel:M.minLevel||"month",__onDayMouseEnter:(I,Q)=>{B(Q),p==null||p(I,Q)},__onDayClick:(I,Q)=>{U(Q),d==null||d(I,Q)},getDayProps:I=>{var Q;return{...R(I),...(Q=M.getDayProps)==null?void 0:Q.call(M,I)}},getMonthControlProps:I=>{var Q;return{selected:typeof D=="string"?O9(I,D):!1,...(Q=M.getMonthControlProps)==null?void 0:Q.call(M,I)}},getYearControlProps:I=>{var Q;return{selected:typeof D=="string"?Be(I).isSame(D,"year"):!1,...(Q=M.getYearControlProps)==null?void 0:Q.call(M,I)}},hideOutsideDates:M.hideOutsideDates??M.numberOfColumns!==1,attributes:A,...w?{}:{className:k,style:_}});if(!w)return N;const W=I=>{var ie,re;const Q=Array.isArray(I)?I[0]:I;Q!==void 0&&((ie=q.current)==null||ie.call(q,Q),(re=P.current)==null||re.call(P,"month"),g?g(Q):z(I))},V=w.map((I,Q)=>v.jsx(Et,{...L("presetButton"),onClick:()=>W(I.value),onMouseDown:ie=>ie.preventDefault(),"data-mantine-stop-propagation":b||void 0,children:I.label},Q));return v.jsxs(fe,{...L("datePickerRoot"),size:j,...$,children:[v.jsx("div",{...L("presetsList"),children:V}),N]})});Ap.classes=rd.classes;Ap.varsResolver=qq;Ap.displayName="@mantine/dates/DatePicker";function Hq({type:e,value:n,defaultValue:t,onChange:i,locale:r,format:a,closeOnChange:o,sortDates:l,labelSeparator:u,valueFormatter:f}){const h=Ml(),[d,p]=Wz(!1),[g,b]=T9({type:e,value:n,defaultValue:t,onChange:i}),w=tse({type:e,date:g,locale:h.getLocale(r),format:a,labelSeparator:h.getLabelSeparator(u),formatter:f}),k=S=>{o&&(e==="default"&&p.close(),e==="range"&&S[0]&&S[1]&&p.close()),b(l&&e==="multiple"?[...S].sort((j,T)=>Be(j).isAfter(Be(T))?1:-1):S)};return{_value:g,setValue:k,onClear:()=>k(e==="range"?[null,null]:e==="multiple"?[]:null),shouldClear:e==="range"?!!g[0]:e==="multiple"?g.length>0:g!==null,formattedValue:w,dropdownOpened:d,dropdownHandlers:p}}const Lse={type:"default",size:"sm",valueFormat:"MMMM YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},E9=Pe(e=>{const n=ye("MonthPickerInput",Lse,e),{type:t,value:i,defaultValue:r,onChange:a,valueFormat:o,labelSeparator:l,locale:u,classNames:f,styles:h,unstyled:d,closeOnChange:p,size:g,variant:b,dropdownType:w,sortDates:k,minDate:_,maxDate:S,vars:j,valueFormatter:T,presets:A,attributes:O,...M}=n,{resolvedClassNames:$,resolvedStyles:q}=Wi({classNames:f,styles:h,props:n}),{calendarProps:P,others:L}=D0(M),{_value:U,setValue:G,formattedValue:B,dropdownHandlers:R,dropdownOpened:D,onClear:z,shouldClear:H}=Hq({type:t,value:i,defaultValue:r,onChange:a,locale:u,format:o,labelSeparator:l,closeOnChange:p,sortDates:k,valueFormatter:T});return v.jsx(id,{formattedValue:B,dropdownOpened:D,dropdownHandlers:R,classNames:$,styles:q,unstyled:d,onClear:z,shouldClear:H,value:U,size:g,variant:b,dropdownType:w,...L,attributes:O,type:t,__staticSelector:"MonthPickerInput",children:v.jsx(jp,{...P,size:g,variant:b,type:t,value:U,defaultDate:P.defaultDate||(Array.isArray(U)?U[0]||t4({maxDate:S,minDate:_}):U||t4({maxDate:S,minDate:_})),onChange:G,locale:u,classNames:$,styles:q,unstyled:d,__staticSelector:"MonthPickerInput",__stopPropagation:w==="popover",minDate:_,maxDate:S,presets:A,attributes:O})})});E9.classes={...id.classes,...jp.classes};E9.displayName="@mantine/dates/MonthPickerInput";const Ise={type:"default",size:"sm",valueFormat:"MMMM D, YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},Du=Pe(e=>{const n=ye("DatePickerInput",Ise,e),{type:t,value:i,defaultValue:r,onChange:a,valueFormat:o,labelSeparator:l,locale:u,classNames:f,styles:h,unstyled:d,closeOnChange:p,size:g,variant:b,dropdownType:w,sortDates:k,minDate:_,maxDate:S,vars:j,defaultDate:T,valueFormatter:A,presets:O,attributes:M,...$}=n,{resolvedClassNames:q,resolvedStyles:P}=Wi({classNames:f,styles:h,props:n}),{calendarProps:L,others:U}=D0($),{_value:G,setValue:B,formattedValue:R,dropdownHandlers:D,dropdownOpened:z,onClear:H,shouldClear:Y}=Hq({type:t,value:i,defaultValue:r,onChange:a,locale:u,format:o,labelSeparator:l,closeOnChange:p,sortDates:k,valueFormatter:A}),N=Array.isArray(G)?G[0]||T:G||T;return v.jsx(id,{formattedValue:R,dropdownOpened:z,dropdownHandlers:D,classNames:q,styles:P,unstyled:d,onClear:H,shouldClear:Y,value:G,size:g,variant:b,dropdownType:w,...U,type:t,__staticSelector:"DatePickerInput",attributes:M,children:v.jsx(Ap,{...L,size:g,variant:b,type:t,value:G,defaultDate:N||t4({maxDate:S,minDate:_}),onChange:B,locale:u,classNames:q,styles:P,unstyled:d,__staticSelector:"DatePickerInput",__stopPropagation:w==="popover",minDate:_,maxDate:S,presets:O,attributes:M})})});Du.classes={...id.classes,...Ap.classes};Du.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 Ise={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"}};/** + */var Bse={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 tn=(e,n,t,i)=>{const r=x.forwardRef(({color:a="currentColor",size:o=24,stroke:l=2,title:u,className:f,children:h,...d},p)=>x.createElement("svg",{ref:p,...Ise[e],width:o,height:o,className:["tabler-icon",`tabler-icon-${n}`,f].join(" "),strokeWidth:l,stroke:a,...d},[u&&x.createElement("title",{key:"svg-title"},u),...i.map(([g,b])=>x.createElement(g,b)),...Array.isArray(h)?h:[h]]));return r.displayName=`${t}`,r};/** + */const tn=(e,n,t,i)=>{const r=x.forwardRef(({color:a="currentColor",size:o=24,stroke:l=2,title:u,className:f,children:h,...d},p)=>x.createElement("svg",{ref:p,...Bse[e],width:o,height:o,className:["tabler-icon",`tabler-icon-${n}`,f].join(" "),strokeWidth:l,stroke:a,...d},[u&&x.createElement("title",{key:"svg-title"},u),...i.map(([g,b])=>x.createElement(g,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 Bse=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],Fse=tn("outline","alert-circle","AlertCircle",Bse);/** + */const Fse=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],qse=tn("outline","alert-circle","AlertCircle",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 qse=[["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"}]],i4=tn("outline","alert-triangle","AlertTriangle",qse);/** + */const Hse=[["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"}]],i4=tn("outline","alert-triangle","AlertTriangle",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 Hse=[["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"}]],Use=tn("outline","archive-off","ArchiveOff",Hse);/** + */const Use=[["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"}]],Vse=tn("outline","archive-off","ArchiveOff",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 Vse=[["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"}]],Hq=tn("outline","archive","Archive",Vse);/** + */const Wse=[["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"}]],Uq=tn("outline","archive","Archive",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 Wse=[["path",{d:"M9 14l-4 -4l4 -4",key:"svg-0"}],["path",{d:"M5 10h11a4 4 0 1 1 0 8h-1",key:"svg-1"}]],u1=tn("outline","arrow-back-up","ArrowBackUp",Wse);/** + */const Gse=[["path",{d:"M9 14l-4 -4l4 -4",key:"svg-0"}],["path",{d:"M5 10h11a4 4 0 1 1 0 8h-1",key:"svg-1"}]],u1=tn("outline","arrow-back-up","ArrowBackUp",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 Gse=[["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"}]],Yse=tn("outline","arrows-horizontal","ArrowsHorizontal",Gse);/** + */const Yse=[["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"}]],Kse=tn("outline","arrows-horizontal","ArrowsHorizontal",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 Kse=[["path",{d:"M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M16 12v1.5a2.5 2.5 0 0 0 5 0v-1.5a9 9 0 1 0 -5.5 8.28",key:"svg-1"}]],Xse=tn("outline","at","At",Kse);/** + */const Xse=[["path",{d:"M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M16 12v1.5a2.5 2.5 0 0 0 5 0v-1.5a9 9 0 1 0 -5.5 8.28",key:"svg-1"}]],Zse=tn("outline","at","At",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:"M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6",key:"svg-0"}],["path",{d:"M9 17v1a3 3 0 0 0 6 0v-1",key:"svg-1"}]],Qse=tn("outline","bell","Bell",Zse);/** + */const Qse=[["path",{d:"M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6",key:"svg-0"}],["path",{d:"M9 17v1a3 3 0 0 0 6 0v-1",key:"svg-1"}]],Jse=tn("outline","bell","Bell",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 Jse=[["path",{d:"M20 4h-9v1.5a2.5 2.5 0 0 0 2.5 2.5h1.5a1 1 0 0 1 1 1v1.5a2.5 2.5 0 0 0 2.5 2.5h1.5v-9",key:"svg-0"}],["path",{d:"M15 8h-8v1.5a2.5 2.5 0 0 0 2.5 2.5h1.5a1 1 0 0 1 1 1v1.5a2.5 2.5 0 0 0 2.5 2.5h1.5v-8a1 1 0 0 0 -1 -1",key:"svg-1"}],["path",{d:"M11 12h-8v1.5a2.5 2.5 0 0 0 2.5 2.5h1.5a1 1 0 0 1 1 1v1.5a2.5 2.5 0 0 0 2.5 2.5h1.5v-8a1 1 0 0 0 -1 -1",key:"svg-2"}]],M9=tn("outline","brand-jira","BrandJira",Jse);/** + */const ele=[["path",{d:"M20 4h-9v1.5a2.5 2.5 0 0 0 2.5 2.5h1.5a1 1 0 0 1 1 1v1.5a2.5 2.5 0 0 0 2.5 2.5h1.5v-9",key:"svg-0"}],["path",{d:"M15 8h-8v1.5a2.5 2.5 0 0 0 2.5 2.5h1.5a1 1 0 0 1 1 1v1.5a2.5 2.5 0 0 0 2.5 2.5h1.5v-8a1 1 0 0 0 -1 -1",key:"svg-1"}],["path",{d:"M11 12h-8v1.5a2.5 2.5 0 0 0 2.5 2.5h1.5a1 1 0 0 1 1 1v1.5a2.5 2.5 0 0 0 2.5 2.5h1.5v-8a1 1 0 0 0 -1 -1",key:"svg-2"}]],M9=tn("outline","brand-jira","BrandJira",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 ele=[["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"}]],Uq=tn("outline","calendar-due","CalendarDue",ele);/** + */const nle=[["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"}]],Vq=tn("outline","calendar-due","CalendarDue",nle);/** * @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 nle=[["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"}]],tle=tn("outline","calendar-off","CalendarOff",nle);/** + */const tle=[["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"}]],ile=tn("outline","calendar-off","CalendarOff",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:"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"}]],rle=tn("outline","calendar-stats","CalendarStats",ile);/** + */const rle=[["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"}]],ale=tn("outline","calendar-stats","CalendarStats",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 ale=[["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"}]],ole=tn("outline","calendar","Calendar",ale);/** + */const ole=[["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"}]],sle=tn("outline","calendar","Calendar",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:"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"}]],lle=tn("outline","chart-bar","ChartBar",sle);/** + */const lle=[["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"}]],ule=tn("outline","chart-bar","ChartBar",lle);/** * @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:"M5 12l5 5l10 -10",key:"svg-0"}]],cs=tn("outline","check","Check",ule);/** + */const cle=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],cs=tn("outline","check","Check",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 cle=[["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"}]],wm=tn("outline","checkbox","Checkbox",cle);/** + */const fle=[["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"}]],wm=tn("outline","checkbox","Checkbox",fle);/** * @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 fle=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],r4=tn("outline","chevron-down","ChevronDown",fle);/** + */const dle=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],r4=tn("outline","chevron-down","ChevronDown",dle);/** * @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 dle=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],a4=tn("outline","chevron-right","ChevronRight",dle);/** + */const hle=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],a4=tn("outline","chevron-right","ChevronRight",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 hle=[["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"}]],RM=tn("outline","clipboard-list","ClipboardList",hle);/** + */const mle=[["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"}]],RM=tn("outline","clipboard-list","ClipboardList",mle);/** * @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 mle=[["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"}]],ple=tn("outline","clock-hour-4","ClockHour4",mle);/** + */const ple=[["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"}]],vle=tn("outline","clock-hour-4","ClockHour4",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 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]],c1=tn("outline","clock","Clock",vle);/** + */const gle=[["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"}]],c1=tn("outline","clock","Clock",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 gle=[["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"}]],yle=tn("outline","columns-3","Columns3",gle);/** + */const yle=[["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"}]],ble=tn("outline","columns-3","Columns3",yle);/** * @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:"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"}]],o4=tn("outline","copy","Copy",ble);/** + */const wle=[["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"}]],o4=tn("outline","copy","Copy",wle);/** * @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 wle=[["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"}]],kle=tn("outline","dice-5","Dice5",wle);/** + */const kle=[["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"}]],_le=tn("outline","dice-5","Dice5",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 _le=[["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"}]],Vq=tn("outline","dots-vertical","DotsVertical",_le);/** + */const xle=[["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"}]],Wq=tn("outline","dots-vertical","DotsVertical",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 xle=[["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"}]],Wq=tn("outline","download","Download",xle);/** + */const Sle=[["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"}]],Gq=tn("outline","download","Download",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 Sle=[["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"}]],Fh=tn("outline","edit","Edit",Sle);/** + */const Cle=[["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"}]],Fh=tn("outline","edit","Edit",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 Cle=[["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"}]],jle=tn("outline","external-link","ExternalLink",Cle);/** + */const jle=[["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"}]],Ale=tn("outline","external-link","ExternalLink",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 Ale=[["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"}]],Ole=tn("outline","file-spreadsheet","FileSpreadsheet",Ale);/** + */const Ole=[["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"}]],Tle=tn("outline","file-spreadsheet","FileSpreadsheet",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 Tle=[["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"}]],Ele=tn("outline","file-text","FileText",Tle);/** + */const Ele=[["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"}]],Mle=tn("outline","file-text","FileText",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 Mle=[["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"}]],Dle=tn("outline","file-type-pdf","FileTypePdf",Mle);/** + */const Dle=[["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"}]],Rle=tn("outline","file-type-pdf","FileTypePdf",Dle);/** * @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:"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"}]],Ple=tn("outline","file","File",Rle);/** + */const Ple=[["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"}]],Nle=tn("outline","file","File",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 Nle=[["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"}]],Gq=tn("outline","grip-vertical","GripVertical",Nle);/** + */const $le=[["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"}]],Yq=tn("outline","grip-vertical","GripVertical",$le);/** * @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 $le=[["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"}]],zle=tn("outline","history","History",$le);/** + */const zle=[["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"}]],Lle=tn("outline","history","History",zle);/** * @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 Lle=[["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"}]],f1=tn("outline","hourglass","Hourglass",Lle);/** + */const Ile=[["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"}]],f1=tn("outline","hourglass","Hourglass",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 Ile=[["path",{d:"M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0",key:"svg-0"}],["path",{d:"M15 9h.01",key:"svg-1"}]],Ble=tn("outline","key","Key",Ile);/** + */const Ble=[["path",{d:"M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0",key:"svg-0"}],["path",{d:"M15 9h.01",key:"svg-1"}]],Fle=tn("outline","key","Key",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 Fle=[["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"}]],s4=tn("outline","layout-kanban","LayoutKanban",Fle);/** + */const qle=[["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"}]],s4=tn("outline","layout-kanban","LayoutKanban",qle);/** * @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 qle=[["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"}]],Hle=tn("outline","link","Link",qle);/** + */const Hle=[["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"}]],Ule=tn("outline","link","Link",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 Ule=[["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"}]],Yq=tn("outline","lock-open","LockOpen",Ule);/** + */const Vle=[["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"}]],Kq=tn("outline","lock-open","LockOpen",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 Vle=[["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"}]],ul=tn("outline","lock","Lock",Vle);/** + */const Wle=[["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"}]],ul=tn("outline","lock","Lock",Wle);/** * @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 Wle=[["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"}]],Gle=tn("outline","logout","Logout",Wle);/** + */const Gle=[["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"}]],Yle=tn("outline","logout","Logout",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 Yle=[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]],Kle=tn("outline","menu-2","Menu2",Yle);/** + */const Kle=[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]],Xle=tn("outline","menu-2","Menu2",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:"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"}]],Kq=tn("outline","message-chatbot","MessageChatbot",Xle);/** + */const Zle=[["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"}]],Xq=tn("outline","message-chatbot","MessageChatbot",Zle);/** * @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 Zle=[["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"}]],Xq=tn("outline","message","Message",Zle);/** + */const Qle=[["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"}]],Zq=tn("outline","message","Message",Qle);/** * @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 Qle=[["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"}]],Jle=tn("outline","mood-smile","MoodSmile",Qle);/** + */const Jle=[["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"}]],eue=tn("outline","mood-smile","MoodSmile",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 eue=[["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"}]],D9=tn("outline","palette","Palette",eue);/** + */const nue=[["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"}]],D9=tn("outline","palette","Palette",nue);/** * @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 nue=[["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"}]],Zq=tn("outline","paperclip","Paperclip",nue);/** + */const tue=[["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"}]],Qq=tn("outline","paperclip","Paperclip",tue);/** * @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 tue=[["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"}]],iue=tn("outline","pencil","Pencil",tue);/** + */const iue=[["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"}]],rue=tn("outline","pencil","Pencil",iue);/** * @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 rue=[["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"}]],aue=tn("outline","photo","Photo",rue);/** + */const aue=[["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"}]],oue=tn("outline","photo","Photo",aue);/** * @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 oue=[["path",{d:"M7 12l5 5l-1.5 1.5a3.536 3.536 0 1 1 -5 -5l1.5 -1.5",key:"svg-0"}],["path",{d:"M17 12l-5 -5l1.5 -1.5a3.536 3.536 0 1 1 5 5l-1.5 1.5",key:"svg-1"}],["path",{d:"M3 21l2.5 -2.5",key:"svg-2"}],["path",{d:"M18.5 5.5l2.5 -2.5",key:"svg-3"}],["path",{d:"M10 11l-2 2",key:"svg-4"}],["path",{d:"M13 14l-2 2",key:"svg-5"}]],sue=tn("outline","plug-connected","PlugConnected",oue);/** + */const sue=[["path",{d:"M7 12l5 5l-1.5 1.5a3.536 3.536 0 1 1 -5 -5l1.5 -1.5",key:"svg-0"}],["path",{d:"M17 12l-5 -5l1.5 -1.5a3.536 3.536 0 1 1 5 5l-1.5 1.5",key:"svg-1"}],["path",{d:"M3 21l2.5 -2.5",key:"svg-2"}],["path",{d:"M18.5 5.5l2.5 -2.5",key:"svg-3"}],["path",{d:"M10 11l-2 2",key:"svg-4"}],["path",{d:"M13 14l-2 2",key:"svg-5"}]],lue=tn("outline","plug-connected","PlugConnected",sue);/** * @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 lue=[["path",{d:"M9.785 6l8.215 8.215l-2.054 2.054a5.81 5.81 0 1 1 -8.215 -8.215l2.054 -2.054",key:"svg-0"}],["path",{d:"M4 20l3.5 -3.5",key:"svg-1"}],["path",{d:"M15 4l-3.5 3.5",key:"svg-2"}],["path",{d:"M20 9l-3.5 3.5",key:"svg-3"}]],Qq=tn("outline","plug","Plug",lue);/** + */const uue=[["path",{d:"M9.785 6l8.215 8.215l-2.054 2.054a5.81 5.81 0 1 1 -8.215 -8.215l2.054 -2.054",key:"svg-0"}],["path",{d:"M4 20l3.5 -3.5",key:"svg-1"}],["path",{d:"M15 4l-3.5 3.5",key:"svg-2"}],["path",{d:"M20 9l-3.5 3.5",key:"svg-3"}]],Jq=tn("outline","plug","Plug",uue);/** * @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 uue=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],cf=tn("outline","plus","Plus",uue);/** + */const cue=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],cf=tn("outline","plus","Plus",cue);/** * @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 cue=[["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"}]],ff=tn("outline","refresh","Refresh",cue);/** + */const fue=[["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"}]],ff=tn("outline","refresh","Refresh",fue);/** * @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 fue=[["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"}]],Jq=tn("outline","search","Search",fue);/** + */const due=[["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"}]],eH=tn("outline","search","Search",due);/** * @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 due=[["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"}]],eH=tn("outline","send","Send",due);/** + */const hue=[["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"}]],nH=tn("outline","send","Send",hue);/** * @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 hue=[["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"}]],mue=tn("outline","settings","Settings",hue);/** + */const mue=[["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"}]],pue=tn("outline","settings","Settings",mue);/** * @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 pue=[["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"}]],vue=tn("outline","sparkles","Sparkles",pue);/** + */const vue=[["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"}]],gue=tn("outline","sparkles","Sparkles",vue);/** * @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 gue=[["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"}]],yue=tn("outline","tag","Tag",gue);/** + */const yue=[["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"}]],bue=tn("outline","tag","Tag",yue);/** * @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 bue=[["path",{d:"M20 8.04l-12.122 12.124a2.857 2.857 0 1 1 -4.041 -4.04l12.122 -12.124",key:"svg-0"}],["path",{d:"M7 13h8",key:"svg-1"}],["path",{d:"M19 15l1.5 1.6a2 2 0 1 1 -3 0l1.5 -1.6",key:"svg-2"}],["path",{d:"M15 3l6 6",key:"svg-3"}]],wue=tn("outline","test-pipe","TestPipe",bue);/** + */const wue=[["path",{d:"M20 8.04l-12.122 12.124a2.857 2.857 0 1 1 -4.041 -4.04l12.122 -12.124",key:"svg-0"}],["path",{d:"M7 13h8",key:"svg-1"}],["path",{d:"M19 15l1.5 1.6a2 2 0 1 1 -3 0l1.5 -1.6",key:"svg-2"}],["path",{d:"M15 3l6 6",key:"svg-3"}]],kue=tn("outline","test-pipe","TestPipe",wue);/** * @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 kue=[["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"}]],_ue=tn("outline","trash-x","TrashX",kue);/** + */const _ue=[["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"}]],xue=tn("outline","trash-x","TrashX",_ue);/** * @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 xue=[["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"}]],vo=tn("outline","trash","Trash",xue);/** + */const Sue=[["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"}]],vo=tn("outline","trash","Trash",Sue);/** * @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 Sue=[["path",{d:"M3 17l6 -6l4 4l8 -8",key:"svg-0"}],["path",{d:"M14 7l7 0l0 7",key:"svg-1"}]],l4=tn("outline","trending-up","TrendingUp",Sue);/** + */const Cue=[["path",{d:"M3 17l6 -6l4 4l8 -8",key:"svg-0"}],["path",{d:"M14 7l7 0l0 7",key:"svg-1"}]],l4=tn("outline","trending-up","TrendingUp",Cue);/** * @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 Cue=[["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"}]],jue=tn("outline","upload","Upload",Cue);/** + */const jue=[["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"}]],Aue=tn("outline","upload","Upload",jue);/** * @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 Aue=[["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 -4h4",key:"svg-1"}],["path",{d:"M15 19l2 2l4 -4",key:"svg-2"}]],Oue=tn("outline","user-check","UserCheck",Aue);/** + */const Oue=[["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 -4h4",key:"svg-1"}],["path",{d:"M15 19l2 2l4 -4",key:"svg-2"}]],Tue=tn("outline","user-check","UserCheck",Oue);/** * @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 Tue=[["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"}]],Eue=tn("outline","user-circle","UserCircle",Tue);/** + */const Eue=[["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"}]],Mue=tn("outline","user-circle","UserCircle",Eue);/** * @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 Mue=[["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"}]],Due=tn("outline","user-minus","UserMinus",Mue);/** + */const Due=[["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"}]],Rue=tn("outline","user-minus","UserMinus",Due);/** * @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 Rue=[["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"}]],Pue=tn("outline","user-plus","UserPlus",Rue);/** + */const Pue=[["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"}]],Nue=tn("outline","user-plus","UserPlus",Pue);/** * @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 Nue=[["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"}]],$ue=tn("outline","user-square","UserSquare",Nue);/** + */const $ue=[["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"}]],zue=tn("outline","user-square","UserSquare",$ue);/** * @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 zue=[["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"}]],Lue=tn("outline","user","User",zue);/** + */const Lue=[["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"}]],Iue=tn("outline","user","User",Lue);/** * @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 Iue=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],qh=tn("outline","x","X",Iue);function Bue(e,n,t){const i=e.replace(/]/g,"");return t?`![${i}](${n})`:`[${i}](${n})`}function nH({initial:e,submitLabel:n="Guardar",users:t=[],requesterOptions:i=[],tagOptions:r=[],cardId:a,onFileUploaded:o,onSubmit:l,onCancel:u}){const[f,h]=x.useState((e==null?void 0:e.requester)??""),[d,p]=x.useState((e==null?void 0:e.title)??""),[g,b]=x.useState((e==null?void 0:e.description)??""),[w,k]=x.useState((e==null?void 0:e.assignee_id)??null),[_,S]=x.useState((e==null?void 0:e.tags)??[]),[j,T]=x.useState(!1),[A,O]=x.useState(!1),M=x.useRef(null),$=async R=>{R==null||R.preventDefault();const D=d.trim();D&&await l({requester:f.trim(),title:D,description:g,assignee_id:w,tags:_})},q=R=>{R.key==="Enter"&&(R.ctrlKey||R.metaKey)&&(R.preventDefault(),$())},P=R=>{const D=M.current;if(!D){b(I=>I?I+` + */const Bue=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],qh=tn("outline","x","X",Bue);function Fue(e,n,t){const i=e.replace(/]/g,"");return t?`![${i}](${n})`:`[${i}](${n})`}function tH({initial:e,submitLabel:n="Guardar",users:t=[],requesterOptions:i=[],tagOptions:r=[],cardId:a,onFileUploaded:o,onSubmit:l,onCancel:u}){const[f,h]=x.useState((e==null?void 0:e.requester)??""),[d,p]=x.useState((e==null?void 0:e.title)??""),[g,b]=x.useState((e==null?void 0:e.description)??""),[w,k]=x.useState((e==null?void 0:e.assignee_id)??null),[_,S]=x.useState((e==null?void 0:e.tags)??[]),[j,T]=x.useState(!1),[A,O]=x.useState(!1),M=x.useRef(null),$=async R=>{R==null||R.preventDefault();const D=d.trim();D&&await l({requester:f.trim(),title:D,description:g,assignee_id:w,tags:_})},q=R=>{R.key==="Enter"&&(R.ctrlKey||R.metaKey)&&(R.preventDefault(),$())},P=R=>{const D=M.current;if(!D){b(I=>I?I+` `+R:R);return}const z=D.selectionStart??g.length,H=D.selectionEnd??g.length,Y=g.slice(0,z),N=g.slice(H),W=Y&&!Y.endsWith(` `)?` -`:"",V=Y+W+R+N;b(V),queueMicrotask(()=>{D.focus();const I=(Y+W+R).length;D.setSelectionRange(I,I)})},L=async R=>{if(!a){hn.show({color:"yellow",message:"Guarda la tarjeta antes de subir archivos."});return}O(!0);try{for(const D of Array.from(R))try{const z=await v9(a,D,"description");P(Bue(z.filename,z.url,z.mime.startsWith("image/"))),o==null||o()}catch(z){hn.show({color:"red",message:`${D.name}: ${z.message}`})}}finally{O(!1)}},U=R=>{R.preventDefault(),T(!1),!(!R.dataTransfer.files||R.dataTransfer.files.length===0)&&L(R.dataTransfer.files)},G=R=>{a&&R.dataTransfer.types.includes("Files")&&(R.preventDefault(),T(!0))},B=R=>{R.preventDefault(),T(!1)};return v.jsx("form",{onSubmit:$,children:v.jsxs(kn,{gap:"sm",children:[v.jsx(_l,{label:"Tarea",value:d,onChange:R=>p(R.currentTarget.value),tabIndex:1,required:!0,autoComplete:"off","data-autofocus":!0,autosize:!0,minRows:1,maxRows:4,onKeyDown:R=>{R.key==="Enter"&&!R.shiftKey&&(R.preventDefault(),$())}}),v.jsx(Hy,{label:"Solicitante",value:f,onChange:h,data:i,tabIndex:2,autoComplete:"off","data-field":"requester",placeholder:"Empieza a escribir y elige uno existente",limit:10,onKeyDown:R=>{R.key==="Enter"&&R.preventDefault()}}),v.jsxs(fe,{onDrop:U,onDragOver:G,onDragLeave:B,style:{position:"relative",outline:j?"2px dashed var(--mantine-color-blue-5)":void 0,outlineOffset:j?2:void 0,borderRadius:4},children:[v.jsx(_l,{ref:M,label:"Descripcion",value:g,onChange:R=>b(R.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"}),(j||A)&&v.jsx(fe,{style:{position:"absolute",inset:0,background:"rgba(34,139,230,0.08)",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",borderRadius:4},children:v.jsx(de,{size:"sm",fw:500,c:"blue",children:A?"Subiendo...":"Suelta para adjuntar"})})]}),v.jsx(jr,{label:"Asignar a",placeholder:"Sin asignar",value:w,onChange:R=>k(R),data:t.map(R=>({value:R.id,label:R.display_name||R.username})),clearable:!0,searchable:!0,tabIndex:4}),v.jsx(c9,{label:"Tags",value:_,onChange:S,data:r,clearable:!0,tabIndex:5,placeholder:"Enter para añadir; sugiere existentes",splitChars:[","," "]}),v.jsxs(Ee,{justify:"flex-end",gap:"xs",mt:"xs",children:[v.jsx(Yn,{variant:"subtle",color:"gray",tabIndex:7,type:"button",onClick:u,children:"Cancelar"}),v.jsx(Yn,{tabIndex:6,type:"submit",disabled:!d.trim(),children:n})]})]})})}function Fue(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 R9=new Set(["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo","gray","dark"]);function P9(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)}function tH(e){return e?P9(e)?`color-mix(in srgb, ${e} 18%, var(--mantine-color-dark-6))`:R9.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 N9(e){return e?P9(e)?`color-mix(in srgb, ${e} 30%, var(--mantine-color-dark-4))`:R9.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 que(e){return e?P9(e)?e:R9.has(e)?`var(--mantine-color-${e}-7)`:"var(--mantine-color-dark-3)":"var(--mantine-color-dark-3)"}const iH=[{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"}],Hue=iH,Uue=["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo"];function Ru(e){return Fue(e,Uue)}const u4=6e4,Hh=60*u4,Wc=24*Hh,lg=7*Wc,i_=30*Wc;function ei(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=Vue(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=rH(i[6]);r?n.push({kind:"link",label:i[5],url:r}):n.push({kind:"text",value:i[0]})}t=r_.lastIndex}return t{i.length!==0&&(r.push(v.jsx(de,{size:n,style:{whiteSpace:"pre-wrap",wordBreak:"break-word"},children:i.map((l,u)=>v.jsx(x.Fragment,{children:l},u))},`t-${a++}`)),i.length=0)};for(const l of t)l.kind==="img"?(o(),r.push(v.jsx(ho,{href:l.url,target:"_blank",rel:"noopener noreferrer",children:v.jsx(Xf,{src:l.url,alt:l.alt,maw:220,mah:220,fit:"contain",radius:"sm"})},`i-${a++}`))):l.kind==="link"?i.push(v.jsx(ho,{href:l.url,target:"_blank",rel:"noopener noreferrer",children:l.label},`l-${a++}`)):i.push(l.value);return o(),v.jsx(v.Fragment,{children:r})}function Yue(e,n,t){const i=e.replace(/]/g,"");return t.startsWith("image/")?`![${i}](${n})`:`[${i}](${n})`}const Kue=4e3,Xue=1500;function Zue(e,n){for(let t=n-1;t>=0&&n-t<=64;t--){const i=e[t];if(i==="@"){if(t===0||/\s/.test(e[t-1])){const r=e.slice(t+1,n);if(/^[a-z0-9_.-]*$/i.test(r))return{start:t,query:r.toLowerCase()}}return null}if(/\s/.test(i))return null}return null}function Que({cardId:e,users:n,currentUserId:t,onMessagesChange:i,onFileUploaded:r,highlightMessageId:a}){const[o,l]=x.useState([]),[u,f]=x.useState(!0),[h,d]=x.useState(""),[p,g]=x.useState(!1),[b,w]=x.useState(!1),[k,_]=x.useState(!1),[S,j]=x.useState({}),[T,A]=x.useState(null),O=x.useRef(null),M=x.useRef(null),$=x.useRef(null),q=x.useRef(0),P=x.useMemo(()=>new Map(n.map(Z=>[Z.id,Z])),[n]),L=x.useCallback(async()=>{try{const Z=await Mre(e);l(Z),i==null||i(Z)}catch(Z){hn.show({color:"red",message:Z.message})}finally{f(!1)}},[e,i]);x.useEffect(()=>{L()},[L]),x.useEffect(()=>{const Z=new WebSocket(Nre(e));return M.current=Z,Z.onmessage=le=>{try{const ee=JSON.parse(le.data);ee.type==="message.created"&&ee.message?l(se=>{if(se.some(te=>te.id===ee.message.id))return se;const ke=[...se,ee.message];return i==null||i(ke),ke}):ee.type==="typing"&&ee.user_id?j(se=>({...se,[ee.user_id]:Date.now()})):ee.type==="error"&&hn.show({color:"red",message:ee.error})}catch{}},Z.onerror=()=>{},()=>{Z.close(),M.current=null}},[e,i]),x.useEffect(()=>{const Z=setInterval(()=>{const le=Date.now();j(ee=>{const se={};for(const[ke,te]of Object.entries(ee))le-teclearInterval(Z)},[]),x.useEffect(()=>{O.current&&O.current.scrollTo({top:O.current.scrollHeight,behavior:"smooth"})},[o.length]);const[U,G]=x.useState(null);x.useEffect(()=>{if(!a||!o.some(ee=>ee.id===a))return;const Z=document.querySelector(`[data-msg-id="${a}"]`);Z&&Z instanceof HTMLElement&&Z.scrollIntoView({behavior:"smooth",block:"center"}),G(a);const le=setTimeout(()=>G(null),2200);return()=>clearTimeout(le)},[a,o]);const B=()=>{const Z=M.current;if(!Z||Z.readyState!==WebSocket.OPEN)return;const le=Date.now();le-q.currentA(null)}),D=x.useMemo(()=>T?n.filter(Z=>Z.username.toLowerCase().startsWith(T.query)).slice(0,8):[],[n,T]);x.useEffect(()=>{T&&D.length>0?(R.openDropdown(),R.selectFirstOption()):R.closeDropdown()},[T==null?void 0:T.query,D.length]);const z=Z=>{if(!T)return;const le=h.slice(0,T.start),ee=h.slice(T.start+1+T.query.length),se=`@${Z} `,ke=le+se+ee;d(ke),A(null),requestAnimationFrame(()=>{const te=$.current;if(!te)return;const $e=(le+se).length;te.focus(),te.setSelectionRange($e,$e)})},H=async()=>{const Z=h.trim();if(!Z||p)return;g(!0);const le=M.current;try{if(le&&le.readyState===WebSocket.OPEN)le.send(JSON.stringify({type:"send",body:Z})),d("");else{const ee=await cM(e,Z);l(se=>[...se,ee]),i==null||i([...o,ee]),d("")}}catch(ee){hn.show({color:"red",message:ee.message})}finally{g(!1)}},Y=async Z=>{try{await Dre(e,Z);const le=o.filter(ee=>ee.id!==Z);l(le),i==null||i(le)}catch(le){hn.show({color:"red",message:le.message})}},N=Z=>{d(Z.currentTarget.value),B();const le=Z.currentTarget.selectionStart??Z.currentTarget.value.length;A(Zue(Z.currentTarget.value,le))},W=Z=>{if(T&&D.length>0&&(Z.key==="Enter"||Z.key==="Tab")){Z.preventDefault();const le=R.getSelectedOptionIndex(),ee=D[Math.max(0,le)];ee&&z(ee.username);return}if(T&&Z.key==="Escape"){A(null);return}Z.key==="Enter"&&!Z.shiftKey&&(Z.preventDefault(),H())},V=async Z=>{w(!0);try{for(const le of Array.from(Z))try{const ee=await v9(e,le,"chat"),se=Yue(ee.filename,ee.url,ee.mime),ke=await cM(e,se);l(te=>{const $e=[...te,ke];return i==null||i($e),$e}),r==null||r()}catch(ee){hn.show({color:"red",message:`${le.name}: ${ee.message}`})}}finally{w(!1)}},I=Z=>{Z.preventDefault(),_(!1),!(!Z.dataTransfer.files||Z.dataTransfer.files.length===0)&&V(Z.dataTransfer.files)},Q=Z=>{Z.dataTransfer.types.includes("Files")&&(Z.preventDefault(),_(!0))},ie=Z=>{Z.preventDefault(),_(!1)},re=Object.keys(S).filter(Z=>Z!==t).map(Z=>{const le=P.get(Z);return(le==null?void 0:le.display_name)||(le==null?void 0:le.username)||"alguien"});return v.jsxs(kn,{gap:"xs",style:{height:"100%",minHeight:0,position:"relative",outline:k?"2px dashed var(--mantine-color-blue-5)":void 0,outlineOffset:k?-2:void 0,borderRadius:4},onDrop:I,onDragOver:Q,onDragLeave:ie,children:[v.jsx(ur,{viewportRef:O,style:{flex:1,minHeight:200},type:"auto",offsetScrollbars:!0,children:u?v.jsx(Ee,{justify:"center",p:"md",children:v.jsx(Zt,{size:"sm"})}):o.length===0?v.jsx(de,{size:"sm",c:"dimmed",ta:"center",p:"md",children:"Sin mensajes aun. Escribe el primero o arrastra un archivo."}):v.jsx(kn,{gap:6,p:4,children:o.map(Z=>{const le=Z.author_id?P.get(Z.author_id):null,ee=Z.author_id&&Z.author_id===t,se=le?le.display_name||le.username:"Anonimo",ke=U===Z.id;return v.jsx(Tt,{withBorder:!0,p:"xs",radius:"sm","data-msg-id":Z.id,bg:ke?"var(--mantine-color-yellow-light)":ee?"var(--mantine-color-blue-light)":void 0,style:{transition:"background-color 600ms ease",boxShadow:ke?"0 0 0 2px var(--mantine-color-yellow-5)":void 0},children:v.jsxs(Ee,{gap:6,wrap:"nowrap",align:"flex-start",children:[v.jsx(mo,{size:22,radius:"xl",color:(le==null?void 0:le.color)||Ru(se),children:se.slice(0,2).toUpperCase()}),v.jsxs(fe,{style:{flex:1,minWidth:0},children:[v.jsxs(Ee,{gap:6,wrap:"nowrap",justify:"space-between",children:[v.jsxs(Ee,{gap:6,wrap:"nowrap",children:[v.jsx(de,{size:"xs",fw:600,children:se}),v.jsx(de,{size:"xs",c:"dimmed",children:Sl(Z.created_at)})]}),ee&&v.jsx(wt,{label:"Borrar",withArrow:!0,children:v.jsx(Jn,{size:"xs",variant:"subtle",color:"red",onClick:()=>Y(Z.id),children:v.jsx(vo,{size:12})})})]}),v.jsx(kn,{gap:4,children:v.jsx(Gue,{text:Z.body})})]})]})},Z.id)})})}),re.length>0&&v.jsx(de,{size:"xs",c:"dimmed",px:6,children:re.length===1?`${re[0]} esta escribiendo...`:`${re.slice(0,2).join(", ")}${re.length>2?"...":""} estan escribiendo...`}),v.jsxs(On,{store:R,onOptionSubmit:Z=>z(Z),position:"top-start",withinPortal:!1,children:[v.jsx(On.DropdownTarget,{children:v.jsxs(Ee,{gap:"xs",align:"flex-end",children:[v.jsx(_l,{ref:$,value:h,onChange:N,onKeyDown:W,placeholder:"Escribe un mensaje (Enter = enviar, @ para mencionar). Arrastra archivos o usa el clip.",autosize:!0,minRows:1,maxRows:6,style:{flex:1},disabled:p}),v.jsx(VC,{onChange:Z=>Z&&V([Z]),disabled:b,children:Z=>v.jsx(wt,{label:"Adjuntar archivo",withArrow:!0,children:v.jsx(Jn,{size:"lg",variant:"subtle",color:"gray","aria-label":"Adjuntar",loading:b,...Z,children:v.jsx(Zq,{size:16})})})}),v.jsx(wt,{label:"Enviar",withArrow:!0,children:v.jsx(Jn,{size:"lg",variant:"filled",color:"blue",onClick:H,disabled:!h.trim()||p,"aria-label":"Enviar",children:v.jsx(eH,{size:16})})})]})}),v.jsx(On.Dropdown,{hidden:!T||D.length===0,children:v.jsx(On.Options,{children:D.map(Z=>v.jsx(On.Option,{value:Z.username,children:v.jsxs(Ee,{gap:6,wrap:"nowrap",children:[v.jsx(mo,{size:18,radius:"xl",color:Z.color||Ru(Z.username),children:(Z.display_name||Z.username).slice(0,2).toUpperCase()}),v.jsxs(de,{size:"sm",fw:600,children:["@",Z.username]}),Z.display_name&&Z.display_name!==Z.username&&v.jsx(de,{size:"xs",c:"dimmed",children:Z.display_name})]})},Z.id))})})]}),(k||b)&&v.jsx(fe,{style:{position:"absolute",inset:0,background:"rgba(34,139,230,0.08)",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",borderRadius:4},children:v.jsx(de,{size:"sm",fw:500,c:"blue",children:b?"Subiendo...":"Suelta para adjuntar"})})]})}function Jue(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(2)} MB`}function ece(e){return e.startsWith("image/")}function nce(e,n=18){const t=e.toLowerCase();return t.startsWith("image/")?v.jsx(aue,{size:n}):t==="application/pdf"?v.jsx(Dle,{size:n}):t.includes("spreadsheet")||t.includes("excel")||t==="text/csv"||t==="application/vnd.ms-excel"?v.jsx(Ole,{size:n}):t.startsWith("text/")?v.jsx(Ele,{size:n}):v.jsx(Ple,{size:n})}function tce(e){return e==="description"?{color:"blue",label:"descripcion"}:e==="chat"?{color:"teal",label:"chat"}:{color:"gray",label:"subido"}}function ice({cardId:e,refreshKey:n}){const[t,i]=x.useState([]),[r,a]=x.useState(!0),[o,l]=x.useState(!1),u=x.useCallback(async()=>{try{const d=await Yre(e);i(d)}catch(d){hn.show({color:"red",message:d.message})}finally{a(!1)}},[e]);x.useEffect(()=>{u()},[u,n]);const f=async d=>{if(d){l(!0);try{const p=await v9(e,d,"upload");i(g=>[...g,p])}catch(p){hn.show({color:"red",message:p.message})}finally{l(!1)}}},h=async d=>{if(window.confirm("¿Borrar este archivo?"))try{await Kre(d),i(p=>p.filter(g=>g.id!==d))}catch(p){hn.show({color:"red",message:p.message})}};return v.jsxs(kn,{gap:"xs",p:4,children:[v.jsxs(Ee,{justify:"space-between",children:[v.jsxs(de,{size:"xs",c:"dimmed",children:[t.length," archivo",t.length===1?"":"s"]}),v.jsx(VC,{onChange:f,disabled:o,children:d=>v.jsx(Yn,{size:"xs",variant:"light",leftSection:v.jsx(jue,{size:14}),loading:o,...d,children:"Subir"})})]}),r?v.jsx(Ee,{justify:"center",p:"md",children:v.jsx(Zt,{size:"sm"})}):t.length===0?v.jsxs(kn,{gap:"xs",p:"md",align:"center",justify:"center",style:{minHeight:160},children:[v.jsx(de,{size:"sm",c:"dimmed",children:"Sin archivos"}),v.jsx(de,{size:"xs",c:"dimmed",ta:"center",children:"Sube archivos con el boton, arrastra al chat o a la descripcion."})]}):v.jsx(kn,{gap:6,children:t.map(d=>{const p=tce(d.source);return v.jsx(Tt,{withBorder:!0,p:"xs",radius:"sm",children:v.jsxs(Ee,{gap:"xs",wrap:"nowrap",align:"flex-start",children:[ece(d.mime)?v.jsx(ho,{href:d.url,target:"_blank",rel:"noopener noreferrer",children:v.jsx(Xf,{src:d.url,alt:d.filename,w:64,h:64,fit:"cover",radius:"sm"})}):v.jsx(fe,{style:{width:64,height:64,display:"flex",alignItems:"center",justifyContent:"center",background:"var(--mantine-color-gray-1)",borderRadius:4},children:nce(d.mime,28)}),v.jsxs(fe,{style:{flex:1,minWidth:0},children:[v.jsx(ho,{href:d.url,target:"_blank",rel:"noopener noreferrer",size:"sm",style:{wordBreak:"break-all"},children:d.filename}),v.jsxs(Ee,{gap:6,mt:4,children:[v.jsx(Gn,{size:"xs",variant:"light",color:p.color,children:p.label}),v.jsx(de,{size:"xs",c:"dimmed",children:Jue(d.size)}),v.jsx(de,{size:"xs",c:"dimmed",children:d.mime||"?"})]})]}),v.jsxs(Ee,{gap:4,wrap:"nowrap",children:[v.jsx(wt,{label:"Descargar",withArrow:!0,children:v.jsx(Jn,{component:"a",href:d.url,download:d.filename,variant:"subtle",size:"sm","aria-label":"Descargar",children:v.jsx(Wq,{size:14})})}),v.jsx(wt,{label:"Borrar",withArrow:!0,children:v.jsx(Jn,{variant:"subtle",color:"red",size:"sm",onClick:()=>h(d.id),"aria-label":"Borrar",children:v.jsx(vo,{size:14})})})]})]})},d.id)})})]})}const PM=/(https?:\/\/[^\s<>()"']+)/gi;function a_(e,n){if(!n)return[];const t=[],i=new Set;let r;for(PM.lastIndex=0;(r=PM.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 rce(e){try{return new URL(e).hostname}catch{return e}}function ace({card:e,messages:n}){const t=x.useMemo(()=>{const a=[...a_("title",e.title),...a_("description",e.description),...n.flatMap(l=>a_("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 v.jsxs(kn,{gap:"xs",p:"md",align:"center",justify:"center",style:{minHeight:200},children:[v.jsx(de,{size:"sm",c:"dimmed",children:"Sin enlaces detectados"}),v.jsx(de,{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 v.jsx(kn,{gap:6,p:4,children:t.map(a=>v.jsx(Tt,{withBorder:!0,p:"xs",radius:"sm",children:v.jsxs(Ee,{gap:"xs",wrap:"nowrap",justify:"space-between",align:"flex-start",children:[v.jsxs(fe,{style:{flex:1,minWidth:0},children:[v.jsx(ho,{href:a.url,target:"_blank",rel:"noopener noreferrer",size:"sm",style:{wordBreak:"break-all"},children:v.jsxs(Ee,{gap:4,wrap:"nowrap",align:"center",children:[v.jsx(jle,{size:12}),v.jsx("span",{children:rce(a.url)})]})}),v.jsx(de,{size:"xs",c:"dimmed",style:{wordBreak:"break-all"},children:a.url})]}),v.jsx(Gn,{size:"xs",variant:"light",color:i(a.source),children:r(a.source)})]})},a.url))})}function oce({card:e,users:n,currentUserId:t,requesterOptions:i,tagOptions:r,onSubmit:a,onCancel:o,highlightMessageId:l}){const[u,f]=x.useState([]),[h,d]=x.useState(e),[p,g]=x.useState(0),b=async k=>{d(_=>({..._,title:k.title,description:k.description,requester:k.requester,tags:k.tags,assignee_id:k.assignee_id})),await a(k)},w=()=>g(k=>k+1);return v.jsxs(Ee,{align:"stretch",gap:"md",wrap:"nowrap",style:{minHeight:460},children:[v.jsx(fe,{style:{flex:"1 1 0",minWidth:320},children:v.jsx(nH,{users:n,requesterOptions:i,tagOptions:r,initial:{requester:h.requester,title:h.title,description:h.description,assignee_id:h.assignee_id,tags:h.tags||[]},submitLabel:"Guardar",cardId:h.id,onFileUploaded:w,onSubmit:b,onCancel:o})}),v.jsx(us,{orientation:"vertical"}),v.jsx(fe,{style:{flex:"1 1 0",minWidth:320,display:"flex",flexDirection:"column"},children:v.jsxs(Gt,{defaultValue:"chat",keepMounted:!1,style:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[v.jsxs(Gt.List,{children:[v.jsx(Gt.Tab,{value:"chat",leftSection:v.jsx(Xq,{size:14}),children:"Chat"}),v.jsx(Gt.Tab,{value:"links",leftSection:v.jsx(Hle,{size:14}),children:"Enlaces"}),v.jsx(Gt.Tab,{value:"files",leftSection:v.jsx(Zq,{size:14}),children:"Archivos"})]}),v.jsxs(fe,{pt:"xs",style:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:[v.jsx(Gt.Panel,{value:"chat",style:{flex:1,minHeight:0,display:"flex"},children:v.jsx(fe,{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",width:"100%"},children:v.jsx(Que,{cardId:h.id,users:n,currentUserId:t,onMessagesChange:f,onFileUploaded:w,highlightMessageId:l})})}),v.jsx(Gt.Panel,{value:"links",children:v.jsx(ace,{card:h,messages:u})}),v.jsx(Gt.Panel,{value:"files",children:v.jsx(ice,{cardId:h.id,refreshKey:p})})]})]})})]})}function sce(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const lce=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,uce=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cce={};function NM(e,n){return(cce.jsx?uce:lce).test(e)}const fce=/[ \t\n\f\r]/g;function dce(e){return typeof e=="object"?e.type==="text"?$M(e.value):!1:$M(e)}function $M(e){return e.replace(fce,"")===""}class Op{constructor(n,t,i){this.normal=t,this.property=n,i&&(this.space=i)}}Op.prototype.normal={};Op.prototype.property={};Op.prototype.space=void 0;function aH(e,n){const t={},i={};for(const r of e)Object.assign(t,r.property),Object.assign(i,r.normal);return new Op(t,i,n)}function c4(e){return e.toLowerCase()}class Or{constructor(n,t){this.attribute=t,this.property=n}}Or.prototype.attribute="";Or.prototype.booleanish=!1;Or.prototype.boolean=!1;Or.prototype.commaOrSpaceSeparated=!1;Or.prototype.commaSeparated=!1;Or.prototype.defined=!1;Or.prototype.mustUseProperty=!1;Or.prototype.number=!1;Or.prototype.overloadedBoolean=!1;Or.prototype.property="";Or.prototype.spaceSeparated=!1;Or.prototype.space=void 0;let hce=0;const Hn=Gu(),gi=Gu(),f4=Gu(),Ve=Gu(),It=Gu(),Jc=Gu(),Br=Gu();function Gu(){return 2**++hce}const d4=Object.freeze(Object.defineProperty({__proto__:null,boolean:Hn,booleanish:gi,commaOrSpaceSeparated:Br,commaSeparated:Jc,number:Ve,overloadedBoolean:f4,spaceSeparated:It},Symbol.toStringTag,{value:"Module"})),o_=Object.keys(d4);class $9 extends Or{constructor(n,t,i,r){let a=-1;if(super(n,t),zM(this,"space",r),typeof i=="number")for(;++a4&&t.slice(0,4)==="data"&&yce.test(n)){if(n.charAt(4)==="-"){const a=n.slice(5).replace(LM,kce);i="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=n.slice(4);if(!LM.test(a)){let o=a.replace(gce,wce);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}r=$9}return new r(i,n)}function wce(e){return"-"+e.toLowerCase()}function kce(e){return e.charAt(1).toUpperCase()}const _ce=aH([oH,mce,uH,cH,fH],"html"),z9=aH([oH,pce,uH,cH,fH],"svg");function xce(e){return e.join(" ").trim()}var $c={},s_,IM;function Sce(){if(IM)return s_;IM=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,r=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,u=` -`,f="/",h="*",d="",p="comment",g="declaration";function b(k,_){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];_=_||{};var S=1,j=1;function T(B){var R=B.match(n);R&&(S+=R.length);var D=B.lastIndexOf(u);j=~D?B.length-D:j+B.length}function A(){var B={line:S,column:j};return function(R){return R.position=new O(B),q(),R}}function O(B){this.start=B,this.end={line:S,column:j},this.source=_.source}O.prototype.content=k;function M(B){var R=new Error(_.source+":"+S+":"+j+": "+B);if(R.reason=B,R.filename=_.source,R.line=S,R.column=j,R.source=k,!_.silent)throw R}function $(B){var R=B.exec(k);if(R){var D=R[0];return T(D),k=k.slice(D.length),R}}function q(){$(t)}function P(B){var R;for(B=B||[];R=L();)R!==!1&&B.push(R);return B}function L(){var B=A();if(!(f!=k.charAt(0)||h!=k.charAt(1))){for(var R=2;d!=k.charAt(R)&&(h!=k.charAt(R)||f!=k.charAt(R+1));)++R;if(R+=2,d===k.charAt(R-1))return M("End of comment missing");var D=k.slice(2,R-2);return j+=2,T(D),k=k.slice(R),j+=2,B({type:p,comment:D})}}function U(){var B=A(),R=$(i);if(R){if(L(),!$(r))return M("property missing ':'");var D=$(a),z=B({type:g,property:w(R[0].replace(e,d)),value:D?w(D[0].replace(e,d)):d});return $(o),z}}function G(){var B=[];P(B);for(var R;R=U();)R!==!1&&(B.push(R),P(B));return B}return q(),G()}function w(k){return k?k.replace(l,d):d}return s_=b,s_}var BM;function Cce(){if(BM)return $c;BM=1;var e=$c&&$c.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty($c,"__esModule",{value:!0}),$c.default=t;const n=e(Sce());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(u=>{if(u.type!=="declaration")return;const{property:f,value:h}=u;l?r(f,h,u):h&&(a=a||{},a[f]=h)}),a}return $c}var _h={},FM;function jce(){if(FM)return _h;FM=1,Object.defineProperty(_h,"__esModule",{value:!0}),_h.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,r=/^-(ms)-/,a=function(f){return!f||t.test(f)||e.test(f)},o=function(f,h){return h.toUpperCase()},l=function(f,h){return"".concat(h,"-")},u=function(f,h){return h===void 0&&(h={}),a(f)?f:(f=f.toLowerCase(),h.reactCompat?f=f.replace(r,l):f=f.replace(i,l),f.replace(n,o))};return _h.camelCase=u,_h}var xh,qM;function Ace(){if(qM)return xh;qM=1;var e=xh&&xh.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},n=e(Cce()),t=jce();function i(r,a){var o={};return!r||typeof r!="string"||(0,n.default)(r,function(l,u){l&&u&&(o[(0,t.camelCase)(l,a)]=u)}),o}return i.default=i,xh=i,xh}var Oce=Ace();const Tce=yt(Oce),dH=hH("end"),L9=hH("start");function hH(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 Ece(e){const n=L9(e),t=dH(e);if(n&&t)return{start:n,end:t}}function Jh(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?HM(e.position):"start"in e||"end"in e?HM(e):"line"in e||"column"in e?h4(e):""}function h4(e){return UM(e&&e.line)+":"+UM(e&&e.column)}function HM(e){return h4(e&&e.start)+"-"+h4(e&&e.end)}function UM(e){return e&&typeof e=="number"?e:1}class nr 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 u=i.indexOf(":");u===-1?a.ruleId=i:(a.source=i.slice(0,u),a.ruleId=i.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.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=Jh(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}}nr.prototype.file="";nr.prototype.name="";nr.prototype.reason="";nr.prototype.message="";nr.prototype.stack="";nr.prototype.column=void 0;nr.prototype.line=void 0;nr.prototype.ancestors=void 0;nr.prototype.cause=void 0;nr.prototype.fatal=void 0;nr.prototype.place=void 0;nr.prototype.ruleId=void 0;nr.prototype.source=void 0;const I9={}.hasOwnProperty,Mce=new Map,Dce=/[A-Z]/g,Rce=new Set(["table","tbody","thead","tfoot","tr"]),Pce=new Set(["td","th"]),mH="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Nce(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=Hce(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=qce(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"?z9:_ce,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},a=pH(r,e,void 0);return a&&typeof a!="string"?a:r.create(e,r.Fragment,{children:a||void 0},void 0)}function pH(e,n,t){if(n.type==="element")return $ce(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return zce(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Ice(e,n,t);if(n.type==="mdxjsEsm")return Lce(e,n);if(n.type==="root")return Bce(e,n,t);if(n.type==="text")return Fce(e,n)}function $ce(e,n,t){const i=e.schema;let r=i;n.tagName.toLowerCase()==="svg"&&i.space==="html"&&(r=z9,e.schema=r),e.ancestors.push(n);const a=gH(e,n.tagName,!1),o=Uce(e,n);let l=F9(e,n);return Rce.has(n.tagName)&&(l=l.filter(function(u){return typeof u=="string"?!dce(u):!0})),vH(e,o,a,n),B9(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function zce(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)}km(e,n.position)}function Lce(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);km(e,n.position)}function Ice(e,n,t){const i=e.schema;let r=i;n.name==="svg"&&i.space==="html"&&(r=z9,e.schema=r),e.ancestors.push(n);const a=n.name===null?e.Fragment:gH(e,n.name,!0),o=Vce(e,n),l=F9(e,n);return vH(e,o,a,n),B9(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function Bce(e,n,t){const i={};return B9(i,F9(e,n)),e.create(n,e.Fragment,i,t)}function Fce(e,n){return n.value}function vH(e,n,t,i){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=i)}function B9(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function qce(e,n,t){return i;function i(r,a,o,l){const f=Array.isArray(o.children)?t:n;return l?f(a,o,l):f(a,o)}}function Hce(e,n){return t;function t(i,r,a,o){const l=Array.isArray(a.children),u=L9(i);return n(r,a,o,l,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Uce(e,n){const t={};let i,r;for(r in n.properties)if(r!=="children"&&I9.call(n.properties,r)){const a=Wce(e,r,n.properties[r]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&Pce.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 Vce(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 km(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 km(e,n.position);else a=i.value===null?!0:i.value;t[r]=a}return t}function F9(e,n){const t=[];let i=-1;const r=e.passKeys?new Map:Mce;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?(Yr(e,e.length,0,n),e):n}const GM={}.hasOwnProperty;function bH(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 ar=Rl(/[A-Za-z]/),er=Rl(/[\dA-Za-z]/),nfe=Rl(/[#-'*+\--9=?A-Z^-~]/);function d1(e){return e!==null&&(e<32||e===127)}const m4=Rl(/\d/),tfe=Rl(/[\dA-Fa-f]/),ife=Rl(/[!-/:-@[-`{-~]/);function Cn(e){return e!==null&&e<-2}function zt(e){return e!==null&&(e<0||e===32)}function rt(e){return e===-2||e===-1||e===32}const R0=Rl(new RegExp("\\p{P}|\\p{S}","u")),Pu=Rl(/\s/);function Rl(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function od(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 dt(e,n,t,i){const r=i?i-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(u){return rt(u)?(e.enter(t),l(u)):n(u)}function l(u){return rt(u)&&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;Oj;){const A=t[T];n.containerState=A[1],A[0].exit.call(n,e)}t.length=j}function S(){r.write([null]),a=void 0,r=void 0,n.containerState._closeFlow=void 0}}function lfe(e,n,t){return dt(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function df(e){if(e===null||zt(e)||Pu(e))return 1;if(R0(e))return 2}function P0(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};KM(d,-u),KM(p,u),o={type:u>1?"strongSequence":"emphasisSequence",start:d,end:{...e[i][1].end}},l={type:u>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},a={type:u>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[t][1].start}},r={type:u>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[i][1].end={...o.start},e[t][1].start={...l.end},f=[],e[i][1].end.offset-e[i][1].start.offset&&(f=va(f,[["enter",e[i][1],n],["exit",e[i][1],n]])),f=va(f,[["enter",r,n],["enter",o,n],["exit",o,n],["enter",a,n]]),f=va(f,P0(n.parser.constructs.insideSpan.null,e.slice(i+1,t),n)),f=va(f,[["exit",a,n],["enter",l,n],["exit",l,n],["exit",r,n]]),e[t][1].end.offset-e[t][1].start.offset?(h=2,f=va(f,[["enter",e[t][1],n],["exit",e[t][1],n]])):h=0,Yr(e,i-1,t-i+3,f),t=i+f.length-h-2;break}}for(t=-1;++t0&&rt(O)?dt(e,S,"linePrefix",a+1)(O):S(O)}function S(O){return O===null||Cn(O)?e.check(XM,w,T)(O):(e.enter("codeFlowValue"),j(O))}function j(O){return O===null||Cn(O)?(e.exit("codeFlowValue"),S(O)):(e.consume(O),j)}function T(O){return e.exit("codeFenced"),n(O)}function A(O,M,$){let q=0;return P;function P(R){return O.enter("lineEnding"),O.consume(R),O.exit("lineEnding"),L}function L(R){return O.enter("codeFencedFence"),rt(R)?dt(O,U,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):U(R)}function U(R){return R===l?(O.enter("codeFencedFenceSequence"),G(R)):$(R)}function G(R){return R===l?(q++,O.consume(R),G):q>=o?(O.exit("codeFencedFenceSequence"),rt(R)?dt(O,B,"whitespace")(R):B(R)):$(R)}function B(R){return R===null||Cn(R)?(O.exit("codeFencedFence"),M(R)):$(R)}}}function wfe(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 u_={name:"codeIndented",tokenize:_fe},kfe={partial:!0,tokenize:xfe};function _fe(e,n,t){const i=this;return r;function r(f){return e.enter("codeIndented"),dt(e,a,"linePrefix",5)(f)}function a(f){const h=i.events[i.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?o(f):t(f)}function o(f){return f===null?u(f):Cn(f)?e.attempt(kfe,o,u)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||Cn(f)?(e.exit("codeFlowValue"),o(f)):(e.consume(f),l)}function u(f){return e.exit("codeIndented"),n(f)}}function xfe(e,n,t){const i=this;return r;function r(o){return i.parser.lazy[i.now().line]?t(o):Cn(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r):dt(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):Cn(o)?r(o):t(o)}}const Sfe={name:"codeText",previous:jfe,resolve:Cfe,tokenize:Afe};function Cfe(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&&Sh(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),Sh(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Sh(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 CH(e,n,t,i,r,a,o,l,u){const f=u||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||d1(_)?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"}),g(_))}function g(_){return _===62?(e.exit("chunkString"),e.exit(l),p(_)):_===null||_===60||Cn(_)?t(_):(e.consume(_),_===92?b:g)}function b(_){return _===60||_===62||_===92?(e.consume(_),g):g(_)}function w(_){return!h&&(_===null||_===41||zt(_))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(i),n(_)):h999||g===null||g===91||g===93&&!u||g===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?t(g):g===93?(e.exit(a),e.enter(r),e.consume(g),e.exit(r),e.exit(i),n):Cn(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===null||g===91||g===93||Cn(g)||l++>999?(e.exit("chunkString"),h(g)):(e.consume(g),u||(u=!rt(g)),g===92?p:d)}function p(g){return g===91||g===92||g===93?(e.consume(g),l++,d):d(g)}}function AH(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,u):t(p)}function u(p){return p===o?(e.enter(r),e.consume(p),e.exit(r),e.exit(i),n):(e.enter(a),f(p))}function f(p){return p===o?(e.exit(a),u(o)):p===null?t(p):Cn(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),dt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===o||p===null||Cn(p)?(e.exit("chunkString"),f(p)):(e.consume(p),p===92?d:h)}function d(p){return p===o||p===92?(e.consume(p),h):h(p)}}function em(e,n){let t;return i;function i(r){return Cn(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t=!0,i):rt(r)?dt(e,i,t?"linePrefix":"lineSuffix")(r):n(r)}}const Nfe={name:"definition",tokenize:zfe},$fe={partial:!0,tokenize:Lfe};function zfe(e,n,t){const i=this;let r;return a;function a(g){return e.enter("definition"),o(g)}function o(g){return jH.call(i,e,l,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function l(g){return r=qa(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),u):t(g)}function u(g){return zt(g)?em(e,f)(g):f(g)}function f(g){return CH(e,h,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function h(g){return e.attempt($fe,d,d)(g)}function d(g){return rt(g)?dt(e,p,"whitespace")(g):p(g)}function p(g){return g===null||Cn(g)?(e.exit("definition"),i.parser.defined.push(r),n(g)):t(g)}}function Lfe(e,n,t){return i;function i(l){return zt(l)?em(e,r)(l):t(l)}function r(l){return AH(e,a,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return rt(l)?dt(e,o,"whitespace")(l):o(l)}function o(l){return l===null||Cn(l)?n(l):t(l)}}const Ife={name:"hardBreakEscape",tokenize:Bfe};function Bfe(e,n,t){return i;function i(a){return e.enter("hardBreakEscape"),e.consume(a),r}function r(a){return Cn(a)?(e.exit("hardBreakEscape"),n(a)):t(a)}}const Ffe={name:"headingAtx",resolve:qfe,tokenize:Hfe};function qfe(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"},Yr(e,i,t-i+1,[["enter",r,n],["enter",a,n],["exit",a,n],["exit",r,n]])),e}function Hfe(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||zt(h)?(e.exit("atxHeadingSequence"),l(h)):t(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),u(h)):h===null||Cn(h)?(e.exit("atxHeading"),n(h)):rt(h)?dt(e,l,"whitespace")(h):(e.enter("atxHeadingText"),f(h))}function u(h){return h===35?(e.consume(h),u):(e.exit("atxHeadingSequence"),l(h))}function f(h){return h===null||h===35||zt(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),f)}}const Ufe=["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"],QM=["pre","script","style","textarea"],Vfe={concrete:!0,name:"htmlFlow",resolveTo:Yfe,tokenize:Kfe},Wfe={partial:!0,tokenize:Zfe},Gfe={partial:!0,tokenize:Xfe};function Yfe(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 Kfe(e,n,t){const i=this;let r,a,o,l,u;return f;function f(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:N):ar(I)?(e.consume(I),o=String.fromCharCode(I),k):t(I)}function p(I){return I===45?(e.consume(I),r=2,g):I===91?(e.consume(I),r=5,l=0,b):ar(I)?(e.consume(I),r=4,i.interrupt?n:N):t(I)}function g(I){return I===45?(e.consume(I),i.interrupt?n:N):t(I)}function b(I){const Q="CDATA[";return I===Q.charCodeAt(l++)?(e.consume(I),l===Q.length?i.interrupt?n:U:b):t(I)}function w(I){return ar(I)?(e.consume(I),o=String.fromCharCode(I),k):t(I)}function k(I){if(I===null||I===47||I===62||zt(I)){const Q=I===47,ie=o.toLowerCase();return!Q&&!a&&QM.includes(ie)?(r=1,i.interrupt?n(I):U(I)):Ufe.includes(o.toLowerCase())?(r=6,Q?(e.consume(I),_):i.interrupt?n(I):U(I)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?t(I):a?S(I):j(I))}return I===45||er(I)?(e.consume(I),o+=String.fromCharCode(I),k):t(I)}function _(I){return I===62?(e.consume(I),i.interrupt?n:U):t(I)}function S(I){return rt(I)?(e.consume(I),S):P(I)}function j(I){return I===47?(e.consume(I),P):I===58||I===95||ar(I)?(e.consume(I),T):rt(I)?(e.consume(I),j):P(I)}function T(I){return I===45||I===46||I===58||I===95||er(I)?(e.consume(I),T):A(I)}function A(I){return I===61?(e.consume(I),O):rt(I)?(e.consume(I),A):j(I)}function O(I){return I===null||I===60||I===61||I===62||I===96?t(I):I===34||I===39?(e.consume(I),u=I,M):rt(I)?(e.consume(I),O):$(I)}function M(I){return I===u?(e.consume(I),u=null,q):I===null||Cn(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||zt(I)?A(I):(e.consume(I),$)}function q(I){return I===47||I===62||rt(I)?j(I):t(I)}function P(I){return I===62?(e.consume(I),L):t(I)}function L(I){return I===null||Cn(I)?U(I):rt(I)?(e.consume(I),L):t(I)}function U(I){return I===45&&r===2?(e.consume(I),D):I===60&&r===1?(e.consume(I),z):I===62&&r===4?(e.consume(I),W):I===63&&r===3?(e.consume(I),N):I===93&&r===5?(e.consume(I),Y):Cn(I)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(Wfe,V,G)(I)):I===null||Cn(I)?(e.exit("htmlFlowData"),G(I)):(e.consume(I),U)}function G(I){return e.check(Gfe,B,V)(I)}function B(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),R}function R(I){return I===null||Cn(I)?G(I):(e.enter("htmlFlowData"),U(I))}function D(I){return I===45?(e.consume(I),N):U(I)}function z(I){return I===47?(e.consume(I),o="",H):U(I)}function H(I){if(I===62){const Q=o.toLowerCase();return QM.includes(Q)?(e.consume(I),W):U(I)}return ar(I)&&o.length<8?(e.consume(I),o+=String.fromCharCode(I),H):U(I)}function Y(I){return I===93?(e.consume(I),N):U(I)}function N(I){return I===62?(e.consume(I),W):I===45&&r===2?(e.consume(I),N):U(I)}function W(I){return I===null||Cn(I)?(e.exit("htmlFlowData"),V(I)):(e.consume(I),W)}function V(I){return e.exit("htmlFlow"),n(I)}}function Xfe(e,n,t){const i=this;return r;function r(o){return Cn(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 Zfe(e,n,t){return i;function i(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Tp,n,t)}}const Qfe={name:"htmlText",tokenize:Jfe};function Jfe(e,n,t){const i=this;let r,a,o;return l;function l(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),u}function u(N){return N===33?(e.consume(N),f):N===47?(e.consume(N),A):N===63?(e.consume(N),j):ar(N)?(e.consume(N),$):t(N)}function f(N){return N===45?(e.consume(N),h):N===91?(e.consume(N),a=0,b):ar(N)?(e.consume(N),S):t(N)}function h(N){return N===45?(e.consume(N),g):t(N)}function d(N){return N===null?t(N):N===45?(e.consume(N),p):Cn(N)?(o=d,z(N)):(e.consume(N),d)}function p(N){return N===45?(e.consume(N),g):d(N)}function g(N){return N===62?D(N):N===45?p(N):d(N)}function b(N){const W="CDATA[";return N===W.charCodeAt(a++)?(e.consume(N),a===W.length?w:b):t(N)}function w(N){return N===null?t(N):N===93?(e.consume(N),k):Cn(N)?(o=w,z(N)):(e.consume(N),w)}function k(N){return N===93?(e.consume(N),_):w(N)}function _(N){return N===62?D(N):N===93?(e.consume(N),_):w(N)}function S(N){return N===null||N===62?D(N):Cn(N)?(o=S,z(N)):(e.consume(N),S)}function j(N){return N===null?t(N):N===63?(e.consume(N),T):Cn(N)?(o=j,z(N)):(e.consume(N),j)}function T(N){return N===62?D(N):j(N)}function A(N){return ar(N)?(e.consume(N),O):t(N)}function O(N){return N===45||er(N)?(e.consume(N),O):M(N)}function M(N){return Cn(N)?(o=M,z(N)):rt(N)?(e.consume(N),M):D(N)}function $(N){return N===45||er(N)?(e.consume(N),$):N===47||N===62||zt(N)?q(N):t(N)}function q(N){return N===47?(e.consume(N),D):N===58||N===95||ar(N)?(e.consume(N),P):Cn(N)?(o=q,z(N)):rt(N)?(e.consume(N),q):D(N)}function P(N){return N===45||N===46||N===58||N===95||er(N)?(e.consume(N),P):L(N)}function L(N){return N===61?(e.consume(N),U):Cn(N)?(o=L,z(N)):rt(N)?(e.consume(N),L):q(N)}function U(N){return N===null||N===60||N===61||N===62||N===96?t(N):N===34||N===39?(e.consume(N),r=N,G):Cn(N)?(o=U,z(N)):rt(N)?(e.consume(N),U):(e.consume(N),B)}function G(N){return N===r?(e.consume(N),r=void 0,R):N===null?t(N):Cn(N)?(o=G,z(N)):(e.consume(N),G)}function B(N){return N===null||N===34||N===39||N===60||N===61||N===96?t(N):N===47||N===62||zt(N)?q(N):(e.consume(N),B)}function R(N){return N===47||N===62||zt(N)?q(N):t(N)}function D(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),n):t(N)}function z(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),H}function H(N){return rt(N)?dt(e,Y,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):Y(N)}function Y(N){return e.enter("htmlTextData"),o(N)}}const U9={name:"labelEnd",resolveAll:ide,resolveTo:rde,tokenize:ade},ede={tokenize:ode},nde={tokenize:sde},tde={tokenize:lde};function ide(e){let n=-1;const t=[];for(;++n=3&&(f===null||Cn(f))?(e.exit("thematicBreak"),n(f)):t(f)}function u(f){return f===r?(e.consume(f),i++,u):(e.exit("thematicBreakSequence"),rt(f)?dt(e,l,"whitespace")(f):l(f))}}const _r={continuation:{tokenize:yde},exit:wde,name:"list",tokenize:gde},pde={partial:!0,tokenize:kde},vde={partial:!0,tokenize:bde};function gde(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(g){const b=i.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!i.containerState.marker||g===i.containerState.marker:m4(g)){if(i.containerState.type||(i.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(qg,t,f)(g):f(g);if(!i.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(g)}return t(g)}function u(g){return m4(g)&&++o<10?(e.consume(g),u):(!i.interrupt||o<2)&&(i.containerState.marker?g===i.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),f(g)):t(g)}function f(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||g,e.check(Tp,i.interrupt?t:h,e.attempt(pde,p,d))}function h(g){return i.containerState.initialBlankLine=!0,a++,p(g)}function d(g){return rt(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),p):t(g)}function p(g){return i.containerState.size=a+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(g)}}function yde(e,n,t){const i=this;return i.containerState._closeFlow=void 0,e.check(Tp,r,a);function r(l){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,dt(e,n,"listItemIndent",i.containerState.size+1)(l)}function a(l){return i.containerState.furtherBlankLines||!rt(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(vde,n,o)(l))}function o(l){return i.containerState._closeFlow=!0,i.interrupt=void 0,dt(e,e.attempt(_r,n,t),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function bde(e,n,t){const i=this;return dt(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 wde(e){e.exit(this.containerState.type)}function kde(e,n,t){const i=this;return dt(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!rt(a)&&o&&o[1].type==="listItemPrefixWhitespace"?n(a):t(a)}}const JM={name:"setextUnderline",resolveTo:_de,tokenize:xde};function _de(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 xde(e,n,t){const i=this;let r;return a;function a(f){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=f,o(f)):t(f)}function o(f){return e.enter("setextHeadingLineSequence"),l(f)}function l(f){return f===r?(e.consume(f),l):(e.exit("setextHeadingLineSequence"),rt(f)?dt(e,u,"lineSuffix")(f):u(f))}function u(f){return f===null||Cn(f)?(e.exit("setextHeadingLine"),n(f)):t(f)}}const Sde={tokenize:Cde};function Cde(e){const n=this,t=e.attempt(Tp,i,e.attempt(this.parser.constructs.flowInitial,r,dt(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Efe,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 jde={resolveAll:TH()},Ade=OH("string"),Ode=OH("text");function OH(e){return{resolveAll:TH(e==="text"?Tde: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 f(h)?a(h):l(h)}function l(h){if(h===null){t.consume(h);return}return t.enter("data"),t.consume(h),u}function u(h){return f(h)?(t.exit("data"),a(h)):(t.consume(h),u)}function f(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 qde(e,n){let t=-1;const i=[];let r;for(;++t{D.focus();const I=(Y+W+R).length;D.setSelectionRange(I,I)})},L=async R=>{if(!a){hn.show({color:"yellow",message:"Guarda la tarjeta antes de subir archivos."});return}O(!0);try{for(const D of Array.from(R))try{const z=await v9(a,D,"description");P(Fue(z.filename,z.url,z.mime.startsWith("image/"))),o==null||o()}catch(z){hn.show({color:"red",message:`${D.name}: ${z.message}`})}}finally{O(!1)}},U=R=>{R.preventDefault(),T(!1),!(!R.dataTransfer.files||R.dataTransfer.files.length===0)&&L(R.dataTransfer.files)},G=R=>{a&&R.dataTransfer.types.includes("Files")&&(R.preventDefault(),T(!0))},B=R=>{R.preventDefault(),T(!1)};return v.jsx("form",{onSubmit:$,children:v.jsxs(kn,{gap:"sm",children:[v.jsx(_l,{label:"Tarea",value:d,onChange:R=>p(R.currentTarget.value),tabIndex:1,required:!0,autoComplete:"off","data-autofocus":!0,autosize:!0,minRows:1,maxRows:4,onKeyDown:R=>{R.key==="Enter"&&!R.shiftKey&&(R.preventDefault(),$())}}),v.jsx(Hy,{label:"Solicitante",value:f,onChange:h,data:i,tabIndex:2,autoComplete:"off","data-field":"requester",placeholder:"Empieza a escribir y elige uno existente",limit:10,onKeyDown:R=>{R.key==="Enter"&&R.preventDefault()}}),v.jsxs(fe,{onDrop:U,onDragOver:G,onDragLeave:B,style:{position:"relative",outline:j?"2px dashed var(--mantine-color-blue-5)":void 0,outlineOffset:j?2:void 0,borderRadius:4},children:[v.jsx(_l,{ref:M,label:"Descripcion",value:g,onChange:R=>b(R.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"}),(j||A)&&v.jsx(fe,{style:{position:"absolute",inset:0,background:"rgba(34,139,230,0.08)",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",borderRadius:4},children:v.jsx(de,{size:"sm",fw:500,c:"blue",children:A?"Subiendo...":"Suelta para adjuntar"})})]}),v.jsx(jr,{label:"Asignar a",placeholder:"Sin asignar",value:w,onChange:R=>k(R),data:t.map(R=>({value:R.id,label:R.display_name||R.username})),clearable:!0,searchable:!0,tabIndex:4}),v.jsx(c9,{label:"Tags",value:_,onChange:S,data:r,clearable:!0,tabIndex:5,placeholder:"Enter para añadir; sugiere existentes",splitChars:[","," "]}),v.jsxs(Ee,{justify:"flex-end",gap:"xs",mt:"xs",children:[v.jsx(Yn,{variant:"subtle",color:"gray",tabIndex:7,type:"button",onClick:u,children:"Cancelar"}),v.jsx(Yn,{tabIndex:6,type:"submit",disabled:!d.trim(),children:n})]})]})})}function que(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 R9=new Set(["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo","gray","dark"]);function P9(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)}function iH(e){return e?P9(e)?`color-mix(in srgb, ${e} 18%, var(--mantine-color-dark-6))`:R9.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 N9(e){return e?P9(e)?`color-mix(in srgb, ${e} 30%, var(--mantine-color-dark-4))`:R9.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 Hue(e){return e?P9(e)?e:R9.has(e)?`var(--mantine-color-${e}-7)`:"var(--mantine-color-dark-3)":"var(--mantine-color-dark-3)"}const rH=[{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"}],Uue=rH,Vue=["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo"];function Ru(e){return que(e,Vue)}const u4=6e4,Hh=60*u4,Wc=24*Hh,lg=7*Wc,i_=30*Wc;function ei(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=Wue(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=aH(i[6]);r?n.push({kind:"link",label:i[5],url:r}):n.push({kind:"text",value:i[0]})}t=r_.lastIndex}return t{i.length!==0&&(r.push(v.jsx(de,{size:n,style:{whiteSpace:"pre-wrap",wordBreak:"break-word"},children:i.map((l,u)=>v.jsx(x.Fragment,{children:l},u))},`t-${a++}`)),i.length=0)};for(const l of t)l.kind==="img"?(o(),r.push(v.jsx(ho,{href:l.url,target:"_blank",rel:"noopener noreferrer",children:v.jsx(Xf,{src:l.url,alt:l.alt,maw:220,mah:220,fit:"contain",radius:"sm"})},`i-${a++}`))):l.kind==="link"?i.push(v.jsx(ho,{href:l.url,target:"_blank",rel:"noopener noreferrer",children:l.label},`l-${a++}`)):i.push(l.value);return o(),v.jsx(v.Fragment,{children:r})}function Kue(e,n,t){const i=e.replace(/]/g,"");return t.startsWith("image/")?`![${i}](${n})`:`[${i}](${n})`}const Xue=4e3,Zue=1500;function Que(e,n){for(let t=n-1;t>=0&&n-t<=64;t--){const i=e[t];if(i==="@"){if(t===0||/\s/.test(e[t-1])){const r=e.slice(t+1,n);if(/^[a-z0-9_.-]*$/i.test(r))return{start:t,query:r.toLowerCase()}}return null}if(/\s/.test(i))return null}return null}function Jue({cardId:e,users:n,currentUserId:t,onMessagesChange:i,onFileUploaded:r,highlightMessageId:a}){const[o,l]=x.useState([]),[u,f]=x.useState(!0),[h,d]=x.useState(""),[p,g]=x.useState(!1),[b,w]=x.useState(!1),[k,_]=x.useState(!1),[S,j]=x.useState({}),[T,A]=x.useState(null),O=x.useRef(null),M=x.useRef(null),$=x.useRef(null),q=x.useRef(0),P=x.useMemo(()=>new Map(n.map(Z=>[Z.id,Z])),[n]),L=x.useCallback(async()=>{try{const Z=await Dre(e);l(Z),i==null||i(Z)}catch(Z){hn.show({color:"red",message:Z.message})}finally{f(!1)}},[e,i]);x.useEffect(()=>{L()},[L]),x.useEffect(()=>{const Z=new WebSocket($re(e));return M.current=Z,Z.onmessage=le=>{try{const ee=JSON.parse(le.data);ee.type==="message.created"&&ee.message?l(se=>{if(se.some(te=>te.id===ee.message.id))return se;const ke=[...se,ee.message];return i==null||i(ke),ke}):ee.type==="typing"&&ee.user_id?j(se=>({...se,[ee.user_id]:Date.now()})):ee.type==="error"&&hn.show({color:"red",message:ee.error})}catch{}},Z.onerror=()=>{},()=>{Z.close(),M.current=null}},[e,i]),x.useEffect(()=>{const Z=setInterval(()=>{const le=Date.now();j(ee=>{const se={};for(const[ke,te]of Object.entries(ee))le-teclearInterval(Z)},[]),x.useEffect(()=>{O.current&&O.current.scrollTo({top:O.current.scrollHeight,behavior:"smooth"})},[o.length]);const[U,G]=x.useState(null);x.useEffect(()=>{if(!a||!o.some(ee=>ee.id===a))return;const Z=document.querySelector(`[data-msg-id="${a}"]`);Z&&Z instanceof HTMLElement&&Z.scrollIntoView({behavior:"smooth",block:"center"}),G(a);const le=setTimeout(()=>G(null),2200);return()=>clearTimeout(le)},[a,o]);const B=()=>{const Z=M.current;if(!Z||Z.readyState!==WebSocket.OPEN)return;const le=Date.now();le-q.currentA(null)}),D=x.useMemo(()=>T?n.filter(Z=>Z.username.toLowerCase().startsWith(T.query)).slice(0,8):[],[n,T]);x.useEffect(()=>{T&&D.length>0?(R.openDropdown(),R.selectFirstOption()):R.closeDropdown()},[T==null?void 0:T.query,D.length]);const z=Z=>{if(!T)return;const le=h.slice(0,T.start),ee=h.slice(T.start+1+T.query.length),se=`@${Z} `,ke=le+se+ee;d(ke),A(null),requestAnimationFrame(()=>{const te=$.current;if(!te)return;const $e=(le+se).length;te.focus(),te.setSelectionRange($e,$e)})},H=async()=>{const Z=h.trim();if(!Z||p)return;g(!0);const le=M.current;try{if(le&&le.readyState===WebSocket.OPEN)le.send(JSON.stringify({type:"send",body:Z})),d("");else{const ee=await cM(e,Z);l(se=>[...se,ee]),i==null||i([...o,ee]),d("")}}catch(ee){hn.show({color:"red",message:ee.message})}finally{g(!1)}},Y=async Z=>{try{await Rre(e,Z);const le=o.filter(ee=>ee.id!==Z);l(le),i==null||i(le)}catch(le){hn.show({color:"red",message:le.message})}},N=Z=>{d(Z.currentTarget.value),B();const le=Z.currentTarget.selectionStart??Z.currentTarget.value.length;A(Que(Z.currentTarget.value,le))},W=Z=>{if(T&&D.length>0&&(Z.key==="Enter"||Z.key==="Tab")){Z.preventDefault();const le=R.getSelectedOptionIndex(),ee=D[Math.max(0,le)];ee&&z(ee.username);return}if(T&&Z.key==="Escape"){A(null);return}Z.key==="Enter"&&!Z.shiftKey&&(Z.preventDefault(),H())},V=async Z=>{w(!0);try{for(const le of Array.from(Z))try{const ee=await v9(e,le,"chat"),se=Kue(ee.filename,ee.url,ee.mime),ke=await cM(e,se);l(te=>{const $e=[...te,ke];return i==null||i($e),$e}),r==null||r()}catch(ee){hn.show({color:"red",message:`${le.name}: ${ee.message}`})}}finally{w(!1)}},I=Z=>{Z.preventDefault(),_(!1),!(!Z.dataTransfer.files||Z.dataTransfer.files.length===0)&&V(Z.dataTransfer.files)},Q=Z=>{Z.dataTransfer.types.includes("Files")&&(Z.preventDefault(),_(!0))},ie=Z=>{Z.preventDefault(),_(!1)},re=Object.keys(S).filter(Z=>Z!==t).map(Z=>{const le=P.get(Z);return(le==null?void 0:le.display_name)||(le==null?void 0:le.username)||"alguien"});return v.jsxs(kn,{gap:"xs",style:{height:"100%",minHeight:0,position:"relative",outline:k?"2px dashed var(--mantine-color-blue-5)":void 0,outlineOffset:k?-2:void 0,borderRadius:4},onDrop:I,onDragOver:Q,onDragLeave:ie,children:[v.jsx(ur,{viewportRef:O,style:{flex:1,minHeight:200},type:"auto",offsetScrollbars:!0,children:u?v.jsx(Ee,{justify:"center",p:"md",children:v.jsx(Zt,{size:"sm"})}):o.length===0?v.jsx(de,{size:"sm",c:"dimmed",ta:"center",p:"md",children:"Sin mensajes aun. Escribe el primero o arrastra un archivo."}):v.jsx(kn,{gap:6,p:4,children:o.map(Z=>{const le=Z.author_id?P.get(Z.author_id):null,ee=Z.author_id&&Z.author_id===t,se=le?le.display_name||le.username:"Anonimo",ke=U===Z.id;return v.jsx(Tt,{withBorder:!0,p:"xs",radius:"sm","data-msg-id":Z.id,bg:ke?"var(--mantine-color-yellow-light)":ee?"var(--mantine-color-blue-light)":void 0,style:{transition:"background-color 600ms ease",boxShadow:ke?"0 0 0 2px var(--mantine-color-yellow-5)":void 0},children:v.jsxs(Ee,{gap:6,wrap:"nowrap",align:"flex-start",children:[v.jsx(mo,{size:22,radius:"xl",color:(le==null?void 0:le.color)||Ru(se),children:se.slice(0,2).toUpperCase()}),v.jsxs(fe,{style:{flex:1,minWidth:0},children:[v.jsxs(Ee,{gap:6,wrap:"nowrap",justify:"space-between",children:[v.jsxs(Ee,{gap:6,wrap:"nowrap",children:[v.jsx(de,{size:"xs",fw:600,children:se}),v.jsx(de,{size:"xs",c:"dimmed",children:Sl(Z.created_at)})]}),ee&&v.jsx(wt,{label:"Borrar",withArrow:!0,children:v.jsx(Jn,{size:"xs",variant:"subtle",color:"red",onClick:()=>Y(Z.id),children:v.jsx(vo,{size:12})})})]}),v.jsx(kn,{gap:4,children:v.jsx(Yue,{text:Z.body})})]})]})},Z.id)})})}),re.length>0&&v.jsx(de,{size:"xs",c:"dimmed",px:6,children:re.length===1?`${re[0]} esta escribiendo...`:`${re.slice(0,2).join(", ")}${re.length>2?"...":""} estan escribiendo...`}),v.jsxs(On,{store:R,onOptionSubmit:Z=>z(Z),position:"top-start",withinPortal:!1,children:[v.jsx(On.DropdownTarget,{children:v.jsxs(Ee,{gap:"xs",align:"flex-end",children:[v.jsx(_l,{ref:$,value:h,onChange:N,onKeyDown:W,placeholder:"Escribe un mensaje (Enter = enviar, @ para mencionar). Arrastra archivos o usa el clip.",autosize:!0,minRows:1,maxRows:6,style:{flex:1},disabled:p}),v.jsx(VC,{onChange:Z=>Z&&V([Z]),disabled:b,children:Z=>v.jsx(wt,{label:"Adjuntar archivo",withArrow:!0,children:v.jsx(Jn,{size:"lg",variant:"subtle",color:"gray","aria-label":"Adjuntar",loading:b,...Z,children:v.jsx(Qq,{size:16})})})}),v.jsx(wt,{label:"Enviar",withArrow:!0,children:v.jsx(Jn,{size:"lg",variant:"filled",color:"blue",onClick:H,disabled:!h.trim()||p,"aria-label":"Enviar",children:v.jsx(nH,{size:16})})})]})}),v.jsx(On.Dropdown,{hidden:!T||D.length===0,children:v.jsx(On.Options,{children:D.map(Z=>v.jsx(On.Option,{value:Z.username,children:v.jsxs(Ee,{gap:6,wrap:"nowrap",children:[v.jsx(mo,{size:18,radius:"xl",color:Z.color||Ru(Z.username),children:(Z.display_name||Z.username).slice(0,2).toUpperCase()}),v.jsxs(de,{size:"sm",fw:600,children:["@",Z.username]}),Z.display_name&&Z.display_name!==Z.username&&v.jsx(de,{size:"xs",c:"dimmed",children:Z.display_name})]})},Z.id))})})]}),(k||b)&&v.jsx(fe,{style:{position:"absolute",inset:0,background:"rgba(34,139,230,0.08)",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",borderRadius:4},children:v.jsx(de,{size:"sm",fw:500,c:"blue",children:b?"Subiendo...":"Suelta para adjuntar"})})]})}function ece(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(2)} MB`}function nce(e){return e.startsWith("image/")}function tce(e,n=18){const t=e.toLowerCase();return t.startsWith("image/")?v.jsx(oue,{size:n}):t==="application/pdf"?v.jsx(Rle,{size:n}):t.includes("spreadsheet")||t.includes("excel")||t==="text/csv"||t==="application/vnd.ms-excel"?v.jsx(Tle,{size:n}):t.startsWith("text/")?v.jsx(Mle,{size:n}):v.jsx(Nle,{size:n})}function ice(e){return e==="description"?{color:"blue",label:"descripcion"}:e==="chat"?{color:"teal",label:"chat"}:{color:"gray",label:"subido"}}function rce({cardId:e,refreshKey:n}){const[t,i]=x.useState([]),[r,a]=x.useState(!0),[o,l]=x.useState(!1),u=x.useCallback(async()=>{try{const d=await Kre(e);i(d)}catch(d){hn.show({color:"red",message:d.message})}finally{a(!1)}},[e]);x.useEffect(()=>{u()},[u,n]);const f=async d=>{if(d){l(!0);try{const p=await v9(e,d,"upload");i(g=>[...g,p])}catch(p){hn.show({color:"red",message:p.message})}finally{l(!1)}}},h=async d=>{if(window.confirm("¿Borrar este archivo?"))try{await Xre(d),i(p=>p.filter(g=>g.id!==d))}catch(p){hn.show({color:"red",message:p.message})}};return v.jsxs(kn,{gap:"xs",p:4,children:[v.jsxs(Ee,{justify:"space-between",children:[v.jsxs(de,{size:"xs",c:"dimmed",children:[t.length," archivo",t.length===1?"":"s"]}),v.jsx(VC,{onChange:f,disabled:o,children:d=>v.jsx(Yn,{size:"xs",variant:"light",leftSection:v.jsx(Aue,{size:14}),loading:o,...d,children:"Subir"})})]}),r?v.jsx(Ee,{justify:"center",p:"md",children:v.jsx(Zt,{size:"sm"})}):t.length===0?v.jsxs(kn,{gap:"xs",p:"md",align:"center",justify:"center",style:{minHeight:160},children:[v.jsx(de,{size:"sm",c:"dimmed",children:"Sin archivos"}),v.jsx(de,{size:"xs",c:"dimmed",ta:"center",children:"Sube archivos con el boton, arrastra al chat o a la descripcion."})]}):v.jsx(kn,{gap:6,children:t.map(d=>{const p=ice(d.source);return v.jsx(Tt,{withBorder:!0,p:"xs",radius:"sm",children:v.jsxs(Ee,{gap:"xs",wrap:"nowrap",align:"flex-start",children:[nce(d.mime)?v.jsx(ho,{href:d.url,target:"_blank",rel:"noopener noreferrer",children:v.jsx(Xf,{src:d.url,alt:d.filename,w:64,h:64,fit:"cover",radius:"sm"})}):v.jsx(fe,{style:{width:64,height:64,display:"flex",alignItems:"center",justifyContent:"center",background:"var(--mantine-color-gray-1)",borderRadius:4},children:tce(d.mime,28)}),v.jsxs(fe,{style:{flex:1,minWidth:0},children:[v.jsx(ho,{href:d.url,target:"_blank",rel:"noopener noreferrer",size:"sm",style:{wordBreak:"break-all"},children:d.filename}),v.jsxs(Ee,{gap:6,mt:4,children:[v.jsx(Gn,{size:"xs",variant:"light",color:p.color,children:p.label}),v.jsx(de,{size:"xs",c:"dimmed",children:ece(d.size)}),v.jsx(de,{size:"xs",c:"dimmed",children:d.mime||"?"})]})]}),v.jsxs(Ee,{gap:4,wrap:"nowrap",children:[v.jsx(wt,{label:"Descargar",withArrow:!0,children:v.jsx(Jn,{component:"a",href:d.url,download:d.filename,variant:"subtle",size:"sm","aria-label":"Descargar",children:v.jsx(Gq,{size:14})})}),v.jsx(wt,{label:"Borrar",withArrow:!0,children:v.jsx(Jn,{variant:"subtle",color:"red",size:"sm",onClick:()=>h(d.id),"aria-label":"Borrar",children:v.jsx(vo,{size:14})})})]})]})},d.id)})})]})}const PM=/(https?:\/\/[^\s<>()"']+)/gi;function a_(e,n){if(!n)return[];const t=[],i=new Set;let r;for(PM.lastIndex=0;(r=PM.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 ace(e){try{return new URL(e).hostname}catch{return e}}function oce({card:e,messages:n}){const t=x.useMemo(()=>{const a=[...a_("title",e.title),...a_("description",e.description),...n.flatMap(l=>a_("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 v.jsxs(kn,{gap:"xs",p:"md",align:"center",justify:"center",style:{minHeight:200},children:[v.jsx(de,{size:"sm",c:"dimmed",children:"Sin enlaces detectados"}),v.jsx(de,{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 v.jsx(kn,{gap:6,p:4,children:t.map(a=>v.jsx(Tt,{withBorder:!0,p:"xs",radius:"sm",children:v.jsxs(Ee,{gap:"xs",wrap:"nowrap",justify:"space-between",align:"flex-start",children:[v.jsxs(fe,{style:{flex:1,minWidth:0},children:[v.jsx(ho,{href:a.url,target:"_blank",rel:"noopener noreferrer",size:"sm",style:{wordBreak:"break-all"},children:v.jsxs(Ee,{gap:4,wrap:"nowrap",align:"center",children:[v.jsx(Ale,{size:12}),v.jsx("span",{children:ace(a.url)})]})}),v.jsx(de,{size:"xs",c:"dimmed",style:{wordBreak:"break-all"},children:a.url})]}),v.jsx(Gn,{size:"xs",variant:"light",color:i(a.source),children:r(a.source)})]})},a.url))})}function sce({card:e,users:n,currentUserId:t,requesterOptions:i,tagOptions:r,onSubmit:a,onCancel:o,highlightMessageId:l}){const[u,f]=x.useState([]),[h,d]=x.useState(e),[p,g]=x.useState(0),b=async k=>{d(_=>({..._,title:k.title,description:k.description,requester:k.requester,tags:k.tags,assignee_id:k.assignee_id})),await a(k)},w=()=>g(k=>k+1);return v.jsxs(Ee,{align:"stretch",gap:"md",wrap:"nowrap",style:{minHeight:460},children:[v.jsx(fe,{style:{flex:"1 1 0",minWidth:320},children:v.jsx(tH,{users:n,requesterOptions:i,tagOptions:r,initial:{requester:h.requester,title:h.title,description:h.description,assignee_id:h.assignee_id,tags:h.tags||[]},submitLabel:"Guardar",cardId:h.id,onFileUploaded:w,onSubmit:b,onCancel:o})}),v.jsx(us,{orientation:"vertical"}),v.jsx(fe,{style:{flex:"1 1 0",minWidth:320,display:"flex",flexDirection:"column"},children:v.jsxs(Gt,{defaultValue:"chat",keepMounted:!1,style:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[v.jsxs(Gt.List,{children:[v.jsx(Gt.Tab,{value:"chat",leftSection:v.jsx(Zq,{size:14}),children:"Chat"}),v.jsx(Gt.Tab,{value:"links",leftSection:v.jsx(Ule,{size:14}),children:"Enlaces"}),v.jsx(Gt.Tab,{value:"files",leftSection:v.jsx(Qq,{size:14}),children:"Archivos"})]}),v.jsxs(fe,{pt:"xs",style:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:[v.jsx(Gt.Panel,{value:"chat",style:{flex:1,minHeight:0,display:"flex"},children:v.jsx(fe,{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",width:"100%"},children:v.jsx(Jue,{cardId:h.id,users:n,currentUserId:t,onMessagesChange:f,onFileUploaded:w,highlightMessageId:l})})}),v.jsx(Gt.Panel,{value:"links",children:v.jsx(oce,{card:h,messages:u})}),v.jsx(Gt.Panel,{value:"files",children:v.jsx(rce,{cardId:h.id,refreshKey:p})})]})]})})]})}function lce(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const uce=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cce=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fce={};function NM(e,n){return(fce.jsx?cce:uce).test(e)}const dce=/[ \t\n\f\r]/g;function hce(e){return typeof e=="object"?e.type==="text"?$M(e.value):!1:$M(e)}function $M(e){return e.replace(dce,"")===""}class Op{constructor(n,t,i){this.normal=t,this.property=n,i&&(this.space=i)}}Op.prototype.normal={};Op.prototype.property={};Op.prototype.space=void 0;function oH(e,n){const t={},i={};for(const r of e)Object.assign(t,r.property),Object.assign(i,r.normal);return new Op(t,i,n)}function c4(e){return e.toLowerCase()}class Or{constructor(n,t){this.attribute=t,this.property=n}}Or.prototype.attribute="";Or.prototype.booleanish=!1;Or.prototype.boolean=!1;Or.prototype.commaOrSpaceSeparated=!1;Or.prototype.commaSeparated=!1;Or.prototype.defined=!1;Or.prototype.mustUseProperty=!1;Or.prototype.number=!1;Or.prototype.overloadedBoolean=!1;Or.prototype.property="";Or.prototype.spaceSeparated=!1;Or.prototype.space=void 0;let mce=0;const Hn=Gu(),gi=Gu(),f4=Gu(),Ve=Gu(),It=Gu(),Jc=Gu(),Br=Gu();function Gu(){return 2**++mce}const d4=Object.freeze(Object.defineProperty({__proto__:null,boolean:Hn,booleanish:gi,commaOrSpaceSeparated:Br,commaSeparated:Jc,number:Ve,overloadedBoolean:f4,spaceSeparated:It},Symbol.toStringTag,{value:"Module"})),o_=Object.keys(d4);class $9 extends Or{constructor(n,t,i,r){let a=-1;if(super(n,t),zM(this,"space",r),typeof i=="number")for(;++a4&&t.slice(0,4)==="data"&&bce.test(n)){if(n.charAt(4)==="-"){const a=n.slice(5).replace(LM,_ce);i="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=n.slice(4);if(!LM.test(a)){let o=a.replace(yce,kce);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}r=$9}return new r(i,n)}function kce(e){return"-"+e.toLowerCase()}function _ce(e){return e.charAt(1).toUpperCase()}const xce=oH([sH,pce,cH,fH,dH],"html"),z9=oH([sH,vce,cH,fH,dH],"svg");function Sce(e){return e.join(" ").trim()}var $c={},s_,IM;function Cce(){if(IM)return s_;IM=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,r=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,u=` +`,f="/",h="*",d="",p="comment",g="declaration";function b(k,_){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];_=_||{};var S=1,j=1;function T(B){var R=B.match(n);R&&(S+=R.length);var D=B.lastIndexOf(u);j=~D?B.length-D:j+B.length}function A(){var B={line:S,column:j};return function(R){return R.position=new O(B),q(),R}}function O(B){this.start=B,this.end={line:S,column:j},this.source=_.source}O.prototype.content=k;function M(B){var R=new Error(_.source+":"+S+":"+j+": "+B);if(R.reason=B,R.filename=_.source,R.line=S,R.column=j,R.source=k,!_.silent)throw R}function $(B){var R=B.exec(k);if(R){var D=R[0];return T(D),k=k.slice(D.length),R}}function q(){$(t)}function P(B){var R;for(B=B||[];R=L();)R!==!1&&B.push(R);return B}function L(){var B=A();if(!(f!=k.charAt(0)||h!=k.charAt(1))){for(var R=2;d!=k.charAt(R)&&(h!=k.charAt(R)||f!=k.charAt(R+1));)++R;if(R+=2,d===k.charAt(R-1))return M("End of comment missing");var D=k.slice(2,R-2);return j+=2,T(D),k=k.slice(R),j+=2,B({type:p,comment:D})}}function U(){var B=A(),R=$(i);if(R){if(L(),!$(r))return M("property missing ':'");var D=$(a),z=B({type:g,property:w(R[0].replace(e,d)),value:D?w(D[0].replace(e,d)):d});return $(o),z}}function G(){var B=[];P(B);for(var R;R=U();)R!==!1&&(B.push(R),P(B));return B}return q(),G()}function w(k){return k?k.replace(l,d):d}return s_=b,s_}var BM;function jce(){if(BM)return $c;BM=1;var e=$c&&$c.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty($c,"__esModule",{value:!0}),$c.default=t;const n=e(Cce());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(u=>{if(u.type!=="declaration")return;const{property:f,value:h}=u;l?r(f,h,u):h&&(a=a||{},a[f]=h)}),a}return $c}var _h={},FM;function Ace(){if(FM)return _h;FM=1,Object.defineProperty(_h,"__esModule",{value:!0}),_h.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,r=/^-(ms)-/,a=function(f){return!f||t.test(f)||e.test(f)},o=function(f,h){return h.toUpperCase()},l=function(f,h){return"".concat(h,"-")},u=function(f,h){return h===void 0&&(h={}),a(f)?f:(f=f.toLowerCase(),h.reactCompat?f=f.replace(r,l):f=f.replace(i,l),f.replace(n,o))};return _h.camelCase=u,_h}var xh,qM;function Oce(){if(qM)return xh;qM=1;var e=xh&&xh.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},n=e(jce()),t=Ace();function i(r,a){var o={};return!r||typeof r!="string"||(0,n.default)(r,function(l,u){l&&u&&(o[(0,t.camelCase)(l,a)]=u)}),o}return i.default=i,xh=i,xh}var Tce=Oce();const Ece=yt(Tce),hH=mH("end"),L9=mH("start");function mH(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 Mce(e){const n=L9(e),t=hH(e);if(n&&t)return{start:n,end:t}}function Jh(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?HM(e.position):"start"in e||"end"in e?HM(e):"line"in e||"column"in e?h4(e):""}function h4(e){return UM(e&&e.line)+":"+UM(e&&e.column)}function HM(e){return h4(e&&e.start)+"-"+h4(e&&e.end)}function UM(e){return e&&typeof e=="number"?e:1}class nr 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 u=i.indexOf(":");u===-1?a.ruleId=i:(a.source=i.slice(0,u),a.ruleId=i.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.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=Jh(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}}nr.prototype.file="";nr.prototype.name="";nr.prototype.reason="";nr.prototype.message="";nr.prototype.stack="";nr.prototype.column=void 0;nr.prototype.line=void 0;nr.prototype.ancestors=void 0;nr.prototype.cause=void 0;nr.prototype.fatal=void 0;nr.prototype.place=void 0;nr.prototype.ruleId=void 0;nr.prototype.source=void 0;const I9={}.hasOwnProperty,Dce=new Map,Rce=/[A-Z]/g,Pce=new Set(["table","tbody","thead","tfoot","tr"]),Nce=new Set(["td","th"]),pH="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $ce(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=Uce(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=Hce(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"?z9:xce,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},a=vH(r,e,void 0);return a&&typeof a!="string"?a:r.create(e,r.Fragment,{children:a||void 0},void 0)}function vH(e,n,t){if(n.type==="element")return zce(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Lce(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Bce(e,n,t);if(n.type==="mdxjsEsm")return Ice(e,n);if(n.type==="root")return Fce(e,n,t);if(n.type==="text")return qce(e,n)}function zce(e,n,t){const i=e.schema;let r=i;n.tagName.toLowerCase()==="svg"&&i.space==="html"&&(r=z9,e.schema=r),e.ancestors.push(n);const a=yH(e,n.tagName,!1),o=Vce(e,n);let l=F9(e,n);return Pce.has(n.tagName)&&(l=l.filter(function(u){return typeof u=="string"?!hce(u):!0})),gH(e,o,a,n),B9(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function Lce(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)}km(e,n.position)}function Ice(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);km(e,n.position)}function Bce(e,n,t){const i=e.schema;let r=i;n.name==="svg"&&i.space==="html"&&(r=z9,e.schema=r),e.ancestors.push(n);const a=n.name===null?e.Fragment:yH(e,n.name,!0),o=Wce(e,n),l=F9(e,n);return gH(e,o,a,n),B9(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function Fce(e,n,t){const i={};return B9(i,F9(e,n)),e.create(n,e.Fragment,i,t)}function qce(e,n){return n.value}function gH(e,n,t,i){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=i)}function B9(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Hce(e,n,t){return i;function i(r,a,o,l){const f=Array.isArray(o.children)?t:n;return l?f(a,o,l):f(a,o)}}function Uce(e,n){return t;function t(i,r,a,o){const l=Array.isArray(a.children),u=L9(i);return n(r,a,o,l,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Vce(e,n){const t={};let i,r;for(r in n.properties)if(r!=="children"&&I9.call(n.properties,r)){const a=Gce(e,r,n.properties[r]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&Nce.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 Wce(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 km(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 km(e,n.position);else a=i.value===null?!0:i.value;t[r]=a}return t}function F9(e,n){const t=[];let i=-1;const r=e.passKeys?new Map:Dce;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?(Yr(e,e.length,0,n),e):n}const GM={}.hasOwnProperty;function wH(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 ar=Rl(/[A-Za-z]/),er=Rl(/[\dA-Za-z]/),tfe=Rl(/[#-'*+\--9=?A-Z^-~]/);function d1(e){return e!==null&&(e<32||e===127)}const m4=Rl(/\d/),ife=Rl(/[\dA-Fa-f]/),rfe=Rl(/[!-/:-@[-`{-~]/);function Cn(e){return e!==null&&e<-2}function zt(e){return e!==null&&(e<0||e===32)}function rt(e){return e===-2||e===-1||e===32}const R0=Rl(new RegExp("\\p{P}|\\p{S}","u")),Pu=Rl(/\s/);function Rl(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function od(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 dt(e,n,t,i){const r=i?i-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(u){return rt(u)?(e.enter(t),l(u)):n(u)}function l(u){return rt(u)&&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;Oj;){const A=t[T];n.containerState=A[1],A[0].exit.call(n,e)}t.length=j}function S(){r.write([null]),a=void 0,r=void 0,n.containerState._closeFlow=void 0}}function ufe(e,n,t){return dt(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function df(e){if(e===null||zt(e)||Pu(e))return 1;if(R0(e))return 2}function P0(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};KM(d,-u),KM(p,u),o={type:u>1?"strongSequence":"emphasisSequence",start:d,end:{...e[i][1].end}},l={type:u>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},a={type:u>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[t][1].start}},r={type:u>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[i][1].end={...o.start},e[t][1].start={...l.end},f=[],e[i][1].end.offset-e[i][1].start.offset&&(f=va(f,[["enter",e[i][1],n],["exit",e[i][1],n]])),f=va(f,[["enter",r,n],["enter",o,n],["exit",o,n],["enter",a,n]]),f=va(f,P0(n.parser.constructs.insideSpan.null,e.slice(i+1,t),n)),f=va(f,[["exit",a,n],["enter",l,n],["exit",l,n],["exit",r,n]]),e[t][1].end.offset-e[t][1].start.offset?(h=2,f=va(f,[["enter",e[t][1],n],["exit",e[t][1],n]])):h=0,Yr(e,i-1,t-i+3,f),t=i+f.length-h-2;break}}for(t=-1;++t0&&rt(O)?dt(e,S,"linePrefix",a+1)(O):S(O)}function S(O){return O===null||Cn(O)?e.check(XM,w,T)(O):(e.enter("codeFlowValue"),j(O))}function j(O){return O===null||Cn(O)?(e.exit("codeFlowValue"),S(O)):(e.consume(O),j)}function T(O){return e.exit("codeFenced"),n(O)}function A(O,M,$){let q=0;return P;function P(R){return O.enter("lineEnding"),O.consume(R),O.exit("lineEnding"),L}function L(R){return O.enter("codeFencedFence"),rt(R)?dt(O,U,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):U(R)}function U(R){return R===l?(O.enter("codeFencedFenceSequence"),G(R)):$(R)}function G(R){return R===l?(q++,O.consume(R),G):q>=o?(O.exit("codeFencedFenceSequence"),rt(R)?dt(O,B,"whitespace")(R):B(R)):$(R)}function B(R){return R===null||Cn(R)?(O.exit("codeFencedFence"),M(R)):$(R)}}}function kfe(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 u_={name:"codeIndented",tokenize:xfe},_fe={partial:!0,tokenize:Sfe};function xfe(e,n,t){const i=this;return r;function r(f){return e.enter("codeIndented"),dt(e,a,"linePrefix",5)(f)}function a(f){const h=i.events[i.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?o(f):t(f)}function o(f){return f===null?u(f):Cn(f)?e.attempt(_fe,o,u)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||Cn(f)?(e.exit("codeFlowValue"),o(f)):(e.consume(f),l)}function u(f){return e.exit("codeIndented"),n(f)}}function Sfe(e,n,t){const i=this;return r;function r(o){return i.parser.lazy[i.now().line]?t(o):Cn(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r):dt(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):Cn(o)?r(o):t(o)}}const Cfe={name:"codeText",previous:Afe,resolve:jfe,tokenize:Ofe};function jfe(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&&Sh(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),Sh(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Sh(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 jH(e,n,t,i,r,a,o,l,u){const f=u||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||d1(_)?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"}),g(_))}function g(_){return _===62?(e.exit("chunkString"),e.exit(l),p(_)):_===null||_===60||Cn(_)?t(_):(e.consume(_),_===92?b:g)}function b(_){return _===60||_===62||_===92?(e.consume(_),g):g(_)}function w(_){return!h&&(_===null||_===41||zt(_))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(i),n(_)):h999||g===null||g===91||g===93&&!u||g===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?t(g):g===93?(e.exit(a),e.enter(r),e.consume(g),e.exit(r),e.exit(i),n):Cn(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===null||g===91||g===93||Cn(g)||l++>999?(e.exit("chunkString"),h(g)):(e.consume(g),u||(u=!rt(g)),g===92?p:d)}function p(g){return g===91||g===92||g===93?(e.consume(g),l++,d):d(g)}}function OH(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,u):t(p)}function u(p){return p===o?(e.enter(r),e.consume(p),e.exit(r),e.exit(i),n):(e.enter(a),f(p))}function f(p){return p===o?(e.exit(a),u(o)):p===null?t(p):Cn(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),dt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===o||p===null||Cn(p)?(e.exit("chunkString"),f(p)):(e.consume(p),p===92?d:h)}function d(p){return p===o||p===92?(e.consume(p),h):h(p)}}function em(e,n){let t;return i;function i(r){return Cn(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t=!0,i):rt(r)?dt(e,i,t?"linePrefix":"lineSuffix")(r):n(r)}}const $fe={name:"definition",tokenize:Lfe},zfe={partial:!0,tokenize:Ife};function Lfe(e,n,t){const i=this;let r;return a;function a(g){return e.enter("definition"),o(g)}function o(g){return AH.call(i,e,l,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function l(g){return r=qa(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),u):t(g)}function u(g){return zt(g)?em(e,f)(g):f(g)}function f(g){return jH(e,h,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function h(g){return e.attempt(zfe,d,d)(g)}function d(g){return rt(g)?dt(e,p,"whitespace")(g):p(g)}function p(g){return g===null||Cn(g)?(e.exit("definition"),i.parser.defined.push(r),n(g)):t(g)}}function Ife(e,n,t){return i;function i(l){return zt(l)?em(e,r)(l):t(l)}function r(l){return OH(e,a,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return rt(l)?dt(e,o,"whitespace")(l):o(l)}function o(l){return l===null||Cn(l)?n(l):t(l)}}const Bfe={name:"hardBreakEscape",tokenize:Ffe};function Ffe(e,n,t){return i;function i(a){return e.enter("hardBreakEscape"),e.consume(a),r}function r(a){return Cn(a)?(e.exit("hardBreakEscape"),n(a)):t(a)}}const qfe={name:"headingAtx",resolve:Hfe,tokenize:Ufe};function Hfe(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"},Yr(e,i,t-i+1,[["enter",r,n],["enter",a,n],["exit",a,n],["exit",r,n]])),e}function Ufe(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||zt(h)?(e.exit("atxHeadingSequence"),l(h)):t(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),u(h)):h===null||Cn(h)?(e.exit("atxHeading"),n(h)):rt(h)?dt(e,l,"whitespace")(h):(e.enter("atxHeadingText"),f(h))}function u(h){return h===35?(e.consume(h),u):(e.exit("atxHeadingSequence"),l(h))}function f(h){return h===null||h===35||zt(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),f)}}const Vfe=["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"],QM=["pre","script","style","textarea"],Wfe={concrete:!0,name:"htmlFlow",resolveTo:Kfe,tokenize:Xfe},Gfe={partial:!0,tokenize:Qfe},Yfe={partial:!0,tokenize:Zfe};function Kfe(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 Xfe(e,n,t){const i=this;let r,a,o,l,u;return f;function f(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:N):ar(I)?(e.consume(I),o=String.fromCharCode(I),k):t(I)}function p(I){return I===45?(e.consume(I),r=2,g):I===91?(e.consume(I),r=5,l=0,b):ar(I)?(e.consume(I),r=4,i.interrupt?n:N):t(I)}function g(I){return I===45?(e.consume(I),i.interrupt?n:N):t(I)}function b(I){const Q="CDATA[";return I===Q.charCodeAt(l++)?(e.consume(I),l===Q.length?i.interrupt?n:U:b):t(I)}function w(I){return ar(I)?(e.consume(I),o=String.fromCharCode(I),k):t(I)}function k(I){if(I===null||I===47||I===62||zt(I)){const Q=I===47,ie=o.toLowerCase();return!Q&&!a&&QM.includes(ie)?(r=1,i.interrupt?n(I):U(I)):Vfe.includes(o.toLowerCase())?(r=6,Q?(e.consume(I),_):i.interrupt?n(I):U(I)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?t(I):a?S(I):j(I))}return I===45||er(I)?(e.consume(I),o+=String.fromCharCode(I),k):t(I)}function _(I){return I===62?(e.consume(I),i.interrupt?n:U):t(I)}function S(I){return rt(I)?(e.consume(I),S):P(I)}function j(I){return I===47?(e.consume(I),P):I===58||I===95||ar(I)?(e.consume(I),T):rt(I)?(e.consume(I),j):P(I)}function T(I){return I===45||I===46||I===58||I===95||er(I)?(e.consume(I),T):A(I)}function A(I){return I===61?(e.consume(I),O):rt(I)?(e.consume(I),A):j(I)}function O(I){return I===null||I===60||I===61||I===62||I===96?t(I):I===34||I===39?(e.consume(I),u=I,M):rt(I)?(e.consume(I),O):$(I)}function M(I){return I===u?(e.consume(I),u=null,q):I===null||Cn(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||zt(I)?A(I):(e.consume(I),$)}function q(I){return I===47||I===62||rt(I)?j(I):t(I)}function P(I){return I===62?(e.consume(I),L):t(I)}function L(I){return I===null||Cn(I)?U(I):rt(I)?(e.consume(I),L):t(I)}function U(I){return I===45&&r===2?(e.consume(I),D):I===60&&r===1?(e.consume(I),z):I===62&&r===4?(e.consume(I),W):I===63&&r===3?(e.consume(I),N):I===93&&r===5?(e.consume(I),Y):Cn(I)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(Gfe,V,G)(I)):I===null||Cn(I)?(e.exit("htmlFlowData"),G(I)):(e.consume(I),U)}function G(I){return e.check(Yfe,B,V)(I)}function B(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),R}function R(I){return I===null||Cn(I)?G(I):(e.enter("htmlFlowData"),U(I))}function D(I){return I===45?(e.consume(I),N):U(I)}function z(I){return I===47?(e.consume(I),o="",H):U(I)}function H(I){if(I===62){const Q=o.toLowerCase();return QM.includes(Q)?(e.consume(I),W):U(I)}return ar(I)&&o.length<8?(e.consume(I),o+=String.fromCharCode(I),H):U(I)}function Y(I){return I===93?(e.consume(I),N):U(I)}function N(I){return I===62?(e.consume(I),W):I===45&&r===2?(e.consume(I),N):U(I)}function W(I){return I===null||Cn(I)?(e.exit("htmlFlowData"),V(I)):(e.consume(I),W)}function V(I){return e.exit("htmlFlow"),n(I)}}function Zfe(e,n,t){const i=this;return r;function r(o){return Cn(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 Qfe(e,n,t){return i;function i(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Tp,n,t)}}const Jfe={name:"htmlText",tokenize:ede};function ede(e,n,t){const i=this;let r,a,o;return l;function l(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),u}function u(N){return N===33?(e.consume(N),f):N===47?(e.consume(N),A):N===63?(e.consume(N),j):ar(N)?(e.consume(N),$):t(N)}function f(N){return N===45?(e.consume(N),h):N===91?(e.consume(N),a=0,b):ar(N)?(e.consume(N),S):t(N)}function h(N){return N===45?(e.consume(N),g):t(N)}function d(N){return N===null?t(N):N===45?(e.consume(N),p):Cn(N)?(o=d,z(N)):(e.consume(N),d)}function p(N){return N===45?(e.consume(N),g):d(N)}function g(N){return N===62?D(N):N===45?p(N):d(N)}function b(N){const W="CDATA[";return N===W.charCodeAt(a++)?(e.consume(N),a===W.length?w:b):t(N)}function w(N){return N===null?t(N):N===93?(e.consume(N),k):Cn(N)?(o=w,z(N)):(e.consume(N),w)}function k(N){return N===93?(e.consume(N),_):w(N)}function _(N){return N===62?D(N):N===93?(e.consume(N),_):w(N)}function S(N){return N===null||N===62?D(N):Cn(N)?(o=S,z(N)):(e.consume(N),S)}function j(N){return N===null?t(N):N===63?(e.consume(N),T):Cn(N)?(o=j,z(N)):(e.consume(N),j)}function T(N){return N===62?D(N):j(N)}function A(N){return ar(N)?(e.consume(N),O):t(N)}function O(N){return N===45||er(N)?(e.consume(N),O):M(N)}function M(N){return Cn(N)?(o=M,z(N)):rt(N)?(e.consume(N),M):D(N)}function $(N){return N===45||er(N)?(e.consume(N),$):N===47||N===62||zt(N)?q(N):t(N)}function q(N){return N===47?(e.consume(N),D):N===58||N===95||ar(N)?(e.consume(N),P):Cn(N)?(o=q,z(N)):rt(N)?(e.consume(N),q):D(N)}function P(N){return N===45||N===46||N===58||N===95||er(N)?(e.consume(N),P):L(N)}function L(N){return N===61?(e.consume(N),U):Cn(N)?(o=L,z(N)):rt(N)?(e.consume(N),L):q(N)}function U(N){return N===null||N===60||N===61||N===62||N===96?t(N):N===34||N===39?(e.consume(N),r=N,G):Cn(N)?(o=U,z(N)):rt(N)?(e.consume(N),U):(e.consume(N),B)}function G(N){return N===r?(e.consume(N),r=void 0,R):N===null?t(N):Cn(N)?(o=G,z(N)):(e.consume(N),G)}function B(N){return N===null||N===34||N===39||N===60||N===61||N===96?t(N):N===47||N===62||zt(N)?q(N):(e.consume(N),B)}function R(N){return N===47||N===62||zt(N)?q(N):t(N)}function D(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),n):t(N)}function z(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),H}function H(N){return rt(N)?dt(e,Y,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):Y(N)}function Y(N){return e.enter("htmlTextData"),o(N)}}const U9={name:"labelEnd",resolveAll:rde,resolveTo:ade,tokenize:ode},nde={tokenize:sde},tde={tokenize:lde},ide={tokenize:ude};function rde(e){let n=-1;const t=[];for(;++n=3&&(f===null||Cn(f))?(e.exit("thematicBreak"),n(f)):t(f)}function u(f){return f===r?(e.consume(f),i++,u):(e.exit("thematicBreakSequence"),rt(f)?dt(e,l,"whitespace")(f):l(f))}}const _r={continuation:{tokenize:bde},exit:kde,name:"list",tokenize:yde},vde={partial:!0,tokenize:_de},gde={partial:!0,tokenize:wde};function yde(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(g){const b=i.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!i.containerState.marker||g===i.containerState.marker:m4(g)){if(i.containerState.type||(i.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(qg,t,f)(g):f(g);if(!i.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(g)}return t(g)}function u(g){return m4(g)&&++o<10?(e.consume(g),u):(!i.interrupt||o<2)&&(i.containerState.marker?g===i.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),f(g)):t(g)}function f(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||g,e.check(Tp,i.interrupt?t:h,e.attempt(vde,p,d))}function h(g){return i.containerState.initialBlankLine=!0,a++,p(g)}function d(g){return rt(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),p):t(g)}function p(g){return i.containerState.size=a+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(g)}}function bde(e,n,t){const i=this;return i.containerState._closeFlow=void 0,e.check(Tp,r,a);function r(l){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,dt(e,n,"listItemIndent",i.containerState.size+1)(l)}function a(l){return i.containerState.furtherBlankLines||!rt(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(gde,n,o)(l))}function o(l){return i.containerState._closeFlow=!0,i.interrupt=void 0,dt(e,e.attempt(_r,n,t),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function wde(e,n,t){const i=this;return dt(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 kde(e){e.exit(this.containerState.type)}function _de(e,n,t){const i=this;return dt(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!rt(a)&&o&&o[1].type==="listItemPrefixWhitespace"?n(a):t(a)}}const JM={name:"setextUnderline",resolveTo:xde,tokenize:Sde};function xde(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 Sde(e,n,t){const i=this;let r;return a;function a(f){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=f,o(f)):t(f)}function o(f){return e.enter("setextHeadingLineSequence"),l(f)}function l(f){return f===r?(e.consume(f),l):(e.exit("setextHeadingLineSequence"),rt(f)?dt(e,u,"lineSuffix")(f):u(f))}function u(f){return f===null||Cn(f)?(e.exit("setextHeadingLine"),n(f)):t(f)}}const Cde={tokenize:jde};function jde(e){const n=this,t=e.attempt(Tp,i,e.attempt(this.parser.constructs.flowInitial,r,dt(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Mfe,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 Ade={resolveAll:EH()},Ode=TH("string"),Tde=TH("text");function TH(e){return{resolveAll:EH(e==="text"?Ede: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 f(h)?a(h):l(h)}function l(h){if(h===null){t.consume(h);return}return t.enter("data"),t.consume(h),u}function u(h){return f(h)?(t.exit("data"),a(h)):(t.consume(h),u)}function f(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 Hde(e,n){let t=-1;const i=[];let r;for(;++t0){const an=Ke.tokenStack[Ke.tokenStack.length-1];(an[1]||n8).call(Ke,void 0,an[0])}for(be.position={start:Qs(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:Qs(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},je=-1;++je0&&(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 the(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ihe(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function rhe(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(n.identifier).toUpperCase(),r=od(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 u={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,u);const f={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(n,f),e.applyData(n,f)}function ahe(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 ohe(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function DH(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 she(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return DH(e,n);const r={src:od(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 lhe(e,n){const t={src:od(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 uhe(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 che(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return DH(e,n);const r={href:od(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 fhe(e,n){const t={href:od(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 dhe(e,n,t){const i=e.all(n),r=t?hhe(t):RH(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(;++l0){const an=Ke.tokenStack[Ke.tokenStack.length-1];(an[1]||n8).call(Ke,void 0,an[0])}for(be.position={start:Qs(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:Qs(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},je=-1;++je0&&(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 ihe(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function rhe(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ahe(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(n.identifier).toUpperCase(),r=od(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 u={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,u);const f={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(n,f),e.applyData(n,f)}function ohe(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 she(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function RH(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 lhe(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return RH(e,n);const r={src:od(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 uhe(e,n){const t={src:od(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 che(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 fhe(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return RH(e,n);const r={href:od(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 dhe(e,n){const t={href:od(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 hhe(e,n,t){const i=e.all(n),r=t?mhe(t):PH(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 mhe(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=L9(n.children[1]),u=dH(n.children[n.children.length-1]);l&&u&&(o.position={start:l,end:u}),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 bhe(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 u=-1;const f=[];for(;++u0,!0),i[0]),r=i.index+i[0].length,i=t.exec(n);return a.push(r8(n.slice(r),r>0,!1)),a.join("")}function r8(e,n,t){let i=0,r=e.length;if(n){let a=e.codePointAt(i);for(;a===t8||a===i8;)i++,a=e.codePointAt(i)}if(t){let a=e.codePointAt(r-1);for(;a===t8||a===i8;)r--,a=e.codePointAt(r-1)}return r>i?e.slice(i,r):""}function _he(e,n){const t={type:"text",value:khe(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function xhe(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const She={blockquote:Jde,break:ehe,code:nhe,delete:the,emphasis:ihe,footnoteReference:rhe,heading:ahe,html:ohe,imageReference:she,image:lhe,inlineCode:uhe,linkReference:che,link:fhe,listItem:dhe,list:mhe,paragraph:phe,root:vhe,strong:ghe,table:yhe,tableCell:whe,tableRow:bhe,text:_he,thematicBreak:xhe,toml:ug,yaml:ug,definition:ug,footnoteDefinition:ug};function ug(){}const PH=-1,N0=0,nm=1,h1=2,V9=3,W9=4,G9=5,Y9=6,NH=7,$H=8,Che=typeof self=="object"?self:globalThis,a8=(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 Che[e](n)},jhe=(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 N0:case PH:return t(o,r);case nm:{const l=t([],r);for(const u of o)l.push(i(u));return l}case h1:{const l=t({},r);for(const[u,f]of o)l[i(u)]=i(f);return l}case V9:return t(new Date(o),r);case W9:{const{source:l,flags:u}=o;return t(new RegExp(l,u),r)}case G9:{const l=t(new Map,r);for(const[u,f]of o)l.set(i(u),i(f));return l}case Y9:{const l=t(new Set,r);for(const u of o)l.add(i(u));return l}case NH:{const{name:l,message:u}=o;return t(a8(l,u),r)}case $H: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(a8(a,o),r)};return i},o8=e=>jhe(new Map,e)(0),zc="",{toString:Ahe}={},{keys:Ohe}=Object,Ch=e=>{const n=typeof e;if(n!=="object"||!e)return[N0,n];const t=Ahe.call(e).slice(8,-1);switch(t){case"Array":return[nm,zc];case"Object":return[h1,zc];case"Date":return[V9,zc];case"RegExp":return[W9,zc];case"Map":return[G9,zc];case"Set":return[Y9,zc];case"DataView":return[nm,t]}return t.includes("Array")?[nm,t]:t.includes("Error")?[NH,t]:[h1,t]},cg=([e,n])=>e===N0&&(n==="function"||n==="symbol"),The=(e,n,t,i)=>{const r=(o,l)=>{const u=i.push(o)-1;return t.set(l,u),u},a=o=>{if(t.has(o))return t.get(o);let[l,u]=Ch(o);switch(l){case N0:{let h=o;switch(u){case"bigint":l=$H,h=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);h=null;break;case"undefined":return r([PH],o)}return r([l,h],o)}case nm:{if(u){let p=o;return u==="DataView"?p=new Uint8Array(o.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(o)),r([u,[...p]],o)}const h=[],d=r([l,h],o);for(const p of o)h.push(a(p));return d}case h1:{if(u)switch(u){case"BigInt":return r([u,o.toString()],o);case"Boolean":case"Number":case"String":return r([u,o.valueOf()],o)}if(n&&"toJSON"in o)return a(o.toJSON());const h=[],d=r([l,h],o);for(const p of Ohe(o))(e||!cg(Ch(o[p])))&&h.push([a(p),a(o[p])]);return d}case V9:return r([l,o.toISOString()],o);case W9:{const{source:h,flags:d}=o;return r([l,{source:h,flags:d}],o)}case G9:{const h=[],d=r([l,h],o);for(const[p,g]of o)(e||!(cg(Ch(p))||cg(Ch(g))))&&h.push([a(p),a(g)]);return d}case Y9:{const h=[],d=r([l,h],o);for(const p of o)(e||!cg(Ch(p)))&&h.push(a(p));return d}}const{message:f}=o;return r([l,{name:u,message:f}],o)};return a},s8=(e,{json:n,lossy:t}={})=>{const i=[];return The(!(n||t),!!n,new Map,i)(e),i},m1=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?o8(s8(e,n)):structuredClone(e):(e,n)=>o8(s8(e,n));function Ehe(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 Mhe(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Dhe(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Ehe,i=e.options.footnoteBackLabel||Mhe,r=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let u=-1;for(;++u0&&b.push({type:"text",value:" "});let S=typeof t=="string"?t:t(u,g);typeof S=="string"&&(S={type:"text",value:S}),b.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(u,g),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const k=h[h.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const S=k.children[k.children.length-1];S&&S.type==="text"?S.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(f,_),l.push(_)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...m1(o),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:` +`});const f={type:"element",tagName:"li",properties:a,children:o};return e.patch(n,f),e.applyData(n,f)}function mhe(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let i=-1;for(;!n&&++i1}function phe(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=L9(n.children[1]),u=hH(n.children[n.children.length-1]);l&&u&&(o.position={start:l,end:u}),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 whe(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 u=-1;const f=[];for(;++u0,!0),i[0]),r=i.index+i[0].length,i=t.exec(n);return a.push(r8(n.slice(r),r>0,!1)),a.join("")}function r8(e,n,t){let i=0,r=e.length;if(n){let a=e.codePointAt(i);for(;a===t8||a===i8;)i++,a=e.codePointAt(i)}if(t){let a=e.codePointAt(r-1);for(;a===t8||a===i8;)r--,a=e.codePointAt(r-1)}return r>i?e.slice(i,r):""}function xhe(e,n){const t={type:"text",value:_he(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function She(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const Che={blockquote:ehe,break:nhe,code:the,delete:ihe,emphasis:rhe,footnoteReference:ahe,heading:ohe,html:she,imageReference:lhe,image:uhe,inlineCode:che,linkReference:fhe,link:dhe,listItem:hhe,list:phe,paragraph:vhe,root:ghe,strong:yhe,table:bhe,tableCell:khe,tableRow:whe,text:xhe,thematicBreak:She,toml:ug,yaml:ug,definition:ug,footnoteDefinition:ug};function ug(){}const NH=-1,N0=0,nm=1,h1=2,V9=3,W9=4,G9=5,Y9=6,$H=7,zH=8,jhe=typeof self=="object"?self:globalThis,a8=(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 jhe[e](n)},Ahe=(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 N0:case NH:return t(o,r);case nm:{const l=t([],r);for(const u of o)l.push(i(u));return l}case h1:{const l=t({},r);for(const[u,f]of o)l[i(u)]=i(f);return l}case V9:return t(new Date(o),r);case W9:{const{source:l,flags:u}=o;return t(new RegExp(l,u),r)}case G9:{const l=t(new Map,r);for(const[u,f]of o)l.set(i(u),i(f));return l}case Y9:{const l=t(new Set,r);for(const u of o)l.add(i(u));return l}case $H:{const{name:l,message:u}=o;return t(a8(l,u),r)}case zH: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(a8(a,o),r)};return i},o8=e=>Ahe(new Map,e)(0),zc="",{toString:Ohe}={},{keys:The}=Object,Ch=e=>{const n=typeof e;if(n!=="object"||!e)return[N0,n];const t=Ohe.call(e).slice(8,-1);switch(t){case"Array":return[nm,zc];case"Object":return[h1,zc];case"Date":return[V9,zc];case"RegExp":return[W9,zc];case"Map":return[G9,zc];case"Set":return[Y9,zc];case"DataView":return[nm,t]}return t.includes("Array")?[nm,t]:t.includes("Error")?[$H,t]:[h1,t]},cg=([e,n])=>e===N0&&(n==="function"||n==="symbol"),Ehe=(e,n,t,i)=>{const r=(o,l)=>{const u=i.push(o)-1;return t.set(l,u),u},a=o=>{if(t.has(o))return t.get(o);let[l,u]=Ch(o);switch(l){case N0:{let h=o;switch(u){case"bigint":l=zH,h=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);h=null;break;case"undefined":return r([NH],o)}return r([l,h],o)}case nm:{if(u){let p=o;return u==="DataView"?p=new Uint8Array(o.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(o)),r([u,[...p]],o)}const h=[],d=r([l,h],o);for(const p of o)h.push(a(p));return d}case h1:{if(u)switch(u){case"BigInt":return r([u,o.toString()],o);case"Boolean":case"Number":case"String":return r([u,o.valueOf()],o)}if(n&&"toJSON"in o)return a(o.toJSON());const h=[],d=r([l,h],o);for(const p of The(o))(e||!cg(Ch(o[p])))&&h.push([a(p),a(o[p])]);return d}case V9:return r([l,o.toISOString()],o);case W9:{const{source:h,flags:d}=o;return r([l,{source:h,flags:d}],o)}case G9:{const h=[],d=r([l,h],o);for(const[p,g]of o)(e||!(cg(Ch(p))||cg(Ch(g))))&&h.push([a(p),a(g)]);return d}case Y9:{const h=[],d=r([l,h],o);for(const p of o)(e||!cg(Ch(p)))&&h.push(a(p));return d}}const{message:f}=o;return r([l,{name:u,message:f}],o)};return a},s8=(e,{json:n,lossy:t}={})=>{const i=[];return Ehe(!(n||t),!!n,new Map,i)(e),i},m1=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?o8(s8(e,n)):structuredClone(e):(e,n)=>o8(s8(e,n));function Mhe(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 Dhe(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Rhe(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Mhe,i=e.options.footnoteBackLabel||Dhe,r=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let u=-1;for(;++u0&&b.push({type:"text",value:" "});let S=typeof t=="string"?t:t(u,g);typeof S=="string"&&(S={type:"text",value:S}),b.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(u,g),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const k=h[h.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const S=k.children[k.children.length-1];S&&S.type==="text"?S.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(f,_),l.push(_)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...m1(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 $0=(function(e){if(e==null)return $he;if(typeof e=="function")return z0(e);if(typeof e=="object")return Array.isArray(e)?Rhe(e):Phe(e);if(typeof e=="string")return Nhe(e);throw new Error("Expected function, string, or object as test")});function Rhe(e){const n=[];let t=-1;for(;++t":""))+")"})}return p;function p(){let g=zH,b,w,k;if((!n||a(u,f,h[h.length-1]||void 0))&&(g=Bhe(t(u,h)),g[0]===v4))return g;if("children"in u&&u.children){const _=u;if(_.children&&g[0]!==Ihe)for(w=(i?_.children.length:-1)+o,k=h.concat(_);w>-1&&w<_.children.length;){const S=_.children[w];if(b=l(S,w,k)(),b[0]===v4)return b;w=typeof b[1]=="number"?b[1]:w+o}}return g}}}function Bhe(e){return Array.isArray(e)?e:typeof e=="number"?[Lhe,e]:e==null?zH:[e]}function K9(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),LH(e,a,l,r);function l(u,f){const h=f[f.length-1],d=h?h.children.indexOf(u):void 0;return o(u,d,h)}}const g4={}.hasOwnProperty,Fhe={};function qhe(e,n){const t=n||Fhe,i=new Map,r=new Map,a=new Map,o={...She,...t.handlers},l={all:f,applyData:Uhe,definitionById:i,footnoteById:r,footnoteCounts:a,footnoteOrder:[],handlers:o,one:u,options:t,patch:Hhe,wrap:Whe};return K9(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 u(h,d){const p=h.type,g=l.handlers[p];if(g4.call(l.handlers,p)&&g)return g(l,h,d);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in h){const{children:w,...k}=h,_=m1(k);return _.children=l.all(h),_}return m1(h)}return(l.options.unknownHandler||Vhe)(l,h,d)}function f(h){const d=[];if("children"in h){const p=h.children;let g=-1;for(;++g":""))+")"})}return p;function p(){let g=LH,b,w,k;if((!n||a(u,f,h[h.length-1]||void 0))&&(g=Fhe(t(u,h)),g[0]===v4))return g;if("children"in u&&u.children){const _=u;if(_.children&&g[0]!==Bhe)for(w=(i?_.children.length:-1)+o,k=h.concat(_);w>-1&&w<_.children.length;){const S=_.children[w];if(b=l(S,w,k)(),b[0]===v4)return b;w=typeof b[1]=="number"?b[1]:w+o}}return g}}}function Fhe(e){return Array.isArray(e)?e:typeof e=="number"?[Ihe,e]:e==null?LH:[e]}function K9(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),IH(e,a,l,r);function l(u,f){const h=f[f.length-1],d=h?h.children.indexOf(u):void 0;return o(u,d,h)}}const g4={}.hasOwnProperty,qhe={};function Hhe(e,n){const t=n||qhe,i=new Map,r=new Map,a=new Map,o={...Che,...t.handlers},l={all:f,applyData:Vhe,definitionById:i,footnoteById:r,footnoteCounts:a,footnoteOrder:[],handlers:o,one:u,options:t,patch:Uhe,wrap:Ghe};return K9(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 u(h,d){const p=h.type,g=l.handlers[p];if(g4.call(l.handlers,p)&&g)return g(l,h,d);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in h){const{children:w,...k}=h,_=m1(k);return _.children=l.all(h),_}return m1(h)}return(l.options.unknownHandler||Whe)(l,h,d)}function f(h){const d=[];if("children"in h){const p=h.children;let g=-1;for(;++g0&&t.push({type:"text",value:` -`}),t}function l8(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function u8(e,n){const t=qhe(e,n),i=t.one(e,void 0),r=Dhe(t),a=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&a.children.push({type:"text",value:` -`},r),a}function Ghe(e,n){return e&&"run"in e?async function(t,i){const r=u8(t,{file:i,...n});await e.run(r,i)}:function(t,i){return u8(t,{file:i,...e||n})}}function c8(e){if(e)throw e}var f_,f8;function Yhe(){if(f8)return f_;f8=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,i=Object.getOwnPropertyDescriptor,r=function(f){return typeof Array.isArray=="function"?Array.isArray(f):n.call(f)==="[object Array]"},a=function(f){if(!f||n.call(f)!=="[object Object]")return!1;var h=e.call(f,"constructor"),d=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!h&&!d)return!1;var p;for(p in f);return typeof p>"u"||e.call(f,p)},o=function(f,h){t&&h.name==="__proto__"?t(f,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):f[h.name]=h.newValue},l=function(f,h){if(h==="__proto__")if(e.call(f,h)){if(i)return i(f,h).value}else return;return f[h]};return f_=function u(){var f,h,d,p,g,b,w=arguments[0],k=1,_=arguments.length,S=!1;for(typeof w=="boolean"&&(S=w,w=arguments[1]||{},k=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});k<_;++k)if(f=arguments[k],f!=null)for(h in f)d=l(w,h),p=l(f,h),w!==p&&(S&&p&&(a(p)||(g=r(p)))?(g?(g=!1,b=d&&r(d)?d:[]):b=d&&a(d)?d:{},o(w,{name:h,newValue:u(S,b,p)})):typeof p<"u"&&o(w,{name:h,newValue:p}));return w},f_}var Khe=Yhe();const d_=yt(Khe);function y4(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 Xhe(){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(u,...f){const h=e[++a];let d=-1;if(u){o(u);return}for(;++do.length;let u;l&&o.push(r);try{u=e.apply(this,o)}catch(f){const h=f;if(l&&t)throw h;return r(h)}l||(u&&u.then&&typeof u.then=="function"?u.then(a,r):u instanceof Error?r(u):a(u))}function r(o,...l){t||(t=!0,n(o,...l))}function a(o){r(null,o)}}const eo={basename:Qhe,dirname:Jhe,extname:eme,join:nme,sep:"/"};function Qhe(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Ep(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 Jhe(e){if(Ep(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 eme(e){Ep(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 nme(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function ime(e,n){let t="",i=0,r=-1,a=0,o=-1,l,u;for(;++o<=e.length;){if(o2){if(u=t.lastIndexOf("/"),u!==t.length-1){u<0?(t="",i=0):(t=t.slice(0,u),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 Ep(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const rme={cwd:ame};function ame(){return"/"}function b4(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function ome(e){if(typeof e=="string")e=new URL(e);else if(!b4(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 sme(e)}function sme(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[g,...b]=h;const w=i[p][1];y4(w)&&y4(g)&&(g=d_(!0,w,g)),i[p]=[f,g,...b]}}}}const fme=new X9().freeze();function v_(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function g_(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function y_(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 h8(e){if(!y4(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function m8(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function fg(e){return dme(e)?e:new IH(e)}function dme(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function hme(e){return typeof e=="string"||mme(e)}function mme(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const pme="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",p8=[],v8={allowDangerousHtml:!0},vme=/^(https?|ircs?|mailto|xmpp)$/i,gme=[{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 yme(e){const n=bme(e),t=wme(e);return kme(n.runSync(n.parse(t),t),e)}function bme(e){const n=e.rehypePlugins||p8,t=e.remarkPlugins||p8,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...v8}:v8;return fme().use(Qde).use(t).use(Ghe,i).use(n)}function wme(e){const n=e.children||"",t=new IH;return typeof n=="string"&&(t.value=n),t}function kme(e,n){const t=n.allowedElements,i=n.allowElement,r=n.components,a=n.disallowedElements,o=n.skipHtml,l=n.unwrapDisallowed,u=n.urlTransform||_me;for(const h of gme)Object.hasOwn(n,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+pme+h.id,void 0);return K9(e,f),Nce(e,{Fragment:v.Fragment,components:r,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function f(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 g;for(g in l_)if(Object.hasOwn(l_,g)&&Object.hasOwn(h.properties,g)){const b=h.properties[g],w=l_[g];(w===null||w.includes(h.tagName))&&(h.properties[g]=u(String(b||""),g,h))}}if(h.type==="element"){let g=t?!t.includes(h.tagName):a?a.includes(h.tagName):!1;if(!g&&i&&typeof d=="number"&&(g=!i(h,d,p)),g&&p&&typeof d=="number")return l&&h.children?p.children.splice(d,1,...h.children):p.children.splice(d,1),d}}}function _me(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||vme.test(e.slice(0,n))?e:""}function g8(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 xme(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Sme(e,n,t){const r=$0((t||{}).ignore||[]),a=Cme(n);let o=-1;for(;++o0?{type:"text",value:O}:void 0),O===!1?p.lastIndex=T+1:(b!==T&&S.push({type:"text",value:f.value.slice(b,T)}),Array.isArray(O)?S.push(...O):O&&S.push(O),b=T+j[0].length,_=!0),!p.global)break;j=p.exec(f.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=g8(e,"(");let a=g8(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 BH(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Pu(t)||R0(t))&&(!n||t!==47)}FH.peek=Yme;function Bme(){this.buffer()}function Fme(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function qme(){this.buffer()}function Hme(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ume(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 Vme(e){this.exit(e)}function Wme(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 Gme(e){this.exit(e)}function Yme(){return"["}function FH(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 Kme(){return{enter:{gfmFootnoteCallString:Bme,gfmFootnoteCall:Fme,gfmFootnoteDefinitionLabelString:qme,gfmFootnoteDefinition:Hme},exit:{gfmFootnoteCallString:Ume,gfmFootnoteCall:Vme,gfmFootnoteDefinitionLabelString:Wme,gfmFootnoteDefinition:Gme}}}function Xme(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:FH},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(i,r,a,o){const l=a.createTracker(o);let u=l.move("[^");const f=a.enter("footnoteDefinition"),h=a.enter("label");return u+=l.move(a.safe(a.associationId(i),{before:u,after:"]"})),h(),u+=l.move("]:"),i.children&&i.children.length>0&&(l.shift(4),u+=l.move((n?` -`:" ")+a.indentLines(a.containerFlow(i,l.current()),n?qH:Zme))),f(),u}}function Zme(e,n,t){return n===0?e:qH(e,n,t)}function qH(e,n,t){return(t?"":" ")+e}const Qme=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];HH.peek=ipe;function Jme(){return{canContainEols:["delete"],enter:{strikethrough:npe},exit:{strikethrough:tpe}}}function epe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Qme}],handlers:{delete:HH}}}function npe(e){this.enter({type:"delete",children:[]},e)}function tpe(e){this.exit(e)}function HH(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 ipe(){return"~"}function rpe(e){return e.length}function ape(e,n){const t=n||{},i=(t.align||[]).concat(),r=t.stringLength||rpe,a=[],o=[],l=[],u=[];let f=0,h=-1;for(;++hf&&(f=e[h].length);++_u[_])&&(u[_]=j)}w.push(S)}o[h]=w,l[h]=k}let d=-1;if(typeof i=="object"&&"length"in i)for(;++du[d]&&(u[d]=S),g[d]=S),p[d]=j}o.splice(1,0,p),l.splice(1,0,g),h=-1;const b=[];for(;++h "),a.shift(2);const o=t.indentLines(t.containerFlow(e,a.current()),lpe);return r(),o}function lpe(e,n,t){return">"+(t?"":" ")+e}function upe(e,n){return b8(e,n.inConstruct,!0)&&!b8(e,n.notInConstruct,!1)}function b8(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 fpe(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 dpe(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 hpe(e,n,t,i){const r=dpe(t),a=e.value||"",o=r==="`"?"GraveAccent":"Tilde";if(fpe(e,t)){const d=t.enter("codeIndented"),p=t.indentLines(a,mpe);return d(),p}const l=t.createTracker(i),u=r.repeat(Math.max(cpe(a,r)+1,3)),f=t.enter("codeFenced");let h=l.move(u);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:` +`}),t}function l8(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function u8(e,n){const t=Hhe(e,n),i=t.one(e,void 0),r=Rhe(t),a=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&a.children.push({type:"text",value:` +`},r),a}function Yhe(e,n){return e&&"run"in e?async function(t,i){const r=u8(t,{file:i,...n});await e.run(r,i)}:function(t,i){return u8(t,{file:i,...e||n})}}function c8(e){if(e)throw e}var f_,f8;function Khe(){if(f8)return f_;f8=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,i=Object.getOwnPropertyDescriptor,r=function(f){return typeof Array.isArray=="function"?Array.isArray(f):n.call(f)==="[object Array]"},a=function(f){if(!f||n.call(f)!=="[object Object]")return!1;var h=e.call(f,"constructor"),d=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!h&&!d)return!1;var p;for(p in f);return typeof p>"u"||e.call(f,p)},o=function(f,h){t&&h.name==="__proto__"?t(f,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):f[h.name]=h.newValue},l=function(f,h){if(h==="__proto__")if(e.call(f,h)){if(i)return i(f,h).value}else return;return f[h]};return f_=function u(){var f,h,d,p,g,b,w=arguments[0],k=1,_=arguments.length,S=!1;for(typeof w=="boolean"&&(S=w,w=arguments[1]||{},k=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});k<_;++k)if(f=arguments[k],f!=null)for(h in f)d=l(w,h),p=l(f,h),w!==p&&(S&&p&&(a(p)||(g=r(p)))?(g?(g=!1,b=d&&r(d)?d:[]):b=d&&a(d)?d:{},o(w,{name:h,newValue:u(S,b,p)})):typeof p<"u"&&o(w,{name:h,newValue:p}));return w},f_}var Xhe=Khe();const d_=yt(Xhe);function y4(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 Zhe(){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(u,...f){const h=e[++a];let d=-1;if(u){o(u);return}for(;++do.length;let u;l&&o.push(r);try{u=e.apply(this,o)}catch(f){const h=f;if(l&&t)throw h;return r(h)}l||(u&&u.then&&typeof u.then=="function"?u.then(a,r):u instanceof Error?r(u):a(u))}function r(o,...l){t||(t=!0,n(o,...l))}function a(o){r(null,o)}}const eo={basename:Jhe,dirname:eme,extname:nme,join:tme,sep:"/"};function Jhe(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Ep(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 eme(e){if(Ep(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 nme(e){Ep(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 tme(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function rme(e,n){let t="",i=0,r=-1,a=0,o=-1,l,u;for(;++o<=e.length;){if(o2){if(u=t.lastIndexOf("/"),u!==t.length-1){u<0?(t="",i=0):(t=t.slice(0,u),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 Ep(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ame={cwd:ome};function ome(){return"/"}function b4(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function sme(e){if(typeof e=="string")e=new URL(e);else if(!b4(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 lme(e)}function lme(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[g,...b]=h;const w=i[p][1];y4(w)&&y4(g)&&(g=d_(!0,w,g)),i[p]=[f,g,...b]}}}}const dme=new X9().freeze();function v_(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function g_(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function y_(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 h8(e){if(!y4(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function m8(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function fg(e){return hme(e)?e:new BH(e)}function hme(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function mme(e){return typeof e=="string"||pme(e)}function pme(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const vme="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",p8=[],v8={allowDangerousHtml:!0},gme=/^(https?|ircs?|mailto|xmpp)$/i,yme=[{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 bme(e){const n=wme(e),t=kme(e);return _me(n.runSync(n.parse(t),t),e)}function wme(e){const n=e.rehypePlugins||p8,t=e.remarkPlugins||p8,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...v8}:v8;return dme().use(Jde).use(t).use(Yhe,i).use(n)}function kme(e){const n=e.children||"",t=new BH;return typeof n=="string"&&(t.value=n),t}function _me(e,n){const t=n.allowedElements,i=n.allowElement,r=n.components,a=n.disallowedElements,o=n.skipHtml,l=n.unwrapDisallowed,u=n.urlTransform||xme;for(const h of yme)Object.hasOwn(n,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+vme+h.id,void 0);return K9(e,f),$ce(e,{Fragment:v.Fragment,components:r,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function f(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 g;for(g in l_)if(Object.hasOwn(l_,g)&&Object.hasOwn(h.properties,g)){const b=h.properties[g],w=l_[g];(w===null||w.includes(h.tagName))&&(h.properties[g]=u(String(b||""),g,h))}}if(h.type==="element"){let g=t?!t.includes(h.tagName):a?a.includes(h.tagName):!1;if(!g&&i&&typeof d=="number"&&(g=!i(h,d,p)),g&&p&&typeof d=="number")return l&&h.children?p.children.splice(d,1,...h.children):p.children.splice(d,1),d}}}function xme(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||gme.test(e.slice(0,n))?e:""}function g8(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 Sme(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Cme(e,n,t){const r=$0((t||{}).ignore||[]),a=jme(n);let o=-1;for(;++o0?{type:"text",value:O}:void 0),O===!1?p.lastIndex=T+1:(b!==T&&S.push({type:"text",value:f.value.slice(b,T)}),Array.isArray(O)?S.push(...O):O&&S.push(O),b=T+j[0].length,_=!0),!p.global)break;j=p.exec(f.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=g8(e,"(");let a=g8(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 FH(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Pu(t)||R0(t))&&(!n||t!==47)}qH.peek=Kme;function Fme(){this.buffer()}function qme(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Hme(){this.buffer()}function Ume(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Vme(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 Wme(e){this.exit(e)}function Gme(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 Yme(e){this.exit(e)}function Kme(){return"["}function qH(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 Xme(){return{enter:{gfmFootnoteCallString:Fme,gfmFootnoteCall:qme,gfmFootnoteDefinitionLabelString:Hme,gfmFootnoteDefinition:Ume},exit:{gfmFootnoteCallString:Vme,gfmFootnoteCall:Wme,gfmFootnoteDefinitionLabelString:Gme,gfmFootnoteDefinition:Yme}}}function Zme(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:qH},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(i,r,a,o){const l=a.createTracker(o);let u=l.move("[^");const f=a.enter("footnoteDefinition"),h=a.enter("label");return u+=l.move(a.safe(a.associationId(i),{before:u,after:"]"})),h(),u+=l.move("]:"),i.children&&i.children.length>0&&(l.shift(4),u+=l.move((n?` +`:" ")+a.indentLines(a.containerFlow(i,l.current()),n?HH:Qme))),f(),u}}function Qme(e,n,t){return n===0?e:HH(e,n,t)}function HH(e,n,t){return(t?"":" ")+e}const Jme=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];UH.peek=rpe;function epe(){return{canContainEols:["delete"],enter:{strikethrough:tpe},exit:{strikethrough:ipe}}}function npe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Jme}],handlers:{delete:UH}}}function tpe(e){this.enter({type:"delete",children:[]},e)}function ipe(e){this.exit(e)}function UH(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 rpe(){return"~"}function ape(e){return e.length}function ope(e,n){const t=n||{},i=(t.align||[]).concat(),r=t.stringLength||ape,a=[],o=[],l=[],u=[];let f=0,h=-1;for(;++hf&&(f=e[h].length);++_u[_])&&(u[_]=j)}w.push(S)}o[h]=w,l[h]=k}let d=-1;if(typeof i=="object"&&"length"in i)for(;++du[d]&&(u[d]=S),g[d]=S),p[d]=j}o.splice(1,0,p),l.splice(1,0,g),h=-1;const b=[];for(;++h "),a.shift(2);const o=t.indentLines(t.containerFlow(e,a.current()),upe);return r(),o}function upe(e,n,t){return">"+(t?"":" ")+e}function cpe(e,n){return b8(e,n.inConstruct,!0)&&!b8(e,n.notInConstruct,!1)}function b8(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 dpe(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 hpe(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 mpe(e,n,t,i){const r=hpe(t),a=e.value||"",o=r==="`"?"GraveAccent":"Tilde";if(dpe(e,t)){const d=t.enter("codeIndented"),p=t.indentLines(a,ppe);return d(),p}const l=t.createTracker(i),u=r.repeat(Math.max(fpe(a,r)+1,3)),f=t.enter("codeFenced");let h=l.move(u);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(u),f(),h}function mpe(e,n,t){return(t?"":" ")+e}function Z9(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 ppe(e,n,t,i){const r=Z9(t),a=r==='"'?"Quote":"Apostrophe",o=t.enter("definition");let l=t.enter("label");const u=t.createTracker(i);let f=u.move("[");return f+=u.move(t.safe(t.associationId(e),{before:f,after:"]",...u.current()})),f+=u.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(t.safe(e.url,{before:f,after:">",...u.current()})),f+=u.move(">")):(l=t.enter("destinationRaw"),f+=u.move(t.safe(e.url,{before:f,after:e.title?" ":` -`,...u.current()}))),l(),e.title&&(l=t.enter(`title${a}`),f+=u.move(" "+r),f+=u.move(t.safe(e.title,{before:f,after:r,...u.current()})),f+=u.move(r),l()),o(),f}function vpe(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 _m(e){return"&#x"+e.toString(16).toUpperCase()+";"}function p1(e,n,t){const i=df(e),r=df(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}}UH.peek=gpe;function UH(e,n,t,i){const r=vpe(t),a=t.enter("emphasis"),o=t.createTracker(i),l=o.move(r);let u=o.move(t.containerPhrasing(e,{after:r,before:l,...o.current()}));const f=u.charCodeAt(0),h=p1(i.before.charCodeAt(i.before.length-1),f,r);h.inside&&(u=_m(f)+u.slice(1));const d=u.charCodeAt(u.length-1),p=p1(i.after.charCodeAt(0),d,r);p.inside&&(u=u.slice(0,-1)+_m(d));const g=o.move(r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+u+g}function gpe(e,n,t){return t.options.emphasis||"*"}function ype(e,n){let t=!1;return K9(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return t=!0,v4}),!!((!e.depth||e.depth<3)&&q9(e)&&(n.options.setext||t))}function bpe(e,n,t,i){const r=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(i);if(ype(e,t)){const h=t.enter("headingSetext"),d=t.enter("phrasing"),p=t.containerPhrasing(e,{...a.current(),before:` +`)),h+=l.move(u),f(),h}function ppe(e,n,t){return(t?"":" ")+e}function Z9(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 vpe(e,n,t,i){const r=Z9(t),a=r==='"'?"Quote":"Apostrophe",o=t.enter("definition");let l=t.enter("label");const u=t.createTracker(i);let f=u.move("[");return f+=u.move(t.safe(t.associationId(e),{before:f,after:"]",...u.current()})),f+=u.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(t.safe(e.url,{before:f,after:">",...u.current()})),f+=u.move(">")):(l=t.enter("destinationRaw"),f+=u.move(t.safe(e.url,{before:f,after:e.title?" ":` +`,...u.current()}))),l(),e.title&&(l=t.enter(`title${a}`),f+=u.move(" "+r),f+=u.move(t.safe(e.title,{before:f,after:r,...u.current()})),f+=u.move(r),l()),o(),f}function gpe(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 _m(e){return"&#x"+e.toString(16).toUpperCase()+";"}function p1(e,n,t){const i=df(e),r=df(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}}VH.peek=ype;function VH(e,n,t,i){const r=gpe(t),a=t.enter("emphasis"),o=t.createTracker(i),l=o.move(r);let u=o.move(t.containerPhrasing(e,{after:r,before:l,...o.current()}));const f=u.charCodeAt(0),h=p1(i.before.charCodeAt(i.before.length-1),f,r);h.inside&&(u=_m(f)+u.slice(1));const d=u.charCodeAt(u.length-1),p=p1(i.after.charCodeAt(0),d,r);p.inside&&(u=u.slice(0,-1)+_m(d));const g=o.move(r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+u+g}function ype(e,n,t){return t.options.emphasis||"*"}function bpe(e,n){let t=!1;return K9(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return t=!0,v4}),!!((!e.depth||e.depth<3)&&q9(e)&&(n.options.setext||t))}function wpe(e,n,t,i){const r=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(i);if(bpe(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"),u=t.enter("phrasing");a.move(o+" ");let f=t.containerPhrasing(e,{before:"# ",after:` -`,...a.current()});return/^[\t ]/.test(f)&&(f=_m(f.charCodeAt(0))+f.slice(1)),f=f?o+" "+f:o,t.options.closeAtx&&(f+=" "+o),u(),l(),f}VH.peek=wpe;function VH(e){return e.value||""}function wpe(){return"<"}WH.peek=kpe;function WH(e,n,t,i){const r=Z9(t),a=r==='"'?"Quote":"Apostrophe",o=t.enter("image");let l=t.enter("label");const u=t.createTracker(i);let f=u.move("![");return f+=u.move(t.safe(e.alt,{before:f,after:"]",...u.current()})),f+=u.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(t.safe(e.url,{before:f,after:">",...u.current()})),f+=u.move(">")):(l=t.enter("destinationRaw"),f+=u.move(t.safe(e.url,{before:f,after:e.title?" ":")",...u.current()}))),l(),e.title&&(l=t.enter(`title${a}`),f+=u.move(" "+r),f+=u.move(t.safe(e.title,{before:f,after:r,...u.current()})),f+=u.move(r),l()),f+=u.move(")"),o(),f}function kpe(){return"!"}GH.peek=_pe;function GH(e,n,t,i){const r=e.referenceType,a=t.enter("imageReference");let o=t.enter("label");const l=t.createTracker(i);let u=l.move("![");const f=t.safe(e.alt,{before:u,after:"]",...l.current()});u+=l.move(f+"]["),o();const h=t.stack;t.stack=[],o=t.enter("reference");const d=t.safe(t.associationId(e),{before:u,after:"]",...l.current()});return o(),t.stack=h,a(),r==="full"||!f||f!==d?u+=l.move(d+"]"):r==="shortcut"?u=u.slice(0,-1):u+=l.move("]"),u}function _pe(){return"!"}YH.peek=xpe;function YH(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))}XH.peek=Spe;function XH(e,n,t,i){const r=Z9(t),a=r==='"'?"Quote":"Apostrophe",o=t.createTracker(i);let l,u;if(KH(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"),u=t.enter("label");let f=o.move("[");return f+=o.move(t.containerPhrasing(e,{before:f,after:"](",...o.current()})),f+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=t.enter("destinationLiteral"),f+=o.move("<"),f+=o.move(t.safe(e.url,{before:f,after:">",...o.current()})),f+=o.move(">")):(u=t.enter("destinationRaw"),f+=o.move(t.safe(e.url,{before:f,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=t.enter(`title${a}`),f+=o.move(" "+r),f+=o.move(t.safe(e.title,{before:f,after:r,...o.current()})),f+=o.move(r),u()),f+=o.move(")"),l(),f}function Spe(e,n,t){return KH(e,t)?"<":"["}ZH.peek=Cpe;function ZH(e,n,t,i){const r=e.referenceType,a=t.enter("linkReference");let o=t.enter("label");const l=t.createTracker(i);let u=l.move("[");const f=t.containerPhrasing(e,{before:u,after:"]",...l.current()});u+=l.move(f+"]["),o();const h=t.stack;t.stack=[],o=t.enter("reference");const d=t.safe(t.associationId(e),{before:u,after:"]",...l.current()});return o(),t.stack=h,a(),r==="full"||!f||f!==d?u+=l.move(d+"]"):r==="shortcut"?u=u.slice(0,-1):u+=l.move("]"),u}function Cpe(){return"["}function Q9(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 jpe(e){const n=Q9(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 Ape(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 QH(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 Ope(e,n,t,i){const r=t.enter("list"),a=t.bulletCurrent;let o=e.ordered?Ape(t):Q9(t);const l=e.ordered?o==="."?")":".":jpe(t);let u=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&&(u=!0),QH(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 u=t.enter("listItem"),f=t.indentLines(t.containerFlow(e,l.current()),h);return u(),f;function h(d,p,g){return p?(g?"":" ".repeat(o))+d:(g?a:a+" ".repeat(o-a.length))+d}}function Mpe(e,n,t,i){const r=t.enter("paragraph"),a=t.enter("phrasing"),o=t.containerPhrasing(e,i);return a(),r(),o}const Dpe=$0(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Rpe(e,n,t,i){return(e.children.some(function(o){return Dpe(o)})?t.containerPhrasing:t.containerFlow).call(t,e,i)}function Ppe(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}JH.peek=Npe;function JH(e,n,t,i){const r=Ppe(t),a=t.enter("strong"),o=t.createTracker(i),l=o.move(r+r);let u=o.move(t.containerPhrasing(e,{after:r,before:l,...o.current()}));const f=u.charCodeAt(0),h=p1(i.before.charCodeAt(i.before.length-1),f,r);h.inside&&(u=_m(f)+u.slice(1));const d=u.charCodeAt(u.length-1),p=p1(i.after.charCodeAt(0),d,r);p.inside&&(u=u.slice(0,-1)+_m(d));const g=o.move(r+r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+u+g}function Npe(e,n,t){return t.options.strong||"*"}function $pe(e,n,t,i){return t.safe(e.value,i)}function zpe(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 Lpe(e,n,t){const i=(QH(t)+(t.options.ruleSpaces?" ":"")).repeat(zpe(t));return t.options.ruleSpaces?i.slice(0,-1):i}const eU={blockquote:spe,break:w8,code:hpe,definition:ppe,emphasis:UH,hardBreak:w8,heading:bpe,html:VH,image:WH,imageReference:GH,inlineCode:YH,link:XH,linkReference:ZH,list:Ope,listItem:Epe,paragraph:Mpe,root:Rpe,strong:JH,text:$pe,thematicBreak:Lpe};function Ipe(){return{enter:{table:Bpe,tableData:k8,tableHeader:k8,tableRow:qpe},exit:{codeText:Hpe,table:Fpe,tableData:__,tableHeader:__,tableRow:__}}}function Bpe(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 Fpe(e){this.exit(e),this.data.inTable=void 0}function qpe(e){this.enter({type:"tableRow",children:[]},e)}function __(e){this.exit(e)}function k8(e){this.enter({type:"tableCell",children:[]},e)}function Hpe(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Upe));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Upe(e,n){return n==="|"?n:e}function Vpe(e){const n=e||{},t=n.tableCellPadding,i=n.tablePipeAlign,r=n.stringLength,a=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,...a.current()});return/^[\t ]/.test(f)&&(f=_m(f.charCodeAt(0))+f.slice(1)),f=f?o+" "+f:o,t.options.closeAtx&&(f+=" "+o),u(),l(),f}WH.peek=kpe;function WH(e){return e.value||""}function kpe(){return"<"}GH.peek=_pe;function GH(e,n,t,i){const r=Z9(t),a=r==='"'?"Quote":"Apostrophe",o=t.enter("image");let l=t.enter("label");const u=t.createTracker(i);let f=u.move("![");return f+=u.move(t.safe(e.alt,{before:f,after:"]",...u.current()})),f+=u.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(t.safe(e.url,{before:f,after:">",...u.current()})),f+=u.move(">")):(l=t.enter("destinationRaw"),f+=u.move(t.safe(e.url,{before:f,after:e.title?" ":")",...u.current()}))),l(),e.title&&(l=t.enter(`title${a}`),f+=u.move(" "+r),f+=u.move(t.safe(e.title,{before:f,after:r,...u.current()})),f+=u.move(r),l()),f+=u.move(")"),o(),f}function _pe(){return"!"}YH.peek=xpe;function YH(e,n,t,i){const r=e.referenceType,a=t.enter("imageReference");let o=t.enter("label");const l=t.createTracker(i);let u=l.move("![");const f=t.safe(e.alt,{before:u,after:"]",...l.current()});u+=l.move(f+"]["),o();const h=t.stack;t.stack=[],o=t.enter("reference");const d=t.safe(t.associationId(e),{before:u,after:"]",...l.current()});return o(),t.stack=h,a(),r==="full"||!f||f!==d?u+=l.move(d+"]"):r==="shortcut"?u=u.slice(0,-1):u+=l.move("]"),u}function xpe(){return"!"}KH.peek=Spe;function KH(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))}ZH.peek=Cpe;function ZH(e,n,t,i){const r=Z9(t),a=r==='"'?"Quote":"Apostrophe",o=t.createTracker(i);let l,u;if(XH(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"),u=t.enter("label");let f=o.move("[");return f+=o.move(t.containerPhrasing(e,{before:f,after:"](",...o.current()})),f+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=t.enter("destinationLiteral"),f+=o.move("<"),f+=o.move(t.safe(e.url,{before:f,after:">",...o.current()})),f+=o.move(">")):(u=t.enter("destinationRaw"),f+=o.move(t.safe(e.url,{before:f,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=t.enter(`title${a}`),f+=o.move(" "+r),f+=o.move(t.safe(e.title,{before:f,after:r,...o.current()})),f+=o.move(r),u()),f+=o.move(")"),l(),f}function Cpe(e,n,t){return XH(e,t)?"<":"["}QH.peek=jpe;function QH(e,n,t,i){const r=e.referenceType,a=t.enter("linkReference");let o=t.enter("label");const l=t.createTracker(i);let u=l.move("[");const f=t.containerPhrasing(e,{before:u,after:"]",...l.current()});u+=l.move(f+"]["),o();const h=t.stack;t.stack=[],o=t.enter("reference");const d=t.safe(t.associationId(e),{before:u,after:"]",...l.current()});return o(),t.stack=h,a(),r==="full"||!f||f!==d?u+=l.move(d+"]"):r==="shortcut"?u=u.slice(0,-1):u+=l.move("]"),u}function jpe(){return"["}function Q9(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 Ape(e){const n=Q9(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 Ope(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 JH(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 Tpe(e,n,t,i){const r=t.enter("list"),a=t.bulletCurrent;let o=e.ordered?Ope(t):Q9(t);const l=e.ordered?o==="."?")":".":Ape(t);let u=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&&(u=!0),JH(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 u=t.enter("listItem"),f=t.indentLines(t.containerFlow(e,l.current()),h);return u(),f;function h(d,p,g){return p?(g?"":" ".repeat(o))+d:(g?a:a+" ".repeat(o-a.length))+d}}function Dpe(e,n,t,i){const r=t.enter("paragraph"),a=t.enter("phrasing"),o=t.containerPhrasing(e,i);return a(),r(),o}const Rpe=$0(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ppe(e,n,t,i){return(e.children.some(function(o){return Rpe(o)})?t.containerPhrasing:t.containerFlow).call(t,e,i)}function Npe(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}eU.peek=$pe;function eU(e,n,t,i){const r=Npe(t),a=t.enter("strong"),o=t.createTracker(i),l=o.move(r+r);let u=o.move(t.containerPhrasing(e,{after:r,before:l,...o.current()}));const f=u.charCodeAt(0),h=p1(i.before.charCodeAt(i.before.length-1),f,r);h.inside&&(u=_m(f)+u.slice(1));const d=u.charCodeAt(u.length-1),p=p1(i.after.charCodeAt(0),d,r);p.inside&&(u=u.slice(0,-1)+_m(d));const g=o.move(r+r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+u+g}function $pe(e,n,t){return t.options.strong||"*"}function zpe(e,n,t,i){return t.safe(e.value,i)}function Lpe(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 Ipe(e,n,t){const i=(JH(t)+(t.options.ruleSpaces?" ":"")).repeat(Lpe(t));return t.options.ruleSpaces?i.slice(0,-1):i}const nU={blockquote:lpe,break:w8,code:mpe,definition:vpe,emphasis:VH,hardBreak:w8,heading:wpe,html:WH,image:GH,imageReference:YH,inlineCode:KH,link:ZH,linkReference:QH,list:Tpe,listItem:Mpe,paragraph:Dpe,root:Ppe,strong:eU,text:zpe,thematicBreak:Ipe};function Bpe(){return{enter:{table:Fpe,tableData:k8,tableHeader:k8,tableRow:Hpe},exit:{codeText:Upe,table:qpe,tableData:__,tableHeader:__,tableRow:__}}}function Fpe(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 qpe(e){this.exit(e),this.data.inTable=void 0}function Hpe(e){this.enter({type:"tableRow",children:[]},e)}function __(e){this.exit(e)}function k8(e){this.enter({type:"tableCell",children:[]},e)}function Upe(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Vpe));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Vpe(e,n){return n==="|"?n:e}function Wpe(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:u,tableRow:l}};function o(g,b,w,k){return f(h(g,w,k),g.align)}function l(g,b,w,k){const _=d(g,w,k),S=f([_]);return S.slice(0,S.indexOf(` -`))}function u(g,b,w,k){const _=w.enter("tableCell"),S=w.enter("phrasing"),j=w.containerPhrasing(g,{...k,before:a,after:a});return S(),_(),j}function f(g,b){return ape(g,{align:b,alignDelimiters:i,padding:t,stringLength:r})}function h(g,b,w){const k=g.children;let _=-1;const S=[],j=b.enter("table");for(;++_0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const uve={tokenize:gve,partial:!0};function cve(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:mve,continuation:{tokenize:pve},exit:vve}},text:{91:{name:"gfmFootnoteCall",tokenize:hve},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:fve,resolveTo:dve}}}}function fve(e,n,t){const i=this;let r=i.events.length;const a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o;for(;r--;){const u=i.events[r][1];if(u.type==="labelImage"){o=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return l;function l(u){if(!o||!o._balanced)return t(u);const f=qa(i.sliceSerialize({start:o.end,end:i.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?t(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),n(u))}}function dve(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 hve(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"),u}function u(d){return d!==94?t(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(d){if(a>999||d===93&&!o||d===null||d===91||zt(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 zt(d)||(o=!0),a++,e.consume(d),d===92?h:f}function h(d){return d===91||d===92||d===93?(e.consume(d),a++,f):f(d)}}function mve(e,n,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a,o=0,l;return u;function u(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(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||zt(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 zt(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),dt(e,g,"gfmFootnoteDefinitionWhitespace")):t(b)}function g(b){return n(b)}}function pve(e,n,t){return e.check(Tp,n,e.attempt(uve,n,t))}function vve(e){e.exit("gfmFootnoteDefinition")}function gve(e,n,t){const i=this;return dt(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 yve(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 u=-1;for(;++u1?u(b):(o.consume(b),d++,g);if(d<2&&!t)return u(b);const k=o.exit("strikethroughSequenceTemporary"),_=df(b);return k._open=!_||_===2&&!!w,k._close=!w||w===2&&!!_,l(b)}}}class bve{constructor(){this.map=[]}add(n,t,i){wve(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 wve(e,n,t,i){let r=0;if(!(t===0&&i.length===0)){for(;r-1;){const B=i.events[L][1].type;if(B==="lineEnding"||B==="linePrefix")L--;else break}const U=L>-1?i.events[L][1].type:null,G=U==="tableHead"||U==="tableRow"?O:u;return G===O&&i.parser.lazy[i.now().line]?t(P):G(P)}function u(P){return e.enter("tableHead"),e.enter("tableRow"),f(P)}function f(P){return P===124||(o=!0,a+=1),h(P)}function h(P){return P===null?t(P):Cn(P)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),g):t(P):rt(P)?dt(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||zt(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 g(P){return i.interrupt=!1,i.parser.lazy[i.now().line]?t(P):(e.enter("tableDelimiterRow"),o=!1,rt(P)?dt(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):A(P)}function w(P){return rt(P)?dt(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||Cn(P)?T(P):A(P)}function _(P){return P===45?(e.enter("tableDelimiterFiller"),S(P)):A(P)}function S(P){return P===45?(e.consume(P),S):P===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),j):(e.exit("tableDelimiterFiller"),j(P))}function j(P){return rt(P)?dt(e,T,"whitespace")(P):T(P)}function T(P){return P===124?b(P):P===null||Cn(P)?!o||r!==a?A(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(P)):A(P)}function A(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||Cn(P)?(e.exit("tableRow"),n(P)):rt(P)?dt(e,M,"whitespace")(P):(e.enter("data"),$(P))}function $(P){return P===null||P===124||zt(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 Sve(e,n){let t=-1,i=!0,r=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,u=0,f,h,d;const p=new bve;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({},Vc(n.events,r)),e.add(r,0,[["exit",a,n]]),a=void 0),a}function x8(e,n,t,i,r){const a=[],o=Vc(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 Vc(e,n){const t=e[n],i=t[0]==="enter"?"start":"end";return t[1][i]}const Cve={name:"tasklistCheck",tokenize:Ave};function jve(){return{text:{91:Cve}}}function Ave(e,n,t){const i=this;return r;function r(u){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?t(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return zt(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),o):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),o):t(u)}function o(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):t(u)}function l(u){return Cn(u)?n(u):rt(u)?e.check({tokenize:Ove},n,t)(u):t(u)}}function Ove(e,n,t){return dt(e,i,"whitespace");function i(r){return r===null?t(r):n(r)}}function Tve(e){return bH([eve(),cve(),yve(e),_ve(),jve()])}const Eve={};function Mve(e){const n=this,t=e||Eve,i=n.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),a=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),o=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(Tve(t)),a.push(Xpe()),o.push(Zpe(t))}const k4="kanban_chat_v1";function Dve(){try{const e=localStorage.getItem(k4);if(!e)return[];const n=JSON.parse(e);if(Array.isArray(n))return n}catch{}return[]}function Rve({onBoardChange:e}){const[n,t]=x.useState(()=>Dve()),[i,r]=x.useState(""),[a,o]=x.useState(!1),[l,u]=x.useState(""),[f,h]=x.useState([]),d=x.useRef(null);x.useEffect(()=>{localStorage.setItem(k4,JSON.stringify(n))},[n]),x.useEffect(()=>{var w;(w=d.current)==null||w.scrollTo({top:d.current.scrollHeight,behavior:"smooth"})},[n,l,f,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),u(""),h([]);let S="";const j=[];let T=!1;const A=O=>{switch(O.type){case"delta":S+=O.text,u(S);break;case"tool_use":{const M={tool:O.tool,ok:!0,input:O.input};j.push(M),h([...j]);break}case"tool_result":{for(let M=j.length-1;M>=0;M--){const $=j[M];if($.error===void 0&&$.ok){O.is_error&&($.ok=!1,$.error=O.result||"tool error");break}}h([...j]);break}case"result":O.text&&S.trim()===""&&(S=O.text,u(S));break;case"done":O.board_changed&&(T=!0);break;case"error":S=`Error: ${O.error}`,u(S);break}};try{const O=_.map(M=>({role:M.role,content:M.content}));await Hre(O,A)}catch(O){const M=O.message;hn.show({color:"red",message:M}),S=S||`Error: ${M}`}finally{const O={role:"assistant",content:S,ts:Date.now(),tool_calls:j.length>0?j:void 0};t(M=>[...M,O]),u(""),h([]),o(!1),T&&e()}},g=w=>{w.key==="Enter"&&!w.shiftKey&&(w.preventDefault(),p())},b=()=>{t([]),localStorage.removeItem(k4)};return v.jsxs(kn,{gap:0,h:"100%",children:[v.jsxs(Ee,{justify:"space-between",p:"xs",style:{borderBottom:"1px solid var(--mantine-color-dark-4)"},children:[v.jsxs(Ee,{gap:6,children:[v.jsx(Kq,{size:18}),v.jsx(de,{fw:600,size:"sm",children:"Asistente"})]}),v.jsx(wt,{label:"Limpiar conversacion",withArrow:!0,children:v.jsx(Jn,{variant:"subtle",color:"gray",size:"sm",onClick:b,disabled:n.length===0,children:v.jsx(vo,{size:14})})})]}),v.jsx(ur,{viewportRef:d,style:{flex:1},type:"auto",p:"xs",children:v.jsxs(kn,{gap:"xs",children:[n.length===0&&!a&&v.jsxs(de,{size:"sm",c:"dimmed",ta:"center",mt:"md",children:["Escribe algo. Ejemplos:",v.jsx("br",{}),'- "crea columna Backlog"',v.jsx("br",{}),'- "anade tarjeta para revisar PR de Lucas en Doing"',v.jsx("br",{}),'- "que hay en Doing?"']}),n.map((w,k)=>v.jsx(S8,{msg:w},k)),a&&v.jsx(S8,{msg:{role:"assistant",content:l,ts:Date.now(),tool_calls:f.length>0?f:void 0},streaming:!0}),a&&l===""&&f.length===0&&v.jsxs(Ee,{gap:6,pl:"xs",children:[v.jsx(Zt,{size:"xs"}),v.jsx(de,{size:"xs",c:"dimmed",children:"Pensando..."})]})]})}),v.jsx(kn,{gap:4,p:"xs",style:{borderTop:"1px solid var(--mantine-color-dark-4)"},children:v.jsxs(Ee,{align:"flex-end",gap:4,wrap:"nowrap",children:[v.jsx(_l,{placeholder:"Pide algo... (Enter envia, Shift+Enter newline)",value:i,onChange:w=>r(w.currentTarget.value),onKeyDown:g,disabled:a,autosize:!0,minRows:1,maxRows:6,style:{flex:1}}),v.jsx(Jn,{size:"lg",variant:"filled",onClick:p,disabled:!i.trim()||a,"aria-label":"Send",children:a?v.jsx(Zt,{size:"xs",color:"white"}):v.jsx(eH,{size:16})})]})})]})}function S8({msg:e,streaming:n=!1}){const t=e.role==="user";return v.jsx(Tt,{p:"xs",radius:"md",withBorder:!0,bg:t?"blue.9":"dark.6",style:{alignSelf:t?"flex-end":"flex-start",maxWidth:"92%"},children:v.jsxs(kn,{gap:4,children:[e.content&&v.jsx(fe,{className:"kanban-md",style:{fontSize:13,lineHeight:1.45,color:"var(--mantine-color-text)"},children:v.jsx(yme,{remarkPlugins:[Mve],children:e.content})}),n&&e.content&&v.jsx(fe,{style:{display:"inline-block",width:8,height:14,background:"currentColor",opacity:.6}}),e.tool_calls&&e.tool_calls.length>0&&v.jsx(Ee,{gap:4,wrap:"wrap",children:e.tool_calls.map((i,r)=>v.jsxs(Gn,{size:"xs",color:i.ok?"teal":"red",variant:"light",title:i.error||"",leftSection:i.ok&&n?v.jsx(Zt,{size:8,color:"teal"}):null,children:[i.tool,!i.ok&&i.error?`: ${i.error}`:""]},r))})]})})}const Pve=["Lun","Mar","Mie","Jue","Vie","Sab","Dom"];function Nve({users:e,cards:n,onJumpToCard:t,onOpenDailyReport:i}){const[r,a]=x.useState(null),[o,l]=x.useState(new Date),[u,f]=x.useState(null),[h,d]=x.useState(null),[p,g]=x.useState(!1);x.useEffect(()=>{let j=!1;g(!0);const T=Be(o).startOf("month").format("YYYY-MM-DD"),A=Be(o).endOf("month").format("YYYY-MM-DD");return IF({from:T,to:A,assignee_id:u||void 0}).then(O=>{j||d(O)}).finally(()=>{j||g(!1)}),()=>{j=!0}},[o,u]);const b=x.useMemo(()=>e.map(j=>({value:j.id,label:j.display_name||j.username})),[e]),w=x.useMemo(()=>{const j=new Map;if(!h)return j;for(const T of h.created_daily){const A=j.get(T.date)??{created:0,done:0,deadlines:[]};A.created=T.count,j.set(T.date,A)}for(const T of h.throughput_daily){const A=j.get(T.date)??{created:0,done:0,deadlines:[]};A.done=T.count,j.set(T.date,A)}for(const T of n){if(!T.deadline||T.deleted_at)continue;const A=T.deadline.slice(0,10),O=j.get(A)??{created:0,done:0,deadlines:[]};O.deadlines.push(T),j.set(A,O)}return j},[h,n]),k=x.useMemo(()=>{const j=Be(o).startOf("month"),T=Be(o).endOf("month"),A=(j.day()+6)%7,O=[];for(let M=0;MArray.from(w.values()).reduce((j,T)=>j+T.created,0),[w]),S=x.useMemo(()=>Array.from(w.values()).reduce((j,T)=>j+T.done,0),[w]);return v.jsx(fe,{p:"md",children:v.jsxs(kn,{gap:"md",children:[v.jsxs(Ee,{justify:"space-between",children:[v.jsx(El,{order:3,children:"Calendario"}),v.jsxs(Ee,{gap:"xs",wrap:"nowrap",children:[v.jsx(E9,{label:"Mes",size:"xs",value:o,onChange:j=>j&&l(typeof j=="string"?new Date(j):j),style:{minWidth:160},clearable:!1}),v.jsx(jr,{label:"Asignado",size:"xs",placeholder:"Todos",value:u,onChange:f,data:b,clearable:!0,searchable:!0,style:{minWidth:180}})]})]}),v.jsxs(Ee,{gap:"md",children:[v.jsx(Tt,{withBorder:!0,p:"sm",radius:"md",children:v.jsxs(Ee,{gap:6,children:[v.jsx(cf,{size:14,color:"var(--mantine-color-blue-5)"}),v.jsx(de,{size:"sm",fw:600,children:_}),v.jsx(de,{size:"xs",c:"dimmed",children:"creadas"})]})}),v.jsx(Tt,{withBorder:!0,p:"sm",radius:"md",children:v.jsxs(Ee,{gap:6,children:[v.jsx(wm,{size:14,color:"var(--mantine-color-green-5)"}),v.jsx(de,{size:"sm",fw:600,children:S}),v.jsx(de,{size:"xs",c:"dimmed",children:"hechas"})]})})]}),p&&!h?v.jsx(Gf,{p:"xl",children:v.jsx(Zt,{})}):v.jsxs(Tt,{withBorder:!0,p:"md",radius:"md",children:[v.jsx(Ko,{cols:7,spacing:4,mb:4,children:Pve.map(j=>v.jsx(de,{size:"xs",c:"dimmed",ta:"center",fw:600,children:j},j))}),v.jsx(Ko,{cols:7,spacing:4,children:k.map((j,T)=>{if(!j.date)return v.jsx(fe,{style:{minHeight:72}},T);const A=w.get(j.date)??{created:0,done:0,deadlines:[]},O=parseInt(j.date.slice(8,10),10),M=j.date===Be().format("YYYY-MM-DD"),$=Be().startOf("day").valueOf(),P=Be(j.date).startOf("day").valueOf()<$;return v.jsx(Tt,{p:6,withBorder:!0,radius:"sm",style:{minHeight:72,borderColor:M?"var(--mantine-color-blue-5)":void 0,background:A.done>0?"rgba(81, 207, 102, 0.08)":A.created>0?"rgba(34, 139, 230, 0.06)":void 0},children:v.jsxs(kn,{gap:2,children:[v.jsx(Et,{onClick:()=>j.date&&(i==null?void 0:i(j.date)),title:"Ver reporte diario",style:{alignSelf:"flex-start"},"data-test":`calendar-day-${j.date}`,children:v.jsx(de,{size:"xs",fw:M?700:500,c:M?"blue":void 0,td:i?"underline":void 0,style:{cursor:i?"pointer":"default"},children:O})}),A.created>0&&v.jsxs(Ee,{gap:3,wrap:"nowrap",children:[v.jsx(cf,{size:10,color:"var(--mantine-color-blue-5)"}),v.jsx(de,{size:"xs",c:"blue",children:A.created})]}),A.done>0&&v.jsxs(Ee,{gap:3,wrap:"nowrap",children:[v.jsx(wm,{size:10,color:"var(--mantine-color-green-5)"}),v.jsx(de,{size:"xs",c:"green",children:A.done})]}),A.deadlines.length>0&&v.jsxs(Sn,{opened:r===j.date,onChange:L=>a(L?j.date:null),position:"bottom",withArrow:!0,shadow:"md",width:280,children:[v.jsx(Sn.Target,{children:v.jsx(Et,{onClick:()=>a(r===j.date?null:j.date),style:{textAlign:"left"},children:v.jsx(kn,{gap:1,children:v.jsxs(Ee,{gap:3,wrap:"nowrap",children:[v.jsx(f1,{size:10,color:P?"var(--mantine-color-red-5)":"var(--mantine-color-orange-5)"}),v.jsxs(de,{size:"xs",c:P?"red":"orange",fw:700,td:"underline",children:[A.deadlines.length," deadline",A.deadlines.length===1?"":"s"]})]})})})}),v.jsx(Sn.Dropdown,{p:6,children:v.jsxs(kn,{gap:2,children:[v.jsxs(de,{size:"xs",c:"dimmed",fw:600,mb:2,children:["Vencen el ",Be(j.date).format("DD/MM/YYYY")]}),A.deadlines.map(L=>v.jsx(Et,{onClick:()=>{a(null),t==null||t(L.id)},style:{padding:"4px 6px",borderRadius:4,background:"var(--mantine-color-dark-6)"},children:v.jsxs(Ee,{gap:6,wrap:"nowrap",children:[v.jsxs(de,{size:"xs",c:"dimmed",ff:"monospace",children:["#",String(L.seq_num).padStart(5,"0")]}),v.jsx(de,{size:"xs",lineClamp:1,title:L.title,children:L.title})]})},L.id))]})})]})]})},T)})})]})]})})}function uU(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 $ve={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 zve(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[u,f]=l;return u===i?o:{...o,[u]:f}},{});return{...n,name:n.name.substring(t+1),payload:{...a,...r}}}return n})}function Lve(e,n){const t=zve(e.filter(i=>i.fill!=="none"||!i.color));return n?t.filter(i=>i.name===n):t}function C8(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 Ive={type:"area",showColor:!0},ej=Pe(e=>{var P,L;const n=ye("ChartTooltip",Ive,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,payload:u,label:f,unit:h,type:d,segmentId:p,mod:g,series:b,valueFormatter:w,showColor:k,attributes:_,...S}=n,j=ci(),T=Ze({name:"ChartTooltip",classes:$ve,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_});if(!u)return null;const A=Lve(u,p),O=d==="scatter"?(L=(P=u[0])==null?void 0:P.payload)==null?void 0:L.name:null,M=uU(b),$=f||O,q=A.map(U=>v.jsxs("div",{"data-type":d,...T("tooltipItem"),children:[v.jsxs("div",{...T("tooltipItemBody"),children:[k&&v.jsx("svg",{...T("tooltipItemColor"),children:v.jsx("circle",{r:6,fill:ft(U.color,j),width:12,height:12,cx:6,cy:6})}),v.jsx("div",{...T("tooltipItemName"),children:M[U.name]||U.name})]}),v.jsxs("div",{...T("tooltipItemData"),children:[typeof w=="function"?w(C8(U,d)):C8(U,d),h||U.unit]})]},(U==null?void 0:U.key)??U.name));return v.jsxs(fe,{...T("tooltip"),mod:[{type:d},g],...S,children:[$&&v.jsx("div",{...T("tooltipLabel"),children:$}),v.jsx("div",{...T("tooltipBody"),children:q})]})});ej.displayName="@mantine/charts/ChartTooltip";var cU={legend:"m_847eaf",legendItem:"m_17da7e62",legendItemColor:"m_6e236e21",legendItemName:"m_8ff56c0d"};function Bve(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 Fve(e){return Bve(e.filter(n=>n.color!=="none"))}const L0=Pe(e=>{const n=ye("ChartLegend",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,payload:u,onHighlight:f,legendPosition:h,mod:d,series:p,showColor:g,centered:b,attributes:w,...k}=n,_=Ze({name:"ChartLegend",classes:cU,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,rootSelector:"legend"});if(!u)return null;const S=Fve(u),j=uU(p),T=S.map((A,O)=>v.jsxs("div",{..._("legendItem"),onMouseEnter:()=>f(A.dataKey),onMouseLeave:()=>f(null),"data-without-color":g===!1||void 0,children:[v.jsx(Yf,{color:A.color,size:12,..._("legendItemColor"),withShadow:!1}),v.jsx("p",{..._("legendItemName"),children:j[A.dataKey]||A.dataKey})]},O));return v.jsx(fe,{mod:[{position:h,centered:b},d],..._("legend"),...k,children:T})});L0.displayName="@mantine/charts/ChartLegend";L0.classes=cU;function qve({x:e,y:n,value:t,valueFormatter:i}){return v.jsx("g",{transform:`translate(${e},${n})`,children:v.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 I0={root:"m_a50f3e58",container:"m_af9188cb",grid:"m_a50a48bc",axis:"m_a507a517",axisLabel:"m_2293801d",tooltip:"m_92b296cd"},x_,j8;function Tr(){if(j8)return x_;j8=1;var e=Array.isArray;return x_=e,x_}var S_,A8;function fU(){if(A8)return S_;A8=1;var e=typeof Xv=="object"&&Xv&&Xv.Object===Object&&Xv;return S_=e,S_}var C_,O8;function So(){if(O8)return C_;O8=1;var e=fU(),n=typeof self=="object"&&self&&self.Object===Object&&self,t=e||n||Function("return this")();return C_=t,C_}var j_,T8;function Mp(){if(T8)return j_;T8=1;var e=So(),n=e.Symbol;return j_=n,j_}var A_,E8;function Hve(){if(E8)return A_;E8=1;var e=Mp(),n=Object.prototype,t=n.hasOwnProperty,i=n.toString,r=e?e.toStringTag:void 0;function a(o){var l=t.call(o,r),u=o[r];try{o[r]=void 0;var f=!0}catch{}var h=i.call(o);return f&&(l?o[r]=u:delete o[r]),h}return A_=a,A_}var O_,M8;function Uve(){if(M8)return O_;M8=1;var e=Object.prototype,n=e.toString;function t(i){return n.call(i)}return O_=t,O_}var T_,D8;function _s(){if(D8)return T_;D8=1;var e=Mp(),n=Hve(),t=Uve(),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 T_=o,T_}var E_,R8;function xs(){if(R8)return E_;R8=1;function e(n){return n!=null&&typeof n=="object"}return E_=e,E_}var M_,P8;function sd(){if(P8)return M_;P8=1;var e=_s(),n=xs(),t="[object Symbol]";function i(r){return typeof r=="symbol"||n(r)&&e(r)==t}return M_=i,M_}var D_,N8;function nj(){if(N8)return D_;N8=1;var e=Tr(),n=sd(),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 D_=r,D_}var R_,$8;function Pl(){if($8)return R_;$8=1;function e(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}return R_=e,R_}var P_,z8;function tj(){if(z8)return P_;z8=1;var e=_s(),n=Pl(),t="[object AsyncFunction]",i="[object Function]",r="[object GeneratorFunction]",a="[object Proxy]";function o(l){if(!n(l))return!1;var u=e(l);return u==i||u==r||u==t||u==a}return P_=o,P_}var N_,L8;function Vve(){if(L8)return N_;L8=1;var e=So(),n=e["__core-js_shared__"];return N_=n,N_}var $_,I8;function Wve(){if(I8)return $_;I8=1;var e=Vve(),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 $_=t,$_}var z_,B8;function dU(){if(B8)return z_;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 z_=t,z_}var L_,F8;function Gve(){if(F8)return L_;F8=1;var e=tj(),n=Wve(),t=Pl(),i=dU(),r=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,u=o.toString,f=l.hasOwnProperty,h=RegExp("^"+u.call(f).replace(r,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(p){if(!t(p)||n(p))return!1;var g=e(p)?h:a;return g.test(i(p))}return L_=d,L_}var I_,q8;function Yve(){if(q8)return I_;q8=1;function e(n,t){return n==null?void 0:n[t]}return I_=e,I_}var B_,H8;function Yu(){if(H8)return B_;H8=1;var e=Gve(),n=Yve();function t(i,r){var a=n(i,r);return e(a)?a:void 0}return B_=t,B_}var F_,U8;function B0(){if(U8)return F_;U8=1;var e=Yu(),n=e(Object,"create");return F_=n,F_}var q_,V8;function Kve(){if(V8)return q_;V8=1;var e=B0();function n(){this.__data__=e?e(null):{},this.size=0}return q_=n,q_}var H_,W8;function Xve(){if(W8)return H_;W8=1;function e(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}return H_=e,H_}var U_,G8;function Zve(){if(G8)return U_;G8=1;var e=B0(),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 U_=r,U_}var V_,Y8;function Qve(){if(Y8)return V_;Y8=1;var e=B0(),n=Object.prototype,t=n.hasOwnProperty;function i(r){var a=this.__data__;return e?a[r]!==void 0:t.call(a,r)}return V_=i,V_}var W_,K8;function Jve(){if(K8)return W_;K8=1;var e=B0(),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 W_=t,W_}var G_,X8;function ege(){if(X8)return G_;X8=1;var e=Kve(),n=Xve(),t=Zve(),i=Qve(),r=Jve();function a(o){var l=-1,u=o==null?0:o.length;for(this.clear();++l-1}return J_=n,J_}var e2,iD;function age(){if(iD)return e2;iD=1;var e=F0();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 e2=n,e2}var n2,rD;function q0(){if(rD)return n2;rD=1;var e=nge(),n=tge(),t=ige(),i=rge(),r=age();function a(o){var l=-1,u=o==null?0:o.length;for(this.clear();++l0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const cve={tokenize:yve,partial:!0};function fve(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:pve,continuation:{tokenize:vve},exit:gve}},text:{91:{name:"gfmFootnoteCall",tokenize:mve},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:dve,resolveTo:hve}}}}function dve(e,n,t){const i=this;let r=i.events.length;const a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o;for(;r--;){const u=i.events[r][1];if(u.type==="labelImage"){o=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return l;function l(u){if(!o||!o._balanced)return t(u);const f=qa(i.sliceSerialize({start:o.end,end:i.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?t(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),n(u))}}function hve(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 mve(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"),u}function u(d){return d!==94?t(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(d){if(a>999||d===93&&!o||d===null||d===91||zt(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 zt(d)||(o=!0),a++,e.consume(d),d===92?h:f}function h(d){return d===91||d===92||d===93?(e.consume(d),a++,f):f(d)}}function pve(e,n,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a,o=0,l;return u;function u(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(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||zt(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 zt(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),dt(e,g,"gfmFootnoteDefinitionWhitespace")):t(b)}function g(b){return n(b)}}function vve(e,n,t){return e.check(Tp,n,e.attempt(cve,n,t))}function gve(e){e.exit("gfmFootnoteDefinition")}function yve(e,n,t){const i=this;return dt(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 bve(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 u=-1;for(;++u1?u(b):(o.consume(b),d++,g);if(d<2&&!t)return u(b);const k=o.exit("strikethroughSequenceTemporary"),_=df(b);return k._open=!_||_===2&&!!w,k._close=!w||w===2&&!!_,l(b)}}}class wve{constructor(){this.map=[]}add(n,t,i){kve(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 kve(e,n,t,i){let r=0;if(!(t===0&&i.length===0)){for(;r-1;){const B=i.events[L][1].type;if(B==="lineEnding"||B==="linePrefix")L--;else break}const U=L>-1?i.events[L][1].type:null,G=U==="tableHead"||U==="tableRow"?O:u;return G===O&&i.parser.lazy[i.now().line]?t(P):G(P)}function u(P){return e.enter("tableHead"),e.enter("tableRow"),f(P)}function f(P){return P===124||(o=!0,a+=1),h(P)}function h(P){return P===null?t(P):Cn(P)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),g):t(P):rt(P)?dt(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||zt(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 g(P){return i.interrupt=!1,i.parser.lazy[i.now().line]?t(P):(e.enter("tableDelimiterRow"),o=!1,rt(P)?dt(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):A(P)}function w(P){return rt(P)?dt(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||Cn(P)?T(P):A(P)}function _(P){return P===45?(e.enter("tableDelimiterFiller"),S(P)):A(P)}function S(P){return P===45?(e.consume(P),S):P===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),j):(e.exit("tableDelimiterFiller"),j(P))}function j(P){return rt(P)?dt(e,T,"whitespace")(P):T(P)}function T(P){return P===124?b(P):P===null||Cn(P)?!o||r!==a?A(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(P)):A(P)}function A(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||Cn(P)?(e.exit("tableRow"),n(P)):rt(P)?dt(e,M,"whitespace")(P):(e.enter("data"),$(P))}function $(P){return P===null||P===124||zt(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 Cve(e,n){let t=-1,i=!0,r=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,u=0,f,h,d;const p=new wve;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({},Vc(n.events,r)),e.add(r,0,[["exit",a,n]]),a=void 0),a}function x8(e,n,t,i,r){const a=[],o=Vc(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 Vc(e,n){const t=e[n],i=t[0]==="enter"?"start":"end";return t[1][i]}const jve={name:"tasklistCheck",tokenize:Ove};function Ave(){return{text:{91:jve}}}function Ove(e,n,t){const i=this;return r;function r(u){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?t(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return zt(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),o):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),o):t(u)}function o(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):t(u)}function l(u){return Cn(u)?n(u):rt(u)?e.check({tokenize:Tve},n,t)(u):t(u)}}function Tve(e,n,t){return dt(e,i,"whitespace");function i(r){return r===null?t(r):n(r)}}function Eve(e){return wH([nve(),fve(),bve(e),xve(),Ave()])}const Mve={};function Dve(e){const n=this,t=e||Mve,i=n.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),a=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),o=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(Eve(t)),a.push(Zpe()),o.push(Qpe(t))}const k4="kanban_chat_v1";function Rve(){try{const e=localStorage.getItem(k4);if(!e)return[];const n=JSON.parse(e);if(Array.isArray(n))return n}catch{}return[]}function Pve({onBoardChange:e}){const[n,t]=x.useState(()=>Rve()),[i,r]=x.useState(""),[a,o]=x.useState(!1),[l,u]=x.useState(""),[f,h]=x.useState([]),d=x.useRef(null);x.useEffect(()=>{localStorage.setItem(k4,JSON.stringify(n))},[n]),x.useEffect(()=>{var w;(w=d.current)==null||w.scrollTo({top:d.current.scrollHeight,behavior:"smooth"})},[n,l,f,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),u(""),h([]);let S="";const j=[];let T=!1;const A=O=>{switch(O.type){case"delta":S+=O.text,u(S);break;case"tool_use":{const M={tool:O.tool,ok:!0,input:O.input};j.push(M),h([...j]);break}case"tool_result":{for(let M=j.length-1;M>=0;M--){const $=j[M];if($.error===void 0&&$.ok){O.is_error&&($.ok=!1,$.error=O.result||"tool error");break}}h([...j]);break}case"result":O.text&&S.trim()===""&&(S=O.text,u(S));break;case"done":O.board_changed&&(T=!0);break;case"error":S=`Error: ${O.error}`,u(S);break}};try{const O=_.map(M=>({role:M.role,content:M.content}));await Ure(O,A)}catch(O){const M=O.message;hn.show({color:"red",message:M}),S=S||`Error: ${M}`}finally{const O={role:"assistant",content:S,ts:Date.now(),tool_calls:j.length>0?j:void 0};t(M=>[...M,O]),u(""),h([]),o(!1),T&&e()}},g=w=>{w.key==="Enter"&&!w.shiftKey&&(w.preventDefault(),p())},b=()=>{t([]),localStorage.removeItem(k4)};return v.jsxs(kn,{gap:0,h:"100%",children:[v.jsxs(Ee,{justify:"space-between",p:"xs",style:{borderBottom:"1px solid var(--mantine-color-dark-4)"},children:[v.jsxs(Ee,{gap:6,children:[v.jsx(Xq,{size:18}),v.jsx(de,{fw:600,size:"sm",children:"Asistente"})]}),v.jsx(wt,{label:"Limpiar conversacion",withArrow:!0,children:v.jsx(Jn,{variant:"subtle",color:"gray",size:"sm",onClick:b,disabled:n.length===0,children:v.jsx(vo,{size:14})})})]}),v.jsx(ur,{viewportRef:d,style:{flex:1},type:"auto",p:"xs",children:v.jsxs(kn,{gap:"xs",children:[n.length===0&&!a&&v.jsxs(de,{size:"sm",c:"dimmed",ta:"center",mt:"md",children:["Escribe algo. Ejemplos:",v.jsx("br",{}),'- "crea columna Backlog"',v.jsx("br",{}),'- "anade tarjeta para revisar PR de Lucas en Doing"',v.jsx("br",{}),'- "que hay en Doing?"']}),n.map((w,k)=>v.jsx(S8,{msg:w},k)),a&&v.jsx(S8,{msg:{role:"assistant",content:l,ts:Date.now(),tool_calls:f.length>0?f:void 0},streaming:!0}),a&&l===""&&f.length===0&&v.jsxs(Ee,{gap:6,pl:"xs",children:[v.jsx(Zt,{size:"xs"}),v.jsx(de,{size:"xs",c:"dimmed",children:"Pensando..."})]})]})}),v.jsx(kn,{gap:4,p:"xs",style:{borderTop:"1px solid var(--mantine-color-dark-4)"},children:v.jsxs(Ee,{align:"flex-end",gap:4,wrap:"nowrap",children:[v.jsx(_l,{placeholder:"Pide algo... (Enter envia, Shift+Enter newline)",value:i,onChange:w=>r(w.currentTarget.value),onKeyDown:g,disabled:a,autosize:!0,minRows:1,maxRows:6,style:{flex:1}}),v.jsx(Jn,{size:"lg",variant:"filled",onClick:p,disabled:!i.trim()||a,"aria-label":"Send",children:a?v.jsx(Zt,{size:"xs",color:"white"}):v.jsx(nH,{size:16})})]})})]})}function S8({msg:e,streaming:n=!1}){const t=e.role==="user";return v.jsx(Tt,{p:"xs",radius:"md",withBorder:!0,bg:t?"blue.9":"dark.6",style:{alignSelf:t?"flex-end":"flex-start",maxWidth:"92%"},children:v.jsxs(kn,{gap:4,children:[e.content&&v.jsx(fe,{className:"kanban-md",style:{fontSize:13,lineHeight:1.45,color:"var(--mantine-color-text)"},children:v.jsx(bme,{remarkPlugins:[Dve],children:e.content})}),n&&e.content&&v.jsx(fe,{style:{display:"inline-block",width:8,height:14,background:"currentColor",opacity:.6}}),e.tool_calls&&e.tool_calls.length>0&&v.jsx(Ee,{gap:4,wrap:"wrap",children:e.tool_calls.map((i,r)=>v.jsxs(Gn,{size:"xs",color:i.ok?"teal":"red",variant:"light",title:i.error||"",leftSection:i.ok&&n?v.jsx(Zt,{size:8,color:"teal"}):null,children:[i.tool,!i.ok&&i.error?`: ${i.error}`:""]},r))})]})})}const Nve=["Lun","Mar","Mie","Jue","Vie","Sab","Dom"];function $ve({users:e,cards:n,onJumpToCard:t,onOpenDailyReport:i}){const[r,a]=x.useState(null),[o,l]=x.useState(new Date),[u,f]=x.useState(null),[h,d]=x.useState(null),[p,g]=x.useState(!1);x.useEffect(()=>{let j=!1;g(!0);const T=Be(o).startOf("month").format("YYYY-MM-DD"),A=Be(o).endOf("month").format("YYYY-MM-DD");return BF({from:T,to:A,assignee_id:u||void 0}).then(O=>{j||d(O)}).finally(()=>{j||g(!1)}),()=>{j=!0}},[o,u]);const b=x.useMemo(()=>e.map(j=>({value:j.id,label:j.display_name||j.username})),[e]),w=x.useMemo(()=>{const j=new Map;if(!h)return j;for(const T of h.created_daily){const A=j.get(T.date)??{created:0,done:0,deadlines:[]};A.created=T.count,j.set(T.date,A)}for(const T of h.throughput_daily){const A=j.get(T.date)??{created:0,done:0,deadlines:[]};A.done=T.count,j.set(T.date,A)}for(const T of n){if(!T.deadline||T.deleted_at)continue;const A=T.deadline.slice(0,10),O=j.get(A)??{created:0,done:0,deadlines:[]};O.deadlines.push(T),j.set(A,O)}return j},[h,n]),k=x.useMemo(()=>{const j=Be(o).startOf("month"),T=Be(o).endOf("month"),A=(j.day()+6)%7,O=[];for(let M=0;MArray.from(w.values()).reduce((j,T)=>j+T.created,0),[w]),S=x.useMemo(()=>Array.from(w.values()).reduce((j,T)=>j+T.done,0),[w]);return v.jsx(fe,{p:"md",children:v.jsxs(kn,{gap:"md",children:[v.jsxs(Ee,{justify:"space-between",children:[v.jsx(El,{order:3,children:"Calendario"}),v.jsxs(Ee,{gap:"xs",wrap:"nowrap",children:[v.jsx(E9,{label:"Mes",size:"xs",value:o,onChange:j=>j&&l(typeof j=="string"?new Date(j):j),style:{minWidth:160},clearable:!1}),v.jsx(jr,{label:"Asignado",size:"xs",placeholder:"Todos",value:u,onChange:f,data:b,clearable:!0,searchable:!0,style:{minWidth:180}})]})]}),v.jsxs(Ee,{gap:"md",children:[v.jsx(Tt,{withBorder:!0,p:"sm",radius:"md",children:v.jsxs(Ee,{gap:6,children:[v.jsx(cf,{size:14,color:"var(--mantine-color-blue-5)"}),v.jsx(de,{size:"sm",fw:600,children:_}),v.jsx(de,{size:"xs",c:"dimmed",children:"creadas"})]})}),v.jsx(Tt,{withBorder:!0,p:"sm",radius:"md",children:v.jsxs(Ee,{gap:6,children:[v.jsx(wm,{size:14,color:"var(--mantine-color-green-5)"}),v.jsx(de,{size:"sm",fw:600,children:S}),v.jsx(de,{size:"xs",c:"dimmed",children:"hechas"})]})})]}),p&&!h?v.jsx(Gf,{p:"xl",children:v.jsx(Zt,{})}):v.jsxs(Tt,{withBorder:!0,p:"md",radius:"md",children:[v.jsx(Ko,{cols:7,spacing:4,mb:4,children:Nve.map(j=>v.jsx(de,{size:"xs",c:"dimmed",ta:"center",fw:600,children:j},j))}),v.jsx(Ko,{cols:7,spacing:4,children:k.map((j,T)=>{if(!j.date)return v.jsx(fe,{style:{minHeight:72}},T);const A=w.get(j.date)??{created:0,done:0,deadlines:[]},O=parseInt(j.date.slice(8,10),10),M=j.date===Be().format("YYYY-MM-DD"),$=Be().startOf("day").valueOf(),P=Be(j.date).startOf("day").valueOf()<$;return v.jsx(Tt,{p:6,withBorder:!0,radius:"sm",style:{minHeight:72,borderColor:M?"var(--mantine-color-blue-5)":void 0,background:A.done>0?"rgba(81, 207, 102, 0.08)":A.created>0?"rgba(34, 139, 230, 0.06)":void 0},children:v.jsxs(kn,{gap:2,children:[v.jsx(Et,{onClick:()=>j.date&&(i==null?void 0:i(j.date)),title:"Ver reporte diario",style:{alignSelf:"flex-start"},"data-test":`calendar-day-${j.date}`,children:v.jsx(de,{size:"xs",fw:M?700:500,c:M?"blue":void 0,td:i?"underline":void 0,style:{cursor:i?"pointer":"default"},children:O})}),A.created>0&&v.jsxs(Ee,{gap:3,wrap:"nowrap",children:[v.jsx(cf,{size:10,color:"var(--mantine-color-blue-5)"}),v.jsx(de,{size:"xs",c:"blue",children:A.created})]}),A.done>0&&v.jsxs(Ee,{gap:3,wrap:"nowrap",children:[v.jsx(wm,{size:10,color:"var(--mantine-color-green-5)"}),v.jsx(de,{size:"xs",c:"green",children:A.done})]}),A.deadlines.length>0&&v.jsxs(Sn,{opened:r===j.date,onChange:L=>a(L?j.date:null),position:"bottom",withArrow:!0,shadow:"md",width:280,children:[v.jsx(Sn.Target,{children:v.jsx(Et,{onClick:()=>a(r===j.date?null:j.date),style:{textAlign:"left"},children:v.jsx(kn,{gap:1,children:v.jsxs(Ee,{gap:3,wrap:"nowrap",children:[v.jsx(f1,{size:10,color:P?"var(--mantine-color-red-5)":"var(--mantine-color-orange-5)"}),v.jsxs(de,{size:"xs",c:P?"red":"orange",fw:700,td:"underline",children:[A.deadlines.length," deadline",A.deadlines.length===1?"":"s"]})]})})})}),v.jsx(Sn.Dropdown,{p:6,children:v.jsxs(kn,{gap:2,children:[v.jsxs(de,{size:"xs",c:"dimmed",fw:600,mb:2,children:["Vencen el ",Be(j.date).format("DD/MM/YYYY")]}),A.deadlines.map(L=>v.jsx(Et,{onClick:()=>{a(null),t==null||t(L.id)},style:{padding:"4px 6px",borderRadius:4,background:"var(--mantine-color-dark-6)"},children:v.jsxs(Ee,{gap:6,wrap:"nowrap",children:[v.jsxs(de,{size:"xs",c:"dimmed",ff:"monospace",children:["#",String(L.seq_num).padStart(5,"0")]}),v.jsx(de,{size:"xs",lineClamp:1,title:L.title,children:L.title})]})},L.id))]})})]})]})},T)})})]})]})})}function cU(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 zve={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 Lve(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[u,f]=l;return u===i?o:{...o,[u]:f}},{});return{...n,name:n.name.substring(t+1),payload:{...a,...r}}}return n})}function Ive(e,n){const t=Lve(e.filter(i=>i.fill!=="none"||!i.color));return n?t.filter(i=>i.name===n):t}function C8(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 Bve={type:"area",showColor:!0},ej=Pe(e=>{var P,L;const n=ye("ChartTooltip",Bve,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,payload:u,label:f,unit:h,type:d,segmentId:p,mod:g,series:b,valueFormatter:w,showColor:k,attributes:_,...S}=n,j=ci(),T=Ze({name:"ChartTooltip",classes:zve,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_});if(!u)return null;const A=Ive(u,p),O=d==="scatter"?(L=(P=u[0])==null?void 0:P.payload)==null?void 0:L.name:null,M=cU(b),$=f||O,q=A.map(U=>v.jsxs("div",{"data-type":d,...T("tooltipItem"),children:[v.jsxs("div",{...T("tooltipItemBody"),children:[k&&v.jsx("svg",{...T("tooltipItemColor"),children:v.jsx("circle",{r:6,fill:ft(U.color,j),width:12,height:12,cx:6,cy:6})}),v.jsx("div",{...T("tooltipItemName"),children:M[U.name]||U.name})]}),v.jsxs("div",{...T("tooltipItemData"),children:[typeof w=="function"?w(C8(U,d)):C8(U,d),h||U.unit]})]},(U==null?void 0:U.key)??U.name));return v.jsxs(fe,{...T("tooltip"),mod:[{type:d},g],...S,children:[$&&v.jsx("div",{...T("tooltipLabel"),children:$}),v.jsx("div",{...T("tooltipBody"),children:q})]})});ej.displayName="@mantine/charts/ChartTooltip";var fU={legend:"m_847eaf",legendItem:"m_17da7e62",legendItemColor:"m_6e236e21",legendItemName:"m_8ff56c0d"};function Fve(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 qve(e){return Fve(e.filter(n=>n.color!=="none"))}const L0=Pe(e=>{const n=ye("ChartLegend",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,payload:u,onHighlight:f,legendPosition:h,mod:d,series:p,showColor:g,centered:b,attributes:w,...k}=n,_=Ze({name:"ChartLegend",classes:fU,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,rootSelector:"legend"});if(!u)return null;const S=qve(u),j=cU(p),T=S.map((A,O)=>v.jsxs("div",{..._("legendItem"),onMouseEnter:()=>f(A.dataKey),onMouseLeave:()=>f(null),"data-without-color":g===!1||void 0,children:[v.jsx(Yf,{color:A.color,size:12,..._("legendItemColor"),withShadow:!1}),v.jsx("p",{..._("legendItemName"),children:j[A.dataKey]||A.dataKey})]},O));return v.jsx(fe,{mod:[{position:h,centered:b},d],..._("legend"),...k,children:T})});L0.displayName="@mantine/charts/ChartLegend";L0.classes=fU;function Hve({x:e,y:n,value:t,valueFormatter:i}){return v.jsx("g",{transform:`translate(${e},${n})`,children:v.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 I0={root:"m_a50f3e58",container:"m_af9188cb",grid:"m_a50a48bc",axis:"m_a507a517",axisLabel:"m_2293801d",tooltip:"m_92b296cd"},x_,j8;function Tr(){if(j8)return x_;j8=1;var e=Array.isArray;return x_=e,x_}var S_,A8;function dU(){if(A8)return S_;A8=1;var e=typeof Xv=="object"&&Xv&&Xv.Object===Object&&Xv;return S_=e,S_}var C_,O8;function So(){if(O8)return C_;O8=1;var e=dU(),n=typeof self=="object"&&self&&self.Object===Object&&self,t=e||n||Function("return this")();return C_=t,C_}var j_,T8;function Mp(){if(T8)return j_;T8=1;var e=So(),n=e.Symbol;return j_=n,j_}var A_,E8;function Uve(){if(E8)return A_;E8=1;var e=Mp(),n=Object.prototype,t=n.hasOwnProperty,i=n.toString,r=e?e.toStringTag:void 0;function a(o){var l=t.call(o,r),u=o[r];try{o[r]=void 0;var f=!0}catch{}var h=i.call(o);return f&&(l?o[r]=u:delete o[r]),h}return A_=a,A_}var O_,M8;function Vve(){if(M8)return O_;M8=1;var e=Object.prototype,n=e.toString;function t(i){return n.call(i)}return O_=t,O_}var T_,D8;function _s(){if(D8)return T_;D8=1;var e=Mp(),n=Uve(),t=Vve(),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 T_=o,T_}var E_,R8;function xs(){if(R8)return E_;R8=1;function e(n){return n!=null&&typeof n=="object"}return E_=e,E_}var M_,P8;function sd(){if(P8)return M_;P8=1;var e=_s(),n=xs(),t="[object Symbol]";function i(r){return typeof r=="symbol"||n(r)&&e(r)==t}return M_=i,M_}var D_,N8;function nj(){if(N8)return D_;N8=1;var e=Tr(),n=sd(),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 D_=r,D_}var R_,$8;function Pl(){if($8)return R_;$8=1;function e(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}return R_=e,R_}var P_,z8;function tj(){if(z8)return P_;z8=1;var e=_s(),n=Pl(),t="[object AsyncFunction]",i="[object Function]",r="[object GeneratorFunction]",a="[object Proxy]";function o(l){if(!n(l))return!1;var u=e(l);return u==i||u==r||u==t||u==a}return P_=o,P_}var N_,L8;function Wve(){if(L8)return N_;L8=1;var e=So(),n=e["__core-js_shared__"];return N_=n,N_}var $_,I8;function Gve(){if(I8)return $_;I8=1;var e=Wve(),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 $_=t,$_}var z_,B8;function hU(){if(B8)return z_;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 z_=t,z_}var L_,F8;function Yve(){if(F8)return L_;F8=1;var e=tj(),n=Gve(),t=Pl(),i=hU(),r=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,u=o.toString,f=l.hasOwnProperty,h=RegExp("^"+u.call(f).replace(r,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(p){if(!t(p)||n(p))return!1;var g=e(p)?h:a;return g.test(i(p))}return L_=d,L_}var I_,q8;function Kve(){if(q8)return I_;q8=1;function e(n,t){return n==null?void 0:n[t]}return I_=e,I_}var B_,H8;function Yu(){if(H8)return B_;H8=1;var e=Yve(),n=Kve();function t(i,r){var a=n(i,r);return e(a)?a:void 0}return B_=t,B_}var F_,U8;function B0(){if(U8)return F_;U8=1;var e=Yu(),n=e(Object,"create");return F_=n,F_}var q_,V8;function Xve(){if(V8)return q_;V8=1;var e=B0();function n(){this.__data__=e?e(null):{},this.size=0}return q_=n,q_}var H_,W8;function Zve(){if(W8)return H_;W8=1;function e(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}return H_=e,H_}var U_,G8;function Qve(){if(G8)return U_;G8=1;var e=B0(),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 U_=r,U_}var V_,Y8;function Jve(){if(Y8)return V_;Y8=1;var e=B0(),n=Object.prototype,t=n.hasOwnProperty;function i(r){var a=this.__data__;return e?a[r]!==void 0:t.call(a,r)}return V_=i,V_}var W_,K8;function ege(){if(K8)return W_;K8=1;var e=B0(),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 W_=t,W_}var G_,X8;function nge(){if(X8)return G_;X8=1;var e=Xve(),n=Zve(),t=Qve(),i=Jve(),r=ege();function a(o){var l=-1,u=o==null?0:o.length;for(this.clear();++l-1}return J_=n,J_}var e2,iD;function oge(){if(iD)return e2;iD=1;var e=F0();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 e2=n,e2}var n2,rD;function q0(){if(rD)return n2;rD=1;var e=tge(),n=ige(),t=rge(),i=age(),r=oge();function a(o){var l=-1,u=o==null?0:o.length;for(this.clear();++l0?1:-1},wu=function(n){return Nu(n)&&n.indexOf("%")===n.length-1},Ge=function(n){return Oge(n)&&!ud(n)},Tge=function(n){return Zn(n)},ji=function(n){return Ge(n)||Nu(n)},Ege=0,cd=function(n){var t=++Ege;return"".concat(n||"").concat(t)},$u=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(!Ge(n)&&!Nu(n))return i;var a;if(wu(n)){var o=n.indexOf("%");a=t*parseFloat(n.slice(0,o))/100}else a=+n;return ud(a)&&(a=i),r&&a>t&&(a=t),a},ol=function(n){if(!n)return null;var t=Object.keys(n);return t&&t.length?n[t[0]]:null},Mge=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 Lge(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 x4(e){"@babel/helpers - typeof";return x4=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},x4(e)}var DD={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"},ts=function(n){return typeof n=="string"?n:n?n.displayName||n.name||"Component":""},RD=null,A2=null,uj=function e(n){if(n===RD&&Array.isArray(A2))return A2;var t=[];return x.Children.forEach(n,function(i){Zn(i)||(Sge.isFragment(i)?t=t.concat(e(i.props.children)):t.push(i))}),A2=t,RD=n,t};function wa(e,n){var t=[],i=[];return Array.isArray(n)?i=n.map(function(r){return ts(r)}):i=[ts(n)],uj(e).forEach(function(r){var a=ba(r,"type.displayName")||ba(r,"type.name");i.indexOf(a)!==-1&&t.push(r)}),t}function Ur(e,n){var t=wa(e,n);return t&&t[0]}var PD=function(n){if(!n||!n.props)return!1;var t=n.props,i=t.width,r=t.height;return!(!Ge(i)||i<=0||!Ge(r)||r<=0)},Ige=["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"],Bge=function(n){return n&&n.type&&Nu(n.type)&&Ige.indexOf(n.type)>=0},yU=function(n){return n&&x4(n)==="object"&&"clipDot"in n},Fge=function(n,t,i,r){var a,o=(a=j2==null?void 0:j2[r])!==null&&a!==void 0?a:[];return t.startsWith("data-")||!Fn(n)&&(r&&o.includes(t)||Pge.includes(t))||i&&lj.includes(t)},Un=function(n,t,i){if(!n||typeof n=="function"||typeof n=="boolean")return null;var r=n;if(x.isValidElement(n)&&(r=n.props),!ld(r))return null;var a={};return Object.keys(r).forEach(function(o){var l;Fge((l=r)===null||l===void 0?void 0:l[o],o,t,i)&&(a[o]=r[o])}),a},S4=function e(n,t){if(n===t)return!0;var i=x.Children.count(n);if(i!==x.Children.count(t))return!1;if(i===0)return!0;if(i===1)return ND(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 Wge(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 j4(e){var n=e.children,t=e.width,i=e.height,r=e.viewBox,a=e.className,o=e.style,l=e.title,u=e.desc,f=Vge(e,Uge),h=r||{width:t,height:i,x:0,y:0},d=vn("recharts-surface",a);return J.createElement("svg",C4({},Un(f,!0,"svg"),{className:d,width:t,height:i,style:o,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height)}),J.createElement("title",null,l),J.createElement("desc",null,u),n)}var Gge=["children","className"];function A4(){return A4=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 Kge(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 Ft=J.forwardRef(function(e,n){var t=e.children,i=e.className,r=Yge(e,Gge),a=vn("recharts-layer",i);return J.createElement("g",A4({className:a},Un(r,!0),{ref:n}),t)}),is=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 T2=n,T2}var E2,ID;function bU(){if(ID)return E2;ID=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 u(f){return l.test(f)}return E2=u,E2}var M2,BD;function Qge(){if(BD)return M2;BD=1;function e(n){return n.split("")}return M2=e,M2}var D2,FD;function Jge(){if(FD)return D2;FD=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+"]",u="\\ud83c[\\udffb-\\udfff]",f="(?:"+l+"|"+u+")",h="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",b=f+"?",w="["+a+"]?",k="(?:"+g+"(?:"+[h,d,p].join("|")+")"+w+b+")*",_=w+b+k,S="(?:"+[h+l+"?",l,d,p,o].join("|")+")",j=RegExp(u+"(?="+u+")|"+S+_,"g");function T(A){return A.match(j)||[]}return D2=T,D2}var R2,qD;function e1e(){if(qD)return R2;qD=1;var e=Qge(),n=bU(),t=Jge();function i(r){return n(r)?t(r):e(r)}return R2=i,R2}var P2,HD;function n1e(){if(HD)return P2;HD=1;var e=Zge(),n=bU(),t=e1e(),i=mU();function r(a){return function(o){o=i(o);var l=n(o)?t(o):void 0,u=l?l[0]:o.charAt(0),f=l?e(l,1).join(""):o.slice(1);return u[a]()+f}}return P2=r,P2}var N2,UD;function t1e(){if(UD)return N2;UD=1;var e=n1e(),n=e("toUpperCase");return N2=n,N2}var i1e=t1e();const V0=yt(i1e);function Bt(e){return function(){return e}}const wU=Math.cos,b1=Math.sin,Ga=Math.sqrt,w1=Math.PI,W0=2*w1,O4=Math.PI,T4=2*O4,mu=1e-6,r1e=T4-mu;function kU(e){this._+=e[0];for(let n=1,t=e.length;n=0))throw new Error(`invalid digits: ${e}`);if(n>15)return kU;const t=10**n;return function(i){this._+=i[0];for(let r=1,a=i.length;rmu)if(!(Math.abs(d*u-f*h)>mu)||!a)this._append`L${this._x1=n},${this._y1=t}`;else{let g=i-o,b=r-l,w=u*u+f*f,k=g*g+b*b,_=Math.sqrt(w),S=Math.sqrt(p),j=a*Math.tan((O4-Math.acos((w+p-k)/(2*_*S)))/2),T=j/S,A=j/_;Math.abs(T-1)>mu&&this._append`L${n+T*h},${t+T*d}`,this._append`A${a},${a},0,0,${+(d*g>h*b)},${this._x1=n+A*u},${this._y1=t+A*f}`}}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),u=i*Math.sin(r),f=n+l,h=t+u,d=1^o,p=o?r-a:a-r;this._x1===null?this._append`M${f},${h}`:(Math.abs(this._x1-f)>mu||Math.abs(this._y1-h)>mu)&&this._append`L${f},${h}`,i&&(p<0&&(p=p%T4+T4),p>r1e?this._append`A${i},${i},0,1,${d},${n-l},${t-u}A${i},${i},0,1,${d},${this._x1=f},${this._y1=h}`:p>mu&&this._append`A${i},${i},0,${+(p>=O4)},${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 cj(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 o1e(n)}function fj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function _U(e){this._context=e}_U.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 G0(e){return new _U(e)}function xU(e){return e[0]}function SU(e){return e[1]}function CU(e,n){var t=Bt(!0),i=null,r=G0,a=null,o=cj(l);e=typeof e=="function"?e:e===void 0?xU:Bt(e),n=typeof n=="function"?n:n===void 0?SU:Bt(n);function l(u){var f,h=(u=fj(u)).length,d,p=!1,g;for(i==null&&(a=r(g=o())),f=0;f<=h;++f)!(f=g;--b)l.point(j[b],T[b]);l.lineEnd(),l.areaEnd()}_&&(j[p]=+e(k,p,d),T[p]=+n(k,p,d),l.point(i?+i(k,p,d):j[p],t?+t(k,p,d):T[p]))}if(S)return l=null,S+""||null}function h(){return CU().defined(r).curve(o).context(a)}return f.x=function(d){return arguments.length?(e=typeof d=="function"?d:Bt(+d),i=null,f):e},f.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Bt(+d),f):e},f.x1=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:Bt(+d),f):i},f.y=function(d){return arguments.length?(n=typeof d=="function"?d:Bt(+d),t=null,f):n},f.y0=function(d){return arguments.length?(n=typeof d=="function"?d:Bt(+d),f):n},f.y1=function(d){return arguments.length?(t=d==null?null:typeof d=="function"?d:Bt(+d),f):t},f.lineX0=f.lineY0=function(){return h().x(e).y(n)},f.lineY1=function(){return h().x(e).y(t)},f.lineX1=function(){return h().x(i).y(n)},f.defined=function(d){return arguments.length?(r=typeof d=="function"?d:Bt(!!d),f):r},f.curve=function(d){return arguments.length?(o=d,a!=null&&(l=o(a)),f):o},f.context=function(d){return arguments.length?(d==null?a=l=null:l=o(a=d),f):a},f}class jU{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 s1e(e){return new jU(e,!0)}function l1e(e){return new jU(e,!1)}const dj={draw(e,n){const t=Ga(n/w1);e.moveTo(t,0),e.arc(0,0,t,0,W0)}},u1e={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()}},AU=Ga(1/3),c1e=AU*2,f1e={draw(e,n){const t=Ga(n/c1e),i=t*AU;e.moveTo(0,-t),e.lineTo(i,0),e.lineTo(0,t),e.lineTo(-i,0),e.closePath()}},d1e={draw(e,n){const t=Ga(n),i=-t/2;e.rect(i,i,t,t)}},h1e=.8908130915292852,OU=b1(w1/10)/b1(7*w1/10),m1e=b1(W0/10)*OU,p1e=-wU(W0/10)*OU,v1e={draw(e,n){const t=Ga(n*h1e),i=m1e*t,r=p1e*t;e.moveTo(0,-t),e.lineTo(i,r);for(let a=1;a<5;++a){const o=W0*a/5,l=wU(o),u=b1(o);e.lineTo(u*t,-l*t),e.lineTo(l*i-u*r,u*i+l*r)}e.closePath()}},$2=Ga(3),g1e={draw(e,n){const t=-Ga(n/($2*3));e.moveTo(0,t*2),e.lineTo(-$2*t,-t),e.lineTo($2*t,-t),e.closePath()}},ua=-.5,ca=Ga(3)/2,E4=1/Ga(12),y1e=(E4/2+1)*3,b1e={draw(e,n){const t=Ga(n/y1e),i=t/2,r=t*E4,a=i,o=t*E4+t,l=-a,u=o;e.moveTo(i,r),e.lineTo(a,o),e.lineTo(l,u),e.lineTo(ua*i-ca*r,ca*i+ua*r),e.lineTo(ua*a-ca*o,ca*a+ua*o),e.lineTo(ua*l-ca*u,ca*l+ua*u),e.lineTo(ua*i+ca*r,ua*r-ca*i),e.lineTo(ua*a+ca*o,ua*o-ca*a),e.lineTo(ua*l+ca*u,ua*u-ca*l),e.closePath()}};function w1e(e,n){let t=null,i=cj(r);e=typeof e=="function"?e:Bt(e||dj),n=typeof n=="function"?n:Bt(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:Bt(a),r):e},r.size=function(a){return arguments.length?(n=typeof a=="function"?a:Bt(+a),r):n},r.context=function(a){return arguments.length?(t=a??null,r):t},r}function k1(){}function _1(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 TU(e){this._context=e}TU.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:_1(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:_1(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function k1e(e){return new TU(e)}function EU(e){this._context=e}EU.prototype={areaStart:k1,areaEnd:k1,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:_1(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function _1e(e){return new EU(e)}function MU(e){this._context=e}MU.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:_1(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function x1e(e){return new MU(e)}function DU(e){this._context=e}DU.prototype={areaStart:k1,areaEnd:k1,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 S1e(e){return new DU(e)}function VD(e){return e<0?-1:1}function WD(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(VD(a)+VD(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function GD(e,n){var t=e._x1-e._x0;return t?(3*(e._y1-e._y0)/t-n)/2:n}function z2(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 x1(e){this._context=e}x1.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:z2(this,this._t0,GD(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,z2(this,GD(this,t=WD(this,e,n)),t);break;default:z2(this,this._t0,t=WD(this,e,n));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n,this._t0=t}}};function RU(e){this._context=new PU(e)}(RU.prototype=Object.create(x1.prototype)).point=function(e,n){x1.prototype.point.call(this,n,e)};function PU(e){this._context=e}PU.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 C1e(e){return new x1(e)}function j1e(e){return new RU(e)}function NU(e){this._context=e}NU.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=YD(e),r=YD(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 O1e(e){return new Y0(e,.5)}function T1e(e){return new Y0(e,0)}function E1e(e){return new Y0(e,1)}function hf(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 M1e(e,n){return e[n]}function D1e(e){const n=[];return n.key=e,n}function R1e(){var e=Bt([]),n=M4,t=hf,i=M1e;function r(a){var o=Array.from(e.apply(this,arguments),D1e),l,u=o.length,f=-1,h;for(const d of a)for(l=0,++f;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 q1e(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 $U={symbolCircle:dj,symbolCross:u1e,symbolDiamond:f1e,symbolSquare:d1e,symbolStar:v1e,symbolTriangle:g1e,symbolWye:b1e},H1e=Math.PI/180,U1e=function(n){var t="symbol".concat(V0(n));return $U[t]||dj},V1e=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*H1e;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}},W1e=function(n,t){$U["symbol".concat(V0(n))]=t},hj=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,u=F1e(n,z1e),f=XD(XD({},u),{},{type:i,size:a,sizeType:l}),h=function(){var k=U1e(i),_=w1e().type(k).size(V1e(a,l,i));return _()},d=f.className,p=f.cx,g=f.cy,b=Un(f,!0);return p===+p&&g===+g&&a===+a?J.createElement("path",D4({},b,{className:vn("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(g,")"),d:h()})):null};hj.registerSymbol=W1e;function mf(e){"@babel/helpers - typeof";return mf=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},mf(e)}function R4(){return R4=Object.assign?Object.assign.bind():function(e){for(var n=1;n0?1:-1},wu=function(n){return Nu(n)&&n.indexOf("%")===n.length-1},Ge=function(n){return Tge(n)&&!ud(n)},Ege=function(n){return Zn(n)},ji=function(n){return Ge(n)||Nu(n)},Mge=0,cd=function(n){var t=++Mge;return"".concat(n||"").concat(t)},$u=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(!Ge(n)&&!Nu(n))return i;var a;if(wu(n)){var o=n.indexOf("%");a=t*parseFloat(n.slice(0,o))/100}else a=+n;return ud(a)&&(a=i),r&&a>t&&(a=t),a},ol=function(n){if(!n)return null;var t=Object.keys(n);return t&&t.length?n[t[0]]:null},Dge=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 Ige(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 x4(e){"@babel/helpers - typeof";return x4=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},x4(e)}var DD={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"},ts=function(n){return typeof n=="string"?n:n?n.displayName||n.name||"Component":""},RD=null,A2=null,uj=function e(n){if(n===RD&&Array.isArray(A2))return A2;var t=[];return x.Children.forEach(n,function(i){Zn(i)||(Cge.isFragment(i)?t=t.concat(e(i.props.children)):t.push(i))}),A2=t,RD=n,t};function wa(e,n){var t=[],i=[];return Array.isArray(n)?i=n.map(function(r){return ts(r)}):i=[ts(n)],uj(e).forEach(function(r){var a=ba(r,"type.displayName")||ba(r,"type.name");i.indexOf(a)!==-1&&t.push(r)}),t}function Ur(e,n){var t=wa(e,n);return t&&t[0]}var PD=function(n){if(!n||!n.props)return!1;var t=n.props,i=t.width,r=t.height;return!(!Ge(i)||i<=0||!Ge(r)||r<=0)},Bge=["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"],Fge=function(n){return n&&n.type&&Nu(n.type)&&Bge.indexOf(n.type)>=0},bU=function(n){return n&&x4(n)==="object"&&"clipDot"in n},qge=function(n,t,i,r){var a,o=(a=j2==null?void 0:j2[r])!==null&&a!==void 0?a:[];return t.startsWith("data-")||!Fn(n)&&(r&&o.includes(t)||Nge.includes(t))||i&&lj.includes(t)},Un=function(n,t,i){if(!n||typeof n=="function"||typeof n=="boolean")return null;var r=n;if(x.isValidElement(n)&&(r=n.props),!ld(r))return null;var a={};return Object.keys(r).forEach(function(o){var l;qge((l=r)===null||l===void 0?void 0:l[o],o,t,i)&&(a[o]=r[o])}),a},S4=function e(n,t){if(n===t)return!0;var i=x.Children.count(n);if(i!==x.Children.count(t))return!1;if(i===0)return!0;if(i===1)return ND(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 Gge(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 j4(e){var n=e.children,t=e.width,i=e.height,r=e.viewBox,a=e.className,o=e.style,l=e.title,u=e.desc,f=Wge(e,Vge),h=r||{width:t,height:i,x:0,y:0},d=vn("recharts-surface",a);return J.createElement("svg",C4({},Un(f,!0,"svg"),{className:d,width:t,height:i,style:o,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height)}),J.createElement("title",null,l),J.createElement("desc",null,u),n)}var Yge=["children","className"];function A4(){return A4=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 Xge(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 Ft=J.forwardRef(function(e,n){var t=e.children,i=e.className,r=Kge(e,Yge),a=vn("recharts-layer",i);return J.createElement("g",A4({className:a},Un(r,!0),{ref:n}),t)}),is=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 T2=n,T2}var E2,ID;function wU(){if(ID)return E2;ID=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 u(f){return l.test(f)}return E2=u,E2}var M2,BD;function Jge(){if(BD)return M2;BD=1;function e(n){return n.split("")}return M2=e,M2}var D2,FD;function e1e(){if(FD)return D2;FD=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+"]",u="\\ud83c[\\udffb-\\udfff]",f="(?:"+l+"|"+u+")",h="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",b=f+"?",w="["+a+"]?",k="(?:"+g+"(?:"+[h,d,p].join("|")+")"+w+b+")*",_=w+b+k,S="(?:"+[h+l+"?",l,d,p,o].join("|")+")",j=RegExp(u+"(?="+u+")|"+S+_,"g");function T(A){return A.match(j)||[]}return D2=T,D2}var R2,qD;function n1e(){if(qD)return R2;qD=1;var e=Jge(),n=wU(),t=e1e();function i(r){return n(r)?t(r):e(r)}return R2=i,R2}var P2,HD;function t1e(){if(HD)return P2;HD=1;var e=Qge(),n=wU(),t=n1e(),i=pU();function r(a){return function(o){o=i(o);var l=n(o)?t(o):void 0,u=l?l[0]:o.charAt(0),f=l?e(l,1).join(""):o.slice(1);return u[a]()+f}}return P2=r,P2}var N2,UD;function i1e(){if(UD)return N2;UD=1;var e=t1e(),n=e("toUpperCase");return N2=n,N2}var r1e=i1e();const V0=yt(r1e);function Bt(e){return function(){return e}}const kU=Math.cos,b1=Math.sin,Ga=Math.sqrt,w1=Math.PI,W0=2*w1,O4=Math.PI,T4=2*O4,mu=1e-6,a1e=T4-mu;function _U(e){this._+=e[0];for(let n=1,t=e.length;n=0))throw new Error(`invalid digits: ${e}`);if(n>15)return _U;const t=10**n;return function(i){this._+=i[0];for(let r=1,a=i.length;rmu)if(!(Math.abs(d*u-f*h)>mu)||!a)this._append`L${this._x1=n},${this._y1=t}`;else{let g=i-o,b=r-l,w=u*u+f*f,k=g*g+b*b,_=Math.sqrt(w),S=Math.sqrt(p),j=a*Math.tan((O4-Math.acos((w+p-k)/(2*_*S)))/2),T=j/S,A=j/_;Math.abs(T-1)>mu&&this._append`L${n+T*h},${t+T*d}`,this._append`A${a},${a},0,0,${+(d*g>h*b)},${this._x1=n+A*u},${this._y1=t+A*f}`}}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),u=i*Math.sin(r),f=n+l,h=t+u,d=1^o,p=o?r-a:a-r;this._x1===null?this._append`M${f},${h}`:(Math.abs(this._x1-f)>mu||Math.abs(this._y1-h)>mu)&&this._append`L${f},${h}`,i&&(p<0&&(p=p%T4+T4),p>a1e?this._append`A${i},${i},0,1,${d},${n-l},${t-u}A${i},${i},0,1,${d},${this._x1=f},${this._y1=h}`:p>mu&&this._append`A${i},${i},0,${+(p>=O4)},${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 cj(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 s1e(n)}function fj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xU(e){this._context=e}xU.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 G0(e){return new xU(e)}function SU(e){return e[0]}function CU(e){return e[1]}function jU(e,n){var t=Bt(!0),i=null,r=G0,a=null,o=cj(l);e=typeof e=="function"?e:e===void 0?SU:Bt(e),n=typeof n=="function"?n:n===void 0?CU:Bt(n);function l(u){var f,h=(u=fj(u)).length,d,p=!1,g;for(i==null&&(a=r(g=o())),f=0;f<=h;++f)!(f=g;--b)l.point(j[b],T[b]);l.lineEnd(),l.areaEnd()}_&&(j[p]=+e(k,p,d),T[p]=+n(k,p,d),l.point(i?+i(k,p,d):j[p],t?+t(k,p,d):T[p]))}if(S)return l=null,S+""||null}function h(){return jU().defined(r).curve(o).context(a)}return f.x=function(d){return arguments.length?(e=typeof d=="function"?d:Bt(+d),i=null,f):e},f.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Bt(+d),f):e},f.x1=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:Bt(+d),f):i},f.y=function(d){return arguments.length?(n=typeof d=="function"?d:Bt(+d),t=null,f):n},f.y0=function(d){return arguments.length?(n=typeof d=="function"?d:Bt(+d),f):n},f.y1=function(d){return arguments.length?(t=d==null?null:typeof d=="function"?d:Bt(+d),f):t},f.lineX0=f.lineY0=function(){return h().x(e).y(n)},f.lineY1=function(){return h().x(e).y(t)},f.lineX1=function(){return h().x(i).y(n)},f.defined=function(d){return arguments.length?(r=typeof d=="function"?d:Bt(!!d),f):r},f.curve=function(d){return arguments.length?(o=d,a!=null&&(l=o(a)),f):o},f.context=function(d){return arguments.length?(d==null?a=l=null:l=o(a=d),f):a},f}class AU{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 l1e(e){return new AU(e,!0)}function u1e(e){return new AU(e,!1)}const dj={draw(e,n){const t=Ga(n/w1);e.moveTo(t,0),e.arc(0,0,t,0,W0)}},c1e={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()}},OU=Ga(1/3),f1e=OU*2,d1e={draw(e,n){const t=Ga(n/f1e),i=t*OU;e.moveTo(0,-t),e.lineTo(i,0),e.lineTo(0,t),e.lineTo(-i,0),e.closePath()}},h1e={draw(e,n){const t=Ga(n),i=-t/2;e.rect(i,i,t,t)}},m1e=.8908130915292852,TU=b1(w1/10)/b1(7*w1/10),p1e=b1(W0/10)*TU,v1e=-kU(W0/10)*TU,g1e={draw(e,n){const t=Ga(n*m1e),i=p1e*t,r=v1e*t;e.moveTo(0,-t),e.lineTo(i,r);for(let a=1;a<5;++a){const o=W0*a/5,l=kU(o),u=b1(o);e.lineTo(u*t,-l*t),e.lineTo(l*i-u*r,u*i+l*r)}e.closePath()}},$2=Ga(3),y1e={draw(e,n){const t=-Ga(n/($2*3));e.moveTo(0,t*2),e.lineTo(-$2*t,-t),e.lineTo($2*t,-t),e.closePath()}},ua=-.5,ca=Ga(3)/2,E4=1/Ga(12),b1e=(E4/2+1)*3,w1e={draw(e,n){const t=Ga(n/b1e),i=t/2,r=t*E4,a=i,o=t*E4+t,l=-a,u=o;e.moveTo(i,r),e.lineTo(a,o),e.lineTo(l,u),e.lineTo(ua*i-ca*r,ca*i+ua*r),e.lineTo(ua*a-ca*o,ca*a+ua*o),e.lineTo(ua*l-ca*u,ca*l+ua*u),e.lineTo(ua*i+ca*r,ua*r-ca*i),e.lineTo(ua*a+ca*o,ua*o-ca*a),e.lineTo(ua*l+ca*u,ua*u-ca*l),e.closePath()}};function k1e(e,n){let t=null,i=cj(r);e=typeof e=="function"?e:Bt(e||dj),n=typeof n=="function"?n:Bt(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:Bt(a),r):e},r.size=function(a){return arguments.length?(n=typeof a=="function"?a:Bt(+a),r):n},r.context=function(a){return arguments.length?(t=a??null,r):t},r}function k1(){}function _1(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 EU(e){this._context=e}EU.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:_1(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:_1(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function _1e(e){return new EU(e)}function MU(e){this._context=e}MU.prototype={areaStart:k1,areaEnd:k1,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:_1(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function x1e(e){return new MU(e)}function DU(e){this._context=e}DU.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:_1(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function S1e(e){return new DU(e)}function RU(e){this._context=e}RU.prototype={areaStart:k1,areaEnd:k1,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 C1e(e){return new RU(e)}function VD(e){return e<0?-1:1}function WD(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(VD(a)+VD(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function GD(e,n){var t=e._x1-e._x0;return t?(3*(e._y1-e._y0)/t-n)/2:n}function z2(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 x1(e){this._context=e}x1.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:z2(this,this._t0,GD(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,z2(this,GD(this,t=WD(this,e,n)),t);break;default:z2(this,this._t0,t=WD(this,e,n));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n,this._t0=t}}};function PU(e){this._context=new NU(e)}(PU.prototype=Object.create(x1.prototype)).point=function(e,n){x1.prototype.point.call(this,n,e)};function NU(e){this._context=e}NU.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 j1e(e){return new x1(e)}function A1e(e){return new PU(e)}function $U(e){this._context=e}$U.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=YD(e),r=YD(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 T1e(e){return new Y0(e,.5)}function E1e(e){return new Y0(e,0)}function M1e(e){return new Y0(e,1)}function hf(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 D1e(e,n){return e[n]}function R1e(e){const n=[];return n.key=e,n}function P1e(){var e=Bt([]),n=M4,t=hf,i=D1e;function r(a){var o=Array.from(e.apply(this,arguments),R1e),l,u=o.length,f=-1,h;for(const d of a)for(l=0,++f;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 H1e(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 zU={symbolCircle:dj,symbolCross:c1e,symbolDiamond:d1e,symbolSquare:h1e,symbolStar:g1e,symbolTriangle:y1e,symbolWye:w1e},U1e=Math.PI/180,V1e=function(n){var t="symbol".concat(V0(n));return zU[t]||dj},W1e=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*U1e;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}},G1e=function(n,t){zU["symbol".concat(V0(n))]=t},hj=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,u=q1e(n,L1e),f=XD(XD({},u),{},{type:i,size:a,sizeType:l}),h=function(){var k=V1e(i),_=k1e().type(k).size(W1e(a,l,i));return _()},d=f.className,p=f.cx,g=f.cy,b=Un(f,!0);return p===+p&&g===+g&&a===+a?J.createElement("path",D4({},b,{className:vn("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(g,")"),d:h()})):null};hj.registerSymbol=G1e;function mf(e){"@babel/helpers - typeof";return mf=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},mf(e)}function R4(){return R4=Object.assign?Object.assign.bind():function(e){for(var n=1;n`);var S=g.inactive?f:g.color;return J.createElement("li",R4({className:k,style:d,key:"legend-item-".concat(b)},y1(i.props,g,b)),J.createElement(j4,{width:o,height:o,viewBox:h,style:p},i.renderIcon(g)),J.createElement("span",{className:"recharts-legend-item-text",style:{color:S}},w?w(_,g,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 J.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(x.PureComponent);Sm(mj,"displayName","Legend");Sm(mj,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var L2,QD;function tye(){if(QD)return L2;QD=1;var e=q0();function n(){this.__data__=new e,this.size=0}return L2=n,L2}var I2,JD;function iye(){if(JD)return I2;JD=1;function e(n){var t=this.__data__,i=t.delete(n);return this.size=t.size,i}return I2=e,I2}var B2,e7;function rye(){if(e7)return B2;e7=1;function e(n){return this.__data__.get(n)}return B2=e,B2}var F2,n7;function aye(){if(n7)return F2;n7=1;function e(n){return this.__data__.has(n)}return F2=e,F2}var q2,t7;function oye(){if(t7)return q2;t7=1;var e=q0(),n=rj(),t=aj(),i=200;function r(a,o){var l=this.__data__;if(l instanceof e){var u=l.__data__;if(!n||u.lengthg))return!1;var w=d.get(o),k=d.get(l);if(w&&k)return w==l&&k==o;var _=-1,S=!0,j=u&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 cx=n,cx}var fx,j7;function bye(){if(j7)return fx;j7=1;var e=_s(),n=yj(),t=xs(),i="[object Arguments]",r="[object Array]",a="[object Boolean]",o="[object Date]",l="[object Error]",u="[object Function]",f="[object Map]",h="[object Number]",d="[object Object]",p="[object RegExp]",g="[object Set]",b="[object String]",w="[object WeakMap]",k="[object ArrayBuffer]",_="[object DataView]",S="[object Float32Array]",j="[object Float64Array]",T="[object Int8Array]",A="[object Int16Array]",O="[object Int32Array]",M="[object Uint8Array]",$="[object Uint8ClampedArray]",q="[object Uint16Array]",P="[object Uint32Array]",L={};L[S]=L[j]=L[T]=L[A]=L[O]=L[M]=L[$]=L[q]=L[P]=!0,L[i]=L[r]=L[k]=L[a]=L[_]=L[o]=L[l]=L[u]=L[f]=L[h]=L[d]=L[p]=L[g]=L[b]=L[w]=!1;function U(G){return t(G)&&n(G.length)&&!!L[e(G)]}return fx=U,fx}var dx,A7;function WU(){if(A7)return dx;A7=1;function e(n){return function(t){return n(t)}}return dx=e,dx}var Vh={exports:{}};Vh.exports;var O7;function wye(){return O7||(O7=1,(function(e,n){var t=fU(),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 u=r&&r.require&&r.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}})();e.exports=l})(Vh,Vh.exports)),Vh.exports}var hx,T7;function GU(){if(T7)return hx;T7=1;var e=bye(),n=WU(),t=wye(),i=t&&t.isTypedArray,r=i?n(i):e;return hx=r,hx}var mx,E7;function kye(){if(E7)return mx;E7=1;var e=vye(),n=vj(),t=Tr(),i=VU(),r=gj(),a=GU(),o=Object.prototype,l=o.hasOwnProperty;function u(f,h){var d=t(f),p=!d&&n(f),g=!d&&!p&&i(f),b=!d&&!p&&!g&&a(f),w=d||p||g||b,k=w?e(f.length,String):[],_=k.length;for(var S in f)(h||l.call(f,S))&&!(w&&(S=="length"||g&&(S=="offset"||S=="parent")||b&&(S=="buffer"||S=="byteLength"||S=="byteOffset")||r(S,_)))&&k.push(S);return k}return mx=u,mx}var px,M7;function _ye(){if(M7)return px;M7=1;var e=Object.prototype;function n(t){var i=t&&t.constructor,r=typeof i=="function"&&i.prototype||e;return t===r}return px=n,px}var vx,D7;function YU(){if(D7)return vx;D7=1;function e(n,t){return function(i){return n(t(i))}}return vx=e,vx}var gx,R7;function xye(){if(R7)return gx;R7=1;var e=YU(),n=e(Object.keys,Object);return gx=n,gx}var yx,P7;function Sye(){if(P7)return yx;P7=1;var e=_ye(),n=xye(),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 yx=r,yx}var bx,N7;function Dp(){if(N7)return bx;N7=1;var e=tj(),n=yj();function t(i){return i!=null&&n(i.length)&&!e(i)}return bx=t,bx}var wx,$7;function K0(){if($7)return wx;$7=1;var e=kye(),n=Sye(),t=Dp();function i(r){return t(r)?e(r):n(r)}return wx=i,wx}var kx,z7;function Cye(){if(z7)return kx;z7=1;var e=dye(),n=pye(),t=K0();function i(r){return e(r,t,n)}return kx=i,kx}var _x,L7;function jye(){if(L7)return _x;L7=1;var e=Cye(),n=1,t=Object.prototype,i=t.hasOwnProperty;function r(a,o,l,u,f,h){var d=l&n,p=e(a),g=p.length,b=e(o),w=b.length;if(g!=w&&!d)return!1;for(var k=g;k--;){var _=p[k];if(!(d?_ in o:i.call(o,_)))return!1}var S=h.get(a),j=h.get(o);if(S&&j)return S==o&&j==a;var T=!0;h.set(a,o),h.set(o,a);for(var A=d;++k-1}return Yx=n,Yx}var Kx,fR;function Wye(){if(fR)return Kx;fR=1;function e(n,t,i){for(var r=-1,a=n==null?0:n.length;++r=o){var _=f?null:r(u);if(_)return a(_);b=!1,p=i,k=new e}else k=f?[]:w;e:for(;++d=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function s0e(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 l0e(e){return e.value}function u0e(e,n){if(J.isValidElement(e))return J.cloneElement(e,n);if(typeof e=="function")return J.createElement(e,n);n.ref;var t=o0e(n,Qye);return J.createElement(mj,t)}var bR=1,rs=(function(e){function n(){var t;Jye(this,n);for(var i=arguments.length,r=new Array(i),a=0;abR||Math.abs(r.height-this.lastBoundingBox.height)>bR)&&(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?Vo({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(i){var r=this.props,a=r.layout,o=r.align,l=r.verticalAlign,u=r.margin,f=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 g=this.getBBoxSnapshot();d={left:((f||0)-g.width)/2}}else d=o==="right"?{right:u&&u.right||0}:{left:u&&u.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:u&&u.bottom||0}:{top:u&&u.top||0};return Vo(Vo({},d),p)}},{key:"render",value:function(){var i=this,r=this.props,a=r.content,o=r.width,l=r.height,u=r.wrapperStyle,f=r.payloadUniqBy,h=r.payload,d=Vo(Vo({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(u)),u);return J.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(g){i.wrapperNode=g}},u0e(a,Vo(Vo({},this.props),{},{payload:JU(h,f,l0e)})))}}],[{key:"getWithHeight",value:function(i,r){var a=Vo(Vo({},this.defaultProps),i.props),o=a.layout;return o==="vertical"&&Ge(i.props.height)?{height:i.props.height}:o==="horizontal"?{width:i.props.width||r}:null}}])})(x.PureComponent);X0(rs,"displayName","Legend");X0(rs,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var e3,wR;function c0e(){if(wR)return e3;wR=1;var e=Mp(),n=vj(),t=Tr(),i=e?e.isConcatSpreadable:void 0;function r(a){return t(a)||n(a)||!!(i&&a&&a[i])}return e3=r,e3}var n3,kR;function tV(){if(kR)return n3;kR=1;var e=UU(),n=c0e();function t(i,r,a,o,l){var u=-1,f=i.length;for(a||(a=n),l||(l=[]);++u0&&a(h)?r>1?t(h,r-1,a,o,l):e(l,h):o||(l[l.length]=h)}return l}return n3=t,n3}var t3,_R;function f0e(){if(_R)return t3;_R=1;function e(n){return function(t,i,r){for(var a=-1,o=Object(t),l=r(t),u=l.length;u--;){var f=l[n?u:++a];if(i(o[f],f,o)===!1)break}return t}}return t3=e,t3}var i3,xR;function d0e(){if(xR)return i3;xR=1;var e=f0e(),n=e();return i3=n,i3}var r3,SR;function iV(){if(SR)return r3;SR=1;var e=d0e(),n=K0();function t(i,r){return i&&e(i,r,n)}return r3=t,r3}var a3,CR;function h0e(){if(CR)return a3;CR=1;var e=Dp();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,u=Object(r);(i?l--:++li||l&&u&&h&&!f&&!d||a&&u&&h||!r&&h||!o)return 1;if(!a&&!l&&!d&&t=f)return h;var d=r[a];return h*(d=="desc"?-1:1)}}return t.index-i.index}return c3=n,c3}var f3,MR;function g0e(){if(MR)return f3;MR=1;var e=oj(),n=sj(),t=Nl(),i=rV(),r=m0e(),a=WU(),o=v0e(),l=fd(),u=Tr();function f(h,d,p){d.length?d=e(d,function(w){return u(w)?function(k){return n(k,w.length===1?w[0]:w)}:w}):d=[l];var g=-1;d=e(d,a(t));var b=i(h,function(w,k,_){var S=e(d,function(j){return j(w)});return{criteria:S,index:++g,value:w}});return r(b,function(w,k){return o(w,k,p)})}return f3=f,f3}var d3,DR;function y0e(){if(DR)return d3;DR=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 d3=e,d3}var h3,RR;function b0e(){if(RR)return h3;RR=1;var e=y0e(),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,u=n(o.length-r,0),f=Array(u);++l0){if(++a>=e)return arguments[0]}else a=0;return r.apply(void 0,arguments)}}return g3=i,g3}var y3,LR;function x0e(){if(LR)return y3;LR=1;var e=k0e(),n=_0e(),t=n(e);return y3=t,y3}var b3,IR;function S0e(){if(IR)return b3;IR=1;var e=fd(),n=b0e(),t=x0e();function i(r,a){return t(n(r,a,e),r+"")}return b3=i,b3}var w3,BR;function Z0(){if(BR)return w3;BR=1;var e=ij(),n=Dp(),t=gj(),i=Pl();function r(a,o,l){if(!i(l))return!1;var u=typeof o;return(u=="number"?n(l)&&t(o,l.length):u=="string"&&o in l)?e(l[o],a):!1}return w3=r,w3}var k3,FR;function C0e(){if(FR)return k3;FR=1;var e=tV(),n=g0e(),t=S0e(),i=Z0(),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 k3=r,k3}var j0e=C0e();const kj=yt(j0e);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 $4(){return $4=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(jh,"-left"),Ge(t)&&n&&Ge(n.x)&&t=n.y),"".concat(jh,"-top"),Ge(i)&&n&&Ge(n.y)&&iw?Math.max(h,u[i]):Math.max(d,u[i])}function F0e(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 q0e(e){var n=e.allowEscapeViewBox,t=e.coordinate,i=e.offsetTopLeft,r=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,u=e.viewBox,f,h,d;return o.height>0&&o.width>0&&t?(h=UR({allowEscapeViewBox:n,coordinate:t,key:"x",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.width,viewBox:u,viewBoxDimension:u.width}),d=UR({allowEscapeViewBox:n,coordinate:t,key:"y",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.height,viewBox:u,viewBoxDimension:u.height}),f=F0e({translateX:h,translateY:d,useTranslate3d:l})):f=I0e,{cssProperties:f,cssClasses:B0e({translateX:h,translateY:d,coordinate:t})}}function vf(e){"@babel/helpers - typeof";return vf=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},vf(e)}function VR(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 WR(e){for(var n=1;nGR||Math.abs(i.height-this.state.lastBoundingBox.height)>GR)&&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,u=r.animationEasing,f=r.children,h=r.coordinate,d=r.hasPayload,p=r.isAnimationActive,g=r.offset,b=r.position,w=r.reverseDirection,k=r.useTranslate3d,_=r.viewBox,S=r.wrapperStyle,j=q0e({allowEscapeViewBox:o,coordinate:h,offsetTopLeft:g,position:b,reverseDirection:w,tooltipBox:this.state.lastBoundingBox,useTranslate3d:k,viewBox:_}),T=j.cssClasses,A=j.cssProperties,O=WR(WR({transition:p&&a?"transform ".concat(l,"ms ").concat(u):void 0},A),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&d?"visible":"hidden",position:"absolute",top:0,left:0},S);return J.createElement("div",{tabIndex:-1,className:T,style:O,ref:function($){i.wrapperNode=$}},f)}}])})(x.PureComponent),Q0e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ku={isSsr:Q0e()};function gf(e){"@babel/helpers - typeof";return gf=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},gf(e)}function YR(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 KR(e){for(var n=1;n0;return J.createElement(Z0e,{allowEscapeViewBox:o,animationDuration:l,animationEasing:u,isAnimationActive:p,active:a,coordinate:h,hasPayload:O,offset:g,position:k,reverseDirection:_,useTranslate3d:S,viewBox:j,wrapperStyle:T},lbe(f,KR(KR({},this.props),{},{payload:A})))}}])})(x.PureComponent);_j(pa,"displayName","Tooltip");_j(pa,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ku.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 x3,XR;function ube(){if(XR)return x3;XR=1;var e=So(),n=function(){return e.Date.now()};return x3=n,x3}var S3,ZR;function cbe(){if(ZR)return S3;ZR=1;var e=/\s/;function n(t){for(var i=t.length;i--&&e.test(t.charAt(i)););return i}return S3=n,S3}var C3,QR;function fbe(){if(QR)return C3;QR=1;var e=cbe(),n=/^\s+/;function t(i){return i&&i.slice(0,e(i)+1).replace(n,"")}return C3=t,C3}var j3,JR;function cV(){if(JR)return j3;JR=1;var e=fbe(),n=Pl(),t=sd(),i=NaN,r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function u(f){if(typeof f=="number")return f;if(t(f))return i;if(n(f)){var h=typeof f.valueOf=="function"?f.valueOf():f;f=n(h)?h+"":h}if(typeof f!="string")return f===0?f:+f;f=e(f);var d=a.test(f);return d||o.test(f)?l(f.slice(2),d?2:8):r.test(f)?i:+f}return j3=u,j3}var A3,eP;function dbe(){if(eP)return A3;eP=1;var e=Pl(),n=ube(),t=cV(),i="Expected a function",r=Math.max,a=Math.min;function o(l,u,f){var h,d,p,g,b,w,k=0,_=!1,S=!1,j=!0;if(typeof l!="function")throw new TypeError(i);u=t(u)||0,e(f)&&(_=!!f.leading,S="maxWait"in f,p=S?r(t(f.maxWait)||0,u):p,j="trailing"in f?!!f.trailing:j);function T(G){var B=h,R=d;return h=d=void 0,k=G,g=l.apply(R,B),g}function A(G){return k=G,b=setTimeout($,u),_?T(G):g}function O(G){var B=G-w,R=G-k,D=u-B;return S?a(D,p-R):D}function M(G){var B=G-w,R=G-k;return w===void 0||B>=u||B<0||S&&R>=p}function $(){var G=n();if(M(G))return q(G);b=setTimeout($,O(G))}function q(G){return b=void 0,j&&h?T(G):(h=d=void 0,g)}function P(){b!==void 0&&clearTimeout(b),k=0,h=w=d=b=void 0}function L(){return b===void 0?g:q(n())}function U(){var G=n(),B=M(G);if(h=arguments,d=this,w=G,B){if(b===void 0)return A(w);if(S)return clearTimeout(b),b=setTimeout($,u),T(w)}return b===void 0&&(b=setTimeout($,u)),g}return U.cancel=P,U.flush=L,U}return A3=o,A3}var O3,nP;function hbe(){if(nP)return O3;nP=1;var e=dbe(),n=Pl(),t="Expected a function";function i(r,a,o){var l=!0,u=!0;if(typeof r!="function")throw new TypeError(t);return n(o)&&(l="leading"in o?!!o.leading:l,u="trailing"in o?!!o.trailing:u),e(r,a,{leading:l,maxWait:a,trailing:u})}return O3=i,O3}var mbe=hbe();const fV=yt(mbe);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 tP(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 pg(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t0&&(G=fV(G,w,{trailing:!0,leading:!1}));var B=new ResizeObserver(G),R=A.current.getBoundingClientRect(),D=R.width,z=R.height;return L(D,z),B.observe(A.current),function(){B.disconnect()}},[L,w]);var U=x.useMemo(function(){var G=q.containerWidth,B=q.containerHeight;if(G<0||B<0)return null;is(wu(o)||wu(u),`The width(%s) and height(%s) are both fixed numbers, + A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(a),className:"recharts-legend-icon"});if(i.type==="rect")return J.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(fa/8,"h").concat(fa,"v").concat(fa*3/4,"h").concat(-fa,"z"),className:"recharts-legend-icon"});if(J.isValidElement(i.legendIcon)){var f=Y1e({},i);return delete f.legendIcon,J.cloneElement(i.legendIcon,f)}return J.createElement(hj,{fill:u,cx:a,cy:a,size:fa,sizeType:"diameter",type:i.type})}},{key:"renderItems",value:function(){var i=this,r=this.props,a=r.payload,o=r.iconSize,l=r.layout,u=r.formatter,f=r.inactiveColor,h={x:0,y:0,width:fa,height:fa},d={display:l==="horizontal"?"inline-block":"block",marginRight:10},p={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(g,b){var w=g.formatter||u,k=vn(Sm(Sm({"recharts-legend-item":!0},"legend-item-".concat(b),!0),"inactive",g.inactive));if(g.type==="none")return null;var _=Fn(g.value)?null:g.value;is(!Fn(g.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: `);var S=g.inactive?f:g.color;return J.createElement("li",R4({className:k,style:d,key:"legend-item-".concat(b)},y1(i.props,g,b)),J.createElement(j4,{width:o,height:o,viewBox:h,style:p},i.renderIcon(g)),J.createElement("span",{className:"recharts-legend-item-text",style:{color:S}},w?w(_,g,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 J.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(x.PureComponent);Sm(mj,"displayName","Legend");Sm(mj,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var L2,QD;function iye(){if(QD)return L2;QD=1;var e=q0();function n(){this.__data__=new e,this.size=0}return L2=n,L2}var I2,JD;function rye(){if(JD)return I2;JD=1;function e(n){var t=this.__data__,i=t.delete(n);return this.size=t.size,i}return I2=e,I2}var B2,e7;function aye(){if(e7)return B2;e7=1;function e(n){return this.__data__.get(n)}return B2=e,B2}var F2,n7;function oye(){if(n7)return F2;n7=1;function e(n){return this.__data__.has(n)}return F2=e,F2}var q2,t7;function sye(){if(t7)return q2;t7=1;var e=q0(),n=rj(),t=aj(),i=200;function r(a,o){var l=this.__data__;if(l instanceof e){var u=l.__data__;if(!n||u.lengthg))return!1;var w=d.get(o),k=d.get(l);if(w&&k)return w==l&&k==o;var _=-1,S=!0,j=u&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 cx=n,cx}var fx,j7;function wye(){if(j7)return fx;j7=1;var e=_s(),n=yj(),t=xs(),i="[object Arguments]",r="[object Array]",a="[object Boolean]",o="[object Date]",l="[object Error]",u="[object Function]",f="[object Map]",h="[object Number]",d="[object Object]",p="[object RegExp]",g="[object Set]",b="[object String]",w="[object WeakMap]",k="[object ArrayBuffer]",_="[object DataView]",S="[object Float32Array]",j="[object Float64Array]",T="[object Int8Array]",A="[object Int16Array]",O="[object Int32Array]",M="[object Uint8Array]",$="[object Uint8ClampedArray]",q="[object Uint16Array]",P="[object Uint32Array]",L={};L[S]=L[j]=L[T]=L[A]=L[O]=L[M]=L[$]=L[q]=L[P]=!0,L[i]=L[r]=L[k]=L[a]=L[_]=L[o]=L[l]=L[u]=L[f]=L[h]=L[d]=L[p]=L[g]=L[b]=L[w]=!1;function U(G){return t(G)&&n(G.length)&&!!L[e(G)]}return fx=U,fx}var dx,A7;function GU(){if(A7)return dx;A7=1;function e(n){return function(t){return n(t)}}return dx=e,dx}var Vh={exports:{}};Vh.exports;var O7;function kye(){return O7||(O7=1,(function(e,n){var t=dU(),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 u=r&&r.require&&r.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}})();e.exports=l})(Vh,Vh.exports)),Vh.exports}var hx,T7;function YU(){if(T7)return hx;T7=1;var e=wye(),n=GU(),t=kye(),i=t&&t.isTypedArray,r=i?n(i):e;return hx=r,hx}var mx,E7;function _ye(){if(E7)return mx;E7=1;var e=gye(),n=vj(),t=Tr(),i=WU(),r=gj(),a=YU(),o=Object.prototype,l=o.hasOwnProperty;function u(f,h){var d=t(f),p=!d&&n(f),g=!d&&!p&&i(f),b=!d&&!p&&!g&&a(f),w=d||p||g||b,k=w?e(f.length,String):[],_=k.length;for(var S in f)(h||l.call(f,S))&&!(w&&(S=="length"||g&&(S=="offset"||S=="parent")||b&&(S=="buffer"||S=="byteLength"||S=="byteOffset")||r(S,_)))&&k.push(S);return k}return mx=u,mx}var px,M7;function xye(){if(M7)return px;M7=1;var e=Object.prototype;function n(t){var i=t&&t.constructor,r=typeof i=="function"&&i.prototype||e;return t===r}return px=n,px}var vx,D7;function KU(){if(D7)return vx;D7=1;function e(n,t){return function(i){return n(t(i))}}return vx=e,vx}var gx,R7;function Sye(){if(R7)return gx;R7=1;var e=KU(),n=e(Object.keys,Object);return gx=n,gx}var yx,P7;function Cye(){if(P7)return yx;P7=1;var e=xye(),n=Sye(),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 yx=r,yx}var bx,N7;function Dp(){if(N7)return bx;N7=1;var e=tj(),n=yj();function t(i){return i!=null&&n(i.length)&&!e(i)}return bx=t,bx}var wx,$7;function K0(){if($7)return wx;$7=1;var e=_ye(),n=Cye(),t=Dp();function i(r){return t(r)?e(r):n(r)}return wx=i,wx}var kx,z7;function jye(){if(z7)return kx;z7=1;var e=hye(),n=vye(),t=K0();function i(r){return e(r,t,n)}return kx=i,kx}var _x,L7;function Aye(){if(L7)return _x;L7=1;var e=jye(),n=1,t=Object.prototype,i=t.hasOwnProperty;function r(a,o,l,u,f,h){var d=l&n,p=e(a),g=p.length,b=e(o),w=b.length;if(g!=w&&!d)return!1;for(var k=g;k--;){var _=p[k];if(!(d?_ in o:i.call(o,_)))return!1}var S=h.get(a),j=h.get(o);if(S&&j)return S==o&&j==a;var T=!0;h.set(a,o),h.set(o,a);for(var A=d;++k-1}return Yx=n,Yx}var Kx,fR;function Gye(){if(fR)return Kx;fR=1;function e(n,t,i){for(var r=-1,a=n==null?0:n.length;++r=o){var _=f?null:r(u);if(_)return a(_);b=!1,p=i,k=new e}else k=f?[]:w;e:for(;++d=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function l0e(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 u0e(e){return e.value}function c0e(e,n){if(J.isValidElement(e))return J.cloneElement(e,n);if(typeof e=="function")return J.createElement(e,n);n.ref;var t=s0e(n,Jye);return J.createElement(mj,t)}var bR=1,rs=(function(e){function n(){var t;e0e(this,n);for(var i=arguments.length,r=new Array(i),a=0;abR||Math.abs(r.height-this.lastBoundingBox.height)>bR)&&(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?Vo({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(i){var r=this.props,a=r.layout,o=r.align,l=r.verticalAlign,u=r.margin,f=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 g=this.getBBoxSnapshot();d={left:((f||0)-g.width)/2}}else d=o==="right"?{right:u&&u.right||0}:{left:u&&u.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:u&&u.bottom||0}:{top:u&&u.top||0};return Vo(Vo({},d),p)}},{key:"render",value:function(){var i=this,r=this.props,a=r.content,o=r.width,l=r.height,u=r.wrapperStyle,f=r.payloadUniqBy,h=r.payload,d=Vo(Vo({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(u)),u);return J.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(g){i.wrapperNode=g}},c0e(a,Vo(Vo({},this.props),{},{payload:eV(h,f,u0e)})))}}],[{key:"getWithHeight",value:function(i,r){var a=Vo(Vo({},this.defaultProps),i.props),o=a.layout;return o==="vertical"&&Ge(i.props.height)?{height:i.props.height}:o==="horizontal"?{width:i.props.width||r}:null}}])})(x.PureComponent);X0(rs,"displayName","Legend");X0(rs,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var e3,wR;function f0e(){if(wR)return e3;wR=1;var e=Mp(),n=vj(),t=Tr(),i=e?e.isConcatSpreadable:void 0;function r(a){return t(a)||n(a)||!!(i&&a&&a[i])}return e3=r,e3}var n3,kR;function iV(){if(kR)return n3;kR=1;var e=VU(),n=f0e();function t(i,r,a,o,l){var u=-1,f=i.length;for(a||(a=n),l||(l=[]);++u0&&a(h)?r>1?t(h,r-1,a,o,l):e(l,h):o||(l[l.length]=h)}return l}return n3=t,n3}var t3,_R;function d0e(){if(_R)return t3;_R=1;function e(n){return function(t,i,r){for(var a=-1,o=Object(t),l=r(t),u=l.length;u--;){var f=l[n?u:++a];if(i(o[f],f,o)===!1)break}return t}}return t3=e,t3}var i3,xR;function h0e(){if(xR)return i3;xR=1;var e=d0e(),n=e();return i3=n,i3}var r3,SR;function rV(){if(SR)return r3;SR=1;var e=h0e(),n=K0();function t(i,r){return i&&e(i,r,n)}return r3=t,r3}var a3,CR;function m0e(){if(CR)return a3;CR=1;var e=Dp();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,u=Object(r);(i?l--:++li||l&&u&&h&&!f&&!d||a&&u&&h||!r&&h||!o)return 1;if(!a&&!l&&!d&&t=f)return h;var d=r[a];return h*(d=="desc"?-1:1)}}return t.index-i.index}return c3=n,c3}var f3,MR;function y0e(){if(MR)return f3;MR=1;var e=oj(),n=sj(),t=Nl(),i=aV(),r=p0e(),a=GU(),o=g0e(),l=fd(),u=Tr();function f(h,d,p){d.length?d=e(d,function(w){return u(w)?function(k){return n(k,w.length===1?w[0]:w)}:w}):d=[l];var g=-1;d=e(d,a(t));var b=i(h,function(w,k,_){var S=e(d,function(j){return j(w)});return{criteria:S,index:++g,value:w}});return r(b,function(w,k){return o(w,k,p)})}return f3=f,f3}var d3,DR;function b0e(){if(DR)return d3;DR=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 d3=e,d3}var h3,RR;function w0e(){if(RR)return h3;RR=1;var e=b0e(),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,u=n(o.length-r,0),f=Array(u);++l0){if(++a>=e)return arguments[0]}else a=0;return r.apply(void 0,arguments)}}return g3=i,g3}var y3,LR;function S0e(){if(LR)return y3;LR=1;var e=_0e(),n=x0e(),t=n(e);return y3=t,y3}var b3,IR;function C0e(){if(IR)return b3;IR=1;var e=fd(),n=w0e(),t=S0e();function i(r,a){return t(n(r,a,e),r+"")}return b3=i,b3}var w3,BR;function Z0(){if(BR)return w3;BR=1;var e=ij(),n=Dp(),t=gj(),i=Pl();function r(a,o,l){if(!i(l))return!1;var u=typeof o;return(u=="number"?n(l)&&t(o,l.length):u=="string"&&o in l)?e(l[o],a):!1}return w3=r,w3}var k3,FR;function j0e(){if(FR)return k3;FR=1;var e=iV(),n=y0e(),t=C0e(),i=Z0(),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 k3=r,k3}var A0e=j0e();const kj=yt(A0e);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 $4(){return $4=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(jh,"-left"),Ge(t)&&n&&Ge(n.x)&&t=n.y),"".concat(jh,"-top"),Ge(i)&&n&&Ge(n.y)&&iw?Math.max(h,u[i]):Math.max(d,u[i])}function q0e(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 H0e(e){var n=e.allowEscapeViewBox,t=e.coordinate,i=e.offsetTopLeft,r=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,u=e.viewBox,f,h,d;return o.height>0&&o.width>0&&t?(h=UR({allowEscapeViewBox:n,coordinate:t,key:"x",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.width,viewBox:u,viewBoxDimension:u.width}),d=UR({allowEscapeViewBox:n,coordinate:t,key:"y",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.height,viewBox:u,viewBoxDimension:u.height}),f=q0e({translateX:h,translateY:d,useTranslate3d:l})):f=B0e,{cssProperties:f,cssClasses:F0e({translateX:h,translateY:d,coordinate:t})}}function vf(e){"@babel/helpers - typeof";return vf=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},vf(e)}function VR(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 WR(e){for(var n=1;nGR||Math.abs(i.height-this.state.lastBoundingBox.height)>GR)&&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,u=r.animationEasing,f=r.children,h=r.coordinate,d=r.hasPayload,p=r.isAnimationActive,g=r.offset,b=r.position,w=r.reverseDirection,k=r.useTranslate3d,_=r.viewBox,S=r.wrapperStyle,j=H0e({allowEscapeViewBox:o,coordinate:h,offsetTopLeft:g,position:b,reverseDirection:w,tooltipBox:this.state.lastBoundingBox,useTranslate3d:k,viewBox:_}),T=j.cssClasses,A=j.cssProperties,O=WR(WR({transition:p&&a?"transform ".concat(l,"ms ").concat(u):void 0},A),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&d?"visible":"hidden",position:"absolute",top:0,left:0},S);return J.createElement("div",{tabIndex:-1,className:T,style:O,ref:function($){i.wrapperNode=$}},f)}}])})(x.PureComponent),J0e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ku={isSsr:J0e()};function gf(e){"@babel/helpers - typeof";return gf=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},gf(e)}function YR(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 KR(e){for(var n=1;n0;return J.createElement(Q0e,{allowEscapeViewBox:o,animationDuration:l,animationEasing:u,isAnimationActive:p,active:a,coordinate:h,hasPayload:O,offset:g,position:k,reverseDirection:_,useTranslate3d:S,viewBox:j,wrapperStyle:T},ube(f,KR(KR({},this.props),{},{payload:A})))}}])})(x.PureComponent);_j(pa,"displayName","Tooltip");_j(pa,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ku.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 x3,XR;function cbe(){if(XR)return x3;XR=1;var e=So(),n=function(){return e.Date.now()};return x3=n,x3}var S3,ZR;function fbe(){if(ZR)return S3;ZR=1;var e=/\s/;function n(t){for(var i=t.length;i--&&e.test(t.charAt(i)););return i}return S3=n,S3}var C3,QR;function dbe(){if(QR)return C3;QR=1;var e=fbe(),n=/^\s+/;function t(i){return i&&i.slice(0,e(i)+1).replace(n,"")}return C3=t,C3}var j3,JR;function fV(){if(JR)return j3;JR=1;var e=dbe(),n=Pl(),t=sd(),i=NaN,r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function u(f){if(typeof f=="number")return f;if(t(f))return i;if(n(f)){var h=typeof f.valueOf=="function"?f.valueOf():f;f=n(h)?h+"":h}if(typeof f!="string")return f===0?f:+f;f=e(f);var d=a.test(f);return d||o.test(f)?l(f.slice(2),d?2:8):r.test(f)?i:+f}return j3=u,j3}var A3,eP;function hbe(){if(eP)return A3;eP=1;var e=Pl(),n=cbe(),t=fV(),i="Expected a function",r=Math.max,a=Math.min;function o(l,u,f){var h,d,p,g,b,w,k=0,_=!1,S=!1,j=!0;if(typeof l!="function")throw new TypeError(i);u=t(u)||0,e(f)&&(_=!!f.leading,S="maxWait"in f,p=S?r(t(f.maxWait)||0,u):p,j="trailing"in f?!!f.trailing:j);function T(G){var B=h,R=d;return h=d=void 0,k=G,g=l.apply(R,B),g}function A(G){return k=G,b=setTimeout($,u),_?T(G):g}function O(G){var B=G-w,R=G-k,D=u-B;return S?a(D,p-R):D}function M(G){var B=G-w,R=G-k;return w===void 0||B>=u||B<0||S&&R>=p}function $(){var G=n();if(M(G))return q(G);b=setTimeout($,O(G))}function q(G){return b=void 0,j&&h?T(G):(h=d=void 0,g)}function P(){b!==void 0&&clearTimeout(b),k=0,h=w=d=b=void 0}function L(){return b===void 0?g:q(n())}function U(){var G=n(),B=M(G);if(h=arguments,d=this,w=G,B){if(b===void 0)return A(w);if(S)return clearTimeout(b),b=setTimeout($,u),T(w)}return b===void 0&&(b=setTimeout($,u)),g}return U.cancel=P,U.flush=L,U}return A3=o,A3}var O3,nP;function mbe(){if(nP)return O3;nP=1;var e=hbe(),n=Pl(),t="Expected a function";function i(r,a,o){var l=!0,u=!0;if(typeof r!="function")throw new TypeError(t);return n(o)&&(l="leading"in o?!!o.leading:l,u="trailing"in o?!!o.trailing:u),e(r,a,{leading:l,maxWait:a,trailing:u})}return O3=i,O3}var pbe=mbe();const dV=yt(pbe);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 tP(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 pg(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t0&&(G=dV(G,w,{trailing:!0,leading:!1}));var B=new ResizeObserver(G),R=A.current.getBoundingClientRect(),D=R.width,z=R.height;return L(D,z),B.observe(A.current),function(){B.disconnect()}},[L,w]);var U=x.useMemo(function(){var G=q.containerWidth,B=q.containerHeight;if(G<0||B<0)return null;is(wu(o)||wu(u),`The width(%s) and height(%s) are both fixed numbers, maybe you don't need to use a ResponsiveContainer.`,o,u),is(!t||t>0,"The aspect(%s) must be greater than zero.",t);var R=wu(o)?G:o,D=wu(u)?B:u;t&&t>0&&(R?D=R/t:D&&(R=D*t),p&&D>p&&(D=p)),is(R>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.`,R,D,o,u,h,d,t);var z=!Array.isArray(g)&&ts(g.type).endsWith("Chart");return J.Children.map(g,function(H){return J.isValidElement(H)?x.cloneElement(H,pg({width:R,height:D},z?{style:pg({height:"100%",width:"100%",maxHeight:D,maxWidth:R},H.props.style)}:{})):H})},[t,g,u,p,d,h,q,o]);return J.createElement("div",{id:k?"".concat(k):void 0,className:vn("recharts-responsive-container",_),style:pg(pg({},T),{},{width:o,height:u,minWidth:h,minHeight:d,maxHeight:p}),ref:A},U)}),dV=function(n){return null};dV.displayName="Cell";function Om(e){"@babel/helpers - typeof";return Om=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},Om(e)}function rP(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 B4(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:{};if(n==null||Ku.isSsr)return{width:0,height:0};var i=Obe(t),r=JSON.stringify({text:n,copyStyle:i});if(Lc.widthCache[r])return Lc.widthCache[r];try{var a=document.getElementById(aP);a||(a=document.createElement("span"),a.setAttribute("id",aP),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=B4(B4({},Abe),i);Object.assign(a.style,o),a.textContent="".concat(n);var l=a.getBoundingClientRect(),u={width:l.width,height:l.height};return Lc.widthCache[r]=u,++Lc.cacheCount>jbe&&(Lc.cacheCount=0,Lc.widthCache={}),u}catch{return{width:0,height:0}}},Tbe=function(n){return{top:n.top+window.scrollY-document.documentElement.clientTop,left:n.left+window.scrollX-document.documentElement.clientLeft}};function Tm(e){"@babel/helpers - typeof";return Tm=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},Tm(e)}function O1(e,n){return Rbe(e)||Dbe(e,n)||Mbe(e,n)||Ebe()}function Ebe(){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 Mbe(e,n){if(e){if(typeof e=="string")return oP(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 oP(e,n)}}function oP(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 Gbe(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 dP(e,n){return Zbe(e)||Xbe(e,n)||Kbe(e,n)||Ybe()}function Ybe(){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 Kbe(e,n){if(e){if(typeof e=="string")return hP(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 hP(e,n)}}function hP(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 R.reduce(function(D,z){var H=z.word,Y=z.width,N=D[D.length-1];if(N&&(r==null||a||N.width+Y+iz.width?D:z})};if(!h)return g;for(var w="…",k=function(R){var D=d.slice(0,R),z=vV({breakAll:f,style:u,children:D+w}).wordsWithComputedWidth,H=p(z),Y=H.length>o||b(H).width>Number(r);return[Y,H]},_=0,S=d.length-1,j=0,T;_<=S&&j<=d.length-1;){var A=Math.floor((_+S)/2),O=A-1,M=k(O),$=dP(M,2),q=$[0],P=$[1],L=k(A),U=dP(L,1),G=U[0];if(!q&&!G&&(_=A+1),q&&G&&(S=A-1),!q&&G){T=P;break}j++}return T||g},mP=function(n){var t=Zn(n)?[]:n.toString().split(pV);return[{words:t}]},Jbe=function(n){var t=n.width,i=n.scaleToFit,r=n.children,a=n.style,o=n.breakAll,l=n.maxLines;if((t||i)&&!Ku.isSsr){var u,f,h=vV({breakAll:o,children:r,style:a});if(h){var d=h.wordsWithComputedWidth,p=h.spaceWidth;u=d,f=p}else return mP(r);return Qbe({breakAll:o,children:r,maxLines:l,style:a},u,f,t,i)}return mP(r)},pP="#808080",T1=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,u=n.capHeight,f=u===void 0?"0.71em":u,h=n.scaleToFit,d=h===void 0?!1:h,p=n.textAnchor,g=p===void 0?"start":p,b=n.verticalAnchor,w=b===void 0?"end":b,k=n.fill,_=k===void 0?pP:k,S=fP(n,Vbe),j=x.useMemo(function(){return Jbe({breakAll:S.breakAll,children:S.children,maxLines:S.maxLines,scaleToFit:d,style:S.style,width:S.width})},[S.breakAll,S.children,S.maxLines,d,S.style,S.width]),T=S.dx,A=S.dy,O=S.angle,M=S.className,$=S.breakAll,q=fP(S,Wbe);if(!ji(i)||!ji(a))return null;var P=i+(Ge(T)?T:0),L=a+(Ge(A)?A:0),U;switch(w){case"start":U=T3("calc(".concat(f,")"));break;case"middle":U=T3("calc(".concat((j.length-1)/2," * -").concat(l," + (").concat(f," / 2))"));break;default:U=T3("calc(".concat(j.length-1," * -").concat(l,")"));break}var G=[];if(d){var B=j[0].width,R=S.width;G.push("scale(".concat((Ge(R)?R/B:1)/B,")"))}return O&&G.push("rotate(".concat(O,", ").concat(P,", ").concat(L,")")),G.length&&(q.transform=G.join(" ")),J.createElement("text",F4({},Un(q,!0),{x:P,y:L,className:vn("recharts-text",M),textAnchor:g,fill:_.includes("url")?pP:_}),j.map(function(D,z){var H=D.words.join($?"":" ");return J.createElement("tspan",{x:P,dy:z===0?U:l,key:"".concat(H,"-").concat(z)},H)}))};function gl(e,n){return e==null||n==null?NaN:en?1:e>=n?0:NaN}function ewe(e,n){return e==null||n==null?NaN:ne?1:n>=e?0:NaN}function Sj(e){let n,t,i;e.length!==2?(n=gl,t=(l,u)=>gl(e(l),u),i=(l,u)=>e(l)-u):(n=e===gl||e===ewe?e:nwe,t=e,i=e);function r(l,u,f=0,h=l.length){if(f>>1;t(l[d],u)<0?f=d+1:h=d}while(f>>1;t(l[d],u)<=0?f=d+1:h=d}while(ff&&i(l[d-1],u)>-i(l[d],u)?d-1:d}return{left:r,center:o,right:a}}function nwe(){return 0}function gV(e){return e===null?NaN:+e}function*twe(e,n){for(let t of e)t!=null&&(t=+t)>=t&&(yield t)}const iwe=Sj(gl),Rp=iwe.right;Sj(gV).center;class vP extends Map{constructor(n,t=owe){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(gP(this,n))}has(n){return super.has(gP(this,n))}set(n,t){return super.set(rwe(this,n),t)}delete(n){return super.delete(awe(this,n))}}function gP({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):t}function rwe({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):(e.set(i,t),t)}function awe({_intern:e,_key:n},t){const i=n(t);return e.has(i)&&(t=e.get(i),e.delete(i)),t}function owe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function swe(e=gl){if(e===gl)return yV;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 yV(e,n){return(e==null||!(e>=e))-(n==null||!(n>=n))||(en?1:0)}const lwe=Math.sqrt(50),uwe=Math.sqrt(10),cwe=Math.sqrt(2);function E1(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>=lwe?10:a>=uwe?5:a>=cwe?2:1;let l,u,f;return r<0?(f=Math.pow(10,-r)/o,l=Math.round(e*f),u=Math.round(n*f),l/fn&&--u,f=-f):(f=Math.pow(10,r)*o,l=Math.round(e/f),u=Math.round(n/f),l*fn&&--u),u0))return[];if(e===n)return[e];const i=n=r))return[];const l=a-r+1,u=new Array(l);if(i)if(o<0)for(let f=0;f=i)&&(t=i);return t}function bP(e,n){let t;for(const i of e)i!=null&&(t>i||t===void 0&&i>=i)&&(t=i);return t}function bV(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?yV:swe(r);i>t;){if(i-t>600){const u=i-t+1,f=n-t+1,h=Math.log(u),d=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*d*(u-d)/u)*(f-u/2<0?-1:1),g=Math.max(t,Math.floor(n-f*d/u+p)),b=Math.min(i,Math.floor(n+(u-f)*d/u+p));bV(e,n,g,b,r)}const a=e[n];let o=t,l=i;for(Ah(e,t,n),r(e[i],a)>0&&Ah(e,t,i);o0;)--l}r(e[t],a)===0?Ah(e,t,l):(++l,Ah(e,l,i)),l<=n&&(t=l+1),n<=l&&(i=l-1)}return e}function Ah(e,n,t){const i=e[n];e[n]=e[t],e[t]=i}function fwe(e,n,t){if(e=Float64Array.from(twe(e)),!(!(i=e.length)||isNaN(n=+n))){if(n<=0||i<2)return bP(e);if(n>=1)return yP(e);var i,r=(i-1)*n,a=Math.floor(r),o=yP(bV(e,a).subarray(0,a+1)),l=bP(e.subarray(a+1));return o+(l-o)*(r-a)}}function dwe(e,n,t=gV){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 hwe(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?gg(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?gg(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=pwe.exec(e))?new Sr(n[1],n[2],n[3],1):(n=vwe.exec(e))?new Sr(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=gwe.exec(e))?gg(n[1],n[2],n[3],n[4]):(n=ywe.exec(e))?gg(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=bwe.exec(e))?jP(n[1],n[2]/100,n[3]/100,1):(n=wwe.exec(e))?jP(n[1],n[2]/100,n[3]/100,n[4]):wP.hasOwnProperty(e)?xP(wP[e]):e==="transparent"?new Sr(NaN,NaN,NaN,0):null}function xP(e){return new Sr(e>>16&255,e>>8&255,e&255,1)}function gg(e,n,t,i){return i<=0&&(e=n=t=NaN),new Sr(e,n,t,i)}function xwe(e){return e instanceof Pp||(e=Rm(e)),e?(e=e.rgb(),new Sr(e.r,e.g,e.b,e.opacity)):new Sr}function W4(e,n,t,i){return arguments.length===1?xwe(e):new Sr(e,n,t,i??1)}function Sr(e,n,t,i){this.r=+e,this.g=+n,this.b=+t,this.opacity=+i}jj(Sr,W4,kV(Pp,{brighter(e){return e=e==null?M1:Math.pow(M1,e),new Sr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Mm:Math.pow(Mm,e),new Sr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Sr(ju(this.r),ju(this.g),ju(this.b),D1(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:SP,formatHex:SP,formatHex8:Swe,formatRgb:CP,toString:CP}));function SP(){return`#${ku(this.r)}${ku(this.g)}${ku(this.b)}`}function Swe(){return`#${ku(this.r)}${ku(this.g)}${ku(this.b)}${ku((isNaN(this.opacity)?1:this.opacity)*255)}`}function CP(){const e=D1(this.opacity);return`${e===1?"rgb(":"rgba("}${ju(this.r)}, ${ju(this.g)}, ${ju(this.b)}${e===1?")":`, ${e})`}`}function D1(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ju(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ku(e){return e=ju(e),(e<16?"0":"")+e.toString(16)}function jP(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 _V(e){if(e instanceof La)return new La(e.h,e.s,e.l,e.opacity);if(e instanceof Pp||(e=Rm(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,u=(a+r)/2;return l?(n===a?o=(t-i)/l+(t0&&u<1?0:o,new La(o,l,u,e.opacity)}function Cwe(e,n,t,i){return arguments.length===1?_V(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}jj(La,Cwe,kV(Pp,{brighter(e){return e=e==null?M1:Math.pow(M1,e),new La(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Mm:Math.pow(Mm,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 Sr(E3(e>=240?e-240:e+120,r,i),E3(e,r,i),E3(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new La(AP(this.h),yg(this.s),yg(this.l),D1(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=D1(this.opacity);return`${e===1?"hsl(":"hsla("}${AP(this.h)}, ${yg(this.s)*100}%, ${yg(this.l)*100}%${e===1?")":`, ${e})`}`}}));function AP(e){return e=(e||0)%360,e<0?e+360:e}function yg(e){return Math.max(0,Math.min(1,e||0))}function E3(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 Aj=e=>()=>e;function jwe(e,n){return function(t){return e+t*n}}function Awe(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 Owe(e){return(e=+e)==1?xV:function(n,t){return t-n?Awe(n,t,e):Aj(isNaN(n)?t:n)}}function xV(e,n){var t=n-e;return t?jwe(e,t):Aj(isNaN(e)?n:e)}const OP=(function e(n){var t=Owe(n);function i(r,a){var o=t((r=W4(r)).r,(a=W4(a)).r),l=t(r.g,a.g),u=t(r.b,a.b),f=xV(r.opacity,a.opacity);return function(h){return r.r=o(h),r.g=l(h),r.b=u(h),r.opacity=f(h),r+""}}return i.gamma=e,i})(1);function Twe(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,u.push({i:o,x:R1(i,r)})),t=M3.lastIndex;return tn&&(t=e,e=n,n=t),function(i){return Math.max(e,Math.min(n,i))}}function Bwe(e,n,t){var i=e[0],r=e[1],a=n[0],o=n[1];return r2?Fwe:Bwe,u=f=null,d}function d(p){return p==null||isNaN(p=+p)?a:(u||(u=l(e.map(i),n,t)))(i(o(p)))}return d.invert=function(p){return o(r((f||(f=l(n,e.map(i),R1)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,P1),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=Oj,h()},d.clamp=function(p){return arguments.length?(o=p?!0:sr,h()):o!==sr},d.interpolate=function(p){return arguments.length?(t=p,h()):t},d.unknown=function(p){return arguments.length?(a=p,d):a},function(p,g){return i=p,r=g,h()}}function Tj(){return Q0()(sr,sr)}function qwe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function N1(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 yf(e){return e=N1(Math.abs(e)),e?e[1]:NaN}function Hwe(e,n){return function(t,i){for(var r=t.length,a=[],o=0,l=e[0],u=0;r>0&&l>0&&(u+l+1>i&&(l=Math.max(1,i-u)),a.push(t.substring(r-=l,r+l)),!((u+=l+1)>i));)l=e[o=(o+1)%e.length];return a.reverse().join(n)}}function Uwe(e){return function(n){return n.replace(/[0-9]/g,function(t){return e[+t]})}}var Vwe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Pm(e){if(!(n=Vwe.exec(e)))throw new Error("invalid format: "+e);var n;return new Ej({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]})}Pm.prototype=Ej.prototype;function Ej(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+""}Ej.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 Wwe(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 $1;function Gwe(e,n){var t=N1(e,n);if(!t)return $1=void 0,e.toPrecision(n);var i=t[0],r=t[1],a=r-($1=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")+N1(e,Math.max(0,n+a-1))[0]}function EP(e,n){var t=N1(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 MP={"%":(e,n)=>(e*100).toFixed(n),b:e=>Math.round(e).toString(2),c:e=>e+"",d:qwe,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)=>EP(e*100,n),r:EP,s:Gwe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function DP(e){return e}var RP=Array.prototype.map,PP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ywe(e){var n=e.grouping===void 0||e.thousands===void 0?DP:Hwe(RP.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?DP:Uwe(RP.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function f(d,p){d=Pm(d);var g=d.fill,b=d.align,w=d.sign,k=d.symbol,_=d.zero,S=d.width,j=d.comma,T=d.precision,A=d.trim,O=d.type;O==="n"?(j=!0,O="g"):MP[O]||(T===void 0&&(T=12),A=!0,O="g"),(_||g==="0"&&b==="=")&&(_=!0,g="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=MP[O],P=/[defgprs%]/.test(O);T=T===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,T)):Math.max(0,Math.min(20,T));function L(U){var G=M,B=$,R,D,z;if(O==="c")B=q(U)+B,U="";else{U=+U;var H=U<0||1/U<0;if(U=isNaN(U)?u:q(Math.abs(U),T),A&&(U=Wwe(U)),H&&+U==0&&w!=="+"&&(H=!1),G=(H?w==="("?w:l:w==="-"||w==="("?"":w)+G,B=(O==="s"&&!isNaN(U)&&$1!==void 0?PP[8+$1/3]:"")+B+(H&&w==="("?")":""),P){for(R=-1,D=U.length;++Rz||z>57){B=(z===46?r+U.slice(R+1):U.slice(R))+B,U=U.slice(0,R);break}}}j&&!_&&(U=n(U,1/0));var Y=G.length+U.length+B.length,N=Y>1)+G+U+B+N.slice(Y);break;default:U=N+G+U+B;break}return a(U)}return L.toString=function(){return d+""},L}function h(d,p){var g=Math.max(-8,Math.min(8,Math.floor(yf(p)/3)))*3,b=Math.pow(10,-g),w=f((d=Pm(d),d.type="f",d),{suffix:PP[8+g/3]});return function(k){return w(b*k)}}return{format:f,formatPrefix:h}}var bg,Mj,SV;Kwe({thousands:",",grouping:[3],currency:["$",""]});function Kwe(e){return bg=Ywe(e),Mj=bg.format,SV=bg.formatPrefix,bg}function Xwe(e){return Math.max(0,-yf(Math.abs(e)))}function Zwe(e,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(yf(n)/3)))*3-yf(Math.abs(e)))}function Qwe(e,n){return e=Math.abs(e),n=Math.abs(n)-e,Math.max(0,yf(n)-yf(e))+1}function CV(e,n,t,i){var r=U4(e,n,t),a;switch(i=Pm(i??",f"),i.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(n));return i.precision==null&&!isNaN(a=Zwe(r,o))&&(i.precision=a),SV(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(a=Qwe(r,Math.max(Math.abs(e),Math.abs(n))))&&(i.precision=a-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(a=Xwe(r))&&(i.precision=a-(i.type==="%")*2);break}}return Mj(i)}function $l(e){var n=e.domain;return e.ticks=function(t){var i=n();return q4(i[0],i[i.length-1],t??10)},e.tickFormat=function(t,i){var r=n();return CV(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],u,f,h=10;for(l0;){if(f=H4(o,l,t),f===u)return i[r]=o,i[a]=l,n(i);if(f>0)o=Math.floor(o/f)*f,l=Math.ceil(l/f)*f;else if(f<0)o=Math.ceil(o*f)/f,l=Math.floor(l*f)/f;else break;u=f}return e},e}function z1(){var e=Tj();return e.copy=function(){return Np(e,z1())},Oa.apply(e,arguments),$l(e)}function jV(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,P1),t):e.slice()},t.unknown=function(i){return arguments.length?(n=i,t):n},t.copy=function(){return jV(e).unknown(n)},e=arguments.length?Array.from(e,P1):[0,1],$l(t)}function AV(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 ike(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 zP(e){return(n,t)=>-e(-n,t)}function Dj(e){const n=e(NP,$P),t=n.domain;let i=10,r,a;function o(){return r=ike(i),a=tke(i),t()[0]<0?(r=zP(r),a=zP(a),e(Jwe,eke)):e(NP,$P),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 u=t();let f=u[0],h=u[u.length-1];const d=h0){for(;p<=g;++p)for(b=1;bh)break;_.push(w)}}else for(;p<=g;++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),u==null&&(u=i===10?"s":","),typeof u!="function"&&(!(i%1)&&(u=Pm(u)).precision==null&&(u.trim=!0),u=Mj(u)),l===1/0)return u;const f=Math.max(1,i*l/n.ticks().length);return h=>{let d=h/a(Math.round(r(h)));return d*it(AV(t(),{floor:l=>a(Math.floor(r(l))),ceil:l=>a(Math.ceil(r(l)))})),n}function OV(){const e=Dj(Q0()).domain([1,10]);return e.copy=()=>Np(e,OV()).base(e.base()),Oa.apply(e,arguments),e}function LP(e){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/e))}}function IP(e){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*e}}function Rj(e){var n=1,t=e(LP(n),IP(n));return t.constant=function(i){return arguments.length?e(LP(n=+i),IP(n)):n},$l(t)}function TV(){var e=Rj(Q0());return e.copy=function(){return Np(e,TV()).constant(e.constant())},Oa.apply(e,arguments)}function BP(e){return function(n){return n<0?-Math.pow(-n,e):Math.pow(n,e)}}function rke(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function ake(e){return e<0?-e*e:e*e}function Pj(e){var n=e(sr,sr),t=1;function i(){return t===1?e(sr,sr):t===.5?e(rke,ake):e(BP(t),BP(1/t))}return n.exponent=function(r){return arguments.length?(t=+r,i()):t},$l(n)}function Nj(){var e=Pj(Q0());return e.copy=function(){return Np(e,Nj()).exponent(e.exponent())},Oa.apply(e,arguments),e}function oke(){return Nj.apply(null,arguments).exponent(.5)}function FP(e){return Math.sign(e)*e*e}function ske(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function EV(){var e=Tj(),n=[0,1],t=!1,i;function r(a){var o=ske(e(a));return isNaN(o)?i:t?Math.round(o):o}return r.invert=function(a){return e.invert(FP(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,P1)).map(FP)),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 EV(e.domain(),n).round(t).clamp(e.clamp()).unknown(i)},Oa.apply(r,arguments),$l(r)}function MV(){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[f-1],i[f]]},o.unknown=function(u){return arguments.length&&(a=u),o},o.thresholds=function(){return i.slice()},o.copy=function(){return DV().domain([e,n]).range(r).unknown(a)},Oa.apply($l(o),arguments)}function RV(){var e=[.5],n=[0,1],t,i=1;function r(a){return a!=null&&a<=a?n[Rp(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 RV().domain(e).range(n).unknown(t)},Oa.apply(r,arguments)}const D3=new Date,R3=new Date;function Oi(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 u=[];if(a=r.ceil(a),l=l==null?1:Math.floor(l),!(a0))return u;let f;do u.push(f=new Date(+a)),n(a,l),e(a);while(fOi(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)=>(D3.setTime(+a),R3.setTime(+o),e(D3),e(R3),Math.floor(t(D3,R3))),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 L1=Oi(()=>{},(e,n)=>{e.setTime(+e+n)},(e,n)=>n-e);L1.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Oi(n=>{n.setTime(Math.floor(n/e)*e)},(n,t)=>{n.setTime(+n+t*e)},(n,t)=>(t-n)/e):L1);L1.range;const Xo=1e3,ya=Xo*60,Zo=ya*60,fs=Zo*24,$j=fs*7,qP=fs*30,P3=fs*365,_u=Oi(e=>{e.setTime(e-e.getMilliseconds())},(e,n)=>{e.setTime(+e+n*Xo)},(e,n)=>(n-e)/Xo,e=>e.getUTCSeconds());_u.range;const zj=Oi(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Xo)},(e,n)=>{e.setTime(+e+n*ya)},(e,n)=>(n-e)/ya,e=>e.getMinutes());zj.range;const Lj=Oi(e=>{e.setUTCSeconds(0,0)},(e,n)=>{e.setTime(+e+n*ya)},(e,n)=>(n-e)/ya,e=>e.getUTCMinutes());Lj.range;const Ij=Oi(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Xo-e.getMinutes()*ya)},(e,n)=>{e.setTime(+e+n*Zo)},(e,n)=>(n-e)/Zo,e=>e.getHours());Ij.range;const Bj=Oi(e=>{e.setUTCMinutes(0,0,0)},(e,n)=>{e.setTime(+e+n*Zo)},(e,n)=>(n-e)/Zo,e=>e.getUTCHours());Bj.range;const $p=Oi(e=>e.setHours(0,0,0,0),(e,n)=>e.setDate(e.getDate()+n),(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ya)/fs,e=>e.getDate()-1);$p.range;const J0=Oi(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/fs,e=>e.getUTCDate()-1);J0.range;const PV=Oi(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/fs,e=>Math.floor(e/fs));PV.range;function Xu(e){return Oi(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())*ya)/$j)}const eb=Xu(0),I1=Xu(1),lke=Xu(2),uke=Xu(3),bf=Xu(4),cke=Xu(5),fke=Xu(6);eb.range;I1.range;lke.range;uke.range;bf.range;cke.range;fke.range;function Zu(e){return Oi(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)/$j)}const nb=Zu(0),B1=Zu(1),dke=Zu(2),hke=Zu(3),wf=Zu(4),mke=Zu(5),pke=Zu(6);nb.range;B1.range;dke.range;hke.range;wf.range;mke.range;pke.range;const Fj=Oi(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());Fj.range;const qj=Oi(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());qj.range;const ds=Oi(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());ds.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Oi(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)});ds.range;const hs=Oi(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());hs.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Oi(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)});hs.range;function NV(e,n,t,i,r,a){const o=[[_u,1,Xo],[_u,5,5*Xo],[_u,15,15*Xo],[_u,30,30*Xo],[a,1,ya],[a,5,5*ya],[a,15,15*ya],[a,30,30*ya],[r,1,Zo],[r,3,3*Zo],[r,6,6*Zo],[r,12,12*Zo],[i,1,fs],[i,2,2*fs],[t,1,$j],[n,1,qP],[n,3,3*qP],[e,1,P3]];function l(f,h,d){const p=hk).right(o,p);if(g===o.length)return e.every(U4(f/P3,h/P3,d));if(g===0)return L1.every(Math.max(U4(f,h,d),1));const[b,w]=o[p/o[g-1][2]53)return null;"w"in te||(te.w=1),"Z"in te?(xe=$3(Oh(te.y,0,1)),Ae=xe.getUTCDay(),xe=Ae>4||Ae===0?B1.ceil(xe):B1(xe),xe=J0.offset(xe,(te.V-1)*7),te.y=xe.getUTCFullYear(),te.m=xe.getUTCMonth(),te.d=xe.getUTCDate()+(te.w+6)%7):(xe=N3(Oh(te.y,0,1)),Ae=xe.getDay(),xe=Ae>4||Ae===0?I1.ceil(xe):I1(xe),xe=$p.offset(xe,(te.V-1)*7),te.y=xe.getFullYear(),te.m=xe.getMonth(),te.d=xe.getDate()+(te.w+6)%7)}else("W"in te||"U"in te)&&("w"in te||(te.w="u"in te?te.u%7:"W"in te?1:0),Ae="Z"in te?$3(Oh(te.y,0,1)).getUTCDay():N3(Oh(te.y,0,1)).getDay(),te.m=0,te.d="W"in te?(te.w+6)%7+te.W*7-(Ae+5)%7:te.w+te.U*7-(Ae+6)%7);return"Z"in te?(te.H+=te.Z/100|0,te.M+=te.Z%100,$3(te)):N3(te)}}function $(ee,se,ke,te){for(var $e=0,xe=se.length,Ae=ke.length,ze,we;$e=Ae)return-1;if(ze=se.charCodeAt($e++),ze===37){if(ze=se.charAt($e++),we=A[ze in HP?se.charAt($e++):ze],!we||(te=we(ee,ke,te))<0)return-1}else if(ze!=ke.charCodeAt(te++))return-1}return te}function q(ee,se,ke){var te=f.exec(se.slice(ke));return te?(ee.p=h.get(te[0].toLowerCase()),ke+te[0].length):-1}function P(ee,se,ke){var te=g.exec(se.slice(ke));return te?(ee.w=b.get(te[0].toLowerCase()),ke+te[0].length):-1}function L(ee,se,ke){var te=d.exec(se.slice(ke));return te?(ee.w=p.get(te[0].toLowerCase()),ke+te[0].length):-1}function U(ee,se,ke){var te=_.exec(se.slice(ke));return te?(ee.m=S.get(te[0].toLowerCase()),ke+te[0].length):-1}function G(ee,se,ke){var te=w.exec(se.slice(ke));return te?(ee.m=k.get(te[0].toLowerCase()),ke+te[0].length):-1}function B(ee,se,ke){return $(ee,n,se,ke)}function R(ee,se,ke){return $(ee,t,se,ke)}function D(ee,se,ke){return $(ee,i,se,ke)}function z(ee){return o[ee.getDay()]}function H(ee){return a[ee.getDay()]}function Y(ee){return u[ee.getMonth()]}function N(ee){return l[ee.getMonth()]}function W(ee){return r[+(ee.getHours()>=12)]}function V(ee){return 1+~~(ee.getMonth()/3)}function I(ee){return o[ee.getUTCDay()]}function Q(ee){return a[ee.getUTCDay()]}function ie(ee){return u[ee.getUTCMonth()]}function re(ee){return l[ee.getUTCMonth()]}function Z(ee){return r[+(ee.getUTCHours()>=12)]}function le(ee){return 1+~~(ee.getUTCMonth()/3)}return{format:function(ee){var se=O(ee+="",j);return se.toString=function(){return ee},se},parse:function(ee){var se=M(ee+="",!1);return se.toString=function(){return ee},se},utcFormat:function(ee){var se=O(ee+="",T);return se.toString=function(){return ee},se},utcParse:function(ee){var se=M(ee+="",!0);return se.toString=function(){return ee},se}}}var HP={"-":"",_:" ",0:"0"},$i=/^\s*\d+/,kke=/^%/,_ke=/[\\^$*+?|[\]().{}]/g;function gt(e,n,t){var i=e<0?"-":"",r=(i?-e:e)+"",a=r.length;return i+(a[n.toLowerCase(),t]))}function Ske(e,n,t){var i=$i.exec(n.slice(t,t+1));return i?(e.w=+i[0],t+i[0].length):-1}function Cke(e,n,t){var i=$i.exec(n.slice(t,t+1));return i?(e.u=+i[0],t+i[0].length):-1}function jke(e,n,t){var i=$i.exec(n.slice(t,t+2));return i?(e.U=+i[0],t+i[0].length):-1}function Ake(e,n,t){var i=$i.exec(n.slice(t,t+2));return i?(e.V=+i[0],t+i[0].length):-1}function Oke(e,n,t){var i=$i.exec(n.slice(t,t+2));return i?(e.W=+i[0],t+i[0].length):-1}function UP(e,n,t){var i=$i.exec(n.slice(t,t+4));return i?(e.y=+i[0],t+i[0].length):-1}function VP(e,n,t){var i=$i.exec(n.slice(t,t+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),t+i[0].length):-1}function Tke(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 Eke(e,n,t){var i=$i.exec(n.slice(t,t+1));return i?(e.q=i[0]*3-3,t+i[0].length):-1}function Mke(e,n,t){var i=$i.exec(n.slice(t,t+2));return i?(e.m=i[0]-1,t+i[0].length):-1}function WP(e,n,t){var i=$i.exec(n.slice(t,t+2));return i?(e.d=+i[0],t+i[0].length):-1}function Dke(e,n,t){var i=$i.exec(n.slice(t,t+3));return i?(e.m=0,e.d=+i[0],t+i[0].length):-1}function GP(e,n,t){var i=$i.exec(n.slice(t,t+2));return i?(e.H=+i[0],t+i[0].length):-1}function Rke(e,n,t){var i=$i.exec(n.slice(t,t+2));return i?(e.M=+i[0],t+i[0].length):-1}function Pke(e,n,t){var i=$i.exec(n.slice(t,t+2));return i?(e.S=+i[0],t+i[0].length):-1}function Nke(e,n,t){var i=$i.exec(n.slice(t,t+3));return i?(e.L=+i[0],t+i[0].length):-1}function $ke(e,n,t){var i=$i.exec(n.slice(t,t+6));return i?(e.L=Math.floor(i[0]/1e3),t+i[0].length):-1}function zke(e,n,t){var i=kke.exec(n.slice(t,t+1));return i?t+i[0].length:-1}function Lke(e,n,t){var i=$i.exec(n.slice(t));return i?(e.Q=+i[0],t+i[0].length):-1}function Ike(e,n,t){var i=$i.exec(n.slice(t));return i?(e.s=+i[0],t+i[0].length):-1}function YP(e,n){return gt(e.getDate(),n,2)}function Bke(e,n){return gt(e.getHours(),n,2)}function Fke(e,n){return gt(e.getHours()%12||12,n,2)}function qke(e,n){return gt(1+$p.count(ds(e),e),n,3)}function $V(e,n){return gt(e.getMilliseconds(),n,3)}function Hke(e,n){return $V(e,n)+"000"}function Uke(e,n){return gt(e.getMonth()+1,n,2)}function Vke(e,n){return gt(e.getMinutes(),n,2)}function Wke(e,n){return gt(e.getSeconds(),n,2)}function Gke(e){var n=e.getDay();return n===0?7:n}function Yke(e,n){return gt(eb.count(ds(e)-1,e),n,2)}function zV(e){var n=e.getDay();return n>=4||n===0?bf(e):bf.ceil(e)}function Kke(e,n){return e=zV(e),gt(bf.count(ds(e),e)+(ds(e).getDay()===4),n,2)}function Xke(e){return e.getDay()}function Zke(e,n){return gt(I1.count(ds(e)-1,e),n,2)}function Qke(e,n){return gt(e.getFullYear()%100,n,2)}function Jke(e,n){return e=zV(e),gt(e.getFullYear()%100,n,2)}function e_e(e,n){return gt(e.getFullYear()%1e4,n,4)}function n_e(e,n){var t=e.getDay();return e=t>=4||t===0?bf(e):bf.ceil(e),gt(e.getFullYear()%1e4,n,4)}function t_e(e){var n=e.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+gt(n/60|0,"0",2)+gt(n%60,"0",2)}function KP(e,n){return gt(e.getUTCDate(),n,2)}function i_e(e,n){return gt(e.getUTCHours(),n,2)}function r_e(e,n){return gt(e.getUTCHours()%12||12,n,2)}function a_e(e,n){return gt(1+J0.count(hs(e),e),n,3)}function LV(e,n){return gt(e.getUTCMilliseconds(),n,3)}function o_e(e,n){return LV(e,n)+"000"}function s_e(e,n){return gt(e.getUTCMonth()+1,n,2)}function l_e(e,n){return gt(e.getUTCMinutes(),n,2)}function u_e(e,n){return gt(e.getUTCSeconds(),n,2)}function c_e(e){var n=e.getUTCDay();return n===0?7:n}function f_e(e,n){return gt(nb.count(hs(e)-1,e),n,2)}function IV(e){var n=e.getUTCDay();return n>=4||n===0?wf(e):wf.ceil(e)}function d_e(e,n){return e=IV(e),gt(wf.count(hs(e),e)+(hs(e).getUTCDay()===4),n,2)}function h_e(e){return e.getUTCDay()}function m_e(e,n){return gt(B1.count(hs(e)-1,e),n,2)}function p_e(e,n){return gt(e.getUTCFullYear()%100,n,2)}function v_e(e,n){return e=IV(e),gt(e.getUTCFullYear()%100,n,2)}function g_e(e,n){return gt(e.getUTCFullYear()%1e4,n,4)}function y_e(e,n){var t=e.getUTCDay();return e=t>=4||t===0?wf(e):wf.ceil(e),gt(e.getUTCFullYear()%1e4,n,4)}function b_e(){return"+0000"}function XP(){return"%"}function ZP(e){return+e}function QP(e){return Math.floor(+e/1e3)}var Ic,BV,FV;w_e({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 w_e(e){return Ic=wke(e),BV=Ic.format,Ic.parse,FV=Ic.utcFormat,Ic.utcParse,Ic}function k_e(e){return new Date(e)}function __e(e){return e instanceof Date?+e:+new Date(+e)}function Hj(e,n,t,i,r,a,o,l,u,f){var h=Tj(),d=h.invert,p=h.domain,g=f(".%L"),b=f(":%S"),w=f("%I:%M"),k=f("%I %p"),_=f("%a %d"),S=f("%b %d"),j=f("%B"),T=f("%Y");function A(O){return(u(O)n(r/(e.length-1)))},t.quantiles=function(i){return Array.from({length:i+1},(r,a)=>fwe(e,a/i))},t.copy=function(){return VV(n).domain(e)},Ss.apply(t,arguments)}function ib(){var e=0,n=.5,t=1,i=1,r,a,o,l,u,f=sr,h,d=!1,p;function g(w){return isNaN(w=+w)?p:(w=.5+((w=+h(w))-a)*(i*wt}return L3=e,L3}var I3,tN;function O_e(){if(tN)return I3;tN=1;var e=KV(),n=A_e(),t=fd();function i(r){return r&&r.length?e(r,t,n):void 0}return I3=i,I3}var T_e=O_e();const cl=yt(T_e);var B3,iN;function E_e(){if(iN)return B3;iN=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};un.decimalPlaces=un.dp=function(){var e=this,n=e.d.length-1,t=(n-e.e)*Wt;if(n=e.d[n],n)for(;n%10==0;n/=10)t--;return t<0?0:t};un.dividedBy=un.div=function(e){return as(this,new this.constructor(e))};un.dividedToIntegerBy=un.idiv=function(e){var n=this,t=n.constructor;return Nt(as(n,new t(e),0,1),t.precision)};un.equals=un.eq=function(e){return!this.cmp(e)};un.exponent=function(){return wi(this)};un.greaterThan=un.gt=function(e){return this.cmp(e)>0};un.greaterThanOrEqualTo=un.gte=function(e){return this.cmp(e)>=0};un.isInteger=un.isint=function(){return this.e>this.d.length-2};un.isNegative=un.isneg=function(){return this.s<0};un.isPositive=un.ispos=function(){return this.s>0};un.isZero=function(){return this.s===0};un.lessThan=un.lt=function(e){return this.cmp(e)<0};un.lessThanOrEqualTo=un.lte=function(e){return this.cmp(e)<1};un.logarithm=un.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(Vr))throw Error(_a+"NaN");if(t.s<1)throw Error(_a+(t.s?"NaN":"-Infinity"));return t.eq(Vr)?new i(0):(Jt=!1,n=as(Nm(t,a),Nm(e,a),a),Jt=!0,Nt(n,r))};un.minus=un.sub=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?JV(n,e):ZV(n,(e.s=-e.s,e))};un.modulo=un.mod=function(e){var n,t=this,i=t.constructor,r=i.precision;if(e=new i(e),!e.s)throw Error(_a+"NaN");return t.s?(Jt=!1,n=as(t,e,0,1).times(e),Jt=!0,t.minus(n)):Nt(new i(t),r)};un.naturalExponential=un.exp=function(){return QV(this)};un.naturalLogarithm=un.ln=function(){return Nm(this)};un.negated=un.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};un.plus=un.add=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?ZV(n,e):JV(n,(e.s=-e.s,e))};un.precision=un.sd=function(e){var n,t,i,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Au+e);if(n=wi(r)+1,i=r.d.length-1,t=i*Wt+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};un.squareRoot=un.sqrt=function(){var e,n,t,i,r,a,o,l=this,u=l.constructor;if(l.s<1){if(!l.s)return new u(0);throw Error(_a+"NaN")}for(e=wi(l),Jt=!1,r=Math.sqrt(+l),r==0||r==1/0?(n=io(l.d),(n.length+e)%2==0&&(n+="0"),r=Math.sqrt(n),e=md((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 u(n)):i=new u(r.toString()),t=u.precision,r=o=t+3;;)if(a=i,i=a.plus(as(l,a,o+2)).times(.5),io(a.d).slice(0,o)===(n=io(i.d)).slice(0,o)){if(n=n.slice(o-3,o+1),r==o&&n=="4999"){if(Nt(a,t+1,0),a.times(a).eq(l)){i=a;break}}else if(n!="9999")break;o+=4}return Jt=!0,Nt(i,t)};un.times=un.mul=function(e){var n,t,i,r,a,o,l,u,f,h=this,d=h.constructor,p=h.d,g=(e=new d(e)).d;if(!h.s||!e.s)return new d(0);for(e.s*=h.s,t=h.e+e.e,u=p.length,f=g.length,u=0;){for(n=0,r=u+i;r>i;)l=a[r]+g[i]*p[r-i-1]+n,a[r--]=l%Di|0,n=l/Di|0;a[r]=(a[r]+n)%Di|0}for(;!a[--o];)a.pop();return n?++t:a.shift(),e.d=a,e.e=t,Jt?Nt(e,d.precision):e};un.toDecimalPlaces=un.todp=function(e,n){var t=this,i=t.constructor;return t=new i(t),e===void 0?t:(go(e,0,hd),n===void 0?n=i.rounding:go(n,0,8),Nt(t,e+wi(t)+1,n))};un.toExponential=function(e,n){var t,i=this,r=i.constructor;return e===void 0?t=zu(i,!0):(go(e,0,hd),n===void 0?n=r.rounding:go(n,0,8),i=Nt(new r(i),e+1,n),t=zu(i,!0,e+1)),t};un.toFixed=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?zu(r):(go(e,0,hd),n===void 0?n=a.rounding:go(n,0,8),i=Nt(new a(r),e+wi(r)+1,n),t=zu(i.abs(),!1,e+wi(i)+1),r.isneg()&&!r.isZero()?"-"+t:t)};un.toInteger=un.toint=function(){var e=this,n=e.constructor;return Nt(new n(e),wi(e)+1,n.rounding)};un.toNumber=function(){return+this};un.toPower=un.pow=function(e){var n,t,i,r,a,o,l=this,u=l.constructor,f=12,h=+(e=new u(e));if(!e.s)return new u(Vr);if(l=new u(l),!l.s){if(e.s<1)throw Error(_a+"Infinity");return l}if(l.eq(Vr))return l;if(i=u.precision,e.eq(Vr))return Nt(l,i);if(n=e.e,t=e.d.length-1,o=n>=t,a=l.s,o){if((t=h<0?-h:h)<=XV){for(r=new u(Vr),n=Math.ceil(i/Wt+4),Jt=!1;t%2&&(r=r.times(l),uN(r.d,n)),t=md(t/2),t!==0;)l=l.times(l),uN(l.d,n);return Jt=!0,e.s<0?new u(Vr).div(r):Nt(r,i)}}else if(a<0)throw Error(_a+"NaN");return a=a<0&&e.d[Math.max(n,t)]&1?-1:1,l.s=1,Jt=!1,r=e.times(Nm(l,i+f)),Jt=!0,r=QV(r),r.s=a,r};un.toPrecision=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?(t=wi(r),i=zu(r,t<=a.toExpNeg||t>=a.toExpPos)):(go(e,1,hd),n===void 0?n=a.rounding:go(n,0,8),r=Nt(new a(r),e,n),t=wi(r),i=zu(r,e<=t||t<=a.toExpNeg,e)),i};un.toSignificantDigits=un.tosd=function(e,n){var t=this,i=t.constructor;return e===void 0?(e=i.precision,n=i.rounding):(go(e,1,hd),n===void 0?n=i.rounding:go(n,0,8)),Nt(new i(t),e,n)};un.toString=un.valueOf=un.val=un.toJSON=un[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,n=wi(e),t=e.constructor;return zu(e,n<=t.toExpNeg||n>=t.toExpPos)};function ZV(e,n){var t,i,r,a,o,l,u,f,h=e.constructor,d=h.precision;if(!e.s||!n.s)return n.s||(n=new h(e)),Jt?Nt(n,d):n;if(u=e.d,f=n.d,o=e.e,r=n.e,u=u.slice(),a=o-r,a){for(a<0?(i=u,a=-a,l=f.length):(i=f,r=o,l=u.length),o=Math.ceil(d/Wt),l=o>l?o+1:l+1,a>l&&(a=l,i.length=1),i.reverse();a--;)i.push(0);i.reverse()}for(l=u.length,a=f.length,l-a<0&&(a=l,i=f,f=u,u=i),t=0;a;)t=(u[--a]=u[a]+f[a]+t)/Di|0,u[a]%=Di;for(t&&(u.unshift(t),++r),l=u.length;u[--l]==0;)u.pop();return n.d=u,n.e=r,Jt?Nt(n,d):n}function go(e,n,t){if(e!==~~e||et)throw Error(Au+e)}function io(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=u=0;lr[l]?1:-1;break}return u}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,u,f,h,d,p,g,b,w,k,_,S,j,T,A,O,M,$,q=i.constructor,P=i.s==r.s?1:-1,L=i.d,U=r.d;if(!i.s)return new q(i);if(!r.s)throw Error(_a+"Division by zero");for(u=i.e-r.e,M=U.length,A=L.length,g=new q(P),b=g.d=[],f=0;U[f]==(L[f]||0);)++f;if(U[f]>(L[f]||0)&&--u,a==null?S=a=q.precision:o?S=a+(wi(i)-wi(r))+1:S=a,S<0)return new q(0);if(S=S/Wt+2|0,f=0,M==1)for(h=0,U=U[0],S++;(f1&&(U=e(U,h),L=e(L,h),M=U.length,A=L.length),T=M,w=L.slice(0,M),k=w.length;k=Di/2&&++O;do h=0,l=n(U,w,M,k),l<0?(_=w[0],M!=k&&(_=_*Di+(w[1]||0)),h=_/O|0,h>1?(h>=Di&&(h=Di-1),d=e(U,h),p=d.length,k=w.length,l=n(d,w,p,k),l==1&&(h--,t(d,M16)throw Error(Wj+wi(e));if(!e.s)return new h(Vr);for(Jt=!1,l=d,o=new h(.03125);e.abs().gte(.1);)e=e.times(o),f+=5;for(i=Math.log(pu(2,f))/Math.LN10*2+5|0,l+=i,t=r=a=new h(Vr),h.precision=l;;){if(r=Nt(r.times(e),l),t=t.times(++u),o=a.plus(as(r,t,l)),io(o.d).slice(0,l)===io(a.d).slice(0,l)){for(;f--;)a=Nt(a.times(a),l);return h.precision=d,n==null?(Jt=!0,Nt(a,d)):a}a=o}}function wi(e){for(var n=e.e*Wt,t=e.d[0];t>=10;t/=10)n++;return n}function V3(e,n,t){if(n>e.LN10.sd())throw Jt=!0,t&&(e.precision=t),Error(_a+"LN10 precision limit exceeded");return Nt(new e(e.LN10),n)}function rl(e){for(var n="";e--;)n+="0";return n}function Nm(e,n){var t,i,r,a,o,l,u,f,h,d=1,p=10,g=e,b=g.d,w=g.constructor,k=w.precision;if(g.s<1)throw Error(_a+(g.s?"NaN":"-Infinity"));if(g.eq(Vr))return new w(0);if(n==null?(Jt=!1,f=k):f=n,g.eq(10))return n==null&&(Jt=!0),V3(w,f);if(f+=p,w.precision=f,t=io(b),i=t.charAt(0),a=wi(g),Math.abs(a)<15e14){for(;i<7&&i!=1||i==1&&t.charAt(1)>3;)g=g.times(e),t=io(g.d),i=t.charAt(0),d++;a=wi(g),i>1?(g=new w("0."+t),a++):g=new w(i+"."+t.slice(1))}else return u=V3(w,f+2,k).times(a+""),g=Nm(new w(i+"."+t.slice(1)),f-p).plus(u),w.precision=k,n==null?(Jt=!0,Nt(g,k)):g;for(l=o=g=as(g.minus(Vr),g.plus(Vr),f),h=Nt(g.times(g),f),r=3;;){if(o=Nt(o.times(h),f),u=l.plus(as(o,new w(r),f)),io(u.d).slice(0,f)===io(l.d).slice(0,f))return l=l.times(2),a!==0&&(l=l.plus(V3(w,f+2,k).times(a+""))),l=as(l,new w(d),f),w.precision=k,n==null?(Jt=!0,Nt(l,k)):l;l=u,r+=2}}function lN(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=md(t/Wt),e.d=[],i=(t+1)%Wt,t<0&&(i+=Wt),iF1||e.e<-F1))throw Error(Wj+t)}else e.s=0,e.e=0,e.d=[0];return e}function Nt(e,n,t){var i,r,a,o,l,u,f,h,d=e.d;for(o=1,a=d[0];a>=10;a/=10)o++;if(i=n-o,i<0)i+=Wt,r=n,f=d[h=0];else{if(h=Math.ceil((i+1)/Wt),a=d.length,h>=a)return e;for(f=a=d[h],o=1;a>=10;a/=10)o++;i%=Wt,r=i-Wt+o}if(t!==void 0&&(a=pu(10,o-r-1),l=f/a%10|0,u=n<0||d[h+1]!==void 0||f%a,u=t<4?(l||u)&&(t==0||t==(e.s<0?3:2)):l>5||l==5&&(t==4||u||t==6&&(i>0?r>0?f/pu(10,o-r):0:d[h-1])%10&1||t==(e.s<0?8:7))),n<1||!d[0])return u?(a=wi(e),d.length=1,n=n-a-1,d[0]=pu(10,(Wt-n%Wt)%Wt),e.e=md(-n/Wt)||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=pu(10,Wt-i),d[h]=r>0?(f/pu(10,o-r)%pu(10,r)|0)*a:0),u)for(;;)if(h==0){(d[0]+=a)==Di&&(d[0]=1,++e.e);break}else{if(d[h]+=a,d[h]!=Di)break;d[h--]=0,a=1}for(i=d.length;d[--i]===0;)d.pop();if(Jt&&(e.e>F1||e.e<-F1))throw Error(Wj+wi(e));return e}function JV(e,n){var t,i,r,a,o,l,u,f,h,d,p=e.constructor,g=p.precision;if(!e.s||!n.s)return n.s?n.s=-n.s:n=new p(e),Jt?Nt(n,g):n;if(u=e.d,d=n.d,i=n.e,f=e.e,u=u.slice(),o=f-i,o){for(h=o<0,h?(t=u,o=-o,l=d.length):(t=d,i=f,l=u.length),r=Math.max(Math.ceil(g/Wt),l)+2,o>r&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for(r=u.length,l=d.length,h=r0;--r)u[l++]=0;for(r=d.length;r>o;){if(u[--r]0?a=a.charAt(0)+"."+a.slice(1)+rl(i):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(r<0?"e":"e+")+r):r<0?(a="0."+rl(-r-1)+a,t&&(i=t-o)>0&&(a+=rl(i))):r>=o?(a+=rl(r+1-o),t&&(i=t-r-1)>0&&(a=a+"."+rl(i))):((i=r+1)0&&(r+1===o&&(a+="."),a+=rl(i))),e.s<0?"-"+a:a}function uN(e,n){if(e.length>n)return e.length=n,!0}function eW(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(Au+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 lN(o,a.toString())}else if(typeof a!="string")throw Error(Au+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,B_e.test(a))lN(o,a);else throw Error(Au+a)}if(r.prototype=un,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=eW,r.config=r.set=F_e,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(Au+t+": "+i);if((i=e[t="LN10"])!==void 0)if(i==Math.LN10)this[t]=new this(i);else throw Error(Au+t+": "+i);return this}var Gj=eW(I_e);Vr=new Gj(1);const Ot=Gj;function q_e(e){return W_e(e)||V_e(e)||U_e(e)||H_e()}function H_e(){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 U_e(e,n){if(e){if(typeof e=="string")return K4(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 K4(e,n)}}function V_e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function W_e(e){if(Array.isArray(e))return K4(e)}function K4(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,cN(function(){for(var l=arguments.length,u=new Array(l),f=0;fe.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(u){r=!0,a=u}finally{try{!i&&o.return!=null&&o.return()}finally{if(r)throw a}}return t}}function s2e(e){if(Array.isArray(e))return e}function aW(e){var n=$m(e,2),t=n[0],i=n[1],r=t,a=i;return t>i&&(r=i,a=t),[r,a]}function oW(e,n,t){if(e.lte(0))return new Ot(0);var i=ob.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),u=l.mul(r);return n?u:new Ot(Math.ceil(u))}function l2e(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(ob.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=X_e(K_e(function(u){return r.add(new Ot(u-o).mul(i)).toNumber()}),X4);return l(0,n)}function sW(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=oW(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()),u=Math.ceil(new Ot(n).sub(o).div(a).toNumber()),f=l+u+1;return f>t?sW(e,n,t,i,r+1):(f0?u+(t-f):u,l=n>0?l:l+(t-f)),{step:a,tickMin:o.sub(new Ot(l).mul(a)),tickMax:o.add(new Ot(u).mul(a))})}function u2e(e){var n=$m(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=aW([t,i]),u=$m(l,2),f=u[0],h=u[1];if(f===-1/0||h===1/0){var d=h===1/0?[f].concat(Q4(X4(0,r-1).map(function(){return 1/0}))):[].concat(Q4(X4(0,r-1).map(function(){return-1/0})),[h]);return t>i?Z4(d):d}if(f===h)return l2e(f,r,a);var p=sW(f,h,o,a),g=p.step,b=p.tickMin,w=p.tickMax,k=ob.rangeStep(b,w.add(new Ot(.1).mul(g)),g);return t>i?Z4(k):k}function c2e(e,n){var t=$m(e,2),i=t[0],r=t[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=aW([i,r]),l=$m(o,2),u=l[0],f=l[1];if(u===-1/0||f===1/0)return[i,r];if(u===f)return[u];var h=Math.max(n,2),d=oW(new Ot(f).sub(u).div(h-1),a,0),p=[].concat(Q4(ob.rangeStep(new Ot(u),new Ot(f).sub(new Ot(.99).mul(d)),d)),[f]);return i>r?Z4(p):p}var f2e=iW(u2e),d2e=iW(c2e),h2e="Invariant failed";function Lu(e,n){throw new Error(h2e)}var m2e=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function _f(e){"@babel/helpers - typeof";return _f=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},_f(e)}function q1(){return q1=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 k2e(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 _2e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function x2e(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 u=a.range,f=0;f0?r[f-1].coordinate:r[l-1].coordinate,d=r[f].coordinate,p=f>=l-1?r[0].coordinate:r[f+1].coordinate,g=void 0;if(Fa(d-h)!==Fa(p-d)){var b=[];if(Fa(p-d)===Fa(u[1]-u[0])){g=p;var w=d+u[1]-u[0];b[0]=Math.min(w,(w+h)/2),b[1]=Math.max(w,(w+h)/2)}else{g=h;var k=p+u[1]-u[0];b[0]=Math.min(d,(k+d)/2),b[1]=Math.max(d,(k+d)/2)}var _=[Math.min(d,(g+d)/2),Math.max(d,(g+d)/2)];if(n>_[0]&&n<=_[1]||n>=b[0]&&n<=b[1]){o=r[f].index;break}}else{var S=Math.min(h,p),j=Math.max(h,p);if(n>(S+d)/2&&n<=(j+d)/2){o=r[f].index;break}}}else for(var T=0;T0&&T(i[T].coordinate+i[T-1].coordinate)/2&&n<=(i[T].coordinate+i[T+1].coordinate)/2||T===l-1&&n>(i[T].coordinate+i[T-1].coordinate)/2){o=i[T].index;break}return o},Yj=function(n){var t,i=n,r=i.type.displayName,a=(t=n.type)!==null&&t!==void 0&&t.defaultProps?ii(ii({},n.type.defaultProps),n.props):n.props,o=a.stroke,l=a.fill,u;switch(r){case"Line":u=o;break;case"Area":case"Radar":u=o&&o!=="none"?o:l;break;default:u=l;break}return u},B2e=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),u=0,f=l.length;u=0});if(_&&_.length){var S=_[0].type.defaultProps,j=S!==void 0?ii(ii({},S),_[0].props):_[0].props,T=j.barSize,A=j[k];o[A]||(o[A]=[]);var O=Zn(T)?t:T;o[A].push({item:_[0],stackList:_.slice(1),barSize:Zn(O)?void 0:$u(O,i,0)})}}return o},F2e=function(n){var t=n.barGap,i=n.barCategoryGap,r=n.bandSize,a=n.sizeList,o=a===void 0?[]:a,l=n.maxBarSize,u=o.length;if(u<1)return null;var f=$u(t,r,0,!0),h,d=[];if(o[0].barSize===+o[0].barSize){var p=!1,g=r/u,b=o.reduce(function(T,A){return T+A.barSize||0},0);b+=(u-1)*f,b>=r&&(b-=(u-1)*f,f=0),b>=r&&g>0&&(p=!0,g*=.9,b=u*g);var w=(r-b)/2>>0,k={offset:w-f,size:0};h=o.reduce(function(T,A){var O={item:A.item,position:{offset:k.offset+k.size+f,size:p?g:A.barSize}},M=[].concat(hN(T),[O]);return k=M[M.length-1].position,A.stackList&&A.stackList.length&&A.stackList.forEach(function($){M.push({item:$,position:k})}),M},d)}else{var _=$u(i,r,0,!0);r-2*_-(u-1)*f<=0&&(f=0);var S=(r-2*_-(u-1)*f)/u;S>1&&(S>>=0);var j=l===+l?Math.min(S,l):S;h=o.reduce(function(T,A,O){var M=[].concat(hN(T),[{item:A.item,position:{offset:_+(S+f)*O+(S-j)/2,size:j}}]);return A.stackList&&A.stackList.length&&A.stackList.forEach(function($){M.push({item:$,position:M[M.length-1].position})}),M},d)}return h},q2e=function(n,t,i,r){var a=i.children,o=i.width,l=i.margin,u=o-(l.left||0)-(l.right||0),f=fW({children:a,legendWidth:u});if(f){var h=r||{},d=h.width,p=h.height,g=f.align,b=f.verticalAlign,w=f.layout;if((w==="vertical"||w==="horizontal"&&b==="middle")&&g!=="center"&&Ge(n[g]))return ii(ii({},n),{},tf({},g,n[g]+(d||0)));if((w==="horizontal"||w==="vertical"&&g==="center")&&b!=="middle"&&Ge(n[b]))return ii(ii({},n),{},tf({},b,n[b]+(p||0)))}return n},H2e=function(n,t,i){return Zn(t)?!0:n==="horizontal"?t==="yAxis":n==="vertical"||i==="x"?t==="xAxis":i==="y"?t==="yAxis":!0},dW=function(n,t,i,r,a){var o=t.props.children,l=wa(o,zp).filter(function(f){return H2e(r,a,f.props.direction)});if(l&&l.length){var u=l.map(function(f){return f.props.dataKey});return n.reduce(function(f,h){var d=cr(h,i);if(Zn(d))return f;var p=Array.isArray(d)?[rb(d),cl(d)]:[d,d],g=u.reduce(function(b,w){var k=cr(h,w,0),_=p[0]-Math.abs(Array.isArray(k)?k[0]:k),S=p[1]+Math.abs(Array.isArray(k)?k[1]:k);return[Math.min(_,b[0]),Math.max(S,b[1])]},[1/0,-1/0]);return[Math.min(g[0],f[0]),Math.max(g[1],f[1])]},[1/0,-1/0])}return null},U2e=function(n,t,i,r,a){var o=t.map(function(l){return dW(n,l,i,a,r)}).filter(function(l){return!Zn(l)});return o&&o.length?o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]):null},hW=function(n,t,i,r,a){var o=t.map(function(u){var f=u.props.dataKey;return i==="number"&&f&&dW(n,u,f,r)||rm(n,f,i,a)});if(i==="number")return o.reduce(function(u,f){return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);var l={};return o.reduce(function(u,f){for(var h=0,d=f.length;h=2?Fa(l[0]-l[1])*2*f:f,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)+f,value:d,offset:f}});return h.filter(function(d){return!ud(d.coordinate)})}return n.isCategorical&&n.categoricalDomain?n.categoricalDomain.map(function(d,p){return{coordinate:r(d)+f,value:d,index:p,offset:f}}):r.ticks&&!i?r.ticks(n.tickCount).map(function(d){return{coordinate:r(d)+f,value:d,offset:f}}):r.domain().map(function(d,p){return{coordinate:r(d)+f,value:a?a[d]:d,index:p,offset:f}})},W3=new WeakMap,wg=function(n,t){if(typeof t!="function")return n;W3.has(n)||W3.set(n,new WeakMap);var i=W3.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},V2e=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:Em(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:z1(),realScaleType:"linear"}:a==="category"&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!i)?{scale:im(),realScaleType:"point"}:a==="category"?{scale:Em(),realScaleType:"band"}:{scale:z1(),realScaleType:"linear"};if(Nu(r)){var u="scale".concat(V0(r));return{scale:(JP[u]||im)(),realScaleType:JP[u]?u:"point"}}return Fn(r)?{scale:r}:{scale:im(),realScaleType:"point"}},pN=1e-4,W2e=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])-pN,o=Math.max(r[0],r[1])+pN,l=n(t[0]),u=n(t[i-1]);(lo||uo)&&n.domain([t[0],t[i-1]])}},G2e=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+u,a=n[l][i][1]):(n[l][i][0]=o,n[l][i][1]=o+u,o=n[l][i][1])}},X2e=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)}},Z2e={sign:K2e,expand:P1e,none:hf,silhouette:N1e,wiggle:$1e,positive:X2e},Q2e=function(n,t,i){var r=t.map(function(l){return l.props.dataKey}),a=Z2e[i],o=R1e().keys(r).value(function(l,u){return+cr(l,u,0)}).order(M4).offset(a);return o(n)},J2e=function(n,t,i,r,a,o){if(!n)return null;var l=o?t.reverse():t,u={},f=l.reduce(function(d,p){var g,b=(g=p.type)!==null&&g!==void 0&&g.defaultProps?ii(ii({},p.type.defaultProps),p.props):p.props,w=b.stackId,k=b.hide;if(k)return d;var _=b[i],S=d[_]||{hasStack:!1,stackGroups:{}};if(ji(w)){var j=S.stackGroups[w]||{numericAxisId:i,cateAxisId:r,items:[]};j.items.push(p),S.hasStack=!0,S.stackGroups[w]=j}else S.stackGroups[cd("_stackId_")]={numericAxisId:i,cateAxisId:r,items:[p]};return ii(ii({},d),{},tf({},_,S))},u),h={};return Object.keys(f).reduce(function(d,p){var g=f[p];if(g.hasStack){var b={};g.stackGroups=Object.keys(g.stackGroups).reduce(function(w,k){var _=g.stackGroups[k];return ii(ii({},w),{},tf({},k,{numericAxisId:i,cateAxisId:r,items:_.items,stackedData:Q2e(n,_.items,a)}))},b)}return ii(ii({},d),{},tf({},p,g))},h)},exe=function(n,t){var i=t.realScaleType,r=t.type,a=t.tickCount,o=t.originalDomain,l=t.allowDecimals,u=i||t.scale;if(u!=="auto"&&u!=="linear")return null;if(a&&r==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var f=n.domain();if(!f.length)return null;var h=f2e(f,a,l);return n.domain([rb(h),cl(h)]),{niceTicks:h}}if(a&&r==="number"){var d=n.domain(),p=d2e(d,a,l);return{niceTicks:p}}return null};function U1(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&&!Zn(r[n.dataKey])){var l=v1(t,"value",r[n.dataKey]);if(l)return l.coordinate+i/2}return t[a]?t[a].coordinate+i/2:null}var u=cr(r,Zn(o)?n.dataKey:o);return Zn(u)?null:n.scale(u)}var vN=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 u=cr(o,t.dataKey,t.domain[l]);return Zn(u)?null:t.scale(u)-a/2+r},nxe=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]},txe=function(n,t){var i,r=(i=n.type)!==null&&i!==void 0&&i.defaultProps?ii(ii({},n.type.defaultProps),n.props):n.props,a=r.stackId;if(ji(a)){var o=t[a];if(o){var l=o.items.indexOf(n);return l>=0?o.stackedData[l]:null}}return null},ixe=function(n){return n.reduce(function(t,i){return[rb(i.concat([t[0]]).filter(Ge)),cl(i.concat([t[1]]).filter(Ge))]},[1/0,-1/0])},vW=function(n,t,i){return Object.keys(n).reduce(function(r,a){var o=n[a],l=o.stackedData,u=l.reduce(function(f,h){var d=ixe(h.slice(t,i+1));return[Math.min(f[0],d[0]),Math.max(f[1],d[1])]},[1/0,-1/0]);return[Math.min(u[0],r[0]),Math.max(u[1],r[1])]},[1/0,-1/0]).map(function(r){return r===1/0||r===-1/0?0:r})},gN=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,yN=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,t6=function(n,t,i){if(Fn(n))return n(t,i);if(!Array.isArray(n))return t;var r=[];if(Ge(n[0]))r[0]=i?n[0]:Math.min(n[0],t[0]);else if(gN.test(n[0])){var a=+gN.exec(n[0])[1];r[0]=t[0]-a}else Fn(n[0])?r[0]=n[0](t[0]):r[0]=t[0];if(Ge(n[1]))r[1]=i?n[1]:Math.max(n[1],t[1]);else if(yN.test(n[1])){var o=+yN.exec(n[1])[1];r[1]=t[1]+o}else Fn(n[1])?r[1]=n[1](t[1]):r[1]=t[1];return r},V1=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=kj(t,function(d){return d.coordinate}),o=1/0,l=1,u=a.length;lo&&(f=2*Math.PI-f),{radius:l,angle:sxe(f),angleInRadian:f}},cxe=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}},fxe=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},_N=function(n,t){var i=n.x,r=n.y,a=uxe({x:i,y:r},t),o=a.radius,l=a.angle,u=t.innerRadius,f=t.outerRadius;if(of)return!1;if(o===0)return!0;var h=cxe(t),d=h.startAngle,p=h.endAngle,g=l,b;if(d<=p){for(;g>p;)g-=360;for(;g=d&&g<=p}else{for(;g>d;)g-=360;for(;g=p&&g<=d}return b?kN(kN({},t),{},{radius:o,angle:fxe(g,t)}):null};function Bm(e){"@babel/helpers - typeof";return Bm=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},Bm(e)}var dxe=["offset"];function hxe(e){return gxe(e)||vxe(e)||pxe(e)||mxe()}function mxe(){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 pxe(e,n){if(e){if(typeof e=="string")return i6(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 i6(e,n)}}function vxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gxe(e){if(Array.isArray(e))return i6(e)}function i6(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 bxe(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 xN(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 Si(e){for(var n=1;n=0?1:-1,j,T;r==="insideStart"?(j=g+S*o,T=w):r==="insideEnd"?(j=b-S*o,T=!w):r==="end"&&(j=b+S*o,T=w),T=_<=0?T:!T;var A=Vi(f,h,k,j),O=Vi(f,h,k,j+(T?1:-1)*359),M="M".concat(A.x,",").concat(A.y,` + height and width.`,R,D,o,u,h,d,t);var z=!Array.isArray(g)&&ts(g.type).endsWith("Chart");return J.Children.map(g,function(H){return J.isValidElement(H)?x.cloneElement(H,pg({width:R,height:D},z?{style:pg({height:"100%",width:"100%",maxHeight:D,maxWidth:R},H.props.style)}:{})):H})},[t,g,u,p,d,h,q,o]);return J.createElement("div",{id:k?"".concat(k):void 0,className:vn("recharts-responsive-container",_),style:pg(pg({},T),{},{width:o,height:u,minWidth:h,minHeight:d,maxHeight:p}),ref:A},U)}),hV=function(n){return null};hV.displayName="Cell";function Om(e){"@babel/helpers - typeof";return Om=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},Om(e)}function rP(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 B4(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:{};if(n==null||Ku.isSsr)return{width:0,height:0};var i=Tbe(t),r=JSON.stringify({text:n,copyStyle:i});if(Lc.widthCache[r])return Lc.widthCache[r];try{var a=document.getElementById(aP);a||(a=document.createElement("span"),a.setAttribute("id",aP),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=B4(B4({},Obe),i);Object.assign(a.style,o),a.textContent="".concat(n);var l=a.getBoundingClientRect(),u={width:l.width,height:l.height};return Lc.widthCache[r]=u,++Lc.cacheCount>Abe&&(Lc.cacheCount=0,Lc.widthCache={}),u}catch{return{width:0,height:0}}},Ebe=function(n){return{top:n.top+window.scrollY-document.documentElement.clientTop,left:n.left+window.scrollX-document.documentElement.clientLeft}};function Tm(e){"@babel/helpers - typeof";return Tm=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},Tm(e)}function O1(e,n){return Pbe(e)||Rbe(e,n)||Dbe(e,n)||Mbe()}function Mbe(){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 Dbe(e,n){if(e){if(typeof e=="string")return oP(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 oP(e,n)}}function oP(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 Ybe(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 dP(e,n){return Qbe(e)||Zbe(e,n)||Xbe(e,n)||Kbe()}function Kbe(){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 Xbe(e,n){if(e){if(typeof e=="string")return hP(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 hP(e,n)}}function hP(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 R.reduce(function(D,z){var H=z.word,Y=z.width,N=D[D.length-1];if(N&&(r==null||a||N.width+Y+iz.width?D:z})};if(!h)return g;for(var w="…",k=function(R){var D=d.slice(0,R),z=gV({breakAll:f,style:u,children:D+w}).wordsWithComputedWidth,H=p(z),Y=H.length>o||b(H).width>Number(r);return[Y,H]},_=0,S=d.length-1,j=0,T;_<=S&&j<=d.length-1;){var A=Math.floor((_+S)/2),O=A-1,M=k(O),$=dP(M,2),q=$[0],P=$[1],L=k(A),U=dP(L,1),G=U[0];if(!q&&!G&&(_=A+1),q&&G&&(S=A-1),!q&&G){T=P;break}j++}return T||g},mP=function(n){var t=Zn(n)?[]:n.toString().split(vV);return[{words:t}]},ewe=function(n){var t=n.width,i=n.scaleToFit,r=n.children,a=n.style,o=n.breakAll,l=n.maxLines;if((t||i)&&!Ku.isSsr){var u,f,h=gV({breakAll:o,children:r,style:a});if(h){var d=h.wordsWithComputedWidth,p=h.spaceWidth;u=d,f=p}else return mP(r);return Jbe({breakAll:o,children:r,maxLines:l,style:a},u,f,t,i)}return mP(r)},pP="#808080",T1=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,u=n.capHeight,f=u===void 0?"0.71em":u,h=n.scaleToFit,d=h===void 0?!1:h,p=n.textAnchor,g=p===void 0?"start":p,b=n.verticalAnchor,w=b===void 0?"end":b,k=n.fill,_=k===void 0?pP:k,S=fP(n,Wbe),j=x.useMemo(function(){return ewe({breakAll:S.breakAll,children:S.children,maxLines:S.maxLines,scaleToFit:d,style:S.style,width:S.width})},[S.breakAll,S.children,S.maxLines,d,S.style,S.width]),T=S.dx,A=S.dy,O=S.angle,M=S.className,$=S.breakAll,q=fP(S,Gbe);if(!ji(i)||!ji(a))return null;var P=i+(Ge(T)?T:0),L=a+(Ge(A)?A:0),U;switch(w){case"start":U=T3("calc(".concat(f,")"));break;case"middle":U=T3("calc(".concat((j.length-1)/2," * -").concat(l," + (").concat(f," / 2))"));break;default:U=T3("calc(".concat(j.length-1," * -").concat(l,")"));break}var G=[];if(d){var B=j[0].width,R=S.width;G.push("scale(".concat((Ge(R)?R/B:1)/B,")"))}return O&&G.push("rotate(".concat(O,", ").concat(P,", ").concat(L,")")),G.length&&(q.transform=G.join(" ")),J.createElement("text",F4({},Un(q,!0),{x:P,y:L,className:vn("recharts-text",M),textAnchor:g,fill:_.includes("url")?pP:_}),j.map(function(D,z){var H=D.words.join($?"":" ");return J.createElement("tspan",{x:P,dy:z===0?U:l,key:"".concat(H,"-").concat(z)},H)}))};function gl(e,n){return e==null||n==null?NaN:en?1:e>=n?0:NaN}function nwe(e,n){return e==null||n==null?NaN:ne?1:n>=e?0:NaN}function Sj(e){let n,t,i;e.length!==2?(n=gl,t=(l,u)=>gl(e(l),u),i=(l,u)=>e(l)-u):(n=e===gl||e===nwe?e:twe,t=e,i=e);function r(l,u,f=0,h=l.length){if(f>>1;t(l[d],u)<0?f=d+1:h=d}while(f>>1;t(l[d],u)<=0?f=d+1:h=d}while(ff&&i(l[d-1],u)>-i(l[d],u)?d-1:d}return{left:r,center:o,right:a}}function twe(){return 0}function yV(e){return e===null?NaN:+e}function*iwe(e,n){for(let t of e)t!=null&&(t=+t)>=t&&(yield t)}const rwe=Sj(gl),Rp=rwe.right;Sj(yV).center;class vP extends Map{constructor(n,t=swe){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(gP(this,n))}has(n){return super.has(gP(this,n))}set(n,t){return super.set(awe(this,n),t)}delete(n){return super.delete(owe(this,n))}}function gP({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):t}function awe({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):(e.set(i,t),t)}function owe({_intern:e,_key:n},t){const i=n(t);return e.has(i)&&(t=e.get(i),e.delete(i)),t}function swe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function lwe(e=gl){if(e===gl)return bV;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 bV(e,n){return(e==null||!(e>=e))-(n==null||!(n>=n))||(en?1:0)}const uwe=Math.sqrt(50),cwe=Math.sqrt(10),fwe=Math.sqrt(2);function E1(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>=uwe?10:a>=cwe?5:a>=fwe?2:1;let l,u,f;return r<0?(f=Math.pow(10,-r)/o,l=Math.round(e*f),u=Math.round(n*f),l/fn&&--u,f=-f):(f=Math.pow(10,r)*o,l=Math.round(e/f),u=Math.round(n/f),l*fn&&--u),u0))return[];if(e===n)return[e];const i=n=r))return[];const l=a-r+1,u=new Array(l);if(i)if(o<0)for(let f=0;f=i)&&(t=i);return t}function bP(e,n){let t;for(const i of e)i!=null&&(t>i||t===void 0&&i>=i)&&(t=i);return t}function wV(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?bV:lwe(r);i>t;){if(i-t>600){const u=i-t+1,f=n-t+1,h=Math.log(u),d=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*d*(u-d)/u)*(f-u/2<0?-1:1),g=Math.max(t,Math.floor(n-f*d/u+p)),b=Math.min(i,Math.floor(n+(u-f)*d/u+p));wV(e,n,g,b,r)}const a=e[n];let o=t,l=i;for(Ah(e,t,n),r(e[i],a)>0&&Ah(e,t,i);o0;)--l}r(e[t],a)===0?Ah(e,t,l):(++l,Ah(e,l,i)),l<=n&&(t=l+1),n<=l&&(i=l-1)}return e}function Ah(e,n,t){const i=e[n];e[n]=e[t],e[t]=i}function dwe(e,n,t){if(e=Float64Array.from(iwe(e)),!(!(i=e.length)||isNaN(n=+n))){if(n<=0||i<2)return bP(e);if(n>=1)return yP(e);var i,r=(i-1)*n,a=Math.floor(r),o=yP(wV(e,a).subarray(0,a+1)),l=bP(e.subarray(a+1));return o+(l-o)*(r-a)}}function hwe(e,n,t=yV){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 mwe(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?gg(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?gg(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=vwe.exec(e))?new Sr(n[1],n[2],n[3],1):(n=gwe.exec(e))?new Sr(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=ywe.exec(e))?gg(n[1],n[2],n[3],n[4]):(n=bwe.exec(e))?gg(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=wwe.exec(e))?jP(n[1],n[2]/100,n[3]/100,1):(n=kwe.exec(e))?jP(n[1],n[2]/100,n[3]/100,n[4]):wP.hasOwnProperty(e)?xP(wP[e]):e==="transparent"?new Sr(NaN,NaN,NaN,0):null}function xP(e){return new Sr(e>>16&255,e>>8&255,e&255,1)}function gg(e,n,t,i){return i<=0&&(e=n=t=NaN),new Sr(e,n,t,i)}function Swe(e){return e instanceof Pp||(e=Rm(e)),e?(e=e.rgb(),new Sr(e.r,e.g,e.b,e.opacity)):new Sr}function W4(e,n,t,i){return arguments.length===1?Swe(e):new Sr(e,n,t,i??1)}function Sr(e,n,t,i){this.r=+e,this.g=+n,this.b=+t,this.opacity=+i}jj(Sr,W4,_V(Pp,{brighter(e){return e=e==null?M1:Math.pow(M1,e),new Sr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Mm:Math.pow(Mm,e),new Sr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Sr(ju(this.r),ju(this.g),ju(this.b),D1(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:SP,formatHex:SP,formatHex8:Cwe,formatRgb:CP,toString:CP}));function SP(){return`#${ku(this.r)}${ku(this.g)}${ku(this.b)}`}function Cwe(){return`#${ku(this.r)}${ku(this.g)}${ku(this.b)}${ku((isNaN(this.opacity)?1:this.opacity)*255)}`}function CP(){const e=D1(this.opacity);return`${e===1?"rgb(":"rgba("}${ju(this.r)}, ${ju(this.g)}, ${ju(this.b)}${e===1?")":`, ${e})`}`}function D1(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ju(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ku(e){return e=ju(e),(e<16?"0":"")+e.toString(16)}function jP(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 xV(e){if(e instanceof La)return new La(e.h,e.s,e.l,e.opacity);if(e instanceof Pp||(e=Rm(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,u=(a+r)/2;return l?(n===a?o=(t-i)/l+(t0&&u<1?0:o,new La(o,l,u,e.opacity)}function jwe(e,n,t,i){return arguments.length===1?xV(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}jj(La,jwe,_V(Pp,{brighter(e){return e=e==null?M1:Math.pow(M1,e),new La(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Mm:Math.pow(Mm,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 Sr(E3(e>=240?e-240:e+120,r,i),E3(e,r,i),E3(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new La(AP(this.h),yg(this.s),yg(this.l),D1(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=D1(this.opacity);return`${e===1?"hsl(":"hsla("}${AP(this.h)}, ${yg(this.s)*100}%, ${yg(this.l)*100}%${e===1?")":`, ${e})`}`}}));function AP(e){return e=(e||0)%360,e<0?e+360:e}function yg(e){return Math.max(0,Math.min(1,e||0))}function E3(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 Aj=e=>()=>e;function Awe(e,n){return function(t){return e+t*n}}function Owe(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 Twe(e){return(e=+e)==1?SV:function(n,t){return t-n?Owe(n,t,e):Aj(isNaN(n)?t:n)}}function SV(e,n){var t=n-e;return t?Awe(e,t):Aj(isNaN(e)?n:e)}const OP=(function e(n){var t=Twe(n);function i(r,a){var o=t((r=W4(r)).r,(a=W4(a)).r),l=t(r.g,a.g),u=t(r.b,a.b),f=SV(r.opacity,a.opacity);return function(h){return r.r=o(h),r.g=l(h),r.b=u(h),r.opacity=f(h),r+""}}return i.gamma=e,i})(1);function Ewe(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,u.push({i:o,x:R1(i,r)})),t=M3.lastIndex;return tn&&(t=e,e=n,n=t),function(i){return Math.max(e,Math.min(n,i))}}function Fwe(e,n,t){var i=e[0],r=e[1],a=n[0],o=n[1];return r2?qwe:Fwe,u=f=null,d}function d(p){return p==null||isNaN(p=+p)?a:(u||(u=l(e.map(i),n,t)))(i(o(p)))}return d.invert=function(p){return o(r((f||(f=l(n,e.map(i),R1)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,P1),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=Oj,h()},d.clamp=function(p){return arguments.length?(o=p?!0:sr,h()):o!==sr},d.interpolate=function(p){return arguments.length?(t=p,h()):t},d.unknown=function(p){return arguments.length?(a=p,d):a},function(p,g){return i=p,r=g,h()}}function Tj(){return Q0()(sr,sr)}function Hwe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function N1(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 yf(e){return e=N1(Math.abs(e)),e?e[1]:NaN}function Uwe(e,n){return function(t,i){for(var r=t.length,a=[],o=0,l=e[0],u=0;r>0&&l>0&&(u+l+1>i&&(l=Math.max(1,i-u)),a.push(t.substring(r-=l,r+l)),!((u+=l+1)>i));)l=e[o=(o+1)%e.length];return a.reverse().join(n)}}function Vwe(e){return function(n){return n.replace(/[0-9]/g,function(t){return e[+t]})}}var Wwe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Pm(e){if(!(n=Wwe.exec(e)))throw new Error("invalid format: "+e);var n;return new Ej({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]})}Pm.prototype=Ej.prototype;function Ej(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+""}Ej.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 Gwe(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 $1;function Ywe(e,n){var t=N1(e,n);if(!t)return $1=void 0,e.toPrecision(n);var i=t[0],r=t[1],a=r-($1=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")+N1(e,Math.max(0,n+a-1))[0]}function EP(e,n){var t=N1(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 MP={"%":(e,n)=>(e*100).toFixed(n),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Hwe,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)=>EP(e*100,n),r:EP,s:Ywe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function DP(e){return e}var RP=Array.prototype.map,PP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Kwe(e){var n=e.grouping===void 0||e.thousands===void 0?DP:Uwe(RP.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?DP:Vwe(RP.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function f(d,p){d=Pm(d);var g=d.fill,b=d.align,w=d.sign,k=d.symbol,_=d.zero,S=d.width,j=d.comma,T=d.precision,A=d.trim,O=d.type;O==="n"?(j=!0,O="g"):MP[O]||(T===void 0&&(T=12),A=!0,O="g"),(_||g==="0"&&b==="=")&&(_=!0,g="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=MP[O],P=/[defgprs%]/.test(O);T=T===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,T)):Math.max(0,Math.min(20,T));function L(U){var G=M,B=$,R,D,z;if(O==="c")B=q(U)+B,U="";else{U=+U;var H=U<0||1/U<0;if(U=isNaN(U)?u:q(Math.abs(U),T),A&&(U=Gwe(U)),H&&+U==0&&w!=="+"&&(H=!1),G=(H?w==="("?w:l:w==="-"||w==="("?"":w)+G,B=(O==="s"&&!isNaN(U)&&$1!==void 0?PP[8+$1/3]:"")+B+(H&&w==="("?")":""),P){for(R=-1,D=U.length;++Rz||z>57){B=(z===46?r+U.slice(R+1):U.slice(R))+B,U=U.slice(0,R);break}}}j&&!_&&(U=n(U,1/0));var Y=G.length+U.length+B.length,N=Y>1)+G+U+B+N.slice(Y);break;default:U=N+G+U+B;break}return a(U)}return L.toString=function(){return d+""},L}function h(d,p){var g=Math.max(-8,Math.min(8,Math.floor(yf(p)/3)))*3,b=Math.pow(10,-g),w=f((d=Pm(d),d.type="f",d),{suffix:PP[8+g/3]});return function(k){return w(b*k)}}return{format:f,formatPrefix:h}}var bg,Mj,CV;Xwe({thousands:",",grouping:[3],currency:["$",""]});function Xwe(e){return bg=Kwe(e),Mj=bg.format,CV=bg.formatPrefix,bg}function Zwe(e){return Math.max(0,-yf(Math.abs(e)))}function Qwe(e,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(yf(n)/3)))*3-yf(Math.abs(e)))}function Jwe(e,n){return e=Math.abs(e),n=Math.abs(n)-e,Math.max(0,yf(n)-yf(e))+1}function jV(e,n,t,i){var r=U4(e,n,t),a;switch(i=Pm(i??",f"),i.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(n));return i.precision==null&&!isNaN(a=Qwe(r,o))&&(i.precision=a),CV(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(a=Jwe(r,Math.max(Math.abs(e),Math.abs(n))))&&(i.precision=a-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(a=Zwe(r))&&(i.precision=a-(i.type==="%")*2);break}}return Mj(i)}function $l(e){var n=e.domain;return e.ticks=function(t){var i=n();return q4(i[0],i[i.length-1],t??10)},e.tickFormat=function(t,i){var r=n();return jV(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],u,f,h=10;for(l0;){if(f=H4(o,l,t),f===u)return i[r]=o,i[a]=l,n(i);if(f>0)o=Math.floor(o/f)*f,l=Math.ceil(l/f)*f;else if(f<0)o=Math.ceil(o*f)/f,l=Math.floor(l*f)/f;else break;u=f}return e},e}function z1(){var e=Tj();return e.copy=function(){return Np(e,z1())},Oa.apply(e,arguments),$l(e)}function AV(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,P1),t):e.slice()},t.unknown=function(i){return arguments.length?(n=i,t):n},t.copy=function(){return AV(e).unknown(n)},e=arguments.length?Array.from(e,P1):[0,1],$l(t)}function OV(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 rke(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 zP(e){return(n,t)=>-e(-n,t)}function Dj(e){const n=e(NP,$P),t=n.domain;let i=10,r,a;function o(){return r=rke(i),a=ike(i),t()[0]<0?(r=zP(r),a=zP(a),e(eke,nke)):e(NP,$P),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 u=t();let f=u[0],h=u[u.length-1];const d=h0){for(;p<=g;++p)for(b=1;bh)break;_.push(w)}}else for(;p<=g;++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),u==null&&(u=i===10?"s":","),typeof u!="function"&&(!(i%1)&&(u=Pm(u)).precision==null&&(u.trim=!0),u=Mj(u)),l===1/0)return u;const f=Math.max(1,i*l/n.ticks().length);return h=>{let d=h/a(Math.round(r(h)));return d*it(OV(t(),{floor:l=>a(Math.floor(r(l))),ceil:l=>a(Math.ceil(r(l)))})),n}function TV(){const e=Dj(Q0()).domain([1,10]);return e.copy=()=>Np(e,TV()).base(e.base()),Oa.apply(e,arguments),e}function LP(e){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/e))}}function IP(e){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*e}}function Rj(e){var n=1,t=e(LP(n),IP(n));return t.constant=function(i){return arguments.length?e(LP(n=+i),IP(n)):n},$l(t)}function EV(){var e=Rj(Q0());return e.copy=function(){return Np(e,EV()).constant(e.constant())},Oa.apply(e,arguments)}function BP(e){return function(n){return n<0?-Math.pow(-n,e):Math.pow(n,e)}}function ake(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function oke(e){return e<0?-e*e:e*e}function Pj(e){var n=e(sr,sr),t=1;function i(){return t===1?e(sr,sr):t===.5?e(ake,oke):e(BP(t),BP(1/t))}return n.exponent=function(r){return arguments.length?(t=+r,i()):t},$l(n)}function Nj(){var e=Pj(Q0());return e.copy=function(){return Np(e,Nj()).exponent(e.exponent())},Oa.apply(e,arguments),e}function ske(){return Nj.apply(null,arguments).exponent(.5)}function FP(e){return Math.sign(e)*e*e}function lke(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function MV(){var e=Tj(),n=[0,1],t=!1,i;function r(a){var o=lke(e(a));return isNaN(o)?i:t?Math.round(o):o}return r.invert=function(a){return e.invert(FP(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,P1)).map(FP)),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 MV(e.domain(),n).round(t).clamp(e.clamp()).unknown(i)},Oa.apply(r,arguments),$l(r)}function DV(){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[f-1],i[f]]},o.unknown=function(u){return arguments.length&&(a=u),o},o.thresholds=function(){return i.slice()},o.copy=function(){return RV().domain([e,n]).range(r).unknown(a)},Oa.apply($l(o),arguments)}function PV(){var e=[.5],n=[0,1],t,i=1;function r(a){return a!=null&&a<=a?n[Rp(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 PV().domain(e).range(n).unknown(t)},Oa.apply(r,arguments)}const D3=new Date,R3=new Date;function Oi(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 u=[];if(a=r.ceil(a),l=l==null?1:Math.floor(l),!(a0))return u;let f;do u.push(f=new Date(+a)),n(a,l),e(a);while(fOi(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)=>(D3.setTime(+a),R3.setTime(+o),e(D3),e(R3),Math.floor(t(D3,R3))),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 L1=Oi(()=>{},(e,n)=>{e.setTime(+e+n)},(e,n)=>n-e);L1.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Oi(n=>{n.setTime(Math.floor(n/e)*e)},(n,t)=>{n.setTime(+n+t*e)},(n,t)=>(t-n)/e):L1);L1.range;const Xo=1e3,ya=Xo*60,Zo=ya*60,fs=Zo*24,$j=fs*7,qP=fs*30,P3=fs*365,_u=Oi(e=>{e.setTime(e-e.getMilliseconds())},(e,n)=>{e.setTime(+e+n*Xo)},(e,n)=>(n-e)/Xo,e=>e.getUTCSeconds());_u.range;const zj=Oi(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Xo)},(e,n)=>{e.setTime(+e+n*ya)},(e,n)=>(n-e)/ya,e=>e.getMinutes());zj.range;const Lj=Oi(e=>{e.setUTCSeconds(0,0)},(e,n)=>{e.setTime(+e+n*ya)},(e,n)=>(n-e)/ya,e=>e.getUTCMinutes());Lj.range;const Ij=Oi(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Xo-e.getMinutes()*ya)},(e,n)=>{e.setTime(+e+n*Zo)},(e,n)=>(n-e)/Zo,e=>e.getHours());Ij.range;const Bj=Oi(e=>{e.setUTCMinutes(0,0,0)},(e,n)=>{e.setTime(+e+n*Zo)},(e,n)=>(n-e)/Zo,e=>e.getUTCHours());Bj.range;const $p=Oi(e=>e.setHours(0,0,0,0),(e,n)=>e.setDate(e.getDate()+n),(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ya)/fs,e=>e.getDate()-1);$p.range;const J0=Oi(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/fs,e=>e.getUTCDate()-1);J0.range;const NV=Oi(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/fs,e=>Math.floor(e/fs));NV.range;function Xu(e){return Oi(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())*ya)/$j)}const eb=Xu(0),I1=Xu(1),uke=Xu(2),cke=Xu(3),bf=Xu(4),fke=Xu(5),dke=Xu(6);eb.range;I1.range;uke.range;cke.range;bf.range;fke.range;dke.range;function Zu(e){return Oi(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)/$j)}const nb=Zu(0),B1=Zu(1),hke=Zu(2),mke=Zu(3),wf=Zu(4),pke=Zu(5),vke=Zu(6);nb.range;B1.range;hke.range;mke.range;wf.range;pke.range;vke.range;const Fj=Oi(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());Fj.range;const qj=Oi(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());qj.range;const ds=Oi(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());ds.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Oi(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)});ds.range;const hs=Oi(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());hs.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Oi(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)});hs.range;function $V(e,n,t,i,r,a){const o=[[_u,1,Xo],[_u,5,5*Xo],[_u,15,15*Xo],[_u,30,30*Xo],[a,1,ya],[a,5,5*ya],[a,15,15*ya],[a,30,30*ya],[r,1,Zo],[r,3,3*Zo],[r,6,6*Zo],[r,12,12*Zo],[i,1,fs],[i,2,2*fs],[t,1,$j],[n,1,qP],[n,3,3*qP],[e,1,P3]];function l(f,h,d){const p=hk).right(o,p);if(g===o.length)return e.every(U4(f/P3,h/P3,d));if(g===0)return L1.every(Math.max(U4(f,h,d),1));const[b,w]=o[p/o[g-1][2]53)return null;"w"in te||(te.w=1),"Z"in te?(xe=$3(Oh(te.y,0,1)),Ae=xe.getUTCDay(),xe=Ae>4||Ae===0?B1.ceil(xe):B1(xe),xe=J0.offset(xe,(te.V-1)*7),te.y=xe.getUTCFullYear(),te.m=xe.getUTCMonth(),te.d=xe.getUTCDate()+(te.w+6)%7):(xe=N3(Oh(te.y,0,1)),Ae=xe.getDay(),xe=Ae>4||Ae===0?I1.ceil(xe):I1(xe),xe=$p.offset(xe,(te.V-1)*7),te.y=xe.getFullYear(),te.m=xe.getMonth(),te.d=xe.getDate()+(te.w+6)%7)}else("W"in te||"U"in te)&&("w"in te||(te.w="u"in te?te.u%7:"W"in te?1:0),Ae="Z"in te?$3(Oh(te.y,0,1)).getUTCDay():N3(Oh(te.y,0,1)).getDay(),te.m=0,te.d="W"in te?(te.w+6)%7+te.W*7-(Ae+5)%7:te.w+te.U*7-(Ae+6)%7);return"Z"in te?(te.H+=te.Z/100|0,te.M+=te.Z%100,$3(te)):N3(te)}}function $(ee,se,ke,te){for(var $e=0,xe=se.length,Ae=ke.length,ze,we;$e=Ae)return-1;if(ze=se.charCodeAt($e++),ze===37){if(ze=se.charAt($e++),we=A[ze in HP?se.charAt($e++):ze],!we||(te=we(ee,ke,te))<0)return-1}else if(ze!=ke.charCodeAt(te++))return-1}return te}function q(ee,se,ke){var te=f.exec(se.slice(ke));return te?(ee.p=h.get(te[0].toLowerCase()),ke+te[0].length):-1}function P(ee,se,ke){var te=g.exec(se.slice(ke));return te?(ee.w=b.get(te[0].toLowerCase()),ke+te[0].length):-1}function L(ee,se,ke){var te=d.exec(se.slice(ke));return te?(ee.w=p.get(te[0].toLowerCase()),ke+te[0].length):-1}function U(ee,se,ke){var te=_.exec(se.slice(ke));return te?(ee.m=S.get(te[0].toLowerCase()),ke+te[0].length):-1}function G(ee,se,ke){var te=w.exec(se.slice(ke));return te?(ee.m=k.get(te[0].toLowerCase()),ke+te[0].length):-1}function B(ee,se,ke){return $(ee,n,se,ke)}function R(ee,se,ke){return $(ee,t,se,ke)}function D(ee,se,ke){return $(ee,i,se,ke)}function z(ee){return o[ee.getDay()]}function H(ee){return a[ee.getDay()]}function Y(ee){return u[ee.getMonth()]}function N(ee){return l[ee.getMonth()]}function W(ee){return r[+(ee.getHours()>=12)]}function V(ee){return 1+~~(ee.getMonth()/3)}function I(ee){return o[ee.getUTCDay()]}function Q(ee){return a[ee.getUTCDay()]}function ie(ee){return u[ee.getUTCMonth()]}function re(ee){return l[ee.getUTCMonth()]}function Z(ee){return r[+(ee.getUTCHours()>=12)]}function le(ee){return 1+~~(ee.getUTCMonth()/3)}return{format:function(ee){var se=O(ee+="",j);return se.toString=function(){return ee},se},parse:function(ee){var se=M(ee+="",!1);return se.toString=function(){return ee},se},utcFormat:function(ee){var se=O(ee+="",T);return se.toString=function(){return ee},se},utcParse:function(ee){var se=M(ee+="",!0);return se.toString=function(){return ee},se}}}var HP={"-":"",_:" ",0:"0"},$i=/^\s*\d+/,_ke=/^%/,xke=/[\\^$*+?|[\]().{}]/g;function gt(e,n,t){var i=e<0?"-":"",r=(i?-e:e)+"",a=r.length;return i+(a[n.toLowerCase(),t]))}function Cke(e,n,t){var i=$i.exec(n.slice(t,t+1));return i?(e.w=+i[0],t+i[0].length):-1}function jke(e,n,t){var i=$i.exec(n.slice(t,t+1));return i?(e.u=+i[0],t+i[0].length):-1}function Ake(e,n,t){var i=$i.exec(n.slice(t,t+2));return i?(e.U=+i[0],t+i[0].length):-1}function Oke(e,n,t){var i=$i.exec(n.slice(t,t+2));return i?(e.V=+i[0],t+i[0].length):-1}function Tke(e,n,t){var i=$i.exec(n.slice(t,t+2));return i?(e.W=+i[0],t+i[0].length):-1}function UP(e,n,t){var i=$i.exec(n.slice(t,t+4));return i?(e.y=+i[0],t+i[0].length):-1}function VP(e,n,t){var i=$i.exec(n.slice(t,t+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),t+i[0].length):-1}function Eke(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 Mke(e,n,t){var i=$i.exec(n.slice(t,t+1));return i?(e.q=i[0]*3-3,t+i[0].length):-1}function Dke(e,n,t){var i=$i.exec(n.slice(t,t+2));return i?(e.m=i[0]-1,t+i[0].length):-1}function WP(e,n,t){var i=$i.exec(n.slice(t,t+2));return i?(e.d=+i[0],t+i[0].length):-1}function Rke(e,n,t){var i=$i.exec(n.slice(t,t+3));return i?(e.m=0,e.d=+i[0],t+i[0].length):-1}function GP(e,n,t){var i=$i.exec(n.slice(t,t+2));return i?(e.H=+i[0],t+i[0].length):-1}function Pke(e,n,t){var i=$i.exec(n.slice(t,t+2));return i?(e.M=+i[0],t+i[0].length):-1}function Nke(e,n,t){var i=$i.exec(n.slice(t,t+2));return i?(e.S=+i[0],t+i[0].length):-1}function $ke(e,n,t){var i=$i.exec(n.slice(t,t+3));return i?(e.L=+i[0],t+i[0].length):-1}function zke(e,n,t){var i=$i.exec(n.slice(t,t+6));return i?(e.L=Math.floor(i[0]/1e3),t+i[0].length):-1}function Lke(e,n,t){var i=_ke.exec(n.slice(t,t+1));return i?t+i[0].length:-1}function Ike(e,n,t){var i=$i.exec(n.slice(t));return i?(e.Q=+i[0],t+i[0].length):-1}function Bke(e,n,t){var i=$i.exec(n.slice(t));return i?(e.s=+i[0],t+i[0].length):-1}function YP(e,n){return gt(e.getDate(),n,2)}function Fke(e,n){return gt(e.getHours(),n,2)}function qke(e,n){return gt(e.getHours()%12||12,n,2)}function Hke(e,n){return gt(1+$p.count(ds(e),e),n,3)}function zV(e,n){return gt(e.getMilliseconds(),n,3)}function Uke(e,n){return zV(e,n)+"000"}function Vke(e,n){return gt(e.getMonth()+1,n,2)}function Wke(e,n){return gt(e.getMinutes(),n,2)}function Gke(e,n){return gt(e.getSeconds(),n,2)}function Yke(e){var n=e.getDay();return n===0?7:n}function Kke(e,n){return gt(eb.count(ds(e)-1,e),n,2)}function LV(e){var n=e.getDay();return n>=4||n===0?bf(e):bf.ceil(e)}function Xke(e,n){return e=LV(e),gt(bf.count(ds(e),e)+(ds(e).getDay()===4),n,2)}function Zke(e){return e.getDay()}function Qke(e,n){return gt(I1.count(ds(e)-1,e),n,2)}function Jke(e,n){return gt(e.getFullYear()%100,n,2)}function e_e(e,n){return e=LV(e),gt(e.getFullYear()%100,n,2)}function n_e(e,n){return gt(e.getFullYear()%1e4,n,4)}function t_e(e,n){var t=e.getDay();return e=t>=4||t===0?bf(e):bf.ceil(e),gt(e.getFullYear()%1e4,n,4)}function i_e(e){var n=e.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+gt(n/60|0,"0",2)+gt(n%60,"0",2)}function KP(e,n){return gt(e.getUTCDate(),n,2)}function r_e(e,n){return gt(e.getUTCHours(),n,2)}function a_e(e,n){return gt(e.getUTCHours()%12||12,n,2)}function o_e(e,n){return gt(1+J0.count(hs(e),e),n,3)}function IV(e,n){return gt(e.getUTCMilliseconds(),n,3)}function s_e(e,n){return IV(e,n)+"000"}function l_e(e,n){return gt(e.getUTCMonth()+1,n,2)}function u_e(e,n){return gt(e.getUTCMinutes(),n,2)}function c_e(e,n){return gt(e.getUTCSeconds(),n,2)}function f_e(e){var n=e.getUTCDay();return n===0?7:n}function d_e(e,n){return gt(nb.count(hs(e)-1,e),n,2)}function BV(e){var n=e.getUTCDay();return n>=4||n===0?wf(e):wf.ceil(e)}function h_e(e,n){return e=BV(e),gt(wf.count(hs(e),e)+(hs(e).getUTCDay()===4),n,2)}function m_e(e){return e.getUTCDay()}function p_e(e,n){return gt(B1.count(hs(e)-1,e),n,2)}function v_e(e,n){return gt(e.getUTCFullYear()%100,n,2)}function g_e(e,n){return e=BV(e),gt(e.getUTCFullYear()%100,n,2)}function y_e(e,n){return gt(e.getUTCFullYear()%1e4,n,4)}function b_e(e,n){var t=e.getUTCDay();return e=t>=4||t===0?wf(e):wf.ceil(e),gt(e.getUTCFullYear()%1e4,n,4)}function w_e(){return"+0000"}function XP(){return"%"}function ZP(e){return+e}function QP(e){return Math.floor(+e/1e3)}var Ic,FV,qV;k_e({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 k_e(e){return Ic=kke(e),FV=Ic.format,Ic.parse,qV=Ic.utcFormat,Ic.utcParse,Ic}function __e(e){return new Date(e)}function x_e(e){return e instanceof Date?+e:+new Date(+e)}function Hj(e,n,t,i,r,a,o,l,u,f){var h=Tj(),d=h.invert,p=h.domain,g=f(".%L"),b=f(":%S"),w=f("%I:%M"),k=f("%I %p"),_=f("%a %d"),S=f("%b %d"),j=f("%B"),T=f("%Y");function A(O){return(u(O)n(r/(e.length-1)))},t.quantiles=function(i){return Array.from({length:i+1},(r,a)=>dwe(e,a/i))},t.copy=function(){return WV(n).domain(e)},Ss.apply(t,arguments)}function ib(){var e=0,n=.5,t=1,i=1,r,a,o,l,u,f=sr,h,d=!1,p;function g(w){return isNaN(w=+w)?p:(w=.5+((w=+h(w))-a)*(i*wt}return L3=e,L3}var I3,tN;function T_e(){if(tN)return I3;tN=1;var e=XV(),n=O_e(),t=fd();function i(r){return r&&r.length?e(r,t,n):void 0}return I3=i,I3}var E_e=T_e();const cl=yt(E_e);var B3,iN;function M_e(){if(iN)return B3;iN=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};un.decimalPlaces=un.dp=function(){var e=this,n=e.d.length-1,t=(n-e.e)*Wt;if(n=e.d[n],n)for(;n%10==0;n/=10)t--;return t<0?0:t};un.dividedBy=un.div=function(e){return as(this,new this.constructor(e))};un.dividedToIntegerBy=un.idiv=function(e){var n=this,t=n.constructor;return Nt(as(n,new t(e),0,1),t.precision)};un.equals=un.eq=function(e){return!this.cmp(e)};un.exponent=function(){return wi(this)};un.greaterThan=un.gt=function(e){return this.cmp(e)>0};un.greaterThanOrEqualTo=un.gte=function(e){return this.cmp(e)>=0};un.isInteger=un.isint=function(){return this.e>this.d.length-2};un.isNegative=un.isneg=function(){return this.s<0};un.isPositive=un.ispos=function(){return this.s>0};un.isZero=function(){return this.s===0};un.lessThan=un.lt=function(e){return this.cmp(e)<0};un.lessThanOrEqualTo=un.lte=function(e){return this.cmp(e)<1};un.logarithm=un.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(Vr))throw Error(_a+"NaN");if(t.s<1)throw Error(_a+(t.s?"NaN":"-Infinity"));return t.eq(Vr)?new i(0):(Jt=!1,n=as(Nm(t,a),Nm(e,a),a),Jt=!0,Nt(n,r))};un.minus=un.sub=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?eW(n,e):QV(n,(e.s=-e.s,e))};un.modulo=un.mod=function(e){var n,t=this,i=t.constructor,r=i.precision;if(e=new i(e),!e.s)throw Error(_a+"NaN");return t.s?(Jt=!1,n=as(t,e,0,1).times(e),Jt=!0,t.minus(n)):Nt(new i(t),r)};un.naturalExponential=un.exp=function(){return JV(this)};un.naturalLogarithm=un.ln=function(){return Nm(this)};un.negated=un.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};un.plus=un.add=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?QV(n,e):eW(n,(e.s=-e.s,e))};un.precision=un.sd=function(e){var n,t,i,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Au+e);if(n=wi(r)+1,i=r.d.length-1,t=i*Wt+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};un.squareRoot=un.sqrt=function(){var e,n,t,i,r,a,o,l=this,u=l.constructor;if(l.s<1){if(!l.s)return new u(0);throw Error(_a+"NaN")}for(e=wi(l),Jt=!1,r=Math.sqrt(+l),r==0||r==1/0?(n=io(l.d),(n.length+e)%2==0&&(n+="0"),r=Math.sqrt(n),e=md((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 u(n)):i=new u(r.toString()),t=u.precision,r=o=t+3;;)if(a=i,i=a.plus(as(l,a,o+2)).times(.5),io(a.d).slice(0,o)===(n=io(i.d)).slice(0,o)){if(n=n.slice(o-3,o+1),r==o&&n=="4999"){if(Nt(a,t+1,0),a.times(a).eq(l)){i=a;break}}else if(n!="9999")break;o+=4}return Jt=!0,Nt(i,t)};un.times=un.mul=function(e){var n,t,i,r,a,o,l,u,f,h=this,d=h.constructor,p=h.d,g=(e=new d(e)).d;if(!h.s||!e.s)return new d(0);for(e.s*=h.s,t=h.e+e.e,u=p.length,f=g.length,u=0;){for(n=0,r=u+i;r>i;)l=a[r]+g[i]*p[r-i-1]+n,a[r--]=l%Di|0,n=l/Di|0;a[r]=(a[r]+n)%Di|0}for(;!a[--o];)a.pop();return n?++t:a.shift(),e.d=a,e.e=t,Jt?Nt(e,d.precision):e};un.toDecimalPlaces=un.todp=function(e,n){var t=this,i=t.constructor;return t=new i(t),e===void 0?t:(go(e,0,hd),n===void 0?n=i.rounding:go(n,0,8),Nt(t,e+wi(t)+1,n))};un.toExponential=function(e,n){var t,i=this,r=i.constructor;return e===void 0?t=zu(i,!0):(go(e,0,hd),n===void 0?n=r.rounding:go(n,0,8),i=Nt(new r(i),e+1,n),t=zu(i,!0,e+1)),t};un.toFixed=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?zu(r):(go(e,0,hd),n===void 0?n=a.rounding:go(n,0,8),i=Nt(new a(r),e+wi(r)+1,n),t=zu(i.abs(),!1,e+wi(i)+1),r.isneg()&&!r.isZero()?"-"+t:t)};un.toInteger=un.toint=function(){var e=this,n=e.constructor;return Nt(new n(e),wi(e)+1,n.rounding)};un.toNumber=function(){return+this};un.toPower=un.pow=function(e){var n,t,i,r,a,o,l=this,u=l.constructor,f=12,h=+(e=new u(e));if(!e.s)return new u(Vr);if(l=new u(l),!l.s){if(e.s<1)throw Error(_a+"Infinity");return l}if(l.eq(Vr))return l;if(i=u.precision,e.eq(Vr))return Nt(l,i);if(n=e.e,t=e.d.length-1,o=n>=t,a=l.s,o){if((t=h<0?-h:h)<=ZV){for(r=new u(Vr),n=Math.ceil(i/Wt+4),Jt=!1;t%2&&(r=r.times(l),uN(r.d,n)),t=md(t/2),t!==0;)l=l.times(l),uN(l.d,n);return Jt=!0,e.s<0?new u(Vr).div(r):Nt(r,i)}}else if(a<0)throw Error(_a+"NaN");return a=a<0&&e.d[Math.max(n,t)]&1?-1:1,l.s=1,Jt=!1,r=e.times(Nm(l,i+f)),Jt=!0,r=JV(r),r.s=a,r};un.toPrecision=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?(t=wi(r),i=zu(r,t<=a.toExpNeg||t>=a.toExpPos)):(go(e,1,hd),n===void 0?n=a.rounding:go(n,0,8),r=Nt(new a(r),e,n),t=wi(r),i=zu(r,e<=t||t<=a.toExpNeg,e)),i};un.toSignificantDigits=un.tosd=function(e,n){var t=this,i=t.constructor;return e===void 0?(e=i.precision,n=i.rounding):(go(e,1,hd),n===void 0?n=i.rounding:go(n,0,8)),Nt(new i(t),e,n)};un.toString=un.valueOf=un.val=un.toJSON=un[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,n=wi(e),t=e.constructor;return zu(e,n<=t.toExpNeg||n>=t.toExpPos)};function QV(e,n){var t,i,r,a,o,l,u,f,h=e.constructor,d=h.precision;if(!e.s||!n.s)return n.s||(n=new h(e)),Jt?Nt(n,d):n;if(u=e.d,f=n.d,o=e.e,r=n.e,u=u.slice(),a=o-r,a){for(a<0?(i=u,a=-a,l=f.length):(i=f,r=o,l=u.length),o=Math.ceil(d/Wt),l=o>l?o+1:l+1,a>l&&(a=l,i.length=1),i.reverse();a--;)i.push(0);i.reverse()}for(l=u.length,a=f.length,l-a<0&&(a=l,i=f,f=u,u=i),t=0;a;)t=(u[--a]=u[a]+f[a]+t)/Di|0,u[a]%=Di;for(t&&(u.unshift(t),++r),l=u.length;u[--l]==0;)u.pop();return n.d=u,n.e=r,Jt?Nt(n,d):n}function go(e,n,t){if(e!==~~e||et)throw Error(Au+e)}function io(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=u=0;lr[l]?1:-1;break}return u}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,u,f,h,d,p,g,b,w,k,_,S,j,T,A,O,M,$,q=i.constructor,P=i.s==r.s?1:-1,L=i.d,U=r.d;if(!i.s)return new q(i);if(!r.s)throw Error(_a+"Division by zero");for(u=i.e-r.e,M=U.length,A=L.length,g=new q(P),b=g.d=[],f=0;U[f]==(L[f]||0);)++f;if(U[f]>(L[f]||0)&&--u,a==null?S=a=q.precision:o?S=a+(wi(i)-wi(r))+1:S=a,S<0)return new q(0);if(S=S/Wt+2|0,f=0,M==1)for(h=0,U=U[0],S++;(f1&&(U=e(U,h),L=e(L,h),M=U.length,A=L.length),T=M,w=L.slice(0,M),k=w.length;k=Di/2&&++O;do h=0,l=n(U,w,M,k),l<0?(_=w[0],M!=k&&(_=_*Di+(w[1]||0)),h=_/O|0,h>1?(h>=Di&&(h=Di-1),d=e(U,h),p=d.length,k=w.length,l=n(d,w,p,k),l==1&&(h--,t(d,M16)throw Error(Wj+wi(e));if(!e.s)return new h(Vr);for(Jt=!1,l=d,o=new h(.03125);e.abs().gte(.1);)e=e.times(o),f+=5;for(i=Math.log(pu(2,f))/Math.LN10*2+5|0,l+=i,t=r=a=new h(Vr),h.precision=l;;){if(r=Nt(r.times(e),l),t=t.times(++u),o=a.plus(as(r,t,l)),io(o.d).slice(0,l)===io(a.d).slice(0,l)){for(;f--;)a=Nt(a.times(a),l);return h.precision=d,n==null?(Jt=!0,Nt(a,d)):a}a=o}}function wi(e){for(var n=e.e*Wt,t=e.d[0];t>=10;t/=10)n++;return n}function V3(e,n,t){if(n>e.LN10.sd())throw Jt=!0,t&&(e.precision=t),Error(_a+"LN10 precision limit exceeded");return Nt(new e(e.LN10),n)}function rl(e){for(var n="";e--;)n+="0";return n}function Nm(e,n){var t,i,r,a,o,l,u,f,h,d=1,p=10,g=e,b=g.d,w=g.constructor,k=w.precision;if(g.s<1)throw Error(_a+(g.s?"NaN":"-Infinity"));if(g.eq(Vr))return new w(0);if(n==null?(Jt=!1,f=k):f=n,g.eq(10))return n==null&&(Jt=!0),V3(w,f);if(f+=p,w.precision=f,t=io(b),i=t.charAt(0),a=wi(g),Math.abs(a)<15e14){for(;i<7&&i!=1||i==1&&t.charAt(1)>3;)g=g.times(e),t=io(g.d),i=t.charAt(0),d++;a=wi(g),i>1?(g=new w("0."+t),a++):g=new w(i+"."+t.slice(1))}else return u=V3(w,f+2,k).times(a+""),g=Nm(new w(i+"."+t.slice(1)),f-p).plus(u),w.precision=k,n==null?(Jt=!0,Nt(g,k)):g;for(l=o=g=as(g.minus(Vr),g.plus(Vr),f),h=Nt(g.times(g),f),r=3;;){if(o=Nt(o.times(h),f),u=l.plus(as(o,new w(r),f)),io(u.d).slice(0,f)===io(l.d).slice(0,f))return l=l.times(2),a!==0&&(l=l.plus(V3(w,f+2,k).times(a+""))),l=as(l,new w(d),f),w.precision=k,n==null?(Jt=!0,Nt(l,k)):l;l=u,r+=2}}function lN(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=md(t/Wt),e.d=[],i=(t+1)%Wt,t<0&&(i+=Wt),iF1||e.e<-F1))throw Error(Wj+t)}else e.s=0,e.e=0,e.d=[0];return e}function Nt(e,n,t){var i,r,a,o,l,u,f,h,d=e.d;for(o=1,a=d[0];a>=10;a/=10)o++;if(i=n-o,i<0)i+=Wt,r=n,f=d[h=0];else{if(h=Math.ceil((i+1)/Wt),a=d.length,h>=a)return e;for(f=a=d[h],o=1;a>=10;a/=10)o++;i%=Wt,r=i-Wt+o}if(t!==void 0&&(a=pu(10,o-r-1),l=f/a%10|0,u=n<0||d[h+1]!==void 0||f%a,u=t<4?(l||u)&&(t==0||t==(e.s<0?3:2)):l>5||l==5&&(t==4||u||t==6&&(i>0?r>0?f/pu(10,o-r):0:d[h-1])%10&1||t==(e.s<0?8:7))),n<1||!d[0])return u?(a=wi(e),d.length=1,n=n-a-1,d[0]=pu(10,(Wt-n%Wt)%Wt),e.e=md(-n/Wt)||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=pu(10,Wt-i),d[h]=r>0?(f/pu(10,o-r)%pu(10,r)|0)*a:0),u)for(;;)if(h==0){(d[0]+=a)==Di&&(d[0]=1,++e.e);break}else{if(d[h]+=a,d[h]!=Di)break;d[h--]=0,a=1}for(i=d.length;d[--i]===0;)d.pop();if(Jt&&(e.e>F1||e.e<-F1))throw Error(Wj+wi(e));return e}function eW(e,n){var t,i,r,a,o,l,u,f,h,d,p=e.constructor,g=p.precision;if(!e.s||!n.s)return n.s?n.s=-n.s:n=new p(e),Jt?Nt(n,g):n;if(u=e.d,d=n.d,i=n.e,f=e.e,u=u.slice(),o=f-i,o){for(h=o<0,h?(t=u,o=-o,l=d.length):(t=d,i=f,l=u.length),r=Math.max(Math.ceil(g/Wt),l)+2,o>r&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for(r=u.length,l=d.length,h=r0;--r)u[l++]=0;for(r=d.length;r>o;){if(u[--r]0?a=a.charAt(0)+"."+a.slice(1)+rl(i):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(r<0?"e":"e+")+r):r<0?(a="0."+rl(-r-1)+a,t&&(i=t-o)>0&&(a+=rl(i))):r>=o?(a+=rl(r+1-o),t&&(i=t-r-1)>0&&(a=a+"."+rl(i))):((i=r+1)0&&(r+1===o&&(a+="."),a+=rl(i))),e.s<0?"-"+a:a}function uN(e,n){if(e.length>n)return e.length=n,!0}function nW(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(Au+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 lN(o,a.toString())}else if(typeof a!="string")throw Error(Au+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,F_e.test(a))lN(o,a);else throw Error(Au+a)}if(r.prototype=un,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=nW,r.config=r.set=q_e,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(Au+t+": "+i);if((i=e[t="LN10"])!==void 0)if(i==Math.LN10)this[t]=new this(i);else throw Error(Au+t+": "+i);return this}var Gj=nW(B_e);Vr=new Gj(1);const Ot=Gj;function H_e(e){return G_e(e)||W_e(e)||V_e(e)||U_e()}function U_e(){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 V_e(e,n){if(e){if(typeof e=="string")return K4(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 K4(e,n)}}function W_e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function G_e(e){if(Array.isArray(e))return K4(e)}function K4(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,cN(function(){for(var l=arguments.length,u=new Array(l),f=0;fe.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(u){r=!0,a=u}finally{try{!i&&o.return!=null&&o.return()}finally{if(r)throw a}}return t}}function l2e(e){if(Array.isArray(e))return e}function oW(e){var n=$m(e,2),t=n[0],i=n[1],r=t,a=i;return t>i&&(r=i,a=t),[r,a]}function sW(e,n,t){if(e.lte(0))return new Ot(0);var i=ob.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),u=l.mul(r);return n?u:new Ot(Math.ceil(u))}function u2e(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(ob.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=Z_e(X_e(function(u){return r.add(new Ot(u-o).mul(i)).toNumber()}),X4);return l(0,n)}function lW(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=sW(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()),u=Math.ceil(new Ot(n).sub(o).div(a).toNumber()),f=l+u+1;return f>t?lW(e,n,t,i,r+1):(f0?u+(t-f):u,l=n>0?l:l+(t-f)),{step:a,tickMin:o.sub(new Ot(l).mul(a)),tickMax:o.add(new Ot(u).mul(a))})}function c2e(e){var n=$m(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=oW([t,i]),u=$m(l,2),f=u[0],h=u[1];if(f===-1/0||h===1/0){var d=h===1/0?[f].concat(Q4(X4(0,r-1).map(function(){return 1/0}))):[].concat(Q4(X4(0,r-1).map(function(){return-1/0})),[h]);return t>i?Z4(d):d}if(f===h)return u2e(f,r,a);var p=lW(f,h,o,a),g=p.step,b=p.tickMin,w=p.tickMax,k=ob.rangeStep(b,w.add(new Ot(.1).mul(g)),g);return t>i?Z4(k):k}function f2e(e,n){var t=$m(e,2),i=t[0],r=t[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=oW([i,r]),l=$m(o,2),u=l[0],f=l[1];if(u===-1/0||f===1/0)return[i,r];if(u===f)return[u];var h=Math.max(n,2),d=sW(new Ot(f).sub(u).div(h-1),a,0),p=[].concat(Q4(ob.rangeStep(new Ot(u),new Ot(f).sub(new Ot(.99).mul(d)),d)),[f]);return i>r?Z4(p):p}var d2e=rW(c2e),h2e=rW(f2e),m2e="Invariant failed";function Lu(e,n){throw new Error(m2e)}var p2e=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function _f(e){"@babel/helpers - typeof";return _f=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},_f(e)}function q1(){return q1=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 _2e(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 x2e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function S2e(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 u=a.range,f=0;f0?r[f-1].coordinate:r[l-1].coordinate,d=r[f].coordinate,p=f>=l-1?r[0].coordinate:r[f+1].coordinate,g=void 0;if(Fa(d-h)!==Fa(p-d)){var b=[];if(Fa(p-d)===Fa(u[1]-u[0])){g=p;var w=d+u[1]-u[0];b[0]=Math.min(w,(w+h)/2),b[1]=Math.max(w,(w+h)/2)}else{g=h;var k=p+u[1]-u[0];b[0]=Math.min(d,(k+d)/2),b[1]=Math.max(d,(k+d)/2)}var _=[Math.min(d,(g+d)/2),Math.max(d,(g+d)/2)];if(n>_[0]&&n<=_[1]||n>=b[0]&&n<=b[1]){o=r[f].index;break}}else{var S=Math.min(h,p),j=Math.max(h,p);if(n>(S+d)/2&&n<=(j+d)/2){o=r[f].index;break}}}else for(var T=0;T0&&T(i[T].coordinate+i[T-1].coordinate)/2&&n<=(i[T].coordinate+i[T+1].coordinate)/2||T===l-1&&n>(i[T].coordinate+i[T-1].coordinate)/2){o=i[T].index;break}return o},Yj=function(n){var t,i=n,r=i.type.displayName,a=(t=n.type)!==null&&t!==void 0&&t.defaultProps?ii(ii({},n.type.defaultProps),n.props):n.props,o=a.stroke,l=a.fill,u;switch(r){case"Line":u=o;break;case"Area":case"Radar":u=o&&o!=="none"?o:l;break;default:u=l;break}return u},F2e=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),u=0,f=l.length;u=0});if(_&&_.length){var S=_[0].type.defaultProps,j=S!==void 0?ii(ii({},S),_[0].props):_[0].props,T=j.barSize,A=j[k];o[A]||(o[A]=[]);var O=Zn(T)?t:T;o[A].push({item:_[0],stackList:_.slice(1),barSize:Zn(O)?void 0:$u(O,i,0)})}}return o},q2e=function(n){var t=n.barGap,i=n.barCategoryGap,r=n.bandSize,a=n.sizeList,o=a===void 0?[]:a,l=n.maxBarSize,u=o.length;if(u<1)return null;var f=$u(t,r,0,!0),h,d=[];if(o[0].barSize===+o[0].barSize){var p=!1,g=r/u,b=o.reduce(function(T,A){return T+A.barSize||0},0);b+=(u-1)*f,b>=r&&(b-=(u-1)*f,f=0),b>=r&&g>0&&(p=!0,g*=.9,b=u*g);var w=(r-b)/2>>0,k={offset:w-f,size:0};h=o.reduce(function(T,A){var O={item:A.item,position:{offset:k.offset+k.size+f,size:p?g:A.barSize}},M=[].concat(hN(T),[O]);return k=M[M.length-1].position,A.stackList&&A.stackList.length&&A.stackList.forEach(function($){M.push({item:$,position:k})}),M},d)}else{var _=$u(i,r,0,!0);r-2*_-(u-1)*f<=0&&(f=0);var S=(r-2*_-(u-1)*f)/u;S>1&&(S>>=0);var j=l===+l?Math.min(S,l):S;h=o.reduce(function(T,A,O){var M=[].concat(hN(T),[{item:A.item,position:{offset:_+(S+f)*O+(S-j)/2,size:j}}]);return A.stackList&&A.stackList.length&&A.stackList.forEach(function($){M.push({item:$,position:M[M.length-1].position})}),M},d)}return h},H2e=function(n,t,i,r){var a=i.children,o=i.width,l=i.margin,u=o-(l.left||0)-(l.right||0),f=dW({children:a,legendWidth:u});if(f){var h=r||{},d=h.width,p=h.height,g=f.align,b=f.verticalAlign,w=f.layout;if((w==="vertical"||w==="horizontal"&&b==="middle")&&g!=="center"&&Ge(n[g]))return ii(ii({},n),{},tf({},g,n[g]+(d||0)));if((w==="horizontal"||w==="vertical"&&g==="center")&&b!=="middle"&&Ge(n[b]))return ii(ii({},n),{},tf({},b,n[b]+(p||0)))}return n},U2e=function(n,t,i){return Zn(t)?!0:n==="horizontal"?t==="yAxis":n==="vertical"||i==="x"?t==="xAxis":i==="y"?t==="yAxis":!0},hW=function(n,t,i,r,a){var o=t.props.children,l=wa(o,zp).filter(function(f){return U2e(r,a,f.props.direction)});if(l&&l.length){var u=l.map(function(f){return f.props.dataKey});return n.reduce(function(f,h){var d=cr(h,i);if(Zn(d))return f;var p=Array.isArray(d)?[rb(d),cl(d)]:[d,d],g=u.reduce(function(b,w){var k=cr(h,w,0),_=p[0]-Math.abs(Array.isArray(k)?k[0]:k),S=p[1]+Math.abs(Array.isArray(k)?k[1]:k);return[Math.min(_,b[0]),Math.max(S,b[1])]},[1/0,-1/0]);return[Math.min(g[0],f[0]),Math.max(g[1],f[1])]},[1/0,-1/0])}return null},V2e=function(n,t,i,r,a){var o=t.map(function(l){return hW(n,l,i,a,r)}).filter(function(l){return!Zn(l)});return o&&o.length?o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]):null},mW=function(n,t,i,r,a){var o=t.map(function(u){var f=u.props.dataKey;return i==="number"&&f&&hW(n,u,f,r)||rm(n,f,i,a)});if(i==="number")return o.reduce(function(u,f){return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);var l={};return o.reduce(function(u,f){for(var h=0,d=f.length;h=2?Fa(l[0]-l[1])*2*f:f,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)+f,value:d,offset:f}});return h.filter(function(d){return!ud(d.coordinate)})}return n.isCategorical&&n.categoricalDomain?n.categoricalDomain.map(function(d,p){return{coordinate:r(d)+f,value:d,index:p,offset:f}}):r.ticks&&!i?r.ticks(n.tickCount).map(function(d){return{coordinate:r(d)+f,value:d,offset:f}}):r.domain().map(function(d,p){return{coordinate:r(d)+f,value:a?a[d]:d,index:p,offset:f}})},W3=new WeakMap,wg=function(n,t){if(typeof t!="function")return n;W3.has(n)||W3.set(n,new WeakMap);var i=W3.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},W2e=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:Em(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:z1(),realScaleType:"linear"}:a==="category"&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!i)?{scale:im(),realScaleType:"point"}:a==="category"?{scale:Em(),realScaleType:"band"}:{scale:z1(),realScaleType:"linear"};if(Nu(r)){var u="scale".concat(V0(r));return{scale:(JP[u]||im)(),realScaleType:JP[u]?u:"point"}}return Fn(r)?{scale:r}:{scale:im(),realScaleType:"point"}},pN=1e-4,G2e=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])-pN,o=Math.max(r[0],r[1])+pN,l=n(t[0]),u=n(t[i-1]);(lo||uo)&&n.domain([t[0],t[i-1]])}},Y2e=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+u,a=n[l][i][1]):(n[l][i][0]=o,n[l][i][1]=o+u,o=n[l][i][1])}},Z2e=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)}},Q2e={sign:X2e,expand:N1e,none:hf,silhouette:$1e,wiggle:z1e,positive:Z2e},J2e=function(n,t,i){var r=t.map(function(l){return l.props.dataKey}),a=Q2e[i],o=P1e().keys(r).value(function(l,u){return+cr(l,u,0)}).order(M4).offset(a);return o(n)},exe=function(n,t,i,r,a,o){if(!n)return null;var l=o?t.reverse():t,u={},f=l.reduce(function(d,p){var g,b=(g=p.type)!==null&&g!==void 0&&g.defaultProps?ii(ii({},p.type.defaultProps),p.props):p.props,w=b.stackId,k=b.hide;if(k)return d;var _=b[i],S=d[_]||{hasStack:!1,stackGroups:{}};if(ji(w)){var j=S.stackGroups[w]||{numericAxisId:i,cateAxisId:r,items:[]};j.items.push(p),S.hasStack=!0,S.stackGroups[w]=j}else S.stackGroups[cd("_stackId_")]={numericAxisId:i,cateAxisId:r,items:[p]};return ii(ii({},d),{},tf({},_,S))},u),h={};return Object.keys(f).reduce(function(d,p){var g=f[p];if(g.hasStack){var b={};g.stackGroups=Object.keys(g.stackGroups).reduce(function(w,k){var _=g.stackGroups[k];return ii(ii({},w),{},tf({},k,{numericAxisId:i,cateAxisId:r,items:_.items,stackedData:J2e(n,_.items,a)}))},b)}return ii(ii({},d),{},tf({},p,g))},h)},nxe=function(n,t){var i=t.realScaleType,r=t.type,a=t.tickCount,o=t.originalDomain,l=t.allowDecimals,u=i||t.scale;if(u!=="auto"&&u!=="linear")return null;if(a&&r==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var f=n.domain();if(!f.length)return null;var h=d2e(f,a,l);return n.domain([rb(h),cl(h)]),{niceTicks:h}}if(a&&r==="number"){var d=n.domain(),p=h2e(d,a,l);return{niceTicks:p}}return null};function U1(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&&!Zn(r[n.dataKey])){var l=v1(t,"value",r[n.dataKey]);if(l)return l.coordinate+i/2}return t[a]?t[a].coordinate+i/2:null}var u=cr(r,Zn(o)?n.dataKey:o);return Zn(u)?null:n.scale(u)}var vN=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 u=cr(o,t.dataKey,t.domain[l]);return Zn(u)?null:t.scale(u)-a/2+r},txe=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]},ixe=function(n,t){var i,r=(i=n.type)!==null&&i!==void 0&&i.defaultProps?ii(ii({},n.type.defaultProps),n.props):n.props,a=r.stackId;if(ji(a)){var o=t[a];if(o){var l=o.items.indexOf(n);return l>=0?o.stackedData[l]:null}}return null},rxe=function(n){return n.reduce(function(t,i){return[rb(i.concat([t[0]]).filter(Ge)),cl(i.concat([t[1]]).filter(Ge))]},[1/0,-1/0])},gW=function(n,t,i){return Object.keys(n).reduce(function(r,a){var o=n[a],l=o.stackedData,u=l.reduce(function(f,h){var d=rxe(h.slice(t,i+1));return[Math.min(f[0],d[0]),Math.max(f[1],d[1])]},[1/0,-1/0]);return[Math.min(u[0],r[0]),Math.max(u[1],r[1])]},[1/0,-1/0]).map(function(r){return r===1/0||r===-1/0?0:r})},gN=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,yN=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,t6=function(n,t,i){if(Fn(n))return n(t,i);if(!Array.isArray(n))return t;var r=[];if(Ge(n[0]))r[0]=i?n[0]:Math.min(n[0],t[0]);else if(gN.test(n[0])){var a=+gN.exec(n[0])[1];r[0]=t[0]-a}else Fn(n[0])?r[0]=n[0](t[0]):r[0]=t[0];if(Ge(n[1]))r[1]=i?n[1]:Math.max(n[1],t[1]);else if(yN.test(n[1])){var o=+yN.exec(n[1])[1];r[1]=t[1]+o}else Fn(n[1])?r[1]=n[1](t[1]):r[1]=t[1];return r},V1=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=kj(t,function(d){return d.coordinate}),o=1/0,l=1,u=a.length;lo&&(f=2*Math.PI-f),{radius:l,angle:lxe(f),angleInRadian:f}},fxe=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}},dxe=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},_N=function(n,t){var i=n.x,r=n.y,a=cxe({x:i,y:r},t),o=a.radius,l=a.angle,u=t.innerRadius,f=t.outerRadius;if(of)return!1;if(o===0)return!0;var h=fxe(t),d=h.startAngle,p=h.endAngle,g=l,b;if(d<=p){for(;g>p;)g-=360;for(;g=d&&g<=p}else{for(;g>d;)g-=360;for(;g=p&&g<=d}return b?kN(kN({},t),{},{radius:o,angle:dxe(g,t)}):null};function Bm(e){"@babel/helpers - typeof";return Bm=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},Bm(e)}var hxe=["offset"];function mxe(e){return yxe(e)||gxe(e)||vxe(e)||pxe()}function pxe(){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 vxe(e,n){if(e){if(typeof e=="string")return i6(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 i6(e,n)}}function gxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yxe(e){if(Array.isArray(e))return i6(e)}function i6(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 wxe(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 xN(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 Si(e){for(var n=1;n=0?1:-1,j,T;r==="insideStart"?(j=g+S*o,T=w):r==="insideEnd"?(j=b-S*o,T=!w):r==="end"&&(j=b+S*o,T=w),T=_<=0?T:!T;var A=Vi(f,h,k,j),O=Vi(f,h,k,j+(T?1:-1)*359),M="M".concat(A.x,",").concat(A.y,` A`).concat(k,",").concat(k,",0,1,").concat(T?0:1,`, - `).concat(O.x,",").concat(O.y),$=Zn(n.id)?cd("recharts-radial-line-"):n.id;return J.createElement("text",Fm({},i,{dominantBaseline:"central",className:vn("recharts-radial-bar-label",l)}),J.createElement("defs",null,J.createElement("path",{id:$,d:M})),J.createElement("textPath",{xlinkHref:"#".concat($)},t))},jxe=function(n){var t=n.viewBox,i=n.offset,r=n.position,a=t,o=a.cx,l=a.cy,u=a.innerRadius,f=a.outerRadius,h=a.startAngle,d=a.endAngle,p=(h+d)/2;if(r==="outside"){var g=Vi(o,l,f+i,p),b=g.x,w=g.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=(u+f)/2,_=Vi(o,l,k,p),S=_.x,j=_.y;return{x:S,y:j,textAnchor:"middle",verticalAnchor:"middle"}},Axe=function(n){var t=n.viewBox,i=n.parentViewBox,r=n.offset,a=n.position,o=t,l=o.x,u=o.y,f=o.width,h=o.height,d=h>=0?1:-1,p=d*r,g=d>0?"end":"start",b=d>0?"start":"end",w=f>=0?1:-1,k=w*r,_=w>0?"end":"start",S=w>0?"start":"end";if(a==="top"){var j={x:l+f/2,y:u-d*r,textAnchor:"middle",verticalAnchor:g};return Si(Si({},j),i?{height:Math.max(u-i.y,0),width:f}:{})}if(a==="bottom"){var T={x:l+f/2,y:u+h+p,textAnchor:"middle",verticalAnchor:b};return Si(Si({},T),i?{height:Math.max(i.y+i.height-(u+h),0),width:f}:{})}if(a==="left"){var A={x:l-k,y:u+h/2,textAnchor:_,verticalAnchor:"middle"};return Si(Si({},A),i?{width:Math.max(A.x-i.x,0),height:h}:{})}if(a==="right"){var O={x:l+f+k,y:u+h/2,textAnchor:S,verticalAnchor:"middle"};return Si(Si({},O),i?{width:Math.max(i.x+i.width-O.x,0),height:h}:{})}var M=i?{width:f,height:h}:{};return a==="insideLeft"?Si({x:l+k,y:u+h/2,textAnchor:S,verticalAnchor:"middle"},M):a==="insideRight"?Si({x:l+f-k,y:u+h/2,textAnchor:_,verticalAnchor:"middle"},M):a==="insideTop"?Si({x:l+f/2,y:u+p,textAnchor:"middle",verticalAnchor:b},M):a==="insideBottom"?Si({x:l+f/2,y:u+h-p,textAnchor:"middle",verticalAnchor:g},M):a==="insideTopLeft"?Si({x:l+k,y:u+p,textAnchor:S,verticalAnchor:b},M):a==="insideTopRight"?Si({x:l+f-k,y:u+p,textAnchor:_,verticalAnchor:b},M):a==="insideBottomLeft"?Si({x:l+k,y:u+h-p,textAnchor:S,verticalAnchor:g},M):a==="insideBottomRight"?Si({x:l+f-k,y:u+h-p,textAnchor:_,verticalAnchor:g},M):ld(a)&&(Ge(a.x)||wu(a.x))&&(Ge(a.y)||wu(a.y))?Si({x:l+$u(a.x,f),y:u+$u(a.y,h),textAnchor:"end",verticalAnchor:"end"},M):Si({x:l+f/2,y:u+h/2,textAnchor:"middle",verticalAnchor:"middle"},M)},Oxe=function(n){return"cx"in n&&Ge(n.cx)};function ri(e){var n=e.offset,t=n===void 0?5:n,i=yxe(e,dxe),r=Si({offset:t},i),a=r.viewBox,o=r.position,l=r.value,u=r.children,f=r.content,h=r.className,d=h===void 0?"":h,p=r.textBreakAll;if(!a||Zn(l)&&Zn(u)&&!x.isValidElement(f)&&!Fn(f))return null;if(x.isValidElement(f))return x.cloneElement(f,r);var g;if(Fn(f)){if(g=x.createElement(f,r),x.isValidElement(g))return g}else g=xxe(r);var b=Oxe(a),w=Un(r,!0);if(b&&(o==="insideStart"||o==="insideEnd"||o==="end"))return Cxe(r,g,w);var k=b?jxe(r):Axe(r);return J.createElement(T1,Fm({className:vn("recharts-label",d)},w,k,{breakAll:p}),g)}ri.displayName="Label";var yW=function(n){var t=n.cx,i=n.cy,r=n.angle,a=n.startAngle,o=n.endAngle,l=n.r,u=n.radius,f=n.innerRadius,h=n.outerRadius,d=n.x,p=n.y,g=n.top,b=n.left,w=n.width,k=n.height,_=n.clockWise,S=n.labelViewBox;if(S)return S;if(Ge(w)&&Ge(k)){if(Ge(d)&&Ge(p))return{x:d,y:p,width:w,height:k};if(Ge(g)&&Ge(b))return{x:g,y:b,width:w,height:k}}return Ge(d)&&Ge(p)?{x:d,y:p,width:0,height:0}:Ge(t)&&Ge(i)?{cx:t,cy:i,startAngle:a||r||0,endAngle:o||r||0,innerRadius:f||0,outerRadius:h||u||l||0,clockWise:_}:n.viewBox?n.viewBox:{}},Txe=function(n,t){return n?n===!0?J.createElement(ri,{key:"label-implicit",viewBox:t}):ji(n)?J.createElement(ri,{key:"label-implicit",viewBox:t,value:n}):x.isValidElement(n)?n.type===ri?x.cloneElement(n,{key:"label-implicit",viewBox:t}):J.createElement(ri,{key:"label-implicit",content:n,viewBox:t}):Fn(n)?J.createElement(ri,{key:"label-implicit",content:n,viewBox:t}):ld(n)?J.createElement(ri,Fm({viewBox:t},n,{key:"label-implicit"})):null:null},Exe=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=yW(n),o=wa(r,ri).map(function(u,f){return x.cloneElement(u,{viewBox:t||a,key:"label-".concat(f)})});if(!i)return o;var l=Txe(n.label,t||a);return[l].concat(hxe(o))};ri.parseViewBox=yW;ri.renderCallByParent=Exe;var G3,SN;function Mxe(){if(SN)return G3;SN=1;function e(n){var t=n==null?0:n.length;return t?n[t-1]:void 0}return G3=e,G3}var Dxe=Mxe();const Rxe=yt(Dxe);function qm(e){"@babel/helpers - typeof";return qm=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},qm(e)}var Pxe=["valueAccessor"],Nxe=["data","dataKey","clockWise","id","textBreakAll"];function $xe(e){return Bxe(e)||Ixe(e)||Lxe(e)||zxe()}function zxe(){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 Lxe(e,n){if(e){if(typeof e=="string")return r6(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 r6(e,n)}}function Ixe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Bxe(e){if(Array.isArray(e))return r6(e)}function r6(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 Uxe(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 Vxe=function(n){return Array.isArray(n.value)?Rxe(n.value):n.value};function lo(e){var n=e.valueAccessor,t=n===void 0?Vxe:n,i=AN(e,Pxe),r=i.data,a=i.dataKey,o=i.clockWise,l=i.id,u=i.textBreakAll,f=AN(i,Nxe);return!r||!r.length?null:J.createElement(Ft,{className:"recharts-label-list"},r.map(function(h,d){var p=Zn(a)?t(h,d):cr(h&&h.payload,a),g=Zn(l)?{}:{id:"".concat(l,"-").concat(d)};return J.createElement(ri,G1({},Un(h,!0),f,g,{parentViewBox:h.parentViewBox,value:p,textBreakAll:u,viewBox:ri.parseViewBox(Zn(o)?h:jN(jN({},h),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}lo.displayName="LabelList";function Wxe(e,n){return e?e===!0?J.createElement(lo,{key:"labelList-implicit",data:n}):J.isValidElement(e)||Fn(e)?J.createElement(lo,{key:"labelList-implicit",data:n,content:e}):ld(e)?J.createElement(lo,G1({data:n},e,{key:"labelList-implicit"})):null:null}function Gxe(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=wa(i,lo).map(function(o,l){return x.cloneElement(o,{data:n,key:"labelList-".concat(l)})});if(!t)return r;var a=Wxe(e.label,n);return[a].concat($xe(r))}lo.renderCallByParent=Gxe;function Hm(e){"@babel/helpers - typeof";return Hm=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},Hm(e)}function a6(){return a6=Object.assign?Object.assign.bind():function(e){for(var n=1;n=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=(u+f)/2,_=Vi(o,l,k,p),S=_.x,j=_.y;return{x:S,y:j,textAnchor:"middle",verticalAnchor:"middle"}},Oxe=function(n){var t=n.viewBox,i=n.parentViewBox,r=n.offset,a=n.position,o=t,l=o.x,u=o.y,f=o.width,h=o.height,d=h>=0?1:-1,p=d*r,g=d>0?"end":"start",b=d>0?"start":"end",w=f>=0?1:-1,k=w*r,_=w>0?"end":"start",S=w>0?"start":"end";if(a==="top"){var j={x:l+f/2,y:u-d*r,textAnchor:"middle",verticalAnchor:g};return Si(Si({},j),i?{height:Math.max(u-i.y,0),width:f}:{})}if(a==="bottom"){var T={x:l+f/2,y:u+h+p,textAnchor:"middle",verticalAnchor:b};return Si(Si({},T),i?{height:Math.max(i.y+i.height-(u+h),0),width:f}:{})}if(a==="left"){var A={x:l-k,y:u+h/2,textAnchor:_,verticalAnchor:"middle"};return Si(Si({},A),i?{width:Math.max(A.x-i.x,0),height:h}:{})}if(a==="right"){var O={x:l+f+k,y:u+h/2,textAnchor:S,verticalAnchor:"middle"};return Si(Si({},O),i?{width:Math.max(i.x+i.width-O.x,0),height:h}:{})}var M=i?{width:f,height:h}:{};return a==="insideLeft"?Si({x:l+k,y:u+h/2,textAnchor:S,verticalAnchor:"middle"},M):a==="insideRight"?Si({x:l+f-k,y:u+h/2,textAnchor:_,verticalAnchor:"middle"},M):a==="insideTop"?Si({x:l+f/2,y:u+p,textAnchor:"middle",verticalAnchor:b},M):a==="insideBottom"?Si({x:l+f/2,y:u+h-p,textAnchor:"middle",verticalAnchor:g},M):a==="insideTopLeft"?Si({x:l+k,y:u+p,textAnchor:S,verticalAnchor:b},M):a==="insideTopRight"?Si({x:l+f-k,y:u+p,textAnchor:_,verticalAnchor:b},M):a==="insideBottomLeft"?Si({x:l+k,y:u+h-p,textAnchor:S,verticalAnchor:g},M):a==="insideBottomRight"?Si({x:l+f-k,y:u+h-p,textAnchor:_,verticalAnchor:g},M):ld(a)&&(Ge(a.x)||wu(a.x))&&(Ge(a.y)||wu(a.y))?Si({x:l+$u(a.x,f),y:u+$u(a.y,h),textAnchor:"end",verticalAnchor:"end"},M):Si({x:l+f/2,y:u+h/2,textAnchor:"middle",verticalAnchor:"middle"},M)},Txe=function(n){return"cx"in n&&Ge(n.cx)};function ri(e){var n=e.offset,t=n===void 0?5:n,i=bxe(e,hxe),r=Si({offset:t},i),a=r.viewBox,o=r.position,l=r.value,u=r.children,f=r.content,h=r.className,d=h===void 0?"":h,p=r.textBreakAll;if(!a||Zn(l)&&Zn(u)&&!x.isValidElement(f)&&!Fn(f))return null;if(x.isValidElement(f))return x.cloneElement(f,r);var g;if(Fn(f)){if(g=x.createElement(f,r),x.isValidElement(g))return g}else g=Sxe(r);var b=Txe(a),w=Un(r,!0);if(b&&(o==="insideStart"||o==="insideEnd"||o==="end"))return jxe(r,g,w);var k=b?Axe(r):Oxe(r);return J.createElement(T1,Fm({className:vn("recharts-label",d)},w,k,{breakAll:p}),g)}ri.displayName="Label";var bW=function(n){var t=n.cx,i=n.cy,r=n.angle,a=n.startAngle,o=n.endAngle,l=n.r,u=n.radius,f=n.innerRadius,h=n.outerRadius,d=n.x,p=n.y,g=n.top,b=n.left,w=n.width,k=n.height,_=n.clockWise,S=n.labelViewBox;if(S)return S;if(Ge(w)&&Ge(k)){if(Ge(d)&&Ge(p))return{x:d,y:p,width:w,height:k};if(Ge(g)&&Ge(b))return{x:g,y:b,width:w,height:k}}return Ge(d)&&Ge(p)?{x:d,y:p,width:0,height:0}:Ge(t)&&Ge(i)?{cx:t,cy:i,startAngle:a||r||0,endAngle:o||r||0,innerRadius:f||0,outerRadius:h||u||l||0,clockWise:_}:n.viewBox?n.viewBox:{}},Exe=function(n,t){return n?n===!0?J.createElement(ri,{key:"label-implicit",viewBox:t}):ji(n)?J.createElement(ri,{key:"label-implicit",viewBox:t,value:n}):x.isValidElement(n)?n.type===ri?x.cloneElement(n,{key:"label-implicit",viewBox:t}):J.createElement(ri,{key:"label-implicit",content:n,viewBox:t}):Fn(n)?J.createElement(ri,{key:"label-implicit",content:n,viewBox:t}):ld(n)?J.createElement(ri,Fm({viewBox:t},n,{key:"label-implicit"})):null:null},Mxe=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=bW(n),o=wa(r,ri).map(function(u,f){return x.cloneElement(u,{viewBox:t||a,key:"label-".concat(f)})});if(!i)return o;var l=Exe(n.label,t||a);return[l].concat(mxe(o))};ri.parseViewBox=bW;ri.renderCallByParent=Mxe;var G3,SN;function Dxe(){if(SN)return G3;SN=1;function e(n){var t=n==null?0:n.length;return t?n[t-1]:void 0}return G3=e,G3}var Rxe=Dxe();const Pxe=yt(Rxe);function qm(e){"@babel/helpers - typeof";return qm=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},qm(e)}var Nxe=["valueAccessor"],$xe=["data","dataKey","clockWise","id","textBreakAll"];function zxe(e){return Fxe(e)||Bxe(e)||Ixe(e)||Lxe()}function Lxe(){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 Ixe(e,n){if(e){if(typeof e=="string")return r6(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 r6(e,n)}}function Bxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Fxe(e){if(Array.isArray(e))return r6(e)}function r6(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 Vxe(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 Wxe=function(n){return Array.isArray(n.value)?Pxe(n.value):n.value};function lo(e){var n=e.valueAccessor,t=n===void 0?Wxe:n,i=AN(e,Nxe),r=i.data,a=i.dataKey,o=i.clockWise,l=i.id,u=i.textBreakAll,f=AN(i,$xe);return!r||!r.length?null:J.createElement(Ft,{className:"recharts-label-list"},r.map(function(h,d){var p=Zn(a)?t(h,d):cr(h&&h.payload,a),g=Zn(l)?{}:{id:"".concat(l,"-").concat(d)};return J.createElement(ri,G1({},Un(h,!0),f,g,{parentViewBox:h.parentViewBox,value:p,textBreakAll:u,viewBox:ri.parseViewBox(Zn(o)?h:jN(jN({},h),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}lo.displayName="LabelList";function Gxe(e,n){return e?e===!0?J.createElement(lo,{key:"labelList-implicit",data:n}):J.isValidElement(e)||Fn(e)?J.createElement(lo,{key:"labelList-implicit",data:n,content:e}):ld(e)?J.createElement(lo,G1({data:n},e,{key:"labelList-implicit"})):null:null}function Yxe(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=wa(i,lo).map(function(o,l){return x.cloneElement(o,{data:n,key:"labelList-".concat(l)})});if(!t)return r;var a=Gxe(e.label,n);return[a].concat(zxe(r))}lo.renderCallByParent=Yxe;function Hm(e){"@babel/helpers - typeof";return Hm=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},Hm(e)}function a6(){return a6=Object.assign?Object.assign.bind():function(e){for(var n=1;n180),",").concat(+(o>f),`, `).concat(d.x,",").concat(d.y,` `);if(r>0){var g=Vi(t,i,r,o),b=Vi(t,i,r,f);p+="L ".concat(b.x,",").concat(b.y,` A `).concat(r,",").concat(r,`,0, `).concat(+(Math.abs(u)>180),",").concat(+(o<=f),`, - `).concat(g.x,",").concat(g.y," Z")}else p+="L ".concat(t,",").concat(i," Z");return p},Qxe=function(n){var t=n.cx,i=n.cy,r=n.innerRadius,a=n.outerRadius,o=n.cornerRadius,l=n.forceCornerRadius,u=n.cornerIsExternal,f=n.startAngle,h=n.endAngle,d=Fa(h-f),p=kg({cx:t,cy:i,radius:a,angle:f,sign:d,cornerRadius:o,cornerIsExternal:u}),g=p.circleTangency,b=p.lineTangency,w=p.theta,k=kg({cx:t,cy:i,radius:a,angle:h,sign:-d,cornerRadius:o,cornerIsExternal:u}),_=k.circleTangency,S=k.lineTangency,j=k.theta,T=u?Math.abs(f-h):Math.abs(f-h)-w-j;if(T<0)return l?"M ".concat(b.x,",").concat(b.y,` + `).concat(g.x,",").concat(g.y," Z")}else p+="L ".concat(t,",").concat(i," Z");return p},Jxe=function(n){var t=n.cx,i=n.cy,r=n.innerRadius,a=n.outerRadius,o=n.cornerRadius,l=n.forceCornerRadius,u=n.cornerIsExternal,f=n.startAngle,h=n.endAngle,d=Fa(h-f),p=kg({cx:t,cy:i,radius:a,angle:f,sign:d,cornerRadius:o,cornerIsExternal:u}),g=p.circleTangency,b=p.lineTangency,w=p.theta,k=kg({cx:t,cy:i,radius:a,angle:h,sign:-d,cornerRadius:o,cornerIsExternal:u}),_=k.circleTangency,S=k.lineTangency,j=k.theta,T=u?Math.abs(f-h):Math.abs(f-h)-w-j;if(T<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 - `):bW({cx:t,cy:i,innerRadius:r,outerRadius:a,startAngle:f,endAngle:h});var A="M ".concat(b.x,",").concat(b.y,` + `):wW({cx:t,cy:i,innerRadius:r,outerRadius:a,startAngle:f,endAngle:h});var A="M ".concat(b.x,",").concat(b.y,` A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(g.x,",").concat(g.y,` A`).concat(a,",").concat(a,",0,").concat(+(T>180),",").concat(+(d<0),",").concat(_.x,",").concat(_.y,` A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(S.x,",").concat(S.y,` `);if(r>0){var O=kg({cx:t,cy:i,radius:r,angle:f,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),M=O.circleTangency,$=O.lineTangency,q=O.theta,P=kg({cx:t,cy:i,radius:r,angle:h,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),L=P.circleTangency,U=P.lineTangency,G=P.theta,B=u?Math.abs(f-h):Math.abs(f-h)-q-G;if(B<0&&o===0)return"".concat(A,"L").concat(t,",").concat(i,"Z");A+="L".concat(U.x,",").concat(U.y,` A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(L.x,",").concat(L.y,` A`).concat(r,",").concat(r,",0,").concat(+(B>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 A+="L".concat(t,",").concat(i,"Z");return A},Jxe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},wW=function(n){var t=TN(TN({},Jxe),n),i=t.cx,r=t.cy,a=t.innerRadius,o=t.outerRadius,l=t.cornerRadius,u=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,d=t.endAngle,p=t.className;if(o0&&Math.abs(h-d)<360?k=Qxe({cx:i,cy:r,innerRadius:a,outerRadius:o,cornerRadius:Math.min(w,b/2),forceCornerRadius:u,cornerIsExternal:f,startAngle:h,endAngle:d}):k=bW({cx:i,cy:r,innerRadius:a,outerRadius:o,startAngle:h,endAngle:d}),J.createElement("path",a6({},Un(t,!0),{className:g,d:k,role:"img"}))};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 o6(){return o6=Object.assign?Object.assign.bind():function(e){for(var n=1;ns3e.call(e,n));function Qu(e,n){return e===n||!e&&!n&&e!==e&&n!==n}const c3e="__v",f3e="__o",d3e="_owner",{getOwnPropertyDescriptor:PN,keys:NN}=Object;function h3e(e,n){return e.byteLength===n.byteLength&&Y1(new Uint8Array(e),new Uint8Array(n))}function m3e(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 p3e(e,n){return e.byteLength===n.byteLength&&Y1(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(n.buffer,n.byteOffset,n.byteLength))}function v3e(e,n){return Qu(e.getTime(),n.getTime())}function g3e(e,n){return e.name===n.name&&e.message===n.message&&e.cause===n.cause&&e.stack===n.stack}function y3e(e,n){return e===n}function $N(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,u=0;for(;(o=a.next())&&!o.done;){const f=n.entries();let h=!1,d=0;for(;(l=f.next())&&!l.done;){if(r[d]){d++;continue}const p=o.value,g=l.value;if(t.equals(p[0],g[0],u,d,e,n,t)&&t.equals(p[1],g[1],p[0],g[0],e,n,t)){h=r[d]=!0;break}d++}if(!h)return!1;u++}return!0}const b3e=Qu;function w3e(e,n,t){const i=NN(e);let r=i.length;if(NN(n).length!==r)return!1;for(;r-- >0;)if(!kW(e,n,t,i[r]))return!1;return!0}function Rh(e,n,t){const i=RN(e);let r=i.length;if(RN(n).length!==r)return!1;let a,o,l;for(;r-- >0;)if(a=i[r],!kW(e,n,t,a)||(o=PN(e,a),l=PN(n,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function k3e(e,n){return Qu(e.valueOf(),n.valueOf())}function _3e(e,n){return e.source===n.source&&e.flags===n.flags}function zN(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 u=n.values();let f=!1,h=0;for(;(l=u.next())&&!l.done;){if(!r[h]&&t.equals(o.value,l.value,o.value,l.value,e,n,t)){f=r[h]=!0;break}h++}if(!f)return!1}return!0}function Y1(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 x3e(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 kW(e,n,t,i){return(i===d3e||i===f3e||i===c3e)&&(e.$$typeof||n.$$typeof)?!0:u3e(n,i)&&t.equals(e[i],n[i],i,i,e,n,t)}const S3e="[object ArrayBuffer]",C3e="[object Arguments]",j3e="[object Boolean]",A3e="[object DataView]",O3e="[object Date]",T3e="[object Error]",E3e="[object Map]",M3e="[object Number]",D3e="[object Object]",R3e="[object RegExp]",P3e="[object Set]",N3e="[object String]",$3e={"[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},z3e="[object URL]",L3e=Object.prototype.toString;function I3e({areArrayBuffersEqual:e,areArraysEqual:n,areDataViewsEqual:t,areDatesEqual:i,areErrorsEqual:r,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:l,areObjectsEqual:u,arePrimitiveWrappersEqual:f,areRegExpsEqual:h,areSetsEqual:d,areTypedArraysEqual:p,areUrlsEqual:g,unknownTagComparators:b}){return function(k,_,S){if(k===_)return!0;if(k==null||_==null)return!1;const j=typeof k;if(j!==typeof _)return!1;if(j!=="object")return j==="number"?l(k,_,S):j==="function"?a(k,_,S):!1;const T=k.constructor;if(T!==_.constructor)return!1;if(T===Object)return u(k,_,S);if(Array.isArray(k))return n(k,_,S);if(T===Date)return i(k,_,S);if(T===RegExp)return h(k,_,S);if(T===Map)return o(k,_,S);if(T===Set)return d(k,_,S);const A=L3e.call(k);if(A===O3e)return i(k,_,S);if(A===R3e)return h(k,_,S);if(A===E3e)return o(k,_,S);if(A===P3e)return d(k,_,S);if(A===D3e)return typeof k.then!="function"&&typeof _.then!="function"&&u(k,_,S);if(A===z3e)return g(k,_,S);if(A===T3e)return r(k,_,S);if(A===C3e)return u(k,_,S);if($3e[A])return p(k,_,S);if(A===S3e)return e(k,_,S);if(A===A3e)return t(k,_,S);if(A===j3e||A===M3e||A===N3e)return f(k,_,S);if(b){let O=b[A];if(!O){const M=l3e(k);M&&(O=b[M])}if(O)return O(k,_,S)}return!1}}function B3e({circular:e,createCustomConfig:n,strict:t}){let i={areArrayBuffersEqual:h3e,areArraysEqual:t?Rh:m3e,areDataViewsEqual:p3e,areDatesEqual:v3e,areErrorsEqual:g3e,areFunctionsEqual:y3e,areMapsEqual:t?Y3($N,Rh):$N,areNumbersEqual:b3e,areObjectsEqual:t?Rh:w3e,arePrimitiveWrappersEqual:k3e,areRegExpsEqual:_3e,areSetsEqual:t?Y3(zN,Rh):zN,areTypedArraysEqual:t?Y3(Y1,Rh):Y1,areUrlsEqual:x3e,unknownTagComparators:void 0};if(n&&(i=Object.assign({},i,n(i))),e){const r=xg(i.areArraysEqual),a=xg(i.areMapsEqual),o=xg(i.areObjectsEqual),l=xg(i.areSetsEqual);i=Object.assign({},i,{areArraysEqual:r,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:l})}return i}function F3e(e){return function(n,t,i,r,a,o,l){return e(n,t,l)}}function q3e({circular:e,comparator:n,createState:t,equals:i,strict:r}){if(t)return function(l,u){const{cache:f=e?new WeakMap:void 0,meta:h}=t();return n(l,u,{cache:f,equals:i,meta:h,strict:r})};if(e)return function(l,u){return n(l,u,{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,u){return n(l,u,a)}}const H3e=Ll();Ll({strict:!0});Ll({circular:!0});Ll({circular:!0,strict:!0});Ll({createInternalComparator:()=>Qu});Ll({strict:!0,createInternalComparator:()=>Qu});Ll({circular:!0,createInternalComparator:()=>Qu});Ll({circular:!0,createInternalComparator:()=>Qu,strict:!0});function Ll(e={}){const{circular:n=!1,createInternalComparator:t,createState:i,strict:r=!1}=e,a=B3e(e),o=I3e(a),l=t?t(o):F3e(o);return q3e({circular:n,comparator:o,createState:i,equals:l,strict:r})}function U3e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function LN(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):U3e(r)};requestAnimationFrame(i)}function s6(e){"@babel/helpers - typeof";return s6=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},s6(e)}function V3e(e){return K3e(e)||Y3e(e)||G3e(e)||W3e()}function W3e(){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 G3e(e,n){if(e){if(typeof e=="string")return IN(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 IN(e,n)}}function IN(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 S=_>1?1:_,j=S,T=0;T<8;++T){var A=d(j)-S,O=g(j);if(Math.abs(A-S)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,u=function(h,d,p){var g=-(h-d)*i,b=p*a,w=p+(g-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 jSe(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 K3(e){return ESe(e)||TSe(e)||OSe(e)||ASe()}function ASe(){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 OSe(e,n){if(e){if(typeof e=="string")return d6(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 d6(e,n)}}function TSe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ESe(e){if(Array.isArray(e))return d6(e)}function d6(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 Z1(e){return Z1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Z1(e)}var yo=(function(e){NSe(t,e);var n=$Se(t);function t(i,r){var a;MSe(this,t),a=n.call(this,i,r);var o=a.props,l=o.isActive,u=o.attributeName,f=o.from,h=o.to,d=o.steps,p=o.children,g=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(p6(a)),a.changeStyle=a.changeStyle.bind(p6(a)),!l||g<=0)return a.state={style:{}},typeof p=="function"&&(a.state={style:h}),m6(a);if(d&&d.length)a.state={style:d[0].style};else if(f){if(typeof p=="function")return a.state={style:f},m6(a);a.state={style:u?Wh({},u,f):f}}else a.state={style:{}};return a}return RSe(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,u=a.attributeName,f=a.shouldReAnimate,h=a.to,d=a.from,p=this.state.style;if(l){if(!o){var g={style:u?Wh({},u,h):h};this.state&&p&&(u&&p[u]!==h||!u&&p!==h)&&this.setState(g);return}if(!(H3e(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||f?d:r.to;if(this.state&&p){var k={style:u?Wh({},u,w):w};(u&&p[u]!==w||!u&&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,u=r.duration,f=r.easing,h=r.begin,d=r.onAnimationEnd,p=r.onAnimationStart,g=xSe(o,l,dSe(f),u,this.changeStyle),b=function(){a.stopJSAnimation=g()};this.manager.start([p,h,b,u,d])}},{key:"runStepAnimation",value:function(r){var a=this,o=r.steps,l=r.begin,u=r.onAnimationStart,f=o[0],h=f.style,d=f.duration,p=d===void 0?0:d,g=function(w,k,_){if(_===0)return w;var S=k.duration,j=k.easing,T=j===void 0?"ease":j,A=k.style,O=k.properties,M=k.onAnimationEnd,$=_>0?o[_-1]:k,q=O||Object.keys(A);if(typeof T=="function"||T==="spring")return[].concat(K3(w),[a.runJSAnimation.bind(a,{from:$.style,to:A,duration:S,easing:T}),S]);var P=qN(q,S,T),L=Pa(Pa(Pa({},$.style),A),{},{transition:P});return[].concat(K3(w),[L,S,M]).filter(eSe)};return this.manager.start([u].concat(K3(o.reduce(g,[h,Math.max(p,l)])),[r.onAnimationEnd]))}},{key:"runAnimation",value:function(r){this.manager||(this.manager=X3e());var a=r.begin,o=r.duration,l=r.attributeName,u=r.to,f=r.easing,h=r.onAnimationStart,d=r.onAnimationEnd,p=r.steps,g=r.children,b=this.manager;if(this.unSubscribe=b.subscribe(this.handleStyleChange),typeof f=="function"||typeof g=="function"||f==="spring"){this.runJSAnimation(r);return}if(p.length>1){this.runStepAnimation(r);return}var w=l?Wh({},l,u):u,k=qN(Object.keys(w),o,f);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 u=CSe(r,SSe),f=x.Children.count(a),h=this.state.style;if(typeof a=="function")return a(h);if(!l||f===0||o<=0)return a;var d=function(g){var b=g.props,w=b.style,k=w===void 0?{}:w,_=b.className,S=x.cloneElement(g,Pa(Pa({},u),{},{style:Pa(Pa({},k),h),className:_}));return S};return f===1?d(x.Children.only(a)):J.createElement("div",null,x.Children.map(a,function(p){return d(p)}))}}]),t})(x.PureComponent);yo.displayName="Animate";yo.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};yo.propTypes={from:kt.oneOfType([kt.object,kt.string]),to:kt.oneOfType([kt.object,kt.string]),attributeName:kt.string,duration:kt.number,begin:kt.number,easing:kt.oneOfType([kt.string,kt.func]),steps:kt.arrayOf(kt.shape({duration:kt.number.isRequired,style:kt.object.isRequired,easing:kt.oneOfType([kt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),kt.func]),properties:kt.arrayOf("string"),onAnimationEnd:kt.func})),children:kt.oneOfType([kt.node,kt.func]),isActive:kt.bool,canBegin:kt.bool,onAnimationEnd:kt.func,shouldReAnimate:kt.bool,onAnimationStart:kt.func,onAnimationReStart:kt.func};function Gm(e){"@babel/helpers - typeof";return Gm=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},Gm(e)}function Q1(){return Q1=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,u=i>=0?1:-1,f=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,g=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(f,",").concat(n+u*d[0],",").concat(t)),h+="L ".concat(n+i-u*d[1],",").concat(t),d[1]>0&&(h+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(f,`, + A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat($.x,",").concat($.y,"Z")}else A+="L".concat(t,",").concat(i,"Z");return A},e3e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},kW=function(n){var t=TN(TN({},e3e),n),i=t.cx,r=t.cy,a=t.innerRadius,o=t.outerRadius,l=t.cornerRadius,u=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,d=t.endAngle,p=t.className;if(o0&&Math.abs(h-d)<360?k=Jxe({cx:i,cy:r,innerRadius:a,outerRadius:o,cornerRadius:Math.min(w,b/2),forceCornerRadius:u,cornerIsExternal:f,startAngle:h,endAngle:d}):k=wW({cx:i,cy:r,innerRadius:a,outerRadius:o,startAngle:h,endAngle:d}),J.createElement("path",a6({},Un(t,!0),{className:g,d:k,role:"img"}))};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 o6(){return o6=Object.assign?Object.assign.bind():function(e){for(var n=1;nl3e.call(e,n));function Qu(e,n){return e===n||!e&&!n&&e!==e&&n!==n}const f3e="__v",d3e="__o",h3e="_owner",{getOwnPropertyDescriptor:PN,keys:NN}=Object;function m3e(e,n){return e.byteLength===n.byteLength&&Y1(new Uint8Array(e),new Uint8Array(n))}function p3e(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 v3e(e,n){return e.byteLength===n.byteLength&&Y1(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(n.buffer,n.byteOffset,n.byteLength))}function g3e(e,n){return Qu(e.getTime(),n.getTime())}function y3e(e,n){return e.name===n.name&&e.message===n.message&&e.cause===n.cause&&e.stack===n.stack}function b3e(e,n){return e===n}function $N(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,u=0;for(;(o=a.next())&&!o.done;){const f=n.entries();let h=!1,d=0;for(;(l=f.next())&&!l.done;){if(r[d]){d++;continue}const p=o.value,g=l.value;if(t.equals(p[0],g[0],u,d,e,n,t)&&t.equals(p[1],g[1],p[0],g[0],e,n,t)){h=r[d]=!0;break}d++}if(!h)return!1;u++}return!0}const w3e=Qu;function k3e(e,n,t){const i=NN(e);let r=i.length;if(NN(n).length!==r)return!1;for(;r-- >0;)if(!_W(e,n,t,i[r]))return!1;return!0}function Rh(e,n,t){const i=RN(e);let r=i.length;if(RN(n).length!==r)return!1;let a,o,l;for(;r-- >0;)if(a=i[r],!_W(e,n,t,a)||(o=PN(e,a),l=PN(n,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function _3e(e,n){return Qu(e.valueOf(),n.valueOf())}function x3e(e,n){return e.source===n.source&&e.flags===n.flags}function zN(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 u=n.values();let f=!1,h=0;for(;(l=u.next())&&!l.done;){if(!r[h]&&t.equals(o.value,l.value,o.value,l.value,e,n,t)){f=r[h]=!0;break}h++}if(!f)return!1}return!0}function Y1(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 S3e(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 _W(e,n,t,i){return(i===h3e||i===d3e||i===f3e)&&(e.$$typeof||n.$$typeof)?!0:c3e(n,i)&&t.equals(e[i],n[i],i,i,e,n,t)}const C3e="[object ArrayBuffer]",j3e="[object Arguments]",A3e="[object Boolean]",O3e="[object DataView]",T3e="[object Date]",E3e="[object Error]",M3e="[object Map]",D3e="[object Number]",R3e="[object Object]",P3e="[object RegExp]",N3e="[object Set]",$3e="[object String]",z3e={"[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},L3e="[object URL]",I3e=Object.prototype.toString;function B3e({areArrayBuffersEqual:e,areArraysEqual:n,areDataViewsEqual:t,areDatesEqual:i,areErrorsEqual:r,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:l,areObjectsEqual:u,arePrimitiveWrappersEqual:f,areRegExpsEqual:h,areSetsEqual:d,areTypedArraysEqual:p,areUrlsEqual:g,unknownTagComparators:b}){return function(k,_,S){if(k===_)return!0;if(k==null||_==null)return!1;const j=typeof k;if(j!==typeof _)return!1;if(j!=="object")return j==="number"?l(k,_,S):j==="function"?a(k,_,S):!1;const T=k.constructor;if(T!==_.constructor)return!1;if(T===Object)return u(k,_,S);if(Array.isArray(k))return n(k,_,S);if(T===Date)return i(k,_,S);if(T===RegExp)return h(k,_,S);if(T===Map)return o(k,_,S);if(T===Set)return d(k,_,S);const A=I3e.call(k);if(A===T3e)return i(k,_,S);if(A===P3e)return h(k,_,S);if(A===M3e)return o(k,_,S);if(A===N3e)return d(k,_,S);if(A===R3e)return typeof k.then!="function"&&typeof _.then!="function"&&u(k,_,S);if(A===L3e)return g(k,_,S);if(A===E3e)return r(k,_,S);if(A===j3e)return u(k,_,S);if(z3e[A])return p(k,_,S);if(A===C3e)return e(k,_,S);if(A===O3e)return t(k,_,S);if(A===A3e||A===D3e||A===$3e)return f(k,_,S);if(b){let O=b[A];if(!O){const M=u3e(k);M&&(O=b[M])}if(O)return O(k,_,S)}return!1}}function F3e({circular:e,createCustomConfig:n,strict:t}){let i={areArrayBuffersEqual:m3e,areArraysEqual:t?Rh:p3e,areDataViewsEqual:v3e,areDatesEqual:g3e,areErrorsEqual:y3e,areFunctionsEqual:b3e,areMapsEqual:t?Y3($N,Rh):$N,areNumbersEqual:w3e,areObjectsEqual:t?Rh:k3e,arePrimitiveWrappersEqual:_3e,areRegExpsEqual:x3e,areSetsEqual:t?Y3(zN,Rh):zN,areTypedArraysEqual:t?Y3(Y1,Rh):Y1,areUrlsEqual:S3e,unknownTagComparators:void 0};if(n&&(i=Object.assign({},i,n(i))),e){const r=xg(i.areArraysEqual),a=xg(i.areMapsEqual),o=xg(i.areObjectsEqual),l=xg(i.areSetsEqual);i=Object.assign({},i,{areArraysEqual:r,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:l})}return i}function q3e(e){return function(n,t,i,r,a,o,l){return e(n,t,l)}}function H3e({circular:e,comparator:n,createState:t,equals:i,strict:r}){if(t)return function(l,u){const{cache:f=e?new WeakMap:void 0,meta:h}=t();return n(l,u,{cache:f,equals:i,meta:h,strict:r})};if(e)return function(l,u){return n(l,u,{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,u){return n(l,u,a)}}const U3e=Ll();Ll({strict:!0});Ll({circular:!0});Ll({circular:!0,strict:!0});Ll({createInternalComparator:()=>Qu});Ll({strict:!0,createInternalComparator:()=>Qu});Ll({circular:!0,createInternalComparator:()=>Qu});Ll({circular:!0,createInternalComparator:()=>Qu,strict:!0});function Ll(e={}){const{circular:n=!1,createInternalComparator:t,createState:i,strict:r=!1}=e,a=F3e(e),o=B3e(a),l=t?t(o):q3e(o);return H3e({circular:n,comparator:o,createState:i,equals:l,strict:r})}function V3e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function LN(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):V3e(r)};requestAnimationFrame(i)}function s6(e){"@babel/helpers - typeof";return s6=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},s6(e)}function W3e(e){return X3e(e)||K3e(e)||Y3e(e)||G3e()}function G3e(){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 Y3e(e,n){if(e){if(typeof e=="string")return IN(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 IN(e,n)}}function IN(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 S=_>1?1:_,j=S,T=0;T<8;++T){var A=d(j)-S,O=g(j);if(Math.abs(A-S)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,u=function(h,d,p){var g=-(h-d)*i,b=p*a,w=p+(g-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 ASe(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 K3(e){return MSe(e)||ESe(e)||TSe(e)||OSe()}function OSe(){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 TSe(e,n){if(e){if(typeof e=="string")return d6(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 d6(e,n)}}function ESe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function MSe(e){if(Array.isArray(e))return d6(e)}function d6(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 Z1(e){return Z1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Z1(e)}var yo=(function(e){$Se(t,e);var n=zSe(t);function t(i,r){var a;DSe(this,t),a=n.call(this,i,r);var o=a.props,l=o.isActive,u=o.attributeName,f=o.from,h=o.to,d=o.steps,p=o.children,g=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(p6(a)),a.changeStyle=a.changeStyle.bind(p6(a)),!l||g<=0)return a.state={style:{}},typeof p=="function"&&(a.state={style:h}),m6(a);if(d&&d.length)a.state={style:d[0].style};else if(f){if(typeof p=="function")return a.state={style:f},m6(a);a.state={style:u?Wh({},u,f):f}}else a.state={style:{}};return a}return PSe(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,u=a.attributeName,f=a.shouldReAnimate,h=a.to,d=a.from,p=this.state.style;if(l){if(!o){var g={style:u?Wh({},u,h):h};this.state&&p&&(u&&p[u]!==h||!u&&p!==h)&&this.setState(g);return}if(!(U3e(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||f?d:r.to;if(this.state&&p){var k={style:u?Wh({},u,w):w};(u&&p[u]!==w||!u&&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,u=r.duration,f=r.easing,h=r.begin,d=r.onAnimationEnd,p=r.onAnimationStart,g=SSe(o,l,hSe(f),u,this.changeStyle),b=function(){a.stopJSAnimation=g()};this.manager.start([p,h,b,u,d])}},{key:"runStepAnimation",value:function(r){var a=this,o=r.steps,l=r.begin,u=r.onAnimationStart,f=o[0],h=f.style,d=f.duration,p=d===void 0?0:d,g=function(w,k,_){if(_===0)return w;var S=k.duration,j=k.easing,T=j===void 0?"ease":j,A=k.style,O=k.properties,M=k.onAnimationEnd,$=_>0?o[_-1]:k,q=O||Object.keys(A);if(typeof T=="function"||T==="spring")return[].concat(K3(w),[a.runJSAnimation.bind(a,{from:$.style,to:A,duration:S,easing:T}),S]);var P=qN(q,S,T),L=Pa(Pa(Pa({},$.style),A),{},{transition:P});return[].concat(K3(w),[L,S,M]).filter(nSe)};return this.manager.start([u].concat(K3(o.reduce(g,[h,Math.max(p,l)])),[r.onAnimationEnd]))}},{key:"runAnimation",value:function(r){this.manager||(this.manager=Z3e());var a=r.begin,o=r.duration,l=r.attributeName,u=r.to,f=r.easing,h=r.onAnimationStart,d=r.onAnimationEnd,p=r.steps,g=r.children,b=this.manager;if(this.unSubscribe=b.subscribe(this.handleStyleChange),typeof f=="function"||typeof g=="function"||f==="spring"){this.runJSAnimation(r);return}if(p.length>1){this.runStepAnimation(r);return}var w=l?Wh({},l,u):u,k=qN(Object.keys(w),o,f);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 u=jSe(r,CSe),f=x.Children.count(a),h=this.state.style;if(typeof a=="function")return a(h);if(!l||f===0||o<=0)return a;var d=function(g){var b=g.props,w=b.style,k=w===void 0?{}:w,_=b.className,S=x.cloneElement(g,Pa(Pa({},u),{},{style:Pa(Pa({},k),h),className:_}));return S};return f===1?d(x.Children.only(a)):J.createElement("div",null,x.Children.map(a,function(p){return d(p)}))}}]),t})(x.PureComponent);yo.displayName="Animate";yo.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};yo.propTypes={from:kt.oneOfType([kt.object,kt.string]),to:kt.oneOfType([kt.object,kt.string]),attributeName:kt.string,duration:kt.number,begin:kt.number,easing:kt.oneOfType([kt.string,kt.func]),steps:kt.arrayOf(kt.shape({duration:kt.number.isRequired,style:kt.object.isRequired,easing:kt.oneOfType([kt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),kt.func]),properties:kt.arrayOf("string"),onAnimationEnd:kt.func})),children:kt.oneOfType([kt.node,kt.func]),isActive:kt.bool,canBegin:kt.bool,onAnimationEnd:kt.func,shouldReAnimate:kt.bool,onAnimationStart:kt.func,onAnimationReStart:kt.func};function Gm(e){"@babel/helpers - typeof";return Gm=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},Gm(e)}function Q1(){return Q1=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,u=i>=0?1:-1,f=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,g=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(f,",").concat(n+u*d[0],",").concat(t)),h+="L ".concat(n+i-u*d[1],",").concat(t),d[1]>0&&(h+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(f,`, `).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(f,`, `).concat(n+i-u*d[2],",").concat(t+r)),h+="L ".concat(n+u*d[3],",").concat(t+r),d[3]>0&&(h+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(f,`, `).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,` @@ -555,13 +555,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho L `).concat(n+i,",").concat(t+r-l*b,` A `).concat(b,",").concat(b,",0,0,").concat(f,",").concat(n+i-u*b,",").concat(t+r,` L `).concat(n+u*b,",").concat(t+r,` - A `).concat(b,",").concat(b,",0,0,").concat(f,",").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},WSe=function(n,t){if(!n||!t)return!1;var i=n.x,r=n.y,a=t.x,o=t.y,l=t.width,u=t.height;if(Math.abs(l)>0&&Math.abs(u)>0){var f=Math.min(a,a+l),h=Math.max(a,a+l),d=Math.min(o,o+u),p=Math.max(o,o+u);return i>=f&&i<=h&&r>=d&&r<=p}return!1},GSe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Ym=function(n){var t=XN(XN({},GSe),n),i=x.useRef(),r=x.useState(-1),a=LSe(r,2),o=a[0],l=a[1];x.useEffect(function(){if(i.current&&i.current.getTotalLength)try{var T=i.current.getTotalLength();T&&l(T)}catch{}},[]);var u=t.x,f=t.y,h=t.width,d=t.height,p=t.radius,g=t.className,b=t.animationEasing,w=t.animationDuration,k=t.animationBegin,_=t.isAnimationActive,S=t.isUpdateAnimationActive;if(u!==+u||f!==+f||h!==+h||d!==+d||h===0||d===0)return null;var j=vn("recharts-rectangle",g);return S?J.createElement(yo,{canBegin:o>0,from:{width:h,height:d,x:u,y:f},to:{width:h,height:d,x:u,y:f},duration:w,animationEasing:b,isActive:S},function(T){var A=T.width,O=T.height,M=T.x,$=T.y;return J.createElement(yo,{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},J.createElement("path",Q1({},Un(t,!0),{className:j,d:ZN(M,$,A,O,p),ref:i})))}):J.createElement("path",Q1({},Un(t,!0),{className:j,d:ZN(u,f,h,d,p)}))};function v6(){return v6=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 e4e(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 n4e=function(n,t,i,r,a,o){return"M".concat(n,",").concat(a,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(i)},t4e=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,u=n.left,f=u===void 0?0:u,h=n.width,d=h===void 0?0:h,p=n.height,g=p===void 0?0:p,b=n.className,w=JSe(n,YSe),k=KSe({x:i,y:a,top:l,left:f,width:d,height:g},w);return!Ge(i)||!Ge(a)||!Ge(d)||!Ge(g)||!Ge(l)||!Ge(f)?null:J.createElement("path",g6({},Un(k,!0),{className:vn("recharts-cross",b),d:n4e(i,a,d,g,l,f)}))},X3,JN;function i4e(){if(JN)return X3;JN=1;var e=YU(),n=e(Object.getPrototypeOf,Object);return X3=n,X3}var Z3,e$;function r4e(){if(e$)return Z3;e$=1;var e=_s(),n=i4e(),t=xs(),i="[object Object]",r=Function.prototype,a=Object.prototype,o=r.toString,l=a.hasOwnProperty,u=o.call(Object);function f(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)==u}return Z3=f,Z3}var a4e=r4e();const o4e=yt(a4e);var Q3,n$;function s4e(){if(n$)return Q3;n$=1;var e=_s(),n=xs(),t="[object Boolean]";function i(r){return r===!0||r===!1||n(r)&&e(r)==t}return Q3=i,Q3}var l4e=s4e();const u4e=yt(l4e);function Xm(e){"@babel/helpers - typeof";return Xm=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},Xm(e)}function J1(){return J1=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:u,y:f},to:{upperWidth:h,lowerWidth:d,height:p,x:u,y:f},duration:w,animationEasing:b,isActive:_},function(j){var T=j.upperWidth,A=j.lowerWidth,O=j.height,M=j.x,$=j.y;return J.createElement(yo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:k,duration:w,easing:b},J.createElement("path",J1({},Un(t,!0),{className:S,d:a$(M,$,T,A,O),ref:i})))}):J.createElement("g",null,J.createElement("path",J1({},Un(t,!0),{className:S,d:a$(u,f,h,d,p)})))},w4e=["option","shapeType","propTransformer","activeClassName","isActive"];function Zm(e){"@babel/helpers - typeof";return Zm=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},Zm(e)}function k4e(e,n){if(e==null)return{};var t=_4e(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 _4e(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 o$(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 ey(e){for(var n=1;n0&&i.handleDrag(r.changedTouches[0])}),qr(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()}),qr(i,"handleLeaveWrapper",function(){(i.state.isTravellerMoving||i.state.isSlideMoving)&&(i.leaveTimer=window.setTimeout(i.handleDragEnd,i.props.leaveTimeOut))}),qr(i,"handleEnterSlideOrTraveller",function(){i.setState({isTextActive:!0})}),qr(i,"handleLeaveSlideOrTraveller",function(){i.setState({isTextActive:!1})}),qr(i,"handleSlideDragStart",function(r){var a=v$(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 X4e(n,e),W4e(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,u=l.gap,f=l.data,h=f.length-1,d=Math.min(r,a),p=Math.max(r,a),g=n.getIndexInRange(o,d),b=n.getIndexInRange(o,p);return{startIndex:g-g%u,endIndex:b===h?h:b-b%u}}},{key:"getTextOfTick",value:function(i){var r=this.props,a=r.data,o=r.tickFormatter,l=r.dataKey,u=cr(a[i],l,i);return Fn(o)?o(u,i):u}},{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,u=this.props,f=u.x,h=u.width,d=u.travellerWidth,p=u.startIndex,g=u.endIndex,b=u.onChange,w=i.pageX-a;w>0?w=Math.min(w,f+h-d-l,f+h-d-o):w<0&&(w=Math.max(w,f-o,f-l));var k=this.getIndex({startX:o+w,endX:l+w});(k.startIndex!==p||k.endIndex!==g)&&b&&b(k),this.setState({startX:o+w,endX:l+w,slideMoveStartX:i.pageX})}},{key:"handleTravellerDragStart",value:function(i,r){var a=v$(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,u=r.startX,f=this.state[o],h=this.props,d=h.x,p=h.width,g=h.travellerWidth,b=h.onChange,w=h.gap,k=h.data,_={startX:this.state.startX,endX:this.state.endX},S=i.pageX-a;S>0?S=Math.min(S,d+p-g-f):S<0&&(S=Math.max(S,d-f)),_[o]=f+S;var j=this.getIndex(_),T=j.startIndex,A=j.endIndex,O=function(){var $=k.length-1;return o==="startX"&&(l>u?T%w===0:A%w===0)||lu?A%w===0:T%w===0)||l>u&&A===$};this.setState(qr(qr({},o,f+S),"brushMoveStartX",i.pageX),function(){b&&O()&&b(j)})}},{key:"handleTravellerMoveKeyboard",value:function(i,r){var a=this,o=this.state,l=o.scaleValues,u=o.startX,f=o.endX,h=this.state[r],d=l.indexOf(h);if(d!==-1){var p=d+i;if(!(p===-1||p>=l.length)){var g=l[p];r==="startX"&&g>=f||r==="endX"&&g<=u||this.setState(qr({},r,g),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,u=i.fill,f=i.stroke;return J.createElement("rect",{stroke:f,fill:u,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,u=i.data,f=i.children,h=i.padding,d=x.Children.only(f);return d?J.cloneElement(d,{x:r,y:a,width:o,height:l,margin:h,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(i,r){var a,o,l=this,u=this.props,f=u.y,h=u.travellerWidth,d=u.height,p=u.traveller,g=u.ariaLabel,b=u.data,w=u.startIndex,k=u.endIndex,_=Math.max(i,this.props.x),S=iS(iS({},Un(this.props,!1)),{},{x:_,y:f,width:h,height:d}),j=g||"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 J.createElement(Ft,{tabIndex:0,role:"slider","aria-label":j,"aria-valuenow":i,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[r],onTouchStart:this.travellerDragStartHandlers[r],onKeyDown:function(A){["ArrowLeft","ArrowRight"].includes(A.key)&&(A.preventDefault(),A.stopPropagation(),l.handleTravellerMoveKeyboard(A.key==="ArrowRight"?1:-1,r))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},n.renderTraveller(p,S))}},{key:"renderSlide",value:function(i,r){var a=this.props,o=a.y,l=a.height,u=a.stroke,f=a.travellerWidth,h=Math.min(i,r)+f,d=Math.max(Math.abs(r-i)-f,0);return J.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,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,u=i.travellerWidth,f=i.stroke,h=this.state,d=h.startX,p=h.endX,g=5,b={pointerEvents:"none",fill:f};return J.createElement(Ft,{className:"recharts-brush-texts"},J.createElement(T1,ty({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-g,y:o+l/2},b),this.getTextOfTick(r)),J.createElement(T1,ty({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,p)+u+g,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,u=i.y,f=i.width,h=i.height,d=i.alwaysShowText,p=this.state,g=p.startX,b=p.endX,w=p.isTextActive,k=p.isSlideMoving,_=p.isTravellerMoving,S=p.isTravellerFocused;if(!r||!r.length||!Ge(l)||!Ge(u)||!Ge(f)||!Ge(h)||f<=0||h<=0)return null;var j=vn("recharts-brush",a),T=J.Children.count(o)===1,A=U4e("userSelect","none");return J.createElement(Ft,{className:j,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:A},this.renderBackground(),T&&this.renderPanorama(),this.renderSlide(g,b),this.renderTravellerLayer(g,"startX"),this.renderTravellerLayer(b,"endX"),(w||k||_||S||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(i){var r=i.x,a=i.y,o=i.width,l=i.height,u=i.stroke,f=Math.floor(a+l/2)-1;return J.createElement(J.Fragment,null,J.createElement("rect",{x:r,y:a,width:o,height:l,fill:u,stroke:"none"}),J.createElement("line",{x1:r+1,y1:f,x2:r+o-1,y2:f,fill:"none",stroke:"#fff"}),J.createElement("line",{x1:r+1,y1:f+2,x2:r+o-1,y2:f+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(i,r){var a;return J.isValidElement(i)?a=J.cloneElement(i,r):Fn(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,u=i.travellerWidth,f=i.updateId,h=i.startIndex,d=i.endIndex;if(a!==r.prevData||f!==r.prevUpdateId)return iS({prevData:a,prevTravellerWidth:u,prevUpdateId:f,prevX:l,prevWidth:o},a&&a.length?Q4e({data:a,width:o,x:l,travellerWidth:u,startIndex:h,endIndex:d}):{scale:null,scaleValues:null});if(r.scale&&(o!==r.prevWidth||l!==r.prevX||u!==r.prevTravellerWidth)){r.scale.range([l,l+o-u]);var p=r.scale.domain().map(function(g){return r.scale(g)});return{prevData:a,prevTravellerWidth:u,prevUpdateId:f,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 u=Math.floor((o+l)/2);i[u]>r?l=u:o=u}return r>=i[l]?l:o}}])})(x.PureComponent);qr(Cf,"displayName","Brush");qr(Cf,"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 rS,g$;function J4e(){if(g$)return rS;g$=1;var e=wj();function n(t,i){var r;return e(t,function(a,o,l){return r=i(a,o,l),!r}),!!r}return rS=n,rS}var aS,y$;function e6e(){if(y$)return aS;y$=1;var e=FU(),n=Nl(),t=J4e(),i=Tr(),r=Z0();function a(o,l,u){var f=i(o)?e:t;return u&&r(o,l,u)&&(l=void 0),f(o,n(l,3))}return aS=a,aS}var n6e=e6e();const t6e=yt(n6e);var uo=function(n,t){var i=n.alwaysShow,r=n.ifOverflow;return i&&(r="extendDomain"),r===t},oS,b$;function i6e(){if(b$)return oS;b$=1;var e=aV();function n(t,i,r){i=="__proto__"&&e?e(t,i,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[i]=r}return oS=n,oS}var sS,w$;function r6e(){if(w$)return sS;w$=1;var e=i6e(),n=iV(),t=Nl();function i(r,a){var o={};return a=t(a,3),n(r,function(l,u,f){e(o,u,a(l,u,f))}),o}return sS=i,sS}var a6e=r6e();const o6e=yt(a6e);var lS,k$;function s6e(){if(k$)return lS;k$=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 v6e(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 g6e(e,n){var t=e.x,i=e.y,r=p6e(e,f6e),a="".concat(t),o=parseInt(a,10),l="".concat(i),u=parseInt(l,10),f="".concat(n.height||r.height),h=parseInt(f,10),d="".concat(n.width||r.width),p=parseInt(d,10);return Ph(Ph(Ph(Ph(Ph({},n),r),o?{x:o}:{}),u?{y:u}:{}),{},{height:h,width:p,name:n.name,radius:n.radius})}function C$(e){return J.createElement(T4e,b6({shapeType:"rectangle",propTransformer:g6e,activeClassName:"recharts-active-bar"},e))}var y6e=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=Ge(i)||Tge(i);return a?n(i,r):(a||Lu(),t)}},b6e=["value","background"],RW;function jf(e){"@babel/helpers - typeof";return jf=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},jf(e)}function w6e(e,n){if(e==null)return{};var t=k6e(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 k6e(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 ry(){return ry=Object.assign?Object.assign.bind():function(e){for(var n=1;n0&&Math.abs(R)0&&Math.abs(B)0&&(G=Math.min((Q||0)-(B[ie-1]||0),G))}),Number.isFinite(G)){var R=G/U,D=w.layout==="vertical"?i.height:i.width;if(w.padding==="gap"&&(M=R*D/2),w.padding==="no-gap"){var z=$u(n.barCategoryGap,R*D),H=R*D/2;M=H-z-(H-z)/D*z}}}r==="xAxis"?$=[i.left+(j.left||0)+(M||0),i.left+i.width-(j.right||0)-(M||0)]:r==="yAxis"?$=u==="horizontal"?[i.top+i.height-(j.bottom||0),i.top+(j.top||0)]:[i.top+(j.top||0)+(M||0),i.top+i.height-(j.bottom||0)-(M||0)]:$=w.range,A&&($=[$[1],$[0]]);var Y=V2e(w,a,p),N=Y.scale,W=Y.realScaleType;N.domain(_).range($),W2e(N);var V=exe(N,Na(Na({},w),{},{realScaleType:W}));r==="xAxis"?(L=k==="top"&&!T||k==="bottom"&&T,q=i.left,P=d[O]-L*w.height):r==="yAxis"&&(L=k==="left"&&!T||k==="right"&&T,q=d[O]-L*w.width,P=i.top);var I=Na(Na(Na({},w),V),{},{realScaleType:W,x:q,y:P,scale:N,width:r==="xAxis"?i.width:w.width,height:r==="yAxis"?i.height:w.height});return I.bandSize=V1(I,V),!w.hide&&r==="xAxis"?d[O]+=(L?-1:1)*I.height:w.hide||(d[O]+=(L?-1:1)*I.width),Na(Na({},g),{},cb({},b,I))},{})},zW=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)}},D6e=function(n){var t=n.x1,i=n.y1,r=n.x2,a=n.y2;return zW({x:t,y:i},{x:r,y:a})},LW=(function(){function e(n){T6e(this,e),this.scale=n}return E6e(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 u=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+u}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)}}])})();cb(LW,"EPS",1e-4);var Xj=function(n){var t=Object.keys(n).reduce(function(i,r){return Na(Na({},i),{},cb({},r,LW.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 o6e(r,function(u,f){return t[f].apply(u,{bandAware:o,position:l})})},isInRange:function(r){return DW(r,function(a,o){return t[o].isInRange(a)})}})};function R6e(e){return(e%180+180)%180}var P6e=function(n){var t=n.width,i=n.height,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=R6e(r),o=a*Math.PI/180,l=Math.atan(i/t),u=o>l&&o-1?u[f?a[h]:h]:void 0}}return fS=i,fS}var dS,M$;function $6e(){if(M$)return dS;M$=1;var e=OW();function n(t){var i=e(t),r=i%1;return i===i?r?i-r:i:0}return dS=n,dS}var hS,D$;function z6e(){if(D$)return hS;D$=1;var e=QU(),n=Nl(),t=$6e(),i=Math.max;function r(a,o,l){var u=a==null?0:a.length;if(!u)return-1;var f=l==null?0:t(l);return f<0&&(f=i(u+f,0)),e(a,n(o,3),f)}return hS=r,hS}var mS,R$;function L6e(){if(R$)return mS;R$=1;var e=N6e(),n=z6e(),t=e(n);return mS=t,mS}var I6e=L6e();const B6e=yt(I6e);var F6e=hU();const q6e=yt(F6e);var H6e=q6e(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("")}),Zj=x.createContext(void 0),Qj=x.createContext(void 0),IW=x.createContext(void 0),BW=x.createContext({}),FW=x.createContext(void 0),qW=x.createContext(0),HW=x.createContext(0),P$=function(n){var t=n.state,i=t.xAxisMap,r=t.yAxisMap,a=t.offset,o=n.clipPathId,l=n.children,u=n.width,f=n.height,h=H6e(a);return J.createElement(Zj.Provider,{value:i},J.createElement(Qj.Provider,{value:r},J.createElement(BW.Provider,{value:a},J.createElement(IW.Provider,{value:h},J.createElement(FW.Provider,{value:o},J.createElement(qW.Provider,{value:f},J.createElement(HW.Provider,{value:u},l)))))))},U6e=function(){return x.useContext(FW)},UW=function(n){var t=x.useContext(Zj);t==null&&Lu();var i=t[n];return i==null&&Lu(),i},V6e=function(){var n=x.useContext(Zj);return ol(n)},W6e=function(){var n=x.useContext(Qj),t=B6e(n,function(i){return DW(i.domain,Number.isFinite)});return t||ol(n)},VW=function(n){var t=x.useContext(Qj);t==null&&Lu();var i=t[n];return i==null&&Lu(),i},G6e=function(){var n=x.useContext(IW);return n},Y6e=function(){return x.useContext(BW)},Jj=function(){return x.useContext(HW)},eA=function(){return x.useContext(qW)};function Af(e){"@babel/helpers - typeof";return Af=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},Af(e)}function K6e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function X6e(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 MCe(e,n){return QW(e,n+1)}function DCe(e,n,t,i,r){for(var a=(i||[]).slice(),o=n.start,l=n.end,u=0,f=1,h=o,d=function(){var b=i==null?void 0:i[u];if(b===void 0)return{v:QW(i,f)};var w=u,k,_=function(){return k===void 0&&(k=t(b,w)),k},S=b.coordinate,j=u===0||uy(e,S,_,h,l);j||(u=0,h=o,f+=1),j&&(h=S+e*(_()/2+r),u+=f)},p;f<=a.length;)if(p=d(),p)return p.v;return[]}function tp(e){"@babel/helpers - typeof";return tp=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},tp(e)}function q$(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 Xi(e){for(var n=1;n0?g.coordinate-k*e:g.coordinate})}else a[p]=g=Xi(Xi({},g),{},{tickCoord:g.coordinate});var _=uy(e,g.tickCoord,w,l,u);_&&(u=g.tickCoord-e*(w()/2+r),a[p]=Xi(Xi({},g),{},{isShow:!0}))},h=o-1;h>=0;h--)f(h);return a}function zCe(e,n,t,i,r,a){var o=(i||[]).slice(),l=o.length,u=n.start,f=n.end;if(a){var h=i[l-1],d=t(h,l-1),p=e*(h.coordinate+e*d/2-f);o[l-1]=h=Xi(Xi({},h),{},{tickCoord:p>0?h.coordinate-p*e:h.coordinate});var g=uy(e,h.tickCoord,function(){return d},u,f);g&&(f=h.tickCoord-e*(d/2+r),o[l-1]=Xi(Xi({},h),{},{isShow:!0}))}for(var b=a?l-1:l,w=function(S){var j=o[S],T,A=function(){return T===void 0&&(T=t(j,S)),T};if(S===0){var O=e*(j.coordinate-e*A()/2-u);o[S]=j=Xi(Xi({},j),{},{tickCoord:O<0?j.coordinate-O*e:j.coordinate})}else o[S]=j=Xi(Xi({},j),{},{tickCoord:j.coordinate});var M=uy(e,j.tickCoord,A,u,f);M&&(u=j.tickCoord+e*(A()/2+r),o[S]=Xi(Xi({},j),{},{isShow:!0}))},k=0;k=2?Fa(r[1].coordinate-r[0].coordinate):1,_=ECe(a,k,g);return u==="equidistantPreserveStart"?DCe(k,_,w,r,o):(u==="preserveStart"||u==="preserveStartEnd"?p=zCe(k,_,w,r,o,u==="preserveStartEnd"):p=$Ce(k,_,w,r,o),p.filter(function(S){return S.isShow}))}var LCe=["viewBox"],ICe=["viewBox"],BCe=["ticks"];function Ef(e){"@babel/helpers - typeof";return Ef=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},Ef(e)}function Yc(){return Yc=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 FCe(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 qCe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function U$(e,n){for(var t=0;t0?u(this.props):u(g)),o<=0||l<=0||!b||!b.length?null:J.createElement(Ft,{className:vn("recharts-cartesian-axis",f),ref:function(k){i.layerReference=k}},a&&this.renderAxisLine(),this.renderTicks(b,this.state.fontSize,this.state.letterSpacing),ri.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(i,r,a){var o,l=vn(r.className,"recharts-cartesian-axis-tick-value");return J.isValidElement(i)?o=J.cloneElement(i,xi(xi({},r),{},{className:l})):Fn(i)?o=i(xi(xi({},r),{},{className:l})):o=J.createElement(T1,Yc({},r,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(x.Component);iA(pd,"displayName","CartesianAxis");iA(pd,"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 KCe=["x1","y1","x2","y2","key"],XCe=["offset"];function Iu(e){"@babel/helpers - typeof";return Iu=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},Iu(e)}function V$(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 Qi(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function e9e(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 n9e=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,u=n.ry;return J.createElement("rect",{x:r,y:a,ry:u,width:o,height:l,stroke:"none",fill:t,fillOpacity:i,className:"recharts-cartesian-grid-bg"})};function nG(e,n){var t;if(J.isValidElement(e))t=J.cloneElement(e,n);else if(Fn(e))t=e(n);else{var i=n.x1,r=n.y1,a=n.x2,o=n.y2,l=n.key,u=W$(n,KCe),f=Un(u,!1);f.offset;var h=W$(f,XCe);t=J.createElement("line",xu({},h,{x1:i,y1:r,x2:a,y2:o,fill:"none",key:l}))}return t}function t9e(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,u){var f=Qi(Qi({},e),{},{x1:n,y1:l,x2:n+t,y2:l,key:"line-".concat(u),index:u});return nG(r,f)});return J.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function i9e(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,u){var f=Qi(Qi({},e),{},{x1:l,y1:n,x2:l,y2:n+t,key:"line-".concat(u),index:u});return nG(r,f)});return J.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function r9e(e){var n=e.horizontalFill,t=e.fillOpacity,i=e.x,r=e.y,a=e.width,o=e.height,l=e.horizontalPoints,u=e.horizontal,f=u===void 0?!0:u;if(!f||!n||!n.length)return null;var h=l.map(function(p){return Math.round(p+r-r)}).sort(function(p,g){return p-g});r!==h[0]&&h.unshift(0);var d=h.map(function(p,g){var b=!h[g+1],w=b?r+o-p:h[g+1]-p;if(w<=0)return null;var k=g%n.length;return J.createElement("rect",{key:"react-".concat(g),y:p,x:i,height:w,width:a,stroke:"none",fill:n[k],fillOpacity:t,className:"recharts-cartesian-grid-bg"})});return J.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function a9e(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,u=e.height,f=e.verticalPoints;if(!t||!i||!i.length)return null;var h=f.map(function(p){return Math.round(p+a-a)}).sort(function(p,g){return p-g});a!==h[0]&&h.unshift(0);var d=h.map(function(p,g){var b=!h[g+1],w=b?a+l-p:h[g+1]-p;if(w<=0)return null;var k=g%i.length;return J.createElement("rect",{key:"react-".concat(g),x:p,y:o,width:w,height:u,stroke:"none",fill:i[k],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return J.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var o9e=function(n,t){var i=n.xAxis,r=n.width,a=n.height,o=n.offset;return pW(tA(Qi(Qi(Qi({},pd.defaultProps),i),{},{ticks:Qo(i,!0),viewBox:{x:0,y:0,width:r,height:a}})),o.left,o.left+o.width,t)},s9e=function(n,t){var i=n.yAxis,r=n.width,a=n.height,o=n.offset;return pW(tA(Qi(Qi(Qi({},pd.defaultProps),i),{},{ticks:Qo(i,!0),viewBox:{x:0,y:0,width:r,height:a}})),o.top,o.top+o.height,t)},Bc={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function pb(e){var n,t,i,r,a,o,l=Jj(),u=eA(),f=Y6e(),h=Qi(Qi({},e),{},{stroke:(n=e.stroke)!==null&&n!==void 0?n:Bc.stroke,fill:(t=e.fill)!==null&&t!==void 0?t:Bc.fill,horizontal:(i=e.horizontal)!==null&&i!==void 0?i:Bc.horizontal,horizontalFill:(r=e.horizontalFill)!==null&&r!==void 0?r:Bc.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Bc.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Bc.verticalFill,x:Ge(e.x)?e.x:f.left,y:Ge(e.y)?e.y:f.top,width:Ge(e.width)?e.width:f.width,height:Ge(e.height)?e.height:f.height}),d=h.x,p=h.y,g=h.width,b=h.height,w=h.syncWithTicks,k=h.horizontalValues,_=h.verticalValues,S=V6e(),j=W6e();if(!Ge(g)||g<=0||!Ge(b)||b<=0||!Ge(d)||d!==+d||!Ge(p)||p!==+p)return null;var T=h.verticalCoordinatesGenerator||o9e,A=h.horizontalCoordinatesGenerator||s9e,O=h.horizontalPoints,M=h.verticalPoints;if((!O||!O.length)&&Fn(A)){var $=k&&k.length,q=A({yAxis:j?Qi(Qi({},j),{},{ticks:$?k:j.ticks}):void 0,width:l,height:u,offset:f},$?!0:w);is(Array.isArray(q),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Iu(q),"]")),Array.isArray(q)&&(O=q)}if((!M||!M.length)&&Fn(T)){var P=_&&_.length,L=T({xAxis:S?Qi(Qi({},S),{},{ticks:P?_:S.ticks}):void 0,width:l,height:u,offset:f},P?!0:w);is(Array.isArray(L),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Iu(L),"]")),Array.isArray(L)&&(M=L)}return J.createElement("g",{className:"recharts-cartesian-grid"},J.createElement(n9e,{fill:h.fill,fillOpacity:h.fillOpacity,x:h.x,y:h.y,width:h.width,height:h.height,ry:h.ry}),J.createElement(t9e,xu({},h,{offset:f,horizontalPoints:O,xAxis:S,yAxis:j})),J.createElement(i9e,xu({},h,{offset:f,verticalPoints:M,xAxis:S,yAxis:j})),J.createElement(r9e,xu({},h,{horizontalPoints:O})),J.createElement(a9e,xu({},h,{verticalPoints:M})))}pb.displayName="CartesianGrid";var l9e=["type","layout","connectNulls","ref"],u9e=["key"];function Mf(e){"@babel/helpers - typeof";return Mf=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},Mf(e)}function G$(e,n){if(e==null)return{};var t=c9e(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 c9e(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 om(){return om=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){g=[].concat(Fc(u.slice(0,b)),[d-w]);break}var k=g.length%2===0?[0,p]:[p];return[].concat(Fc(n.repeat(u,h)),Fc(g),k).map(function(_){return"".concat(_,"px")}).join(", ")}),$a(t,"id",cd("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 w9e(n,e),v9e(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,u=a.yAxis,f=a.layout,h=a.children,d=wa(h,zp);if(!d)return null;var p=function(w,k){return{x:w.x,y:w.y,value:w.value,errorVal:cr(w.payload,k)}},g={clipPath:i?"url(#clipPath-".concat(r,")"):null};return J.createElement(Ft,g,d.map(function(b){return J.cloneElement(b,{key:"bar-".concat(b.props.dataKey),data:o,xAxis:l,yAxis:u,layout:f,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,u=l.dot,f=l.points,h=l.dataKey,d=Un(this.props,!1),p=Un(u,!0),g=f.map(function(w,k){var _=Fr(Fr(Fr({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:f});return n.renderDotItem(u,_)}),b={clipPath:i?"url(#clipPath-".concat(r?"":"dots-").concat(a,")"):null};return J.createElement(Ft,om({className:"recharts-line-dots",key:"dots"},b),g)}},{key:"renderCurveStatically",value:function(i,r,a,o){var l=this.props,u=l.type,f=l.layout,h=l.connectNulls;l.ref;var d=G$(l,l9e),p=Fr(Fr(Fr({},Un(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:r?"url(#clipPath-".concat(a,")"):null,points:i},o),{},{type:u,layout:f,connectNulls:h});return J.createElement(rf,om({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(i,r){var a=this,o=this.props,l=o.points,u=o.strokeDasharray,f=o.isAnimationActive,h=o.animationBegin,d=o.animationDuration,p=o.animationEasing,g=o.animationId,b=o.animateNewValues,w=o.width,k=o.height,_=this.state,S=_.prevPoints,j=_.totalLength;return J.createElement(yo,{begin:h,duration:d,isActive:f,easing:p,from:{t:0},to:{t:1},key:"line-".concat(g),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(T){var A=T.t;if(S){var O=S.length/l.length,M=l.map(function(U,G){var B=Math.floor(G*O);if(S[B]){var R=S[B],D=Ui(R.x,U.x),z=Ui(R.y,U.y);return Fr(Fr({},U),{},{x:D(A),y:z(A)})}if(b){var H=Ui(w*2,U.x),Y=Ui(k/2,U.y);return Fr(Fr({},U),{},{x:H(A),y:Y(A)})}return Fr(Fr({},U),{},{x:U.x,y:U.y})});return a.renderCurveStatically(M,i,r)}var $=Ui(0,j),q=$(A),P;if(u){var L="".concat(u).split(/[,\s]+/gim).map(function(U){return parseFloat(U)});P=a.getStrokeDasharray(q,j,L)}else P=a.generateSimpleStrokeDasharray(j,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,u=this.state,f=u.prevPoints,h=u.totalLength;return l&&o&&o.length&&(!f&&h>0||!kf(f,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,u=r.className,f=r.xAxis,h=r.yAxis,d=r.top,p=r.left,g=r.width,b=r.height,w=r.isAnimationActive,k=r.id;if(a||!l||!l.length)return null;var _=this.state.isAnimationFinished,S=l.length===1,j=vn("recharts-line",u),T=f&&f.allowDataOverflow,A=h&&h.allowDataOverflow,O=T||A,M=Zn(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,L=$.strokeWidth,U=L===void 0?2:L,G=yU(o)?o:{},B=G.clipDot,R=B===void 0?!0:B,D=P*2+U;return J.createElement(Ft,{className:j},T||A?J.createElement("defs",null,J.createElement("clipPath",{id:"clipPath-".concat(M)},J.createElement("rect",{x:T?p:p-g/2,y:A?d:d-b/2,width:T?g:g*2,height:A?b:b*2})),!R&&J.createElement("clipPath",{id:"clipPath-dots-".concat(M)},J.createElement("rect",{x:p-D/2,y:d-D/2,width:g+D,height:b+D}))):null,!S&&this.renderCurve(O,M),this.renderErrorBar(O,M),(S||o)&&this.renderDots(O,R,M),(!w||_)&&lo.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(Fc(i),[0]):i,o=[],l=0;l=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 Su(){return Su=Object.assign?Object.assign.bind():function(e){for(var n=1;n0||!kf(h,o)||!kf(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,u=r.className,f=r.top,h=r.left,d=r.xAxis,p=r.yAxis,g=r.width,b=r.height,w=r.isAnimationActive,k=r.id;if(a||!l||!l.length)return null;var _=this.state.isAnimationFinished,S=l.length===1,j=vn("recharts-area",u),T=d&&d.allowDataOverflow,A=p&&p.allowDataOverflow,O=T||A,M=Zn(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,L=$.strokeWidth,U=L===void 0?2:L,G=yU(o)?o:{},B=G.clipDot,R=B===void 0?!0:B,D=P*2+U;return J.createElement(Ft,{className:j},T||A?J.createElement("defs",null,J.createElement("clipPath",{id:"clipPath-".concat(M)},J.createElement("rect",{x:T?h:h-g/2,y:A?f:f-b/2,width:T?g:g*2,height:A?b:b*2})),!R&&J.createElement("clipPath",{id:"clipPath-dots-".concat(M)},J.createElement("rect",{x:h-D/2,y:f-D/2,width:g+D,height:b+D}))):null,S?null:this.renderArea(O,M),(o||S)&&this.renderDots(O,R,M),(!w||_)&&lo.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}}])})(x.PureComponent);rG=ms;ro(ms,"displayName","Area");ro(ms,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ku.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});ro(ms,"getBaseValue",function(e,n,t,i){var r=e.layout,a=e.baseValue,o=n.props.baseValue,l=o??a;if(Ge(l)&&typeof l=="number")return l;var u=r==="horizontal"?i:t,f=u.scale.domain();if(u.type==="number"){var h=Math.max(f[0],f[1]),d=Math.min(f[0],f[1]);return l==="dataMin"?d:l==="dataMax"||h<0?h:Math.max(Math.min(f[0],f[1]),0)}return l==="dataMin"?f[0]:l==="dataMax"?f[1]:f[0]});ro(ms,"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,u=e.dataKey,f=e.stackedData,h=e.dataStartIndex,d=e.displayedData,p=e.offset,g=n.layout,b=f&&f.length,w=rG.getBaseValue(n,t,i,r),k=g==="horizontal",_=!1,S=d.map(function(T,A){var O;b?O=f[h+A]:(O=cr(T,u),Array.isArray(O)?_=!0:O=[w,O]);var M=O[1]==null||b&&cr(T,u)==null;return k?{x:U1({axis:i,ticks:a,bandSize:l,entry:T,index:A}),y:M?null:r.scale(O[1]),value:O,payload:T}:{x:M?null:i.scale(O[1]),y:U1({axis:r,ticks:o,bandSize:l,entry:T,index:A}),value:O,payload:T}}),j;return b||_?j=S.map(function(T){var A=Array.isArray(T.value)?T.value[0]:null;return k?{x:T.x,y:A!=null&&T.y!=null?r.scale(A):null}:{x:A!=null?i.scale(A):null,y:T.y}}):j=k?r.scale(w):i.scale(w),el({points:S,baseLine:j,layout:g,isRange:_},p)});ro(ms,"renderDotItem",function(e,n){var t;if(J.isValidElement(e))t=J.cloneElement(e,n);else if(Fn(e))t=e(n);else{var i=vn("recharts-area-dot",typeof e!="boolean"?e.className:""),r=n.key,a=aG(n,x9e);t=J.createElement(sb,Su({},a,{key:r,className:i}))}return t});function Rf(e){"@babel/helpers - typeof";return Rf=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},Rf(e)}function D9e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function R9e(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 wje(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 kje(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function _je(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t0?o:n&&n.length&&Ge(r)&&Ge(a)?n.slice(r,a+1):[]};function wG(e){return e==="number"?[0,"auto"]:void 0}var I6=function(n,t,i,r){var a=n.graphicalItems,o=n.tooltipAxis,l=vb(t,n);return i<0||!a||!a.length||i>=l.length?null:a.reduce(function(u,f){var h,d=(h=f.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 g=d===void 0?l:d;p=v1(g,o.dataKey,r)}else p=d&&d[i]||l[i];return p?[].concat($f(u),[gW(f,p)]):u},[])},rz=function(n,t,i,r){var a=r||{x:n.chartX,y:n.chartY},o=Pje(a,i),l=n.orderedTooltipTicks,u=n.tooltipAxis,f=n.tooltipTicks,h=I2e(o,l,f,u);if(h>=0&&f){var d=f[h]&&f[h].value,p=I6(n,t,h,d),g=Nje(i,l,h,a);return{activeTooltipIndex:h,activeLabel:d,activePayload:p,activeCoordinate:g}}return null},$je=function(n,t){var i=t.axes,r=t.graphicalItems,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,u=t.dataStartIndex,f=t.dataEndIndex,h=n.layout,d=n.children,p=n.stackOffset,g=mW(h,a);return i.reduce(function(b,w){var k,_=w.type.defaultProps!==void 0?Te(Te({},w.type.defaultProps),w.props):w.props,S=_.type,j=_.dataKey,T=_.allowDataOverflow,A=_.allowDuplicatedCategory,O=_.scale,M=_.ticks,$=_.includeHidden,q=_[o];if(b[q])return b;var P=vb(n.data,{graphicalItems:r.filter(function(V){var I,Q=o in V.props?V.props[o]:(I=V.type.defaultProps)===null||I===void 0?void 0:I[o];return Q===q}),dataStartIndex:u,dataEndIndex:f}),L=P.length,U,G,B;lje(_.domain,T,S)&&(U=t6(_.domain,null,T),g&&(S==="number"||O!=="auto")&&(B=rm(P,j,"category")));var R=wG(S);if(!U||U.length===0){var D,z=(D=_.domain)!==null&&D!==void 0?D:R;if(j){if(U=rm(P,j,S),S==="category"&&g){var H=Mge(U);A&&H?(G=U,U=ny(0,L)):A||(U=bN(z,U,w).reduce(function(V,I){return V.indexOf(I)>=0?V:[].concat($f(V),[I])},[]))}else if(S==="category")A?U=U.filter(function(V){return V!==""&&!Zn(V)}):U=bN(z,U,w).reduce(function(V,I){return V.indexOf(I)>=0||I===""||Zn(I)?V:[].concat($f(V),[I])},[]);else if(S==="number"){var Y=U2e(P,r.filter(function(V){var I,Q,ie=o in V.props?V.props[o]:(I=V.type.defaultProps)===null||I===void 0?void 0:I[o],re="hide"in V.props?V.props.hide:(Q=V.type.defaultProps)===null||Q===void 0?void 0:Q.hide;return ie===q&&($||!re)}),j,a,h);Y&&(U=Y)}g&&(S==="number"||O!=="auto")&&(B=rm(P,j,"category"))}else g?U=ny(0,L):l&&l[q]&&l[q].hasStack&&S==="number"?U=p==="expand"?[0,1]:vW(l[q].stackGroups,u,f):U=hW(P,r.filter(function(V){var I=o in V.props?V.props[o]:V.type.defaultProps[o],Q="hide"in V.props?V.props.hide:V.type.defaultProps.hide;return I===q&&($||!Q)}),S,h,!0);if(S==="number")U=$6(d,U,q,a,M),z&&(U=t6(z,U,T));else if(S==="category"&&z){var N=z,W=U.every(function(V){return N.indexOf(V)>=0});W&&(U=N)}}return Te(Te({},b),{},Tn({},q,Te(Te({},_),{},{axisType:a,domain:U,categoricalDomain:B,duplicateDomain:G,originalDomain:(k=_.domain)!==null&&k!==void 0?k:R,isCategorical:g,layout:h})))},{})},zje=function(n,t){var i=t.graphicalItems,r=t.Axis,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,u=t.dataStartIndex,f=t.dataEndIndex,h=n.layout,d=n.children,p=vb(n.data,{graphicalItems:i,dataStartIndex:u,dataEndIndex:f}),g=p.length,b=mW(h,a),w=-1;return i.reduce(function(k,_){var S=_.type.defaultProps!==void 0?Te(Te({},_.type.defaultProps),_.props):_.props,j=S[o],T=wG("number");if(!k[j]){w++;var A;return b?A=ny(0,g):l&&l[j]&&l[j].hasStack?(A=vW(l[j].stackGroups,u,f),A=$6(d,A,j,a)):(A=t6(T,hW(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===j&&!P}),"number",h),r.defaultProps.allowDataOverflow),A=$6(d,A,j,a)),Te(Te({},k),{},Tn({},j,Te(Te({axisType:a},r.defaultProps),{},{hide:!0,orientation:ba(Dje,"".concat(a,".").concat(w%2),null),domain:A,originalDomain:T,isCategorical:b,layout:h})))}return k},{})},Lje=function(n,t){var i=t.axisType,r=i===void 0?"xAxis":i,a=t.AxisComp,o=t.graphicalItems,l=t.stackGroups,u=t.dataStartIndex,f=t.dataEndIndex,h=n.children,d="".concat(r,"Id"),p=wa(h,a),g={};return p&&p.length?g=$je(n,{axes:p,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:u,dataEndIndex:f}):o&&o.length&&(g=zje(n,{Axis:a,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:u,dataEndIndex:f})),g},Ije=function(n){var t=ol(n),i=Qo(t,!1,!0);return{tooltipTicks:i,orderedTooltipTicks:kj(i,function(r){return r.coordinate}),tooltipAxis:t,tooltipAxisBandSize:V1(t,i)}},az=function(n){var t=n.children,i=n.defaultShowTooltip,r=Ur(t,Cf),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}},Bje=function(n){return!n||!n.length?!1:n.some(function(t){var i=ts(t&&t.type);return i&&i.indexOf("Bar")>=0})},oz=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"}},Fje=function(n,t){var i=n.props,r=n.graphicalItems,a=n.xAxisMap,o=a===void 0?{}:a,l=n.yAxisMap,u=l===void 0?{}:l,f=i.width,h=i.height,d=i.children,p=i.margin||{},g=Ur(d,Cf),b=Ur(d,rs),w=Object.keys(u).reduce(function(A,O){var M=u[O],$=M.orientation;return!M.mirror&&!M.hide?Te(Te({},A),{},Tn({},$,A[$]+M.width)):A},{left:p.left||0,right:p.right||0}),k=Object.keys(o).reduce(function(A,O){var M=o[O],$=M.orientation;return!M.mirror&&!M.hide?Te(Te({},A),{},Tn({},$,ba(A,"".concat($))+M.height)):A},{top:p.top||0,bottom:p.bottom||0}),_=Te(Te({},k),w),S=_.bottom;g&&(_.bottom+=g.props.height||Cf.defaultProps.height),b&&t&&(_=q2e(_,r,i,t));var j=f-_.left-_.right,T=h-_.top-_.bottom;return Te(Te({brushBottom:S},_),{},{width:Math.max(j,0),height:Math.max(T,0)})},qje=function(n,t){if(t==="xAxis")return n[t].width;if(t==="yAxis")return n[t].height},rA=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,u=n.axisComponents,f=n.legendContent,h=n.formatAxisMap,d=n.defaultProps,p=function(_,S){var j=S.graphicalItems,T=S.stackGroups,A=S.offset,O=S.updateId,M=S.dataStartIndex,$=S.dataEndIndex,q=_.barSize,P=_.layout,L=_.barGap,U=_.barCategoryGap,G=_.maxBarSize,B=oz(P),R=B.numericAxisName,D=B.cateAxisName,z=Bje(j),H=[];return j.forEach(function(Y,N){var W=vb(_.data,{graphicalItems:[Y],dataStartIndex:M,dataEndIndex:$}),V=Y.type.defaultProps!==void 0?Te(Te({},Y.type.defaultProps),Y.props):Y.props,I=V.dataKey,Q=V.maxBarSize,ie=V["".concat(R,"Id")],re=V["".concat(D,"Id")],Z={},le=u.reduce(function(He,Ye){var We=S["".concat(Ye.axisType,"Map")],Qe=V["".concat(Ye.axisType,"Id")];We&&We[Qe]||Ye.axisType==="zAxis"||Lu();var Je=We[Qe];return Te(Te({},He),{},Tn(Tn({},Ye.axisType,Je),"".concat(Ye.axisType,"Ticks"),Qo(Je)))},Z),ee=le[D],se=le["".concat(D,"Ticks")],ke=T&&T[ie]&&T[ie].hasStack&&txe(Y,T[ie].stackGroups),te=ts(Y.type).indexOf("Bar")>=0,$e=V1(ee,se),xe=[],Ae=z&&B2e({barSize:q,stackGroups:T,totalSize:qje(le,D)});if(te){var ze,we,Ce=Zn(Q)?G:Q,Ne=(ze=(we=V1(ee,se,!0))!==null&&we!==void 0?we:Ce)!==null&&ze!==void 0?ze:0;xe=F2e({barGap:L,barCategoryGap:U,bandSize:Ne!==$e?Ne:$e,sizeList:Ae[re],maxBarSize:Ce}),Ne!==$e&&(xe=xe.map(function(He){return Te(Te({},He),{},{position:Te(Te({},He.position),{},{offset:He.position.offset-Ne/2})})}))}var he=Y&&Y.type&&Y.type.getComposedData;he&&H.push({props:Te(Te({},he(Te(Te({},le),{},{displayedData:W,props:_,dataKey:I,item:Y,bandSize:$e,barPosition:xe,offset:A,stackedData:ke,layout:P,dataStartIndex:M,dataEndIndex:$}))),{},Tn(Tn(Tn({key:Y.key||"item-".concat(N)},R,le[R]),D,le[D]),"animationId",O)),childIndex:Hge(Y,_.children),item:Y})}),H},g=function(_,S){var j=_.props,T=_.dataStartIndex,A=_.dataEndIndex,O=_.updateId;if(!PD({props:j}))return null;var M=j.children,$=j.layout,q=j.stackOffset,P=j.data,L=j.reverseStackOrder,U=oz($),G=U.numericAxisName,B=U.cateAxisName,R=wa(M,i),D=J2e(P,R,"".concat(G,"Id"),"".concat(B,"Id"),q,L),z=u.reduce(function(V,I){var Q="".concat(I.axisType,"Map");return Te(Te({},V),{},Tn({},Q,Lje(j,Te(Te({},I),{},{graphicalItems:R,stackGroups:I.axisType===G&&D,dataStartIndex:T,dataEndIndex:A}))))},{}),H=Fje(Te(Te({},z),{},{props:j,graphicalItems:R}),S==null?void 0:S.legendBBox);Object.keys(z).forEach(function(V){z[V]=h(j,z[V],H,V.replace("Map",""),t)});var Y=z["".concat(B,"Map")],N=Ije(Y),W=p(j,Te(Te({},z),{},{dataStartIndex:T,dataEndIndex:A,updateId:O,graphicalItems:R,stackGroups:D,offset:H}));return Te(Te({formattedGraphicalItems:W,graphicalItems:R,offset:H,stackGroups:D},N),z)},b=(function(k){function _(S){var j,T,A;return kje(this,_),A=Sje(this,_,[S]),Tn(A,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Tn(A,"accessibilityManager",new sje),Tn(A,"handleLegendBBoxUpdate",function(O){if(O){var M=A.state,$=M.dataStartIndex,q=M.dataEndIndex,P=M.updateId;A.setState(Te({legendBBox:O},g({props:A.props,dataStartIndex:$,dataEndIndex:q,updateId:P},Te(Te({},A.state),{},{legendBBox:O}))))}}),Tn(A,"handleReceiveSyncEvent",function(O,M,$){if(A.props.syncId===O){if($===A.eventEmitterSymbol&&typeof A.props.syncMethod!="function")return;A.applySyncEvent(M)}}),Tn(A,"handleBrushChange",function(O){var M=O.startIndex,$=O.endIndex;if(M!==A.state.dataStartIndex||$!==A.state.dataEndIndex){var q=A.state.updateId;A.setState(function(){return Te({dataStartIndex:M,dataEndIndex:$},g({props:A.props,dataStartIndex:M,dataEndIndex:$,updateId:q},A.state))}),A.triggerSyncEvent({dataStartIndex:M,dataEndIndex:$})}}),Tn(A,"handleMouseEnter",function(O){var M=A.getMouseInfo(O);if(M){var $=Te(Te({},M),{},{isTooltipActive:!0});A.setState($),A.triggerSyncEvent($);var q=A.props.onMouseEnter;Fn(q)&&q($,O)}}),Tn(A,"triggeredAfterMouseMove",function(O){var M=A.getMouseInfo(O),$=M?Te(Te({},M),{},{isTooltipActive:!0}):{isTooltipActive:!1};A.setState($),A.triggerSyncEvent($);var q=A.props.onMouseMove;Fn(q)&&q($,O)}),Tn(A,"handleItemMouseEnter",function(O){A.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),Tn(A,"handleItemMouseLeave",function(){A.setState(function(){return{isTooltipActive:!1}})}),Tn(A,"handleMouseMove",function(O){O.persist(),A.throttleTriggeredAfterMouseMove(O)}),Tn(A,"handleMouseLeave",function(O){A.throttleTriggeredAfterMouseMove.cancel();var M={isTooltipActive:!1};A.setState(M),A.triggerSyncEvent(M);var $=A.props.onMouseLeave;Fn($)&&$(M,O)}),Tn(A,"handleOuterEvent",function(O){var M=qge(O),$=ba(A.props,"".concat(M));if(M&&Fn($)){var q,P;/.*touch.*/i.test(M)?P=A.getMouseInfo(O.changedTouches[0]):P=A.getMouseInfo(O),$((q=P)!==null&&q!==void 0?q:{},O)}}),Tn(A,"handleClick",function(O){var M=A.getMouseInfo(O);if(M){var $=Te(Te({},M),{},{isTooltipActive:!0});A.setState($),A.triggerSyncEvent($);var q=A.props.onClick;Fn(q)&&q($,O)}}),Tn(A,"handleMouseDown",function(O){var M=A.props.onMouseDown;if(Fn(M)){var $=A.getMouseInfo(O);M($,O)}}),Tn(A,"handleMouseUp",function(O){var M=A.props.onMouseUp;if(Fn(M)){var $=A.getMouseInfo(O);M($,O)}}),Tn(A,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&A.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),Tn(A,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&A.handleMouseDown(O.changedTouches[0])}),Tn(A,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&A.handleMouseUp(O.changedTouches[0])}),Tn(A,"handleDoubleClick",function(O){var M=A.props.onDoubleClick;if(Fn(M)){var $=A.getMouseInfo(O);M($,O)}}),Tn(A,"handleContextMenu",function(O){var M=A.props.onContextMenu;if(Fn(M)){var $=A.getMouseInfo(O);M($,O)}}),Tn(A,"triggerSyncEvent",function(O){A.props.syncId!==void 0&&gS.emit(yS,A.props.syncId,O,A.eventEmitterSymbol)}),Tn(A,"applySyncEvent",function(O){var M=A.props,$=M.layout,q=M.syncMethod,P=A.state.updateId,L=O.dataStartIndex,U=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)A.setState(Te({dataStartIndex:L,dataEndIndex:U},g({props:A.props,dataStartIndex:L,dataEndIndex:U,updateId:P},A.state)));else if(O.activeTooltipIndex!==void 0){var G=O.chartX,B=O.chartY,R=O.activeTooltipIndex,D=A.state,z=D.offset,H=D.tooltipTicks;if(!z)return;if(typeof q=="function")R=q(H,O);else if(q==="value"){R=-1;for(var Y=0;Y=0){var ke,te;if(G.dataKey&&!G.allowDuplicatedCategory){var $e=typeof G.dataKey=="function"?se:"payload.".concat(G.dataKey.toString());ke=v1(Y,$e,R),te=N&&W&&v1(W,$e,R)}else ke=Y==null?void 0:Y[B],te=N&&W&&W[B];if(re||ie){var xe=O.props.activeIndex!==void 0?O.props.activeIndex:B;return[x.cloneElement(O,Te(Te(Te({},q.props),le),{},{activeIndex:xe})),null,null]}if(!Zn(ke))return[ee].concat($f(A.renderActivePoints({item:q,activePoint:ke,basePoint:te,childIndex:B,isRange:N})))}else{var Ae,ze=(Ae=A.getItemByXY(A.state.activeCoordinate))!==null&&Ae!==void 0?Ae:{graphicalItem:ee},we=ze.graphicalItem,Ce=we.item,Ne=Ce===void 0?O:Ce,he=we.childIndex,He=Te(Te(Te({},q.props),le),{},{activeIndex:he});return[x.cloneElement(Ne,He),null,null]}return N?[ee,null,null]:[ee,null]}),Tn(A,"renderCustomized",function(O,M,$){return x.cloneElement(O,Te(Te({key:"recharts-customized-".concat($)},A.props),A.state))}),Tn(A,"renderMap",{CartesianGrid:{handler:Cg,once:!0},ReferenceArea:{handler:A.renderReferenceElement},ReferenceLine:{handler:Cg},ReferenceDot:{handler:A.renderReferenceElement},XAxis:{handler:Cg},YAxis:{handler:Cg},Brush:{handler:A.renderBrush,once:!0},Bar:{handler:A.renderGraphicChild},Line:{handler:A.renderGraphicChild},Area:{handler:A.renderGraphicChild},Radar:{handler:A.renderGraphicChild},RadialBar:{handler:A.renderGraphicChild},Scatter:{handler:A.renderGraphicChild},Pie:{handler:A.renderGraphicChild},Funnel:{handler:A.renderGraphicChild},Tooltip:{handler:A.renderCursor,once:!0},PolarGrid:{handler:A.renderPolarGrid,once:!0},PolarAngleAxis:{handler:A.renderPolarAxis},PolarRadiusAxis:{handler:A.renderPolarAxis},Customized:{handler:A.renderCustomized}}),A.clipPathId="".concat((j=S.id)!==null&&j!==void 0?j:cd("recharts"),"-clip"),A.throttleTriggeredAfterMouseMove=fV(A.triggeredAfterMouseMove,(T=S.throttleDelay)!==null&&T!==void 0?T:1e3/60),A.state={},A}return Aje(_,k),xje(_,[{key:"componentDidMount",value:function(){var j,T;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(j=this.props.margin.left)!==null&&j!==void 0?j:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var j=this.props,T=j.children,A=j.data,O=j.height,M=j.layout,$=Ur(T,pa);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,L=I6(this.state,A,q,P),U=this.state.tooltipTicks[q].coordinate,G=(this.state.offset.top+O)/2,B=M==="horizontal",R=B?{x:U,y:G}:{y:U,x:G},D=this.state.formattedGraphicalItems.find(function(H){var Y=H.item;return Y.type.name==="Scatter"});D&&(R=Te(Te({},R),D.props.points[q].tooltipPosition),L=D.props.points[q].tooltipPayload);var z={activeTooltipIndex:q,isTooltipActive:!0,activeLabel:P,activePayload:L,activeCoordinate:R};this.setState(z),this.renderCursor($),this.accessibilityManager.setIndex(q)}}}},{key:"getSnapshotBeforeUpdate",value:function(j,T){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==T.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==j.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==j.margin){var A,O;this.accessibilityManager.setDetails({offset:{left:(A=this.props.margin.left)!==null&&A!==void 0?A:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(j){S4([Ur(j.children,pa)],[Ur(this.props.children,pa)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var j=Ur(this.props.children,pa);if(j&&typeof j.props.shared=="boolean"){var T=j.props.shared?"axis":"item";return l.indexOf(T)>=0?T:a}return a}},{key:"getMouseInfo",value:function(j){if(!this.container)return null;var T=this.container,A=T.getBoundingClientRect(),O=Tbe(A),M={chartX:Math.round(j.pageX-O.left),chartY:Math.round(j.pageY-O.top)},$=A.width/T.offsetWidth||1,q=this.inRange(M.chartX,M.chartY,$);if(!q)return null;var P=this.state,L=P.xAxisMap,U=P.yAxisMap,G=this.getTooltipEventType(),B=rz(this.state,this.props.data,this.props.layout,q);if(G!=="axis"&&L&&U){var R=ol(L).scale,D=ol(U).scale,z=R&&R.invert?R.invert(M.chartX):null,H=D&&D.invert?D.invert(M.chartY):null;return Te(Te({},M),{},{xValue:z,yValue:H},B)}return B?Te(Te({},M),B):null}},{key:"inRange",value:function(j,T){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,M=j/A,$=T/A;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 L=this.state,U=L.angleAxisMap,G=L.radiusAxisMap;if(U&&G){var B=ol(U);return _N({x:M,y:$},B)}return null}},{key:"parseEventsOfWrapper",value:function(){var j=this.props.children,T=this.getTooltipEventType(),A=Ur(j,pa),O={};A&&T==="axis"&&(A.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=g1(this.props,this.handleOuterEvent);return Te(Te({},M),O)}},{key:"addListener",value:function(){gS.on(yS,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){gS.removeListener(yS,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(j,T,A){for(var O=this.state.formattedGraphicalItems,M=0,$=O.length;M<$;M++){var q=O[M];if(q.item===j||q.props.key===j.key||T===ts(q.item.type)&&A===q.childIndex)return q}return null}},{key:"renderClipPath",value:function(){var j=this.clipPathId,T=this.state.offset,A=T.left,O=T.top,M=T.height,$=T.width;return J.createElement("defs",null,J.createElement("clipPath",{id:j},J.createElement("rect",{x:A,y:O,height:M,width:$})))}},{key:"getXScales",value:function(){var j=this.state.xAxisMap;return j?Object.entries(j).reduce(function(T,A){var O=nz(A,2),M=O[0],$=O[1];return Te(Te({},T),{},Tn({},M,$.scale))},{}):null}},{key:"getYScales",value:function(){var j=this.state.yAxisMap;return j?Object.entries(j).reduce(function(T,A){var O=nz(A,2),M=O[0],$=O[1];return Te(Te({},T),{},Tn({},M,$.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(j){var T;return(T=this.state.xAxisMap)===null||T===void 0||(T=T[j])===null||T===void 0?void 0:T.scale}},{key:"getYScaleByAxisId",value:function(j){var T;return(T=this.state.yAxisMap)===null||T===void 0||(T=T[j])===null||T===void 0?void 0:T.scale}},{key:"getItemByXY",value:function(j){var T=this.state,A=T.formattedGraphicalItems,O=T.activeItem;if(A&&A.length)for(var M=0,$=A.length;M<$;M++){var q=A[M],P=q.props,L=q.item,U=L.type.defaultProps!==void 0?Te(Te({},L.type.defaultProps),L.props):L.props,G=ts(L.type);if(G==="Bar"){var B=(P.data||[]).find(function(H){return WSe(j,H)});if(B)return{graphicalItem:q,payload:B}}else if(G==="RadialBar"){var R=(P.data||[]).find(function(H){return _N(j,H)});if(R)return{graphicalItem:q,payload:R}}else if(lb(q,O)||ub(q,O)||Qm(q,O)){var D=$4e({graphicalItem:q,activeTooltipItem:O,itemData:U.data}),z=U.activeIndex===void 0?D:U.activeIndex;return{graphicalItem:Te(Te({},q),{},{childIndex:z}),payload:Qm(q,O)?U.data[D]:q.props.data[D]}}}return null}},{key:"render",value:function(){var j=this;if(!PD(this))return null;var T=this.props,A=T.children,O=T.className,M=T.width,$=T.height,q=T.style,P=T.compact,L=T.title,U=T.desc,G=tz(T,vje),B=Un(G,!1);if(P)return J.createElement(P$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},J.createElement(j4,Kc({},B,{width:M,height:$,title:L,desc:U}),this.renderClipPath(),$D(A,this.renderMap)));if(this.props.accessibilityLayer){var R,D;B.tabIndex=(R=this.props.tabIndex)!==null&&R!==void 0?R:0,B.role=(D=this.props.role)!==null&&D!==void 0?D:"application",B.onKeyDown=function(H){j.accessibilityManager.keyboardEvent(H)},B.onFocus=function(){j.accessibilityManager.focus()}}var z=this.parseEventsOfWrapper();return J.createElement(P$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},J.createElement("div",Kc({className:vn("recharts-wrapper",O),style:Te({position:"relative",cursor:"default",width:M,height:$},q)},z,{ref:function(Y){j.container=Y}}),J.createElement(j4,Kc({},B,{width:M,height:$,title:L,desc:U,style:Rje}),this.renderClipPath(),$D(A,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(x.Component);Tn(b,"displayName",t),Tn(b,"defaultProps",Te({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),Tn(b,"getDerivedStateFromProps",function(k,_){var S=k.dataKey,j=k.data,T=k.children,A=k.width,O=k.height,M=k.layout,$=k.stackOffset,q=k.margin,P=_.dataStartIndex,L=_.dataEndIndex;if(_.updateId===void 0){var U=az(k);return Te(Te(Te({},U),{},{updateId:0},g(Te(Te({props:k},U),{},{updateId:0}),_)),{},{prevDataKey:S,prevData:j,prevWidth:A,prevHeight:O,prevLayout:M,prevStackOffset:$,prevMargin:q,prevChildren:T})}if(S!==_.prevDataKey||j!==_.prevData||A!==_.prevWidth||O!==_.prevHeight||M!==_.prevLayout||$!==_.prevStackOffset||!ef(q,_.prevMargin)){var G=az(k),B={chartX:_.chartX,chartY:_.chartY,isTooltipActive:_.isTooltipActive},R=Te(Te({},rz(_,j,M)),{},{updateId:_.updateId+1}),D=Te(Te(Te({},G),B),R);return Te(Te(Te({},D),g(Te({props:k},D),_)),{},{prevDataKey:S,prevData:j,prevWidth:A,prevHeight:O,prevLayout:M,prevStackOffset:$,prevMargin:q,prevChildren:T})}if(!S4(T,_.prevChildren)){var z,H,Y,N,W=Ur(T,Cf),V=W&&(z=(H=W.props)===null||H===void 0?void 0:H.startIndex)!==null&&z!==void 0?z:P,I=W&&(Y=(N=W.props)===null||N===void 0?void 0:N.endIndex)!==null&&Y!==void 0?Y:L,Q=V!==P||I!==L,ie=!Zn(j),re=ie&&!Q?_.updateId:_.updateId+1;return Te(Te({updateId:re},g(Te(Te({props:k},_),{},{updateId:re,dataStartIndex:V,dataEndIndex:I}),_)),{},{prevChildren:T,dataStartIndex:V,dataEndIndex:I})}return null}),Tn(b,"renderActiveDot",function(k,_,S){var j;return x.isValidElement(k)?j=x.cloneElement(k,_):Fn(k)?j=k(_):j=J.createElement(sb,_),J.createElement(Ft,{className:"recharts-active-dot",key:S},j)});var w=x.forwardRef(function(_,S){return J.createElement(b,Kc({},_,{ref:S}))});return w.displayName=b.displayName,w},Hje=rA({chartName:"LineChart",GraphicalChild:Ip,axisComponents:[{axisType:"xAxis",AxisComp:Il},{axisType:"yAxis",AxisComp:bo}],formatAxisMap:Kj}),Uje=rA({chartName:"BarChart",GraphicalChild:Ju,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Il},{axisType:"yAxis",AxisComp:bo}],formatAxisMap:Kj}),Vje=rA({chartName:"AreaChart",GraphicalChild:ms,axisComponents:[{axisType:"xAxis",AxisComp:Il},{axisType:"yAxis",AxisComp:bo}],formatAxisMap:Kj});function Wje(e){return`${(e*100).toFixed(0)}%`}const Gje={withXAxis:!0,withYAxis:!0,withTooltip:!0,tooltipAnimationDuration:0,fillOpacity:1,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x",type:"default"},kG=(e,{textColor:n,gridColor:t,cursorFill:i,barLabelColor:r})=>({root:{"--chart-text-color":n?ft(n,e):void 0,"--chart-grid-color":t?ft(t,e):void 0,"--chart-cursor-fill":i?ft(i,e):void 0,"--chart-bar-label-color":r?ft(r,e):void 0}});function Yje(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 Kje(e,n){return typeof e=="function"?e(n).fill:e==null?void 0:e.fill}const dl=Pe(e=>{const n=ye("BarChart",Gje,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,data:u,withLegend:f,legendProps:h,series:d,onMouseLeave:p,dataKey:g,withTooltip:b,withXAxis:w,withYAxis:k,gridAxis:_,tickLine:S,xAxisProps:j,yAxisProps:T,unit:A,tooltipAnimationDuration:O,strokeDasharray:M,gridProps:$,tooltipProps:q,referenceLines:P,fillOpacity:L,barChartProps:U,type:G,orientation:B,dir:R,valueFormatter:D,children:z,barProps:H,xAxisLabel:Y,yAxisLabel:N,withBarValueLabel:W,valueLabelProps:V,withRightYAxis:I,rightYAxisLabel:Q,rightYAxisProps:ie,minBarSize:re,maxBarWidth:Z,mod:le,getBarColor:ee,gridColor:se,textColor:ke,attributes:te,...$e}=n,xe=ci(),Ae=_!=="none"&&(S==="x"||S==="xy"),ze=_!=="none"&&(S==="y"||S==="xy"),[we,Ce]=x.useState(null),Ne=we!==null,he=G==="stacked"||G==="percent",He=G==="percent"?Wje:D,Ye=je=>{Ce(null),p==null||p(je)},{resolvedClassNames:We,resolvedStyles:Qe}=Wi({classNames:t,styles:a,props:n}),Je=G==="waterfall"?Yje(u,g):u,oe=Ze({name:"BarChart",classes:I0,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:te,vars:l,varsResolver:kG}),be=d.map(je=>{const an=ft(je.color,xe),pn=Ne&&we!==je.name,Dn=typeof H=="function"?H(je):H,bn=Dn==null?void 0:Dn.shape;return x.createElement(Ju,{...oe("bar"),key:je.name,name:je.name,dataKey:je.name,fill:an,stroke:an,isAnimationActive:!1,fillOpacity:pn?.1:L,strokeOpacity:pn?.2:0,stackId:he?"stack":je.stackId||void 0,yAxisId:je.yAxisId||void 0,minPointSize:re,...Dn,shape:sn=>{const nn=sn.payload,$n=nn!=null&&nn.color?ft(nn.color,xe):typeof ee=="function"?ft(ee(nn==null?void 0:nn[je.name],je),xe):Kje(H,je)||an,De={...sn,fill:$n};return typeof bn=="function"?bn(De):J.isValidElement(bn)?J.cloneElement(bn,De):typeof bn=="object"&&bn?v.jsx(Ym,{...De,...bn}):v.jsx(Ym,{...De})}},W&&v.jsx(lo,{position:B==="vertical"?"right":"top",fontSize:12,fill:"var(--chart-bar-label-color, var(--mantine-color-dimmed))",formatter:sn=>He==null?void 0:He(sn),...typeof V=="function"?V(je):V}))}),Ke=P==null?void 0:P.map((je,an)=>{const pn=ft(je.color,xe);return v.jsx(Lp,{stroke:je.color?pn:"var(--chart-grid-color)",strokeWidth:1,yAxisId:je.yAxisId||void 0,...je,label:{fill:je.color?pn:"currentColor",fontSize:12,position:je.labelPosition??"insideBottomLeft",...typeof je.label=="object"?je.label:{value:je.label}},...oe("referenceLine")},an)}),en={axisLine:!1,...B==="vertical"?{dataKey:g,type:"category"}:{type:"number"},tickLine:ze?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:A,tickFormatter:B==="vertical"?void 0:He,...oe("axis")};return v.jsx(fe,{...oe("root"),onMouseLeave:Ye,dir:R||"ltr",mod:[{orientation:B},le],...$e,children:v.jsx(xj,{...oe("container"),children:v.jsxs(Uje,{data:Je,stackOffset:G==="percent"?"expand":void 0,layout:B,maxBarSize:Z,margin:{bottom:Y?30:void 0,left:N?10:void 0,right:N?5:void 0},...U,children:[f&&v.jsx(rs,{verticalAlign:"top",content:je=>v.jsx(L0,{payload:je.payload,onHighlight:Ce,legendPosition:(h==null?void 0:h.verticalAlign)||"top",classNames:We,styles:Qe,series:d,showColor:G!=="waterfall",attributes:te}),...h}),v.jsxs(Il,{hide:!w,...B==="vertical"?{type:"number"}:{dataKey:g},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:Ae?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:B==="vertical"?He:void 0,...oe("axis"),...j,children:[Y&&v.jsx(ri,{position:"insideBottom",offset:-20,fontSize:12,...oe("axisLabel"),children:Y}),j==null?void 0:j.children]}),v.jsxs(bo,{orientation:"left",tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!k,...en,...T,children:[N&&v.jsx(ri,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...oe("axisLabel"),children:N}),T==null?void 0:T.children]}),v.jsxs(bo,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!I,...en,...ie,children:[Q&&v.jsx(ri,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...oe("axisLabel"),children:Q}),T==null?void 0:T.children]}),v.jsx(pb,{strokeDasharray:M,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...oe("grid"),...$}),b&&v.jsx(pa,{animationDuration:O,isAnimationActive:O!==0,position:B==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:M,fill:"var(--chart-cursor-fill)"},content:({label:je,payload:an,labelFormatter:pn})=>v.jsx(ej,{label:pn&&an?pn(je,an):je,payload:an,type:G==="waterfall"?"scatter":void 0,unit:A,classNames:We,styles:Qe,series:d,valueFormatter:D,attributes:te}),...q}),be,Ke,z]})})})});dl.displayName="@mantine/charts/BarChart";dl.classes=I0;dl.varsResolver=kG;const Xje={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"}]},_G=(e,{textColor:n,gridColor:t})=>({root:{"--chart-text-color":n?ft(n,e):void 0,"--chart-grid-color":t?ft(t,e):void 0}}),gb=Pe(e=>{const n=ye("LineChart",Xje,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,data:u,withLegend:f,legendProps:h,series:d,onMouseLeave:p,dataKey:g,withTooltip:b,withXAxis:w,withYAxis:k,gridAxis:_,tickLine:S,xAxisProps:j,yAxisProps:T,unit:A,tooltipAnimationDuration:O,strokeDasharray:M,gridProps:$,tooltipProps:q,referenceLines:P,withDots:L,dotProps:U,activeDotProps:G,strokeWidth:B,lineChartProps:R,connectNulls:D,fillOpacity:z,curveType:H,orientation:Y,dir:N,valueFormatter:W,children:V,lineProps:I,xAxisLabel:Q,yAxisLabel:ie,type:re,gradientStops:Z,withRightYAxis:le,rightYAxisLabel:ee,rightYAxisProps:se,withPointLabels:ke,attributes:te,gridColor:$e,...xe}=n,Ae=ci(),ze=_!=="none"&&(S==="x"||S==="xy"),we=_!=="none"&&(S==="y"||S==="xy"),[Ce,Ne]=x.useState(null),he=Ce!==null,He=je=>{Ne(null),p==null||p(je)},{resolvedClassNames:Ye,resolvedStyles:We}=Wi({classNames:t,styles:a,props:n}),Qe=Ze({name:"LineChart",classes:I0,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:te,vars:l,varsResolver:_G}),Je=`line-chart-gradient-${Pi()}`,oe=Z==null?void 0:Z.map(je=>v.jsx("stop",{offset:`${je.offset}%`,stopColor:ft(je.color,Ae)},je.color)),be=d.map(je=>{const an=ft(je.color,Ae),pn=he&&Ce!==je.name;return x.createElement(Ip,{...Qe("line"),key:je.name,name:je.name,dataKey:je.name,dot:L?{fillOpacity:pn?0:1,strokeOpacity:pn?0:1,strokeWidth:1,fill:re==="gradient"?"var(--mantine-color-gray-7)":an,stroke:re==="gradient"?"white":an,...U}:!1,activeDot:L?{fill:re==="gradient"?"var(--mantine-color-gray-7)":an,stroke:re==="gradient"?"white":an,...G}:!1,fill:an,stroke:re==="gradient"?`url(#${Je})`:an,strokeWidth:B,isAnimationActive:!1,fillOpacity:pn?0:z,strokeOpacity:pn?.5:z,connectNulls:D,type:je.curveType??H,strokeDasharray:je.strokeDasharray,yAxisId:je.yAxisId||void 0,label:ke?v.jsx(qve,{valueFormatter:W}):void 0,...typeof I=="function"?I(je):I})}),Ke=P==null?void 0:P.map((je,an)=>{const pn=ft(je.color,Ae);return v.jsx(Lp,{stroke:je.color?pn:"var(--chart-grid-color)",strokeWidth:1,yAxisId:je.yAxisId||void 0,...je,label:{fill:je.color?pn:"currentColor",fontSize:12,position:je.labelPosition??"insideBottomLeft",...typeof je.label=="object"?je.label:{value:je.label}},...Qe("referenceLine")},an)}),en={axisLine:!1,...Y==="vertical"?{dataKey:g,type:"category"}:{type:"number"},tickLine:we?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:A,tickFormatter:Y==="vertical"?void 0:W,...Qe("axis")};return v.jsx(fe,{...Qe("root"),onMouseLeave:He,dir:N||"ltr",...xe,children:v.jsx(xj,{...Qe("container"),children:v.jsxs(Hje,{data:u,layout:Y,margin:{bottom:Q?30:void 0,left:ie?10:void 0,right:ie?5:void 0},...R,children:[re==="gradient"&&v.jsx("defs",{children:v.jsx("linearGradient",{id:Je,x1:"0",y1:"0",x2:"0",y2:"1",children:oe})}),f&&v.jsx(rs,{verticalAlign:"top",content:je=>v.jsx(L0,{payload:je.payload,onHighlight:Ne,legendPosition:(h==null?void 0:h.verticalAlign)||"top",classNames:Ye,styles:We,series:d,showColor:re!=="gradient",attributes:te}),...h}),v.jsxs(Il,{hide:!w,...Y==="vertical"?{type:"number"}:{dataKey:g},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:ze?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:Y==="vertical"?W:void 0,...Qe("axis"),...j,children:[Q&&v.jsx(ri,{position:"insideBottom",offset:-20,fontSize:12,...Qe("axisLabel"),children:Q}),j==null?void 0:j.children]}),v.jsxs(bo,{tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!k,...en,...T,children:[ie&&v.jsx(ri,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...Qe("axisLabel"),children:ie}),T==null?void 0:T.children]}),v.jsxs(bo,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!le,...en,...se,children:[ee&&v.jsx(ri,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...Qe("axisLabel"),children:ee}),T==null?void 0:T.children]}),v.jsx(pb,{strokeDasharray:M,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...Qe("grid"),...$}),b&&v.jsx(pa,{animationDuration:O,isAnimationActive:O!==0,position:Y==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:M},content:({label:je,payload:an,labelFormatter:pn})=>v.jsx(ej,{label:pn&&an?pn(je,an):je,payload:an,unit:A,classNames:Ye,styles:We,series:d,valueFormatter:W,showColor:re!=="gradient",attributes:te}),...q}),be,Ke,V]})})})});gb.displayName="@mantine/charts/LineChart";gb.classes=I0;gb.varsResolver=_G;const sz="daily_report_prompt",wS="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 Zje(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 qc({label:e,value:n,color:t,icon:i,sub:r}){return v.jsxs(Tt,{p:"sm",withBorder:!0,radius:"md",children:[v.jsxs(Ee,{gap:6,mb:2,align:"center",children:[i,v.jsx(de,{size:"xs",c:"dimmed",tt:"uppercase",fw:600,children:e})]}),v.jsx(de,{fz:28,fw:700,c:t,children:n}),r&&v.jsx(de,{size:"xs",c:"dimmed",children:r})]})}function jg({title:e,rows:n,emptyText:t,withAvatar:i=!1}){return v.jsxs(za,{withBorder:!0,radius:"md",p:"sm",children:[v.jsx(de,{fw:600,size:"sm",mb:6,children:e}),n.length===0?v.jsx(de,{size:"xs",c:"dimmed",children:t}):v.jsx(kn,{gap:4,children:n.map((r,a)=>v.jsxs(Ee,{gap:6,wrap:"nowrap",justify:"space-between",children:[v.jsxs(Ee,{gap:6,wrap:"nowrap",style:{minWidth:0,flex:1},children:[i&&v.jsx(mo,{size:22,radius:"xl",color:Ru(r.name||String(a)),children:(r.name||"?").slice(0,2).toUpperCase()}),v.jsx(de,{size:"sm",truncate:!0,children:r.name||"(sin nombre)"})]}),v.jsx(Gn,{size:"sm",variant:"light",color:a===0?"teal":"gray",children:r.count})]},(r.user_id||r.name)+a))})]})}function Qje({date:e,onJumpToCard:n}){const[t,i]=x.useState(null),[r,a]=x.useState(null),[o,l]=x.useState(null),[u,f]=x.useState(!1),[h,d]=x.useState(null),[p,g]=x.useState(!1),[b,w]=x.useState(""),[k,_]=x.useState(null),[S,j]=x.useState(null);x.useEffect(()=>{i(null),a(null),Sre(e).then(i).catch(R=>a(R.message)),l(null),d(null),Cre(e).then(R=>l(R.exists?R:null)).catch(()=>{})},[e]);const T=async()=>{f(!0),d(null);try{const R=await jre(e);l({...R,exists:!0})}catch(R){d(R.message)}finally{f(!1)}},A=async()=>{try{const R=await Are(sz);w(R.value||wS)}catch{w(wS)}g(!0)},O=async()=>{await Ore(sz,b),g(!1)},M=()=>w(wS),$=x.useMemo(()=>t?t.hourly_moves.map((R,D)=>({hora:String(D).padStart(2,"0")+":00",movimientos:R})):[],[t]),q=x.useMemo(()=>{if(!t)return[];const R=new Set;for(const D of t.done_cards)D.requester&&R.add(D.requester);return Array.from(R).sort()},[t]),P=x.useMemo(()=>{if(!t)return[];const R=new Map;for(const D of t.done_cards)D.assignee_id&&R.set(D.assignee_id,D.assignee_name||D.assignee_id);return Array.from(R.entries()).map(([D,z])=>({value:D,label:z}))},[t]),L=x.useMemo(()=>t?t.done_cards.filter(R=>!(k&&R.requester!==k||S&&R.assignee_id!==S)):[],[t,k,S]),U=()=>{if(!t)return;const R=window.open("","_blank");if(!R)return;const D=window.location.origin,z=(()=>{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}`),S){const V=P.find(I=>I.value===S);H.push(`asignado=${(V==null?void 0:V.label)||S}`)}const Y=V=>V.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""),N=L.map(V=>{const I=(V.tags||[]).map(Y).join(", "),Q=`${D}/?card=${V.id}`;return` + A `).concat(b,",").concat(b,",0,0,").concat(f,",").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},GSe=function(n,t){if(!n||!t)return!1;var i=n.x,r=n.y,a=t.x,o=t.y,l=t.width,u=t.height;if(Math.abs(l)>0&&Math.abs(u)>0){var f=Math.min(a,a+l),h=Math.max(a,a+l),d=Math.min(o,o+u),p=Math.max(o,o+u);return i>=f&&i<=h&&r>=d&&r<=p}return!1},YSe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Ym=function(n){var t=XN(XN({},YSe),n),i=x.useRef(),r=x.useState(-1),a=ISe(r,2),o=a[0],l=a[1];x.useEffect(function(){if(i.current&&i.current.getTotalLength)try{var T=i.current.getTotalLength();T&&l(T)}catch{}},[]);var u=t.x,f=t.y,h=t.width,d=t.height,p=t.radius,g=t.className,b=t.animationEasing,w=t.animationDuration,k=t.animationBegin,_=t.isAnimationActive,S=t.isUpdateAnimationActive;if(u!==+u||f!==+f||h!==+h||d!==+d||h===0||d===0)return null;var j=vn("recharts-rectangle",g);return S?J.createElement(yo,{canBegin:o>0,from:{width:h,height:d,x:u,y:f},to:{width:h,height:d,x:u,y:f},duration:w,animationEasing:b,isActive:S},function(T){var A=T.width,O=T.height,M=T.x,$=T.y;return J.createElement(yo,{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},J.createElement("path",Q1({},Un(t,!0),{className:j,d:ZN(M,$,A,O,p),ref:i})))}):J.createElement("path",Q1({},Un(t,!0),{className:j,d:ZN(u,f,h,d,p)}))};function v6(){return v6=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 n4e(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 t4e=function(n,t,i,r,a,o){return"M".concat(n,",").concat(a,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(i)},i4e=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,u=n.left,f=u===void 0?0:u,h=n.width,d=h===void 0?0:h,p=n.height,g=p===void 0?0:p,b=n.className,w=e4e(n,KSe),k=XSe({x:i,y:a,top:l,left:f,width:d,height:g},w);return!Ge(i)||!Ge(a)||!Ge(d)||!Ge(g)||!Ge(l)||!Ge(f)?null:J.createElement("path",g6({},Un(k,!0),{className:vn("recharts-cross",b),d:t4e(i,a,d,g,l,f)}))},X3,JN;function r4e(){if(JN)return X3;JN=1;var e=KU(),n=e(Object.getPrototypeOf,Object);return X3=n,X3}var Z3,e$;function a4e(){if(e$)return Z3;e$=1;var e=_s(),n=r4e(),t=xs(),i="[object Object]",r=Function.prototype,a=Object.prototype,o=r.toString,l=a.hasOwnProperty,u=o.call(Object);function f(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)==u}return Z3=f,Z3}var o4e=a4e();const s4e=yt(o4e);var Q3,n$;function l4e(){if(n$)return Q3;n$=1;var e=_s(),n=xs(),t="[object Boolean]";function i(r){return r===!0||r===!1||n(r)&&e(r)==t}return Q3=i,Q3}var u4e=l4e();const c4e=yt(u4e);function Xm(e){"@babel/helpers - typeof";return Xm=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},Xm(e)}function J1(){return J1=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:u,y:f},to:{upperWidth:h,lowerWidth:d,height:p,x:u,y:f},duration:w,animationEasing:b,isActive:_},function(j){var T=j.upperWidth,A=j.lowerWidth,O=j.height,M=j.x,$=j.y;return J.createElement(yo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:k,duration:w,easing:b},J.createElement("path",J1({},Un(t,!0),{className:S,d:a$(M,$,T,A,O),ref:i})))}):J.createElement("g",null,J.createElement("path",J1({},Un(t,!0),{className:S,d:a$(u,f,h,d,p)})))},k4e=["option","shapeType","propTransformer","activeClassName","isActive"];function Zm(e){"@babel/helpers - typeof";return Zm=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},Zm(e)}function _4e(e,n){if(e==null)return{};var t=x4e(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 x4e(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 o$(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 ey(e){for(var n=1;n0&&i.handleDrag(r.changedTouches[0])}),qr(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()}),qr(i,"handleLeaveWrapper",function(){(i.state.isTravellerMoving||i.state.isSlideMoving)&&(i.leaveTimer=window.setTimeout(i.handleDragEnd,i.props.leaveTimeOut))}),qr(i,"handleEnterSlideOrTraveller",function(){i.setState({isTextActive:!0})}),qr(i,"handleLeaveSlideOrTraveller",function(){i.setState({isTextActive:!1})}),qr(i,"handleSlideDragStart",function(r){var a=v$(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 Z4e(n,e),G4e(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,u=l.gap,f=l.data,h=f.length-1,d=Math.min(r,a),p=Math.max(r,a),g=n.getIndexInRange(o,d),b=n.getIndexInRange(o,p);return{startIndex:g-g%u,endIndex:b===h?h:b-b%u}}},{key:"getTextOfTick",value:function(i){var r=this.props,a=r.data,o=r.tickFormatter,l=r.dataKey,u=cr(a[i],l,i);return Fn(o)?o(u,i):u}},{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,u=this.props,f=u.x,h=u.width,d=u.travellerWidth,p=u.startIndex,g=u.endIndex,b=u.onChange,w=i.pageX-a;w>0?w=Math.min(w,f+h-d-l,f+h-d-o):w<0&&(w=Math.max(w,f-o,f-l));var k=this.getIndex({startX:o+w,endX:l+w});(k.startIndex!==p||k.endIndex!==g)&&b&&b(k),this.setState({startX:o+w,endX:l+w,slideMoveStartX:i.pageX})}},{key:"handleTravellerDragStart",value:function(i,r){var a=v$(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,u=r.startX,f=this.state[o],h=this.props,d=h.x,p=h.width,g=h.travellerWidth,b=h.onChange,w=h.gap,k=h.data,_={startX:this.state.startX,endX:this.state.endX},S=i.pageX-a;S>0?S=Math.min(S,d+p-g-f):S<0&&(S=Math.max(S,d-f)),_[o]=f+S;var j=this.getIndex(_),T=j.startIndex,A=j.endIndex,O=function(){var $=k.length-1;return o==="startX"&&(l>u?T%w===0:A%w===0)||lu?A%w===0:T%w===0)||l>u&&A===$};this.setState(qr(qr({},o,f+S),"brushMoveStartX",i.pageX),function(){b&&O()&&b(j)})}},{key:"handleTravellerMoveKeyboard",value:function(i,r){var a=this,o=this.state,l=o.scaleValues,u=o.startX,f=o.endX,h=this.state[r],d=l.indexOf(h);if(d!==-1){var p=d+i;if(!(p===-1||p>=l.length)){var g=l[p];r==="startX"&&g>=f||r==="endX"&&g<=u||this.setState(qr({},r,g),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,u=i.fill,f=i.stroke;return J.createElement("rect",{stroke:f,fill:u,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,u=i.data,f=i.children,h=i.padding,d=x.Children.only(f);return d?J.cloneElement(d,{x:r,y:a,width:o,height:l,margin:h,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(i,r){var a,o,l=this,u=this.props,f=u.y,h=u.travellerWidth,d=u.height,p=u.traveller,g=u.ariaLabel,b=u.data,w=u.startIndex,k=u.endIndex,_=Math.max(i,this.props.x),S=iS(iS({},Un(this.props,!1)),{},{x:_,y:f,width:h,height:d}),j=g||"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 J.createElement(Ft,{tabIndex:0,role:"slider","aria-label":j,"aria-valuenow":i,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[r],onTouchStart:this.travellerDragStartHandlers[r],onKeyDown:function(A){["ArrowLeft","ArrowRight"].includes(A.key)&&(A.preventDefault(),A.stopPropagation(),l.handleTravellerMoveKeyboard(A.key==="ArrowRight"?1:-1,r))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},n.renderTraveller(p,S))}},{key:"renderSlide",value:function(i,r){var a=this.props,o=a.y,l=a.height,u=a.stroke,f=a.travellerWidth,h=Math.min(i,r)+f,d=Math.max(Math.abs(r-i)-f,0);return J.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,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,u=i.travellerWidth,f=i.stroke,h=this.state,d=h.startX,p=h.endX,g=5,b={pointerEvents:"none",fill:f};return J.createElement(Ft,{className:"recharts-brush-texts"},J.createElement(T1,ty({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-g,y:o+l/2},b),this.getTextOfTick(r)),J.createElement(T1,ty({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,p)+u+g,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,u=i.y,f=i.width,h=i.height,d=i.alwaysShowText,p=this.state,g=p.startX,b=p.endX,w=p.isTextActive,k=p.isSlideMoving,_=p.isTravellerMoving,S=p.isTravellerFocused;if(!r||!r.length||!Ge(l)||!Ge(u)||!Ge(f)||!Ge(h)||f<=0||h<=0)return null;var j=vn("recharts-brush",a),T=J.Children.count(o)===1,A=V4e("userSelect","none");return J.createElement(Ft,{className:j,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:A},this.renderBackground(),T&&this.renderPanorama(),this.renderSlide(g,b),this.renderTravellerLayer(g,"startX"),this.renderTravellerLayer(b,"endX"),(w||k||_||S||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(i){var r=i.x,a=i.y,o=i.width,l=i.height,u=i.stroke,f=Math.floor(a+l/2)-1;return J.createElement(J.Fragment,null,J.createElement("rect",{x:r,y:a,width:o,height:l,fill:u,stroke:"none"}),J.createElement("line",{x1:r+1,y1:f,x2:r+o-1,y2:f,fill:"none",stroke:"#fff"}),J.createElement("line",{x1:r+1,y1:f+2,x2:r+o-1,y2:f+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(i,r){var a;return J.isValidElement(i)?a=J.cloneElement(i,r):Fn(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,u=i.travellerWidth,f=i.updateId,h=i.startIndex,d=i.endIndex;if(a!==r.prevData||f!==r.prevUpdateId)return iS({prevData:a,prevTravellerWidth:u,prevUpdateId:f,prevX:l,prevWidth:o},a&&a.length?J4e({data:a,width:o,x:l,travellerWidth:u,startIndex:h,endIndex:d}):{scale:null,scaleValues:null});if(r.scale&&(o!==r.prevWidth||l!==r.prevX||u!==r.prevTravellerWidth)){r.scale.range([l,l+o-u]);var p=r.scale.domain().map(function(g){return r.scale(g)});return{prevData:a,prevTravellerWidth:u,prevUpdateId:f,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 u=Math.floor((o+l)/2);i[u]>r?l=u:o=u}return r>=i[l]?l:o}}])})(x.PureComponent);qr(Cf,"displayName","Brush");qr(Cf,"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 rS,g$;function e6e(){if(g$)return rS;g$=1;var e=wj();function n(t,i){var r;return e(t,function(a,o,l){return r=i(a,o,l),!r}),!!r}return rS=n,rS}var aS,y$;function n6e(){if(y$)return aS;y$=1;var e=qU(),n=Nl(),t=e6e(),i=Tr(),r=Z0();function a(o,l,u){var f=i(o)?e:t;return u&&r(o,l,u)&&(l=void 0),f(o,n(l,3))}return aS=a,aS}var t6e=n6e();const i6e=yt(t6e);var uo=function(n,t){var i=n.alwaysShow,r=n.ifOverflow;return i&&(r="extendDomain"),r===t},oS,b$;function r6e(){if(b$)return oS;b$=1;var e=oV();function n(t,i,r){i=="__proto__"&&e?e(t,i,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[i]=r}return oS=n,oS}var sS,w$;function a6e(){if(w$)return sS;w$=1;var e=r6e(),n=rV(),t=Nl();function i(r,a){var o={};return a=t(a,3),n(r,function(l,u,f){e(o,u,a(l,u,f))}),o}return sS=i,sS}var o6e=a6e();const s6e=yt(o6e);var lS,k$;function l6e(){if(k$)return lS;k$=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 g6e(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 y6e(e,n){var t=e.x,i=e.y,r=v6e(e,d6e),a="".concat(t),o=parseInt(a,10),l="".concat(i),u=parseInt(l,10),f="".concat(n.height||r.height),h=parseInt(f,10),d="".concat(n.width||r.width),p=parseInt(d,10);return Ph(Ph(Ph(Ph(Ph({},n),r),o?{x:o}:{}),u?{y:u}:{}),{},{height:h,width:p,name:n.name,radius:n.radius})}function C$(e){return J.createElement(E4e,b6({shapeType:"rectangle",propTransformer:y6e,activeClassName:"recharts-active-bar"},e))}var b6e=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=Ge(i)||Ege(i);return a?n(i,r):(a||Lu(),t)}},w6e=["value","background"],PW;function jf(e){"@babel/helpers - typeof";return jf=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},jf(e)}function k6e(e,n){if(e==null)return{};var t=_6e(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 _6e(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 ry(){return ry=Object.assign?Object.assign.bind():function(e){for(var n=1;n0&&Math.abs(R)0&&Math.abs(B)0&&(G=Math.min((Q||0)-(B[ie-1]||0),G))}),Number.isFinite(G)){var R=G/U,D=w.layout==="vertical"?i.height:i.width;if(w.padding==="gap"&&(M=R*D/2),w.padding==="no-gap"){var z=$u(n.barCategoryGap,R*D),H=R*D/2;M=H-z-(H-z)/D*z}}}r==="xAxis"?$=[i.left+(j.left||0)+(M||0),i.left+i.width-(j.right||0)-(M||0)]:r==="yAxis"?$=u==="horizontal"?[i.top+i.height-(j.bottom||0),i.top+(j.top||0)]:[i.top+(j.top||0)+(M||0),i.top+i.height-(j.bottom||0)-(M||0)]:$=w.range,A&&($=[$[1],$[0]]);var Y=W2e(w,a,p),N=Y.scale,W=Y.realScaleType;N.domain(_).range($),G2e(N);var V=nxe(N,Na(Na({},w),{},{realScaleType:W}));r==="xAxis"?(L=k==="top"&&!T||k==="bottom"&&T,q=i.left,P=d[O]-L*w.height):r==="yAxis"&&(L=k==="left"&&!T||k==="right"&&T,q=d[O]-L*w.width,P=i.top);var I=Na(Na(Na({},w),V),{},{realScaleType:W,x:q,y:P,scale:N,width:r==="xAxis"?i.width:w.width,height:r==="yAxis"?i.height:w.height});return I.bandSize=V1(I,V),!w.hide&&r==="xAxis"?d[O]+=(L?-1:1)*I.height:w.hide||(d[O]+=(L?-1:1)*I.width),Na(Na({},g),{},cb({},b,I))},{})},LW=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)}},R6e=function(n){var t=n.x1,i=n.y1,r=n.x2,a=n.y2;return LW({x:t,y:i},{x:r,y:a})},IW=(function(){function e(n){E6e(this,e),this.scale=n}return M6e(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 u=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+u}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)}}])})();cb(IW,"EPS",1e-4);var Xj=function(n){var t=Object.keys(n).reduce(function(i,r){return Na(Na({},i),{},cb({},r,IW.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 s6e(r,function(u,f){return t[f].apply(u,{bandAware:o,position:l})})},isInRange:function(r){return RW(r,function(a,o){return t[o].isInRange(a)})}})};function P6e(e){return(e%180+180)%180}var N6e=function(n){var t=n.width,i=n.height,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=P6e(r),o=a*Math.PI/180,l=Math.atan(i/t),u=o>l&&o-1?u[f?a[h]:h]:void 0}}return fS=i,fS}var dS,M$;function z6e(){if(M$)return dS;M$=1;var e=TW();function n(t){var i=e(t),r=i%1;return i===i?r?i-r:i:0}return dS=n,dS}var hS,D$;function L6e(){if(D$)return hS;D$=1;var e=JU(),n=Nl(),t=z6e(),i=Math.max;function r(a,o,l){var u=a==null?0:a.length;if(!u)return-1;var f=l==null?0:t(l);return f<0&&(f=i(u+f,0)),e(a,n(o,3),f)}return hS=r,hS}var mS,R$;function I6e(){if(R$)return mS;R$=1;var e=$6e(),n=L6e(),t=e(n);return mS=t,mS}var B6e=I6e();const F6e=yt(B6e);var q6e=mU();const H6e=yt(q6e);var U6e=H6e(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("")}),Zj=x.createContext(void 0),Qj=x.createContext(void 0),BW=x.createContext(void 0),FW=x.createContext({}),qW=x.createContext(void 0),HW=x.createContext(0),UW=x.createContext(0),P$=function(n){var t=n.state,i=t.xAxisMap,r=t.yAxisMap,a=t.offset,o=n.clipPathId,l=n.children,u=n.width,f=n.height,h=U6e(a);return J.createElement(Zj.Provider,{value:i},J.createElement(Qj.Provider,{value:r},J.createElement(FW.Provider,{value:a},J.createElement(BW.Provider,{value:h},J.createElement(qW.Provider,{value:o},J.createElement(HW.Provider,{value:f},J.createElement(UW.Provider,{value:u},l)))))))},V6e=function(){return x.useContext(qW)},VW=function(n){var t=x.useContext(Zj);t==null&&Lu();var i=t[n];return i==null&&Lu(),i},W6e=function(){var n=x.useContext(Zj);return ol(n)},G6e=function(){var n=x.useContext(Qj),t=F6e(n,function(i){return RW(i.domain,Number.isFinite)});return t||ol(n)},WW=function(n){var t=x.useContext(Qj);t==null&&Lu();var i=t[n];return i==null&&Lu(),i},Y6e=function(){var n=x.useContext(BW);return n},K6e=function(){return x.useContext(FW)},Jj=function(){return x.useContext(UW)},eA=function(){return x.useContext(HW)};function Af(e){"@babel/helpers - typeof";return Af=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},Af(e)}function X6e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Z6e(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 DCe(e,n){return JW(e,n+1)}function RCe(e,n,t,i,r){for(var a=(i||[]).slice(),o=n.start,l=n.end,u=0,f=1,h=o,d=function(){var b=i==null?void 0:i[u];if(b===void 0)return{v:JW(i,f)};var w=u,k,_=function(){return k===void 0&&(k=t(b,w)),k},S=b.coordinate,j=u===0||uy(e,S,_,h,l);j||(u=0,h=o,f+=1),j&&(h=S+e*(_()/2+r),u+=f)},p;f<=a.length;)if(p=d(),p)return p.v;return[]}function tp(e){"@babel/helpers - typeof";return tp=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},tp(e)}function q$(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 Xi(e){for(var n=1;n0?g.coordinate-k*e:g.coordinate})}else a[p]=g=Xi(Xi({},g),{},{tickCoord:g.coordinate});var _=uy(e,g.tickCoord,w,l,u);_&&(u=g.tickCoord-e*(w()/2+r),a[p]=Xi(Xi({},g),{},{isShow:!0}))},h=o-1;h>=0;h--)f(h);return a}function LCe(e,n,t,i,r,a){var o=(i||[]).slice(),l=o.length,u=n.start,f=n.end;if(a){var h=i[l-1],d=t(h,l-1),p=e*(h.coordinate+e*d/2-f);o[l-1]=h=Xi(Xi({},h),{},{tickCoord:p>0?h.coordinate-p*e:h.coordinate});var g=uy(e,h.tickCoord,function(){return d},u,f);g&&(f=h.tickCoord-e*(d/2+r),o[l-1]=Xi(Xi({},h),{},{isShow:!0}))}for(var b=a?l-1:l,w=function(S){var j=o[S],T,A=function(){return T===void 0&&(T=t(j,S)),T};if(S===0){var O=e*(j.coordinate-e*A()/2-u);o[S]=j=Xi(Xi({},j),{},{tickCoord:O<0?j.coordinate-O*e:j.coordinate})}else o[S]=j=Xi(Xi({},j),{},{tickCoord:j.coordinate});var M=uy(e,j.tickCoord,A,u,f);M&&(u=j.tickCoord+e*(A()/2+r),o[S]=Xi(Xi({},j),{},{isShow:!0}))},k=0;k=2?Fa(r[1].coordinate-r[0].coordinate):1,_=MCe(a,k,g);return u==="equidistantPreserveStart"?RCe(k,_,w,r,o):(u==="preserveStart"||u==="preserveStartEnd"?p=LCe(k,_,w,r,o,u==="preserveStartEnd"):p=zCe(k,_,w,r,o),p.filter(function(S){return S.isShow}))}var ICe=["viewBox"],BCe=["viewBox"],FCe=["ticks"];function Ef(e){"@babel/helpers - typeof";return Ef=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},Ef(e)}function Yc(){return Yc=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 qCe(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 HCe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function U$(e,n){for(var t=0;t0?u(this.props):u(g)),o<=0||l<=0||!b||!b.length?null:J.createElement(Ft,{className:vn("recharts-cartesian-axis",f),ref:function(k){i.layerReference=k}},a&&this.renderAxisLine(),this.renderTicks(b,this.state.fontSize,this.state.letterSpacing),ri.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(i,r,a){var o,l=vn(r.className,"recharts-cartesian-axis-tick-value");return J.isValidElement(i)?o=J.cloneElement(i,xi(xi({},r),{},{className:l})):Fn(i)?o=i(xi(xi({},r),{},{className:l})):o=J.createElement(T1,Yc({},r,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(x.Component);iA(pd,"displayName","CartesianAxis");iA(pd,"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 XCe=["x1","y1","x2","y2","key"],ZCe=["offset"];function Iu(e){"@babel/helpers - typeof";return Iu=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},Iu(e)}function V$(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 Qi(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function n9e(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 t9e=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,u=n.ry;return J.createElement("rect",{x:r,y:a,ry:u,width:o,height:l,stroke:"none",fill:t,fillOpacity:i,className:"recharts-cartesian-grid-bg"})};function tG(e,n){var t;if(J.isValidElement(e))t=J.cloneElement(e,n);else if(Fn(e))t=e(n);else{var i=n.x1,r=n.y1,a=n.x2,o=n.y2,l=n.key,u=W$(n,XCe),f=Un(u,!1);f.offset;var h=W$(f,ZCe);t=J.createElement("line",xu({},h,{x1:i,y1:r,x2:a,y2:o,fill:"none",key:l}))}return t}function i9e(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,u){var f=Qi(Qi({},e),{},{x1:n,y1:l,x2:n+t,y2:l,key:"line-".concat(u),index:u});return tG(r,f)});return J.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function r9e(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,u){var f=Qi(Qi({},e),{},{x1:l,y1:n,x2:l,y2:n+t,key:"line-".concat(u),index:u});return tG(r,f)});return J.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function a9e(e){var n=e.horizontalFill,t=e.fillOpacity,i=e.x,r=e.y,a=e.width,o=e.height,l=e.horizontalPoints,u=e.horizontal,f=u===void 0?!0:u;if(!f||!n||!n.length)return null;var h=l.map(function(p){return Math.round(p+r-r)}).sort(function(p,g){return p-g});r!==h[0]&&h.unshift(0);var d=h.map(function(p,g){var b=!h[g+1],w=b?r+o-p:h[g+1]-p;if(w<=0)return null;var k=g%n.length;return J.createElement("rect",{key:"react-".concat(g),y:p,x:i,height:w,width:a,stroke:"none",fill:n[k],fillOpacity:t,className:"recharts-cartesian-grid-bg"})});return J.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function o9e(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,u=e.height,f=e.verticalPoints;if(!t||!i||!i.length)return null;var h=f.map(function(p){return Math.round(p+a-a)}).sort(function(p,g){return p-g});a!==h[0]&&h.unshift(0);var d=h.map(function(p,g){var b=!h[g+1],w=b?a+l-p:h[g+1]-p;if(w<=0)return null;var k=g%i.length;return J.createElement("rect",{key:"react-".concat(g),x:p,y:o,width:w,height:u,stroke:"none",fill:i[k],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return J.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var s9e=function(n,t){var i=n.xAxis,r=n.width,a=n.height,o=n.offset;return vW(tA(Qi(Qi(Qi({},pd.defaultProps),i),{},{ticks:Qo(i,!0),viewBox:{x:0,y:0,width:r,height:a}})),o.left,o.left+o.width,t)},l9e=function(n,t){var i=n.yAxis,r=n.width,a=n.height,o=n.offset;return vW(tA(Qi(Qi(Qi({},pd.defaultProps),i),{},{ticks:Qo(i,!0),viewBox:{x:0,y:0,width:r,height:a}})),o.top,o.top+o.height,t)},Bc={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function pb(e){var n,t,i,r,a,o,l=Jj(),u=eA(),f=K6e(),h=Qi(Qi({},e),{},{stroke:(n=e.stroke)!==null&&n!==void 0?n:Bc.stroke,fill:(t=e.fill)!==null&&t!==void 0?t:Bc.fill,horizontal:(i=e.horizontal)!==null&&i!==void 0?i:Bc.horizontal,horizontalFill:(r=e.horizontalFill)!==null&&r!==void 0?r:Bc.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Bc.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Bc.verticalFill,x:Ge(e.x)?e.x:f.left,y:Ge(e.y)?e.y:f.top,width:Ge(e.width)?e.width:f.width,height:Ge(e.height)?e.height:f.height}),d=h.x,p=h.y,g=h.width,b=h.height,w=h.syncWithTicks,k=h.horizontalValues,_=h.verticalValues,S=W6e(),j=G6e();if(!Ge(g)||g<=0||!Ge(b)||b<=0||!Ge(d)||d!==+d||!Ge(p)||p!==+p)return null;var T=h.verticalCoordinatesGenerator||s9e,A=h.horizontalCoordinatesGenerator||l9e,O=h.horizontalPoints,M=h.verticalPoints;if((!O||!O.length)&&Fn(A)){var $=k&&k.length,q=A({yAxis:j?Qi(Qi({},j),{},{ticks:$?k:j.ticks}):void 0,width:l,height:u,offset:f},$?!0:w);is(Array.isArray(q),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Iu(q),"]")),Array.isArray(q)&&(O=q)}if((!M||!M.length)&&Fn(T)){var P=_&&_.length,L=T({xAxis:S?Qi(Qi({},S),{},{ticks:P?_:S.ticks}):void 0,width:l,height:u,offset:f},P?!0:w);is(Array.isArray(L),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Iu(L),"]")),Array.isArray(L)&&(M=L)}return J.createElement("g",{className:"recharts-cartesian-grid"},J.createElement(t9e,{fill:h.fill,fillOpacity:h.fillOpacity,x:h.x,y:h.y,width:h.width,height:h.height,ry:h.ry}),J.createElement(i9e,xu({},h,{offset:f,horizontalPoints:O,xAxis:S,yAxis:j})),J.createElement(r9e,xu({},h,{offset:f,verticalPoints:M,xAxis:S,yAxis:j})),J.createElement(a9e,xu({},h,{horizontalPoints:O})),J.createElement(o9e,xu({},h,{verticalPoints:M})))}pb.displayName="CartesianGrid";var u9e=["type","layout","connectNulls","ref"],c9e=["key"];function Mf(e){"@babel/helpers - typeof";return Mf=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},Mf(e)}function G$(e,n){if(e==null)return{};var t=f9e(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 f9e(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 om(){return om=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){g=[].concat(Fc(u.slice(0,b)),[d-w]);break}var k=g.length%2===0?[0,p]:[p];return[].concat(Fc(n.repeat(u,h)),Fc(g),k).map(function(_){return"".concat(_,"px")}).join(", ")}),$a(t,"id",cd("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 k9e(n,e),g9e(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,u=a.yAxis,f=a.layout,h=a.children,d=wa(h,zp);if(!d)return null;var p=function(w,k){return{x:w.x,y:w.y,value:w.value,errorVal:cr(w.payload,k)}},g={clipPath:i?"url(#clipPath-".concat(r,")"):null};return J.createElement(Ft,g,d.map(function(b){return J.cloneElement(b,{key:"bar-".concat(b.props.dataKey),data:o,xAxis:l,yAxis:u,layout:f,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,u=l.dot,f=l.points,h=l.dataKey,d=Un(this.props,!1),p=Un(u,!0),g=f.map(function(w,k){var _=Fr(Fr(Fr({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:f});return n.renderDotItem(u,_)}),b={clipPath:i?"url(#clipPath-".concat(r?"":"dots-").concat(a,")"):null};return J.createElement(Ft,om({className:"recharts-line-dots",key:"dots"},b),g)}},{key:"renderCurveStatically",value:function(i,r,a,o){var l=this.props,u=l.type,f=l.layout,h=l.connectNulls;l.ref;var d=G$(l,u9e),p=Fr(Fr(Fr({},Un(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:r?"url(#clipPath-".concat(a,")"):null,points:i},o),{},{type:u,layout:f,connectNulls:h});return J.createElement(rf,om({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(i,r){var a=this,o=this.props,l=o.points,u=o.strokeDasharray,f=o.isAnimationActive,h=o.animationBegin,d=o.animationDuration,p=o.animationEasing,g=o.animationId,b=o.animateNewValues,w=o.width,k=o.height,_=this.state,S=_.prevPoints,j=_.totalLength;return J.createElement(yo,{begin:h,duration:d,isActive:f,easing:p,from:{t:0},to:{t:1},key:"line-".concat(g),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(T){var A=T.t;if(S){var O=S.length/l.length,M=l.map(function(U,G){var B=Math.floor(G*O);if(S[B]){var R=S[B],D=Ui(R.x,U.x),z=Ui(R.y,U.y);return Fr(Fr({},U),{},{x:D(A),y:z(A)})}if(b){var H=Ui(w*2,U.x),Y=Ui(k/2,U.y);return Fr(Fr({},U),{},{x:H(A),y:Y(A)})}return Fr(Fr({},U),{},{x:U.x,y:U.y})});return a.renderCurveStatically(M,i,r)}var $=Ui(0,j),q=$(A),P;if(u){var L="".concat(u).split(/[,\s]+/gim).map(function(U){return parseFloat(U)});P=a.getStrokeDasharray(q,j,L)}else P=a.generateSimpleStrokeDasharray(j,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,u=this.state,f=u.prevPoints,h=u.totalLength;return l&&o&&o.length&&(!f&&h>0||!kf(f,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,u=r.className,f=r.xAxis,h=r.yAxis,d=r.top,p=r.left,g=r.width,b=r.height,w=r.isAnimationActive,k=r.id;if(a||!l||!l.length)return null;var _=this.state.isAnimationFinished,S=l.length===1,j=vn("recharts-line",u),T=f&&f.allowDataOverflow,A=h&&h.allowDataOverflow,O=T||A,M=Zn(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,L=$.strokeWidth,U=L===void 0?2:L,G=bU(o)?o:{},B=G.clipDot,R=B===void 0?!0:B,D=P*2+U;return J.createElement(Ft,{className:j},T||A?J.createElement("defs",null,J.createElement("clipPath",{id:"clipPath-".concat(M)},J.createElement("rect",{x:T?p:p-g/2,y:A?d:d-b/2,width:T?g:g*2,height:A?b:b*2})),!R&&J.createElement("clipPath",{id:"clipPath-dots-".concat(M)},J.createElement("rect",{x:p-D/2,y:d-D/2,width:g+D,height:b+D}))):null,!S&&this.renderCurve(O,M),this.renderErrorBar(O,M),(S||o)&&this.renderDots(O,R,M),(!w||_)&&lo.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(Fc(i),[0]):i,o=[],l=0;l=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function C9e(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 Su(){return Su=Object.assign?Object.assign.bind():function(e){for(var n=1;n0||!kf(h,o)||!kf(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,u=r.className,f=r.top,h=r.left,d=r.xAxis,p=r.yAxis,g=r.width,b=r.height,w=r.isAnimationActive,k=r.id;if(a||!l||!l.length)return null;var _=this.state.isAnimationFinished,S=l.length===1,j=vn("recharts-area",u),T=d&&d.allowDataOverflow,A=p&&p.allowDataOverflow,O=T||A,M=Zn(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,L=$.strokeWidth,U=L===void 0?2:L,G=bU(o)?o:{},B=G.clipDot,R=B===void 0?!0:B,D=P*2+U;return J.createElement(Ft,{className:j},T||A?J.createElement("defs",null,J.createElement("clipPath",{id:"clipPath-".concat(M)},J.createElement("rect",{x:T?h:h-g/2,y:A?f:f-b/2,width:T?g:g*2,height:A?b:b*2})),!R&&J.createElement("clipPath",{id:"clipPath-dots-".concat(M)},J.createElement("rect",{x:h-D/2,y:f-D/2,width:g+D,height:b+D}))):null,S?null:this.renderArea(O,M),(o||S)&&this.renderDots(O,R,M),(!w||_)&&lo.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}}])})(x.PureComponent);aG=ms;ro(ms,"displayName","Area");ro(ms,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ku.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});ro(ms,"getBaseValue",function(e,n,t,i){var r=e.layout,a=e.baseValue,o=n.props.baseValue,l=o??a;if(Ge(l)&&typeof l=="number")return l;var u=r==="horizontal"?i:t,f=u.scale.domain();if(u.type==="number"){var h=Math.max(f[0],f[1]),d=Math.min(f[0],f[1]);return l==="dataMin"?d:l==="dataMax"||h<0?h:Math.max(Math.min(f[0],f[1]),0)}return l==="dataMin"?f[0]:l==="dataMax"?f[1]:f[0]});ro(ms,"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,u=e.dataKey,f=e.stackedData,h=e.dataStartIndex,d=e.displayedData,p=e.offset,g=n.layout,b=f&&f.length,w=aG.getBaseValue(n,t,i,r),k=g==="horizontal",_=!1,S=d.map(function(T,A){var O;b?O=f[h+A]:(O=cr(T,u),Array.isArray(O)?_=!0:O=[w,O]);var M=O[1]==null||b&&cr(T,u)==null;return k?{x:U1({axis:i,ticks:a,bandSize:l,entry:T,index:A}),y:M?null:r.scale(O[1]),value:O,payload:T}:{x:M?null:i.scale(O[1]),y:U1({axis:r,ticks:o,bandSize:l,entry:T,index:A}),value:O,payload:T}}),j;return b||_?j=S.map(function(T){var A=Array.isArray(T.value)?T.value[0]:null;return k?{x:T.x,y:A!=null&&T.y!=null?r.scale(A):null}:{x:A!=null?i.scale(A):null,y:T.y}}):j=k?r.scale(w):i.scale(w),el({points:S,baseLine:j,layout:g,isRange:_},p)});ro(ms,"renderDotItem",function(e,n){var t;if(J.isValidElement(e))t=J.cloneElement(e,n);else if(Fn(e))t=e(n);else{var i=vn("recharts-area-dot",typeof e!="boolean"?e.className:""),r=n.key,a=oG(n,S9e);t=J.createElement(sb,Su({},a,{key:r,className:i}))}return t});function Rf(e){"@babel/helpers - typeof";return Rf=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},Rf(e)}function R9e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function P9e(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 kje(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 _je(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function xje(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t0?o:n&&n.length&&Ge(r)&&Ge(a)?n.slice(r,a+1):[]};function kG(e){return e==="number"?[0,"auto"]:void 0}var I6=function(n,t,i,r){var a=n.graphicalItems,o=n.tooltipAxis,l=vb(t,n);return i<0||!a||!a.length||i>=l.length?null:a.reduce(function(u,f){var h,d=(h=f.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 g=d===void 0?l:d;p=v1(g,o.dataKey,r)}else p=d&&d[i]||l[i];return p?[].concat($f(u),[yW(f,p)]):u},[])},rz=function(n,t,i,r){var a=r||{x:n.chartX,y:n.chartY},o=Nje(a,i),l=n.orderedTooltipTicks,u=n.tooltipAxis,f=n.tooltipTicks,h=B2e(o,l,f,u);if(h>=0&&f){var d=f[h]&&f[h].value,p=I6(n,t,h,d),g=$je(i,l,h,a);return{activeTooltipIndex:h,activeLabel:d,activePayload:p,activeCoordinate:g}}return null},zje=function(n,t){var i=t.axes,r=t.graphicalItems,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,u=t.dataStartIndex,f=t.dataEndIndex,h=n.layout,d=n.children,p=n.stackOffset,g=pW(h,a);return i.reduce(function(b,w){var k,_=w.type.defaultProps!==void 0?Te(Te({},w.type.defaultProps),w.props):w.props,S=_.type,j=_.dataKey,T=_.allowDataOverflow,A=_.allowDuplicatedCategory,O=_.scale,M=_.ticks,$=_.includeHidden,q=_[o];if(b[q])return b;var P=vb(n.data,{graphicalItems:r.filter(function(V){var I,Q=o in V.props?V.props[o]:(I=V.type.defaultProps)===null||I===void 0?void 0:I[o];return Q===q}),dataStartIndex:u,dataEndIndex:f}),L=P.length,U,G,B;uje(_.domain,T,S)&&(U=t6(_.domain,null,T),g&&(S==="number"||O!=="auto")&&(B=rm(P,j,"category")));var R=kG(S);if(!U||U.length===0){var D,z=(D=_.domain)!==null&&D!==void 0?D:R;if(j){if(U=rm(P,j,S),S==="category"&&g){var H=Dge(U);A&&H?(G=U,U=ny(0,L)):A||(U=bN(z,U,w).reduce(function(V,I){return V.indexOf(I)>=0?V:[].concat($f(V),[I])},[]))}else if(S==="category")A?U=U.filter(function(V){return V!==""&&!Zn(V)}):U=bN(z,U,w).reduce(function(V,I){return V.indexOf(I)>=0||I===""||Zn(I)?V:[].concat($f(V),[I])},[]);else if(S==="number"){var Y=V2e(P,r.filter(function(V){var I,Q,ie=o in V.props?V.props[o]:(I=V.type.defaultProps)===null||I===void 0?void 0:I[o],re="hide"in V.props?V.props.hide:(Q=V.type.defaultProps)===null||Q===void 0?void 0:Q.hide;return ie===q&&($||!re)}),j,a,h);Y&&(U=Y)}g&&(S==="number"||O!=="auto")&&(B=rm(P,j,"category"))}else g?U=ny(0,L):l&&l[q]&&l[q].hasStack&&S==="number"?U=p==="expand"?[0,1]:gW(l[q].stackGroups,u,f):U=mW(P,r.filter(function(V){var I=o in V.props?V.props[o]:V.type.defaultProps[o],Q="hide"in V.props?V.props.hide:V.type.defaultProps.hide;return I===q&&($||!Q)}),S,h,!0);if(S==="number")U=$6(d,U,q,a,M),z&&(U=t6(z,U,T));else if(S==="category"&&z){var N=z,W=U.every(function(V){return N.indexOf(V)>=0});W&&(U=N)}}return Te(Te({},b),{},Tn({},q,Te(Te({},_),{},{axisType:a,domain:U,categoricalDomain:B,duplicateDomain:G,originalDomain:(k=_.domain)!==null&&k!==void 0?k:R,isCategorical:g,layout:h})))},{})},Lje=function(n,t){var i=t.graphicalItems,r=t.Axis,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,u=t.dataStartIndex,f=t.dataEndIndex,h=n.layout,d=n.children,p=vb(n.data,{graphicalItems:i,dataStartIndex:u,dataEndIndex:f}),g=p.length,b=pW(h,a),w=-1;return i.reduce(function(k,_){var S=_.type.defaultProps!==void 0?Te(Te({},_.type.defaultProps),_.props):_.props,j=S[o],T=kG("number");if(!k[j]){w++;var A;return b?A=ny(0,g):l&&l[j]&&l[j].hasStack?(A=gW(l[j].stackGroups,u,f),A=$6(d,A,j,a)):(A=t6(T,mW(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===j&&!P}),"number",h),r.defaultProps.allowDataOverflow),A=$6(d,A,j,a)),Te(Te({},k),{},Tn({},j,Te(Te({axisType:a},r.defaultProps),{},{hide:!0,orientation:ba(Rje,"".concat(a,".").concat(w%2),null),domain:A,originalDomain:T,isCategorical:b,layout:h})))}return k},{})},Ije=function(n,t){var i=t.axisType,r=i===void 0?"xAxis":i,a=t.AxisComp,o=t.graphicalItems,l=t.stackGroups,u=t.dataStartIndex,f=t.dataEndIndex,h=n.children,d="".concat(r,"Id"),p=wa(h,a),g={};return p&&p.length?g=zje(n,{axes:p,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:u,dataEndIndex:f}):o&&o.length&&(g=Lje(n,{Axis:a,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:u,dataEndIndex:f})),g},Bje=function(n){var t=ol(n),i=Qo(t,!1,!0);return{tooltipTicks:i,orderedTooltipTicks:kj(i,function(r){return r.coordinate}),tooltipAxis:t,tooltipAxisBandSize:V1(t,i)}},az=function(n){var t=n.children,i=n.defaultShowTooltip,r=Ur(t,Cf),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}},Fje=function(n){return!n||!n.length?!1:n.some(function(t){var i=ts(t&&t.type);return i&&i.indexOf("Bar")>=0})},oz=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"}},qje=function(n,t){var i=n.props,r=n.graphicalItems,a=n.xAxisMap,o=a===void 0?{}:a,l=n.yAxisMap,u=l===void 0?{}:l,f=i.width,h=i.height,d=i.children,p=i.margin||{},g=Ur(d,Cf),b=Ur(d,rs),w=Object.keys(u).reduce(function(A,O){var M=u[O],$=M.orientation;return!M.mirror&&!M.hide?Te(Te({},A),{},Tn({},$,A[$]+M.width)):A},{left:p.left||0,right:p.right||0}),k=Object.keys(o).reduce(function(A,O){var M=o[O],$=M.orientation;return!M.mirror&&!M.hide?Te(Te({},A),{},Tn({},$,ba(A,"".concat($))+M.height)):A},{top:p.top||0,bottom:p.bottom||0}),_=Te(Te({},k),w),S=_.bottom;g&&(_.bottom+=g.props.height||Cf.defaultProps.height),b&&t&&(_=H2e(_,r,i,t));var j=f-_.left-_.right,T=h-_.top-_.bottom;return Te(Te({brushBottom:S},_),{},{width:Math.max(j,0),height:Math.max(T,0)})},Hje=function(n,t){if(t==="xAxis")return n[t].width;if(t==="yAxis")return n[t].height},rA=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,u=n.axisComponents,f=n.legendContent,h=n.formatAxisMap,d=n.defaultProps,p=function(_,S){var j=S.graphicalItems,T=S.stackGroups,A=S.offset,O=S.updateId,M=S.dataStartIndex,$=S.dataEndIndex,q=_.barSize,P=_.layout,L=_.barGap,U=_.barCategoryGap,G=_.maxBarSize,B=oz(P),R=B.numericAxisName,D=B.cateAxisName,z=Fje(j),H=[];return j.forEach(function(Y,N){var W=vb(_.data,{graphicalItems:[Y],dataStartIndex:M,dataEndIndex:$}),V=Y.type.defaultProps!==void 0?Te(Te({},Y.type.defaultProps),Y.props):Y.props,I=V.dataKey,Q=V.maxBarSize,ie=V["".concat(R,"Id")],re=V["".concat(D,"Id")],Z={},le=u.reduce(function(He,Ye){var We=S["".concat(Ye.axisType,"Map")],Qe=V["".concat(Ye.axisType,"Id")];We&&We[Qe]||Ye.axisType==="zAxis"||Lu();var Je=We[Qe];return Te(Te({},He),{},Tn(Tn({},Ye.axisType,Je),"".concat(Ye.axisType,"Ticks"),Qo(Je)))},Z),ee=le[D],se=le["".concat(D,"Ticks")],ke=T&&T[ie]&&T[ie].hasStack&&ixe(Y,T[ie].stackGroups),te=ts(Y.type).indexOf("Bar")>=0,$e=V1(ee,se),xe=[],Ae=z&&F2e({barSize:q,stackGroups:T,totalSize:Hje(le,D)});if(te){var ze,we,Ce=Zn(Q)?G:Q,Ne=(ze=(we=V1(ee,se,!0))!==null&&we!==void 0?we:Ce)!==null&&ze!==void 0?ze:0;xe=q2e({barGap:L,barCategoryGap:U,bandSize:Ne!==$e?Ne:$e,sizeList:Ae[re],maxBarSize:Ce}),Ne!==$e&&(xe=xe.map(function(He){return Te(Te({},He),{},{position:Te(Te({},He.position),{},{offset:He.position.offset-Ne/2})})}))}var he=Y&&Y.type&&Y.type.getComposedData;he&&H.push({props:Te(Te({},he(Te(Te({},le),{},{displayedData:W,props:_,dataKey:I,item:Y,bandSize:$e,barPosition:xe,offset:A,stackedData:ke,layout:P,dataStartIndex:M,dataEndIndex:$}))),{},Tn(Tn(Tn({key:Y.key||"item-".concat(N)},R,le[R]),D,le[D]),"animationId",O)),childIndex:Uge(Y,_.children),item:Y})}),H},g=function(_,S){var j=_.props,T=_.dataStartIndex,A=_.dataEndIndex,O=_.updateId;if(!PD({props:j}))return null;var M=j.children,$=j.layout,q=j.stackOffset,P=j.data,L=j.reverseStackOrder,U=oz($),G=U.numericAxisName,B=U.cateAxisName,R=wa(M,i),D=exe(P,R,"".concat(G,"Id"),"".concat(B,"Id"),q,L),z=u.reduce(function(V,I){var Q="".concat(I.axisType,"Map");return Te(Te({},V),{},Tn({},Q,Ije(j,Te(Te({},I),{},{graphicalItems:R,stackGroups:I.axisType===G&&D,dataStartIndex:T,dataEndIndex:A}))))},{}),H=qje(Te(Te({},z),{},{props:j,graphicalItems:R}),S==null?void 0:S.legendBBox);Object.keys(z).forEach(function(V){z[V]=h(j,z[V],H,V.replace("Map",""),t)});var Y=z["".concat(B,"Map")],N=Bje(Y),W=p(j,Te(Te({},z),{},{dataStartIndex:T,dataEndIndex:A,updateId:O,graphicalItems:R,stackGroups:D,offset:H}));return Te(Te({formattedGraphicalItems:W,graphicalItems:R,offset:H,stackGroups:D},N),z)},b=(function(k){function _(S){var j,T,A;return _je(this,_),A=Cje(this,_,[S]),Tn(A,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Tn(A,"accessibilityManager",new lje),Tn(A,"handleLegendBBoxUpdate",function(O){if(O){var M=A.state,$=M.dataStartIndex,q=M.dataEndIndex,P=M.updateId;A.setState(Te({legendBBox:O},g({props:A.props,dataStartIndex:$,dataEndIndex:q,updateId:P},Te(Te({},A.state),{},{legendBBox:O}))))}}),Tn(A,"handleReceiveSyncEvent",function(O,M,$){if(A.props.syncId===O){if($===A.eventEmitterSymbol&&typeof A.props.syncMethod!="function")return;A.applySyncEvent(M)}}),Tn(A,"handleBrushChange",function(O){var M=O.startIndex,$=O.endIndex;if(M!==A.state.dataStartIndex||$!==A.state.dataEndIndex){var q=A.state.updateId;A.setState(function(){return Te({dataStartIndex:M,dataEndIndex:$},g({props:A.props,dataStartIndex:M,dataEndIndex:$,updateId:q},A.state))}),A.triggerSyncEvent({dataStartIndex:M,dataEndIndex:$})}}),Tn(A,"handleMouseEnter",function(O){var M=A.getMouseInfo(O);if(M){var $=Te(Te({},M),{},{isTooltipActive:!0});A.setState($),A.triggerSyncEvent($);var q=A.props.onMouseEnter;Fn(q)&&q($,O)}}),Tn(A,"triggeredAfterMouseMove",function(O){var M=A.getMouseInfo(O),$=M?Te(Te({},M),{},{isTooltipActive:!0}):{isTooltipActive:!1};A.setState($),A.triggerSyncEvent($);var q=A.props.onMouseMove;Fn(q)&&q($,O)}),Tn(A,"handleItemMouseEnter",function(O){A.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),Tn(A,"handleItemMouseLeave",function(){A.setState(function(){return{isTooltipActive:!1}})}),Tn(A,"handleMouseMove",function(O){O.persist(),A.throttleTriggeredAfterMouseMove(O)}),Tn(A,"handleMouseLeave",function(O){A.throttleTriggeredAfterMouseMove.cancel();var M={isTooltipActive:!1};A.setState(M),A.triggerSyncEvent(M);var $=A.props.onMouseLeave;Fn($)&&$(M,O)}),Tn(A,"handleOuterEvent",function(O){var M=Hge(O),$=ba(A.props,"".concat(M));if(M&&Fn($)){var q,P;/.*touch.*/i.test(M)?P=A.getMouseInfo(O.changedTouches[0]):P=A.getMouseInfo(O),$((q=P)!==null&&q!==void 0?q:{},O)}}),Tn(A,"handleClick",function(O){var M=A.getMouseInfo(O);if(M){var $=Te(Te({},M),{},{isTooltipActive:!0});A.setState($),A.triggerSyncEvent($);var q=A.props.onClick;Fn(q)&&q($,O)}}),Tn(A,"handleMouseDown",function(O){var M=A.props.onMouseDown;if(Fn(M)){var $=A.getMouseInfo(O);M($,O)}}),Tn(A,"handleMouseUp",function(O){var M=A.props.onMouseUp;if(Fn(M)){var $=A.getMouseInfo(O);M($,O)}}),Tn(A,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&A.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),Tn(A,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&A.handleMouseDown(O.changedTouches[0])}),Tn(A,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&A.handleMouseUp(O.changedTouches[0])}),Tn(A,"handleDoubleClick",function(O){var M=A.props.onDoubleClick;if(Fn(M)){var $=A.getMouseInfo(O);M($,O)}}),Tn(A,"handleContextMenu",function(O){var M=A.props.onContextMenu;if(Fn(M)){var $=A.getMouseInfo(O);M($,O)}}),Tn(A,"triggerSyncEvent",function(O){A.props.syncId!==void 0&&gS.emit(yS,A.props.syncId,O,A.eventEmitterSymbol)}),Tn(A,"applySyncEvent",function(O){var M=A.props,$=M.layout,q=M.syncMethod,P=A.state.updateId,L=O.dataStartIndex,U=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)A.setState(Te({dataStartIndex:L,dataEndIndex:U},g({props:A.props,dataStartIndex:L,dataEndIndex:U,updateId:P},A.state)));else if(O.activeTooltipIndex!==void 0){var G=O.chartX,B=O.chartY,R=O.activeTooltipIndex,D=A.state,z=D.offset,H=D.tooltipTicks;if(!z)return;if(typeof q=="function")R=q(H,O);else if(q==="value"){R=-1;for(var Y=0;Y=0){var ke,te;if(G.dataKey&&!G.allowDuplicatedCategory){var $e=typeof G.dataKey=="function"?se:"payload.".concat(G.dataKey.toString());ke=v1(Y,$e,R),te=N&&W&&v1(W,$e,R)}else ke=Y==null?void 0:Y[B],te=N&&W&&W[B];if(re||ie){var xe=O.props.activeIndex!==void 0?O.props.activeIndex:B;return[x.cloneElement(O,Te(Te(Te({},q.props),le),{},{activeIndex:xe})),null,null]}if(!Zn(ke))return[ee].concat($f(A.renderActivePoints({item:q,activePoint:ke,basePoint:te,childIndex:B,isRange:N})))}else{var Ae,ze=(Ae=A.getItemByXY(A.state.activeCoordinate))!==null&&Ae!==void 0?Ae:{graphicalItem:ee},we=ze.graphicalItem,Ce=we.item,Ne=Ce===void 0?O:Ce,he=we.childIndex,He=Te(Te(Te({},q.props),le),{},{activeIndex:he});return[x.cloneElement(Ne,He),null,null]}return N?[ee,null,null]:[ee,null]}),Tn(A,"renderCustomized",function(O,M,$){return x.cloneElement(O,Te(Te({key:"recharts-customized-".concat($)},A.props),A.state))}),Tn(A,"renderMap",{CartesianGrid:{handler:Cg,once:!0},ReferenceArea:{handler:A.renderReferenceElement},ReferenceLine:{handler:Cg},ReferenceDot:{handler:A.renderReferenceElement},XAxis:{handler:Cg},YAxis:{handler:Cg},Brush:{handler:A.renderBrush,once:!0},Bar:{handler:A.renderGraphicChild},Line:{handler:A.renderGraphicChild},Area:{handler:A.renderGraphicChild},Radar:{handler:A.renderGraphicChild},RadialBar:{handler:A.renderGraphicChild},Scatter:{handler:A.renderGraphicChild},Pie:{handler:A.renderGraphicChild},Funnel:{handler:A.renderGraphicChild},Tooltip:{handler:A.renderCursor,once:!0},PolarGrid:{handler:A.renderPolarGrid,once:!0},PolarAngleAxis:{handler:A.renderPolarAxis},PolarRadiusAxis:{handler:A.renderPolarAxis},Customized:{handler:A.renderCustomized}}),A.clipPathId="".concat((j=S.id)!==null&&j!==void 0?j:cd("recharts"),"-clip"),A.throttleTriggeredAfterMouseMove=dV(A.triggeredAfterMouseMove,(T=S.throttleDelay)!==null&&T!==void 0?T:1e3/60),A.state={},A}return Oje(_,k),Sje(_,[{key:"componentDidMount",value:function(){var j,T;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(j=this.props.margin.left)!==null&&j!==void 0?j:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var j=this.props,T=j.children,A=j.data,O=j.height,M=j.layout,$=Ur(T,pa);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,L=I6(this.state,A,q,P),U=this.state.tooltipTicks[q].coordinate,G=(this.state.offset.top+O)/2,B=M==="horizontal",R=B?{x:U,y:G}:{y:U,x:G},D=this.state.formattedGraphicalItems.find(function(H){var Y=H.item;return Y.type.name==="Scatter"});D&&(R=Te(Te({},R),D.props.points[q].tooltipPosition),L=D.props.points[q].tooltipPayload);var z={activeTooltipIndex:q,isTooltipActive:!0,activeLabel:P,activePayload:L,activeCoordinate:R};this.setState(z),this.renderCursor($),this.accessibilityManager.setIndex(q)}}}},{key:"getSnapshotBeforeUpdate",value:function(j,T){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==T.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==j.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==j.margin){var A,O;this.accessibilityManager.setDetails({offset:{left:(A=this.props.margin.left)!==null&&A!==void 0?A:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(j){S4([Ur(j.children,pa)],[Ur(this.props.children,pa)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var j=Ur(this.props.children,pa);if(j&&typeof j.props.shared=="boolean"){var T=j.props.shared?"axis":"item";return l.indexOf(T)>=0?T:a}return a}},{key:"getMouseInfo",value:function(j){if(!this.container)return null;var T=this.container,A=T.getBoundingClientRect(),O=Ebe(A),M={chartX:Math.round(j.pageX-O.left),chartY:Math.round(j.pageY-O.top)},$=A.width/T.offsetWidth||1,q=this.inRange(M.chartX,M.chartY,$);if(!q)return null;var P=this.state,L=P.xAxisMap,U=P.yAxisMap,G=this.getTooltipEventType(),B=rz(this.state,this.props.data,this.props.layout,q);if(G!=="axis"&&L&&U){var R=ol(L).scale,D=ol(U).scale,z=R&&R.invert?R.invert(M.chartX):null,H=D&&D.invert?D.invert(M.chartY):null;return Te(Te({},M),{},{xValue:z,yValue:H},B)}return B?Te(Te({},M),B):null}},{key:"inRange",value:function(j,T){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,M=j/A,$=T/A;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 L=this.state,U=L.angleAxisMap,G=L.radiusAxisMap;if(U&&G){var B=ol(U);return _N({x:M,y:$},B)}return null}},{key:"parseEventsOfWrapper",value:function(){var j=this.props.children,T=this.getTooltipEventType(),A=Ur(j,pa),O={};A&&T==="axis"&&(A.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=g1(this.props,this.handleOuterEvent);return Te(Te({},M),O)}},{key:"addListener",value:function(){gS.on(yS,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){gS.removeListener(yS,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(j,T,A){for(var O=this.state.formattedGraphicalItems,M=0,$=O.length;M<$;M++){var q=O[M];if(q.item===j||q.props.key===j.key||T===ts(q.item.type)&&A===q.childIndex)return q}return null}},{key:"renderClipPath",value:function(){var j=this.clipPathId,T=this.state.offset,A=T.left,O=T.top,M=T.height,$=T.width;return J.createElement("defs",null,J.createElement("clipPath",{id:j},J.createElement("rect",{x:A,y:O,height:M,width:$})))}},{key:"getXScales",value:function(){var j=this.state.xAxisMap;return j?Object.entries(j).reduce(function(T,A){var O=nz(A,2),M=O[0],$=O[1];return Te(Te({},T),{},Tn({},M,$.scale))},{}):null}},{key:"getYScales",value:function(){var j=this.state.yAxisMap;return j?Object.entries(j).reduce(function(T,A){var O=nz(A,2),M=O[0],$=O[1];return Te(Te({},T),{},Tn({},M,$.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(j){var T;return(T=this.state.xAxisMap)===null||T===void 0||(T=T[j])===null||T===void 0?void 0:T.scale}},{key:"getYScaleByAxisId",value:function(j){var T;return(T=this.state.yAxisMap)===null||T===void 0||(T=T[j])===null||T===void 0?void 0:T.scale}},{key:"getItemByXY",value:function(j){var T=this.state,A=T.formattedGraphicalItems,O=T.activeItem;if(A&&A.length)for(var M=0,$=A.length;M<$;M++){var q=A[M],P=q.props,L=q.item,U=L.type.defaultProps!==void 0?Te(Te({},L.type.defaultProps),L.props):L.props,G=ts(L.type);if(G==="Bar"){var B=(P.data||[]).find(function(H){return GSe(j,H)});if(B)return{graphicalItem:q,payload:B}}else if(G==="RadialBar"){var R=(P.data||[]).find(function(H){return _N(j,H)});if(R)return{graphicalItem:q,payload:R}}else if(lb(q,O)||ub(q,O)||Qm(q,O)){var D=z4e({graphicalItem:q,activeTooltipItem:O,itemData:U.data}),z=U.activeIndex===void 0?D:U.activeIndex;return{graphicalItem:Te(Te({},q),{},{childIndex:z}),payload:Qm(q,O)?U.data[D]:q.props.data[D]}}}return null}},{key:"render",value:function(){var j=this;if(!PD(this))return null;var T=this.props,A=T.children,O=T.className,M=T.width,$=T.height,q=T.style,P=T.compact,L=T.title,U=T.desc,G=tz(T,gje),B=Un(G,!1);if(P)return J.createElement(P$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},J.createElement(j4,Kc({},B,{width:M,height:$,title:L,desc:U}),this.renderClipPath(),$D(A,this.renderMap)));if(this.props.accessibilityLayer){var R,D;B.tabIndex=(R=this.props.tabIndex)!==null&&R!==void 0?R:0,B.role=(D=this.props.role)!==null&&D!==void 0?D:"application",B.onKeyDown=function(H){j.accessibilityManager.keyboardEvent(H)},B.onFocus=function(){j.accessibilityManager.focus()}}var z=this.parseEventsOfWrapper();return J.createElement(P$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},J.createElement("div",Kc({className:vn("recharts-wrapper",O),style:Te({position:"relative",cursor:"default",width:M,height:$},q)},z,{ref:function(Y){j.container=Y}}),J.createElement(j4,Kc({},B,{width:M,height:$,title:L,desc:U,style:Pje}),this.renderClipPath(),$D(A,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(x.Component);Tn(b,"displayName",t),Tn(b,"defaultProps",Te({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),Tn(b,"getDerivedStateFromProps",function(k,_){var S=k.dataKey,j=k.data,T=k.children,A=k.width,O=k.height,M=k.layout,$=k.stackOffset,q=k.margin,P=_.dataStartIndex,L=_.dataEndIndex;if(_.updateId===void 0){var U=az(k);return Te(Te(Te({},U),{},{updateId:0},g(Te(Te({props:k},U),{},{updateId:0}),_)),{},{prevDataKey:S,prevData:j,prevWidth:A,prevHeight:O,prevLayout:M,prevStackOffset:$,prevMargin:q,prevChildren:T})}if(S!==_.prevDataKey||j!==_.prevData||A!==_.prevWidth||O!==_.prevHeight||M!==_.prevLayout||$!==_.prevStackOffset||!ef(q,_.prevMargin)){var G=az(k),B={chartX:_.chartX,chartY:_.chartY,isTooltipActive:_.isTooltipActive},R=Te(Te({},rz(_,j,M)),{},{updateId:_.updateId+1}),D=Te(Te(Te({},G),B),R);return Te(Te(Te({},D),g(Te({props:k},D),_)),{},{prevDataKey:S,prevData:j,prevWidth:A,prevHeight:O,prevLayout:M,prevStackOffset:$,prevMargin:q,prevChildren:T})}if(!S4(T,_.prevChildren)){var z,H,Y,N,W=Ur(T,Cf),V=W&&(z=(H=W.props)===null||H===void 0?void 0:H.startIndex)!==null&&z!==void 0?z:P,I=W&&(Y=(N=W.props)===null||N===void 0?void 0:N.endIndex)!==null&&Y!==void 0?Y:L,Q=V!==P||I!==L,ie=!Zn(j),re=ie&&!Q?_.updateId:_.updateId+1;return Te(Te({updateId:re},g(Te(Te({props:k},_),{},{updateId:re,dataStartIndex:V,dataEndIndex:I}),_)),{},{prevChildren:T,dataStartIndex:V,dataEndIndex:I})}return null}),Tn(b,"renderActiveDot",function(k,_,S){var j;return x.isValidElement(k)?j=x.cloneElement(k,_):Fn(k)?j=k(_):j=J.createElement(sb,_),J.createElement(Ft,{className:"recharts-active-dot",key:S},j)});var w=x.forwardRef(function(_,S){return J.createElement(b,Kc({},_,{ref:S}))});return w.displayName=b.displayName,w},Uje=rA({chartName:"LineChart",GraphicalChild:Ip,axisComponents:[{axisType:"xAxis",AxisComp:Il},{axisType:"yAxis",AxisComp:bo}],formatAxisMap:Kj}),Vje=rA({chartName:"BarChart",GraphicalChild:Ju,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Il},{axisType:"yAxis",AxisComp:bo}],formatAxisMap:Kj}),Wje=rA({chartName:"AreaChart",GraphicalChild:ms,axisComponents:[{axisType:"xAxis",AxisComp:Il},{axisType:"yAxis",AxisComp:bo}],formatAxisMap:Kj});function Gje(e){return`${(e*100).toFixed(0)}%`}const Yje={withXAxis:!0,withYAxis:!0,withTooltip:!0,tooltipAnimationDuration:0,fillOpacity:1,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x",type:"default"},_G=(e,{textColor:n,gridColor:t,cursorFill:i,barLabelColor:r})=>({root:{"--chart-text-color":n?ft(n,e):void 0,"--chart-grid-color":t?ft(t,e):void 0,"--chart-cursor-fill":i?ft(i,e):void 0,"--chart-bar-label-color":r?ft(r,e):void 0}});function Kje(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 Xje(e,n){return typeof e=="function"?e(n).fill:e==null?void 0:e.fill}const dl=Pe(e=>{const n=ye("BarChart",Yje,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,data:u,withLegend:f,legendProps:h,series:d,onMouseLeave:p,dataKey:g,withTooltip:b,withXAxis:w,withYAxis:k,gridAxis:_,tickLine:S,xAxisProps:j,yAxisProps:T,unit:A,tooltipAnimationDuration:O,strokeDasharray:M,gridProps:$,tooltipProps:q,referenceLines:P,fillOpacity:L,barChartProps:U,type:G,orientation:B,dir:R,valueFormatter:D,children:z,barProps:H,xAxisLabel:Y,yAxisLabel:N,withBarValueLabel:W,valueLabelProps:V,withRightYAxis:I,rightYAxisLabel:Q,rightYAxisProps:ie,minBarSize:re,maxBarWidth:Z,mod:le,getBarColor:ee,gridColor:se,textColor:ke,attributes:te,...$e}=n,xe=ci(),Ae=_!=="none"&&(S==="x"||S==="xy"),ze=_!=="none"&&(S==="y"||S==="xy"),[we,Ce]=x.useState(null),Ne=we!==null,he=G==="stacked"||G==="percent",He=G==="percent"?Gje:D,Ye=je=>{Ce(null),p==null||p(je)},{resolvedClassNames:We,resolvedStyles:Qe}=Wi({classNames:t,styles:a,props:n}),Je=G==="waterfall"?Kje(u,g):u,oe=Ze({name:"BarChart",classes:I0,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:te,vars:l,varsResolver:_G}),be=d.map(je=>{const an=ft(je.color,xe),pn=Ne&&we!==je.name,Dn=typeof H=="function"?H(je):H,bn=Dn==null?void 0:Dn.shape;return x.createElement(Ju,{...oe("bar"),key:je.name,name:je.name,dataKey:je.name,fill:an,stroke:an,isAnimationActive:!1,fillOpacity:pn?.1:L,strokeOpacity:pn?.2:0,stackId:he?"stack":je.stackId||void 0,yAxisId:je.yAxisId||void 0,minPointSize:re,...Dn,shape:sn=>{const nn=sn.payload,$n=nn!=null&&nn.color?ft(nn.color,xe):typeof ee=="function"?ft(ee(nn==null?void 0:nn[je.name],je),xe):Xje(H,je)||an,De={...sn,fill:$n};return typeof bn=="function"?bn(De):J.isValidElement(bn)?J.cloneElement(bn,De):typeof bn=="object"&&bn?v.jsx(Ym,{...De,...bn}):v.jsx(Ym,{...De})}},W&&v.jsx(lo,{position:B==="vertical"?"right":"top",fontSize:12,fill:"var(--chart-bar-label-color, var(--mantine-color-dimmed))",formatter:sn=>He==null?void 0:He(sn),...typeof V=="function"?V(je):V}))}),Ke=P==null?void 0:P.map((je,an)=>{const pn=ft(je.color,xe);return v.jsx(Lp,{stroke:je.color?pn:"var(--chart-grid-color)",strokeWidth:1,yAxisId:je.yAxisId||void 0,...je,label:{fill:je.color?pn:"currentColor",fontSize:12,position:je.labelPosition??"insideBottomLeft",...typeof je.label=="object"?je.label:{value:je.label}},...oe("referenceLine")},an)}),en={axisLine:!1,...B==="vertical"?{dataKey:g,type:"category"}:{type:"number"},tickLine:ze?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:A,tickFormatter:B==="vertical"?void 0:He,...oe("axis")};return v.jsx(fe,{...oe("root"),onMouseLeave:Ye,dir:R||"ltr",mod:[{orientation:B},le],...$e,children:v.jsx(xj,{...oe("container"),children:v.jsxs(Vje,{data:Je,stackOffset:G==="percent"?"expand":void 0,layout:B,maxBarSize:Z,margin:{bottom:Y?30:void 0,left:N?10:void 0,right:N?5:void 0},...U,children:[f&&v.jsx(rs,{verticalAlign:"top",content:je=>v.jsx(L0,{payload:je.payload,onHighlight:Ce,legendPosition:(h==null?void 0:h.verticalAlign)||"top",classNames:We,styles:Qe,series:d,showColor:G!=="waterfall",attributes:te}),...h}),v.jsxs(Il,{hide:!w,...B==="vertical"?{type:"number"}:{dataKey:g},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:Ae?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:B==="vertical"?He:void 0,...oe("axis"),...j,children:[Y&&v.jsx(ri,{position:"insideBottom",offset:-20,fontSize:12,...oe("axisLabel"),children:Y}),j==null?void 0:j.children]}),v.jsxs(bo,{orientation:"left",tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!k,...en,...T,children:[N&&v.jsx(ri,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...oe("axisLabel"),children:N}),T==null?void 0:T.children]}),v.jsxs(bo,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!I,...en,...ie,children:[Q&&v.jsx(ri,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...oe("axisLabel"),children:Q}),T==null?void 0:T.children]}),v.jsx(pb,{strokeDasharray:M,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...oe("grid"),...$}),b&&v.jsx(pa,{animationDuration:O,isAnimationActive:O!==0,position:B==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:M,fill:"var(--chart-cursor-fill)"},content:({label:je,payload:an,labelFormatter:pn})=>v.jsx(ej,{label:pn&&an?pn(je,an):je,payload:an,type:G==="waterfall"?"scatter":void 0,unit:A,classNames:We,styles:Qe,series:d,valueFormatter:D,attributes:te}),...q}),be,Ke,z]})})})});dl.displayName="@mantine/charts/BarChart";dl.classes=I0;dl.varsResolver=_G;const Zje={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"}]},xG=(e,{textColor:n,gridColor:t})=>({root:{"--chart-text-color":n?ft(n,e):void 0,"--chart-grid-color":t?ft(t,e):void 0}}),gb=Pe(e=>{const n=ye("LineChart",Zje,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,data:u,withLegend:f,legendProps:h,series:d,onMouseLeave:p,dataKey:g,withTooltip:b,withXAxis:w,withYAxis:k,gridAxis:_,tickLine:S,xAxisProps:j,yAxisProps:T,unit:A,tooltipAnimationDuration:O,strokeDasharray:M,gridProps:$,tooltipProps:q,referenceLines:P,withDots:L,dotProps:U,activeDotProps:G,strokeWidth:B,lineChartProps:R,connectNulls:D,fillOpacity:z,curveType:H,orientation:Y,dir:N,valueFormatter:W,children:V,lineProps:I,xAxisLabel:Q,yAxisLabel:ie,type:re,gradientStops:Z,withRightYAxis:le,rightYAxisLabel:ee,rightYAxisProps:se,withPointLabels:ke,attributes:te,gridColor:$e,...xe}=n,Ae=ci(),ze=_!=="none"&&(S==="x"||S==="xy"),we=_!=="none"&&(S==="y"||S==="xy"),[Ce,Ne]=x.useState(null),he=Ce!==null,He=je=>{Ne(null),p==null||p(je)},{resolvedClassNames:Ye,resolvedStyles:We}=Wi({classNames:t,styles:a,props:n}),Qe=Ze({name:"LineChart",classes:I0,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:te,vars:l,varsResolver:xG}),Je=`line-chart-gradient-${Pi()}`,oe=Z==null?void 0:Z.map(je=>v.jsx("stop",{offset:`${je.offset}%`,stopColor:ft(je.color,Ae)},je.color)),be=d.map(je=>{const an=ft(je.color,Ae),pn=he&&Ce!==je.name;return x.createElement(Ip,{...Qe("line"),key:je.name,name:je.name,dataKey:je.name,dot:L?{fillOpacity:pn?0:1,strokeOpacity:pn?0:1,strokeWidth:1,fill:re==="gradient"?"var(--mantine-color-gray-7)":an,stroke:re==="gradient"?"white":an,...U}:!1,activeDot:L?{fill:re==="gradient"?"var(--mantine-color-gray-7)":an,stroke:re==="gradient"?"white":an,...G}:!1,fill:an,stroke:re==="gradient"?`url(#${Je})`:an,strokeWidth:B,isAnimationActive:!1,fillOpacity:pn?0:z,strokeOpacity:pn?.5:z,connectNulls:D,type:je.curveType??H,strokeDasharray:je.strokeDasharray,yAxisId:je.yAxisId||void 0,label:ke?v.jsx(Hve,{valueFormatter:W}):void 0,...typeof I=="function"?I(je):I})}),Ke=P==null?void 0:P.map((je,an)=>{const pn=ft(je.color,Ae);return v.jsx(Lp,{stroke:je.color?pn:"var(--chart-grid-color)",strokeWidth:1,yAxisId:je.yAxisId||void 0,...je,label:{fill:je.color?pn:"currentColor",fontSize:12,position:je.labelPosition??"insideBottomLeft",...typeof je.label=="object"?je.label:{value:je.label}},...Qe("referenceLine")},an)}),en={axisLine:!1,...Y==="vertical"?{dataKey:g,type:"category"}:{type:"number"},tickLine:we?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:A,tickFormatter:Y==="vertical"?void 0:W,...Qe("axis")};return v.jsx(fe,{...Qe("root"),onMouseLeave:He,dir:N||"ltr",...xe,children:v.jsx(xj,{...Qe("container"),children:v.jsxs(Uje,{data:u,layout:Y,margin:{bottom:Q?30:void 0,left:ie?10:void 0,right:ie?5:void 0},...R,children:[re==="gradient"&&v.jsx("defs",{children:v.jsx("linearGradient",{id:Je,x1:"0",y1:"0",x2:"0",y2:"1",children:oe})}),f&&v.jsx(rs,{verticalAlign:"top",content:je=>v.jsx(L0,{payload:je.payload,onHighlight:Ne,legendPosition:(h==null?void 0:h.verticalAlign)||"top",classNames:Ye,styles:We,series:d,showColor:re!=="gradient",attributes:te}),...h}),v.jsxs(Il,{hide:!w,...Y==="vertical"?{type:"number"}:{dataKey:g},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:ze?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:Y==="vertical"?W:void 0,...Qe("axis"),...j,children:[Q&&v.jsx(ri,{position:"insideBottom",offset:-20,fontSize:12,...Qe("axisLabel"),children:Q}),j==null?void 0:j.children]}),v.jsxs(bo,{tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!k,...en,...T,children:[ie&&v.jsx(ri,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...Qe("axisLabel"),children:ie}),T==null?void 0:T.children]}),v.jsxs(bo,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!le,...en,...se,children:[ee&&v.jsx(ri,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...Qe("axisLabel"),children:ee}),T==null?void 0:T.children]}),v.jsx(pb,{strokeDasharray:M,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...Qe("grid"),...$}),b&&v.jsx(pa,{animationDuration:O,isAnimationActive:O!==0,position:Y==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:M},content:({label:je,payload:an,labelFormatter:pn})=>v.jsx(ej,{label:pn&&an?pn(je,an):je,payload:an,unit:A,classNames:Ye,styles:We,series:d,valueFormatter:W,showColor:re!=="gradient",attributes:te}),...q}),be,Ke,V]})})})});gb.displayName="@mantine/charts/LineChart";gb.classes=I0;gb.varsResolver=xG;const sz="daily_report_prompt",wS="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 Qje(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 qc({label:e,value:n,color:t,icon:i,sub:r}){return v.jsxs(Tt,{p:"sm",withBorder:!0,radius:"md",children:[v.jsxs(Ee,{gap:6,mb:2,align:"center",children:[i,v.jsx(de,{size:"xs",c:"dimmed",tt:"uppercase",fw:600,children:e})]}),v.jsx(de,{fz:28,fw:700,c:t,children:n}),r&&v.jsx(de,{size:"xs",c:"dimmed",children:r})]})}function jg({title:e,rows:n,emptyText:t,withAvatar:i=!1}){return v.jsxs(za,{withBorder:!0,radius:"md",p:"sm",children:[v.jsx(de,{fw:600,size:"sm",mb:6,children:e}),n.length===0?v.jsx(de,{size:"xs",c:"dimmed",children:t}):v.jsx(kn,{gap:4,children:n.map((r,a)=>v.jsxs(Ee,{gap:6,wrap:"nowrap",justify:"space-between",children:[v.jsxs(Ee,{gap:6,wrap:"nowrap",style:{minWidth:0,flex:1},children:[i&&v.jsx(mo,{size:22,radius:"xl",color:Ru(r.name||String(a)),children:(r.name||"?").slice(0,2).toUpperCase()}),v.jsx(de,{size:"sm",truncate:!0,children:r.name||"(sin nombre)"})]}),v.jsx(Gn,{size:"sm",variant:"light",color:a===0?"teal":"gray",children:r.count})]},(r.user_id||r.name)+a))})]})}function Jje({date:e,onJumpToCard:n}){const[t,i]=x.useState(null),[r,a]=x.useState(null),[o,l]=x.useState(null),[u,f]=x.useState(!1),[h,d]=x.useState(null),[p,g]=x.useState(!1),[b,w]=x.useState(""),[k,_]=x.useState(null),[S,j]=x.useState(null);x.useEffect(()=>{i(null),a(null),Cre(e).then(i).catch(R=>a(R.message)),l(null),d(null),jre(e).then(R=>l(R.exists?R:null)).catch(()=>{})},[e]);const T=async()=>{f(!0),d(null);try{const R=await Are(e);l({...R,exists:!0})}catch(R){d(R.message)}finally{f(!1)}},A=async()=>{try{const R=await Ore(sz);w(R.value||wS)}catch{w(wS)}g(!0)},O=async()=>{await Tre(sz,b),g(!1)},M=()=>w(wS),$=x.useMemo(()=>t?t.hourly_moves.map((R,D)=>({hora:String(D).padStart(2,"0")+":00",movimientos:R})):[],[t]),q=x.useMemo(()=>{if(!t)return[];const R=new Set;for(const D of t.done_cards)D.requester&&R.add(D.requester);return Array.from(R).sort()},[t]),P=x.useMemo(()=>{if(!t)return[];const R=new Map;for(const D of t.done_cards)D.assignee_id&&R.set(D.assignee_id,D.assignee_name||D.assignee_id);return Array.from(R.entries()).map(([D,z])=>({value:D,label:z}))},[t]),L=x.useMemo(()=>t?t.done_cards.filter(R=>!(k&&R.requester!==k||S&&R.assignee_id!==S)):[],[t,k,S]),U=()=>{if(!t)return;const R=window.open("","_blank");if(!R)return;const D=window.location.origin,z=(()=>{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}`),S){const V=P.find(I=>I.value===S);H.push(`asignado=${(V==null?void 0:V.label)||S}`)}const Y=V=>V.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""),N=L.map(V=>{const I=(V.tags||[]).map(Y).join(", "),Q=`${D}/?card=${V.id}`;return` ${String(V.seq_num).padStart(5,"0")} ${Y(V.title)} ${Y(V.requester||"")} @@ -610,7 +610,7 @@ ${o!=null&&o.summary?`

setTimeout(() => window.print(), 250));<\/script> -`;R.document.write(W),R.document.close()};if(r)return v.jsx(kl,{color:"red",icon:v.jsx(i4,{size:14}),children:r});if(!t)return v.jsx(Ee,{justify:"center",p:"xl",children:v.jsx(Zt,{size:"sm"})});const G=t.kpis,B=G.deadlines_met+G.deadlines_missed>0?Math.round(G.deadlines_met/(G.deadlines_met+G.deadlines_missed)*100):null;return v.jsxs(kn,{gap:"md",children:[v.jsxs(Ee,{justify:"space-between",wrap:"wrap",children:[v.jsxs(Ee,{gap:6,children:[v.jsx(rle,{size:20}),v.jsx(El,{order:4,children:"Reporte diario"})]}),v.jsx(de,{size:"sm",c:"dimmed",tt:"capitalize",children:Zje(t.date)})]}),v.jsxs(Ko,{cols:{base:2,sm:4,md:6},spacing:"xs",children:[v.jsx(qc,{label:"Hechas",value:G.done,color:"teal",icon:v.jsx(cs,{size:14,color:"var(--mantine-color-teal-6)"})}),v.jsx(qc,{label:"Creadas",value:G.created,icon:v.jsx(cf,{size:14})}),v.jsx(qc,{label:"Movimientos",value:G.moves,icon:v.jsx(ff,{size:14})}),v.jsx(qc,{label:"Bloqueado",value:ei(G.blocked_ms),color:"yellow",icon:v.jsx(ul,{size:14,color:"var(--mantine-color-yellow-6)"})}),v.jsx(qc,{label:"Reabiertas",value:G.reopened,color:G.reopened>0?"orange":void 0,icon:v.jsx(u1,{size:14})}),v.jsx(qc,{label:"Deadlines",value:B!=null?`${B}%`:"—",color:B==null?"dimmed":B>=80?"teal":"red",sub:`${G.deadlines_met} on-time / ${G.deadlines_missed} vencidos`,icon:v.jsx(f1,{size:14})})]}),v.jsxs(Ko,{cols:{base:1,sm:2,md:4},spacing:"xs",children:[v.jsx(jg,{title:"Asignado: mas hechas",rows:t.top_assignees_done,emptyText:"Sin hechas con asignado.",withAvatar:!0}),v.jsx(jg,{title:"Asignado: mas creadas",rows:t.top_assignees_created,emptyText:"Sin actor en creadas.",withAvatar:!0}),v.jsx(jg,{title:"Solicitante: mas atendidas",rows:t.top_requesters_done,emptyText:"Sin solicitantes con hechas."}),v.jsx(jg,{title:"Solicitante: mas aportadas",rows:t.top_requesters_added,emptyText:"Sin nuevas con solicitante."})]}),v.jsx(Tt,{withBorder:!0,radius:"md",p:"sm",bg:"var(--mantine-color-blue-light)",style:{borderLeftWidth:4,borderLeftColor:"var(--mantine-color-blue-6)"},children:v.jsxs(Ee,{justify:"space-between",align:"flex-start",wrap:"nowrap",children:[v.jsxs(Ee,{gap:6,align:"flex-start",wrap:"nowrap",style:{flex:1,minWidth:0},children:[v.jsx(vue,{size:18,color:"var(--mantine-color-blue-6)",style:{flexShrink:0,marginTop:2}}),v.jsxs(fe,{style:{flex:1},children:[h&&v.jsx(kl,{color:"red",mb:4,icon:v.jsx(i4,{size:14}),children:h}),u?v.jsxs(Ee,{gap:6,children:[v.jsx(Zt,{size:"xs"}),v.jsx(de,{size:"sm",c:"dimmed",children:"Generando resumen…"})]}):o!=null&&o.summary?v.jsxs(v.Fragment,{children:[v.jsx(de,{size:"sm",style:{whiteSpace:"pre-wrap"},children:o.summary}),o.generated_at&&v.jsxs(de,{size:"xs",c:"dimmed",mt:4,children:["Generado ",new Date(o.generated_at).toLocaleString()," · ",o.model]})]}):v.jsx(de,{size:"sm",c:"dimmed",fs:"italic",children:'Aun no hay resumen del dia. Pulsa "Generar".'})]})]}),v.jsxs(Ee,{gap:4,wrap:"nowrap",children:[v.jsx(wt,{label:o!=null&&o.exists?"Regenerar":"Generar",withArrow:!0,children:v.jsx(Jn,{variant:"subtle",color:"blue",onClick:T,loading:u,"aria-label":"Regenerar resumen",children:v.jsx(ff,{size:16})})}),v.jsx(wt,{label:"Configurar prompt",withArrow:!0,children:v.jsx(Jn,{variant:"subtle",color:"gray",onClick:A,"aria-label":"Configurar prompt",children:v.jsx(mue,{size:16})})})]})]})}),v.jsxs(za,{withBorder:!0,radius:"md",p:"sm",children:[v.jsxs(Ee,{justify:"space-between",mb:"xs",wrap:"wrap",gap:6,children:[v.jsxs(Ee,{gap:6,wrap:"wrap",children:[v.jsx(de,{fw:600,size:"sm",children:"Tareas hechas"}),v.jsxs(Gn,{size:"xs",variant:"light",children:["N ",L.length,L.length!==t.done_cards.length?` / ${t.done_cards.length}`:""]}),v.jsxs(de,{size:"xs",c:"dimmed",children:["Lead time avg ",t.lead_time.samples>0?ei(t.lead_time.avg_ms):"—"," · p50"," ",t.lead_time.samples>0?ei(t.lead_time.p50_ms):"—"," · p95"," ",t.lead_time.samples>0?ei(t.lead_time.p95_ms):"—"]})]}),v.jsxs(Ee,{gap:6,wrap:"nowrap",children:[v.jsx(jr,{size:"xs",placeholder:"Solicitante",data:q,value:k,onChange:_,clearable:!0,searchable:!0,style:{width:160},"aria-label":"Filtrar por solicitante"}),v.jsx(jr,{size:"xs",placeholder:"Asignado",data:P,value:S,onChange:j,clearable:!0,searchable:!0,style:{width:160},"aria-label":"Filtrar por asignado"}),v.jsx(Yn,{size:"xs",leftSection:v.jsx(Wq,{size:14}),variant:"light",onClick:U,"data-test":"daily-report-pdf",children:"PDF"})]})]}),L.length===0?v.jsx(de,{size:"xs",c:"dimmed",children:"Sin hechas en este dia."}):v.jsx(ur,{style:{maxHeight:280},type:"auto",children:v.jsxs(Xe,{verticalSpacing:4,fz:"xs",highlightOnHover:!0,striped:"even",children:[v.jsx(Xe.Thead,{children:v.jsxs(Xe.Tr,{children:[v.jsx(Xe.Th,{style:{width:70},children:"#"}),v.jsx(Xe.Th,{children:"Titulo"}),v.jsx(Xe.Th,{children:"Solicitante"}),v.jsx(Xe.Th,{children:"Asignado"}),v.jsx(Xe.Th,{children:"Tags"}),v.jsx(Xe.Th,{style:{width:110},children:"Lead time"})]})}),v.jsx(Xe.Tbody,{children:L.map(R=>v.jsxs(Xe.Tr,{children:[v.jsx(Xe.Td,{children:v.jsx(de,{size:"xs",c:"dimmed",children:String(R.seq_num).padStart(5,"0")})}),v.jsx(Xe.Td,{children:v.jsx(Et,{onClick:()=>n==null?void 0:n(R.id),style:{textAlign:"left"},children:v.jsx(de,{size:"xs",fw:500,td:"underline",children:R.title})})}),v.jsx(Xe.Td,{children:v.jsx(de,{size:"xs",children:R.requester||"—"})}),v.jsx(Xe.Td,{children:v.jsx(de,{size:"xs",children:R.assignee_name||"—"})}),v.jsx(Xe.Td,{children:v.jsx(Ee,{gap:2,wrap:"wrap",children:(R.tags||[]).slice(0,3).map(D=>v.jsx(Gn,{size:"xs",variant:"light",color:Ru(D),radius:"sm",children:D},D))})}),v.jsx(Xe.Td,{children:v.jsx(de,{size:"xs",c:"dimmed",children:ei(R.lead_time_ms)})})]},R.id))})]})})]}),v.jsxs(Ko,{cols:{base:1,sm:2},spacing:"xs",children:[v.jsxs(za,{withBorder:!0,radius:"md",p:"sm",children:[v.jsxs(Ee,{justify:"space-between",mb:6,children:[v.jsx(de,{fw:600,size:"sm",children:"Movimientos por hora"}),v.jsx(Gn,{size:"xs",variant:"light",children:G.moves})]}),G.moves===0?v.jsx(de,{size:"xs",c:"dimmed",children:"Sin movimientos."}):v.jsx(dl,{h:160,data:$,dataKey:"hora",series:[{name:"movimientos",color:"blue.6"}],tickLine:"y",withTooltip:!0,valueFormatter:R=>String(R)})]}),v.jsxs(za,{withBorder:!0,radius:"md",p:"sm",children:[v.jsx(de,{fw:600,size:"sm",mb:6,children:"Tags trabajadas"}),t.tags_done.length===0?v.jsx(de,{size:"xs",c:"dimmed",children:"Sin tags."}):v.jsx(Ee,{gap:4,wrap:"wrap",children:t.tags_done.map(R=>v.jsxs(Gn,{variant:"light",color:Ru(R.name),size:"sm",children:[R.name," · ",R.count]},R.name))})]})]}),t.reopened_cards.length>0&&v.jsxs(za,{withBorder:!0,radius:"md",p:"sm",children:[v.jsxs(Ee,{gap:6,mb:6,children:[v.jsx(u1,{size:14,color:"var(--mantine-color-orange-6)"}),v.jsx(de,{fw:600,size:"sm",children:"Reabiertas (Done → otra)"}),v.jsx(Gn,{size:"xs",variant:"light",color:"orange",children:t.reopened_cards.length})]}),v.jsx(kn,{gap:4,children:t.reopened_cards.map(R=>v.jsxs(Ee,{gap:6,wrap:"nowrap",justify:"space-between",children:[v.jsx(Et,{onClick:()=>n==null?void 0:n(R.card_id),style:{minWidth:0,flex:1},children:v.jsx(de,{size:"xs",truncate:!0,td:"underline",children:R.title})}),v.jsxs(de,{size:"xs",c:"dimmed",children:[R.from_column," → ",R.to_column]}),R.actor_name&&v.jsx(Gn,{size:"xs",variant:"light",color:"cyan",children:R.actor_name})]},R.card_id+R.ts))})]}),(t.deadlines.missed>0||t.deadlines.met>0)&&v.jsxs(za,{withBorder:!0,radius:"md",p:"sm",children:[v.jsxs(Ee,{gap:6,mb:6,children:[v.jsx(f1,{size:14}),v.jsx(de,{fw:600,size:"sm",children:"Deadlines"}),v.jsxs(Gn,{size:"xs",variant:"light",color:"teal",children:[t.deadlines.met," on-time"]}),v.jsxs(Gn,{size:"xs",variant:"light",color:"red",children:[t.deadlines.missed," vencidos"]})]}),t.deadlines.list.length>0&&v.jsx(kn,{gap:4,children:t.deadlines.list.map(R=>v.jsxs(Ee,{gap:6,justify:"space-between",wrap:"nowrap",children:[v.jsx(Et,{onClick:()=>n==null?void 0:n(R.card_id),style:{minWidth:0,flex:1},children:v.jsx(de,{size:"xs",truncate:!0,td:"underline",children:R.title})}),v.jsxs(de,{size:"xs",c:"red",children:["+",ei(R.late_ms)," tarde"]})]},R.card_id))})]}),v.jsxs(za,{withBorder:!0,radius:"md",p:"sm",children:[v.jsxs(Ee,{gap:6,mb:6,children:[v.jsx(l4,{size:14}),v.jsx(de,{fw:600,size:"sm",children:"Cards estancadas (al final del dia)"}),v.jsxs(Gn,{size:"xs",variant:"light",color:"orange",children:[t.stale_cards.d7.length,"d7"]}),v.jsxs(Gn,{size:"xs",variant:"light",color:"red",children:[t.stale_cards.d14.length,"d14"]}),v.jsxs(Gn,{size:"xs",variant:"filled",color:"red",children:[t.stale_cards.d30.length,"d30"]})]}),v.jsxs(Ko,{cols:{base:1,sm:3},spacing:"xs",children:[v.jsxs(fe,{children:[v.jsx(de,{size:"xs",fw:500,c:"orange",mb:4,children:"7-13 dias"}),v.jsxs(kn,{gap:2,children:[t.stale_cards.d7.slice(0,8).map(R=>v.jsx(Et,{onClick:()=>n==null?void 0:n(R.card_id),children:v.jsxs(de,{size:"xs",truncate:!0,children:[R.title," ",v.jsxs(de,{span:!0,c:"dimmed",size:"xs",children:["· ",R.column_name," · ",R.days,"d"]})]})},R.card_id)),t.stale_cards.d7.length===0&&v.jsx(de,{size:"xs",c:"dimmed",children:"Ninguna."})]})]}),v.jsxs(fe,{children:[v.jsx(de,{size:"xs",fw:500,c:"red",mb:4,children:"14-29 dias"}),v.jsxs(kn,{gap:2,children:[t.stale_cards.d14.slice(0,8).map(R=>v.jsx(Et,{onClick:()=>n==null?void 0:n(R.card_id),children:v.jsxs(de,{size:"xs",truncate:!0,children:[R.title," ",v.jsxs(de,{span:!0,c:"dimmed",size:"xs",children:["· ",R.column_name," · ",R.days,"d"]})]})},R.card_id)),t.stale_cards.d14.length===0&&v.jsx(de,{size:"xs",c:"dimmed",children:"Ninguna."})]})]}),v.jsxs(fe,{children:[v.jsx(de,{size:"xs",fw:500,c:"red.8",mb:4,children:"30+ dias"}),v.jsxs(kn,{gap:2,children:[t.stale_cards.d30.slice(0,8).map(R=>v.jsx(Et,{onClick:()=>n==null?void 0:n(R.card_id),children:v.jsxs(de,{size:"xs",truncate:!0,fw:600,children:[R.title," ",v.jsxs(de,{span:!0,c:"dimmed",size:"xs",fw:400,children:["· ",R.column_name," · ",R.days,"d"]})]})},R.card_id)),t.stale_cards.d30.length===0&&v.jsx(de,{size:"xs",c:"dimmed",children:"Ninguna."})]})]})]})]}),v.jsx(us,{}),v.jsx(Ee,{gap:6,justify:"space-between",children:v.jsxs(Ee,{gap:4,children:[v.jsx(c1,{size:14}),v.jsxs(de,{size:"xs",c:"dimmed",children:["TZ: ",t.tz," · cards archivadas hoy: ",t.archived_today]})]})}),v.jsx(Gi,{opened:p,onClose:()=>g(!1),title:"Prompt del agente diario",size:"lg",zIndex:500,children:v.jsxs(kn,{gap:"sm",children:[v.jsx(de,{size:"xs",c:"dimmed",children:"Plantilla que el agente recibe junto al JSON del reporte. Compartida por todos los usuarios."}),v.jsx(_l,{autosize:!0,minRows:6,maxRows:20,value:b,onChange:R=>w(R.currentTarget.value),"data-test":"daily-report-prompt"}),v.jsxs(Ee,{justify:"space-between",children:[v.jsx(Yn,{size:"xs",variant:"subtle",onClick:M,children:"Restablecer por defecto"}),v.jsxs(Ee,{gap:6,children:[v.jsx(Yn,{size:"xs",variant:"subtle",color:"gray",onClick:()=>g(!1),children:"Cancelar"}),v.jsx(Yn,{size:"xs",onClick:O,"data-test":"daily-report-prompt-save",children:"Guardar"})]})]})]})})]})}function lz(e){if(e)return Be(e).format("YYYY-MM-DD")}function Nh({icon:e,label:n,value:t,hint:i,color:r}){return v.jsx(Tt,{withBorder:!0,p:"md",radius:"md",children:v.jsxs(kn,{gap:4,children:[v.jsxs(Ee,{gap:6,c:"dimmed",children:[e,v.jsx(de,{size:"xs",tt:"uppercase",fw:600,children:n})]}),v.jsx(de,{size:"xl",fw:700,c:r,children:t}),i&&v.jsx(de,{size:"xs",c:"dimmed",children:i})]})})}function Jje({users:e}){const[n,t]=x.useState(()=>Be().subtract(30,"day").toDate()),[i,r]=x.useState(()=>new Date),[a,o]=x.useState(null),[l,u]=x.useState(null),[f,h]=x.useState([]),[d,p]=x.useState([]),[g,b]=x.useState(null),[w,k]=x.useState(!1),[_,S]=x.useState([]);x.useEffect(()=>{LF().then(p).catch(()=>{})},[]),x.useEffect(()=>{let P=!1;return k(!0),IF({from:lz(n),to:lz(i),assignee_id:a||void 0,requester:l||void 0,tags:f.length>0?f:void 0}).then(L=>{P||(b(L),S(U=>{const G=new Set(U);for(const B of L.top_requesters??[])G.add(B.requester);return Array.from(G).sort()}))}).catch(()=>{}).finally(()=>{P||k(!1)}),()=>{P=!0}},[n,i,a,l,f]);const j=x.useMemo(()=>e.map(P=>({value:P.id,label:P.display_name||P.username})),[e]),T=x.useMemo(()=>{if(!g)return[];const P=g.cumulative_flow??[],L=P.findIndex(G=>G.total>0||G.done>0);return(L<=0?P:P.slice(Math.max(0,L-1))).map(G=>({date:G.date,done:G.done,wip:Math.max(0,G.total-G.done),total:G.total}))},[g]),A=x.useMemo(()=>{if(!g)return[];const P=new Map;for(const L of g.throughput_daily??[])P.set(L.date,{date:L.date,completed:L.count,created:0});for(const L of g.created_daily??[]){const U=P.get(L.date)??{date:L.date,completed:0,created:0};U.created=L.count,P.set(L.date,U)}return Array.from(P.values()).sort((L,U)=>L.date.localeCompare(U.date))},[g]),O=x.useMemo(()=>g?(g.by_column??[]).map(P=>({column:P.name+(P.is_done?" ✓":""),tarjetas:P.count})):[],[g]),M=x.useMemo(()=>g?(g.top_assignees??[]).slice().sort((P,L)=>L.completed_in_range+L.active-(P.completed_in_range+P.active)).slice(0,8).map(P=>({usuario:P.display_name||P.username,completadas:P.completed_in_range,activas:P.active})):[],[g]),$=x.useMemo(()=>g?(g.top_requesters??[]).map(P=>({solicitante:P.requester,activas:P.active,completadas:P.completed_in_range})):[],[g]),q=x.useMemo(()=>g?(g.movements_by_user??[]).filter(P=>P.moves>0).slice(0,8).map(P=>({usuario:P.display_name||P.username,movimientos:P.moves})):[],[g]);return v.jsx(fe,{p:"md",children:v.jsxs(kn,{gap:"md",children:[v.jsxs(Ee,{justify:"space-between",children:[v.jsx(El,{order:3,children:"Dashboard"}),v.jsxs(Ee,{gap:"xs",wrap:"nowrap",children:[v.jsx(Du,{label:"Desde",value:n,onChange:P=>t(P),size:"xs",clearable:!1,valueFormat:"YYYY-MM-DD",style:{minWidth:140}}),v.jsx(Du,{label:"Hasta",value:i,onChange:P=>r(P),size:"xs",clearable:!1,valueFormat:"YYYY-MM-DD",style:{minWidth:140}}),v.jsx(jr,{label:"Asignado",size:"xs",placeholder:"Todos",value:a,onChange:o,data:j,clearable:!0,searchable:!0,style:{minWidth:160}}),v.jsx(jr,{label:"Solicitante",size:"xs",placeholder:"Todos",value:l,onChange:u,data:_.map(P=>({value:P,label:P})),clearable:!0,searchable:!0,style:{minWidth:160}}),v.jsx(u0,{label:"Tags",size:"xs",placeholder:"Todas",value:f,onChange:h,data:d,clearable:!0,searchable:!0,style:{minWidth:200}})]})]}),w&&!g&&v.jsx(Gf,{p:"xl",children:v.jsx(Zt,{})}),g&&(()=>{const P=g.totals??{},L=g.lead_time??{n:0,p50_ms:0,p90_ms:0},U=G=>P[G]??0;return v.jsxs(v.Fragment,{children:[v.jsxs(Ko,{cols:{base:2,md:5},spacing:"md",children:[v.jsx(Nh,{icon:v.jsx(RM,{size:14}),label:"Totales",value:U("cards"),hint:`${U("columns")} columnas, ${U("users")} usuarios`}),v.jsx(Nh,{icon:v.jsx(RM,{size:14}),label:"Activas",value:U("cards_active"),hint:"Sin completar",color:"blue"}),v.jsx(Nh,{icon:v.jsx(wm,{size:14}),label:"Completadas (rango)",value:U("cards_completed_in_range"),hint:`${U("cards_done")} completadas total · ${U("cards_created_in_range")} creadas rango`,color:"green"}),v.jsx(Nh,{icon:v.jsx(ple,{size:14}),label:"Lead time p50",value:L.n>0?ei(L.p50_ms):0,hint:`p90 ${L.n>0?ei(L.p90_ms):0} · n=${L.n}`}),v.jsx(Nh,{icon:v.jsx(ul,{size:14}),label:"Bloqueos activos",value:U("active_locks"),hint:`Total bloqueado: ${ei(g.lock_total_ms??0)}`,color:U("active_locks")>0?"yellow":void 0})]}),v.jsxs(Tt,{withBorder:!0,p:"md",radius:"md",children:[v.jsxs(Ee,{gap:6,mb:"sm",children:[v.jsx(l4,{size:16}),v.jsx(de,{fw:600,children:"Cumulative Flow Diagram"}),v.jsx(de,{size:"xs",c:"dimmed",children:"total vs hechas (acumulado)"})]}),T.length===0?v.jsx(de,{c:"dimmed",size:"sm",children:"Sin datos."}):v.jsx("div",{style:{height:260,width:"100%"},children:v.jsx(xj,{width:"100%",height:"100%",children:v.jsxs(Vje,{data:T,margin:{top:10,right:16,left:0,bottom:0},children:[v.jsx(pb,{strokeDasharray:"5 5",stroke:"var(--mantine-color-gray-4)"}),v.jsx(Il,{dataKey:"date",tick:{fontSize:12,fill:"currentColor"}}),v.jsx(bo,{allowDecimals:!1,tick:{fontSize:12,fill:"currentColor"}}),v.jsx(pa,{contentStyle:{background:"var(--mantine-color-body)",border:"1px solid var(--mantine-color-gray-3)",borderRadius:6,fontSize:12}}),v.jsx(rs,{wrapperStyle:{fontSize:12}}),v.jsx(ms,{type:"linear",dataKey:"done",name:"Hechas",stackId:"cfd",stroke:"var(--mantine-color-green-6)",fill:"var(--mantine-color-green-6)",fillOpacity:.55,strokeWidth:2,isAnimationActive:!1,dot:{r:3,fill:"var(--mantine-color-green-6)",strokeWidth:0},activeDot:{r:5}}),v.jsx(ms,{type:"linear",dataKey:"wip",name:"En curso",stackId:"cfd",stroke:"var(--mantine-color-blue-6)",fill:"var(--mantine-color-blue-6)",fillOpacity:.55,strokeWidth:2,isAnimationActive:!1,dot:{r:3,fill:"var(--mantine-color-blue-6)",strokeWidth:0},activeDot:{r:5}})]})})})]}),v.jsxs(Hr,{children:[v.jsx(Hr.Col,{span:{base:12,md:8},children:v.jsxs(Tt,{withBorder:!0,p:"md",radius:"md",children:[v.jsxs(Ee,{gap:6,mb:"sm",children:[v.jsx(l4,{size:16}),v.jsx(de,{fw:600,children:"Throughput diario"})]}),A.length===0?v.jsx(de,{c:"dimmed",size:"sm",children:"Sin datos en el rango."}):v.jsx(gb,{h:240,data:A,dataKey:"date",curveType:"monotone",withLegend:!0,series:[{name:"completed",label:"Completadas",color:"green.6"},{name:"created",label:"Creadas",color:"blue.6"}]})]})}),v.jsx(Hr.Col,{span:{base:12,md:4},children:v.jsxs(Tt,{withBorder:!0,p:"md",radius:"md",children:[v.jsx(de,{fw:600,mb:"sm",children:"Tarjetas por columna"}),O.length===0?v.jsx(de,{c:"dimmed",size:"sm",children:"Sin columnas."}):v.jsx(dl,{h:240,data:O,dataKey:"column",orientation:"vertical",yAxisProps:{width:100},series:[{name:"tarjetas",label:"Tarjetas",color:"blue.6"}]})]})})]}),v.jsxs(Hr,{children:[v.jsx(Hr.Col,{span:{base:12,md:6},children:v.jsxs(Tt,{withBorder:!0,p:"md",radius:"md",children:[v.jsx(de,{fw:600,mb:"sm",children:"Top asignados"}),M.length===0?v.jsx(de,{c:"dimmed",size:"sm",children:"Sin asignaciones."}):v.jsx(dl,{h:240,data:M,dataKey:"usuario",orientation:"vertical",yAxisProps:{width:120},withLegend:!0,series:[{name:"completadas",label:"Completadas",color:"green.6"},{name:"activas",label:"Activas",color:"blue.6"}],type:"stacked"})]})}),v.jsx(Hr.Col,{span:{base:12,md:6},children:v.jsxs(Tt,{withBorder:!0,p:"md",radius:"md",children:[v.jsx(de,{fw:600,mb:"sm",children:"Top solicitantes"}),$.length===0?v.jsx(de,{c:"dimmed",size:"sm",children:"Sin solicitantes en el rango."}):v.jsx(dl,{h:Math.max(240,$.length*32),data:$,dataKey:"solicitante",orientation:"vertical",yAxisProps:{width:160,interval:0},withLegend:!0,series:[{name:"completadas",label:"Completadas",color:"green.6"},{name:"activas",label:"Activas",color:"violet.6"}],type:"stacked"})]})})]}),v.jsxs(Hr,{children:[v.jsx(Hr.Col,{span:{base:12,md:6},children:v.jsxs(Tt,{withBorder:!0,p:"md",radius:"md",children:[v.jsx(de,{fw:600,mb:"sm",children:"Movimientos por usuario (rango)"}),q.length===0?v.jsx(de,{c:"dimmed",size:"sm",children:"Sin movimientos registrados."}):v.jsx(dl,{h:240,data:q,dataKey:"usuario",orientation:"vertical",yAxisProps:{width:120},series:[{name:"movimientos",label:"Movimientos",color:"orange.6"}]})]})}),v.jsx(Hr.Col,{span:{base:12,md:6},children:v.jsxs(Tt,{withBorder:!0,p:"md",radius:"md",children:[v.jsx(de,{fw:600,mb:"sm",children:"Tiempo en columna (cycle time)"}),v.jsxs(Xe,{striped:!0,highlightOnHover:!0,withTableBorder:!0,withColumnBorders:!0,fz:"xs",children:[v.jsx(Xe.Thead,{children:v.jsxs(Xe.Tr,{children:[v.jsx(Xe.Th,{children:"Columna"}),v.jsx(Xe.Th,{children:"n"}),v.jsx(Xe.Th,{children:"p50"}),v.jsx(Xe.Th,{children:"p90"}),v.jsx(Xe.Th,{children:"avg"})]})}),v.jsx(Xe.Tbody,{children:(g.cycle_time_per_column??[]).map(G=>v.jsxs(Xe.Tr,{children:[v.jsx(Xe.Td,{children:v.jsxs(Ee,{gap:6,wrap:"nowrap",children:[v.jsx(de,{size:"xs",fw:500,children:G.name}),G.is_done&&v.jsx(Gn,{size:"xs",color:"green",variant:"light",children:"done"})]})}),v.jsx(Xe.Td,{children:G.stats.n}),v.jsx(Xe.Td,{children:G.stats.n>0?ei(G.stats.p50_ms):"—"}),v.jsx(Xe.Td,{children:G.stats.n>0?ei(G.stats.p90_ms):"—"}),v.jsx(Xe.Td,{children:G.stats.n>0?ei(G.stats.avg_ms):"—"})]},G.column_id))})]})]})})]})]})})()]})})}function eAe(e){try{return JSON.parse(e)}catch{return{}}}function nAe(e){const n=eAe(e.payload);switch(e.kind){case"created":return{id:e.id,ts:e.created_at,kind:"Creada",actorID:e.actor_id,detail:String(n.title||""),icon:v.jsx(cf,{size:12}),color:"green"};case"title_changed":return{id:e.id,ts:e.created_at,kind:"Titulo",actorID:e.actor_id,detail:`"${n.old}" → "${n.new}"`,icon:v.jsx(Fh,{size:12}),color:"blue"};case"requester_changed":return{id:e.id,ts:e.created_at,kind:"Solicitante",actorID:e.actor_id,detail:`"${n.old||"(vacio)"}" → "${n.new||"(vacio)"}"`,icon:v.jsx(Fh,{size:12}),color:"orange"};case"description_changed":return{id:e.id,ts:e.created_at,kind:"Descripcion",actorID:e.actor_id,detail:"edicion",icon:v.jsx(Fh,{size:12}),color:"blue"};case"color_changed":return{id:e.id,ts:e.created_at,kind:"Color",actorID:e.actor_id,detail:String(n.color||""),icon:v.jsx(D9,{size:12}),color:"violet"};case"tags_changed":return{id:e.id,ts:e.created_at,kind:"Tags",actorID:e.actor_id,detail:Array.isArray(n.tags)?n.tags.join(", ")||"(sin tags)":"",icon:v.jsx(yue,{size:12}),color:"grape"};case"assigned":return{id:e.id,ts:e.created_at,kind:"Asignada",actorID:e.actor_id,detail:String(n.assignee_id||""),icon:v.jsx(Pue,{size:12}),color:"teal"};case"unassigned":return{id:e.id,ts:e.created_at,kind:"Sin asignar",actorID:e.actor_id,detail:"",icon:v.jsx(Due,{size:12}),color:"gray"};case"deadline_set":{const t=String(n.deadline||"");return{id:e.id,ts:e.created_at,kind:"Deadline",actorID:e.actor_id,detail:t?t.slice(0,10):"",icon:v.jsx(Uq,{size:12}),color:"orange"}}case"deadline_cleared":return{id:e.id,ts:e.created_at,kind:"Deadline quitado",actorID:e.actor_id,detail:n.prev?String(n.prev).slice(0,10):"",icon:v.jsx(tle,{size:12}),color:"gray"};default:return{id:e.id,ts:e.created_at,kind:e.kind,actorID:e.actor_id,detail:e.payload,icon:v.jsx(Fh,{size:12}),color:"gray"}}}function tAe({card:e,columns:n=[]}){const[t,i]=x.useState(null),[r,a]=x.useState([]),o=x.useMemo(()=>{const _=new Map;for(const S of n)_.set(S.id,S);return _},[n]),l=_=>{var S;return((S=o.get(_))==null?void 0:S.is_done)===!0};x.useEffect(()=>{Ere(e.id).then(i).catch(()=>i({column_history:[],lock_periods:[],events:[],total_locked_ms:0,currently_locked:!1})),zF().then(a).catch(()=>{})},[e.id]);const u=x.useMemo(()=>{const _=new Map;for(const S of r)_.set(S.id,S);return _},[r]),f=x.useMemo(()=>{if(!t)return[];const _=[];for(const S of t.events||[])_.push(nAe(S));for(const S of t.column_history||[]){const j=l(S.column_id);_.push({id:"h_in_"+S.id,ts:S.entered_at,kind:j?"Hecho en columna":"Mueve a columna",actorID:S.actor_id,detail:S.column_name||S.column_id,icon:j?v.jsx(cs,{size:12}):v.jsx(Yse,{size:12}),color:j?"green":"blue",doneColumn:j})}for(const S of t.lock_periods||[])_.push({id:"lk_"+S.id,ts:S.locked_at,kind:"Bloqueada",actorID:S.actor_id,detail:"",icon:v.jsx(ul,{size:12}),color:"yellow"}),S.unlocked_at&&_.push({id:"lku_"+S.id,ts:S.unlocked_at,kind:"Desbloqueada",actorID:S.actor_id,detail:ei(S.duration_ms),icon:v.jsx(Yq,{size:12}),color:"yellow"});return _.sort((S,j)=>S.ts.localeCompare(j.ts))},[t,o]);if(!t)return v.jsx(Ee,{justify:"center",p:"xl",children:v.jsx(Zt,{size:"sm"})});const{column_history:h,total_locked_ms:d,currently_locked:p}=t;if(f.length===0)return v.jsx(de,{c:"dimmed",children:"Sin historial."});const g=Date.now(),b=new Map;for(const _ of h){const S=_.exited_at?_.duration_ms:Math.max(0,g-new Date(_.entered_at).getTime()),j=_.column_id,T=b.get(j),A=o.get(j);b.set(j,{name:_.column_name||(A==null?void 0:A.name)||j,isDone:(A==null?void 0:A.is_done)??!1,ms:((T==null?void 0:T.ms)??0)+S,visits:((T==null?void 0:T.visits)??0)+1})}const w=Array.from(b.entries()).map(([_,S])=>({id:_,...S})).sort((_,S)=>S.ms-_.ms),k=_=>{if(!_)return"";const S=u.get(_);return S?S.display_name||S.username:_};return v.jsxs(kn,{gap:"md",children:[v.jsx(de,{size:"sm",c:"dimmed",children:"Linea de tiempo completa de la tarjeta."}),v.jsx(uf,{active:f.length,bulletSize:22,lineWidth:2,children:f.map(_=>v.jsx(uf.Item,{bullet:_.icon,color:_.color,lineVariant:_.doneColumn?"solid":void 0,title:v.jsxs(Ee,{gap:6,wrap:"wrap",children:[v.jsx(de,{fw:500,size:"sm",children:_.kind}),_.actorID&&v.jsx(Gn,{size:"xs",variant:"light",color:"cyan",leftSection:v.jsx(Lue,{size:10}),children:k(_.actorID)}),_.detail&&v.jsx(Gn,{size:"xs",variant:"outline",color:_.color,children:_.detail})]}),children:v.jsx(de,{size:"xs",c:"dimmed",children:new Date(_.ts).toLocaleString()})},_.id))}),v.jsx(us,{}),v.jsxs(kn,{gap:6,children:[v.jsxs(Ee,{gap:6,align:"center",wrap:"wrap",children:[v.jsx(yle,{size:14}),v.jsx(de,{fw:500,size:"sm",children:"Tiempo por columna"}),v.jsxs(Gn,{size:"xs",variant:"light",color:"gray",children:[h.length," entradas"]}),v.jsxs(de,{size:"xs",c:"dimmed",ml:"auto",children:[v.jsx(ul,{size:11,style:{verticalAlign:"middle"}})," ",v.jsx(de,{span:!0,size:"xs",fw:500,c:d>0?"yellow":"dimmed",children:ei(d)})," ","bloqueada",p?" (en curso)":""]})]}),w.length>0?v.jsxs(Xe,{withTableBorder:!0,withColumnBorders:!0,striped:"even",verticalSpacing:4,fz:"xs",children:[v.jsx(Xe.Thead,{children:v.jsxs(Xe.Tr,{children:[v.jsx(Xe.Th,{children:"Columna"}),v.jsx(Xe.Th,{style:{width:60},children:"Visitas"}),v.jsx(Xe.Th,{style:{width:130},children:"Tiempo total"})]})}),v.jsx(Xe.Tbody,{children:w.map(_=>v.jsxs(Xe.Tr,{children:[v.jsx(Xe.Td,{children:v.jsxs(Ee,{gap:4,wrap:"nowrap",children:[_.isDone&&v.jsx(cs,{size:12,color:"var(--mantine-color-green-6)"}),v.jsx(de,{size:"xs",fw:_.isDone?600:400,children:_.name})]})}),v.jsx(Xe.Td,{children:_.visits}),v.jsx(Xe.Td,{children:ei(_.ms)})]},_.id))})]}):v.jsx(de,{size:"xs",c:"dimmed",children:"Sin movimientos entre columnas."})]})]})}const Ag=26;function xG({value:e,onChange:n,options:t=iH,onOpenCustom:i}){const[r,a]=x.useState(!1),[o,l]=x.useState(e&&e.startsWith("#")?e:"#888888"),u=!!e&&e.startsWith("#")&&!t.some(f=>f.value===e);return v.jsxs(v.Fragment,{children:[v.jsxs(Ee,{gap:6,maw:280,children:[t.map(f=>{const h=e===f.value;return v.jsx(wt,{label:f.label,withArrow:!0,children:v.jsx(fe,{role:"button",onClick:d=>{d.stopPropagation(),n(f.value)},"aria-label":f.label,style:{width:Ag,height:Ag,borderRadius:"50%",background:que(f.value),border:`2px solid ${h?"var(--mantine-color-white)":N9(f.value)}`,boxShadow:h?"0 0 0 2px var(--mantine-color-blue-5)":void 0,cursor:"pointer",flexShrink:0,transition:"transform .1s"}})},f.value||"default")}),v.jsx(wt,{label:"Color personalizado",withArrow:!0,children:v.jsx(fe,{role:"button",onMouseDown:f=>{f.stopPropagation()},onClick:f=>{f.stopPropagation(),i?i():a(!0)},"aria-label":"Color personalizado",style:{width:Ag,height:Ag,borderRadius:"50%",background:u?o:"transparent",border:`2px dashed ${u?o:"var(--mantine-color-gray-5)"}`,boxShadow:u?"0 0 0 2px var(--mantine-color-blue-5)":void 0,cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",color:"var(--mantine-color-gray-3)"},children:v.jsx(D9,{size:14})})})]}),!i&&v.jsx(B6,{opened:r,onClose:()=>a(!1),value:o,onAccept:f=>{l(f),n(f)}})]})}const $h=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;function B6({opened:e,onClose:n,value:t,onAccept:i}){const[r,a]=x.useState(t||"#888888"),[o,l]=x.useState(t||"#888888");x.useEffect(()=>{if(e){const d=t&&$h.test(t)?t:"#888888";a(d),l(d)}},[e,t]);const u=d=>{let p=d.trim();p&&!p.startsWith("#")&&(p="#"+p),l(p),$h.test(p)&&a(p)},f=d=>{a(d),l(d)},h=()=>{i(r),n()};return v.jsx(Gi,{opened:e,onClose:n,title:"Color personalizado",size:"auto",centered:!0,withinPortal:!0,zIndex:2e3,closeOnClickOutside:!0,closeOnEscape:!1,trapFocus:!1,withCloseButton:!1,children:v.jsxs(kn,{gap:"sm",onMouseDown:d=>d.stopPropagation(),onPointerDown:d=>d.stopPropagation(),onClick:d=>d.stopPropagation(),children:[v.jsx(Zy,{value:r,onChange:f,format:"hex",swatches:["#1c7ed6","#15aabf","#12b886","#37b24d","#82c91e","#fab005","#fd7e14","#fa5252","#e64980","#be4bdb","#7950f2","#4c6ef5","#868e96","#212529"],fullWidth:!0}),v.jsxs(Ee,{align:"end",gap:"xs",children:[v.jsx(or,{label:"Hex",value:o,onChange:d=>u(d.currentTarget.value),error:o&&!$h.test(o)?"Hex invalido":void 0,size:"xs",style:{flex:1},placeholder:"#rrggbb"}),v.jsx(fe,{style:{width:32,height:32,borderRadius:4,background:$h.test(o)?o:"transparent",border:"1px solid var(--mantine-color-dark-4)"}})]}),v.jsxs(Ee,{justify:"flex-end",gap:"xs",children:[v.jsx(Yn,{variant:"default",size:"xs",onClick:n,children:"Cancelar"}),v.jsx(Yn,{size:"xs",onClick:h,disabled:!$h.test(r),children:"Aceptar"})]})]})})}const iAe=1e4;function rAe(e){return e.inflight?"yellow":e.last_error?"red":e.jira_key?"green":"gray"}const aAe={gray:"var(--mantine-color-gray-5)",yellow:"var(--mantine-color-yellow-5)",green:"var(--mantine-color-green-5)",red:"var(--mantine-color-red-6)"},uz={gray:"Sin sincronizar con Jira",yellow:"Sincronizando...",green:"Sincronizada con Jira",red:"Error de sincronizacion"};function oAe({cardId:e,refreshTick:n}){const[t,i]=x.useState(null),[r,a]=x.useState(null);if(x.useEffect(()=>{let l=!1;const u=async()=>{try{const h=await Jre(e);l||(i(h),a(null))}catch(h){l||a(h.message)}};u();const f=setInterval(u,iAe);return()=>{l=!0,clearInterval(f)}},[e,n]),r&&!t)return v.jsx(fe,{title:r,style:kS("var(--mantine-color-gray-3)"),"aria-label":"Jira sync state unavailable"});if(!t)return v.jsx(fe,{style:kS("var(--mantine-color-gray-2)"),"aria-label":"Cargando estado Jira"});const o=rAe(t);return v.jsxs(vl,{width:300,shadow:"md",openDelay:150,closeDelay:120,withinPortal:!0,children:[v.jsx(vl.Target,{children:v.jsx(fe,{role:"status","aria-label":uz[o],onClick:l=>l.stopPropagation(),onPointerDown:l=>l.stopPropagation(),style:kS(aAe[o])})}),v.jsx(vl.Dropdown,{onClick:l=>l.stopPropagation(),children:v.jsxs(kn,{gap:6,children:[v.jsxs(Ee,{gap:6,wrap:"nowrap",justify:"space-between",children:[v.jsxs(Ee,{gap:6,wrap:"nowrap",children:[v.jsx(M9,{size:14}),v.jsx(de,{size:"sm",fw:600,children:uz[o]})]}),t.issue_url&&v.jsx(ho,{size:"xs",href:t.issue_url,target:"_blank",rel:"noopener noreferrer",onClick:l=>l.stopPropagation(),children:"Abrir en Jira"})]}),t.jira_key&&v.jsxs(de,{size:"xs",children:[v.jsx(de,{component:"span",c:"dimmed",children:"Issue:"})," ",v.jsx(de,{component:"span",fw:600,children:t.jira_key})]}),t.last_status&&v.jsxs(de,{size:"xs",children:[v.jsx(de,{component:"span",c:"dimmed",children:"Status:"})," ",v.jsx(de,{component:"span",children:t.last_status})]}),t.last_sync_at&&v.jsxs(de,{size:"xs",children:[v.jsx(de,{component:"span",c:"dimmed",children:"Ultimo sync:"})," ",v.jsx(de,{component:"span",children:Sl(t.last_sync_at)})]}),t.last_error&&v.jsxs(Ee,{gap:6,wrap:"nowrap",align:"flex-start",children:[v.jsx(Fse,{size:14,color:"var(--mantine-color-red-6)"}),v.jsx(de,{size:"xs",c:"red",style:{wordBreak:"break-word"},children:t.last_error})]}),!t.jira_key&&v.jsx(de,{size:"xs",c:"dimmed",children:'La card todavia no se ha empujado a Jira. Editala o muevela para disparar el sync, o usa la opcion "Importar de Jira" si ya existe alli.'})]})})]})}function kS(e){return{width:10,height:10,borderRadius:"50%",background:e,cursor:"default",boxShadow:"0 0 0 2px var(--mantine-color-body)",transition:"background 120ms ease"}}function sAe(){const e=window;e._cardRenderProbe&&(e._cardRenderCount=(e._cardRenderCount||0)+1)}function lAe(){const e=window;e._cardRenderProbe&&(e._cardBodyRenderCount=(e._cardBodyRenderCount||0)+1)}const uAe=x.memo(function({card:n,isDone:t,isOverlay:i,activeSticker:r,cardElRef:a,now:o,users:l,assignee:u,requesterOptions:f,menuOpen:h,setMenuOpen:d,onDelete:p,onEdit:g,onDuplicate:b,onChangeColor:w,onShowHistory:k,onToggleLock:_,onAssign:S,onSetDeadline:j,onSetRequester:T,onArchive:A,onOpenCustomColor:O,onRemoveSticker:M,onMoveSticker:$,onCommitSticker:q}){lAe();const P=!!r,[L,U]=x.useState(!1),[G,B]=x.useState(!1),[R,D]=x.useState(!1),[z,H]=x.useState(!1),[Y,N]=x.useState(n.requester||""),W=x.useRef(null),V=n.entered_at?new Date(n.entered_at).getTime():o,I=Math.max(0,o-V),Q=n.deadline?new Date(n.deadline).getTime():0,ie=Q?Q-o:0,re=Q?ie<0:!1,Z=n.created_at?new Date(n.created_at).getTime():0,le=Q&&Z?Q-Z:0,ee=le>0?ie/le:0;let se="blue",ke="light";re?(se="red.9",ke="filled"):ee<.1?(se="red",ke="filled"):ee<.5&&(se="yellow",ke="light");const te=n.locked_at?new Date(n.locked_at).getTime():0,$e=n.locked&&te?Math.max(0,o-te):0,xe=n.created_at?new Date(n.created_at).getTime():0,Ae=n.completed_at?new Date(n.completed_at).getTime():0,ze=t&&xe&&Ae?Math.max(0,Ae-xe):0,we=he=>He=>{var oe;if(!P||i||!$||He.button!==0)return;He.stopPropagation(),He.preventDefault();const Ye=(oe=a.current)==null?void 0:oe.getBoundingClientRect();if(!Ye)return;W.current=he;const We=He.currentTarget;We.setPointerCapture(He.pointerId);const Qe=be=>{const Ke=W.current;if(Ke===null)return;const en=(be.clientX-Ye.left)/Ye.width,je=(be.clientY-Ye.top)/Ye.height;$(n.id,Ke,Math.max(0,Math.min(1,en)),Math.max(0,Math.min(1,je)))},Je=be=>{var Ke;(Ke=We.releasePointerCapture)==null||Ke.call(We,be.pointerId),We.removeEventListener("pointermove",Qe),We.removeEventListener("pointerup",Je),We.removeEventListener("pointercancel",Je),W.current=null,q==null||q(n.id)};We.addEventListener("pointermove",Qe),We.addEventListener("pointerup",Je),We.addEventListener("pointercancel",Je)},Ce=he=>He=>{!P||i||(He.preventDefault(),He.stopPropagation(),M==null||M(n.id,he))},Ne=h?v.jsxs(v.Fragment,{children:[v.jsx(zn.Label,{children:"Acciones"}),v.jsx(zn.Item,{leftSection:v.jsx(Fh,{size:14}),onClick:()=>{d(!1),g(n)},children:"Editar"}),b&&v.jsx(zn.Item,{leftSection:v.jsx(o4,{size:14}),onClick:()=>{d(!1),b(n.id)},children:"Duplicar"}),v.jsxs(Sn,{opened:L,onChange:U,position:"right-start",withArrow:!0,shadow:"md",children:[v.jsx(Sn.Target,{children:v.jsx(zn.Item,{leftSection:v.jsx(D9,{size:14}),onClick:he=>{he.preventDefault(),he.stopPropagation(),U(He=>!He)},closeMenuOnClick:!1,children:"Color"})}),v.jsx(Sn.Dropdown,{p:"xs",onDoubleClick:he=>he.stopPropagation(),onClick:he=>he.stopPropagation(),onMouseDown:he=>he.stopPropagation(),children:v.jsx(xG,{value:n.color,onChange:he=>w(n.id,he),onOpenCustom:O?()=>O(n.id,n.color||"#888888"):void 0})})]}),v.jsxs(Sn,{opened:G,onChange:B,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[v.jsx(Sn.Target,{children:v.jsxs(zn.Item,{leftSection:v.jsx(Eue,{size:14}),onClick:he=>{he.preventDefault(),he.stopPropagation(),B(He=>!He)},closeMenuOnClick:!1,children:["Asignar a ",u?`(${u.display_name||u.username})`:"..."]})}),v.jsx(Sn.Dropdown,{p:"xs",onDoubleClick:he=>he.stopPropagation(),onClick:he=>he.stopPropagation(),onMouseDown:he=>he.stopPropagation(),children:v.jsx(jr,{placeholder:"Sin asignar",value:n.assignee_id??null,onChange:he=>{S(n.id,he),B(!1),d(!1)},data:l.map(he=>({value:he.id,label:he.display_name||he.username})),clearable:!0,searchable:!0,autoFocus:!0,comboboxProps:{withinPortal:!1}})})]}),v.jsxs(Sn,{opened:R,onChange:D,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[v.jsx(Sn.Target,{children:v.jsxs(zn.Item,{leftSection:v.jsx($ue,{size:14}),onClick:he=>{he.preventDefault(),he.stopPropagation(),N(n.requester||""),D(He=>!He)},closeMenuOnClick:!1,children:["Solicitante ",n.requester?`(${n.requester})`:"..."]})}),v.jsx(Sn.Dropdown,{p:"xs",onDoubleClick:he=>he.stopPropagation(),onClick:he=>he.stopPropagation(),onMouseDown:he=>he.stopPropagation(),children:v.jsx(Hy,{placeholder:"Sin solicitante",value:Y,onChange:N,data:f||[],autoFocus:!0,comboboxProps:{withinPortal:!1},onKeyDown:he=>{he.key==="Enter"?(he.preventDefault(),T==null||T(n.id,Y.trim()),D(!1),d(!1)):he.key==="Escape"&&D(!1)},onOptionSubmit:he=>{N(he),T==null||T(n.id,he),D(!1),d(!1)}})})]}),v.jsx(zn.Item,{leftSection:n.locked?v.jsx(Yq,{size:14}):v.jsx(ul,{size:14}),color:n.locked?"yellow":void 0,onClick:()=>{d(!1),_(n.id,!n.locked)},children:n.locked?"Desbloquear":"Bloquear"}),v.jsx(zn.Item,{leftSection:v.jsx(zle,{size:14}),onClick:()=>{d(!1),k(n)},children:"Historial"}),j&&v.jsxs(Sn,{opened:z,onChange:H,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[v.jsx(Sn.Target,{children:v.jsx(zn.Item,{leftSection:v.jsx(Uq,{size:14}),onClick:he=>{he.preventDefault(),he.stopPropagation(),H(He=>!He)},closeMenuOnClick:!1,children:n.deadline?`Deadline (${n.deadline.slice(0,10)})`:"Deadline..."})}),v.jsxs(Sn.Dropdown,{p:"xs",onDoubleClick:he=>he.stopPropagation(),onClick:he=>he.stopPropagation(),onMouseDown:he=>he.stopPropagation(),children:[v.jsx(Du,{value:n.deadline?n.deadline.slice(0,10):null,onChange:he=>{const He=he?typeof he=="string"?he.slice(0,10):new Date(he).toISOString().slice(0,10):null;j(n.id,He?`${He}T23:59:59Z`:null),H(!1),d(!1)},clearable:!0,valueFormat:"DD/MM/YYYY",size:"xs",placeholder:"Elegir fecha",popoverProps:{withinPortal:!1}}),n.deadline&&v.jsx(wt,{label:"Quitar deadline",withArrow:!0,children:v.jsx(Jn,{size:"sm",variant:"subtle",color:"red",mt:6,onClick:()=>{j(n.id,null),H(!1),d(!1)},children:v.jsx(vo,{size:12})})})]})]}),t&&A&&v.jsx(zn.Item,{leftSection:v.jsx(Hq,{size:14}),color:"teal",onClick:()=>{d(!1),A(n.id)},children:"Archivar"}),v.jsx(zn.Divider,{}),v.jsx(zn.Item,{leftSection:v.jsx(vo,{size:14}),color:"red",onClick:()=>{d(!1),p(n.id)},children:"Borrar"})]}):null;return v.jsxs(v.Fragment,{children:[v.jsxs(kn,{gap:6,style:{position:"relative",zIndex:1,pointerEvents:P?"none":void 0},children:[v.jsxs(Ee,{justify:"space-between",gap:4,wrap:"nowrap",align:"flex-start",children:[v.jsxs(Ee,{gap:4,wrap:"nowrap",style:{flex:1,minWidth:0},align:"flex-start",children:[v.jsx(Gq,{size:14,color:"var(--mantine-color-dark-2)",style:{flexShrink:0,marginTop:4}}),n.locked&&v.jsx(wt,{label:"Bloqueada",withArrow:!0,children:v.jsx(ul,{size:14,color:"var(--mantine-color-yellow-6)",style:{flexShrink:0,marginTop:4}})}),v.jsx(de,{size:"sm",fw:500,style:{flex:1,wordBreak:"break-word",whiteSpace:"normal",textDecoration:t?"line-through":"none",opacity:t?.7:1},children:n.title})]}),v.jsxs(kn,{gap:4,align:"center",style:{flexShrink:0},children:[v.jsxs(zn,{opened:h,onChange:d,position:"bottom-end",shadow:"md",withArrow:!0,children:[v.jsx(zn.Target,{children:v.jsx(Jn,{variant:"subtle",color:"gray",size:"sm","aria-label":"Acciones",onPointerDown:he=>he.stopPropagation(),children:v.jsx(Vq,{size:14})})}),v.jsx(zn.Dropdown,{onDoubleClick:he=>he.stopPropagation(),onClick:he=>he.stopPropagation(),onMouseDown:he=>he.stopPropagation(),onContextMenu:he=>he.stopPropagation(),children:Ne})]}),v.jsx(oAe,{cardId:n.id})]})]}),(n.requester||u)&&v.jsxs(Ee,{gap:6,wrap:"nowrap",style:{minWidth:0},children:[n.requester&&v.jsxs(v.Fragment,{children:[v.jsx(mo,{size:18,radius:"xs",color:Ru(n.requester),style:{flexShrink:0},children:n.requester.slice(0,2).toUpperCase()}),v.jsx(de,{size:"xs",c:"dimmed",truncate:!0,children:n.requester})]}),n.requester&&u&&v.jsx(de,{size:"xs",c:"dimmed",style:{flexShrink:0},children:"-"}),u&&v.jsxs(v.Fragment,{children:[v.jsx(mo,{size:18,radius:"xl",color:u.color||"blue",style:{flexShrink:0},children:(u.display_name||u.username).slice(0,2).toUpperCase()}),v.jsx(de,{size:"xs",c:"dimmed",truncate:!0,children:u.display_name||u.username})]})]}),n.description&&v.jsx(de,{size:"xs",c:"dimmed",lineClamp:3,children:n.description}),n.tags&&n.tags.length>0&&v.jsx(Ee,{gap:4,wrap:"wrap",children:n.tags.map(he=>v.jsx(Gn,{size:"xs",variant:"light",color:Ru(he),radius:"sm",children:he},he))}),v.jsxs(Ee,{gap:4,wrap:"wrap",children:[n.locked&&v.jsx(Gn,{size:"xs",variant:"light",color:"yellow",leftSection:v.jsx(ul,{size:10}),children:ei($e)}),!n.locked&&t&&n.completed_at?v.jsxs(v.Fragment,{children:[v.jsx(Gn,{size:"xs",variant:"light",color:"teal",leftSection:v.jsx(cs,{size:10}),children:Sl(n.completed_at)}),v.jsxs(Gn,{size:"xs",variant:"light",color:"gray",leftSection:v.jsx(c1,{size:10}),children:["Total: ",ei(ze)]}),n.total_locked_ms>0&&v.jsx(Gn,{size:"xs",variant:"light",color:"yellow",leftSection:v.jsx(ul,{size:10}),children:ei(n.total_locked_ms)})]}):n.locked?null:n.deadline?v.jsx(wt,{label:`Vence: ${Sl(n.deadline)}`,withArrow:!0,children:v.jsx(Gn,{size:"xs",variant:ke,color:se,leftSection:v.jsx(f1,{size:10}),children:re?`-${ei(-ie)}`:ei(ie)})}):v.jsx(Gn,{size:"xs",variant:"light",color:"gray",leftSection:v.jsx(c1,{size:10}),children:ei(I)})]}),n.seq_num>0&&v.jsxs(de,{size:"xs",c:"dimmed",style:{marginTop:-2},children:["#",String(n.seq_num).padStart(5,"0")]})]}),n.stickers&&n.stickers.length>0&&v.jsx("div",{"data-sticker-overlay":!0,style:{position:"absolute",inset:0,pointerEvents:"none",overflow:"hidden",borderRadius:"inherit",zIndex:0},children:n.stickers.map((he,He)=>v.jsx("span",{onPointerDown:we(He),onContextMenu:Ce(He),title:P?"Arrastra para mover. Click derecho para borrar.":"",style:{position:"absolute",left:`${he.x*100}%`,top:`${he.y*100}%`,transform:"translate(-50%, -50%)",fontSize:48,lineHeight:1,opacity:1,userSelect:"none",cursor:P&&!i?"grab":"default",pointerEvents:P&&!i?"auto":"none",touchAction:"none"},children:he.emoji},He))})]})});function cAe({card:e,now:n,onDelete:t,onEdit:i,onDuplicate:r,onChangeColor:a,onShowHistory:o,onToggleLock:l,onAssign:u,onSetDeadline:f,onSetRequester:h,onArchive:d,requesterOptions:p,onOpenCustomColor:g,activeSticker:b,onAddSticker:w,onRemoveSticker:k,onMoveSticker:_,onCommitSticker:S,users:j,assignee:T,inDoneColumn:A,columnOverdue:O,isOverlay:M,highlight:$}){sAe();const q=A||!!e.completed_at,[P,L]=x.useState(!1),U=x.useRef(null),G=!!b,B=x.useMemo(()=>({type:"card",columnId:e.column_id,locked:e.locked}),[e.column_id,e.locked]),{attributes:R,listeners:D,setNodeRef:z,transform:H,transition:Y,isDragging:N}=mq({id:e.id,data:B,disabled:G,animateLayoutChanges:()=>!1}),W=x.useCallback(re=>{U.current=re,z(re)},[z]);x.useEffect(()=>{$&&U.current&&U.current.scrollIntoView({behavior:"smooth",block:"center"})},[$]);const V=re=>{if(!G||!w||M||re.target.closest("[data-sticker-overlay]"))return;const Z=re.currentTarget.getBoundingClientRect(),le=(re.clientX-Z.left)/Z.width,ee=(re.clientY-Z.top)/Z.height;w(e.id,Math.max(0,Math.min(1,le)),Math.max(0,Math.min(1,ee)))},I=$?"var(--mantine-color-blue-5)":O?"var(--mantine-color-red-6)":e.locked?"var(--mantine-color-yellow-6)":N9(e.color),Q={transform:po.Transform.toString(H),transition:Y,opacity:N?.4:1,background:tH(e.color),borderColor:I,borderWidth:$||e.locked||O?2:1,boxShadow:$?"0 0 0 3px var(--mantine-color-blue-4)":O?"0 0 0 2px var(--mantine-color-red-3)":void 0,filter:q?"brightness(0.55) saturate(0.7)":void 0},ie=re=>{re.preventDefault(),L(!0)};return v.jsx(Tt,{ref:W,style:{...Q,position:"relative",cursor:G?"copy":"grab",touchAction:"none"},withBorder:!0,p:"xs",shadow:M?"lg":"xs",radius:"md","data-card-id":e.id,"data-column-overdue":O?"true":"false","data-locked":e.locked?"true":"false",onContextMenu:ie,onClick:V,onDoubleClick:re=>{re.stopPropagation(),i(e)},...R,...G?{}:D,children:v.jsx(uAe,{card:e,isDone:q,isOverlay:M,highlight:$,activeSticker:b,cardElRef:U,now:n,users:j,assignee:T,requesterOptions:p,menuOpen:P,setMenuOpen:L,onDelete:t,onEdit:i,onDuplicate:r,onChangeColor:a,onShowHistory:o,onToggleLock:l,onAssign:u,onSetDeadline:f,onSetRequester:h,onArchive:d,onOpenCustomColor:g,onRemoveSticker:k,onMoveSticker:_,onCommitSticker:S})})}const SG=x.memo(cAe),cz={minutes:1,hours:60,days:1440,weeks:1440*7,months:1440*30},F6={minutes:"minutos",hours:"horas",days:"dias",weeks:"semanas",months:"meses"},fAe=Object.keys(F6).map(e=>({value:e,label:F6[e]}));function dAe({column:e,cards:n,now:t,collapsed:i,onAddCard:r,onRenameColumn:a,onResizeColumn:o,onMoveColumnLocation:l,onDeleteColumn:u,onSetWIPLimit:f,onSetMaxTimeMinutes:h,onPickRandom:d,onToggleDone:p,onEditCard:g,onDeleteCard:b,onDuplicateCard:w,onChangeCardColor:k,onShowHistory:_,onToggleCardLock:S,onAssignCard:j,onSetCardDeadline:T,onSetRequester:A,onArchiveCard:O,requesterOptions:M,onOpenCustomCardColor:$,activeSticker:q,onAddSticker:P,onRemoveSticker:L,onMoveSticker:U,onCommitSticker:G,users:B,usersById:R,highlightCardId:D}){const[z,H]=x.useState(!1),[Y,N]=x.useState(e.name),[W,V]=x.useState(null),[I,Q]=x.useState(!1),[ie,re]=x.useState(e.wip_limit),[Z,le]=x.useState(!1),ee=Fe=>Fe<=0?"minutes":Fe%43200===0?"months":Fe%10080===0?"weeks":Fe%1440===0?"days":Fe%60===0?"hours":"minutes",se=(Fe,Vn)=>{const En=cz[Vn];return Fe>0?Math.max(1,Math.round(Fe/En)):0},[ke,te]=x.useState(()=>ee(e.max_time_minutes||0)),[$e,xe]=x.useState(()=>se(e.max_time_minutes||0,ee(e.max_time_minutes||0))),[Ae,ze]=x.useState(()=>i?localStorage.getItem(`kanban_col_body_${e.id}`)==="1":!1);x.useEffect(()=>{i&&localStorage.setItem(`kanban_col_body_${e.id}`,Ae?"1":"0")},[Ae,i,e.id]);const we=e.wip_limit,Ce=we>0&&n.length>we;x.useEffect(()=>{V(null)},[e.width]);const Ne=x.useMemo(()=>({type:"column",columnId:e.id,location:e.location}),[e.id,e.location]),{attributes:he,listeners:He,setNodeRef:Ye,transform:We,transition:Qe,isDragging:Je}=mq({id:`column-${e.id}`,data:Ne}),oe=i?"100%":W??e.width,be=i?{transform:po.Transform.toString(We),transition:Qe,opacity:Je?.4:1,width:"100%",display:"flex",flexDirection:"column",position:"relative",flex:Ae?"0 0 auto":"1 1 auto",minHeight:0}:{transform:po.Transform.toString(We),transition:Qe,opacity:Je?.4:1,width:oe,minWidth:oe,maxWidth:oe,display:"flex",flexDirection:"column",height:"100%",position:"relative"},Ke=n.map(Fe=>Fe.id),en=()=>{const Fe=Y.trim();Fe&&Fe!==e.name&&a(e.id,Fe),H(!1)},je=x.useRef(null),an=Fe=>{Fe.preventDefault(),Fe.stopPropagation(),je.current={startX:Fe.clientX,startWidth:e.width},document.body.style.cursor="col-resize",document.body.style.userSelect="none";const Vn=gn=>{if(!je.current)return;const xn=gn.clientX-je.current.startX,at=Math.min(800,Math.max(200,je.current.startWidth+xn));V(at)},En=()=>{je.current&&pn.current!==null&&o(e.id,pn.current),je.current=null,document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",Vn),window.removeEventListener("mouseup",En)};window.addEventListener("mousemove",Vn),window.addEventListener("mouseup",En)},pn=x.useRef(null);x.useEffect(()=>{pn.current=W},[W]);const Dn=e.location==="sidebar",bn=Dn?"Restaurar al board":"Mover al sidebar",sn=Dn?Use:Hq,nn=()=>{const Fe=typeof ie=="number"?ie:parseInt(String(ie),10),Vn=Number.isFinite(Fe)&&Fe>=0?Math.floor(Fe):0;Vn!==e.wip_limit&&f(e.id,Vn),Q(!1)},$n=Ce?"var(--mantine-color-red-9)":"var(--mantine-color-dark-7)",De=Ce?"var(--mantine-color-red-6)":void 0;return v.jsxs(Tt,{ref:Ye,style:{...be,background:$n,borderColor:De,borderWidth:Ce?2:1},withBorder:!0,radius:"md",p:"sm","data-column-id":e.id,"data-column-location":e.location,children:[v.jsxs(Ee,{justify:"space-between",mb:"xs",wrap:"nowrap",children:[v.jsxs(Ee,{gap:4,wrap:"nowrap",style:{flex:1,minWidth:0},children:[v.jsx(Jn,{variant:"subtle",color:"gray",size:"sm",...he,...He,style:{cursor:"grab"},"aria-label":"Drag column",children:v.jsx(Gq,{size:14})}),z?v.jsx(or,{size:"xs",value:Y,onChange:Fe=>N(Fe.currentTarget.value),autoFocus:!0,onBlur:en,onKeyDown:Fe=>{Fe.key==="Enter"&&en(),Fe.key==="Escape"&&(N(e.name),H(!1))},style:{flex:1}}):v.jsx(de,{fw:600,size:"sm",truncate:!0,onDoubleClick:()=>{N(e.name),H(!0)},style:{flex:1,cursor:"text"},title:"Doble click para renombrar",children:e.name}),v.jsxs(Sn,{opened:I,onChange:Fe=>{Q(Fe),Fe&&re(e.wip_limit)},position:"bottom",withArrow:!0,shadow:"md",children:[v.jsx(Sn.Target,{children:v.jsx(wt,{label:we>0?`WIP ${n.length}/${we}${Ce?" (excedido)":""}`:"Click para limitar WIP",withArrow:!0,children:v.jsx(Gn,{size:"xs",variant:Ce?"filled":"light",color:Ce?"red":we>0?"yellow":"gray",leftSection:Ce?v.jsx(i4,{size:10}):null,style:{cursor:"pointer"},onClick:()=>Q(Fe=>!Fe),children:we>0?`${n.length}/${we}`:n.length})})}),v.jsx(Sn.Dropdown,{p:"xs",children:v.jsxs(kn,{gap:"xs",children:[v.jsx(de,{size:"xs",c:"dimmed",children:"Maximo de tarjetas (0 = sin limite)"}),v.jsx(vm,{size:"xs",value:ie,onChange:re,min:0,max:999,autoFocus:!0,onKeyDown:Fe=>{Fe.key==="Enter"&&nn(),Fe.key==="Escape"&&Q(!1)}}),v.jsxs(Ee,{justify:"flex-end",gap:4,children:[v.jsx(Yn,{size:"xs",variant:"subtle",onClick:()=>Q(!1),children:"Cancelar"}),v.jsx(Yn,{size:"xs",onClick:nn,children:"Guardar"})]})]})})]})]}),v.jsx(Ee,{gap:2,wrap:"nowrap",children:z?v.jsxs(v.Fragment,{children:[v.jsx(Jn,{variant:"subtle",color:"green",size:"sm",onClick:en,"aria-label":"Save",children:v.jsx(cs,{size:14})}),v.jsx(Jn,{variant:"subtle",color:"gray",size:"sm",onClick:()=>{N(e.name),H(!1)},"aria-label":"Cancel",children:v.jsx(qh,{size:14})})]}):v.jsxs(v.Fragment,{children:[i&&v.jsx(wt,{label:Ae?"Expandir":"Colapsar",withArrow:!0,children:v.jsx(Jn,{variant:"subtle",color:"gray",size:"sm",onClick:()=>ze(Fe=>!Fe),"aria-label":Ae?"Expandir columna":"Colapsar columna",children:Ae?v.jsx(a4,{size:14}):v.jsx(r4,{size:14})})}),e.is_done&&v.jsx(wt,{label:"Columna Done",withArrow:!0,children:v.jsx(Gn,{size:"xs",color:"green",variant:"filled",leftSection:v.jsx(wm,{size:10}),children:"done"})}),v.jsxs(zn,{position:"bottom-end",shadow:"md",withArrow:!0,children:[v.jsx(zn.Target,{children:v.jsx(Jn,{variant:"subtle",color:"gray",size:"sm","aria-label":"Acciones columna",children:v.jsx(Vq,{size:14})})}),v.jsxs(zn.Dropdown,{children:[v.jsx(zn.Label,{children:"Columna"}),v.jsx(zn.Item,{leftSection:v.jsx(iue,{size:14}),onClick:()=>{N(e.name),H(!0)},children:"Renombrar"}),v.jsx(zn.Item,{leftSection:v.jsx(wm,{size:14}),color:e.is_done?"yellow":"green",onClick:()=>p(e.id,!e.is_done),children:e.is_done?"Quitar marca Done":"Marcar como Done"}),v.jsxs(Sn,{opened:Z,onChange:Fe=>{if(le(Fe),Fe){const Vn=ee(e.max_time_minutes||0);te(Vn),xe(se(e.max_time_minutes||0,Vn))}},position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[v.jsx(Sn.Target,{children:v.jsxs(zn.Item,{leftSection:v.jsx(c1,{size:14}),"data-test":"column-max-time",closeMenuOnClick:!1,onClick:Fe=>{Fe.preventDefault(),Fe.stopPropagation(),le(Vn=>!Vn)},children:["Tiempo maximo",e.max_time_minutes>0?` (${(()=>{const Fe=ee(e.max_time_minutes);return`${se(e.max_time_minutes,Fe)} ${F6[Fe]}`})()})`:""]})}),v.jsx(Sn.Dropdown,{p:"xs",onClick:Fe=>Fe.stopPropagation(),onMouseDown:Fe=>Fe.stopPropagation(),onDoubleClick:Fe=>Fe.stopPropagation(),children:v.jsxs(kn,{gap:6,style:{minWidth:240},children:[v.jsx(de,{size:"xs",c:"dimmed",children:"Cards que pasen este tiempo se pintaran con borde rojo. 0 = sin limite. Columnas Done no aplican."}),v.jsxs(Ee,{gap:6,wrap:"nowrap",children:[v.jsx(vm,{size:"xs",min:0,max:999,value:$e,onChange:xe,placeholder:"0",style:{width:90},"data-test":"column-max-time-input"}),v.jsx(jr,{size:"xs",value:ke,onChange:Fe=>Fe&&te(Fe),data:fAe,style:{width:130},allowDeselect:!1,"data-test":"column-max-time-unit"})]}),v.jsxs(Ee,{justify:"space-between",gap:6,children:[v.jsx(wt,{label:"Quitar limite",withArrow:!0,disabled:!e.max_time_minutes,children:v.jsx(Jn,{size:"sm",variant:"subtle",color:"red",disabled:!e.max_time_minutes,onClick:()=>{h(e.id,0),xe(0),le(!1)},children:v.jsx(vo,{size:12})})}),v.jsx(Yn,{size:"xs","data-test":"column-max-time-save",onClick:()=>{const Fe=typeof $e=="number"?$e:parseInt(String($e),10),En=(Number.isFinite(Fe)&&Fe>=0?Fe:0)*cz[ke];En!==e.max_time_minutes&&h(e.id,En),le(!1)},children:"Guardar"})]})]})})]}),!e.is_done&&v.jsx(zn.Item,{leftSection:v.jsx(kle,{size:14}),"data-test":"column-random-pick",disabled:n.filter(Fe=>!Fe.locked).length===0,onClick:()=>d(e.id),children:"Seleccionar Aleatorio"}),v.jsx(zn.Item,{leftSection:v.jsx(sn,{size:14}),onClick:()=>l(e.id,Dn?"board":"sidebar"),children:bn}),v.jsx(zn.Divider,{}),v.jsx(zn.Item,{leftSection:v.jsx(vo,{size:14}),color:"red",onClick:()=>u(e.id),children:"Borrar columna"})]})]})]})})]}),!(i&&Ae)&&v.jsxs(v.Fragment,{children:[v.jsx(ur,{style:{flex:1},type:"auto",children:v.jsx(n4,{items:Ke,strategy:cq,children:v.jsx(kn,{gap:"xs",pb:"xs",style:{minHeight:40},children:n.map(Fe=>v.jsx(SG,{card:Fe,now:t,onDelete:b,onEdit:g,onDuplicate:w,onChangeColor:k,onShowHistory:_,onToggleLock:S,onAssign:j,onSetDeadline:T,onSetRequester:A,onArchive:O,requesterOptions:M,onOpenCustomColor:$,users:B,assignee:Fe.assignee_id?R.get(Fe.assignee_id):void 0,inDoneColumn:e.is_done,columnOverdue:!e.is_done&&e.max_time_minutes>0&&Fe.time_in_column_ms>e.max_time_minutes*6e4,highlight:D===Fe.id,activeSticker:q,onAddSticker:P,onRemoveSticker:L,onMoveSticker:U,onCommitSticker:G},Fe.id))})})}),v.jsx(Yn,{variant:"subtle",color:"gray",size:"xs",leftSection:v.jsx(cf,{size:14}),onClick:()=>r(e.id),mt:"xs",fullWidth:!0,"data-test":"add-card",children:"Anadir tarjeta"})]}),!Dn&&v.jsx(fe,{onMouseDown:an,style:{position:"absolute",top:0,right:-3,width:6,height:"100%",cursor:"col-resize",zIndex:5},"aria-label":"Resize column"})]})}const fz=x.memo(dAe),hAe=JSON.parse('[{"id":"people","emojis":["grinning","smiley","smile","grin","laughing","sweat_smile","rolling_on_the_floor_laughing","joy","slightly_smiling_face","upside_down_face","melting_face","wink","blush","innocent","smiling_face_with_3_hearts","heart_eyes","star-struck","kissing_heart","kissing","relaxed","kissing_closed_eyes","kissing_smiling_eyes","smiling_face_with_tear","yum","stuck_out_tongue","stuck_out_tongue_winking_eye","zany_face","stuck_out_tongue_closed_eyes","money_mouth_face","hugging_face","face_with_hand_over_mouth","face_with_open_eyes_and_hand_over_mouth","face_with_peeking_eye","shushing_face","thinking_face","saluting_face","zipper_mouth_face","face_with_raised_eyebrow","neutral_face","expressionless","no_mouth","dotted_line_face","face_in_clouds","smirk","unamused","face_with_rolling_eyes","grimacing","face_exhaling","lying_face","shaking_face","relieved","pensive","sleepy","drooling_face","sleeping","mask","face_with_thermometer","face_with_head_bandage","nauseated_face","face_vomiting","sneezing_face","hot_face","cold_face","woozy_face","dizzy_face","face_with_spiral_eyes","exploding_head","face_with_cowboy_hat","partying_face","disguised_face","sunglasses","nerd_face","face_with_monocle","confused","face_with_diagonal_mouth","worried","slightly_frowning_face","white_frowning_face","open_mouth","hushed","astonished","flushed","pleading_face","face_holding_back_tears","frowning","anguished","fearful","cold_sweat","disappointed_relieved","cry","sob","scream","confounded","persevere","disappointed","sweat","weary","tired_face","yawning_face","triumph","rage","angry","face_with_symbols_on_mouth","smiling_imp","imp","skull","skull_and_crossbones","hankey","clown_face","japanese_ogre","japanese_goblin","ghost","alien","space_invader","wave","raised_back_of_hand","raised_hand_with_fingers_splayed","hand","spock-hand","rightwards_hand","leftwards_hand","palm_down_hand","palm_up_hand","leftwards_pushing_hand","rightwards_pushing_hand","ok_hand","pinched_fingers","pinching_hand","v","crossed_fingers","hand_with_index_finger_and_thumb_crossed","i_love_you_hand_sign","the_horns","call_me_hand","point_left","point_right","point_up_2","middle_finger","point_down","point_up","index_pointing_at_the_viewer","+1","-1","fist","facepunch","left-facing_fist","right-facing_fist","clap","raised_hands","heart_hands","open_hands","palms_up_together","handshake","pray","writing_hand","nail_care","selfie","muscle","mechanical_arm","mechanical_leg","leg","foot","ear","ear_with_hearing_aid","nose","brain","anatomical_heart","lungs","tooth","bone","eyes","eye","tongue","lips","biting_lip","baby","child","boy","girl","adult","person_with_blond_hair","man","bearded_person","man_with_beard","woman_with_beard","red_haired_man","curly_haired_man","white_haired_man","bald_man","woman","red_haired_woman","red_haired_person","curly_haired_woman","curly_haired_person","white_haired_woman","white_haired_person","bald_woman","bald_person","blond-haired-woman","blond-haired-man","older_adult","older_man","older_woman","person_frowning","man-frowning","woman-frowning","person_with_pouting_face","man-pouting","woman-pouting","no_good","man-gesturing-no","woman-gesturing-no","ok_woman","man-gesturing-ok","woman-gesturing-ok","information_desk_person","man-tipping-hand","woman-tipping-hand","raising_hand","man-raising-hand","woman-raising-hand","deaf_person","deaf_man","deaf_woman","bow","man-bowing","woman-bowing","face_palm","man-facepalming","woman-facepalming","shrug","man-shrugging","woman-shrugging","health_worker","male-doctor","female-doctor","student","male-student","female-student","teacher","male-teacher","female-teacher","judge","male-judge","female-judge","farmer","male-farmer","female-farmer","cook","male-cook","female-cook","mechanic","male-mechanic","female-mechanic","factory_worker","male-factory-worker","female-factory-worker","office_worker","male-office-worker","female-office-worker","scientist","male-scientist","female-scientist","technologist","male-technologist","female-technologist","singer","male-singer","female-singer","artist","male-artist","female-artist","pilot","male-pilot","female-pilot","astronaut","male-astronaut","female-astronaut","firefighter","male-firefighter","female-firefighter","cop","male-police-officer","female-police-officer","sleuth_or_spy","male-detective","female-detective","guardsman","male-guard","female-guard","ninja","construction_worker","male-construction-worker","female-construction-worker","person_with_crown","prince","princess","man_with_turban","man-wearing-turban","woman-wearing-turban","man_with_gua_pi_mao","person_with_headscarf","person_in_tuxedo","man_in_tuxedo","woman_in_tuxedo","bride_with_veil","man_with_veil","woman_with_veil","pregnant_woman","pregnant_man","pregnant_person","breast-feeding","woman_feeding_baby","man_feeding_baby","person_feeding_baby","angel","santa","mrs_claus","mx_claus","superhero","male_superhero","female_superhero","supervillain","male_supervillain","female_supervillain","mage","male_mage","female_mage","fairy","male_fairy","female_fairy","vampire","male_vampire","female_vampire","merperson","merman","mermaid","elf","male_elf","female_elf","genie","male_genie","female_genie","zombie","male_zombie","female_zombie","troll","massage","man-getting-massage","woman-getting-massage","haircut","man-getting-haircut","woman-getting-haircut","walking","man-walking","woman-walking","standing_person","man_standing","woman_standing","kneeling_person","man_kneeling","woman_kneeling","person_with_probing_cane","man_with_probing_cane","woman_with_probing_cane","person_in_motorized_wheelchair","man_in_motorized_wheelchair","woman_in_motorized_wheelchair","person_in_manual_wheelchair","man_in_manual_wheelchair","woman_in_manual_wheelchair","runner","man-running","woman-running","dancer","man_dancing","man_in_business_suit_levitating","dancers","men-with-bunny-ears-partying","women-with-bunny-ears-partying","person_in_steamy_room","man_in_steamy_room","woman_in_steamy_room","person_climbing","man_climbing","woman_climbing","fencer","horse_racing","skier","snowboarder","golfer","man-golfing","woman-golfing","surfer","man-surfing","woman-surfing","rowboat","man-rowing-boat","woman-rowing-boat","swimmer","man-swimming","woman-swimming","person_with_ball","man-bouncing-ball","woman-bouncing-ball","weight_lifter","man-lifting-weights","woman-lifting-weights","bicyclist","man-biking","woman-biking","mountain_bicyclist","man-mountain-biking","woman-mountain-biking","person_doing_cartwheel","man-cartwheeling","woman-cartwheeling","wrestlers","man-wrestling","woman-wrestling","water_polo","man-playing-water-polo","woman-playing-water-polo","handball","man-playing-handball","woman-playing-handball","juggling","man-juggling","woman-juggling","person_in_lotus_position","man_in_lotus_position","woman_in_lotus_position","bath","sleeping_accommodation","people_holding_hands","two_women_holding_hands","man_and_woman_holding_hands","two_men_holding_hands","couplekiss","woman-kiss-man","man-kiss-man","woman-kiss-woman","couple_with_heart","woman-heart-man","man-heart-man","woman-heart-woman","family","man-woman-boy","man-woman-girl","man-woman-girl-boy","man-woman-boy-boy","man-woman-girl-girl","man-man-boy","man-man-girl","man-man-girl-boy","man-man-boy-boy","man-man-girl-girl","woman-woman-boy","woman-woman-girl","woman-woman-girl-boy","woman-woman-boy-boy","woman-woman-girl-girl","man-boy","man-boy-boy","man-girl","man-girl-boy","man-girl-girl","woman-boy","woman-boy-boy","woman-girl","woman-girl-boy","woman-girl-girl","speaking_head_in_silhouette","bust_in_silhouette","busts_in_silhouette","people_hugging","footprints","robot_face","smiley_cat","smile_cat","joy_cat","heart_eyes_cat","smirk_cat","kissing_cat","scream_cat","crying_cat_face","pouting_cat","see_no_evil","hear_no_evil","speak_no_evil","love_letter","cupid","gift_heart","sparkling_heart","heartpulse","heartbeat","revolving_hearts","two_hearts","heart_decoration","heavy_heart_exclamation_mark_ornament","broken_heart","heart_on_fire","mending_heart","heart","pink_heart","orange_heart","yellow_heart","green_heart","blue_heart","light_blue_heart","purple_heart","brown_heart","black_heart","grey_heart","white_heart","kiss","100","anger","boom","dizzy","sweat_drops","dash","hole","speech_balloon","eye-in-speech-bubble","left_speech_bubble","right_anger_bubble","thought_balloon","zzz"]},{"id":"nature","emojis":["monkey_face","monkey","gorilla","orangutan","dog","dog2","guide_dog","service_dog","poodle","wolf","fox_face","raccoon","cat","cat2","black_cat","lion_face","tiger","tiger2","leopard","horse","moose","donkey","racehorse","unicorn_face","zebra_face","deer","bison","cow","ox","water_buffalo","cow2","pig","pig2","boar","pig_nose","ram","sheep","goat","dromedary_camel","camel","llama","giraffe_face","elephant","mammoth","rhinoceros","hippopotamus","mouse","mouse2","rat","hamster","rabbit","rabbit2","chipmunk","beaver","hedgehog","bat","bear","polar_bear","koala","panda_face","sloth","otter","skunk","kangaroo","badger","feet","turkey","chicken","rooster","hatching_chick","baby_chick","hatched_chick","bird","penguin","dove_of_peace","eagle","duck","swan","owl","dodo","feather","flamingo","peacock","parrot","wing","black_bird","goose","frog","crocodile","turtle","lizard","snake","dragon_face","dragon","sauropod","t-rex","whale","whale2","dolphin","seal","fish","tropical_fish","blowfish","shark","octopus","shell","coral","jellyfish","snail","butterfly","bug","ant","bee","beetle","ladybug","cricket","cockroach","spider","spider_web","scorpion","mosquito","fly","worm","microbe","bouquet","cherry_blossom","white_flower","lotus","rosette","rose","wilted_flower","hibiscus","sunflower","blossom","tulip","hyacinth","seedling","potted_plant","evergreen_tree","deciduous_tree","palm_tree","cactus","ear_of_rice","herb","shamrock","four_leaf_clover","maple_leaf","fallen_leaf","leaves","empty_nest","nest_with_eggs","mushroom"]},{"id":"foods","emojis":["grapes","melon","watermelon","tangerine","lemon","banana","pineapple","mango","apple","green_apple","pear","peach","cherries","strawberry","blueberries","kiwifruit","tomato","olive","coconut","avocado","eggplant","potato","carrot","corn","hot_pepper","bell_pepper","cucumber","leafy_green","broccoli","garlic","onion","peanuts","beans","chestnut","ginger_root","pea_pod","bread","croissant","baguette_bread","flatbread","pretzel","bagel","pancakes","waffle","cheese_wedge","meat_on_bone","poultry_leg","cut_of_meat","bacon","hamburger","fries","pizza","hotdog","sandwich","taco","burrito","tamale","stuffed_flatbread","falafel","egg","fried_egg","shallow_pan_of_food","stew","fondue","bowl_with_spoon","green_salad","popcorn","butter","salt","canned_food","bento","rice_cracker","rice_ball","rice","curry","ramen","spaghetti","sweet_potato","oden","sushi","fried_shrimp","fish_cake","moon_cake","dango","dumpling","fortune_cookie","takeout_box","crab","lobster","shrimp","squid","oyster","icecream","shaved_ice","ice_cream","doughnut","cookie","birthday","cake","cupcake","pie","chocolate_bar","candy","lollipop","custard","honey_pot","baby_bottle","glass_of_milk","coffee","teapot","tea","sake","champagne","wine_glass","cocktail","tropical_drink","beer","beers","clinking_glasses","tumbler_glass","pouring_liquid","cup_with_straw","bubble_tea","beverage_box","mate_drink","ice_cube","chopsticks","knife_fork_plate","fork_and_knife","spoon","hocho","jar","amphora"]},{"id":"activity","emojis":["jack_o_lantern","christmas_tree","fireworks","sparkler","firecracker","sparkles","balloon","tada","confetti_ball","tanabata_tree","bamboo","dolls","flags","wind_chime","rice_scene","red_envelope","ribbon","gift","reminder_ribbon","admission_tickets","ticket","medal","trophy","sports_medal","first_place_medal","second_place_medal","third_place_medal","soccer","baseball","softball","basketball","volleyball","football","rugby_football","tennis","flying_disc","bowling","cricket_bat_and_ball","field_hockey_stick_and_ball","ice_hockey_stick_and_puck","lacrosse","table_tennis_paddle_and_ball","badminton_racquet_and_shuttlecock","boxing_glove","martial_arts_uniform","goal_net","golf","ice_skate","fishing_pole_and_fish","diving_mask","running_shirt_with_sash","ski","sled","curling_stone","dart","yo-yo","kite","gun","8ball","crystal_ball","magic_wand","video_game","joystick","slot_machine","game_die","jigsaw","teddy_bear","pinata","mirror_ball","nesting_dolls","spades","hearts","diamonds","clubs","chess_pawn","black_joker","mahjong","flower_playing_cards","performing_arts","frame_with_picture","art","thread","sewing_needle","yarn","knot"]},{"id":"places","emojis":["earth_africa","earth_americas","earth_asia","globe_with_meridians","world_map","japan","compass","snow_capped_mountain","mountain","volcano","mount_fuji","camping","beach_with_umbrella","desert","desert_island","national_park","stadium","classical_building","building_construction","bricks","rock","wood","hut","house_buildings","derelict_house_building","house","house_with_garden","office","post_office","european_post_office","hospital","bank","hotel","love_hotel","convenience_store","school","department_store","factory","japanese_castle","european_castle","wedding","tokyo_tower","statue_of_liberty","church","mosque","hindu_temple","synagogue","shinto_shrine","kaaba","fountain","tent","foggy","night_with_stars","cityscape","sunrise_over_mountains","sunrise","city_sunset","city_sunrise","bridge_at_night","hotsprings","carousel_horse","playground_slide","ferris_wheel","roller_coaster","barber","circus_tent","steam_locomotive","railway_car","bullettrain_side","bullettrain_front","train2","metro","light_rail","station","tram","monorail","mountain_railway","train","bus","oncoming_bus","trolleybus","minibus","ambulance","fire_engine","police_car","oncoming_police_car","taxi","oncoming_taxi","car","oncoming_automobile","blue_car","pickup_truck","truck","articulated_lorry","tractor","racing_car","racing_motorcycle","motor_scooter","manual_wheelchair","motorized_wheelchair","auto_rickshaw","bike","scooter","skateboard","roller_skate","busstop","motorway","railway_track","oil_drum","fuelpump","wheel","rotating_light","traffic_light","vertical_traffic_light","octagonal_sign","construction","anchor","ring_buoy","boat","canoe","speedboat","passenger_ship","ferry","motor_boat","ship","airplane","small_airplane","airplane_departure","airplane_arriving","parachute","seat","helicopter","suspension_railway","mountain_cableway","aerial_tramway","satellite","rocket","flying_saucer","bellhop_bell","luggage","hourglass","hourglass_flowing_sand","watch","alarm_clock","stopwatch","timer_clock","mantelpiece_clock","clock12","clock1230","clock1","clock130","clock2","clock230","clock3","clock330","clock4","clock430","clock5","clock530","clock6","clock630","clock7","clock730","clock8","clock830","clock9","clock930","clock10","clock1030","clock11","clock1130","new_moon","waxing_crescent_moon","first_quarter_moon","moon","full_moon","waning_gibbous_moon","last_quarter_moon","waning_crescent_moon","crescent_moon","new_moon_with_face","first_quarter_moon_with_face","last_quarter_moon_with_face","thermometer","sunny","full_moon_with_face","sun_with_face","ringed_planet","star","star2","stars","milky_way","cloud","partly_sunny","thunder_cloud_and_rain","mostly_sunny","barely_sunny","partly_sunny_rain","rain_cloud","snow_cloud","lightning","tornado","fog","wind_blowing_face","cyclone","rainbow","closed_umbrella","umbrella","umbrella_with_rain_drops","umbrella_on_ground","zap","snowflake","snowman","snowman_without_snow","comet","fire","droplet","ocean"]},{"id":"objects","emojis":["eyeglasses","dark_sunglasses","goggles","lab_coat","safety_vest","necktie","shirt","jeans","scarf","gloves","coat","socks","dress","kimono","sari","one-piece_swimsuit","briefs","shorts","bikini","womans_clothes","folding_hand_fan","purse","handbag","pouch","shopping_bags","school_satchel","thong_sandal","mans_shoe","athletic_shoe","hiking_boot","womans_flat_shoe","high_heel","sandal","ballet_shoes","boot","hair_pick","crown","womans_hat","tophat","mortar_board","billed_cap","military_helmet","helmet_with_white_cross","prayer_beads","lipstick","ring","gem","mute","speaker","sound","loud_sound","loudspeaker","mega","postal_horn","bell","no_bell","musical_score","musical_note","notes","studio_microphone","level_slider","control_knobs","microphone","headphones","radio","saxophone","accordion","guitar","musical_keyboard","trumpet","violin","banjo","drum_with_drumsticks","long_drum","maracas","flute","iphone","calling","phone","telephone_receiver","pager","fax","battery","low_battery","electric_plug","computer","desktop_computer","printer","keyboard","three_button_mouse","trackball","minidisc","floppy_disk","cd","dvd","abacus","movie_camera","film_frames","film_projector","clapper","tv","camera","camera_with_flash","video_camera","vhs","mag","mag_right","candle","bulb","flashlight","izakaya_lantern","diya_lamp","notebook_with_decorative_cover","closed_book","book","green_book","blue_book","orange_book","books","notebook","ledger","page_with_curl","scroll","page_facing_up","newspaper","rolled_up_newspaper","bookmark_tabs","bookmark","label","moneybag","coin","yen","dollar","euro","pound","money_with_wings","credit_card","receipt","chart","email","e-mail","incoming_envelope","envelope_with_arrow","outbox_tray","inbox_tray","package","mailbox","mailbox_closed","mailbox_with_mail","mailbox_with_no_mail","postbox","ballot_box_with_ballot","pencil2","black_nib","lower_left_fountain_pen","lower_left_ballpoint_pen","lower_left_paintbrush","lower_left_crayon","memo","briefcase","file_folder","open_file_folder","card_index_dividers","date","calendar","spiral_note_pad","spiral_calendar_pad","card_index","chart_with_upwards_trend","chart_with_downwards_trend","bar_chart","clipboard","pushpin","round_pushpin","paperclip","linked_paperclips","straight_ruler","triangular_ruler","scissors","card_file_box","file_cabinet","wastebasket","lock","unlock","lock_with_ink_pen","closed_lock_with_key","key","old_key","hammer","axe","pick","hammer_and_pick","hammer_and_wrench","dagger_knife","crossed_swords","bomb","boomerang","bow_and_arrow","shield","carpentry_saw","wrench","screwdriver","nut_and_bolt","gear","compression","scales","probing_cane","link","chains","hook","toolbox","magnet","ladder","alembic","test_tube","petri_dish","dna","microscope","telescope","satellite_antenna","syringe","drop_of_blood","pill","adhesive_bandage","crutch","stethoscope","x-ray","door","elevator","mirror","window","bed","couch_and_lamp","chair","toilet","plunger","shower","bathtub","mouse_trap","razor","lotion_bottle","safety_pin","broom","basket","roll_of_paper","bucket","soap","bubbles","toothbrush","sponge","fire_extinguisher","shopping_trolley","smoking","coffin","headstone","funeral_urn","nazar_amulet","hamsa","moyai","placard","identification_card"]},{"id":"symbols","emojis":["atm","put_litter_in_its_place","potable_water","wheelchair","mens","womens","restroom","baby_symbol","wc","passport_control","customs","baggage_claim","left_luggage","warning","children_crossing","no_entry","no_entry_sign","no_bicycles","no_smoking","do_not_litter","non-potable_water","no_pedestrians","no_mobile_phones","underage","radioactive_sign","biohazard_sign","arrow_up","arrow_upper_right","arrow_right","arrow_lower_right","arrow_down","arrow_lower_left","arrow_left","arrow_upper_left","arrow_up_down","left_right_arrow","leftwards_arrow_with_hook","arrow_right_hook","arrow_heading_up","arrow_heading_down","arrows_clockwise","arrows_counterclockwise","back","end","on","soon","top","place_of_worship","atom_symbol","om_symbol","star_of_david","wheel_of_dharma","yin_yang","latin_cross","orthodox_cross","star_and_crescent","peace_symbol","menorah_with_nine_branches","six_pointed_star","khanda","aries","taurus","gemini","cancer","leo","virgo","libra","scorpius","sagittarius","capricorn","aquarius","pisces","ophiuchus","twisted_rightwards_arrows","repeat","repeat_one","arrow_forward","fast_forward","black_right_pointing_double_triangle_with_vertical_bar","black_right_pointing_triangle_with_double_vertical_bar","arrow_backward","rewind","black_left_pointing_double_triangle_with_vertical_bar","arrow_up_small","arrow_double_up","arrow_down_small","arrow_double_down","double_vertical_bar","black_square_for_stop","black_circle_for_record","eject","cinema","low_brightness","high_brightness","signal_strength","wireless","vibration_mode","mobile_phone_off","female_sign","male_sign","transgender_symbol","heavy_multiplication_x","heavy_plus_sign","heavy_minus_sign","heavy_division_sign","heavy_equals_sign","infinity","bangbang","interrobang","question","grey_question","grey_exclamation","exclamation","wavy_dash","currency_exchange","heavy_dollar_sign","medical_symbol","recycle","fleur_de_lis","trident","name_badge","beginner","o","white_check_mark","ballot_box_with_check","heavy_check_mark","x","negative_squared_cross_mark","curly_loop","loop","part_alternation_mark","eight_spoked_asterisk","eight_pointed_black_star","sparkle","copyright","registered","tm","hash","keycap_star","zero","one","two","three","four","five","six","seven","eight","nine","keycap_ten","capital_abcd","abcd","1234","symbols","abc","a","ab","b","cl","cool","free","information_source","id","m","new","ng","o2","ok","parking","sos","up","vs","koko","sa","u6708","u6709","u6307","ideograph_advantage","u5272","u7121","u7981","accept","u7533","u5408","u7a7a","congratulations","secret","u55b6","u6e80","red_circle","large_orange_circle","large_yellow_circle","large_green_circle","large_blue_circle","large_purple_circle","large_brown_circle","black_circle","white_circle","large_red_square","large_orange_square","large_yellow_square","large_green_square","large_blue_square","large_purple_square","large_brown_square","black_large_square","white_large_square","black_medium_square","white_medium_square","black_medium_small_square","white_medium_small_square","black_small_square","white_small_square","large_orange_diamond","large_blue_diamond","small_orange_diamond","small_blue_diamond","small_red_triangle","small_red_triangle_down","diamond_shape_with_a_dot_inside","radio_button","white_square_button","black_square_button"]},{"id":"flags","emojis":["checkered_flag","cn","crossed_flags","de","es","flag-ac","flag-ad","flag-ae","flag-af","flag-ag","flag-ai","flag-al","flag-am","flag-ao","flag-aq","flag-ar","flag-as","flag-at","flag-au","flag-aw","flag-ax","flag-az","flag-ba","flag-bb","flag-bd","flag-be","flag-bf","flag-bg","flag-bh","flag-bi","flag-bj","flag-bl","flag-bm","flag-bn","flag-bo","flag-bq","flag-br","flag-bs","flag-bt","flag-bv","flag-bw","flag-by","flag-bz","flag-ca","flag-cc","flag-cd","flag-cf","flag-cg","flag-ch","flag-ci","flag-ck","flag-cl","flag-cm","flag-co","flag-cp","flag-cr","flag-cu","flag-cv","flag-cw","flag-cx","flag-cy","flag-cz","flag-dg","flag-dj","flag-dk","flag-dm","flag-do","flag-dz","flag-ea","flag-ec","flag-ee","flag-eg","flag-eh","flag-england","flag-er","flag-et","flag-eu","flag-fi","flag-fj","flag-fk","flag-fm","flag-fo","flag-ga","flag-gd","flag-ge","flag-gf","flag-gg","flag-gh","flag-gi","flag-gl","flag-gm","flag-gn","flag-gp","flag-gq","flag-gr","flag-gs","flag-gt","flag-gu","flag-gw","flag-gy","flag-hk","flag-hm","flag-hn","flag-hr","flag-ht","flag-hu","flag-ic","flag-id","flag-ie","flag-il","flag-im","flag-in","flag-io","flag-iq","flag-ir","flag-is","flag-je","flag-jm","flag-jo","flag-ke","flag-kg","flag-kh","flag-ki","flag-km","flag-kn","flag-kp","flag-kw","flag-ky","flag-kz","flag-la","flag-lb","flag-lc","flag-li","flag-lk","flag-lr","flag-ls","flag-lt","flag-lu","flag-lv","flag-ly","flag-ma","flag-mc","flag-md","flag-me","flag-mf","flag-mg","flag-mh","flag-mk","flag-ml","flag-mm","flag-mn","flag-mo","flag-mp","flag-mq","flag-mr","flag-ms","flag-mt","flag-mu","flag-mv","flag-mw","flag-mx","flag-my","flag-mz","flag-na","flag-nc","flag-ne","flag-nf","flag-ng","flag-ni","flag-nl","flag-no","flag-np","flag-nr","flag-nu","flag-nz","flag-om","flag-pa","flag-pe","flag-pf","flag-pg","flag-ph","flag-pk","flag-pl","flag-pm","flag-pn","flag-pr","flag-ps","flag-pt","flag-pw","flag-py","flag-qa","flag-re","flag-ro","flag-rs","flag-rw","flag-sa","flag-sb","flag-sc","flag-scotland","flag-sd","flag-se","flag-sg","flag-sh","flag-si","flag-sj","flag-sk","flag-sl","flag-sm","flag-sn","flag-so","flag-sr","flag-ss","flag-st","flag-sv","flag-sx","flag-sy","flag-sz","flag-ta","flag-tc","flag-td","flag-tf","flag-tg","flag-th","flag-tj","flag-tk","flag-tl","flag-tm","flag-tn","flag-to","flag-tr","flag-tt","flag-tv","flag-tw","flag-tz","flag-ua","flag-ug","flag-um","flag-un","flag-uy","flag-uz","flag-va","flag-vc","flag-ve","flag-vg","flag-vi","flag-vn","flag-vu","flag-wales","flag-wf","flag-ws","flag-xk","flag-ye","flag-yt","flag-za","flag-zm","flag-zw","fr","gb","it","jp","kr","pirate_flag","rainbow-flag","ru","transgender_flag","triangular_flag_on_post","us","waving_black_flag","waving_white_flag"]}]'),mAe=JSON.parse(`{"100":{"id":"100","name":"Hundred Points","keywords":["100","score","perfect","numbers","century","exam","quiz","test","pass"],"skins":[{"unified":"1f4af","native":"💯"}],"version":1},"1234":{"id":"1234","name":"Input Numbers","keywords":["1234","blue","square","1","2","3","4"],"skins":[{"unified":"1f522","native":"🔢"}],"version":1},"grinning":{"id":"grinning","name":"Grinning Face","emoticons":[":D"],"keywords":["smile","happy","joy",":D","grin"],"skins":[{"unified":"1f600","native":"😀"}],"version":1},"smiley":{"id":"smiley","name":"Grinning Face with Big Eyes","emoticons":[":)","=)","=-)"],"keywords":["smiley","happy","joy","haha",":D",":)","smile","funny"],"skins":[{"unified":"1f603","native":"😃"}],"version":1},"smile":{"id":"smile","name":"Grinning Face with Smiling Eyes","emoticons":[":)","C:","c:",":D",":-D"],"keywords":["smile","happy","joy","funny","haha","laugh","like",":D",":)"],"skins":[{"unified":"1f604","native":"😄"}],"version":1},"grin":{"id":"grin","name":"Beaming Face with Smiling Eyes","keywords":["grin","happy","smile","joy","kawaii"],"skins":[{"unified":"1f601","native":"😁"}],"version":1},"laughing":{"id":"laughing","name":"Grinning Squinting Face","emoticons":[":>",":->"],"keywords":["laughing","satisfied","happy","joy","lol","haha","glad","XD","laugh"],"skins":[{"unified":"1f606","native":"😆"}],"version":1},"sweat_smile":{"id":"sweat_smile","name":"Grinning Face with Sweat","keywords":["smile","hot","happy","laugh","relief"],"skins":[{"unified":"1f605","native":"😅"}],"version":1},"rolling_on_the_floor_laughing":{"id":"rolling_on_the_floor_laughing","name":"Rolling on the Floor Laughing","keywords":["face","lol","haha","rofl"],"skins":[{"unified":"1f923","native":"🤣"}],"version":3},"joy":{"id":"joy","name":"Face with Tears of Joy","keywords":["cry","weep","happy","happytears","haha"],"skins":[{"unified":"1f602","native":"😂"}],"version":1},"slightly_smiling_face":{"id":"slightly_smiling_face","name":"Slightly Smiling Face","emoticons":[":)","(:",":-)"],"keywords":["smile"],"skins":[{"unified":"1f642","native":"🙂"}],"version":1},"upside_down_face":{"id":"upside_down_face","name":"Upside-Down Face","keywords":["upside","down","flipped","silly","smile"],"skins":[{"unified":"1f643","native":"🙃"}],"version":1},"melting_face":{"id":"melting_face","name":"Melting Face","keywords":["hot","heat"],"skins":[{"unified":"1fae0","native":"🫠"}],"version":14},"wink":{"id":"wink","name":"Winking Face","emoticons":[";)",";-)"],"keywords":["wink","happy","mischievous","secret",";)","smile","eye"],"skins":[{"unified":"1f609","native":"😉"}],"version":1},"blush":{"id":"blush","name":"Smiling Face with Smiling Eyes","emoticons":[":)"],"keywords":["blush","smile","happy","flushed","crush","embarrassed","shy","joy"],"skins":[{"unified":"1f60a","native":"😊"}],"version":1},"innocent":{"id":"innocent","name":"Smiling Face with Halo","keywords":["innocent","angel","heaven"],"skins":[{"unified":"1f607","native":"😇"}],"version":1},"smiling_face_with_3_hearts":{"id":"smiling_face_with_3_hearts","name":"Smiling Face with Hearts","keywords":["3","love","like","affection","valentines","infatuation","crush","adore"],"skins":[{"unified":"1f970","native":"🥰"}],"version":11},"heart_eyes":{"id":"heart_eyes","name":"Smiling Face with Heart-Eyes","keywords":["heart","eyes","love","like","affection","valentines","infatuation","crush"],"skins":[{"unified":"1f60d","native":"😍"}],"version":1},"star-struck":{"id":"star-struck","name":"Star-Struck","keywords":["star","struck","grinning","face","with","eyes","smile","starry"],"skins":[{"unified":"1f929","native":"🤩"}],"version":5},"kissing_heart":{"id":"kissing_heart","name":"Face Blowing a Kiss","emoticons":[":*",":-*"],"keywords":["kissing","heart","love","like","affection","valentines","infatuation"],"skins":[{"unified":"1f618","native":"😘"}],"version":1},"kissing":{"id":"kissing","name":"Kissing Face","keywords":["love","like","3","valentines","infatuation","kiss"],"skins":[{"unified":"1f617","native":"😗"}],"version":1},"relaxed":{"id":"relaxed","name":"Smiling Face","keywords":["relaxed","blush","massage","happiness"],"skins":[{"unified":"263a-fe0f","native":"☺️"}],"version":1},"kissing_closed_eyes":{"id":"kissing_closed_eyes","name":"Kissing Face with Closed Eyes","keywords":["love","like","affection","valentines","infatuation","kiss"],"skins":[{"unified":"1f61a","native":"😚"}],"version":1},"kissing_smiling_eyes":{"id":"kissing_smiling_eyes","name":"Kissing Face with Smiling Eyes","keywords":["affection","valentines","infatuation","kiss"],"skins":[{"unified":"1f619","native":"😙"}],"version":1},"smiling_face_with_tear":{"id":"smiling_face_with_tear","name":"Smiling Face with Tear","keywords":["sad","cry","pretend"],"skins":[{"unified":"1f972","native":"🥲"}],"version":13},"yum":{"id":"yum","name":"Face Savoring Food","keywords":["yum","happy","joy","tongue","smile","silly","yummy","nom","delicious","savouring"],"skins":[{"unified":"1f60b","native":"😋"}],"version":1},"stuck_out_tongue":{"id":"stuck_out_tongue","name":"Face with Tongue","emoticons":[":p",":-p",":P",":-P",":b",":-b"],"keywords":["stuck","out","prank","childish","playful","mischievous","smile"],"skins":[{"unified":"1f61b","native":"😛"}],"version":1},"stuck_out_tongue_winking_eye":{"id":"stuck_out_tongue_winking_eye","name":"Winking Face with Tongue","emoticons":[";p",";-p",";b",";-b",";P",";-P"],"keywords":["stuck","out","eye","prank","childish","playful","mischievous","smile","wink"],"skins":[{"unified":"1f61c","native":"😜"}],"version":1},"zany_face":{"id":"zany_face","name":"Zany Face","keywords":["grinning","with","one","large","and","small","eye","goofy","crazy"],"skins":[{"unified":"1f92a","native":"🤪"}],"version":5},"stuck_out_tongue_closed_eyes":{"id":"stuck_out_tongue_closed_eyes","name":"Squinting Face with Tongue","keywords":["stuck","out","closed","eyes","prank","playful","mischievous","smile"],"skins":[{"unified":"1f61d","native":"😝"}],"version":1},"money_mouth_face":{"id":"money_mouth_face","name":"Money-Mouth Face","keywords":["money","mouth","rich","dollar"],"skins":[{"unified":"1f911","native":"🤑"}],"version":1},"hugging_face":{"id":"hugging_face","name":"Hugging Face","keywords":["smile","hug"],"skins":[{"unified":"1f917","native":"🤗"}],"version":1},"face_with_hand_over_mouth":{"id":"face_with_hand_over_mouth","name":"Face with Hand over Mouth","keywords":["smiling","eyes","and","covering","whoops","shock","surprise"],"skins":[{"unified":"1f92d","native":"🤭"}],"version":5},"face_with_open_eyes_and_hand_over_mouth":{"id":"face_with_open_eyes_and_hand_over_mouth","name":"Face with Open Eyes and Hand over Mouth","keywords":["silence","secret","shock","surprise"],"skins":[{"unified":"1fae2","native":"🫢"}],"version":14},"face_with_peeking_eye":{"id":"face_with_peeking_eye","name":"Face with Peeking Eye","keywords":["scared","frightening","embarrassing","shy"],"skins":[{"unified":"1fae3","native":"🫣"}],"version":14},"shushing_face":{"id":"shushing_face","name":"Shushing Face","keywords":["with","finger","covering","closed","lips","quiet","shhh"],"skins":[{"unified":"1f92b","native":"🤫"}],"version":5},"thinking_face":{"id":"thinking_face","name":"Thinking Face","keywords":["hmmm","think","consider"],"skins":[{"unified":"1f914","native":"🤔"}],"version":1},"saluting_face":{"id":"saluting_face","name":"Saluting Face","keywords":["respect","salute"],"skins":[{"unified":"1fae1","native":"🫡"}],"version":14},"zipper_mouth_face":{"id":"zipper_mouth_face","name":"Zipper-Mouth Face","keywords":["zipper","mouth","sealed","secret"],"skins":[{"unified":"1f910","native":"🤐"}],"version":1},"face_with_raised_eyebrow":{"id":"face_with_raised_eyebrow","name":"Face with Raised Eyebrow","keywords":["one","distrust","scepticism","disapproval","disbelief","surprise"],"skins":[{"unified":"1f928","native":"🤨"}],"version":5},"neutral_face":{"id":"neutral_face","name":"Neutral Face","emoticons":[":|",":-|"],"keywords":["indifference","meh",":",""],"skins":[{"unified":"1f610","native":"😐"}],"version":1},"expressionless":{"id":"expressionless","name":"Expressionless Face","emoticons":["-_-"],"keywords":["indifferent","-","","meh","deadpan"],"skins":[{"unified":"1f611","native":"😑"}],"version":1},"no_mouth":{"id":"no_mouth","name":"Face Without Mouth","keywords":["no","hellokitty"],"skins":[{"unified":"1f636","native":"😶"}],"version":1},"dotted_line_face":{"id":"dotted_line_face","name":"Dotted Line Face","keywords":["invisible","lonely","isolation","depression"],"skins":[{"unified":"1fae5","native":"🫥"}],"version":14},"face_in_clouds":{"id":"face_in_clouds","name":"Face in Clouds","keywords":["shower","steam","dream"],"skins":[{"unified":"1f636-200d-1f32b-fe0f","native":"😶‍🌫️"}],"version":13.1},"smirk":{"id":"smirk","name":"Smirking Face","keywords":["smirk","smile","mean","prank","smug","sarcasm"],"skins":[{"unified":"1f60f","native":"😏"}],"version":1},"unamused":{"id":"unamused","name":"Unamused Face","emoticons":[":("],"keywords":["indifference","bored","straight","serious","sarcasm","unimpressed","skeptical","dubious","side","eye"],"skins":[{"unified":"1f612","native":"😒"}],"version":1},"face_with_rolling_eyes":{"id":"face_with_rolling_eyes","name":"Face with Rolling Eyes","keywords":["eyeroll","frustrated"],"skins":[{"unified":"1f644","native":"🙄"}],"version":1},"grimacing":{"id":"grimacing","name":"Grimacing Face","keywords":["grimace","teeth"],"skins":[{"unified":"1f62c","native":"😬"}],"version":1},"face_exhaling":{"id":"face_exhaling","name":"Face Exhaling","keywords":["relieve","relief","tired","sigh"],"skins":[{"unified":"1f62e-200d-1f4a8","native":"😮‍💨"}],"version":13.1},"lying_face":{"id":"lying_face","name":"Lying Face","keywords":["lie","pinocchio"],"skins":[{"unified":"1f925","native":"🤥"}],"version":3},"shaking_face":{"id":"shaking_face","name":"Shaking Face","keywords":["dizzy","shock","blurry","earthquake"],"skins":[{"unified":"1fae8","native":"🫨"}],"version":15},"relieved":{"id":"relieved","name":"Relieved Face","keywords":["relaxed","phew","massage","happiness"],"skins":[{"unified":"1f60c","native":"😌"}],"version":1},"pensive":{"id":"pensive","name":"Pensive Face","keywords":["sad","depressed","upset"],"skins":[{"unified":"1f614","native":"😔"}],"version":1},"sleepy":{"id":"sleepy","name":"Sleepy Face","keywords":["tired","rest","nap"],"skins":[{"unified":"1f62a","native":"😪"}],"version":1},"drooling_face":{"id":"drooling_face","name":"Drooling Face","keywords":[],"skins":[{"unified":"1f924","native":"🤤"}],"version":3},"sleeping":{"id":"sleeping","name":"Sleeping Face","keywords":["tired","sleepy","night","zzz"],"skins":[{"unified":"1f634","native":"😴"}],"version":1},"mask":{"id":"mask","name":"Face with Medical Mask","keywords":["sick","ill","disease","covid"],"skins":[{"unified":"1f637","native":"😷"}],"version":1},"face_with_thermometer":{"id":"face_with_thermometer","name":"Face with Thermometer","keywords":["sick","temperature","cold","fever","covid"],"skins":[{"unified":"1f912","native":"🤒"}],"version":1},"face_with_head_bandage":{"id":"face_with_head_bandage","name":"Face with Head-Bandage","keywords":["head","bandage","injured","clumsy","hurt"],"skins":[{"unified":"1f915","native":"🤕"}],"version":1},"nauseated_face":{"id":"nauseated_face","name":"Nauseated Face","keywords":["vomit","gross","green","sick","throw","up","ill"],"skins":[{"unified":"1f922","native":"🤢"}],"version":3},"face_vomiting":{"id":"face_vomiting","name":"Face Vomiting","keywords":["with","open","mouth","sick"],"skins":[{"unified":"1f92e","native":"🤮"}],"version":5},"sneezing_face":{"id":"sneezing_face","name":"Sneezing Face","keywords":["gesundheit","sneeze","sick","allergy"],"skins":[{"unified":"1f927","native":"🤧"}],"version":3},"hot_face":{"id":"hot_face","name":"Hot Face","keywords":["feverish","heat","red","sweating"],"skins":[{"unified":"1f975","native":"🥵"}],"version":11},"cold_face":{"id":"cold_face","name":"Cold Face","keywords":["blue","freezing","frozen","frostbite","icicles"],"skins":[{"unified":"1f976","native":"🥶"}],"version":11},"woozy_face":{"id":"woozy_face","name":"Woozy Face","keywords":["dizzy","intoxicated","tipsy","wavy"],"skins":[{"unified":"1f974","native":"🥴"}],"version":11},"dizzy_face":{"id":"dizzy_face","name":"Dizzy Face","keywords":["spent","unconscious","xox"],"skins":[{"unified":"1f635","native":"😵"}],"version":1},"face_with_spiral_eyes":{"id":"face_with_spiral_eyes","name":"Face with Spiral Eyes","keywords":["sick","ill","confused","nauseous","nausea"],"skins":[{"unified":"1f635-200d-1f4ab","native":"😵‍💫"}],"version":13.1},"exploding_head":{"id":"exploding_head","name":"Exploding Head","keywords":["shocked","face","with","mind","blown"],"skins":[{"unified":"1f92f","native":"🤯"}],"version":5},"face_with_cowboy_hat":{"id":"face_with_cowboy_hat","name":"Cowboy Hat Face","keywords":["with","cowgirl"],"skins":[{"unified":"1f920","native":"🤠"}],"version":3},"partying_face":{"id":"partying_face","name":"Partying Face","keywords":["celebration","woohoo"],"skins":[{"unified":"1f973","native":"🥳"}],"version":11},"disguised_face":{"id":"disguised_face","name":"Disguised Face","keywords":["pretent","brows","glasses","moustache"],"skins":[{"unified":"1f978","native":"🥸"}],"version":13},"sunglasses":{"id":"sunglasses","name":"Smiling Face with Sunglasses","emoticons":["8)"],"keywords":["cool","smile","summer","beach","sunglass"],"skins":[{"unified":"1f60e","native":"😎"}],"version":1},"nerd_face":{"id":"nerd_face","name":"Nerd Face","keywords":["nerdy","geek","dork"],"skins":[{"unified":"1f913","native":"🤓"}],"version":1},"face_with_monocle":{"id":"face_with_monocle","name":"Face with Monocle","keywords":["stuffy","wealthy"],"skins":[{"unified":"1f9d0","native":"🧐"}],"version":5},"confused":{"id":"confused","name":"Confused Face","emoticons":[":\\\\",":-\\\\",":/",":-/"],"keywords":["indifference","huh","weird","hmmm",":/"],"skins":[{"unified":"1f615","native":"😕"}],"version":1},"face_with_diagonal_mouth":{"id":"face_with_diagonal_mouth","name":"Face with Diagonal Mouth","keywords":["skeptic","confuse","frustrated","indifferent"],"skins":[{"unified":"1fae4","native":"🫤"}],"version":14},"worried":{"id":"worried","name":"Worried Face","keywords":["concern","nervous",":("],"skins":[{"unified":"1f61f","native":"😟"}],"version":1},"slightly_frowning_face":{"id":"slightly_frowning_face","name":"Slightly Frowning Face","keywords":["disappointed","sad","upset"],"skins":[{"unified":"1f641","native":"🙁"}],"version":1},"white_frowning_face":{"id":"white_frowning_face","name":"Frowning Face","keywords":["white","sad","upset","frown"],"skins":[{"unified":"2639-fe0f","native":"☹️"}],"version":1},"open_mouth":{"id":"open_mouth","name":"Face with Open Mouth","emoticons":[":o",":-o",":O",":-O"],"keywords":["surprise","impressed","wow","whoa",":O"],"skins":[{"unified":"1f62e","native":"😮"}],"version":1},"hushed":{"id":"hushed","name":"Hushed Face","keywords":["woo","shh"],"skins":[{"unified":"1f62f","native":"😯"}],"version":1},"astonished":{"id":"astonished","name":"Astonished Face","keywords":["xox","surprised","poisoned"],"skins":[{"unified":"1f632","native":"😲"}],"version":1},"flushed":{"id":"flushed","name":"Flushed Face","keywords":["blush","shy","flattered"],"skins":[{"unified":"1f633","native":"😳"}],"version":1},"pleading_face":{"id":"pleading_face","name":"Pleading Face","keywords":["begging","mercy","cry","tears","sad","grievance"],"skins":[{"unified":"1f97a","native":"🥺"}],"version":11},"face_holding_back_tears":{"id":"face_holding_back_tears","name":"Face Holding Back Tears","keywords":["touched","gratitude","cry"],"skins":[{"unified":"1f979","native":"🥹"}],"version":14},"frowning":{"id":"frowning","name":"Frowning Face with Open Mouth","keywords":["aw","what"],"skins":[{"unified":"1f626","native":"😦"}],"version":1},"anguished":{"id":"anguished","name":"Anguished Face","emoticons":["D:"],"keywords":["stunned","nervous"],"skins":[{"unified":"1f627","native":"😧"}],"version":1},"fearful":{"id":"fearful","name":"Fearful Face","keywords":["scared","terrified","nervous"],"skins":[{"unified":"1f628","native":"😨"}],"version":1},"cold_sweat":{"id":"cold_sweat","name":"Anxious Face with Sweat","keywords":["cold","nervous"],"skins":[{"unified":"1f630","native":"😰"}],"version":1},"disappointed_relieved":{"id":"disappointed_relieved","name":"Sad but Relieved Face","keywords":["disappointed","phew","sweat","nervous"],"skins":[{"unified":"1f625","native":"😥"}],"version":1},"cry":{"id":"cry","name":"Crying Face","emoticons":[":'("],"keywords":["cry","tears","sad","depressed","upset",":'("],"skins":[{"unified":"1f622","native":"😢"}],"version":1},"sob":{"id":"sob","name":"Loudly Crying Face","emoticons":[":'("],"keywords":["sob","cry","tears","sad","upset","depressed"],"skins":[{"unified":"1f62d","native":"😭"}],"version":1},"scream":{"id":"scream","name":"Face Screaming in Fear","keywords":["scream","munch","scared","omg"],"skins":[{"unified":"1f631","native":"😱"}],"version":1},"confounded":{"id":"confounded","name":"Confounded Face","keywords":["confused","sick","unwell","oops",":S"],"skins":[{"unified":"1f616","native":"😖"}],"version":1},"persevere":{"id":"persevere","name":"Persevering Face","keywords":["persevere","sick","no","upset","oops"],"skins":[{"unified":"1f623","native":"😣"}],"version":1},"disappointed":{"id":"disappointed","name":"Disappointed Face","emoticons":["):",":(",":-("],"keywords":["sad","upset","depressed",":("],"skins":[{"unified":"1f61e","native":"😞"}],"version":1},"sweat":{"id":"sweat","name":"Face with Cold Sweat","keywords":["downcast","hot","sad","tired","exercise"],"skins":[{"unified":"1f613","native":"😓"}],"version":1},"weary":{"id":"weary","name":"Weary Face","keywords":["tired","sleepy","sad","frustrated","upset"],"skins":[{"unified":"1f629","native":"😩"}],"version":1},"tired_face":{"id":"tired_face","name":"Tired Face","keywords":["sick","whine","upset","frustrated"],"skins":[{"unified":"1f62b","native":"😫"}],"version":1},"yawning_face":{"id":"yawning_face","name":"Yawning Face","keywords":["tired","sleepy"],"skins":[{"unified":"1f971","native":"🥱"}],"version":12},"triumph":{"id":"triumph","name":"Face with Look of Triumph","keywords":["steam","from","nose","gas","phew","proud","pride"],"skins":[{"unified":"1f624","native":"😤"}],"version":1},"rage":{"id":"rage","name":"Pouting Face","keywords":["rage","angry","mad","hate","despise"],"skins":[{"unified":"1f621","native":"😡"}],"version":1},"angry":{"id":"angry","name":"Angry Face","emoticons":[">:(",">:-("],"keywords":["mad","annoyed","frustrated"],"skins":[{"unified":"1f620","native":"😠"}],"version":1},"face_with_symbols_on_mouth":{"id":"face_with_symbols_on_mouth","name":"Face with Symbols on Mouth","keywords":["serious","covering","swearing","cursing","cussing","profanity","expletive"],"skins":[{"unified":"1f92c","native":"🤬"}],"version":5},"smiling_imp":{"id":"smiling_imp","name":"Smiling Face with Horns","keywords":["imp","devil"],"skins":[{"unified":"1f608","native":"😈"}],"version":1},"imp":{"id":"imp","name":"Imp","keywords":["angry","face","with","horns","devil"],"skins":[{"unified":"1f47f","native":"👿"}],"version":1},"skull":{"id":"skull","name":"Skull","keywords":["dead","skeleton","creepy","death"],"skins":[{"unified":"1f480","native":"💀"}],"version":1},"skull_and_crossbones":{"id":"skull_and_crossbones","name":"Skull and Crossbones","keywords":["poison","danger","deadly","scary","death","pirate","evil"],"skins":[{"unified":"2620-fe0f","native":"☠️"}],"version":1},"hankey":{"id":"hankey","name":"Pile of Poo","keywords":["hankey","poop","shit","shitface","fail","turd"],"skins":[{"unified":"1f4a9","native":"💩"}],"version":1},"clown_face":{"id":"clown_face","name":"Clown Face","keywords":[],"skins":[{"unified":"1f921","native":"🤡"}],"version":3},"japanese_ogre":{"id":"japanese_ogre","name":"Ogre","keywords":["japanese","monster","red","mask","halloween","scary","creepy","devil","demon"],"skins":[{"unified":"1f479","native":"👹"}],"version":1},"japanese_goblin":{"id":"japanese_goblin","name":"Goblin","keywords":["japanese","red","evil","mask","monster","scary","creepy"],"skins":[{"unified":"1f47a","native":"👺"}],"version":1},"ghost":{"id":"ghost","name":"Ghost","keywords":["halloween","spooky","scary"],"skins":[{"unified":"1f47b","native":"👻"}],"version":1},"alien":{"id":"alien","name":"Alien","keywords":["UFO","paul","weird","outer","space"],"skins":[{"unified":"1f47d","native":"👽"}],"version":1},"space_invader":{"id":"space_invader","name":"Alien Monster","keywords":["space","invader","game","arcade","play"],"skins":[{"unified":"1f47e","native":"👾"}],"version":1},"robot_face":{"id":"robot_face","name":"Robot","keywords":["face","computer","machine","bot"],"skins":[{"unified":"1f916","native":"🤖"}],"version":1},"smiley_cat":{"id":"smiley_cat","name":"Grinning Cat","keywords":["smiley","animal","cats","happy","smile"],"skins":[{"unified":"1f63a","native":"😺"}],"version":1},"smile_cat":{"id":"smile_cat","name":"Grinning Cat with Smiling Eyes","keywords":["smile","animal","cats"],"skins":[{"unified":"1f638","native":"😸"}],"version":1},"joy_cat":{"id":"joy_cat","name":"Cat with Tears of Joy","keywords":["animal","cats","haha","happy"],"skins":[{"unified":"1f639","native":"😹"}],"version":1},"heart_eyes_cat":{"id":"heart_eyes_cat","name":"Smiling Cat with Heart-Eyes","keywords":["heart","eyes","animal","love","like","affection","cats","valentines"],"skins":[{"unified":"1f63b","native":"😻"}],"version":1},"smirk_cat":{"id":"smirk_cat","name":"Cat with Wry Smile","keywords":["smirk","animal","cats"],"skins":[{"unified":"1f63c","native":"😼"}],"version":1},"kissing_cat":{"id":"kissing_cat","name":"Kissing Cat","keywords":["animal","cats","kiss"],"skins":[{"unified":"1f63d","native":"😽"}],"version":1},"scream_cat":{"id":"scream_cat","name":"Weary Cat","keywords":["scream","animal","cats","munch","scared"],"skins":[{"unified":"1f640","native":"🙀"}],"version":1},"crying_cat_face":{"id":"crying_cat_face","name":"Crying Cat","keywords":["face","animal","tears","weep","sad","cats","upset","cry"],"skins":[{"unified":"1f63f","native":"😿"}],"version":1},"pouting_cat":{"id":"pouting_cat","name":"Pouting Cat","keywords":["animal","cats"],"skins":[{"unified":"1f63e","native":"😾"}],"version":1},"see_no_evil":{"id":"see_no_evil","name":"See-No-Evil Monkey","keywords":["see","no","evil","animal","nature","haha"],"skins":[{"unified":"1f648","native":"🙈"}],"version":1},"hear_no_evil":{"id":"hear_no_evil","name":"Hear-No-Evil Monkey","keywords":["hear","no","evil","animal","nature"],"skins":[{"unified":"1f649","native":"🙉"}],"version":1},"speak_no_evil":{"id":"speak_no_evil","name":"Speak-No-Evil Monkey","keywords":["speak","no","evil","animal","nature","omg"],"skins":[{"unified":"1f64a","native":"🙊"}],"version":1},"love_letter":{"id":"love_letter","name":"Love Letter","keywords":["email","like","affection","envelope","valentines"],"skins":[{"unified":"1f48c","native":"💌"}],"version":1},"cupid":{"id":"cupid","name":"Heart with Arrow","keywords":["cupid","love","like","affection","valentines"],"skins":[{"unified":"1f498","native":"💘"}],"version":1},"gift_heart":{"id":"gift_heart","name":"Heart with Ribbon","keywords":["gift","love","valentines"],"skins":[{"unified":"1f49d","native":"💝"}],"version":1},"sparkling_heart":{"id":"sparkling_heart","name":"Sparkling Heart","keywords":["love","like","affection","valentines"],"skins":[{"unified":"1f496","native":"💖"}],"version":1},"heartpulse":{"id":"heartpulse","name":"Growing Heart","keywords":["heartpulse","like","love","affection","valentines","pink"],"skins":[{"unified":"1f497","native":"💗"}],"version":1},"heartbeat":{"id":"heartbeat","name":"Beating Heart","keywords":["heartbeat","love","like","affection","valentines","pink"],"skins":[{"unified":"1f493","native":"💓"}],"version":1},"revolving_hearts":{"id":"revolving_hearts","name":"Revolving Hearts","keywords":["love","like","affection","valentines"],"skins":[{"unified":"1f49e","native":"💞"}],"version":1},"two_hearts":{"id":"two_hearts","name":"Two Hearts","keywords":["love","like","affection","valentines","heart"],"skins":[{"unified":"1f495","native":"💕"}],"version":1},"heart_decoration":{"id":"heart_decoration","name":"Heart Decoration","keywords":["purple","square","love","like"],"skins":[{"unified":"1f49f","native":"💟"}],"version":1},"heavy_heart_exclamation_mark_ornament":{"id":"heavy_heart_exclamation_mark_ornament","name":"Heart Exclamation","keywords":["heavy","mark","ornament","decoration","love"],"skins":[{"unified":"2763-fe0f","native":"❣️"}],"version":1},"broken_heart":{"id":"broken_heart","name":"Broken Heart","emoticons":["2&&(o.children=arguments.length>3?yb.call(arguments,2):t),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return Hg(e,o,i,r,null)}function Hg(e,n,t,i,r){var a={type:e,props:n,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:r??++jG};return r==null&&An.vnode!=null&&An.vnode(a),a}function Wo(){return{current:null}}function zf(e){return e.children}function co(e,n){this.props=e,this.context=n}function Lf(e,n){if(n==null)return e.__?Lf(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n0?Hg(g.type,g.props,g.key,null,g.__v):g)!=null){if(g.__=t,g.__b=t.__b+1,(p=_[h])===null||p&&g.key==p.key&&g.type===p.type)_[h]=void 0;else for(d=0;d{let e=null;try{navigator.userAgent.includes("jsdom")||(e=document.createElement("canvas").getContext("2d",{willReadFrequently:!0}))}catch{}if(!e)return()=>!1;const n=25,t=20,i=Math.floor(n/2);return e.font=i+"px Arial, Sans-Serif",e.textBaseline="top",e.canvas.width=t*2,e.canvas.height=n,r=>{e.clearRect(0,0,t*2,n),e.fillStyle="#FF0000",e.fillText(r,0,22),e.fillStyle="#0000FF",e.fillText(r,t,22);const a=e.getImageData(0,0,t,n).data,o=a.length;let l=0;for(;l=o)return!1;const u=t+l/4%t,f=Math.floor(l/4/t),h=e.getImageData(u,f,1,1).data;return!(a[l]!==h[0]||a[l+2]!==h[2]||e.measureText(r).width>=t)}})();var gz={latestVersion:jAe,noCountryFlags:AAe};const H6=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"];let Hi=null;function TAe(e){Hi||(Hi=yl.get("frequently")||{});const n=e.id||e;n&&(Hi[n]||(Hi[n]=0),Hi[n]+=1,yl.set("last",n),yl.set("frequently",Hi))}function EAe({maxFrequentRows:e,perLine:n}){if(!e)return[];Hi||(Hi=yl.get("frequently"));let t=[];if(!Hi){Hi={};for(let a in H6.slice(0,n)){const o=H6[a];Hi[o]=n-a,t.push(o)}return t}const i=e*n,r=yl.get("last");for(let a in Hi)t.push(a);if(t.sort((a,o)=>{const l=Hi[o],u=Hi[a];return l==u?a.localeCompare(o):l-u}),t.length>i){const a=t.slice(i);t=t.slice(0,i);for(let o of a)o!=r&&delete Hi[o];r&&t.indexOf(r)==-1&&(delete Hi[t[t.length-1]],t.splice(-1,1,r)),yl.set("frequently",Hi)}return t}var IG={add:TAe,get:EAe,DEFAULTS:H6},BG={};BG=JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn’t be found","pick":"Pick an emoji…","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}');var Yo={autoFocus:{value:!1},dynamicWidth:{value:!1},emojiButtonColors:{value:null},emojiButtonRadius:{value:"100%"},emojiButtonSize:{value:36},emojiSize:{value:24},emojiVersion:{value:15,choices:[1,2,3,4,5,11,12,12.1,13,13.1,14,15]},exceptEmojis:{value:[]},icons:{value:"auto",choices:["auto","outline","solid"]},locale:{value:"en",choices:["en","ar","be","cs","de","es","fa","fi","fr","hi","it","ja","ko","nl","pl","pt","ru","sa","tr","uk","vi","zh"]},maxFrequentRows:{value:4},navPosition:{value:"top",choices:["top","bottom","none"]},noCountryFlags:{value:!1},noResultsEmoji:{value:null},perLine:{value:9},previewEmoji:{value:null},previewPosition:{value:"bottom",choices:["top","bottom","none"]},searchPosition:{value:"sticky",choices:["sticky","static","none"]},set:{value:"native",choices:["native","apple","facebook","google","twitter"]},skin:{value:1,choices:[1,2,3,4,5,6]},skinTonePosition:{value:"preview",choices:["preview","search","none"]},theme:{value:"auto",choices:["auto","light","dark"]},categories:null,categoryIcons:null,custom:null,data:null,i18n:null,getImageURL:null,getSpritesheetURL:null,onAddCustomEmoji:null,onClickOutside:null,onEmojiSelect:null,stickySearch:{deprecated:!0,value:!0}};let Ki=null,it=null;const xS={};async function yz(e){if(xS[e])return xS[e];const t=await(await fetch(e)).json();return xS[e]=t,t}let SS=null,FG=null,qG=!1;function bb(e,{caller:n}={}){return SS||(SS=new Promise(t=>{FG=t})),e?MAe(e):n&&!qG&&console.warn(`\`${n}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`),SS}async function MAe(e){qG=!0;let{emojiVersion:n,set:t,locale:i}=e;if(n||(n=Yo.emojiVersion.value),t||(t=Yo.set.value),i||(i=Yo.locale.value),it)it.categories=it.categories.filter(u=>!u.name);else{it=(typeof e.data=="function"?await e.data():e.data)||await yz(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${n}/${t}.json`),it.emoticons={},it.natives={},it.categories.unshift({id:"frequent",emojis:[]});for(const u in it.aliases){const f=it.aliases[u],h=it.emojis[f];h&&(h.aliases||(h.aliases=[]),h.aliases.push(u))}it.originalCategories=it.categories}if(Ki=(typeof e.i18n=="function"?await e.i18n():e.i18n)||(i=="en"?CG(BG):await yz(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${i}.json`)),e.custom)for(let u in e.custom){u=parseInt(u);const f=e.custom[u],h=e.custom[u-1];if(!(!f.emojis||!f.emojis.length)){f.id||(f.id=`custom_${u+1}`),f.name||(f.name=Ki.categories.custom),h&&!f.icon&&(f.target=h.target||h),it.categories.push(f);for(const d of f.emojis)it.emojis[d.id]=d}}e.categories&&(it.categories=it.originalCategories.filter(u=>e.categories.indexOf(u.id)!=-1).sort((u,f)=>{const h=e.categories.indexOf(u.id),d=e.categories.indexOf(f.id);return h-d}));let r=null,a=null;t=="native"&&(r=gz.latestVersion(),a=e.noCountryFlags||gz.noCountryFlags());let o=it.categories.length,l=!1;for(;o--;){const u=it.categories[o];if(u.id=="frequent"){let{maxFrequentRows:d,perLine:p}=e;d=d>=0?d:Yo.maxFrequentRows.value,p||(p=Yo.perLine.value),u.emojis=IG.get({maxFrequentRows:d,perLine:p})}if(!u.emojis||!u.emojis.length){it.categories.splice(o,1);continue}const{categoryIcons:f}=e;if(f){const d=f[u.id];d&&!u.icon&&(u.icon=d)}let h=u.emojis.length;for(;h--;){const d=u.emojis[h],p=d.id?d:it.emojis[d],g=()=>{u.emojis.splice(h,1)};if(!p||e.exceptEmojis&&e.exceptEmojis.includes(p.id)){g();continue}if(r&&p.version>r){g();continue}if(a&&u.id=="flags"&&!$Ae.includes(p.id)){g();continue}if(!p.search){if(l=!0,p.search=","+[[p.id,!1],[p.name,!0],[p.keywords,!1],[p.emoticons,!1]].map(([w,k])=>{if(w)return(Array.isArray(w)?w:[w]).map(_=>(k?_.split(/[-|_|\s]+/):[_]).map(S=>S.toLowerCase())).flat()}).flat().filter(w=>w&&w.trim()).join(","),p.emoticons)for(const w of p.emoticons)it.emoticons[w]||(it.emoticons[w]=p.id);let b=0;for(const w of p.skins){if(!w)continue;b++;const{native:k}=w;k&&(it.natives[k]=p.id,p.search+=`,${k}`);const _=b==1?"":`:skin-tone-${b}:`;w.shortcodes=`:${p.id}:${_}`}}}}l&&af.reset(),FG()}function HG(e,n,t){e||(e={});const i={};for(let r in n)i[r]=UG(r,e,n,t);return i}function UG(e,n,t,i){const r=t[e];let a=i&&i.getAttribute(e)||(n[e]!=null&&n[e]!=null?n[e]:null);return r&&(a!=null&&r.value&&typeof r.value!=typeof a&&(typeof r.value=="boolean"?a=a!="false":a=r.value.constructor(a)),r.transform&&a&&(a=r.transform(a)),(a==null||r.choices&&r.choices.indexOf(a)==-1)&&(a=r.value)),a}const DAe=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/;let U6=null;function RAe(e){return e.id?e:it.emojis[e]||it.emojis[it.aliases[e]]||it.emojis[it.natives[e]]}function PAe(){U6=null}async function NAe(e,{maxResults:n,caller:t}={}){if(!e||!e.trim().length)return null;n||(n=90),await bb(null,{caller:t||"SearchIndex.search"});const i=e.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter((l,u,f)=>l.trim()&&f.indexOf(l)==u);if(!i.length)return;let r=U6||(U6=Object.values(it.emojis)),a,o;for(const l of i){if(!r.length)break;a=[],o={};for(const u of r){if(!u.search)continue;const f=u.search.indexOf(`,${l}`);f!=-1&&(a.push(u),o[u.id]||(o[u.id]=0),o[u.id]+=u.id==l?0:f+1)}r=a}return a.length<2||(a.sort((l,u)=>{const f=o[l.id],h=o[u.id];return f==h?l.id.localeCompare(u.id):f-h}),a.length>n&&(a=a.slice(0,n))),a}var af={search:NAe,get:RAe,reset:PAe,SHORTCODES_REGEX:DAe};const $Ae=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];function zAe(e,n){return Array.isArray(e)&&Array.isArray(n)&&e.length===n.length&&e.every((t,i)=>t==n[i])}async function LAe(e=1){for(let n in[...Array(e).keys()])await new Promise(requestAnimationFrame)}function IAe(e,{skinIndex:n=0}={}){const t=e.skins[n]||(n=0,e.skins[n]),i={id:e.id,name:e.name,native:t.native,unified:t.unified,keywords:e.keywords,shortcodes:t.shortcodes||e.shortcodes};return e.skins.length>1&&(i.skin=n+1),t.src&&(i.src=t.src),e.aliases&&e.aliases.length&&(i.aliases=e.aliases),e.emoticons&&e.emoticons.length&&(i.emoticons=e.emoticons),i}const BAe={activity:{outline:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Le("path",{d:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"})}),solid:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Le("path",{d:"M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"})})},custom:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:Le("path",{d:"M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"})}),flags:{outline:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Le("path",{d:"M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"})}),solid:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Le("path",{d:"M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"})})},foods:{outline:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Le("path",{d:"M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"})}),solid:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Le("path",{d:"M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z"})})},frequent:{outline:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Le("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),Le("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})]}),solid:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Le("path",{d:"M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"})})},nature:{outline:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Le("path",{d:"M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"}),Le("path",{d:"M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"})]}),solid:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:Le("path",{d:"M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z"})})},objects:{outline:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Le("path",{d:"M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"}),Le("path",{d:"M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"})]}),solid:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:Le("path",{d:"M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"})})},people:{outline:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Le("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"}),Le("path",{d:"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"})]}),solid:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Le("path",{d:"M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z"})})},places:{outline:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Le("path",{d:"M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"}),Le("path",{d:"M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"})]}),solid:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Le("path",{d:"M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z"})})},symbols:{outline:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Le("path",{d:"M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"})}),solid:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Le("path",{d:"M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"})})}},FAe={loupe:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:Le("path",{d:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"})}),delete:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:Le("path",{d:"M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"})})};var wy={categories:BAe,search:FAe};function V6(e){let{id:n,skin:t,emoji:i}=e;if(e.shortcodes){const l=e.shortcodes.match(af.SHORTCODES_REGEX);l&&(n=l[1],l[2]&&(t=l[2]))}if(i||(i=af.get(n||e.native)),!i)return e.fallback;const r=i.skins[t-1]||i.skins[0],a=r.src||(e.set!="native"&&!e.spritesheet?typeof e.getImageURL=="function"?e.getImageURL(e.set,r.unified):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@15.0.1/img/${e.set}/64/${r.unified}.png`:void 0),o=typeof e.getSpritesheetURL=="function"?e.getSpritesheetURL(e.set):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@15.0.1/img/${e.set}/sheets-256/64.png`;return Le("span",{class:"emoji-mart-emoji","data-emoji-set":e.set,children:a?Le("img",{style:{maxWidth:e.size||"1em",maxHeight:e.size||"1em",display:"inline-block"},alt:r.native||r.shortcodes,src:a}):e.set=="native"?Le("span",{style:{fontSize:e.size,fontFamily:'"EmojiMart", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"'},children:r.native}):Le("span",{style:{display:"block",width:e.size,height:e.size,backgroundImage:`url(${o})`,backgroundSize:`${100*it.sheet.cols}% ${100*it.sheet.rows}%`,backgroundPosition:`${100/(it.sheet.cols-1)*r.x}% ${100/(it.sheet.rows-1)*r.y}%`}})})}const qAe=typeof window<"u"&&window.HTMLElement?window.HTMLElement:Object;class VG extends qAe{static get observedAttributes(){return Object.keys(this.Props)}update(n={}){for(let t in n)this.attributeChangedCallback(t,null,n[t])}attributeChangedCallback(n,t,i){if(!this.component)return;const r=UG(n,{[n]:i},this.constructor.Props,this);this.component.componentWillReceiveProps?this.component.componentWillReceiveProps({[n]:r}):(this.component.props[n]=r,this.component.forceUpdate())}disconnectedCallback(){this.disconnected=!0,this.component&&this.component.unregister&&this.component.unregister()}constructor(n={}){if(super(),this.props=n,n.parent||n.ref){let t=null;const i=n.parent||(t=n.ref&&n.ref.current);t&&(t.innerHTML=""),i&&i.appendChild(this)}}}class HAe extends VG{setShadow(){this.attachShadow({mode:"open"})}injectStyles(n){if(!n)return;const t=document.createElement("style");t.textContent=n,this.shadowRoot.insertBefore(t,this.shadowRoot.firstChild)}constructor(n,{styles:t}={}){super(n),this.setShadow(),this.injectStyles(t)}}var WG={fallback:"",id:"",native:"",shortcodes:"",size:{value:"",transform:e=>/\D/.test(e)?e:`${e}px`},set:Yo.set,skin:Yo.skin};class GG extends VG{async connectedCallback(){const n=HG(this.props,WG,this);n.element=this,n.ref=t=>{this.component=t},await bb(),!this.disconnected&&zG(Le(V6,{...n}),this)}constructor(n){super(n)}}ha(GG,"Props",WG);typeof customElements<"u"&&!customElements.get("em-emoji")&&customElements.define("em-emoji",GG);var bz,W6=[],wz=An.__b,kz=An.__r,_z=An.diffed,xz=An.__c,Sz=An.unmount;function UAe(){var e;for(W6.sort(function(n,t){return n.__v.__b-t.__v.__b});e=W6.pop();)if(e.__P)try{e.__H.__h.forEach(Ug),e.__H.__h.forEach(G6),e.__H.__h=[]}catch(n){e.__H.__h=[],An.__e(n,e.__v)}}An.__b=function(e){wz&&wz(e)},An.__r=function(e){kz&&kz(e);var n=e.__c.__H;n&&(n.__h.forEach(Ug),n.__h.forEach(G6),n.__h=[])},An.diffed=function(e){_z&&_z(e);var n=e.__c;n&&n.__H&&n.__H.__h.length&&(W6.push(n)!==1&&bz===An.requestAnimationFrame||((bz=An.requestAnimationFrame)||function(t){var i,r=function(){clearTimeout(a),Cz&&cancelAnimationFrame(i),setTimeout(t)},a=setTimeout(r,100);Cz&&(i=requestAnimationFrame(r))})(UAe))},An.__c=function(e,n){n.some(function(t){try{t.__h.forEach(Ug),t.__h=t.__h.filter(function(i){return!i.__||G6(i)})}catch(i){n.some(function(r){r.__h&&(r.__h=[])}),n=[],An.__e(i,t.__v)}}),xz&&xz(e,n)},An.unmount=function(e){Sz&&Sz(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach(function(i){try{Ug(i)}catch(r){n=r}}),n&&An.__e(n,t.__v))};var Cz=typeof requestAnimationFrame=="function";function Ug(e){var n=e.__c;typeof n=="function"&&(e.__c=void 0,n())}function G6(e){e.__c=e.__()}function VAe(e,n){for(var t in n)e[t]=n[t];return e}function jz(e,n){for(var t in e)if(t!=="__source"&&!(t in n))return!0;for(var i in n)if(i!=="__source"&&e[i]!==n[i])return!0;return!1}function ky(e){this.props=e}(ky.prototype=new co).isPureReactComponent=!0,ky.prototype.shouldComponentUpdate=function(e,n){return jz(this.props,e)||jz(this.state,n)};var Az=An.__b;An.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Az&&Az(e)};var WAe=An.__e;An.__e=function(e,n,t){if(e.then){for(var i,r=n;r=r.__;)if((i=r.__c)&&i.__c)return n.__e==null&&(n.__e=t.__e,n.__k=t.__k),i.__c(e,n)}WAe(e,n,t)};var Oz=An.unmount;function CS(){this.__u=0,this.t=null,this.__b=null}function YG(e){var n=e.__.__c;return n&&n.__e&&n.__e(e)}function Og(){this.u=null,this.o=null}An.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&e.__h===!0&&(e.type=null),Oz&&Oz(e)},(CS.prototype=new co).__c=function(e,n){var t=n.__c,i=this;i.t==null&&(i.t=[]),i.t.push(t);var r=YG(i.__v),a=!1,o=function(){a||(a=!0,t.__R=null,r?r(l):l())};t.__R=o;var l=function(){if(!--i.__u){if(i.state.__e){var f=i.state.__e;i.__v.__k[0]=(function d(p,g,b){return p&&(p.__v=null,p.__k=p.__k&&p.__k.map(function(w){return d(w,g,b)}),p.__c&&p.__c.__P===g&&(p.__e&&b.insertBefore(p.__e,p.__d),p.__c.__e=!0,p.__c.__P=b)),p})(f,f.__c.__P,f.__c.__O)}var h;for(i.setState({__e:i.__b=null});h=i.t.pop();)h.forceUpdate()}},u=n.__h===!0;i.__u++||u||i.setState({__e:i.__b=i.__v.__k[0]}),e.then(o,o)},CS.prototype.componentWillUnmount=function(){this.t=[]},CS.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=(function a(o,l,u){return o&&(o.__c&&o.__c.__H&&(o.__c.__H.__.forEach(function(f){typeof f.__c=="function"&&f.__c()}),o.__c.__H=null),(o=VAe({},o)).__c!=null&&(o.__c.__P===u&&(o.__c.__P=l),o.__c=null),o.__k=o.__k&&o.__k.map(function(f){return a(f,l,u)})),o})(this.__b,t,i.__O=i.__P)}this.__b=null}var r=n.__e&&q6(zf,null,e.fallback);return r&&(r.__h=null),[q6(zf,null,n.__e?null:e.children),r]};var Tz=function(e,n,t){if(++t[1]===t[0]&&e.o.delete(n),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(t=e.u;t;){for(;t.length>3;)t.pop()();if(t[1]{const r=t.name||Ki.categories[t.id],a=!this.props.unfocused&&t.id==this.state.categoryId;return a&&(n=i),Le("button",{"aria-label":r,"aria-selected":a||void 0,title:r,type:"button",class:"flex flex-grow flex-center",onMouseDown:o=>o.preventDefault(),onClick:()=>{this.props.onClick({category:t,i})},children:this.renderIcon(t)})}),Le("div",{class:"bar",style:{width:`${100/this.categories.length}%`,opacity:n==null?0:1,transform:this.props.dir==="rtl"?`scaleX(-1) translateX(${n*100}%)`:`translateX(${n*100}%)`}})]})})}constructor(){super(),this.categories=it.categories.filter(n=>!n.target),this.state={categoryId:this.categories[0].id}}}class tOe extends ky{shouldComponentUpdate(n){for(let t in n)if(t!="children"&&n[t]!=this.props[t])return!0;return!1}render(){return this.props.children}}const Tg={rowsPerRender:10};class iOe extends co{getInitialState(n=this.props){return{skin:yl.get("skin")||n.skin,theme:this.initTheme(n.theme)}}componentWillMount(){this.dir=Ki.rtl?"rtl":"ltr",this.refs={menu:Wo(),navigation:Wo(),scroll:Wo(),search:Wo(),searchInput:Wo(),skinToneButton:Wo(),skinToneRadio:Wo()},this.initGrid(),this.props.stickySearch==!1&&this.props.searchPosition=="sticky"&&(console.warn("[EmojiMart] Deprecation warning: `stickySearch` has been renamed `searchPosition`."),this.props.searchPosition="static")}componentDidMount(){if(this.register(),this.shadowRoot=this.base.parentNode,this.props.autoFocus){const{searchInput:n}=this.refs;n.current&&n.current.focus()}}componentWillReceiveProps(n){this.nextState||(this.nextState={});for(const t in n)this.nextState[t]=n[t];clearTimeout(this.nextStateTimer),this.nextStateTimer=setTimeout(()=>{let t=!1;for(const r in this.nextState)this.props[r]=this.nextState[r],(r==="custom"||r==="categories")&&(t=!0);delete this.nextState;const i=this.getInitialState();if(t)return this.reset(i);this.setState(i)})}componentWillUnmount(){this.unregister()}async reset(n={}){await bb(this.props),this.initGrid(),this.unobserve(),this.setState(n,()=>{this.observeCategories(),this.observeRows()})}register(){document.addEventListener("click",this.handleClickOutside),this.observe()}unregister(){var n;document.removeEventListener("click",this.handleClickOutside),(n=this.darkMedia)==null||n.removeEventListener("change",this.darkMediaCallback),this.unobserve()}observe(){this.observeCategories(),this.observeRows()}unobserve({except:n=[]}={}){Array.isArray(n)||(n=[n]);for(const t of this.observers)n.includes(t)||t.disconnect();this.observers=[].concat(n)}initGrid(){const{categories:n}=it;this.refs.categories=new Map;const t=it.categories.map(r=>r.id).join(",");this.navKey&&this.navKey!=t&&this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0),this.navKey=t,this.grid=[],this.grid.setsize=0;const i=(r,a)=>{const o=[];o.__categoryId=a.id,o.__index=r.length,this.grid.push(o);const l=this.grid.length-1,u=l%Tg.rowsPerRender?{}:Wo();return u.index=l,u.posinset=this.grid.setsize+1,r.push(u),o};for(let r of n){const a=[];let o=i(a,r);for(let l of r.emojis)o.length==this.getPerLine()&&(o=i(a,r)),this.grid.setsize+=1,o.push(l);this.refs.categories.set(r.id,{root:Wo(),rows:a})}}initTheme(n){if(n!="auto")return n;if(!this.darkMedia){if(this.darkMedia=matchMedia("(prefers-color-scheme: dark)"),this.darkMedia.media.match(/^not/))return"light";this.darkMedia.addEventListener("change",this.darkMediaCallback)}return this.darkMedia.matches?"dark":"light"}initDynamicPerLine(n=this.props){if(!n.dynamicWidth)return;const{element:t,emojiButtonSize:i}=n,r=()=>{const{width:o}=t.getBoundingClientRect();return Math.floor(o/i)},a=new ResizeObserver(()=>{this.unobserve({except:a}),this.setState({perLine:r()},()=>{this.initGrid(),this.forceUpdate(()=>{this.observeCategories(),this.observeRows()})})});return a.observe(t),this.observers.push(a),r()}getPerLine(){return this.state.perLine||this.props.perLine}getEmojiByPos([n,t]){const i=this.state.searchResults||this.grid,r=i[n]&&i[n][t];if(r)return af.get(r)}observeCategories(){const n=this.refs.navigation.current;if(!n)return;const t=new Map,i=o=>{o!=n.state.categoryId&&n.setState({categoryId:o})},r={root:this.refs.scroll.current,threshold:[0,1]},a=new IntersectionObserver(o=>{for(const u of o){const f=u.target.dataset.id;t.set(f,u.intersectionRatio)}const l=[...t];for(const[u,f]of l)if(f){i(u);break}},r);for(const{root:o}of this.refs.categories.values())a.observe(o.current);this.observers.push(a)}observeRows(){const n={...this.state.visibleRows},t=new IntersectionObserver(i=>{for(const r of i){const a=parseInt(r.target.dataset.index);r.isIntersecting?n[a]=!0:delete n[a]}this.setState({visibleRows:n})},{root:this.refs.scroll.current,rootMargin:`${this.props.emojiButtonSize*(Tg.rowsPerRender+5)}px 0px ${this.props.emojiButtonSize*Tg.rowsPerRender}px`});for(const{rows:i}of this.refs.categories.values())for(const r of i)r.current&&t.observe(r.current);this.observers.push(t)}preventDefault(n){n.preventDefault()}unfocusSearch(){const n=this.refs.searchInput.current;n&&n.blur()}navigate({e:n,input:t,left:i,right:r,up:a,down:o}){const l=this.state.searchResults||this.grid;if(!l.length)return;let[u,f]=this.state.pos;const h=(()=>{if(u==0&&f==0&&!n.repeat&&(i||a))return null;if(u==-1)return!n.repeat&&(r||o)&&t.selectionStart==t.value.length?[0,0]:null;if(i||r){let d=l[u];const p=i?-1:1;if(f+=p,!d[f]){if(u+=p,d=l[u],!d)return u=i?0:l.length-1,f=i?0:l[u].length-1,[u,f];f=i?d.length-1:0}return[u,f]}if(a||o){u+=a?-1:1;const d=l[u];return d?(d[f]||(f=d.length-1),[u,f]):(u=a?0:l.length-1,f=a?0:l[u].length-1,[u,f])}})();if(h)n.preventDefault();else{this.state.pos[0]>-1&&this.setState({pos:[-1,-1]});return}this.setState({pos:h,keyboard:!0},()=>{this.scrollTo({row:h[0]})})}scrollTo({categoryId:n,row:t}){const i=this.state.searchResults||this.grid;if(!i.length)return;const r=this.refs.scroll.current,a=r.getBoundingClientRect();let o=0;if(t>=0&&(n=i[t].__categoryId),n&&(o=(this.refs[n]||this.refs.categories.get(n).root).current.getBoundingClientRect().top-(a.top-r.scrollTop)+1),t>=0)if(!t)o=0;else{const l=i[t].__index,u=o+l*this.props.emojiButtonSize,f=u+this.props.emojiButtonSize+this.props.emojiButtonSize*.88;if(ur.scrollTop+a.height)o=f-a.height;else return}this.ignoreMouse(),r.scrollTop=o}ignoreMouse(){this.mouseIsIgnored=!0,clearTimeout(this.ignoreMouseTimer),this.ignoreMouseTimer=setTimeout(()=>{delete this.mouseIsIgnored},100)}handleEmojiOver(n){this.mouseIsIgnored||this.state.showSkins||this.setState({pos:n||[-1,-1],keyboard:!1})}handleEmojiClick({e:n,emoji:t,pos:i}){if(this.props.onEmojiSelect&&(!t&&i&&(t=this.getEmojiByPos(i)),t)){const r=IAe(t,{skinIndex:this.state.skin-1});this.props.maxFrequentRows&&IG.add(r,this.props),this.props.onEmojiSelect(r,n)}}closeSkins(){this.state.showSkins&&(this.setState({showSkins:null,tempSkin:null}),this.base.removeEventListener("click",this.handleBaseClick),this.base.removeEventListener("keydown",this.handleBaseKeydown))}handleSkinMouseOver(n){this.setState({tempSkin:n})}handleSkinClick(n){this.ignoreMouse(),this.closeSkins(),this.setState({skin:n,tempSkin:null}),yl.set("skin",n)}renderNav(){return Le(nOe,{ref:this.refs.navigation,icons:this.props.icons,theme:this.state.theme,dir:this.dir,unfocused:!!this.state.searchResults,position:this.props.navPosition,onClick:this.handleCategoryClick},this.navKey)}renderPreview(){const n=this.getEmojiByPos(this.state.pos),t=this.state.searchResults&&!this.state.searchResults.length;return Le("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[Le("div",{class:"flex flex-middle flex-grow",children:[Le("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:Le(V6,{emoji:n,id:t?this.props.noResultsEmoji||"cry":this.props.previewEmoji||(this.props.previewPosition=="top"?"point_down":"point_up"),set:this.props.set,size:this.props.emojiButtonSize,skin:this.state.tempSkin||this.state.skin,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})}),Le("div",{class:`margin-${this.dir[0]}`,children:n||t?Le("div",{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[Le("div",{class:"preview-title ellipsis",children:n?n.name:Ki.search_no_results_1}),Le("div",{class:"preview-subtitle ellipsis color-c",children:n?n.skins[0].shortcodes:Ki.search_no_results_2})]}):Le("div",{class:"preview-placeholder color-c",children:Ki.pick})})]}),!n&&this.props.skinTonePosition=="preview"&&this.renderSkinToneButton()]})}renderEmojiButton(n,{pos:t,posinset:i,grid:r}){const a=this.props.emojiButtonSize,o=this.state.tempSkin||this.state.skin,u=(n.skins[o-1]||n.skins[0]).native,f=zAe(this.state.pos,t),h=t.concat(n.id).join("");return Le(tOe,{selected:f,skin:o,size:a,children:Le("button",{"aria-label":u,"aria-selected":f||void 0,"aria-posinset":i,"aria-setsize":r.setsize,"data-keyboard":this.state.keyboard,title:this.props.previewPosition=="none"?n.name:void 0,type:"button",class:"flex flex-center flex-middle",tabindex:"-1",onClick:d=>this.handleEmojiClick({e:d,emoji:n}),onMouseEnter:()=>this.handleEmojiOver(t),onMouseLeave:()=>this.handleEmojiOver(),style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize,fontSize:this.props.emojiSize,lineHeight:0},children:[Le("div",{"aria-hidden":"true",class:"background",style:{borderRadius:this.props.emojiButtonRadius,backgroundColor:this.props.emojiButtonColors?this.props.emojiButtonColors[(i-1)%this.props.emojiButtonColors.length]:void 0}}),Le(V6,{emoji:n,set:this.props.set,size:this.props.emojiSize,skin:o,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})]})},h)}renderSearch(){const n=this.props.previewPosition=="none"||this.props.skinTonePosition=="search";return Le("div",{children:[Le("div",{class:"spacer"}),Le("div",{class:"flex flex-middle",children:[Le("div",{class:"search relative flex-grow",children:[Le("input",{type:"search",ref:this.refs.searchInput,placeholder:Ki.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown,autoComplete:"off"}),Le("span",{class:"icon loupe flex",children:wy.search.loupe}),this.state.searchResults&&Le("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:wy.search.delete})]}),n&&this.renderSkinToneButton()]})]})}renderSearchResults(){const{searchResults:n}=this.state;return n?Le("div",{class:"category",ref:this.refs.search,children:[Le("div",{class:`sticky padding-small align-${this.dir[0]}`,children:Ki.categories.search}),Le("div",{children:n.length?n.map((t,i)=>Le("div",{class:"flex",children:t.map((r,a)=>this.renderEmojiButton(r,{pos:[i,a],posinset:i*this.props.perLine+a+1,grid:n}))})):Le("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&Le("a",{onClick:this.props.onAddCustomEmoji,children:Ki.add_custom})})})]}):null}renderCategories(){const{categories:n}=it,t=!!this.state.searchResults,i=this.getPerLine();return Le("div",{style:{visibility:t?"hidden":void 0,display:t?"none":void 0,height:"100%"},children:n.map(r=>{const{root:a,rows:o}=this.refs.categories.get(r.id);return Le("div",{"data-id":r.target?r.target.id:r.id,class:"category",ref:a,children:[Le("div",{class:`sticky padding-small align-${this.dir[0]}`,children:r.name||Ki.categories[r.id]}),Le("div",{class:"relative",style:{height:o.length*this.props.emojiButtonSize},children:o.map((l,u)=>{const f=l.index-l.index%Tg.rowsPerRender,h=this.state.visibleRows[f],d="current"in l?l:void 0;if(!h&&!d)return null;const p=u*i,g=p+i,b=r.emojis.slice(p,g);return b.length{if(!w)return Le("div",{style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize}});const _=af.get(w);return this.renderEmojiButton(_,{pos:[l.index,k],posinset:l.posinset+k,grid:this.grid})})},l.index)})})]})})})}renderSkinToneButton(){return this.props.skinTonePosition=="none"?null:Le("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:Le("button",{type:"button",ref:this.refs.skinToneButton,class:"skin-tone-button flex flex-auto flex-center flex-middle","aria-selected":this.state.showSkins?"":void 0,"aria-label":Ki.skins.choose,title:Ki.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:Le("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderLiveRegion(){const n=this.getEmojiByPos(this.state.pos),t=n?n.name:"";return Le("div",{"aria-live":"polite",class:"sr-only",children:t})}renderSkins(){const t=this.refs.skinToneButton.current.getBoundingClientRect(),i=this.base.getBoundingClientRect(),r={};return this.dir=="ltr"?r.right=i.right-t.right-3:r.left=t.left-i.left-3,this.props.previewPosition=="bottom"&&this.props.skinTonePosition=="preview"?r.bottom=i.bottom-t.top+6:(r.top=t.bottom-i.top+3,r.bottom="auto"),Le("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":Ki.skins.choose,class:"menu hidden","data-position":r.top?"top":"bottom",style:r,children:[...Array(6).keys()].map(a=>{const o=a+1,l=this.state.skin==o;return Le("div",{children:[Le("input",{type:"radio",name:"skin-tone",value:o,"aria-label":Ki.skins[o],ref:l?this.refs.skinToneRadio:null,defaultChecked:l,onChange:()=>this.handleSkinMouseOver(o),onKeyDown:u=>{(u.code=="Enter"||u.code=="Space"||u.code=="Tab")&&(u.preventDefault(),this.handleSkinClick(o))}}),Le("button",{"aria-hidden":"true",tabindex:"-1",onClick:()=>this.handleSkinClick(o),onMouseEnter:()=>this.handleSkinMouseOver(o),onMouseLeave:()=>this.handleSkinMouseOver(),class:"option flex flex-grow flex-middle",children:[Le("span",{class:`skin-tone skin-tone-${o}`}),Le("span",{class:"margin-small-lr",children:Ki.skins[o]})]})]})})})}render(){const n=this.props.perLine*this.props.emojiButtonSize;return Le("section",{id:"root",class:"flex flex-column",dir:this.dir,style:{width:this.props.dynamicWidth?"100%":`calc(${n}px + (var(--padding) + var(--sidebar-width)))`},"data-emoji-set":this.props.set,"data-theme":this.state.theme,"data-menu":this.state.showSkins?"":void 0,children:[this.props.previewPosition=="top"&&this.renderPreview(),this.props.navPosition=="top"&&this.renderNav(),this.props.searchPosition=="sticky"&&Le("div",{class:"padding-lr",children:this.renderSearch()}),Le("div",{ref:this.refs.scroll,class:"scroll flex-grow padding-lr",children:Le("div",{style:{width:this.props.dynamicWidth?"100%":n,height:"100%"},children:[this.props.searchPosition=="static"&&this.renderSearch(),this.renderSearchResults(),this.renderCategories()]})}),this.props.navPosition=="bottom"&&this.renderNav(),this.props.previewPosition=="bottom"&&this.renderPreview(),this.state.showSkins&&this.renderSkins(),this.renderLiveRegion()]})}constructor(n){super(),ha(this,"darkMediaCallback",()=>{this.props.theme=="auto"&&this.setState({theme:this.darkMedia.matches?"dark":"light"})}),ha(this,"handleClickOutside",t=>{const{element:i}=this.props;t.target!=i&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside(t))}),ha(this,"handleBaseClick",t=>{this.state.showSkins&&(t.target.closest(".menu")||(t.preventDefault(),t.stopImmediatePropagation(),this.closeSkins()))}),ha(this,"handleBaseKeydown",t=>{this.state.showSkins&&t.key=="Escape"&&(t.preventDefault(),t.stopImmediatePropagation(),this.closeSkins())}),ha(this,"handleSearchClick",()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})}),ha(this,"handleSearchInput",async()=>{const t=this.refs.searchInput.current;if(!t)return;const{value:i}=t,r=await af.search(i),a=()=>{this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0)};if(!r)return this.setState({searchResults:r,pos:[-1,-1]},a);const o=t.selectionStart==t.value.length?[0,0]:[-1,-1],l=[];l.setsize=r.length;let u=null;for(let f of r)(!l.length||u.length==this.getPerLine())&&(u=[],u.__categoryId="search",u.__index=l.length,l.push(u)),u.push(f);this.ignoreMouse(),this.setState({searchResults:l,pos:o},a)}),ha(this,"handleSearchKeyDown",t=>{const i=t.currentTarget;switch(t.stopImmediatePropagation(),t.key){case"ArrowLeft":this.navigate({e:t,input:i,left:!0});break;case"ArrowRight":this.navigate({e:t,input:i,right:!0});break;case"ArrowUp":this.navigate({e:t,input:i,up:!0});break;case"ArrowDown":this.navigate({e:t,input:i,down:!0});break;case"Enter":t.preventDefault(),this.handleEmojiClick({e:t,pos:this.state.pos});break;case"Escape":t.preventDefault(),this.state.searchResults?this.clearSearch():this.unfocusSearch();break}}),ha(this,"clearSearch",()=>{const t=this.refs.searchInput.current;t&&(t.value="",t.focus(),this.handleSearchInput())}),ha(this,"handleCategoryClick",({category:t,i})=>{this.scrollTo(i==0?{row:-1}:{categoryId:t.id})}),ha(this,"openSkins",t=>{const{currentTarget:i}=t,r=i.getBoundingClientRect();this.setState({showSkins:r},async()=>{await LAe(2);const a=this.refs.menu.current;a&&(a.classList.remove("hidden"),this.refs.skinToneRadio.current.focus(),this.base.addEventListener("click",this.handleBaseClick,!0),this.base.addEventListener("keydown",this.handleBaseKeydown,!0))})}),this.observers=[],this.state={pos:[-1,-1],perLine:this.initDynamicPerLine(n),visibleRows:{0:!0},...this.getInitialState(n)}}}class oA extends HAe{async connectedCallback(){const n=HG(this.props,Yo,this);n.element=this,n.ref=t=>{this.component=t},await bb(n),!this.disconnected&&zG(Le(iOe,{...n}),this.shadowRoot)}constructor(n){super(n,{styles:CG(KG)})}}ha(oA,"Props",Yo);typeof customElements<"u"&&!customElements.get("em-emoji-picker")&&customElements.define("em-emoji-picker",oA);var KG={};KG=`:host { +`;R.document.write(W),R.document.close()};if(r)return v.jsx(kl,{color:"red",icon:v.jsx(i4,{size:14}),children:r});if(!t)return v.jsx(Ee,{justify:"center",p:"xl",children:v.jsx(Zt,{size:"sm"})});const G=t.kpis,B=G.deadlines_met+G.deadlines_missed>0?Math.round(G.deadlines_met/(G.deadlines_met+G.deadlines_missed)*100):null;return v.jsxs(kn,{gap:"md",children:[v.jsxs(Ee,{justify:"space-between",wrap:"wrap",children:[v.jsxs(Ee,{gap:6,children:[v.jsx(ale,{size:20}),v.jsx(El,{order:4,children:"Reporte diario"})]}),v.jsx(de,{size:"sm",c:"dimmed",tt:"capitalize",children:Qje(t.date)})]}),v.jsxs(Ko,{cols:{base:2,sm:4,md:6},spacing:"xs",children:[v.jsx(qc,{label:"Hechas",value:G.done,color:"teal",icon:v.jsx(cs,{size:14,color:"var(--mantine-color-teal-6)"})}),v.jsx(qc,{label:"Creadas",value:G.created,icon:v.jsx(cf,{size:14})}),v.jsx(qc,{label:"Movimientos",value:G.moves,icon:v.jsx(ff,{size:14})}),v.jsx(qc,{label:"Bloqueado",value:ei(G.blocked_ms),color:"yellow",icon:v.jsx(ul,{size:14,color:"var(--mantine-color-yellow-6)"})}),v.jsx(qc,{label:"Reabiertas",value:G.reopened,color:G.reopened>0?"orange":void 0,icon:v.jsx(u1,{size:14})}),v.jsx(qc,{label:"Deadlines",value:B!=null?`${B}%`:"—",color:B==null?"dimmed":B>=80?"teal":"red",sub:`${G.deadlines_met} on-time / ${G.deadlines_missed} vencidos`,icon:v.jsx(f1,{size:14})})]}),v.jsxs(Ko,{cols:{base:1,sm:2,md:4},spacing:"xs",children:[v.jsx(jg,{title:"Asignado: mas hechas",rows:t.top_assignees_done,emptyText:"Sin hechas con asignado.",withAvatar:!0}),v.jsx(jg,{title:"Asignado: mas creadas",rows:t.top_assignees_created,emptyText:"Sin actor en creadas.",withAvatar:!0}),v.jsx(jg,{title:"Solicitante: mas atendidas",rows:t.top_requesters_done,emptyText:"Sin solicitantes con hechas."}),v.jsx(jg,{title:"Solicitante: mas aportadas",rows:t.top_requesters_added,emptyText:"Sin nuevas con solicitante."})]}),v.jsx(Tt,{withBorder:!0,radius:"md",p:"sm",bg:"var(--mantine-color-blue-light)",style:{borderLeftWidth:4,borderLeftColor:"var(--mantine-color-blue-6)"},children:v.jsxs(Ee,{justify:"space-between",align:"flex-start",wrap:"nowrap",children:[v.jsxs(Ee,{gap:6,align:"flex-start",wrap:"nowrap",style:{flex:1,minWidth:0},children:[v.jsx(gue,{size:18,color:"var(--mantine-color-blue-6)",style:{flexShrink:0,marginTop:2}}),v.jsxs(fe,{style:{flex:1},children:[h&&v.jsx(kl,{color:"red",mb:4,icon:v.jsx(i4,{size:14}),children:h}),u?v.jsxs(Ee,{gap:6,children:[v.jsx(Zt,{size:"xs"}),v.jsx(de,{size:"sm",c:"dimmed",children:"Generando resumen…"})]}):o!=null&&o.summary?v.jsxs(v.Fragment,{children:[v.jsx(de,{size:"sm",style:{whiteSpace:"pre-wrap"},children:o.summary}),o.generated_at&&v.jsxs(de,{size:"xs",c:"dimmed",mt:4,children:["Generado ",new Date(o.generated_at).toLocaleString()," · ",o.model]})]}):v.jsx(de,{size:"sm",c:"dimmed",fs:"italic",children:'Aun no hay resumen del dia. Pulsa "Generar".'})]})]}),v.jsxs(Ee,{gap:4,wrap:"nowrap",children:[v.jsx(wt,{label:o!=null&&o.exists?"Regenerar":"Generar",withArrow:!0,children:v.jsx(Jn,{variant:"subtle",color:"blue",onClick:T,loading:u,"aria-label":"Regenerar resumen",children:v.jsx(ff,{size:16})})}),v.jsx(wt,{label:"Configurar prompt",withArrow:!0,children:v.jsx(Jn,{variant:"subtle",color:"gray",onClick:A,"aria-label":"Configurar prompt",children:v.jsx(pue,{size:16})})})]})]})}),v.jsxs(za,{withBorder:!0,radius:"md",p:"sm",children:[v.jsxs(Ee,{justify:"space-between",mb:"xs",wrap:"wrap",gap:6,children:[v.jsxs(Ee,{gap:6,wrap:"wrap",children:[v.jsx(de,{fw:600,size:"sm",children:"Tareas hechas"}),v.jsxs(Gn,{size:"xs",variant:"light",children:["N ",L.length,L.length!==t.done_cards.length?` / ${t.done_cards.length}`:""]}),v.jsxs(de,{size:"xs",c:"dimmed",children:["Lead time avg ",t.lead_time.samples>0?ei(t.lead_time.avg_ms):"—"," · p50"," ",t.lead_time.samples>0?ei(t.lead_time.p50_ms):"—"," · p95"," ",t.lead_time.samples>0?ei(t.lead_time.p95_ms):"—"]})]}),v.jsxs(Ee,{gap:6,wrap:"nowrap",children:[v.jsx(jr,{size:"xs",placeholder:"Solicitante",data:q,value:k,onChange:_,clearable:!0,searchable:!0,style:{width:160},"aria-label":"Filtrar por solicitante"}),v.jsx(jr,{size:"xs",placeholder:"Asignado",data:P,value:S,onChange:j,clearable:!0,searchable:!0,style:{width:160},"aria-label":"Filtrar por asignado"}),v.jsx(Yn,{size:"xs",leftSection:v.jsx(Gq,{size:14}),variant:"light",onClick:U,"data-test":"daily-report-pdf",children:"PDF"})]})]}),L.length===0?v.jsx(de,{size:"xs",c:"dimmed",children:"Sin hechas en este dia."}):v.jsx(ur,{style:{maxHeight:280},type:"auto",children:v.jsxs(Xe,{verticalSpacing:4,fz:"xs",highlightOnHover:!0,striped:"even",children:[v.jsx(Xe.Thead,{children:v.jsxs(Xe.Tr,{children:[v.jsx(Xe.Th,{style:{width:70},children:"#"}),v.jsx(Xe.Th,{children:"Titulo"}),v.jsx(Xe.Th,{children:"Solicitante"}),v.jsx(Xe.Th,{children:"Asignado"}),v.jsx(Xe.Th,{children:"Tags"}),v.jsx(Xe.Th,{style:{width:110},children:"Lead time"})]})}),v.jsx(Xe.Tbody,{children:L.map(R=>v.jsxs(Xe.Tr,{children:[v.jsx(Xe.Td,{children:v.jsx(de,{size:"xs",c:"dimmed",children:String(R.seq_num).padStart(5,"0")})}),v.jsx(Xe.Td,{children:v.jsx(Et,{onClick:()=>n==null?void 0:n(R.id),style:{textAlign:"left"},children:v.jsx(de,{size:"xs",fw:500,td:"underline",children:R.title})})}),v.jsx(Xe.Td,{children:v.jsx(de,{size:"xs",children:R.requester||"—"})}),v.jsx(Xe.Td,{children:v.jsx(de,{size:"xs",children:R.assignee_name||"—"})}),v.jsx(Xe.Td,{children:v.jsx(Ee,{gap:2,wrap:"wrap",children:(R.tags||[]).slice(0,3).map(D=>v.jsx(Gn,{size:"xs",variant:"light",color:Ru(D),radius:"sm",children:D},D))})}),v.jsx(Xe.Td,{children:v.jsx(de,{size:"xs",c:"dimmed",children:ei(R.lead_time_ms)})})]},R.id))})]})})]}),v.jsxs(Ko,{cols:{base:1,sm:2},spacing:"xs",children:[v.jsxs(za,{withBorder:!0,radius:"md",p:"sm",children:[v.jsxs(Ee,{justify:"space-between",mb:6,children:[v.jsx(de,{fw:600,size:"sm",children:"Movimientos por hora"}),v.jsx(Gn,{size:"xs",variant:"light",children:G.moves})]}),G.moves===0?v.jsx(de,{size:"xs",c:"dimmed",children:"Sin movimientos."}):v.jsx(dl,{h:160,data:$,dataKey:"hora",series:[{name:"movimientos",color:"blue.6"}],tickLine:"y",withTooltip:!0,valueFormatter:R=>String(R)})]}),v.jsxs(za,{withBorder:!0,radius:"md",p:"sm",children:[v.jsx(de,{fw:600,size:"sm",mb:6,children:"Tags trabajadas"}),t.tags_done.length===0?v.jsx(de,{size:"xs",c:"dimmed",children:"Sin tags."}):v.jsx(Ee,{gap:4,wrap:"wrap",children:t.tags_done.map(R=>v.jsxs(Gn,{variant:"light",color:Ru(R.name),size:"sm",children:[R.name," · ",R.count]},R.name))})]})]}),t.reopened_cards.length>0&&v.jsxs(za,{withBorder:!0,radius:"md",p:"sm",children:[v.jsxs(Ee,{gap:6,mb:6,children:[v.jsx(u1,{size:14,color:"var(--mantine-color-orange-6)"}),v.jsx(de,{fw:600,size:"sm",children:"Reabiertas (Done → otra)"}),v.jsx(Gn,{size:"xs",variant:"light",color:"orange",children:t.reopened_cards.length})]}),v.jsx(kn,{gap:4,children:t.reopened_cards.map(R=>v.jsxs(Ee,{gap:6,wrap:"nowrap",justify:"space-between",children:[v.jsx(Et,{onClick:()=>n==null?void 0:n(R.card_id),style:{minWidth:0,flex:1},children:v.jsx(de,{size:"xs",truncate:!0,td:"underline",children:R.title})}),v.jsxs(de,{size:"xs",c:"dimmed",children:[R.from_column," → ",R.to_column]}),R.actor_name&&v.jsx(Gn,{size:"xs",variant:"light",color:"cyan",children:R.actor_name})]},R.card_id+R.ts))})]}),(t.deadlines.missed>0||t.deadlines.met>0)&&v.jsxs(za,{withBorder:!0,radius:"md",p:"sm",children:[v.jsxs(Ee,{gap:6,mb:6,children:[v.jsx(f1,{size:14}),v.jsx(de,{fw:600,size:"sm",children:"Deadlines"}),v.jsxs(Gn,{size:"xs",variant:"light",color:"teal",children:[t.deadlines.met," on-time"]}),v.jsxs(Gn,{size:"xs",variant:"light",color:"red",children:[t.deadlines.missed," vencidos"]})]}),t.deadlines.list.length>0&&v.jsx(kn,{gap:4,children:t.deadlines.list.map(R=>v.jsxs(Ee,{gap:6,justify:"space-between",wrap:"nowrap",children:[v.jsx(Et,{onClick:()=>n==null?void 0:n(R.card_id),style:{minWidth:0,flex:1},children:v.jsx(de,{size:"xs",truncate:!0,td:"underline",children:R.title})}),v.jsxs(de,{size:"xs",c:"red",children:["+",ei(R.late_ms)," tarde"]})]},R.card_id))})]}),v.jsxs(za,{withBorder:!0,radius:"md",p:"sm",children:[v.jsxs(Ee,{gap:6,mb:6,children:[v.jsx(l4,{size:14}),v.jsx(de,{fw:600,size:"sm",children:"Cards estancadas (al final del dia)"}),v.jsxs(Gn,{size:"xs",variant:"light",color:"orange",children:[t.stale_cards.d7.length,"d7"]}),v.jsxs(Gn,{size:"xs",variant:"light",color:"red",children:[t.stale_cards.d14.length,"d14"]}),v.jsxs(Gn,{size:"xs",variant:"filled",color:"red",children:[t.stale_cards.d30.length,"d30"]})]}),v.jsxs(Ko,{cols:{base:1,sm:3},spacing:"xs",children:[v.jsxs(fe,{children:[v.jsx(de,{size:"xs",fw:500,c:"orange",mb:4,children:"7-13 dias"}),v.jsxs(kn,{gap:2,children:[t.stale_cards.d7.slice(0,8).map(R=>v.jsx(Et,{onClick:()=>n==null?void 0:n(R.card_id),children:v.jsxs(de,{size:"xs",truncate:!0,children:[R.title," ",v.jsxs(de,{span:!0,c:"dimmed",size:"xs",children:["· ",R.column_name," · ",R.days,"d"]})]})},R.card_id)),t.stale_cards.d7.length===0&&v.jsx(de,{size:"xs",c:"dimmed",children:"Ninguna."})]})]}),v.jsxs(fe,{children:[v.jsx(de,{size:"xs",fw:500,c:"red",mb:4,children:"14-29 dias"}),v.jsxs(kn,{gap:2,children:[t.stale_cards.d14.slice(0,8).map(R=>v.jsx(Et,{onClick:()=>n==null?void 0:n(R.card_id),children:v.jsxs(de,{size:"xs",truncate:!0,children:[R.title," ",v.jsxs(de,{span:!0,c:"dimmed",size:"xs",children:["· ",R.column_name," · ",R.days,"d"]})]})},R.card_id)),t.stale_cards.d14.length===0&&v.jsx(de,{size:"xs",c:"dimmed",children:"Ninguna."})]})]}),v.jsxs(fe,{children:[v.jsx(de,{size:"xs",fw:500,c:"red.8",mb:4,children:"30+ dias"}),v.jsxs(kn,{gap:2,children:[t.stale_cards.d30.slice(0,8).map(R=>v.jsx(Et,{onClick:()=>n==null?void 0:n(R.card_id),children:v.jsxs(de,{size:"xs",truncate:!0,fw:600,children:[R.title," ",v.jsxs(de,{span:!0,c:"dimmed",size:"xs",fw:400,children:["· ",R.column_name," · ",R.days,"d"]})]})},R.card_id)),t.stale_cards.d30.length===0&&v.jsx(de,{size:"xs",c:"dimmed",children:"Ninguna."})]})]})]})]}),v.jsx(us,{}),v.jsx(Ee,{gap:6,justify:"space-between",children:v.jsxs(Ee,{gap:4,children:[v.jsx(c1,{size:14}),v.jsxs(de,{size:"xs",c:"dimmed",children:["TZ: ",t.tz," · cards archivadas hoy: ",t.archived_today]})]})}),v.jsx(Gi,{opened:p,onClose:()=>g(!1),title:"Prompt del agente diario",size:"lg",zIndex:500,children:v.jsxs(kn,{gap:"sm",children:[v.jsx(de,{size:"xs",c:"dimmed",children:"Plantilla que el agente recibe junto al JSON del reporte. Compartida por todos los usuarios."}),v.jsx(_l,{autosize:!0,minRows:6,maxRows:20,value:b,onChange:R=>w(R.currentTarget.value),"data-test":"daily-report-prompt"}),v.jsxs(Ee,{justify:"space-between",children:[v.jsx(Yn,{size:"xs",variant:"subtle",onClick:M,children:"Restablecer por defecto"}),v.jsxs(Ee,{gap:6,children:[v.jsx(Yn,{size:"xs",variant:"subtle",color:"gray",onClick:()=>g(!1),children:"Cancelar"}),v.jsx(Yn,{size:"xs",onClick:O,"data-test":"daily-report-prompt-save",children:"Guardar"})]})]})]})})]})}function lz(e){if(e)return Be(e).format("YYYY-MM-DD")}function Nh({icon:e,label:n,value:t,hint:i,color:r}){return v.jsx(Tt,{withBorder:!0,p:"md",radius:"md",children:v.jsxs(kn,{gap:4,children:[v.jsxs(Ee,{gap:6,c:"dimmed",children:[e,v.jsx(de,{size:"xs",tt:"uppercase",fw:600,children:n})]}),v.jsx(de,{size:"xl",fw:700,c:r,children:t}),i&&v.jsx(de,{size:"xs",c:"dimmed",children:i})]})})}function eAe({users:e}){const[n,t]=x.useState(()=>Be().subtract(30,"day").toDate()),[i,r]=x.useState(()=>new Date),[a,o]=x.useState(null),[l,u]=x.useState(null),[f,h]=x.useState([]),[d,p]=x.useState([]),[g,b]=x.useState(null),[w,k]=x.useState(!1),[_,S]=x.useState([]);x.useEffect(()=>{IF().then(p).catch(()=>{})},[]),x.useEffect(()=>{let P=!1;return k(!0),BF({from:lz(n),to:lz(i),assignee_id:a||void 0,requester:l||void 0,tags:f.length>0?f:void 0}).then(L=>{P||(b(L),S(U=>{const G=new Set(U);for(const B of L.top_requesters??[])G.add(B.requester);return Array.from(G).sort()}))}).catch(()=>{}).finally(()=>{P||k(!1)}),()=>{P=!0}},[n,i,a,l,f]);const j=x.useMemo(()=>e.map(P=>({value:P.id,label:P.display_name||P.username})),[e]),T=x.useMemo(()=>{if(!g)return[];const P=g.cumulative_flow??[],L=P.findIndex(G=>G.total>0||G.done>0);return(L<=0?P:P.slice(Math.max(0,L-1))).map(G=>({date:G.date,done:G.done,wip:Math.max(0,G.total-G.done),total:G.total}))},[g]),A=x.useMemo(()=>{if(!g)return[];const P=new Map;for(const L of g.throughput_daily??[])P.set(L.date,{date:L.date,completed:L.count,created:0});for(const L of g.created_daily??[]){const U=P.get(L.date)??{date:L.date,completed:0,created:0};U.created=L.count,P.set(L.date,U)}return Array.from(P.values()).sort((L,U)=>L.date.localeCompare(U.date))},[g]),O=x.useMemo(()=>g?(g.by_column??[]).map(P=>({column:P.name+(P.is_done?" ✓":""),tarjetas:P.count})):[],[g]),M=x.useMemo(()=>g?(g.top_assignees??[]).slice().sort((P,L)=>L.completed_in_range+L.active-(P.completed_in_range+P.active)).slice(0,8).map(P=>({usuario:P.display_name||P.username,completadas:P.completed_in_range,activas:P.active})):[],[g]),$=x.useMemo(()=>g?(g.top_requesters??[]).map(P=>({solicitante:P.requester,activas:P.active,completadas:P.completed_in_range})):[],[g]),q=x.useMemo(()=>g?(g.movements_by_user??[]).filter(P=>P.moves>0).slice(0,8).map(P=>({usuario:P.display_name||P.username,movimientos:P.moves})):[],[g]);return v.jsx(fe,{p:"md",children:v.jsxs(kn,{gap:"md",children:[v.jsxs(Ee,{justify:"space-between",children:[v.jsx(El,{order:3,children:"Dashboard"}),v.jsxs(Ee,{gap:"xs",wrap:"nowrap",children:[v.jsx(Du,{label:"Desde",value:n,onChange:P=>t(P),size:"xs",clearable:!1,valueFormat:"YYYY-MM-DD",style:{minWidth:140}}),v.jsx(Du,{label:"Hasta",value:i,onChange:P=>r(P),size:"xs",clearable:!1,valueFormat:"YYYY-MM-DD",style:{minWidth:140}}),v.jsx(jr,{label:"Asignado",size:"xs",placeholder:"Todos",value:a,onChange:o,data:j,clearable:!0,searchable:!0,style:{minWidth:160}}),v.jsx(jr,{label:"Solicitante",size:"xs",placeholder:"Todos",value:l,onChange:u,data:_.map(P=>({value:P,label:P})),clearable:!0,searchable:!0,style:{minWidth:160}}),v.jsx(u0,{label:"Tags",size:"xs",placeholder:"Todas",value:f,onChange:h,data:d,clearable:!0,searchable:!0,style:{minWidth:200}})]})]}),w&&!g&&v.jsx(Gf,{p:"xl",children:v.jsx(Zt,{})}),g&&(()=>{const P=g.totals??{},L=g.lead_time??{n:0,p50_ms:0,p90_ms:0},U=G=>P[G]??0;return v.jsxs(v.Fragment,{children:[v.jsxs(Ko,{cols:{base:2,md:5},spacing:"md",children:[v.jsx(Nh,{icon:v.jsx(RM,{size:14}),label:"Totales",value:U("cards"),hint:`${U("columns")} columnas, ${U("users")} usuarios`}),v.jsx(Nh,{icon:v.jsx(RM,{size:14}),label:"Activas",value:U("cards_active"),hint:"Sin completar",color:"blue"}),v.jsx(Nh,{icon:v.jsx(wm,{size:14}),label:"Completadas (rango)",value:U("cards_completed_in_range"),hint:`${U("cards_done")} completadas total · ${U("cards_created_in_range")} creadas rango`,color:"green"}),v.jsx(Nh,{icon:v.jsx(vle,{size:14}),label:"Lead time p50",value:L.n>0?ei(L.p50_ms):0,hint:`p90 ${L.n>0?ei(L.p90_ms):0} · n=${L.n}`}),v.jsx(Nh,{icon:v.jsx(ul,{size:14}),label:"Bloqueos activos",value:U("active_locks"),hint:`Total bloqueado: ${ei(g.lock_total_ms??0)}`,color:U("active_locks")>0?"yellow":void 0})]}),v.jsxs(Tt,{withBorder:!0,p:"md",radius:"md",children:[v.jsxs(Ee,{gap:6,mb:"sm",children:[v.jsx(l4,{size:16}),v.jsx(de,{fw:600,children:"Cumulative Flow Diagram"}),v.jsx(de,{size:"xs",c:"dimmed",children:"total vs hechas (acumulado)"})]}),T.length===0?v.jsx(de,{c:"dimmed",size:"sm",children:"Sin datos."}):v.jsx("div",{style:{height:260,width:"100%"},children:v.jsx(xj,{width:"100%",height:"100%",children:v.jsxs(Wje,{data:T,margin:{top:10,right:16,left:0,bottom:0},children:[v.jsx(pb,{strokeDasharray:"5 5",stroke:"var(--mantine-color-gray-4)"}),v.jsx(Il,{dataKey:"date",tick:{fontSize:12,fill:"currentColor"}}),v.jsx(bo,{allowDecimals:!1,tick:{fontSize:12,fill:"currentColor"}}),v.jsx(pa,{contentStyle:{background:"var(--mantine-color-body)",border:"1px solid var(--mantine-color-gray-3)",borderRadius:6,fontSize:12}}),v.jsx(rs,{wrapperStyle:{fontSize:12}}),v.jsx(ms,{type:"linear",dataKey:"done",name:"Hechas",stackId:"cfd",stroke:"var(--mantine-color-green-6)",fill:"var(--mantine-color-green-6)",fillOpacity:.55,strokeWidth:2,isAnimationActive:!1,dot:{r:3,fill:"var(--mantine-color-green-6)",strokeWidth:0},activeDot:{r:5}}),v.jsx(ms,{type:"linear",dataKey:"wip",name:"En curso",stackId:"cfd",stroke:"var(--mantine-color-blue-6)",fill:"var(--mantine-color-blue-6)",fillOpacity:.55,strokeWidth:2,isAnimationActive:!1,dot:{r:3,fill:"var(--mantine-color-blue-6)",strokeWidth:0},activeDot:{r:5}})]})})})]}),v.jsxs(Hr,{children:[v.jsx(Hr.Col,{span:{base:12,md:8},children:v.jsxs(Tt,{withBorder:!0,p:"md",radius:"md",children:[v.jsxs(Ee,{gap:6,mb:"sm",children:[v.jsx(l4,{size:16}),v.jsx(de,{fw:600,children:"Throughput diario"})]}),A.length===0?v.jsx(de,{c:"dimmed",size:"sm",children:"Sin datos en el rango."}):v.jsx(gb,{h:240,data:A,dataKey:"date",curveType:"monotone",withLegend:!0,series:[{name:"completed",label:"Completadas",color:"green.6"},{name:"created",label:"Creadas",color:"blue.6"}]})]})}),v.jsx(Hr.Col,{span:{base:12,md:4},children:v.jsxs(Tt,{withBorder:!0,p:"md",radius:"md",children:[v.jsx(de,{fw:600,mb:"sm",children:"Tarjetas por columna"}),O.length===0?v.jsx(de,{c:"dimmed",size:"sm",children:"Sin columnas."}):v.jsx(dl,{h:240,data:O,dataKey:"column",orientation:"vertical",yAxisProps:{width:100},series:[{name:"tarjetas",label:"Tarjetas",color:"blue.6"}]})]})})]}),v.jsxs(Hr,{children:[v.jsx(Hr.Col,{span:{base:12,md:6},children:v.jsxs(Tt,{withBorder:!0,p:"md",radius:"md",children:[v.jsx(de,{fw:600,mb:"sm",children:"Top asignados"}),M.length===0?v.jsx(de,{c:"dimmed",size:"sm",children:"Sin asignaciones."}):v.jsx(dl,{h:240,data:M,dataKey:"usuario",orientation:"vertical",yAxisProps:{width:120},withLegend:!0,series:[{name:"completadas",label:"Completadas",color:"green.6"},{name:"activas",label:"Activas",color:"blue.6"}],type:"stacked"})]})}),v.jsx(Hr.Col,{span:{base:12,md:6},children:v.jsxs(Tt,{withBorder:!0,p:"md",radius:"md",children:[v.jsx(de,{fw:600,mb:"sm",children:"Top solicitantes"}),$.length===0?v.jsx(de,{c:"dimmed",size:"sm",children:"Sin solicitantes en el rango."}):v.jsx(dl,{h:Math.max(240,$.length*32),data:$,dataKey:"solicitante",orientation:"vertical",yAxisProps:{width:160,interval:0},withLegend:!0,series:[{name:"completadas",label:"Completadas",color:"green.6"},{name:"activas",label:"Activas",color:"violet.6"}],type:"stacked"})]})})]}),v.jsxs(Hr,{children:[v.jsx(Hr.Col,{span:{base:12,md:6},children:v.jsxs(Tt,{withBorder:!0,p:"md",radius:"md",children:[v.jsx(de,{fw:600,mb:"sm",children:"Movimientos por usuario (rango)"}),q.length===0?v.jsx(de,{c:"dimmed",size:"sm",children:"Sin movimientos registrados."}):v.jsx(dl,{h:240,data:q,dataKey:"usuario",orientation:"vertical",yAxisProps:{width:120},series:[{name:"movimientos",label:"Movimientos",color:"orange.6"}]})]})}),v.jsx(Hr.Col,{span:{base:12,md:6},children:v.jsxs(Tt,{withBorder:!0,p:"md",radius:"md",children:[v.jsx(de,{fw:600,mb:"sm",children:"Tiempo en columna (cycle time)"}),v.jsxs(Xe,{striped:!0,highlightOnHover:!0,withTableBorder:!0,withColumnBorders:!0,fz:"xs",children:[v.jsx(Xe.Thead,{children:v.jsxs(Xe.Tr,{children:[v.jsx(Xe.Th,{children:"Columna"}),v.jsx(Xe.Th,{children:"n"}),v.jsx(Xe.Th,{children:"p50"}),v.jsx(Xe.Th,{children:"p90"}),v.jsx(Xe.Th,{children:"avg"})]})}),v.jsx(Xe.Tbody,{children:(g.cycle_time_per_column??[]).map(G=>v.jsxs(Xe.Tr,{children:[v.jsx(Xe.Td,{children:v.jsxs(Ee,{gap:6,wrap:"nowrap",children:[v.jsx(de,{size:"xs",fw:500,children:G.name}),G.is_done&&v.jsx(Gn,{size:"xs",color:"green",variant:"light",children:"done"})]})}),v.jsx(Xe.Td,{children:G.stats.n}),v.jsx(Xe.Td,{children:G.stats.n>0?ei(G.stats.p50_ms):"—"}),v.jsx(Xe.Td,{children:G.stats.n>0?ei(G.stats.p90_ms):"—"}),v.jsx(Xe.Td,{children:G.stats.n>0?ei(G.stats.avg_ms):"—"})]},G.column_id))})]})]})})]})]})})()]})})}function nAe(e){try{return JSON.parse(e)}catch{return{}}}function tAe(e){const n=nAe(e.payload);switch(e.kind){case"created":return{id:e.id,ts:e.created_at,kind:"Creada",actorID:e.actor_id,detail:String(n.title||""),icon:v.jsx(cf,{size:12}),color:"green"};case"title_changed":return{id:e.id,ts:e.created_at,kind:"Titulo",actorID:e.actor_id,detail:`"${n.old}" → "${n.new}"`,icon:v.jsx(Fh,{size:12}),color:"blue"};case"requester_changed":return{id:e.id,ts:e.created_at,kind:"Solicitante",actorID:e.actor_id,detail:`"${n.old||"(vacio)"}" → "${n.new||"(vacio)"}"`,icon:v.jsx(Fh,{size:12}),color:"orange"};case"description_changed":return{id:e.id,ts:e.created_at,kind:"Descripcion",actorID:e.actor_id,detail:"edicion",icon:v.jsx(Fh,{size:12}),color:"blue"};case"color_changed":return{id:e.id,ts:e.created_at,kind:"Color",actorID:e.actor_id,detail:String(n.color||""),icon:v.jsx(D9,{size:12}),color:"violet"};case"tags_changed":return{id:e.id,ts:e.created_at,kind:"Tags",actorID:e.actor_id,detail:Array.isArray(n.tags)?n.tags.join(", ")||"(sin tags)":"",icon:v.jsx(bue,{size:12}),color:"grape"};case"assigned":return{id:e.id,ts:e.created_at,kind:"Asignada",actorID:e.actor_id,detail:String(n.assignee_id||""),icon:v.jsx(Nue,{size:12}),color:"teal"};case"unassigned":return{id:e.id,ts:e.created_at,kind:"Sin asignar",actorID:e.actor_id,detail:"",icon:v.jsx(Rue,{size:12}),color:"gray"};case"deadline_set":{const t=String(n.deadline||"");return{id:e.id,ts:e.created_at,kind:"Deadline",actorID:e.actor_id,detail:t?t.slice(0,10):"",icon:v.jsx(Vq,{size:12}),color:"orange"}}case"deadline_cleared":return{id:e.id,ts:e.created_at,kind:"Deadline quitado",actorID:e.actor_id,detail:n.prev?String(n.prev).slice(0,10):"",icon:v.jsx(ile,{size:12}),color:"gray"};default:return{id:e.id,ts:e.created_at,kind:e.kind,actorID:e.actor_id,detail:e.payload,icon:v.jsx(Fh,{size:12}),color:"gray"}}}function iAe({card:e,columns:n=[]}){const[t,i]=x.useState(null),[r,a]=x.useState([]),o=x.useMemo(()=>{const _=new Map;for(const S of n)_.set(S.id,S);return _},[n]),l=_=>{var S;return((S=o.get(_))==null?void 0:S.is_done)===!0};x.useEffect(()=>{Mre(e.id).then(i).catch(()=>i({column_history:[],lock_periods:[],events:[],total_locked_ms:0,currently_locked:!1})),LF().then(a).catch(()=>{})},[e.id]);const u=x.useMemo(()=>{const _=new Map;for(const S of r)_.set(S.id,S);return _},[r]),f=x.useMemo(()=>{if(!t)return[];const _=[];for(const S of t.events||[])_.push(tAe(S));for(const S of t.column_history||[]){const j=l(S.column_id);_.push({id:"h_in_"+S.id,ts:S.entered_at,kind:j?"Hecho en columna":"Mueve a columna",actorID:S.actor_id,detail:S.column_name||S.column_id,icon:j?v.jsx(cs,{size:12}):v.jsx(Kse,{size:12}),color:j?"green":"blue",doneColumn:j})}for(const S of t.lock_periods||[])_.push({id:"lk_"+S.id,ts:S.locked_at,kind:"Bloqueada",actorID:S.actor_id,detail:"",icon:v.jsx(ul,{size:12}),color:"yellow"}),S.unlocked_at&&_.push({id:"lku_"+S.id,ts:S.unlocked_at,kind:"Desbloqueada",actorID:S.actor_id,detail:ei(S.duration_ms),icon:v.jsx(Kq,{size:12}),color:"yellow"});return _.sort((S,j)=>S.ts.localeCompare(j.ts))},[t,o]);if(!t)return v.jsx(Ee,{justify:"center",p:"xl",children:v.jsx(Zt,{size:"sm"})});const{column_history:h,total_locked_ms:d,currently_locked:p}=t;if(f.length===0)return v.jsx(de,{c:"dimmed",children:"Sin historial."});const g=Date.now(),b=new Map;for(const _ of h){const S=_.exited_at?_.duration_ms:Math.max(0,g-new Date(_.entered_at).getTime()),j=_.column_id,T=b.get(j),A=o.get(j);b.set(j,{name:_.column_name||(A==null?void 0:A.name)||j,isDone:(A==null?void 0:A.is_done)??!1,ms:((T==null?void 0:T.ms)??0)+S,visits:((T==null?void 0:T.visits)??0)+1})}const w=Array.from(b.entries()).map(([_,S])=>({id:_,...S})).sort((_,S)=>S.ms-_.ms),k=_=>{if(!_)return"";const S=u.get(_);return S?S.display_name||S.username:_};return v.jsxs(kn,{gap:"md",children:[v.jsx(de,{size:"sm",c:"dimmed",children:"Linea de tiempo completa de la tarjeta."}),v.jsx(uf,{active:f.length,bulletSize:22,lineWidth:2,children:f.map(_=>v.jsx(uf.Item,{bullet:_.icon,color:_.color,lineVariant:_.doneColumn?"solid":void 0,title:v.jsxs(Ee,{gap:6,wrap:"wrap",children:[v.jsx(de,{fw:500,size:"sm",children:_.kind}),_.actorID&&v.jsx(Gn,{size:"xs",variant:"light",color:"cyan",leftSection:v.jsx(Iue,{size:10}),children:k(_.actorID)}),_.detail&&v.jsx(Gn,{size:"xs",variant:"outline",color:_.color,children:_.detail})]}),children:v.jsx(de,{size:"xs",c:"dimmed",children:new Date(_.ts).toLocaleString()})},_.id))}),v.jsx(us,{}),v.jsxs(kn,{gap:6,children:[v.jsxs(Ee,{gap:6,align:"center",wrap:"wrap",children:[v.jsx(ble,{size:14}),v.jsx(de,{fw:500,size:"sm",children:"Tiempo por columna"}),v.jsxs(Gn,{size:"xs",variant:"light",color:"gray",children:[h.length," entradas"]}),v.jsxs(de,{size:"xs",c:"dimmed",ml:"auto",children:[v.jsx(ul,{size:11,style:{verticalAlign:"middle"}})," ",v.jsx(de,{span:!0,size:"xs",fw:500,c:d>0?"yellow":"dimmed",children:ei(d)})," ","bloqueada",p?" (en curso)":""]})]}),w.length>0?v.jsxs(Xe,{withTableBorder:!0,withColumnBorders:!0,striped:"even",verticalSpacing:4,fz:"xs",children:[v.jsx(Xe.Thead,{children:v.jsxs(Xe.Tr,{children:[v.jsx(Xe.Th,{children:"Columna"}),v.jsx(Xe.Th,{style:{width:60},children:"Visitas"}),v.jsx(Xe.Th,{style:{width:130},children:"Tiempo total"})]})}),v.jsx(Xe.Tbody,{children:w.map(_=>v.jsxs(Xe.Tr,{children:[v.jsx(Xe.Td,{children:v.jsxs(Ee,{gap:4,wrap:"nowrap",children:[_.isDone&&v.jsx(cs,{size:12,color:"var(--mantine-color-green-6)"}),v.jsx(de,{size:"xs",fw:_.isDone?600:400,children:_.name})]})}),v.jsx(Xe.Td,{children:_.visits}),v.jsx(Xe.Td,{children:ei(_.ms)})]},_.id))})]}):v.jsx(de,{size:"xs",c:"dimmed",children:"Sin movimientos entre columnas."})]})]})}const Ag=26;function SG({value:e,onChange:n,options:t=rH,onOpenCustom:i}){const[r,a]=x.useState(!1),[o,l]=x.useState(e&&e.startsWith("#")?e:"#888888"),u=!!e&&e.startsWith("#")&&!t.some(f=>f.value===e);return v.jsxs(v.Fragment,{children:[v.jsxs(Ee,{gap:6,maw:280,children:[t.map(f=>{const h=e===f.value;return v.jsx(wt,{label:f.label,withArrow:!0,children:v.jsx(fe,{role:"button",onClick:d=>{d.stopPropagation(),n(f.value)},"aria-label":f.label,style:{width:Ag,height:Ag,borderRadius:"50%",background:Hue(f.value),border:`2px solid ${h?"var(--mantine-color-white)":N9(f.value)}`,boxShadow:h?"0 0 0 2px var(--mantine-color-blue-5)":void 0,cursor:"pointer",flexShrink:0,transition:"transform .1s"}})},f.value||"default")}),v.jsx(wt,{label:"Color personalizado",withArrow:!0,children:v.jsx(fe,{role:"button",onMouseDown:f=>{f.stopPropagation()},onClick:f=>{f.stopPropagation(),i?i():a(!0)},"aria-label":"Color personalizado",style:{width:Ag,height:Ag,borderRadius:"50%",background:u?o:"transparent",border:`2px dashed ${u?o:"var(--mantine-color-gray-5)"}`,boxShadow:u?"0 0 0 2px var(--mantine-color-blue-5)":void 0,cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",color:"var(--mantine-color-gray-3)"},children:v.jsx(D9,{size:14})})})]}),!i&&v.jsx(B6,{opened:r,onClose:()=>a(!1),value:o,onAccept:f=>{l(f),n(f)}})]})}const $h=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;function B6({opened:e,onClose:n,value:t,onAccept:i}){const[r,a]=x.useState(t||"#888888"),[o,l]=x.useState(t||"#888888");x.useEffect(()=>{if(e){const d=t&&$h.test(t)?t:"#888888";a(d),l(d)}},[e,t]);const u=d=>{let p=d.trim();p&&!p.startsWith("#")&&(p="#"+p),l(p),$h.test(p)&&a(p)},f=d=>{a(d),l(d)},h=()=>{i(r),n()};return v.jsx(Gi,{opened:e,onClose:n,title:"Color personalizado",size:"auto",centered:!0,withinPortal:!0,zIndex:2e3,closeOnClickOutside:!0,closeOnEscape:!1,trapFocus:!1,withCloseButton:!1,children:v.jsxs(kn,{gap:"sm",onMouseDown:d=>d.stopPropagation(),onPointerDown:d=>d.stopPropagation(),onClick:d=>d.stopPropagation(),children:[v.jsx(Zy,{value:r,onChange:f,format:"hex",swatches:["#1c7ed6","#15aabf","#12b886","#37b24d","#82c91e","#fab005","#fd7e14","#fa5252","#e64980","#be4bdb","#7950f2","#4c6ef5","#868e96","#212529"],fullWidth:!0}),v.jsxs(Ee,{align:"end",gap:"xs",children:[v.jsx(or,{label:"Hex",value:o,onChange:d=>u(d.currentTarget.value),error:o&&!$h.test(o)?"Hex invalido":void 0,size:"xs",style:{flex:1},placeholder:"#rrggbb"}),v.jsx(fe,{style:{width:32,height:32,borderRadius:4,background:$h.test(o)?o:"transparent",border:"1px solid var(--mantine-color-dark-4)"}})]}),v.jsxs(Ee,{justify:"flex-end",gap:"xs",children:[v.jsx(Yn,{variant:"default",size:"xs",onClick:n,children:"Cancelar"}),v.jsx(Yn,{size:"xs",onClick:h,disabled:!$h.test(r),children:"Aceptar"})]})]})})}const uz=5e3,rAe=1e3;function aAe(e){return e.inflight?"yellow":e.last_error?"red":e.jira_key?"green":"gray"}const oAe={gray:"var(--mantine-color-gray-5)",yellow:"var(--mantine-color-yellow-5)",green:"var(--mantine-color-green-5)",red:"var(--mantine-color-red-6)"},cz={gray:"Sin sincronizar con Jira",yellow:"Sincronizando...",green:"Sincronizada con Jira",red:"Error de sincronizacion"};function sAe({cardId:e,refreshTick:n}){const[t,i]=x.useState(null),[r,a]=x.useState(null);if(x.useEffect(()=>{let l=!1,u=null;const f=p=>{l||(u&&clearTimeout(u),u=setTimeout(h,p))},h=async()=>{try{const p=await eae(e);if(l)return;i(p),a(null),f(p.inflight?rAe:uz)}catch(p){if(l)return;a(p.message),f(uz)}},d=p=>{const g=p.detail;(g==null?void 0:g.cardId)===e&&f(150)};return window.addEventListener("kanban-card-moved",d),h(),()=>{l=!0,u&&clearTimeout(u),window.removeEventListener("kanban-card-moved",d)}},[e,n]),r&&!t)return v.jsx(fe,{title:r,style:kS("var(--mantine-color-gray-3)"),"aria-label":"Jira sync state unavailable"});if(!t)return v.jsx(fe,{style:kS("var(--mantine-color-gray-2)"),"aria-label":"Cargando estado Jira"});const o=aAe(t);return v.jsxs(vl,{width:300,shadow:"md",openDelay:150,closeDelay:120,withinPortal:!0,children:[v.jsx(vl.Target,{children:v.jsx(fe,{role:"status","aria-label":cz[o],onClick:l=>l.stopPropagation(),onPointerDown:l=>l.stopPropagation(),style:kS(oAe[o])})}),v.jsx(vl.Dropdown,{onClick:l=>l.stopPropagation(),children:v.jsxs(kn,{gap:6,children:[v.jsxs(Ee,{gap:6,wrap:"nowrap",justify:"space-between",children:[v.jsxs(Ee,{gap:6,wrap:"nowrap",children:[v.jsx(M9,{size:14}),v.jsx(de,{size:"sm",fw:600,children:cz[o]})]}),t.issue_url&&v.jsx(ho,{size:"xs",href:t.issue_url,target:"_blank",rel:"noopener noreferrer",onClick:l=>l.stopPropagation(),children:"Abrir en Jira"})]}),t.jira_key&&v.jsxs(de,{size:"xs",children:[v.jsx(de,{component:"span",c:"dimmed",children:"Issue:"})," ",v.jsx(de,{component:"span",fw:600,children:t.jira_key})]}),t.last_status&&v.jsxs(de,{size:"xs",children:[v.jsx(de,{component:"span",c:"dimmed",children:"Status:"})," ",v.jsx(de,{component:"span",children:t.last_status})]}),t.last_sync_at&&v.jsxs(de,{size:"xs",children:[v.jsx(de,{component:"span",c:"dimmed",children:"Ultimo sync:"})," ",v.jsx(de,{component:"span",children:Sl(t.last_sync_at)})]}),t.last_error&&v.jsxs(Ee,{gap:6,wrap:"nowrap",align:"flex-start",children:[v.jsx(qse,{size:14,color:"var(--mantine-color-red-6)"}),v.jsx(de,{size:"xs",c:"red",style:{wordBreak:"break-word"},children:t.last_error})]}),!t.jira_key&&v.jsx(de,{size:"xs",c:"dimmed",children:'La card todavia no se ha empujado a Jira. Editala o muevela para disparar el sync, o usa la opcion "Importar de Jira" si ya existe alli.'})]})})]})}function kS(e){return{width:10,height:10,borderRadius:"50%",background:e,cursor:"default",boxShadow:"0 0 0 2px var(--mantine-color-body)",transition:"background 120ms ease"}}function lAe(){const e=window;e._cardRenderProbe&&(e._cardRenderCount=(e._cardRenderCount||0)+1)}function uAe(){const e=window;e._cardRenderProbe&&(e._cardBodyRenderCount=(e._cardBodyRenderCount||0)+1)}const cAe=x.memo(function({card:n,isDone:t,isOverlay:i,activeSticker:r,cardElRef:a,now:o,users:l,assignee:u,requesterOptions:f,menuOpen:h,setMenuOpen:d,onDelete:p,onEdit:g,onDuplicate:b,onChangeColor:w,onShowHistory:k,onToggleLock:_,onAssign:S,onSetDeadline:j,onSetRequester:T,onArchive:A,onOpenCustomColor:O,onRemoveSticker:M,onMoveSticker:$,onCommitSticker:q}){uAe();const P=!!r,[L,U]=x.useState(!1),[G,B]=x.useState(!1),[R,D]=x.useState(!1),[z,H]=x.useState(!1),[Y,N]=x.useState(n.requester||""),W=x.useRef(null),V=n.entered_at?new Date(n.entered_at).getTime():o,I=Math.max(0,o-V),Q=n.deadline?new Date(n.deadline).getTime():0,ie=Q?Q-o:0,re=Q?ie<0:!1,Z=n.created_at?new Date(n.created_at).getTime():0,le=Q&&Z?Q-Z:0,ee=le>0?ie/le:0;let se="blue",ke="light";re?(se="red.9",ke="filled"):ee<.1?(se="red",ke="filled"):ee<.5&&(se="yellow",ke="light");const te=n.locked_at?new Date(n.locked_at).getTime():0,$e=n.locked&&te?Math.max(0,o-te):0,xe=n.created_at?new Date(n.created_at).getTime():0,Ae=n.completed_at?new Date(n.completed_at).getTime():0,ze=t&&xe&&Ae?Math.max(0,Ae-xe):0,we=he=>He=>{var oe;if(!P||i||!$||He.button!==0)return;He.stopPropagation(),He.preventDefault();const Ye=(oe=a.current)==null?void 0:oe.getBoundingClientRect();if(!Ye)return;W.current=he;const We=He.currentTarget;We.setPointerCapture(He.pointerId);const Qe=be=>{const Ke=W.current;if(Ke===null)return;const en=(be.clientX-Ye.left)/Ye.width,je=(be.clientY-Ye.top)/Ye.height;$(n.id,Ke,Math.max(0,Math.min(1,en)),Math.max(0,Math.min(1,je)))},Je=be=>{var Ke;(Ke=We.releasePointerCapture)==null||Ke.call(We,be.pointerId),We.removeEventListener("pointermove",Qe),We.removeEventListener("pointerup",Je),We.removeEventListener("pointercancel",Je),W.current=null,q==null||q(n.id)};We.addEventListener("pointermove",Qe),We.addEventListener("pointerup",Je),We.addEventListener("pointercancel",Je)},Ce=he=>He=>{!P||i||(He.preventDefault(),He.stopPropagation(),M==null||M(n.id,he))},Ne=h?v.jsxs(v.Fragment,{children:[v.jsx(zn.Label,{children:"Acciones"}),v.jsx(zn.Item,{leftSection:v.jsx(Fh,{size:14}),onClick:()=>{d(!1),g(n)},children:"Editar"}),b&&v.jsx(zn.Item,{leftSection:v.jsx(o4,{size:14}),onClick:()=>{d(!1),b(n.id)},children:"Duplicar"}),v.jsxs(Sn,{opened:L,onChange:U,position:"right-start",withArrow:!0,shadow:"md",children:[v.jsx(Sn.Target,{children:v.jsx(zn.Item,{leftSection:v.jsx(D9,{size:14}),onClick:he=>{he.preventDefault(),he.stopPropagation(),U(He=>!He)},closeMenuOnClick:!1,children:"Color"})}),v.jsx(Sn.Dropdown,{p:"xs",onDoubleClick:he=>he.stopPropagation(),onClick:he=>he.stopPropagation(),onMouseDown:he=>he.stopPropagation(),children:v.jsx(SG,{value:n.color,onChange:he=>w(n.id,he),onOpenCustom:O?()=>O(n.id,n.color||"#888888"):void 0})})]}),v.jsxs(Sn,{opened:G,onChange:B,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[v.jsx(Sn.Target,{children:v.jsxs(zn.Item,{leftSection:v.jsx(Mue,{size:14}),onClick:he=>{he.preventDefault(),he.stopPropagation(),B(He=>!He)},closeMenuOnClick:!1,children:["Asignar a ",u?`(${u.display_name||u.username})`:"..."]})}),v.jsx(Sn.Dropdown,{p:"xs",onDoubleClick:he=>he.stopPropagation(),onClick:he=>he.stopPropagation(),onMouseDown:he=>he.stopPropagation(),children:v.jsx(jr,{placeholder:"Sin asignar",value:n.assignee_id??null,onChange:he=>{S(n.id,he),B(!1),d(!1)},data:l.map(he=>({value:he.id,label:he.display_name||he.username})),clearable:!0,searchable:!0,autoFocus:!0,comboboxProps:{withinPortal:!1}})})]}),v.jsxs(Sn,{opened:R,onChange:D,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[v.jsx(Sn.Target,{children:v.jsxs(zn.Item,{leftSection:v.jsx(zue,{size:14}),onClick:he=>{he.preventDefault(),he.stopPropagation(),N(n.requester||""),D(He=>!He)},closeMenuOnClick:!1,children:["Solicitante ",n.requester?`(${n.requester})`:"..."]})}),v.jsx(Sn.Dropdown,{p:"xs",onDoubleClick:he=>he.stopPropagation(),onClick:he=>he.stopPropagation(),onMouseDown:he=>he.stopPropagation(),children:v.jsx(Hy,{placeholder:"Sin solicitante",value:Y,onChange:N,data:f||[],autoFocus:!0,comboboxProps:{withinPortal:!1},onKeyDown:he=>{he.key==="Enter"?(he.preventDefault(),T==null||T(n.id,Y.trim()),D(!1),d(!1)):he.key==="Escape"&&D(!1)},onOptionSubmit:he=>{N(he),T==null||T(n.id,he),D(!1),d(!1)}})})]}),v.jsx(zn.Item,{leftSection:n.locked?v.jsx(Kq,{size:14}):v.jsx(ul,{size:14}),color:n.locked?"yellow":void 0,onClick:()=>{d(!1),_(n.id,!n.locked)},children:n.locked?"Desbloquear":"Bloquear"}),v.jsx(zn.Item,{leftSection:v.jsx(Lle,{size:14}),onClick:()=>{d(!1),k(n)},children:"Historial"}),j&&v.jsxs(Sn,{opened:z,onChange:H,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[v.jsx(Sn.Target,{children:v.jsx(zn.Item,{leftSection:v.jsx(Vq,{size:14}),onClick:he=>{he.preventDefault(),he.stopPropagation(),H(He=>!He)},closeMenuOnClick:!1,children:n.deadline?`Deadline (${n.deadline.slice(0,10)})`:"Deadline..."})}),v.jsxs(Sn.Dropdown,{p:"xs",onDoubleClick:he=>he.stopPropagation(),onClick:he=>he.stopPropagation(),onMouseDown:he=>he.stopPropagation(),children:[v.jsx(Du,{value:n.deadline?n.deadline.slice(0,10):null,onChange:he=>{const He=he?typeof he=="string"?he.slice(0,10):new Date(he).toISOString().slice(0,10):null;j(n.id,He?`${He}T23:59:59Z`:null),H(!1),d(!1)},clearable:!0,valueFormat:"DD/MM/YYYY",size:"xs",placeholder:"Elegir fecha",popoverProps:{withinPortal:!1}}),n.deadline&&v.jsx(wt,{label:"Quitar deadline",withArrow:!0,children:v.jsx(Jn,{size:"sm",variant:"subtle",color:"red",mt:6,onClick:()=>{j(n.id,null),H(!1),d(!1)},children:v.jsx(vo,{size:12})})})]})]}),t&&A&&v.jsx(zn.Item,{leftSection:v.jsx(Uq,{size:14}),color:"teal",onClick:()=>{d(!1),A(n.id)},children:"Archivar"}),v.jsx(zn.Divider,{}),v.jsx(zn.Item,{leftSection:v.jsx(vo,{size:14}),color:"red",onClick:()=>{d(!1),p(n.id)},children:"Borrar"})]}):null;return v.jsxs(v.Fragment,{children:[v.jsxs(kn,{gap:6,style:{position:"relative",zIndex:1,pointerEvents:P?"none":void 0},children:[v.jsxs(Ee,{justify:"space-between",gap:4,wrap:"nowrap",align:"flex-start",children:[v.jsxs(Ee,{gap:4,wrap:"nowrap",style:{flex:1,minWidth:0},align:"flex-start",children:[v.jsx(Yq,{size:14,color:"var(--mantine-color-dark-2)",style:{flexShrink:0,marginTop:4}}),n.locked&&v.jsx(wt,{label:"Bloqueada",withArrow:!0,children:v.jsx(ul,{size:14,color:"var(--mantine-color-yellow-6)",style:{flexShrink:0,marginTop:4}})}),v.jsx(de,{size:"sm",fw:500,style:{flex:1,wordBreak:"break-word",whiteSpace:"normal",textDecoration:t?"line-through":"none",opacity:t?.7:1},children:n.title})]}),v.jsxs(kn,{gap:4,align:"center",style:{flexShrink:0},children:[v.jsxs(zn,{opened:h,onChange:d,position:"bottom-end",shadow:"md",withArrow:!0,children:[v.jsx(zn.Target,{children:v.jsx(Jn,{variant:"subtle",color:"gray",size:"sm","aria-label":"Acciones",onPointerDown:he=>he.stopPropagation(),children:v.jsx(Wq,{size:14})})}),v.jsx(zn.Dropdown,{onDoubleClick:he=>he.stopPropagation(),onClick:he=>he.stopPropagation(),onMouseDown:he=>he.stopPropagation(),onContextMenu:he=>he.stopPropagation(),children:Ne})]}),v.jsx(sAe,{cardId:n.id})]})]}),(n.requester||u)&&v.jsxs(Ee,{gap:6,wrap:"nowrap",style:{minWidth:0},children:[n.requester&&v.jsxs(v.Fragment,{children:[v.jsx(mo,{size:18,radius:"xs",color:Ru(n.requester),style:{flexShrink:0},children:n.requester.slice(0,2).toUpperCase()}),v.jsx(de,{size:"xs",c:"dimmed",truncate:!0,children:n.requester})]}),n.requester&&u&&v.jsx(de,{size:"xs",c:"dimmed",style:{flexShrink:0},children:"-"}),u&&v.jsxs(v.Fragment,{children:[v.jsx(mo,{size:18,radius:"xl",color:u.color||"blue",style:{flexShrink:0},children:(u.display_name||u.username).slice(0,2).toUpperCase()}),v.jsx(de,{size:"xs",c:"dimmed",truncate:!0,children:u.display_name||u.username})]})]}),n.description&&v.jsx(de,{size:"xs",c:"dimmed",lineClamp:3,children:n.description}),n.tags&&n.tags.length>0&&v.jsx(Ee,{gap:4,wrap:"wrap",children:n.tags.map(he=>v.jsx(Gn,{size:"xs",variant:"light",color:Ru(he),radius:"sm",children:he},he))}),v.jsxs(Ee,{gap:4,wrap:"wrap",children:[n.locked&&v.jsx(Gn,{size:"xs",variant:"light",color:"yellow",leftSection:v.jsx(ul,{size:10}),children:ei($e)}),!n.locked&&t&&n.completed_at?v.jsxs(v.Fragment,{children:[v.jsx(Gn,{size:"xs",variant:"light",color:"teal",leftSection:v.jsx(cs,{size:10}),children:Sl(n.completed_at)}),v.jsxs(Gn,{size:"xs",variant:"light",color:"gray",leftSection:v.jsx(c1,{size:10}),children:["Total: ",ei(ze)]}),n.total_locked_ms>0&&v.jsx(Gn,{size:"xs",variant:"light",color:"yellow",leftSection:v.jsx(ul,{size:10}),children:ei(n.total_locked_ms)})]}):n.locked?null:n.deadline?v.jsx(wt,{label:`Vence: ${Sl(n.deadline)}`,withArrow:!0,children:v.jsx(Gn,{size:"xs",variant:ke,color:se,leftSection:v.jsx(f1,{size:10}),children:re?`-${ei(-ie)}`:ei(ie)})}):v.jsx(Gn,{size:"xs",variant:"light",color:"gray",leftSection:v.jsx(c1,{size:10}),children:ei(I)})]}),n.seq_num>0&&v.jsxs(de,{size:"xs",c:"dimmed",style:{marginTop:-2},children:["#",String(n.seq_num).padStart(5,"0")]})]}),n.stickers&&n.stickers.length>0&&v.jsx("div",{"data-sticker-overlay":!0,style:{position:"absolute",inset:0,pointerEvents:"none",overflow:"hidden",borderRadius:"inherit",zIndex:0},children:n.stickers.map((he,He)=>v.jsx("span",{onPointerDown:we(He),onContextMenu:Ce(He),title:P?"Arrastra para mover. Click derecho para borrar.":"",style:{position:"absolute",left:`${he.x*100}%`,top:`${he.y*100}%`,transform:"translate(-50%, -50%)",fontSize:48,lineHeight:1,opacity:1,userSelect:"none",cursor:P&&!i?"grab":"default",pointerEvents:P&&!i?"auto":"none",touchAction:"none"},children:he.emoji},He))})]})});function fAe({card:e,now:n,onDelete:t,onEdit:i,onDuplicate:r,onChangeColor:a,onShowHistory:o,onToggleLock:l,onAssign:u,onSetDeadline:f,onSetRequester:h,onArchive:d,requesterOptions:p,onOpenCustomColor:g,activeSticker:b,onAddSticker:w,onRemoveSticker:k,onMoveSticker:_,onCommitSticker:S,users:j,assignee:T,inDoneColumn:A,columnOverdue:O,isOverlay:M,highlight:$}){lAe();const q=A||!!e.completed_at,[P,L]=x.useState(!1),U=x.useRef(null),G=!!b,B=x.useMemo(()=>({type:"card",columnId:e.column_id,locked:e.locked}),[e.column_id,e.locked]),{attributes:R,listeners:D,setNodeRef:z,transform:H,transition:Y,isDragging:N}=pq({id:e.id,data:B,disabled:G,animateLayoutChanges:()=>!1}),W=x.useCallback(re=>{U.current=re,z(re)},[z]);x.useEffect(()=>{$&&U.current&&U.current.scrollIntoView({behavior:"smooth",block:"center"})},[$]);const V=re=>{if(!G||!w||M||re.target.closest("[data-sticker-overlay]"))return;const Z=re.currentTarget.getBoundingClientRect(),le=(re.clientX-Z.left)/Z.width,ee=(re.clientY-Z.top)/Z.height;w(e.id,Math.max(0,Math.min(1,le)),Math.max(0,Math.min(1,ee)))},I=$?"var(--mantine-color-blue-5)":O?"var(--mantine-color-red-6)":e.locked?"var(--mantine-color-yellow-6)":N9(e.color),Q={transform:po.Transform.toString(H),transition:Y,opacity:N?.4:1,background:iH(e.color),borderColor:I,borderWidth:$||e.locked||O?2:1,boxShadow:$?"0 0 0 3px var(--mantine-color-blue-4)":O?"0 0 0 2px var(--mantine-color-red-3)":void 0,filter:q?"brightness(0.55) saturate(0.7)":void 0},ie=re=>{re.preventDefault(),L(!0)};return v.jsx(Tt,{ref:W,style:{...Q,position:"relative",cursor:G?"copy":"grab",touchAction:"none"},withBorder:!0,p:"xs",shadow:M?"lg":"xs",radius:"md","data-card-id":e.id,"data-column-overdue":O?"true":"false","data-locked":e.locked?"true":"false",onContextMenu:ie,onClick:V,onDoubleClick:re=>{re.stopPropagation(),i(e)},...R,...G?{}:D,children:v.jsx(cAe,{card:e,isDone:q,isOverlay:M,highlight:$,activeSticker:b,cardElRef:U,now:n,users:j,assignee:T,requesterOptions:p,menuOpen:P,setMenuOpen:L,onDelete:t,onEdit:i,onDuplicate:r,onChangeColor:a,onShowHistory:o,onToggleLock:l,onAssign:u,onSetDeadline:f,onSetRequester:h,onArchive:d,onOpenCustomColor:g,onRemoveSticker:k,onMoveSticker:_,onCommitSticker:S})})}const CG=x.memo(fAe),fz={minutes:1,hours:60,days:1440,weeks:1440*7,months:1440*30},F6={minutes:"minutos",hours:"horas",days:"dias",weeks:"semanas",months:"meses"},dAe=Object.keys(F6).map(e=>({value:e,label:F6[e]}));function hAe({column:e,cards:n,now:t,collapsed:i,onAddCard:r,onRenameColumn:a,onResizeColumn:o,onMoveColumnLocation:l,onDeleteColumn:u,onSetWIPLimit:f,onSetMaxTimeMinutes:h,onPickRandom:d,onToggleDone:p,onEditCard:g,onDeleteCard:b,onDuplicateCard:w,onChangeCardColor:k,onShowHistory:_,onToggleCardLock:S,onAssignCard:j,onSetCardDeadline:T,onSetRequester:A,onArchiveCard:O,requesterOptions:M,onOpenCustomCardColor:$,activeSticker:q,onAddSticker:P,onRemoveSticker:L,onMoveSticker:U,onCommitSticker:G,users:B,usersById:R,highlightCardId:D}){const[z,H]=x.useState(!1),[Y,N]=x.useState(e.name),[W,V]=x.useState(null),[I,Q]=x.useState(!1),[ie,re]=x.useState(e.wip_limit),[Z,le]=x.useState(!1),ee=Fe=>Fe<=0?"minutes":Fe%43200===0?"months":Fe%10080===0?"weeks":Fe%1440===0?"days":Fe%60===0?"hours":"minutes",se=(Fe,Vn)=>{const En=fz[Vn];return Fe>0?Math.max(1,Math.round(Fe/En)):0},[ke,te]=x.useState(()=>ee(e.max_time_minutes||0)),[$e,xe]=x.useState(()=>se(e.max_time_minutes||0,ee(e.max_time_minutes||0))),[Ae,ze]=x.useState(()=>i?localStorage.getItem(`kanban_col_body_${e.id}`)==="1":!1);x.useEffect(()=>{i&&localStorage.setItem(`kanban_col_body_${e.id}`,Ae?"1":"0")},[Ae,i,e.id]);const we=e.wip_limit,Ce=we>0&&n.length>we;x.useEffect(()=>{V(null)},[e.width]);const Ne=x.useMemo(()=>({type:"column",columnId:e.id,location:e.location}),[e.id,e.location]),{attributes:he,listeners:He,setNodeRef:Ye,transform:We,transition:Qe,isDragging:Je}=pq({id:`column-${e.id}`,data:Ne}),oe=i?"100%":W??e.width,be=i?{transform:po.Transform.toString(We),transition:Qe,opacity:Je?.4:1,width:"100%",display:"flex",flexDirection:"column",position:"relative",flex:Ae?"0 0 auto":"1 1 auto",minHeight:0}:{transform:po.Transform.toString(We),transition:Qe,opacity:Je?.4:1,width:oe,minWidth:oe,maxWidth:oe,display:"flex",flexDirection:"column",height:"100%",position:"relative"},Ke=n.map(Fe=>Fe.id),en=()=>{const Fe=Y.trim();Fe&&Fe!==e.name&&a(e.id,Fe),H(!1)},je=x.useRef(null),an=Fe=>{Fe.preventDefault(),Fe.stopPropagation(),je.current={startX:Fe.clientX,startWidth:e.width},document.body.style.cursor="col-resize",document.body.style.userSelect="none";const Vn=gn=>{if(!je.current)return;const xn=gn.clientX-je.current.startX,at=Math.min(800,Math.max(200,je.current.startWidth+xn));V(at)},En=()=>{je.current&&pn.current!==null&&o(e.id,pn.current),je.current=null,document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",Vn),window.removeEventListener("mouseup",En)};window.addEventListener("mousemove",Vn),window.addEventListener("mouseup",En)},pn=x.useRef(null);x.useEffect(()=>{pn.current=W},[W]);const Dn=e.location==="sidebar",bn=Dn?"Restaurar al board":"Mover al sidebar",sn=Dn?Vse:Uq,nn=()=>{const Fe=typeof ie=="number"?ie:parseInt(String(ie),10),Vn=Number.isFinite(Fe)&&Fe>=0?Math.floor(Fe):0;Vn!==e.wip_limit&&f(e.id,Vn),Q(!1)},$n=Ce?"var(--mantine-color-red-9)":"var(--mantine-color-dark-7)",De=Ce?"var(--mantine-color-red-6)":void 0;return v.jsxs(Tt,{ref:Ye,style:{...be,background:$n,borderColor:De,borderWidth:Ce?2:1},withBorder:!0,radius:"md",p:"sm","data-column-id":e.id,"data-column-location":e.location,children:[v.jsxs(Ee,{justify:"space-between",mb:"xs",wrap:"nowrap",children:[v.jsxs(Ee,{gap:4,wrap:"nowrap",style:{flex:1,minWidth:0},children:[v.jsx(Jn,{variant:"subtle",color:"gray",size:"sm",...he,...He,style:{cursor:"grab"},"aria-label":"Drag column",children:v.jsx(Yq,{size:14})}),z?v.jsx(or,{size:"xs",value:Y,onChange:Fe=>N(Fe.currentTarget.value),autoFocus:!0,onBlur:en,onKeyDown:Fe=>{Fe.key==="Enter"&&en(),Fe.key==="Escape"&&(N(e.name),H(!1))},style:{flex:1}}):v.jsx(de,{fw:600,size:"sm",truncate:!0,onDoubleClick:()=>{N(e.name),H(!0)},style:{flex:1,cursor:"text"},title:"Doble click para renombrar",children:e.name}),v.jsxs(Sn,{opened:I,onChange:Fe=>{Q(Fe),Fe&&re(e.wip_limit)},position:"bottom",withArrow:!0,shadow:"md",children:[v.jsx(Sn.Target,{children:v.jsx(wt,{label:we>0?`WIP ${n.length}/${we}${Ce?" (excedido)":""}`:"Click para limitar WIP",withArrow:!0,children:v.jsx(Gn,{size:"xs",variant:Ce?"filled":"light",color:Ce?"red":we>0?"yellow":"gray",leftSection:Ce?v.jsx(i4,{size:10}):null,style:{cursor:"pointer"},onClick:()=>Q(Fe=>!Fe),children:we>0?`${n.length}/${we}`:n.length})})}),v.jsx(Sn.Dropdown,{p:"xs",children:v.jsxs(kn,{gap:"xs",children:[v.jsx(de,{size:"xs",c:"dimmed",children:"Maximo de tarjetas (0 = sin limite)"}),v.jsx(vm,{size:"xs",value:ie,onChange:re,min:0,max:999,autoFocus:!0,onKeyDown:Fe=>{Fe.key==="Enter"&&nn(),Fe.key==="Escape"&&Q(!1)}}),v.jsxs(Ee,{justify:"flex-end",gap:4,children:[v.jsx(Yn,{size:"xs",variant:"subtle",onClick:()=>Q(!1),children:"Cancelar"}),v.jsx(Yn,{size:"xs",onClick:nn,children:"Guardar"})]})]})})]})]}),v.jsx(Ee,{gap:2,wrap:"nowrap",children:z?v.jsxs(v.Fragment,{children:[v.jsx(Jn,{variant:"subtle",color:"green",size:"sm",onClick:en,"aria-label":"Save",children:v.jsx(cs,{size:14})}),v.jsx(Jn,{variant:"subtle",color:"gray",size:"sm",onClick:()=>{N(e.name),H(!1)},"aria-label":"Cancel",children:v.jsx(qh,{size:14})})]}):v.jsxs(v.Fragment,{children:[i&&v.jsx(wt,{label:Ae?"Expandir":"Colapsar",withArrow:!0,children:v.jsx(Jn,{variant:"subtle",color:"gray",size:"sm",onClick:()=>ze(Fe=>!Fe),"aria-label":Ae?"Expandir columna":"Colapsar columna",children:Ae?v.jsx(a4,{size:14}):v.jsx(r4,{size:14})})}),e.is_done&&v.jsx(wt,{label:"Columna Done",withArrow:!0,children:v.jsx(Gn,{size:"xs",color:"green",variant:"filled",leftSection:v.jsx(wm,{size:10}),children:"done"})}),v.jsxs(zn,{position:"bottom-end",shadow:"md",withArrow:!0,children:[v.jsx(zn.Target,{children:v.jsx(Jn,{variant:"subtle",color:"gray",size:"sm","aria-label":"Acciones columna",children:v.jsx(Wq,{size:14})})}),v.jsxs(zn.Dropdown,{children:[v.jsx(zn.Label,{children:"Columna"}),v.jsx(zn.Item,{leftSection:v.jsx(rue,{size:14}),onClick:()=>{N(e.name),H(!0)},children:"Renombrar"}),v.jsx(zn.Item,{leftSection:v.jsx(wm,{size:14}),color:e.is_done?"yellow":"green",onClick:()=>p(e.id,!e.is_done),children:e.is_done?"Quitar marca Done":"Marcar como Done"}),v.jsxs(Sn,{opened:Z,onChange:Fe=>{if(le(Fe),Fe){const Vn=ee(e.max_time_minutes||0);te(Vn),xe(se(e.max_time_minutes||0,Vn))}},position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[v.jsx(Sn.Target,{children:v.jsxs(zn.Item,{leftSection:v.jsx(c1,{size:14}),"data-test":"column-max-time",closeMenuOnClick:!1,onClick:Fe=>{Fe.preventDefault(),Fe.stopPropagation(),le(Vn=>!Vn)},children:["Tiempo maximo",e.max_time_minutes>0?` (${(()=>{const Fe=ee(e.max_time_minutes);return`${se(e.max_time_minutes,Fe)} ${F6[Fe]}`})()})`:""]})}),v.jsx(Sn.Dropdown,{p:"xs",onClick:Fe=>Fe.stopPropagation(),onMouseDown:Fe=>Fe.stopPropagation(),onDoubleClick:Fe=>Fe.stopPropagation(),children:v.jsxs(kn,{gap:6,style:{minWidth:240},children:[v.jsx(de,{size:"xs",c:"dimmed",children:"Cards que pasen este tiempo se pintaran con borde rojo. 0 = sin limite. Columnas Done no aplican."}),v.jsxs(Ee,{gap:6,wrap:"nowrap",children:[v.jsx(vm,{size:"xs",min:0,max:999,value:$e,onChange:xe,placeholder:"0",style:{width:90},"data-test":"column-max-time-input"}),v.jsx(jr,{size:"xs",value:ke,onChange:Fe=>Fe&&te(Fe),data:dAe,style:{width:130},allowDeselect:!1,"data-test":"column-max-time-unit"})]}),v.jsxs(Ee,{justify:"space-between",gap:6,children:[v.jsx(wt,{label:"Quitar limite",withArrow:!0,disabled:!e.max_time_minutes,children:v.jsx(Jn,{size:"sm",variant:"subtle",color:"red",disabled:!e.max_time_minutes,onClick:()=>{h(e.id,0),xe(0),le(!1)},children:v.jsx(vo,{size:12})})}),v.jsx(Yn,{size:"xs","data-test":"column-max-time-save",onClick:()=>{const Fe=typeof $e=="number"?$e:parseInt(String($e),10),En=(Number.isFinite(Fe)&&Fe>=0?Fe:0)*fz[ke];En!==e.max_time_minutes&&h(e.id,En),le(!1)},children:"Guardar"})]})]})})]}),!e.is_done&&v.jsx(zn.Item,{leftSection:v.jsx(_le,{size:14}),"data-test":"column-random-pick",disabled:n.filter(Fe=>!Fe.locked).length===0,onClick:()=>d(e.id),children:"Seleccionar Aleatorio"}),v.jsx(zn.Item,{leftSection:v.jsx(sn,{size:14}),onClick:()=>l(e.id,Dn?"board":"sidebar"),children:bn}),v.jsx(zn.Divider,{}),v.jsx(zn.Item,{leftSection:v.jsx(vo,{size:14}),color:"red",onClick:()=>u(e.id),children:"Borrar columna"})]})]})]})})]}),!(i&&Ae)&&v.jsxs(v.Fragment,{children:[v.jsx(ur,{style:{flex:1},type:"auto",children:v.jsx(n4,{items:Ke,strategy:fq,children:v.jsx(kn,{gap:"xs",pb:"xs",style:{minHeight:40},children:n.map(Fe=>v.jsx(CG,{card:Fe,now:t,onDelete:b,onEdit:g,onDuplicate:w,onChangeColor:k,onShowHistory:_,onToggleLock:S,onAssign:j,onSetDeadline:T,onSetRequester:A,onArchive:O,requesterOptions:M,onOpenCustomColor:$,users:B,assignee:Fe.assignee_id?R.get(Fe.assignee_id):void 0,inDoneColumn:e.is_done,columnOverdue:!e.is_done&&e.max_time_minutes>0&&Fe.time_in_column_ms>e.max_time_minutes*6e4,highlight:D===Fe.id,activeSticker:q,onAddSticker:P,onRemoveSticker:L,onMoveSticker:U,onCommitSticker:G},Fe.id))})})}),v.jsx(Yn,{variant:"subtle",color:"gray",size:"xs",leftSection:v.jsx(cf,{size:14}),onClick:()=>r(e.id),mt:"xs",fullWidth:!0,"data-test":"add-card",children:"Anadir tarjeta"})]}),!Dn&&v.jsx(fe,{onMouseDown:an,style:{position:"absolute",top:0,right:-3,width:6,height:"100%",cursor:"col-resize",zIndex:5},"aria-label":"Resize column"})]})}const dz=x.memo(hAe),mAe=JSON.parse('[{"id":"people","emojis":["grinning","smiley","smile","grin","laughing","sweat_smile","rolling_on_the_floor_laughing","joy","slightly_smiling_face","upside_down_face","melting_face","wink","blush","innocent","smiling_face_with_3_hearts","heart_eyes","star-struck","kissing_heart","kissing","relaxed","kissing_closed_eyes","kissing_smiling_eyes","smiling_face_with_tear","yum","stuck_out_tongue","stuck_out_tongue_winking_eye","zany_face","stuck_out_tongue_closed_eyes","money_mouth_face","hugging_face","face_with_hand_over_mouth","face_with_open_eyes_and_hand_over_mouth","face_with_peeking_eye","shushing_face","thinking_face","saluting_face","zipper_mouth_face","face_with_raised_eyebrow","neutral_face","expressionless","no_mouth","dotted_line_face","face_in_clouds","smirk","unamused","face_with_rolling_eyes","grimacing","face_exhaling","lying_face","shaking_face","relieved","pensive","sleepy","drooling_face","sleeping","mask","face_with_thermometer","face_with_head_bandage","nauseated_face","face_vomiting","sneezing_face","hot_face","cold_face","woozy_face","dizzy_face","face_with_spiral_eyes","exploding_head","face_with_cowboy_hat","partying_face","disguised_face","sunglasses","nerd_face","face_with_monocle","confused","face_with_diagonal_mouth","worried","slightly_frowning_face","white_frowning_face","open_mouth","hushed","astonished","flushed","pleading_face","face_holding_back_tears","frowning","anguished","fearful","cold_sweat","disappointed_relieved","cry","sob","scream","confounded","persevere","disappointed","sweat","weary","tired_face","yawning_face","triumph","rage","angry","face_with_symbols_on_mouth","smiling_imp","imp","skull","skull_and_crossbones","hankey","clown_face","japanese_ogre","japanese_goblin","ghost","alien","space_invader","wave","raised_back_of_hand","raised_hand_with_fingers_splayed","hand","spock-hand","rightwards_hand","leftwards_hand","palm_down_hand","palm_up_hand","leftwards_pushing_hand","rightwards_pushing_hand","ok_hand","pinched_fingers","pinching_hand","v","crossed_fingers","hand_with_index_finger_and_thumb_crossed","i_love_you_hand_sign","the_horns","call_me_hand","point_left","point_right","point_up_2","middle_finger","point_down","point_up","index_pointing_at_the_viewer","+1","-1","fist","facepunch","left-facing_fist","right-facing_fist","clap","raised_hands","heart_hands","open_hands","palms_up_together","handshake","pray","writing_hand","nail_care","selfie","muscle","mechanical_arm","mechanical_leg","leg","foot","ear","ear_with_hearing_aid","nose","brain","anatomical_heart","lungs","tooth","bone","eyes","eye","tongue","lips","biting_lip","baby","child","boy","girl","adult","person_with_blond_hair","man","bearded_person","man_with_beard","woman_with_beard","red_haired_man","curly_haired_man","white_haired_man","bald_man","woman","red_haired_woman","red_haired_person","curly_haired_woman","curly_haired_person","white_haired_woman","white_haired_person","bald_woman","bald_person","blond-haired-woman","blond-haired-man","older_adult","older_man","older_woman","person_frowning","man-frowning","woman-frowning","person_with_pouting_face","man-pouting","woman-pouting","no_good","man-gesturing-no","woman-gesturing-no","ok_woman","man-gesturing-ok","woman-gesturing-ok","information_desk_person","man-tipping-hand","woman-tipping-hand","raising_hand","man-raising-hand","woman-raising-hand","deaf_person","deaf_man","deaf_woman","bow","man-bowing","woman-bowing","face_palm","man-facepalming","woman-facepalming","shrug","man-shrugging","woman-shrugging","health_worker","male-doctor","female-doctor","student","male-student","female-student","teacher","male-teacher","female-teacher","judge","male-judge","female-judge","farmer","male-farmer","female-farmer","cook","male-cook","female-cook","mechanic","male-mechanic","female-mechanic","factory_worker","male-factory-worker","female-factory-worker","office_worker","male-office-worker","female-office-worker","scientist","male-scientist","female-scientist","technologist","male-technologist","female-technologist","singer","male-singer","female-singer","artist","male-artist","female-artist","pilot","male-pilot","female-pilot","astronaut","male-astronaut","female-astronaut","firefighter","male-firefighter","female-firefighter","cop","male-police-officer","female-police-officer","sleuth_or_spy","male-detective","female-detective","guardsman","male-guard","female-guard","ninja","construction_worker","male-construction-worker","female-construction-worker","person_with_crown","prince","princess","man_with_turban","man-wearing-turban","woman-wearing-turban","man_with_gua_pi_mao","person_with_headscarf","person_in_tuxedo","man_in_tuxedo","woman_in_tuxedo","bride_with_veil","man_with_veil","woman_with_veil","pregnant_woman","pregnant_man","pregnant_person","breast-feeding","woman_feeding_baby","man_feeding_baby","person_feeding_baby","angel","santa","mrs_claus","mx_claus","superhero","male_superhero","female_superhero","supervillain","male_supervillain","female_supervillain","mage","male_mage","female_mage","fairy","male_fairy","female_fairy","vampire","male_vampire","female_vampire","merperson","merman","mermaid","elf","male_elf","female_elf","genie","male_genie","female_genie","zombie","male_zombie","female_zombie","troll","massage","man-getting-massage","woman-getting-massage","haircut","man-getting-haircut","woman-getting-haircut","walking","man-walking","woman-walking","standing_person","man_standing","woman_standing","kneeling_person","man_kneeling","woman_kneeling","person_with_probing_cane","man_with_probing_cane","woman_with_probing_cane","person_in_motorized_wheelchair","man_in_motorized_wheelchair","woman_in_motorized_wheelchair","person_in_manual_wheelchair","man_in_manual_wheelchair","woman_in_manual_wheelchair","runner","man-running","woman-running","dancer","man_dancing","man_in_business_suit_levitating","dancers","men-with-bunny-ears-partying","women-with-bunny-ears-partying","person_in_steamy_room","man_in_steamy_room","woman_in_steamy_room","person_climbing","man_climbing","woman_climbing","fencer","horse_racing","skier","snowboarder","golfer","man-golfing","woman-golfing","surfer","man-surfing","woman-surfing","rowboat","man-rowing-boat","woman-rowing-boat","swimmer","man-swimming","woman-swimming","person_with_ball","man-bouncing-ball","woman-bouncing-ball","weight_lifter","man-lifting-weights","woman-lifting-weights","bicyclist","man-biking","woman-biking","mountain_bicyclist","man-mountain-biking","woman-mountain-biking","person_doing_cartwheel","man-cartwheeling","woman-cartwheeling","wrestlers","man-wrestling","woman-wrestling","water_polo","man-playing-water-polo","woman-playing-water-polo","handball","man-playing-handball","woman-playing-handball","juggling","man-juggling","woman-juggling","person_in_lotus_position","man_in_lotus_position","woman_in_lotus_position","bath","sleeping_accommodation","people_holding_hands","two_women_holding_hands","man_and_woman_holding_hands","two_men_holding_hands","couplekiss","woman-kiss-man","man-kiss-man","woman-kiss-woman","couple_with_heart","woman-heart-man","man-heart-man","woman-heart-woman","family","man-woman-boy","man-woman-girl","man-woman-girl-boy","man-woman-boy-boy","man-woman-girl-girl","man-man-boy","man-man-girl","man-man-girl-boy","man-man-boy-boy","man-man-girl-girl","woman-woman-boy","woman-woman-girl","woman-woman-girl-boy","woman-woman-boy-boy","woman-woman-girl-girl","man-boy","man-boy-boy","man-girl","man-girl-boy","man-girl-girl","woman-boy","woman-boy-boy","woman-girl","woman-girl-boy","woman-girl-girl","speaking_head_in_silhouette","bust_in_silhouette","busts_in_silhouette","people_hugging","footprints","robot_face","smiley_cat","smile_cat","joy_cat","heart_eyes_cat","smirk_cat","kissing_cat","scream_cat","crying_cat_face","pouting_cat","see_no_evil","hear_no_evil","speak_no_evil","love_letter","cupid","gift_heart","sparkling_heart","heartpulse","heartbeat","revolving_hearts","two_hearts","heart_decoration","heavy_heart_exclamation_mark_ornament","broken_heart","heart_on_fire","mending_heart","heart","pink_heart","orange_heart","yellow_heart","green_heart","blue_heart","light_blue_heart","purple_heart","brown_heart","black_heart","grey_heart","white_heart","kiss","100","anger","boom","dizzy","sweat_drops","dash","hole","speech_balloon","eye-in-speech-bubble","left_speech_bubble","right_anger_bubble","thought_balloon","zzz"]},{"id":"nature","emojis":["monkey_face","monkey","gorilla","orangutan","dog","dog2","guide_dog","service_dog","poodle","wolf","fox_face","raccoon","cat","cat2","black_cat","lion_face","tiger","tiger2","leopard","horse","moose","donkey","racehorse","unicorn_face","zebra_face","deer","bison","cow","ox","water_buffalo","cow2","pig","pig2","boar","pig_nose","ram","sheep","goat","dromedary_camel","camel","llama","giraffe_face","elephant","mammoth","rhinoceros","hippopotamus","mouse","mouse2","rat","hamster","rabbit","rabbit2","chipmunk","beaver","hedgehog","bat","bear","polar_bear","koala","panda_face","sloth","otter","skunk","kangaroo","badger","feet","turkey","chicken","rooster","hatching_chick","baby_chick","hatched_chick","bird","penguin","dove_of_peace","eagle","duck","swan","owl","dodo","feather","flamingo","peacock","parrot","wing","black_bird","goose","frog","crocodile","turtle","lizard","snake","dragon_face","dragon","sauropod","t-rex","whale","whale2","dolphin","seal","fish","tropical_fish","blowfish","shark","octopus","shell","coral","jellyfish","snail","butterfly","bug","ant","bee","beetle","ladybug","cricket","cockroach","spider","spider_web","scorpion","mosquito","fly","worm","microbe","bouquet","cherry_blossom","white_flower","lotus","rosette","rose","wilted_flower","hibiscus","sunflower","blossom","tulip","hyacinth","seedling","potted_plant","evergreen_tree","deciduous_tree","palm_tree","cactus","ear_of_rice","herb","shamrock","four_leaf_clover","maple_leaf","fallen_leaf","leaves","empty_nest","nest_with_eggs","mushroom"]},{"id":"foods","emojis":["grapes","melon","watermelon","tangerine","lemon","banana","pineapple","mango","apple","green_apple","pear","peach","cherries","strawberry","blueberries","kiwifruit","tomato","olive","coconut","avocado","eggplant","potato","carrot","corn","hot_pepper","bell_pepper","cucumber","leafy_green","broccoli","garlic","onion","peanuts","beans","chestnut","ginger_root","pea_pod","bread","croissant","baguette_bread","flatbread","pretzel","bagel","pancakes","waffle","cheese_wedge","meat_on_bone","poultry_leg","cut_of_meat","bacon","hamburger","fries","pizza","hotdog","sandwich","taco","burrito","tamale","stuffed_flatbread","falafel","egg","fried_egg","shallow_pan_of_food","stew","fondue","bowl_with_spoon","green_salad","popcorn","butter","salt","canned_food","bento","rice_cracker","rice_ball","rice","curry","ramen","spaghetti","sweet_potato","oden","sushi","fried_shrimp","fish_cake","moon_cake","dango","dumpling","fortune_cookie","takeout_box","crab","lobster","shrimp","squid","oyster","icecream","shaved_ice","ice_cream","doughnut","cookie","birthday","cake","cupcake","pie","chocolate_bar","candy","lollipop","custard","honey_pot","baby_bottle","glass_of_milk","coffee","teapot","tea","sake","champagne","wine_glass","cocktail","tropical_drink","beer","beers","clinking_glasses","tumbler_glass","pouring_liquid","cup_with_straw","bubble_tea","beverage_box","mate_drink","ice_cube","chopsticks","knife_fork_plate","fork_and_knife","spoon","hocho","jar","amphora"]},{"id":"activity","emojis":["jack_o_lantern","christmas_tree","fireworks","sparkler","firecracker","sparkles","balloon","tada","confetti_ball","tanabata_tree","bamboo","dolls","flags","wind_chime","rice_scene","red_envelope","ribbon","gift","reminder_ribbon","admission_tickets","ticket","medal","trophy","sports_medal","first_place_medal","second_place_medal","third_place_medal","soccer","baseball","softball","basketball","volleyball","football","rugby_football","tennis","flying_disc","bowling","cricket_bat_and_ball","field_hockey_stick_and_ball","ice_hockey_stick_and_puck","lacrosse","table_tennis_paddle_and_ball","badminton_racquet_and_shuttlecock","boxing_glove","martial_arts_uniform","goal_net","golf","ice_skate","fishing_pole_and_fish","diving_mask","running_shirt_with_sash","ski","sled","curling_stone","dart","yo-yo","kite","gun","8ball","crystal_ball","magic_wand","video_game","joystick","slot_machine","game_die","jigsaw","teddy_bear","pinata","mirror_ball","nesting_dolls","spades","hearts","diamonds","clubs","chess_pawn","black_joker","mahjong","flower_playing_cards","performing_arts","frame_with_picture","art","thread","sewing_needle","yarn","knot"]},{"id":"places","emojis":["earth_africa","earth_americas","earth_asia","globe_with_meridians","world_map","japan","compass","snow_capped_mountain","mountain","volcano","mount_fuji","camping","beach_with_umbrella","desert","desert_island","national_park","stadium","classical_building","building_construction","bricks","rock","wood","hut","house_buildings","derelict_house_building","house","house_with_garden","office","post_office","european_post_office","hospital","bank","hotel","love_hotel","convenience_store","school","department_store","factory","japanese_castle","european_castle","wedding","tokyo_tower","statue_of_liberty","church","mosque","hindu_temple","synagogue","shinto_shrine","kaaba","fountain","tent","foggy","night_with_stars","cityscape","sunrise_over_mountains","sunrise","city_sunset","city_sunrise","bridge_at_night","hotsprings","carousel_horse","playground_slide","ferris_wheel","roller_coaster","barber","circus_tent","steam_locomotive","railway_car","bullettrain_side","bullettrain_front","train2","metro","light_rail","station","tram","monorail","mountain_railway","train","bus","oncoming_bus","trolleybus","minibus","ambulance","fire_engine","police_car","oncoming_police_car","taxi","oncoming_taxi","car","oncoming_automobile","blue_car","pickup_truck","truck","articulated_lorry","tractor","racing_car","racing_motorcycle","motor_scooter","manual_wheelchair","motorized_wheelchair","auto_rickshaw","bike","scooter","skateboard","roller_skate","busstop","motorway","railway_track","oil_drum","fuelpump","wheel","rotating_light","traffic_light","vertical_traffic_light","octagonal_sign","construction","anchor","ring_buoy","boat","canoe","speedboat","passenger_ship","ferry","motor_boat","ship","airplane","small_airplane","airplane_departure","airplane_arriving","parachute","seat","helicopter","suspension_railway","mountain_cableway","aerial_tramway","satellite","rocket","flying_saucer","bellhop_bell","luggage","hourglass","hourglass_flowing_sand","watch","alarm_clock","stopwatch","timer_clock","mantelpiece_clock","clock12","clock1230","clock1","clock130","clock2","clock230","clock3","clock330","clock4","clock430","clock5","clock530","clock6","clock630","clock7","clock730","clock8","clock830","clock9","clock930","clock10","clock1030","clock11","clock1130","new_moon","waxing_crescent_moon","first_quarter_moon","moon","full_moon","waning_gibbous_moon","last_quarter_moon","waning_crescent_moon","crescent_moon","new_moon_with_face","first_quarter_moon_with_face","last_quarter_moon_with_face","thermometer","sunny","full_moon_with_face","sun_with_face","ringed_planet","star","star2","stars","milky_way","cloud","partly_sunny","thunder_cloud_and_rain","mostly_sunny","barely_sunny","partly_sunny_rain","rain_cloud","snow_cloud","lightning","tornado","fog","wind_blowing_face","cyclone","rainbow","closed_umbrella","umbrella","umbrella_with_rain_drops","umbrella_on_ground","zap","snowflake","snowman","snowman_without_snow","comet","fire","droplet","ocean"]},{"id":"objects","emojis":["eyeglasses","dark_sunglasses","goggles","lab_coat","safety_vest","necktie","shirt","jeans","scarf","gloves","coat","socks","dress","kimono","sari","one-piece_swimsuit","briefs","shorts","bikini","womans_clothes","folding_hand_fan","purse","handbag","pouch","shopping_bags","school_satchel","thong_sandal","mans_shoe","athletic_shoe","hiking_boot","womans_flat_shoe","high_heel","sandal","ballet_shoes","boot","hair_pick","crown","womans_hat","tophat","mortar_board","billed_cap","military_helmet","helmet_with_white_cross","prayer_beads","lipstick","ring","gem","mute","speaker","sound","loud_sound","loudspeaker","mega","postal_horn","bell","no_bell","musical_score","musical_note","notes","studio_microphone","level_slider","control_knobs","microphone","headphones","radio","saxophone","accordion","guitar","musical_keyboard","trumpet","violin","banjo","drum_with_drumsticks","long_drum","maracas","flute","iphone","calling","phone","telephone_receiver","pager","fax","battery","low_battery","electric_plug","computer","desktop_computer","printer","keyboard","three_button_mouse","trackball","minidisc","floppy_disk","cd","dvd","abacus","movie_camera","film_frames","film_projector","clapper","tv","camera","camera_with_flash","video_camera","vhs","mag","mag_right","candle","bulb","flashlight","izakaya_lantern","diya_lamp","notebook_with_decorative_cover","closed_book","book","green_book","blue_book","orange_book","books","notebook","ledger","page_with_curl","scroll","page_facing_up","newspaper","rolled_up_newspaper","bookmark_tabs","bookmark","label","moneybag","coin","yen","dollar","euro","pound","money_with_wings","credit_card","receipt","chart","email","e-mail","incoming_envelope","envelope_with_arrow","outbox_tray","inbox_tray","package","mailbox","mailbox_closed","mailbox_with_mail","mailbox_with_no_mail","postbox","ballot_box_with_ballot","pencil2","black_nib","lower_left_fountain_pen","lower_left_ballpoint_pen","lower_left_paintbrush","lower_left_crayon","memo","briefcase","file_folder","open_file_folder","card_index_dividers","date","calendar","spiral_note_pad","spiral_calendar_pad","card_index","chart_with_upwards_trend","chart_with_downwards_trend","bar_chart","clipboard","pushpin","round_pushpin","paperclip","linked_paperclips","straight_ruler","triangular_ruler","scissors","card_file_box","file_cabinet","wastebasket","lock","unlock","lock_with_ink_pen","closed_lock_with_key","key","old_key","hammer","axe","pick","hammer_and_pick","hammer_and_wrench","dagger_knife","crossed_swords","bomb","boomerang","bow_and_arrow","shield","carpentry_saw","wrench","screwdriver","nut_and_bolt","gear","compression","scales","probing_cane","link","chains","hook","toolbox","magnet","ladder","alembic","test_tube","petri_dish","dna","microscope","telescope","satellite_antenna","syringe","drop_of_blood","pill","adhesive_bandage","crutch","stethoscope","x-ray","door","elevator","mirror","window","bed","couch_and_lamp","chair","toilet","plunger","shower","bathtub","mouse_trap","razor","lotion_bottle","safety_pin","broom","basket","roll_of_paper","bucket","soap","bubbles","toothbrush","sponge","fire_extinguisher","shopping_trolley","smoking","coffin","headstone","funeral_urn","nazar_amulet","hamsa","moyai","placard","identification_card"]},{"id":"symbols","emojis":["atm","put_litter_in_its_place","potable_water","wheelchair","mens","womens","restroom","baby_symbol","wc","passport_control","customs","baggage_claim","left_luggage","warning","children_crossing","no_entry","no_entry_sign","no_bicycles","no_smoking","do_not_litter","non-potable_water","no_pedestrians","no_mobile_phones","underage","radioactive_sign","biohazard_sign","arrow_up","arrow_upper_right","arrow_right","arrow_lower_right","arrow_down","arrow_lower_left","arrow_left","arrow_upper_left","arrow_up_down","left_right_arrow","leftwards_arrow_with_hook","arrow_right_hook","arrow_heading_up","arrow_heading_down","arrows_clockwise","arrows_counterclockwise","back","end","on","soon","top","place_of_worship","atom_symbol","om_symbol","star_of_david","wheel_of_dharma","yin_yang","latin_cross","orthodox_cross","star_and_crescent","peace_symbol","menorah_with_nine_branches","six_pointed_star","khanda","aries","taurus","gemini","cancer","leo","virgo","libra","scorpius","sagittarius","capricorn","aquarius","pisces","ophiuchus","twisted_rightwards_arrows","repeat","repeat_one","arrow_forward","fast_forward","black_right_pointing_double_triangle_with_vertical_bar","black_right_pointing_triangle_with_double_vertical_bar","arrow_backward","rewind","black_left_pointing_double_triangle_with_vertical_bar","arrow_up_small","arrow_double_up","arrow_down_small","arrow_double_down","double_vertical_bar","black_square_for_stop","black_circle_for_record","eject","cinema","low_brightness","high_brightness","signal_strength","wireless","vibration_mode","mobile_phone_off","female_sign","male_sign","transgender_symbol","heavy_multiplication_x","heavy_plus_sign","heavy_minus_sign","heavy_division_sign","heavy_equals_sign","infinity","bangbang","interrobang","question","grey_question","grey_exclamation","exclamation","wavy_dash","currency_exchange","heavy_dollar_sign","medical_symbol","recycle","fleur_de_lis","trident","name_badge","beginner","o","white_check_mark","ballot_box_with_check","heavy_check_mark","x","negative_squared_cross_mark","curly_loop","loop","part_alternation_mark","eight_spoked_asterisk","eight_pointed_black_star","sparkle","copyright","registered","tm","hash","keycap_star","zero","one","two","three","four","five","six","seven","eight","nine","keycap_ten","capital_abcd","abcd","1234","symbols","abc","a","ab","b","cl","cool","free","information_source","id","m","new","ng","o2","ok","parking","sos","up","vs","koko","sa","u6708","u6709","u6307","ideograph_advantage","u5272","u7121","u7981","accept","u7533","u5408","u7a7a","congratulations","secret","u55b6","u6e80","red_circle","large_orange_circle","large_yellow_circle","large_green_circle","large_blue_circle","large_purple_circle","large_brown_circle","black_circle","white_circle","large_red_square","large_orange_square","large_yellow_square","large_green_square","large_blue_square","large_purple_square","large_brown_square","black_large_square","white_large_square","black_medium_square","white_medium_square","black_medium_small_square","white_medium_small_square","black_small_square","white_small_square","large_orange_diamond","large_blue_diamond","small_orange_diamond","small_blue_diamond","small_red_triangle","small_red_triangle_down","diamond_shape_with_a_dot_inside","radio_button","white_square_button","black_square_button"]},{"id":"flags","emojis":["checkered_flag","cn","crossed_flags","de","es","flag-ac","flag-ad","flag-ae","flag-af","flag-ag","flag-ai","flag-al","flag-am","flag-ao","flag-aq","flag-ar","flag-as","flag-at","flag-au","flag-aw","flag-ax","flag-az","flag-ba","flag-bb","flag-bd","flag-be","flag-bf","flag-bg","flag-bh","flag-bi","flag-bj","flag-bl","flag-bm","flag-bn","flag-bo","flag-bq","flag-br","flag-bs","flag-bt","flag-bv","flag-bw","flag-by","flag-bz","flag-ca","flag-cc","flag-cd","flag-cf","flag-cg","flag-ch","flag-ci","flag-ck","flag-cl","flag-cm","flag-co","flag-cp","flag-cr","flag-cu","flag-cv","flag-cw","flag-cx","flag-cy","flag-cz","flag-dg","flag-dj","flag-dk","flag-dm","flag-do","flag-dz","flag-ea","flag-ec","flag-ee","flag-eg","flag-eh","flag-england","flag-er","flag-et","flag-eu","flag-fi","flag-fj","flag-fk","flag-fm","flag-fo","flag-ga","flag-gd","flag-ge","flag-gf","flag-gg","flag-gh","flag-gi","flag-gl","flag-gm","flag-gn","flag-gp","flag-gq","flag-gr","flag-gs","flag-gt","flag-gu","flag-gw","flag-gy","flag-hk","flag-hm","flag-hn","flag-hr","flag-ht","flag-hu","flag-ic","flag-id","flag-ie","flag-il","flag-im","flag-in","flag-io","flag-iq","flag-ir","flag-is","flag-je","flag-jm","flag-jo","flag-ke","flag-kg","flag-kh","flag-ki","flag-km","flag-kn","flag-kp","flag-kw","flag-ky","flag-kz","flag-la","flag-lb","flag-lc","flag-li","flag-lk","flag-lr","flag-ls","flag-lt","flag-lu","flag-lv","flag-ly","flag-ma","flag-mc","flag-md","flag-me","flag-mf","flag-mg","flag-mh","flag-mk","flag-ml","flag-mm","flag-mn","flag-mo","flag-mp","flag-mq","flag-mr","flag-ms","flag-mt","flag-mu","flag-mv","flag-mw","flag-mx","flag-my","flag-mz","flag-na","flag-nc","flag-ne","flag-nf","flag-ng","flag-ni","flag-nl","flag-no","flag-np","flag-nr","flag-nu","flag-nz","flag-om","flag-pa","flag-pe","flag-pf","flag-pg","flag-ph","flag-pk","flag-pl","flag-pm","flag-pn","flag-pr","flag-ps","flag-pt","flag-pw","flag-py","flag-qa","flag-re","flag-ro","flag-rs","flag-rw","flag-sa","flag-sb","flag-sc","flag-scotland","flag-sd","flag-se","flag-sg","flag-sh","flag-si","flag-sj","flag-sk","flag-sl","flag-sm","flag-sn","flag-so","flag-sr","flag-ss","flag-st","flag-sv","flag-sx","flag-sy","flag-sz","flag-ta","flag-tc","flag-td","flag-tf","flag-tg","flag-th","flag-tj","flag-tk","flag-tl","flag-tm","flag-tn","flag-to","flag-tr","flag-tt","flag-tv","flag-tw","flag-tz","flag-ua","flag-ug","flag-um","flag-un","flag-uy","flag-uz","flag-va","flag-vc","flag-ve","flag-vg","flag-vi","flag-vn","flag-vu","flag-wales","flag-wf","flag-ws","flag-xk","flag-ye","flag-yt","flag-za","flag-zm","flag-zw","fr","gb","it","jp","kr","pirate_flag","rainbow-flag","ru","transgender_flag","triangular_flag_on_post","us","waving_black_flag","waving_white_flag"]}]'),pAe=JSON.parse(`{"100":{"id":"100","name":"Hundred Points","keywords":["100","score","perfect","numbers","century","exam","quiz","test","pass"],"skins":[{"unified":"1f4af","native":"💯"}],"version":1},"1234":{"id":"1234","name":"Input Numbers","keywords":["1234","blue","square","1","2","3","4"],"skins":[{"unified":"1f522","native":"🔢"}],"version":1},"grinning":{"id":"grinning","name":"Grinning Face","emoticons":[":D"],"keywords":["smile","happy","joy",":D","grin"],"skins":[{"unified":"1f600","native":"😀"}],"version":1},"smiley":{"id":"smiley","name":"Grinning Face with Big Eyes","emoticons":[":)","=)","=-)"],"keywords":["smiley","happy","joy","haha",":D",":)","smile","funny"],"skins":[{"unified":"1f603","native":"😃"}],"version":1},"smile":{"id":"smile","name":"Grinning Face with Smiling Eyes","emoticons":[":)","C:","c:",":D",":-D"],"keywords":["smile","happy","joy","funny","haha","laugh","like",":D",":)"],"skins":[{"unified":"1f604","native":"😄"}],"version":1},"grin":{"id":"grin","name":"Beaming Face with Smiling Eyes","keywords":["grin","happy","smile","joy","kawaii"],"skins":[{"unified":"1f601","native":"😁"}],"version":1},"laughing":{"id":"laughing","name":"Grinning Squinting Face","emoticons":[":>",":->"],"keywords":["laughing","satisfied","happy","joy","lol","haha","glad","XD","laugh"],"skins":[{"unified":"1f606","native":"😆"}],"version":1},"sweat_smile":{"id":"sweat_smile","name":"Grinning Face with Sweat","keywords":["smile","hot","happy","laugh","relief"],"skins":[{"unified":"1f605","native":"😅"}],"version":1},"rolling_on_the_floor_laughing":{"id":"rolling_on_the_floor_laughing","name":"Rolling on the Floor Laughing","keywords":["face","lol","haha","rofl"],"skins":[{"unified":"1f923","native":"🤣"}],"version":3},"joy":{"id":"joy","name":"Face with Tears of Joy","keywords":["cry","weep","happy","happytears","haha"],"skins":[{"unified":"1f602","native":"😂"}],"version":1},"slightly_smiling_face":{"id":"slightly_smiling_face","name":"Slightly Smiling Face","emoticons":[":)","(:",":-)"],"keywords":["smile"],"skins":[{"unified":"1f642","native":"🙂"}],"version":1},"upside_down_face":{"id":"upside_down_face","name":"Upside-Down Face","keywords":["upside","down","flipped","silly","smile"],"skins":[{"unified":"1f643","native":"🙃"}],"version":1},"melting_face":{"id":"melting_face","name":"Melting Face","keywords":["hot","heat"],"skins":[{"unified":"1fae0","native":"🫠"}],"version":14},"wink":{"id":"wink","name":"Winking Face","emoticons":[";)",";-)"],"keywords":["wink","happy","mischievous","secret",";)","smile","eye"],"skins":[{"unified":"1f609","native":"😉"}],"version":1},"blush":{"id":"blush","name":"Smiling Face with Smiling Eyes","emoticons":[":)"],"keywords":["blush","smile","happy","flushed","crush","embarrassed","shy","joy"],"skins":[{"unified":"1f60a","native":"😊"}],"version":1},"innocent":{"id":"innocent","name":"Smiling Face with Halo","keywords":["innocent","angel","heaven"],"skins":[{"unified":"1f607","native":"😇"}],"version":1},"smiling_face_with_3_hearts":{"id":"smiling_face_with_3_hearts","name":"Smiling Face with Hearts","keywords":["3","love","like","affection","valentines","infatuation","crush","adore"],"skins":[{"unified":"1f970","native":"🥰"}],"version":11},"heart_eyes":{"id":"heart_eyes","name":"Smiling Face with Heart-Eyes","keywords":["heart","eyes","love","like","affection","valentines","infatuation","crush"],"skins":[{"unified":"1f60d","native":"😍"}],"version":1},"star-struck":{"id":"star-struck","name":"Star-Struck","keywords":["star","struck","grinning","face","with","eyes","smile","starry"],"skins":[{"unified":"1f929","native":"🤩"}],"version":5},"kissing_heart":{"id":"kissing_heart","name":"Face Blowing a Kiss","emoticons":[":*",":-*"],"keywords":["kissing","heart","love","like","affection","valentines","infatuation"],"skins":[{"unified":"1f618","native":"😘"}],"version":1},"kissing":{"id":"kissing","name":"Kissing Face","keywords":["love","like","3","valentines","infatuation","kiss"],"skins":[{"unified":"1f617","native":"😗"}],"version":1},"relaxed":{"id":"relaxed","name":"Smiling Face","keywords":["relaxed","blush","massage","happiness"],"skins":[{"unified":"263a-fe0f","native":"☺️"}],"version":1},"kissing_closed_eyes":{"id":"kissing_closed_eyes","name":"Kissing Face with Closed Eyes","keywords":["love","like","affection","valentines","infatuation","kiss"],"skins":[{"unified":"1f61a","native":"😚"}],"version":1},"kissing_smiling_eyes":{"id":"kissing_smiling_eyes","name":"Kissing Face with Smiling Eyes","keywords":["affection","valentines","infatuation","kiss"],"skins":[{"unified":"1f619","native":"😙"}],"version":1},"smiling_face_with_tear":{"id":"smiling_face_with_tear","name":"Smiling Face with Tear","keywords":["sad","cry","pretend"],"skins":[{"unified":"1f972","native":"🥲"}],"version":13},"yum":{"id":"yum","name":"Face Savoring Food","keywords":["yum","happy","joy","tongue","smile","silly","yummy","nom","delicious","savouring"],"skins":[{"unified":"1f60b","native":"😋"}],"version":1},"stuck_out_tongue":{"id":"stuck_out_tongue","name":"Face with Tongue","emoticons":[":p",":-p",":P",":-P",":b",":-b"],"keywords":["stuck","out","prank","childish","playful","mischievous","smile"],"skins":[{"unified":"1f61b","native":"😛"}],"version":1},"stuck_out_tongue_winking_eye":{"id":"stuck_out_tongue_winking_eye","name":"Winking Face with Tongue","emoticons":[";p",";-p",";b",";-b",";P",";-P"],"keywords":["stuck","out","eye","prank","childish","playful","mischievous","smile","wink"],"skins":[{"unified":"1f61c","native":"😜"}],"version":1},"zany_face":{"id":"zany_face","name":"Zany Face","keywords":["grinning","with","one","large","and","small","eye","goofy","crazy"],"skins":[{"unified":"1f92a","native":"🤪"}],"version":5},"stuck_out_tongue_closed_eyes":{"id":"stuck_out_tongue_closed_eyes","name":"Squinting Face with Tongue","keywords":["stuck","out","closed","eyes","prank","playful","mischievous","smile"],"skins":[{"unified":"1f61d","native":"😝"}],"version":1},"money_mouth_face":{"id":"money_mouth_face","name":"Money-Mouth Face","keywords":["money","mouth","rich","dollar"],"skins":[{"unified":"1f911","native":"🤑"}],"version":1},"hugging_face":{"id":"hugging_face","name":"Hugging Face","keywords":["smile","hug"],"skins":[{"unified":"1f917","native":"🤗"}],"version":1},"face_with_hand_over_mouth":{"id":"face_with_hand_over_mouth","name":"Face with Hand over Mouth","keywords":["smiling","eyes","and","covering","whoops","shock","surprise"],"skins":[{"unified":"1f92d","native":"🤭"}],"version":5},"face_with_open_eyes_and_hand_over_mouth":{"id":"face_with_open_eyes_and_hand_over_mouth","name":"Face with Open Eyes and Hand over Mouth","keywords":["silence","secret","shock","surprise"],"skins":[{"unified":"1fae2","native":"🫢"}],"version":14},"face_with_peeking_eye":{"id":"face_with_peeking_eye","name":"Face with Peeking Eye","keywords":["scared","frightening","embarrassing","shy"],"skins":[{"unified":"1fae3","native":"🫣"}],"version":14},"shushing_face":{"id":"shushing_face","name":"Shushing Face","keywords":["with","finger","covering","closed","lips","quiet","shhh"],"skins":[{"unified":"1f92b","native":"🤫"}],"version":5},"thinking_face":{"id":"thinking_face","name":"Thinking Face","keywords":["hmmm","think","consider"],"skins":[{"unified":"1f914","native":"🤔"}],"version":1},"saluting_face":{"id":"saluting_face","name":"Saluting Face","keywords":["respect","salute"],"skins":[{"unified":"1fae1","native":"🫡"}],"version":14},"zipper_mouth_face":{"id":"zipper_mouth_face","name":"Zipper-Mouth Face","keywords":["zipper","mouth","sealed","secret"],"skins":[{"unified":"1f910","native":"🤐"}],"version":1},"face_with_raised_eyebrow":{"id":"face_with_raised_eyebrow","name":"Face with Raised Eyebrow","keywords":["one","distrust","scepticism","disapproval","disbelief","surprise"],"skins":[{"unified":"1f928","native":"🤨"}],"version":5},"neutral_face":{"id":"neutral_face","name":"Neutral Face","emoticons":[":|",":-|"],"keywords":["indifference","meh",":",""],"skins":[{"unified":"1f610","native":"😐"}],"version":1},"expressionless":{"id":"expressionless","name":"Expressionless Face","emoticons":["-_-"],"keywords":["indifferent","-","","meh","deadpan"],"skins":[{"unified":"1f611","native":"😑"}],"version":1},"no_mouth":{"id":"no_mouth","name":"Face Without Mouth","keywords":["no","hellokitty"],"skins":[{"unified":"1f636","native":"😶"}],"version":1},"dotted_line_face":{"id":"dotted_line_face","name":"Dotted Line Face","keywords":["invisible","lonely","isolation","depression"],"skins":[{"unified":"1fae5","native":"🫥"}],"version":14},"face_in_clouds":{"id":"face_in_clouds","name":"Face in Clouds","keywords":["shower","steam","dream"],"skins":[{"unified":"1f636-200d-1f32b-fe0f","native":"😶‍🌫️"}],"version":13.1},"smirk":{"id":"smirk","name":"Smirking Face","keywords":["smirk","smile","mean","prank","smug","sarcasm"],"skins":[{"unified":"1f60f","native":"😏"}],"version":1},"unamused":{"id":"unamused","name":"Unamused Face","emoticons":[":("],"keywords":["indifference","bored","straight","serious","sarcasm","unimpressed","skeptical","dubious","side","eye"],"skins":[{"unified":"1f612","native":"😒"}],"version":1},"face_with_rolling_eyes":{"id":"face_with_rolling_eyes","name":"Face with Rolling Eyes","keywords":["eyeroll","frustrated"],"skins":[{"unified":"1f644","native":"🙄"}],"version":1},"grimacing":{"id":"grimacing","name":"Grimacing Face","keywords":["grimace","teeth"],"skins":[{"unified":"1f62c","native":"😬"}],"version":1},"face_exhaling":{"id":"face_exhaling","name":"Face Exhaling","keywords":["relieve","relief","tired","sigh"],"skins":[{"unified":"1f62e-200d-1f4a8","native":"😮‍💨"}],"version":13.1},"lying_face":{"id":"lying_face","name":"Lying Face","keywords":["lie","pinocchio"],"skins":[{"unified":"1f925","native":"🤥"}],"version":3},"shaking_face":{"id":"shaking_face","name":"Shaking Face","keywords":["dizzy","shock","blurry","earthquake"],"skins":[{"unified":"1fae8","native":"🫨"}],"version":15},"relieved":{"id":"relieved","name":"Relieved Face","keywords":["relaxed","phew","massage","happiness"],"skins":[{"unified":"1f60c","native":"😌"}],"version":1},"pensive":{"id":"pensive","name":"Pensive Face","keywords":["sad","depressed","upset"],"skins":[{"unified":"1f614","native":"😔"}],"version":1},"sleepy":{"id":"sleepy","name":"Sleepy Face","keywords":["tired","rest","nap"],"skins":[{"unified":"1f62a","native":"😪"}],"version":1},"drooling_face":{"id":"drooling_face","name":"Drooling Face","keywords":[],"skins":[{"unified":"1f924","native":"🤤"}],"version":3},"sleeping":{"id":"sleeping","name":"Sleeping Face","keywords":["tired","sleepy","night","zzz"],"skins":[{"unified":"1f634","native":"😴"}],"version":1},"mask":{"id":"mask","name":"Face with Medical Mask","keywords":["sick","ill","disease","covid"],"skins":[{"unified":"1f637","native":"😷"}],"version":1},"face_with_thermometer":{"id":"face_with_thermometer","name":"Face with Thermometer","keywords":["sick","temperature","cold","fever","covid"],"skins":[{"unified":"1f912","native":"🤒"}],"version":1},"face_with_head_bandage":{"id":"face_with_head_bandage","name":"Face with Head-Bandage","keywords":["head","bandage","injured","clumsy","hurt"],"skins":[{"unified":"1f915","native":"🤕"}],"version":1},"nauseated_face":{"id":"nauseated_face","name":"Nauseated Face","keywords":["vomit","gross","green","sick","throw","up","ill"],"skins":[{"unified":"1f922","native":"🤢"}],"version":3},"face_vomiting":{"id":"face_vomiting","name":"Face Vomiting","keywords":["with","open","mouth","sick"],"skins":[{"unified":"1f92e","native":"🤮"}],"version":5},"sneezing_face":{"id":"sneezing_face","name":"Sneezing Face","keywords":["gesundheit","sneeze","sick","allergy"],"skins":[{"unified":"1f927","native":"🤧"}],"version":3},"hot_face":{"id":"hot_face","name":"Hot Face","keywords":["feverish","heat","red","sweating"],"skins":[{"unified":"1f975","native":"🥵"}],"version":11},"cold_face":{"id":"cold_face","name":"Cold Face","keywords":["blue","freezing","frozen","frostbite","icicles"],"skins":[{"unified":"1f976","native":"🥶"}],"version":11},"woozy_face":{"id":"woozy_face","name":"Woozy Face","keywords":["dizzy","intoxicated","tipsy","wavy"],"skins":[{"unified":"1f974","native":"🥴"}],"version":11},"dizzy_face":{"id":"dizzy_face","name":"Dizzy Face","keywords":["spent","unconscious","xox"],"skins":[{"unified":"1f635","native":"😵"}],"version":1},"face_with_spiral_eyes":{"id":"face_with_spiral_eyes","name":"Face with Spiral Eyes","keywords":["sick","ill","confused","nauseous","nausea"],"skins":[{"unified":"1f635-200d-1f4ab","native":"😵‍💫"}],"version":13.1},"exploding_head":{"id":"exploding_head","name":"Exploding Head","keywords":["shocked","face","with","mind","blown"],"skins":[{"unified":"1f92f","native":"🤯"}],"version":5},"face_with_cowboy_hat":{"id":"face_with_cowboy_hat","name":"Cowboy Hat Face","keywords":["with","cowgirl"],"skins":[{"unified":"1f920","native":"🤠"}],"version":3},"partying_face":{"id":"partying_face","name":"Partying Face","keywords":["celebration","woohoo"],"skins":[{"unified":"1f973","native":"🥳"}],"version":11},"disguised_face":{"id":"disguised_face","name":"Disguised Face","keywords":["pretent","brows","glasses","moustache"],"skins":[{"unified":"1f978","native":"🥸"}],"version":13},"sunglasses":{"id":"sunglasses","name":"Smiling Face with Sunglasses","emoticons":["8)"],"keywords":["cool","smile","summer","beach","sunglass"],"skins":[{"unified":"1f60e","native":"😎"}],"version":1},"nerd_face":{"id":"nerd_face","name":"Nerd Face","keywords":["nerdy","geek","dork"],"skins":[{"unified":"1f913","native":"🤓"}],"version":1},"face_with_monocle":{"id":"face_with_monocle","name":"Face with Monocle","keywords":["stuffy","wealthy"],"skins":[{"unified":"1f9d0","native":"🧐"}],"version":5},"confused":{"id":"confused","name":"Confused Face","emoticons":[":\\\\",":-\\\\",":/",":-/"],"keywords":["indifference","huh","weird","hmmm",":/"],"skins":[{"unified":"1f615","native":"😕"}],"version":1},"face_with_diagonal_mouth":{"id":"face_with_diagonal_mouth","name":"Face with Diagonal Mouth","keywords":["skeptic","confuse","frustrated","indifferent"],"skins":[{"unified":"1fae4","native":"🫤"}],"version":14},"worried":{"id":"worried","name":"Worried Face","keywords":["concern","nervous",":("],"skins":[{"unified":"1f61f","native":"😟"}],"version":1},"slightly_frowning_face":{"id":"slightly_frowning_face","name":"Slightly Frowning Face","keywords":["disappointed","sad","upset"],"skins":[{"unified":"1f641","native":"🙁"}],"version":1},"white_frowning_face":{"id":"white_frowning_face","name":"Frowning Face","keywords":["white","sad","upset","frown"],"skins":[{"unified":"2639-fe0f","native":"☹️"}],"version":1},"open_mouth":{"id":"open_mouth","name":"Face with Open Mouth","emoticons":[":o",":-o",":O",":-O"],"keywords":["surprise","impressed","wow","whoa",":O"],"skins":[{"unified":"1f62e","native":"😮"}],"version":1},"hushed":{"id":"hushed","name":"Hushed Face","keywords":["woo","shh"],"skins":[{"unified":"1f62f","native":"😯"}],"version":1},"astonished":{"id":"astonished","name":"Astonished Face","keywords":["xox","surprised","poisoned"],"skins":[{"unified":"1f632","native":"😲"}],"version":1},"flushed":{"id":"flushed","name":"Flushed Face","keywords":["blush","shy","flattered"],"skins":[{"unified":"1f633","native":"😳"}],"version":1},"pleading_face":{"id":"pleading_face","name":"Pleading Face","keywords":["begging","mercy","cry","tears","sad","grievance"],"skins":[{"unified":"1f97a","native":"🥺"}],"version":11},"face_holding_back_tears":{"id":"face_holding_back_tears","name":"Face Holding Back Tears","keywords":["touched","gratitude","cry"],"skins":[{"unified":"1f979","native":"🥹"}],"version":14},"frowning":{"id":"frowning","name":"Frowning Face with Open Mouth","keywords":["aw","what"],"skins":[{"unified":"1f626","native":"😦"}],"version":1},"anguished":{"id":"anguished","name":"Anguished Face","emoticons":["D:"],"keywords":["stunned","nervous"],"skins":[{"unified":"1f627","native":"😧"}],"version":1},"fearful":{"id":"fearful","name":"Fearful Face","keywords":["scared","terrified","nervous"],"skins":[{"unified":"1f628","native":"😨"}],"version":1},"cold_sweat":{"id":"cold_sweat","name":"Anxious Face with Sweat","keywords":["cold","nervous"],"skins":[{"unified":"1f630","native":"😰"}],"version":1},"disappointed_relieved":{"id":"disappointed_relieved","name":"Sad but Relieved Face","keywords":["disappointed","phew","sweat","nervous"],"skins":[{"unified":"1f625","native":"😥"}],"version":1},"cry":{"id":"cry","name":"Crying Face","emoticons":[":'("],"keywords":["cry","tears","sad","depressed","upset",":'("],"skins":[{"unified":"1f622","native":"😢"}],"version":1},"sob":{"id":"sob","name":"Loudly Crying Face","emoticons":[":'("],"keywords":["sob","cry","tears","sad","upset","depressed"],"skins":[{"unified":"1f62d","native":"😭"}],"version":1},"scream":{"id":"scream","name":"Face Screaming in Fear","keywords":["scream","munch","scared","omg"],"skins":[{"unified":"1f631","native":"😱"}],"version":1},"confounded":{"id":"confounded","name":"Confounded Face","keywords":["confused","sick","unwell","oops",":S"],"skins":[{"unified":"1f616","native":"😖"}],"version":1},"persevere":{"id":"persevere","name":"Persevering Face","keywords":["persevere","sick","no","upset","oops"],"skins":[{"unified":"1f623","native":"😣"}],"version":1},"disappointed":{"id":"disappointed","name":"Disappointed Face","emoticons":["):",":(",":-("],"keywords":["sad","upset","depressed",":("],"skins":[{"unified":"1f61e","native":"😞"}],"version":1},"sweat":{"id":"sweat","name":"Face with Cold Sweat","keywords":["downcast","hot","sad","tired","exercise"],"skins":[{"unified":"1f613","native":"😓"}],"version":1},"weary":{"id":"weary","name":"Weary Face","keywords":["tired","sleepy","sad","frustrated","upset"],"skins":[{"unified":"1f629","native":"😩"}],"version":1},"tired_face":{"id":"tired_face","name":"Tired Face","keywords":["sick","whine","upset","frustrated"],"skins":[{"unified":"1f62b","native":"😫"}],"version":1},"yawning_face":{"id":"yawning_face","name":"Yawning Face","keywords":["tired","sleepy"],"skins":[{"unified":"1f971","native":"🥱"}],"version":12},"triumph":{"id":"triumph","name":"Face with Look of Triumph","keywords":["steam","from","nose","gas","phew","proud","pride"],"skins":[{"unified":"1f624","native":"😤"}],"version":1},"rage":{"id":"rage","name":"Pouting Face","keywords":["rage","angry","mad","hate","despise"],"skins":[{"unified":"1f621","native":"😡"}],"version":1},"angry":{"id":"angry","name":"Angry Face","emoticons":[">:(",">:-("],"keywords":["mad","annoyed","frustrated"],"skins":[{"unified":"1f620","native":"😠"}],"version":1},"face_with_symbols_on_mouth":{"id":"face_with_symbols_on_mouth","name":"Face with Symbols on Mouth","keywords":["serious","covering","swearing","cursing","cussing","profanity","expletive"],"skins":[{"unified":"1f92c","native":"🤬"}],"version":5},"smiling_imp":{"id":"smiling_imp","name":"Smiling Face with Horns","keywords":["imp","devil"],"skins":[{"unified":"1f608","native":"😈"}],"version":1},"imp":{"id":"imp","name":"Imp","keywords":["angry","face","with","horns","devil"],"skins":[{"unified":"1f47f","native":"👿"}],"version":1},"skull":{"id":"skull","name":"Skull","keywords":["dead","skeleton","creepy","death"],"skins":[{"unified":"1f480","native":"💀"}],"version":1},"skull_and_crossbones":{"id":"skull_and_crossbones","name":"Skull and Crossbones","keywords":["poison","danger","deadly","scary","death","pirate","evil"],"skins":[{"unified":"2620-fe0f","native":"☠️"}],"version":1},"hankey":{"id":"hankey","name":"Pile of Poo","keywords":["hankey","poop","shit","shitface","fail","turd"],"skins":[{"unified":"1f4a9","native":"💩"}],"version":1},"clown_face":{"id":"clown_face","name":"Clown Face","keywords":[],"skins":[{"unified":"1f921","native":"🤡"}],"version":3},"japanese_ogre":{"id":"japanese_ogre","name":"Ogre","keywords":["japanese","monster","red","mask","halloween","scary","creepy","devil","demon"],"skins":[{"unified":"1f479","native":"👹"}],"version":1},"japanese_goblin":{"id":"japanese_goblin","name":"Goblin","keywords":["japanese","red","evil","mask","monster","scary","creepy"],"skins":[{"unified":"1f47a","native":"👺"}],"version":1},"ghost":{"id":"ghost","name":"Ghost","keywords":["halloween","spooky","scary"],"skins":[{"unified":"1f47b","native":"👻"}],"version":1},"alien":{"id":"alien","name":"Alien","keywords":["UFO","paul","weird","outer","space"],"skins":[{"unified":"1f47d","native":"👽"}],"version":1},"space_invader":{"id":"space_invader","name":"Alien Monster","keywords":["space","invader","game","arcade","play"],"skins":[{"unified":"1f47e","native":"👾"}],"version":1},"robot_face":{"id":"robot_face","name":"Robot","keywords":["face","computer","machine","bot"],"skins":[{"unified":"1f916","native":"🤖"}],"version":1},"smiley_cat":{"id":"smiley_cat","name":"Grinning Cat","keywords":["smiley","animal","cats","happy","smile"],"skins":[{"unified":"1f63a","native":"😺"}],"version":1},"smile_cat":{"id":"smile_cat","name":"Grinning Cat with Smiling Eyes","keywords":["smile","animal","cats"],"skins":[{"unified":"1f638","native":"😸"}],"version":1},"joy_cat":{"id":"joy_cat","name":"Cat with Tears of Joy","keywords":["animal","cats","haha","happy"],"skins":[{"unified":"1f639","native":"😹"}],"version":1},"heart_eyes_cat":{"id":"heart_eyes_cat","name":"Smiling Cat with Heart-Eyes","keywords":["heart","eyes","animal","love","like","affection","cats","valentines"],"skins":[{"unified":"1f63b","native":"😻"}],"version":1},"smirk_cat":{"id":"smirk_cat","name":"Cat with Wry Smile","keywords":["smirk","animal","cats"],"skins":[{"unified":"1f63c","native":"😼"}],"version":1},"kissing_cat":{"id":"kissing_cat","name":"Kissing Cat","keywords":["animal","cats","kiss"],"skins":[{"unified":"1f63d","native":"😽"}],"version":1},"scream_cat":{"id":"scream_cat","name":"Weary Cat","keywords":["scream","animal","cats","munch","scared"],"skins":[{"unified":"1f640","native":"🙀"}],"version":1},"crying_cat_face":{"id":"crying_cat_face","name":"Crying Cat","keywords":["face","animal","tears","weep","sad","cats","upset","cry"],"skins":[{"unified":"1f63f","native":"😿"}],"version":1},"pouting_cat":{"id":"pouting_cat","name":"Pouting Cat","keywords":["animal","cats"],"skins":[{"unified":"1f63e","native":"😾"}],"version":1},"see_no_evil":{"id":"see_no_evil","name":"See-No-Evil Monkey","keywords":["see","no","evil","animal","nature","haha"],"skins":[{"unified":"1f648","native":"🙈"}],"version":1},"hear_no_evil":{"id":"hear_no_evil","name":"Hear-No-Evil Monkey","keywords":["hear","no","evil","animal","nature"],"skins":[{"unified":"1f649","native":"🙉"}],"version":1},"speak_no_evil":{"id":"speak_no_evil","name":"Speak-No-Evil Monkey","keywords":["speak","no","evil","animal","nature","omg"],"skins":[{"unified":"1f64a","native":"🙊"}],"version":1},"love_letter":{"id":"love_letter","name":"Love Letter","keywords":["email","like","affection","envelope","valentines"],"skins":[{"unified":"1f48c","native":"💌"}],"version":1},"cupid":{"id":"cupid","name":"Heart with Arrow","keywords":["cupid","love","like","affection","valentines"],"skins":[{"unified":"1f498","native":"💘"}],"version":1},"gift_heart":{"id":"gift_heart","name":"Heart with Ribbon","keywords":["gift","love","valentines"],"skins":[{"unified":"1f49d","native":"💝"}],"version":1},"sparkling_heart":{"id":"sparkling_heart","name":"Sparkling Heart","keywords":["love","like","affection","valentines"],"skins":[{"unified":"1f496","native":"💖"}],"version":1},"heartpulse":{"id":"heartpulse","name":"Growing Heart","keywords":["heartpulse","like","love","affection","valentines","pink"],"skins":[{"unified":"1f497","native":"💗"}],"version":1},"heartbeat":{"id":"heartbeat","name":"Beating Heart","keywords":["heartbeat","love","like","affection","valentines","pink"],"skins":[{"unified":"1f493","native":"💓"}],"version":1},"revolving_hearts":{"id":"revolving_hearts","name":"Revolving Hearts","keywords":["love","like","affection","valentines"],"skins":[{"unified":"1f49e","native":"💞"}],"version":1},"two_hearts":{"id":"two_hearts","name":"Two Hearts","keywords":["love","like","affection","valentines","heart"],"skins":[{"unified":"1f495","native":"💕"}],"version":1},"heart_decoration":{"id":"heart_decoration","name":"Heart Decoration","keywords":["purple","square","love","like"],"skins":[{"unified":"1f49f","native":"💟"}],"version":1},"heavy_heart_exclamation_mark_ornament":{"id":"heavy_heart_exclamation_mark_ornament","name":"Heart Exclamation","keywords":["heavy","mark","ornament","decoration","love"],"skins":[{"unified":"2763-fe0f","native":"❣️"}],"version":1},"broken_heart":{"id":"broken_heart","name":"Broken Heart","emoticons":["2&&(o.children=arguments.length>3?yb.call(arguments,2):t),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return Hg(e,o,i,r,null)}function Hg(e,n,t,i,r){var a={type:e,props:n,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:r??++AG};return r==null&&An.vnode!=null&&An.vnode(a),a}function Wo(){return{current:null}}function zf(e){return e.children}function co(e,n){this.props=e,this.context=n}function Lf(e,n){if(n==null)return e.__?Lf(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n0?Hg(g.type,g.props,g.key,null,g.__v):g)!=null){if(g.__=t,g.__b=t.__b+1,(p=_[h])===null||p&&g.key==p.key&&g.type===p.type)_[h]=void 0;else for(d=0;d{let e=null;try{navigator.userAgent.includes("jsdom")||(e=document.createElement("canvas").getContext("2d",{willReadFrequently:!0}))}catch{}if(!e)return()=>!1;const n=25,t=20,i=Math.floor(n/2);return e.font=i+"px Arial, Sans-Serif",e.textBaseline="top",e.canvas.width=t*2,e.canvas.height=n,r=>{e.clearRect(0,0,t*2,n),e.fillStyle="#FF0000",e.fillText(r,0,22),e.fillStyle="#0000FF",e.fillText(r,t,22);const a=e.getImageData(0,0,t,n).data,o=a.length;let l=0;for(;l=o)return!1;const u=t+l/4%t,f=Math.floor(l/4/t),h=e.getImageData(u,f,1,1).data;return!(a[l]!==h[0]||a[l+2]!==h[2]||e.measureText(r).width>=t)}})();var yz={latestVersion:AAe,noCountryFlags:OAe};const H6=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"];let Hi=null;function EAe(e){Hi||(Hi=yl.get("frequently")||{});const n=e.id||e;n&&(Hi[n]||(Hi[n]=0),Hi[n]+=1,yl.set("last",n),yl.set("frequently",Hi))}function MAe({maxFrequentRows:e,perLine:n}){if(!e)return[];Hi||(Hi=yl.get("frequently"));let t=[];if(!Hi){Hi={};for(let a in H6.slice(0,n)){const o=H6[a];Hi[o]=n-a,t.push(o)}return t}const i=e*n,r=yl.get("last");for(let a in Hi)t.push(a);if(t.sort((a,o)=>{const l=Hi[o],u=Hi[a];return l==u?a.localeCompare(o):l-u}),t.length>i){const a=t.slice(i);t=t.slice(0,i);for(let o of a)o!=r&&delete Hi[o];r&&t.indexOf(r)==-1&&(delete Hi[t[t.length-1]],t.splice(-1,1,r)),yl.set("frequently",Hi)}return t}var BG={add:EAe,get:MAe,DEFAULTS:H6},FG={};FG=JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn’t be found","pick":"Pick an emoji…","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}');var Yo={autoFocus:{value:!1},dynamicWidth:{value:!1},emojiButtonColors:{value:null},emojiButtonRadius:{value:"100%"},emojiButtonSize:{value:36},emojiSize:{value:24},emojiVersion:{value:15,choices:[1,2,3,4,5,11,12,12.1,13,13.1,14,15]},exceptEmojis:{value:[]},icons:{value:"auto",choices:["auto","outline","solid"]},locale:{value:"en",choices:["en","ar","be","cs","de","es","fa","fi","fr","hi","it","ja","ko","nl","pl","pt","ru","sa","tr","uk","vi","zh"]},maxFrequentRows:{value:4},navPosition:{value:"top",choices:["top","bottom","none"]},noCountryFlags:{value:!1},noResultsEmoji:{value:null},perLine:{value:9},previewEmoji:{value:null},previewPosition:{value:"bottom",choices:["top","bottom","none"]},searchPosition:{value:"sticky",choices:["sticky","static","none"]},set:{value:"native",choices:["native","apple","facebook","google","twitter"]},skin:{value:1,choices:[1,2,3,4,5,6]},skinTonePosition:{value:"preview",choices:["preview","search","none"]},theme:{value:"auto",choices:["auto","light","dark"]},categories:null,categoryIcons:null,custom:null,data:null,i18n:null,getImageURL:null,getSpritesheetURL:null,onAddCustomEmoji:null,onClickOutside:null,onEmojiSelect:null,stickySearch:{deprecated:!0,value:!0}};let Ki=null,it=null;const xS={};async function bz(e){if(xS[e])return xS[e];const t=await(await fetch(e)).json();return xS[e]=t,t}let SS=null,qG=null,HG=!1;function bb(e,{caller:n}={}){return SS||(SS=new Promise(t=>{qG=t})),e?DAe(e):n&&!HG&&console.warn(`\`${n}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`),SS}async function DAe(e){HG=!0;let{emojiVersion:n,set:t,locale:i}=e;if(n||(n=Yo.emojiVersion.value),t||(t=Yo.set.value),i||(i=Yo.locale.value),it)it.categories=it.categories.filter(u=>!u.name);else{it=(typeof e.data=="function"?await e.data():e.data)||await bz(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${n}/${t}.json`),it.emoticons={},it.natives={},it.categories.unshift({id:"frequent",emojis:[]});for(const u in it.aliases){const f=it.aliases[u],h=it.emojis[f];h&&(h.aliases||(h.aliases=[]),h.aliases.push(u))}it.originalCategories=it.categories}if(Ki=(typeof e.i18n=="function"?await e.i18n():e.i18n)||(i=="en"?jG(FG):await bz(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${i}.json`)),e.custom)for(let u in e.custom){u=parseInt(u);const f=e.custom[u],h=e.custom[u-1];if(!(!f.emojis||!f.emojis.length)){f.id||(f.id=`custom_${u+1}`),f.name||(f.name=Ki.categories.custom),h&&!f.icon&&(f.target=h.target||h),it.categories.push(f);for(const d of f.emojis)it.emojis[d.id]=d}}e.categories&&(it.categories=it.originalCategories.filter(u=>e.categories.indexOf(u.id)!=-1).sort((u,f)=>{const h=e.categories.indexOf(u.id),d=e.categories.indexOf(f.id);return h-d}));let r=null,a=null;t=="native"&&(r=yz.latestVersion(),a=e.noCountryFlags||yz.noCountryFlags());let o=it.categories.length,l=!1;for(;o--;){const u=it.categories[o];if(u.id=="frequent"){let{maxFrequentRows:d,perLine:p}=e;d=d>=0?d:Yo.maxFrequentRows.value,p||(p=Yo.perLine.value),u.emojis=BG.get({maxFrequentRows:d,perLine:p})}if(!u.emojis||!u.emojis.length){it.categories.splice(o,1);continue}const{categoryIcons:f}=e;if(f){const d=f[u.id];d&&!u.icon&&(u.icon=d)}let h=u.emojis.length;for(;h--;){const d=u.emojis[h],p=d.id?d:it.emojis[d],g=()=>{u.emojis.splice(h,1)};if(!p||e.exceptEmojis&&e.exceptEmojis.includes(p.id)){g();continue}if(r&&p.version>r){g();continue}if(a&&u.id=="flags"&&!zAe.includes(p.id)){g();continue}if(!p.search){if(l=!0,p.search=","+[[p.id,!1],[p.name,!0],[p.keywords,!1],[p.emoticons,!1]].map(([w,k])=>{if(w)return(Array.isArray(w)?w:[w]).map(_=>(k?_.split(/[-|_|\s]+/):[_]).map(S=>S.toLowerCase())).flat()}).flat().filter(w=>w&&w.trim()).join(","),p.emoticons)for(const w of p.emoticons)it.emoticons[w]||(it.emoticons[w]=p.id);let b=0;for(const w of p.skins){if(!w)continue;b++;const{native:k}=w;k&&(it.natives[k]=p.id,p.search+=`,${k}`);const _=b==1?"":`:skin-tone-${b}:`;w.shortcodes=`:${p.id}:${_}`}}}}l&&af.reset(),qG()}function UG(e,n,t){e||(e={});const i={};for(let r in n)i[r]=VG(r,e,n,t);return i}function VG(e,n,t,i){const r=t[e];let a=i&&i.getAttribute(e)||(n[e]!=null&&n[e]!=null?n[e]:null);return r&&(a!=null&&r.value&&typeof r.value!=typeof a&&(typeof r.value=="boolean"?a=a!="false":a=r.value.constructor(a)),r.transform&&a&&(a=r.transform(a)),(a==null||r.choices&&r.choices.indexOf(a)==-1)&&(a=r.value)),a}const RAe=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/;let U6=null;function PAe(e){return e.id?e:it.emojis[e]||it.emojis[it.aliases[e]]||it.emojis[it.natives[e]]}function NAe(){U6=null}async function $Ae(e,{maxResults:n,caller:t}={}){if(!e||!e.trim().length)return null;n||(n=90),await bb(null,{caller:t||"SearchIndex.search"});const i=e.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter((l,u,f)=>l.trim()&&f.indexOf(l)==u);if(!i.length)return;let r=U6||(U6=Object.values(it.emojis)),a,o;for(const l of i){if(!r.length)break;a=[],o={};for(const u of r){if(!u.search)continue;const f=u.search.indexOf(`,${l}`);f!=-1&&(a.push(u),o[u.id]||(o[u.id]=0),o[u.id]+=u.id==l?0:f+1)}r=a}return a.length<2||(a.sort((l,u)=>{const f=o[l.id],h=o[u.id];return f==h?l.id.localeCompare(u.id):f-h}),a.length>n&&(a=a.slice(0,n))),a}var af={search:$Ae,get:PAe,reset:NAe,SHORTCODES_REGEX:RAe};const zAe=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];function LAe(e,n){return Array.isArray(e)&&Array.isArray(n)&&e.length===n.length&&e.every((t,i)=>t==n[i])}async function IAe(e=1){for(let n in[...Array(e).keys()])await new Promise(requestAnimationFrame)}function BAe(e,{skinIndex:n=0}={}){const t=e.skins[n]||(n=0,e.skins[n]),i={id:e.id,name:e.name,native:t.native,unified:t.unified,keywords:e.keywords,shortcodes:t.shortcodes||e.shortcodes};return e.skins.length>1&&(i.skin=n+1),t.src&&(i.src=t.src),e.aliases&&e.aliases.length&&(i.aliases=e.aliases),e.emoticons&&e.emoticons.length&&(i.emoticons=e.emoticons),i}const FAe={activity:{outline:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Le("path",{d:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"})}),solid:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Le("path",{d:"M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"})})},custom:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:Le("path",{d:"M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"})}),flags:{outline:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Le("path",{d:"M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"})}),solid:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Le("path",{d:"M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"})})},foods:{outline:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Le("path",{d:"M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"})}),solid:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Le("path",{d:"M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z"})})},frequent:{outline:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Le("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),Le("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})]}),solid:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Le("path",{d:"M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"})})},nature:{outline:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Le("path",{d:"M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"}),Le("path",{d:"M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"})]}),solid:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:Le("path",{d:"M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z"})})},objects:{outline:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Le("path",{d:"M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"}),Le("path",{d:"M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"})]}),solid:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:Le("path",{d:"M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"})})},people:{outline:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Le("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"}),Le("path",{d:"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"})]}),solid:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Le("path",{d:"M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z"})})},places:{outline:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Le("path",{d:"M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"}),Le("path",{d:"M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"})]}),solid:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Le("path",{d:"M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z"})})},symbols:{outline:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Le("path",{d:"M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"})}),solid:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Le("path",{d:"M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"})})}},qAe={loupe:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:Le("path",{d:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"})}),delete:Le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:Le("path",{d:"M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"})})};var wy={categories:FAe,search:qAe};function V6(e){let{id:n,skin:t,emoji:i}=e;if(e.shortcodes){const l=e.shortcodes.match(af.SHORTCODES_REGEX);l&&(n=l[1],l[2]&&(t=l[2]))}if(i||(i=af.get(n||e.native)),!i)return e.fallback;const r=i.skins[t-1]||i.skins[0],a=r.src||(e.set!="native"&&!e.spritesheet?typeof e.getImageURL=="function"?e.getImageURL(e.set,r.unified):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@15.0.1/img/${e.set}/64/${r.unified}.png`:void 0),o=typeof e.getSpritesheetURL=="function"?e.getSpritesheetURL(e.set):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@15.0.1/img/${e.set}/sheets-256/64.png`;return Le("span",{class:"emoji-mart-emoji","data-emoji-set":e.set,children:a?Le("img",{style:{maxWidth:e.size||"1em",maxHeight:e.size||"1em",display:"inline-block"},alt:r.native||r.shortcodes,src:a}):e.set=="native"?Le("span",{style:{fontSize:e.size,fontFamily:'"EmojiMart", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"'},children:r.native}):Le("span",{style:{display:"block",width:e.size,height:e.size,backgroundImage:`url(${o})`,backgroundSize:`${100*it.sheet.cols}% ${100*it.sheet.rows}%`,backgroundPosition:`${100/(it.sheet.cols-1)*r.x}% ${100/(it.sheet.rows-1)*r.y}%`}})})}const HAe=typeof window<"u"&&window.HTMLElement?window.HTMLElement:Object;class WG extends HAe{static get observedAttributes(){return Object.keys(this.Props)}update(n={}){for(let t in n)this.attributeChangedCallback(t,null,n[t])}attributeChangedCallback(n,t,i){if(!this.component)return;const r=VG(n,{[n]:i},this.constructor.Props,this);this.component.componentWillReceiveProps?this.component.componentWillReceiveProps({[n]:r}):(this.component.props[n]=r,this.component.forceUpdate())}disconnectedCallback(){this.disconnected=!0,this.component&&this.component.unregister&&this.component.unregister()}constructor(n={}){if(super(),this.props=n,n.parent||n.ref){let t=null;const i=n.parent||(t=n.ref&&n.ref.current);t&&(t.innerHTML=""),i&&i.appendChild(this)}}}class UAe extends WG{setShadow(){this.attachShadow({mode:"open"})}injectStyles(n){if(!n)return;const t=document.createElement("style");t.textContent=n,this.shadowRoot.insertBefore(t,this.shadowRoot.firstChild)}constructor(n,{styles:t}={}){super(n),this.setShadow(),this.injectStyles(t)}}var GG={fallback:"",id:"",native:"",shortcodes:"",size:{value:"",transform:e=>/\D/.test(e)?e:`${e}px`},set:Yo.set,skin:Yo.skin};class YG extends WG{async connectedCallback(){const n=UG(this.props,GG,this);n.element=this,n.ref=t=>{this.component=t},await bb(),!this.disconnected&&LG(Le(V6,{...n}),this)}constructor(n){super(n)}}ha(YG,"Props",GG);typeof customElements<"u"&&!customElements.get("em-emoji")&&customElements.define("em-emoji",YG);var wz,W6=[],kz=An.__b,_z=An.__r,xz=An.diffed,Sz=An.__c,Cz=An.unmount;function VAe(){var e;for(W6.sort(function(n,t){return n.__v.__b-t.__v.__b});e=W6.pop();)if(e.__P)try{e.__H.__h.forEach(Ug),e.__H.__h.forEach(G6),e.__H.__h=[]}catch(n){e.__H.__h=[],An.__e(n,e.__v)}}An.__b=function(e){kz&&kz(e)},An.__r=function(e){_z&&_z(e);var n=e.__c.__H;n&&(n.__h.forEach(Ug),n.__h.forEach(G6),n.__h=[])},An.diffed=function(e){xz&&xz(e);var n=e.__c;n&&n.__H&&n.__H.__h.length&&(W6.push(n)!==1&&wz===An.requestAnimationFrame||((wz=An.requestAnimationFrame)||function(t){var i,r=function(){clearTimeout(a),jz&&cancelAnimationFrame(i),setTimeout(t)},a=setTimeout(r,100);jz&&(i=requestAnimationFrame(r))})(VAe))},An.__c=function(e,n){n.some(function(t){try{t.__h.forEach(Ug),t.__h=t.__h.filter(function(i){return!i.__||G6(i)})}catch(i){n.some(function(r){r.__h&&(r.__h=[])}),n=[],An.__e(i,t.__v)}}),Sz&&Sz(e,n)},An.unmount=function(e){Cz&&Cz(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach(function(i){try{Ug(i)}catch(r){n=r}}),n&&An.__e(n,t.__v))};var jz=typeof requestAnimationFrame=="function";function Ug(e){var n=e.__c;typeof n=="function"&&(e.__c=void 0,n())}function G6(e){e.__c=e.__()}function WAe(e,n){for(var t in n)e[t]=n[t];return e}function Az(e,n){for(var t in e)if(t!=="__source"&&!(t in n))return!0;for(var i in n)if(i!=="__source"&&e[i]!==n[i])return!0;return!1}function ky(e){this.props=e}(ky.prototype=new co).isPureReactComponent=!0,ky.prototype.shouldComponentUpdate=function(e,n){return Az(this.props,e)||Az(this.state,n)};var Oz=An.__b;An.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Oz&&Oz(e)};var GAe=An.__e;An.__e=function(e,n,t){if(e.then){for(var i,r=n;r=r.__;)if((i=r.__c)&&i.__c)return n.__e==null&&(n.__e=t.__e,n.__k=t.__k),i.__c(e,n)}GAe(e,n,t)};var Tz=An.unmount;function CS(){this.__u=0,this.t=null,this.__b=null}function KG(e){var n=e.__.__c;return n&&n.__e&&n.__e(e)}function Og(){this.u=null,this.o=null}An.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&e.__h===!0&&(e.type=null),Tz&&Tz(e)},(CS.prototype=new co).__c=function(e,n){var t=n.__c,i=this;i.t==null&&(i.t=[]),i.t.push(t);var r=KG(i.__v),a=!1,o=function(){a||(a=!0,t.__R=null,r?r(l):l())};t.__R=o;var l=function(){if(!--i.__u){if(i.state.__e){var f=i.state.__e;i.__v.__k[0]=(function d(p,g,b){return p&&(p.__v=null,p.__k=p.__k&&p.__k.map(function(w){return d(w,g,b)}),p.__c&&p.__c.__P===g&&(p.__e&&b.insertBefore(p.__e,p.__d),p.__c.__e=!0,p.__c.__P=b)),p})(f,f.__c.__P,f.__c.__O)}var h;for(i.setState({__e:i.__b=null});h=i.t.pop();)h.forceUpdate()}},u=n.__h===!0;i.__u++||u||i.setState({__e:i.__b=i.__v.__k[0]}),e.then(o,o)},CS.prototype.componentWillUnmount=function(){this.t=[]},CS.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=(function a(o,l,u){return o&&(o.__c&&o.__c.__H&&(o.__c.__H.__.forEach(function(f){typeof f.__c=="function"&&f.__c()}),o.__c.__H=null),(o=WAe({},o)).__c!=null&&(o.__c.__P===u&&(o.__c.__P=l),o.__c=null),o.__k=o.__k&&o.__k.map(function(f){return a(f,l,u)})),o})(this.__b,t,i.__O=i.__P)}this.__b=null}var r=n.__e&&q6(zf,null,e.fallback);return r&&(r.__h=null),[q6(zf,null,n.__e?null:e.children),r]};var Ez=function(e,n,t){if(++t[1]===t[0]&&e.o.delete(n),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(t=e.u;t;){for(;t.length>3;)t.pop()();if(t[1]{const r=t.name||Ki.categories[t.id],a=!this.props.unfocused&&t.id==this.state.categoryId;return a&&(n=i),Le("button",{"aria-label":r,"aria-selected":a||void 0,title:r,type:"button",class:"flex flex-grow flex-center",onMouseDown:o=>o.preventDefault(),onClick:()=>{this.props.onClick({category:t,i})},children:this.renderIcon(t)})}),Le("div",{class:"bar",style:{width:`${100/this.categories.length}%`,opacity:n==null?0:1,transform:this.props.dir==="rtl"?`scaleX(-1) translateX(${n*100}%)`:`translateX(${n*100}%)`}})]})})}constructor(){super(),this.categories=it.categories.filter(n=>!n.target),this.state={categoryId:this.categories[0].id}}}class iOe extends ky{shouldComponentUpdate(n){for(let t in n)if(t!="children"&&n[t]!=this.props[t])return!0;return!1}render(){return this.props.children}}const Tg={rowsPerRender:10};class rOe extends co{getInitialState(n=this.props){return{skin:yl.get("skin")||n.skin,theme:this.initTheme(n.theme)}}componentWillMount(){this.dir=Ki.rtl?"rtl":"ltr",this.refs={menu:Wo(),navigation:Wo(),scroll:Wo(),search:Wo(),searchInput:Wo(),skinToneButton:Wo(),skinToneRadio:Wo()},this.initGrid(),this.props.stickySearch==!1&&this.props.searchPosition=="sticky"&&(console.warn("[EmojiMart] Deprecation warning: `stickySearch` has been renamed `searchPosition`."),this.props.searchPosition="static")}componentDidMount(){if(this.register(),this.shadowRoot=this.base.parentNode,this.props.autoFocus){const{searchInput:n}=this.refs;n.current&&n.current.focus()}}componentWillReceiveProps(n){this.nextState||(this.nextState={});for(const t in n)this.nextState[t]=n[t];clearTimeout(this.nextStateTimer),this.nextStateTimer=setTimeout(()=>{let t=!1;for(const r in this.nextState)this.props[r]=this.nextState[r],(r==="custom"||r==="categories")&&(t=!0);delete this.nextState;const i=this.getInitialState();if(t)return this.reset(i);this.setState(i)})}componentWillUnmount(){this.unregister()}async reset(n={}){await bb(this.props),this.initGrid(),this.unobserve(),this.setState(n,()=>{this.observeCategories(),this.observeRows()})}register(){document.addEventListener("click",this.handleClickOutside),this.observe()}unregister(){var n;document.removeEventListener("click",this.handleClickOutside),(n=this.darkMedia)==null||n.removeEventListener("change",this.darkMediaCallback),this.unobserve()}observe(){this.observeCategories(),this.observeRows()}unobserve({except:n=[]}={}){Array.isArray(n)||(n=[n]);for(const t of this.observers)n.includes(t)||t.disconnect();this.observers=[].concat(n)}initGrid(){const{categories:n}=it;this.refs.categories=new Map;const t=it.categories.map(r=>r.id).join(",");this.navKey&&this.navKey!=t&&this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0),this.navKey=t,this.grid=[],this.grid.setsize=0;const i=(r,a)=>{const o=[];o.__categoryId=a.id,o.__index=r.length,this.grid.push(o);const l=this.grid.length-1,u=l%Tg.rowsPerRender?{}:Wo();return u.index=l,u.posinset=this.grid.setsize+1,r.push(u),o};for(let r of n){const a=[];let o=i(a,r);for(let l of r.emojis)o.length==this.getPerLine()&&(o=i(a,r)),this.grid.setsize+=1,o.push(l);this.refs.categories.set(r.id,{root:Wo(),rows:a})}}initTheme(n){if(n!="auto")return n;if(!this.darkMedia){if(this.darkMedia=matchMedia("(prefers-color-scheme: dark)"),this.darkMedia.media.match(/^not/))return"light";this.darkMedia.addEventListener("change",this.darkMediaCallback)}return this.darkMedia.matches?"dark":"light"}initDynamicPerLine(n=this.props){if(!n.dynamicWidth)return;const{element:t,emojiButtonSize:i}=n,r=()=>{const{width:o}=t.getBoundingClientRect();return Math.floor(o/i)},a=new ResizeObserver(()=>{this.unobserve({except:a}),this.setState({perLine:r()},()=>{this.initGrid(),this.forceUpdate(()=>{this.observeCategories(),this.observeRows()})})});return a.observe(t),this.observers.push(a),r()}getPerLine(){return this.state.perLine||this.props.perLine}getEmojiByPos([n,t]){const i=this.state.searchResults||this.grid,r=i[n]&&i[n][t];if(r)return af.get(r)}observeCategories(){const n=this.refs.navigation.current;if(!n)return;const t=new Map,i=o=>{o!=n.state.categoryId&&n.setState({categoryId:o})},r={root:this.refs.scroll.current,threshold:[0,1]},a=new IntersectionObserver(o=>{for(const u of o){const f=u.target.dataset.id;t.set(f,u.intersectionRatio)}const l=[...t];for(const[u,f]of l)if(f){i(u);break}},r);for(const{root:o}of this.refs.categories.values())a.observe(o.current);this.observers.push(a)}observeRows(){const n={...this.state.visibleRows},t=new IntersectionObserver(i=>{for(const r of i){const a=parseInt(r.target.dataset.index);r.isIntersecting?n[a]=!0:delete n[a]}this.setState({visibleRows:n})},{root:this.refs.scroll.current,rootMargin:`${this.props.emojiButtonSize*(Tg.rowsPerRender+5)}px 0px ${this.props.emojiButtonSize*Tg.rowsPerRender}px`});for(const{rows:i}of this.refs.categories.values())for(const r of i)r.current&&t.observe(r.current);this.observers.push(t)}preventDefault(n){n.preventDefault()}unfocusSearch(){const n=this.refs.searchInput.current;n&&n.blur()}navigate({e:n,input:t,left:i,right:r,up:a,down:o}){const l=this.state.searchResults||this.grid;if(!l.length)return;let[u,f]=this.state.pos;const h=(()=>{if(u==0&&f==0&&!n.repeat&&(i||a))return null;if(u==-1)return!n.repeat&&(r||o)&&t.selectionStart==t.value.length?[0,0]:null;if(i||r){let d=l[u];const p=i?-1:1;if(f+=p,!d[f]){if(u+=p,d=l[u],!d)return u=i?0:l.length-1,f=i?0:l[u].length-1,[u,f];f=i?d.length-1:0}return[u,f]}if(a||o){u+=a?-1:1;const d=l[u];return d?(d[f]||(f=d.length-1),[u,f]):(u=a?0:l.length-1,f=a?0:l[u].length-1,[u,f])}})();if(h)n.preventDefault();else{this.state.pos[0]>-1&&this.setState({pos:[-1,-1]});return}this.setState({pos:h,keyboard:!0},()=>{this.scrollTo({row:h[0]})})}scrollTo({categoryId:n,row:t}){const i=this.state.searchResults||this.grid;if(!i.length)return;const r=this.refs.scroll.current,a=r.getBoundingClientRect();let o=0;if(t>=0&&(n=i[t].__categoryId),n&&(o=(this.refs[n]||this.refs.categories.get(n).root).current.getBoundingClientRect().top-(a.top-r.scrollTop)+1),t>=0)if(!t)o=0;else{const l=i[t].__index,u=o+l*this.props.emojiButtonSize,f=u+this.props.emojiButtonSize+this.props.emojiButtonSize*.88;if(ur.scrollTop+a.height)o=f-a.height;else return}this.ignoreMouse(),r.scrollTop=o}ignoreMouse(){this.mouseIsIgnored=!0,clearTimeout(this.ignoreMouseTimer),this.ignoreMouseTimer=setTimeout(()=>{delete this.mouseIsIgnored},100)}handleEmojiOver(n){this.mouseIsIgnored||this.state.showSkins||this.setState({pos:n||[-1,-1],keyboard:!1})}handleEmojiClick({e:n,emoji:t,pos:i}){if(this.props.onEmojiSelect&&(!t&&i&&(t=this.getEmojiByPos(i)),t)){const r=BAe(t,{skinIndex:this.state.skin-1});this.props.maxFrequentRows&&BG.add(r,this.props),this.props.onEmojiSelect(r,n)}}closeSkins(){this.state.showSkins&&(this.setState({showSkins:null,tempSkin:null}),this.base.removeEventListener("click",this.handleBaseClick),this.base.removeEventListener("keydown",this.handleBaseKeydown))}handleSkinMouseOver(n){this.setState({tempSkin:n})}handleSkinClick(n){this.ignoreMouse(),this.closeSkins(),this.setState({skin:n,tempSkin:null}),yl.set("skin",n)}renderNav(){return Le(tOe,{ref:this.refs.navigation,icons:this.props.icons,theme:this.state.theme,dir:this.dir,unfocused:!!this.state.searchResults,position:this.props.navPosition,onClick:this.handleCategoryClick},this.navKey)}renderPreview(){const n=this.getEmojiByPos(this.state.pos),t=this.state.searchResults&&!this.state.searchResults.length;return Le("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[Le("div",{class:"flex flex-middle flex-grow",children:[Le("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:Le(V6,{emoji:n,id:t?this.props.noResultsEmoji||"cry":this.props.previewEmoji||(this.props.previewPosition=="top"?"point_down":"point_up"),set:this.props.set,size:this.props.emojiButtonSize,skin:this.state.tempSkin||this.state.skin,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})}),Le("div",{class:`margin-${this.dir[0]}`,children:n||t?Le("div",{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[Le("div",{class:"preview-title ellipsis",children:n?n.name:Ki.search_no_results_1}),Le("div",{class:"preview-subtitle ellipsis color-c",children:n?n.skins[0].shortcodes:Ki.search_no_results_2})]}):Le("div",{class:"preview-placeholder color-c",children:Ki.pick})})]}),!n&&this.props.skinTonePosition=="preview"&&this.renderSkinToneButton()]})}renderEmojiButton(n,{pos:t,posinset:i,grid:r}){const a=this.props.emojiButtonSize,o=this.state.tempSkin||this.state.skin,u=(n.skins[o-1]||n.skins[0]).native,f=LAe(this.state.pos,t),h=t.concat(n.id).join("");return Le(iOe,{selected:f,skin:o,size:a,children:Le("button",{"aria-label":u,"aria-selected":f||void 0,"aria-posinset":i,"aria-setsize":r.setsize,"data-keyboard":this.state.keyboard,title:this.props.previewPosition=="none"?n.name:void 0,type:"button",class:"flex flex-center flex-middle",tabindex:"-1",onClick:d=>this.handleEmojiClick({e:d,emoji:n}),onMouseEnter:()=>this.handleEmojiOver(t),onMouseLeave:()=>this.handleEmojiOver(),style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize,fontSize:this.props.emojiSize,lineHeight:0},children:[Le("div",{"aria-hidden":"true",class:"background",style:{borderRadius:this.props.emojiButtonRadius,backgroundColor:this.props.emojiButtonColors?this.props.emojiButtonColors[(i-1)%this.props.emojiButtonColors.length]:void 0}}),Le(V6,{emoji:n,set:this.props.set,size:this.props.emojiSize,skin:o,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})]})},h)}renderSearch(){const n=this.props.previewPosition=="none"||this.props.skinTonePosition=="search";return Le("div",{children:[Le("div",{class:"spacer"}),Le("div",{class:"flex flex-middle",children:[Le("div",{class:"search relative flex-grow",children:[Le("input",{type:"search",ref:this.refs.searchInput,placeholder:Ki.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown,autoComplete:"off"}),Le("span",{class:"icon loupe flex",children:wy.search.loupe}),this.state.searchResults&&Le("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:wy.search.delete})]}),n&&this.renderSkinToneButton()]})]})}renderSearchResults(){const{searchResults:n}=this.state;return n?Le("div",{class:"category",ref:this.refs.search,children:[Le("div",{class:`sticky padding-small align-${this.dir[0]}`,children:Ki.categories.search}),Le("div",{children:n.length?n.map((t,i)=>Le("div",{class:"flex",children:t.map((r,a)=>this.renderEmojiButton(r,{pos:[i,a],posinset:i*this.props.perLine+a+1,grid:n}))})):Le("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&Le("a",{onClick:this.props.onAddCustomEmoji,children:Ki.add_custom})})})]}):null}renderCategories(){const{categories:n}=it,t=!!this.state.searchResults,i=this.getPerLine();return Le("div",{style:{visibility:t?"hidden":void 0,display:t?"none":void 0,height:"100%"},children:n.map(r=>{const{root:a,rows:o}=this.refs.categories.get(r.id);return Le("div",{"data-id":r.target?r.target.id:r.id,class:"category",ref:a,children:[Le("div",{class:`sticky padding-small align-${this.dir[0]}`,children:r.name||Ki.categories[r.id]}),Le("div",{class:"relative",style:{height:o.length*this.props.emojiButtonSize},children:o.map((l,u)=>{const f=l.index-l.index%Tg.rowsPerRender,h=this.state.visibleRows[f],d="current"in l?l:void 0;if(!h&&!d)return null;const p=u*i,g=p+i,b=r.emojis.slice(p,g);return b.length{if(!w)return Le("div",{style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize}});const _=af.get(w);return this.renderEmojiButton(_,{pos:[l.index,k],posinset:l.posinset+k,grid:this.grid})})},l.index)})})]})})})}renderSkinToneButton(){return this.props.skinTonePosition=="none"?null:Le("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:Le("button",{type:"button",ref:this.refs.skinToneButton,class:"skin-tone-button flex flex-auto flex-center flex-middle","aria-selected":this.state.showSkins?"":void 0,"aria-label":Ki.skins.choose,title:Ki.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:Le("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderLiveRegion(){const n=this.getEmojiByPos(this.state.pos),t=n?n.name:"";return Le("div",{"aria-live":"polite",class:"sr-only",children:t})}renderSkins(){const t=this.refs.skinToneButton.current.getBoundingClientRect(),i=this.base.getBoundingClientRect(),r={};return this.dir=="ltr"?r.right=i.right-t.right-3:r.left=t.left-i.left-3,this.props.previewPosition=="bottom"&&this.props.skinTonePosition=="preview"?r.bottom=i.bottom-t.top+6:(r.top=t.bottom-i.top+3,r.bottom="auto"),Le("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":Ki.skins.choose,class:"menu hidden","data-position":r.top?"top":"bottom",style:r,children:[...Array(6).keys()].map(a=>{const o=a+1,l=this.state.skin==o;return Le("div",{children:[Le("input",{type:"radio",name:"skin-tone",value:o,"aria-label":Ki.skins[o],ref:l?this.refs.skinToneRadio:null,defaultChecked:l,onChange:()=>this.handleSkinMouseOver(o),onKeyDown:u=>{(u.code=="Enter"||u.code=="Space"||u.code=="Tab")&&(u.preventDefault(),this.handleSkinClick(o))}}),Le("button",{"aria-hidden":"true",tabindex:"-1",onClick:()=>this.handleSkinClick(o),onMouseEnter:()=>this.handleSkinMouseOver(o),onMouseLeave:()=>this.handleSkinMouseOver(),class:"option flex flex-grow flex-middle",children:[Le("span",{class:`skin-tone skin-tone-${o}`}),Le("span",{class:"margin-small-lr",children:Ki.skins[o]})]})]})})})}render(){const n=this.props.perLine*this.props.emojiButtonSize;return Le("section",{id:"root",class:"flex flex-column",dir:this.dir,style:{width:this.props.dynamicWidth?"100%":`calc(${n}px + (var(--padding) + var(--sidebar-width)))`},"data-emoji-set":this.props.set,"data-theme":this.state.theme,"data-menu":this.state.showSkins?"":void 0,children:[this.props.previewPosition=="top"&&this.renderPreview(),this.props.navPosition=="top"&&this.renderNav(),this.props.searchPosition=="sticky"&&Le("div",{class:"padding-lr",children:this.renderSearch()}),Le("div",{ref:this.refs.scroll,class:"scroll flex-grow padding-lr",children:Le("div",{style:{width:this.props.dynamicWidth?"100%":n,height:"100%"},children:[this.props.searchPosition=="static"&&this.renderSearch(),this.renderSearchResults(),this.renderCategories()]})}),this.props.navPosition=="bottom"&&this.renderNav(),this.props.previewPosition=="bottom"&&this.renderPreview(),this.state.showSkins&&this.renderSkins(),this.renderLiveRegion()]})}constructor(n){super(),ha(this,"darkMediaCallback",()=>{this.props.theme=="auto"&&this.setState({theme:this.darkMedia.matches?"dark":"light"})}),ha(this,"handleClickOutside",t=>{const{element:i}=this.props;t.target!=i&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside(t))}),ha(this,"handleBaseClick",t=>{this.state.showSkins&&(t.target.closest(".menu")||(t.preventDefault(),t.stopImmediatePropagation(),this.closeSkins()))}),ha(this,"handleBaseKeydown",t=>{this.state.showSkins&&t.key=="Escape"&&(t.preventDefault(),t.stopImmediatePropagation(),this.closeSkins())}),ha(this,"handleSearchClick",()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})}),ha(this,"handleSearchInput",async()=>{const t=this.refs.searchInput.current;if(!t)return;const{value:i}=t,r=await af.search(i),a=()=>{this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0)};if(!r)return this.setState({searchResults:r,pos:[-1,-1]},a);const o=t.selectionStart==t.value.length?[0,0]:[-1,-1],l=[];l.setsize=r.length;let u=null;for(let f of r)(!l.length||u.length==this.getPerLine())&&(u=[],u.__categoryId="search",u.__index=l.length,l.push(u)),u.push(f);this.ignoreMouse(),this.setState({searchResults:l,pos:o},a)}),ha(this,"handleSearchKeyDown",t=>{const i=t.currentTarget;switch(t.stopImmediatePropagation(),t.key){case"ArrowLeft":this.navigate({e:t,input:i,left:!0});break;case"ArrowRight":this.navigate({e:t,input:i,right:!0});break;case"ArrowUp":this.navigate({e:t,input:i,up:!0});break;case"ArrowDown":this.navigate({e:t,input:i,down:!0});break;case"Enter":t.preventDefault(),this.handleEmojiClick({e:t,pos:this.state.pos});break;case"Escape":t.preventDefault(),this.state.searchResults?this.clearSearch():this.unfocusSearch();break}}),ha(this,"clearSearch",()=>{const t=this.refs.searchInput.current;t&&(t.value="",t.focus(),this.handleSearchInput())}),ha(this,"handleCategoryClick",({category:t,i})=>{this.scrollTo(i==0?{row:-1}:{categoryId:t.id})}),ha(this,"openSkins",t=>{const{currentTarget:i}=t,r=i.getBoundingClientRect();this.setState({showSkins:r},async()=>{await IAe(2);const a=this.refs.menu.current;a&&(a.classList.remove("hidden"),this.refs.skinToneRadio.current.focus(),this.base.addEventListener("click",this.handleBaseClick,!0),this.base.addEventListener("keydown",this.handleBaseKeydown,!0))})}),this.observers=[],this.state={pos:[-1,-1],perLine:this.initDynamicPerLine(n),visibleRows:{0:!0},...this.getInitialState(n)}}}class oA extends UAe{async connectedCallback(){const n=UG(this.props,Yo,this);n.element=this,n.ref=t=>{this.component=t},await bb(n),!this.disconnected&&LG(Le(rOe,{...n}),this.shadowRoot)}constructor(n){super(n,{styles:jG(XG)})}}ha(oA,"Props",Yo);typeof customElements<"u"&&!customElements.get("em-emoji-picker")&&customElements.define("em-emoji-picker",oA);var XG={};XG=`:host { width: min-content; height: 435px; min-height: 230px; @@ -1325,4 +1325,4 @@ button { background-color: #61493f; } -`;function rOe({opened:e,onClose:n,onSelect:t,target:i}){return v.jsxs(Sn,{opened:e,onChange:r=>{r||n()},onDismiss:n,position:"bottom-start",withArrow:!0,shadow:"md",withinPortal:!0,closeOnClickOutside:!0,closeOnEscape:!0,trapFocus:!1,children:[v.jsx(Sn.Target,{children:i}),v.jsx(Sn.Dropdown,{p:0,style:{background:"transparent",border:"none"},children:v.jsx(aOe,{onSelect:r=>{t(r),n()}})})]})}function aOe({onSelect:e}){const n=x.useRef(null),t=x.useRef(null),i=x.useRef(e);return i.current=e,x.useEffect(()=>{if(n.current)return t.current=new oA({data:gAe,onEmojiSelect:r=>{const a=i.current;r.native?a(r.native):r.shortcodes&&a(r.shortcodes)},theme:"dark",previewPosition:"none",skinTonePosition:"search",autoFocus:!0,maxFrequentRows:2,ref:n}),()=>{n.current&&(n.current.innerHTML=""),t.current=null}},[]),v.jsx("div",{ref:n})}const oOe={mention:v.jsx(Xse,{size:14}),assigned_chat:v.jsx(Oue,{size:14}),reply:v.jsx(Xq,{size:14})},sOe={mention:"Mencion",assigned_chat:"Asignado",reply:"Respuesta"},lOe={mention:"grape",assigned_chat:"blue",reply:"gray"};function uOe({unreadCount:e,notifications:n,onOpenCard:t,onChanged:i}){const[r,a]=x.useState(!1),[o,l]=x.useState(n??[]),[u,f]=x.useState(e??0),[h,d]=x.useState(!1);x.useEffect(()=>{n&&l(n)},[n]),x.useEffect(()=>{e!==void 0&&f(e)},[e]);const p=x.useCallback(async()=>{d(!0);try{const[_,S]=await Promise.all([NF(!1),$F()]);l(_),f(S.count)}finally{d(!1)}},[]);x.useEffect(()=>{(n===void 0||e===void 0)&&p()},[n,e,p]);const g=_=>{a(_),_&&p()},b=async _=>{if(!_.read_at)try{await $re(_.id),l(S=>S.map(j=>j.id===_.id?{...j,read_at:new Date().toISOString()}:j)),f(S=>Math.max(0,S-1)),i==null||i()}catch{}a(!1),t==null||t(_.card_id,_.message_id)},w=async()=>{try{await zre(),l(_=>_.map(S=>S.read_at?S:{...S,read_at:new Date().toISOString()})),f(0),i==null||i()}catch{}},k=v.jsx(Jn,{variant:"subtle","aria-label":"Notificaciones",children:v.jsx(Qse,{size:16})});return v.jsxs(Sn,{opened:r,onChange:g,position:"bottom-end",width:380,withArrow:!0,shadow:"md",children:[v.jsx(Sn.Target,{children:v.jsx(fe,{onClick:()=>g(!r),style:{display:"inline-flex"},children:u>0?v.jsx(Jy,{color:"red",label:u>99?"99+":u,size:16,offset:4,children:k}):k})}),v.jsxs(Sn.Dropdown,{p:0,children:[v.jsxs(Ee,{justify:"space-between",px:"sm",py:"xs",children:[v.jsx(de,{fw:600,size:"sm",children:"Notificaciones"}),v.jsx(wt,{label:"Marcar todas como leidas",withArrow:!0,children:v.jsx(Yn,{size:"compact-xs",variant:"subtle",leftSection:v.jsx(cs,{size:12}),onClick:w,disabled:u===0,children:"Todas leidas"})})]}),v.jsx(ur,{h:420,type:"auto",offsetScrollbars:!0,children:h&&o.length===0?v.jsx(Ee,{justify:"center",p:"md",children:v.jsx(Zt,{size:"sm"})}):o.length===0?v.jsx(de,{size:"sm",c:"dimmed",ta:"center",p:"md",children:"Sin notificaciones"}):v.jsx(kn,{gap:0,children:o.map(_=>{const S=!_.read_at;return v.jsx(Et,{onClick:()=>b(_),p:"sm",style:{borderTop:"1px solid var(--mantine-color-gray-2)",background:S?"var(--mantine-color-blue-light)":void 0,textAlign:"left"},children:v.jsxs(Ee,{gap:6,wrap:"nowrap",align:"flex-start",children:[v.jsx(Gn,{size:"xs",variant:"light",color:lOe[_.kind],leftSection:oOe[_.kind],children:sOe[_.kind]}),v.jsxs(fe,{style:{flex:1,minWidth:0},children:[v.jsxs(Ee,{gap:6,wrap:"nowrap",justify:"space-between",children:[v.jsxs(de,{size:"xs",fw:600,truncate:!0,children:[_.actor_name||"Alguien"," · #",_.card_seq_num," ",_.card_title]}),v.jsx(de,{size:"xs",c:"dimmed",children:Sl(_.created_at)})]}),v.jsx(de,{size:"xs",c:S?void 0:"dimmed",lineClamp:2,style:{whiteSpace:"pre-wrap"},children:_.snippet})]})]})},_.id)})})})]})]})}const cOe=["card.created","card.updated","card.moved","card.deleted","message.created","board.invalidated"],Pz={base_url:"",email:"",api_token:"",project_key:"",status_map:{"Por hacer":"To Do",Doing:"In Progress",Done:"Done"}};function fOe({opened:e,onClose:n}){const[t,i]=x.useState([]),[r,a]=x.useState(!1),[o,l]=x.useState(null),[u,f]=x.useState(null),[h,d]=x.useState([]),[p,g]=x.useState(!1),[b,w]=x.useState("form"),k=x.useCallback(async()=>{a(!0);try{const M=await Lre();i(M)}catch(M){hn.show({color:"red",message:M.message})}finally{a(!1)}},[]);x.useEffect(()=>{e&&k()},[e,k]);const _=x.useCallback(async M=>{g(!0);try{const $=await qre(M);d($)}catch($){hn.show({color:"red",message:$.message})}finally{g(!1)}},[]),S=M=>{f(M?{...M,config:{...M.config}}:null),l((M==null?void 0:M.id)??null),w("form"),d([]),M&&_(M.id)},j=()=>{const M={id:"",name:"Nuevo modulo",kind:"jira",enabled:!1,event_filter:["card.created","card.updated","card.moved","message.created"],config:{...Pz,status_map:{...Pz.status_map}},created_at:"",updated_at:""};f(M),l(null),w("form"),d([])},T=async()=>{if(u)try{const M={name:u.name,kind:u.kind,enabled:u.enabled,event_filter:u.event_filter,config:u.config},$=u.id?await Bre(u.id,M):await Ire(M);hn.show({color:"green",message:"Modulo guardado"}),await k(),S($)}catch(M){hn.show({color:"red",message:M.message})}},A=async()=>{if(o&&confirm("Borrar modulo?"))try{await Fre(o),hn.show({color:"green",message:"Modulo borrado"}),f(null),l(null),k()}catch(M){hn.show({color:"red",message:M.message})}},O=async()=>{if(u)try{const M=u.id?await fM(u.id):await fM("draft",{name:u.name,kind:u.kind,enabled:u.enabled,event_filter:u.event_filter,config:u.config});M.ok?hn.show({color:"green",title:`Test OK (${M.status})`,message:`Conexion verificada en ${M.duration_ms}ms`}):hn.show({color:"red",title:`Test fallo (${M.status})`,message:M.error||"sin detalle"})}catch(M){hn.show({color:"red",message:M.message})}};return v.jsx(Gi,{opened:e,onClose:n,title:v.jsxs(Ee,{gap:8,children:[v.jsx(Qq,{size:18}),v.jsx(de,{fw:600,children:"Modulos / Integraciones"})]}),size:"xl",centered:!0,children:v.jsxs(Ee,{align:"flex-start",gap:"md",wrap:"nowrap",children:[v.jsxs(fe,{style:{width:220,minWidth:220},children:[v.jsxs(Ee,{justify:"space-between",mb:6,children:[v.jsx(de,{size:"xs",c:"dimmed",children:"Configurados"}),v.jsx(wt,{label:"Refrescar",withArrow:!0,children:v.jsx(Jn,{size:"sm",variant:"subtle",onClick:k,children:v.jsx(ff,{size:14})})})]}),v.jsx(ur,{h:400,type:"auto",children:v.jsxs(kn,{gap:4,children:[r&&v.jsx(Zt,{size:"xs"}),t.map(M=>v.jsxs(fe,{p:"xs",style:{cursor:"pointer",border:"1px solid var(--mantine-color-gray-3)",borderRadius:4,background:o===M.id?"var(--mantine-color-blue-light)":void 0},onClick:()=>S(M),children:[v.jsxs(Ee,{justify:"space-between",gap:4,wrap:"nowrap",children:[v.jsx(de,{size:"sm",fw:600,truncate:!0,children:M.name}),v.jsx(Gn,{size:"xs",color:M.enabled?"green":"gray",children:M.enabled?"on":"off"})]}),v.jsx(de,{size:"xs",c:"dimmed",children:M.kind})]},M.id)),v.jsx(Yn,{size:"xs",variant:"light",onClick:j,mt:"xs",children:"+ Nuevo"})]})})]}),v.jsx(us,{orientation:"vertical"}),v.jsx(fe,{style:{flex:1,minWidth:0},children:u?v.jsxs(Gt,{value:b,onChange:w,children:[v.jsxs(Gt.List,{children:[v.jsx(Gt.Tab,{value:"form",children:"Configuracion"}),v.jsx(Gt.Tab,{value:"logs",children:"Logs"})]}),v.jsx(Gt.Panel,{value:"form",pt:"xs",children:v.jsxs(kn,{gap:"xs",children:[v.jsxs(Ee,{gap:"xs",children:[v.jsx(or,{label:"Nombre",value:u.name,onChange:M=>f({...u,name:M.currentTarget.value}),style:{flex:1}}),v.jsx(jr,{label:"Kind",value:u.kind,onChange:M=>f({...u,kind:M||"jira"}),data:[{value:"jira",label:"Jira"}],w:140})]}),v.jsx(Gr,{label:"Activo",checked:u.enabled,onChange:M=>f({...u,enabled:M.currentTarget.checked})}),v.jsxs(fe,{children:[v.jsx(de,{size:"xs",fw:600,mb:4,children:"Eventos"}),v.jsx(Ee,{gap:"xs",children:cOe.map(M=>v.jsx(Gr,{label:v.jsx(pl,{children:M}),checked:u.event_filter.includes(M),onChange:$=>{const q=$.currentTarget.checked?[...u.event_filter,M]:u.event_filter.filter(P=>P!==M);f({...u,event_filter:q})}},M))})]}),v.jsx(dOe,{editing:u,setEditing:f}),v.jsxs(Ee,{gap:"xs",children:[v.jsx(Yn,{onClick:T,leftSection:v.jsx(sue,{size:14}),children:"Guardar"}),v.jsx(Yn,{variant:"default",onClick:O,leftSection:v.jsx(wue,{size:14}),children:"Probar conexion"}),o&&v.jsx(Yn,{color:"red",variant:"subtle",onClick:A,leftSection:v.jsx(vo,{size:14}),ml:"auto",children:"Borrar"})]})]})}),v.jsxs(Gt.Panel,{value:"logs",pt:"xs",children:[v.jsxs(Ee,{justify:"space-between",mb:6,children:[v.jsx(de,{size:"xs",c:"dimmed",children:"Ultimas 100 entradas"}),v.jsx(Jn,{size:"sm",variant:"subtle",onClick:()=>o&&_(o),children:v.jsx(ff,{size:14})})]}),p?v.jsx(Zt,{size:"sm"}):h.length===0?v.jsx(de,{size:"sm",c:"dimmed",children:"Sin entradas."}):v.jsx(ur,{h:400,children:v.jsxs(Xe,{withTableBorder:!0,striped:!0,highlightOnHover:!0,stickyHeader:!0,children:[v.jsx(Xe.Thead,{children:v.jsxs(Xe.Tr,{children:[v.jsx(Xe.Th,{children:"Hora"}),v.jsx(Xe.Th,{children:"Evento"}),v.jsx(Xe.Th,{children:"HTTP"}),v.jsx(Xe.Th,{children:"ms"}),v.jsx(Xe.Th,{children:"Error"})]})}),v.jsx(Xe.Tbody,{children:h.map(M=>v.jsxs(Xe.Tr,{children:[v.jsx(Xe.Td,{children:Sl(M.created_at)}),v.jsx(Xe.Td,{children:v.jsx(pl,{children:M.event_type})}),v.jsx(Xe.Td,{children:v.jsx(Gn,{color:M.status>=400||M.error?"red":"green",size:"sm",children:M.status||"-"})}),v.jsx(Xe.Td,{children:M.duration_ms}),v.jsx(Xe.Td,{children:v.jsx(de,{size:"xs",c:"red",lineClamp:2,children:M.error})})]},M.id))})]})})]})]}):v.jsx(kl,{color:"gray",children:'Selecciona un modulo o pulsa "Nuevo".'})})]})})}function dOe({editing:e,setEditing:n}){const t=e.config,i=(a,o)=>n({...e,config:{...t,[a]:o}}),r=x.useMemo(()=>JSON.stringify(t.status_map??{},null,2),[t.status_map]);return e.kind!=="jira"?v.jsx(kl,{color:"yellow",mt:"xs",children:"Editor especifico para esta kind aun no implementado."}):v.jsxs(kn,{gap:"xs",children:[v.jsx(or,{label:"Base URL",placeholder:"https://acme.atlassian.net",value:t.base_url||"",onChange:a=>i("base_url",a.currentTarget.value)}),v.jsxs(Ee,{gap:"xs",children:[v.jsx(or,{label:"Email",value:t.email||"",onChange:a=>i("email",a.currentTarget.value),style:{flex:1}}),v.jsx(or,{label:"API token",placeholder:e.id?"*** (deja vacio para conservar)":"",value:t.api_token||"",onChange:a=>i("api_token",a.currentTarget.value),style:{flex:1}})]}),v.jsx(or,{label:"Project key",placeholder:"KAN",value:t.project_key||"",onChange:a=>i("project_key",a.currentTarget.value)}),v.jsx(KC,{label:"Status map (columna kanban → transicion Jira)",description:'{"Doing":"In Progress","Done":"Done"}',value:r,autosize:!0,minRows:3,validationError:"JSON invalido",onChange:a=>{try{const o=JSON.parse(a);i("status_map",o)}catch{}}})]})}function hOe({opened:e,onClose:n}){const[t,i]=x.useState([]),[r,a]=x.useState(!1),[o,l]=x.useState(""),[u,f]=x.useState(!1),[h,d]=x.useState(null),p=x.useCallback(async()=>{a(!0);try{i(await Zre())}catch(_){hn.show({color:"red",message:_.message})}finally{a(!1)}},[]);x.useEffect(()=>{e&&(p(),d(null),l(""))},[e,p]);const g=async()=>{const _=o.trim()||"default";f(!0);try{const S=await Xre(_);d(S),l(""),await p()}catch(S){hn.show({color:"red",message:S.message})}finally{f(!1)}},b=async _=>{if(confirm("Revocar este token? Quien lo este usando dejara de tener acceso."))try{await Qre(_),await p()}catch(S){hn.show({color:"red",message:S.message})}},w=`${window.location.origin}/mcp`,k=h?`claude mcp add kanban --transport http ${w} --header "Authorization: Bearer ${h.token}"`:"";return v.jsx(Gi,{opened:e,onClose:n,title:"MCP Tokens",size:"lg",children:v.jsxs(kn,{gap:"md",children:[v.jsx(de,{size:"sm",c:"dimmed",children:"Cada token deja conectar un cliente Claude al kanban como tu usuario. El valor solo aparece UNA vez al crearlo. Si lo pierdes, generas otro y revocas el antiguo."}),v.jsxs(Ee,{align:"end",children:[v.jsx(or,{label:"Nombre del token",placeholder:"ej. portatil, sobremesa...",value:o,onChange:_=>l(_.currentTarget.value),style:{flex:1},disabled:u}),v.jsx(Yn,{onClick:g,loading:u,children:"Generar"})]}),h&&v.jsx(kl,{color:"yellow",title:"Copia el token ahora — no se mostrara mas",children:v.jsxs(kn,{gap:"xs",children:[v.jsxs(Ee,{gap:"xs",align:"center",children:[v.jsx(pl,{style:{flex:1,wordBreak:"break-all"},children:h.token}),v.jsx(qS,{value:h.token,children:({copied:_,copy:S})=>v.jsx(wt,{label:_?"Copiado":"Copiar token",children:v.jsx(Jn,{variant:"subtle",onClick:S,children:_?v.jsx(cs,{size:16}):v.jsx(o4,{size:16})})})})]}),v.jsx(us,{}),v.jsx(de,{size:"xs",c:"dimmed",children:"Pega este comando en tu PC para registrar el MCP en Claude Code:"}),v.jsxs(Ee,{gap:"xs",align:"center",children:[v.jsx(pl,{block:!0,style:{flex:1},children:k}),v.jsx(qS,{value:k,children:({copied:_,copy:S})=>v.jsx(wt,{label:_?"Copiado":"Copiar comando",children:v.jsx(Jn,{variant:"subtle",onClick:S,children:_?v.jsx(cs,{size:16}):v.jsx(o4,{size:16})})})})]})]})}),v.jsx(us,{label:"Tokens activos",labelPosition:"left"}),r?v.jsx(Ee,{justify:"center",p:"md",children:v.jsx(Zt,{size:"sm"})}):t.length===0?v.jsx(de,{size:"sm",c:"dimmed",ta:"center",py:"md",children:"Sin tokens. Genera uno arriba."}):v.jsxs(Xe,{withTableBorder:!0,withColumnBorders:!0,verticalSpacing:"xs",highlightOnHover:!0,children:[v.jsx(Xe.Thead,{children:v.jsxs(Xe.Tr,{children:[v.jsx(Xe.Th,{children:"Nombre"}),v.jsx(Xe.Th,{children:"Creado"}),v.jsx(Xe.Th,{children:"Ultimo uso"}),v.jsx(Xe.Th,{w:60})]})}),v.jsx(Xe.Tbody,{children:t.map(_=>v.jsxs(Xe.Tr,{children:[v.jsx(Xe.Td,{children:_.name}),v.jsx(Xe.Td,{children:Sl(_.created_at)}),v.jsx(Xe.Td,{children:_.last_used_at?Sl(_.last_used_at):v.jsx(de,{c:"dimmed",children:"nunca"})}),v.jsx(Xe.Td,{children:v.jsx(wt,{label:"Revocar",children:v.jsx(Jn,{color:"red",variant:"subtle",onClick:()=>b(_.id),children:v.jsx(vo,{size:14})})})})]},_.id))})]}),v.jsx(fe,{children:v.jsxs(de,{size:"xs",c:"dimmed",children:["Endpoint MCP: ",v.jsx(pl,{children:w})]})})]})})}function mOe({opened:e,onClose:n,columns:t,onImported:i}){const[r,a]=x.useState(null),[o,l]=x.useState(!1),[u,f]=x.useState(!1),[h,d]=x.useState(new Set),[p,g]=x.useState(!1),[b,w]=x.useState(""),[k,_]=x.useState(""),[S,j]=x.useState(null),[T,A]=x.useState(""),[O,M]=x.useState(null),$=async()=>{l(!0),M(null);try{const B=await eae({includeImported:p,limit:200});a(B.issues),j(B.board_id),A(B.project_key),d(R=>{const D=new Set(B.issues.map(H=>H.key)),z=new Set;for(const H of R)D.has(H)&&z.add(H);return z})}catch(B){M(B.message),a([])}finally{l(!1)}};x.useEffect(()=>{e&&$()},[e,p]),x.useEffect(()=>{if(!k&&t.length>0){const B=t.find(R=>R.location!=="sidebar")||t[0];_(B.id)}},[t,k]);const q=x.useMemo(()=>{if(!r)return[];const B=b.trim().toLowerCase();return B?r.filter(R=>R.key.toLowerCase().includes(B)||R.summary.toLowerCase().includes(B)||R.assignee.toLowerCase().includes(B)||R.status_name.toLowerCase().includes(B)):r},[r,b]),P=B=>{d(R=>{const D=new Set(R);return D.has(B)?D.delete(B):D.add(B),D})},L=()=>{const B=q.filter(R=>!R.already_imported);h.size===B.length&&B.length>0?d(new Set):d(new Set(B.map(R=>R.key)))},U=async()=>{if(h.size!==0){f(!0);try{const B=await nae(Array.from(h),k||void 0),R=B.results.filter(Y=>Y.status==="imported").length,D=B.results.filter(Y=>Y.status==="skipped").length,z=B.results.filter(Y=>Y.status==="error"),H=`${R} importadas`+(D>0?` · ${D} omitidas`:"")+(z.length>0?` · ${z.length} con error`:"");hn.show({color:z.length>0?"yellow":"green",message:H,autoClose:5e3}),z.length>0&&console.warn("import errors",z),d(new Set),await $(),i==null||i()}catch(B){hn.show({color:"red",message:B.message})}finally{f(!1)}}},G=t.map(B=>({value:B.id,label:B.name}));return v.jsx(Gi,{opened:e,onClose:n,title:v.jsxs(Ee,{gap:8,children:[v.jsx(M9,{size:18}),v.jsxs(de,{fw:600,children:["Importar tareas de Jira",S?` · board ${S}`:"",T?` (${T})`:""]})]}),size:"xl",children:v.jsxs(kn,{gap:"sm",children:[v.jsxs(Ee,{gap:"xs",wrap:"nowrap",children:[v.jsx(or,{placeholder:"Filtrar por key, titulo, asignado o status...",value:b,onChange:B=>w(B.currentTarget.value),leftSection:v.jsx(Jq,{size:14}),style:{flex:1}}),v.jsx(wt,{label:"Refrescar",withArrow:!0,children:v.jsx(Yn,{variant:"default",onClick:$,loading:o,leftSection:v.jsx(ff,{size:14}),children:"Refrescar"})})]}),v.jsxs(Ee,{justify:"space-between",gap:"xs",children:[v.jsx(Gr,{label:"Mostrar issues ya importadas",checked:p,onChange:B=>g(B.currentTarget.checked)}),v.jsx(jr,{label:"Columna fallback",description:"Para issues cuyo status no tiene mapping",data:G,value:k,onChange:B=>_(B||""),allowDeselect:!1,w:260,size:"xs"})]}),O&&v.jsx(de,{size:"sm",c:"red",children:O}),v.jsx(fe,{style:{maxHeight:480,overflowY:"auto",border:"1px solid var(--mantine-color-default-border)",borderRadius:4},children:o&&!r?v.jsx(Ee,{justify:"center",p:"md",children:v.jsx(Zt,{size:"sm"})}):q.length===0?v.jsx(de,{size:"sm",c:"dimmed",p:"md",ta:"center",children:(r==null?void 0:r.length)===0?"No hay issues sin importar en el board.":"Ninguna issue coincide con el filtro."}):v.jsxs(kn,{gap:0,children:[v.jsxs(Ee,{p:"xs",gap:"xs",style:{borderBottom:"1px solid var(--mantine-color-default-border)",background:"var(--mantine-color-default-hover)"},children:[v.jsx(Gr,{checked:h.size>0&&h.size===q.filter(B=>!B.already_imported).length,indeterminate:h.size>0&&h.size!B.already_imported).length,onChange:L}),v.jsxs(de,{size:"xs",fw:600,c:"dimmed",children:[q.length," issues · ",h.size," seleccionadas"]})]}),q.map(B=>v.jsxs(Ee,{p:"xs",gap:"xs",wrap:"nowrap",style:{borderBottom:"1px solid var(--mantine-color-default-border)",opacity:B.already_imported?.5:1},children:[v.jsx(Gr,{checked:h.has(B.key),disabled:B.already_imported,onChange:()=>P(B.key)}),B.issue_type_icon&&v.jsx(Xf,{src:B.issue_type_icon,w:16,h:16,alt:B.issue_type}),v.jsxs(kn,{gap:2,style:{flex:1,minWidth:0},children:[v.jsxs(Ee,{gap:6,wrap:"nowrap",children:[v.jsx(ho,{href:B.url,target:"_blank",rel:"noopener noreferrer",size:"sm",fw:600,children:B.key}),v.jsx(de,{size:"sm",truncate:!0,style:{flex:1},children:B.summary})]}),v.jsxs(Ee,{gap:4,wrap:"nowrap",children:[v.jsx(Gn,{size:"xs",variant:"light",color:pOe(B.status_name),children:B.status_name}),v.jsx(Gn,{size:"xs",variant:"outline",children:B.issue_type}),B.assignee&&v.jsxs(de,{size:"xs",c:"dimmed",children:["· ",B.assignee]}),B.already_imported&&v.jsx(Gn,{size:"xs",color:"gray",children:"ya en kanban"}),!B.already_imported&&!B.mapped_column_id&&v.jsx(Gn,{size:"xs",color:"orange",variant:"light",children:"sin mapping (usa fallback)"})]})]})]},B.key))]})}),v.jsxs(Ee,{justify:"flex-end",gap:"xs",children:[v.jsx(Yn,{variant:"default",onClick:n,disabled:u,children:"Cerrar"}),v.jsxs(Yn,{onClick:U,disabled:h.size===0||u,loading:u,children:["Importar ",h.size>0?`(${h.size})`:""]})]})]})})}function pOe(e){const n=e.toLowerCase();return n.includes("done")||n.includes("hecho")||n.includes("closed")?"green":n.includes("progress")||n.includes("doing")?"blue":n.includes("implementado")||n.includes("review")?"violet":n.includes("creado")||n.includes("backlog")||n.includes("nuevo")?"gray":"yellow"}function vOe(e,n=!0){const t=x.useRef(e);t.current=e,x.useEffect(()=>{if(!n)return;const i=new EventSource("/api/events",{withCredentials:!0}),r={};for(const a of Object.keys(t.current)){const o=l=>{const u=t.current[a];if(u)try{const f=l.data?JSON.parse(l.data):null;u(f)}catch{}};i.addEventListener(a,o),r[a]=o}return()=>{for(const[a,o]of Object.entries(r))i.removeEventListener(a,o);i.close()}},[n])}const Gh="column-";function gOe(e){return e==="column"?n=>{const t=n.droppableContainers.filter(r=>String(r.id).startsWith(Gh)),i=WF({...n,droppableContainers:t});return i.length>0?i:wae({...n,droppableContainers:t})}:n=>{const t=xae(n);return t.length>0?t:VF(n)}}function yOe(){var Md,Os;const e=g9(),[n,t]=x.useState(null),[i,r]=x.useState([]),[a,o]=x.useState(null),[l,u]=x.useState(null),[f,h]=x.useState(void 0),[d,p]=x.useState(!1),[g,b]=x.useState(""),[w,k]=x.useState(Date.now()),[_,S]=x.useState(!1),[j,T]=x.useState("board"),[A,O]=x.useState([]),[M,$]=x.useState(!1),[q,P]=x.useState([]),[L,U]=x.useState(!1),[G,B]=x.useState([]),[R,D]=x.useState([]),[z,H]=x.useState(""),[Y,N]=x.useState(null),[W,V]=x.useState(null),[I,Q]=x.useState([]),[ie,re]=x.useState(!1),[Z,le]=x.useState(null),[ee,se]=x.useState(null),[ke,te]=x.useState(!1),[$e,xe]=x.useState(null),[Ae,ze]=x.useState(!1),[we,Ce]=x.useState(null),[Ne,he]=x.useState(!1),[He,Ye]=x.useState("#888888"),[We,Qe]=x.useState(null),[Je,oe]=x.useState(!1),[be,Ke]=x.useState(()=>{const X=localStorage.getItem("kanban_nav_width"),ce=X?parseInt(X,10):NaN;return Number.isFinite(ce)&&ce>=180&&ce<=600?ce:240}),en=x.useRef(be);x.useEffect(()=>{en.current=be,localStorage.setItem("kanban_nav_width",String(be))},[be]);const je=X=>{X.preventDefault();const ce=X.clientX,_e=en.current;document.body.style.cursor="col-resize",document.body.style.userSelect="none";const Ie=Wn=>{const ht=Wn.clientX-ce,Rt=Math.min(600,Math.max(180,_e+ht));Ke(Rt)},fn=()=>{document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",Ie),window.removeEventListener("mouseup",fn)};window.addEventListener("mousemove",Ie),window.addEventListener("mouseup",fn)},an=gae(pM(C9,{activationConstraint:{distance:5}}),pM(x9,{coordinateGetter:Koe})),pn=32,Dn=400,bn=a!==null||l!==null,[sn,nn]=x.useState(!1),$n=x.useRef(Je);x.useEffect(()=>{$n.current=Je},[Je]),x.useEffect(()=>{if(!bn){nn(!1);return}let X=null,ce=!1,_e=!1;const Ie=()=>{X!==null&&(window.clearTimeout(X),X=null)},fn=Wn=>{const ht=Wn.clientX<=pn;if(ht===ce)return;if(ce=ht,nn(ht),!ht){_e=!0,Ie();return}if(!(!$n.current||_e))return;Ie();const si=!$n.current;X=window.setTimeout(()=>{oe(si),_e=!1},Dn)};return document.addEventListener("mousemove",fn),()=>{document.removeEventListener("mousemove",fn),Ie(),nn(!1)}},[bn]);const De=x.useCallback(async()=>{try{const X=await sM();t(X)}catch(X){hn.show({color:"red",message:X.message})}},[]),Fe=x.useRef(null),Vn=x.useCallback(()=>{Fe.current&&clearTimeout(Fe.current),Fe.current=setTimeout(()=>{Fe.current=null,De()},300)},[De]);x.useEffect(()=>()=>{Fe.current&&clearTimeout(Fe.current)},[]),x.useEffect(()=>{De()},[De]);const En=x.useCallback(async()=>{try{const X=await zF();r(X)}catch(X){console.warn("listUsers failed",X)}},[]),gn=x.useCallback(async()=>{try{const X=await lM();O(X)}catch(X){console.warn("listTrash failed",X)}},[]),xn=x.useCallback(async()=>{try{const X=await uM();P(X)}catch(X){console.warn("listArchive failed",X)}},[]),at=x.useCallback(async()=>{try{const X=await LF();B(X)}catch(X){console.warn("listTags failed",X)}},[]),Mt=x.useCallback(async()=>{try{const X=await Gre();D(X)}catch(X){console.warn("listRequesters failed",X)}},[]);x.useEffect(()=>{En()},[En]),x.useEffect(()=>{gn()},[gn]),x.useEffect(()=>{xn()},[xn]),x.useEffect(()=>{at(),Mt()},[at,Mt]),x.useEffect(()=>{if(a||l)return;const X=setInterval(()=>k(Date.now()),1e3);return()=>clearInterval(X)},[a,l]);const[qe,Ue]=x.useState([]),[In,ot]=x.useState(0),[Pn,rn]=x.useState("");x.useEffect(()=>{PF().then(X=>rn(X.version)).catch(()=>rn(""))},[]);const[on,ln]=x.useState(!1),[Kn,Xn]=x.useState(!1),[Lt,Rn]=x.useState(!1),Mn=x.useCallback(async()=>{try{const[X,ce]=await Promise.all([NF(!1),$F()]);Ue(X),ot(ce.count)}catch{}},[]);x.useEffect(()=>{e.user&&Mn()},[e.user,Mn]),vOe(x.useMemo(()=>({"board.invalidated":()=>{Vn()},"notification.created":X=>{const ce=X;if(!ce||!ce.id)return;Ue(fn=>fn.some(Wn=>Wn.id===ce.id)?fn:[ce,...fn].slice(0,100)),ot(fn=>fn+1);const _e=ce.actor_name||"Alguien",Ie=ce.card_seq_num?`#${ce.card_seq_num}`:ce.card_title;hn.show({autoClose:4e3,color:ce.kind==="mention"?"grape":"blue",title:`${_e} en ${Ie}`,message:ce.snippet})},"notification.read":X=>{const ce=X;ce!=null&&ce.id&&(Ue(_e=>_e.map(Ie=>Ie.id===ce.id?{...Ie,read_at:new Date().toISOString()}:Ie)),ot(_e=>Math.max(0,_e-1)))},"notification.read_all":()=>{Ue(X=>X.map(ce=>ce.read_at?ce:{...ce,read_at:new Date().toISOString()})),ot(0)}}),[Vn]),!!e.user),x.useEffect(()=>{if(!we)return;const X=ce=>{ce.key==="Escape"&&Ce(null)};return window.addEventListener("keydown",X),()=>window.removeEventListener("keydown",X)},[we]);const Qn=x.useMemo(()=>{const X=new Map;for(const ce of i)X.set(ce.id,ce);return X},[i]),Dt=x.useMemo(()=>n?[...n.columns].sort((X,ce)=>X.position-ce.position):[],[n]),fi=x.useMemo(()=>Dt.filter(X=>X.location!=="sidebar"),[Dt]),zi=x.useMemo(()=>Dt.filter(X=>X.location==="sidebar"),[Dt]),Ya=x.useMemo(()=>fi.map(X=>`${Gh}${X.id}`),[fi]),Co=x.useMemo(()=>zi.map(X=>`${Gh}${X.id}`),[zi]),Ta=x.useCallback(X=>{const ce=z.trim().toLowerCase();if(ce){const _e=X.seq_num>0?String(X.seq_num):"",Ie=X.seq_num>0?String(X.seq_num).padStart(5,"0"):"",fn=[X.title,X.description,X.requester,_e,Ie,...X.tags||[]].filter(Boolean).join(" ").toLowerCase(),Wn=ce.replace(/^#/,"").replace(/^0+(?=\d)/,"");if(!fn.includes(ce)&&!(Wn&&fn.includes(Wn)))return!1}if(Y&&X.assignee_id!==Y||ie&&X.assignee_id||W&&X.requester!==W)return!1;if(I.length>0){const _e=new Set(X.tags||[]);for(const Ie of I)if(!_e.has(Ie))return!1}if(ke&&!X.deadline)return!1;if(Z||ee){const _e=Z?new Date(Z).setHours(0,0,0,0):-1/0,Ie=ee?new Date(ee).setHours(23,59,59,999):1/0,fn=X.created_at?new Date(X.created_at).getTime():NaN,Wn=X.entered_at?new Date(X.entered_at).getTime():NaN,ht=Rt=>!isNaN(Rt)&&Rt>=_e&&Rt<=Ie;if(!ht(fn)&&!ht(Wn))return!1}return!0},[z,Y,ie,W,I,Z,ee,ke]),dr=x.useMemo(()=>{const X=new Map;if(!n)return X;for(const ce of n.columns)X.set(ce.id,[]);for(const ce of[...n.cards].sort((_e,Ie)=>_e.position-Ie.position)){if(!Ta(ce))continue;const _e=X.get(ce.column_id);_e&&_e.push(ce)}return X},[n,Ta]),jo=!!z.trim()||!!Y||ie||!!W||I.length>0||!!Z||!!ee||ke,Er=X=>n==null?void 0:n.cards.find(ce=>ce.id===X),hr=X=>n==null?void 0:n.columns.find(ce=>ce.id===X),yn=X=>{var ce;return(ce=Er(X))==null?void 0:ce.column_id},oi=X=>X.startsWith(Gh),cn=X=>X.slice(Gh.length),Mr=X=>{if(n)return oi(X)?cn(X):yn(X)},Ao=X=>{var fn;const ce=X.active.id,_e=(fn=X.active.data.current)==null?void 0:fn.type;if(h(_e),_e==="column"){u(cn(ce));return}const Ie=Er(ce);Ie&&o(Ie)},Kr=X=>{var Wn,ht;if(!n||((Wn=X.active.data.current)==null?void 0:Wn.type)!=="card")return;const ce=X.active.id,_e=(ht=X.over)==null?void 0:ht.id;if(!_e)return;const Ie=yn(ce),fn=Mr(_e);!Ie||!fn||Ie===fn||t(Rt=>{if(!Rt)return Rt;const si=Rt.cards.map(pr=>pr.id===ce?{...pr,column_id:fn}:pr);return{...Rt,cards:si}})},Xr=async X=>{var pr,mt;const ce=(pr=X.active.data.current)==null?void 0:pr.type,_e=X.active.id,Ie=(mt=X.over)==null?void 0:mt.id;if(o(null),u(null),h(void 0),!n||!Ie)return;if(ce==="column"){if(!oi(Ie))return;const et=cn(_e),di=cn(Ie);if(et===di)return;const Ti=hr(et),vr=hr(di);if(!Ti||!vr)return;const Qr=vr.location,Jr=Dt.filter(ir=>ir.location===Qr).map(ir=>ir.id),Ts=Jr.indexOf(et),Vl=Jr.indexOf(di);let nc;if(Ts===-1){const ir=Vl===-1?Jr.length:Vl;nc=[...Jr.slice(0,ir),et,...Jr.slice(ir)]}else{if(Ts===Vl)return;nc=s1(Jr,Ts,Vl)}t(ir=>{if(!ir)return ir;const Dd=new Map(nc.map((ea,wb)=>[ea,wb])),Rd=ir.columns.map(ea=>ea.id===et?{...ea,location:Qr,position:Dd.get(ea.id)??ea.position}:Dd.has(ea.id)?{...ea,position:Dd.get(ea.id)}:ea);return{...ir,columns:Rd}});try{Ti.location!==Qr&&await uu(et,{location:Qr}),await gre(nc)}catch(ir){hn.show({color:"red",message:ir.message})}De();return}const fn=Mr(Ie);if(!fn)return;const Wn=n.cards.find(et=>et.id===_e);if(Wn!=null&&Wn.locked&&Wn.column_id!==fn){hn.show({color:"yellow",message:"Card bloqueada: no se puede mover entre columnas"}),De();return}const ht=n.cards.filter(et=>et.column_id===fn).sort((et,di)=>et.position-di.position),Rt=ht.findIndex(et=>et.id===_e);let si;if(oi(Ie)||Rt===-1)si=[...ht.filter(et=>et.id!==_e).map(et=>et.id),_e];else{const et=ht.findIndex(di=>di.id===Ie);si=s1(ht.map(di=>di.id),Rt,et)}t(et=>{if(!et)return et;const di=new Map(si.map((vr,Qr)=>[vr,Qr])),Ti=et.cards.map(vr=>vr.column_id===fn&&di.has(vr.id)?{...vr,position:di.get(vr.id)}:vr);return{...et,cards:Ti}});try{await Tre(_e,fn,si)}catch(et){hn.show({color:"red",message:et.message})}De()},Bp=async()=>{const X=g.trim();if(X)try{await pre(X),b(""),p(!1),De()}catch(ce){hn.show({color:"red",message:ce.message})}},vd=x.useCallback(async(X,ce)=>{try{await uu(X,{name:ce}),De()}catch(_e){hn.show({color:"red",message:_e.message})}},[De]),gd=x.useCallback(async(X,ce)=>{try{await uu(X,{width:ce}),De()}catch(_e){hn.show({color:"red",message:_e.message})}},[De]),Fp=x.useCallback(async(X,ce)=>{try{await uu(X,{location:ce}),De()}catch(_e){hn.show({color:"red",message:_e.message})}},[De]),Bl=x.useCallback(X=>{Ra.openConfirmModal({title:"Eliminar columna",children:v.jsx(de,{size:"sm",children:"Se borraran todas sus tarjetas. Continuar?"}),labels:{confirm:"Eliminar",cancel:"Cancelar"},confirmProps:{color:"red"},onConfirm:async()=>{try{await vre(X),De()}catch(ce){hn.show({color:"red",message:ce.message})}}})},[De]),Fl=x.useCallback(X=>{const ce=Ra.open({title:"Nueva tarjeta",size:"md",children:v.jsx(nH,{users:i,requesterOptions:R,tagOptions:G,initial:{requester:""},submitLabel:"Crear",onCancel:()=>Ra.close(ce),onSubmit:async _e=>{try{await yre({column_id:X,requester:_e.requester,title:_e.title,description:_e.description,assignee_id:_e.assignee_id,tags:_e.tags}),Ra.close(ce),De(),at(),Mt()}catch(Ie){hn.show({color:"red",message:Ie.message})}}})})},[De,i,e.user,R,G]),Dr=x.useCallback((X,ce)=>{var Ie;const _e=Ra.open({title:"Editar tarjeta",size:"85%",children:v.jsx(oce,{card:X,users:i,currentUserId:(Ie=e.user)==null?void 0:Ie.id,requesterOptions:R,tagOptions:G,highlightMessageId:ce==null?void 0:ce.highlightMessageId,onCancel:()=>Ra.close(_e),onSubmit:async fn=>{try{await Nc(X.id,{requester:fn.requester,title:fn.title,description:fn.description,assignee_id:fn.assignee_id,tags:fn.tags}),Ra.close(_e),De(),at(),Mt()}catch(Wn){hn.show({color:"red",message:Wn.message})}}})})},[De,i,e.user,R,G]),tr=x.useCallback(async X=>{try{const ce=await Rre(X);await De(),hn.show({color:"teal",message:`Duplicada: ${ce.title}`})}catch(ce){hn.show({color:"red",message:ce.message})}},[De]),yd=x.useCallback(async(X,ce)=>{t(_e=>_e&&{..._e,cards:_e.cards.map(Ie=>Ie.id===X?{...Ie,requester:ce}:Ie)});try{await Nc(X,{requester:ce})}catch(_e){hn.show({color:"red",message:_e.message}),De()}},[De]),bd=x.useCallback(X=>{T("board"),xe(X),window.setTimeout(()=>xe(null),3e3)},[]),wd=x.useCallback(X=>{const ce=Ra.open({title:"Reporte diario",size:"90%",children:v.jsx(Qje,{date:X,onJumpToCard:_e=>{Ra.close(ce),bd(_e)}})})},[bd]),kd=x.useCallback(async(X,ce)=>{t(_e=>_e&&{..._e,cards:_e.cards.map(Ie=>Ie.id===X?{...Ie,deadline:ce}:Ie)});try{await Nc(X,{deadline:ce})}catch(_e){hn.show({color:"red",message:_e.message}),De()}},[De]),ql=x.useCallback(async(X,ce)=>{t(_e=>_e&&{..._e,cards:_e.cards.map(Ie=>Ie.id===X?{...Ie,assignee_id:ce}:Ie)});try{await Nc(X,{assignee_id:ce})}catch(_e){hn.show({color:"red",message:_e.message}),De()}},[De]),qp=x.useCallback(async X=>{try{await bre(X),De(),gn()}catch(ce){hn.show({color:"red",message:ce.message})}},[De,gn]),mr=x.useCallback(async X=>{try{await wre(X),De(),gn()}catch(ce){hn.show({color:"red",message:ce.message})}},[De,gn]),_d=x.useCallback(async X=>{try{await xre(X),De(),xn()}catch(ce){hn.show({color:"red",message:ce.message})}},[De,xn]),xd=x.useCallback(async X=>{try{await _re(X),De(),xn()}catch(ce){hn.show({color:"red",message:ce.message})}},[De,xn]),Sd=x.useCallback(async X=>{Ra.openConfirmModal({title:"Borrar permanentemente",children:v.jsx(de,{size:"sm",children:"Esta accion no se puede deshacer."}),labels:{confirm:"Borrar",cancel:"Cancelar"},confirmProps:{color:"red"},onConfirm:async()=>{try{await kre(X),gn()}catch(ce){hn.show({color:"red",message:ce.message})}}})},[gn]),Ka=x.useCallback(async(X,ce)=>{t(_e=>_e&&{..._e,cards:_e.cards.map(Ie=>Ie.id===X?{...Ie,color:ce}:Ie)});try{await Nc(X,{color:ce})}catch(_e){hn.show({color:"red",message:_e.message}),De()}},[De]),Cd=x.useCallback(async(X,ce)=>{t(_e=>_e&&{..._e,cards:_e.cards.map(Ie=>Ie.id===X?{...Ie,stickers:ce}:Ie)});try{await Zk(X,ce)}catch(_e){hn.show({color:"red",message:_e.message}),De()}},[De]),jd=x.useCallback((X,ce,_e)=>{we&&t(Ie=>{if(!Ie)return Ie;const fn=Ie.cards.map(Wn=>{if(Wn.id!==X)return Wn;const ht=[...Wn.stickers||[],{emoji:we,x:ce,y:_e}];return Zk(X,ht).catch(Rt=>{hn.show({color:"red",message:Rt.message}),De()}),{...Wn,stickers:ht}});return{...Ie,cards:fn}})},[we,De]),Oo=x.useCallback((X,ce)=>{t(_e=>{if(!_e)return _e;const Ie=_e.cards.map(fn=>{if(fn.id!==X)return fn;const Wn=(fn.stickers||[]).filter((ht,Rt)=>Rt!==ce);return Zk(X,Wn).catch(ht=>{hn.show({color:"red",message:ht.message}),De()}),{...fn,stickers:Wn}});return{..._e,cards:Ie}})},[De]),Hp=x.useCallback((X,ce,_e,Ie)=>{t(fn=>{if(!fn)return fn;const Wn=fn.cards.map(ht=>{if(ht.id!==X)return ht;const Rt=(ht.stickers||[]).map((si,pr)=>pr===ce?{...si,x:_e,y:Ie}:si);return{...ht,stickers:Rt}});return{...fn,cards:Wn}})},[]),Ad=x.useCallback(X=>{t(ce=>{if(!ce)return ce;const _e=ce.cards.find(Ie=>Ie.id===X);return _e&&Cd(X,_e.stickers||[]),ce})},[Cd]),Od=x.useCallback(X=>{Ra.open({title:X.title,size:"md",children:v.jsx(tAe,{card:X,columns:(n==null?void 0:n.columns)??[]})})},[n==null?void 0:n.columns]),ec=x.useCallback(async(X,ce)=>{t(_e=>_e&&{..._e,cards:_e.cards.map(Ie=>Ie.id===X?{...Ie,locked:ce}:Ie)});try{await Nc(X,{locked:ce})}catch(_e){hn.show({color:"red",message:_e.message}),De()}},[De]),Up=x.useCallback(async(X,ce)=>{t(_e=>_e&&{..._e,columns:_e.columns.map(Ie=>Ie.id===X?{...Ie,wip_limit:ce}:Ie)});try{await uu(X,{wip_limit:ce})}catch(_e){hn.show({color:"red",message:_e.message}),De()}},[De]),Vp=x.useCallback(X=>{const ce=(dr.get(X)||[]).filter(mt=>!mt.locked);if(ce.length===0){hn.show({color:"yellow",message:"No hay cards disponibles (filtro y bloqueadas excluidas)"});return}if(ce.length===1){const mt=document.querySelector(`[data-card-id="${ce[0].id}"]`);mt&&(mt.scrollIntoView({behavior:"smooth",block:"center"}),mt.classList.add("kanban-roulette-winner"),setTimeout(()=>mt.classList.remove("kanban-roulette-winner"),1700));return}const _e=(()=>{const mt=new Uint32Array(1);return crypto.getRandomValues(mt),mt[0]%ce.length})(),fn=2*ce.length+(_e-0+ce.length)%ce.length,Wn=50,ht=220,Rt=mt=>1-Math.pow(1-mt,3);let si=0;const pr=()=>{const mt=si%ce.length,et=(mt-1+ce.length)%ce.length,di=document.querySelector(`[data-card-id="${ce[et].id}"]`),Ti=document.querySelector(`[data-card-id="${ce[mt].id}"]`);if(di&&di.classList.remove("kanban-roulette-active"),Ti&&(Ti.classList.add("kanban-roulette-active"),Ti.scrollIntoView({behavior:"smooth",block:"center"})),si++,si>fn){Ti&&(Ti.classList.remove("kanban-roulette-active"),Ti.classList.add("kanban-roulette-winner"),setTimeout(()=>Ti.classList.remove("kanban-roulette-winner"),1700));return}const vr=fn>0?si/fn:1,Qr=Wn+(ht-Wn)*Rt(vr);setTimeout(pr,Qr)};pr()},[dr]),Hl=x.useCallback(async(X,ce)=>{t(_e=>_e&&{..._e,columns:_e.columns.map(Ie=>Ie.id===X?{...Ie,max_time_minutes:ce}:Ie)});try{await uu(X,{max_time_minutes:ce})}catch(_e){hn.show({color:"red",message:_e.message}),De()}},[De]),Zr=x.useCallback(async(X,ce)=>{t(_e=>_e&&{..._e,columns:_e.columns.map(Ie=>Ie.id===X?{...Ie,is_done:ce}:Ie)});try{await uu(X,{is_done:ce}),De()}catch(_e){hn.show({color:"red",message:_e.message}),De()}},[De]),Td=x.useMemo(()=>({height:50}),[]),Ed=x.useMemo(()=>({width:be,breakpoint:"md",collapsed:{mobile:!Je,desktop:!Je}}),[be,Je]),Cs=x.useMemo(()=>({width:380,breakpoint:"md",collapsed:{mobile:!_,desktop:!_}}),[_]),js=x.useMemo(()=>({main:{paddingInlineStart:0,paddingInlineEnd:0}}),[]);if(!n)return v.jsx(Ee,{justify:"center",p:"xl",children:v.jsx(Zt,{})});const Ul=a,As=l?hr(l):null;return v.jsxs(poe,{sensors:an,collisionDetection:gOe(f),onDragStart:Ao,onDragOver:Kr,onDragEnd:Xr,children:[v.jsx("div",{className:"kanban-drag-edge"+(bn?" is-active":"")+(sn?" is-armed":""),"data-test":"kanban-drag-edge","data-active":bn?"1":"0","data-armed":sn?"1":"0","aria-hidden":"true"}),v.jsxs(xr,{header:Td,navbar:Ed,aside:Cs,padding:0,styles:js,children:[v.jsx(xr.Header,{children:v.jsxs(Ee,{h:"100%",px:"md",justify:"space-between",children:[v.jsxs(Ee,{gap:6,children:[v.jsx(Jn,{variant:Je?"filled":"subtle",onClick:()=>oe(X=>!X),"aria-label":"Toggle sidebar",children:v.jsx(Kle,{size:16})}),v.jsx(s4,{size:22}),v.jsx(El,{order:4,children:"Kanban"}),v.jsx(Gt,{value:j,onChange:X=>X&&T(X),variant:"pills",ml:"md",children:v.jsxs(Gt.List,{children:[v.jsx(Gt.Tab,{value:"board",leftSection:v.jsx(s4,{size:14}),children:"Tablero"}),v.jsx(Gt.Tab,{value:"dashboard",leftSection:v.jsx(lle,{size:14}),children:"Dashboard"}),v.jsx(Gt.Tab,{value:"calendar",leftSection:v.jsx(ole,{size:14}),children:"Calendario"})]})})]}),v.jsxs(Ee,{gap:4,children:[v.jsx(Jn,{variant:"subtle",onClick:De,"aria-label":"Refresh",children:v.jsx(ff,{size:16})}),e.user&&v.jsx(uOe,{unreadCount:In,notifications:qe,onOpenCard:async(X,ce)=>{const _e=fn=>fn==null?void 0:fn.find(Wn=>Wn.id===X);let Ie=_e(n==null?void 0:n.cards);if(!Ie){await De();const fn=await sM();Ie=_e(fn.cards)}if(!Ie){const fn=await uM();Ie=_e(fn)}if(!Ie){const fn=await lM();Ie=_e(fn)}if(!Ie){hn.show({color:"red",message:"Card no encontrada"});return}Dr(Ie,{highlightMessageId:ce})},onChanged:Mn}),v.jsx(Jn,{variant:_?"filled":"subtle",onClick:()=>S(X=>!X),"aria-label":"Toggle chat",children:v.jsx(Kq,{size:16})}),e.user&&v.jsxs(zn,{position:"bottom-end",shadow:"md",withArrow:!0,closeOnItemClick:!1,children:[v.jsx(zn.Target,{children:v.jsx(Jn,{variant:"subtle","aria-label":"Usuario",children:v.jsx(mo,{size:26,radius:"xl",color:e.user.color||"blue",children:(e.user.display_name||e.user.username).slice(0,2).toUpperCase()})})}),v.jsxs(zn.Dropdown,{children:[v.jsx(zn.Label,{children:v.jsxs(Ee,{justify:"space-between",gap:6,wrap:"nowrap",children:[v.jsx(de,{size:"xs",fw:600,truncate:!0,children:e.user.display_name||e.user.username}),Pn&&v.jsxs(de,{size:"xs",c:"dimmed",ff:"monospace",children:["v",Pn]})]})}),v.jsxs(fe,{p:"xs",children:[v.jsx(de,{size:"xs",c:"dimmed",mb:4,children:"Color del avatar"}),v.jsx(xG,{value:e.user.color||"",onChange:async X=>{try{const ce=await hM({color:X});e.setUser(ce)}catch(ce){hn.show({color:"red",message:ce.message})}},options:Hue,onOpenCustom:()=>{var X,ce;Ye((ce=(X=e.user)==null?void 0:X.color)!=null&&ce.startsWith("#")?e.user.color:"#888888"),he(!0)}})]}),v.jsx(zn.Divider,{}),e.user.is_admin&&v.jsx(zn.Item,{leftSection:v.jsx(Qq,{size:14}),onClick:()=>ln(!0),children:"Modulos"}),e.user.is_admin&&v.jsx(zn.Item,{leftSection:v.jsx(M9,{size:14}),onClick:()=>Rn(!0),children:"Importar de Jira"}),v.jsx(zn.Item,{leftSection:v.jsx(Ble,{size:14}),onClick:()=>Xn(!0),children:"MCP tokens"}),v.jsx(zn.Item,{leftSection:v.jsx(Gle,{size:14}),color:"red",onClick:()=>e.logout(),children:"Cerrar sesion"})]})]}),((Md=e.user)==null?void 0:Md.is_admin)&&v.jsx(fOe,{opened:on,onClose:()=>ln(!1)}),((Os=e.user)==null?void 0:Os.is_admin)&&n&&v.jsx(mOe,{opened:Lt,onClose:()=>Rn(!1),columns:n.columns,onImported:()=>De()}),v.jsx(hOe,{opened:Kn,onClose:()=>Xn(!1)})]})]})}),v.jsxs(xr.Navbar,{p:"xs",children:[v.jsx(fe,{onMouseDown:je,style:{position:"absolute",top:0,right:-3,width:6,height:"100%",cursor:"col-resize",zIndex:10},"aria-label":"Resize sidebar"}),v.jsxs(kn,{gap:"xs",h:"100%",children:[v.jsx(de,{size:"xs",c:"dimmed",fw:600,tt:"uppercase",children:"Columnas parqueadas"}),v.jsx(fe,{style:{flex:1,overflowY:"auto"},children:v.jsx(n4,{items:Co,strategy:cq,children:v.jsxs(kn,{gap:"xs",children:[zi.length===0&&v.jsx(de,{size:"xs",c:"dimmed",children:'Vacio. Mueve columnas aqui con el icono "archivar" en su cabecera.'}),zi.map(X=>v.jsx(fz,{column:X,cards:dr.get(X.id)??[],now:w,collapsed:!0,onAddCard:Fl,onRenameColumn:vd,onResizeColumn:gd,onMoveColumnLocation:Fp,onDeleteColumn:Bl,onSetWIPLimit:Up,onSetMaxTimeMinutes:Hl,onPickRandom:Vp,onToggleDone:Zr,onEditCard:Dr,onDeleteCard:qp,onDuplicateCard:tr,onChangeCardColor:Ka,onShowHistory:Od,onToggleCardLock:ec,onAssignCard:ql,onSetCardDeadline:kd,highlightCardId:$e,onSetRequester:yd,onArchiveCard:xd,requesterOptions:R,onOpenCustomCardColor:(ce,_e)=>Qe({cardId:ce,color:_e}),activeSticker:we,onAddSticker:jd,onRemoveSticker:Oo,onMoveSticker:Hp,onCommitSticker:Ad,users:i,usersById:Qn},X.id))]})})}),v.jsxs(fe,{style:{borderTop:"1px solid var(--mantine-color-dark-5)",paddingTop:8},children:[v.jsx(Yn,{variant:"subtle",color:"gray",size:"xs",fullWidth:!0,justify:"space-between",leftSection:v.jsx(vo,{size:14}),rightSection:v.jsxs(Ee,{gap:4,children:[v.jsx(Gn,{size:"xs",variant:"light",color:A.length>0?"red":"gray",children:A.length}),M?v.jsx(r4,{size:12}):v.jsx(a4,{size:12})]}),onClick:()=>$(X=>!X),children:"Papelera"}),M&&v.jsxs(kn,{gap:4,mt:4,style:{maxHeight:220,overflowY:"auto"},children:[A.length===0&&v.jsx(de,{size:"xs",c:"dimmed",px:"xs",children:"Vacia."}),A.map(X=>v.jsx(Tt,{p:6,withBorder:!0,radius:"sm",bg:"dark.7",children:v.jsxs(Ee,{justify:"space-between",gap:4,wrap:"nowrap",children:[v.jsx(de,{size:"xs",truncate:!0,style:{flex:1},title:X.title,children:X.title}),v.jsx(wt,{label:"Restaurar",withArrow:!0,children:v.jsx(Jn,{size:"xs",variant:"subtle",color:"green",onClick:()=>mr(X.id),children:v.jsx(u1,{size:12})})}),v.jsx(wt,{label:"Borrar permanentemente",withArrow:!0,children:v.jsx(Jn,{size:"xs",variant:"subtle",color:"red",onClick:()=>Sd(X.id),children:v.jsx(_ue,{size:12})})})]})},X.id))]})]}),v.jsxs(fe,{style:{borderTop:"1px solid var(--mantine-color-dark-5)",paddingTop:8},children:[v.jsx(Yn,{variant:"subtle",color:"gray",size:"xs",fullWidth:!0,justify:"space-between",leftSection:v.jsx(cs,{size:14}),rightSection:v.jsxs(Ee,{gap:4,children:[v.jsx(Gn,{size:"xs",variant:"light",color:q.length>0?"teal":"gray",children:q.length}),L?v.jsx(r4,{size:12}):v.jsx(a4,{size:12})]}),onClick:()=>U(X=>!X),"data-test":"archive-toggle",children:"Hecho (archivo)"}),L&&v.jsxs(kn,{gap:4,mt:4,style:{maxHeight:220,overflowY:"auto"},children:[q.length===0&&v.jsx(de,{size:"xs",c:"dimmed",px:"xs",children:"Sin cards archivadas."}),q.map(X=>v.jsx(Tt,{p:6,withBorder:!0,radius:"sm",bg:"dark.7","data-archived-card-id":X.id,children:v.jsxs(Ee,{justify:"space-between",gap:4,wrap:"nowrap",children:[v.jsx(de,{size:"xs",truncate:!0,style:{flex:1},title:X.title,children:X.title}),v.jsx(wt,{label:"Sacar del archivo (volver a Hecho)",withArrow:!0,children:v.jsx(Jn,{size:"xs",variant:"subtle",color:"teal",onClick:()=>_d(X.id),children:v.jsx(u1,{size:12})})})]})},X.id))]})]})]})]}),v.jsx(xr.Aside,{children:v.jsx(Rve,{onBoardChange:De})}),v.jsx(xr.Main,{children:j==="dashboard"?v.jsx(fe,{style:{height:"calc(100vh - 50px)",overflow:"auto"},children:v.jsx(Jje,{users:i})}):j==="calendar"?v.jsx(fe,{style:{height:"calc(100vh - 50px)",overflow:"auto"},children:v.jsx(Nve,{users:i,cards:n.cards,onJumpToCard:bd,onOpenDailyReport:wd})}):v.jsxs(fe,{style:{height:"calc(100vh - 50px)",overflow:"hidden",display:"flex",flexDirection:"column"},children:[v.jsxs(Ee,{gap:"xs",p:"xs",wrap:"wrap",align:"end",style:{borderBottom:"1px solid var(--mantine-color-dark-4)"},children:[v.jsx(or,{leftSection:v.jsx(Jq,{size:14}),placeholder:"Buscar (titulo, descripcion, solicitante, tag)",value:z,onChange:X=>H(X.currentTarget.value),rightSection:z?v.jsx(Jn,{size:"sm",variant:"subtle",color:"gray",onClick:()=>H(""),"aria-label":"Limpiar",children:v.jsx(qh,{size:14})}):null,style:{minWidth:280,flex:1},size:"xs"}),v.jsx(jr,{placeholder:"Asignado",value:Y,onChange:N,data:i.map(X=>({value:X.id,label:X.display_name||X.username})),clearable:!0,searchable:!0,size:"xs",style:{minWidth:160},disabled:ie}),v.jsx(Gr,{size:"xs",label:"Sin asignar",checked:ie,onChange:X=>{const ce=X.currentTarget.checked;re(ce),ce&&N(null)}}),v.jsx(Gr,{size:"xs",label:"Con deadline",checked:ke,onChange:X=>te(X.currentTarget.checked)}),v.jsx(jr,{placeholder:"Solicitante",value:W,onChange:V,data:R,clearable:!0,searchable:!0,size:"xs",style:{minWidth:160}}),v.jsx(u0,{placeholder:"Tags",value:I,onChange:Q,data:G,clearable:!0,searchable:!0,size:"xs",style:{minWidth:200}}),v.jsx(Du,{placeholder:"Desde",value:Z,onChange:X=>le(X?new Date(X):null),clearable:!0,size:"xs",style:{minWidth:130},valueFormat:"DD/MM/YY"}),v.jsx(Du,{placeholder:"Hasta",value:ee,onChange:X=>se(X?new Date(X):null),clearable:!0,size:"xs",style:{minWidth:130},valueFormat:"DD/MM/YY"}),v.jsxs(Ee,{gap:4,children:[v.jsx(Yn,{size:"xs",variant:"default",onClick:()=>{const X=new Date;le(X),se(X)},children:"Hoy"}),v.jsx(Yn,{size:"xs",variant:"default",onClick:()=>{const X=new Date,ce=new Date;ce.setDate(ce.getDate()-7),le(ce),se(X)},children:"7d"}),v.jsx(Yn,{size:"xs",variant:"default",onClick:()=>{const X=new Date,ce=new Date;ce.setDate(ce.getDate()-30),le(ce),se(X)},children:"30d"})]}),v.jsx(rOe,{opened:Ae,onClose:()=>ze(!1),onSelect:X=>Ce(X),target:v.jsx(Yn,{size:"xs",variant:we?"filled":"default",color:we?"yellow":void 0,leftSection:v.jsx(Jle,{size:14}),onClick:()=>{we?ze(X=>!X):Ce("😀")},children:we?`Modo sticker: ${we}`:"Stickers"})}),we&&v.jsx(Yn,{size:"xs",variant:"subtle",color:"gray",leftSection:v.jsx(qh,{size:12}),onClick:()=>Ce(null),children:"ESC"}),jo&&v.jsx(Yn,{size:"xs",variant:"subtle",color:"gray",leftSection:v.jsx(qh,{size:12}),onClick:()=>{H(""),N(null),re(!1),V(null),Q([]),le(null),se(null),te(!1)},children:"Limpiar"})]}),v.jsx(n4,{items:Ya,strategy:Loe,children:v.jsxs(Ee,{align:"stretch",wrap:"nowrap",gap:"md",p:"md",style:{flex:1,overflowX:"auto",overflowY:"hidden"},children:[fi.map(X=>v.jsx(fz,{column:X,cards:dr.get(X.id)??[],now:w,onAddCard:Fl,onRenameColumn:vd,onResizeColumn:gd,onMoveColumnLocation:Fp,onDeleteColumn:Bl,onSetWIPLimit:Up,onSetMaxTimeMinutes:Hl,onPickRandom:Vp,onToggleDone:Zr,onEditCard:Dr,onDeleteCard:qp,onDuplicateCard:tr,onChangeCardColor:Ka,onShowHistory:Od,onToggleCardLock:ec,onAssignCard:ql,onSetCardDeadline:kd,highlightCardId:$e,onSetRequester:yd,onArchiveCard:xd,requesterOptions:R,activeSticker:we,onAddSticker:jd,onRemoveSticker:Oo,onMoveSticker:Hp,onCommitSticker:Ad,users:i,usersById:Qn},X.id)),v.jsx(fe,{style:{minWidth:280,maxWidth:320},children:d?v.jsxs(kn,{gap:4,children:[v.jsx(or,{size:"xs",placeholder:"Nombre de columna...",value:g,onChange:X=>b(X.currentTarget.value),autoFocus:!0,onKeyDown:X=>{X.key==="Enter"&&Bp(),X.key==="Escape"&&(p(!1),b(""))}}),v.jsxs(Ee,{gap:4,children:[v.jsx(Yn,{size:"xs",onClick:Bp,children:"Anadir"}),v.jsx(Jn,{variant:"subtle",color:"gray",onClick:()=>p(!1),children:v.jsx(qh,{size:14})})]})]}):v.jsx(Yn,{variant:"light",color:"gray",leftSection:v.jsx(cf,{size:14}),onClick:()=>p(!0),children:"Anadir columna"})})]})})]})})]}),v.jsx(Poe,{children:Ul?v.jsx(SG,{card:Ul,now:w,onDelete:()=>{},onEdit:()=>{},onChangeColor:()=>{},onShowHistory:()=>{},onToggleLock:()=>{},onAssign:()=>{},users:i,assignee:Ul.assignee_id?Qn.get(Ul.assignee_id):void 0,isOverlay:!0}):As?v.jsx(fe,{style:{width:As.location==="sidebar"?220:As.width,padding:8,background:tH(""),border:`1px solid ${N9("")}`,borderRadius:8,opacity:.9},children:v.jsx(de,{fw:600,size:"sm",children:As.name})}):null}),v.jsx(B6,{opened:Ne,onClose:()=>he(!1),value:He,onAccept:async X=>{Ye(X);try{const ce=await hM({color:X});e.setUser(ce)}catch(ce){hn.show({color:"red",message:ce.message})}}}),v.jsx(B6,{opened:!!We,onClose:()=>Qe(null),value:(We==null?void 0:We.color)||"#888888",onAccept:X=>{We&&Ka(We.cardId,X)}})]})}function bOe(){const e=g9(),[n,t]=x.useState("login"),[i,r]=x.useState(""),[a,o]=x.useState(""),[l,u]=x.useState(""),[f,h]=x.useState(!1),[d,p]=x.useState(null),[g,b]=x.useState(!1),[w,k]=x.useState("");x.useEffect(()=>{mre().then(S=>b(!!S["registration-enabled"])).catch(()=>b(!1)),PF().then(S=>k(S.version)).catch(()=>k(""))},[]),x.useEffect(()=>{!g&&n==="register"&&t("login")},[g,n]);const _=async S=>{S.preventDefault(),p(null),h(!0);try{n==="login"?await e.login(i.trim(),a):await e.register(i.trim(),a,l.trim()||i.trim())}catch(j){p(j.message)}finally{h(!1)}};return v.jsx(Gf,{style:{minHeight:"100vh"},p:"md",children:v.jsx(Tt,{p:"xl",withBorder:!0,radius:"md",shadow:"md",style:{width:360,maxWidth:"100%"},children:v.jsx("form",{onSubmit:_,children:v.jsxs(kn,{gap:"md",children:[v.jsxs(kn,{gap:4,align:"center",children:[v.jsx(s4,{size:36}),v.jsx(El,{order:3,children:"Kanban"}),w&&v.jsxs(de,{size:"xs",c:"dimmed",ff:"monospace",children:["v",w]}),v.jsx(de,{size:"sm",c:"dimmed",children:n==="login"?"Inicia sesion":"Crea una cuenta"})]}),v.jsx(or,{label:"Usuario",value:i,onChange:S=>r(S.currentTarget.value),required:!0,autoFocus:!0,autoComplete:"username"}),n==="register"&&v.jsx(or,{label:"Nombre (opcional)",value:l,onChange:S=>u(S.currentTarget.value),autoComplete:"name"}),v.jsx(d0,{label:"Contrasena",value:a,onChange:S=>o(S.currentTarget.value),required:!0,autoComplete:n==="login"?"current-password":"new-password"}),d&&v.jsx(de,{size:"sm",c:"red",children:d}),v.jsx(Yn,{type:"submit",loading:f,fullWidth:!0,children:n==="login"?"Entrar":"Registrar"}),g?v.jsxs(de,{size:"xs",c:"dimmed",ta:"center",children:[n==="login"?"No tienes cuenta?":"Ya tienes cuenta?"," ",v.jsx(ho,{component:"button",type:"button",size:"xs",onClick:()=>{p(null),t(n==="login"?"register":"login")},children:n==="login"?"Registrate":"Inicia sesion"})]}):v.jsx(de,{size:"xs",c:"dimmed",ta:"center",children:"Registro de nuevos usuarios deshabilitado."})]})})})})}function wOe(){const{user:e,loading:n}=g9();return n?v.jsx(Gf,{style:{minHeight:"100vh"},children:v.jsx(Zt,{})}):e?v.jsx(yOe,{}):v.jsx(bOe,{})}const kOe={primaryColor:"blue",fontFamily:"system-ui, -apple-system, sans-serif"};dre.createRoot(document.getElementById("root")).render(v.jsx(eL,{theme:kOe,defaultColorScheme:"dark",children:v.jsxs(Nie,{children:[v.jsx(_o,{position:"top-right"}),v.jsx(tae,{children:v.jsx(wOe,{})})]})})); +`;function aOe({opened:e,onClose:n,onSelect:t,target:i}){return v.jsxs(Sn,{opened:e,onChange:r=>{r||n()},onDismiss:n,position:"bottom-start",withArrow:!0,shadow:"md",withinPortal:!0,closeOnClickOutside:!0,closeOnEscape:!0,trapFocus:!1,children:[v.jsx(Sn.Target,{children:i}),v.jsx(Sn.Dropdown,{p:0,style:{background:"transparent",border:"none"},children:v.jsx(oOe,{onSelect:r=>{t(r),n()}})})]})}function oOe({onSelect:e}){const n=x.useRef(null),t=x.useRef(null),i=x.useRef(e);return i.current=e,x.useEffect(()=>{if(n.current)return t.current=new oA({data:yAe,onEmojiSelect:r=>{const a=i.current;r.native?a(r.native):r.shortcodes&&a(r.shortcodes)},theme:"dark",previewPosition:"none",skinTonePosition:"search",autoFocus:!0,maxFrequentRows:2,ref:n}),()=>{n.current&&(n.current.innerHTML=""),t.current=null}},[]),v.jsx("div",{ref:n})}const sOe={mention:v.jsx(Zse,{size:14}),assigned_chat:v.jsx(Tue,{size:14}),reply:v.jsx(Zq,{size:14})},lOe={mention:"Mencion",assigned_chat:"Asignado",reply:"Respuesta"},uOe={mention:"grape",assigned_chat:"blue",reply:"gray"};function cOe({unreadCount:e,notifications:n,onOpenCard:t,onChanged:i}){const[r,a]=x.useState(!1),[o,l]=x.useState(n??[]),[u,f]=x.useState(e??0),[h,d]=x.useState(!1);x.useEffect(()=>{n&&l(n)},[n]),x.useEffect(()=>{e!==void 0&&f(e)},[e]);const p=x.useCallback(async()=>{d(!0);try{const[_,S]=await Promise.all([$F(!1),zF()]);l(_),f(S.count)}finally{d(!1)}},[]);x.useEffect(()=>{(n===void 0||e===void 0)&&p()},[n,e,p]);const g=_=>{a(_),_&&p()},b=async _=>{if(!_.read_at)try{await zre(_.id),l(S=>S.map(j=>j.id===_.id?{...j,read_at:new Date().toISOString()}:j)),f(S=>Math.max(0,S-1)),i==null||i()}catch{}a(!1),t==null||t(_.card_id,_.message_id)},w=async()=>{try{await Lre(),l(_=>_.map(S=>S.read_at?S:{...S,read_at:new Date().toISOString()})),f(0),i==null||i()}catch{}},k=v.jsx(Jn,{variant:"subtle","aria-label":"Notificaciones",children:v.jsx(Jse,{size:16})});return v.jsxs(Sn,{opened:r,onChange:g,position:"bottom-end",width:380,withArrow:!0,shadow:"md",children:[v.jsx(Sn.Target,{children:v.jsx(fe,{onClick:()=>g(!r),style:{display:"inline-flex"},children:u>0?v.jsx(Jy,{color:"red",label:u>99?"99+":u,size:16,offset:4,children:k}):k})}),v.jsxs(Sn.Dropdown,{p:0,children:[v.jsxs(Ee,{justify:"space-between",px:"sm",py:"xs",children:[v.jsx(de,{fw:600,size:"sm",children:"Notificaciones"}),v.jsx(wt,{label:"Marcar todas como leidas",withArrow:!0,children:v.jsx(Yn,{size:"compact-xs",variant:"subtle",leftSection:v.jsx(cs,{size:12}),onClick:w,disabled:u===0,children:"Todas leidas"})})]}),v.jsx(ur,{h:420,type:"auto",offsetScrollbars:!0,children:h&&o.length===0?v.jsx(Ee,{justify:"center",p:"md",children:v.jsx(Zt,{size:"sm"})}):o.length===0?v.jsx(de,{size:"sm",c:"dimmed",ta:"center",p:"md",children:"Sin notificaciones"}):v.jsx(kn,{gap:0,children:o.map(_=>{const S=!_.read_at;return v.jsx(Et,{onClick:()=>b(_),p:"sm",style:{borderTop:"1px solid var(--mantine-color-gray-2)",background:S?"var(--mantine-color-blue-light)":void 0,textAlign:"left"},children:v.jsxs(Ee,{gap:6,wrap:"nowrap",align:"flex-start",children:[v.jsx(Gn,{size:"xs",variant:"light",color:uOe[_.kind],leftSection:sOe[_.kind],children:lOe[_.kind]}),v.jsxs(fe,{style:{flex:1,minWidth:0},children:[v.jsxs(Ee,{gap:6,wrap:"nowrap",justify:"space-between",children:[v.jsxs(de,{size:"xs",fw:600,truncate:!0,children:[_.actor_name||"Alguien"," · #",_.card_seq_num," ",_.card_title]}),v.jsx(de,{size:"xs",c:"dimmed",children:Sl(_.created_at)})]}),v.jsx(de,{size:"xs",c:S?void 0:"dimmed",lineClamp:2,style:{whiteSpace:"pre-wrap"},children:_.snippet})]})]})},_.id)})})})]})]})}const fOe=["card.created","card.updated","card.moved","card.deleted","message.created","board.invalidated"],Nz={base_url:"",email:"",api_token:"",project_key:"",status_map:{"Por hacer":"To Do",Doing:"In Progress",Done:"Done"}};function dOe({opened:e,onClose:n}){const[t,i]=x.useState([]),[r,a]=x.useState(!1),[o,l]=x.useState(null),[u,f]=x.useState(null),[h,d]=x.useState([]),[p,g]=x.useState(!1),[b,w]=x.useState("form"),k=x.useCallback(async()=>{a(!0);try{const M=await Ire();i(M)}catch(M){hn.show({color:"red",message:M.message})}finally{a(!1)}},[]);x.useEffect(()=>{e&&k()},[e,k]);const _=x.useCallback(async M=>{g(!0);try{const $=await Hre(M);d($)}catch($){hn.show({color:"red",message:$.message})}finally{g(!1)}},[]),S=M=>{f(M?{...M,config:{...M.config}}:null),l((M==null?void 0:M.id)??null),w("form"),d([]),M&&_(M.id)},j=()=>{const M={id:"",name:"Nuevo modulo",kind:"jira",enabled:!1,event_filter:["card.created","card.updated","card.moved","message.created"],config:{...Nz,status_map:{...Nz.status_map}},created_at:"",updated_at:""};f(M),l(null),w("form"),d([])},T=async()=>{if(u)try{const M={name:u.name,kind:u.kind,enabled:u.enabled,event_filter:u.event_filter,config:u.config},$=u.id?await Fre(u.id,M):await Bre(M);hn.show({color:"green",message:"Modulo guardado"}),await k(),S($)}catch(M){hn.show({color:"red",message:M.message})}},A=async()=>{if(o&&confirm("Borrar modulo?"))try{await qre(o),hn.show({color:"green",message:"Modulo borrado"}),f(null),l(null),k()}catch(M){hn.show({color:"red",message:M.message})}},O=async()=>{if(u)try{const M=u.id?await fM(u.id):await fM("draft",{name:u.name,kind:u.kind,enabled:u.enabled,event_filter:u.event_filter,config:u.config});M.ok?hn.show({color:"green",title:`Test OK (${M.status})`,message:`Conexion verificada en ${M.duration_ms}ms`}):hn.show({color:"red",title:`Test fallo (${M.status})`,message:M.error||"sin detalle"})}catch(M){hn.show({color:"red",message:M.message})}};return v.jsx(Gi,{opened:e,onClose:n,title:v.jsxs(Ee,{gap:8,children:[v.jsx(Jq,{size:18}),v.jsx(de,{fw:600,children:"Modulos / Integraciones"})]}),size:"xl",centered:!0,children:v.jsxs(Ee,{align:"flex-start",gap:"md",wrap:"nowrap",children:[v.jsxs(fe,{style:{width:220,minWidth:220},children:[v.jsxs(Ee,{justify:"space-between",mb:6,children:[v.jsx(de,{size:"xs",c:"dimmed",children:"Configurados"}),v.jsx(wt,{label:"Refrescar",withArrow:!0,children:v.jsx(Jn,{size:"sm",variant:"subtle",onClick:k,children:v.jsx(ff,{size:14})})})]}),v.jsx(ur,{h:400,type:"auto",children:v.jsxs(kn,{gap:4,children:[r&&v.jsx(Zt,{size:"xs"}),t.map(M=>v.jsxs(fe,{p:"xs",style:{cursor:"pointer",border:"1px solid var(--mantine-color-gray-3)",borderRadius:4,background:o===M.id?"var(--mantine-color-blue-light)":void 0},onClick:()=>S(M),children:[v.jsxs(Ee,{justify:"space-between",gap:4,wrap:"nowrap",children:[v.jsx(de,{size:"sm",fw:600,truncate:!0,children:M.name}),v.jsx(Gn,{size:"xs",color:M.enabled?"green":"gray",children:M.enabled?"on":"off"})]}),v.jsx(de,{size:"xs",c:"dimmed",children:M.kind})]},M.id)),v.jsx(Yn,{size:"xs",variant:"light",onClick:j,mt:"xs",children:"+ Nuevo"})]})})]}),v.jsx(us,{orientation:"vertical"}),v.jsx(fe,{style:{flex:1,minWidth:0},children:u?v.jsxs(Gt,{value:b,onChange:w,children:[v.jsxs(Gt.List,{children:[v.jsx(Gt.Tab,{value:"form",children:"Configuracion"}),v.jsx(Gt.Tab,{value:"logs",children:"Logs"})]}),v.jsx(Gt.Panel,{value:"form",pt:"xs",children:v.jsxs(kn,{gap:"xs",children:[v.jsxs(Ee,{gap:"xs",children:[v.jsx(or,{label:"Nombre",value:u.name,onChange:M=>f({...u,name:M.currentTarget.value}),style:{flex:1}}),v.jsx(jr,{label:"Kind",value:u.kind,onChange:M=>f({...u,kind:M||"jira"}),data:[{value:"jira",label:"Jira"}],w:140})]}),v.jsx(Gr,{label:"Activo",checked:u.enabled,onChange:M=>f({...u,enabled:M.currentTarget.checked})}),v.jsxs(fe,{children:[v.jsx(de,{size:"xs",fw:600,mb:4,children:"Eventos"}),v.jsx(Ee,{gap:"xs",children:fOe.map(M=>v.jsx(Gr,{label:v.jsx(pl,{children:M}),checked:u.event_filter.includes(M),onChange:$=>{const q=$.currentTarget.checked?[...u.event_filter,M]:u.event_filter.filter(P=>P!==M);f({...u,event_filter:q})}},M))})]}),v.jsx(hOe,{editing:u,setEditing:f}),v.jsxs(Ee,{gap:"xs",children:[v.jsx(Yn,{onClick:T,leftSection:v.jsx(lue,{size:14}),children:"Guardar"}),v.jsx(Yn,{variant:"default",onClick:O,leftSection:v.jsx(kue,{size:14}),children:"Probar conexion"}),o&&v.jsx(Yn,{color:"red",variant:"subtle",onClick:A,leftSection:v.jsx(vo,{size:14}),ml:"auto",children:"Borrar"})]})]})}),v.jsxs(Gt.Panel,{value:"logs",pt:"xs",children:[v.jsxs(Ee,{justify:"space-between",mb:6,children:[v.jsx(de,{size:"xs",c:"dimmed",children:"Ultimas 100 entradas"}),v.jsx(Jn,{size:"sm",variant:"subtle",onClick:()=>o&&_(o),children:v.jsx(ff,{size:14})})]}),p?v.jsx(Zt,{size:"sm"}):h.length===0?v.jsx(de,{size:"sm",c:"dimmed",children:"Sin entradas."}):v.jsx(ur,{h:400,children:v.jsxs(Xe,{withTableBorder:!0,striped:!0,highlightOnHover:!0,stickyHeader:!0,children:[v.jsx(Xe.Thead,{children:v.jsxs(Xe.Tr,{children:[v.jsx(Xe.Th,{children:"Hora"}),v.jsx(Xe.Th,{children:"Evento"}),v.jsx(Xe.Th,{children:"HTTP"}),v.jsx(Xe.Th,{children:"ms"}),v.jsx(Xe.Th,{children:"Error"})]})}),v.jsx(Xe.Tbody,{children:h.map(M=>v.jsxs(Xe.Tr,{children:[v.jsx(Xe.Td,{children:Sl(M.created_at)}),v.jsx(Xe.Td,{children:v.jsx(pl,{children:M.event_type})}),v.jsx(Xe.Td,{children:v.jsx(Gn,{color:M.status>=400||M.error?"red":"green",size:"sm",children:M.status||"-"})}),v.jsx(Xe.Td,{children:M.duration_ms}),v.jsx(Xe.Td,{children:v.jsx(de,{size:"xs",c:"red",lineClamp:2,children:M.error})})]},M.id))})]})})]})]}):v.jsx(kl,{color:"gray",children:'Selecciona un modulo o pulsa "Nuevo".'})})]})})}function hOe({editing:e,setEditing:n}){const t=e.config,i=(a,o)=>n({...e,config:{...t,[a]:o}}),r=x.useMemo(()=>JSON.stringify(t.status_map??{},null,2),[t.status_map]);return e.kind!=="jira"?v.jsx(kl,{color:"yellow",mt:"xs",children:"Editor especifico para esta kind aun no implementado."}):v.jsxs(kn,{gap:"xs",children:[v.jsx(or,{label:"Base URL",placeholder:"https://acme.atlassian.net",value:t.base_url||"",onChange:a=>i("base_url",a.currentTarget.value)}),v.jsxs(Ee,{gap:"xs",children:[v.jsx(or,{label:"Email",value:t.email||"",onChange:a=>i("email",a.currentTarget.value),style:{flex:1}}),v.jsx(or,{label:"API token",placeholder:e.id?"*** (deja vacio para conservar)":"",value:t.api_token||"",onChange:a=>i("api_token",a.currentTarget.value),style:{flex:1}})]}),v.jsx(or,{label:"Project key",placeholder:"KAN",value:t.project_key||"",onChange:a=>i("project_key",a.currentTarget.value)}),v.jsx(KC,{label:"Status map (columna kanban → transicion Jira)",description:'{"Doing":"In Progress","Done":"Done"}',value:r,autosize:!0,minRows:3,validationError:"JSON invalido",onChange:a=>{try{const o=JSON.parse(a);i("status_map",o)}catch{}}})]})}function mOe({opened:e,onClose:n}){const[t,i]=x.useState([]),[r,a]=x.useState(!1),[o,l]=x.useState(""),[u,f]=x.useState(!1),[h,d]=x.useState(null),p=x.useCallback(async()=>{a(!0);try{i(await Qre())}catch(_){hn.show({color:"red",message:_.message})}finally{a(!1)}},[]);x.useEffect(()=>{e&&(p(),d(null),l(""))},[e,p]);const g=async()=>{const _=o.trim()||"default";f(!0);try{const S=await Zre(_);d(S),l(""),await p()}catch(S){hn.show({color:"red",message:S.message})}finally{f(!1)}},b=async _=>{if(confirm("Revocar este token? Quien lo este usando dejara de tener acceso."))try{await Jre(_),await p()}catch(S){hn.show({color:"red",message:S.message})}},w=`${window.location.origin}/mcp`,k=h?`claude mcp add kanban --transport http ${w} --header "Authorization: Bearer ${h.token}"`:"";return v.jsx(Gi,{opened:e,onClose:n,title:"MCP Tokens",size:"lg",children:v.jsxs(kn,{gap:"md",children:[v.jsx(de,{size:"sm",c:"dimmed",children:"Cada token deja conectar un cliente Claude al kanban como tu usuario. El valor solo aparece UNA vez al crearlo. Si lo pierdes, generas otro y revocas el antiguo."}),v.jsxs(Ee,{align:"end",children:[v.jsx(or,{label:"Nombre del token",placeholder:"ej. portatil, sobremesa...",value:o,onChange:_=>l(_.currentTarget.value),style:{flex:1},disabled:u}),v.jsx(Yn,{onClick:g,loading:u,children:"Generar"})]}),h&&v.jsx(kl,{color:"yellow",title:"Copia el token ahora — no se mostrara mas",children:v.jsxs(kn,{gap:"xs",children:[v.jsxs(Ee,{gap:"xs",align:"center",children:[v.jsx(pl,{style:{flex:1,wordBreak:"break-all"},children:h.token}),v.jsx(qS,{value:h.token,children:({copied:_,copy:S})=>v.jsx(wt,{label:_?"Copiado":"Copiar token",children:v.jsx(Jn,{variant:"subtle",onClick:S,children:_?v.jsx(cs,{size:16}):v.jsx(o4,{size:16})})})})]}),v.jsx(us,{}),v.jsx(de,{size:"xs",c:"dimmed",children:"Pega este comando en tu PC para registrar el MCP en Claude Code:"}),v.jsxs(Ee,{gap:"xs",align:"center",children:[v.jsx(pl,{block:!0,style:{flex:1},children:k}),v.jsx(qS,{value:k,children:({copied:_,copy:S})=>v.jsx(wt,{label:_?"Copiado":"Copiar comando",children:v.jsx(Jn,{variant:"subtle",onClick:S,children:_?v.jsx(cs,{size:16}):v.jsx(o4,{size:16})})})})]})]})}),v.jsx(us,{label:"Tokens activos",labelPosition:"left"}),r?v.jsx(Ee,{justify:"center",p:"md",children:v.jsx(Zt,{size:"sm"})}):t.length===0?v.jsx(de,{size:"sm",c:"dimmed",ta:"center",py:"md",children:"Sin tokens. Genera uno arriba."}):v.jsxs(Xe,{withTableBorder:!0,withColumnBorders:!0,verticalSpacing:"xs",highlightOnHover:!0,children:[v.jsx(Xe.Thead,{children:v.jsxs(Xe.Tr,{children:[v.jsx(Xe.Th,{children:"Nombre"}),v.jsx(Xe.Th,{children:"Creado"}),v.jsx(Xe.Th,{children:"Ultimo uso"}),v.jsx(Xe.Th,{w:60})]})}),v.jsx(Xe.Tbody,{children:t.map(_=>v.jsxs(Xe.Tr,{children:[v.jsx(Xe.Td,{children:_.name}),v.jsx(Xe.Td,{children:Sl(_.created_at)}),v.jsx(Xe.Td,{children:_.last_used_at?Sl(_.last_used_at):v.jsx(de,{c:"dimmed",children:"nunca"})}),v.jsx(Xe.Td,{children:v.jsx(wt,{label:"Revocar",children:v.jsx(Jn,{color:"red",variant:"subtle",onClick:()=>b(_.id),children:v.jsx(vo,{size:14})})})})]},_.id))})]}),v.jsx(fe,{children:v.jsxs(de,{size:"xs",c:"dimmed",children:["Endpoint MCP: ",v.jsx(pl,{children:w})]})})]})})}function pOe({opened:e,onClose:n,columns:t,onImported:i}){const[r,a]=x.useState(null),[o,l]=x.useState(!1),[u,f]=x.useState(!1),[h,d]=x.useState(new Set),[p,g]=x.useState(!1),[b,w]=x.useState(""),[k,_]=x.useState(""),[S,j]=x.useState(null),[T,A]=x.useState(""),[O,M]=x.useState(null),$=async()=>{l(!0),M(null);try{const B=await nae({includeImported:p,limit:200});a(B.issues),j(B.board_id),A(B.project_key),d(R=>{const D=new Set(B.issues.map(H=>H.key)),z=new Set;for(const H of R)D.has(H)&&z.add(H);return z})}catch(B){M(B.message),a([])}finally{l(!1)}};x.useEffect(()=>{e&&$()},[e,p]),x.useEffect(()=>{if(!k&&t.length>0){const B=t.find(R=>R.location!=="sidebar")||t[0];_(B.id)}},[t,k]);const q=x.useMemo(()=>{if(!r)return[];const B=b.trim().toLowerCase();return B?r.filter(R=>R.key.toLowerCase().includes(B)||R.summary.toLowerCase().includes(B)||R.assignee.toLowerCase().includes(B)||R.status_name.toLowerCase().includes(B)):r},[r,b]),P=B=>{d(R=>{const D=new Set(R);return D.has(B)?D.delete(B):D.add(B),D})},L=()=>{const B=q.filter(R=>!R.already_imported);h.size===B.length&&B.length>0?d(new Set):d(new Set(B.map(R=>R.key)))},U=async()=>{if(h.size!==0){f(!0);try{const B=await tae(Array.from(h),k||void 0),R=B.results.filter(Y=>Y.status==="imported").length,D=B.results.filter(Y=>Y.status==="skipped").length,z=B.results.filter(Y=>Y.status==="error"),H=`${R} importadas`+(D>0?` · ${D} omitidas`:"")+(z.length>0?` · ${z.length} con error`:"");hn.show({color:z.length>0?"yellow":"green",message:H,autoClose:5e3}),z.length>0&&console.warn("import errors",z),d(new Set),await $(),i==null||i()}catch(B){hn.show({color:"red",message:B.message})}finally{f(!1)}}},G=t.map(B=>({value:B.id,label:B.name}));return v.jsx(Gi,{opened:e,onClose:n,title:v.jsxs(Ee,{gap:8,children:[v.jsx(M9,{size:18}),v.jsxs(de,{fw:600,children:["Importar tareas de Jira",S?` · board ${S}`:"",T?` (${T})`:""]})]}),size:"xl",children:v.jsxs(kn,{gap:"sm",children:[v.jsxs(Ee,{gap:"xs",wrap:"nowrap",children:[v.jsx(or,{placeholder:"Filtrar por key, titulo, asignado o status...",value:b,onChange:B=>w(B.currentTarget.value),leftSection:v.jsx(eH,{size:14}),style:{flex:1}}),v.jsx(wt,{label:"Refrescar",withArrow:!0,children:v.jsx(Yn,{variant:"default",onClick:$,loading:o,leftSection:v.jsx(ff,{size:14}),children:"Refrescar"})})]}),v.jsxs(Ee,{justify:"space-between",gap:"xs",children:[v.jsx(Gr,{label:"Mostrar issues ya importadas",checked:p,onChange:B=>g(B.currentTarget.checked)}),v.jsx(jr,{label:"Columna fallback",description:"Para issues cuyo status no tiene mapping",data:G,value:k,onChange:B=>_(B||""),allowDeselect:!1,w:260,size:"xs"})]}),O&&v.jsx(de,{size:"sm",c:"red",children:O}),v.jsx(fe,{style:{maxHeight:480,overflowY:"auto",border:"1px solid var(--mantine-color-default-border)",borderRadius:4},children:o&&!r?v.jsx(Ee,{justify:"center",p:"md",children:v.jsx(Zt,{size:"sm"})}):q.length===0?v.jsx(de,{size:"sm",c:"dimmed",p:"md",ta:"center",children:(r==null?void 0:r.length)===0?"No hay issues sin importar en el board.":"Ninguna issue coincide con el filtro."}):v.jsxs(kn,{gap:0,children:[v.jsxs(Ee,{p:"xs",gap:"xs",style:{borderBottom:"1px solid var(--mantine-color-default-border)",background:"var(--mantine-color-default-hover)"},children:[v.jsx(Gr,{checked:h.size>0&&h.size===q.filter(B=>!B.already_imported).length,indeterminate:h.size>0&&h.size!B.already_imported).length,onChange:L}),v.jsxs(de,{size:"xs",fw:600,c:"dimmed",children:[q.length," issues · ",h.size," seleccionadas"]})]}),q.map(B=>v.jsxs(Ee,{p:"xs",gap:"xs",wrap:"nowrap",style:{borderBottom:"1px solid var(--mantine-color-default-border)",opacity:B.already_imported?.5:1},children:[v.jsx(Gr,{checked:h.has(B.key),disabled:B.already_imported,onChange:()=>P(B.key)}),B.issue_type_icon&&v.jsx(Xf,{src:B.issue_type_icon,w:16,h:16,alt:B.issue_type}),v.jsxs(kn,{gap:2,style:{flex:1,minWidth:0},children:[v.jsxs(Ee,{gap:6,wrap:"nowrap",children:[v.jsx(ho,{href:B.url,target:"_blank",rel:"noopener noreferrer",size:"sm",fw:600,children:B.key}),v.jsx(de,{size:"sm",truncate:!0,style:{flex:1},children:B.summary})]}),v.jsxs(Ee,{gap:4,wrap:"nowrap",children:[v.jsx(Gn,{size:"xs",variant:"light",color:vOe(B.status_name),children:B.status_name}),v.jsx(Gn,{size:"xs",variant:"outline",children:B.issue_type}),B.assignee&&v.jsxs(de,{size:"xs",c:"dimmed",children:["· ",B.assignee]}),B.already_imported&&v.jsx(Gn,{size:"xs",color:"gray",children:"ya en kanban"}),!B.already_imported&&!B.mapped_column_id&&v.jsx(Gn,{size:"xs",color:"orange",variant:"light",children:"sin mapping (usa fallback)"})]})]})]},B.key))]})}),v.jsxs(Ee,{justify:"flex-end",gap:"xs",children:[v.jsx(Yn,{variant:"default",onClick:n,disabled:u,children:"Cerrar"}),v.jsxs(Yn,{onClick:U,disabled:h.size===0||u,loading:u,children:["Importar ",h.size>0?`(${h.size})`:""]})]})]})})}function vOe(e){const n=e.toLowerCase();return n.includes("done")||n.includes("hecho")||n.includes("closed")?"green":n.includes("progress")||n.includes("doing")?"blue":n.includes("implementado")||n.includes("review")?"violet":n.includes("creado")||n.includes("backlog")||n.includes("nuevo")?"gray":"yellow"}function gOe(e,n=!0){const t=x.useRef(e);t.current=e,x.useEffect(()=>{if(!n)return;const i=new EventSource("/api/events",{withCredentials:!0}),r={};for(const a of Object.keys(t.current)){const o=l=>{const u=t.current[a];if(u)try{const f=l.data?JSON.parse(l.data):null;u(f)}catch{}};i.addEventListener(a,o),r[a]=o}return()=>{for(const[a,o]of Object.entries(r))i.removeEventListener(a,o);i.close()}},[n])}const Gh="column-";function yOe(e){return e==="column"?n=>{const t=n.droppableContainers.filter(r=>String(r.id).startsWith(Gh)),i=GF({...n,droppableContainers:t});return i.length>0?i:kae({...n,droppableContainers:t})}:n=>{const t=Sae(n);return t.length>0?t:WF(n)}}function bOe(){var Md,Os;const e=g9(),[n,t]=x.useState(null),[i,r]=x.useState([]),[a,o]=x.useState(null),[l,u]=x.useState(null),[f,h]=x.useState(void 0),[d,p]=x.useState(!1),[g,b]=x.useState(""),[w,k]=x.useState(Date.now()),[_,S]=x.useState(!1),[j,T]=x.useState("board"),[A,O]=x.useState([]),[M,$]=x.useState(!1),[q,P]=x.useState([]),[L,U]=x.useState(!1),[G,B]=x.useState([]),[R,D]=x.useState([]),[z,H]=x.useState(""),[Y,N]=x.useState(null),[W,V]=x.useState(null),[I,Q]=x.useState([]),[ie,re]=x.useState(!1),[Z,le]=x.useState(null),[ee,se]=x.useState(null),[ke,te]=x.useState(!1),[$e,xe]=x.useState(null),[Ae,ze]=x.useState(!1),[we,Ce]=x.useState(null),[Ne,he]=x.useState(!1),[He,Ye]=x.useState("#888888"),[We,Qe]=x.useState(null),[Je,oe]=x.useState(!1),[be,Ke]=x.useState(()=>{const X=localStorage.getItem("kanban_nav_width"),ce=X?parseInt(X,10):NaN;return Number.isFinite(ce)&&ce>=180&&ce<=600?ce:240}),en=x.useRef(be);x.useEffect(()=>{en.current=be,localStorage.setItem("kanban_nav_width",String(be))},[be]);const je=X=>{X.preventDefault();const ce=X.clientX,_e=en.current;document.body.style.cursor="col-resize",document.body.style.userSelect="none";const Ie=Wn=>{const ht=Wn.clientX-ce,Rt=Math.min(600,Math.max(180,_e+ht));Ke(Rt)},fn=()=>{document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",Ie),window.removeEventListener("mouseup",fn)};window.addEventListener("mousemove",Ie),window.addEventListener("mouseup",fn)},an=yae(pM(C9,{activationConstraint:{distance:5}}),pM(x9,{coordinateGetter:Xoe})),pn=32,Dn=400,bn=a!==null||l!==null,[sn,nn]=x.useState(!1),$n=x.useRef(Je);x.useEffect(()=>{$n.current=Je},[Je]),x.useEffect(()=>{if(!bn){nn(!1);return}let X=null,ce=!1,_e=!1;const Ie=()=>{X!==null&&(window.clearTimeout(X),X=null)},fn=Wn=>{const ht=Wn.clientX<=pn;if(ht===ce)return;if(ce=ht,nn(ht),!ht){_e=!0,Ie();return}if(!(!$n.current||_e))return;Ie();const si=!$n.current;X=window.setTimeout(()=>{oe(si),_e=!1},Dn)};return document.addEventListener("mousemove",fn),()=>{document.removeEventListener("mousemove",fn),Ie(),nn(!1)}},[bn]);const De=x.useCallback(async()=>{try{const X=await sM();t(X)}catch(X){hn.show({color:"red",message:X.message})}},[]),Fe=x.useRef(null),Vn=x.useCallback(()=>{Fe.current&&clearTimeout(Fe.current),Fe.current=setTimeout(()=>{Fe.current=null,De()},300)},[De]);x.useEffect(()=>()=>{Fe.current&&clearTimeout(Fe.current)},[]),x.useEffect(()=>{De()},[De]);const En=x.useCallback(async()=>{try{const X=await LF();r(X)}catch(X){console.warn("listUsers failed",X)}},[]),gn=x.useCallback(async()=>{try{const X=await lM();O(X)}catch(X){console.warn("listTrash failed",X)}},[]),xn=x.useCallback(async()=>{try{const X=await uM();P(X)}catch(X){console.warn("listArchive failed",X)}},[]),at=x.useCallback(async()=>{try{const X=await IF();B(X)}catch(X){console.warn("listTags failed",X)}},[]),Mt=x.useCallback(async()=>{try{const X=await Yre();D(X)}catch(X){console.warn("listRequesters failed",X)}},[]);x.useEffect(()=>{En()},[En]),x.useEffect(()=>{gn()},[gn]),x.useEffect(()=>{xn()},[xn]),x.useEffect(()=>{at(),Mt()},[at,Mt]),x.useEffect(()=>{if(a||l)return;const X=setInterval(()=>k(Date.now()),1e3);return()=>clearInterval(X)},[a,l]);const[qe,Ue]=x.useState([]),[In,ot]=x.useState(0),[Pn,rn]=x.useState("");x.useEffect(()=>{NF().then(X=>rn(X.version)).catch(()=>rn(""))},[]);const[on,ln]=x.useState(!1),[Kn,Xn]=x.useState(!1),[Lt,Rn]=x.useState(!1),Mn=x.useCallback(async()=>{try{const[X,ce]=await Promise.all([$F(!1),zF()]);Ue(X),ot(ce.count)}catch{}},[]);x.useEffect(()=>{e.user&&Mn()},[e.user,Mn]),gOe(x.useMemo(()=>({"board.invalidated":()=>{Vn()},"notification.created":X=>{const ce=X;if(!ce||!ce.id)return;Ue(fn=>fn.some(Wn=>Wn.id===ce.id)?fn:[ce,...fn].slice(0,100)),ot(fn=>fn+1);const _e=ce.actor_name||"Alguien",Ie=ce.card_seq_num?`#${ce.card_seq_num}`:ce.card_title;hn.show({autoClose:4e3,color:ce.kind==="mention"?"grape":"blue",title:`${_e} en ${Ie}`,message:ce.snippet})},"notification.read":X=>{const ce=X;ce!=null&&ce.id&&(Ue(_e=>_e.map(Ie=>Ie.id===ce.id?{...Ie,read_at:new Date().toISOString()}:Ie)),ot(_e=>Math.max(0,_e-1)))},"notification.read_all":()=>{Ue(X=>X.map(ce=>ce.read_at?ce:{...ce,read_at:new Date().toISOString()})),ot(0)}}),[Vn]),!!e.user),x.useEffect(()=>{if(!we)return;const X=ce=>{ce.key==="Escape"&&Ce(null)};return window.addEventListener("keydown",X),()=>window.removeEventListener("keydown",X)},[we]);const Qn=x.useMemo(()=>{const X=new Map;for(const ce of i)X.set(ce.id,ce);return X},[i]),Dt=x.useMemo(()=>n?[...n.columns].sort((X,ce)=>X.position-ce.position):[],[n]),fi=x.useMemo(()=>Dt.filter(X=>X.location!=="sidebar"),[Dt]),zi=x.useMemo(()=>Dt.filter(X=>X.location==="sidebar"),[Dt]),Ya=x.useMemo(()=>fi.map(X=>`${Gh}${X.id}`),[fi]),Co=x.useMemo(()=>zi.map(X=>`${Gh}${X.id}`),[zi]),Ta=x.useCallback(X=>{const ce=z.trim().toLowerCase();if(ce){const _e=X.seq_num>0?String(X.seq_num):"",Ie=X.seq_num>0?String(X.seq_num).padStart(5,"0"):"",fn=[X.title,X.description,X.requester,_e,Ie,...X.tags||[]].filter(Boolean).join(" ").toLowerCase(),Wn=ce.replace(/^#/,"").replace(/^0+(?=\d)/,"");if(!fn.includes(ce)&&!(Wn&&fn.includes(Wn)))return!1}if(Y&&X.assignee_id!==Y||ie&&X.assignee_id||W&&X.requester!==W)return!1;if(I.length>0){const _e=new Set(X.tags||[]);for(const Ie of I)if(!_e.has(Ie))return!1}if(ke&&!X.deadline)return!1;if(Z||ee){const _e=Z?new Date(Z).setHours(0,0,0,0):-1/0,Ie=ee?new Date(ee).setHours(23,59,59,999):1/0,fn=X.created_at?new Date(X.created_at).getTime():NaN,Wn=X.entered_at?new Date(X.entered_at).getTime():NaN,ht=Rt=>!isNaN(Rt)&&Rt>=_e&&Rt<=Ie;if(!ht(fn)&&!ht(Wn))return!1}return!0},[z,Y,ie,W,I,Z,ee,ke]),dr=x.useMemo(()=>{const X=new Map;if(!n)return X;for(const ce of n.columns)X.set(ce.id,[]);for(const ce of[...n.cards].sort((_e,Ie)=>_e.position-Ie.position)){if(!Ta(ce))continue;const _e=X.get(ce.column_id);_e&&_e.push(ce)}return X},[n,Ta]),jo=!!z.trim()||!!Y||ie||!!W||I.length>0||!!Z||!!ee||ke,Er=X=>n==null?void 0:n.cards.find(ce=>ce.id===X),hr=X=>n==null?void 0:n.columns.find(ce=>ce.id===X),yn=X=>{var ce;return(ce=Er(X))==null?void 0:ce.column_id},oi=X=>X.startsWith(Gh),cn=X=>X.slice(Gh.length),Mr=X=>{if(n)return oi(X)?cn(X):yn(X)},Ao=X=>{var fn;const ce=X.active.id,_e=(fn=X.active.data.current)==null?void 0:fn.type;if(h(_e),_e==="column"){u(cn(ce));return}const Ie=Er(ce);Ie&&o(Ie)},Kr=X=>{var Wn,ht;if(!n||((Wn=X.active.data.current)==null?void 0:Wn.type)!=="card")return;const ce=X.active.id,_e=(ht=X.over)==null?void 0:ht.id;if(!_e)return;const Ie=yn(ce),fn=Mr(_e);!Ie||!fn||Ie===fn||t(Rt=>{if(!Rt)return Rt;const si=Rt.cards.map(pr=>pr.id===ce?{...pr,column_id:fn}:pr);return{...Rt,cards:si}})},Xr=async X=>{var pr,mt;const ce=(pr=X.active.data.current)==null?void 0:pr.type,_e=X.active.id,Ie=(mt=X.over)==null?void 0:mt.id;if(o(null),u(null),h(void 0),!n||!Ie)return;if(ce==="column"){if(!oi(Ie))return;const et=cn(_e),di=cn(Ie);if(et===di)return;const Ti=hr(et),vr=hr(di);if(!Ti||!vr)return;const Qr=vr.location,Jr=Dt.filter(ir=>ir.location===Qr).map(ir=>ir.id),Ts=Jr.indexOf(et),Vl=Jr.indexOf(di);let nc;if(Ts===-1){const ir=Vl===-1?Jr.length:Vl;nc=[...Jr.slice(0,ir),et,...Jr.slice(ir)]}else{if(Ts===Vl)return;nc=s1(Jr,Ts,Vl)}t(ir=>{if(!ir)return ir;const Dd=new Map(nc.map((ea,wb)=>[ea,wb])),Rd=ir.columns.map(ea=>ea.id===et?{...ea,location:Qr,position:Dd.get(ea.id)??ea.position}:Dd.has(ea.id)?{...ea,position:Dd.get(ea.id)}:ea);return{...ir,columns:Rd}});try{Ti.location!==Qr&&await uu(et,{location:Qr}),await yre(nc)}catch(ir){hn.show({color:"red",message:ir.message})}De();return}const fn=Mr(Ie);if(!fn)return;const Wn=n.cards.find(et=>et.id===_e);if(Wn!=null&&Wn.locked&&Wn.column_id!==fn){hn.show({color:"yellow",message:"Card bloqueada: no se puede mover entre columnas"}),De();return}const ht=n.cards.filter(et=>et.column_id===fn).sort((et,di)=>et.position-di.position),Rt=ht.findIndex(et=>et.id===_e);let si;if(oi(Ie)||Rt===-1)si=[...ht.filter(et=>et.id!==_e).map(et=>et.id),_e];else{const et=ht.findIndex(di=>di.id===Ie);si=s1(ht.map(di=>di.id),Rt,et)}t(et=>{if(!et)return et;const di=new Map(si.map((vr,Qr)=>[vr,Qr])),Ti=et.cards.map(vr=>vr.column_id===fn&&di.has(vr.id)?{...vr,position:di.get(vr.id)}:vr);return{...et,cards:Ti}});try{await Ere(_e,fn,si),window.dispatchEvent(new CustomEvent("kanban-card-moved",{detail:{cardId:_e}}))}catch(et){hn.show({color:"red",message:et.message})}De()},Bp=async()=>{const X=g.trim();if(X)try{await vre(X),b(""),p(!1),De()}catch(ce){hn.show({color:"red",message:ce.message})}},vd=x.useCallback(async(X,ce)=>{try{await uu(X,{name:ce}),De()}catch(_e){hn.show({color:"red",message:_e.message})}},[De]),gd=x.useCallback(async(X,ce)=>{try{await uu(X,{width:ce}),De()}catch(_e){hn.show({color:"red",message:_e.message})}},[De]),Fp=x.useCallback(async(X,ce)=>{try{await uu(X,{location:ce}),De()}catch(_e){hn.show({color:"red",message:_e.message})}},[De]),Bl=x.useCallback(X=>{Ra.openConfirmModal({title:"Eliminar columna",children:v.jsx(de,{size:"sm",children:"Se borraran todas sus tarjetas. Continuar?"}),labels:{confirm:"Eliminar",cancel:"Cancelar"},confirmProps:{color:"red"},onConfirm:async()=>{try{await gre(X),De()}catch(ce){hn.show({color:"red",message:ce.message})}}})},[De]),Fl=x.useCallback(X=>{const ce=Ra.open({title:"Nueva tarjeta",size:"md",children:v.jsx(tH,{users:i,requesterOptions:R,tagOptions:G,initial:{requester:""},submitLabel:"Crear",onCancel:()=>Ra.close(ce),onSubmit:async _e=>{try{await bre({column_id:X,requester:_e.requester,title:_e.title,description:_e.description,assignee_id:_e.assignee_id,tags:_e.tags}),Ra.close(ce),De(),at(),Mt()}catch(Ie){hn.show({color:"red",message:Ie.message})}}})})},[De,i,e.user,R,G]),Dr=x.useCallback((X,ce)=>{var Ie;const _e=Ra.open({title:"Editar tarjeta",size:"85%",children:v.jsx(sce,{card:X,users:i,currentUserId:(Ie=e.user)==null?void 0:Ie.id,requesterOptions:R,tagOptions:G,highlightMessageId:ce==null?void 0:ce.highlightMessageId,onCancel:()=>Ra.close(_e),onSubmit:async fn=>{try{await Nc(X.id,{requester:fn.requester,title:fn.title,description:fn.description,assignee_id:fn.assignee_id,tags:fn.tags}),Ra.close(_e),De(),at(),Mt()}catch(Wn){hn.show({color:"red",message:Wn.message})}}})})},[De,i,e.user,R,G]),tr=x.useCallback(async X=>{try{const ce=await Pre(X);await De(),hn.show({color:"teal",message:`Duplicada: ${ce.title}`})}catch(ce){hn.show({color:"red",message:ce.message})}},[De]),yd=x.useCallback(async(X,ce)=>{t(_e=>_e&&{..._e,cards:_e.cards.map(Ie=>Ie.id===X?{...Ie,requester:ce}:Ie)});try{await Nc(X,{requester:ce})}catch(_e){hn.show({color:"red",message:_e.message}),De()}},[De]),bd=x.useCallback(X=>{T("board"),xe(X),window.setTimeout(()=>xe(null),3e3)},[]),wd=x.useCallback(X=>{const ce=Ra.open({title:"Reporte diario",size:"90%",children:v.jsx(Jje,{date:X,onJumpToCard:_e=>{Ra.close(ce),bd(_e)}})})},[bd]),kd=x.useCallback(async(X,ce)=>{t(_e=>_e&&{..._e,cards:_e.cards.map(Ie=>Ie.id===X?{...Ie,deadline:ce}:Ie)});try{await Nc(X,{deadline:ce})}catch(_e){hn.show({color:"red",message:_e.message}),De()}},[De]),ql=x.useCallback(async(X,ce)=>{t(_e=>_e&&{..._e,cards:_e.cards.map(Ie=>Ie.id===X?{...Ie,assignee_id:ce}:Ie)});try{await Nc(X,{assignee_id:ce})}catch(_e){hn.show({color:"red",message:_e.message}),De()}},[De]),qp=x.useCallback(async X=>{try{await wre(X),De(),gn()}catch(ce){hn.show({color:"red",message:ce.message})}},[De,gn]),mr=x.useCallback(async X=>{try{await kre(X),De(),gn()}catch(ce){hn.show({color:"red",message:ce.message})}},[De,gn]),_d=x.useCallback(async X=>{try{await Sre(X),De(),xn()}catch(ce){hn.show({color:"red",message:ce.message})}},[De,xn]),xd=x.useCallback(async X=>{try{await xre(X),De(),xn()}catch(ce){hn.show({color:"red",message:ce.message})}},[De,xn]),Sd=x.useCallback(async X=>{Ra.openConfirmModal({title:"Borrar permanentemente",children:v.jsx(de,{size:"sm",children:"Esta accion no se puede deshacer."}),labels:{confirm:"Borrar",cancel:"Cancelar"},confirmProps:{color:"red"},onConfirm:async()=>{try{await _re(X),gn()}catch(ce){hn.show({color:"red",message:ce.message})}}})},[gn]),Ka=x.useCallback(async(X,ce)=>{t(_e=>_e&&{..._e,cards:_e.cards.map(Ie=>Ie.id===X?{...Ie,color:ce}:Ie)});try{await Nc(X,{color:ce})}catch(_e){hn.show({color:"red",message:_e.message}),De()}},[De]),Cd=x.useCallback(async(X,ce)=>{t(_e=>_e&&{..._e,cards:_e.cards.map(Ie=>Ie.id===X?{...Ie,stickers:ce}:Ie)});try{await Zk(X,ce)}catch(_e){hn.show({color:"red",message:_e.message}),De()}},[De]),jd=x.useCallback((X,ce,_e)=>{we&&t(Ie=>{if(!Ie)return Ie;const fn=Ie.cards.map(Wn=>{if(Wn.id!==X)return Wn;const ht=[...Wn.stickers||[],{emoji:we,x:ce,y:_e}];return Zk(X,ht).catch(Rt=>{hn.show({color:"red",message:Rt.message}),De()}),{...Wn,stickers:ht}});return{...Ie,cards:fn}})},[we,De]),Oo=x.useCallback((X,ce)=>{t(_e=>{if(!_e)return _e;const Ie=_e.cards.map(fn=>{if(fn.id!==X)return fn;const Wn=(fn.stickers||[]).filter((ht,Rt)=>Rt!==ce);return Zk(X,Wn).catch(ht=>{hn.show({color:"red",message:ht.message}),De()}),{...fn,stickers:Wn}});return{..._e,cards:Ie}})},[De]),Hp=x.useCallback((X,ce,_e,Ie)=>{t(fn=>{if(!fn)return fn;const Wn=fn.cards.map(ht=>{if(ht.id!==X)return ht;const Rt=(ht.stickers||[]).map((si,pr)=>pr===ce?{...si,x:_e,y:Ie}:si);return{...ht,stickers:Rt}});return{...fn,cards:Wn}})},[]),Ad=x.useCallback(X=>{t(ce=>{if(!ce)return ce;const _e=ce.cards.find(Ie=>Ie.id===X);return _e&&Cd(X,_e.stickers||[]),ce})},[Cd]),Od=x.useCallback(X=>{Ra.open({title:X.title,size:"md",children:v.jsx(iAe,{card:X,columns:(n==null?void 0:n.columns)??[]})})},[n==null?void 0:n.columns]),ec=x.useCallback(async(X,ce)=>{t(_e=>_e&&{..._e,cards:_e.cards.map(Ie=>Ie.id===X?{...Ie,locked:ce}:Ie)});try{await Nc(X,{locked:ce})}catch(_e){hn.show({color:"red",message:_e.message}),De()}},[De]),Up=x.useCallback(async(X,ce)=>{t(_e=>_e&&{..._e,columns:_e.columns.map(Ie=>Ie.id===X?{...Ie,wip_limit:ce}:Ie)});try{await uu(X,{wip_limit:ce})}catch(_e){hn.show({color:"red",message:_e.message}),De()}},[De]),Vp=x.useCallback(X=>{const ce=(dr.get(X)||[]).filter(mt=>!mt.locked);if(ce.length===0){hn.show({color:"yellow",message:"No hay cards disponibles (filtro y bloqueadas excluidas)"});return}if(ce.length===1){const mt=document.querySelector(`[data-card-id="${ce[0].id}"]`);mt&&(mt.scrollIntoView({behavior:"smooth",block:"center"}),mt.classList.add("kanban-roulette-winner"),setTimeout(()=>mt.classList.remove("kanban-roulette-winner"),1700));return}const _e=(()=>{const mt=new Uint32Array(1);return crypto.getRandomValues(mt),mt[0]%ce.length})(),fn=2*ce.length+(_e-0+ce.length)%ce.length,Wn=50,ht=220,Rt=mt=>1-Math.pow(1-mt,3);let si=0;const pr=()=>{const mt=si%ce.length,et=(mt-1+ce.length)%ce.length,di=document.querySelector(`[data-card-id="${ce[et].id}"]`),Ti=document.querySelector(`[data-card-id="${ce[mt].id}"]`);if(di&&di.classList.remove("kanban-roulette-active"),Ti&&(Ti.classList.add("kanban-roulette-active"),Ti.scrollIntoView({behavior:"smooth",block:"center"})),si++,si>fn){Ti&&(Ti.classList.remove("kanban-roulette-active"),Ti.classList.add("kanban-roulette-winner"),setTimeout(()=>Ti.classList.remove("kanban-roulette-winner"),1700));return}const vr=fn>0?si/fn:1,Qr=Wn+(ht-Wn)*Rt(vr);setTimeout(pr,Qr)};pr()},[dr]),Hl=x.useCallback(async(X,ce)=>{t(_e=>_e&&{..._e,columns:_e.columns.map(Ie=>Ie.id===X?{...Ie,max_time_minutes:ce}:Ie)});try{await uu(X,{max_time_minutes:ce})}catch(_e){hn.show({color:"red",message:_e.message}),De()}},[De]),Zr=x.useCallback(async(X,ce)=>{t(_e=>_e&&{..._e,columns:_e.columns.map(Ie=>Ie.id===X?{...Ie,is_done:ce}:Ie)});try{await uu(X,{is_done:ce}),De()}catch(_e){hn.show({color:"red",message:_e.message}),De()}},[De]),Td=x.useMemo(()=>({height:50}),[]),Ed=x.useMemo(()=>({width:be,breakpoint:"md",collapsed:{mobile:!Je,desktop:!Je}}),[be,Je]),Cs=x.useMemo(()=>({width:380,breakpoint:"md",collapsed:{mobile:!_,desktop:!_}}),[_]),js=x.useMemo(()=>({main:{paddingInlineStart:0,paddingInlineEnd:0}}),[]);if(!n)return v.jsx(Ee,{justify:"center",p:"xl",children:v.jsx(Zt,{})});const Ul=a,As=l?hr(l):null;return v.jsxs(voe,{sensors:an,collisionDetection:yOe(f),onDragStart:Ao,onDragOver:Kr,onDragEnd:Xr,children:[v.jsx("div",{className:"kanban-drag-edge"+(bn?" is-active":"")+(sn?" is-armed":""),"data-test":"kanban-drag-edge","data-active":bn?"1":"0","data-armed":sn?"1":"0","aria-hidden":"true"}),v.jsxs(xr,{header:Td,navbar:Ed,aside:Cs,padding:0,styles:js,children:[v.jsx(xr.Header,{children:v.jsxs(Ee,{h:"100%",px:"md",justify:"space-between",children:[v.jsxs(Ee,{gap:6,children:[v.jsx(Jn,{variant:Je?"filled":"subtle",onClick:()=>oe(X=>!X),"aria-label":"Toggle sidebar",children:v.jsx(Xle,{size:16})}),v.jsx(s4,{size:22}),v.jsx(El,{order:4,children:"Kanban"}),v.jsx(Gt,{value:j,onChange:X=>X&&T(X),variant:"pills",ml:"md",children:v.jsxs(Gt.List,{children:[v.jsx(Gt.Tab,{value:"board",leftSection:v.jsx(s4,{size:14}),children:"Tablero"}),v.jsx(Gt.Tab,{value:"dashboard",leftSection:v.jsx(ule,{size:14}),children:"Dashboard"}),v.jsx(Gt.Tab,{value:"calendar",leftSection:v.jsx(sle,{size:14}),children:"Calendario"})]})})]}),v.jsxs(Ee,{gap:4,children:[v.jsx(Jn,{variant:"subtle",onClick:De,"aria-label":"Refresh",children:v.jsx(ff,{size:16})}),e.user&&v.jsx(cOe,{unreadCount:In,notifications:qe,onOpenCard:async(X,ce)=>{const _e=fn=>fn==null?void 0:fn.find(Wn=>Wn.id===X);let Ie=_e(n==null?void 0:n.cards);if(!Ie){await De();const fn=await sM();Ie=_e(fn.cards)}if(!Ie){const fn=await uM();Ie=_e(fn)}if(!Ie){const fn=await lM();Ie=_e(fn)}if(!Ie){hn.show({color:"red",message:"Card no encontrada"});return}Dr(Ie,{highlightMessageId:ce})},onChanged:Mn}),v.jsx(Jn,{variant:_?"filled":"subtle",onClick:()=>S(X=>!X),"aria-label":"Toggle chat",children:v.jsx(Xq,{size:16})}),e.user&&v.jsxs(zn,{position:"bottom-end",shadow:"md",withArrow:!0,closeOnItemClick:!1,children:[v.jsx(zn.Target,{children:v.jsx(Jn,{variant:"subtle","aria-label":"Usuario",children:v.jsx(mo,{size:26,radius:"xl",color:e.user.color||"blue",children:(e.user.display_name||e.user.username).slice(0,2).toUpperCase()})})}),v.jsxs(zn.Dropdown,{children:[v.jsx(zn.Label,{children:v.jsxs(Ee,{justify:"space-between",gap:6,wrap:"nowrap",children:[v.jsx(de,{size:"xs",fw:600,truncate:!0,children:e.user.display_name||e.user.username}),Pn&&v.jsxs(de,{size:"xs",c:"dimmed",ff:"monospace",children:["v",Pn]})]})}),v.jsxs(fe,{p:"xs",children:[v.jsx(de,{size:"xs",c:"dimmed",mb:4,children:"Color del avatar"}),v.jsx(SG,{value:e.user.color||"",onChange:async X=>{try{const ce=await hM({color:X});e.setUser(ce)}catch(ce){hn.show({color:"red",message:ce.message})}},options:Uue,onOpenCustom:()=>{var X,ce;Ye((ce=(X=e.user)==null?void 0:X.color)!=null&&ce.startsWith("#")?e.user.color:"#888888"),he(!0)}})]}),v.jsx(zn.Divider,{}),e.user.is_admin&&v.jsx(zn.Item,{leftSection:v.jsx(Jq,{size:14}),onClick:()=>ln(!0),children:"Modulos"}),e.user.is_admin&&v.jsx(zn.Item,{leftSection:v.jsx(M9,{size:14}),onClick:()=>Rn(!0),children:"Importar de Jira"}),v.jsx(zn.Item,{leftSection:v.jsx(Fle,{size:14}),onClick:()=>Xn(!0),children:"MCP tokens"}),v.jsx(zn.Item,{leftSection:v.jsx(Yle,{size:14}),color:"red",onClick:()=>e.logout(),children:"Cerrar sesion"})]})]}),((Md=e.user)==null?void 0:Md.is_admin)&&v.jsx(dOe,{opened:on,onClose:()=>ln(!1)}),((Os=e.user)==null?void 0:Os.is_admin)&&n&&v.jsx(pOe,{opened:Lt,onClose:()=>Rn(!1),columns:n.columns,onImported:()=>De()}),v.jsx(mOe,{opened:Kn,onClose:()=>Xn(!1)})]})]})}),v.jsxs(xr.Navbar,{p:"xs",children:[v.jsx(fe,{onMouseDown:je,style:{position:"absolute",top:0,right:-3,width:6,height:"100%",cursor:"col-resize",zIndex:10},"aria-label":"Resize sidebar"}),v.jsxs(kn,{gap:"xs",h:"100%",children:[v.jsx(de,{size:"xs",c:"dimmed",fw:600,tt:"uppercase",children:"Columnas parqueadas"}),v.jsx(fe,{style:{flex:1,overflowY:"auto"},children:v.jsx(n4,{items:Co,strategy:fq,children:v.jsxs(kn,{gap:"xs",children:[zi.length===0&&v.jsx(de,{size:"xs",c:"dimmed",children:'Vacio. Mueve columnas aqui con el icono "archivar" en su cabecera.'}),zi.map(X=>v.jsx(dz,{column:X,cards:dr.get(X.id)??[],now:w,collapsed:!0,onAddCard:Fl,onRenameColumn:vd,onResizeColumn:gd,onMoveColumnLocation:Fp,onDeleteColumn:Bl,onSetWIPLimit:Up,onSetMaxTimeMinutes:Hl,onPickRandom:Vp,onToggleDone:Zr,onEditCard:Dr,onDeleteCard:qp,onDuplicateCard:tr,onChangeCardColor:Ka,onShowHistory:Od,onToggleCardLock:ec,onAssignCard:ql,onSetCardDeadline:kd,highlightCardId:$e,onSetRequester:yd,onArchiveCard:xd,requesterOptions:R,onOpenCustomCardColor:(ce,_e)=>Qe({cardId:ce,color:_e}),activeSticker:we,onAddSticker:jd,onRemoveSticker:Oo,onMoveSticker:Hp,onCommitSticker:Ad,users:i,usersById:Qn},X.id))]})})}),v.jsxs(fe,{style:{borderTop:"1px solid var(--mantine-color-dark-5)",paddingTop:8},children:[v.jsx(Yn,{variant:"subtle",color:"gray",size:"xs",fullWidth:!0,justify:"space-between",leftSection:v.jsx(vo,{size:14}),rightSection:v.jsxs(Ee,{gap:4,children:[v.jsx(Gn,{size:"xs",variant:"light",color:A.length>0?"red":"gray",children:A.length}),M?v.jsx(r4,{size:12}):v.jsx(a4,{size:12})]}),onClick:()=>$(X=>!X),children:"Papelera"}),M&&v.jsxs(kn,{gap:4,mt:4,style:{maxHeight:220,overflowY:"auto"},children:[A.length===0&&v.jsx(de,{size:"xs",c:"dimmed",px:"xs",children:"Vacia."}),A.map(X=>v.jsx(Tt,{p:6,withBorder:!0,radius:"sm",bg:"dark.7",children:v.jsxs(Ee,{justify:"space-between",gap:4,wrap:"nowrap",children:[v.jsx(de,{size:"xs",truncate:!0,style:{flex:1},title:X.title,children:X.title}),v.jsx(wt,{label:"Restaurar",withArrow:!0,children:v.jsx(Jn,{size:"xs",variant:"subtle",color:"green",onClick:()=>mr(X.id),children:v.jsx(u1,{size:12})})}),v.jsx(wt,{label:"Borrar permanentemente",withArrow:!0,children:v.jsx(Jn,{size:"xs",variant:"subtle",color:"red",onClick:()=>Sd(X.id),children:v.jsx(xue,{size:12})})})]})},X.id))]})]}),v.jsxs(fe,{style:{borderTop:"1px solid var(--mantine-color-dark-5)",paddingTop:8},children:[v.jsx(Yn,{variant:"subtle",color:"gray",size:"xs",fullWidth:!0,justify:"space-between",leftSection:v.jsx(cs,{size:14}),rightSection:v.jsxs(Ee,{gap:4,children:[v.jsx(Gn,{size:"xs",variant:"light",color:q.length>0?"teal":"gray",children:q.length}),L?v.jsx(r4,{size:12}):v.jsx(a4,{size:12})]}),onClick:()=>U(X=>!X),"data-test":"archive-toggle",children:"Hecho (archivo)"}),L&&v.jsxs(kn,{gap:4,mt:4,style:{maxHeight:220,overflowY:"auto"},children:[q.length===0&&v.jsx(de,{size:"xs",c:"dimmed",px:"xs",children:"Sin cards archivadas."}),q.map(X=>v.jsx(Tt,{p:6,withBorder:!0,radius:"sm",bg:"dark.7","data-archived-card-id":X.id,children:v.jsxs(Ee,{justify:"space-between",gap:4,wrap:"nowrap",children:[v.jsx(de,{size:"xs",truncate:!0,style:{flex:1},title:X.title,children:X.title}),v.jsx(wt,{label:"Sacar del archivo (volver a Hecho)",withArrow:!0,children:v.jsx(Jn,{size:"xs",variant:"subtle",color:"teal",onClick:()=>_d(X.id),children:v.jsx(u1,{size:12})})})]})},X.id))]})]})]})]}),v.jsx(xr.Aside,{children:v.jsx(Pve,{onBoardChange:De})}),v.jsx(xr.Main,{children:j==="dashboard"?v.jsx(fe,{style:{height:"calc(100vh - 50px)",overflow:"auto"},children:v.jsx(eAe,{users:i})}):j==="calendar"?v.jsx(fe,{style:{height:"calc(100vh - 50px)",overflow:"auto"},children:v.jsx($ve,{users:i,cards:n.cards,onJumpToCard:bd,onOpenDailyReport:wd})}):v.jsxs(fe,{style:{height:"calc(100vh - 50px)",overflow:"hidden",display:"flex",flexDirection:"column"},children:[v.jsxs(Ee,{gap:"xs",p:"xs",wrap:"wrap",align:"end",style:{borderBottom:"1px solid var(--mantine-color-dark-4)"},children:[v.jsx(or,{leftSection:v.jsx(eH,{size:14}),placeholder:"Buscar (titulo, descripcion, solicitante, tag)",value:z,onChange:X=>H(X.currentTarget.value),rightSection:z?v.jsx(Jn,{size:"sm",variant:"subtle",color:"gray",onClick:()=>H(""),"aria-label":"Limpiar",children:v.jsx(qh,{size:14})}):null,style:{minWidth:280,flex:1},size:"xs"}),v.jsx(jr,{placeholder:"Asignado",value:Y,onChange:N,data:i.map(X=>({value:X.id,label:X.display_name||X.username})),clearable:!0,searchable:!0,size:"xs",style:{minWidth:160},disabled:ie}),v.jsx(Gr,{size:"xs",label:"Sin asignar",checked:ie,onChange:X=>{const ce=X.currentTarget.checked;re(ce),ce&&N(null)}}),v.jsx(Gr,{size:"xs",label:"Con deadline",checked:ke,onChange:X=>te(X.currentTarget.checked)}),v.jsx(jr,{placeholder:"Solicitante",value:W,onChange:V,data:R,clearable:!0,searchable:!0,size:"xs",style:{minWidth:160}}),v.jsx(u0,{placeholder:"Tags",value:I,onChange:Q,data:G,clearable:!0,searchable:!0,size:"xs",style:{minWidth:200}}),v.jsx(Du,{placeholder:"Desde",value:Z,onChange:X=>le(X?new Date(X):null),clearable:!0,size:"xs",style:{minWidth:130},valueFormat:"DD/MM/YY"}),v.jsx(Du,{placeholder:"Hasta",value:ee,onChange:X=>se(X?new Date(X):null),clearable:!0,size:"xs",style:{minWidth:130},valueFormat:"DD/MM/YY"}),v.jsxs(Ee,{gap:4,children:[v.jsx(Yn,{size:"xs",variant:"default",onClick:()=>{const X=new Date;le(X),se(X)},children:"Hoy"}),v.jsx(Yn,{size:"xs",variant:"default",onClick:()=>{const X=new Date,ce=new Date;ce.setDate(ce.getDate()-7),le(ce),se(X)},children:"7d"}),v.jsx(Yn,{size:"xs",variant:"default",onClick:()=>{const X=new Date,ce=new Date;ce.setDate(ce.getDate()-30),le(ce),se(X)},children:"30d"})]}),v.jsx(aOe,{opened:Ae,onClose:()=>ze(!1),onSelect:X=>Ce(X),target:v.jsx(Yn,{size:"xs",variant:we?"filled":"default",color:we?"yellow":void 0,leftSection:v.jsx(eue,{size:14}),onClick:()=>{we?ze(X=>!X):Ce("😀")},children:we?`Modo sticker: ${we}`:"Stickers"})}),we&&v.jsx(Yn,{size:"xs",variant:"subtle",color:"gray",leftSection:v.jsx(qh,{size:12}),onClick:()=>Ce(null),children:"ESC"}),jo&&v.jsx(Yn,{size:"xs",variant:"subtle",color:"gray",leftSection:v.jsx(qh,{size:12}),onClick:()=>{H(""),N(null),re(!1),V(null),Q([]),le(null),se(null),te(!1)},children:"Limpiar"})]}),v.jsx(n4,{items:Ya,strategy:Ioe,children:v.jsxs(Ee,{align:"stretch",wrap:"nowrap",gap:"md",p:"md",style:{flex:1,overflowX:"auto",overflowY:"hidden"},children:[fi.map(X=>v.jsx(dz,{column:X,cards:dr.get(X.id)??[],now:w,onAddCard:Fl,onRenameColumn:vd,onResizeColumn:gd,onMoveColumnLocation:Fp,onDeleteColumn:Bl,onSetWIPLimit:Up,onSetMaxTimeMinutes:Hl,onPickRandom:Vp,onToggleDone:Zr,onEditCard:Dr,onDeleteCard:qp,onDuplicateCard:tr,onChangeCardColor:Ka,onShowHistory:Od,onToggleCardLock:ec,onAssignCard:ql,onSetCardDeadline:kd,highlightCardId:$e,onSetRequester:yd,onArchiveCard:xd,requesterOptions:R,activeSticker:we,onAddSticker:jd,onRemoveSticker:Oo,onMoveSticker:Hp,onCommitSticker:Ad,users:i,usersById:Qn},X.id)),v.jsx(fe,{style:{minWidth:280,maxWidth:320},children:d?v.jsxs(kn,{gap:4,children:[v.jsx(or,{size:"xs",placeholder:"Nombre de columna...",value:g,onChange:X=>b(X.currentTarget.value),autoFocus:!0,onKeyDown:X=>{X.key==="Enter"&&Bp(),X.key==="Escape"&&(p(!1),b(""))}}),v.jsxs(Ee,{gap:4,children:[v.jsx(Yn,{size:"xs",onClick:Bp,children:"Anadir"}),v.jsx(Jn,{variant:"subtle",color:"gray",onClick:()=>p(!1),children:v.jsx(qh,{size:14})})]})]}):v.jsx(Yn,{variant:"light",color:"gray",leftSection:v.jsx(cf,{size:14}),onClick:()=>p(!0),children:"Anadir columna"})})]})})]})})]}),v.jsx(Noe,{children:Ul?v.jsx(CG,{card:Ul,now:w,onDelete:()=>{},onEdit:()=>{},onChangeColor:()=>{},onShowHistory:()=>{},onToggleLock:()=>{},onAssign:()=>{},users:i,assignee:Ul.assignee_id?Qn.get(Ul.assignee_id):void 0,isOverlay:!0}):As?v.jsx(fe,{style:{width:As.location==="sidebar"?220:As.width,padding:8,background:iH(""),border:`1px solid ${N9("")}`,borderRadius:8,opacity:.9},children:v.jsx(de,{fw:600,size:"sm",children:As.name})}):null}),v.jsx(B6,{opened:Ne,onClose:()=>he(!1),value:He,onAccept:async X=>{Ye(X);try{const ce=await hM({color:X});e.setUser(ce)}catch(ce){hn.show({color:"red",message:ce.message})}}}),v.jsx(B6,{opened:!!We,onClose:()=>Qe(null),value:(We==null?void 0:We.color)||"#888888",onAccept:X=>{We&&Ka(We.cardId,X)}})]})}function wOe(){const e=g9(),[n,t]=x.useState("login"),[i,r]=x.useState(""),[a,o]=x.useState(""),[l,u]=x.useState(""),[f,h]=x.useState(!1),[d,p]=x.useState(null),[g,b]=x.useState(!1),[w,k]=x.useState("");x.useEffect(()=>{pre().then(S=>b(!!S["registration-enabled"])).catch(()=>b(!1)),NF().then(S=>k(S.version)).catch(()=>k(""))},[]),x.useEffect(()=>{!g&&n==="register"&&t("login")},[g,n]);const _=async S=>{S.preventDefault(),p(null),h(!0);try{n==="login"?await e.login(i.trim(),a):await e.register(i.trim(),a,l.trim()||i.trim())}catch(j){p(j.message)}finally{h(!1)}};return v.jsx(Gf,{style:{minHeight:"100vh"},p:"md",children:v.jsx(Tt,{p:"xl",withBorder:!0,radius:"md",shadow:"md",style:{width:360,maxWidth:"100%"},children:v.jsx("form",{onSubmit:_,children:v.jsxs(kn,{gap:"md",children:[v.jsxs(kn,{gap:4,align:"center",children:[v.jsx(s4,{size:36}),v.jsx(El,{order:3,children:"Kanban"}),w&&v.jsxs(de,{size:"xs",c:"dimmed",ff:"monospace",children:["v",w]}),v.jsx(de,{size:"sm",c:"dimmed",children:n==="login"?"Inicia sesion":"Crea una cuenta"})]}),v.jsx(or,{label:"Usuario",value:i,onChange:S=>r(S.currentTarget.value),required:!0,autoFocus:!0,autoComplete:"username"}),n==="register"&&v.jsx(or,{label:"Nombre (opcional)",value:l,onChange:S=>u(S.currentTarget.value),autoComplete:"name"}),v.jsx(d0,{label:"Contrasena",value:a,onChange:S=>o(S.currentTarget.value),required:!0,autoComplete:n==="login"?"current-password":"new-password"}),d&&v.jsx(de,{size:"sm",c:"red",children:d}),v.jsx(Yn,{type:"submit",loading:f,fullWidth:!0,children:n==="login"?"Entrar":"Registrar"}),g?v.jsxs(de,{size:"xs",c:"dimmed",ta:"center",children:[n==="login"?"No tienes cuenta?":"Ya tienes cuenta?"," ",v.jsx(ho,{component:"button",type:"button",size:"xs",onClick:()=>{p(null),t(n==="login"?"register":"login")},children:n==="login"?"Registrate":"Inicia sesion"})]}):v.jsx(de,{size:"xs",c:"dimmed",ta:"center",children:"Registro de nuevos usuarios deshabilitado."})]})})})})}function kOe(){const{user:e,loading:n}=g9();return n?v.jsx(Gf,{style:{minHeight:"100vh"},children:v.jsx(Zt,{})}):e?v.jsx(bOe,{}):v.jsx(wOe,{})}const _Oe={primaryColor:"blue",fontFamily:"system-ui, -apple-system, sans-serif"};hre.createRoot(document.getElementById("root")).render(v.jsx(nL,{theme:_Oe,defaultColorScheme:"dark",children:v.jsxs($ie,{children:[v.jsx(_o,{position:"top-right"}),v.jsx(iae,{children:v.jsx(kOe,{})})]})})); diff --git a/backend/dist/index.html b/backend/dist/index.html index c4447e5..ae8c7f8 100644 --- a/backend/dist/index.html +++ b/backend/dist/index.html @@ -4,7 +4,7 @@ Kanban - + diff --git a/backend/handlers.go b/backend/handlers.go index a20b5dd..07c8c36 100644 --- a/backend/handlers.go +++ b/backend/handlers.go @@ -322,6 +322,10 @@ func handleMoveCard(db *DB, hub *EventHub) http.HandlerFunc { badRequest(w, "column_id required") return } + // Read the previous column BEFORE mutating so we can decide whether + // this is an actual column move (vs a same-column reorder). Outbound + // modules (Jira) only care about the former. + prevColumnID, _ := db.lookupCardColumnID(id) actor, _ := infra.UserIDFromContext(r.Context(), userCtxKey) if err := db.MoveCard(id, body.ColumnID, body.OrderedIDs, actor); err != nil { if strings.Contains(err.Error(), "not found") { @@ -331,6 +335,17 @@ func handleMoveCard(db *DB, hub *EventHub) http.HandlerFunc { serverError(w, err) return } + // Distinct event when the card crossed columns so the Jira module + // runs transition() instead of plain update(). Reorder-only goes + // straight to board.invalidated (frontend refetch) without a Jira + // roundtrip. + if prevColumnID != "" && prevColumnID != body.ColumnID { + hub.PublishJSON("card.moved", id, "", map[string]string{ + "card_id": id, + "from_column_id": prevColumnID, + "to_column_id": body.ColumnID, + }) + } publishInvalidated(hub, id, body.ColumnID) w.WriteHeader(http.StatusNoContent) } diff --git a/backend/modules.go b/backend/modules.go index f00c72d..cb2f8e6 100644 --- a/backend/modules.go +++ b/backend/modules.go @@ -229,6 +229,24 @@ func (db *DB) listColumnsByName() (map[string]Column, error) { return out, nil } +// lookupCardColumnID returns the current column_id for a card, or "" if the +// card does not exist. Used by handleMoveCard to detect column changes vs +// same-column reorders before publishing card.moved events. +func (db *DB) lookupCardColumnID(cardID string) (string, error) { + var col sql.NullString + err := db.conn.QueryRow(`SELECT column_id FROM cards WHERE id = ?`, cardID).Scan(&col) + if err == sql.ErrNoRows { + return "", nil + } + if err != nil { + return "", err + } + if !col.Valid { + return "", nil + } + return col.String, nil +} + // findCardByJiraKey returns the id of the card linked to jiraKey, or "" if // no card carries that link. The lookup ignores soft-deleted cards. func (db *DB) findCardByJiraKey(jiraKey string) (string, error) { diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 646e749..ce90223 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -652,6 +652,10 @@ export function App() { try { await api.moveCard(activeId, destCol, orderedIds); + // Nudge the moved card's Jira sync indicator to refetch immediately + // so the operator sees the yellow "syncing" state without waiting for + // the steady-state poll tick (5s). + window.dispatchEvent(new CustomEvent("kanban-card-moved", { detail: { cardId: activeId } })); } catch (err) { notifications.show({ color: "red", message: (err as Error).message }); } diff --git a/frontend/src/components/JiraSyncIndicator.tsx b/frontend/src/components/JiraSyncIndicator.tsx index ec6fd7b..192bbe9 100644 --- a/frontend/src/components/JiraSyncIndicator.tsx +++ b/frontend/src/components/JiraSyncIndicator.tsx @@ -5,11 +5,11 @@ import * as api from "../api"; import type { CardJiraSyncState } from "../api"; import { formatDateTimeShort } from "./format"; -// Pull state every POLL_MS so the indicator catches up with async dispatcher -// pushes without needing SSE. 10s is a reasonable balance: short enough that a -// drag-to-Jira shows green within one tick, long enough that the polling is -// not a noticeable load. -const POLL_MS = 10000; +// Adaptive polling: 5s steady-state, 1s while the card is mid-sync. The fast +// cadence catches the yellow → green transition right after a column drag; +// the slow cadence keeps the per-card load manageable when the board is idle. +const POLL_MS_STEADY = 5000; +const POLL_MS_INFLIGHT = 1000; type Tone = "gray" | "yellow" | "green" | "red"; @@ -47,22 +47,43 @@ export function JiraSyncIndicator({ cardId, refreshTick }: Props) { useEffect(() => { let cancelled = false; + let timer: ReturnType | null = null; + const schedule = (ms: number) => { + if (cancelled) return; + if (timer) clearTimeout(timer); + timer = setTimeout(load, ms); + }; const load = async () => { try { const s = await api.getCardJiraSync(cardId); - if (!cancelled) { - setState(s); - setErr(null); - } + if (cancelled) return; + setState(s); + setErr(null); + // Adaptive cadence: fast while the dispatcher is actively processing + // this card, slow otherwise. Re-arms on every fetch so the moment + // inflight flips off we drop back to the steady cadence. + schedule(s.inflight ? POLL_MS_INFLIGHT : POLL_MS_STEADY); } catch (e) { - if (!cancelled) setErr((e as Error).message); + if (cancelled) return; + setErr((e as Error).message); + schedule(POLL_MS_STEADY); } }; + // Window event fired by the App's drag-end handler so the indicator + // refetches immediately after a move (and so the user sees yellow within + // ~200ms instead of waiting up to POLL_MS_STEADY). + const onMoved = (e: Event) => { + const detail = (e as CustomEvent).detail as { cardId?: string } | undefined; + if (detail?.cardId === cardId) { + schedule(150); + } + }; + window.addEventListener("kanban-card-moved", onMoved); load(); - const t = setInterval(load, POLL_MS); return () => { cancelled = true; - clearInterval(t); + if (timer) clearTimeout(timer); + window.removeEventListener("kanban-card-moved", onMoved); }; }, [cardId, refreshTick]);